@geoffcox/sterling-svelte 1.0.11 → 1.0.12

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.
Files changed (65) hide show
  1. package/dist/Callout.svelte +14 -6
  2. package/dist/Dropdown.svelte +4 -1
  3. package/dist/css/Button.base.css +4 -24
  4. package/dist/css/Button.css +1 -0
  5. package/dist/css/Button.disabled.css +22 -0
  6. package/dist/css/Callout.base.css +12 -0
  7. package/dist/css/Checkbox.base.css +7 -31
  8. package/dist/css/Checkbox.css +1 -0
  9. package/dist/css/Checkbox.disabled.css +28 -0
  10. package/dist/css/Dropdown.base.css +4 -46
  11. package/dist/css/Dropdown.composed.css +11 -0
  12. package/dist/css/Dropdown.css +2 -0
  13. package/dist/css/Dropdown.disabled.css +32 -0
  14. package/dist/css/HexColorSliders.base.css +6 -25
  15. package/dist/css/HslColorSliders.base.css +7 -26
  16. package/dist/css/Input.base.css +0 -31
  17. package/dist/css/Input.composed.css +4 -0
  18. package/dist/css/Input.css +1 -0
  19. package/dist/css/Input.disabled.css +24 -0
  20. package/dist/css/Label.base.css +8 -12
  21. package/dist/css/Label.css +1 -0
  22. package/dist/css/Label.disabled.css +9 -0
  23. package/dist/css/Link.base.css +0 -11
  24. package/dist/css/Link.css +1 -0
  25. package/dist/css/Link.disabled.css +10 -0
  26. package/dist/css/List.base.css +4 -18
  27. package/dist/css/List.composed.css +8 -0
  28. package/dist/css/List.css +2 -0
  29. package/dist/css/List.disabled.css +7 -0
  30. package/dist/css/ListItem.base.css +4 -30
  31. package/dist/css/ListItem.css +1 -0
  32. package/dist/css/ListItem.disabled.css +28 -0
  33. package/dist/css/MenuItemDisplay.base.css +0 -29
  34. package/dist/css/MenuItemDisplay.css +1 -0
  35. package/dist/css/MenuItemDisplay.disabled.css +28 -0
  36. package/dist/css/Progress.base.css +8 -22
  37. package/dist/css/Progress.css +1 -0
  38. package/dist/css/Progress.disabled.css +17 -0
  39. package/dist/css/Radio.base.css +4 -30
  40. package/dist/css/Radio.css +1 -0
  41. package/dist/css/Radio.disabled.css +28 -0
  42. package/dist/css/Select.base.css +4 -30
  43. package/dist/css/Select.css +1 -0
  44. package/dist/css/Select.disabled.css +28 -0
  45. package/dist/css/Slider.base.css +0 -40
  46. package/dist/css/Slider.css +1 -0
  47. package/dist/css/Slider.disabled.css +30 -0
  48. package/dist/css/Switch.base.css +0 -31
  49. package/dist/css/Switch.css +1 -0
  50. package/dist/css/Switch.disabled.css +30 -0
  51. package/dist/css/Tab.base.css +4 -40
  52. package/dist/css/Tab.css +1 -0
  53. package/dist/css/Tab.disabled.css +36 -0
  54. package/dist/css/TextArea.base.css +8 -31
  55. package/dist/css/TextArea.composed.css +1 -1
  56. package/dist/css/TextArea.css +1 -0
  57. package/dist/css/TextArea.disabled.css +28 -0
  58. package/dist/css/Tree.base.css +4 -29
  59. package/dist/css/Tree.css +1 -0
  60. package/dist/css/Tree.disabled.css +27 -0
  61. package/dist/css/TreeItemDisplay.base.css +4 -30
  62. package/dist/css/TreeItemDisplay.css +2 -0
  63. package/dist/css/TreeItemDisplay.disabled.css +28 -0
  64. package/dist/package.json +1 -1
  65. package/package.json +1 -1
