Skip to content

Commit 1e8646d

Browse files
feat(lib): Add Select input component (#3256)
Co-authored-by: Vincent Prothais <[email protected]>
1 parent 93987e2 commit 1e8646d

File tree

15 files changed

+762
-99
lines changed

15 files changed

+762
-99
lines changed

.bundlewatch.config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"files": [
33
{
44
"path": "./packages/orange/dist/css/ouds-web-bootstrap.css",
5-
"maxSize": "72.0 kB"
5+
"maxSize": "72.30 kB"
66
},
77
{
88
"path": "./packages/orange/dist/css/ouds-web-bootstrap.min.css",
9-
"maxSize": "68.5 kB"
9+
"maxSize": "68.75 kB"
1010
},
1111
{
1212
"path": "./packages/orange/dist/css/ouds-web-grid.css",
@@ -34,11 +34,11 @@
3434
},
3535
{
3636
"path": "./packages/orange/dist/css/ouds-web.css",
37-
"maxSize": "62.5 kB"
37+
"maxSize": "62.75 kB"
3838
},
3939
{
4040
"path": "./packages/orange/dist/css/ouds-web.min.css",
41-
"maxSize": "58.5 kB"
41+
"maxSize": "59.25 kB"
4242
},
4343
{
4444
"path": "./dist/js/ouds-web.bundle.js",

build/vnu-jar.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
4242
'Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.',
4343
// Allow `switch` attribute.
4444
'Attribute “switch” not allowed on element “input” at this point.',
45-
'Element “style” not allowed as child of element “div” in this context.*'
45+
'Element “style” not allowed as child of element “div” in this context.*',
46+
// Allow empty option in select
47+
'Element “option” without attribute “label” must not be empty.'
4648
// End mod
4749
].join('|')
4850

packages/orange/scss/tokens/_composite.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ $alert-icon-warning-internal: url("data:image/svg+xml,<svg xmlns='http://www.w3.
108108
// icon important-fill v1.4
109109
$alert-icon-important: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2.4A9.6 9.6 0 0 0 2.4 12a9.6 9.6 0 0 0 9.6 9.6 9.6 9.6 0 0 0 9.6-9.6A9.6 9.6 0 0 0 12 2.4Zm-1.2 5.631c0-1.187.4-1.758 1.2-1.758.8 0 1.2.57 1.2 1.758v4.535c0 1.188-.385 1.774-1.2 1.774-.8 0-1.2-.585-1.2-1.774V8.031Zm1.187 10.119a1.394 1.394 0 0 1-1.387-1.407 1.38 1.38 0 0 1 1.387-1.391 1.39 1.39 0 0 1 1.388 1.39c0 .768-.622 1.408-1.388 1.408Z'/></svg>") !default;
110110

111+
// Select input
112+
$select-input-chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4.874 9.977 12 17.25l7.125-7.273-2.034-2.079L12 13.095 6.91 7.898 4.874 9.977Z'/></svg>") !default;
113+
$select-input-expanded-chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19.124 14.023 12 6.75l-7.125 7.273 2.035 2.079L12 10.905l5.088 5.197 2.037-2.079Z'/></svg>") !default;
114+
111115
//// SVG used several times
112116
$svg-as-custom-props: (
113117
"chevron": $chevron-icon,

packages/sosh/scss/tokens/_composite.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ $alert-icon-warning-internal: url("data:image/svg+xml,<svg xmlns='http://www.w3.
9999
// icon important-fill v1.4
100100
$alert-icon-important: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2.4a9.6 9.6 0 1 1 0 19.2 9.6 9.6 0 0 1 0-19.2Zm0 13.2c-.333 0-.617.12-.85.36-.233.24-.35.52-.35.84 0 .33.117.613.35.847.219.23.528.358.85.353.335 0 .618-.117.851-.353a1.16 1.16 0 0 0 .35-.847c0-.32-.117-.6-.35-.84a1.142 1.142 0 0 0-.85-.36Zm.001-9.6c-.642 0-1.17.455-1.2 1.025l.24 7.135h1.92l.24-7.135C13.17 6.455 12.643 6 12 6Z'/></svg>") !default;
101101

102+
// Select input
103+
$select-input-chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M17.019 7.431c-.015.015.015-.019 0 0l-4.905 5.55-4.811-5.55c-.615-.619-1.388-.506-1.913 0-.019.015.015-.019 0 0-.536.566-.506 1.448.008 2.036l5.812 6.709c.48.551 1.286.506 1.808 0L18.9 9.467c.717-.716.574-1.545.094-2.036-.48-.491-1.339-.652-1.976 0Z'/></svg>") !default;
104+
$select-input-expanded-chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.378 16.142c-.015.018.015-.015 0 0l4.905-5.55 4.811 5.55c.615.618 1.388.506 1.913 0-.015.018.019-.015 0 0 .536-.566.506-1.448-.008-2.037l-5.812-6.708c-.48-.552-1.286-.507-1.808 0l-5.883 6.708c-.717.717-.574 1.545-.094 2.037.48.491 1.339.652 1.976 0Z'/></svg>") !default;
105+
102106
//// SVG used several times
103107
$svg-as-custom-props: (
104108
"chevron": $chevron-icon,

scss/_forms.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
@import "forms/labels";
22
@import "forms/form-text";
33
@import "forms/form-control";
4-
@import "forms/form-select";
54
@import "forms/control-item";
65
@import "forms/form-range";
76
// OUDS mod: no floating-labels
87
@import "forms/input-group";
98
@import "forms/star-rating"; // OUDS mod
109
@import "forms/validation";
1110
@import "forms/quantity-selector"; // OUDS mod
11+
@import "forms/select-input"; // OUDS mod
1212
@import "forms/text-input"; // OUDS mod

scss/forms/_form-select.scss

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)