create-ec-app 1.2.0 → 1.4.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.
Files changed (81) hide show
  1. package/README.md +87 -0
  2. package/dist/index.js +115 -2
  3. package/dist/index.js.map +1 -1
  4. package/dist/pcf.d.ts.map +1 -1
  5. package/dist/pcf.js +82 -0
  6. package/dist/pcf.js.map +1 -1
  7. package/package.json +3 -1
  8. package/scripts/check-generated-css-scope.mjs +61 -0
  9. package/templates/base/package-lock.json +713 -1466
  10. package/templates/base/package.json +19 -19
  11. package/templates/base/src/App.tsx +1 -1
  12. package/templates/base/src/index.css +4 -1
  13. package/templates/base/src/main.tsx +4 -1
  14. package/templates/base/src/runtime/EcAppShell.tsx +29 -0
  15. package/templates/base/tsconfig.app.json +0 -1
  16. package/templates/base/tsconfig.json +1 -2
  17. package/templates/pcf/base/README.md +13 -0
  18. package/templates/pcf/base/index.ts +9 -3
  19. package/templates/pcf/base/package-lock.json +7290 -0
  20. package/templates/pcf/base/package.json +3 -3
  21. package/templates/targets/power-pages/src/App.patch.tsx +1 -1
  22. package/templates/targets/swa/package.patch.json +1 -1
  23. package/templates/targets/webresource/README.md +7 -6
  24. package/templates/ui/kendo/package.patch.json +2 -2
  25. package/templates/ui/kendo/src/main.patch.tsx +4 -1
  26. package/templates/ui/shadcn-ui/components.json +5 -2
  27. package/templates/ui/shadcn-ui/package.patch.json +4 -41
  28. package/templates/ui/shadcn-ui/src/index.patch.css +27 -9
  29. package/templates/ui/shadcn-ui/src/components/ui/accordion.tsx +0 -64
  30. package/templates/ui/shadcn-ui/src/components/ui/alert-dialog.tsx +0 -155
  31. package/templates/ui/shadcn-ui/src/components/ui/alert.tsx +0 -66
  32. package/templates/ui/shadcn-ui/src/components/ui/aspect-ratio.tsx +0 -11
  33. package/templates/ui/shadcn-ui/src/components/ui/avatar.tsx +0 -51
  34. package/templates/ui/shadcn-ui/src/components/ui/badge.tsx +0 -46
  35. package/templates/ui/shadcn-ui/src/components/ui/breadcrumb.tsx +0 -109
  36. package/templates/ui/shadcn-ui/src/components/ui/button-group.tsx +0 -83
  37. package/templates/ui/shadcn-ui/src/components/ui/button.tsx +0 -60
  38. package/templates/ui/shadcn-ui/src/components/ui/calendar.tsx +0 -216
  39. package/templates/ui/shadcn-ui/src/components/ui/card.tsx +0 -92
  40. package/templates/ui/shadcn-ui/src/components/ui/carousel.tsx +0 -239
  41. package/templates/ui/shadcn-ui/src/components/ui/chart.tsx +0 -357
  42. package/templates/ui/shadcn-ui/src/components/ui/checkbox.tsx +0 -32
  43. package/templates/ui/shadcn-ui/src/components/ui/collapsible.tsx +0 -31
  44. package/templates/ui/shadcn-ui/src/components/ui/command.tsx +0 -182
  45. package/templates/ui/shadcn-ui/src/components/ui/context-menu.tsx +0 -252
  46. package/templates/ui/shadcn-ui/src/components/ui/dialog.tsx +0 -141
  47. package/templates/ui/shadcn-ui/src/components/ui/drawer.tsx +0 -135
  48. package/templates/ui/shadcn-ui/src/components/ui/dropdown-menu.tsx +0 -255
  49. package/templates/ui/shadcn-ui/src/components/ui/empty.tsx +0 -104
  50. package/templates/ui/shadcn-ui/src/components/ui/field.tsx +0 -246
  51. package/templates/ui/shadcn-ui/src/components/ui/form.tsx +0 -167
  52. package/templates/ui/shadcn-ui/src/components/ui/hover-card.tsx +0 -44
  53. package/templates/ui/shadcn-ui/src/components/ui/input-group.tsx +0 -170
  54. package/templates/ui/shadcn-ui/src/components/ui/input-otp.tsx +0 -75
  55. package/templates/ui/shadcn-ui/src/components/ui/input.tsx +0 -21
  56. package/templates/ui/shadcn-ui/src/components/ui/item.tsx +0 -193
  57. package/templates/ui/shadcn-ui/src/components/ui/kbd.tsx +0 -28
  58. package/templates/ui/shadcn-ui/src/components/ui/label.tsx +0 -24
  59. package/templates/ui/shadcn-ui/src/components/ui/menubar.tsx +0 -274
  60. package/templates/ui/shadcn-ui/src/components/ui/navigation-menu.tsx +0 -168
  61. package/templates/ui/shadcn-ui/src/components/ui/pagination.tsx +0 -127
  62. package/templates/ui/shadcn-ui/src/components/ui/popover.tsx +0 -48
  63. package/templates/ui/shadcn-ui/src/components/ui/progress.tsx +0 -29
  64. package/templates/ui/shadcn-ui/src/components/ui/radio-group.tsx +0 -45
  65. package/templates/ui/shadcn-ui/src/components/ui/resizable.tsx +0 -54
  66. package/templates/ui/shadcn-ui/src/components/ui/scroll-area.tsx +0 -58
  67. package/templates/ui/shadcn-ui/src/components/ui/select.tsx +0 -185
  68. package/templates/ui/shadcn-ui/src/components/ui/separator.tsx +0 -28
  69. package/templates/ui/shadcn-ui/src/components/ui/sheet.tsx +0 -137
  70. package/templates/ui/shadcn-ui/src/components/ui/sidebar.tsx +0 -726
  71. package/templates/ui/shadcn-ui/src/components/ui/skeleton.tsx +0 -13
  72. package/templates/ui/shadcn-ui/src/components/ui/slider.tsx +0 -63
  73. package/templates/ui/shadcn-ui/src/components/ui/sonner.tsx +0 -38
  74. package/templates/ui/shadcn-ui/src/components/ui/spinner.tsx +0 -16
  75. package/templates/ui/shadcn-ui/src/components/ui/switch.tsx +0 -31
  76. package/templates/ui/shadcn-ui/src/components/ui/table.tsx +0 -114
  77. package/templates/ui/shadcn-ui/src/components/ui/tabs.tsx +0 -66
  78. package/templates/ui/shadcn-ui/src/components/ui/textarea.tsx +0 -18
  79. package/templates/ui/shadcn-ui/src/components/ui/toggle-group.tsx +0 -81
  80. package/templates/ui/shadcn-ui/src/components/ui/toggle.tsx +0 -45
  81. package/templates/ui/shadcn-ui/src/components/ui/tooltip.tsx +0 -61
