@warp-ds/css 2.0.0-v2.1 → 2.0.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.
@@ -1,54 +1,20 @@
1
- export const attention = {
2
- base: 'border-2 relative',
3
- tooltip:
4
- 'i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8',
5
- callout: 'i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8',
6
- popover:
7
- 'i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m',
8
- arrowBase:
9
- 'absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform',
10
- arrowDirectionLeft: '-left-[8px]',
11
- arrowDirectionRight: '-right-[8px]',
12
- arrowDirectionBottom: '-bottom-[8px]',
13
- arrowDirectionTop: '-top-[8px]',
14
- arrowTooltip: 'i-bg-$color-tooltip-background i-border-$color-tooltip-background',
15
- arrowCallout: 'i-bg-$color-callout-background i-border-$color-callout-border',
16
- arrowPopover: 'i-bg-$color-popover-background i-border-$color-popover-background',
17
- content: 'last-child:mb-0',
18
- notCallout: 'absolute z-50',
19
- };
20
-
21
1
  export const pageIndicator = {
22
2
  wrapper: 'flex space-x-8 p-8',
23
3
  dot: 'h-8 w-8 rounded-full',
24
- inactive: 'i-bg-$color-pageindicator-background hover:i-bg-$color-pageindicator-background-hover',
25
- active: 'i-bg-$color-pageindicator-background-selected',
26
- };
27
-
28
- // Deprecated: Use Badge component
29
- export const ribbon = {
30
- base: 'py-4 px-8 border rounded-4 inline-flex last:mb-0',
31
- info: 'i-border-$color-badge-info-background i-bg-$color-badge-info-background i-text-$color-badge-info-text',
32
- success: 'i-border-$color-badge-positive-background i-bg-$color-badge-positive-background i-text-$color-badge-positive-text',
33
- warning: 'i-border-$color-badge-warning-background i-bg-$color-badge-warning-background i-text-$color-badge-warning-text',
34
- error: 'i-border-$color-badge-negative-background i-bg-$color-badge-negative-background i-text-$color-badge-negative-text',
35
- disabled: 'i-border-$color-badge-disabled-background i-bg-$color-badge-disabled-background i-text-$color-badge-disabled-text',
36
- sponsored: 'i-border-$color-badge-price-background i-bg-$color-badge-price-background i-text-$color-badge-price-text',
37
- neutral: 'i-border-$color-badge-neutral-background i-bg-$color-badge-neutral-background i-text-$color-badge-neutral-text',
38
- roundedTopRightBottomLeft: 'rounded-tr-0 rounded-bl-0',
39
- roundedTopLeftBottomRight: 'rounded-tl-0 rounded-br-0',
4
+ inactive: 's-bg-disabled-subtle hover:bg-[--w-s-icon-subtle]',
5
+ active: 'bg-[--w-s-icon-selected]',
40
6
  };
41
7
 