@@ -83,9 +83,7 @@ const getArrowPlacementStyle = (position) => {
83
83
  case 'top':
84
84
  case 'top-start':
85
85
  case 'top-end':
86
- return (`bottom: -${arrowRef.offsetWidth}px;` +
87
- `filter: drop-shadow(-1px -2px 1px rgba(0,0,0,0.2));` +
88
- `transform:translate(0, -50%) rotate(135deg);`);
86
+ return (`bottom: -${arrowRef.offsetWidth}px;` + `transform:translate(0, -50%) rotate(135deg);`);
89
87
  case 'right':
90
88
  case 'right-start':
91
89
  case 'right-end':
@@ -97,9 +95,7 @@ const getArrowPlacementStyle = (position) => {
97
95
  case 'left':
98
96
  case 'left-start':
99
97
  case 'left-end':
100
- return (`right: -${arrowRef.offsetWidth}px;` +
101
- `filter: drop-shadow(2px 2px 1px rgba(0,0,0,0.2));` +
102
- `transform:translate(-50%, 0) rotate(45deg);`);
98
+ return (`right: -${arrowRef.offsetWidth}px;` + `transform:translate(-50%, 0) rotate(45deg);`);
103
99
  }
104
100
  }
105
101
  return '';
@@ -155,6 +151,18 @@ ensurePortalHost();
155
151
  bind:this={popupRef}
156
152
  class={`sterling-callout ${variant}`}
157
153
  class:open
154
+ class:top={popupPosition.placement === 'top'}
155
+ class:top-start={popupPosition.placement === 'top-start'}
156
+ class:top-end={popupPosition.placement === 'top-end'}
157
+ class:right={popupPosition.placement === 'right'}
158
+ class:right-start={popupPosition.placement === 'right-start'}
159
+ class:right-end={popupPosition.placement === 'right-end'}
160
+ class:bottom={popupPosition.placement === 'bottom'}
161
+ class:bottom-start={popupPosition.placement === 'bottom-start'}
162
+ class:bottom-end={popupPosition.placement === 'bottom-end'}
163
+ class:left={popupPosition.placement === 'left'}
164
+ class:left-start={popupPosition.placement === 'left-start'}
165
+ class:left-end={popupPosition.placement === 'left-end'}
158
166
  role="tooltip"
159
167
  on:blur
160
168
  on:click
@@ -4,6 +4,7 @@ import { clickOutside } from './actions/clickOutside';
4
4
  import { idGenerator } from './idGenerator';
5
5
  import { prefersReducedMotion } from './mediaQueries/prefersReducedMotion';
6
6
  import { slide } from 'svelte/transition';
7
+ import { usingKeyboard } from './mediaQueries/usingKeyboard';
7
8
  const popupId = idGenerator.nextId('Dropdown-popup');
8
9
  // ----- Props ----- //
9
10
  /** Disables the dropdown. */
@@ -79,6 +80,8 @@ $: slideMotion = !$prefersReducedMotion ? slide : slideNoOp;
79
80
  aria-expanded={open}
80
81
  class={`sterling-dropdown ${variant}`}
81
82
  class:disabled
83
+ class:open
84
+ class:using-keyboard={$usingKeyboard}
82
85
  role="combobox"
83
86
  tabindex="0"
84
87
  use:clickOutside={{ ignoreOthers: [popupContentRef] }}
@@ -126,7 +129,7 @@ $: slideMotion = !$prefersReducedMotion ? slide : slideNoOp;
126
129
  </div>
127
130
  </slot>
128
131
 
129
- <Popover reference={dropdownRef} open={!disabled && open}>
132
+ <Popover reference={dropdownRef} open={!disabled && open} placement="bottom-start">
130
133
  <div
131
134
  class={`sterling-dropdown-popup-content ${variant}`}
132
135
  transition:slideMotion|global={{ duration: 200 }}
@@ -19,7 +19,10 @@
19
19
  padding: 0.5em 1em;
20
20
  text-decoration: none;
21
21
  text-overflow: ellipsis;
22
- transition: background-color 250ms, color 250ms, border-color 250ms;
22
+ transition:
23
+ background-color 250ms,
24
+ color 250ms,
25
+ border-color 250ms;
23
26
  white-space: nowrap;
24
27
  user-select: none;