@@ -1,239 +0,0 @@
1
- import * as React from "react"
2
- import useEmblaCarousel, {
3
- type UseEmblaCarouselType,
4
- } from "embla-carousel-react"
5
- import { ArrowLeft, ArrowRight } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
- import { Button } from "@/components/ui/button"
9
-
10
- type CarouselApi = UseEmblaCarouselType[1]
11
- type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
12
- type CarouselOptions = UseCarouselParameters[0]
13
- type CarouselPlugin = UseCarouselParameters[1]
14
-
15
- type CarouselProps = {
16
- opts?: CarouselOptions
17
- plugins?: CarouselPlugin
18
- orientation?: "horizontal" | "vertical"
19
- setApi?: (api: CarouselApi) => void
20
- }
21
-
22
- type CarouselContextProps = {
23
- carouselRef: ReturnType<typeof useEmblaCarousel>[0]
24
- api: ReturnType<typeof useEmblaCarousel>[1]
25
- scrollPrev: () => void
26
- scrollNext: () => void
27
- canScrollPrev: boolean
28
- canScrollNext: boolean
29
- } & CarouselProps
30
-
31
- const CarouselContext = React.createContext<CarouselContextProps | null>(null)
32
-
33
- function useCarousel() {
34
- const context = React.useContext(CarouselContext)
35
-
36
- if (!context) {
37
- throw new Error("useCarousel must be used within a <Carousel />")
38
- }
39
-
40
- return context
41
- }
42
-
43
- function Carousel({
44
- orientation = "horizontal",
45
- opts,
46
- setApi,
47
- plugins,
48
- className,
49
- children,
50
- ...props
51
- }: React.ComponentProps<"div"> & CarouselProps) {
52
- const [carouselRef, api] = useEmblaCarousel(
53
- {
54
- ...opts,
55
- axis: orientation === "horizontal" ? "x" : "y",
56
- },
57
- plugins
58
- )
59
- const [canScrollPrev, setCanScrollPrev] = React.useState(false)
60
- const [canScrollNext, setCanScrollNext] = React.useState(false)
61
-
62
- const onSelect = React.useCallback((api: CarouselApi) => {
63
- if (!api) return
64
- setCanScrollPrev(api.canScrollPrev())
65
- setCanScrollNext(api.canScrollNext())
66
- }, [])
67
-
68
- const scrollPrev = React.useCallback(() => {
69
- api?.scrollPrev()
70
- }, [api])
71
-
72
- const scrollNext = React.useCallback(() => {
73
- api?.scrollNext()
74
- }, [api])
75
-
76
- const handleKeyDown = React.useCallback(
77
- (event: React.KeyboardEvent<HTMLDivElement>) => {
78
- if (event.key === "ArrowLeft") {
79
- event.preventDefault()
80
- scrollPrev()
81
- } else if (event.key === "ArrowRight") {
82
- event.preventDefault()
83
- scrollNext()
84
- }
85
- },
86
- [scrollPrev, scrollNext]
87
- )
88
-
89
- React.useEffect(() => {
90
- if (!api || !setApi) return
91
- setApi(api)
92
- }, [api, setApi])
93
-
94
- React.useEffect(() => {
95
- if (!api) return
96
- onSelect(api)
97
- api.on("reInit", onSelect)
98
- api.on("select", onSelect)
99
-
100
- return () => {
101
- api?.off("select", onSelect)
102
- }
103
- }, [api, onSelect])
104
-
105
- return (
106
- <CarouselContext.Provider
107
- value={{
108
- carouselRef,
109
- api: api,
110
- opts,
111
- orientation:
112
- orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
113
- scrollPrev,
114
- scrollNext,
115
- canScrollPrev,
116
- canScrollNext,
117
- }}
118
- >
119
- <div
120
- onKeyDownCapture={handleKeyDown}
121
- className={cn("relative", className)}
122
- role="region"
123
- aria-roledescription="carousel"
124
- data-slot="carousel"
125
- {...props}
126
- >
127
- {children}
128
- </div>
129
- </CarouselContext.Provider>
130
- )
131
- }
132
-
133
- function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
134
- const { carouselRef, orientation } = useCarousel()
135
-
136
- return (
137
- <div
138
- ref={carouselRef}
139
- className="overflow-hidden"
140
- data-slot="carousel-content"
141
- >
142
- <div
143
- className={cn(
144
- "flex",
145
- orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
146
- className
147
- )}
148
- {...props}
149
- />
150
- </div>
151
- )
152
- }
153
-
154
- function CarouselItem({ className, ...props }: React.ComponentProps<"div">) {
155
- const { orientation } = useCarousel()
156
-
157
- return (
158
- <div
159
- role="group"
160
- aria-roledescription="slide"
161
- data-slot="carousel-item"
162
- className={cn(
163
- "min-w-0 shrink-0 grow-0 basis-full",
164
- orientation === "horizontal" ? "pl-4" : "pt-4",
165
- className
166
- )}
167
- {...props}
168
- />
169
- )
170
- }
171
-
172
- function CarouselPrevious({
173
- className,
174
- variant = "outline",
175
- size = "icon",
176
- ...props
177
- }: React.ComponentProps<typeof Button>) {
178
- const { orientation, scrollPrev, canScrollPrev } = useCarousel()
179
-
180
- return (
181
- <Button
182
- data-slot="carousel-previous"
183
- variant={variant}
184
- size={size}
185
- className={cn(
186
- "absolute size-8 rounded-full",
187
- orientation === "horizontal"
188
- ? "top-1/2 -left-12 -translate-y-1/2"
189
- : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
190
- className
191
- )}
192
- disabled={!canScrollPrev}
193
- onClick={scrollPrev}
194
- {...props}
195
- >
196
- <ArrowLeft />
197
- <span className="sr-only">Previous slide</span>
198
- </Button>
199
- )
200
- }
201
-
202
- function CarouselNext({
203
- className,
204
- variant = "outline",
205
- size = "icon",
206
- ...props
207
- }: React.ComponentProps<typeof Button>) {
208
- const { orientation, scrollNext, canScrollNext } = useCarousel()
209
-
210
- return (
211
- <Button
212
- data-slot="carousel-next"
213
- variant={variant}
214
- size={size}
215
- className={cn(
216
- "absolute size-8 rounded-full",
217
- orientation === "horizontal"
218
- ? "top-1/2 -right-12 -translate-y-1/2"
219
- : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
220
- className
221
- )}
222
- disabled={!canScrollNext}
223
- onClick={scrollNext}
224
- {...props}
225
- >
226
- <ArrowRight />
227
- <span className="sr-only">Next slide</span>
228
- </Button>
229
- )
230
- }
231
-
232
- export {
233
- type CarouselApi,
234
- Carousel,
235
- CarouselContent,
236
- CarouselItem,
237
- CarouselPrevious,
238
- CarouselNext,
239
- }
@@ -1,357 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as RechartsPrimitive from "recharts"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- // Format: { THEME_NAME: CSS_SELECTOR }
9
- const THEMES = { light: "", dark: ".dark" } as const
10
-
11
- export type ChartConfig = {
12
- [k in string]: {
13
- label?: React.ReactNode
14
- icon?: React.ComponentType
15
- } & (
16
- | { color?: string; theme?: never }
17
- | { color?: never; theme: Record<keyof typeof THEMES, string> }
18
- )
19
- }
20
-
21
- type ChartContextProps = {
22
- config: ChartConfig
23
- }
24
-
25
- const ChartContext = React.createContext<ChartContextProps | null>(null)
26
-
27
- function useChart() {
28
- const context = React.useContext(ChartContext)
29
-
30
- if (!context) {
31
- throw new Error("useChart must be used within a <ChartContainer />")
32
- }
33
-
34
- return context
35
- }
36
-
37
- function ChartContainer({
38
- id,
39
- className,
40
- children,
41
- config,
42
- ...props
43
- }: React.ComponentProps<"div"> & {
44
- config: ChartConfig
45
- children: React.ComponentProps<
46
- typeof RechartsPrimitive.ResponsiveContainer
47
- >["children"]
48
- }) {
49
- const uniqueId = React.useId()
50
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`
51
-
52
- return (
53
- <ChartContext.Provider value={{ config }}>
54
- <div
55
- data-slot="chart"
56
- data-chart={chartId}
57
- className={cn(
58
- "[&_.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",
59
- className
60
- )}
61
- {...props}
62
- >
63
- <ChartStyle id={chartId} config={config} />
64
- <RechartsPrimitive.ResponsiveContainer>
65
- {children}
66
- </RechartsPrimitive.ResponsiveContainer>
67
- </div>
68
- </ChartContext.Provider>
69
- )
70
- }
71
-
72
- const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
73
- const colorConfig = Object.entries(config).filter(
74
- ([, config]) => config.theme || config.color
75
- )
76
-
77
- if (!colorConfig.length) {
78
- return null
79
- }
80
-
81
- return (
82
- <style
83
- dangerouslySetInnerHTML={{
84
- __html: Object.entries(THEMES)
85
- .map(
86
- ([theme, prefix]) => `
87
- ${prefix} [data-chart=${id}] {
88
- ${colorConfig
89
- .map(([key, itemConfig]) => {
90
- const color =
91
- itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||
92
- itemConfig.color
93
- return color ? ` --color-${key}: ${color};` : null
94
- })
95
- .join("\n")}
96
- }
97
- `
98
- )
99
- .join("\n"),
100
- }}
101
- />
102
- )
103
- }
104
-
105
- const ChartTooltip = RechartsPrimitive.Tooltip
106
-
107
- function ChartTooltipContent({
108
- active,
109
- payload,
110
- className,
111
- indicator = "dot",
112
- hideLabel = false,
113
- hideIndicator = false,
114
- label,
115
- labelFormatter,
116
- labelClassName,
117
- formatter,
118
- color,
119
- nameKey,
120
- labelKey,
121
- }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
122
- React.ComponentProps<"div"> & {
123
- hideLabel?: boolean
124
- hideIndicator?: boolean
125
- indicator?: "line" | "dot" | "dashed"
126
- nameKey?: string
127
- labelKey?: string
128
- }) {
129
- const { config } = useChart()
130
-
131
- const tooltipLabel = React.useMemo(() => {
132
- if (hideLabel || !payload?.length) {
133
- return null
134
- }
135
-
136
- const [item] = payload
137
- const key = `${labelKey || item?.dataKey || item?.name || "value"}`
138
- const itemConfig = getPayloadConfigFromPayload(config, item, key)
139
- const value =
140
- !labelKey && typeof label === "string"
141
- ? config[label as keyof typeof config]?.label || label
142
- : itemConfig?.label
143
-
144
- if (labelFormatter) {
145
- return (
146
- <div className={cn("font-medium", labelClassName)}>
147
- {labelFormatter(value, payload)}
148
- </div>
149
- )
150
- }
151
-
152
- if (!value) {
153
- return null
154
- }
155
-
156
- return <div className={cn("font-medium", labelClassName)}>{value}</div>
157
- }, [
158
- label,
159
- labelFormatter,
160
- payload,
161
- hideLabel,
162
- labelClassName,
163
- config,
164
- labelKey,
165
- ])
166
-
167
- if (!active || !payload?.length) {
168
- return null
169
- }
170
-
171
- const nestLabel = payload.length === 1 && indicator !== "dot"
172
-
173
- return (
174
- <div
175
- className={cn(
176
- "border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
177
- className
178
- )}
179
- >
180
- {!nestLabel ? tooltipLabel : null}
181
- <div className="grid gap-1.5">
182
- {payload
183
- .filter((item) => item.type !== "none")
184
- .map((item, index) => {
185
- const key = `${nameKey || item.name || item.dataKey || "value"}`
186
- const itemConfig = getPayloadConfigFromPayload(config, item, key)
187
- const indicatorColor = color || item.payload.fill || item.color
188
-
189
- return (
190
- <div
191
- key={item.dataKey}
192
- className={cn(
193
- "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
194
- indicator === "dot" && "items-center"
195
- )}
196
- >
197
- {formatter && item?.value !== undefined && item.name ? (
198
- formatter(item.value, item.name, item, index, item.payload)
199
- ) : (
200
- <>
201
- {itemConfig?.icon ? (
202
- <itemConfig.icon />
203
- ) : (
204
- !hideIndicator && (
205
- <div
206
- className={cn(
207
- "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
208
- {
209
- "h-2.5 w-2.5": indicator === "dot",
210
- "w-1": indicator === "line",
211
- "w-0 border-[1.5px] border-dashed bg-transparent":
212
- indicator === "dashed",
213
- "my-0.5": nestLabel && indicator === "dashed",
214
- }
215
- )}
216
- style={
217
- {
218
- "--color-bg": indicatorColor,
219
- "--color-border": indicatorColor,
220
- } as React.CSSProperties
221
- }
222
- />
223
- )
224
- )}
225
- <div
226
- className={cn(
227
- "flex flex-1 justify-between leading-none",
228
- nestLabel ? "items-end" : "items-center"
229
- )}
230
- >
231
- <div className="grid gap-1.5">
232
- {nestLabel ? tooltipLabel : null}
233
- <span className="text-muted-foreground">
234
- {itemConfig?.label || item.name}
235
- </span>
236
- </div>
237
- {item.value && (
238
- <span className="text-foreground font-mono font-medium tabular-nums">
239
- {item.value.toLocaleString()}
240
- </span>
241
- )}
242
- </div>
243
- </>
244
- )}
245
- </div>
246
- )
247
- })}
248
- </div>
249
- </div>
250
- )
251
- }
252
-
253
- const ChartLegend = RechartsPrimitive.Legend
254
-
255
- function ChartLegendContent({
256
- className,
257
- hideIcon = false,
258
- payload,
259
- verticalAlign = "bottom",
260
- nameKey,
261
- }: React.ComponentProps<"div"> &
262
- Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
263
- hideIcon?: boolean
264
- nameKey?: string
265
- }) {
266
- const { config } = useChart()
267
-
268
- if (!payload?.length) {
269
- return null
270
- }
271
-
272
- return (
273
- <div
274
- className={cn(
275
- "flex items-center justify-center gap-4",
276
- verticalAlign === "top" ? "pb-3" : "pt-3",
277
- className
278
- )}
279
- >
280
- {payload
281
- .filter((item) => item.type !== "none")
282
- .map((item) => {
283
- const key = `${nameKey || item.dataKey || "value"}`
284
- const itemConfig = getPayloadConfigFromPayload(config, item, key)
285
-
286
- return (
287
- <div
288
- key={item.value}
289
- className={cn(
290
- "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
291
- )}
292
- >
293
- {itemConfig?.icon && !hideIcon ? (
294
- <itemConfig.icon />
295
- ) : (
296
- <div
297
- className="h-2 w-2 shrink-0 rounded-[2px]"
298
- style={{
299
- backgroundColor: item.color,
300
- }}
301
- />
302
- )}
303
- {itemConfig?.label}
304
- </div>
305
- )
306
- })}
307
- </div>
308
- )
309
- }
310
-
311
- // Helper to extract item config from a payload.
312
- function getPayloadConfigFromPayload(
313
- config: ChartConfig,
314
- payload: unknown,
315
- key: string
316
- ) {
317
- if (typeof payload !== "object" || payload === null) {
318
- return undefined
319
- }
320
-
321
- const payloadPayload =
322
- "payload" in payload &&
323
- typeof payload.payload === "object" &&
324
- payload.payload !== null
325
- ? payload.payload
326
- : undefined
327
-
328
- let configLabelKey: string = key
329
-
330
- if (
331
- key in payload &&
332
- typeof payload[key as keyof typeof payload] === "string"
333
- ) {
334
- configLabelKey = payload[key as keyof typeof payload] as string
335
- } else if (
336
- payloadPayload &&
337
- key in payloadPayload &&
338
- typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
339
- ) {
340
- configLabelKey = payloadPayload[
341
- key as keyof typeof payloadPayload
342
- ] as string
343
- }
344
-
345
- return configLabelKey in config
346
- ? config[configLabelKey]
347
- : config[key as keyof typeof config]
348
- }
349
-
350
- export {
351
- ChartContainer,
352
- ChartTooltip,
353
- ChartTooltipContent,
354
- ChartLegend,
355
- ChartLegendContent,
356
- ChartStyle,
357
- }
@@ -1,32 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
5
- import { CheckIcon } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
-
9
- function Checkbox({
10
- className,
11
- ...props
12
- }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
13
- return (
14
- <CheckboxPrimitive.Root
15
- data-slot="checkbox"
16
- className={cn(
17
- "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
18
- className
19
- )}
20
- {...props}
21
- >
22
- <CheckboxPrimitive.Indicator
23
- data-slot="checkbox-indicator"
24
- className="grid place-content-center text-current transition-none"
25
- >
26
- <CheckIcon className="size-3.5" />
27
- </CheckboxPrimitive.Indicator>
28
- </CheckboxPrimitive.Root>
29
- )
30
- }
31
-
32
- export { Checkbox }
@@ -1,31 +0,0 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
2
-
3
- function Collapsible({
4
- ...props
5
- }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
6
- return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
7
- }
8
-
9
- function CollapsibleTrigger({
10
- ...props
11
- }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
12
- return (
13
- <CollapsiblePrimitive.CollapsibleTrigger
14
- data-slot="collapsible-trigger"
15
- {...props}
16
- />
17
- )
18
- }
19
-
20
- function CollapsibleContent({
21
- ...props
22
- }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
23
- return (
24
- <CollapsiblePrimitive.CollapsibleContent
25
- data-slot="collapsible-content"
26
- {...props}
27
- />
28
- )
29
- }
30
-
31
- export { Collapsible, CollapsibleTrigger, CollapsibleContent }