@stevederico/skateboard-ui 3.0.2 → 3.6.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/App.jsx +13 -13
- package/CHANGELOG.md +64 -0
- package/README.md +59 -65
- package/components/AuthOverlay.jsx +4 -4
- package/components/ProtectedRoute.jsx +1 -1
- package/components/ThemeToggle.jsx +1 -1
- package/components/UpgradeSheet.jsx +2 -2
- package/{core → components/core}/DynamicIcon.jsx +1 -1
- package/{layout → components/layout}/Header.jsx +4 -4
- package/{layout → components/layout}/Layout.jsx +1 -1
- package/{layout → components/layout}/Sidebar.jsx +2 -2
- package/{layout → components/layout}/TabBar.jsx +1 -1
- package/{views → components/views}/LandingView.jsx +5 -5
- package/{views → components/views}/NotFound.jsx +2 -2
- package/{views → components/views}/PaymentView.jsx +1 -1
- package/{views → components/views}/SettingsView.jsx +6 -6
- package/{views → components/views}/SignInView.jsx +6 -6
- package/{views → components/views}/SignOutView.jsx +1 -1
- package/{views → components/views}/SignUpView.jsx +6 -6
- package/{views → components/views}/TextView.jsx +3 -3
- package/hooks/useAuthGate.js +1 -1
- package/index.js +1 -1
- package/package.json +32 -50
- package/shadcn/lib/base-ui/LICENSE +21 -0
- package/shadcn/lib/base-ui/_chunk-01rqe37g.js +70 -0
- package/shadcn/lib/base-ui/_chunk-0h5sskyw.js +347 -0
- package/shadcn/lib/base-ui/_chunk-0xhx4g7r.js +57 -0
- package/shadcn/lib/base-ui/_chunk-1e6khrvm.js +218 -0
- package/shadcn/lib/base-ui/_chunk-1s41sngz.js +302 -0
- package/shadcn/lib/base-ui/_chunk-20rtfsz9.js +23 -0
- package/shadcn/lib/base-ui/_chunk-2tyt8f8r.js +6034 -0
- package/shadcn/lib/base-ui/_chunk-3f31ka8n.js +11 -0
- package/shadcn/lib/base-ui/_chunk-3h6zpchb.js +89 -0
- package/shadcn/lib/base-ui/_chunk-4s0k3h7t.js +114 -0
- package/shadcn/lib/base-ui/_chunk-502wngfc.js +598 -0
- package/shadcn/lib/base-ui/_chunk-536jvgeq.js +68 -0
- package/shadcn/lib/base-ui/_chunk-611pz5sm.js +10 -0
- package/shadcn/lib/base-ui/_chunk-65zw5gs2.js +15 -0
- package/shadcn/lib/base-ui/_chunk-6b17g8t7.js +34 -0
- package/shadcn/lib/base-ui/_chunk-6xevjepc.js +15 -0
- package/shadcn/lib/base-ui/_chunk-71zm6zgv.js +16 -0
- package/shadcn/lib/base-ui/_chunk-7fmjymvh.js +32 -0
- package/shadcn/lib/base-ui/_chunk-7jjzay8b.js +176 -0
- package/shadcn/lib/base-ui/_chunk-7v1t86x1.js +43 -0
- package/shadcn/lib/base-ui/_chunk-85vrgzwr.js +227 -0
- package/shadcn/lib/base-ui/_chunk-8jz3hb7q.js +9 -0
- package/shadcn/lib/base-ui/_chunk-8kh3xk78.js +35 -0
- package/shadcn/lib/base-ui/_chunk-97tas84n.js +67 -0
- package/shadcn/lib/base-ui/_chunk-9nyxkvte.js +13 -0
- package/shadcn/lib/base-ui/_chunk-a8fwg9d0.js +52 -0
- package/shadcn/lib/base-ui/_chunk-agc6ew3g.js +29 -0
- package/shadcn/lib/base-ui/_chunk-aqwsk46c.js +64 -0
- package/shadcn/lib/base-ui/_chunk-atd5kq5q.js +803 -0
- package/shadcn/lib/base-ui/_chunk-atnkefgd.js +104 -0
- package/shadcn/lib/base-ui/_chunk-b40erthe.js +7 -0
- package/shadcn/lib/base-ui/_chunk-b5jsqt97.js +50 -0
- package/shadcn/lib/base-ui/_chunk-bk7n9s9e.js +15 -0
- package/shadcn/lib/base-ui/_chunk-c3572b5x.js +19 -0
- package/shadcn/lib/base-ui/_chunk-cwr896nf.js +25 -0
- package/shadcn/lib/base-ui/_chunk-drfb9kp2.js +27 -0
- package/shadcn/lib/base-ui/_chunk-ds8fnpjj.js +0 -0
- package/shadcn/lib/base-ui/_chunk-ek863ta9.js +82 -0
- package/shadcn/lib/base-ui/_chunk-f09cp81f.js +12 -0
- package/shadcn/lib/base-ui/_chunk-f5d01bp9.js +0 -0
- package/shadcn/lib/base-ui/_chunk-f9tgee1q.js +21 -0
- package/shadcn/lib/base-ui/_chunk-fch5cba8.js +84 -0
- package/shadcn/lib/base-ui/_chunk-gfce3j3z.js +18 -0
- package/shadcn/lib/base-ui/_chunk-ha06w2pp.js +2391 -0
- package/shadcn/lib/base-ui/_chunk-hzgetm70.js +23 -0
- package/shadcn/lib/base-ui/_chunk-j0eqdjta.js +39 -0
- package/shadcn/lib/base-ui/_chunk-k1e5fvcj.js +48 -0
- package/shadcn/lib/base-ui/_chunk-k4mc2kan.js +81 -0
- package/shadcn/lib/base-ui/_chunk-kfz96xv1.js +128 -0
- package/shadcn/lib/base-ui/_chunk-m45547cc.js +15 -0
- package/shadcn/lib/base-ui/_chunk-mbn76q14.js +184 -0
- package/shadcn/lib/base-ui/_chunk-mvv30fkv.js +9 -0
- package/shadcn/lib/base-ui/_chunk-mznt6ktj.js +33 -0
- package/shadcn/lib/base-ui/_chunk-n7dnqnbw.js +7 -0
- package/shadcn/lib/base-ui/_chunk-nya71ccw.js +546 -0
- package/shadcn/lib/base-ui/_chunk-p6qynd6r.js +146 -0
- package/shadcn/lib/base-ui/_chunk-q3nee19r.js +323 -0
- package/shadcn/lib/base-ui/_chunk-q7yw9mz4.js +385 -0
- package/shadcn/lib/base-ui/_chunk-qce0xt57.js +107 -0
- package/shadcn/lib/base-ui/_chunk-qgzhcjsj.js +14 -0
- package/shadcn/lib/base-ui/_chunk-qt6r015s.js +38 -0
- package/shadcn/lib/base-ui/_chunk-r0vsdknk.js +4 -0
- package/shadcn/lib/base-ui/_chunk-sx6vkz01.js +150 -0
- package/shadcn/lib/base-ui/_chunk-szcr6mhk.js +6 -0
- package/shadcn/lib/base-ui/_chunk-t7j3rbpv.js +67 -0
- package/shadcn/lib/base-ui/_chunk-tmfmrzwe.js +39 -0
- package/shadcn/lib/base-ui/_chunk-v92ycsfj.js +9 -0
- package/shadcn/lib/base-ui/_chunk-vdc01ss3.js +6 -0
- package/shadcn/lib/base-ui/_chunk-vjbnhhg1.js +26 -0
- package/shadcn/lib/base-ui/_chunk-w68yxg9d.js +21 -0
- package/shadcn/lib/base-ui/_chunk-wana68v3.js +477 -0
- package/shadcn/lib/base-ui/_chunk-wtw745qd.js +12 -0
- package/shadcn/lib/base-ui/_chunk-xb7ph1ka.js +6 -0
- package/shadcn/lib/base-ui/_chunk-xfagb0fq.js +28 -0
- package/shadcn/lib/base-ui/_chunk-xxhqanfd.js +16 -0
- package/shadcn/lib/base-ui/_chunk-y887e46p.js +15 -0
- package/shadcn/lib/base-ui/_chunk-ymj1dpqg.js +14 -0
- package/shadcn/lib/base-ui/accordion.js +650 -0
- package/shadcn/lib/base-ui/alert-dialog.js +138 -0
- package/shadcn/lib/base-ui/avatar.js +235 -0
- package/shadcn/lib/base-ui/button.js +52 -0
- package/shadcn/lib/base-ui/checkbox.js +454 -0
- package/shadcn/lib/base-ui/collapsible.js +283 -0
- package/shadcn/lib/base-ui/context-menu.js +324 -0
- package/shadcn/lib/base-ui/dialog.js +71 -0
- package/shadcn/lib/base-ui/input.js +1028 -0
- package/shadcn/lib/base-ui/menu.js +61 -0
- package/shadcn/lib/base-ui/menubar.js +157 -0
- package/shadcn/lib/base-ui/merge-props.js +15 -0
- package/shadcn/lib/base-ui/navigation-menu.js +1854 -0
- package/shadcn/lib/base-ui/popover.js +1090 -0
- package/shadcn/lib/base-ui/preview-card.js +709 -0
- package/shadcn/lib/base-ui/progress.js +278 -0
- package/shadcn/lib/base-ui/radio-group.js +247 -0
- package/shadcn/lib/base-ui/radio.js +382 -0
- package/shadcn/lib/base-ui/scroll-area.js +1061 -0
- package/shadcn/lib/base-ui/select.js +2438 -0
- package/shadcn/lib/base-ui/separator.js +11 -0
- package/shadcn/lib/base-ui/slider.js +1595 -0
- package/shadcn/lib/base-ui/switch.js +333 -0
- package/shadcn/lib/base-ui/tabs.js +892 -0
- package/shadcn/lib/base-ui/toggle-group.js +152 -0
- package/shadcn/lib/base-ui/toggle.js +133 -0
- package/shadcn/lib/base-ui/tooltip.js +791 -0
- package/shadcn/lib/base-ui/use-render.js +15 -0
- package/shadcn/lib/tailwind-merge.js +3312 -0
- package/shadcn/lib/utils.js +1 -1
- package/shadcn/ui/accordion.jsx +1 -1
- package/shadcn/ui/alert-dialog.jsx +1 -1
- package/shadcn/ui/avatar.jsx +1 -1
- package/shadcn/ui/badge.jsx +2 -2
- package/shadcn/ui/breadcrumb.jsx +2 -2
- package/shadcn/ui/button-group.jsx +2 -2
- package/shadcn/ui/button.jsx +1 -1
- package/shadcn/ui/calendar.jsx +1 -1
- package/shadcn/ui/checkbox.jsx +1 -1
- package/shadcn/ui/collapsible.jsx +1 -1
- package/shadcn/ui/command.jsx +1 -1
- package/shadcn/ui/context-menu.jsx +1 -1
- package/shadcn/ui/dialog.jsx +1 -1
- package/shadcn/ui/drawer.jsx +176 -74
- package/shadcn/ui/dropdown-menu.jsx +1 -1
- package/shadcn/ui/hover-card.jsx +1 -1
- package/shadcn/ui/input.jsx +1 -1
- package/shadcn/ui/item.jsx +2 -2
- package/shadcn/ui/menubar.jsx +2 -2
- package/shadcn/ui/navigation-menu.jsx +1 -1
- package/shadcn/ui/popover.jsx +1 -1
- package/shadcn/ui/progress.jsx +1 -1
- package/shadcn/ui/radio-group.jsx +2 -2
- package/shadcn/ui/scroll-area.jsx +1 -1
- package/shadcn/ui/select.jsx +1 -1
- package/shadcn/ui/separator.jsx +1 -1
- package/shadcn/ui/sheet.jsx +1 -1
- package/shadcn/ui/sidebar.jsx +3 -3
- package/shadcn/ui/slider.jsx +1 -1
- package/shadcn/ui/switch.jsx +1 -1
- package/shadcn/ui/tabs.jsx +1 -1
- package/shadcn/ui/toggle-group.jsx +2 -2
- package/shadcn/ui/toggle.jsx +1 -1
- package/shadcn/ui/tooltip.jsx +1 -1
- package/styles.css +31 -0
- package/MIGRATION.md +0 -230
- package/shadcn/ui/carousel.jsx +0 -195
- package/shadcn/ui/chart.jsx +0 -312
- package/shadcn/ui/resizable.jsx +0 -47
- /package/{core → components/core}/Calendar.jsx +0 -0
- /package/{core → components/core}/Command.jsx +0 -0
- /package/{core → components/core}/Context.jsx +0 -0
- /package/{core → components/core}/ThemeProvider.jsx +0 -0
- /package/{core → components/core}/Utilities.js +0 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/* @base-ui/react 1.4.1 — vendored (MIT — MUI Inc).
|
|
2
|
+
* Refresh: scripts/vendor-base-ui.js (see header for instructions).
|
|
3
|
+
* Do not edit by hand. */
|
|
4
|
+
import {
|
|
5
|
+
formatNumberValue,
|
|
6
|
+
valueToPercent
|
|
7
|
+
} from "./_chunk-tmfmrzwe.js";
|
|
8
|
+
import {
|
|
9
|
+
useRegisteredLabelId
|
|
10
|
+
} from "./_chunk-w68yxg9d.js";
|
|
11
|
+
import {
|
|
12
|
+
useValueAsRef
|
|
13
|
+
} from "./_chunk-drfb9kp2.js";
|
|
14
|
+
import {
|
|
15
|
+
visuallyHidden
|
|
16
|
+
} from "./_chunk-hzgetm70.js";
|
|
17
|
+
import"./_chunk-8kh3xk78.js";
|
|
18
|
+
import"./_chunk-n7dnqnbw.js";
|
|
19
|
+
import"./_chunk-b40erthe.js";
|
|
20
|
+
import {
|
|
21
|
+
useRenderElement
|
|
22
|
+
} from "./_chunk-1s41sngz.js";
|
|
23
|
+
import {
|
|
24
|
+
__export
|
|
25
|
+
} from "./_chunk-1e6khrvm.js";
|
|
26
|
+
|
|
27
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/index.parts.js
|
|
28
|
+
var exports_index_parts = {};
|
|
29
|
+
__export(exports_index_parts, {
|
|
30
|
+
Value: () => ProgressValue,
|
|
31
|
+
Track: () => ProgressTrack,
|
|
32
|
+
Root: () => ProgressRoot,
|
|
33
|
+
Label: () => ProgressLabel,
|
|
34
|
+
Indicator: () => ProgressIndicator
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/root/ProgressRoot.js
|
|
38
|
+
import * as React2 from "react";
|
|
39
|
+
|
|
40
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/root/ProgressRootContext.js
|
|
41
|
+
import * as React from "react";
|
|
42
|
+
"use client";
|
|
43
|
+
var ProgressRootContext = /* @__PURE__ */ React.createContext(undefined);
|
|
44
|
+
if (true)
|
|
45
|
+
ProgressRootContext.displayName = "ProgressRootContext";
|
|
46
|
+
function useProgressRootContext() {
|
|
47
|
+
const context = React.useContext(ProgressRootContext);
|
|
48
|
+
if (context === undefined) {
|
|
49
|
+
throw new Error("Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.");
|
|
50
|
+
}
|
|
51
|
+
return context;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/root/ProgressRootDataAttributes.js
|
|
55
|
+
var ProgressRootDataAttributes = /* @__PURE__ */ function(ProgressRootDataAttributes2) {
|
|
56
|
+
ProgressRootDataAttributes2["complete"] = "data-complete";
|
|
57
|
+
ProgressRootDataAttributes2["indeterminate"] = "data-indeterminate";
|
|
58
|
+
ProgressRootDataAttributes2["progressing"] = "data-progressing";
|
|
59
|
+
return ProgressRootDataAttributes2;
|
|
60
|
+
}({});
|
|
61
|
+
|
|
62
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/root/stateAttributesMapping.js
|
|
63
|
+
var progressStateAttributesMapping = {
|
|
64
|
+
status(value) {
|
|
65
|
+
if (value === "progressing") {
|
|
66
|
+
return {
|
|
67
|
+
[ProgressRootDataAttributes.progressing]: ""
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (value === "complete") {
|
|
71
|
+
return {
|
|
72
|
+
[ProgressRootDataAttributes.complete]: ""
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (value === "indeterminate") {
|
|
76
|
+
return {
|
|
77
|
+
[ProgressRootDataAttributes.indeterminate]: ""
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/root/ProgressRoot.js
|
|
85
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
86
|
+
"use client";
|
|
87
|
+
function getDefaultAriaValueText(formattedValue, value) {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return "indeterminate progress";
|
|
90
|
+
}
|
|
91
|
+
return formattedValue || `${value}%`;
|
|
92
|
+
}
|
|
93
|
+
var ProgressRoot = /* @__PURE__ */ React2.forwardRef(function ProgressRoot2(componentProps, forwardedRef) {
|
|
94
|
+
const {
|
|
95
|
+
format,
|
|
96
|
+
getAriaValueText = getDefaultAriaValueText,
|
|
97
|
+
locale,
|
|
98
|
+
max = 100,
|
|
99
|
+
min = 0,
|
|
100
|
+
value,
|
|
101
|
+
render,
|
|
102
|
+
className,
|
|
103
|
+
children,
|
|
104
|
+
style,
|
|
105
|
+
...elementProps
|
|
106
|
+
} = componentProps;
|
|
107
|
+
const [labelId, setLabelId] = React2.useState();
|
|
108
|
+
const formatOptionsRef = useValueAsRef(format);
|
|
109
|
+
let status = "indeterminate";
|
|
110
|
+
if (Number.isFinite(value)) {
|
|
111
|
+
status = value === max ? "complete" : "progressing";
|
|
112
|
+
}
|
|
113
|
+
const formattedValue = formatNumberValue(value, locale, formatOptionsRef.current);
|
|
114
|
+
const state = React2.useMemo(() => ({
|
|
115
|
+
status
|
|
116
|
+
}), [status]);
|
|
117
|
+
const defaultProps = {
|
|
118
|
+
"aria-labelledby": labelId,
|
|
119
|
+
"aria-valuemax": max,
|
|
120
|
+
"aria-valuemin": min,
|
|
121
|
+
"aria-valuenow": value ?? undefined,
|
|
122
|
+
"aria-valuetext": getAriaValueText(formattedValue, value),
|
|
123
|
+
role: "progressbar",
|
|
124
|
+
children: /* @__PURE__ */ _jsxs(React2.Fragment, {
|
|
125
|
+
children: [children, /* @__PURE__ */ _jsx("span", {
|
|
126
|
+
role: "presentation",
|
|
127
|
+
style: visuallyHidden,
|
|
128
|
+
children: "x"
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
131
|
+
};
|
|
132
|
+
const contextValue = React2.useMemo(() => ({
|
|
133
|
+
formattedValue,
|
|
134
|
+
max,
|
|
135
|
+
min,
|
|
136
|
+
setLabelId,
|
|
137
|
+
state,
|
|
138
|
+
status,
|
|
139
|
+
value
|
|
140
|
+
}), [formattedValue, max, min, setLabelId, state, status, value]);
|
|
141
|
+
const element = useRenderElement("div", componentProps, {
|
|
142
|
+
state,
|
|
143
|
+
ref: forwardedRef,
|
|
144
|
+
props: [defaultProps, elementProps],
|
|
145
|
+
stateAttributesMapping: progressStateAttributesMapping
|
|
146
|
+
});
|
|
147
|
+
return /* @__PURE__ */ _jsx(ProgressRootContext.Provider, {
|
|
148
|
+
value: contextValue,
|
|
149
|
+
children: element
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
if (true)
|
|
153
|
+
ProgressRoot.displayName = "ProgressRoot";
|
|
154
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/track/ProgressTrack.js
|
|
155
|
+
import * as React3 from "react";
|
|
156
|
+
"use client";
|
|
157
|
+
var ProgressTrack = /* @__PURE__ */ React3.forwardRef(function ProgressTrack2(componentProps, forwardedRef) {
|
|
158
|
+
const {
|
|
159
|
+
render,
|
|
160
|
+
className,
|
|
161
|
+
style,
|
|
162
|
+
...elementProps
|
|
163
|
+
} = componentProps;
|
|
164
|
+
const {
|
|
165
|
+
state
|
|
166
|
+
} = useProgressRootContext();
|
|
167
|
+
const element = useRenderElement("div", componentProps, {
|
|
168
|
+
state,
|
|
169
|
+
ref: forwardedRef,
|
|
170
|
+
props: elementProps,
|
|
171
|
+
stateAttributesMapping: progressStateAttributesMapping
|
|
172
|
+
});
|
|
173
|
+
return element;
|
|
174
|
+
});
|
|
175
|
+
if (true)
|
|
176
|
+
ProgressTrack.displayName = "ProgressTrack";
|
|
177
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/indicator/ProgressIndicator.js
|
|
178
|
+
import * as React4 from "react";
|
|
179
|
+
"use client";
|
|
180
|
+
var ProgressIndicator = /* @__PURE__ */ React4.forwardRef(function ProgressIndicator2(componentProps, forwardedRef) {
|
|
181
|
+
const {
|
|
182
|
+
render,
|
|
183
|
+
className,
|
|
184
|
+
style,
|
|
185
|
+
...elementProps
|
|
186
|
+
} = componentProps;
|
|
187
|
+
const {
|
|
188
|
+
max,
|
|
189
|
+
min,
|
|
190
|
+
value,
|
|
191
|
+
state
|
|
192
|
+
} = useProgressRootContext();
|
|
193
|
+
const percentageValue = Number.isFinite(value) && value !== null ? valueToPercent(value, min, max) : null;
|
|
194
|
+
const getStyles = React4.useCallback(() => {
|
|
195
|
+
if (percentageValue == null) {
|
|
196
|
+
return {};
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
insetInlineStart: 0,
|
|
200
|
+
height: "inherit",
|
|
201
|
+
width: `${percentageValue}%`
|
|
202
|
+
};
|
|
203
|
+
}, [percentageValue]);
|
|
204
|
+
const element = useRenderElement("div", componentProps, {
|
|
205
|
+
state,
|
|
206
|
+
ref: forwardedRef,
|
|
207
|
+
props: [{
|
|
208
|
+
style: getStyles()
|
|
209
|
+
}, elementProps],
|
|
210
|
+
stateAttributesMapping: progressStateAttributesMapping
|
|
211
|
+
});
|
|
212
|
+
return element;
|
|
213
|
+
});
|
|
214
|
+
if (true)
|
|
215
|
+
ProgressIndicator.displayName = "ProgressIndicator";
|
|
216
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/value/ProgressValue.js
|
|
217
|
+
import * as React5 from "react";
|
|
218
|
+
"use client";
|
|
219
|
+
var ProgressValue = /* @__PURE__ */ React5.forwardRef(function ProgressValue2(componentProps, forwardedRef) {
|
|
220
|
+
const {
|
|
221
|
+
className,
|
|
222
|
+
render,
|
|
223
|
+
children,
|
|
224
|
+
style,
|
|
225
|
+
...elementProps
|
|
226
|
+
} = componentProps;
|
|
227
|
+
const {
|
|
228
|
+
value,
|
|
229
|
+
formattedValue,
|
|
230
|
+
state
|
|
231
|
+
} = useProgressRootContext();
|
|
232
|
+
const formattedValueArg = value == null ? "indeterminate" : formattedValue;
|
|
233
|
+
const formattedValueDisplay = value == null ? null : formattedValue;
|
|
234
|
+
const element = useRenderElement("span", componentProps, {
|
|
235
|
+
state,
|
|
236
|
+
ref: forwardedRef,
|
|
237
|
+
props: [{
|
|
238
|
+
"aria-hidden": true,
|
|
239
|
+
children: typeof children === "function" ? children(formattedValueArg, value) : formattedValueDisplay
|
|
240
|
+
}, elementProps],
|
|
241
|
+
stateAttributesMapping: progressStateAttributesMapping
|
|
242
|
+
});
|
|
243
|
+
return element;
|
|
244
|
+
});
|
|
245
|
+
if (true)
|
|
246
|
+
ProgressValue.displayName = "ProgressValue";
|
|
247
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/progress/label/ProgressLabel.js
|
|
248
|
+
import * as React6 from "react";
|
|
249
|
+
"use client";
|
|
250
|
+
var ProgressLabel = /* @__PURE__ */ React6.forwardRef(function ProgressLabel2(componentProps, forwardedRef) {
|
|
251
|
+
const {
|
|
252
|
+
render,
|
|
253
|
+
className,
|
|
254
|
+
style,
|
|
255
|
+
id: idProp,
|
|
256
|
+
...elementProps
|
|
257
|
+
} = componentProps;
|
|
258
|
+
const {
|
|
259
|
+
setLabelId,
|
|
260
|
+
state
|
|
261
|
+
} = useProgressRootContext();
|
|
262
|
+
const id = useRegisteredLabelId(idProp, setLabelId);
|
|
263
|
+
const element = useRenderElement("span", componentProps, {
|
|
264
|
+
state,
|
|
265
|
+
ref: forwardedRef,
|
|
266
|
+
props: [{
|
|
267
|
+
id,
|
|
268
|
+
role: "presentation"
|
|
269
|
+
}, elementProps],
|
|
270
|
+
stateAttributesMapping: progressStateAttributesMapping
|
|
271
|
+
});
|
|
272
|
+
return element;
|
|
273
|
+
});
|
|
274
|
+
if (true)
|
|
275
|
+
ProgressLabel.displayName = "ProgressLabel";
|
|
276
|
+
export {
|
|
277
|
+
exports_index_parts as Progress
|
|
278
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* @base-ui/react 1.4.1 — vendored (MIT — MUI Inc).
|
|
2
|
+
* Refresh: scripts/vendor-base-ui.js (see header for instructions).
|
|
3
|
+
* Do not edit by hand. */
|
|
4
|
+
import {
|
|
5
|
+
RadioGroupContext
|
|
6
|
+
} from "./_chunk-3f31ka8n.js";
|
|
7
|
+
import {
|
|
8
|
+
useFieldsetRootContext
|
|
9
|
+
} from "./_chunk-c3572b5x.js";
|
|
10
|
+
import {
|
|
11
|
+
CompositeRoot
|
|
12
|
+
} from "./_chunk-0h5sskyw.js";
|
|
13
|
+
import"./_chunk-r0vsdknk.js";
|
|
14
|
+
import {
|
|
15
|
+
useFormContext,
|
|
16
|
+
useRegisterFieldControl
|
|
17
|
+
} from "./_chunk-97tas84n.js";
|
|
18
|
+
import {
|
|
19
|
+
fieldValidityMapping,
|
|
20
|
+
useFieldRootContext,
|
|
21
|
+
useLabelableContext
|
|
22
|
+
} from "./_chunk-kfz96xv1.js";
|
|
23
|
+
import"./_chunk-ds8fnpjj.js";
|
|
24
|
+
import"./_chunk-vdc01ss3.js";
|
|
25
|
+
import"./_chunk-p6qynd6r.js";
|
|
26
|
+
import"./_chunk-20rtfsz9.js";
|
|
27
|
+
import"./_chunk-wtw745qd.js";
|
|
28
|
+
import {
|
|
29
|
+
useControlled
|
|
30
|
+
} from "./_chunk-01rqe37g.js";
|
|
31
|
+
import {
|
|
32
|
+
contains
|
|
33
|
+
} from "./_chunk-atnkefgd.js";
|
|
34
|
+
import {
|
|
35
|
+
SHIFT
|
|
36
|
+
} from "./_chunk-qce0xt57.js";
|
|
37
|
+
import"./_chunk-nya71ccw.js";
|
|
38
|
+
import"./_chunk-t7j3rbpv.js";
|
|
39
|
+
import {
|
|
40
|
+
useValueChanged
|
|
41
|
+
} from "./_chunk-cwr896nf.js";
|
|
42
|
+
import {
|
|
43
|
+
useBaseUiId
|
|
44
|
+
} from "./_chunk-8kh3xk78.js";
|
|
45
|
+
import"./_chunk-71zm6zgv.js";
|
|
46
|
+
import"./_chunk-6xevjepc.js";
|
|
47
|
+
import"./_chunk-sx6vkz01.js";
|
|
48
|
+
import"./_chunk-n7dnqnbw.js";
|
|
49
|
+
import {
|
|
50
|
+
useStableCallback
|
|
51
|
+
} from "./_chunk-mznt6ktj.js";
|
|
52
|
+
import"./_chunk-b40erthe.js";
|
|
53
|
+
import"./_chunk-1s41sngz.js";
|
|
54
|
+
import"./_chunk-1e6khrvm.js";
|
|
55
|
+
|
|
56
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/radio-group/RadioGroup.js
|
|
57
|
+
import * as React from "react";
|
|
58
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
59
|
+
"use client";
|
|
60
|
+
var MODIFIER_KEYS = [SHIFT];
|
|
61
|
+
var RadioGroup = /* @__PURE__ */ React.forwardRef(function RadioGroup2(componentProps, forwardedRef) {
|
|
62
|
+
const {
|
|
63
|
+
render,
|
|
64
|
+
className,
|
|
65
|
+
disabled: disabledProp,
|
|
66
|
+
readOnly,
|
|
67
|
+
required,
|
|
68
|
+
onValueChange: onValueChangeProp,
|
|
69
|
+
value: externalValue,
|
|
70
|
+
defaultValue,
|
|
71
|
+
form,
|
|
72
|
+
name: nameProp,
|
|
73
|
+
inputRef: inputRefProp,
|
|
74
|
+
id: idProp,
|
|
75
|
+
style,
|
|
76
|
+
...elementProps
|
|
77
|
+
} = componentProps;
|
|
78
|
+
const {
|
|
79
|
+
setTouched: setFieldTouched,
|
|
80
|
+
setFocused,
|
|
81
|
+
shouldValidateOnChange,
|
|
82
|
+
validationMode,
|
|
83
|
+
name: fieldName,
|
|
84
|
+
disabled: fieldDisabled,
|
|
85
|
+
state: fieldState,
|
|
86
|
+
validation,
|
|
87
|
+
setDirty,
|
|
88
|
+
setFilled,
|
|
89
|
+
validityData
|
|
90
|
+
} = useFieldRootContext();
|
|
91
|
+
const {
|
|
92
|
+
labelId
|
|
93
|
+
} = useLabelableContext();
|
|
94
|
+
const {
|
|
95
|
+
clearErrors
|
|
96
|
+
} = useFormContext();
|
|
97
|
+
const fieldsetContext = useFieldsetRootContext(true);
|
|
98
|
+
const disabled = fieldDisabled || disabledProp;
|
|
99
|
+
const name = fieldName ?? nameProp;
|
|
100
|
+
const id = useBaseUiId(idProp);
|
|
101
|
+
const [checkedValue, setCheckedValueUnwrapped] = useControlled({
|
|
102
|
+
controlled: externalValue,
|
|
103
|
+
default: defaultValue,
|
|
104
|
+
name: "RadioGroup",
|
|
105
|
+
state: "value"
|
|
106
|
+
});
|
|
107
|
+
const onValueChange = useStableCallback(onValueChangeProp);
|
|
108
|
+
const setCheckedValue = useStableCallback((value, eventDetails) => {
|
|
109
|
+
onValueChange(value, eventDetails);
|
|
110
|
+
if (eventDetails.isCanceled) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
setCheckedValueUnwrapped(value);
|
|
114
|
+
});
|
|
115
|
+
const controlRef = React.useRef(null);
|
|
116
|
+
const groupInputRef = React.useRef(null);
|
|
117
|
+
const firstEnabledInputRef = React.useRef(null);
|
|
118
|
+
function setInputRef(hiddenInput) {
|
|
119
|
+
let cleanup = undefined;
|
|
120
|
+
if (inputRefProp) {
|
|
121
|
+
if (typeof inputRefProp === "function") {
|
|
122
|
+
cleanup = inputRefProp(hiddenInput);
|
|
123
|
+
} else {
|
|
124
|
+
inputRefProp.current = hiddenInput;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
groupInputRef.current = hiddenInput;
|
|
128
|
+
validation.inputRef.current = hiddenInput;
|
|
129
|
+
return cleanup;
|
|
130
|
+
}
|
|
131
|
+
const registerControlRef = useStableCallback((element, isDisabled = false) => {
|
|
132
|
+
if (!element) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (isDisabled) {
|
|
136
|
+
if (controlRef.current === element) {
|
|
137
|
+
controlRef.current = null;
|
|
138
|
+
}
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (controlRef.current == null) {
|
|
142
|
+
controlRef.current = element;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
const registerInputRef = useStableCallback((input) => {
|
|
146
|
+
if (!input || input.disabled) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (!firstEnabledInputRef.current) {
|
|
150
|
+
firstEnabledInputRef.current = input;
|
|
151
|
+
}
|
|
152
|
+
const currentInput = groupInputRef.current;
|
|
153
|
+
if (input.checked || currentInput == null || currentInput.disabled) {
|
|
154
|
+
return setInputRef(input);
|
|
155
|
+
}
|
|
156
|
+
return;
|
|
157
|
+
});
|
|
158
|
+
const getFieldValue = useStableCallback(() => checkedValue ?? null);
|
|
159
|
+
useRegisterFieldControl(controlRef, {
|
|
160
|
+
id,
|
|
161
|
+
value: checkedValue,
|
|
162
|
+
getValue: getFieldValue
|
|
163
|
+
});
|
|
164
|
+
useValueChanged(checkedValue, () => {
|
|
165
|
+
clearErrors(name);
|
|
166
|
+
setDirty(checkedValue !== validityData.initialValue);
|
|
167
|
+
setFilled(checkedValue != null);
|
|
168
|
+
if (shouldValidateOnChange()) {
|
|
169
|
+
validation.commit(checkedValue);
|
|
170
|
+
} else {
|
|
171
|
+
validation.commit(checkedValue, true);
|
|
172
|
+
}
|
|
173
|
+
const fallbackInput = firstEnabledInputRef.current;
|
|
174
|
+
if (checkedValue == null && fallbackInput && !fallbackInput.disabled) {
|
|
175
|
+
setInputRef(fallbackInput);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
const [touched, setTouched] = React.useState(false);
|
|
179
|
+
const ariaLabelledby = elementProps["aria-labelledby"] ?? labelId ?? fieldsetContext?.legendId;
|
|
180
|
+
const state = {
|
|
181
|
+
...fieldState,
|
|
182
|
+
disabled: disabled ?? false,
|
|
183
|
+
required: required ?? false,
|
|
184
|
+
readOnly: readOnly ?? false
|
|
185
|
+
};
|
|
186
|
+
const contextValue = React.useMemo(() => ({
|
|
187
|
+
...fieldState,
|
|
188
|
+
checkedValue,
|
|
189
|
+
disabled,
|
|
190
|
+
form,
|
|
191
|
+
validation,
|
|
192
|
+
name,
|
|
193
|
+
onValueChange,
|
|
194
|
+
readOnly,
|
|
195
|
+
registerControlRef,
|
|
196
|
+
registerInputRef,
|
|
197
|
+
required,
|
|
198
|
+
setCheckedValue,
|
|
199
|
+
setTouched,
|
|
200
|
+
touched
|
|
201
|
+
}), [checkedValue, disabled, form, validation, fieldState, name, onValueChange, readOnly, registerControlRef, registerInputRef, required, setCheckedValue, setTouched, touched]);
|
|
202
|
+
const defaultProps = {
|
|
203
|
+
role: "radiogroup",
|
|
204
|
+
"aria-required": required || undefined,
|
|
205
|
+
"aria-disabled": disabled || undefined,
|
|
206
|
+
"aria-readonly": readOnly || undefined,
|
|
207
|
+
"aria-labelledby": ariaLabelledby,
|
|
208
|
+
onFocus() {
|
|
209
|
+
setFocused(true);
|
|
210
|
+
},
|
|
211
|
+
onBlur(event) {
|
|
212
|
+
if (!contains(event.currentTarget, event.relatedTarget)) {
|
|
213
|
+
setFieldTouched(true);
|
|
214
|
+
setFocused(false);
|
|
215
|
+
if (validationMode === "onBlur") {
|
|
216
|
+
validation.commit(checkedValue);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
onKeyDownCapture(event) {
|
|
221
|
+
if (event.key.startsWith("Arrow")) {
|
|
222
|
+
setFieldTouched(true);
|
|
223
|
+
setTouched(true);
|
|
224
|
+
setFocused(true);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
return /* @__PURE__ */ _jsx(RadioGroupContext.Provider, {
|
|
229
|
+
value: contextValue,
|
|
230
|
+
children: /* @__PURE__ */ _jsx(CompositeRoot, {
|
|
231
|
+
render,
|
|
232
|
+
className,
|
|
233
|
+
style,
|
|
234
|
+
state,
|
|
235
|
+
props: [defaultProps, validation.getValidationProps, elementProps],
|
|
236
|
+
refs: [forwardedRef],
|
|
237
|
+
stateAttributesMapping: fieldValidityMapping,
|
|
238
|
+
enableHomeAndEndKeys: false,
|
|
239
|
+
modifierKeys: MODIFIER_KEYS
|
|
240
|
+
})
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
if (true)
|
|
244
|
+
RadioGroup.displayName = "RadioGroup";
|
|
245
|
+
export {
|
|
246
|
+
RadioGroup
|
|
247
|
+
};
|