25
28
  }
@@ -44,29 +47,6 @@
44
47
  outline-width: 2px;
45
48
  }
46
49
 
47
- .sterling-button:disabled {
48
- cursor: not-allowed;
49
- position: relative;
50
- }
51
-
52
- .sterling-button:disabled::after {
53
- content: '';
54
- position: absolute;
55
- left: 0;
56
- right: 0;
57
- top: 0;
58
- bottom: 0;
59
- background: repeating-linear-gradient(
60
- var(--stsv-common--disabled__stripe-angle),
61
- var(--stsv-common--disabled__stripe-color),
62
- var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
63
- var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
64
- var(--stsv-common--disabled__stripe-color--alt)
65
- calc(2 * var(--stsv-common--disabled__stripe-width))
66
- );
67
- pointer-events: none;
68
- }
69
-
70
50
  @media (prefers-reduced-motion) {
71
51
  .sterling-button {
72
52
  transition: none;
@@ -5,3 +5,4 @@
5
5
  @import url('./Button.secondary.colorful.css');
6
6
  @import url('./Button.tool.css');
7
7
  @import url('./Button.tool.colorful.css');
8
+ @import url('./Button.disabled.css');
@@ -0,0 +1,22 @@
1
+ .sterling-button:disabled {
2
+ cursor: not-allowed;
3
+ position: relative;
4
+ }
5
+
6
+ .sterling-button:disabled::after {
7
+ content: '';
8
+ position: absolute;
9
+ left: 0;
10
+ right: 0;
11
+ top: 0;
12
+ bottom: 0;
13
+ background: repeating-linear-gradient(
14
+ var(--stsv-common--disabled__stripe-angle),
15
+ var(--stsv-common--disabled__stripe-color),
16
+ var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
17
+ var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
18
+ var(--stsv-common--disabled__stripe-color--alt)
19
+ calc(2 * var(--stsv-common--disabled__stripe-width))
20
+ );
21
+ pointer-events: none;
22
+ }
@@ -41,3 +41,15 @@
41
41
  /* The -100% and 200% allow for the drop-shadow to not be clipped */
42
42
  clip-path: polygon(-100% -100%, 200% -100%, 200% 200%, -100% -100%);
43
43
  }
44
+
45
+ .sterling-callout.top-start .arrow,
46
+ .sterling-callout.top .arrow,
47
+ .sterling-callout.top-end .arrow {
48
+ filter: drop-shadow(-1px -2px 1px rgba(0, 0, 0, 0.2));
49
+ }
50
+
51
+ .sterling-callout.left-start .arrow,
52
+ .sterling-callout.left .arrow,
53
+ .sterling-callout.left-end .arrow {
54
+ filter: drop-shadow(2px 2px 1px rgba(0, 0, 0, 0.2));
55
+ }
@@ -50,7 +50,10 @@ and there is not a parent CSS selector.
50
50
  display: inline-block;
51
51
  height: 20px;
52
52
  position: relative;
53
- transition: background-color 250ms, color 250ms, border-color 250ms;
53
+ transition:
54
+ background-color 250ms,
55
+ color 250ms,
56
+ border-color 250ms;
54
57
  width: 20px;
55
58
  pointer-events: none;
56
59
  }
@@ -87,7 +90,9 @@ The checkmark is a rotated L centered in the box.
87
90
  top: 45%;
88
91
  transform: translate(-50%, -50%) rotate(45deg);
89
92
  transform-origin: center;
90
- transition: border-color 250ms, opacity 150ms;
93
+ transition:
94
+ border-color 250ms,
95
+ opacity 150ms;
91
96
  width: 7px;
92
97
  opacity: 0;
93
98
  }
@@ -100,41 +105,12 @@ The checkmark is a rotated L centered in the box.
100
105
  border-color: var(--stsv-input__color--hover);
101
106
  }
102
107
 
