@frontile/theme 0.18.0-alpha.16 → 0.18.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declarations/colors/util.d.ts +2 -1
- package/declarations/colors.d.ts +1 -0
- package/declarations/components/button.d.ts +49 -1
- package/declarations/components/command.d.ts +281 -0
- package/declarations/components/forms/forms.d.ts +259 -1
- package/declarations/components/index.d.ts +4 -0
- package/declarations/components/kbd.d.ts +315 -0
- package/declarations/components/listbox.d.ts +96 -4
- package/declarations/components/notification-card.d.ts +173 -104
- package/declarations/components/notifications-container.d.ts +102 -33
- package/declarations/components/overlays.d.ts +45 -0
- package/declarations/components/segmented-control.d.ts +463 -0
- package/declarations/components/table.d.ts +1 -1
- package/declarations/components/tabs.d.ts +463 -0
- package/dist/colors.js +2 -1
- package/dist/colors.js.map +1 -1
- package/dist/index.js +2999 -4
- package/dist/index.js.map +1 -1
- package/dist/overlays-aq0rSm6R.js +372 -0
- package/dist/overlays-aq0rSm6R.js.map +1 -0
- package/dist/plugin.js +6 -42
- package/dist/plugin.js.map +1 -1
- package/dist/{config-BZyMPeuH.js → util-CHV5ZmrC.js} +40 -2
- package/dist/util-CHV5ZmrC.js.map +1 -0
- package/package.json +2 -2
- package/src/index.css +17 -0
- package/dist/config-BZyMPeuH.js.map +0 -1
- package/dist/forms-legacy-D7knB8hB.js +0 -2363
- package/dist/forms-legacy-D7knB8hB.js.map +0 -1
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
2
|
+
import { createTV } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
function flat(arr, target) {
|
|
5
|
+
arr.forEach(el => {
|
|
6
|
+
if (Array.isArray(el)) {
|
|
7
|
+
flat(el, target);
|
|
8
|
+
} else {
|
|
9
|
+
target.push(el);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function flatArray(arr) {
|
|
14
|
+
const flattened = [];
|
|
15
|
+
flat(arr, flattened);
|
|
16
|
+
return flattened;
|
|
17
|
+
}
|
|
18
|
+
const voidEmpty = value => value ? value : undefined;
|
|
19
|
+
const clsx = (...classes) => {
|
|
20
|
+
return voidEmpty(flatArray(classes).filter(Boolean).join(' '));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Common size units used across all design tokens (icons, typography, etc.)
|
|
24
|
+
const COMMON_UNITS = ['pico', 'nano', 'micro', '5xs', '4xs', '3xs', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'kilo', 'mega'];
|
|
25
|
+
const ELEVATION_LEVELS = ['0', '1', '2', '3', '4', '5'];
|
|
26
|
+
const twMergeConfig = {
|
|
27
|
+
extend: {
|
|
28
|
+
classGroups: {
|
|
29
|
+
// Icon sizes
|
|
30
|
+
'icon-size': [{
|
|
31
|
+
'size-icon': COMMON_UNITS
|
|
32
|
+
}],
|
|
33
|
+
// Border widths (directional variants handled automatically)
|
|
34
|
+
'border-w': [{
|
|
35
|
+
border: ['thin', 'heavy', 'aggressive']
|
|
36
|
+
}],
|
|
37
|
+
// Border radius (extend existing rounded utilities)
|
|
38
|
+
rounded: [{
|
|
39
|
+
rounded: ['default', 'pill']
|
|
40
|
+
}],
|
|
41
|
+
// Elevation shadows
|
|
42
|
+
shadow: [{
|
|
43
|
+
'shadow-elevation': ELEVATION_LEVELS
|
|
44
|
+
}],
|
|
45
|
+
// Opacity
|
|
46
|
+
opacity: [{
|
|
47
|
+
opacity: ['hover', 'disabled']
|
|
48
|
+
}],
|
|
49
|
+
// Typography composite text styles (extend font-size class group)
|
|
50
|
+
// These set font-size + other properties, so they should conflict with text-* utilities
|
|
51
|
+
'font-size': [{
|
|
52
|
+
'text-marquee': [...COMMON_UNITS]
|
|
53
|
+
}, {
|
|
54
|
+
'text-header': [...COMMON_UNITS]
|
|
55
|
+
}, {
|
|
56
|
+
'text-body': [...COMMON_UNITS]
|
|
57
|
+
},
|
|
58
|
+
// `strong` was missing here, so `text-strong-*` fell through to the
|
|
59
|
+
// text-color group and tailwind-merge dropped it whenever a component
|
|
60
|
+
// also set a text color (e.g. Button's `text-on-primary`) — silently
|
|
61
|
+
// losing the label's size, weight and tracking.
|
|
62
|
+
{
|
|
63
|
+
'text-strong': [...COMMON_UNITS]
|
|
64
|
+
}, {
|
|
65
|
+
'text-code': [...COMMON_UNITS]
|
|
66
|
+
}, {
|
|
67
|
+
'text-caption': [...COMMON_UNITS]
|
|
68
|
+
}, {
|
|
69
|
+
'text-label': [...COMMON_UNITS]
|
|
70
|
+
}]
|
|
71
|
+
},
|
|
72
|
+
conflictingClassGroups: {
|
|
73
|
+
'icon-size': ['w', 'h', 'size']
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const twMergeBase = extendTailwindMerge(twMergeConfig);
|
|
78
|
+
function twMerge(defaultClass, overwrites) {
|
|
79
|
+
if (overwrites) {
|
|
80
|
+
return twMergeBase(clsx(defaultClass, overwrites));
|
|
81
|
+
}
|
|
82
|
+
return clsx(defaultClass);
|
|
83
|
+
}
|
|
84
|
+
const tv = createTV({
|
|
85
|
+
twMerge: true,
|
|
86
|
+
twMergeConfig
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const obscurer = `before:bg-linear-to-b before:to-surface-modal before:from-surface-modal/75 before:absolute before:left-0 before:w-full before:h-4 before:-top-4 before:content-['_']`;
|
|
90
|
+
const overlay = tv({
|
|
91
|
+
base: 'will-change-transform overflow-auto',
|
|
92
|
+
variants: {
|
|
93
|
+
enableFlexContent: {
|
|
94
|
+
true: 'flex items-center fixed inset-0 flex-col'
|
|
95
|
+
},
|
|
96
|
+
inPlace: {
|
|
97
|
+
true: 'absolute'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
const backdrop = tv({
|
|
102
|
+
base: 'fixed inset-0 select-none',
|
|
103
|
+
variants: {
|
|
104
|
+
type: {
|
|
105
|
+
none: '',
|
|
106
|
+
transparent: '',
|
|
107
|
+
// The scrim is `overlay-strong` in light and `lift-strong` in dark: the
|
|
108
|
+
// two families are mirrored, so the black 75% step swaps sides. Pairing
|
|
109
|
+
// them keeps the backdrop a dark scrim in both schemes.
|
|
110
|
+
blur: 'bg-surface-overlay-strong dark:bg-surface-lift-strong backdrop-blur-sm',
|
|
111
|
+
faded: 'bg-surface-overlay-strong dark:bg-surface-lift-strong'
|
|
112
|
+
},
|
|
113
|
+
inPlace: {
|
|
114
|
+
true: 'absolute'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const modal = tv({
|
|
119
|
+
slots: {
|
|
120
|
+
base: 'flex flex-col shrink-0 relative text-on-surface-modal bg-surface-modal border border-surface-overlay-mild rounded-2xl my-24 w-full outline-hidden overflow-clip',
|
|
121
|
+
closeButton: 'absolute top-3 right-3',
|
|
122
|
+
header: 'font-header text-header-lg px-6 pt-8 pb-2',
|
|
123
|
+
body: 'px-6 py-2 grow overflow-y-auto',
|
|
124
|
+
footer: 'flex justify-end items-center px-6 pt-6 pb-8 gap-4'
|
|
125
|
+
},
|
|
126
|
+
variants: {
|
|
127
|
+
size: {
|
|
128
|
+
xs: 'modal--xs',
|
|
129
|
+
sm: 'modal--sm',
|
|
130
|
+
md: 'modal--md',
|
|
131
|
+
lg: 'modal--lg',
|
|
132
|
+
xl: 'modal--xl',
|
|
133
|
+
full: 'modal--full'
|
|
134
|
+
},
|
|
135
|
+
isCentered: {
|
|
136
|
+
true: 'my-auto'
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const drawer = tv({
|
|
141
|
+
slots: {
|
|
142
|
+
base: 'flex flex-col absolute text-on-surface-modal bg-surface-modal border border-surface-overlay-mild rounded-2xl w-full h-full outline-hidden overflow-clip',
|
|
143
|
+
closeButton: 'absolute top-3 right-3',
|
|
144
|
+
header: 'font-header text-header-lg text-center px-8 pt-10 pb-2',
|
|
145
|
+
body: 'px-8 py-4 grow overflow-y-auto',
|
|
146
|
+
footer: `${obscurer} flex justify-end items-center relative border-t border-surface-overlay-mild bg-surface-modal p-8 gap-4`
|
|
147
|
+
},
|
|
148
|
+
variants: {
|
|
149
|
+
size: {
|
|
150
|
+
xs: '',
|
|
151
|
+
sm: '',
|
|
152
|
+
md: '',
|
|
153
|
+
lg: '',
|
|
154
|
+
xl: '',
|
|
155
|
+
full: ''
|
|
156
|
+
},
|
|
157
|
+
placement: {
|
|
158
|
+
top: 'top-0 right-0 left-0',
|
|
159
|
+
bottom: 'bottom-0 right-0 left-0',
|
|
160
|
+
left: 'top-0 bottom-0 left-0',
|
|
161
|
+
right: 'top-0 bottom-0 right-0'
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
compoundVariants: [
|
|
165
|
+
// vertical
|
|
166
|
+
{
|
|
167
|
+
placement: ['top', 'bottom'],
|
|
168
|
+
size: 'xs',
|
|
169
|
+
class: 'drawer--vertical-xs'
|
|
170
|
+
}, {
|
|
171
|
+
placement: ['top', 'bottom'],
|
|
172
|
+
size: 'sm',
|
|
173
|
+
class: 'drawer--vertical-sm'
|
|
174
|
+
}, {
|
|
175
|
+
placement: ['top', 'bottom'],
|
|
176
|
+
size: 'md',
|
|
177
|
+
class: 'drawer--vertical-md'
|
|
178
|
+
}, {
|
|
179
|
+
placement: ['top', 'bottom'],
|
|
180
|
+
size: 'lg',
|
|
181
|
+
class: 'drawer--vertical-lg'
|
|
182
|
+
}, {
|
|
183
|
+
placement: ['top', 'bottom'],
|
|
184
|
+
size: 'xl',
|
|
185
|
+
class: 'drawer--vertical-xl'
|
|
186
|
+
}, {
|
|
187
|
+
placement: ['top', 'bottom'],
|
|
188
|
+
size: 'full',
|
|
189
|
+
class: 'drawer--vertical-full'
|
|
190
|
+
},
|
|
191
|
+
// horizontal
|
|
192
|
+
{
|
|
193
|
+
placement: ['right', 'left'],
|
|
194
|
+
size: 'xs',
|
|
195
|
+
class: 'drawer--horizontal-xs'
|
|
196
|
+
}, {
|
|
197
|
+
placement: ['right', 'left'],
|
|
198
|
+
size: 'sm',
|
|
199
|
+
class: 'drawer--horizontal-sm'
|
|
200
|
+
}, {
|
|
201
|
+
placement: ['right', 'left'],
|
|
202
|
+
size: 'md',
|
|
203
|
+
class: 'drawer--horizontal-md'
|
|
204
|
+
}, {
|
|
205
|
+
placement: ['right', 'left'],
|
|
206
|
+
size: 'lg',
|
|
207
|
+
class: 'drawer--horizontal-lg'
|
|
208
|
+
}, {
|
|
209
|
+
placement: ['right', 'left'],
|
|
210
|
+
size: 'xl',
|
|
211
|
+
class: 'drawer--horizontal-xl'
|
|
212
|
+
}, {
|
|
213
|
+
placement: ['right', 'left'],
|
|
214
|
+
size: 'full',
|
|
215
|
+
class: 'drawer--horizontal-full'
|
|
216
|
+
}]
|
|
217
|
+
});
|
|
218
|
+
const slideTransition = {
|
|
219
|
+
enterActive: {
|
|
220
|
+
transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'
|
|
221
|
+
},
|
|
222
|
+
leaveActive: {
|
|
223
|
+
transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
const overlayTransitions = {
|
|
227
|
+
fade: {
|
|
228
|
+
enter: {
|
|
229
|
+
opacity: '0'
|
|
230
|
+
},
|
|
231
|
+
enterActive: {
|
|
232
|
+
transition: 'opacity 0.2s linear'
|
|
233
|
+
},
|
|
234
|
+
leave: {
|
|
235
|
+
opacity: '1'
|
|
236
|
+
},
|
|
237
|
+
leaveActive: {
|
|
238
|
+
transition: 'opacity 0.2s linear'
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
zoom: {
|
|
242
|
+
enter: {
|
|
243
|
+
opacity: '0',
|
|
244
|
+
transform: 'scale(0.8)'
|
|
245
|
+
},
|
|
246
|
+
enterActive: {
|
|
247
|
+
transition: 'all 0.2s ease-in-out'
|
|
248
|
+
},
|
|
249
|
+
leave: {
|
|
250
|
+
opacity: '1',
|
|
251
|
+
transform: 'scale(1)'
|
|
252
|
+
},
|
|
253
|
+
leaveActive: {
|
|
254
|
+
transition: 'all 0.2s ease-in-out'
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
slideFromLeft: {
|
|
258
|
+
enter: {
|
|
259
|
+
transform: 'translateX(-100%)'
|
|
260
|
+
},
|
|
261
|
+
leave: {
|
|
262
|
+
transform: 'translateX(0%)'
|
|
263
|
+
},
|
|
264
|
+
...slideTransition
|
|
265
|
+
},
|
|
266
|
+
slideFromRight: {
|
|
267
|
+
enter: {
|
|
268
|
+
transform: 'translateX(100%)'
|
|
269
|
+
},
|
|
270
|
+
leave: {
|
|
271
|
+
transform: 'translateX(0%)'
|
|
272
|
+
},
|
|
273
|
+
...slideTransition
|
|
274
|
+
},
|
|
275
|
+
slideFromTop: {
|
|
276
|
+
enter: {
|
|
277
|
+
transform: 'translateY(-100%)'
|
|
278
|
+
},
|
|
279
|
+
leave: {
|
|
280
|
+
transform: 'translateY(0%)'
|
|
281
|
+
},
|
|
282
|
+
...slideTransition
|
|
283
|
+
},
|
|
284
|
+
slideFromBottom: {
|
|
285
|
+
enter: {
|
|
286
|
+
transform: 'translateY(100%)'
|
|
287
|
+
},
|
|
288
|
+
leave: {
|
|
289
|
+
transform: 'translateY(0%)'
|
|
290
|
+
},
|
|
291
|
+
...slideTransition
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
* Command palette: a short scale-and-rise. Deliberately faster than `scale`
|
|
295
|
+
* -- a palette is opened mid-task and re-opened constantly, so the animation
|
|
296
|
+
* has to read as instant rather than as a reveal.
|
|
297
|
+
*/
|
|
298
|
+
command: {
|
|
299
|
+
enter: {
|
|
300
|
+
opacity: '0',
|
|
301
|
+
transform: 'scale(0.96) translateY(4px)',
|
|
302
|
+
// Reduced motion keeps the fade but drops the movement, rather than
|
|
303
|
+
// removing the transition altogether -- the palette should still read as
|
|
304
|
+
// appearing, just without travel.
|
|
305
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
306
|
+
transform: 'none'
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
enterActive: {
|
|
310
|
+
transitionProperty: 'transform, opacity',
|
|
311
|
+
transitionDuration: '150ms',
|
|
312
|
+
transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
|
|
313
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
314
|
+
transitionProperty: 'opacity'
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
enterTo: {
|
|
318
|
+
opacity: '1',
|
|
319
|
+
transform: 'scale(1) translateY(0)'
|
|
320
|
+
},
|
|
321
|
+
leave: {
|
|
322
|
+
opacity: '1',
|
|
323
|
+
transform: 'scale(1) translateY(0)'
|
|
324
|
+
},
|
|
325
|
+
leaveActive: {
|
|
326
|
+
transitionProperty: 'transform, opacity',
|
|
327
|
+
transitionDuration: '100ms',
|
|
328
|
+
transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
329
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
330
|
+
transitionProperty: 'opacity'
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
leaveTo: {
|
|
334
|
+
opacity: '0',
|
|
335
|
+
transform: 'scale(0.96) translateY(4px)',
|
|
336
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
337
|
+
transform: 'none'
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
scale: {
|
|
342
|
+
enter: {
|
|
343
|
+
opacity: '0',
|
|
344
|
+
transform: 'scale(0.95)'
|
|
345
|
+
},
|
|
346
|
+
enterActive: {
|
|
347
|
+
transitionProperty: 'transform, opacity',
|
|
348
|
+
transitionDuration: '200ms',
|
|
349
|
+
transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)'
|
|
350
|
+
},
|
|
351
|
+
enterTo: {
|
|
352
|
+
opacity: '1',
|
|
353
|
+
transform: 'translate(scaleX(1) scaleY(1))'
|
|
354
|
+
},
|
|
355
|
+
leave: {
|
|
356
|
+
opacity: '1',
|
|
357
|
+
transform: 'translate(scaleX(1) scaleY(1))'
|
|
358
|
+
},
|
|
359
|
+
leaveActive: {
|
|
360
|
+
transitionProperty: 'transform, opacity',
|
|
361
|
+
transitionDuration: '100ms',
|
|
362
|
+
transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)'
|
|
363
|
+
},
|
|
364
|
+
leaveTo: {
|
|
365
|
+
opacity: '0',
|
|
366
|
+
transform: 'scale(0.95)'
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
export { overlayTransitions as a, backdrop as b, twMerge as c, drawer as d, modal as m, overlay as o, tv as t };
|
|
372
|
+
//# sourceMappingURL=overlays-aq0rSm6R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlays-aq0rSm6R.js","sources":["../src/tw.ts","../src/components/overlays.ts"],"sourcesContent":["import { extendTailwindMerge } from 'tailwind-merge';\nimport { createTV } from 'tailwind-variants';\nimport type { ClassValue } from 'tailwind-variants';\nexport type { VariantProps } from 'tailwind-variants';\n\nfunction flat(arr: ClassValue[], target: ClassValue[]): void {\n arr.forEach((el) => {\n if (Array.isArray(el)) {\n flat(el, target);\n } else {\n target.push(el);\n }\n });\n}\nfunction flatArray(arr: ClassValue[]): ClassValue[] {\n const flattened: ClassValue[] = [];\n flat(arr, flattened);\n return flattened;\n}\nconst voidEmpty = <T>(value: T): T | undefined => (value ? value : undefined);\n\nconst clsx = (...classes: ClassValue[]): string | undefined => {\n return voidEmpty(flatArray(classes).filter(Boolean).join(' '));\n};\n\n// Common size units used across all design tokens (icons, typography, etc.)\nconst COMMON_UNITS = [\n 'pico',\n 'nano',\n 'micro',\n '5xs',\n '4xs',\n '3xs',\n '2xs',\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n '2xl',\n '3xl',\n 'kilo',\n 'mega'\n] as const;\n\nconst ELEVATION_LEVELS = ['0', '1', '2', '3', '4', '5'];\n\nconst twMergeConfig = {\n extend: {\n classGroups: {\n // Icon sizes\n 'icon-size': [{ 'size-icon': COMMON_UNITS }],\n\n // Border widths (directional variants handled automatically)\n 'border-w': [{ border: ['thin', 'heavy', 'aggressive'] }],\n\n // Border radius (extend existing rounded utilities)\n rounded: [{ rounded: ['default', 'pill'] }],\n\n // Elevation shadows\n shadow: [{ 'shadow-elevation': ELEVATION_LEVELS }],\n\n // Opacity\n opacity: [{ opacity: ['hover', 'disabled'] }],\n\n // Typography composite text styles (extend font-size class group)\n // These set font-size + other properties, so they should conflict with text-* utilities\n 'font-size': [\n { 'text-marquee': [...COMMON_UNITS] },\n { 'text-header': [...COMMON_UNITS] },\n { 'text-body': [...COMMON_UNITS] },\n // `strong` was missing here, so `text-strong-*` fell through to the\n // text-color group and tailwind-merge dropped it whenever a component\n // also set a text color (e.g. Button's `text-on-primary`) — silently\n // losing the label's size, weight and tracking.\n { 'text-strong': [...COMMON_UNITS] },\n { 'text-code': [...COMMON_UNITS] },\n { 'text-caption': [...COMMON_UNITS] },\n { 'text-label': [...COMMON_UNITS] }\n ]\n },\n conflictingClassGroups: {\n 'icon-size': ['w', 'h', 'size']\n }\n }\n} as const;\n\nconst twMergeBase = extendTailwindMerge<'icon-size'>(twMergeConfig);\n\nexport function twMerge(defaultClass: ClassValue, overwrites: ClassValue) {\n if (overwrites) {\n return twMergeBase(clsx(defaultClass, overwrites));\n }\n return clsx(defaultClass);\n}\n\nexport const tv = createTV({\n twMerge: true,\n twMergeConfig\n});\n","import { tv, type VariantProps } from '../tw';\n\nconst obscurer = `before:bg-linear-to-b before:to-surface-modal before:from-surface-modal/75 before:absolute before:left-0 before:w-full before:h-4 before:-top-4 before:content-['_']`;\n\nconst overlay = tv({\n base: 'will-change-transform overflow-auto',\n variants: {\n enableFlexContent: {\n true: 'flex items-center fixed inset-0 flex-col'\n },\n inPlace: {\n true: 'absolute'\n }\n }\n});\n\nconst backdrop = tv({\n base: 'fixed inset-0 select-none',\n variants: {\n type: {\n none: '',\n transparent: '',\n // The scrim is `overlay-strong` in light and `lift-strong` in dark: the\n // two families are mirrored, so the black 75% step swaps sides. Pairing\n // them keeps the backdrop a dark scrim in both schemes.\n blur: 'bg-surface-overlay-strong dark:bg-surface-lift-strong backdrop-blur-sm',\n faded: 'bg-surface-overlay-strong dark:bg-surface-lift-strong'\n },\n inPlace: {\n true: 'absolute'\n }\n }\n});\n\nconst modal = tv({\n slots: {\n base: 'flex flex-col shrink-0 relative text-on-surface-modal bg-surface-modal border border-surface-overlay-mild rounded-2xl my-24 w-full outline-hidden overflow-clip',\n closeButton: 'absolute top-3 right-3',\n header: 'font-header text-header-lg px-6 pt-8 pb-2',\n body: 'px-6 py-2 grow overflow-y-auto',\n footer: 'flex justify-end items-center px-6 pt-6 pb-8 gap-4'\n },\n variants: {\n size: {\n xs: 'modal--xs',\n sm: 'modal--sm',\n md: 'modal--md',\n lg: 'modal--lg',\n xl: 'modal--xl',\n full: 'modal--full'\n },\n isCentered: {\n true: 'my-auto'\n }\n }\n});\n\nconst drawer = tv({\n slots: {\n base: 'flex flex-col absolute text-on-surface-modal bg-surface-modal border border-surface-overlay-mild rounded-2xl w-full h-full outline-hidden overflow-clip',\n closeButton: 'absolute top-3 right-3',\n header: 'font-header text-header-lg text-center px-8 pt-10 pb-2',\n body: 'px-8 py-4 grow overflow-y-auto',\n footer: `${obscurer} flex justify-end items-center relative border-t border-surface-overlay-mild bg-surface-modal p-8 gap-4`\n },\n variants: {\n size: {\n xs: '',\n sm: '',\n md: '',\n lg: '',\n xl: '',\n full: ''\n },\n placement: {\n top: 'top-0 right-0 left-0',\n bottom: 'bottom-0 right-0 left-0',\n left: 'top-0 bottom-0 left-0',\n right: 'top-0 bottom-0 right-0'\n }\n },\n compoundVariants: [\n // vertical\n {\n placement: ['top', 'bottom'],\n size: 'xs',\n class: 'drawer--vertical-xs'\n },\n {\n placement: ['top', 'bottom'],\n size: 'sm',\n class: 'drawer--vertical-sm'\n },\n {\n placement: ['top', 'bottom'],\n size: 'md',\n class: 'drawer--vertical-md'\n },\n {\n placement: ['top', 'bottom'],\n size: 'lg',\n class: 'drawer--vertical-lg'\n },\n {\n placement: ['top', 'bottom'],\n size: 'xl',\n class: 'drawer--vertical-xl'\n },\n {\n placement: ['top', 'bottom'],\n size: 'full',\n class: 'drawer--vertical-full'\n },\n\n // horizontal\n {\n placement: ['right', 'left'],\n size: 'xs',\n class: 'drawer--horizontal-xs'\n },\n {\n placement: ['right', 'left'],\n size: 'sm',\n class: 'drawer--horizontal-sm'\n },\n {\n placement: ['right', 'left'],\n size: 'md',\n class: 'drawer--horizontal-md'\n },\n {\n placement: ['right', 'left'],\n size: 'lg',\n class: 'drawer--horizontal-lg'\n },\n {\n placement: ['right', 'left'],\n size: 'xl',\n class: 'drawer--horizontal-xl'\n },\n {\n placement: ['right', 'left'],\n size: 'full',\n class: 'drawer--horizontal-full'\n }\n ]\n});\n\nconst slideTransition = {\n enterActive: {\n transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'\n },\n\n leaveActive: {\n transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'\n }\n};\n\nconst overlayTransitions = {\n fade: {\n enter: {\n opacity: '0'\n },\n enterActive: {\n transition: 'opacity 0.2s linear'\n },\n leave: {\n opacity: '1'\n },\n leaveActive: {\n transition: 'opacity 0.2s linear'\n }\n },\n zoom: {\n enter: {\n opacity: '0',\n transform: 'scale(0.8)'\n },\n enterActive: {\n transition: 'all 0.2s ease-in-out'\n },\n leave: {\n opacity: '1',\n transform: 'scale(1)'\n },\n leaveActive: {\n transition: 'all 0.2s ease-in-out'\n }\n },\n slideFromLeft: {\n enter: {\n transform: 'translateX(-100%)'\n },\n leave: {\n transform: 'translateX(0%)'\n },\n ...slideTransition\n },\n slideFromRight: {\n enter: {\n transform: 'translateX(100%)'\n },\n leave: {\n transform: 'translateX(0%)'\n },\n ...slideTransition\n },\n\n slideFromTop: {\n enter: {\n transform: 'translateY(-100%)'\n },\n leave: {\n transform: 'translateY(0%)'\n },\n ...slideTransition\n },\n slideFromBottom: {\n enter: {\n transform: 'translateY(100%)'\n },\n leave: {\n transform: 'translateY(0%)'\n },\n ...slideTransition\n },\n /**\n * Command palette: a short scale-and-rise. Deliberately faster than `scale`\n * -- a palette is opened mid-task and re-opened constantly, so the animation\n * has to read as instant rather than as a reveal.\n */\n command: {\n enter: {\n opacity: '0',\n transform: 'scale(0.96) translateY(4px)',\n // Reduced motion keeps the fade but drops the movement, rather than\n // removing the transition altogether -- the palette should still read as\n // appearing, just without travel.\n '@media (prefers-reduced-motion: reduce)': {\n transform: 'none'\n }\n },\n enterActive: {\n transitionProperty: 'transform, opacity',\n transitionDuration: '150ms',\n transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',\n '@media (prefers-reduced-motion: reduce)': {\n transitionProperty: 'opacity'\n }\n },\n enterTo: {\n opacity: '1',\n transform: 'scale(1) translateY(0)'\n },\n leave: {\n opacity: '1',\n transform: 'scale(1) translateY(0)'\n },\n leaveActive: {\n transitionProperty: 'transform, opacity',\n transitionDuration: '100ms',\n transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',\n '@media (prefers-reduced-motion: reduce)': {\n transitionProperty: 'opacity'\n }\n },\n leaveTo: {\n opacity: '0',\n transform: 'scale(0.96) translateY(4px)',\n '@media (prefers-reduced-motion: reduce)': {\n transform: 'none'\n }\n }\n },\n scale: {\n enter: {\n opacity: '0',\n transform: 'scale(0.95)'\n },\n enterActive: {\n transitionProperty: 'transform, opacity',\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)'\n },\n enterTo: {\n opacity: '1',\n transform: 'translate(scaleX(1) scaleY(1))'\n },\n leave: {\n opacity: '1',\n transform: 'translate(scaleX(1) scaleY(1))'\n },\n leaveActive: {\n transitionProperty: 'transform, opacity',\n transitionDuration: '100ms',\n transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)'\n },\n leaveTo: {\n opacity: '0',\n transform: 'scale(0.95)'\n }\n }\n};\n\nexport type OverlayVariants = VariantProps<typeof overlay>;\nexport type OverlaySlots = keyof ReturnType<typeof overlay>;\nexport type DrawerVariants = VariantProps<typeof drawer>;\nexport type DrawerSlots = keyof ReturnType<typeof drawer>;\nexport type ModalVariants = VariantProps<typeof modal>;\nexport type ModalSlots = keyof ReturnType<typeof modal>;\nexport type BackdropVariants = VariantProps<typeof backdrop>;\nexport type BackdropSlots = keyof ReturnType<typeof backdrop>;\n\nexport { overlay, drawer, modal, overlayTransitions, backdrop };\n"],"names":["flat","arr","target","forEach","el","Array","isArray","push","flatArray","flattened","voidEmpty","value","undefined","clsx","classes","filter","Boolean","join","COMMON_UNITS","ELEVATION_LEVELS","twMergeConfig","extend","classGroups","border","rounded","shadow","opacity","conflictingClassGroups","twMergeBase","extendTailwindMerge","twMerge","defaultClass","overwrites","tv","createTV","obscurer","overlay","base","variants","enableFlexContent","true","inPlace","backdrop","type","none","transparent","blur","faded","modal","slots","closeButton","header","body","footer","size","xs","sm","md","lg","xl","full","isCentered","drawer","placement","top","bottom","left","right","compoundVariants","class","slideTransition","enterActive","transition","leaveActive","overlayTransitions","fade","enter","leave","zoom","transform","slideFromLeft","slideFromRight","slideFromTop","slideFromBottom","command","transitionProperty","transitionDuration","transitionTimingFunction","enterTo","leaveTo","scale"],"mappings":";;;AAKA,SAASA,IAAIA,CAACC,GAAiB,EAAEC,MAAoB,EAAQ;AAC3DD,EAAAA,GAAG,CAACE,OAAO,CAAEC,EAAE,IAAK;AAClB,IAAA,IAAIC,KAAK,CAACC,OAAO,CAACF,EAAE,CAAC,EAAE;AACrBJ,MAAAA,IAAI,CAACI,EAAE,EAAEF,MAAM,CAAC;AAClB,IAAA,CAAC,MAAM;AACLA,MAAAA,MAAM,CAACK,IAAI,CAACH,EAAE,CAAC;AACjB,IAAA;AACF,EAAA,CAAC,CAAC;AACJ;AACA,SAASI,SAASA,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,GAAG;AACZqD,MAAAA,SAAS,EAAE;AACb;AACF;AACF;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import plugin from 'tailwindcss/plugin';
|
|
2
|
-
import {
|
|
2
|
+
import { a as overlayTransitions } from './overlays-aq0rSm6R.js';
|
|
3
3
|
import svgToDataUri from 'mini-svg-data-uri';
|
|
4
4
|
import { flatten } from 'flat';
|
|
5
5
|
import kebabCase from 'lodash.kebabcase';
|
|
6
6
|
import mapKeys from 'lodash.mapkeys';
|
|
7
|
-
import { parse,
|
|
7
|
+
import { parse, oklch } from 'culori';
|
|
8
8
|
import deepMerge from 'deepmerge';
|
|
9
|
-
import { s as semanticColors,
|
|
9
|
+
import { s as semanticColors, g as getContrastingColor } from './util-CHV5ZmrC.js';
|
|
10
|
+
export { d as swapColorValues } from './util-CHV5ZmrC.js';
|
|
10
11
|
import powerSelectPlugin from 'tailwindcss-ember-power-select';
|
|
11
12
|
|
|
12
13
|
// Layout defaults otherwise live in index.css; only per-theme values need to
|
|
@@ -40,42 +41,6 @@ const defaultConfig = {
|
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
|
|
43
|
-
function swapColorValues(colors) {
|
|
44
|
-
const swappedColors = {};
|
|
45
|
-
const keys = Object.keys(colors);
|
|
46
|
-
const length = keys.length;
|
|
47
|
-
for (let i = 0; i < length / 2; i++) {
|
|
48
|
-
const key1 = keys[i];
|
|
49
|
-
const key2 = keys[length - 1 - i];
|
|
50
|
-
swappedColors[key1] = colors[key2];
|
|
51
|
-
swappedColors[key2] = colors[key1];
|
|
52
|
-
}
|
|
53
|
-
if (length % 2 !== 0) {
|
|
54
|
-
const middleKey = keys[Math.floor(length / 2)];
|
|
55
|
-
swappedColors[middleKey] = colors[middleKey];
|
|
56
|
-
}
|
|
57
|
-
return swappedColors;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Pre-parse absolute colors once (these are known-valid hex colors)
|
|
61
|
-
const parsedBlack = parse(black);
|
|
62
|
-
const parsedWhite = parse(white);
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Get optimal contrasting color (black or white) for text on a given background.
|
|
66
|
-
* Uses WCAG contrast ratios to determine which provides better readability.
|
|
67
|
-
*/
|
|
68
|
-
function getContrastingColor(backgroundColor) {
|
|
69
|
-
const bgColor = parse(backgroundColor);
|
|
70
|
-
if (!bgColor || !parsedBlack || !parsedWhite) {
|
|
71
|
-
console.warn(`Failed to parse color: ${backgroundColor}, defaulting to white`);
|
|
72
|
-
return white;
|
|
73
|
-
}
|
|
74
|
-
const contrastWithBlack = wcagContrast(bgColor, parsedBlack);
|
|
75
|
-
const contrastWithWhite = wcagContrast(bgColor, parsedWhite);
|
|
76
|
-
return contrastWithBlack > contrastWithWhite ? black : white;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
44
|
const parsedColorsCache = {};
|
|
80
45
|
/**
|
|
81
46
|
* Parse a color value and convert it to OKLCH format.
|
|
@@ -412,7 +377,7 @@ function addTransitions(addComponents, baseSelector, transitions) {
|
|
|
412
377
|
});
|
|
413
378
|
}
|
|
414
379
|
|
|
415
|
-
const safelist = ['js-focus-visible', 'sr-only', '
|
|
380
|
+
const safelist = ['js-focus-visible', 'sr-only', 'overlay-transition--fade-enter', 'overlay-transition--fade-enter-to', 'overlay-transition--fade-leave', 'overlay-transition--fade-leave-to', 'overlay-transition--fade-enter-active', 'overlay-transition--fade-leave-active', 'overlay-transition--zoom-enter', 'overlay-transition--zoom-enter-to', 'overlay-transition--zoom-leave', 'overlay-transition--zoom-leave-to', 'overlay-transition--zoom-enter-active', 'overlay-transition--zoom-leave-active', 'overlay-transition--slide-from-left-enter', 'overlay-transition--slide-from-left-enter-to', 'overlay-transition--slide-from-left-leave', 'overlay-transition--slide-from-left-leave-to', 'overlay-transition--slide-from-left-enter-active', 'overlay-transition--slide-from-left-leave-active', 'overlay-transition--slide-from-right-enter', 'overlay-transition--slide-from-right-enter-to', 'overlay-transition--slide-from-right-leave', 'overlay-transition--slide-from-right-leave-to', 'overlay-transition--slide-from-right-enter-active', 'overlay-transition--slide-from-right-leave-active', 'overlay-transition--slide-from-top-enter', 'overlay-transition--slide-from-top-enter-to', 'overlay-transition--slide-from-top-leave', 'overlay-transition--slide-from-top-leave-to', 'overlay-transition--slide-from-top-enter-active', 'overlay-transition--slide-from-top-leave-active', 'overlay-transition--slide-from-bottom-enter', 'overlay-transition--slide-from-bottom-enter-to', 'overlay-transition--slide-from-bottom-leave', 'overlay-transition--slide-from-bottom-leave-to', 'overlay-transition--slide-from-bottom-enter-active', 'overlay-transition--slide-from-bottom-leave-active', 'overlay-transition--scale-enter', 'overlay-transition--scale-enter-to', 'overlay-transition--scale-leave', 'overlay-transition--scale-leave-to', 'overlay-transition--scale-enter-active', 'overlay-transition--scale-leave-active', 'overlay-transition--command-enter', 'overlay-transition--command-enter-to', 'overlay-transition--command-leave', 'overlay-transition--command-leave-to', 'overlay-transition--command-enter-active', 'overlay-transition--command-leave-active', 'drawer--vertical-xs', 'drawer--horizontal-xs', 'drawer--vertical-sm', 'drawer--horizontal-sm', 'drawer--vertical-md', 'drawer--horizontal-md', 'drawer--vertical-lg', 'drawer--horizontal-lg', 'drawer--vertical-xl', 'drawer--horizontal-xl', 'drawer--vertical-full', 'drawer--horizontal-full', 'modal--xs', 'modal--sm', 'modal--md', 'modal--lg', 'modal--xl', 'modal--full', 'ember-power-select-trigger', 'ember-power-select-trigger--active', 'ember-power-select-placeholder', 'ember-power-select-status-icon', 'ember-power-select-dropdown', 'ember-power-select-options', 'ember-power-select-option', 'ember-power-select-clear-btn', 'ember-power-select-search', 'ember-power-select-search-input', 'ember-power-select-search-input--active', 'ember-power-select-group', 'ember-power-select-group-name', 'ember-power-select-trigger-multiple-input', 'ember-power-select-trigger-multiple-input--active', 'ember-power-select-multiple-options', 'ember-power-select-multiple-option', 'ember-power-select-multiple-remove-btn', 'ember-power-select-trigger-sm', 'ember-power-select-trigger-lg'];
|
|
416
381
|
|
|
417
382
|
function frontile(config = {}) {
|
|
418
383
|
const c = resolveConfig(config);
|
|
@@ -433,7 +398,6 @@ function frontile(config = {}) {
|
|
|
433
398
|
resolved?.variants.forEach(variant => {
|
|
434
399
|
addVariant(variant.name, variant.definition);
|
|
435
400
|
});
|
|
436
|
-
addTransitions(addComponents, '.notification-transition', notificationTransitions);
|
|
437
401
|
addTransitions(addComponents, '.overlay-transition', overlayTransitions);
|
|
438
402
|
|
|
439
403
|
// drawer and modal sizes (using CSS variables)
|
|
@@ -469,5 +433,5 @@ const checkboxIndeterminateIcon = `<svg viewBox="0 0 16 16" fill="white" xmlns="
|
|
|
469
433
|
const radioIconLight = `<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="4" fill="white"/></svg>`;
|
|
470
434
|
const radioIconDark = `<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="4" fill="#0c0c15"/></svg>`;
|
|
471
435
|
|
|
472
|
-
export { frontile, safelist
|
|
436
|
+
export { frontile, safelist };
|
|
473
437
|
//# sourceMappingURL=plugin.js.map
|