@code0-tech/pictor 0.7.2 → 0.9.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/form/FileInput.style.css +1 -0
- package/dist/assets/components/progress/Progress.style.css +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +7 -7
- package/dist/components/button/Button.js +11 -11
- package/dist/components/command/Command.js +19 -17
- package/dist/components/data-table/DataTable.js +15 -15
- package/dist/components/data-table/DataTableFilterSuggestionMenu.js +15 -15
- package/dist/components/editor/Editor.js +13 -13
- package/dist/components/form/CheckboxInput.js +4 -4
- package/dist/components/form/EmailInput.js +9 -9
- package/dist/components/form/FileInput.d.ts +32 -0
- package/dist/components/form/FileInput.js +124 -0
- package/dist/components/form/InputContentEditable.hook.js +11 -11
- package/dist/components/form/InputWrapper.js +15 -15
- package/dist/components/form/NumberInput.js +9 -9
- package/dist/components/form/PasswordInput.js +4 -4
- package/dist/components/form/SwitchInput.js +7 -7
- package/dist/components/form/TextAreaInput.js +6 -6
- package/dist/components/form/TextInput.js +6 -6
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.js +58 -45
- package/dist/components/form/useForm.js +2 -2
- package/dist/components/fullscreen/FullScreen.js +2 -2
- package/dist/components/gantt/GanttGroup.js +17 -17
- package/dist/components/progress/Progress.d.ts +8 -0
- package/dist/components/progress/Progress.js +42 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +180 -165
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.js +81 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +55 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot/dist/index.js +58 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
- package/dist/utils/reactiveArrayService.js +4 -4
- package/package.json +12 -7
package/dist/index.js
CHANGED
|
@@ -1,199 +1,214 @@
|
|
|
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
|
-
import { Avatar as
|
|
4
|
-
import { Badge as
|
|
3
|
+
import { Avatar as a } from "./components/avatar/Avatar.js";
|
|
4
|
+
import { Badge as u } from "./components/badge/Badge.js";
|
|
5
5
|
import { Breadcrumb as i } from "./components/breadcrumb/Breadcrumb.js";
|
|
6
6
|
import { Button as f } from "./components/button/Button.js";
|
|
7
|
-
import { ButtonGroup as
|
|
8
|
-
import { Card as
|
|
9
|
-
import { Col as
|
|
10
|
-
import { Command as
|
|
7
|
+
import { ButtonGroup as I } from "./components/button-group/ButtonGroup.js";
|
|
8
|
+
import { Card as S } from "./components/card/Card.js";
|
|
9
|
+
import { Col as d } from "./components/col/Col.js";
|
|
10
|
+
import { Command as b, CommandDialog as c, CommandEmpty as M, CommandGroup as F, CommandInput as D, CommandItem as P, CommandList as A, CommandSeparator as v, CommandShortcut as w } from "./components/command/Command.js";
|
|
11
11
|
import { Container as R } from "./components/container/Container.js";
|
|
12
|
-
import { ContextMenu as
|
|
12
|
+
import { ContextMenu as L, ContextMenuArrow as y, ContextMenuContent as z, ContextMenuGroup as V, ContextMenuItem as B, ContextMenuLabel as E, ContextMenuPortal as H, ContextMenuSeparator as k, ContextMenuSub as N, ContextMenuSubContent as O, ContextMenuSubTrigger as Q, ContextMenuTrigger as Z } from "./components/context-menu/ContextMenu.js";
|
|
13
13
|
import { DataTable as q } from "./components/data-table/DataTable.js";
|
|
14
14
|
import { DataTableColumn as K } from "./components/data-table/DataTableColumn.js";
|
|
15
15
|
import { DataTableFilterInput as W, createFilterQueryLanguage as X } from "./components/data-table/DataTableFilterInput.js";
|
|
16
16
|
import { DataTableFilterSuggestionMenu as _ } from "./components/data-table/DataTableFilterSuggestionMenu.js";
|
|
17
|
-
import { Dialog as ee, DialogClose as oe, DialogContent as
|
|
17
|
+
import { Dialog as ee, DialogClose as oe, DialogContent as te, DialogDescription as re, DialogFooter as ne, DialogHeader as pe, DialogOverlay as ae, DialogPortal as me, DialogTitle as ue, DialogTrigger as le } from "./components/dialog/Dialog.js";
|
|
18
18
|
import { Editor as xe } from "./components/editor/Editor.js";
|
|
19
|
-
import { FileTabsService as
|
|
20
|
-
import { FileTabs as
|
|
21
|
-
import { Flex as
|
|
19
|
+
import { FileTabsService as ge } from "./components/file-tabs/FileTabs.service.js";
|
|
20
|
+
import { FileTabs as Ce, FileTabsContent as Se, FileTabsList as Te, FileTabsTrigger as de } from "./components/file-tabs/FileTabs.js";
|
|
21
|
+
import { Flex as be } from "./components/flex/Flex.js";
|
|
22
22
|
import { CheckboxInput as Me } from "./components/form/CheckboxInput.js";
|
|
23
|
-
import { EditorInput as
|
|
24
|
-
import { EmailInput as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
23
|
+
import { EditorInput as De } from "./components/form/EditorInput.js";
|
|
24
|
+
import { EmailInput as Ae, emailValidation as ve } from "./components/form/EmailInput.js";
|
|
25
|
+
import { FileInput as he, FileInputContext as Re, FileInputDropzone as Ge, FileInputHiddenInput as Le, FileInputItem as ye, FileInputItemDeleteTrigger as ze, FileInputItemGroup as Ve, FileInputItemName as Be, FileInputItemPreview as Ee, FileInputItemPreviewImage as He, FileInputItemSizeText as ke, FileInputTrigger as Ne } from "./components/form/FileInput.js";
|
|
26
|
+
import { Input as Qe } from "./components/form/Input.js";
|
|
27
|
+
import { InputDescription as je } from "./components/form/InputDescription.js";
|
|
28
|
+
import { InputLabel as Je } from "./components/form/InputLabel.js";
|
|
29
|
+
import { InputMessage as Ue } from "./components/form/InputMessage.js";
|
|
30
|
+
import { InputSuggestionMenuContent as Xe, InputSuggestionMenuContentItems as Ye } from "./components/form/InputSuggestion.js";
|
|
31
|
+
import { NumberInput as $e } from "./components/form/NumberInput.js";
|
|
32
|
+
import { PasswordInput as oo, passwordValidation as to } from "./components/form/PasswordInput.js";
|
|
33
|
+
import { PinInput as no, PinInputField as po, PinInputHiddenField as ao } from "./components/form/PinInput.js";
|
|
34
|
+
import { RadioGroup as uo } from "./components/form/RadioGroup.js";
|
|
35
|
+
import { RadioInput as io } from "./components/form/RadioInput.js";
|
|
36
|
+
import { SelectContent as fo, SelectInput as go, SelectItem as Io, SelectItemText as Co, SelectPortal as So, SelectTrigger as To, SelectValue as so, SelectViewport as bo } from "./components/form/SelectInput.js";
|
|
37
|
+
import { SwitchInput as Mo } from "./components/form/SwitchInput.js";
|
|
38
|
+
import { TextAreaInput as Do } from "./components/form/TextAreaInput.js";
|
|
39
|
+
import { TextInput as Ao } from "./components/form/TextInput.js";
|
|
40
|
+
import { useForm as wo } from "./components/form/useForm.js";
|
|
41
|
+
import { buildDefaultSyntax as Ro } from "./components/form/Input.syntax.hook.js";
|
|
42
|
+
import { FullScreen as Lo } from "./components/fullscreen/FullScreen.js";
|
|
43
|
+
import { Gantt as zo, getRelativeValue as Vo } from "./components/gantt/Gantt.js";
|
|
44
|
+
import { Layout as Eo } from "./components/layout/Layout.js";
|
|
45
|
+
import { Menu as ko, MenuArrow as No, MenuCheckboxItem as Oo, MenuContent as Qo, MenuGroup as Zo, MenuItem as jo, MenuItemIndicator as qo, MenuLabel as Jo, MenuPortal as Ko, MenuSeparator as Uo, MenuSub as Wo, MenuSubContent as Xo, MenuSubTrigger as Yo, MenuTrigger as _o } from "./components/menu/Menu.js";
|
|
46
|
+
import { Progress as et } from "./components/progress/Progress.js";
|
|
47
|
+
import { Quote as tt } from "./components/quote/Quote.js";
|
|
48
|
+
import { ResizableHandle as nt, ResizablePanel as pt, ResizablePanelGroup as at } from "./components/resizable/Resizable.js";
|
|
49
|
+
import { Row as ut } from "./components/row/Row.js";
|
|
50
|
+
import { ScrollArea as it, ScrollAreaCorner as xt, ScrollAreaScrollbar as ft, ScrollAreaThumb as gt, ScrollAreaViewport as It } from "./components/scroll-area/ScrollArea.js";
|
|
51
|
+
import { SegmentedControl as St, SegmentedControlItem as Tt } from "./components/segmented-control/SegmentedControl.js";
|
|
52
|
+
import { Spacing as st } from "./components/spacing/Spacing.js";
|
|
53
|
+
import { Tab as ct, TabContent as Mt, TabList as Ft, TabTrigger as Dt } from "./components/tab/Tab.js";
|
|
54
|
+
import { Text as At } from "./components/text/Text.js";
|
|
55
|
+
import { Toast as wt, toast as ht } from "./components/toast/Toast.js";
|
|
56
|
+
import { Tooltip as Gt, TooltipArrow as Lt, TooltipContent as yt, TooltipPortal as zt, TooltipTrigger as Vt } from "./components/tooltip/Tooltip.js";
|
|
57
|
+
import { ContextStore as Et, ContextStoreProvider as Ht, useService as kt, useStore as Nt } from "./utils/contextStore.js";
|
|
58
|
+
import { ReactiveArrayService as Qt, useReactiveArrayService as Zt } from "./utils/reactiveArrayService.js";
|
|
59
|
+
import { mergeComponentProps as qt } from "./utils/component.js";
|
|
60
|
+
import { Colors as Kt, hashToColor as Ut, withAlpha as Wt } from "./utils/color.js";
|
|
61
|
+
import { getDOMSizeFromCodeZeroSize as Yt } from "./utils/size.js";
|
|
60
62
|
export {
|
|
61
|
-
|
|
63
|
+
t as Alert,
|
|
62
64
|
n as AuroraBackground,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
a as Avatar,
|
|
66
|
+
u as Badge,
|
|
65
67
|
i as Breadcrumb,
|
|
66
68
|
f as Button,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
I as ButtonGroup,
|
|
70
|
+
S as Card,
|
|
69
71
|
Me as CheckboxInput,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
d as Col,
|
|
73
|
+
Kt as Colors,
|
|
74
|
+
b as Command,
|
|
75
|
+
c as CommandDialog,
|
|
74
76
|
M as CommandEmpty,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
F as CommandGroup,
|
|
78
|
+
D as CommandInput,
|
|
79
|
+
P as CommandItem,
|
|
80
|
+
A as CommandList,
|
|
79
81
|
v as CommandSeparator,
|
|
80
82
|
w as CommandShortcut,
|
|
81
83
|
R as Container,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
L as ContextMenu,
|
|
85
|
+
y as ContextMenuArrow,
|
|
86
|
+
z as ContextMenuContent,
|
|
87
|
+
V as ContextMenuGroup,
|
|
86
88
|
B as ContextMenuItem,
|
|
87
89
|
E as ContextMenuLabel,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
H as ContextMenuPortal,
|
|
91
|
+
k as ContextMenuSeparator,
|
|
92
|
+
N as ContextMenuSub,
|
|
93
|
+
O as ContextMenuSubContent,
|
|
94
|
+
Q as ContextMenuSubTrigger,
|
|
93
95
|
Z as ContextMenuTrigger,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
Et as ContextStore,
|
|
97
|
+
Ht as ContextStoreProvider,
|
|
96
98
|
q as DataTable,
|
|
97
99
|
K as DataTableColumn,
|
|
98
100
|
W as DataTableFilterInput,
|
|
99
101
|
_ as DataTableFilterSuggestionMenu,
|
|
100
102
|
ee as Dialog,
|
|
101
103
|
oe as DialogClose,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
te as DialogContent,
|
|
105
|
+
re as DialogDescription,
|
|
104
106
|
ne as DialogFooter,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
pe as DialogHeader,
|
|
108
|
+
ae as DialogOverlay,
|
|
107
109
|
me as DialogPortal,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
ue as DialogTitle,
|
|
111
|
+
le as DialogTrigger,
|
|
110
112
|
xe as Editor,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
Eo as
|
|
140
|
-
ko as
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
113
|
+
De as EditorInput,
|
|
114
|
+
Ae as EmailInput,
|
|
115
|
+
he as FileInput,
|
|
116
|
+
Re as FileInputContext,
|
|
117
|
+
Ge as FileInputDropzone,
|
|
118
|
+
Le as FileInputHiddenInput,
|
|
119
|
+
ye as FileInputItem,
|
|
120
|
+
ze as FileInputItemDeleteTrigger,
|
|
121
|
+
Ve as FileInputItemGroup,
|
|
122
|
+
Be as FileInputItemName,
|
|
123
|
+
Ee as FileInputItemPreview,
|
|
124
|
+
He as FileInputItemPreviewImage,
|
|
125
|
+
ke as FileInputItemSizeText,
|
|
126
|
+
Ne as FileInputTrigger,
|
|
127
|
+
Ce as FileTabs,
|
|
128
|
+
Se as FileTabsContent,
|
|
129
|
+
Te as FileTabsList,
|
|
130
|
+
ge as FileTabsService,
|
|
131
|
+
de as FileTabsTrigger,
|
|
132
|
+
be as Flex,
|
|
133
|
+
Lo as FullScreen,
|
|
134
|
+
zo as Gantt,
|
|
135
|
+
Qe as Input,
|
|
136
|
+
je as InputDescription,
|
|
137
|
+
Je as InputLabel,
|
|
138
|
+
Ue as InputMessage,
|
|
139
|
+
Xe as InputSuggestionMenuContent,
|
|
140
|
+
Ye as InputSuggestionMenuContentItems,
|
|
141
|
+
Eo as Layout,
|
|
142
|
+
ko as Menu,
|
|
143
|
+
No as MenuArrow,
|
|
144
|
+
Oo as MenuCheckboxItem,
|
|
145
|
+
Qo as MenuContent,
|
|
146
|
+
Zo as MenuGroup,
|
|
147
|
+
jo as MenuItem,
|
|
148
|
+
qo as MenuItemIndicator,
|
|
149
|
+
Jo as MenuLabel,
|
|
150
|
+
Ko as MenuPortal,
|
|
151
|
+
Uo as MenuSeparator,
|
|
152
|
+
Wo as MenuSub,
|
|
153
|
+
Xo as MenuSubContent,
|
|
154
|
+
Yo as MenuSubTrigger,
|
|
155
|
+
_o as MenuTrigger,
|
|
156
|
+
$e as NumberInput,
|
|
157
|
+
oo as PasswordInput,
|
|
158
|
+
no as PinInput,
|
|
159
|
+
po as PinInputField,
|
|
160
|
+
ao as PinInputHiddenField,
|
|
161
|
+
et as Progress,
|
|
162
|
+
tt as Quote,
|
|
163
|
+
uo as RadioGroup,
|
|
164
|
+
io as RadioInput,
|
|
165
|
+
Qt as ReactiveArrayService,
|
|
166
|
+
nt as ResizableHandle,
|
|
167
|
+
pt as ResizablePanel,
|
|
168
|
+
at as ResizablePanelGroup,
|
|
169
|
+
ut as Row,
|
|
170
|
+
it as ScrollArea,
|
|
171
|
+
xt as ScrollAreaCorner,
|
|
172
|
+
ft as ScrollAreaScrollbar,
|
|
173
|
+
gt as ScrollAreaThumb,
|
|
174
|
+
It as ScrollAreaViewport,
|
|
175
|
+
St as SegmentedControl,
|
|
176
|
+
Tt as SegmentedControlItem,
|
|
177
|
+
fo as SelectContent,
|
|
178
|
+
go as SelectInput,
|
|
179
|
+
Io as SelectItem,
|
|
180
|
+
Co as SelectItemText,
|
|
181
|
+
So as SelectPortal,
|
|
182
|
+
To as SelectTrigger,
|
|
183
|
+
so as SelectValue,
|
|
184
|
+
bo as SelectViewport,
|
|
185
|
+
st as Spacing,
|
|
186
|
+
Mo as SwitchInput,
|
|
187
|
+
ct as Tab,
|
|
188
|
+
Mt as TabContent,
|
|
189
|
+
Ft as TabList,
|
|
190
|
+
Dt as TabTrigger,
|
|
191
|
+
At as Text,
|
|
192
|
+
Do as TextAreaInput,
|
|
193
|
+
Ao as TextInput,
|
|
194
|
+
wt as Toast,
|
|
195
|
+
Gt as Tooltip,
|
|
196
|
+
Lt as TooltipArrow,
|
|
197
|
+
yt as TooltipContent,
|
|
198
|
+
zt as TooltipPortal,
|
|
199
|
+
Vt as TooltipTrigger,
|
|
200
|
+
Ro as buildDefaultSyntax,
|
|
186
201
|
X as createFilterQueryLanguage,
|
|
187
202
|
ve as emailValidation,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
203
|
+
Yt as getDOMSizeFromCodeZeroSize,
|
|
204
|
+
Vo as getRelativeValue,
|
|
205
|
+
Ut as hashToColor,
|
|
206
|
+
qt as mergeComponentProps,
|
|
207
|
+
to as passwordValidation,
|
|
208
|
+
ht as toast,
|
|
209
|
+
wo as useForm,
|
|
210
|
+
Zt as useReactiveArrayService,
|
|
211
|
+
kt as useService,
|
|
212
|
+
Nt as useStore,
|
|
213
|
+
Wt as withAlpha
|
|
199
214
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
function i(n, o) {
|
|
3
|
+
if (typeof n == "function")
|
|
4
|
+
return n(o);
|
|
5
|
+
n != null && (n.current = o);
|
|
6
|
+
}
|
|
7
|
+
function f(...n) {
|
|
8
|
+
return (o) => {
|
|
9
|
+
let u = !1;
|
|
10
|
+
const c = n.map((t) => {
|
|
11
|
+
const e = i(t, o);
|
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
|
13
|
+
});
|
|
14
|
+
if (u)
|
|
15
|
+
return () => {
|
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
|
17
|
+
const e = c[t];
|
|
18
|
+
typeof e == "function" ? e() : i(n[t], null);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
f as composeRefs
|
|
25
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as m from "react";
|
|
2
|
+
import { createContextScope as b } from "../node_modules/@radix-ui/react-context/dist/index.js";
|
|
3
|
+
import { Primitive as c } from "../node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
var u = "Progress", d = 100, [$] = b(u), [I, h] = $(u), _ = m.forwardRef(
|
|
6
|
+
(r, e) => {
|
|
7
|
+
const {
|
|
8
|
+
__scopeProgress: i,
|
|
9
|
+
value: o = null,
|
|
10
|
+
max: a,
|
|
11
|
+
getValueLabel: x = M,
|
|
12
|
+
...P
|
|
13
|
+
} = r;
|
|
14
|
+
(a || a === 0) && !v(a) && console.error(R(`${a}`, "Progress"));
|
|
15
|
+
const t = v(a) ? a : d;
|
|
16
|
+
o !== null && !p(o, t) && console.error(V(`${o}`, "Progress"));
|
|
17
|
+
const n = p(o, t) ? o : null, N = s(n) ? x(n, t) : void 0;
|
|
18
|
+
return /* @__PURE__ */ l(I, { scope: i, value: n, max: t, children: /* @__PURE__ */ l(
|
|
19
|
+
c.div,
|
|
20
|
+
{
|
|
21
|
+
"aria-valuemax": t,
|
|
22
|
+
"aria-valuemin": 0,
|
|
23
|
+
"aria-valuenow": s(n) ? n : void 0,
|
|
24
|
+
"aria-valuetext": N,
|
|
25
|
+
role: "progressbar",
|
|
26
|
+
"data-state": g(n, t),
|
|
27
|
+
"data-value": n ?? void 0,
|
|
28
|
+
"data-max": t,
|
|
29
|
+
...P,
|
|
30
|
+
ref: e
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
_.displayName = u;
|
|
36
|
+
var f = "ProgressIndicator", E = m.forwardRef(
|
|
37
|
+
(r, e) => {
|
|
38
|
+
const { __scopeProgress: i, ...o } = r, a = h(f, i);
|
|
39
|
+
return /* @__PURE__ */ l(
|
|
40
|
+
c.div,
|
|
41
|
+
{
|
|
42
|
+
"data-state": g(a.value, a.max),
|
|
43
|
+
"data-value": a.value ?? void 0,
|
|
44
|
+
"data-max": a.max,
|
|
45
|
+
...o,
|
|
46
|
+
ref: e
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
E.displayName = f;
|
|
52
|
+
function M(r, e) {
|
|
53
|
+
return `${Math.round(r / e * 100)}%`;
|
|
54
|
+
}
|
|
55
|
+
function g(r, e) {
|
|
56
|
+
return r == null ? "indeterminate" : r === e ? "complete" : "loading";
|
|
57
|
+
}
|
|
58
|
+
function s(r) {
|
|
59
|
+
return typeof r == "number";
|
|
60
|
+
}
|
|
61
|
+
function v(r) {
|
|
62
|
+
return s(r) && !isNaN(r) && r > 0;
|
|
63
|
+
}
|
|
64
|
+
function p(r, e) {
|
|
65
|
+
return s(r) && !isNaN(r) && r <= e && r >= 0;
|
|
66
|
+
}
|
|
67
|
+
function R(r, e) {
|
|
68
|
+
return `Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${d}\`.`;
|
|
69
|
+
}
|
|
70
|
+
function V(r, e) {
|
|
71
|
+
return `Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
72
|
+
- a positive number
|
|
73
|
+
- less than the value passed to \`max\` (or ${d} if no \`max\` prop is set)
|
|
74
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
75
|
+
|
|
76
|
+
Defaulting to \`null\`.`;
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
_ as Progress,
|
|
80
|
+
E as ProgressIndicator
|
|
81
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
3
|
+
function P(e, p = []) {
|
|
4
|
+
let n = [];
|
|
5
|
+
function m(c, t) {
|
|
6
|
+
const o = u.createContext(t);
|
|
7
|
+
o.displayName = c + "Context";
|
|
8
|
+
const r = n.length;
|
|
9
|
+
n = [...n, t];
|
|
10
|
+
const a = (i) => {
|
|
11
|
+
const { scope: d, children: f, ...x } = i, S = d?.[e]?.[r] || o, l = u.useMemo(() => x, Object.values(x));
|
|
12
|
+
return /* @__PURE__ */ v(S.Provider, { value: l, children: f });
|
|
13
|
+
};
|
|
14
|
+
a.displayName = c + "Provider";
|
|
15
|
+
function C(i, d) {
|
|
16
|
+
const f = d?.[e]?.[r] || o, x = u.useContext(f);
|
|
17
|
+
if (x) return x;
|
|
18
|
+
if (t !== void 0) return t;
|
|
19
|
+
throw new Error(`\`${i}\` must be used within \`${c}\``);
|
|
20
|
+
}
|
|
21
|
+
return [a, C];
|
|
22
|
+
}
|
|
23
|
+
const s = () => {
|
|
24
|
+
const c = n.map((t) => u.createContext(t));
|
|
25
|
+
return function(o) {
|
|
26
|
+
const r = o?.[e] || c;
|
|
27
|
+
return u.useMemo(
|
|
28
|
+
() => ({ [`__scope${e}`]: { ...o, [e]: r } }),
|
|
29
|
+
[o, r]
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
return s.scopeName = e, [m, _(s, ...p)];
|
|
34
|
+
}
|
|
35
|
+
function _(...e) {
|
|
36
|
+
const p = e[0];
|
|
37
|
+
if (e.length === 1) return p;
|
|
38
|
+
const n = () => {
|
|
39
|
+
const m = e.map((s) => ({
|
|
40
|
+
useScope: s(),
|
|
41
|
+
scopeName: s.scopeName
|
|
42
|
+
}));
|
|
43
|
+
return function(c) {
|
|
44
|
+
const t = m.reduce((o, { useScope: r, scopeName: a }) => {
|
|
45
|
+
const i = r(c)[`__scope${a}`];
|
|
46
|
+
return { ...o, ...i };
|
|
47
|
+
}, {});
|
|
48
|
+
return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
return n.scopeName = p.scopeName, n;
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
P as createContextScope
|
|
55
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { createSlot as l } from "../../react-slot/dist/index.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
var u = [
|
|
6
|
+
"a",
|
|
7
|
+
"button",
|
|
8
|
+
"div",
|
|
9
|
+
"form",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"label",
|
|
15
|
+
"li",
|
|
16
|
+
"nav",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"select",
|
|
20
|
+
"span",
|
|
21
|
+
"svg",
|
|
22
|
+
"ul"
|
|
23
|
+
], w = u.reduce((t, i) => {
|
|
24
|
+
const o = l(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
25
|
+
const { asChild: a, ...p } = e, s = a ? o : i;
|
|
26
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, { ...p, ref: m });
|
|
27
|
+
});
|
|
28
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
+
}, {});
|
|
30
|
+
export {
|
|
31
|
+
w as Primitive
|
|
32
|
+
};
|
package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-slot/dist/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { composeRefs as E } from "../../../../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
+
var g = /* @__PURE__ */ Symbol.for("react.lazy"), p = e[" use ".trim().toString()];
|
|
5
|
+
function C(r) {
|
|
6
|
+
return typeof r == "object" && r !== null && "then" in r;
|
|
7
|
+
}
|
|
8
|
+
function d(r) {
|
|
9
|
+
return r != null && typeof r == "object" && "$$typeof" in r && r.$$typeof === g && "_payload" in r && C(r._payload);
|
|
10
|
+
}
|
|
11
|
+
// @__NO_SIDE_EFFECTS__
|
|
12
|
+
function A(r) {
|
|
13
|
+
const n = /* @__PURE__ */ S(r), o = e.forwardRef((i, t) => {
|
|
14
|
+
let { children: l, ...a } = i;
|
|
15
|
+
d(l) && typeof p == "function" && (l = p(l._payload));
|
|
16
|
+
const s = e.Children.toArray(l), f = s.find(R);
|
|
17
|
+
if (f) {
|
|
18
|
+
const c = f.props.children, m = s.map((u) => u === f ? e.Children.count(c) > 1 ? e.Children.only(null) : e.isValidElement(c) ? c.props.children : null : u);
|
|
19
|
+
return /* @__PURE__ */ y(n, { ...a, ref: t, children: e.isValidElement(c) ? e.cloneElement(c, void 0, m) : null });
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ y(n, { ...a, ref: t, children: l });
|
|
22
|
+
});
|
|
23
|
+
return o.displayName = `${r}.Slot`, o;
|
|
24
|
+
}
|
|
25
|
+
// @__NO_SIDE_EFFECTS__
|
|
26
|
+
function S(r) {
|
|
27
|
+
const n = e.forwardRef((o, i) => {
|
|
28
|
+
let { children: t, ...l } = o;
|
|
29
|
+
if (d(t) && typeof p == "function" && (t = p(t._payload)), e.isValidElement(t)) {
|
|
30
|
+
const a = h(t), s = b(l, t.props);
|
|
31
|
+
return t.type !== e.Fragment && (s.ref = i ? E(i, a) : a), e.cloneElement(t, s);
|
|
32
|
+
}
|
|
33
|
+
return e.Children.count(t) > 1 ? e.Children.only(null) : null;
|
|
34
|
+
});
|
|
35
|
+
return n.displayName = `${r}.SlotClone`, n;
|
|
36
|
+
}
|
|
37
|
+
var _ = /* @__PURE__ */ Symbol("radix.slottable");
|
|
38
|
+
function R(r) {
|
|
39
|
+
return e.isValidElement(r) && typeof r.type == "function" && "__radixId" in r.type && r.type.__radixId === _;
|
|
40
|
+
}
|
|
41
|
+
function b(r, n) {
|
|
42
|
+
const o = { ...n };
|
|
43
|
+
for (const i in n) {
|
|
44
|
+
const t = r[i], l = n[i];
|
|
45
|
+
/^on[A-Z]/.test(i) ? t && l ? o[i] = (...s) => {
|
|
46
|
+
const f = l(...s);
|
|
47
|
+
return t(...s), f;
|
|
48
|
+
} : t && (o[i] = t) : i === "style" ? o[i] = { ...t, ...l } : i === "className" && (o[i] = [t, l].filter(Boolean).join(" "));
|
|
49
|
+
}
|
|
50
|
+
return { ...r, ...o };
|
|
51
|
+
}
|
|
52
|
+
function h(r) {
|
|
53
|
+
let n = Object.getOwnPropertyDescriptor(r.props, "ref")?.get, o = n && "isReactWarning" in n && n.isReactWarning;
|
|
54
|
+
return o ? r.ref : (n = Object.getOwnPropertyDescriptor(r, "ref")?.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? r.props.ref : r.props.ref || r.ref);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
A as createSlot
|
|
58
|
+
};
|