103
- .sterling-checkbox.disabled,
104
- .sterling-checkbox.disabled input {
105
- cursor: not-allowed;
106
- }
107
-
108
- .sterling-checkbox .container::after {
109
- background: repeating-linear-gradient(
110
- var(--stsv-common--disabled__stripe-angle),
111
- var(--stsv-common--disabled__stripe-color),
112
- var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
113
- var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
114
- var(--stsv-common--disabled__stripe-color--alt)
115
- calc(2 * var(--stsv-common--disabled__stripe-width))
116
- );
117
- bottom: 0;
118
- content: '';
119
- left: 0;
120
- opacity: 0;
121
- position: absolute;
122
- right: 0;
123
- top: 0;
124
- pointer-events: none;
125
- transition: opacity 250ms;
126
- }
127
-
128
108
  .sterling-checkbox > label {
129
109
  color: var(--stsv-common__color);
130
110
  transition: color 250ms;
131
111
  font: inherit;
132
112
  }
133
113
 
134
- .sterling-checkbox.disabled .container::after {
135
- opacity: 1;
136
- }
137
-
138
114
  @media (prefers-reduced-motion) {
139
115
  .sterling-checkbox .indicator,
140
116
  .sterling-checkbox .indicator::after,
@@ -1,2 +1,3 @@
1
1
  @import url('./Checkbox.base.css');
2
2
  @import url('./Checkbox.colorful.css');
3
+ @import url('./Checkbox.disabled.css');
@@ -0,0 +1,28 @@
1
+ .sterling-checkbox.disabled,
2
+ .sterling-checkbox.disabled input {
3
+ cursor: not-allowed;
4
+ }
5
+
6
+ .sterling-checkbox .container::after {
7
+ background: repeating-linear-gradient(
8
+ var(--stsv-common--disabled__stripe-angle),
9
+ var(--stsv-common--disabled__stripe-color),
10
+ var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
11
+ var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
12
+ var(--stsv-common--disabled__stripe-color--alt)
13
+ calc(2 * var(--stsv-common--disabled__stripe-width))
14
+ );
15
+ bottom: 0;
16
+ content: '';
17
+ left: 0;
18
+ opacity: 0;
19
+ position: absolute;
20
+ right: 0;
21
+ top: 0;
22
+ pointer-events: none;
23
+ transition: opacity 250ms;
24
+ }
25
+
26
+ .sterling-checkbox.disabled .container::after {
27
+ opacity: 1;
28
+ }
@@ -14,7 +14,10 @@
14
14
  overflow: hidden;
15
15
  padding: 0;
16
16
  position: relative;
17
- transition: background-color 250ms, color 250ms, border-color 250ms;
17
+ transition:
18
+ background-color 250ms,
19
+ color 250ms,
20
+ border-color 250ms;
18
21
  }
19
22
 
20
23
  .sterling-dropdown:hover {
@@ -33,51 +36,6 @@
33
36
  outline-width: 2px;
34
37
  }
35
38
 
36
- .sterling-dropdown.disabled {
37
- cursor: not-allowed;
38
- outline: none;
39
- }
40
-
41
- .sterling-dropdown.disabled .button {
42
- cursor: not-allowed;
43
- }
44
-
45
- .sterling-dropdown::after {
46
- background: repeating-linear-gradient(
47
- var(--stsv-common--disabled__stripe-angle),
48
- var(--stsv-common--disabled__stripe-color),
49
- var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
50
- var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
51
- var(--stsv-common--disabled__stripe-color--alt)
52
- calc(2 * var(--stsv-common--disabled__stripe-width))
53
- );
54
- bottom: 0;
55
- content: '';
56
- left: 0;
57
- opacity: 0;
58
- position: absolute;
59
- right: 0;
60
- top: 0;
61
- pointer-events: none;
62
- transition: opacity 250ms;
63
- }
64
-
65
- .sterling-dropdown.disabled::after {
66
- opacity: 1;
67
- }
68
-
69
- .sterling-dropdown.composed,
70
- .sterling-dropdown.composed:hover,
71
- .sterling-dropdown.composed.focus {
72
- background: none;
73
- border: none;
74
- outline: none;
75
- }
76
-
77
- .sterling-dropdown.composed.disabled::after {
78
- opacity: 0;
79
- }
80
-
81
39
  .sterling-dropdown > .value {
82
40
  overflow: hidden;
83
41
  }
