@frontile/theme 0.18.0-alpha.17 → 0.18.0-alpha.19

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.
@@ -0,0 +1,640 @@
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
+ // Actions are in flow, deliberately, unlike the close button. The close
176
+ // button is chrome this component owns and should not dictate the band's
177
+ // height; whatever a consumer puts here is content, so a taller control
178
+ // legitimately makes the band taller.
179
+ headerActions: 'flex items-center gap-2 shrink-0',
180
+ // `touch-pan-y` (not `touch-none`) tells the browser it may still handle
181
+ // vertical panning natively -- matching `overflow-y-auto` above -- while
182
+ // continuing to deliver pointer events to `dragToDismiss` for the first
183
+ // few pixels of a touch drag. That's what lets the modifier decide
184
+ // (before the browser commits to a native scroll) whether a body press
185
+ // is a scroll or a dismiss drag; `touch-none` would suppress the native
186
+ // scroll it's supposed to fall back to, and the default `touch-auto`
187
+ // would let the browser claim the gesture for panning *and* pinch-zoom,
188
+ // which fires `pointercancel` more eagerly than plain vertical panning.
189
+ body: 'grow overflow-y-auto touch-pan-y',
190
+ footer: 'flex justify-end items-center relative gap-4',
191
+ // Sized from the design: a 40px icon box with a 16px gap to the text.
192
+ // `self-start` matches the design's `align-items: flex-start` -- the icon
193
+ // tops out with the title rather than centring across both text rows.
194
+ //
195
+ // The gap between the icon column and the text column lives here rather
196
+ // than as `gap-x-*` on the header grid. A column gap applies between the
197
+ // two tracks whether or not the icon track has anything in it, so a
198
+ // header with no icon still had its title indented past the body text
199
+ // below it. As a margin it only exists when an icon does.
200
+ icon: 'row-span-2 col-start-1 self-start mr-4 size-10 shrink-0 flex items-center justify-center',
201
+ title: 'col-start-2 font-header',
202
+ description: 'col-start-2',
203
+ 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',
204
+ dragHandleBar: 'rounded-pill'
205
+ },
206
+ variants: {
207
+ appearance: {
208
+ default: {
209
+ base: 'bg-surface-drawer text-on-surface-drawer',
210
+ body: 'bg-surface-drawer px-8 py-6',
211
+ header: 'bg-black text-white px-8 py-6',
212
+ footer: 'bg-surface-app text-on-surface-app border-t border-neutral-muted px-8 py-6',
213
+ // The close button's own `transparent` variant hovers to
214
+ // `surface-overlay-subtle` (black at 3% opacity), which is invisible
215
+ // against this band's `bg-black` (itself black in both schemes, by
216
+ // design). A fixed white tint reads against black in both light and
217
+ // dark, matching the `text-white` / `text-white/70` treatment already
218
+ // used here -- unlike `surface-lift-*`, which is white in light mode
219
+ // but black in dark mode and would vanish on this band in dark.
220
+ closeButton: 'text-white hover:bg-white/10',
221
+ headerCloseButton: 'text-white hover:bg-white/10',
222
+ icon: 'text-white',
223
+ title: 'text-header-md text-white',
224
+ description: 'text-body-sm text-white/80',
225
+ // The handle can sit over the black header band (bottom placement)
226
+ // or the surface-app footer (top placement) -- white in light mode,
227
+ // black in dark mode. `bg-neutral` (gray-500 light / gray-400 dark)
228
+ // is the one level that reads against both, plus the surface-drawer
229
+ // body a side-placement handle runs down. See the "compound variant
230
+ // vs. single semantic level" note on the `ghost` bar below -- same
231
+ // reasoning applies here.
232
+ dragHandleBar: 'bg-neutral'
233
+ },
234
+ ghost: {
235
+ base: 'bg-surface-modal text-on-surface-modal',
236
+ body: 'px-8 py-6',
237
+ // Same grid layout as `default` (left-aligned, icon column) but
238
+ // ghost's own colours -- no `bg-black`/`text-white` here, this stays
239
+ // on `surface-modal`.
240
+ header: 'font-header px-8 py-6',
241
+ footer: `${obscurer} border-t border-surface-overlay-mild bg-surface-modal px-8 py-6`,
242
+ title: 'text-header-lg',
243
+ description: 'text-sm text-neutral',
244
+ // `bg-neutral-soft` (gray-200 light / gray-700 dark) reads too faint
245
+ // against `surface-modal` (white light / gray-950 dark) -- verified
246
+ // in the browser. `bg-neutral` (gray-500 / gray-400) gives clear
247
+ // contrast against surface-modal in both placements/schemes, and
248
+ // matches the level used for the `default` appearance above, which
249
+ // a matrix of appearance x placement compound variants would not
250
+ // buy us anything over -- every surface the handle can land on
251
+ // (black header, surface-app, surface-drawer, surface-modal)
252
+ // contrasts against this one level.
253
+ dragHandleBar: 'bg-neutral'
254
+ }
255
+ },
256
+ // The close button is absolutely positioned, so it cannot reserve its own
257
+ // space -- the header pads a lane for it instead. That lane is only worth
258
+ // paying for when the button is actually rendered; with
259
+ // `@allowCloseButton={{false}}` it would be dead whitespace.
260
+ hasCloseButton: {
261
+ true: {
262
+ header: 'pr-24'
263
+ }
264
+ },
265
+ size: {
266
+ xs: '',
267
+ sm: '',
268
+ md: '',
269
+ lg: '',
270
+ xl: '',
271
+ full: ''
272
+ },
273
+ placement: {
274
+ top: 'top-2 right-2 left-2 h-full',
275
+ bottom: 'bottom-2 right-2 left-2 h-full',
276
+ left: 'top-2 bottom-2 left-2 w-full',
277
+ right: 'top-2 bottom-2 right-2 w-full'
278
+ }
279
+ },
280
+ compoundVariants: [
281
+ // vertical
282
+ {
283
+ placement: ['top', 'bottom'],
284
+ size: 'xs',
285
+ class: 'drawer--vertical-xs'
286
+ }, {
287
+ placement: ['top', 'bottom'],
288
+ size: 'sm',
289
+ class: 'drawer--vertical-sm'
290
+ }, {
291
+ placement: ['top', 'bottom'],
292
+ size: 'md',
293
+ class: 'drawer--vertical-md'
294
+ }, {
295
+ placement: ['top', 'bottom'],
296
+ size: 'lg',
297
+ class: 'drawer--vertical-lg'
298
+ }, {
299
+ placement: ['top', 'bottom'],
300
+ size: 'xl',
301
+ class: 'drawer--vertical-xl'
302
+ }, {
303
+ placement: ['top', 'bottom'],
304
+ size: 'full',
305
+ class: 'drawer--vertical-full'
306
+ },
307
+ // horizontal
308
+ {
309
+ placement: ['right', 'left'],
310
+ size: 'xs',
311
+ class: 'drawer--horizontal-xs'
312
+ }, {
313
+ placement: ['right', 'left'],
314
+ size: 'sm',
315
+ class: 'drawer--horizontal-sm'
316
+ }, {
317
+ placement: ['right', 'left'],
318
+ size: 'md',
319
+ class: 'drawer--horizontal-md'
320
+ }, {
321
+ placement: ['right', 'left'],
322
+ size: 'lg',
323
+ class: 'drawer--horizontal-lg'
324
+ }, {
325
+ placement: ['right', 'left'],
326
+ size: 'xl',
327
+ class: 'drawer--horizontal-xl'
328
+ }, {
329
+ placement: ['right', 'left'],
330
+ size: 'full',
331
+ class: 'drawer--horizontal-full'
332
+ },
333
+ // Drag handle placement: the bar sits on the edge facing the viewport
334
+ // centre, so the user grabs the side they would pull from.
335
+ {
336
+ placement: 'bottom',
337
+ class: {
338
+ dragHandle: 'top-0 left-0 right-0 h-6',
339
+ dragHandleBar: 'h-1 w-12'
340
+ }
341
+ }, {
342
+ placement: 'top',
343
+ class: {
344
+ dragHandle: 'bottom-0 left-0 right-0 h-6',
345
+ dragHandleBar: 'h-1 w-12'
346
+ }
347
+ }, {
348
+ placement: 'right',
349
+ class: {
350
+ dragHandle: 'left-0 top-0 bottom-0 w-6',
351
+ dragHandleBar: 'w-1 h-12'
352
+ }
353
+ }, {
354
+ placement: 'left',
355
+ class: {
356
+ dragHandle: 'right-0 top-0 bottom-0 w-6',
357
+ dragHandleBar: 'w-1 h-12'
358
+ }
359
+ }]
360
+ });
361
+
362
+ // One policy, spelled once: reduced motion drops the travel and keeps the
363
+ // fade. `addTransitions` derives `-leave-to` from `enter` and `-enter-to` from
364
+ // `leave`, so a state block covers two of the four generated classes.
365
+ //
366
+ // A slide is *only* travel, so it has no fade to keep -- `slideHidden` and
367
+ // `slideShown` supply one rather than leaving the drawer to appear with no
368
+ // transition at all. The `-active` blocks stay written per transition, because
369
+ // each has to override its own timing in its own spelling.
370
+ const reducedMotion = {
371
+ dropTransform: {
372
+ '@media (prefers-reduced-motion: reduce)': {
373
+ transform: 'none'
374
+ }
375
+ },
376
+ slideHidden: {
377
+ '@media (prefers-reduced-motion: reduce)': {
378
+ transform: 'none',
379
+ opacity: '0'
380
+ }
381
+ },
382
+ slideShown: {
383
+ '@media (prefers-reduced-motion: reduce)': {
384
+ opacity: '1'
385
+ }
386
+ }
387
+ };
388
+ const slideTransition = {
389
+ enterActive: {
390
+ transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)',
391
+ '@media (prefers-reduced-motion: reduce)': {
392
+ transition: 'opacity 0.2s linear'
393
+ }
394
+ },
395
+ leaveActive: {
396
+ transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)',
397
+ '@media (prefers-reduced-motion: reduce)': {
398
+ transition: 'opacity 0.2s linear'
399
+ }
400
+ }
401
+ };
402
+
403
+ /**
404
+ * The arrow shared by `Popover.Content` and `Tooltip`.
405
+ *
406
+ * A rotated square rather than a border triangle, so it can carry the
407
+ * content's own border. `bg-inherit` is the point: the arrow takes whatever
408
+ * background the content has, so intents and custom classes never have to be
409
+ * restated here. Its offset along the content's edge comes from the
410
+ * floating-ui `arrow` middleware and is written as inline `left`/`top`; the
411
+ * static side is pinned by the component from the resolved placement.
412
+ */
413
+ const overlayArrow = tv({
414
+ base: 'absolute w-2 h-2 rotate-45 bg-inherit border border-neutral-subtle pointer-events-none'
415
+ });
416
+ const overlayTransitions = {
417
+ /**
418
+ * Deliberately has no `prefers-reduced-motion` branch: a cross-fade is not
419
+ * motion. Reduced motion asks for movement to be removed, not for state
420
+ * changes to become instant, so the other transitions below drop their
421
+ * travel and keep exactly this fade.
422
+ */
423
+ fade: {
424
+ enter: {
425
+ opacity: '0'
426
+ },
427
+ enterActive: {
428
+ transition: 'opacity 0.2s linear'
429
+ },
430
+ leave: {
431
+ opacity: '1'
432
+ },
433
+ leaveActive: {
434
+ transition: 'opacity 0.2s linear'
435
+ }
436
+ },
437
+ zoom: {
438
+ enter: {
439
+ opacity: '0',
440
+ transform: 'scale(0.8)',
441
+ ...reducedMotion.dropTransform
442
+ },
443
+ enterActive: {
444
+ transition: 'all 0.2s ease-in-out',
445
+ '@media (prefers-reduced-motion: reduce)': {
446
+ transition: 'opacity 0.2s ease-in-out'
447
+ }
448
+ },
449
+ leave: {
450
+ opacity: '1',
451
+ transform: 'scale(1)'
452
+ },
453
+ leaveActive: {
454
+ transition: 'all 0.2s ease-in-out',
455
+ '@media (prefers-reduced-motion: reduce)': {
456
+ transition: 'opacity 0.2s ease-in-out'
457
+ }
458
+ }
459
+ },
460
+ slideFromLeft: {
461
+ enter: {
462
+ transform: 'translateX(-100%)',
463
+ ...reducedMotion.slideHidden
464
+ },
465
+ leave: {
466
+ transform: 'translateX(0%)',
467
+ ...reducedMotion.slideShown
468
+ },
469
+ ...slideTransition
470
+ },
471
+ slideFromRight: {
472
+ enter: {
473
+ transform: 'translateX(100%)',
474
+ ...reducedMotion.slideHidden
475
+ },
476
+ leave: {
477
+ transform: 'translateX(0%)',
478
+ ...reducedMotion.slideShown
479
+ },
480
+ ...slideTransition
481
+ },
482
+ slideFromTop: {
483
+ enter: {
484
+ transform: 'translateY(-100%)',
485
+ ...reducedMotion.slideHidden
486
+ },
487
+ leave: {
488
+ transform: 'translateY(0%)',
489
+ ...reducedMotion.slideShown
490
+ },
491
+ ...slideTransition
492
+ },
493
+ slideFromBottom: {
494
+ enter: {
495
+ transform: 'translateY(100%)',
496
+ ...reducedMotion.slideHidden
497
+ },
498
+ leave: {
499
+ transform: 'translateY(0%)',
500
+ ...reducedMotion.slideShown
501
+ },
502
+ ...slideTransition
503
+ },
504
+ /**
505
+ * Command palette: a short scale-and-rise. Deliberately faster than `scale`
506
+ * -- a palette is opened mid-task and re-opened constantly, so the animation
507
+ * has to read as instant rather than as a reveal.
508
+ */
509
+ command: {
510
+ enter: {
511
+ opacity: '0',
512
+ transform: 'scale(0.96) translateY(4px)',
513
+ // Reduced motion keeps the fade but drops the movement, rather than
514
+ // removing the transition altogether -- the palette should still read as
515
+ // appearing, just without travel.
516
+ '@media (prefers-reduced-motion: reduce)': {
517
+ transform: 'none'
518
+ }
519
+ },
520
+ enterActive: {
521
+ transitionProperty: 'transform, opacity',
522
+ transitionDuration: '150ms',
523
+ transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
524
+ '@media (prefers-reduced-motion: reduce)': {
525
+ transitionProperty: 'opacity'
526
+ }
527
+ },
528
+ enterTo: {
529
+ opacity: '1',
530
+ transform: 'scale(1) translateY(0)'
531
+ },
532
+ leave: {
533
+ opacity: '1',
534
+ transform: 'scale(1) translateY(0)'
535
+ },
536
+ leaveActive: {
537
+ transitionProperty: 'transform, opacity',
538
+ transitionDuration: '100ms',
539
+ transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
540
+ '@media (prefers-reduced-motion: reduce)': {
541
+ transitionProperty: 'opacity'
542
+ }
543
+ },
544
+ leaveTo: {
545
+ opacity: '0',
546
+ transform: 'scale(0.96) translateY(4px)',
547
+ '@media (prefers-reduced-motion: reduce)': {
548
+ transform: 'none'
549
+ }
550
+ }
551
+ },
552
+ /**
553
+ * Tooltip: a short scale-and-approach. Deliberately faster than `scale` --
554
+ * a tooltip fires on every mouse pass, so a 200ms reveal reads as lag. The
555
+ * translate is toward the anchor and the origin is set from the resolved
556
+ * placement (see the `tooltip` component's `data-placement` classes), so it
557
+ * grows out of the trigger rather than appearing in space.
558
+ */
559
+ tooltip: {
560
+ enter: {
561
+ opacity: '0',
562
+ transform: 'scale(0.95) translateY(3px)',
563
+ // Reduced motion keeps the fade and drops the travel, rather than
564
+ // removing the transition -- the tooltip should still read as appearing.
565
+ '@media (prefers-reduced-motion: reduce)': {
566
+ transform: 'none'
567
+ }
568
+ },
569
+ enterActive: {
570
+ transitionProperty: 'transform, opacity',
571
+ transitionDuration: '120ms',
572
+ transitionTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
573
+ '@media (prefers-reduced-motion: reduce)': {
574
+ transitionProperty: 'opacity'
575
+ }
576
+ },
577
+ enterTo: {
578
+ opacity: '1',
579
+ transform: 'scale(1) translateY(0)'
580
+ },
581
+ leave: {
582
+ opacity: '1',
583
+ transform: 'scale(1) translateY(0)'
584
+ },
585
+ leaveActive: {
586
+ transitionProperty: 'transform, opacity',
587
+ transitionDuration: '80ms',
588
+ transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
589
+ '@media (prefers-reduced-motion: reduce)': {
590
+ transitionProperty: 'opacity'
591
+ }
592
+ },
593
+ leaveTo: {
594
+ opacity: '0',
595
+ transform: 'scale(0.95) translateY(3px)',
596
+ '@media (prefers-reduced-motion: reduce)': {
597
+ transform: 'none'
598
+ }
599
+ }
600
+ },
601
+ scale: {
602
+ enter: {
603
+ opacity: '0',
604
+ transform: 'scale(0.95)',
605
+ ...reducedMotion.dropTransform
606
+ },
607
+ enterActive: {
608
+ transitionProperty: 'transform, opacity',
609
+ transitionDuration: '200ms',
610
+ transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)',
611
+ '@media (prefers-reduced-motion: reduce)': {
612
+ transitionProperty: 'opacity'
613
+ }
614
+ },
615
+ enterTo: {
616
+ opacity: '1',
617
+ transform: 'scale(1)'
618
+ },
619
+ leave: {
620
+ opacity: '1',
621
+ transform: 'scale(1)'
622
+ },
623
+ leaveActive: {
624
+ transitionProperty: 'transform, opacity',
625
+ transitionDuration: '100ms',
626
+ transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
627
+ '@media (prefers-reduced-motion: reduce)': {
628
+ transitionProperty: 'opacity'
629
+ }
630
+ },
631
+ leaveTo: {
632
+ opacity: '0',
633
+ transform: 'scale(0.95)',
634
+ ...reducedMotion.dropTransform
635
+ }
636
+ }
637
+ };
638
+
639
+ 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 };
640
+ //# sourceMappingURL=overlays-BjN319OW.js.map