@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
package/shadcn/ui/chart.jsx
DELETED
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as RechartsPrimitive from "recharts"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../lib/utils.js"
|
|
5
|
-
|
|
6
|
-
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
7
|
-
const THEMES = {
|
|
8
|
-
light: "",
|
|
9
|
-
dark: ".dark"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const ChartContext = React.createContext(null)
|
|
13
|
-
|
|
14
|
-
function useChart() {
|
|
15
|
-
const context = React.useContext(ChartContext)
|
|
16
|
-
|
|
17
|
-
if (!context) {
|
|
18
|
-
throw new Error("useChart must be used within a <ChartContainer />")
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return context
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function ChartContainer({
|
|
25
|
-
id,
|
|
26
|
-
className,
|
|
27
|
-
children,
|
|
28
|
-
config,
|
|
29
|
-
...props
|
|
30
|
-
}) {
|
|
31
|
-
const uniqueId = React.useId()
|
|
32
|
-
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<ChartContext.Provider value={{ config }}>
|
|
36
|
-
<div
|
|
37
|
-
data-slot="chart"
|
|
38
|
-
data-chart={chartId}
|
|
39
|
-
className={cn(
|
|
40
|
-
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
41
|
-
className
|
|
42
|
-
)}
|
|
43
|
-
{...props}>
|
|
44
|
-
<ChartStyle id={chartId} config={config} />
|
|
45
|
-
<RechartsPrimitive.ResponsiveContainer>
|
|
46
|
-
{children}
|
|
47
|
-
</RechartsPrimitive.ResponsiveContainer>
|
|
48
|
-
</div>
|
|
49
|
-
</ChartContext.Provider>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const ChartStyle = ({
|
|
54
|
-
id,
|
|
55
|
-
config
|
|
56
|
-
}) => {
|
|
57
|
-
const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color)
|
|
58
|
-
|
|
59
|
-
if (!colorConfig.length) {
|
|
60
|
-
return null
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<style
|
|
65
|
-
dangerouslySetInnerHTML={{
|
|
66
|
-
__html: Object.entries(THEMES)
|
|
67
|
-
.map(([theme, prefix]) => `
|
|
68
|
-
${prefix} [data-chart=${id}] {
|
|
69
|
-
${colorConfig
|
|
70
|
-
.map(([key, itemConfig]) => {
|
|
71
|
-
const color =
|
|
72
|
-
itemConfig.theme?.[theme] ||
|
|
73
|
-
itemConfig.color
|
|
74
|
-
return color ? ` --color-${key}: ${color};` : null
|
|
75
|
-
})
|
|
76
|
-
.join("\n")}
|
|
77
|
-
}
|
|
78
|
-
`)
|
|
79
|
-
.join("\n"),
|
|
80
|
-
}} />
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const ChartTooltip = RechartsPrimitive.Tooltip
|
|
85
|
-
|
|
86
|
-
function ChartTooltipContent({
|
|
87
|
-
active,
|
|
88
|
-
payload,
|
|
89
|
-
className,
|
|
90
|
-
indicator = "dot",
|
|
91
|
-
hideLabel = false,
|
|
92
|
-
hideIndicator = false,
|
|
93
|
-
label,
|
|
94
|
-
labelFormatter,
|
|
95
|
-
labelClassName,
|
|
96
|
-
formatter,
|
|
97
|
-
color,
|
|
98
|
-
nameKey,
|
|
99
|
-
labelKey
|
|
100
|
-
}) {
|
|
101
|
-
const { config } = useChart()
|
|
102
|
-
|
|
103
|
-
const tooltipLabel = React.useMemo(() => {
|
|
104
|
-
if (hideLabel || !payload?.length) {
|
|
105
|
-
return null
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const [item] = payload
|
|
109
|
-
const key = `${labelKey || item?.dataKey || item?.name || "value"}`
|
|
110
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
|
111
|
-
const value =
|
|
112
|
-
!labelKey && typeof label === "string"
|
|
113
|
-
? config[label]?.label || label
|
|
114
|
-
: itemConfig?.label
|
|
115
|
-
|
|
116
|
-
if (labelFormatter) {
|
|
117
|
-
return (
|
|
118
|
-
<div className={cn("font-medium", labelClassName)}>
|
|
119
|
-
{labelFormatter(value, payload)}
|
|
120
|
-
</div>
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (!value) {
|
|
125
|
-
return null
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return <div className={cn("font-medium", labelClassName)}>{value}</div>;
|
|
129
|
-
}, [
|
|
130
|
-
label,
|
|
131
|
-
labelFormatter,
|
|
132
|
-
payload,
|
|
133
|
-
hideLabel,
|
|
134
|
-
labelClassName,
|
|
135
|
-
config,
|
|
136
|
-
labelKey,
|
|
137
|
-
])
|
|
138
|
-
|
|
139
|
-
if (!active || !payload?.length) {
|
|
140
|
-
return null
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
const nestLabel = payload.length === 1 && indicator !== "dot"
|
|
144
|
-
|
|
145
|
-
return (
|
|
146
|
-
<div
|
|
147
|
-
className={cn(
|
|
148
|
-
"border-border/50 bg-background gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl grid min-w-[8rem] items-start",
|
|
149
|
-
className
|
|
150
|
-
)}>
|
|
151
|
-
{!nestLabel ? tooltipLabel : null}
|
|
152
|
-
<div className="grid gap-1.5">
|
|
153
|
-
{payload
|
|
154
|
-
.filter((item) => item.type !== "none")
|
|
155
|
-
.map((item, index) => {
|
|
156
|
-
const key = `${nameKey || item.name || item.dataKey || "value"}`
|
|
157
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
|
158
|
-
const indicatorColor = color || item.payload.fill || item.color
|
|
159
|
-
|
|
160
|
-
return (
|
|
161
|
-
<div
|
|
162
|
-
key={item.dataKey}
|
|
163
|
-
className={cn(
|
|
164
|
-
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
165
|
-
indicator === "dot" && "items-center"
|
|
166
|
-
)}>
|
|
167
|
-
{formatter && item?.value !== undefined && item.name ? (
|
|
168
|
-
formatter(item.value, item.name, item, index, item.payload)
|
|
169
|
-
) : (
|
|
170
|
-
<>
|
|
171
|
-
{itemConfig?.icon ? (
|
|
172
|
-
<itemConfig.icon />
|
|
173
|
-
) : (
|
|
174
|
-
!hideIndicator && (
|
|
175
|
-
<div
|
|
176
|
-
className={cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
177
|
-
"h-2.5 w-2.5": indicator === "dot",
|
|
178
|
-
"w-1": indicator === "line",
|
|
179
|
-
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
180
|
-
indicator === "dashed",
|
|
181
|
-
"my-0.5": nestLabel && indicator === "dashed",
|
|
182
|
-
})}
|
|
183
|
-
style={
|
|
184
|
-
{
|
|
185
|
-
"--color-bg": indicatorColor,
|
|
186
|
-
"--color-border": indicatorColor
|
|
187
|
-
}
|
|
188
|
-
} />
|
|
189
|
-
)
|
|
190
|
-
)}
|
|
191
|
-
<div
|
|
192
|
-
className={cn(
|
|
193
|
-
"flex flex-1 justify-between leading-none",
|
|
194
|
-
nestLabel ? "items-end" : "items-center"
|
|
195
|
-
)}>
|
|
196
|
-
<div className="grid gap-1.5">
|
|
197
|
-
{nestLabel ? tooltipLabel : null}
|
|
198
|
-
<span className="text-muted-foreground">
|
|
199
|
-
{itemConfig?.label || item.name}
|
|
200
|
-
</span>
|
|
201
|
-
</div>
|
|
202
|
-
{item.value && (
|
|
203
|
-
<span className="text-foreground font-mono font-medium tabular-nums">
|
|
204
|
-
{item.value.toLocaleString()}
|
|
205
|
-
</span>
|
|
206
|
-
)}
|
|
207
|
-
</div>
|
|
208
|
-
</>
|
|
209
|
-
)}
|
|
210
|
-
</div>
|
|
211
|
-
);
|
|
212
|
-
})}
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const ChartLegend = RechartsPrimitive.Legend
|
|
219
|
-
|
|
220
|
-
function ChartLegendContent({
|
|
221
|
-
className,
|
|
222
|
-
hideIcon = false,
|
|
223
|
-
payload,
|
|
224
|
-
verticalAlign = "bottom",
|
|
225
|
-
nameKey
|
|
226
|
-
}) {
|
|
227
|
-
const { config } = useChart()
|
|
228
|
-
|
|
229
|
-
if (!payload?.length) {
|
|
230
|
-
return null
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
return (
|
|
234
|
-
<div
|
|
235
|
-
className={cn(
|
|
236
|
-
"flex items-center justify-center gap-4",
|
|
237
|
-
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
238
|
-
className
|
|
239
|
-
)}>
|
|
240
|
-
{payload
|
|
241
|
-
.filter((item) => item.type !== "none")
|
|
242
|
-
.map((item) => {
|
|
243
|
-
const key = `${nameKey || item.dataKey || "value"}`
|
|
244
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
|
245
|
-
|
|
246
|
-
return (
|
|
247
|
-
<div
|
|
248
|
-
key={item.value}
|
|
249
|
-
className={cn(
|
|
250
|
-
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
251
|
-
)}>
|
|
252
|
-
{itemConfig?.icon && !hideIcon ? (
|
|
253
|
-
<itemConfig.icon />
|
|
254
|
-
) : (
|
|
255
|
-
<div
|
|
256
|
-
className="h-2 w-2 shrink-0 rounded-[2px]"
|
|
257
|
-
style={{
|
|
258
|
-
backgroundColor: item.color,
|
|
259
|
-
}} />
|
|
260
|
-
)}
|
|
261
|
-
{itemConfig?.label}
|
|
262
|
-
</div>
|
|
263
|
-
);
|
|
264
|
-
})}
|
|
265
|
-
</div>
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function getPayloadConfigFromPayload(
|
|
270
|
-
config,
|
|
271
|
-
payload,
|
|
272
|
-
key
|
|
273
|
-
) {
|
|
274
|
-
if (typeof payload !== "object" || payload === null) {
|
|
275
|
-
return undefined
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
const payloadPayload =
|
|
279
|
-
"payload" in payload &&
|
|
280
|
-
typeof payload.payload === "object" &&
|
|
281
|
-
payload.payload !== null
|
|
282
|
-
? payload.payload
|
|
283
|
-
: undefined
|
|
284
|
-
|
|
285
|
-
let configLabelKey = key
|
|
286
|
-
|
|
287
|
-
if (
|
|
288
|
-
key in payload &&
|
|
289
|
-
typeof payload[key] === "string"
|
|
290
|
-
) {
|
|
291
|
-
configLabelKey = payload[key]
|
|
292
|
-
} else if (
|
|
293
|
-
payloadPayload &&
|
|
294
|
-
key in payloadPayload &&
|
|
295
|
-
typeof payloadPayload[key] === "string"
|
|
296
|
-
) {
|
|
297
|
-
configLabelKey = payloadPayload[key]
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
return configLabelKey in config
|
|
301
|
-
? config[configLabelKey]
|
|
302
|
-
: config[key];
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export {
|
|
306
|
-
ChartContainer,
|
|
307
|
-
ChartTooltip,
|
|
308
|
-
ChartTooltipContent,
|
|
309
|
-
ChartLegend,
|
|
310
|
-
ChartLegendContent,
|
|
311
|
-
ChartStyle,
|
|
312
|
-
}
|
package/shadcn/ui/resizable.jsx
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as ResizablePrimitive from "react-resizable-panels"
|
|
3
|
-
|
|
4
|
-
import { cn } from "../lib/utils.js"
|
|
5
|
-
|
|
6
|
-
function ResizablePanelGroup({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}) {
|
|
10
|
-
return (
|
|
11
|
-
<ResizablePrimitive.PanelGroup
|
|
12
|
-
data-slot="resizable-panel-group"
|
|
13
|
-
className={cn(
|
|
14
|
-
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
15
|
-
className
|
|
16
|
-
)}
|
|
17
|
-
{...props} />
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function ResizablePanel({
|
|
22
|
-
...props
|
|
23
|
-
}) {
|
|
24
|
-
return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function ResizableHandle({
|
|
28
|
-
withHandle,
|
|
29
|
-
className,
|
|
30
|
-
...props
|
|
31
|
-
}) {
|
|
32
|
-
return (
|
|
33
|
-
<ResizablePrimitive.PanelResizeHandle
|
|
34
|
-
data-slot="resizable-handle"
|
|
35
|
-
className={cn(
|
|
36
|
-
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
37
|
-
className
|
|
38
|
-
)}
|
|
39
|
-
{...props}>
|
|
40
|
-
{withHandle && (
|
|
41
|
-
<div className="bg-border h-6 w-1 rounded-lg z-10 flex shrink-0" />
|
|
42
|
-
)}
|
|
43
|
-
</ResizablePrimitive.PanelResizeHandle>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|