@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,138 @@
|
|
|
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
|
+
DialogBackdrop,
|
|
6
|
+
DialogClose,
|
|
7
|
+
DialogDescription,
|
|
8
|
+
DialogHandle,
|
|
9
|
+
DialogPopup,
|
|
10
|
+
DialogPortal,
|
|
11
|
+
DialogRootContext,
|
|
12
|
+
DialogStore,
|
|
13
|
+
DialogTitle,
|
|
14
|
+
DialogTrigger,
|
|
15
|
+
DialogViewport,
|
|
16
|
+
IsDrawerContext,
|
|
17
|
+
useDialogRoot,
|
|
18
|
+
useDialogRootContext
|
|
19
|
+
} from "./_chunk-atd5kq5q.js";
|
|
20
|
+
import"./_chunk-q3nee19r.js";
|
|
21
|
+
import"./_chunk-7jjzay8b.js";
|
|
22
|
+
import"./_chunk-f09cp81f.js";
|
|
23
|
+
import"./_chunk-f9tgee1q.js";
|
|
24
|
+
import"./_chunk-536jvgeq.js";
|
|
25
|
+
import"./_chunk-9nyxkvte.js";
|
|
26
|
+
import"./_chunk-2tyt8f8r.js";
|
|
27
|
+
import"./_chunk-aqwsk46c.js";
|
|
28
|
+
import"./_chunk-xb7ph1ka.js";
|
|
29
|
+
import"./_chunk-atnkefgd.js";
|
|
30
|
+
import"./_chunk-drfb9kp2.js";
|
|
31
|
+
import"./_chunk-qce0xt57.js";
|
|
32
|
+
import"./_chunk-nya71ccw.js";
|
|
33
|
+
import"./_chunk-t7j3rbpv.js";
|
|
34
|
+
import"./_chunk-7v1t86x1.js";
|
|
35
|
+
import"./_chunk-cwr896nf.js";
|
|
36
|
+
import"./_chunk-hzgetm70.js";
|
|
37
|
+
import"./_chunk-f5d01bp9.js";
|
|
38
|
+
import"./_chunk-mvv30fkv.js";
|
|
39
|
+
import"./_chunk-4s0k3h7t.js";
|
|
40
|
+
import"./_chunk-8kh3xk78.js";
|
|
41
|
+
import"./_chunk-mbn76q14.js";
|
|
42
|
+
import"./_chunk-v92ycsfj.js";
|
|
43
|
+
import"./_chunk-3h6zpchb.js";
|
|
44
|
+
import"./_chunk-8jz3hb7q.js";
|
|
45
|
+
import"./_chunk-85vrgzwr.js";
|
|
46
|
+
import"./_chunk-71zm6zgv.js";
|
|
47
|
+
import"./_chunk-6xevjepc.js";
|
|
48
|
+
import"./_chunk-sx6vkz01.js";
|
|
49
|
+
import"./_chunk-n7dnqnbw.js";
|
|
50
|
+
import"./_chunk-mznt6ktj.js";
|
|
51
|
+
import"./_chunk-b40erthe.js";
|
|
52
|
+
import"./_chunk-1s41sngz.js";
|
|
53
|
+
import {
|
|
54
|
+
__export
|
|
55
|
+
} from "./_chunk-1e6khrvm.js";
|
|
56
|
+
|
|
57
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/alert-dialog/index.parts.js
|
|
58
|
+
var exports_index_parts = {};
|
|
59
|
+
__export(exports_index_parts, {
|
|
60
|
+
createHandle: () => createAlertDialogHandle,
|
|
61
|
+
Viewport: () => DialogViewport,
|
|
62
|
+
Trigger: () => DialogTrigger,
|
|
63
|
+
Title: () => DialogTitle,
|
|
64
|
+
Root: () => AlertDialogRoot,
|
|
65
|
+
Portal: () => DialogPortal,
|
|
66
|
+
Popup: () => DialogPopup,
|
|
67
|
+
Handle: () => DialogHandle,
|
|
68
|
+
Description: () => DialogDescription,
|
|
69
|
+
Close: () => DialogClose,
|
|
70
|
+
Backdrop: () => DialogBackdrop
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/alert-dialog/root/AlertDialogRoot.js
|
|
74
|
+
import * as React from "react";
|
|
75
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
76
|
+
"use client";
|
|
77
|
+
function AlertDialogRoot(props) {
|
|
78
|
+
const {
|
|
79
|
+
children,
|
|
80
|
+
open: openProp,
|
|
81
|
+
defaultOpen = false,
|
|
82
|
+
onOpenChange,
|
|
83
|
+
onOpenChangeComplete,
|
|
84
|
+
actionsRef,
|
|
85
|
+
handle,
|
|
86
|
+
triggerId: triggerIdProp,
|
|
87
|
+
defaultTriggerId: defaultTriggerIdProp = null
|
|
88
|
+
} = props;
|
|
89
|
+
const parentDialogRootContext = useDialogRootContext(true);
|
|
90
|
+
const nested = Boolean(parentDialogRootContext);
|
|
91
|
+
const store = DialogStore.useStore(handle?.store, {
|
|
92
|
+
open: defaultOpen,
|
|
93
|
+
openProp,
|
|
94
|
+
activeTriggerId: defaultTriggerIdProp,
|
|
95
|
+
triggerIdProp,
|
|
96
|
+
modal: true,
|
|
97
|
+
disablePointerDismissal: true,
|
|
98
|
+
nested,
|
|
99
|
+
role: "alertdialog"
|
|
100
|
+
});
|
|
101
|
+
store.useControlledProp("openProp", openProp);
|
|
102
|
+
store.useControlledProp("triggerIdProp", triggerIdProp);
|
|
103
|
+
store.useSyncedValue("nested", nested);
|
|
104
|
+
store.useContextCallback("onOpenChange", onOpenChange);
|
|
105
|
+
store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
|
|
106
|
+
const payload = store.useState("payload");
|
|
107
|
+
useDialogRoot({
|
|
108
|
+
store,
|
|
109
|
+
actionsRef,
|
|
110
|
+
parentContext: parentDialogRootContext?.store.context,
|
|
111
|
+
isDrawer: false,
|
|
112
|
+
onOpenChange,
|
|
113
|
+
triggerIdProp
|
|
114
|
+
});
|
|
115
|
+
const contextValue = React.useMemo(() => ({
|
|
116
|
+
store
|
|
117
|
+
}), [store]);
|
|
118
|
+
return /* @__PURE__ */ _jsx(IsDrawerContext.Provider, {
|
|
119
|
+
value: false,
|
|
120
|
+
children: /* @__PURE__ */ _jsx(DialogRootContext.Provider, {
|
|
121
|
+
value: contextValue,
|
|
122
|
+
children: typeof children === "function" ? children({
|
|
123
|
+
payload
|
|
124
|
+
}) : children
|
|
125
|
+
})
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/alert-dialog/handle.js
|
|
129
|
+
function createAlertDialogHandle() {
|
|
130
|
+
return new DialogHandle(new DialogStore({
|
|
131
|
+
modal: true,
|
|
132
|
+
disablePointerDismissal: true,
|
|
133
|
+
role: "alertdialog"
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
exports_index_parts as AlertDialog
|
|
138
|
+
};
|
|
@@ -0,0 +1,235 @@
|
|
|
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"./_chunk-ds8fnpjj.js";
|
|
5
|
+
import {
|
|
6
|
+
useTimeout
|
|
7
|
+
} from "./_chunk-7v1t86x1.js";
|
|
8
|
+
import {
|
|
9
|
+
transitionStatusMapping,
|
|
10
|
+
useOpenChangeComplete,
|
|
11
|
+
useTransitionStatus
|
|
12
|
+
} from "./_chunk-mbn76q14.js";
|
|
13
|
+
import"./_chunk-v92ycsfj.js";
|
|
14
|
+
import"./_chunk-3h6zpchb.js";
|
|
15
|
+
import"./_chunk-8jz3hb7q.js";
|
|
16
|
+
import {
|
|
17
|
+
useStableCallback
|
|
18
|
+
} from "./_chunk-mznt6ktj.js";
|
|
19
|
+
import {
|
|
20
|
+
useIsoLayoutEffect
|
|
21
|
+
} from "./_chunk-b40erthe.js";
|
|
22
|
+
import {
|
|
23
|
+
NOOP,
|
|
24
|
+
useRenderElement
|
|
25
|
+
} from "./_chunk-1s41sngz.js";
|
|
26
|
+
import {
|
|
27
|
+
__export
|
|
28
|
+
} from "./_chunk-1e6khrvm.js";
|
|
29
|
+
|
|
30
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/index.parts.js
|
|
31
|
+
var exports_index_parts = {};
|
|
32
|
+
__export(exports_index_parts, {
|
|
33
|
+
Root: () => AvatarRoot,
|
|
34
|
+
Image: () => AvatarImage,
|
|
35
|
+
Fallback: () => AvatarFallback
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/root/AvatarRoot.js
|
|
39
|
+
import * as React2 from "react";
|
|
40
|
+
|
|
41
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/root/AvatarRootContext.js
|
|
42
|
+
import * as React from "react";
|
|
43
|
+
"use client";
|
|
44
|
+
var AvatarRootContext = /* @__PURE__ */ React.createContext(undefined);
|
|
45
|
+
if (true)
|
|
46
|
+
AvatarRootContext.displayName = "AvatarRootContext";
|
|
47
|
+
function useAvatarRootContext() {
|
|
48
|
+
const context = React.useContext(AvatarRootContext);
|
|
49
|
+
if (context === undefined) {
|
|
50
|
+
throw new Error("Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.");
|
|
51
|
+
}
|
|
52
|
+
return context;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/root/stateAttributesMapping.js
|
|
56
|
+
var avatarStateAttributesMapping = {
|
|
57
|
+
imageLoadingStatus: () => null
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/root/AvatarRoot.js
|
|
61
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
62
|
+
"use client";
|
|
63
|
+
var AvatarRoot = /* @__PURE__ */ React2.forwardRef(function AvatarRoot2(componentProps, forwardedRef) {
|
|
64
|
+
const {
|
|
65
|
+
className,
|
|
66
|
+
render,
|
|
67
|
+
style,
|
|
68
|
+
...elementProps
|
|
69
|
+
} = componentProps;
|
|
70
|
+
const [imageLoadingStatus, setImageLoadingStatus] = React2.useState("idle");
|
|
71
|
+
const state = {
|
|
72
|
+
imageLoadingStatus
|
|
73
|
+
};
|
|
74
|
+
const contextValue = React2.useMemo(() => ({
|
|
75
|
+
imageLoadingStatus,
|
|
76
|
+
setImageLoadingStatus
|
|
77
|
+
}), [imageLoadingStatus, setImageLoadingStatus]);
|
|
78
|
+
const element = useRenderElement("span", componentProps, {
|
|
79
|
+
state,
|
|
80
|
+
ref: forwardedRef,
|
|
81
|
+
props: elementProps,
|
|
82
|
+
stateAttributesMapping: avatarStateAttributesMapping
|
|
83
|
+
});
|
|
84
|
+
return /* @__PURE__ */ _jsx(AvatarRootContext.Provider, {
|
|
85
|
+
value: contextValue,
|
|
86
|
+
children: element
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
if (true)
|
|
90
|
+
AvatarRoot.displayName = "AvatarRoot";
|
|
91
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/image/AvatarImage.js
|
|
92
|
+
import * as React4 from "react";
|
|
93
|
+
|
|
94
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/image/useImageLoadingStatus.js
|
|
95
|
+
import * as React3 from "react";
|
|
96
|
+
"use client";
|
|
97
|
+
function useImageLoadingStatus(src, {
|
|
98
|
+
referrerPolicy,
|
|
99
|
+
crossOrigin
|
|
100
|
+
}) {
|
|
101
|
+
const [loadingStatus, setLoadingStatus] = React3.useState("idle");
|
|
102
|
+
useIsoLayoutEffect(() => {
|
|
103
|
+
if (!src) {
|
|
104
|
+
setLoadingStatus("error");
|
|
105
|
+
return NOOP;
|
|
106
|
+
}
|
|
107
|
+
let isMounted = true;
|
|
108
|
+
const image = new window.Image;
|
|
109
|
+
const updateStatus = (status) => () => {
|
|
110
|
+
if (!isMounted) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
setLoadingStatus(status);
|
|
114
|
+
};
|
|
115
|
+
setLoadingStatus("loading");
|
|
116
|
+
image.onload = updateStatus("loaded");
|
|
117
|
+
image.onerror = updateStatus("error");
|
|
118
|
+
if (referrerPolicy) {
|
|
119
|
+
image.referrerPolicy = referrerPolicy;
|
|
120
|
+
}
|
|
121
|
+
image.crossOrigin = crossOrigin ?? null;
|
|
122
|
+
image.src = src;
|
|
123
|
+
if (image.complete) {
|
|
124
|
+
setLoadingStatus(image.naturalWidth > 0 ? "loaded" : "error");
|
|
125
|
+
}
|
|
126
|
+
return () => {
|
|
127
|
+
isMounted = false;
|
|
128
|
+
};
|
|
129
|
+
}, [src, crossOrigin, referrerPolicy]);
|
|
130
|
+
return loadingStatus;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/image/AvatarImage.js
|
|
134
|
+
"use client";
|
|
135
|
+
var stateAttributesMapping = {
|
|
136
|
+
...avatarStateAttributesMapping,
|
|
137
|
+
...transitionStatusMapping
|
|
138
|
+
};
|
|
139
|
+
var AvatarImage = /* @__PURE__ */ React4.forwardRef(function AvatarImage2(componentProps, forwardedRef) {
|
|
140
|
+
const {
|
|
141
|
+
className,
|
|
142
|
+
render,
|
|
143
|
+
onLoadingStatusChange: onLoadingStatusChangeProp,
|
|
144
|
+
referrerPolicy,
|
|
145
|
+
crossOrigin,
|
|
146
|
+
style,
|
|
147
|
+
...elementProps
|
|
148
|
+
} = componentProps;
|
|
149
|
+
const context = useAvatarRootContext();
|
|
150
|
+
const imageLoadingStatus = useImageLoadingStatus(componentProps.src, {
|
|
151
|
+
referrerPolicy,
|
|
152
|
+
crossOrigin
|
|
153
|
+
});
|
|
154
|
+
const isVisible = imageLoadingStatus === "loaded";
|
|
155
|
+
const {
|
|
156
|
+
mounted,
|
|
157
|
+
transitionStatus,
|
|
158
|
+
setMounted
|
|
159
|
+
} = useTransitionStatus(isVisible);
|
|
160
|
+
const imageRef = React4.useRef(null);
|
|
161
|
+
const handleLoadingStatusChange = useStableCallback((status) => {
|
|
162
|
+
onLoadingStatusChangeProp?.(status);
|
|
163
|
+
context.setImageLoadingStatus(status);
|
|
164
|
+
});
|
|
165
|
+
useIsoLayoutEffect(() => {
|
|
166
|
+
if (imageLoadingStatus !== "idle") {
|
|
167
|
+
handleLoadingStatusChange(imageLoadingStatus);
|
|
168
|
+
}
|
|
169
|
+
}, [imageLoadingStatus, handleLoadingStatusChange]);
|
|
170
|
+
const state = {
|
|
171
|
+
imageLoadingStatus,
|
|
172
|
+
transitionStatus
|
|
173
|
+
};
|
|
174
|
+
useOpenChangeComplete({
|
|
175
|
+
open: isVisible,
|
|
176
|
+
ref: imageRef,
|
|
177
|
+
onComplete() {
|
|
178
|
+
if (!isVisible) {
|
|
179
|
+
setMounted(false);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
const element = useRenderElement("img", componentProps, {
|
|
184
|
+
state,
|
|
185
|
+
ref: [forwardedRef, imageRef],
|
|
186
|
+
props: elementProps,
|
|
187
|
+
stateAttributesMapping,
|
|
188
|
+
enabled: mounted
|
|
189
|
+
});
|
|
190
|
+
if (!mounted) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
return element;
|
|
194
|
+
});
|
|
195
|
+
if (true)
|
|
196
|
+
AvatarImage.displayName = "AvatarImage";
|
|
197
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/avatar/fallback/AvatarFallback.js
|
|
198
|
+
import * as React5 from "react";
|
|
199
|
+
"use client";
|
|
200
|
+
var AvatarFallback = /* @__PURE__ */ React5.forwardRef(function AvatarFallback2(componentProps, forwardedRef) {
|
|
201
|
+
const {
|
|
202
|
+
className,
|
|
203
|
+
render,
|
|
204
|
+
delay,
|
|
205
|
+
style,
|
|
206
|
+
...elementProps
|
|
207
|
+
} = componentProps;
|
|
208
|
+
const {
|
|
209
|
+
imageLoadingStatus
|
|
210
|
+
} = useAvatarRootContext();
|
|
211
|
+
const [delayPassed, setDelayPassed] = React5.useState(delay === undefined);
|
|
212
|
+
const timeout = useTimeout();
|
|
213
|
+
React5.useEffect(() => {
|
|
214
|
+
if (delay !== undefined) {
|
|
215
|
+
timeout.start(delay, () => setDelayPassed(true));
|
|
216
|
+
}
|
|
217
|
+
return timeout.clear;
|
|
218
|
+
}, [timeout, delay]);
|
|
219
|
+
const state = {
|
|
220
|
+
imageLoadingStatus
|
|
221
|
+
};
|
|
222
|
+
const element = useRenderElement("span", componentProps, {
|
|
223
|
+
state,
|
|
224
|
+
ref: forwardedRef,
|
|
225
|
+
props: elementProps,
|
|
226
|
+
stateAttributesMapping: avatarStateAttributesMapping,
|
|
227
|
+
enabled: imageLoadingStatus !== "loaded" && delayPassed
|
|
228
|
+
});
|
|
229
|
+
return element;
|
|
230
|
+
});
|
|
231
|
+
if (true)
|
|
232
|
+
AvatarFallback.displayName = "AvatarFallback";
|
|
233
|
+
export {
|
|
234
|
+
exports_index_parts as Avatar
|
|
235
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
useButton
|
|
6
|
+
} from "./_chunk-85vrgzwr.js";
|
|
7
|
+
import"./_chunk-71zm6zgv.js";
|
|
8
|
+
import"./_chunk-6xevjepc.js";
|
|
9
|
+
import"./_chunk-sx6vkz01.js";
|
|
10
|
+
import"./_chunk-n7dnqnbw.js";
|
|
11
|
+
import"./_chunk-mznt6ktj.js";
|
|
12
|
+
import"./_chunk-b40erthe.js";
|
|
13
|
+
import {
|
|
14
|
+
useRenderElement
|
|
15
|
+
} from "./_chunk-1s41sngz.js";
|
|
16
|
+
import"./_chunk-1e6khrvm.js";
|
|
17
|
+
|
|
18
|
+
// node_modules/.deno/@base-ui+react@1.4.1/node_modules/@base-ui/react/esm/button/Button.js
|
|
19
|
+
import * as React from "react";
|
|
20
|
+
"use client";
|
|
21
|
+
var Button = /* @__PURE__ */ React.forwardRef(function Button2(componentProps, forwardedRef) {
|
|
22
|
+
const {
|
|
23
|
+
render,
|
|
24
|
+
className,
|
|
25
|
+
disabled = false,
|
|
26
|
+
focusableWhenDisabled = false,
|
|
27
|
+
nativeButton = true,
|
|
28
|
+
style,
|
|
29
|
+
...elementProps
|
|
30
|
+
} = componentProps;
|
|
31
|
+
const {
|
|
32
|
+
getButtonProps,
|
|
33
|
+
buttonRef
|
|
34
|
+
} = useButton({
|
|
35
|
+
disabled,
|
|
36
|
+
focusableWhenDisabled,
|
|
37
|
+
native: nativeButton
|
|
38
|
+
});
|
|
39
|
+
const state = {
|
|
40
|
+
disabled
|
|
41
|
+
};
|
|
42
|
+
return useRenderElement("button", componentProps, {
|
|
43
|
+
state,
|
|
44
|
+
ref: [forwardedRef, buttonRef],
|
|
45
|
+
props: [elementProps, getButtonProps]
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
if (true)
|
|
49
|
+
Button.displayName = "Button";
|
|
50
|
+
export {
|
|
51
|
+
Button
|
|
52
|
+
};
|