@@ -0,0 +1,11 @@
1
+ .sterling-dropdown.composed,
2
+ .sterling-dropdown.composed:hover,
3
+ .sterling-dropdown.composed.focus {
4
+ background: none;
5
+ border: none;
6
+ outline: none;
7
+ }
8
+
9
+ .sterling-dropdown.composed.disabled::after {
10
+ opacity: 0;
11
+ }
@@ -1,2 +1,4 @@
1
1
  @import url('./Dropdown.base.css');
2
2
  @import url('./Dropdown.colorful.css');
3
+ @import url('./Dropdown.disabled.css');
4
+ @import url('./Dropdown.composed.css');
@@ -0,0 +1,32 @@
1
+ .sterling-dropdown.disabled {
2
+ cursor: not-allowed;
3
+ outline: none;
4
+ }
5
+
6
+ .sterling-dropdown.disabled .button {
7
+ cursor: not-allowed;
8
+ }
9
+
10
+ .sterling-dropdown::after {
11
+ background: repeating-linear-gradient(
12
+ var(--stsv-common--disabled__stripe-angle),
13
+ var(--stsv-common--disabled__stripe-color),
14
+ var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
15
+ var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
16
+ var(--stsv-common--disabled__stripe-color--alt)
17
+ calc(2 * var(--stsv-common--disabled__stripe-width))
18
+ );
19
+ bottom: 0;
20
+ content: '';
21
+ left: 0;
22
+ opacity: 0;
23
+ position: absolute;
24
+ right: 0;
25
+ top: 0;
26
+ pointer-events: none;
27
+ transition: opacity 250ms;
28
+ }
29
+
30
+ .sterling-dropdown.disabled::after {
31
+ opacity: 1;
32
+ }
@@ -56,31 +56,12 @@
56
56
  #444 75%,
57
57
  #444
58
58
  ),
