@frontile/theme 0.18.0-alpha.9 → 0.18.0-beta.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.
Files changed (65) hide show
  1. package/README.md +3 -2
  2. package/declarations/colors/config.d.ts +10 -4
  3. package/declarations/colors/semantic.d.ts +4 -0
  4. package/declarations/colors/types.d.ts +118 -13
  5. package/declarations/colors/util.d.ts +2 -1
  6. package/declarations/colors.d.ts +1 -0
  7. package/declarations/components/accordion.d.ts +308 -0
  8. package/declarations/components/alert.d.ts +294 -0
  9. package/declarations/components/avatar.d.ts +9 -7
  10. package/declarations/components/button.d.ts +118 -48
  11. package/declarations/components/calendar.d.ts +382 -0
  12. package/declarations/components/chip.d.ts +79 -42
  13. package/declarations/components/close-button.d.ts +9 -7
  14. package/declarations/components/command.d.ts +281 -0
  15. package/declarations/components/divider.d.ts +9 -7
  16. package/declarations/components/dropdown.d.ts +11 -9
  17. package/declarations/components/external-link.d.ts +160 -0
  18. package/declarations/components/forms/forms-legacy.d.ts +108 -84
  19. package/declarations/components/forms/forms.d.ts +652 -162
  20. package/declarations/components/index.d.ts +11 -0
  21. package/declarations/components/kbd.d.ts +315 -0
  22. package/declarations/components/listbox.d.ts +122 -23
  23. package/declarations/components/notification-card.d.ts +182 -111
  24. package/declarations/components/notifications-container.d.ts +111 -40
  25. package/declarations/components/overlays.d.ts +429 -29
  26. package/declarations/components/pagination.d.ts +359 -0
  27. package/declarations/components/popover.d.ts +11 -9
  28. package/declarations/components/progress-bar.d.ts +29 -12
  29. package/declarations/components/segmented-control.d.ts +463 -0
  30. package/declarations/components/shared.d.ts +9 -0
  31. package/declarations/components/skeleton.d.ts +151 -0
  32. package/declarations/components/spinner.d.ts +19 -12
  33. package/declarations/components/table.d.ts +17 -9
  34. package/declarations/components/tabs.d.ts +463 -0
  35. package/declarations/components/tooltip.d.ts +270 -0
  36. package/declarations/plugin/default-config.d.ts +10 -4
  37. package/declarations/tw.d.ts +9 -7
  38. package/declarations/types.d.ts +18 -1
  39. package/dist/colors.js +2 -1
  40. package/dist/colors.js.map +1 -1
  41. package/dist/index.js +3824 -5
  42. package/dist/index.js.map +1 -1
  43. package/dist/overlays-DIZlPzFH.js +654 -0
  44. package/dist/overlays-DIZlPzFH.js.map +1 -0
  45. package/dist/plugin.js +54 -83
  46. package/dist/plugin.js.map +1 -1
  47. package/dist/util-Dp_dlOPq.js +482 -0
  48. package/dist/util-Dp_dlOPq.js.map +1 -0
  49. package/package.json +12 -12
  50. package/src/index.css +64 -15
  51. package/src/styles/font-faces.css +23 -5
  52. package/src/styles/theme.css +18 -7
  53. package/src/styles/typography.css +36 -29
  54. package/declarations/colors/contrast.d.ts +0 -16
  55. package/declarations/colors/defaults.d.ts +0 -66
  56. package/declarations/colors/palette-dark.d.ts +0 -123
  57. package/declarations/colors/palette-light.d.ts +0 -123
  58. package/dist/config-CDp8PRHs.js +0 -370
  59. package/dist/config-CDp8PRHs.js.map +0 -1
  60. package/dist/forms-legacy-CgoY8bbm.js +0 -1967
  61. package/dist/forms-legacy-CgoY8bbm.js.map +0 -1
  62. package/dist/index.css +0 -63
  63. package/dist/styles/font-faces.css +0 -70
  64. package/dist/styles/theme.css +0 -48
  65. package/dist/styles/typography.css +0 -387
