@ardium-ui/ui 2.0.2 → 2.0.3

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 (168) hide show
  1. package/esm2022/lib/_internal/boolean-component.mjs +1 -1
  2. package/esm2022/lib/_internal/clear-button/clear-button.component.mjs +3 -3
  3. package/esm2022/lib/_internal/disablable-component.mjs +1 -1
  4. package/esm2022/lib/_internal/focusable-component.mjs +1 -1
  5. package/esm2022/lib/_internal/item-storages/dropdown-item-storage.mjs +1 -1
  6. package/esm2022/lib/_internal/item-storages/simple-item-storage.mjs +1 -1
  7. package/esm2022/lib/_internal/item-storages/simplest-item-storage.mjs +1 -1
  8. package/esm2022/lib/_internal/models/pagination.model.mjs +1 -1
  9. package/esm2022/lib/_internal/ngmodel-component.mjs +1 -1
  10. package/esm2022/lib/_internal/selectable-list-component.mjs +1 -1
  11. package/esm2022/lib/badge/badge.directive.mjs +1 -1
  12. package/esm2022/lib/badge/index.mjs +1 -1
  13. package/esm2022/lib/buttons/_button-base.mjs +1 -1
  14. package/esm2022/lib/buttons/button/button.component.mjs +5 -3
  15. package/esm2022/lib/buttons/button/index.mjs +1 -1
  16. package/esm2022/lib/buttons/fab/fab.component.mjs +5 -3
  17. package/esm2022/lib/buttons/fab/index.mjs +1 -1
  18. package/esm2022/lib/buttons/icon-button/icon-button.component.mjs +5 -3
  19. package/esm2022/lib/buttons/icon-button/index.mjs +1 -1
  20. package/esm2022/lib/card/card.children.mjs +3 -3
  21. package/esm2022/lib/card/card.component.mjs +1 -1
  22. package/esm2022/lib/card/index.mjs +1 -1
  23. package/esm2022/lib/checkbox/checkbox.component.mjs +3 -3
  24. package/esm2022/lib/checkbox/index.mjs +1 -1
  25. package/esm2022/lib/checkbox-list/checkbox-list.component.mjs +3 -3
  26. package/esm2022/lib/checkbox-list/index.mjs +1 -1
  27. package/esm2022/lib/chip/chip.component.mjs +3 -3
  28. package/esm2022/lib/chip/deletable-chip/deletable-chip.component.mjs +3 -3
  29. package/esm2022/lib/chip/index.mjs +1 -1
  30. package/esm2022/lib/chip/selectable-chip/selectable-chip.component.mjs +3 -3
  31. package/esm2022/lib/color/color-display/color-display.component.mjs +3 -3
  32. package/esm2022/lib/color/color-display/index.mjs +1 -1
  33. package/esm2022/lib/color/color-picker/color-picker.types.mjs +1 -1
  34. package/esm2022/lib/dialog/dialog.component.mjs +3 -3
  35. package/esm2022/lib/dialog/dialog.types.mjs +1 -1
  36. package/esm2022/lib/dialog/index.mjs +1 -1
  37. package/esm2022/lib/divider/divider.component.mjs +1 -1
  38. package/esm2022/lib/divider/index.mjs +1 -1
  39. package/esm2022/lib/dropdown-panel/dropdown-panel.component.mjs +4 -4
  40. package/esm2022/lib/dropdown-panel/index.mjs +1 -1
  41. package/esm2022/lib/file-inputs/file-drop-area/file-drop-area.component.mjs +3 -3
  42. package/esm2022/lib/file-inputs/file-drop-area/file-drop-area.module.mjs +1 -1
  43. package/esm2022/lib/file-inputs/file-drop-area/index.mjs +1 -1
  44. package/esm2022/lib/file-inputs/file-input/file-input.component.mjs +3 -3
  45. package/esm2022/lib/file-inputs/file-input/index.mjs +1 -1
  46. package/esm2022/lib/file-inputs/file-input-base.mjs +1 -1
  47. package/esm2022/lib/form-field-frame/form-field-frame.component.mjs +3 -3
  48. package/esm2022/lib/form-field-frame/index.mjs +1 -1
  49. package/esm2022/lib/icon/icon.component.mjs +3 -3
  50. package/esm2022/lib/icon/index.mjs +1 -1
  51. package/esm2022/lib/inputs/color-input/color-input.types.mjs +1 -1
  52. package/esm2022/lib/inputs/digit-input/digit-input.component.mjs +3 -3
  53. package/esm2022/lib/inputs/digit-input/digit-input.model.mjs +1 -1
  54. package/esm2022/lib/inputs/digit-input/digit-input.types.mjs +1 -1
  55. package/esm2022/lib/inputs/digit-input/digit-input.utils.mjs +1 -1
  56. package/esm2022/lib/inputs/digit-input/index.mjs +1 -1
  57. package/esm2022/lib/inputs/hex-input/hex-input.component.mjs +3 -3
  58. package/esm2022/lib/inputs/hex-input/hex-input.module.mjs +1 -1
  59. package/esm2022/lib/inputs/hex-input/index.mjs +1 -1
  60. package/esm2022/lib/inputs/hex-input.model.mjs +1 -1
  61. package/esm2022/lib/inputs/input/index.mjs +1 -1
  62. package/esm2022/lib/inputs/input/input.component.mjs +3 -3
  63. package/esm2022/lib/inputs/input/input.directives.mjs +1 -1
  64. package/esm2022/lib/inputs/input/input.module.mjs +1 -1
  65. package/esm2022/lib/inputs/input-transformers.mjs +1 -1
  66. package/esm2022/lib/inputs/input-utils.mjs +1 -1
  67. package/esm2022/lib/inputs/number-input/index.mjs +1 -1
  68. package/esm2022/lib/inputs/number-input/number-input.component.mjs +3 -3
  69. package/esm2022/lib/inputs/password-input/index.mjs +1 -1
  70. package/esm2022/lib/inputs/password-input/password-input.component.mjs +3 -3
  71. package/esm2022/lib/inputs/password-input/password-input.types.mjs +1 -1
  72. package/esm2022/lib/inputs/simple-input/index.mjs +1 -1
  73. package/esm2022/lib/inputs/simple-input/simple-input.component.mjs +3 -3
  74. package/esm2022/lib/kbd/index.mjs +1 -1
  75. package/esm2022/lib/kbd/kbd.component.mjs +3 -3
  76. package/esm2022/lib/kbd-shortcut/index.mjs +1 -1
  77. package/esm2022/lib/kbd-shortcut/kbd-shortcut.component.mjs +3 -3
  78. package/esm2022/lib/modal/index.mjs +1 -1
  79. package/esm2022/lib/modal/modal.component.mjs +3 -3
  80. package/esm2022/lib/option/index.mjs +1 -1
  81. package/esm2022/lib/option/option.component.mjs +1 -1
  82. package/esm2022/lib/progress-bar/index.mjs +1 -1
  83. package/esm2022/lib/progress-bar/progress-bar.component.mjs +3 -3
  84. package/esm2022/lib/progress-bar/progress-bar.types.mjs +1 -1
  85. package/esm2022/lib/progress-circle/index.mjs +1 -1
  86. package/esm2022/lib/progress-circle/progress-circle.component.mjs +3 -3
  87. package/esm2022/lib/progress-circle/progress-circle.types.mjs +1 -1
  88. package/esm2022/lib/radio/index.mjs +1 -1
  89. package/esm2022/lib/radio/radio/radio.component.mjs +3 -3
  90. package/esm2022/lib/radio/radio-group.component.mjs +1 -1
  91. package/esm2022/lib/search-functions.mjs +1 -1
  92. package/esm2022/lib/segment/index.mjs +1 -1
  93. package/esm2022/lib/segment/segment.component.mjs +3 -3
  94. package/esm2022/lib/segment/segment.directives.mjs +1 -1
  95. package/esm2022/lib/select/index.mjs +1 -1
  96. package/esm2022/lib/select/select.component.mjs +3 -3
  97. package/esm2022/lib/select/select.directive.mjs +1 -1
  98. package/esm2022/lib/select/select.types.mjs +1 -1
  99. package/esm2022/lib/slide-toggle/index.mjs +1 -1
  100. package/esm2022/lib/slide-toggle/slide-toggle.component.mjs +3 -3
  101. package/esm2022/lib/slide-toggle/slide-toggle.types.mjs +1 -1
  102. package/esm2022/lib/slider/index.mjs +1 -1
  103. package/esm2022/lib/slider/range-slider/range-slider.component.mjs +3 -3
  104. package/esm2022/lib/slider/slider.component.mjs +3 -3
  105. package/esm2022/lib/slider/slider.module.mjs +1 -1
  106. package/esm2022/lib/slider/slider.types.mjs +1 -1
  107. package/esm2022/lib/snackbar/snackbar-ref.mjs +1 -1
  108. package/esm2022/lib/snackbar/snackbar.component.mjs +3 -3
  109. package/esm2022/lib/snackbar/snackbar.service.mjs +1 -1
  110. package/esm2022/lib/snackbar/snackbar.types.mjs +1 -1
  111. package/esm2022/lib/spinner/index.mjs +1 -1
  112. package/esm2022/lib/spinner/spinner.component.mjs +3 -3
  113. package/esm2022/lib/star/index.mjs +1 -1
  114. package/esm2022/lib/star/star-button/index.mjs +1 -1
  115. package/esm2022/lib/star/star-button/star-button.component.mjs +3 -3
  116. package/esm2022/lib/star/star-display/index.mjs +1 -1
  117. package/esm2022/lib/star/star-display/star-display.component.mjs +3 -3
  118. package/esm2022/lib/star/star-input/index.mjs +1 -1
  119. package/esm2022/lib/star/star-input/star-input.component.mjs +3 -3
  120. package/esm2022/lib/star/star.component.mjs +3 -3
  121. package/esm2022/lib/statebox/index.mjs +1 -1
  122. package/esm2022/lib/statebox/statebox.component.mjs +3 -3
  123. package/esm2022/lib/statebox/statebox.types.mjs +1 -1
  124. package/esm2022/lib/tabber/index.mjs +1 -1
  125. package/esm2022/lib/tabber/tab/tab.component.mjs +3 -3
  126. package/esm2022/lib/tabber/tabber.component.mjs +3 -3
  127. package/esm2022/lib/tabber/tabber.module.mjs +1 -1
  128. package/esm2022/lib/table/index.mjs +1 -1
  129. package/esm2022/lib/table/table-item-storage.mjs +1 -1
  130. package/esm2022/lib/table/table.component.mjs +3 -3
  131. package/esm2022/lib/table/table.directives.mjs +1 -1
  132. package/esm2022/lib/table-from-csv/index.mjs +1 -1
  133. package/esm2022/lib/table-from-csv/table-from-csv.component.mjs +3 -3
  134. package/esm2022/lib/table-pagination/index.mjs +1 -1
  135. package/esm2022/lib/table-pagination/table-pagination.component.mjs +3 -3
  136. package/esm2022/lib/types/button.types.mjs +6 -0
  137. package/esm2022/lib/types/item-storage.types.mjs +1 -1
  138. package/esm2022/lib/types/utility.types.mjs +1 -1
  139. package/esm2022/public-api.mjs +1 -1
  140. package/fesm2022/ardium-ui-ui.mjs +102 -93
  141. package/fesm2022/ardium-ui-ui.mjs.map +1 -1
  142. package/lib/buttons/button/button.component.d.ts +3 -1
  143. package/lib/buttons/fab/fab.component.d.ts +3 -1
  144. package/lib/buttons/icon-button/icon-button.component.d.ts +3 -1
  145. package/lib/types/button.types.d.ts +6 -0
  146. package/package.json +1 -1
  147. package/prebuilt-themes/default/buttons/button.css +9 -0
  148. package/prebuilt-themes/default/buttons/button.css.map +1 -1
  149. package/prebuilt-themes/default/buttons/icon-button.css +4 -2
  150. package/prebuilt-themes/default/buttons/icon-button.css.map +1 -1
  151. package/prebuilt-themes/default/card.css +3 -0
  152. package/prebuilt-themes/default/card.css.map +1 -1
  153. package/themes/default/_clear-button.scss +73 -73
  154. package/themes/default/badge.scss +94 -94
  155. package/themes/default/buttons/button.scss +72 -62
  156. package/themes/default/buttons/fab.scss +74 -74
  157. package/themes/default/buttons/icon-button.scss +62 -59
  158. package/themes/default/card.scss +129 -126
  159. package/themes/default/chips.scss +200 -200
  160. package/themes/default/core.scss +99 -99
  161. package/themes/default/inputs/digit-input.scss +56 -56
  162. package/themes/default/inputs/file-input.scss +85 -85
  163. package/themes/default/inputs/hex-input.scss +27 -27
  164. package/themes/default/modal.scss +93 -93
  165. package/themes/default/segment.scss +340 -340
  166. package/themes/default/select.scss +255 -255
  167. package/themes/default/snackbar.scss +58 -58
  168. package/themes/default/tabber.scss +86 -86
