@raydenui/ui 0.9.7 → 0.10.1
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/README.md +124 -49
- package/dist/Table-DCNSxua1.d.cts +31 -0
- package/dist/Table-DCNSxua1.d.ts +31 -0
- package/dist/blocks/ApplicationShellBlock.cjs +157 -0
- package/dist/blocks/ApplicationShellBlock.js +154 -0
- package/dist/blocks/CheckoutReviewBlock.cjs +16 -0
- package/dist/blocks/CheckoutReviewBlock.js +13 -0
- package/dist/blocks/CommandPaletteBlock.cjs +334 -0
- package/dist/blocks/CommandPaletteBlock.js +331 -0
- package/dist/blocks/CreateAccountBlock.cjs +147 -0
- package/dist/blocks/CreateAccountBlock.js +143 -0
- package/dist/blocks/EmptyStateBlock.cjs +19 -0
- package/dist/blocks/EmptyStateBlock.js +16 -0
- package/dist/blocks/FeatureOverviewBlock.cjs +54 -0
- package/dist/blocks/FeatureOverviewBlock.js +51 -0
- package/dist/blocks/HeaderBlock.cjs +230 -0
- package/dist/blocks/HeaderBlock.js +227 -0
- package/dist/blocks/KpiOverviewBlock.cjs +63 -0
- package/dist/blocks/KpiOverviewBlock.js +60 -0
- package/dist/blocks/LoginBlock.cjs +66 -0
- package/dist/blocks/LoginBlock.js +63 -0
- package/dist/blocks/NotificationsBlock.cjs +17 -0
- package/dist/blocks/NotificationsBlock.js +14 -0
- package/dist/blocks/PageHeaderBlock.cjs +121 -0
- package/dist/blocks/PageHeaderBlock.js +118 -0
- package/dist/blocks/PricingPlansBlock.cjs +146 -0
- package/dist/blocks/PricingPlansBlock.js +143 -0
- package/dist/blocks/ProductCollectionBlock.cjs +37 -0
- package/dist/blocks/ProductCollectionBlock.js +34 -0
- package/dist/blocks/ProductDetailBlock.cjs +30 -0
- package/dist/blocks/ProductDetailBlock.js +27 -0
- package/dist/blocks/ProductHeroBlock.cjs +83 -0
- package/dist/blocks/ProductHeroBlock.js +80 -0
- package/dist/blocks/ProfileSettingsBlock.cjs +130 -0
- package/dist/blocks/ProfileSettingsBlock.js +126 -0
- package/dist/blocks/QuickSendBlock.cjs +11 -0
- package/dist/blocks/QuickSendBlock.js +8 -0
- package/dist/blocks/RecentTransactionsBlock.cjs +13 -0
- package/dist/blocks/RecentTransactionsBlock.js +10 -0
- package/dist/blocks/SearchableTableBlock.cjs +91 -0
- package/dist/blocks/SearchableTableBlock.js +88 -0
- package/dist/blocks/ShoppingCartBlock.cjs +16 -0
- package/dist/blocks/ShoppingCartBlock.js +13 -0
- package/dist/blocks/SiteFooterBlock.cjs +69 -0
- package/dist/blocks/SiteFooterBlock.js +66 -0
- package/dist/blocks/TableBlock.cjs +20 -0
- package/dist/blocks/TableBlock.js +17 -0
- package/dist/blocks/TaskListBlock.cjs +198 -0
- package/dist/blocks/TaskListBlock.js +195 -0
- package/dist/blocks/WorkspaceSwitcherBlock.cjs +291 -0
- package/dist/blocks/WorkspaceSwitcherBlock.js +288 -0
- package/dist/blocks/commerce.cjs +44 -0
- package/dist/blocks/commerce.js +35 -0
- package/dist/blocks/index.cjs +53 -0
- package/dist/blocks/index.js +24 -0
- package/dist/blocks.d.cts +1820 -0
- package/dist/blocks.d.ts +1820 -0
- package/dist/chart.cjs +13 -0
- package/dist/chart.d.cts +59 -0
- package/dist/chart.d.ts +59 -0
- package/dist/chart.js +5 -0
- package/dist/components/Accordion/Accordion.cjs +94 -0
- package/dist/components/Accordion/Accordion.js +91 -0
- package/dist/components/Accordion/index.cjs +8 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/ActivityFeed/ActivityContent.cjs +40 -0
- package/dist/components/ActivityFeed/ActivityContent.js +37 -0
- package/dist/components/ActivityFeed/ActivityItem.cjs +19 -0
- package/dist/components/ActivityFeed/ActivityItem.js +16 -0
- package/dist/components/ActivityFeed/index.cjs +7 -0
- package/dist/components/ActivityFeed/index.js +2 -0
- package/dist/components/Alert/Alert.cjs +42 -0
- package/dist/components/Alert/Alert.js +39 -0
- package/dist/components/Alert/index.cjs +5 -0
- package/dist/components/Alert/index.js +1 -0
- package/dist/components/Avatar/Avatar.cjs +101 -0
- package/dist/components/Avatar/Avatar.js +98 -0
- package/dist/components/Avatar/index.cjs +6 -0
- package/dist/components/Avatar/index.js +1 -0
- package/dist/components/Badge/Badge.cjs +53 -0
- package/dist/components/Badge/Badge.js +50 -0
- package/dist/components/Badge/index.cjs +5 -0
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Banner/Banner.cjs +83 -0
- package/dist/components/Banner/Banner.js +80 -0
- package/dist/components/Banner/index.cjs +5 -0
- package/dist/components/Banner/index.js +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs +31 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +28 -0
- package/dist/components/Breadcrumb/index.cjs +5 -0
- package/dist/components/Breadcrumb/index.js +1 -0
- package/dist/components/Button/Button.cjs +88 -0
- package/dist/components/Button/Button.js +85 -0
- package/dist/components/Button/index.cjs +5 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.cjs +8 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +5 -0
- package/dist/components/ButtonGroup/ButtonGroupItem.cjs +15 -0
- package/dist/components/ButtonGroup/ButtonGroupItem.js +12 -0
- package/dist/components/ButtonGroup/index.cjs +7 -0
- package/dist/components/ButtonGroup/index.js +2 -0
- package/dist/components/Card/Card.cjs +94 -0
- package/dist/components/Card/Card.js +91 -0
- package/dist/components/Card/index.cjs +9 -0
- package/dist/components/Card/index.js +1 -0
- package/dist/components/Chart/Chart.cjs +160 -0
- package/dist/components/Chart/Chart.js +153 -0
- package/dist/components/Chart/index.cjs +10 -0
- package/dist/components/Chart/index.js +2 -0
- package/dist/components/Chart/theme.cjs +67 -0
- package/dist/components/Chart/theme.js +62 -0
- package/dist/components/Chip/Chip.cjs +18 -0
- package/dist/components/Chip/Chip.js +15 -0
- package/dist/components/Chip/index.cjs +5 -0
- package/dist/components/Chip/index.js +1 -0
- package/dist/components/Counter/Counter.cjs +74 -0
- package/dist/components/Counter/Counter.js +71 -0
- package/dist/components/Counter/index.cjs +6 -0
- package/dist/components/Counter/index.js +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +343 -0
- package/dist/components/DatePicker/DatePicker.js +340 -0
- package/dist/components/DatePicker/index.cjs +5 -0
- package/dist/components/DatePicker/index.js +1 -0
- package/dist/components/Divider/Divider.cjs +31 -0
- package/dist/components/Divider/Divider.js +28 -0
- package/dist/components/Divider/index.cjs +5 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.cjs +108 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +105 -0
- package/dist/components/DropdownMenu/index.cjs +11 -0
- package/dist/components/DropdownMenu/index.js +1 -0
- package/dist/components/EmptyStateIllustration/EmptyStateIllustration.cjs +42 -0
- package/dist/components/EmptyStateIllustration/EmptyStateIllustration.js +39 -0
- package/dist/components/EmptyStateIllustration/illustrations.cjs +3322 -0
- package/dist/components/EmptyStateIllustration/illustrations.js +3319 -0
- package/dist/components/EmptyStateIllustration/index.cjs +7 -0
- package/dist/components/EmptyStateIllustration/index.js +2 -0
- package/dist/components/FileUpload/FileUpload.cjs +116 -0
- package/dist/components/FileUpload/FileUpload.js +113 -0
- package/dist/components/FileUpload/FileUploadDropZone.cjs +58 -0
- package/dist/components/FileUpload/FileUploadDropZone.js +55 -0
- package/dist/components/FileUpload/FileUploadIcons.cjs +55 -0
- package/dist/components/FileUpload/FileUploadIcons.js +50 -0
- package/dist/components/FileUpload/FileUploadItem.cjs +34 -0
- package/dist/components/FileUpload/FileUploadItem.js +31 -0
- package/dist/components/FileUpload/index.cjs +9 -0
- package/dist/components/FileUpload/index.js +3 -0
- package/dist/components/FormControl/Checkbox.cjs +27 -0
- package/dist/components/FormControl/Checkbox.js +24 -0
- package/dist/components/FormControl/Radio.cjs +15 -0
- package/dist/components/FormControl/Radio.js +12 -0
- package/dist/components/FormControl/Toggle.cjs +15 -0
- package/dist/components/FormControl/Toggle.js +12 -0
- package/dist/components/FormControl/index.cjs +9 -0
- package/dist/components/FormControl/index.js +3 -0
- package/dist/components/Icon/Icon.cjs +70 -0
- package/dist/components/Icon/Icon.js +34 -0
- package/dist/components/Icon/catalog.cjs +1672 -0
- package/dist/components/Icon/catalog.js +1669 -0
- package/dist/components/Icon/icons.cjs +5621 -0
- package/dist/components/Icon/icons.js +5610 -0
- package/dist/components/Icon/index.cjs +8 -0
- package/dist/components/Icon/index.js +2 -0
- package/dist/components/Input/Input.cjs +64 -0
- package/dist/components/Input/Input.js +61 -0
- package/dist/components/Input/index.cjs +5 -0
- package/dist/components/Input/index.js +1 -0
- package/dist/components/MetricsCard/MetricsCard.cjs +107 -0
- package/dist/components/MetricsCard/MetricsCard.js +104 -0
- package/dist/components/MetricsCard/index.cjs +5 -0
- package/dist/components/MetricsCard/index.js +1 -0
- package/dist/components/Modal/Modal.cjs +126 -0
- package/dist/components/Modal/Modal.js +123 -0
- package/dist/components/Modal/index.cjs +5 -0
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/Pagination/Pagination.cjs +42 -0
- package/dist/components/Pagination/Pagination.js +39 -0
- package/dist/components/Pagination/index.cjs +5 -0
- package/dist/components/Pagination/index.js +1 -0
- package/dist/components/ProgressBar/ProgressBar.cjs +34 -0
- package/dist/components/ProgressBar/ProgressBar.js +31 -0
- package/dist/components/ProgressBar/index.cjs +5 -0
- package/dist/components/ProgressBar/index.js +1 -0
- package/dist/components/ProgressCircle/ProgressCircle.cjs +34 -0
- package/dist/components/ProgressCircle/ProgressCircle.js +31 -0
- package/dist/components/ProgressCircle/index.cjs +5 -0
- package/dist/components/ProgressCircle/index.js +1 -0
- package/dist/components/Select/Select.cjs +84 -0
- package/dist/components/Select/Select.js +80 -0
- package/dist/components/Select/SelectOption.cjs +26 -0
- package/dist/components/Select/SelectOption.js +23 -0
- package/dist/components/Select/index.cjs +7 -0
- package/dist/components/Select/index.js +2 -0
- package/dist/components/SidebarMenu/SidebarMenu.cjs +85 -0
- package/dist/components/SidebarMenu/SidebarMenu.js +81 -0
- package/dist/components/SidebarMenu/SidebarMenuItem.cjs +126 -0
- package/dist/components/SidebarMenu/SidebarMenuItem.js +122 -0
- package/dist/components/SidebarMenu/SidebarMenuSection.cjs +14 -0
- package/dist/components/SidebarMenu/SidebarMenuSection.js +11 -0
- package/dist/components/SidebarMenu/index.cjs +12 -0
- package/dist/components/SidebarMenu/index.js +4 -0
- package/dist/components/Slider/Slider.cjs +161 -0
- package/dist/components/Slider/Slider.js +158 -0
- package/dist/components/Slider/index.cjs +6 -0
- package/dist/components/Slider/index.js +1 -0
- package/dist/components/Spinner/Spinner.cjs +93 -0
- package/dist/components/Spinner/Spinner.js +90 -0
- package/dist/components/Spinner/index.cjs +5 -0
- package/dist/components/Spinner/index.js +1 -0
- package/dist/components/Stepper/Stepper.cjs +82 -0
- package/dist/components/Stepper/Stepper.js +79 -0
- package/dist/components/Stepper/index.cjs +7 -0
- package/dist/components/Stepper/index.js +1 -0
- package/dist/components/Table/Table.cjs +25 -0
- package/dist/components/Table/Table.js +22 -0
- package/dist/components/Table/index.cjs +10 -0
- package/dist/components/Table/index.js +1 -0
- package/dist/components/Table/useTableSelection.cjs +60 -0
- package/dist/components/Table/useTableSelection.js +57 -0
- package/dist/components/Tabs/Tab.cjs +70 -0
- package/dist/components/Tabs/Tab.js +67 -0
- package/dist/components/Tabs/Tabs.cjs +133 -0
- package/dist/components/Tabs/Tabs.js +129 -0
- package/dist/components/Tabs/index.cjs +7 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Tooltip/Tooltip.cjs +101 -0
- package/dist/components/Tooltip/Tooltip.js +98 -0
- package/dist/components/Tooltip/index.cjs +5 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/context/ThemeContext.cjs +97 -0
- package/dist/context/ThemeContext.js +92 -0
- package/dist/fonts/README.md +13 -0
- package/dist/fonts/hanken-grotesk-cyrillic-ext-italic.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-cyrillic-ext-normal.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-ext-italic.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-ext-normal.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-italic.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-normal.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-vietnamese-italic.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-vietnamese-normal.woff2 +0 -0
- package/dist/fonts/hankengrotesk-LICENSE.txt +94 -0
- package/dist/fonts/manrope-LICENSE.txt +93 -0
- package/dist/fonts/manrope-cyrillic-ext-normal.woff2 +0 -0
- package/dist/fonts/manrope-cyrillic-normal.woff2 +0 -0
- package/dist/fonts/manrope-greek-normal.woff2 +0 -0
- package/dist/fonts/manrope-latin-ext-normal.woff2 +0 -0
- package/dist/fonts/manrope-latin-normal.woff2 +0 -0
- package/dist/fonts/manrope-vietnamese-normal.woff2 +0 -0
- package/dist/fonts.css +148 -0
- package/dist/hooks/form/index.cjs +11 -0
- package/dist/hooks/form/index.js +3 -0
- package/dist/hooks/form/useRaydenFormControl.cjs +81 -0
- package/dist/hooks/form/useRaydenFormControl.js +76 -0
- package/dist/hooks/form/useRaydenInput.cjs +38 -0
- package/dist/hooks/form/useRaydenInput.js +35 -0
- package/dist/hooks/form/useRaydenSelect.cjs +45 -0
- package/dist/hooks/form/useRaydenSelect.js +42 -0
- package/dist/hooks/index.cjs +17 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useBodyScrollLock.cjs +24 -0
- package/dist/hooks/useBodyScrollLock.js +21 -0
- package/dist/hooks/useCollisionAwareSide.cjs +72 -0
- package/dist/hooks/useCollisionAwareSide.js +69 -0
- package/dist/hooks/useControllableValue.cjs +16 -0
- package/dist/hooks/useControllableValue.js +13 -0
- package/dist/hooks/useDismissableLayer.cjs +100 -0
- package/dist/hooks/useDismissableLayer.js +97 -0
- package/dist/hooks/usePopupList.cjs +101 -0
- package/dist/hooks/usePopupList.js +98 -0
- package/dist/icons-8yD7I5jO.d.cts +430 -0
- package/dist/icons-8yD7I5jO.d.ts +430 -0
- package/dist/icons.cjs +2111 -418
- package/dist/icons.d.cts +1256 -429
- package/dist/icons.d.ts +1256 -429
- package/dist/icons.js +2089 -1
- package/dist/index.cjs +128 -15046
- package/dist/index.d.cts +697 -662
- package/dist/index.d.ts +697 -662
- package/dist/index.js +43 -14962
- package/dist/motion/Collapse.cjs +28 -0
- package/dist/motion/Collapse.js +25 -0
- package/dist/motion/MotionProvider.cjs +43 -0
- package/dist/motion/MotionProvider.js +38 -0
- package/dist/motion/Pressable.cjs +46 -0
- package/dist/motion/Pressable.js +43 -0
- package/dist/motion/Reveal.cjs +19 -0
- package/dist/motion/Reveal.js +16 -0
- package/dist/motion/SharedLayout.cjs +46 -0
- package/dist/motion/SharedLayout.js +43 -0
- package/dist/motion/index.cjs +19 -0
- package/dist/motion/index.js +6 -0
- package/dist/motion/presence.cjs +58 -0
- package/dist/motion/presence.js +55 -0
- package/dist/motion/presets.cjs +88 -0
- package/dist/motion/presets.js +84 -0
- package/dist/motion.d.cts +51 -0
- package/dist/motion.d.ts +51 -0
- package/dist/preset.cjs +356 -195
- package/dist/preset.d.cts +111 -32
- package/dist/preset.d.ts +111 -32
- package/dist/preset.js +353 -187
- package/dist/presets-Ba5QndHg.d.cts +144 -0
- package/dist/presets-Ba5QndHg.d.ts +144 -0
- package/dist/styles.css +1 -1
- package/dist/utils/cn.cjs +38 -0
- package/dist/utils/cn.js +35 -0
- package/dist/utils/resolveIcon.cjs +18 -0
- package/dist/utils/resolveIcon.js +15 -0
- package/package.json +79 -21
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const ease = {
|
|
2
|
+
enter: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
3
|
+
exit: "cubic-bezier(0.4, 0, 1, 1)",
|
|
4
|
+
standard: "cubic-bezier(0.25, 1, 0.5, 1)",
|
|
5
|
+
};
|
|
6
|
+
export const motionPresets = {
|
|
7
|
+
calm: {
|
|
8
|
+
duration: { instant: 0, fast: 100, normal: 220, slow: 280 },
|
|
9
|
+
ease,
|
|
10
|
+
distance: { micro: 2, short: 6 },
|
|
11
|
+
scale: { press: 0.98, enter: 0.98 },
|
|
12
|
+
},
|
|
13
|
+
snappy: {
|
|
14
|
+
duration: { instant: 0, fast: 80, normal: 140, slow: 180 },
|
|
15
|
+
ease,
|
|
16
|
+
distance: { micro: 2, short: 4 },
|
|
17
|
+
scale: { press: 0.97, enter: 0.98 },
|
|
18
|
+
},
|
|
19
|
+
playful: {
|
|
20
|
+
duration: { instant: 0, fast: 120, normal: 260, slow: 340 },
|
|
21
|
+
ease,
|
|
22
|
+
distance: { micro: 4, short: 12 },
|
|
23
|
+
scale: { press: 0.95, enter: 0.94 },
|
|
24
|
+
},
|
|
25
|
+
reduced: {
|
|
26
|
+
duration: { instant: 0, fast: 0, normal: 0, slow: 0 },
|
|
27
|
+
ease,
|
|
28
|
+
distance: { micro: 0, short: 0 },
|
|
29
|
+
scale: { press: 1, enter: 1 },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export const motionRecipes = {
|
|
33
|
+
"appear.fade": {
|
|
34
|
+
primitive: "Reveal",
|
|
35
|
+
purpose: "Reveal content without displacement",
|
|
36
|
+
reducedMotion: "Immediate visibility",
|
|
37
|
+
engine: "waapi",
|
|
38
|
+
},
|
|
39
|
+
"appear.fadeUp": {
|
|
40
|
+
primitive: "Reveal",
|
|
41
|
+
purpose: "Introduce newly available content",
|
|
42
|
+
reducedMotion: "Immediate visibility",
|
|
43
|
+
engine: "waapi",
|
|
44
|
+
},
|
|
45
|
+
"appear.scale": {
|
|
46
|
+
primitive: "Reveal",
|
|
47
|
+
purpose: "Introduce a compact surface",
|
|
48
|
+
reducedMotion: "Immediate visibility",
|
|
49
|
+
engine: "waapi",
|
|
50
|
+
},
|
|
51
|
+
"overlay.pop": {
|
|
52
|
+
primitive: "Modal",
|
|
53
|
+
purpose: "Open or dismiss a dialog panel",
|
|
54
|
+
reducedMotion: "Immediate open and close with focus preserved",
|
|
55
|
+
engine: "waapi",
|
|
56
|
+
},
|
|
57
|
+
"selection.slideIndicator": {
|
|
58
|
+
primitive: "SharedLayout",
|
|
59
|
+
purpose: "Track tab selection",
|
|
60
|
+
reducedMotion: "Immediate selection indicator",
|
|
61
|
+
engine: "waapi",
|
|
62
|
+
},
|
|
63
|
+
"selection.sharedPill": {
|
|
64
|
+
primitive: "SharedLayout",
|
|
65
|
+
purpose: "Track segmented or pill selection",
|
|
66
|
+
reducedMotion: "Immediate selection indicator",
|
|
67
|
+
engine: "waapi",
|
|
68
|
+
},
|
|
69
|
+
"disclosure.collapse": {
|
|
70
|
+
primitive: "Collapse",
|
|
71
|
+
purpose: "Expand optional content",
|
|
72
|
+
reducedMotion: "Immediate disclosure",
|
|
73
|
+
engine: "css",
|
|
74
|
+
},
|
|
75
|
+
"feedback.press": {
|
|
76
|
+
primitive: "Pressable",
|
|
77
|
+
purpose: "Acknowledge pointer and keyboard press",
|
|
78
|
+
reducedMotion: "Native focus and active state without scaling",
|
|
79
|
+
engine: "css",
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
export function getMotionRecipe(name, preset = "calm") {
|
|
83
|
+
return { name, ...motionRecipes[name], preset, tokens: motionPresets[preset] };
|
|
84
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { M as MotionPreset, a as MotionOption, b as MotionTokens, R as RevealRecipe } from './presets-Ba5QndHg.cjs';
|
|
2
|
+
export { c as MotionRecipeName, g as getMotionRecipe, m as motionPresets, d as motionRecipes } from './presets-Ba5QndHg.cjs';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
6
|
+
|
|
7
|
+
/** The server conservatively disables motion; hydration adopts the user's preference. */
|
|
8
|
+
declare function useReducedMotionPreference(): boolean;
|
|
9
|
+
interface MotionProviderProps {
|
|
10
|
+
preset?: MotionPreset;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/** Context-only scope: nested scopes and React portals inherit without mutating document root. */
|
|
14
|
+
declare function MotionProvider({ preset, children }: MotionProviderProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
/** Passing false disables this element's motion. OS reduced motion always wins. */
|
|
16
|
+
declare function useRaydenMotion(option?: MotionOption): {
|
|
17
|
+
requestedPreset: MotionPreset;
|
|
18
|
+
preset: MotionPreset;
|
|
19
|
+
reducedMotion: boolean;
|
|
20
|
+
tokens: MotionTokens;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
interface PressableProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
24
|
+
motion?: MotionOption;
|
|
25
|
+
}
|
|
26
|
+
/** Native button semantics, focus and activation are retained; only press feedback is added. */
|
|
27
|
+
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
|
|
29
|
+
interface RevealProps extends HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
present?: boolean;
|
|
31
|
+
motion?: MotionOption;
|
|
32
|
+
recipe?: RevealRecipe;
|
|
33
|
+
}
|
|
34
|
+
/** Presence for non-interactive content; exiting content is inert immediately. */
|
|
35
|
+
declare function Reveal({ present, motion, recipe, children, ...props }: RevealProps): react_jsx_runtime.JSX.Element | null;
|
|
36
|
+
|
|
37
|
+
interface CollapseProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
open: boolean;
|
|
39
|
+
motion?: MotionOption;
|
|
40
|
+
}
|
|
41
|
+
/** Disclosure region. Supply an external trigger with aria-expanded and aria-controls. */
|
|
42
|
+
declare function Collapse({ open, motion, children, style, ...props }: CollapseProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface SharedLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
45
|
+
layoutKey: string | number;
|
|
46
|
+
motion?: MotionOption;
|
|
47
|
+
}
|
|
48
|
+
/** FLIP animation of this persistent element's geometry when layoutKey changes. Not cross-tree presence. */
|
|
49
|
+
declare function SharedLayout({ layoutKey, motion, children, ...props }: SharedLayoutProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { Collapse, type CollapseProps, MotionOption, MotionPreset, MotionProvider, type MotionProviderProps, MotionTokens, Pressable, type PressableProps, Reveal, type RevealProps, RevealRecipe, SharedLayout, type SharedLayoutProps, useRaydenMotion, useReducedMotionPreference };
|
package/dist/motion.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { M as MotionPreset, a as MotionOption, b as MotionTokens, R as RevealRecipe } from './presets-Ba5QndHg.js';
|
|
2
|
+
export { c as MotionRecipeName, g as getMotionRecipe, m as motionPresets, d as motionRecipes } from './presets-Ba5QndHg.js';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
6
|
+
|
|
7
|
+
/** The server conservatively disables motion; hydration adopts the user's preference. */
|
|
8
|
+
declare function useReducedMotionPreference(): boolean;
|
|
9
|
+
interface MotionProviderProps {
|
|
10
|
+
preset?: MotionPreset;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/** Context-only scope: nested scopes and React portals inherit without mutating document root. */
|
|
14
|
+
declare function MotionProvider({ preset, children }: MotionProviderProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
/** Passing false disables this element's motion. OS reduced motion always wins. */
|
|
16
|
+
declare function useRaydenMotion(option?: MotionOption): {
|
|
17
|
+
requestedPreset: MotionPreset;
|
|
18
|
+
preset: MotionPreset;
|
|
19
|
+
reducedMotion: boolean;
|
|
20
|
+
tokens: MotionTokens;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
interface PressableProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
24
|
+
motion?: MotionOption;
|
|
25
|
+
}
|
|
26
|
+
/** Native button semantics, focus and activation are retained; only press feedback is added. */
|
|
27
|
+
declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
|
|
29
|
+
interface RevealProps extends HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
present?: boolean;
|
|
31
|
+
motion?: MotionOption;
|
|
32
|
+
recipe?: RevealRecipe;
|
|
33
|
+
}
|
|
34
|
+
/** Presence for non-interactive content; exiting content is inert immediately. */
|
|
35
|
+
declare function Reveal({ present, motion, recipe, children, ...props }: RevealProps): react_jsx_runtime.JSX.Element | null;
|
|
36
|
+
|
|
37
|
+
interface CollapseProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
open: boolean;
|
|
39
|
+
motion?: MotionOption;
|
|
40
|
+
}
|
|
41
|
+
/** Disclosure region. Supply an external trigger with aria-expanded and aria-controls. */
|
|
42
|
+
declare function Collapse({ open, motion, children, style, ...props }: CollapseProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
interface SharedLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
45
|
+
layoutKey: string | number;
|
|
46
|
+
motion?: MotionOption;
|
|
47
|
+
}
|
|
48
|
+
/** FLIP animation of this persistent element's geometry when layoutKey changes. Not cross-tree presence. */
|
|
49
|
+
declare function SharedLayout({ layoutKey, motion, children, ...props }: SharedLayoutProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { Collapse, type CollapseProps, MotionOption, MotionPreset, MotionProvider, type MotionProviderProps, MotionTokens, Pressable, type PressableProps, Reveal, type RevealProps, RevealRecipe, SharedLayout, type SharedLayoutProps, useRaydenMotion, useReducedMotionPreference };
|