@@ -0,0 +1,654 @@
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 rounded-2xl outline-hidden overflow-clip border border-neutral-muted shadow-elevation-5',
143
+ closeButton: 'absolute top-3 right-3',
144
+ // The close button rendered *inside* the header (see `drawer.gts`) is
145
+ // absolutely positioned rather than placed as a grid item. Making it a
146
+ // grid item was tried and reverted: as a spanning item it forces the
147
+ // header's row track count up, so a header with only a title grew a
148
+ // phantom second row and the band became far taller than its content.
149
+ // Out of flow, it centres against whatever height the header's own
150
+ // content produces -- title-only or title + description alike -- and
151
+ // contributes nothing to that height. The header reserves space for it
152
+ // with right padding instead, since an out-of-flow element cannot push
153
+ // the text out of its own way.
154
+ //
155
+ // `right-5` rather than `right-8` is optical alignment, not a mistake.
156
+ // The button's hit area is its icon plus 12px of padding on each side --
157
+ // padding that exists for the hover and focus rings, and that is
158
+ // invisible at rest. Pinning the button's *box* to the header's 32px
159
+ // padding would leave the visible glyph sitting 12px further in than the
160
+ // body text below it. Offsetting by that padding (32 - 12 = 20px) lines
161
+ // the glyph's edge up with the content instead of the box's.
162
+ headerCloseButton: 'absolute top-1/2 right-5 -translate-y-1/2 shrink-0',
163
+ // The header is a flex row of two regions, not a grid: the grid lives one
164
+ // level down in `headerContent`. Consumer actions have to be able to sit
165
+ // beside the close button and be centred against a header that may be one
166
+ // or two text rows tall, and a grid item that spans both rows forces the
167
+ // row track count up -- which is what previously made a title-only header
168
+ // grow a phantom second row. As a flex sibling there are no row tracks to
169
+ // inflate.
170
+ header: 'relative flex items-center gap-4',
171
+ // `min-w-0` lets a long title shrink (and truncate, if the consumer asks
172
+ // for it) instead of shoving the actions past the edge -- a flex item's
173
+ // default `min-width: auto` refuses to shrink below its content.
174
+ headerContent: ['grid grid-cols-[auto_1fr] items-center grow min-w-0',
175
+ // The icon only spans two rows when there are two rows of text to span.
176
+ // A spanning grid item's height is distributed across every track it
177
+ // covers, so a 40px icon spanning rows in a header with only a title
178
+ // pushed half its height into a phantom second row: the title (and the
179
+ // close button, centred against the band) ended up ~10px above the
180
+ // band's centre with dead space underneath. Keyed off the description
181
+ // element's own presence with `:has()` -- the same trick `pagination.ts`
182
+ // and `table.ts` use -- so it follows the rendered structure rather than
183
+ // a variant the header has to compute and thread through, and it holds
184
+ // for `@description` and a yielded `<h.Description />` alike.
185
+ '[&:has([data-drawer-header-description])_[data-drawer-header-icon]]:row-span-2', '[&:has([data-drawer-header-description])_[data-drawer-header-icon]]:self-start'],
186
+ // Actions are in flow, deliberately, unlike the close button. The close
187
+ // button is chrome this component owns and should not dictate the band's
188
+ // height; whatever a consumer puts here is content, so a taller control
189
+ // legitimately makes the band taller.
190
+ headerActions: 'flex items-center gap-2 shrink-0',
191
+ // `touch-pan-y` (not `touch-none`) tells the browser it may still handle
192
+ // vertical panning natively -- matching `overflow-y-auto` above -- while
193
+ // continuing to deliver pointer events to `dragToDismiss` for the first
194
+ // few pixels of a touch drag. That's what lets the modifier decide
195
+ // (before the browser commits to a native scroll) whether a body press
196
+ // is a scroll or a dismiss drag; `touch-none` would suppress the native
197
+ // scroll it's supposed to fall back to, and the default `touch-auto`
198
+ // would let the browser claim the gesture for panning *and* pinch-zoom,
199
+ // which fires `pointercancel` more eagerly than plain vertical panning.
200
+ body: 'grow overflow-y-auto touch-pan-y',
201
+ footer: 'flex justify-end items-center relative gap-4',
202
+ // Sized from the design: a 40px icon box with a 16px gap to the text.
203
+ //
204
+ // With a title and a description the icon tops out with the title rather
205
+ // than centring across both text rows, matching the design's
206
+ // `align-items: flex-start`; that pairing lives on `headerContent`, which
207
+ // can see whether a description exists. Title-only, it centres.
208
+ //
209
+ // The gap between the icon column and the text column lives here rather
210
+ // than as `gap-x-*` on the header grid. A column gap applies between the
211
+ // two tracks whether or not the icon track has anything in it, so a
212
+ // header with no icon still had its title indented past the body text
213
+ // below it. As a margin it only exists when an icon does.
214
+ icon: 'col-start-1 self-center mr-4 size-10 shrink-0 flex items-center justify-center',
215
+ title: 'col-start-2 font-header',
216
+ description: 'col-start-2',
217
+ dragHandle: 'absolute z-10 flex items-center justify-center touch-none cursor-grab active:cursor-grabbing focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary',
218
+ dragHandleBar: 'rounded-pill'
219
+ },
220
+ variants: {
221
+ appearance: {
222
+ default: {
223
+ base: 'bg-surface-drawer text-on-surface-drawer',
224
+ body: 'bg-surface-drawer px-8 py-6',
225
+ header: 'bg-black text-white px-8 py-6',
226
+ footer: 'bg-surface-app text-on-surface-app border-t border-neutral-muted px-8 py-6',
227
+ // The close button's own `transparent` variant hovers to
228
+ // `surface-overlay-subtle` (black at 3% opacity), which is invisible
229
+ // against this band's `bg-black` (itself black in both schemes, by
230
+ // design). A fixed white tint reads against black in both light and
231
+ // dark, matching the `text-white` / `text-white/70` treatment already
232
+ // used here -- unlike `surface-lift-*`, which is white in light mode
233
+ // but black in dark mode and would vanish on this band in dark.
234
+ closeButton: 'text-white hover:bg-white/10',
235
+ headerCloseButton: 'text-white hover:bg-white/10',
236
+ icon: 'text-white',
237
+ title: 'text-header-md text-white',
238
+ description: 'text-body-sm text-white/80',
239
+ // The handle can sit over the black header band (bottom placement)
240
+ // or the surface-app footer (top placement) -- white in light mode,
241
+ // black in dark mode. `bg-neutral` (gray-500 light / gray-400 dark)
242
+ // is the one level that reads against both, plus the surface-drawer
243
+ // body a side-placement handle runs down. See the "compound variant
244
+ // vs. single semantic level" note on the `ghost` bar below -- same
245
+ // reasoning applies here.
246
+ dragHandleBar: 'bg-neutral'
247
+ },
248
+ ghost: {
249
+ base: 'bg-surface-modal text-on-surface-modal',
250
+ body: 'px-8 py-6',
251
+ // Same grid layout as `default` (left-aligned, icon column) but
252
+ // ghost's own colours -- no `bg-black`/`text-white` here, this stays
253
+ // on `surface-modal`.
254
+ header: 'font-header px-8 py-6',
255
+ footer: `${obscurer} border-t border-surface-overlay-mild bg-surface-modal px-8 py-6`,
256
+ title: 'text-header-lg',
257
+ description: 'text-sm text-neutral',
258
+ // `bg-neutral-soft` (gray-200 light / gray-700 dark) reads too faint
259
+ // against `surface-modal` (white light / gray-950 dark) -- verified
260
+ // in the browser. `bg-neutral` (gray-500 / gray-400) gives clear
261
+ // contrast against surface-modal in both placements/schemes, and
262
+ // matches the level used for the `default` appearance above, which
263
+ // a matrix of appearance x placement compound variants would not
264
+ // buy us anything over -- every surface the handle can land on
265
+ // (black header, surface-app, surface-drawer, surface-modal)
266
+ // contrasts against this one level.
267
+ dragHandleBar: 'bg-neutral'
268
+ }
269
+ },
270
+ // The close button is absolutely positioned, so it cannot reserve its own
271
+ // space -- the header pads a lane for it instead. That lane is only worth
272
+ // paying for when the button is actually rendered; with
273
+ // `@allowCloseButton={{false}}` it would be dead whitespace.
274
+ hasCloseButton: {
275
+ true: {
276
+ header: 'pr-24'
277
+ }
278
+ },
279
+ size: {
280
+ xs: '',
281
+ sm: '',
282
+ md: '',
283
+ lg: '',
284
+ xl: '',
285
+ full: ''
286
+ },
287
+ placement: {
288
+ top: 'top-2 right-2 left-2 h-full',
289
+ bottom: 'bottom-2 right-2 left-2 h-full',
290
+ left: 'top-2 bottom-2 left-2 w-full',
291
+ right: 'top-2 bottom-2 right-2 w-full'
292
+ }
293
+ },
294
+ compoundVariants: [
295
+ // vertical
296
+ {
297
+ placement: ['top', 'bottom'],
298
+ size: 'xs',
299
+ class: 'drawer--vertical-xs'
300
+ }, {
301
+ placement: ['top', 'bottom'],
302
+ size: 'sm',
303
+ class: 'drawer--vertical-sm'
304
+ }, {
305
+ placement: ['top', 'bottom'],
306
+ size: 'md',
307
+ class: 'drawer--vertical-md'
308
+ }, {
309
+ placement: ['top', 'bottom'],
310
+ size: 'lg',
311
+ class: 'drawer--vertical-lg'
312
+ }, {
313
+ placement: ['top', 'bottom'],
314
+ size: 'xl',
315
+ class: 'drawer--vertical-xl'
316
+ }, {
317
+ placement: ['top', 'bottom'],
318
+ size: 'full',
319
+ class: 'drawer--vertical-full'
320
+ },
321
+ // horizontal
322
+ {
323
+ placement: ['right', 'left'],
324
+ size: 'xs',
325
+ class: 'drawer--horizontal-xs'
326
+ }, {
327
+ placement: ['right', 'left'],
328
+ size: 'sm',
329
+ class: 'drawer--horizontal-sm'
330
+ }, {
331
+ placement: ['right', 'left'],
332
+ size: 'md',
333
+ class: 'drawer--horizontal-md'
334
+ }, {
335
+ placement: ['right', 'left'],
336
+ size: 'lg',
337
+ class: 'drawer--horizontal-lg'
338
+ }, {
339
+ placement: ['right', 'left'],
340
+ size: 'xl',
341
+ class: 'drawer--horizontal-xl'
342
+ }, {
343
+ placement: ['right', 'left'],
344
+ size: 'full',
345
+ class: 'drawer--horizontal-full'
346
+ },
347
+ // Drag handle placement: the bar sits on the edge facing the viewport
348
+ // centre, so the user grabs the side they would pull from.
349
+ {
350
+ placement: 'bottom',
351
+ class: {
352
+ dragHandle: 'top-0 left-0 right-0 h-6',
353
+ dragHandleBar: 'h-1 w-12'
354
+ }
355
+ }, {
356
+ placement: 'top',
357
+ class: {
358
+ dragHandle: 'bottom-0 left-0 right-0 h-6',
359
+ dragHandleBar: 'h-1 w-12'
360
+ }
361
+ }, {
362
+ placement: 'right',
363
+ class: {
364
+ dragHandle: 'left-0 top-0 bottom-0 w-6',
365
+ dragHandleBar: 'w-1 h-12'
366
+ }
367
+ }, {
368
+ placement: 'left',
369
+ class: {
370
+ dragHandle: 'right-0 top-0 bottom-0 w-6',
371
+ dragHandleBar: 'w-1 h-12'
372
+ }
373
+ }]
374
+ });
375
+
376
+ // One policy, spelled once: reduced motion drops the travel and keeps the
377
+ // fade. `addTransitions` derives `-leave-to` from `enter` and `-enter-to` from
378
+ // `leave`, so a state block covers two of the four generated classes.
379
+ //
380
+ // A slide is *only* travel, so it has no fade to keep -- `slideHidden` and
381
+ // `slideShown` supply one rather than leaving the drawer to appear with no
382
+ // transition at all. The `-active` blocks stay written per transition, because
383
+ // each has to override its own timing in its own spelling.
384
+ const reducedMotion = {
385
+ dropTransform: {
386
+ '@media (prefers-reduced-motion: reduce)': {
387
+ transform: 'none'
388
+ }
389
+ },
390
+ slideHidden: {
391
+ '@media (prefers-reduced-motion: reduce)': {
392
+ transform: 'none',
393
+ opacity: '0'
394
+ }
395
+ },
396
+ slideShown: {
397
+ '@media (prefers-reduced-motion: reduce)': {
398
+ opacity: '1'
399
+ }
400
+ }
401
+ };
402
+ const slideTransition = {
403
+ enterActive: {
404
+ transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)',
405
+ '@media (prefers-reduced-motion: reduce)': {
406
+ transition: 'opacity 0.2s linear'
407
+ }
408
+ },
409
+ leaveActive: {
410
+ transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)',
411
+ '@media (prefers-reduced-motion: reduce)': {
412
+ transition: 'opacity 0.2s linear'
413
+ }
414
+ }
415
+ };
416
+
417
+ /**
418
+ * The arrow shared by `Popover.Content` and `Tooltip`.
419
+ *
420
+ * A rotated square rather than a border triangle, so it can carry the
421
+ * content's own border. `bg-inherit` is the point: the arrow takes whatever
422
+ * background the content has, so intents and custom classes never have to be
423
+ * restated here. Its offset along the content's edge comes from the
424
+ * floating-ui `arrow` middleware and is written as inline `left`/`top`; the
425
+ * static side is pinned by the component from the resolved placement.
426
+ */
427
+ const overlayArrow = tv({
428
+ base: 'absolute w-2 h-2 rotate-45 bg-inherit border border-neutral-subtle pointer-events-none'
429
+ });
430
+ const overlayTransitions = {
431
+ /**
432
+ * Deliberately has no `prefers-reduced-motion` branch: a cross-fade is not
433
+ * motion. Reduced motion asks for movement to be removed, not for state
434
+ * changes to become instant, so the other transitions below drop their
435
+ * travel and keep exactly this fade.
436
+ */
437
+ fade: {
438
+ enter: {
439
+ opacity: '0'
440
+ },
441
+ enterActive: {
442
+ transition: 'opacity 0.2s linear'
443
+ },
444
+ leave: {
445
+ opacity: '1'
446
+ },
447
+ leaveActive: {
448
+ transition: 'opacity 0.2s linear'
449
+ }
450
+ },
451
+ zoom: {
452
+ enter: {
453
+ opacity: '0',
454
+ transform: 'scale(0.8)',
455
+ ...reducedMotion.dropTransform
456
+ },
457
+ enterActive: {
458
+ transition: 'all 0.2s ease-in-out',
459
+ '@media (prefers-reduced-motion: reduce)': {
460
+ transition: 'opacity 0.2s ease-in-out'
461
+ }
462
+ },
463
+ leave: {
464
+ opacity: '1',
465
+ transform: 'scale(1)'
466
+ },
467
+ leaveActive: {
468
+ transition: 'all 0.2s ease-in-out',
469
+ '@media (prefers-reduced-motion: reduce)': {
470
+ transition: 'opacity 0.2s ease-in-out'
471
+ }
472
+ }
473
+ },
474
+ slideFromLeft: {
475
+ enter: {
476
+ transform: 'translateX(-100%)',
477
+ ...reducedMotion.slideHidden
478
+ },
479
+ leave: {
480
+ transform: 'translateX(0%)',
481
+ ...reducedMotion.slideShown
482
+ },
483
+ ...slideTransition
484
+ },
485
+ slideFromRight: {
486
+ enter: {
487
+ transform: 'translateX(100%)',
488
+ ...reducedMotion.slideHidden
489
+ },
490
+ leave: {
491
+ transform: 'translateX(0%)',
492
+ ...reducedMotion.slideShown
493
+ },
494
+ ...slideTransition
495
+ },
496
+ slideFromTop: {
497
+ enter: {
498
+ transform: 'translateY(-100%)',
499
+ ...reducedMotion.slideHidden
500
+ },
501
+ leave: {
502
+ transform: 'translateY(0%)',
503
+ ...reducedMotion.slideShown
504
+ },
505
+ ...slideTransition
506
+ },
507
+ slideFromBottom: {
508
+ enter: {
509
+ transform: 'translateY(100%)',
510
+ ...reducedMotion.slideHidden
511
+ },
512
+ leave: {
513
+ transform: 'translateY(0%)',
514
+ ...reducedMotion.slideShown
515
+ },
516
+ ...slideTransition
517
+ },
518
+ /**
519
+ * Command palette: a short scale-and-rise. Deliberately faster than `scale`
520
+ * -- a palette is opened mid-task and re-opened constantly, so the animation
521
+ * has to read as instant rather than as a reveal.
522
+ */
523
+ command: {
524
+ enter: {
525
+ opacity: '0',
526
+ transform: 'scale(0.96) translateY(4px)',
527
+ // Reduced motion keeps the fade but drops the movement, rather than
528
+ // removing the transition altogether -- the palette should still read as
529
+ // appearing, just without travel.
530
+ '@media (prefers-reduced-motion: reduce)': {
531
+ transform: 'none'
532
+ }
533
+ },
534
+ enterActive: {
535
+ transitionProperty: 'transform, opacity',
536
+ transitionDuration: '150ms',
537
+ transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
538
+ '@media (prefers-reduced-motion: reduce)': {
539
+ transitionProperty: 'opacity'
540
+ }
541
+ },
542
+ enterTo: {
543
+ opacity: '1',
544
+ transform: 'scale(1) translateY(0)'
545
+ },
546
+ leave: {
547
+ opacity: '1',
548
+ transform: 'scale(1) translateY(0)'
549
+ },
550
+ leaveActive: {
551
+ transitionProperty: 'transform, opacity',
552
+ transitionDuration: '100ms',
553
+ transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
554
+ '@media (prefers-reduced-motion: reduce)': {
555
+ transitionProperty: 'opacity'
556
+ }
557
+ },
558
+ leaveTo: {
559
+ opacity: '0',
560
+ transform: 'scale(0.96) translateY(4px)',
561
+ '@media (prefers-reduced-motion: reduce)': {
562
+ transform: 'none'
563
+ }
564
+ }
565
+ },
566
+ /**
567
+ * Tooltip: a short scale-and-approach. Deliberately faster than `scale` --
568
+ * a tooltip fires on every mouse pass, so a 200ms reveal reads as lag. The
569
+ * translate is toward the anchor and the origin is set from the resolved
570
+ * placement (see the `tooltip` component's `data-placement` classes), so it
571
+ * grows out of the trigger rather than appearing in space.
572
+ */
573
+ tooltip: {
574
+ enter: {
575
+ opacity: '0',
576
+ transform: 'scale(0.95) translateY(3px)',
577
+ // Reduced motion keeps the fade and drops the travel, rather than
578
+ // removing the transition -- the tooltip should still read as appearing.
579
+ '@media (prefers-reduced-motion: reduce)': {
580
+ transform: 'none'
581
+ }
582
+ },
583
+ enterActive: {
584
+ transitionProperty: 'transform, opacity',
585
+ transitionDuration: '120ms',
586
+ transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
587
+ '@media (prefers-reduced-motion: reduce)': {
588
+ transitionProperty: 'opacity'
589
+ }
590
+ },
591
+ enterTo: {
592
+ opacity: '1',
593
+ transform: 'scale(1) translateY(0)'
594
+ },
595
+ leave: {
596
+ opacity: '1',
597
+ transform: 'scale(1) translateY(0)'
598
+ },
599
+ leaveActive: {
600
+ transitionProperty: 'transform, opacity',
601
+ transitionDuration: '80ms',
602
+ transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
603
+ '@media (prefers-reduced-motion: reduce)': {
604
+ transitionProperty: 'opacity'
605
+ }
606
+ },
607
+ leaveTo: {
608
+ opacity: '0',
609
+ transform: 'scale(0.95) translateY(3px)',
610
+ '@media (prefers-reduced-motion: reduce)': {
611
+ transform: 'none'
612
+ }
613
+ }
614
+ },
615
+ scale: {
616
+ enter: {
617
+ opacity: '0',
618
+ transform: 'scale(0.95)',
619
+ ...reducedMotion.dropTransform
620
+ },
621
+ enterActive: {
622
+ transitionProperty: 'transform, opacity',
623
+ transitionDuration: '200ms',
624
+ transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)',
625
+ '@media (prefers-reduced-motion: reduce)': {
626
+ transitionProperty: 'opacity'
627
+ }
628
+ },
629
+ enterTo: {
630
+ opacity: '1',
631
+ transform: 'scale(1)'
632
+ },
633
+ leave: {
634
+ opacity: '1',
635
+ transform: 'scale(1)'
636
+ },
637
+ leaveActive: {
638
+ transitionProperty: 'transform, opacity',
639
+ transitionDuration: '100ms',
640
+ transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
641
+ '@media (prefers-reduced-motion: reduce)': {
642
+ transitionProperty: 'opacity'
643
+ }
644
+ },
645
+ leaveTo: {
646
+ opacity: '0',
647
+ transform: 'scale(0.95)',
648
+ ...reducedMotion.dropTransform
649
+ }
650
+ }
651
+ };
652
+
653
+ export { overlayArrow as a, backdrop as b, overlayTransitions as c, drawer as d, twMerge as e, modal as m, overlay as o, tv as t };
654
+ //# sourceMappingURL=overlays-DIZlPzFH.js.map