@@ -1,340 +1,340 @@
1
- @use './mixins' as defaultMixins;
2
- @use './coloring' as coloringMixins;
3
- @import '../variables';
4
-
5
- .ard-segment-container {
6
- @include coloringMixins.typeColors();
7
- --ard-_segment-padding: 0.15rem;
8
- padding: var(--ard-_segment-padding);
9
- font-family: 'Roboto', sans-serif;
10
- margin: 2px;
11
- border: 1px solid transparent;
12
- font-weight: 500;
13
- width: max-content;
14
- height: max-content;
15
- gap: var(--ard-_segment-padding);
16
- overflow: hidden; //hide click indicator overflowing rounded corners on touchscreens
17
-
18
- @include defaultMixins.formAppearances();
19
- @include defaultMixins.formVariants();
20
-
21
- //! button focus inficator
22
- .ard-focus-overlay {
23
- @include defaultMixins.focus-overlay;
24
- background-color: var(--ard-cmpcl--content);
25
- }
26
-
27
- //! row & option styling
28
- .ard-segment-row {
29
- gap: var(--ard-_segment-padding);
30
- --ard-_font-size: 0.85em;
31
- height: calc(2.42em + 1px);
32
- font-size: var(--ard-_font-size);
33
-
34
- .ard-segment-option {
35
- margin: 0;
36
- padding: 0 1em;
37
- height: 100%;
38
- font-size: 1em;
39
- min-width: 2.42em;
40
- border: 1px solid transparent;
41
- background: transparent;
42
- position: relative;
43
- cursor: pointer;
44
- transition:
45
- color 0.1s $timing-fn,
46
- opacity 0.1s $timing-fn,
47
- border-color 0.1s $timing-fn,
48
- background-color 0.1s $timing-fn;
49
- outline: none;
50
- display: flex;
51
- align-items: center;
52
-
53
- &.ard-option-selected {
54
- position: relative;
55
- z-index: 2;
56
- }
57
-
58
- &.ard-option-disabled {
59
- opacity: 50%;
60
- pointer-events: none;
61
- }
62
-
63
- .ard-button-content {
64
- position: relative;
65
- z-index: 1;
66
- width: max-content;
67
-
68
- .ard-option-label {
69
- display: flex;
70
- align-items: center;
71
- }
72
- }
73
- }
74
- }
75
- //! highlighted/selected styling
76
- .ard-segment-option {
77
- &.ard-option-highlighted {
78
- .ard-focus-overlay {
79
- opacity: 4%;
80
- }
81
- }
82
- &:active {
83
- .ard-focus-overlay {
84
- opacity: 12%;
85
- }
86
- }
87
- &.ard-option-selected {
88
- .ard-focus-overlay {
89
- opacity: 16%;
90
- }
91
- }
92
- }
93
- &.ard-using-keyboard {
94
- .ard-segment-option {
95
- &.ard-option-highlighted {
96
- .ard-focus-overlay {
97
- opacity: 28%;
98
- }
99
- }
100
- &:active {
101
- .ard-focus-overlay {
102
- opacity: 34%;
103
- }
104
- }
105
- }
106
- }
107
-
108
- //! appearances
109
- &.ard-appearance-transparent {
110
- background: transparent;
111
-
112
- .ard-segment-row {
113
- .ard-segment-option {
114
- .ard-focus-overlay {
115
- background-color: var(--ard-cmpcl--content);
116
- }
117
-
118
- &.ard-option-selected {
119
- color: var(--ard-cmpcl--content);
120
- }
121
- }
122
- }
123
- }
124
- &.ard-appearance-outlined,
125
- &.ard-appearance-outlined-strong {
126
- background: $bg;
127
- padding: 0;
128
-
129
- .ard-segment-option {
130
- border: 1px solid $border-light;
131
-
132
- &.ard-option-selected {
133
- border-color: var(--ard-cmpcl--border);
134
- color: var(--ard-cmpcl--content);
135
- }
136
- }
137
- &.ard-variant-rounded-connected,
138
- &.ard-variant-sharp-connected {
139
- gap: 0;
140
-
141
- .ard-segment-row {
142
- gap: 0;
143
-
144
- &:not(:first-child) {
145
- margin-top: -1px;
146
- }
147
-
148
- .ard-segment-option:not(:first-child) {
149
- margin-left: -1px;
150
- }
151
- }
152
- }
153
- &.ard-variant-rounded-connected {
154
- .ard-segment-row {
155
- .ard-segment-option {
156
- border-radius: 0 !important;
157
- }
158
- &:first-child {
159
- .ard-segment-option {
160
- &:first-child {
161
- border-top-left-radius: var(--ard-variant-border-radius) !important;
162
- }
163
- &:last-child {
164
- border-top-right-radius: var(--ard-variant-border-radius) !important;
165
- }
166
- &:first-child:last-child {
167
- border-top-right-radius: var(--ard-variant-border-radius) !important;
168
- border-top-left-radius: var(--ard-variant-border-radius) !important;
169
- }
170
- }
171
- }
172
- &:last-child {
173
- .ard-segment-option {
174
- &:first-child {
175
- border-bottom-left-radius: var(--ard-variant-border-radius) !important;
176
- }
177
- &:last-child {
178
- border-bottom-right-radius: var(--ard-variant-border-radius) !important;
179
- }
180
- &:first-child:last-child {
181
- border-bottom-right-radius: var(--ard-variant-border-radius) !important;
182
- border-bottom-left-radius: var(--ard-variant-border-radius) !important;
183
- }
184
- }
185
- }
186
- &:first-child:last-child {
187
- .ard-segment-option {
188
- &:first-child {
189
- border-top-left-radius: var(--ard-variant-border-radius) !important;
190
- border-bottom-left-radius: var(--ard-variant-border-radius) !important;
191
- }
192
- &:last-child {
193
- border-top-right-radius: var(--ard-variant-border-radius) !important;
194
- border-bottom-right-radius: var(--ard-variant-border-radius) !important;
195
- }
196
- &:first-child:last-child {
197
- border-radius: var(--ard-variant-border-radius) !important;
198
- }
199
- }
200
- }
201
- }
202
- }
203
- }
204
- &.ard-appearance-outlined-strong {
205
- .ard-segment-option.ard-option-selected {
206
- background-color: var(--ard-cmpcl--bg);
207
- color: var(--ard-cmpcl--on-bg);
208
- }
209
- }
210
- &.ard-appearance-filled {
211
- position: relative;
212
-
213
- &::before {
214
- content: '';
215
- position: absolute;
216
- top: 0;
217
- bottom: 0;
218
- left: 0;
219
- right: 0;
220
- border-radius: inherit;
221
- background: var(--ard-cmpcl--bg);
222
- opacity: 15%;
223
- }
224
-
225
- .ard-segment-option {
226
- &.ard-option-highlighted {
227
- .ard-focus-overlay {
228
- opacity: 8%;
229
- }
230
- }
231
- &.ard-option-selected {
232
- .ard-focus-overlay {
233
- opacity: 20%;
234
- }
235
- }
236
- }
237
- }
238
- &.ard-appearance-filled-strong {
239
- background: var(--ard-cmpcl--bg);
240
- border-radius: var(--ard-variant-border-radius);
241
-
242
- .ard-segment-row {
243
- .ard-segment-option {
244
- color: var(--ard-cmpcl--on-bg);
245
-
246
- .ard-focus-overlay {
247
- background-color: var(--ard-cmpcl--on-bg);
248
- }
249
- &.ard-option-highlighted {
250
- .ard-focus-overlay {
251
- opacity: 16%;
252
- }
253
- }
254
- &.ard-option-selected {
255
- color: var(--ard-cmpcl--content);
256
- background: var(--ard-cmpcl--on-bg);
257
-
258
- .ard-focus-overlay {
259
- opacity: 0;
260
- }
261
- }
262
- }
263
- }
264
- }
265
-
266
- //! variants
267
- &.ard-variant-pill {
268
- border-radius: 16px;
269
-
270
- .ard-segment-row {
271
- .ard-segment-option {
272
- border-radius: var(--ard-variant-border-radius);
273
- }
274
- }
275
- }
276
- &.ard-variant-rounded,
277
- &.ard-variant-rounded-connected {
278
- --ard-variant-border-radius: 8px;
279
- border-radius: var(--ard-variant-border-radius);
280
-
281
- .ard-segment-row {
282
- .ard-segment-option {
283
- border-radius: max(1px, calc(var(--ard-variant-border-radius) - var(--ard-_segment-padding)));
284
- }
285
- }
286
- }
287
- &.ard-variant-sharp,
288
- &.ard-variant-sharp-connected {
289
- border-radius: var(--ard-variant-border-radius);
290
-
291
- .ard-segment-row {
292
- .ard-segment-option {
293
- border-radius: calc(var(--ard-variant-border-radius));
294
- }
295
- }
296
- }
297
-
298
- //! compact
299
- &.ard-compact {
300
- .ard-segment-row {
301
- --ard-_font-size: 0.85em;
302
- height: calc(1.85em + 1px);
303
-
304
- .ard-segment-option {
305
- padding: 0 0.5em;
306
- min-width: 1.85em;
307
- }
308
- }
309
- }
310
-
311
- &.ard-icon-based {
312
- .ard-segment-row .ard-segment-option {
313
- padding: 0;
314
- min-width: unset;
315
- aspect-ratio: 1;
316
- justify-content: center;
317
- }
318
- }
319
-
320
- //! disabled styling
321
- &.ard-disabled {
322
- pointer-events: none;
323
- opacity: 50%;
324
-
325
- .ard-focus-overlay {
326
- opacity: 10%;
327
- }
328
-
329
- //edge case for no coloring
330
- &.ard-color-none {
331
- .ard-button-icon,
332
- .ard-button-content {
333
- opacity: 60%;
334
- }
335
- .ard-focus-overlay {
336
- background: var(--ard-cmpcl--overlay);
337
- }
338
- }
339
- }
340
- }
1
+ @use './mixins' as defaultMixins;
2
+ @use './coloring' as coloringMixins;
3
+ @import '../variables';
4
+
5
+ .ard-segment-container {
6
+ @include coloringMixins.typeColors();
7
+ --ard-_segment-padding: 0.15rem;
8
+ padding: var(--ard-_segment-padding);
9
+ font-family: 'Roboto', sans-serif;
10
+ margin: 2px;
11
+ border: 1px solid transparent;
12
+ font-weight: 500;
13
+ width: max-content;
14
+ height: max-content;
15
+ gap: var(--ard-_segment-padding);
16
+ overflow: hidden; //hide click indicator overflowing rounded corners on touchscreens
17
+
18
+ @include defaultMixins.formAppearances();
19
+ @include defaultMixins.formVariants();
20
+
21
+ //! button focus inficator
22
+ .ard-focus-overlay {
23
+ @include defaultMixins.focus-overlay;
24
+ background-color: var(--ard-cmpcl--content);
25
+ }
26
+
27
+ //! row & option styling
28
+ .ard-segment-row {
29
+ gap: var(--ard-_segment-padding);
30
+ --ard-_font-size: 0.85em;
31
+ height: calc(2.42em + 1px);
32
+ font-size: var(--ard-_font-size);
33
+
34
+ .ard-segment-option {
35
+ margin: 0;
36
+ padding: 0 1em;
37
+ height: 100%;
38
+ font-size: 1em;
39
+ min-width: 2.42em;
40
+ border: 1px solid transparent;
41
+ background: transparent;
42
+ position: relative;
43
+ cursor: pointer;
44
+ transition:
45
+ color 0.1s $timing-fn,
46
+ opacity 0.1s $timing-fn,
47
+ border-color 0.1s $timing-fn,
48
+ background-color 0.1s $timing-fn;
49
+ outline: none;
50
+ display: flex;
51
+ align-items: center;
52
+
53
+ &.ard-option-selected {
54
+ position: relative;
55
+ z-index: 2;
56
+ }
57
+
58
+ &.ard-option-disabled {
59
+ opacity: 50%;
60
+ pointer-events: none;
61
+ }
62
+
63
+ .ard-button-content {
64
+ position: relative;
65
+ z-index: 1;
66
+ width: max-content;
67
+
68
+ .ard-option-label {
69
+ display: flex;
70
+ align-items: center;
71
+ }
72
+ }
73
+ }
74
+ }
75
+ //! highlighted/selected styling
76
+ .ard-segment-option {
77
+ &.ard-option-highlighted {
78
+ .ard-focus-overlay {
79
+ opacity: 4%;
80
+ }
81
+ }
82
+ &:active {
83
+ .ard-focus-overlay {
84
+ opacity: 12%;
85
+ }
86
+ }
87
+ &.ard-option-selected {
88
+ .ard-focus-overlay {
89
+ opacity: 16%;
90
+ }
91
+ }
92
+ }
93
+ &.ard-using-keyboard {
94
+ .ard-segment-option {
95
+ &.ard-option-highlighted {
96
+ .ard-focus-overlay {
97
+ opacity: 28%;
98
+ }
99
+ }
100
+ &:active {
101
+ .ard-focus-overlay {
102
+ opacity: 34%;
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ //! appearances
109
+ &.ard-appearance-transparent {
110
+ background: transparent;
111
+
112
+ .ard-segment-row {
113
+ .ard-segment-option {
114
+ .ard-focus-overlay {
115
+ background-color: var(--ard-cmpcl--content);
116
+ }
117
+
118
+ &.ard-option-selected {
119
+ color: var(--ard-cmpcl--content);
120
+ }
121
+ }
122
+ }
123
+ }
124
+ &.ard-appearance-outlined,
125
+ &.ard-appearance-outlined-strong {
126
+ background: $bg;
127
+ padding: 0;
128
+
129
+ .ard-segment-option {
130
+ border: 1px solid $border-light;
131
+
132
+ &.ard-option-selected {
133
+ border-color: var(--ard-cmpcl--border);
134
+ color: var(--ard-cmpcl--content);
135
+ }
136
+ }
137
+ &.ard-variant-rounded-connected,
138
+ &.ard-variant-sharp-connected {
139
+ gap: 0;
140
+
141
+ .ard-segment-row {
142
+ gap: 0;
143
+
144
+ &:not(:first-child) {
145
+ margin-top: -1px;
146
+ }
147
+
148
+ .ard-segment-option:not(:first-child) {
149
+ margin-left: -1px;
150
+ }
151
+ }
152
+ }
153
+ &.ard-variant-rounded-connected {
154
+ .ard-segment-row {
155
+ .ard-segment-option {
156
+ border-radius: 0 !important;
157
+ }
158
+ &:first-child {
159
+ .ard-segment-option {
160
+ &:first-child {
161
+ border-top-left-radius: var(--ard-variant-border-radius) !important;
162
+ }
163
+ &:last-child {
164
+ border-top-right-radius: var(--ard-variant-border-radius) !important;
165
+ }
166
+ &:first-child:last-child {
167
+ border-top-right-radius: var(--ard-variant-border-radius) !important;
168
+ border-top-left-radius: var(--ard-variant-border-radius) !important;
169
+ }
170
+ }
171
+ }
172
+ &:last-child {
173
+ .ard-segment-option {
174
+ &:first-child {
175
+ border-bottom-left-radius: var(--ard-variant-border-radius) !important;
176
+ }
177
+ &:last-child {
178
+ border-bottom-right-radius: var(--ard-variant-border-radius) !important;
179
+ }
180
+ &:first-child:last-child {
181
+ border-bottom-right-radius: var(--ard-variant-border-radius) !important;
182
+ border-bottom-left-radius: var(--ard-variant-border-radius) !important;
183
+ }
184
+ }
185
+ }
186
+ &:first-child:last-child {
187
+ .ard-segment-option {
188
+ &:first-child {
189
+ border-top-left-radius: var(--ard-variant-border-radius) !important;
190
+ border-bottom-left-radius: var(--ard-variant-border-radius) !important;
191
+ }
192
+ &:last-child {
193
+ border-top-right-radius: var(--ard-variant-border-radius) !important;
194
+ border-bottom-right-radius: var(--ard-variant-border-radius) !important;
195
+ }
196
+ &:first-child:last-child {
197
+ border-radius: var(--ard-variant-border-radius) !important;
198
+ }
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ &.ard-appearance-outlined-strong {
205
+ .ard-segment-option.ard-option-selected {
206
+ background-color: var(--ard-cmpcl--bg);
207
+ color: var(--ard-cmpcl--on-bg);
208
+ }
209
+ }
210
+ &.ard-appearance-filled {
211
+ position: relative;
212
+
213
+ &::before {
214
+ content: '';
215
+ position: absolute;
216
+ top: 0;
217
+ bottom: 0;
218
+ left: 0;
219
+ right: 0;
220
+ border-radius: inherit;
221
+ background: var(--ard-cmpcl--bg);
222
+ opacity: 15%;
223
+ }
224
+
225
+ .ard-segment-option {
226
+ &.ard-option-highlighted {
227
+ .ard-focus-overlay {
228
+ opacity: 8%;
229
+ }
230
+ }
231
+ &.ard-option-selected {
232
+ .ard-focus-overlay {
233
+ opacity: 20%;
234
+ }
235
+ }
236
+ }
237
+ }
238
+ &.ard-appearance-filled-strong {
239
+ background: var(--ard-cmpcl--bg);
240
+ border-radius: var(--ard-variant-border-radius);
241
+
242
+ .ard-segment-row {
243
+ .ard-segment-option {
244
+ color: var(--ard-cmpcl--on-bg);
245
+
246
+ .ard-focus-overlay {
247
+ background-color: var(--ard-cmpcl--on-bg);
248
+ }
249
+ &.ard-option-highlighted {
250
+ .ard-focus-overlay {
251
+ opacity: 16%;
252
+ }
253
+ }
254
+ &.ard-option-selected {
255
+ color: var(--ard-cmpcl--content);
256
+ background: var(--ard-cmpcl--on-bg);
257
+
258
+ .ard-focus-overlay {
259
+ opacity: 0;
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+
266
+ //! variants
267
+ &.ard-variant-pill {
268
+ border-radius: 16px;
269
+
270
+ .ard-segment-row {
271
+ .ard-segment-option {
272
+ border-radius: var(--ard-variant-border-radius);
273
+ }
274
+ }
275
+ }
276
+ &.ard-variant-rounded,
277
+ &.ard-variant-rounded-connected {
278
+ --ard-variant-border-radius: 8px;
279
+ border-radius: var(--ard-variant-border-radius);
280
+
281
+ .ard-segment-row {
282
+ .ard-segment-option {
283
+ border-radius: max(1px, calc(var(--ard-variant-border-radius) - var(--ard-_segment-padding)));
284
+ }
285
+ }
286
+ }
287
+ &.ard-variant-sharp,
288
+ &.ard-variant-sharp-connected {
289
+ border-radius: var(--ard-variant-border-radius);
290
+
291
+ .ard-segment-row {
292
+ .ard-segment-option {
293
+ border-radius: calc(var(--ard-variant-border-radius));
294
+ }
295
+ }
296
+ }
297
+
298
+ //! compact
299
+ &.ard-compact {
300
+ .ard-segment-row {
301
+ --ard-_font-size: 0.85em;
302
+ height: calc(1.85em + 1px);
303
+
304
+ .ard-segment-option {
305
+ padding: 0 0.5em;
306
+ min-width: 1.85em;
307
+ }
308
+ }
309
+ }
310
+
311
+ &.ard-icon-based {
312
+ .ard-segment-row .ard-segment-option {
313
+ padding: 0;
314
+ min-width: unset;
315
+ aspect-ratio: 1;
316
+ justify-content: center;
317
+ }
318
+ }
319
+
320
+ //! disabled styling
321
+ &.ard-disabled {
322
+ pointer-events: none;
323
+ opacity: 50%;
324
+
325
+ .ard-focus-overlay {
326
+ opacity: 10%;
327
+ }
328
+
329
+ //edge case for no coloring
330
+ &.ard-color-none {
331
+ .ard-button-icon,
332
+ .ard-button-content {
333
+ opacity: 60%;
334
+ }
335
+ .ard-focus-overlay {
336
+ background: var(--ard-cmpcl--overlay);
337
+ }
338
+ }
339
+ }
340
+ }