@hashicorp/design-system-components 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.stylelintignore +26 -0
- package/CHANGELOG.md +17 -0
- package/addon/components/hds/badge/index.hbs +1 -1
- package/addon/components/hds/badge/index.js +3 -3
- package/addon/components/hds/badge-count/index.js +3 -3
- package/addon/components/hds/breadcrumb/item.js +1 -1
- package/addon/components/hds/card/container.js +5 -5
- package/addon/components/hds/dropdown/toggle/button.hbs +1 -0
- package/addon/components/hds/form/field/index.js +1 -1
- package/addon/components/hds/form/text-input/base.js +1 -1
- package/addon/components/hds/icon-tile/index.hbs +3 -3
- package/addon/components/hds/icon-tile/index.js +3 -3
- package/addon/components/hds/stepper/step/indicator.js +1 -1
- package/addon/components/hds/stepper/task/indicator.js +1 -1
- package/app/styles/@hashicorp/design-system-components.scss +12 -12
- package/app/styles/@hashicorp/design-system-power-select-overrides.scss +225 -0
- package/app/styles/components/alert.scss +39 -37
- package/app/styles/components/avatar.scss +6 -6
- package/app/styles/components/badge-count.scss +19 -20
- package/app/styles/components/badge.scss +21 -22
- package/app/styles/components/breadcrumb.scss +123 -123
- package/app/styles/components/button-set.scss +5 -5
- package/app/styles/components/button.scss +56 -49
- package/app/styles/components/card/container.scss +5 -4
- package/app/styles/components/card/index.scss +1 -1
- package/app/styles/components/dropdown.scss +76 -66
- package/app/styles/components/empty-state.scss +8 -5
- package/app/styles/components/form/checkbox.scss +11 -8
- package/app/styles/components/form/error.scss +3 -3
- package/app/styles/components/form/field.scss +5 -4
- package/app/styles/components/form/group.scss +3 -2
- package/app/styles/components/form/helper-text.scss +1 -1
- package/app/styles/components/form/index.scss +0 -1
- package/app/styles/components/form/label.scss +2 -2
- package/app/styles/components/form/legend.scss +1 -1
- package/app/styles/components/form/radio.scss +11 -8
- package/app/styles/components/form/select.scss +14 -12
- package/app/styles/components/form/text-input.scss +14 -13
- package/app/styles/components/form/textarea.scss +7 -7
- package/app/styles/components/form/toggle.scss +38 -36
- package/app/styles/components/icon-tile.scss +35 -37
- package/app/styles/components/link/inline.scss +3 -3
- package/app/styles/components/link/standalone.scss +13 -15
- package/app/styles/components/stepper/index.scss +2 -2
- package/app/styles/components/stepper/step-indicator.scss +23 -18
- package/app/styles/components/stepper/task-indicator.scss +45 -45
- package/app/styles/components/tag.scss +15 -15
- package/app/styles/components/toast.scss +3 -3
- package/app/styles/mixins/_focus-ring.scss +8 -8
- package/package.json +12 -4
package/.stylelintignore
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# unconventional js
|
|
2
|
+
/blueprints/*/files/
|
|
3
|
+
/vendor/
|
|
4
|
+
|
|
5
|
+
# compiled output
|
|
6
|
+
/dist/
|
|
7
|
+
/tmp/
|
|
8
|
+
|
|
9
|
+
# dependencies
|
|
10
|
+
/bower_components/
|
|
11
|
+
/node_modules/
|
|
12
|
+
|
|
13
|
+
# misc
|
|
14
|
+
/coverage/
|
|
15
|
+
!.*
|
|
16
|
+
.*/
|
|
17
|
+
.eslintcache
|
|
18
|
+
.lint-todo/
|
|
19
|
+
|
|
20
|
+
# ember-try
|
|
21
|
+
/.node_modules.ember-try/
|
|
22
|
+
/bower.json.ember-try
|
|
23
|
+
/npm-shrinkwrap.json.ember-try
|
|
24
|
+
/package.json.ember-try
|
|
25
|
+
/package-lock.json.ember-try
|
|
26
|
+
/yarn.lock.ember-try
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @hashicorp/design-system-components
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#539](https://github.com/hashicorp/design-system/pull/539) [`5b548865`](https://github.com/hashicorp/design-system/commit/5b548865ed1000e5f51c22365a81c858576bd2bd) Thanks [@alex-ju](https://github.com/alex-ju)! - Add custom styles for `ember-power-select` add-on
|
|
8
|
+
|
|
9
|
+
* [#577](https://github.com/hashicorp/design-system/pull/577) [`2f5a2c21`](https://github.com/hashicorp/design-system/commit/2f5a2c214c25be7fd91c2e73c88fb436f72dbd6f) Thanks [@alex-ju](https://github.com/alex-ju)! - Add small variant to `Hds::Dropdown::ToggleButton`
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#545](https://github.com/hashicorp/design-system/pull/545) [`6d2a6298`](https://github.com/hashicorp/design-system/commit/6d2a6298c407a74a14a11b3426fd60d673d10954) Thanks [@didoo](https://github.com/didoo)! - Small cleanup (reformatting, linting) of the Sass files. Should have zero visual impact on the components.
|
|
14
|
+
|
|
15
|
+
* [#565](https://github.com/hashicorp/design-system/pull/565) [`0f5247f0`](https://github.com/hashicorp/design-system/commit/0f5247f0f088ad35f877294089d0c69caaffdb37) Thanks [@didoo](https://github.com/didoo)! - added stylelint to the codebase and re-organized CSS declarations
|
|
16
|
+
|
|
17
|
+
* Updated dependencies [[`0b245333`](https://github.com/hashicorp/design-system/commit/0b24533369ccc2d02aa5c6c8b8ba4f722e07d236)]:
|
|
18
|
+
- @hashicorp/design-system-tokens@1.0.1
|
|
19
|
+
|
|
3
20
|
## 1.0.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div class={{this.classNames}} ...attributes>
|
|
2
2
|
{{#if @icon}}
|
|
3
3
|
<div class="hds-badge__icon">
|
|
4
|
-
<FlightIcon @name={{this.icon}} @size="16" @stretched=
|
|
4
|
+
<FlightIcon @name={{this.icon}} @size="16" @stretched={{true}} />
|
|
5
5
|
</div>
|
|
6
6
|
{{/if}}
|
|
7
7
|
{{#if this.isIconOnly}}
|
|
@@ -30,7 +30,7 @@ export default class HdsBadgeIndexComponent extends Component {
|
|
|
30
30
|
assert(
|
|
31
31
|
`@size for "Hds::Badge" must be one of the following: ${SIZES.join(
|
|
32
32
|
', '
|
|
33
|
-
)}
|
|
33
|
+
)}; received: ${size}`,
|
|
34
34
|
SIZES.includes(size)
|
|
35
35
|
);
|
|
36
36
|
|
|
@@ -51,7 +51,7 @@ export default class HdsBadgeIndexComponent extends Component {
|
|
|
51
51
|
assert(
|
|
52
52
|
`@type for "Hds::Badge" must be one of the following: ${TYPES.join(
|
|
53
53
|
', '
|
|
54
|
-
)}
|
|
54
|
+
)}; received: ${type}`,
|
|
55
55
|
TYPES.includes(type)
|
|
56
56
|
);
|
|
57
57
|
|
|
@@ -72,7 +72,7 @@ export default class HdsBadgeIndexComponent extends Component {
|
|
|
72
72
|
assert(
|
|
73
73
|
`@color for "Hds::Badge" must be one of the following: ${COLORS.join(
|
|
74
74
|
', '
|
|
75
|
-
)}
|
|
75
|
+
)}; received: ${color}`,
|
|
76
76
|
COLORS.includes(color)
|
|
77
77
|
);
|
|
78
78
|
|
|
@@ -23,7 +23,7 @@ export default class HdsBadgeCountIndexComponent extends Component {
|
|
|
23
23
|
assert(
|
|
24
24
|
`@size for "Hds::BadgeCount" must be one of the following: ${SIZES.join(
|
|
25
25
|
', '
|
|
26
|
-
)}
|
|
26
|
+
)}; received: ${size}`,
|
|
27
27
|
SIZES.includes(size)
|
|
28
28
|
);
|
|
29
29
|
|
|
@@ -44,7 +44,7 @@ export default class HdsBadgeCountIndexComponent extends Component {
|
|
|
44
44
|
assert(
|
|
45
45
|
`@type for "Hds::BadgeCount" must be one of the following: ${TYPES.join(
|
|
46
46
|
', '
|
|
47
|
-
)}
|
|
47
|
+
)}; received: ${type}`,
|
|
48
48
|
TYPES.includes(type)
|
|
49
49
|
);
|
|
50
50
|
|
|
@@ -65,7 +65,7 @@ export default class HdsBadgeCountIndexComponent extends Component {
|
|
|
65
65
|
assert(
|
|
66
66
|
`@color for "Hds::BadgeCount" must be one of the following: ${COLORS.join(
|
|
67
67
|
', '
|
|
68
|
-
)}
|
|
68
|
+
)}; received: ${color}`,
|
|
69
69
|
COLORS.includes(color)
|
|
70
70
|
);
|
|
71
71
|
|
|
@@ -14,7 +14,7 @@ export default class HdsBreadcrumbItemComponent extends Component {
|
|
|
14
14
|
|
|
15
15
|
if (maxWidth) {
|
|
16
16
|
assert(
|
|
17
|
-
`@maxWidth for "Hds::Breadcrumb::Item" must be a size as number in 'px' or in 'em' (eg. '200px' or '24em')
|
|
17
|
+
`@maxWidth for "Hds::Breadcrumb::Item" must be a size as number in 'px' or in 'em' (eg. '200px' or '24em'); received: ${maxWidth}`,
|
|
18
18
|
maxWidth.match(/^\d+(px|em)$/)
|
|
19
19
|
);
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ export default class HdsCardContainerComponent extends Component {
|
|
|
23
23
|
assert(
|
|
24
24
|
`@level for "Hds::Card::Container" must be one of the following: ${LEVELS.join(
|
|
25
25
|
', '
|
|
26
|
-
)}
|
|
26
|
+
)}; received: ${level}`,
|
|
27
27
|
LEVELS.includes(level)
|
|
28
28
|
);
|
|
29
29
|
|
|
@@ -44,7 +44,7 @@ export default class HdsCardContainerComponent extends Component {
|
|
|
44
44
|
assert(
|
|
45
45
|
`@levelHover for "Hds::Card::Container" must be one of the following: ${LEVELS.join(
|
|
46
46
|
', '
|
|
47
|
-
)}
|
|
47
|
+
)}; received: ${levelHover}`,
|
|
48
48
|
LEVELS.includes(levelHover)
|
|
49
49
|
);
|
|
50
50
|
}
|
|
@@ -66,7 +66,7 @@ export default class HdsCardContainerComponent extends Component {
|
|
|
66
66
|
assert(
|
|
67
67
|
`@levelActive for "Hds::Card::Container" must be one of the following: ${LEVELS.join(
|
|
68
68
|
', '
|
|
69
|
-
)}
|
|
69
|
+
)}; received: ${levelActive}`,
|
|
70
70
|
LEVELS.includes(levelActive)
|
|
71
71
|
);
|
|
72
72
|
}
|
|
@@ -88,7 +88,7 @@ export default class HdsCardContainerComponent extends Component {
|
|
|
88
88
|
assert(
|
|
89
89
|
`@background for "Hds::Card::Container" must be one of the following: ${BACKGROUNDS.join(
|
|
90
90
|
', '
|
|
91
|
-
)}
|
|
91
|
+
)}; received: ${background}`,
|
|
92
92
|
BACKGROUNDS.includes(background)
|
|
93
93
|
);
|
|
94
94
|
|
|
@@ -109,7 +109,7 @@ export default class HdsCardContainerComponent extends Component {
|
|
|
109
109
|
assert(
|
|
110
110
|
`@overflow for "Hds::Card::Container" must be one of the following: ${OVERFLOWS.join(
|
|
111
111
|
', '
|
|
112
|
-
)}
|
|
112
|
+
)}; received: ${overflow}`,
|
|
113
113
|
OVERFLOWS.includes(overflow)
|
|
114
114
|
);
|
|
115
115
|
|
|
@@ -37,7 +37,7 @@ export default class HdsFormFieldIndexComponent extends Component {
|
|
|
37
37
|
assert(
|
|
38
38
|
`@type for "Hds::Form::Field" must be one of the following: ${LAYOUT_TYPES.join(
|
|
39
39
|
', '
|
|
40
|
-
)}
|
|
40
|
+
)}; received: ${layout}`,
|
|
41
41
|
LAYOUT_TYPES.includes(layout)
|
|
42
42
|
);
|
|
43
43
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<div class={{this.classNames}} aria-hidden="true" ...attributes>
|
|
2
2
|
{{#if @icon}}
|
|
3
3
|
<div class="hds-icon-tile__icon">
|
|
4
|
-
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched=
|
|
4
|
+
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
5
5
|
</div>
|
|
6
6
|
{{/if}}
|
|
7
7
|
{{#if @logo}}
|
|
8
8
|
<div class="hds-icon-tile__logo">
|
|
9
|
-
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched=
|
|
9
|
+
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
10
10
|
</div>
|
|
11
11
|
{{/if}}
|
|
12
12
|
{{#if this.iconSecondary}}
|
|
13
13
|
<div class="hds-icon-tile__extra">
|
|
14
14
|
<div class="hds-icon-tile__extra-icon">
|
|
15
|
-
<FlightIcon @name={{this.iconSecondary}} @size="16" @stretched=
|
|
15
|
+
<FlightIcon @name={{this.iconSecondary}} @size="16" @stretched={{true}} />
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
{{/if}}
|
|
@@ -32,7 +32,7 @@ export default class HdsIconTileIndexComponent extends Component {
|
|
|
32
32
|
assert(
|
|
33
33
|
`@size for "Hds::IconTile" must be one of the following: ${SIZES.join(
|
|
34
34
|
', '
|
|
35
|
-
)}
|
|
35
|
+
)}; received: ${size}`,
|
|
36
36
|
SIZES.includes(size)
|
|
37
37
|
);
|
|
38
38
|
|
|
@@ -59,7 +59,7 @@ export default class HdsIconTileIndexComponent extends Component {
|
|
|
59
59
|
assert(
|
|
60
60
|
`@color for "Hds::IconTile" must be one of the following: ${COLORS.join(
|
|
61
61
|
', '
|
|
62
|
-
)}
|
|
62
|
+
)}; received: ${color}`,
|
|
63
63
|
COLORS.includes(color)
|
|
64
64
|
);
|
|
65
65
|
|
|
@@ -112,7 +112,7 @@ export default class HdsIconTileIndexComponent extends Component {
|
|
|
112
112
|
assert(
|
|
113
113
|
`@logo for "Hds::IconTile" must be one of the following: ${PRODUCTS.join(
|
|
114
114
|
', '
|
|
115
|
-
)}
|
|
115
|
+
)}; received: ${logo}`,
|
|
116
116
|
PRODUCTS.includes(logo)
|
|
117
117
|
);
|
|
118
118
|
}
|
|
@@ -17,7 +17,7 @@ export default class HdsStepperIndicatorStepIndexComponent extends Component {
|
|
|
17
17
|
assert(
|
|
18
18
|
`@status for "Hds::Stepper::Step::Indicator" must be one of the following: ${STATUSES.join(
|
|
19
19
|
', '
|
|
20
|
-
)}
|
|
20
|
+
)}; received: ${status}`,
|
|
21
21
|
STATUSES.includes(status)
|
|
22
22
|
);
|
|
23
23
|
|
|
@@ -23,7 +23,7 @@ export default class HdsStepperIndicatorTaskIndexComponent extends Component {
|
|
|
23
23
|
assert(
|
|
24
24
|
`@status for "Hds::Stepper::Task::Indicator" must be one of the following: ${STATUSES.join(
|
|
25
25
|
', '
|
|
26
|
-
)}
|
|
26
|
+
)}; received: ${status}`,
|
|
27
27
|
STATUSES.includes(status)
|
|
28
28
|
);
|
|
29
29
|
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
@use "../components/toast";
|
|
28
28
|
// END COMPONENT CSS FILES IMPORTS
|
|
29
29
|
|
|
30
|
+
// stylelint-disable-next-line selector-class-pattern
|
|
30
31
|
.sr-only {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
32
|
+
position: absolute !important;
|
|
33
|
+
width: 1px !important;
|
|
34
|
+
height: 1px !important;
|
|
35
|
+
margin: -1px !important;
|
|
36
|
+
padding: 0 !important;
|
|
37
|
+
overflow: hidden !important;
|
|
38
|
+
white-space: nowrap !important; /* 3 */
|
|
39
|
+
border: 0 !important;
|
|
40
|
+
clip: rect(1px, 1px, 1px, 1px) !important; /* 1 */
|
|
41
|
+
clip-path: inset(50%) !important; /* 2 */
|
|
42
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
//
|
|
2
|
+
// POWER-SELECT
|
|
3
|
+
//
|
|
4
|
+
// selectors is this file are defined to match original PowerSelect styles
|
|
5
|
+
// and are meant to provide overrides through specificity
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
/* stylelint-disable selector-class-pattern */
|
|
9
|
+
.hds-power-select {
|
|
10
|
+
font-size: 0.875rem; // 14px
|
|
11
|
+
font-family: var(--token-typography-font-stack-text);
|
|
12
|
+
|
|
13
|
+
.ember-basic-dropdown-trigger,
|
|
14
|
+
.ember-power-select-trigger {
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
min-height: 34px;
|
|
17
|
+
padding: calc(var(--token-form-control-padding) + 1px);
|
|
18
|
+
padding-right: calc(var(--token-form-control-padding) + 24px); // extra space for the icon
|
|
19
|
+
padding-left: 44px;
|
|
20
|
+
color: var(--token-form-control-base-foreground-value-color);
|
|
21
|
+
background-color: var(--token-form-control-base-surface-color-default);
|
|
22
|
+
background-image: var(--token-form-select-background-image-data-url), url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 4.28a.75.75 0 00-1.06-1.06l-7.97 7.97-3.47-3.47a.75.75 0 00-1.06 1.06l4 4a.75.75 0 001.06 0l8.5-8.5z' fill='%231060ff'/%3E%3C/svg%3E");
|
|
23
|
+
background-repeat: no-repeat;
|
|
24
|
+
background-position: right var(--token-form-select-background-image-position-right-x) center, top 8px left 20px;
|
|
25
|
+
background-size: var(--token-form-select-background-image-size) var(--token-form-select-background-image-size);
|
|
26
|
+
border: var(--token-form-control-border-width) solid var(--token-form-control-base-border-color-default);
|
|
27
|
+
border-radius: var(--token-form-control-border-radius);
|
|
28
|
+
box-shadow: var(--token-elevation-low-box-shadow);
|
|
29
|
+
|
|
30
|
+
&:hover,
|
|
31
|
+
&.mock-hover {
|
|
32
|
+
border-color: var(--token-form-control-base-border-color-hover);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:focus,
|
|
36
|
+
&.mock-focus {
|
|
37
|
+
border-color: var(--token-color-focus-action-internal);
|
|
38
|
+
outline: 3px solid var(--token-color-focus-action-external);
|
|
39
|
+
outline-offset: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&[aria-expanded="true"] {
|
|
43
|
+
&.ember-basic-dropdown-trigger--in-place {
|
|
44
|
+
border-radius: var(--token-form-control-border-radius);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&[aria-disabled="true"] {
|
|
49
|
+
color: var(--token-form-control-disabled-foreground-color);
|
|
50
|
+
background-color: var(--token-form-control-disabled-surface-color);
|
|
51
|
+
background-image: var(--token-form-select-background-image-data-url-disabled), url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 4.28a.75.75 0 00-1.06-1.06l-7.97 7.97-3.47-3.47a.75.75 0 00-1.06 1.06l4 4a.75.75 0 001.06 0l8.5-8.5z' fill='%238c909c'/%3E%3C/svg%3E");
|
|
52
|
+
border-color: var(--token-form-control-disabled-border-color);
|
|
53
|
+
box-shadow: none;
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ember-power-select-status-icon {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ember-basic-select-dropdown,
|
|
63
|
+
.ember-power-select-dropdown {
|
|
64
|
+
&.ember-basic-dropdown-content--in-place {
|
|
65
|
+
margin-top: -3px;
|
|
66
|
+
border: var(--token-form-control-border-width) solid var(--token-form-control-base-border-color-default);
|
|
67
|
+
border-bottom-right-radius: 6px;
|
|
68
|
+
border-bottom-left-radius: 6px;
|
|
69
|
+
box-shadow: var(--token-elevation-high-box-shadow), var(--token-elevation-high-box-shadow);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ember-power-select-search {
|
|
74
|
+
padding: 8px 12px 14px;
|
|
75
|
+
|
|
76
|
+
.ember-power-select-search-input {
|
|
77
|
+
width: 100%;
|
|
78
|
+
max-width: 100%;
|
|
79
|
+
padding: var(--token-form-control-padding);
|
|
80
|
+
color: var(--token-form-control-base-foreground-value-color);
|
|
81
|
+
line-height: 1rem;
|
|
82
|
+
background-color: var(--token-form-control-base-surface-color-default);
|
|
83
|
+
border: var(--token-form-control-border-width) solid var(--token-form-control-base-border-color-default);
|
|
84
|
+
border-radius: var(--token-form-control-border-radius);
|
|
85
|
+
box-shadow: var(--hds-elevation-inset-box-shadow);
|
|
86
|
+
|
|
87
|
+
// PLACEHOLDER
|
|
88
|
+
|
|
89
|
+
::placeholder {
|
|
90
|
+
color: var(--token-form-control-base-foreground-placeholder-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// STATUS
|
|
94
|
+
|
|
95
|
+
&:hover,
|
|
96
|
+
&.mock-hover {
|
|
97
|
+
border-color: var(--token-form-control-base-border-color-hover);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// focus (same for all the states)
|
|
101
|
+
|
|
102
|
+
&:focus,
|
|
103
|
+
&.mock-focus {
|
|
104
|
+
border-color: var(--token-color-focus-action-internal);
|
|
105
|
+
// Notice: Safari doesn't apply a rounded border
|
|
106
|
+
outline: 3px solid var(--token-color-focus-action-external);
|
|
107
|
+
outline-offset: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&[type="search"] {
|
|
111
|
+
padding-left: calc(var(--token-form-control-padding) + 24px); // extra space for the icon
|
|
112
|
+
background-image: var(--token-form-text-input-background-image-data-url-search);
|
|
113
|
+
background-repeat: no-repeat;
|
|
114
|
+
background-position: var(--token-form-text-input-background-image-position-x) 50%;
|
|
115
|
+
background-size: var(--token-form-text-input-background-image-size);
|
|
116
|
+
|
|
117
|
+
&::-webkit-search-cancel-button {
|
|
118
|
+
width: var(--token-form-text-input-background-image-size);
|
|
119
|
+
height: var(--token-form-text-input-background-image-size);
|
|
120
|
+
background-image: var(--token-form-text-input-background-image-data-url-search-cancel);
|
|
121
|
+
background-position: center center;
|
|
122
|
+
background-size: var(--token-form-text-input-background-image-size);
|
|
123
|
+
appearance: none;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ember-power-select-group-name {
|
|
130
|
+
padding: 8px 16px;
|
|
131
|
+
color: var(--token-color-foreground-faint);
|
|
132
|
+
font-weight: var(--token-typography-font-weight-medium);
|
|
133
|
+
font-size: var(--token-typography-body-300-font-size);
|
|
134
|
+
font-family: var(--token-typography-body-300-font-family);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ember-power-select-selected-item {
|
|
138
|
+
display: block;
|
|
139
|
+
margin-left: 0;
|
|
140
|
+
line-height: normal;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.ember-power-select-options {
|
|
144
|
+
padding: 6px 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.ember-power-select-options[role="listbox"] {
|
|
148
|
+
max-height: 36rem;
|
|
149
|
+
overflow-x: clip;
|
|
150
|
+
overflow-y: auto;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ember-power-select-option {
|
|
154
|
+
display: block;
|
|
155
|
+
margin: 0 12px;
|
|
156
|
+
padding: 8px 8px 8px 32px;
|
|
157
|
+
line-height: normal;
|
|
158
|
+
background: none;
|
|
159
|
+
border: var(--token-form-control-border-width) solid transparent;
|
|
160
|
+
border-radius: var(--token-form-control-border-radius);
|
|
161
|
+
|
|
162
|
+
&[aria-selected="true"] {
|
|
163
|
+
color: var(--token-color-foreground-strong);
|
|
164
|
+
background-color: inherit;
|
|
165
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 4.28a.75.75 0 00-1.06-1.06l-7.97 7.97-3.47-3.47a.75.75 0 00-1.06 1.06l4 4a.75.75 0 001.06 0l8.5-8.5z' fill='%231060ff'/%3E%3C/svg%3E");
|
|
166
|
+
background-repeat: no-repeat;
|
|
167
|
+
background-position: top 8px left 8px;
|
|
168
|
+
background-size: var(--token-form-select-background-image-size) var(--token-form-select-background-image-size);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&[aria-current="true"],
|
|
172
|
+
&:hover {
|
|
173
|
+
color: inherit;
|
|
174
|
+
background-color: var(--token-color-surface-action);
|
|
175
|
+
border: var(--token-form-control-border-width) solid var(--token-color-palette-blue-300);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ember-power-select-multiple-trigger {
|
|
180
|
+
padding-top: calc(var(--token-form-control-padding) - 3px);
|
|
181
|
+
padding-bottom: calc(var(--token-form-control-padding) - 3px);
|
|
182
|
+
padding-left: 20px;
|
|
183
|
+
background-image: var(--token-form-select-background-image-data-url);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.ember-power-select-multiple-option {
|
|
187
|
+
display: inline-flex;
|
|
188
|
+
align-items: stretch;
|
|
189
|
+
float: none;
|
|
190
|
+
margin: 4px 4px 4px 0;
|
|
191
|
+
padding: 3px 10px 5px 10px;
|
|
192
|
+
color: var(--token-color-foreground-primary);
|
|
193
|
+
font-weight: var(--token-typography-font-weight-medium);
|
|
194
|
+
font-size: 0.8125rem; // 13px
|
|
195
|
+
font-family: var(--token-typography-font-stack-text);
|
|
196
|
+
line-height: 1rem; // 16px
|
|
197
|
+
vertical-align: middle;
|
|
198
|
+
background-color: var(--token-color-surface-interactive);
|
|
199
|
+
border: 1px solid var(--token-color-border-strong);
|
|
200
|
+
border-radius: 50px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ember-power-select-multiple-remove-btn {
|
|
204
|
+
margin: 0; // reset default button margin
|
|
205
|
+
margin-right: 4px;
|
|
206
|
+
font-weight: 300;
|
|
207
|
+
font-size: 1rem;
|
|
208
|
+
border: none; // reset default button border
|
|
209
|
+
border-radius: inherit;
|
|
210
|
+
border-top-right-radius: 0;
|
|
211
|
+
border-bottom-right-radius: 0;
|
|
212
|
+
|
|
213
|
+
&:not(:hover) {
|
|
214
|
+
opacity: 1;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.hds-power-select__after-options {
|
|
219
|
+
padding: 8px;
|
|
220
|
+
color: var(--token-color-foreground-primary);
|
|
221
|
+
font-size: 0.8125rem; // 13px
|
|
222
|
+
background-color: var(--token-color-surface-faint);
|
|
223
|
+
border-top: var(--token-form-control-border-width) solid var(--token-form-control-base-border-color-default);
|
|
224
|
+
}
|
|
225
|
+
}
|