@omerdlw/base-framework 3.0.0 → 3.1.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.
- package/dist/atoms/icon.d.ts.map +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/spinner.d.ts.map +1 -1
- package/dist/atoms/tooltip.d.ts.map +1 -1
- package/dist/{chunk-7HQMXTNP.js → chunk-6UFMD6TK.js} +5 -5
- package/dist/{chunk-7HQMXTNP.js.map → chunk-6UFMD6TK.js.map} +1 -1
- package/dist/{chunk-CGHZSSFR.js → chunk-AA2TWJQI.js} +35 -15
- package/dist/chunk-AA2TWJQI.js.map +1 -0
- package/dist/{chunk-CYU6SGAL.js → chunk-ACLLDU3J.js} +7 -7
- package/dist/chunk-ACLLDU3J.js.map +1 -0
- package/dist/{chunk-TG6NMHXI.js → chunk-E6ANX5YP.js} +89 -34
- package/dist/chunk-E6ANX5YP.js.map +1 -0
- package/dist/{chunk-R2YGFJDJ.js → chunk-GDCVEINL.js} +4 -4
- package/dist/chunk-GDCVEINL.js.map +1 -0
- package/dist/chunk-GN666KV5.js +28 -0
- package/dist/{chunk-M57SNWXK.js.map → chunk-GN666KV5.js.map} +1 -1
- package/dist/{chunk-TV3WEF5G.js → chunk-HCSDQEFB.js} +80 -19
- package/dist/chunk-HCSDQEFB.js.map +1 -0
- package/dist/{chunk-GF7TUX5I.js → chunk-HMEWYAWU.js} +3 -3
- package/dist/{chunk-GF7TUX5I.js.map → chunk-HMEWYAWU.js.map} +1 -1
- package/dist/{chunk-3BUP64Q6.js → chunk-I3IZUBBU.js} +3 -11
- package/dist/chunk-I3IZUBBU.js.map +1 -0
- package/dist/{chunk-RFZQWLC5.js → chunk-JCZUCKI3.js} +2 -2
- package/dist/chunk-JCZUCKI3.js.map +1 -0
- package/dist/{chunk-FIMPHODX.js → chunk-MAGYFVKH.js} +6 -6
- package/dist/chunk-MAGYFVKH.js.map +1 -0
- package/dist/{chunk-SYAVGTOX.js → chunk-NEBGCFE3.js} +5 -5
- package/dist/chunk-NEBGCFE3.js.map +1 -0
- package/dist/{chunk-66EYJBIP.js → chunk-NK2DQB3G.js} +14 -8
- package/dist/chunk-NK2DQB3G.js.map +1 -0
- package/dist/{chunk-4GMQKD6F.js → chunk-QM2P6TIU.js} +5 -5
- package/dist/{chunk-4GMQKD6F.js.map → chunk-QM2P6TIU.js.map} +1 -1
- package/dist/{chunk-HHWRTQKQ.js → chunk-RFP2DJAB.js} +76 -28
- package/dist/chunk-RFP2DJAB.js.map +1 -0
- package/dist/{chunk-HLL5EHXC.js → chunk-SQ7XZMCN.js} +3 -7
- package/dist/chunk-SQ7XZMCN.js.map +1 -0
- package/dist/{chunk-7TAVYJ3A.js → chunk-TMTMQNEQ.js} +5 -4
- package/dist/chunk-TMTMQNEQ.js.map +1 -0
- package/dist/{chunk-JIXBFFRD.js → chunk-VDNE3A7X.js} +127 -144
- package/dist/chunk-VDNE3A7X.js.map +1 -0
- package/dist/{chunk-RIOKLMYM.js → chunk-XATRMFGU.js} +7 -13
- package/dist/chunk-XATRMFGU.js.map +1 -0
- package/dist/{chunk-JELG4JLT.js → chunk-ZAP2YHZG.js} +5 -5
- package/dist/{chunk-JELG4JLT.js.map → chunk-ZAP2YHZG.js.map} +1 -1
- package/dist/{chunk-AQ4BNXA2.js → chunk-ZH5FUYPG.js} +7 -7
- package/dist/chunk-ZH5FUYPG.js.map +1 -0
- package/dist/{chunk-K676GL7Z.js → chunk-ZKM4RETZ.js} +5 -5
- package/dist/chunk-ZKM4RETZ.js.map +1 -0
- package/dist/error/index.js +5 -5
- package/dist/error/reporter.d.ts.map +1 -1
- package/dist/events.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-scroll-lock.d.ts +3 -0
- package/dist/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/index.js +19 -19
- package/dist/kernel/handlers.d.ts.map +1 -1
- package/dist/kernel/index.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/installed.d.ts.map +1 -1
- package/dist/kernel/provider.d.ts.map +1 -1
- package/dist/kernel/store.d.ts.map +1 -1
- package/dist/modules/ambient/analyze.d.ts +1 -33
- package/dist/modules/ambient/analyze.d.ts.map +1 -1
- package/dist/modules/ambient/dom.d.ts +0 -12
- package/dist/modules/ambient/dom.d.ts.map +1 -1
- package/dist/modules/ambient/extractor.d.ts +0 -8
- package/dist/modules/ambient/extractor.d.ts.map +1 -1
- package/dist/modules/ambient/hooks.d.ts.map +1 -1
- package/dist/modules/ambient/index.d.ts +2 -2
- package/dist/modules/ambient/index.d.ts.map +1 -1
- package/dist/modules/ambient/index.js +7 -7
- package/dist/modules/ambient/module.d.ts.map +1 -1
- package/dist/modules/ambient/oklab.d.ts +0 -19
- package/dist/modules/ambient/oklab.d.ts.map +1 -1
- package/dist/modules/ambient/pipeline.d.ts +0 -7
- package/dist/modules/ambient/pipeline.d.ts.map +1 -1
- package/dist/modules/ambient/quantize.d.ts +0 -11
- package/dist/modules/ambient/quantize.d.ts.map +1 -1
- package/dist/modules/ambient/server/address.d.ts +0 -3
- package/dist/modules/ambient/server/address.d.ts.map +1 -1
- package/dist/modules/ambient/server/index.d.ts +0 -27
- package/dist/modules/ambient/server/index.d.ts.map +1 -1
- package/dist/modules/ambient/server/index.js +21 -17
- package/dist/modules/ambient/server/index.js.map +1 -1
- package/dist/modules/ambient/settings.d.ts +0 -6
- package/dist/modules/ambient/settings.d.ts.map +1 -1
- package/dist/modules/ambient/types.d.ts +0 -37
- package/dist/modules/ambient/types.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.d.ts +0 -1
- package/dist/modules/ambient/worker/index.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.js +11 -3
- package/dist/modules/ambient/worker/index.js.map +1 -1
- package/dist/modules/background/context.d.ts.map +1 -1
- package/dist/modules/background/hooks.d.ts.map +1 -1
- package/dist/modules/background/index.d.ts +1 -1
- package/dist/modules/background/index.d.ts.map +1 -1
- package/dist/modules/background/index.js +6 -6
- package/dist/modules/background/module.d.ts.map +1 -1
- package/dist/modules/background/motion.d.ts.map +1 -1
- package/dist/modules/background/overlay.d.ts.map +1 -1
- package/dist/modules/background/state.d.ts.map +1 -1
- package/dist/modules/background/types.d.ts +0 -7
- package/dist/modules/background/types.d.ts.map +1 -1
- package/dist/modules/background/visual.d.ts.map +1 -1
- package/dist/modules/background/youtube/player.d.ts.map +1 -1
- package/dist/modules/context-menu/context.d.ts.map +1 -1
- package/dist/modules/context-menu/index.d.ts +1 -1
- package/dist/modules/context-menu/index.d.ts.map +1 -1
- package/dist/modules/context-menu/index.js +10 -10
- package/dist/modules/context-menu/module.d.ts.map +1 -1
- package/dist/modules/context-menu/types.d.ts +0 -6
- package/dist/modules/context-menu/types.d.ts.map +1 -1
- package/dist/modules/controls/hooks.d.ts.map +1 -1
- package/dist/modules/controls/index.js +4 -4
- package/dist/modules/controls/module.d.ts.map +1 -1
- package/dist/modules/dock/cards.d.ts +3 -3
- package/dist/modules/dock/cards.d.ts.map +1 -1
- package/dist/modules/dock/constants.d.ts +0 -15
- package/dist/modules/dock/constants.d.ts.map +1 -1
- package/dist/modules/dock/context.d.ts.map +1 -1
- package/dist/modules/dock/dom.d.ts.map +1 -1
- package/dist/modules/dock/helpers.d.ts.map +1 -1
- package/dist/modules/dock/index.js +9 -9
- package/dist/modules/dock/layout.d.ts.map +1 -1
- package/dist/modules/dock/module.d.ts.map +1 -1
- package/dist/modules/dock/motion.d.ts +5 -9
- package/dist/modules/dock/motion.d.ts.map +1 -1
- package/dist/modules/dock/overlay.d.ts.map +1 -1
- package/dist/modules/dock/routing/navigation.d.ts +0 -1
- package/dist/modules/dock/routing/navigation.d.ts.map +1 -1
- package/dist/modules/dock/runtime/display.d.ts +0 -6
- package/dist/modules/dock/runtime/display.d.ts.map +1 -1
- package/dist/modules/dock/runtime/dock.d.ts +0 -1
- package/dist/modules/dock/runtime/dock.d.ts.map +1 -1
- package/dist/modules/dock/runtime/pipeline.d.ts.map +1 -1
- package/dist/modules/dock/status/events.d.ts.map +1 -1
- package/dist/modules/dock/styles.d.ts +3 -3
- package/dist/modules/dock/styles.d.ts.map +1 -1
- package/dist/modules/dock/surface/context.d.ts.map +1 -1
- package/dist/modules/dock/surface/definition.d.ts.map +1 -1
- package/dist/modules/dock/surface/hooks.d.ts.map +1 -1
- package/dist/modules/dock/surface/machine.d.ts.map +1 -1
- package/dist/modules/dock/surface/stack.d.ts.map +1 -1
- package/dist/modules/dock/surface/view-model.d.ts.map +1 -1
- package/dist/modules/dock/types.d.ts +47 -68
- package/dist/modules/dock/types.d.ts.map +1 -1
- package/dist/modules/index.js +17 -17
- package/dist/modules/loading/constants.d.ts.map +1 -1
- package/dist/modules/loading/context.d.ts.map +1 -1
- package/dist/modules/loading/hooks.d.ts.map +1 -1
- package/dist/modules/loading/index.d.ts +1 -1
- package/dist/modules/loading/index.d.ts.map +1 -1
- package/dist/modules/loading/index.js +5 -5
- package/dist/modules/loading/module.d.ts.map +1 -1
- package/dist/modules/media/constants.d.ts.map +1 -1
- package/dist/modules/media/context.d.ts.map +1 -1
- package/dist/modules/media/index.d.ts +1 -1
- package/dist/modules/media/index.d.ts.map +1 -1
- package/dist/modules/media/index.js +3 -3
- package/dist/modules/modal/dom.d.ts.map +1 -1
- package/dist/modules/modal/index.d.ts +2 -2
- package/dist/modules/modal/index.d.ts.map +1 -1
- package/dist/modules/modal/index.js +7 -7
- package/dist/modules/modal/module.d.ts.map +1 -1
- package/dist/modules/modal/overlay.d.ts.map +1 -1
- package/dist/modules/modal/types.d.ts +0 -9
- package/dist/modules/modal/types.d.ts.map +1 -1
- package/dist/modules/navigation/constants.d.ts +0 -4
- package/dist/modules/navigation/constants.d.ts.map +1 -1
- package/dist/modules/navigation/context.d.ts +0 -1
- package/dist/modules/navigation/context.d.ts.map +1 -1
- package/dist/modules/navigation/hooks.d.ts +0 -18
- package/dist/modules/navigation/hooks.d.ts.map +1 -1
- package/dist/modules/navigation/index.d.ts +1 -1
- package/dist/modules/navigation/index.d.ts.map +1 -1
- package/dist/modules/navigation/index.js +14 -15
- package/dist/modules/navigation/index.js.map +1 -1
- package/dist/modules/navigation/listeners.d.ts +0 -11
- package/dist/modules/navigation/listeners.d.ts.map +1 -1
- package/dist/modules/navigation/navigator.d.ts +0 -5
- package/dist/modules/navigation/navigator.d.ts.map +1 -1
- package/dist/modules/navigation/settings.d.ts +0 -5
- package/dist/modules/navigation/settings.d.ts.map +1 -1
- package/dist/modules/navigation/state.d.ts +0 -1
- package/dist/modules/navigation/state.d.ts.map +1 -1
- package/dist/modules/navigation/types.d.ts +0 -50
- package/dist/modules/navigation/types.d.ts.map +1 -1
- package/dist/modules/navigation/utils.d.ts +0 -3
- package/dist/modules/navigation/utils.d.ts.map +1 -1
- package/dist/modules/notification/constants.d.ts.map +1 -1
- package/dist/modules/notification/context.d.ts.map +1 -1
- package/dist/modules/notification/hooks.d.ts.map +1 -1
- package/dist/modules/notification/index.js +4 -4
- package/dist/modules/notification/module.d.ts.map +1 -1
- package/dist/modules/notification/types.d.ts +0 -3
- package/dist/modules/notification/types.d.ts.map +1 -1
- package/dist/overlay-LTRZUZQD.js +9 -0
- package/dist/{overlay-TZ6L52A5.js.map → overlay-LTRZUZQD.js.map} +1 -1
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +6 -6
- package/dist/result.js +1 -1
- package/dist/theme.d.ts +0 -17
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +3 -3
- package/dist/tokens/index.js +2 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/motion-config.d.ts +0 -9
- package/dist/tokens/motion-config.d.ts.map +1 -1
- package/dist/tokens/motion.d.ts.map +1 -1
- package/dist/ui/carousel/carousel.d.ts +24 -0
- package/dist/ui/carousel/carousel.d.ts.map +1 -0
- package/dist/ui/carousel/track.d.ts +11 -0
- package/dist/ui/carousel/track.d.ts.map +1 -0
- package/dist/ui/carousel/use-drag-scroll.d.ts +3 -0
- package/dist/ui/carousel/use-drag-scroll.d.ts.map +1 -0
- package/dist/ui/cn.d.ts +19 -0
- package/dist/ui/cn.d.ts.map +1 -0
- package/dist/ui/components/avatar.d.ts +14 -0
- package/dist/ui/components/avatar.d.ts.map +1 -0
- package/dist/ui/components/button.d.ts +9 -0
- package/dist/ui/components/button.d.ts.map +1 -0
- package/dist/ui/components/checkbox.d.ts +18 -0
- package/dist/ui/components/checkbox.d.ts.map +1 -0
- package/dist/ui/components/icon.d.ts +4 -0
- package/dist/ui/components/icon.d.ts.map +1 -0
- package/dist/ui/components/image.d.ts +13 -0
- package/dist/ui/components/image.d.ts.map +1 -0
- package/dist/ui/components/indicator.d.ts +37 -0
- package/dist/ui/components/indicator.d.ts.map +1 -0
- package/dist/ui/components/input.d.ts +15 -0
- package/dist/ui/components/input.d.ts.map +1 -0
- package/dist/ui/components/loader.d.ts +17 -0
- package/dist/ui/components/loader.d.ts.map +1 -0
- package/dist/ui/components/segmented.d.ts +21 -0
- package/dist/ui/components/segmented.d.ts.map +1 -0
- package/dist/ui/components/select.d.ts +34 -0
- package/dist/ui/components/select.d.ts.map +1 -0
- package/dist/ui/components/skeleton.d.ts +16 -0
- package/dist/ui/components/skeleton.d.ts.map +1 -0
- package/dist/ui/components/switch.d.ts +11 -0
- package/dist/ui/components/switch.d.ts.map +1 -0
- package/dist/ui/components/tooltip.d.ts +25 -0
- package/dist/ui/components/tooltip.d.ts.map +1 -0
- package/dist/ui/defaults.d.ts +250 -0
- package/dist/ui/defaults.d.ts.map +1 -0
- package/dist/ui/define.d.ts +112 -0
- package/dist/ui/define.d.ts.map +1 -0
- package/dist/ui/index.d.ts +19 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +1970 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/provider.d.ts +11 -0
- package/dist/ui/provider.d.ts.map +1 -0
- package/dist/ui/recipe.d.ts +70 -0
- package/dist/ui/recipe.d.ts.map +1 -0
- package/dist/ui/recipes.d.ts +9 -0
- package/dist/ui/recipes.d.ts.map +1 -0
- package/dist/ui/recipes.js +648 -0
- package/dist/ui/recipes.js.map +1 -0
- package/dist/ui/split.d.ts +4 -0
- package/dist/ui/split.d.ts.map +1 -0
- package/dist/ui/tones.d.ts +23 -0
- package/dist/ui/tones.d.ts.map +1 -0
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/report.d.ts.map +1 -1
- package/docs/README.md +4 -0
- package/docs/modules/dock.md +19 -3
- package/docs/theming.md +1 -1
- package/docs/ui.md +183 -0
- package/package.json +18 -3
- package/styles/effects.css +219 -0
- package/styles/index.css +8 -0
- package/styles/interaction.css +273 -0
- package/styles/palette.css +81 -0
- package/styles/time.css +26 -0
- package/styles/tokens.css +114 -0
- package/styles/utilities.css +110 -0
- package/templates/motion/background.ts +0 -2
- package/templates/motion/context-menu.ts +5 -3
- package/templates/motion/dock.ts +129 -35
- package/templates/motion/modal.ts +8 -5
- package/templates/motion/notification.ts +0 -1
- package/templates/motion/tokens.ts +4 -15
- package/dist/chunk-3BUP64Q6.js.map +0 -1
- package/dist/chunk-66EYJBIP.js.map +0 -1
- package/dist/chunk-7TAVYJ3A.js.map +0 -1
- package/dist/chunk-AQ4BNXA2.js.map +0 -1
- package/dist/chunk-CGHZSSFR.js.map +0 -1
- package/dist/chunk-CYU6SGAL.js.map +0 -1
- package/dist/chunk-FIMPHODX.js.map +0 -1
- package/dist/chunk-HHWRTQKQ.js.map +0 -1
- package/dist/chunk-HLL5EHXC.js.map +0 -1
- package/dist/chunk-JIXBFFRD.js.map +0 -1
- package/dist/chunk-K676GL7Z.js.map +0 -1
- package/dist/chunk-M57SNWXK.js +0 -28
- package/dist/chunk-R2YGFJDJ.js.map +0 -1
- package/dist/chunk-RFZQWLC5.js.map +0 -1
- package/dist/chunk-RIOKLMYM.js.map +0 -1
- package/dist/chunk-SYAVGTOX.js.map +0 -1
- package/dist/chunk-TG6NMHXI.js.map +0 -1
- package/dist/chunk-TV3WEF5G.js.map +0 -1
- package/dist/overlay-TZ6L52A5.js +0 -9
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
--color-*: initial;
|
|
3
|
+
|
|
4
|
+
--font-*: initial;
|
|
5
|
+
|
|
6
|
+
--text-*: initial;
|
|
7
|
+
--type-micro: 10px;
|
|
8
|
+
--type-micro--line-height: 12px;
|
|
9
|
+
--type-label: 11px;
|
|
10
|
+
--type-label--line-height: 16px;
|
|
11
|
+
--type-meta: 12px;
|
|
12
|
+
--type-meta--line-height: 16px;
|
|
13
|
+
--type-control: 13px;
|
|
14
|
+
--type-control--line-height: 16px;
|
|
15
|
+
--type-body: 14px;
|
|
16
|
+
--type-body--line-height: 20px;
|
|
17
|
+
--type-copy: 15px;
|
|
18
|
+
--type-copy--line-height: 24px;
|
|
19
|
+
--type-base: 16px;
|
|
20
|
+
--type-base--line-height: 24px;
|
|
21
|
+
--type-prose: 16px;
|
|
22
|
+
--type-prose--line-height: 28px;
|
|
23
|
+
--type-prose-wide: 17px;
|
|
24
|
+
--type-prose-wide--line-height: 30px;
|
|
25
|
+
--type-title: 18px;
|
|
26
|
+
--type-title--line-height: 28px;
|
|
27
|
+
--type-heading: 24px;
|
|
28
|
+
--type-heading--line-height: 32px;
|
|
29
|
+
--type-display-xs: 36px;
|
|
30
|
+
--type-display-xs--line-height: 1;
|
|
31
|
+
--type-display-sm: 48px;
|
|
32
|
+
--type-display-sm--line-height: 1;
|
|
33
|
+
--type-display-md: 60px;
|
|
34
|
+
--type-display-md--line-height: 1;
|
|
35
|
+
--type-display-lg: 72px;
|
|
36
|
+
--type-display-lg--line-height: 1;
|
|
37
|
+
--type-display-xl: 96px;
|
|
38
|
+
--type-display-xl--line-height: 1;
|
|
39
|
+
--type-display-2xl: 128px;
|
|
40
|
+
--type-display-2xl--line-height: 1;
|
|
41
|
+
|
|
42
|
+
--leading-*: initial;
|
|
43
|
+
|
|
44
|
+
--tracking-*: initial;
|
|
45
|
+
|
|
46
|
+
--radius-*: initial;
|
|
47
|
+
--radius-mark: 3px;
|
|
48
|
+
--radius-thumb: 8px;
|
|
49
|
+
--radius-inset: 10px;
|
|
50
|
+
--radius-tile: 12px;
|
|
51
|
+
--radius-card: 16px;
|
|
52
|
+
--radius-panel: 20px;
|
|
53
|
+
--radius-sheet: 24px;
|
|
54
|
+
--radius-shell: 26px;
|
|
55
|
+
|
|
56
|
+
--shadow-*: initial;
|
|
57
|
+
--inset-shadow-*: initial;
|
|
58
|
+
--drop-shadow-*: initial;
|
|
59
|
+
|
|
60
|
+
--ease-*: initial;
|
|
61
|
+
--ease-out-expo: var(--curve-expo);
|
|
62
|
+
--ease-out-quart: cubic-bezier(0.3, 0.41, 0.28, 1);
|
|
63
|
+
--ease-out-quint: var(--curve-silk);
|
|
64
|
+
--ease-in-out-cubic: var(--curve-glide);
|
|
65
|
+
--ease-in-cubic: cubic-bezier(0.5, 0, 1, 1);
|
|
66
|
+
--ease-out-cream: cubic-bezier(0.33, 0.45, 0.34, 1);
|
|
67
|
+
--ease-phosphor: cubic-bezier(0.32, 0.36, 0.39, 1);
|
|
68
|
+
--ease-fade: var(--curve-fade);
|
|
69
|
+
|
|
70
|
+
--default-transition-duration: var(--step-n2);
|
|
71
|
+
--default-transition-timing-function: var(--ease-out-quart);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@theme inline {
|
|
75
|
+
--font-sans:
|
|
76
|
+
var(--font-app, ui-sans-serif), ui-sans-serif, system-ui, sans-serif;
|
|
77
|
+
|
|
78
|
+
--color-page: var(--page);
|
|
79
|
+
--color-ink: var(--ink);
|
|
80
|
+
--color-ink-lead: var(--ink-lead);
|
|
81
|
+
--color-ink-body: var(--ink-body);
|
|
82
|
+
--color-ink-muted: var(--ink-muted);
|
|
83
|
+
--color-ink-faint: var(--ink-faint);
|
|
84
|
+
|
|
85
|
+
--color-fill: var(--fill);
|
|
86
|
+
--color-fill-hover: var(--fill-hover);
|
|
87
|
+
--color-fill-active: var(--fill-active);
|
|
88
|
+
--color-edge: var(--edge);
|
|
89
|
+
--color-edge-hover: var(--edge-hover);
|
|
90
|
+
--color-edge-focus: var(--edge-focus);
|
|
91
|
+
--color-rule: var(--rule);
|
|
92
|
+
--color-line: var(--line);
|
|
93
|
+
--color-plate: var(--plate);
|
|
94
|
+
|
|
95
|
+
--color-glass: var(--glass);
|
|
96
|
+
--color-veil: var(--veil);
|
|
97
|
+
--color-dim: var(--dim);
|
|
98
|
+
|
|
99
|
+
--color-primary: var(--primary);
|
|
100
|
+
--color-primary-hover: var(--primary-hover);
|
|
101
|
+
--color-on-primary: var(--on-primary);
|
|
102
|
+
--color-on-accent: var(--on-accent);
|
|
103
|
+
|
|
104
|
+
--color-accent: var(--accent);
|
|
105
|
+
--color-danger: var(--danger);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@theme static {
|
|
109
|
+
--spacing-control-xs: 1.5rem;
|
|
110
|
+
--spacing-control-sm: 2rem;
|
|
111
|
+
--spacing-control-chrome: 2.25rem;
|
|
112
|
+
--spacing-control-md: 2.5rem;
|
|
113
|
+
--spacing-control-lg: 3rem;
|
|
114
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@utility center {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@utility tempo-quick {
|
|
8
|
+
--touch-in: var(--step-n1);
|
|
9
|
+
--touch-out: var(--step-n1);
|
|
10
|
+
}
|
|
11
|
+
@utility duration-flick {
|
|
12
|
+
transition-duration: var(--step-n4);
|
|
13
|
+
}
|
|
14
|
+
@utility duration-touch {
|
|
15
|
+
transition-duration: var(--step-n3);
|
|
16
|
+
}
|
|
17
|
+
@utility duration-leave {
|
|
18
|
+
transition-duration: var(--step-n2);
|
|
19
|
+
}
|
|
20
|
+
@utility duration-light {
|
|
21
|
+
transition-duration: var(--step-n1);
|
|
22
|
+
}
|
|
23
|
+
@utility duration-reveal {
|
|
24
|
+
transition-duration: var(--step-0);
|
|
25
|
+
}
|
|
26
|
+
@utility duration-move {
|
|
27
|
+
transition-duration: var(--step-1);
|
|
28
|
+
}
|
|
29
|
+
@utility duration-settle {
|
|
30
|
+
transition-duration: var(--step-2);
|
|
31
|
+
}
|
|
32
|
+
@utility duration-linger {
|
|
33
|
+
transition-duration: var(--step-3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@utility type-micro {
|
|
37
|
+
font-size: var(--type-micro);
|
|
38
|
+
line-height: var(--tw-leading, var(--type-micro--line-height));
|
|
39
|
+
}
|
|
40
|
+
@utility type-label {
|
|
41
|
+
font-size: var(--type-label);
|
|
42
|
+
line-height: var(--tw-leading, var(--type-label--line-height));
|
|
43
|
+
}
|
|
44
|
+
@utility type-meta {
|
|
45
|
+
font-size: var(--type-meta);
|
|
46
|
+
line-height: var(--tw-leading, var(--type-meta--line-height));
|
|
47
|
+
}
|
|
48
|
+
@utility type-control {
|
|
49
|
+
font-size: var(--type-control);
|
|
50
|
+
line-height: var(--tw-leading, var(--type-control--line-height));
|
|
51
|
+
}
|
|
52
|
+
@utility type-body {
|
|
53
|
+
font-size: var(--type-body);
|
|
54
|
+
line-height: var(--tw-leading, var(--type-body--line-height));
|
|
55
|
+
}
|
|
56
|
+
@utility type-copy {
|
|
57
|
+
font-size: var(--type-copy);
|
|
58
|
+
line-height: var(--tw-leading, var(--type-copy--line-height));
|
|
59
|
+
}
|
|
60
|
+
@utility type-base {
|
|
61
|
+
font-size: var(--type-base);
|
|
62
|
+
line-height: var(--tw-leading, var(--type-base--line-height));
|
|
63
|
+
}
|
|
64
|
+
@utility type-prose {
|
|
65
|
+
font-size: var(--type-prose);
|
|
66
|
+
line-height: var(--tw-leading, var(--type-prose--line-height));
|
|
67
|
+
@media (width >= 40rem) {
|
|
68
|
+
font-size: var(--type-prose-wide);
|
|
69
|
+
line-height: var(--tw-leading, var(--type-prose-wide--line-height));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
@utility type-title {
|
|
73
|
+
font-size: var(--type-title);
|
|
74
|
+
line-height: var(--tw-leading, var(--type-title--line-height));
|
|
75
|
+
}
|
|
76
|
+
@utility type-heading {
|
|
77
|
+
font-size: var(--type-heading);
|
|
78
|
+
line-height: var(--tw-leading, var(--type-heading--line-height));
|
|
79
|
+
}
|
|
80
|
+
@utility type-display-xs {
|
|
81
|
+
font-size: var(--type-display-xs);
|
|
82
|
+
line-height: var(--tw-leading, var(--type-display-xs--line-height));
|
|
83
|
+
}
|
|
84
|
+
@utility type-display-sm {
|
|
85
|
+
font-size: var(--type-display-sm);
|
|
86
|
+
line-height: var(--tw-leading, var(--type-display-sm--line-height));
|
|
87
|
+
}
|
|
88
|
+
@utility type-display-md {
|
|
89
|
+
font-size: var(--type-display-md);
|
|
90
|
+
line-height: var(--tw-leading, var(--type-display-md--line-height));
|
|
91
|
+
}
|
|
92
|
+
@utility type-display-lg {
|
|
93
|
+
font-size: var(--type-display-lg);
|
|
94
|
+
line-height: var(--tw-leading, var(--type-display-lg--line-height));
|
|
95
|
+
}
|
|
96
|
+
@utility type-display-xl {
|
|
97
|
+
font-size: var(--type-display-xl);
|
|
98
|
+
line-height: var(--tw-leading, var(--type-display-xl--line-height));
|
|
99
|
+
}
|
|
100
|
+
@utility type-display-2xl {
|
|
101
|
+
font-size: var(--type-display-2xl);
|
|
102
|
+
line-height: var(--tw-leading, var(--type-display-2xl--line-height));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@utility scrollbar-none {
|
|
106
|
+
scrollbar-width: none;
|
|
107
|
+
&::-webkit-scrollbar {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -3,8 +3,6 @@ import { motion } from "./tokens";
|
|
|
3
3
|
|
|
4
4
|
const { durations, easings } = motion;
|
|
5
5
|
|
|
6
|
-
// defineTheme(backgroundTheme, { slots, motion: backgroundMotion })
|
|
7
|
-
// A page can still pass its own `background.animation`; it wins field by field.
|
|
8
6
|
export const backgroundMotion: BackgroundMotion = {
|
|
9
7
|
initial: { opacity: 0 },
|
|
10
8
|
animate: { opacity: 1 },
|
|
@@ -3,13 +3,11 @@ import { motion } from "./tokens";
|
|
|
3
3
|
|
|
4
4
|
const { durations, easings, springs } = motion;
|
|
5
5
|
|
|
6
|
-
// Rows come in one after another, a short step apart, after the menu opens.
|
|
7
6
|
const rowDelay = (index: unknown) =>
|
|
8
7
|
0.04 + Math.min(Math.max(Number(index) || 0, 0) * 0.042, 0.21);
|
|
9
8
|
|
|
10
9
|
const leave = { duration: durations.micro, ease: easings.exit };
|
|
11
10
|
|
|
12
|
-
// defineTheme(contextMenuTheme, { slots, motion: contextMenuMotion })
|
|
13
11
|
export const contextMenuMotion: ContextMenuMotion = {
|
|
14
12
|
pop: {
|
|
15
13
|
hidden: {
|
|
@@ -34,7 +32,11 @@ export const contextMenuMotion: ContextMenuMotion = {
|
|
|
34
32
|
hidden: { opacity: 0 },
|
|
35
33
|
visible: {
|
|
36
34
|
opacity: 1,
|
|
37
|
-
transition: {
|
|
35
|
+
transition: {
|
|
36
|
+
duration: durations.fast,
|
|
37
|
+
ease: easings.weighted,
|
|
38
|
+
delay: 0.04,
|
|
39
|
+
},
|
|
38
40
|
},
|
|
39
41
|
exit: { opacity: 0, transition: leave },
|
|
40
42
|
},
|
package/templates/motion/dock.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
DockMotion,
|
|
3
|
+
DockSurfacePhaseMotion,
|
|
4
|
+
} from "@omerdlw/base-framework/modules/dock";
|
|
2
5
|
import {
|
|
3
6
|
chip,
|
|
4
7
|
contentSwap,
|
|
@@ -13,19 +16,14 @@ import { motion, tween } from "./tokens";
|
|
|
13
16
|
|
|
14
17
|
const { durations, easings, springs } = motion;
|
|
15
18
|
|
|
16
|
-
// Dock-only lengths, next to the shared scale.
|
|
17
19
|
const HEADER = 0.32;
|
|
18
20
|
const ACTION_DISMISS = 0.32;
|
|
19
21
|
const COLLAPSE = 0.52;
|
|
20
22
|
|
|
21
|
-
// A surface opening: the inline action leaves (overlapping the growth a
|
|
22
|
-
// little), the deck compresses for a beat, then the body grows in. Closing
|
|
23
|
-
// runs the other way and the card header comes back last.
|
|
24
23
|
const SURFACE = {
|
|
25
24
|
anticipation: 0.24,
|
|
26
25
|
bodyEnter: 0.86,
|
|
27
26
|
bodyEnterDelay: 0.1,
|
|
28
|
-
// The header's return: 0.36s in all, of which 0.08s is waiting.
|
|
29
27
|
headerRestore: 0.36,
|
|
30
28
|
headerRevealDelay: 0.08,
|
|
31
29
|
headerReveal: 0.28,
|
|
@@ -63,38 +61,64 @@ const pressRole = press({ tapScale: 0.97, spring: springs.press });
|
|
|
63
61
|
const extensionsEnter = tween(durations.moderate, easings.emphasized);
|
|
64
62
|
const extensionsExit = tween(durations.base, easings.exit);
|
|
65
63
|
|
|
66
|
-
// The STANDARD tier: a crossfade that travels a little under half of 18px.
|
|
67
64
|
const crossfade = {
|
|
68
65
|
distance: Math.round(18 * 0.42),
|
|
69
66
|
duration: durations.moderate,
|
|
70
67
|
scale: 1 - 0.018,
|
|
71
68
|
};
|
|
72
69
|
|
|
70
|
+
const surfaceResize = (distancePx: number) => {
|
|
71
|
+
const resize = surfaceResizeTransition(distancePx, {
|
|
72
|
+
base: 0.5,
|
|
73
|
+
min: 0.4,
|
|
74
|
+
max: durations.cinematic,
|
|
75
|
+
ease: easings.weighted,
|
|
76
|
+
});
|
|
77
|
+
return { ...resize, height: resize, width: resize };
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const surfaceArrival = tween(durations.cinematic, easings.overshoot);
|
|
81
|
+
const anticipation = tween(SURFACE.anticipation, easings.weighted);
|
|
82
|
+
|
|
83
|
+
const surfaceEnter = {
|
|
84
|
+
...surfaceBody.visible.transition,
|
|
85
|
+
delay: SURFACE.bodyEnterDelay,
|
|
86
|
+
};
|
|
87
|
+
const surfaceStep = swap(durations.base, easings.enter).enter;
|
|
88
|
+
|
|
73
89
|
const controlsSlot = (enter: object, exit: object) => ({
|
|
74
90
|
hidden: { opacity: 0, scale: 0.96, width: 0, marginRight: -2 },
|
|
75
|
-
visible: {
|
|
76
|
-
|
|
91
|
+
visible: {
|
|
92
|
+
opacity: 1,
|
|
93
|
+
scale: 1,
|
|
94
|
+
width: "auto",
|
|
95
|
+
marginRight: 0,
|
|
96
|
+
transition: enter,
|
|
97
|
+
},
|
|
98
|
+
exit: {
|
|
99
|
+
opacity: 0,
|
|
100
|
+
scale: 0.96,
|
|
101
|
+
width: 0,
|
|
102
|
+
marginRight: -2,
|
|
103
|
+
transition: exit,
|
|
104
|
+
},
|
|
77
105
|
});
|
|
78
106
|
|
|
79
|
-
|
|
107
|
+
const REST_PHASE: DockSurfacePhaseMotion = {
|
|
108
|
+
deck: null,
|
|
109
|
+
transform: null,
|
|
110
|
+
scale: 1,
|
|
111
|
+
body: surfaceStep,
|
|
112
|
+
header: headerSwap.enter,
|
|
113
|
+
headerReturn: null,
|
|
114
|
+
};
|
|
115
|
+
|
|
80
116
|
export const dockMotion: DockMotion = {
|
|
81
117
|
transitions: {
|
|
82
118
|
stack: tween(COLLAPSE, easings.enter),
|
|
83
119
|
expand,
|
|
84
|
-
surfaceResize: (distancePx) => {
|
|
85
|
-
const resize = surfaceResizeTransition(distancePx, {
|
|
86
|
-
base: 0.5,
|
|
87
|
-
min: 0.4,
|
|
88
|
-
max: durations.cinematic,
|
|
89
|
-
ease: easings.weighted,
|
|
90
|
-
});
|
|
91
|
-
return { ...resize, height: resize, width: resize };
|
|
92
|
-
},
|
|
93
|
-
surfaceArrival: tween(durations.cinematic, easings.overshoot),
|
|
94
|
-
anticipation: tween(SURFACE.anticipation, easings.weighted),
|
|
95
|
-
surfaceEnter: { ...surfaceBody.visible.transition, delay: SURFACE.bodyEnterDelay },
|
|
96
|
-
surfaceStep: swap(durations.base, easings.enter).enter,
|
|
97
120
|
surfaceExit: surfaceBody.exit.transition,
|
|
121
|
+
layout: { type: "tween", duration: 0.45, ease: [0.4, 0, 0.1, 1] },
|
|
98
122
|
card,
|
|
99
123
|
cardExpanded: springs.deck,
|
|
100
124
|
cardPeek: tween(durations.fast, easings.enter),
|
|
@@ -113,11 +137,22 @@ export const dockMotion: DockMotion = {
|
|
|
113
137
|
variants: {
|
|
114
138
|
fade: {
|
|
115
139
|
hidden: { opacity: 0, transform: gpuTransform(6, 0.99) },
|
|
116
|
-
visible: {
|
|
117
|
-
|
|
140
|
+
visible: {
|
|
141
|
+
opacity: 1,
|
|
142
|
+
transform: gpuTransform(0),
|
|
143
|
+
transition: textSwap.enter,
|
|
144
|
+
},
|
|
145
|
+
exit: {
|
|
146
|
+
opacity: 0,
|
|
147
|
+
transform: gpuTransform(-4, 0.99),
|
|
148
|
+
transition: textSwap.exit,
|
|
149
|
+
},
|
|
118
150
|
},
|
|
119
151
|
textCrossfade: {
|
|
120
|
-
hidden: {
|
|
152
|
+
hidden: {
|
|
153
|
+
opacity: 0,
|
|
154
|
+
transform: gpuTransform(crossfade.distance, crossfade.scale),
|
|
155
|
+
},
|
|
121
156
|
visible: {
|
|
122
157
|
opacity: 1,
|
|
123
158
|
transform: gpuTransform(0),
|
|
@@ -167,12 +202,24 @@ export const dockMotion: DockMotion = {
|
|
|
167
202
|
ease: easings.enter,
|
|
168
203
|
},
|
|
169
204
|
},
|
|
170
|
-
exit: {
|
|
205
|
+
exit: {
|
|
206
|
+
opacity: 0,
|
|
207
|
+
transform: gpuTransform(4, 0.99),
|
|
208
|
+
transition: textSwap.exit,
|
|
209
|
+
},
|
|
171
210
|
},
|
|
172
211
|
extensionShelf: {
|
|
173
212
|
hidden: { opacity: 0, transform: gpuTransform(5, 0.99) },
|
|
174
|
-
visible: {
|
|
175
|
-
|
|
213
|
+
visible: {
|
|
214
|
+
opacity: 1,
|
|
215
|
+
transform: gpuTransform(0, 1),
|
|
216
|
+
transition: extensionsEnter,
|
|
217
|
+
},
|
|
218
|
+
exit: {
|
|
219
|
+
opacity: 0,
|
|
220
|
+
transform: gpuTransform(-4, 0.99),
|
|
221
|
+
transition: extensionsExit,
|
|
222
|
+
},
|
|
176
223
|
},
|
|
177
224
|
actionDismiss: {
|
|
178
225
|
hidden: { opacity: 0, transform: gpuTransform(6, 0.99) },
|
|
@@ -229,7 +276,11 @@ export const dockMotion: DockMotion = {
|
|
|
229
276
|
transform: gpuTransform(0),
|
|
230
277
|
transition: tween(durations.moderate, easings.emphasized),
|
|
231
278
|
},
|
|
232
|
-
exit: {
|
|
279
|
+
exit: {
|
|
280
|
+
opacity: 0,
|
|
281
|
+
transform: gpuTransform(3, 0.99),
|
|
282
|
+
transition: textSwap.exit,
|
|
283
|
+
},
|
|
233
284
|
},
|
|
234
285
|
scrubberTooltip: {
|
|
235
286
|
hidden: { opacity: 0, transform: gpuTransform(4, 0.98) },
|
|
@@ -279,14 +330,40 @@ export const dockMotion: DockMotion = {
|
|
|
279
330
|
visible: { opacity: 1, transform: gpuTransform(0, 1) },
|
|
280
331
|
},
|
|
281
332
|
},
|
|
333
|
+
phases: {
|
|
334
|
+
idle: REST_PHASE,
|
|
335
|
+
dismissAction: {
|
|
336
|
+
...REST_PHASE,
|
|
337
|
+
transform: anticipation,
|
|
338
|
+
scale: 0.94,
|
|
339
|
+
header: anticipation,
|
|
340
|
+
},
|
|
341
|
+
expandBody: {
|
|
342
|
+
...REST_PHASE,
|
|
343
|
+
deck: expand,
|
|
344
|
+
transform: surfaceArrival,
|
|
345
|
+
body: surfaceEnter,
|
|
346
|
+
},
|
|
347
|
+
open: { ...REST_PHASE, deck: surfaceResize },
|
|
348
|
+
anticipation: {
|
|
349
|
+
...REST_PHASE,
|
|
350
|
+
deck: surfaceResize,
|
|
351
|
+
transform: anticipation,
|
|
352
|
+
scale: 0.96,
|
|
353
|
+
},
|
|
354
|
+
collapseBody: {
|
|
355
|
+
...REST_PHASE,
|
|
356
|
+
deck: expand,
|
|
357
|
+
headerReturn: surfaceEnter,
|
|
358
|
+
},
|
|
359
|
+
restoreHeader: { ...REST_PHASE, deck: expand },
|
|
360
|
+
},
|
|
282
361
|
deck: {
|
|
283
362
|
elevation: {
|
|
284
363
|
rest: "0px 12px 32px 0px rgba(0,0,0,0.35), 0px 2px 8px 0px rgba(0,0,0,0.25)",
|
|
285
364
|
elevated:
|
|
286
365
|
"0px 32px 80px 0px rgba(0,0,0,0.55), 0px 8px 24px 0px rgba(0,0,0,0.35)",
|
|
287
366
|
},
|
|
288
|
-
compress: { open: 0.94, close: 0.96 },
|
|
289
|
-
// Cards further back lift a little further and grow a little less.
|
|
290
367
|
peek: (position) => {
|
|
291
368
|
const progress = Math.min(position / 3, 1);
|
|
292
369
|
return {
|
|
@@ -298,25 +375,42 @@ export const dockMotion: DockMotion = {
|
|
|
298
375
|
opacity: 0,
|
|
299
376
|
transform: gpuTransform(
|
|
300
377
|
y,
|
|
301
|
-
scale === null
|
|
378
|
+
scale === null
|
|
379
|
+
? 0.98 - Math.min(position * 0.008, 0.024)
|
|
380
|
+
: scale * 0.98,
|
|
302
381
|
),
|
|
303
382
|
transition: { ...cardCollapse },
|
|
304
383
|
}),
|
|
305
384
|
tapScale: 0.97,
|
|
385
|
+
stacking: {
|
|
386
|
+
collapsed: {
|
|
387
|
+
offsetY: -10,
|
|
388
|
+
scale: 0.88,
|
|
389
|
+
opacityStep: 0.2,
|
|
390
|
+
opacityMin: 0.1,
|
|
391
|
+
},
|
|
392
|
+
expanded: { offsetY: -72 },
|
|
393
|
+
shelf: { offsetY: -42, scale: 0.94 },
|
|
394
|
+
visible: { stack: 3, extensions: 2, status: 1 },
|
|
395
|
+
},
|
|
396
|
+
breadcrumbOffset: -44,
|
|
397
|
+
fullscreenOpacity: 0,
|
|
398
|
+
origin: "50% 100%",
|
|
399
|
+
resizeFallback: 260,
|
|
306
400
|
},
|
|
401
|
+
opacity: { banner: 0.95, description: 0.7 },
|
|
307
402
|
drag: {
|
|
308
403
|
elastic: { top: 0.05, bottom: 0.5 },
|
|
309
404
|
range: [0, 180],
|
|
310
405
|
opacity: [1, 0.75],
|
|
311
406
|
scale: [1, 0.96],
|
|
407
|
+
dismiss: { offset: 65, velocity: 400 },
|
|
312
408
|
},
|
|
313
409
|
skeleton: "animate-pulse motion-reduce:animate-none",
|
|
314
410
|
timings: {
|
|
315
|
-
// The action's 0.32s dismissal, overlapped 0.22s by the growth.
|
|
316
411
|
dismissAction: 0.1,
|
|
317
412
|
anticipation: 0.07,
|
|
318
413
|
expandBody: SURFACE.bodyEnter,
|
|
319
|
-
// The body's 0.76s exit plus 0.1s for the deck to settle.
|
|
320
414
|
collapseBody: 0.86,
|
|
321
415
|
restoreHeader: SURFACE.headerRestore,
|
|
322
416
|
expandStagger: 0.055,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ModalMotion,
|
|
3
|
+
ModalPositionMotion,
|
|
4
|
+
} from "@omerdlw/base-framework/modules/modal";
|
|
2
5
|
import { motion, tween } from "./tokens";
|
|
3
6
|
|
|
4
7
|
const { durations, easings, springs } = motion;
|
|
@@ -8,7 +11,6 @@ const REST = "translate3d(0, 0px, 0) scale(1)";
|
|
|
8
11
|
const surfaceEnter = tween(durations.slow, easings.enter);
|
|
9
12
|
const surfaceExit = tween(durations.fast, easings.exit);
|
|
10
13
|
|
|
11
|
-
// Edge sheets slide fully in from their edge.
|
|
12
14
|
const sheet = (offset: string): ModalPositionMotion => ({
|
|
13
15
|
variants: {
|
|
14
16
|
hidden: { opacity: 0, transform: offset },
|
|
@@ -17,7 +19,6 @@ const sheet = (offset: string): ModalPositionMotion => ({
|
|
|
17
19
|
},
|
|
18
20
|
});
|
|
19
21
|
|
|
20
|
-
// A header or footer row settles a little after the dialog, from its own side.
|
|
21
22
|
const row = (offset: string, delay: number) => ({
|
|
22
23
|
hidden: { opacity: 0, transform: offset },
|
|
23
24
|
visible: {
|
|
@@ -32,7 +33,6 @@ const row = (offset: string, delay: number) => ({
|
|
|
32
33
|
},
|
|
33
34
|
});
|
|
34
35
|
|
|
35
|
-
// defineTheme(modalTheme, { slots, motion: modalMotion })
|
|
36
36
|
export const modalMotion: ModalMotion = {
|
|
37
37
|
backdrop: {
|
|
38
38
|
hidden: { opacity: 0 },
|
|
@@ -57,7 +57,10 @@ export const modalMotion: ModalMotion = {
|
|
|
57
57
|
positions: {
|
|
58
58
|
center: {
|
|
59
59
|
variants: {
|
|
60
|
-
hidden: {
|
|
60
|
+
hidden: {
|
|
61
|
+
opacity: 0,
|
|
62
|
+
transform: "translate3d(0px, 12px, 0) scale(0.95)",
|
|
63
|
+
},
|
|
61
64
|
visible: {
|
|
62
65
|
opacity: 1,
|
|
63
66
|
transform: REST,
|
|
@@ -5,7 +5,6 @@ const { durations, easings } = motion;
|
|
|
5
5
|
|
|
6
6
|
const enter = tween(durations.moderate, easings.emphasized);
|
|
7
7
|
|
|
8
|
-
// defineTheme(notificationTheme, { slots, motion: notificationMotion })
|
|
9
8
|
export const notificationMotion: NotificationMotion = {
|
|
10
9
|
transition: enter,
|
|
11
10
|
toast: {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { defineMotion } from "@omerdlw/base-framework/tokens";
|
|
2
2
|
|
|
3
|
-
// Your app's motion vocabulary. The framework ships no animation of its own:
|
|
4
|
-
// every module plays what your theme files give it, written with these words.
|
|
5
|
-
// This folder is the framework's original motion, as a starting point; copy it
|
|
6
|
-
// into your app (e.g. src/config/theme/motion/) and make it yours.
|
|
7
|
-
//
|
|
8
|
-
// tempo stretches everything a module animates (durations, delays, staggers,
|
|
9
|
-
// choreography timers, springs). Write values at tempo 1.
|
|
10
3
|
export const motion = defineMotion({
|
|
11
4
|
tempo: 1,
|
|
12
5
|
reducedMotion: "user",
|
|
@@ -20,17 +13,11 @@ export const motion = defineMotion({
|
|
|
20
13
|
cinematic: 0.86,
|
|
21
14
|
},
|
|
22
15
|
easings: {
|
|
23
|
-
// How things arrive.
|
|
24
16
|
enter: [0.25, 1, 0.5, 1],
|
|
25
|
-
// Arrivals that should read as a reveal.
|
|
26
17
|
emphasized: [0.16, 1, 0.3, 1],
|
|
27
|
-
// Heavy surfaces settling.
|
|
28
18
|
weighted: [0.22, 1, 0.36, 1],
|
|
29
|
-
// A move between two resting points.
|
|
30
19
|
move: [0.65, 0, 0.35, 1],
|
|
31
|
-
// How things leave.
|
|
32
20
|
exit: [0.5, 0, 1, 1],
|
|
33
|
-
// A landing that slightly overshoots.
|
|
34
21
|
overshoot: [0.34, 1.56, 0.64, 1],
|
|
35
22
|
},
|
|
36
23
|
springs: {
|
|
@@ -43,5 +30,7 @@ export const motion = defineMotion({
|
|
|
43
30
|
},
|
|
44
31
|
});
|
|
45
32
|
|
|
46
|
-
export const tween = (
|
|
47
|
-
|
|
33
|
+
export const tween = (
|
|
34
|
+
duration: number,
|
|
35
|
+
ease: readonly [number, number, number, number],
|
|
36
|
+
) => ({ type: "tween", duration, ease }) as const;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/atoms/icon.tsx","../src/atoms/spinner.tsx","../src/atoms/tooltip.tsx","../src/atoms/button.tsx"],"names":["IconifyIcon","jsx"],"mappings":";;;;AAeO,SAAS,IAAA,CAAK;AAAA,EACnB,SAAA,GAAY,QAAA;AAAA,EACZ,KAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA,GAAO,EAAA;AAAA,EACP,KAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAc;AACZ,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,MAAA,EAAQ,IAAA;AAAA,MACR,IAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA,EAAO,EAAE,KAAA,EAAO,GAAG,KAAA,EAAM;AAAA,MACzB,KAAA,EAAO,IAAA;AAAA,MACN,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA;AC5BZ,SAAS,QAAQ,EAAE,SAAA,GAAY,EAAA,EAAI,IAAA,GAAO,IAAG,EAAiB;AACnE,EAAA,uBACEC,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,YAAA,EAAW,SAAA;AAAA,MACX,IAAA,EAAK,QAAA;AAAA,MAEL,QAAA,kBAAAA,GAAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAK,2BAA0B,IAAA,EAAY;AAAA;AAAA,GACnD;AAEJ;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA;ACHf,SAAS,OAAA,CAAQ;AAAA,EACtB,QAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAA,GAAmB,CAAA;AAAA,EACnB,WAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA,GAAW,KAAA;AAAA,EACX,UAAA,GAAa,CAAA;AAAA,EACb,IAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAiB;AACf,EAAA,uBACE,IAAA;AAAA,IAAkB,gBAAA,CAAA,IAAA;AAAA,IAAjB;AAAA,MACC,WAAA;AAAA,MACA,aAAA,EAAe,OAAA;AAAA,MACf,YAAA;AAAA,MACA,IAAA;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAAA,GAAAA,CAAkB,gBAAA,CAAA,OAAA,EAAjB,EAAyB,OAAA,EAAO,MAC9B,QAAA,EACH,CAAA;AAAA,wBAEAA,GAAAA,CAAkB,gBAAA,CAAA,MAAA,EAAjB,EACC,QAAA,kBAAAA,GAAAA;AAAA,UAAkB,gBAAA,CAAA,OAAA;AAAA,UAAjB;AAAA,YACC,IAAA,EAAM,QAAA;AAAA,YACN,KAAA,EAAM,QAAA;AAAA,YACN,UAAA;AAAA,YACA,gBAAA;AAAA,YACA,SAAA;AAAA,YACC,GAAG,KAAA;AAAA,YAEH,QAAA,EAAA;AAAA;AAAA,SACH,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA;AChDf,SAAS,MAAA,CAAO;AAAA,EACrB,GAAA;AAAA,EACA,QAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA,GAAW,KAAA;AAAA,EACX,OAAA,GAAU,KAAA;AAAA,EACV,IAAA,GAAO,QAAA;AAAA,EACP,GAAG;AACL,CAAA,EAAgB;AACd,EAAA,uBACEA,GAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,UAAU,QAAA,IAAY,OAAA;AAAA,MACtB,WAAA,EAAW,UAAU,IAAA,GAAO,MAAA;AAAA,MAC5B,SAAA;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA","file":"chunk-3BUP64Q6.js","sourcesContent":["\"use client\";\n\nimport { Icon as IconifyIcon } from \"@iconify-icon/react\";\nimport type { ComponentProps, CSSProperties } from \"react\";\n\nexport interface IconProps\n extends Omit<ComponentProps<typeof IconifyIcon>, \"icon\" | \"size\"> {\n icon: string | ComponentProps<typeof IconifyIcon>[\"icon\"];\n size?: number | string;\n color?: string;\n className?: string;\n style?: CSSProperties;\n onClick?: () => void;\n}\n\nexport function Icon({\n className = \"center\",\n color,\n icon,\n onClick,\n size = 20,\n style,\n ...props\n}: IconProps) {\n return (\n <IconifyIcon\n className={className}\n height={size}\n icon={icon}\n onClick={onClick}\n style={{ color, ...style }}\n width={size}\n {...props}\n />\n );\n}\n\nIcon.displayName = \"Icon\";\n","\"use client\";\n\nimport { Icon } from \"./icon\";\n\nexport interface SpinnerProps {\n className?: string;\n size?: number;\n}\n\nexport function Spinner({ className = \"\", size = 15 }: SpinnerProps) {\n return (\n <div\n className={className}\n aria-label=\"Loading\"\n role=\"status\"\n >\n <Icon icon=\"mingcute:loading-3-fill\" size={size} />\n </div>\n );\n}\n\nSpinner.displayName = \"Spinner\";\n","\"use client\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type { ReactNode } from \"react\";\n\nexport interface TooltipProps {\n children: ReactNode;\n text: ReactNode;\n className?: string;\n open?: boolean;\n defaultOpen?: boolean;\n delayMs?: number;\n position?: \"top\" | \"bottom\" | \"left\" | \"right\";\n sideOffset?: number;\n collisionPadding?: number;\n onOpenChange?: (open: boolean) => void;\n}\n\nexport function Tooltip({\n children,\n className,\n collisionPadding = 8,\n defaultOpen,\n delayMs,\n onOpenChange,\n open,\n position = \"top\",\n sideOffset = 6,\n text,\n ...props\n}: TooltipProps) {\n return (\n <TooltipPrimitive.Root\n defaultOpen={defaultOpen}\n delayDuration={delayMs}\n onOpenChange={onOpenChange}\n open={open}\n >\n <TooltipPrimitive.Trigger asChild>\n {children}\n </TooltipPrimitive.Trigger>\n\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n side={position}\n align=\"center\"\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={className}\n {...props}\n >\n {text}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n}\n\nTooltip.displayName = \"Tooltip\";\n","\"use client\";\n\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from \"react\";\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n ref?: Ref<HTMLButtonElement>;\n children?: ReactNode;\n loading?: boolean;\n}\n\nexport function Button({\n ref,\n children,\n className,\n disabled = false,\n loading = false,\n type = \"button\",\n ...props\n}: ButtonProps) {\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading ? true : undefined}\n className={className}\n {...props}\n >\n {children}\n </button>\n );\n}\n\nButton.displayName = \"Button\";\n"]}
|