59
- repeating-linear-gradient(
60
- var(--stsv-common--disabled__stripe-angle),
61
- #444 25%,
62
- #eee 25%,
63
- #eee 75%,
64
- #444 75%,
65
- #444
66
- ),
67
- repeating-linear-gradient(
68
- -var(--stsv-common--disabled__stripe-angle),
69
- #444 25%,
70
- transparent 25%,
71
- transparent 75%,
72
- #444 75%,
73
- #444
74
- ),
75
- repeating-linear-gradient(
76
- -var(--stsv-common--disabled__stripe-angle),
77
- #444 25%,
78
- #eee 25%,
79
- #eee 75%,
80
- #444 75%,
81
- #444
82
- );
83
- background-position: 0 0, 4px 4px;
59
+ repeating-linear-gradient(135deg, #444 25%, #eee 25%, #eee 75%, #444 75%, #444),
60
+ repeating-linear-gradient(-135deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444),
61
+ repeating-linear-gradient(-135deg, #444 25%, #eee 25%, #eee 75%, #444 75%, #444);
62
+ background-position:
63
+ 0 0,
64
+ 4px 4px;
84
65
  background-size: 8px 8px;
85
66
  }
86
67
 
@@ -67,38 +67,19 @@
67
67
  background-color: #eee;
68
68
  opacity: 0.1;
69
69
  background-image: repeating-linear-gradient(
70
- var(--stsv-common--disabled__stripe-angle),
70
+ 135deg,
71
71
  #444 25%,
72
72
  transparent 25%,
73
73
  transparent 75%,
74
74
  #444 75%,
75
75
  #444
76
76
  ),
77
- repeating-linear-gradient(
78
- var(--stsv-common--disabled__stripe-angle),
79
- #444 25%,
80
- #eee 25%,
81
- #eee 75%,
82
- #444 75%,
83
- #444
84
- ),
85
- repeating-linear-gradient(
86
- -var(--stsv-common--disabled__stripe-angle),
87
- #444 25%,
88
- transparent 25%,
89
- transparent 75%,
90
- #444 75%,
91
- #444
92
- ),
93
- repeating-linear-gradient(
94
- -var(--stsv-common--disabled__stripe-angle),
95
- #444 25%,
96
- #eee 25%,
97
- #eee 75%,
98
- #444 75%,
99
- #444
100
- );
101
- background-position: 0 0, 4px 4px;
77
+ repeating-linear-gradient(135deg, #444 25%, #eee 25%, #eee 75%, #444 75%, #444),
78
+ repeating-linear-gradient(-135deg, #444 25%, transparent 25%, transparent 75%, #444 75%, #444),
79
+ repeating-linear-gradient(-135deg, #444 25%, #eee 25%, #eee 75%, #444 75%, #444);
80
+ background-position:
81
+ 0 0,
82
+ 4px 4px;
102
83
  background-size: 8px 8px;
103
84
  }
104
85
 
@@ -54,37 +54,6 @@ input::placeholder {
54
54
  color: var(--stsv-common__color--subtle);
55
55
  }
56
56
 
57
- /* ----- disabled ----- */
58
-
59
- .sterling-input.disabled * {
60
- cursor: not-allowed;
61
- outline: none;
62
- }
63
-
64
- .sterling-input::after {
65
- background: repeating-linear-gradient(
66
- var(--stsv-common--disabled__stripe-angle),
67
- var(--stsv-common--disabled__stripe-color),
68
- var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
69
- var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
70
- var(--stsv-common--disabled__stripe-color--alt)
71
- calc(2 * var(--stsv-common--disabled__stripe-width))
72
- );
73
- bottom: 0;
74
- content: '';
75
- left: 0;
76
- opacity: 0;
77
- position: absolute;
78
- right: 0;
79
- top: 0;
80
- pointer-events: none;
81
- transition: opacity 250ms;
82
- }
83
-
84
- .sterling-input:not(.composed).disabled::after {
85
- opacity: 1;
86
- }
87
-
88
57
  /* ----- label ----- */
89
58
 
90
59
  .sterling-input-label {
@@ -6,3 +6,7 @@
6
6
  border-color: transparent;
7
7
  outline: none;
8
8
  }
9
+
10
+ .sterling-input.composed.disabled::after {
11
+ opacity: 0;
12
+ }
@@ -1,3 +1,4 @@
1
1
  @import url('./Input.base.css');
2
2
  @import url('./Input.colorful.css');
3
+ @import url('./Input.disabled.css');
3
4
  @import url('./Input.composed.css');
@@ -0,0 +1,24 @@
1
+ .sterling-input.disabled * {
2
+ cursor: not-allowed;
3
+ outline: none;
4
+ }
5
+
6
+ .sterling-input::after {
7
+ background: repeating-linear-gradient(
8
+ var(--stsv-common--disabled__stripe-angle),
9
+ var(--stsv-common--disabled__stripe-color),
10
+ var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
11
+ var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
12
+ var(--stsv-common--disabled__stripe-color--alt)
13
+ calc(2 * var(--stsv-common--disabled__stripe-width))
14
+ );
15
+ bottom: 0;
16
+ content: '';
17
+ left: 0;
18
+ opacity: 0;
19
+ position: absolute;
20
+ right: 0;
21
+ top: 0;
22
+ pointer-events: none;
23
+ transition: opacity 250ms;
24
+ }
@@ -11,7 +11,10 @@
11
11
  overflow: visible;
12
12
  padding: 0;
13
13
  position: relative;
14
- transition: background-color 250ms, color 250ms, border-color 250ms;
14
+ transition:
15
+ background-color 250ms,
16
+ color 250ms,
17
+ border-color 250ms;
15
18
  }
16
19
 
17
20
  /* ----- horizontal | vertical ----- */
@@ -27,16 +30,6 @@
27
30
  grid-template-areas: 'text' 'content' 'message';
28
31
  }
29
32
 
30
- /* ----- disabled ----- */
31
-
32
- .sterling-label.disabled {
33
- cursor: not-allowed;
34
- }
35
-
36
- .sterling-label.disabled * {
37
- cursor: not-allowed;
38
- }
39
-
40
33
  /* ----- text ----- */
41
34
 
42
35
  .sterling-label .text {
@@ -66,7 +59,10 @@
66
59
  grid-area: message;
67
60
  padding: 0.5em;
68
61
  width: 100%;
69
- transition: background-color 250ms, color 250ms, border-color 250ms;
62
+ transition:
63
+ background-color 250ms,
64
+ color 250ms,
65
+ border-color 250ms;
70
66
  }
71
67
 
72
68
  .sterling-label .message.info {
@@ -2,3 +2,4 @@
2
2
  @import url('./Label.boxed.css');
3
3
  @import url('./Label.colorful.css');
4
4
  @import url('./Label.boxed.colorful.css');
5
+ @import url('./Label.disabled.css');
@@ -0,0 +1,9 @@
1
+ /* ----- disabled ----- */
2
+
3
+ .sterling-label.disabled {
4
+ cursor: not-allowed;
5
+ }
6
+
7
+ .sterling-label.disabled * {
8
+ cursor: not-allowed;
9
+ }
@@ -34,17 +34,6 @@
34
34
  color: var(--stsv-input__color--active);
35
35
  }
36
36
 
37
- /* ----- disabled ----- */
38
-
39
- .sterling-link.disabled,
40
- .sterling-link.disabled:visited,
41
- .sterling-link.disabled:hover,
42
- .sterling-link.disabled:active {
43
- border-bottom-color: var(--stsv-common__color--faint);
44
- pointer-events: none;
45
- position: relative;
46
- }
47
-
48
37
  /* ----- prefers-reduced-motion ----- */
49
38
 
50
39
  @media (prefers-reduced-motion) {
package/dist/css/Link.css CHANGED
@@ -8,3 +8,4 @@
8
8
  @import url('./Link.undecorated.colorful.css');
9
9
  @import url('./Link.undecorated.ghost.css');
10
10
  @import url('./Link.undecorated.underline.css');
11
+ @import url('./Link.disabled.css');
@@ -0,0 +1,10 @@
1
+ /* ----- disabled ----- */
2
+
3
+ .sterling-link.disabled,
4
+ .sterling-link.disabled:visited,
5
+ .sterling-link.disabled:hover,
6
+ .sterling-link.disabled:active {
7
+ border-bottom-color: var(--stsv-common__color--faint);
8
+ pointer-events: none;
9
+ position: relative;
10
+ }
@@ -13,7 +13,10 @@
13
13
  outline: none;
14
14
  padding: 0;
15
15
  position: relative;
16
- transition: background-color 250ms, color 250ms, border-color 250ms;
16
+ transition:
17
+ background-color 250ms,
18
+ color 250ms,
19
+ border-color 250ms;
17
20
  }
18
21
 
19
22
  .sterling-list.horizontal {
@@ -37,19 +40,6 @@
37
40
  outline-width: 2px;
38
41
  }
39
42
 
40
- .sterling-list.composed,
41
- .sterling-list.composed:hover,
42
- .sterling-list.composed.using-keyboard:focus-within,
43
- .sterling-list.composed.disabled {
44
- background: none;
45
- border: none;
46
- outline: none;
47
- }
48
-
49
- .sterling-list.disabled * {
50
- cursor: not-allowed;
51
- }
52
-
53
43
  /* ----- container - a layout panel that grows with the items ----- */
54
44
 
55
45
  .sterling-list .container {
@@ -84,10 +74,6 @@
84
74
  transition: opacity 250ms;
85
75
  }
86
76
 
87
- .sterling-list.disabled .container::after {
88
- opacity: 1;
89
- }
90
-
91
77
  /* ----- media queries ----- */
92
78
 
93
79
  @media (prefers-reduced-motion) {
@@ -0,0 +1,8 @@
1
+ .sterling-list.composed,
2
+ .sterling-list.composed:hover,
3
+ .sterling-list.composed.using-keyboard:focus-within,
4
+ .sterling-list.composed.disabled {
5
+ background: none;
6
+ border: none;
7
+ outline: none;
8
+ }
package/dist/css/List.css CHANGED
@@ -1 +1,3 @@
1
1
  @import url('./List.base.css');
2
+ @import url('./List.disabled.css');
3
+ @import url('./List.composed.css');