@code0-tech/pictor 0.18.3 → 1.0.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/assets/components/button/Button.style.css +1 -1
- package/dist/assets/components/command/Command.style.css +1 -1
- package/dist/assets/components/context-menu/ContextMenu.style.css +1 -1
- package/dist/assets/components/dialog/Dialog.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/form/SelectInput.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
- package/dist/assets/components/tab/Tab.style.css +1 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +9 -8
- package/dist/components/context-menu/ContextMenu.d.ts +1 -1
- package/dist/components/context-menu/ContextMenu.js +89 -102
- package/dist/components/data-table/DataTable.js +11 -10
- package/dist/components/dialog/Dialog.js +75 -80
- package/dist/components/editor/Editor.js +3 -2
- package/dist/components/form/Input.js +18 -17
- package/dist/components/form/NumberInput.js +4 -4
- package/dist/components/form/PasswordInput.js +15 -15
- package/dist/components/form/TextInput.js +7 -7
- package/dist/components/gantt/GanttGroup.js +40 -39
- package/dist/components/json-view/JsonView.js +3 -3
- package/dist/components/menu/Menu.js +104 -117
- package/dist/components/progress/ProgressCircle.js +7 -6
- package/dist/components/progress/ProgressLinear.js +6 -5
- package/dist/components/segmented-control/SegmentedControl.d.ts +2 -2
- package/dist/components/segmented-control/SegmentedControl.js +44 -20
- package/dist/components/tab/Tab.js +58 -32
- package/dist/components/toast/Toast.d.ts +1 -1
- package/dist/components/toast/Toast.js +64 -65
- package/dist/components/tooltip/Tooltip.js +46 -51
- package/dist/index.js +181 -170
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +12 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +25 -14
- package/dist/utils/motion.d.ts +55 -0
- package/dist/utils/motion.js +115 -0
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Alert as
|
|
1
|
+
import { Alert as t } from "./components/alert/Alert.js";
|
|
2
2
|
import { AuroraBackground as n } from "./components/aurora/Aurora.js";
|
|
3
3
|
import { Avatar as p } from "./components/avatar/Avatar.js";
|
|
4
4
|
import { Badge as i } from "./components/badge/Badge.js";
|
|
@@ -6,105 +6,106 @@ import { Breadcrumb as m } from "./components/breadcrumb/Breadcrumb.js";
|
|
|
6
6
|
import { Button as g } from "./components/button/Button.js";
|
|
7
7
|
import { ButtonGroup as f } from "./components/button-group/ButtonGroup.js";
|
|
8
8
|
import { Card as T } from "./components/card/Card.js";
|
|
9
|
-
import { LineChart as
|
|
10
|
-
import { ChartContainer as
|
|
9
|
+
import { LineChart as d } from "./components/chart/LineChart.js";
|
|
10
|
+
import { ChartContainer as b, ChartLegendContent as c, ChartTooltipContent as M } from "./components/chart/Chart.js";
|
|
11
11
|
import { Col as F } from "./components/col/Col.js";
|
|
12
|
-
import { Command as A, CommandDialog as
|
|
12
|
+
import { Command as A, CommandDialog as v, CommandEmpty as w, CommandGroup as h, CommandInput as V, CommandItem as L, CommandList as R, CommandSeparator as E, CommandShortcut as G } from "./components/command/Command.js";
|
|
13
13
|
import { Container as z } from "./components/container/Container.js";
|
|
14
|
-
import { ContextMenu as H, ContextMenuArrow as
|
|
14
|
+
import { ContextMenu as H, ContextMenuArrow as O, ContextMenuContent as k, ContextMenuGroup as N, ContextMenuItem as Q, ContextMenuLabel as J, ContextMenuPortal as j, ContextMenuSeparator as q, ContextMenuSub as K, ContextMenuSubContent as U, ContextMenuSubTrigger as W, ContextMenuTrigger as X } from "./components/context-menu/ContextMenu.js";
|
|
15
15
|
import { DataTable as Z } from "./components/data-table/DataTable.js";
|
|
16
16
|
import { DataTableColumn as $ } from "./components/data-table/DataTableColumn.js";
|
|
17
|
-
import { DataTableHeader as
|
|
17
|
+
import { DataTableHeader as oe, DataTableHeaderColumn as te } from "./components/data-table/DataTableHeader.js";
|
|
18
18
|
import { DataTableMaxPaginationValue as ne, DataTablePagination as ae, DataTablePaginationBackwardsTrigger as pe, DataTablePaginationContext as ue, DataTablePaginationForwardTrigger as ie, DataTablePaginationValue as le, useDataTablePagination as me } from "./components/data-table/DataTablePagination.js";
|
|
19
19
|
import { DataTableFilterInput as ge, createFilterQueryLanguage as Ie } from "./components/data-table/DataTableFilterInput.js";
|
|
20
20
|
import { DataTableFilterSuggestionMenu as Ce } from "./components/data-table/DataTableFilterSuggestionMenu.js";
|
|
21
|
-
import { Dialog as
|
|
22
|
-
import { Editor as
|
|
21
|
+
import { Dialog as se, DialogClose as de, DialogContent as Se, DialogDescription as be, DialogFooter as ce, DialogHeader as Me, DialogOverlay as De, DialogPortal as Fe, DialogTitle as Pe, DialogTrigger as Ae } from "./components/dialog/Dialog.js";
|
|
22
|
+
import { Editor as we } from "./components/editor/Editor.js";
|
|
23
23
|
import { FileTabsService as Ve } from "./components/file-tabs/FileTabs.service.js";
|
|
24
|
-
import { FileTabs as
|
|
24
|
+
import { FileTabs as Re, FileTabsContent as Ee, FileTabsList as Ge, FileTabsTrigger as ye } from "./components/file-tabs/FileTabs.js";
|
|
25
25
|
import { Flex as Be } from "./components/flex/Flex.js";
|
|
26
|
-
import { CheckboxInput as
|
|
27
|
-
import { ColorInput as
|
|
28
|
-
import { DateInput as We, DateInputContent as Xe, DateInputControl as Ye, DateInputField as Ze, DateInputNextTrigger as _e, DateInputPrevTrigger as $e, DateInputTrigger as
|
|
29
|
-
import { EditorInput as
|
|
30
|
-
import { EmailInput as
|
|
31
|
-
import { FileInput as
|
|
32
|
-
import { Input as
|
|
33
|
-
import { InputDescription as
|
|
34
|
-
import { InputLabel as
|
|
35
|
-
import { InputMessage as
|
|
36
|
-
import { NumberInput as
|
|
37
|
-
import { PasswordInput as
|
|
38
|
-
import { PinInput as
|
|
39
|
-
import { RadioGroup as
|
|
40
|
-
import { RadioInput as
|
|
41
|
-
import { SelectContent as
|
|
42
|
-
import { SwitchInput as
|
|
43
|
-
import { TagInput as
|
|
44
|
-
import { TextAreaInput as
|
|
45
|
-
import { TextInput as
|
|
46
|
-
import { useForm as
|
|
47
|
-
import { JsonView as
|
|
48
|
-
import { FullScreen as
|
|
49
|
-
import { Gantt as
|
|
50
|
-
import { Icon as
|
|
51
|
-
import { Layout as
|
|
52
|
-
import { Menu as
|
|
53
|
-
import { ProgressLinear as
|
|
54
|
-
import { ProgressCircle as
|
|
55
|
-
import { Quote as
|
|
56
|
-
import { ResizableHandle as
|
|
26
|
+
import { CheckboxInput as Oe } from "./components/form/CheckboxInput.js";
|
|
27
|
+
import { ColorInput as Ne, ColorInputContent as Qe, ColorInputControl as Je, ColorInputSwatch as je, ColorInputTrigger as qe, ColorInputValueText as Ke } from "./components/form/ColorInput.js";
|
|
28
|
+
import { DateInput as We, DateInputContent as Xe, DateInputControl as Ye, DateInputField as Ze, DateInputNextTrigger as _e, DateInputPrevTrigger as $e, DateInputTrigger as eo } from "./components/form/DateInput.js";
|
|
29
|
+
import { EditorInput as to, EditorInputMenu as ro, EditorInputMenuItem as no, EditorInputSubMenu as ao, EditorInputTrigger as po, EditorInputValue as uo } from "./components/form/EditorInput.js";
|
|
30
|
+
import { EmailInput as lo, emailValidation as mo } from "./components/form/EmailInput.js";
|
|
31
|
+
import { FileInput as go, FileInputContext as Io, FileInputDropzone as fo, FileInputHiddenInput as Co, FileInputItem as To, FileInputItemDeleteTrigger as so, FileInputItemGroup as So, FileInputItemName as bo, FileInputItemPreview as co, FileInputItemPreviewImage as Mo, FileInputItemSizeText as Do, FileInputTrigger as Fo } from "./components/form/FileInput.js";
|
|
32
|
+
import { Input as Ao } from "./components/form/Input.js";
|
|
33
|
+
import { InputDescription as wo } from "./components/form/InputDescription.js";
|
|
34
|
+
import { InputLabel as Vo } from "./components/form/InputLabel.js";
|
|
35
|
+
import { InputMessage as Ro } from "./components/form/InputMessage.js";
|
|
36
|
+
import { NumberInput as Go } from "./components/form/NumberInput.js";
|
|
37
|
+
import { PasswordInput as zo, passwordValidation as Bo } from "./components/form/PasswordInput.js";
|
|
38
|
+
import { PinInput as Oo, PinInputField as ko, PinInputHiddenField as No } from "./components/form/PinInput.js";
|
|
39
|
+
import { RadioGroup as Jo } from "./components/form/RadioGroup.js";
|
|
40
|
+
import { RadioInput as qo } from "./components/form/RadioInput.js";
|
|
41
|
+
import { SelectContent as Uo, SelectInput as Wo, SelectItem as Xo, SelectItemText as Yo, SelectPortal as Zo, SelectTrigger as _o, SelectValue as $o, SelectViewport as et } from "./components/form/SelectInput.js";
|
|
42
|
+
import { SwitchInput as tt } from "./components/form/SwitchInput.js";
|
|
43
|
+
import { TagInput as nt, TagInputMenu as at, TagInputMenuItem as pt, TagInputSubMenu as ut, TagInputTrigger as it, TagInputValue as lt } from "./components/form/TagInput.js";
|
|
44
|
+
import { TextAreaInput as xt } from "./components/form/TextAreaInput.js";
|
|
45
|
+
import { TextInput as It } from "./components/form/TextInput.js";
|
|
46
|
+
import { useForm as Ct } from "./components/form/useForm.js";
|
|
47
|
+
import { JsonView as st } from "./components/json-view/JsonView.js";
|
|
48
|
+
import { FullScreen as St } from "./components/fullscreen/FullScreen.js";
|
|
49
|
+
import { Gantt as ct, getRelativeValue as Mt } from "./components/gantt/Gantt.js";
|
|
50
|
+
import { Icon as Ft, resolveIcon as Pt } from "./components/icon/Icon.js";
|
|
51
|
+
import { Layout as vt } from "./components/layout/Layout.js";
|
|
52
|
+
import { Menu as ht, MenuArrow as Vt, MenuCheckboxItem as Lt, MenuContent as Rt, MenuGroup as Et, MenuItem as Gt, MenuItemIndicator as yt, MenuLabel as zt, MenuPortal as Bt, MenuSeparator as Ht, MenuSub as Ot, MenuSubContent as kt, MenuSubTrigger as Nt, MenuTrigger as Qt } from "./components/menu/Menu.js";
|
|
53
|
+
import { ProgressLinear as jt } from "./components/progress/ProgressLinear.js";
|
|
54
|
+
import { ProgressCircle as Kt } from "./components/progress/ProgressCircle.js";
|
|
55
|
+
import { Quote as Wt } from "./components/quote/Quote.js";
|
|
56
|
+
import { ResizableHandle as Yt, ResizablePanel as Zt, ResizablePanelGroup as _t } from "./components/resizable/Resizable.js";
|
|
57
57
|
import { Row as er } from "./components/row/Row.js";
|
|
58
|
-
import { AutoScrollArea as
|
|
58
|
+
import { AutoScrollArea as tr, ScrollArea as rr, ScrollAreaCorner as nr, ScrollAreaScrollbar as ar, ScrollAreaThumb as pr, ScrollAreaViewport as ur } from "./components/scroll-area/ScrollArea.js";
|
|
59
59
|
import { SegmentedControl as lr, SegmentedControlItem as mr } from "./components/segmented-control/SegmentedControl.js";
|
|
60
60
|
import { Spacing as gr } from "./components/spacing/Spacing.js";
|
|
61
|
-
import { Tab as fr, TabContent as Cr, TabList as Tr, TabTrigger as
|
|
62
|
-
import { Text as
|
|
63
|
-
import { Toast as
|
|
64
|
-
import { Tooltip as Fr, TooltipArrow as Pr, TooltipContent as Ar, TooltipPortal as
|
|
65
|
-
import { ContextStore as Vr, ContextStoreProvider as Lr, useService as
|
|
61
|
+
import { Tab as fr, TabContent as Cr, TabList as Tr, TabTrigger as sr } from "./components/tab/Tab.js";
|
|
62
|
+
import { Text as Sr } from "./components/text/Text.js";
|
|
63
|
+
import { Toast as cr, toast as Mr } from "./components/toast/Toast.js";
|
|
64
|
+
import { Tooltip as Fr, TooltipArrow as Pr, TooltipContent as Ar, TooltipPortal as vr, TooltipTrigger as wr } from "./components/tooltip/Tooltip.js";
|
|
65
|
+
import { ContextStore as Vr, ContextStoreProvider as Lr, useService as Rr, useStore as Er } from "./utils/contextStore.js";
|
|
66
66
|
import { ReactiveArrayService as yr, useReactiveArrayService as zr } from "./utils/reactiveArrayService.js";
|
|
67
67
|
import { mergeComponentProps as Hr } from "./utils/component.js";
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
68
|
+
import { crossFade as kr, popperTransformOrigin as Nr, spring as Qr, springs as Jr, useObservedOpen as jr, useObservedValue as qr, usePopperMotion as Kr, useReducedMotionSafe as Ur, useScrimMotion as Wr, useSurfaceMotion as Xr } from "./utils/motion.js";
|
|
69
|
+
import { Colors as Zr, hashToColor as _r, withAlpha as $r } from "./utils/color.js";
|
|
70
|
+
import { getSize as on } from "./utils/size.js";
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
t as Alert,
|
|
72
73
|
n as AuroraBackground,
|
|
73
|
-
|
|
74
|
+
tr as AutoScrollArea,
|
|
74
75
|
p as Avatar,
|
|
75
76
|
i as Badge,
|
|
76
77
|
m as Breadcrumb,
|
|
77
78
|
g as Button,
|
|
78
79
|
f as ButtonGroup,
|
|
79
80
|
T as Card,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
b as ChartContainer,
|
|
82
|
+
c as ChartLegendContent,
|
|
83
|
+
M as ChartTooltipContent,
|
|
84
|
+
Oe as CheckboxInput,
|
|
84
85
|
F as Col,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
Ne as ColorInput,
|
|
87
|
+
Qe as ColorInputContent,
|
|
88
|
+
Je as ColorInputControl,
|
|
88
89
|
je as ColorInputSwatch,
|
|
89
90
|
qe as ColorInputTrigger,
|
|
90
91
|
Ke as ColorInputValueText,
|
|
91
|
-
|
|
92
|
+
Zr as Colors,
|
|
92
93
|
A as Command,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
v as CommandDialog,
|
|
95
|
+
w as CommandEmpty,
|
|
96
|
+
h as CommandGroup,
|
|
96
97
|
V as CommandInput,
|
|
97
98
|
L as CommandItem,
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
R as CommandList,
|
|
100
|
+
E as CommandSeparator,
|
|
100
101
|
G as CommandShortcut,
|
|
101
102
|
z as Container,
|
|
102
103
|
H as ContextMenu,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
O as ContextMenuArrow,
|
|
105
|
+
k as ContextMenuContent,
|
|
106
|
+
N as ContextMenuGroup,
|
|
107
|
+
Q as ContextMenuItem,
|
|
108
|
+
J as ContextMenuLabel,
|
|
108
109
|
j as ContextMenuPortal,
|
|
109
110
|
q as ContextMenuSeparator,
|
|
110
111
|
K as ContextMenuSub,
|
|
@@ -117,8 +118,8 @@ export {
|
|
|
117
118
|
$ as DataTableColumn,
|
|
118
119
|
ge as DataTableFilterInput,
|
|
119
120
|
Ce as DataTableFilterSuggestionMenu,
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
oe as DataTableHeader,
|
|
122
|
+
te as DataTableHeaderColumn,
|
|
122
123
|
ne as DataTableMaxPaginationValue,
|
|
123
124
|
ae as DataTablePagination,
|
|
124
125
|
pe as DataTablePaginationBackwardsTrigger,
|
|
@@ -131,81 +132,81 @@ export {
|
|
|
131
132
|
Ze as DateInputField,
|
|
132
133
|
_e as DateInputNextTrigger,
|
|
133
134
|
$e as DateInputPrevTrigger,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
eo as DateInputTrigger,
|
|
136
|
+
se as Dialog,
|
|
137
|
+
de as DialogClose,
|
|
138
|
+
Se as DialogContent,
|
|
139
|
+
be as DialogDescription,
|
|
140
|
+
ce as DialogFooter,
|
|
141
|
+
Me as DialogHeader,
|
|
142
|
+
De as DialogOverlay,
|
|
142
143
|
Fe as DialogPortal,
|
|
143
144
|
Pe as DialogTitle,
|
|
144
145
|
Ae as DialogTrigger,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
146
|
+
we as Editor,
|
|
147
|
+
to as EditorInput,
|
|
148
|
+
ro as EditorInputMenu,
|
|
149
|
+
no as EditorInputMenuItem,
|
|
150
|
+
ao as EditorInputSubMenu,
|
|
151
|
+
po as EditorInputTrigger,
|
|
152
|
+
uo as EditorInputValue,
|
|
153
|
+
lo as EmailInput,
|
|
154
|
+
go as FileInput,
|
|
155
|
+
Io as FileInputContext,
|
|
156
|
+
fo as FileInputDropzone,
|
|
157
|
+
Co as FileInputHiddenInput,
|
|
158
|
+
To as FileInputItem,
|
|
159
|
+
so as FileInputItemDeleteTrigger,
|
|
160
|
+
So as FileInputItemGroup,
|
|
161
|
+
bo as FileInputItemName,
|
|
162
|
+
co as FileInputItemPreview,
|
|
163
|
+
Mo as FileInputItemPreviewImage,
|
|
164
|
+
Do as FileInputItemSizeText,
|
|
165
|
+
Fo as FileInputTrigger,
|
|
166
|
+
Re as FileTabs,
|
|
167
|
+
Ee as FileTabsContent,
|
|
167
168
|
Ge as FileTabsList,
|
|
168
169
|
Ve as FileTabsService,
|
|
169
170
|
ye as FileTabsTrigger,
|
|
170
171
|
Be as Flex,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
172
|
+
St as FullScreen,
|
|
173
|
+
ct as Gantt,
|
|
174
|
+
Ft as Icon,
|
|
175
|
+
Ao as Input,
|
|
176
|
+
wo as InputDescription,
|
|
177
|
+
Vo as InputLabel,
|
|
178
|
+
Ro as InputMessage,
|
|
179
|
+
st as JsonView,
|
|
180
|
+
vt as Layout,
|
|
181
|
+
d as LineChart,
|
|
182
|
+
ht as Menu,
|
|
183
|
+
Vt as MenuArrow,
|
|
184
|
+
Lt as MenuCheckboxItem,
|
|
185
|
+
Rt as MenuContent,
|
|
186
|
+
Et as MenuGroup,
|
|
187
|
+
Gt as MenuItem,
|
|
188
|
+
yt as MenuItemIndicator,
|
|
189
|
+
zt as MenuLabel,
|
|
190
|
+
Bt as MenuPortal,
|
|
191
|
+
Ht as MenuSeparator,
|
|
192
|
+
Ot as MenuSub,
|
|
193
|
+
kt as MenuSubContent,
|
|
194
|
+
Nt as MenuSubTrigger,
|
|
195
|
+
Qt as MenuTrigger,
|
|
196
|
+
Go as NumberInput,
|
|
197
|
+
zo as PasswordInput,
|
|
198
|
+
Oo as PinInput,
|
|
199
|
+
ko as PinInputField,
|
|
200
|
+
No as PinInputHiddenField,
|
|
201
|
+
Kt as ProgressCircle,
|
|
202
|
+
jt as ProgressLinear,
|
|
203
|
+
Wt as Quote,
|
|
204
|
+
Jo as RadioGroup,
|
|
205
|
+
qo as RadioInput,
|
|
205
206
|
yr as ReactiveArrayService,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
Yt as ResizableHandle,
|
|
208
|
+
Zt as ResizablePanel,
|
|
209
|
+
_t as ResizablePanelGroup,
|
|
209
210
|
er as Row,
|
|
210
211
|
rr as ScrollArea,
|
|
211
212
|
nr as ScrollAreaCorner,
|
|
@@ -214,48 +215,58 @@ export {
|
|
|
214
215
|
ur as ScrollAreaViewport,
|
|
215
216
|
lr as SegmentedControl,
|
|
216
217
|
mr as SegmentedControlItem,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
218
|
+
Uo as SelectContent,
|
|
219
|
+
Wo as SelectInput,
|
|
220
|
+
Xo as SelectItem,
|
|
221
|
+
Yo as SelectItemText,
|
|
222
|
+
Zo as SelectPortal,
|
|
223
|
+
_o as SelectTrigger,
|
|
224
|
+
$o as SelectValue,
|
|
225
|
+
et as SelectViewport,
|
|
225
226
|
gr as Spacing,
|
|
226
|
-
|
|
227
|
+
tt as SwitchInput,
|
|
227
228
|
fr as Tab,
|
|
228
229
|
Cr as TabContent,
|
|
229
230
|
Tr as TabList,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
231
|
+
sr as TabTrigger,
|
|
232
|
+
nt as TagInput,
|
|
233
|
+
at as TagInputMenu,
|
|
234
|
+
pt as TagInputMenuItem,
|
|
235
|
+
ut as TagInputSubMenu,
|
|
236
|
+
it as TagInputTrigger,
|
|
237
|
+
lt as TagInputValue,
|
|
238
|
+
Sr as Text,
|
|
239
|
+
xt as TextAreaInput,
|
|
240
|
+
It as TextInput,
|
|
241
|
+
cr as Toast,
|
|
241
242
|
Fr as Tooltip,
|
|
242
243
|
Pr as TooltipArrow,
|
|
243
244
|
Ar as TooltipContent,
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
vr as TooltipPortal,
|
|
246
|
+
wr as TooltipTrigger,
|
|
246
247
|
Ie as createFilterQueryLanguage,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
kr as crossFade,
|
|
249
|
+
mo as emailValidation,
|
|
250
|
+
Mt as getRelativeValue,
|
|
251
|
+
on as getSize,
|
|
252
|
+
_r as hashToColor,
|
|
251
253
|
Hr as mergeComponentProps,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
Bo as passwordValidation,
|
|
255
|
+
Nr as popperTransformOrigin,
|
|
256
|
+
Pt as resolveIcon,
|
|
257
|
+
Qr as spring,
|
|
258
|
+
Jr as springs,
|
|
259
|
+
Mr as toast,
|
|
255
260
|
me as useDataTablePagination,
|
|
256
|
-
|
|
261
|
+
Ct as useForm,
|
|
262
|
+
jr as useObservedOpen,
|
|
263
|
+
qr as useObservedValue,
|
|
264
|
+
Kr as usePopperMotion,
|
|
257
265
|
zr as useReactiveArrayService,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
266
|
+
Ur as useReducedMotionSafe,
|
|
267
|
+
Wr as useScrimMotion,
|
|
268
|
+
Rr as useService,
|
|
269
|
+
Er as useStore,
|
|
270
|
+
Xr as useSurfaceMotion,
|
|
271
|
+
$r as withAlpha
|
|
261
272
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useState as o } from "react";
|
|
2
|
+
import { hasReducedMotionListener as r, prefersReducedMotion as t } from "../../../../../motion-dom/dist/es/render/utils/reduced-motion/state.js";
|
|
3
|
+
import { initPrefersReducedMotion as n } from "../../../../../motion-dom/dist/es/render/utils/reduced-motion/index.js";
|
|
4
|
+
import { warnOnce as i } from "../../../../../motion-utils/dist/es/warn-once.js";
|
|
5
|
+
function a() {
|
|
6
|
+
!r.current && n();
|
|
7
|
+
const [e] = o(t.current);
|
|
8
|
+
return process.env.NODE_ENV !== "production" && i(e !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), e;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
a as useReducedMotion
|
|
12
|
+
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
import { ContextStore as o, ContextStoreProvider as t, useService as
|
|
2
|
-
import { ReactiveArrayService as
|
|
3
|
-
import { mergeComponentProps as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ContextStore as o, ContextStoreProvider as t, useService as s, useStore as i } from "./contextStore.js";
|
|
2
|
+
import { ReactiveArrayService as n, useReactiveArrayService as u } from "./reactiveArrayService.js";
|
|
3
|
+
import { mergeComponentProps as m } from "./component.js";
|
|
4
|
+
import { crossFade as c, popperTransformOrigin as f, spring as v, springs as x, useObservedOpen as d, useObservedValue as g, usePopperMotion as C, useReducedMotionSafe as h, useScrimMotion as l, useSurfaceMotion as M } from "./motion.js";
|
|
5
|
+
import { Colors as A, hashToColor as P, withAlpha as R } from "./color.js";
|
|
6
|
+
import { getSize as y } from "./size.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
A as Colors,
|
|
8
9
|
o as ContextStore,
|
|
9
10
|
t as ContextStoreProvider,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
n as ReactiveArrayService,
|
|
12
|
+
c as crossFade,
|
|
13
|
+
y as getSize,
|
|
14
|
+
P as hashToColor,
|
|
15
|
+
m as mergeComponentProps,
|
|
16
|
+
f as popperTransformOrigin,
|
|
17
|
+
v as spring,
|
|
18
|
+
x as springs,
|
|
19
|
+
d as useObservedOpen,
|
|
20
|
+
g as useObservedValue,
|
|
21
|
+
C as usePopperMotion,
|
|
22
|
+
u as useReactiveArrayService,
|
|
23
|
+
h as useReducedMotionSafe,
|
|
24
|
+
l as useScrimMotion,
|
|
25
|
+
s as useService,
|
|
26
|
+
i as useStore,
|
|
27
|
+
M as useSurfaceMotion,
|
|
28
|
+
R as withAlpha
|
|
18
29
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TargetAndTransition, Transition } from 'motion/react';
|
|
3
|
+
/**
|
|
4
|
+
* Apple describes springs with two designer facing parameters instead of the
|
|
5
|
+
* physics triplet: damping (how much it overshoots, 1 = no bounce) and response
|
|
6
|
+
* (how quickly the value reaches its target, in seconds). Motion's spring takes
|
|
7
|
+
* bounce + duration, which maps onto those directly.
|
|
8
|
+
*/
|
|
9
|
+
export declare const spring: (damping: number, response: number) => Transition;
|
|
10
|
+
export declare const springs: {
|
|
11
|
+
ui: Transition;
|
|
12
|
+
surface: Transition;
|
|
13
|
+
momentum: Transition;
|
|
14
|
+
sheet: Transition;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Reduced motion does not mean no feedback - it means a short, non vestibular
|
|
18
|
+
* cross fade instead of a spring.
|
|
19
|
+
*/
|
|
20
|
+
export declare const crossFade: Transition;
|
|
21
|
+
export declare const useReducedMotionSafe: () => boolean;
|
|
22
|
+
export interface PresenceMotion {
|
|
23
|
+
initial: TargetAndTransition;
|
|
24
|
+
animate: TargetAndTransition;
|
|
25
|
+
exit: TargetAndTransition;
|
|
26
|
+
transition: Transition;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Motion for popper surfaces (menus, tooltips, selects). Pair it with
|
|
30
|
+
* {@link popperTransformOrigin} so the surface grows out of its trigger rather
|
|
31
|
+
* than out of its own centre.
|
|
32
|
+
*/
|
|
33
|
+
export declare const usePopperMotion: () => PresenceMotion;
|
|
34
|
+
/** Motion for modal surfaces, which are bigger and therefore settle slower. */
|
|
35
|
+
export declare const useSurfaceMotion: () => PresenceMotion;
|
|
36
|
+
/** Motion for the scrim behind a modal surface: dim and blur to focus. */
|
|
37
|
+
export declare const useScrimMotion: (blur?: number) => PresenceMotion;
|
|
38
|
+
/**
|
|
39
|
+
* Radix exposes the anchor it computed as a custom property on the popper
|
|
40
|
+
* wrapper. Custom properties inherit, so the content element can use it to
|
|
41
|
+
* scale out of the element that opened it.
|
|
42
|
+
*/
|
|
43
|
+
export declare const popperTransformOrigin: (name: string) => React.CSSProperties;
|
|
44
|
+
/**
|
|
45
|
+
* Keeps track of an overlay's open state without taking control of it away
|
|
46
|
+
* from the consumer: a passed `open` prop always wins, an uncontrolled overlay
|
|
47
|
+
* is observed through `onOpenChange`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const useObservedOpen: (open: boolean | undefined, defaultOpen: boolean | undefined, onOpenChange: ((open: boolean) => void) | undefined) => [boolean, (open: boolean) => void];
|
|
50
|
+
/**
|
|
51
|
+
* The same idea as {@link useObservedOpen} for the single selected value of a
|
|
52
|
+
* tab list or a segmented control, which a sliding indicator has to know about
|
|
53
|
+
* one level above the items.
|
|
54
|
+
*/
|
|
55
|
+
export declare const useObservedValue: (value: string | undefined, defaultValue: string | undefined, onValueChange: ((value: string) => void) | undefined) => [string | undefined, (value: string) => void];
|