42
8
  export const badge = {
43
9
  base: 'py-4 px-8 border-0 rounded-4 text-xs inline-flex',
44
- neutral: 'i-bg-$color-badge-neutral-background i-text-$color-badge-neutral-text',
45
- info: 'i-bg-$color-badge-info-background i-text-$color-badge-info-text',
46
- positive: 'i-bg-$color-badge-positive-background i-text-$color-badge-positive-text',
47
- warning: 'i-bg-$color-badge-warning-background i-text-$color-badge-warning-text',
48
- negative: 'i-bg-$color-badge-negative-background i-text-$color-badge-negative-text',
49
- disabled: 'i-bg-$color-badge-disabled-background i-text-$color-badge-disabled-text',
50
- price: 'i-bg-$color-badge-price-background i-text-$color-badge-price-text',
51
- notification: 'i-bg-$color-badge-notification-background i-text-$color-badge-notification-text',
10
+ neutral: 'bg-[--w-color-badge-neutral-background] s-text',
11
+ info: 'bg-[--w-color-badge-info-background] s-text',
12
+ positive: 'bg-[--w-color-badge-positive-background] s-text',
13
+ warning: 'bg-[--w-color-badge-warning-background] s-text',
14
+ negative: 'bg-[--w-color-badge-negative-background] s-text',
15
+ disabled: 's-bg-disabled s-text',
16
+ price: 'bg-[--w-black/70] s-text-inverted-static',
17
+ sponsored: 'bg-[--w-color-badge-sponsored-background] s-text',
52
18
  positionBase: 'absolute backdrop-blur',
53
19
  positionTL: 'rounded-tl-0 rounded-tr-0 rounded-bl-0 top-0 left-0',
54
20
  positionTR: 'rounded-tl-0 rounded-tr-0 rounded-br-0 top-0 right-0',
@@ -58,67 +24,61 @@ export const badge = {
58
24
 
59
25
  export const slider = {
60
26
  wrapper: 'touch-pan-y relative w-full h-44 py-2',
61
- track:
62
- 'absolute i-bg-$color-slider-track-background h-4 top-20 rounded-4 w-full ',
63
- trackDisabled:
64
- 'pointer-events-none i-bg-$color-slider-track-background-disabled',
65
- activeTrack:
66
- 'absolute i-bg-$color-slider-track-background-active h-6 top-[19px] rounded-4',
67
- activeTrackDisabled:
68
- 'i-bg-$color-slider-track-background-disabled pointer-events-none',
69
- thumb:
70
- 'absolute transition-shadow w-24 h-24 bottom-10 rounded-4 outline-none',
27
+ track: 'absolute s-bg-disabled-subtle h-4 top-20 rounded-4 w-full',
28
+ trackDisabled: 'pointer-events-none',
29
+ activeTrack: 'absolute h-6 top-[19px] rounded-4',
30
+ activeTrackEnabled: 's-bg-primary',
31
+ activeTrackDisabled: 's-bg-disabled pointer-events-none',
32
+ thumb: 'absolute transition-shadow w-24 h-24 bottom-10 rounded-4 outline-none',
71
33
  thumbEnabled:
72
- 'border-2 i-shadow-$shadow-slider cursor-pointer i-bg-$color-slider-handle-background i-border-$color-slider-handle-border hover:i-bg-$color-slider-handle-background-hover hover:i-border-$color-slider-handle-border-hover hover:slider-handle-shadow-hover active:i-bg-$color-slider-handle-background-active active:i-border-$color-slider-handle-border-active active:slider-handle-shadow-active focus:slider-handle-shadow-hover focus:i-border-$color-slider-handle-border-hover focus:i-bg-$color-slider-handle-background-hover',
73
- thumbDisabled:
74
- 'i-bg-$color-slider-handle-background-disabled cursor-disabled pointer-events-none',
34
+ 'border-2 shadow-[--w-shadow-slider] cursor-pointer s-bg-primary s-border-primary hover:s-bg-primary-hover hover:s-border-primary-hover hover:shadow-[--w-shadow-slider-handle-hover] active:s-bg-primary-active active:s-border-primary-active active:shadow-[--w-shadow-slider-handle-active] focus:shadow-[--w-shadow-slider-handle-hover] focus:s-border-primary-hover focus:s-bg-primary-hover',
35
+ thumbDisabled: 's-bg-disabled cursor-disabled pointer-events-none',
75
36
  };
76
37
 
77
38
  export const box = {
78
- box: 'group block relative break-words last-child:mb-0 p-16 rounded-8', // Relative here enables w-clickable
39
+ base: 'group block relative break-words last-child:mb-0 p-16 rounded-8', // Relative here enables w-clickable
79
40
  bleed: '-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8', // We target L and R to override the default rounded-8
80
- info: 'i-bg-$color-box-info-background i-text-$color-box-info-text',
81
- neutral: 'i-bg-$color-box-neutral-background i-text-$color-box-neutral-text',
82
- bordered: 'border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text',
83
- infoClickable: 'hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover',
84
- neutralClickable: 'hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover',
85
- borderedClickable: 'hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover',
41
+ info: 's-bg-info-subtle',
42
+ neutral: 's-surface-sunken',
43
+ bordered: 'border-2 s-border s-bg',
86
44
  };
87
45
 
88
46
  export const pill = {
89
- pill: 'flex items-center',
47
+ wrapper: 'flex items-center',
90
48
  button: 'inline-flex items-center focusable text-xs transition-all',
91
- suggestion: 'i-bg-$color-pill-suggestion-background hover:i-bg-$color-pill-suggestion-background-hover active:i-bg-$color-pill-suggestion-background-active i-text-$color-pill-suggestion-text font-bold',
92
- filter: 'i-bg-$color-pill-filter-background hover:i-bg-$color-pill-filter-background-hover active:i-bg-$color-pill-filter-background-active i-text-$color-pill-filter-text',
49
+ suggestion:
50
+ 'bg-[--w-color-pill-suggestion-background] hover:bg-[--w-color-pill-suggestion-background-hover] active:bg-[--w-color-pill-suggestion-background-active] s-text font-bold',
51
+ filter: 's-bg-primary hover:s-bg-primary-hover active:s-bg-primary-active s-text-inverted',
93
52
  label: 'pl-12 py-8 rounded-l-full',
94
53
  labelWithoutClose: 'pr-12 rounded-r-full',
95
54
  labelWithClose: 'pr-2',
96
- close: 'pr-12 pl-4 pt-4 pb-6 rounded-r-full text-m!',
55
+ close: 'pr-12 pl-4 py-8 rounded-r-full',
97
56
  a11y: 'sr-only',
98
57
  };
99
58
 
100
59
  export const step = {
101
- step: 'group/step',
102
- stepVertical: 'group/stepv grid-rows-[20px_auto] grid grid-flow-col gap-x-16',
103
- stepVerticalLeft: 'grid-cols-[20px_1fr]',
104
- stepVerticalRight: 'grid-cols-[1fr_20px] text-right',
105
- stepHorizontal: 'group/steph grid-rows-[auto_20px] grid-cols-[1fr_20px_1fr] flex-1 grid gap-y-16 items-center',
106
-
107
- stepDot: 'rounded-full border-2 h-20 w-20 transition-colors duration-300 i-text-$color-stepindicator-handle-icon',
108
- stepDotVerticalRight: 'col-start-2',
109
- stepDotHorizontal: 'row-start-2 justify-self-end',
110
- stepDotActive: 'i-border-$color-stepindicator-handle-border-active i-bg-$color-stepindicator-handle-background-active',
111
- stepDotIncomplete: 'i-border-$color-stepindicator-handle-border i-bg-$color-stepindicator-handle-background',
112
-
113
- stepLine: 'group-last/stepv:hidden transition-colors duration-300',
114
- stepLineVertical: 'w-2 h-full justify-self-center',
115
- stepLineVerticalRight: 'col-start-2',
116
- stepLineHorizontal: 'h-2 w-full row-start-2',
117
- stepLineHorizontalRight: 'group-last/steph:bg-transparent',
118
- stepLineHorizontalLeft: 'group-first/steph:bg-transparent',
119
-
120
- stepLineIncomplete: 'i-bg-$color-stepindicator-track-background',
121
- stepLineComplete: 'i-bg-$color-stepindicator-track-background-active',
60
+ base: 'group/step',
61
+ vertical: 'group/stepv grid-rows-[20px_auto] grid grid-flow-col gap-x-16',
62
+ horizontal: 'group/steph grid-rows-[auto_20px] grid-cols-[1fr_20px_1fr] flex-1 grid gap-y-16 items-center',
63
+
64
+ alignLeft: 'grid-cols-[20px_1fr]',
65
+ alignRight: 'grid-cols-[1fr_20px] text-right',
66
+
67
+ dot: 'rounded-full border-2 h-20 w-20 transition-colors duration-300 s-icon-inverted',
68
+ dotAlignRight: 'col-start-2',
69
+ dotHorizontal: 'row-start-2 justify-self-end',
70
+ dotActive: 's-border-primary s-bg-primary',
71
+ dotIncomplete: 's-border s-bg',
72
+
73
+ line: 'group-last/stepv:hidden transition-colors duration-300',
74
+ lineVertical: 'w-2 h-full justify-self-center',
75
+ lineAlignRight: 'col-start-2',
76
+ lineHorizontal: 'h-2 w-full row-start-2',
77
+ lineHorizontalAlignRight: 'group-last/steph:bg-transparent',
78
+ lineHorizontalAlignLeft: 'group-first/steph:bg-transparent',
79
+
80
+ lineIncomplete: 's-bg-disabled',
81
+ lineComplete: 's-bg-primary',
122
82
 
123
83
  content: 'last:mb-0 group-last/step:last:pb-0',
124
84
  contentVertical: 'row-span-2 pb-32',
@@ -126,82 +86,72 @@ export const step = {
126
86
  };
127
87
 
128
88
  export const steps = {
129
- steps: 'w-full',
130
- stepsHorizontal: 'flex',
89
+ wrapper: 'w-full',
90
+ horizontal: 'flex',
131
91
  };
132
92
 
133
93
  export const card = {
134
- card: 'cursor-pointer overflow-hidden relative transition-all',
135
- cardShadow: 'rounded-8 i-shadow-$shadow-card hover:i-shadow-$shadow-card-hover hover:i-bg-$color-card-background-hover tap-highlight-transparent',
136
- cardFlat: 'border-2 rounded-4',
137
- cardFlatUnselected:
138
- 'i-bg-$color-card-flat-background i-border-$color-card-flat-border hover:i-bg-$color-card-flat-background-hover hover:i-border-$color-card-flat-border-hover active:i-bg-$color-card-flat-background-active active:i-border-$color-card-flat-border-active',
139
- cardFlatSelected:
140
- 'i-border-$color-card-flat-border-selected i-bg-$color-card-flat-background-selected hover:i-bg-$color-card-flat-background-selected-hover hover:i-border-$color-card-flat-border-selected-hover active:i-border-$color-card-flat-border-active active:i-bg-$color-card-flat-background-active',
141
- cardSelected:
142
- 'i-border-$color-card-border-selected i-bg-$color-card-background-selected hover:i-border-$color-card-border-selected-hover hover:i-bg-$color-card-background-selected-hover active:i-border-$color-card-border-selected-active',
143
- cardOutline:
144
- 'active:i-border-$color-card-flat-border absolute rounded-8 inset-0 transition-all border-2',
145
- cardOutlineUnselected: 'i-border-$color-card-border',
146
- cardOutlineSelected: 'i-border-$color-card-border-selected hover:i-border-$color-card-border-selected-hover',
94
+ base: 'cursor-pointer overflow-hidden relative transition-all',
95
+ shadow: 'group rounded-8 s-surface-elevated-200 hover:s-surface-elevated-200-hover active:s-surface-elevated-200-active',
96
+ selected: '!s-bg-selected !hover:s-bg-selected-hover !active:s-bg-selected-active',
97
+ outline: 'absolute border-2 rounded-8 inset-0 transition-all',
98
+ outlineUnselected: 'border-transparent group-active:s-border-active',
99
+ outlineSelected: 's-border-selected group-hover:s-border-selected-hover group-active:s-border-selected-active',
100
+ flat: 'border-2 rounded-4',
101
+ flatUnselected: 's-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active',
102
+ flatSelected:
103
+ 's-bg-selected hover:s-bg-selected-hover active:s-bg-selected-active s-border-selected hover:s-border-selected-hover active:s-border-selected-active',
147
104
  a11y: 'sr-only',
148
105
  };
149
106
 
150
107
  export const switchToggle = {
151
- switch: 'tap-highlight-transparent',
152
- label: 'block relative h-24 w-44 cursor-pointer group',
153
- labelDisabled: 'pointer-events-none',
108
+ base: 'block relative h-24 w-44 cursor-pointer group focusable rounded-full',
109
+ disabled: 'pointer-events-none',
154
110
  track: 'absolute top-0 left-0 h-full w-full rounded-full transition-colors',
155
- trackActive: 'i-bg-$color-switch-track-background-selected group-hover:i-bg-$color-switch-track-background-selected-hover',
156
- trackInactive: 'i-bg-$color-switch-track-background group-hover:i-bg-$color-switch-track-background-hover',
157
- trackDisabled: 'i-bg-$color-switch-track-background-disabled',
111
+ trackActive: 's-bg-primary group-hover:s-bg-primary-hover',
112
+ trackInactive: 'bg-[--w-color-switch-track-background] group-hover:bg-[--w-color-switch-track-background-hover]',
113
+ trackDisabled: 's-bg-disabled-subtle',
158
114
  handle: 'absolute transform-gpu h-16 w-16 top-4 left-4 rounded-full transition-transform',
159
115
  handleSelected: 'translate-x-20',
160
- handleNotDisabled: 'i-bg-$color-switch-handle-background i-shadow-$shadow-switch-handle',
161
- handleDisabled: 'i-bg-$color-switch-handle-background-disabled',
116
+ handleNotDisabled: 's-bg shadow-s',
117
+ handleDisabled: 's-bg-disabled',
162
118
  a11y: 'sr-only',
163
119
  };
164
120
 
165
121
  export const toaster = {
166
- container:
167
- 'fixed transform translate-z-0 bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none',
122
+ wrapper: 'fixed transform translate-z-0 bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none',
123
+ base: 'grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none',
168
124
  content: 'w-full',
169
- toaster:
170
- 'grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none',
171
125
  };
172
126
 
173
127
  export const toast = {
174
128
  wrapper: 'relative overflow-hidden w-full',
175
- toast:
176
- 'flex group p-8 mt-16 rounded-8 border-2 w-full pointer-events-auto transition-all',
177
- positive: 'i-bg-$color-toast-positive-background i-border-$color-toast-positive-subtle-border i-text-$color-toast-positive-text',
178
- warning: 'i-bg-$color-toast-warning-background i-border-$color-toast-warning-subtle-border i-text-$color-toast-warning-text',
179
- negative: 'i-bg-$color-toast-negative-background i-border-$color-toast-negative-subtle-border i-text-$color-toast-negative-text',
180
- icon: 'shrink-0 rounded-full w-[16px] h-[16px] m-[8px]',
181
- iconPositive: 'i-text-$color-toast-positive-icon',
182
- iconWarning: 'i-text-$color-toast-warning-icon',
183
- iconNegative: 'i-text-$color-toast-negative-icon',
129
+ base: 'flex group p-8 mt-16 rounded-8 border-2 pointer-events-auto transition-all',
130
+ positive: 's-bg-positive-subtle s-border-positive-subtle s-text',
131
+ warning: 's-bg-warning-subtle s-border-warning-subtle s-text',
132
+ negative: 's-bg-negative-subtle s-border-negative-subtle s-text',
133
+ iconBase: 'shrink-0 rounded-full w-[16px] h-[16px] m-[8px]',
134
+ iconPositive: 's-icon-positive',
135
+ iconWarning: 's-icon-warning',
136
+ iconNegative: 's-icon-negative',
184
137
  iconLoading: 'animate-bounce',
185
138
  content: 'self-center mr-8 py-4 last-child:mb-0',
186
- close: 'bg-transparent ml-auto p-[8px] i-text-$color-toast-close-icon hover:i-text-$color-toast-close-icon-hover active:i-text-$color-toast-close-icon-active',
139
+ close: 'bg-transparent ml-auto p-[8px] s-icon hover:s-icon-hover active:s-icon-active',
187
140
  };
188
141
 
189
142
  export const tabs = {
190
- tabContainer: 'mx-auto max-w-screen-md w-full grid relative',
191
- wunderbar:
192
- 'absolute i-border-$color-tabs-border-selected -bottom-0 border-b-4 transition-all',
193
- wrapperUnderlined:
194
- 'border-b i-border-$color-tabs-border -mx-16 sm:mx-0 px-4 sm:px-0 mb-32 ',
143
+ wrapper: 'inline-block border-b s-border mb-32',
144
+ base: 'inline-grid relative -mb-1',
145
+ selectionIndicator: 'absolute s-border-selected -bottom-0 border-b-4 transition-all',
195
146
  };
196
147
 
197
148
  export const tab = {
198
- tab: 'grid items-center font-bold gap-8 focusable antialias p-16 pb-8 border-b-4 bg-transparent i-text-$color-tabs-text i-border-$color-tabs-border hover:i-text-$color-tabs-text-hover hover:i-border-$color-tabs-border-hover',
199
- tabActive: 'i-text-$color-tabs-text-selected',
200
- icon: 'mx-auto hover:i-text-$color-tabs-text-hover',
201
- iconUnderlinedActive: 'i-text-$color-tabs-text-selected',
149
+ base: 'grid items-center font-bold gap-8 focusable antialias p-16 pb-8 border-b-4 bg-transparent border-transparent hover:s-text-link hover:s-border-primary',
150
+ inactive: 's-text-subtle',
151
+ active: 's-text-link',
152
+ icon: 'mx-auto',
202
153
  content: 'flex items-center justify-center gap-8',
203
154
  contentUnderlined: 'content-underlined', // content-underlined is a no-op that prevents a quirk in how Vue handles class bindings
204
- contentUnderlinedActive: 'i-text-$color-tabs-text-selected',
205
155
  };
206
156
 
207
157
  // Todo: Handle dynamic classnames
@@ -217,41 +167,50 @@ export const gridLayout = {
217
167
  cols9: 'grid-cols-9',
218
168
  };
219
169
 
220
- export const buttonReset =
221
- 'focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block';
170
+ export const buttonReset = 'focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block';
222
171
 
223
172
  export const expandable = {
224
- expandable: 'will-change-height',
225
- expandableTitle: 'font-bold i-text-$color-expandable-title-text',
226
- expandableBox: 'i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 ' + box.box,
227
- expandableBleed: box.bleed,
228
- chevron: 'inline-block align-middle transform transition-transform transform-gpu i-text-$color-expandable-icon',
229
- chevronNonBox: 'relative left-8',
230
- chevronBox: 'absolute right-16',
231
- chevronExpanded: '-rotate-180',
173
+ wrapper: 'will-change-height s-text',
174
+ box: 's-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 group block relative break-words last-child:mb-0 rounded-8',
175
+ bleed: '-mx-16 rounded-l-0 rounded-r-0 sm:mx-0 sm:rounded-8',
176
+ chevron: 'inline-block align-middle s-icon',
177
+ chevronNonBox: 'ml-8',
178
+ chevronTransform: 'transform transition-transform transform-gpu ease-in-out',
179
+ chevronExpand: '-rotate-180',
180
+ chevronCollapse: 'rotate-180',
181
+
182
+ // These are web component specific classes, using the ::part-selector:
183
+ elementsChevronDownTransform:
184
+ 'part-[w-icon-chevron-down-16-part]:transform part-[w-icon-chevron-down-16-part]:transition-transform part-[w-icon-chevron-down-16-part]:transform-gpu part-[w-icon-chevron-down-16-part]:ease-in-out',
185
+ elementsChevronUpTransform:
186
+ 'part-[w-icon-chevron-up-16-part]:transform part-[w-icon-chevron-up-16-part]:transition-transform part-[w-icon-chevron-up-16-part]:transform-gpu part-[w-icon-chevron-up-16-part]:ease-in-out',
187
+ elementsChevronExpand: 'part-[w-icon-chevron-down-16-part]:-rotate-180',
188
+ elementsChevronCollapse: 'part-[w-icon-chevron-up-16-part]:rotate-180',
189
+
232
190
  expansion: 'overflow-hidden',
233
191
  expansionNotExpanded: 'h-0 invisible',
234
- button: buttonReset + ' hover:underline focus:underline',
235
- buttonBox: 'w-full text-left relative inline-flex items-center ' + box.box,
236
- paddingTop: 'pt-0',
237
- title: 'flex justify-between items-center',
238
- titleType: 'h4',
192
+ button: 'focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 hover:underline focus-visible:underline',
193
+ buttonBox: 'w-full text-left relative inline-flex items-center justify-between group relative break-words last-child:mb-0 p-16 rounded-8',
194
+ contentWithTitle: 'pt-0',
195
+ title: 'flex w-full justify-between items-center',
196
+ titleType: 't4',
239
197
  };
240
198
 
241
199
  const buttonDefaultStyling = 'font-bold focusable justify-center transition-colors ease-in-out';
242
200
 
243
201
  const buttonColors = {
244
- primary: 'i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover active:i-bg-$color-button-primary-background-active',
245
- secondary: 'i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active',
246
- utility: 'i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover active:i-border-$color-button-utility-border-active',
247
- destructive: 'i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover active:i-bg-$color-button-negative-background-active',
248
- pill: 'i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover active:i-bg-$color-button-pill-background-active',
249
- disabled: 'i-text-$color-button-disabled-text i-bg-$color-button-disabled-background',
250
- quiet: 'i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active',
251
- utilityQuiet: 'i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover',
252
- negativeQuiet: 'i-bg-$color-button-negative-quiet-background i-text-$color-button-negative-quiet-text hover:i-bg-$color-button-negative-quiet-background-hover active:i-bg-$color-button-negative-quiet-background-active',
253
- loading: 'i-text-$color-button-loading-text i-bg-$color-button-loading-background',
254
- link: 'i-text-$color-button-link-text',
202
+ primary:
203
+ 's-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]',
204
+ secondary: 's-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active',
205
+ utility: 's-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active',
206
+ destructive: 's-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active',
207
+ pill: 's-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]',
208
+ disabled: 's-text-inverted s-bg-disabled',
209
+ quiet: 'bg-transparent s-text-link hover:s-bg-hover active:s-bg-active',
210
+ utilityQuiet: 's-text bg-transparent hover:s-bg-hover active:s-bg-active',
211
+ negativeQuiet: 'bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active',
212
+ loading: 's-text s-bg-subtle',
213
+ link: 's-text-link',
255
214
  };
256
215
 
257
216
  const buttonTypes = {
@@ -259,9 +218,8 @@ const buttonTypes = {
259
218
  secondary: `border-2 rounded-8 ${buttonDefaultStyling}`,
260
219
  utility: `border rounded-4 ${buttonDefaultStyling}`,
261
220
  negative: `border-0 rounded-8 ${buttonDefaultStyling}`,
262
- pill:
263
- `p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${buttonDefaultStyling}`,
264
- link: `bg-transparent focusable ease-in-out inline active:underline hover:underline ${buttonColors.link}`,
221
+ pill: `p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${buttonDefaultStyling}`,
222
+ link: `bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${buttonColors.link}`,
265
223
  };
266
224
 
267
225
  const buttonSizes = {
@@ -282,38 +240,28 @@ const buttonTextSizes = {
282
240
  };
283
241
 
284
242
  const buttonVariants = {
285
- inProgress:
286
- `border-transparent animate-inprogress pointer-events-none ${buttonColors.loading}`, // .button--in-progress, a.button--in-progress:visited
287
- quiet:
288
- `border-0 rounded-8 ${buttonDefaultStyling}`,
243
+ inProgress: `border-transparent animate-inprogress pointer-events-none ${buttonColors.loading}`, // .button--in-progress, a.button--in-progress:visited
244
+ quiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
289
245
  utilityQuiet: `border-0 rounded-4 ${buttonDefaultStyling}`,
290
246
  negativeQuiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
291
- isDisabled:
292
- `font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${buttonColors.disabled}`, // .button:disabled, .button--is-disabled
247
+ isDisabled: `font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${buttonColors.disabled}`, // .button:disabled, .button--is-disabled
293
248
  };
294
249
 
295
250
  export const button = {
296
251
  // Buttontypes
297
- secondary:
298
- `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`, // .button--secondary, .button--default, .button
299
- secondaryHref:
300
- `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
301
- secondaryDisabled:
302
- `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
252
+ secondary: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`, // .button--secondary, .button--default, .button
253
+ secondaryHref: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
254
+ secondaryDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
303
255
  secondarySmall: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonColors.secondary}`,
304
256
  secondarySmallDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
305
- secondaryQuiet:
306
- `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
307
- secondaryQuietDisabled:
308
- `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
257
+ secondaryQuiet: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
258
+ secondaryQuietDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
309
259
  secondarySmallQuiet: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonColors.quiet}`,
310
260
  secondarySmallQuietDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
311
- secondaryLoading:
312
- `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
261
+ secondaryLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
313
262
  secondarySmallLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
314
263
  secondarySmallQuietLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
315
- secondaryQuietLoading:
316
- `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
264
+ secondaryQuietLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
317
265
 
318
266
  primary: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.primary} ${buttonColors.primary}`, // .button--primary, .button--cta
319
267
  primaryDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.isDisabled} ${buttonTypes.primary}`,
@@ -361,177 +309,266 @@ export const button = {
361
309
 
362
310
  link: `${buttonSizes.link} ${buttonTextSizes.medium} ${buttonTypes.link}`,
363
311
  linkSmall: `${buttonSizes.link} ${buttonTextSizes.xsmall} ${buttonTypes.link}`,
364
- linkAsButton: 'inline-block hover:no-underline text-center',
312
+ linkAsButton: 'inline-block active:no-underline hover:no-underline focus:no-underline text-center',
365
313
  a11y: 'sr-only',
366
- fullWidth: "w-full max-w-full",
367
- contentWidth: "max-w-max",
314
+ fullWidth: 'w-full max-w-full',
315
+ contentWidth: 'max-w-max',
368
316
  };
369
317
 
370
318
  export const buttonGroup = {
371
319
  wrapper: 'inline-flex rounded-4 overflow-hidden',
372
- raised: 'i-shadow-$shadow-buttongroup',
320
+ raised: 'shadow-s',
373
321
  vertical: 'flex-col',
374
322
  nonOutlinedVertical: 'divide-y',
375
323
  nonOutlinedHorizontal: 'divide-x',
376
324
  };
377
325
 
378
326
  export const buttonGroupItem = {
379
- wrapper: 'relative i-text-$color-buttongroup-utility-text i-bg-$color-buttongroup-utility-background hover:i-bg-$color-buttongroup-utility-background-hover active:i-text-$color-buttongroup-utility-text-selected active:i-bg-$color-buttongroup-utility-background-selected',
380
- outlined: 'border hover:z-30 i-border-$color-buttongroup-utility-border active:i-border-$color-buttongroup-utility-border-selected',
327
+ wrapper: 'relative s-text',
328
+ outlined: 'border hover:z-30',
381
329
  outlinedVertical: '-mb-1 last:mb-0 first:rounded-lt-4 first:rounded-rt-4 last:rounded-lb-4 last:rounded-rb-4',
382
330
  outlinedHorizontal: '-mr-1 last:mr-0 first:rounded-lt-4 first:rounded-lb-4 last:rounded-rt-4 last:rounded-rb-4',
383
331
  outlinedVerticalResets: 'px-1 pt-1 last:pb-1 -mb-1 last:mb-0',
384
332
  outlinedHorizontalResets: 'py-1 pl-1 last:pr-1 -mr-1 last:mr-0',
385
- outlinedSelected: 'i-border-$color-buttongroup-utility-border-selected',
386
- selected: 'z-30 i-text-$color-buttongroup-utility-text-selected! i-bg-$color-buttongroup-utility-background-selected!',
333
+ outlinedUnselected: 'border-[--w-color-buttongroup-utility-border] active:border-[--w-color-buttongroup-utility-border-selected]',
334
+ outlinedSelected: 'active:border-[--w-color-buttongroup-utility-border-selected]',
335
+ unselected:
336
+ 's-bg hover:bg-[--w-color-buttongroup-utility-background-hover] active:s-text active:bg-[--w-color-buttongroup-utility-background-selected]',
337
+ selected: 'z-30 bg-[--w-color-buttongroup-utility-background-selected]',
387
338
  };
388
339
 
389
340
  export const modal = {
390
- //TODO: this class can be removed when we have the solution for opacity and we can add rgba values to the background of the backdrop
391
- transparentBg: `before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25`,
392
341
  backdrop:
393
- 'fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]',
394
- modal:
395
- 'pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8',
396
- content:
397
- 'block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative',
342
+ 'fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-30 [--w-modal-max-height:80%] [--w-modal-width:640px] bg-[--w-black/25]',
343
+ base: 'pb-safe-[32] shadow-m max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 bg-[--w-s-color-surface-elevated-100] flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8',
344
+ content: 'block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative',
398
345
  footer: 'flex justify-end shrink-0 px-16 sm:px-32',
399
346
  transitionTitle: 'transition-all duration-300',
400
- transitionTitleCenter: 'justify-self-center',
347
+ transitionTitleCenter: 'justify-self-center self-center',
401
348
  transitionTitleColSpan: 'col-span-2',
402
349
  title:
403
- '-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0',
350
+ 'py-8 sm:py-0 -mt-4 sm:-mt-8 min-h-40 sm:min-h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-start px-16 sm:px-32 border-b sm:border-b-0 shrink-0',
404
351
  titleText: 'mb-0 h4 sm:h3',
405
- titleButton: button.pill + ' sm:min-h-[32px] sm:min-w-[32px]',
352
+ titleButton: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,
406
353
  titleButtonLeft: '-ml-8 sm:-ml-12 justify-self-start',
407
354
  titleButtonRight: '-mr-8 sm:-mr-12 justify-self-end',
408
355
  titleButtonIcon: 'h-16 w-16 sm:h-24 sm:w-24',
409
356
  titleButtonIconRotated: 'transform rotate-90',
410
357
  };
411
358
 
359
+ export const modalElement = {
360
+ // several items in here are 'resets' for the <dialog> element
361
+ dialogEl:
362
+ 'bg-transparent backface-hidden w-unset h-unset max-w-unset max-h-unset p-0 m-auto border-0 inset-0 open:flex open:fixed sm:place-content-center sm:place-items-center items-end [--w-modal-max-height:80%] [--w-modal-width:640px]',
363
+ dialogInner:
364
+ 'transition-all relative pb-safe-[32] sm:pb-32 shadow-m max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] ease-in-out backface-hidden will-change-height rounded-8 sm:mx-16 s-bg flex flex-col overflow-hidden lt-sm:rounded-b-0',
365
+ contentSlot: 'block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative',
366
+ header: 'relative pb-8',
367
+ headerTitleBar: 'pt-16 sm:pt-24 px-16 sm:px-32 grid gap-12 grid-cols-[auto_1fr_auto] items-start shrink-0!',
368
+ headerButton:
369
+ 'sm:min-h-[32px] sm:min-w-[32px] min-h-[40px] min-w-[40px] text-m leading-[24] p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding font-bold focusable transition-colors ease-in-out',
370
+ headerButtonLeft:
371
+ '-ml-8 s-icon bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]',
372
+ headerCloseButton:
373
+ '-mr-8 s-icon bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]',
374
+ headerCloseButtonOnImage: `absolute right-8 top-8 z-10 s-color-inverted bg-[var(--w-black)/70] hover:bg-[var(--w-black)/85] active:bg-[var(--w-black)] s-text-inverted`,
375
+ headerTitle: 'mb-0 t3 self-center',
376
+ headerTitleWithBackButton: 'justify-self-center',
377
+ headerTitleWithoutBackButton: 'col-span-2',
378
+ headerTitleWithTopArea: 'pt-16 px-16 sm:px-32',
379
+ footer: 'flex justify-end shrink-0 px-16 sm:px-32 pt-24',
380
+ };
381
+
412
382
  export const alert = {
413
- alert: "flex p-16 border border-l-4 rounded-4",
414
- willChangeHeight: "will-change-height",
415
- textWrapper: "last-child:mb-0 text-s",
416
- title: "text-s",
417
- icon: "w-16 mr-8 min-w-16",
418
- negative: "i-border-$color-alert-negative-subtle-border i-bg-$color-alert-negative-background i-text-$color-alert-negative-text i-border-l-$color-alert-negative-border",
419
- negativeIcon: "i-text-$color-alert-negative-icon",
420
- positive: "i-border-$color-alert-positive-subtle-border i-bg-$color-alert-positive-background i-text-$color-alert-positive-text i-border-l-$color-alert-positive-border",
421
- positiveIcon: "i-text-$color-alert-positive-icon",
422
- warning: "i-border-$color-alert-warning-subtle-border i-bg-$color-alert-warning-background i-text-$color-alert-warning-text i-border-l-$color-alert-warning-border",
423
- warningIcon: "i-text-$color-alert-warning-icon",
424
- info: "i-border-$color-alert-info-subtle-border i-bg-$color-alert-info-background i-text-$color-alert-info-text i-border-l-$color-alert-info-border",
425
- infoIcon: "i-text-$color-alert-info-icon",
383
+ wrapper: 'flex p-16 border border-l-4 rounded-4 s-text',
384
+ willChangeHeight: 'will-change-height',
385
+ textWrapper: 'last-child:mb-0 text-s',
386
+ title: 'text-s',
387
+ icon: 'w-16 mr-8 min-w-16',
388
+ negative: 's-border-negative-subtle s-border-l-negative s-bg-negative-subtle',
389
+ negativeIcon: 's-icon-negative',
390
+ positive: 's-border-positive-subtle s-border-l-positive s-bg-positive-subtle',
391
+ positiveIcon: 's-icon-positive',
392
+ warning: 's-border-warning-subtle s-border-l-warning s-bg-warning-subtle',
393
+ warningIcon: 's-icon-warning',
394
+ info: 's-border-info-subtle s-border-l-info s-bg-info-subtle',
395
+ infoIcon: 's-icon-info',
426
396
  };
427
397
 
428
398
  export const input = {
429
- default: 'block text-m mb-0 leading-m i-text-$color-input-text-filled i-bg-$color-input-background i-border-$color-input-border hover:i-border-$color-input-border-hover active:i-border-$color-input-border-active rounded-4 py-12 px-8 block border-1 w-full focusable focus:[--w-outline-offset:-2px] caret-current',
430
- textArea: 'min-h-[42] sm:min-h-[45]',
431
- disabled: 'i-bg-$color-input-background-disabled i-border-$color-input-border-disabled hover:i-border-$color-input-border-disabled! i-text-$color-input-text-disabled pointer-events-none',
432
- invalid: 'i-border-$color-input-border-negative i-text-$color-input-text-negative!',
433
- readOnly: 'pl-0 bg-transparent border-0 pointer-events-none i-text-$color-input-text-read-only',
434
- placeholder: 'placeholder:i-text-$color-input-text-placeholder',
399
+ // wrapper classes
435
400
  wrapper: 'relative',
401
+ // input classes
402
+ base: 'block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current', // true
403
+ default: 'border-1 s-text s-bg s-border hover:s-border-hover active:s-border-selected', // !isInvalid && !isDisabled && !isReadOnly
404
+ disabled: 'border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none', // !isInvalid && isDisabled && !isReadOnly
405
+ invalid: 'border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!', // isInvalid && !isDisabled && !isReadOnly
406
+ readOnly: 'pl-0 bg-transparent pointer-events-none', // !isInvalid && !isDisabled && isReadOnly
407
+ placeholder: 'placeholder:s-text-placeholder',
436
408
  suffix: 'pr-40',
437
- prefix: 'pl-40',
409
+ prefix: 'pl-[var(--w-prefix-width,_40px)]',
410
+ // textarea classes
411
+ textArea: 'min-h-[42] sm:min-h-[45]',
438
412
  };
439
413
 
440
414
  export const select = {
441
- default: 'block text-m mb-0 leading-m i-text-$color-select-text i-bg-$color-select-background i-border-$color-select-border hover:i-border-$color-select-border-hover active:i-border-$color-select-border-active rounded-4 py-12 px-8 block border-1 w-full focusable focus:[--w-outline-offset:-2px] appearance-none pr-32 cursor-pointer caret-current',
442
- disabled: 'i-bg-$color-select-background-disabled i-border-$color-select-border-disabled hover:i-border-$color-select-border-disabled! active:i-border-$color-select-border-disabled! i-text-$color-select-text-disabled pointer-events-none',
443
- invalid: 'i-border-$color-select-border-negative',
444
- readOnly: 'pl-0 bg-transparent border-0 pointer-events-none before:hidden',
415
+ base: 'block text-m mb-0 py-12 pr-32 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] appearance-none cursor-pointer caret-current',
416
+ default: 's-text s-bg pl-8 border-1 s-border hover:s-border-hover active:s-border-active',
417
+ disabled:
418
+ 's-text-disabled s-bg-disabled-subtle pl-8 border-1 s-border-disabled hover:s-border-disabled active:s-border-disabled pointer-events-none',
419
+ invalid:
420
+ 's-text s-bg pl-8 border-1 s-border-negative hover:s-border-negative-hover active:s-border-active outline-[--w-s-color-border-negative]!',
421
+ readOnly: 's-text bg-transparent pl-0 border-0 pointer-events-none before:hidden',
445
422
  wrapper: 'relative',
446
423
  selectWrapper: `relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none `,
447
- chevron: 'absolute top-[30%] block right-0 bottom-0 w-32 h-full i-text-$color-select-icon pointer-events-none cursor-pointer',
424
+ chevron: 'block absolute top-[30%] right-0 bottom-0 w-32 h-full s-icon pointer-events-none cursor-pointer',
448
425
  chevronDisabled: 'opacity-25',
449
426
  };
450
427
 
451
428
  export const label = {
452
- label: 'antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text',
453
- labelInvalid: 'i-text-$color-label-text-negative',
454
- optional: 'pl-8 font-normal text-s i-text-$color-label-optional-text',
429
+ base: 'antialiased block relative text-s font-bold pb-4 cursor-pointer s-text',
430
+ optional: 'pl-8 font-normal text-s s-text-subtle',
455
431
  };
456
432
 
457
433
  export const helpText = {
458
- helpText: 'text-xs mt-4 block i-text-$color-helptext-text',
459
- helpTextValid: 'i-text-$color-helptext-text-positive',
460
- helpTextInvalid: 'i-text-$color-helptext-text-negative',
434
+ base: 'text-xs mt-4 block',
435
+ color: 's-text-subtle',
436
+ colorInvalid: 's-text-negative',
461
437
  };
462
438
 
463
- const prefixSuffixWrapperBase =
464
- 'absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ';
439
+ const prefixSuffixWrapper =
440
+ 'absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ';
465
441
 
466
442
  export const suffix = {
467
- wrapper: prefixSuffixWrapperBase + 'right-0',
443
+ wrapper: prefixSuffixWrapper + 'right-0',
468
444
  wrapperWithLabel: 'w-max pr-12',
469
445
  wrapperWithIcon: 'w-40',
470
- label: 'antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text',
446
+ label: 'antialiased block relative cursor-default pb-0 font-bold text-xs s-text',
471
447
  };
472
448
 
473
449
  export const prefix = {
474
- wrapper: prefixSuffixWrapperBase + 'left-0',
450
+ wrapper: prefixSuffixWrapper + 'left-0',
475
451
  wrapperWithLabel: 'w-max pl-12',
476
452
  wrapperWithIcon: 'w-40',
477
- label: 'antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text',
453
+ label: 'antialiased block relative cursor-default pb-0 font-bold text-xs s-text',
478
454
  };
479
455
 
480
456
  export const breadcrumbs = {
481
457
  wrapper: 'flex space-x-8',
482
- text: 'i-text-$color-breadcrumbs-text',
483
- link: 'i-text-$color-breadcrumbs-link-text',
484
- separator: 'select-none i-text-$color-breadcrumbs-icon',
458
+ text: 's-text',
459
+ link: 's-text-link',
460
+ separator: 'select-none s-icon',
485
461
  a11y: 'sr-only',
486
462
  };
487
463
 
488
464
  export const toggle = {
489
- field: 'relative text-m',
490
- wrapper: 'relative py-1',
491
- deadToggleWrapper: 'h-20 w-20 pointer-events-none',
465
+ // wrapper classes
466
+ field: 'relative text-m', // true
467
+ wrapper: 'relative py-1', // true
468
+ wrapperRadioButtons: 'inline-flex font-bold rounded-8 focus-within:focusable', // isRadioButton && !isEqualWidth
469
+ wrapperRadioButtonsJustified: 'flex font-bold rounded-8 focus-within:focusable', // isRadioButton && isEqualWidth,
470
+
471
+ // group classes
472
+ radioButtonsGroup: 'group', // isRadioButton
473
+ radioButtonsGroupJustified: 'grow-1 shrink-0 basis-auto', // isRadioButton && isEqualWidth
474
+
475
+ // input classes
492
476
  input: 'peer',
493
- deadToggleInput: 'hidden',
494
- inputDisabled: 'pointer-events-none',
495
- focusable: 'peer-focus:focusable',
496
- focusableWithin: 'focus-within:focusable',
497
- label: 'cursor-pointer text-m i-text-$color-label-text py-2 pl-28 select-none relative block before:block before:border before:absolute before:transition-all before:left-0 before:w-20 before:h-20 before:top-2',
498
- deadToggleLabel: '-mt-2',
499
- noContent: `before:content-[""]`,
500
- indeterminate: `before:flex! before:items-center before:justify-center before:i-text-$color-checkbox-icon before:text-center before:font-bold before:content-["-"] peer-indeterminate:before:i-border-$color-checkbox-border-selected peer-indeterminate:before:i-bg-$color-checkbox-background-selected peer-indeterminate:hover:before:i-border-$color-checkbox-border-hover peer-indeterminate:hover:before:i-bg-$color-checkbox-background-selected-hover`,
501
- labelDisabled: 'pointer-events-none',
502
- checkbox: 'before:rounded-2 hover:before:i-border-$color-checkbox-border-hover hover:before:i-bg-$color-checkbox-background-hover',
503
- checkboxChecked: 'peer-checked:before:i-border-$color-checkbox-border-selected peer-checked:before:i-bg-$color-checkbox-background-selected peer-checked:peer-hover:before:i-border-$color-checkbox-border-selected-hover peer-checked:peer-hover:before:i-bg-$color-checkbox-background-selected-hover',
504
- checkboxInvalid: 'before:i-bg-$color-checkbox-negative-background hover:before:i-bg-$color-checkbox-negative-background-hover peer-checked:before:i-border-$color-checkbox-negative-border-selected hover:before:i-border-$color-checkbox-negative-border-hover peer-checked:before:i-bg-$color-checkbox-negative-background-selected peer-checked:peer-hover:before:i-bg-$color-checkbox-negative-background-selected-hover peer-checked:peer-hover:before:i-border-$color-checkbox-negative-border-selected-hover',
505
- checkboxDisabled: 'before:i-bg-$color-checkbox-background-disabled before:i-border-$color-checkbox-border-disabled peer-checked:before:i-border-$color-checkbox-border-selected-disabled peer-checked:before:i-bg-$color-checkbox-background-selected-disabled',
506
- labelCheckboxBorder: 'i-border-$color-checkbox-border',
507
- radio: 'before:rounded-full peer-checked:before:border-[6] peer-checked:peer-hover:before:i-border-$color-radio-border-selected-hover peer-hover:before:i-border-$color-radio-border-hover peer-hover:before:i-bg-$color-radio-background-hover',
508
- radioChecked: 'peer-checked:before:i-border-$color-radio-border-selected',
509
- radioInvalid: 'before:i-bg-$color-radio-negative-background peer-hover:before:i-bg-$color-radio-negative-background-hover before:i-border-$color-radio-negative-border peer-hover:before:i-border-$color-radio-negative-border-hover peer-checked:before:i-border-$color-radio-negative-border-selected peer-checked:peer-hover:before:i-border-$color-radio-negative-border-selected-hover ',
510
- radioDisabled: 'before:i-bg-$color-radio-background-disabled before:i-border-$color-radio-border-disabled peer-checked:before:i-border-$color-radio-border-selected-disabled',
511
- labelRadioBorder: 'i-border-$color-radio-border',
512
- radioButtons: 'inline-flex relative font-bold rounded-8',
513
- radioButtonsGroup: 'group',
514
- radioButtonsLabel: 'peer-hover:peer-not-checked:i-bg-$color-buttongroup-primary-background-hover peer-checked:i-text-$color-buttongroup-primary-text-selected peer-checked:i-bg-$color-buttongroup-primary-background-selected peer-checked:i-border-$color-buttongroup-primary-border-selected block relative text-s font-bold cursor-pointer i-text-$color-buttongroup-primary-text text-center i-bg-$color-buttongroup-primary-background border-2 i-border-$color-buttongroup-primary-border py-8 pl-12 pr-14 group-first-of-type:rounded-tl-8 group-first-of-type:rounded-bl-8 group-last-of-type:rounded-tr-8 group-last-of-type:rounded-br-8 group-not-last-of-type:border-r-0 peer-checked:z-10 group-not-first:-ml-2',
515
- radioButtonsJustified: 'flex!',
516
- radioButtonsGroupJustified: 'grow-1 shrink-0 basis-auto',
517
- radioButtonsLabelSmall: 'text-xs py-[5px]! px-[8px]!',
518
- icon: `peer-checked:before:bg-center before:bg-[url(var(--w-form-check-mark))]`,
519
477
  a11y: 'sr-only',
478
+
479
+ // label classes
480
+ label:
481
+ 'peer-focus:focusable cursor-pointer text-m s-text s-border py-2 pl-28 select-none relative block before:border before:absolute before:transition-all before:left-0 before:w-20 before:h-20 before:top-2', // !isRadioButton
482
+ labelBefore: 'before:content-[""] before:block', // !isRadioButton && !isIndeterminate
483
+ checkbox:
484
+ 'before:s-bg before:rounded-2 hover:before:s-border-primary hover:before:s-bg-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-border-primary peer-checked:before:s-bg-primary peer-checked:peer-hover:before:s-border-primary-hover peer-checked:peer-hover:before:s-bg-primary-hover', // isCheckbox && !isIndeterminate && !isInvalid && !isDisabled
485
+ checkboxInvalid:
486
+ 'before:s-bg before:s-border-negative before:rounded-2 hover:before:s-bg-negative-subtle-hover hover:before:s-border-negative-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-bg-negative peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-bg-negative-hover peer-checked:peer-hover:before:s-border-negative-hover', // isCheckbox && !isIndeterminate && isInvalid && !isDisabled
487
+ checkboxDisabled:
488
+ 'before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-2 peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-border-disabled peer-checked:before:s-bg-disabled', // isCheckbox && !isIndeterminate && !isInvalid && isDisabled
489
+ indeterminate:
490
+ 'before:content-["–"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-primary peer-indeterminate:before:s-bg-primary peer-indeterminate:hover:before:s-border-primary-hover peer-indeterminate:hover:before:s-bg-primary-hover', // isCheckbox && isIndeterminate && !isInvalid && !isDisabled
491
+ indeterminateInvalid:
492
+ 'before:content-["–"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-negative peer-indeterminate:before:s-bg-negative peer-indeterminate:hover:before:s-border-negative-hover peer-indeterminate:hover:before:s-bg-negative-hover', // isCheckbox && isIndeterminate && isInvalid && !isDisabled
493
+ indeterminateDisabled:
494
+ 'before:content-["–"] before:rounded-2 before:leading-xs before:text-center before:font-bold pointer-events-none before:s-icon-inverted peer-indeterminate:before:s-border-disabled peer-indeterminate:before:s-bg-disabled', // isCheckbox && isIndeterminate && !isInvalid && isDisabled
495
+ radio:
496
+ 'before:s-bg before:rounded-full peer-checked:before:border-[6] peer-checked:before:s-border-selected peer-checked:peer-hover:before:s-border-selected-hover peer-hover:before:s-border-primary peer-hover:before:s-bg-hover', // isRadio && !isDisabled && !isInvalid
497
+ radioInvalid:
498
+ 'before:s-bg before:s-border-negative before:rounded-full peer-checked:before:border-[6] peer-hover:before:s-bg-negative-subtle peer-hover:before:s-border-negative-hover peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-border-negative-hover', // isRadio && isInvalid && !isDisabled
499
+ radioDisabled:
500
+ 'before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-full peer-checked:before:border-[6]', // isRadio && !isInvalid && isDisabled
501
+ radioButtonsLabel:
502
+ 'peer-hover:peer-not-checked:s-bg-hover peer-checked:s-text-inverted peer-checked:s-bg-primary peer-checked:s-border-primary block relative font-bold cursor-pointer s-text-link text-center s-bg border-2 s-border group-first-of-type:rounded-tl-8 group-first-of-type:rounded-bl-8 group-last-of-type:rounded-tr-8 group-last-of-type:rounded-br-8 group-not-last-of-type:border-r-0 peer-checked:z-10 group-not-first:-ml-2', // isRadioButtons
503
+ radioButtonsRegular: 'text-s py-8 pl-12 pr-14', // isRadioButtons && !isSmall
504
+ radioButtonsSmall: 'text-xs py-[5px] px-[8px]', // isRadioButtons && isSmall
505
+ };
506
+
507
+ export const deadToggle = {
508
+ wrapper: `${toggle.wrapper} h-20 w-20 pointer-events-none`,
509
+ input: `${toggle.input} hidden`,
510
+ inputVue: 'hidden',
511
+ labelVue: '-mt-2',
512
+ labelRadio: `${toggle.label} ${toggle.labelBefore} ${toggle.radio}`,
513
+ labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`,
520
514
  };
521
515
 
522
516
  export const clickable = {
523
517
  toggle: 'absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset',
524
- label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
518
+ label: 'antialiased block relative text-s font-bold s-text px-12 py-8 cursor-pointer focusable focusable-inset',
525
519
  buttonOrLink: 'bg-transparent focusable',
526
520
  buttonOrLinkStretch: 'inset-0 absolute',
527
521
  };
528
522
 
529
523
  export const combobox = {
530
524
  wrapper: 'relative',
531
- combobox: 'absolute left-0 right-0 pb-8 rounded-8 i-bg-$color-combobox-background i-shadow-$shadow-combobox',
532
- textMatch: 'font-bold',
525
+ base: 'absolute left-0 right-0 pb-8 rounded-8 shadow-m',
533
526
  listbox: 'm-0 p-0 select-none list-none',
534
- option: 'block cursor-pointer p-8 hover:i-bg-$color-combobox-option-background-hover',
535
- optionSelected: 'i-bg-$color-combobox-option-background-selected hover:i-bg-$color-combobox-option-background-selected-hover',
527
+ option: 'block cursor-pointer p-8',
528
+ optionUnselected: 's-bg hover:s-bg-hover',
529
+ optionSelected: 's-bg-selected hover:s-bg-selected-hover',
530
+ textMatch: 'font-bold',
536
531
  a11y: 'sr-only',
537
- };
532
+ };
533
+
534
+ export const attention = {
535
+ base: 'border-2 relative flex items-start',
536
+ tooltip: 's-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8',
537
+ callout: 'bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8',
538
+ highlight: 'bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0',
539
+ popover:
540
+ 'bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0',
541
+
542
+ arrowBase: 'absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform',
543
+ arrowDirectionLeftStart: '-left-[8px]',
544
+ arrowDirectionLeft: '-left-[8px]',
545
+ arrowDirectionLeftEnd: '-left-[8px]',
546
+ arrowDirectionRightStart: '-right-[8px]',
547
+ arrowDirectionRight: '-right-[8px]',
548
+ arrowDirectionRightEnd: '-right-[8px]',
549
+ arrowDirectionBottomStart: '-bottom-[8px]',
550
+ arrowDirectionBottom: '-bottom-[8px]',
551
+ arrowDirectionBottomEnd: '-bottom-[8px]',
552
+ arrowDirectionTopStart: '-top-[8px]',
553
+ arrowDirectionTop: '-top-[8px]',
554
+ arrowDirectionTopEnd: '-top-[8px]',
555
+ arrowTooltip: 's-bg-inverted border-[--w-s-color-background-inverted]',
556
+ arrowCallout: 'bg-[--w-color-callout-background] border-[--w-color-callout-border]',
557
+ arrowPopover: 'bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]',
558
+ arrowHighlight: 'bg-[--w-color-callout-background] border-[--w-color-callout-border]',
559
+
560
+ content: 'last-child:mb-0',
561
+ notCallout: 'absolute z-50',
562
+ closeBtn: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} justify-self-end -mr-8 ml-8`,
563
+ };
564
+
565
+ export const pagination = {
566
+ link: 'hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding',
567
+ currentPage: 'block md:hidden p-8 font-bold',
568
+ icon: 's-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]',
569
+ containerNav: 'flex items-center justify-center p-8',
570
+ a11y: 'sr-only',
571
+ pages: 'hidden md:block s-text-link',
572
+ active: 's-bg-primary s-text-inverted',
573
+ notActive: 'hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]',
574
+ };