@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,218 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
function __accessProp(key) {
|
|
7
|
+
return this[key];
|
|
8
|
+
}
|
|
9
|
+
var __toESMCache_node;
|
|
10
|
+
var __toESMCache_esm;
|
|
11
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
+
var canCache = mod != null && typeof mod === "object";
|
|
13
|
+
if (canCache) {
|
|
14
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
+
var cached = cache.get(mod);
|
|
16
|
+
if (cached)
|
|
17
|
+
return cached;
|
|
18
|
+
}
|
|
19
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
for (let key of __getOwnPropNames(mod))
|
|
22
|
+
if (!__hasOwnProp.call(to, key))
|
|
23
|
+
__defProp(to, key, {
|
|
24
|
+
get: __accessProp.bind(mod, key),
|
|
25
|
+
enumerable: true
|
|
26
|
+
});
|
|
27
|
+
if (canCache)
|
|
28
|
+
cache.set(mod, to);
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
|
+
var __returnValue = (v) => v;
|
|
33
|
+
function __exportSetter(name, newValue) {
|
|
34
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
35
|
+
}
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, {
|
|
39
|
+
get: all[name],
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
set: __exportSetter.bind(all, name)
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/mergeObjects.js
|
|
47
|
+
function mergeObjects(a, b) {
|
|
48
|
+
if (a && !b) {
|
|
49
|
+
return a;
|
|
50
|
+
}
|
|
51
|
+
if (!a && b) {
|
|
52
|
+
return b;
|
|
53
|
+
}
|
|
54
|
+
if (a || b) {
|
|
55
|
+
return {
|
|
56
|
+
...a,
|
|
57
|
+
...b
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/merge-props/mergeProps.js
|
|
64
|
+
var EMPTY_PROPS = {};
|
|
65
|
+
function mergeProps(a, b, c, d, e) {
|
|
66
|
+
if (!c && !d && !e && !a) {
|
|
67
|
+
return createInitialMergedProps(b);
|
|
68
|
+
}
|
|
69
|
+
let merged = createInitialMergedProps(a);
|
|
70
|
+
if (b) {
|
|
71
|
+
merged = mergeInto(merged, b);
|
|
72
|
+
}
|
|
73
|
+
if (c) {
|
|
74
|
+
merged = mergeInto(merged, c);
|
|
75
|
+
}
|
|
76
|
+
if (d) {
|
|
77
|
+
merged = mergeInto(merged, d);
|
|
78
|
+
}
|
|
79
|
+
if (e) {
|
|
80
|
+
merged = mergeInto(merged, e);
|
|
81
|
+
}
|
|
82
|
+
return merged;
|
|
83
|
+
}
|
|
84
|
+
function mergePropsN(props) {
|
|
85
|
+
if (props.length === 0) {
|
|
86
|
+
return EMPTY_PROPS;
|
|
87
|
+
}
|
|
88
|
+
if (props.length === 1) {
|
|
89
|
+
return createInitialMergedProps(props[0]);
|
|
90
|
+
}
|
|
91
|
+
let merged = createInitialMergedProps(props[0]);
|
|
92
|
+
for (let i = 1;i < props.length; i += 1) {
|
|
93
|
+
merged = mergeInto(merged, props[i]);
|
|
94
|
+
}
|
|
95
|
+
return merged;
|
|
96
|
+
}
|
|
97
|
+
function createInitialMergedProps(inputProps) {
|
|
98
|
+
if (isPropsGetter(inputProps)) {
|
|
99
|
+
return {
|
|
100
|
+
...resolvePropsGetter(inputProps, EMPTY_PROPS)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return copyInitialProps(inputProps);
|
|
104
|
+
}
|
|
105
|
+
function mergeInto(merged, inputProps) {
|
|
106
|
+
if (isPropsGetter(inputProps)) {
|
|
107
|
+
return resolvePropsGetter(inputProps, merged);
|
|
108
|
+
}
|
|
109
|
+
return mutablyMergeInto(merged, inputProps);
|
|
110
|
+
}
|
|
111
|
+
function copyInitialProps(inputProps) {
|
|
112
|
+
const copiedProps = {
|
|
113
|
+
...inputProps
|
|
114
|
+
};
|
|
115
|
+
for (const propName in copiedProps) {
|
|
116
|
+
const propValue = copiedProps[propName];
|
|
117
|
+
if (isEventHandler(propName, propValue)) {
|
|
118
|
+
copiedProps[propName] = wrapEventHandler(propValue);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return copiedProps;
|
|
122
|
+
}
|
|
123
|
+
function mutablyMergeInto(mergedProps, externalProps) {
|
|
124
|
+
if (!externalProps) {
|
|
125
|
+
return mergedProps;
|
|
126
|
+
}
|
|
127
|
+
for (const propName in externalProps) {
|
|
128
|
+
const externalPropValue = externalProps[propName];
|
|
129
|
+
switch (propName) {
|
|
130
|
+
case "style": {
|
|
131
|
+
mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case "className": {
|
|
135
|
+
mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
default: {
|
|
139
|
+
if (isEventHandler(propName, externalPropValue)) {
|
|
140
|
+
mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
|
|
141
|
+
} else {
|
|
142
|
+
mergedProps[propName] = externalPropValue;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return mergedProps;
|
|
148
|
+
}
|
|
149
|
+
function isEventHandler(key, value) {
|
|
150
|
+
const code0 = key.charCodeAt(0);
|
|
151
|
+
const code1 = key.charCodeAt(1);
|
|
152
|
+
const code2 = key.charCodeAt(2);
|
|
153
|
+
return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
|
|
154
|
+
}
|
|
155
|
+
function isPropsGetter(inputProps) {
|
|
156
|
+
return typeof inputProps === "function";
|
|
157
|
+
}
|
|
158
|
+
function resolvePropsGetter(inputProps, previousProps) {
|
|
159
|
+
if (isPropsGetter(inputProps)) {
|
|
160
|
+
return inputProps(previousProps);
|
|
161
|
+
}
|
|
162
|
+
return inputProps ?? EMPTY_PROPS;
|
|
163
|
+
}
|
|
164
|
+
function mergeEventHandlers(ourHandler, theirHandler) {
|
|
165
|
+
if (!theirHandler) {
|
|
166
|
+
return ourHandler;
|
|
167
|
+
}
|
|
168
|
+
if (!ourHandler) {
|
|
169
|
+
return wrapEventHandler(theirHandler);
|
|
170
|
+
}
|
|
171
|
+
return (...args) => {
|
|
172
|
+
const event = args[0];
|
|
173
|
+
if (isSyntheticEvent(event)) {
|
|
174
|
+
const baseUIEvent = event;
|
|
175
|
+
makeEventPreventable(baseUIEvent);
|
|
176
|
+
const result2 = theirHandler(...args);
|
|
177
|
+
if (!baseUIEvent.baseUIHandlerPrevented) {
|
|
178
|
+
ourHandler?.(...args);
|
|
179
|
+
}
|
|
180
|
+
return result2;
|
|
181
|
+
}
|
|
182
|
+
const result = theirHandler(...args);
|
|
183
|
+
ourHandler?.(...args);
|
|
184
|
+
return result;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function wrapEventHandler(handler) {
|
|
188
|
+
if (!handler) {
|
|
189
|
+
return handler;
|
|
190
|
+
}
|
|
191
|
+
return (...args) => {
|
|
192
|
+
const event = args[0];
|
|
193
|
+
if (isSyntheticEvent(event)) {
|
|
194
|
+
makeEventPreventable(event);
|
|
195
|
+
}
|
|
196
|
+
return handler(...args);
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function makeEventPreventable(event) {
|
|
200
|
+
event.preventBaseUIHandler = () => {
|
|
201
|
+
event.baseUIHandlerPrevented = true;
|
|
202
|
+
};
|
|
203
|
+
return event;
|
|
204
|
+
}
|
|
205
|
+
function mergeClassNames(ourClassName, theirClassName) {
|
|
206
|
+
if (theirClassName) {
|
|
207
|
+
if (ourClassName) {
|
|
208
|
+
return theirClassName + " " + ourClassName;
|
|
209
|
+
}
|
|
210
|
+
return theirClassName;
|
|
211
|
+
}
|
|
212
|
+
return ourClassName;
|
|
213
|
+
}
|
|
214
|
+
function isSyntheticEvent(event) {
|
|
215
|
+
return event != null && typeof event === "object" && "nativeEvent" in event;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export { __toESM, __commonJS, __export, mergeObjects, mergeProps, mergePropsN, makeEventPreventable, mergeClassNames };
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mergeClassNames,
|
|
3
|
+
mergeObjects,
|
|
4
|
+
mergeProps,
|
|
5
|
+
mergePropsN
|
|
6
|
+
} from "./_chunk-1e6khrvm.js";
|
|
7
|
+
|
|
8
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/internals/useRenderElement.js
|
|
9
|
+
import * as React4 from "react";
|
|
10
|
+
|
|
11
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/useRefWithInit.js
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
"use client";
|
|
14
|
+
var UNINITIALIZED = {};
|
|
15
|
+
function useRefWithInit(init, initArg) {
|
|
16
|
+
const ref = React.useRef(UNINITIALIZED);
|
|
17
|
+
if (ref.current === UNINITIALIZED) {
|
|
18
|
+
ref.current = init(initArg);
|
|
19
|
+
}
|
|
20
|
+
return ref;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/useMergedRefs.js
|
|
24
|
+
function useMergedRefs(a, b, c, d) {
|
|
25
|
+
const forkRef = useRefWithInit(createForkRef).current;
|
|
26
|
+
if (didChange(forkRef, a, b, c, d)) {
|
|
27
|
+
update(forkRef, [a, b, c, d]);
|
|
28
|
+
}
|
|
29
|
+
return forkRef.callback;
|
|
30
|
+
}
|
|
31
|
+
function useMergedRefsN(refs) {
|
|
32
|
+
const forkRef = useRefWithInit(createForkRef).current;
|
|
33
|
+
if (didChangeN(forkRef, refs)) {
|
|
34
|
+
update(forkRef, refs);
|
|
35
|
+
}
|
|
36
|
+
return forkRef.callback;
|
|
37
|
+
}
|
|
38
|
+
function createForkRef() {
|
|
39
|
+
return {
|
|
40
|
+
callback: null,
|
|
41
|
+
cleanup: null,
|
|
42
|
+
refs: []
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function didChange(forkRef, a, b, c, d) {
|
|
46
|
+
return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
|
|
47
|
+
}
|
|
48
|
+
function didChangeN(forkRef, newRefs) {
|
|
49
|
+
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
|
|
50
|
+
}
|
|
51
|
+
function update(forkRef, refs) {
|
|
52
|
+
forkRef.refs = refs;
|
|
53
|
+
if (refs.every((ref) => ref == null)) {
|
|
54
|
+
forkRef.callback = null;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
forkRef.callback = (instance) => {
|
|
58
|
+
if (forkRef.cleanup) {
|
|
59
|
+
forkRef.cleanup();
|
|
60
|
+
forkRef.cleanup = null;
|
|
61
|
+
}
|
|
62
|
+
if (instance != null) {
|
|
63
|
+
const cleanupCallbacks = Array(refs.length).fill(null);
|
|
64
|
+
for (let i = 0;i < refs.length; i += 1) {
|
|
65
|
+
const ref = refs[i];
|
|
66
|
+
if (ref == null) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
switch (typeof ref) {
|
|
70
|
+
case "function": {
|
|
71
|
+
const refCleanup = ref(instance);
|
|
72
|
+
if (typeof refCleanup === "function") {
|
|
73
|
+
cleanupCallbacks[i] = refCleanup;
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case "object": {
|
|
78
|
+
ref.current = instance;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
default:
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
forkRef.cleanup = () => {
|
|
85
|
+
for (let i = 0;i < refs.length; i += 1) {
|
|
86
|
+
const ref = refs[i];
|
|
87
|
+
if (ref == null) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
switch (typeof ref) {
|
|
91
|
+
case "function": {
|
|
92
|
+
const cleanupCallback = cleanupCallbacks[i];
|
|
93
|
+
if (typeof cleanupCallback === "function") {
|
|
94
|
+
cleanupCallback();
|
|
95
|
+
} else {
|
|
96
|
+
ref(null);
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case "object": {
|
|
101
|
+
ref.current = null;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
default:
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/getReactElementRef.js
|
|
113
|
+
import * as React3 from "react";
|
|
114
|
+
|
|
115
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/reactVersion.js
|
|
116
|
+
import * as React2 from "react";
|
|
117
|
+
var majorVersion = parseInt(React2.version, 10);
|
|
118
|
+
function isReactVersionAtLeast(reactVersionToCheck) {
|
|
119
|
+
return majorVersion >= reactVersionToCheck;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/getReactElementRef.js
|
|
123
|
+
function getReactElementRef(element) {
|
|
124
|
+
if (!/* @__PURE__ */ React3.isValidElement(element)) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
const reactElement = element;
|
|
128
|
+
const propsWithRef = reactElement.props;
|
|
129
|
+
return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/warn.js
|
|
133
|
+
var set;
|
|
134
|
+
if (true) {
|
|
135
|
+
set = new Set;
|
|
136
|
+
}
|
|
137
|
+
function warn(...messages) {
|
|
138
|
+
if (true) {
|
|
139
|
+
const messageKey = messages.join(" ");
|
|
140
|
+
if (!set.has(messageKey)) {
|
|
141
|
+
set.add(messageKey);
|
|
142
|
+
console.warn(`Base UI: ${messageKey}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// node_modules/.deno/@base-ui+utils@0.2.8/node_modules/@base-ui/utils/esm/empty.js
|
|
148
|
+
function NOOP() {}
|
|
149
|
+
var EMPTY_ARRAY = Object.freeze([]);
|
|
150
|
+
var EMPTY_OBJECT = Object.freeze({});
|
|
151
|
+
|
|
152
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
|
|
153
|
+
function getStateAttributesProps(state, customMapping) {
|
|
154
|
+
const props = {};
|
|
155
|
+
for (const key in state) {
|
|
156
|
+
const value = state[key];
|
|
157
|
+
if (customMapping?.hasOwnProperty(key)) {
|
|
158
|
+
const customProps = customMapping[key](value);
|
|
159
|
+
if (customProps != null) {
|
|
160
|
+
Object.assign(props, customProps);
|
|
161
|
+
}
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (value === true) {
|
|
165
|
+
props[`data-${key.toLowerCase()}`] = "";
|
|
166
|
+
} else if (value) {
|
|
167
|
+
props[`data-${key.toLowerCase()}`] = value.toString();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return props;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/utils/resolveClassName.js
|
|
174
|
+
function resolveClassName(className, state) {
|
|
175
|
+
return typeof className === "function" ? className(state) : className;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/utils/resolveStyle.js
|
|
179
|
+
function resolveStyle(style, state) {
|
|
180
|
+
return typeof style === "function" ? style(state) : style;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/internals/useRenderElement.js
|
|
184
|
+
import { createElement as _createElement } from "react";
|
|
185
|
+
function useRenderElement(element, componentProps, params = {}) {
|
|
186
|
+
const renderProp = componentProps.render;
|
|
187
|
+
const outProps = useRenderElementProps(componentProps, params);
|
|
188
|
+
if (params.enabled === false) {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
const state = params.state ?? EMPTY_OBJECT;
|
|
192
|
+
return evaluateRenderProp(element, renderProp, outProps, state);
|
|
193
|
+
}
|
|
194
|
+
function useRenderElementProps(componentProps, params = {}) {
|
|
195
|
+
const {
|
|
196
|
+
className: classNameProp,
|
|
197
|
+
style: styleProp,
|
|
198
|
+
render: renderProp
|
|
199
|
+
} = componentProps;
|
|
200
|
+
const {
|
|
201
|
+
state = EMPTY_OBJECT,
|
|
202
|
+
ref,
|
|
203
|
+
props,
|
|
204
|
+
stateAttributesMapping,
|
|
205
|
+
enabled = true
|
|
206
|
+
} = params;
|
|
207
|
+
const className = enabled ? resolveClassName(classNameProp, state) : undefined;
|
|
208
|
+
const style = enabled ? resolveStyle(styleProp, state) : undefined;
|
|
209
|
+
const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
|
|
210
|
+
const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : undefined;
|
|
211
|
+
const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
|
|
212
|
+
if (typeof document !== "undefined") {
|
|
213
|
+
if (!enabled) {
|
|
214
|
+
useMergedRefs(null, null);
|
|
215
|
+
} else if (Array.isArray(ref)) {
|
|
216
|
+
outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
|
|
217
|
+
} else {
|
|
218
|
+
outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (!enabled) {
|
|
222
|
+
return EMPTY_OBJECT;
|
|
223
|
+
}
|
|
224
|
+
if (className !== undefined) {
|
|
225
|
+
outProps.className = mergeClassNames(outProps.className, className);
|
|
226
|
+
}
|
|
227
|
+
if (style !== undefined) {
|
|
228
|
+
outProps.style = mergeObjects(outProps.style, style);
|
|
229
|
+
}
|
|
230
|
+
return outProps;
|
|
231
|
+
}
|
|
232
|
+
function resolveRenderFunctionProps(props) {
|
|
233
|
+
if (Array.isArray(props)) {
|
|
234
|
+
return mergePropsN(props);
|
|
235
|
+
}
|
|
236
|
+
return mergeProps(undefined, props);
|
|
237
|
+
}
|
|
238
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
239
|
+
var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
|
|
240
|
+
var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
|
|
241
|
+
function evaluateRenderProp(element, render, props, state) {
|
|
242
|
+
if (render) {
|
|
243
|
+
if (typeof render === "function") {
|
|
244
|
+
if (true) {
|
|
245
|
+
warnIfRenderPropLooksLikeComponent(render);
|
|
246
|
+
}
|
|
247
|
+
return render(props, state);
|
|
248
|
+
}
|
|
249
|
+
const mergedProps = mergeProps(props, render.props);
|
|
250
|
+
mergedProps.ref = props.ref;
|
|
251
|
+
let newElement = render;
|
|
252
|
+
if (newElement?.$$typeof === REACT_LAZY_TYPE) {
|
|
253
|
+
const children = React4.Children.toArray(render);
|
|
254
|
+
newElement = children[0];
|
|
255
|
+
}
|
|
256
|
+
if (true) {
|
|
257
|
+
if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
|
|
258
|
+
throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join(`
|
|
259
|
+
`));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
|
|
263
|
+
}
|
|
264
|
+
if (element) {
|
|
265
|
+
if (typeof element === "string") {
|
|
266
|
+
return renderTag(element, props);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
throw new Error("Base UI: Render element or function are not defined.");
|
|
270
|
+
}
|
|
271
|
+
function warnIfRenderPropLooksLikeComponent(renderFn) {
|
|
272
|
+
const functionName = renderFn.name;
|
|
273
|
+
if (functionName.length === 0) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
|
|
283
|
+
}
|
|
284
|
+
function renderTag(Tag, props) {
|
|
285
|
+
if (Tag === "button") {
|
|
286
|
+
return /* @__PURE__ */ _createElement("button", {
|
|
287
|
+
type: "button",
|
|
288
|
+
...props,
|
|
289
|
+
key: props.key
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
if (Tag === "img") {
|
|
293
|
+
return /* @__PURE__ */ _createElement("img", {
|
|
294
|
+
alt: "",
|
|
295
|
+
...props,
|
|
296
|
+
key: props.key
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
return /* @__PURE__ */ React4.createElement(Tag, props);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export { useRefWithInit, warn, useMergedRefs, isReactVersionAtLeast, NOOP, EMPTY_ARRAY, EMPTY_OBJECT, useRenderElement };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/internals/composite/list/CompositeListContext.js
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
"use client";
|
|
4
|
+
var CompositeListContext = /* @__PURE__ */ React.createContext({
|
|
5
|
+
register: () => {},
|
|
6
|
+
unregister: () => {},
|
|
7
|
+
subscribeMapChange: () => {
|
|
8
|
+
return () => {};
|
|
9
|
+
},
|
|
10
|
+
elementsRef: {
|
|
11
|
+
current: []
|
|
12
|
+
},
|
|
13
|
+
nextIndexRef: {
|
|
14
|
+
current: 0
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
if (true)
|
|
18
|
+
CompositeListContext.displayName = "CompositeListContext";
|
|
19
|
+
function useCompositeListContext() {
|
|
20
|
+
return React.useContext(CompositeListContext);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { CompositeListContext, useCompositeListContext };
|