create-ec-app 1.8.0 → 1.10.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 (104) hide show
  1. package/README.md +72 -17
  2. package/dist/cssScope.js +3 -5
  3. package/dist/cssScope.js.map +1 -1
  4. package/dist/index.d.ts +46 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +129 -53
  7. package/dist/index.js.map +1 -1
  8. package/dist/libFunctions.d.ts +13 -6
  9. package/dist/libFunctions.d.ts.map +1 -1
  10. package/dist/libFunctions.js +24 -9
  11. package/dist/libFunctions.js.map +1 -1
  12. package/dist/pcf.d.ts.map +1 -1
  13. package/dist/pcf.js +4 -1
  14. package/dist/pcf.js.map +1 -1
  15. package/dist/portalContainers.js +7 -5
  16. package/dist/portalContainers.js.map +1 -1
  17. package/package.json +18 -11
  18. package/scripts/build-generated.mjs +59 -0
  19. package/scripts/refresh-shadcn-template.ts +406 -0
  20. package/scripts/smoke-scaffold.mjs +245 -0
  21. package/templates/base/eslint.config.js +1 -1
  22. package/templates/base/package-lock.json +380 -476
  23. package/templates/base/package.json +14 -19
  24. package/templates/pcf/base/package-lock.json +35 -53
  25. package/templates/targets/code-apps/AGENTS.md +43 -1
  26. package/templates/targets/code-apps/CLAUDE.md +1 -0
  27. package/templates/targets/code-apps/package.patch.json +1 -1
  28. package/templates/targets/power-pages/AGENTS.md +43 -1
  29. package/templates/targets/power-pages/CLAUDE.md +1 -0
  30. package/templates/targets/power-pages/README.md +22 -2
  31. package/templates/targets/power-pages/src/App.patch.tsx +3 -1
  32. package/templates/targets/power-pages/src/components/shared/AuthError.tsx +18 -0
  33. package/templates/targets/power-pages/src/context/AuthContext.tsx +0 -4
  34. package/templates/targets/swa/AGENTS.md +42 -0
  35. package/templates/targets/swa/CLAUDE.md +1 -0
  36. package/templates/targets/webresource/AGENTS.md +47 -4
  37. package/templates/targets/webresource/CLAUDE.md +1 -0
  38. package/templates/targets/webresource/README.md +5 -5
  39. package/templates/ui/kendo/package.patch.json +2 -2
  40. package/templates/ui/shadcn-ui/SHADCN_TEMPLATE.md +20 -0
  41. package/templates/ui/shadcn-ui/package.patch.json +18 -9
  42. package/templates/ui/shadcn-ui/src/components/ui/accordion.tsx +79 -0
  43. package/templates/ui/shadcn-ui/src/components/ui/alert-dialog.tsx +199 -0
  44. package/templates/ui/shadcn-ui/src/components/ui/alert.tsx +76 -0
  45. package/templates/ui/shadcn-ui/src/components/ui/aspect-ratio.tsx +11 -0
  46. package/templates/ui/shadcn-ui/src/components/ui/attachment.tsx +206 -0
  47. package/templates/ui/shadcn-ui/src/components/ui/avatar.tsx +110 -0
  48. package/templates/ui/shadcn-ui/src/components/ui/badge.tsx +49 -0
  49. package/templates/ui/shadcn-ui/src/components/ui/breadcrumb.tsx +122 -0
  50. package/templates/ui/shadcn-ui/src/components/ui/bubble.tsx +125 -0
  51. package/templates/ui/shadcn-ui/src/components/ui/button-group.tsx +83 -0
  52. package/templates/ui/shadcn-ui/src/components/ui/button.tsx +67 -0
  53. package/templates/ui/shadcn-ui/src/components/ui/calendar.tsx +222 -0
  54. package/templates/ui/shadcn-ui/src/components/ui/card.tsx +103 -0
  55. package/templates/ui/shadcn-ui/src/components/ui/carousel.tsx +240 -0
  56. package/templates/ui/shadcn-ui/src/components/ui/chart.tsx +373 -0
  57. package/templates/ui/shadcn-ui/src/components/ui/checkbox.tsx +31 -0
  58. package/templates/ui/shadcn-ui/src/components/ui/collapsible.tsx +33 -0
  59. package/templates/ui/shadcn-ui/src/components/ui/combobox.tsx +299 -0
  60. package/templates/ui/shadcn-ui/src/components/ui/command.tsx +195 -0
  61. package/templates/ui/shadcn-ui/src/components/ui/context-menu.tsx +264 -0
  62. package/templates/ui/shadcn-ui/src/components/ui/dialog.tsx +170 -0
  63. package/templates/ui/shadcn-ui/src/components/ui/direction.tsx +22 -0
  64. package/templates/ui/shadcn-ui/src/components/ui/drawer.tsx +134 -0
  65. package/templates/ui/shadcn-ui/src/components/ui/dropdown-menu.tsx +272 -0
  66. package/templates/ui/shadcn-ui/src/components/ui/empty.tsx +104 -0
  67. package/templates/ui/shadcn-ui/src/components/ui/field.tsx +236 -0
  68. package/templates/ui/shadcn-ui/src/components/ui/hover-card.tsx +44 -0
  69. package/templates/ui/shadcn-ui/src/components/ui/input-group.tsx +156 -0
  70. package/templates/ui/shadcn-ui/src/components/ui/input-otp.tsx +87 -0
  71. package/templates/ui/shadcn-ui/src/components/ui/input.tsx +19 -0
  72. package/templates/ui/shadcn-ui/src/components/ui/item.tsx +196 -0
  73. package/templates/ui/shadcn-ui/src/components/ui/kbd.tsx +26 -0
  74. package/templates/ui/shadcn-ui/src/components/ui/label.tsx +22 -0
  75. package/templates/ui/shadcn-ui/src/components/ui/marker.tsx +69 -0
  76. package/templates/ui/shadcn-ui/src/components/ui/menubar.tsx +282 -0
  77. package/templates/ui/shadcn-ui/src/components/ui/message-scroller.tsx +129 -0
  78. package/templates/ui/shadcn-ui/src/components/ui/message.tsx +92 -0
  79. package/templates/ui/shadcn-ui/src/components/ui/native-select.tsx +61 -0
  80. package/templates/ui/shadcn-ui/src/components/ui/navigation-menu.tsx +164 -0
  81. package/templates/ui/shadcn-ui/src/components/ui/pagination.tsx +129 -0
  82. package/templates/ui/shadcn-ui/src/components/ui/popover.tsx +89 -0
  83. package/templates/ui/shadcn-ui/src/components/ui/progress.tsx +31 -0
  84. package/templates/ui/shadcn-ui/src/components/ui/radio-group.tsx +42 -0
  85. package/templates/ui/shadcn-ui/src/components/ui/resizable.tsx +50 -0
  86. package/templates/ui/shadcn-ui/src/components/ui/scroll-area.tsx +53 -0
  87. package/templates/ui/shadcn-ui/src/components/ui/select.tsx +194 -0
  88. package/templates/ui/shadcn-ui/src/components/ui/separator.tsx +26 -0
  89. package/templates/ui/shadcn-ui/src/components/ui/sheet.tsx +149 -0
  90. package/templates/ui/shadcn-ui/src/components/ui/sidebar.tsx +702 -0
  91. package/templates/ui/shadcn-ui/src/components/ui/skeleton.tsx +13 -0
  92. package/templates/ui/shadcn-ui/src/components/ui/slider.tsx +59 -0
  93. package/templates/ui/shadcn-ui/src/components/ui/sonner.tsx +47 -0
  94. package/templates/ui/shadcn-ui/src/components/ui/spinner.tsx +10 -0
  95. package/templates/ui/shadcn-ui/src/components/ui/switch.tsx +33 -0
  96. package/templates/ui/shadcn-ui/src/components/ui/table.tsx +114 -0
  97. package/templates/ui/shadcn-ui/src/components/ui/tabs.tsx +90 -0
  98. package/templates/ui/shadcn-ui/src/components/ui/textarea.tsx +18 -0
  99. package/templates/ui/shadcn-ui/src/components/ui/toggle-group.tsx +87 -0
  100. package/templates/ui/shadcn-ui/src/components/ui/toggle.tsx +45 -0
  101. package/templates/ui/shadcn-ui/src/components/ui/tooltip.tsx +59 -0
  102. package/templates/ui/shadcn-ui/src/index.patch.css +0 -118
  103. package/templates/ui/shadcn-ui/src/runtime/PortalContainer.ts +8 -0
  104. package/templates/base/biome.json +0 -54
@@ -0,0 +1,194 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Select as SelectPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react"
8
+ import { usePortalContainer } from "@/runtime/PortalContainer"
9
+
10
+ function Select({
11
+ ...props
12
+ }: React.ComponentProps<typeof SelectPrimitive.Root>) {
13
+ return <SelectPrimitive.Root data-slot="select" {...props} />
14
+ }
15
+
16
+ function SelectGroup({
17
+ className,
18
+ ...props
19
+ }: React.ComponentProps<typeof SelectPrimitive.Group>) {
20
+ return (
21
+ <SelectPrimitive.Group
22
+ data-slot="select-group"
23
+ className={cn("scroll-my-1 p-1", className)}
24
+ {...props}
25
+ />
26
+ )
27
+ }
28
+
29
+ function SelectValue({
30
+ ...props
31
+ }: React.ComponentProps<typeof SelectPrimitive.Value>) {
32
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />
33
+ }
34
+
35
+ function SelectTrigger({
36
+ className,
37
+ size = "default",
38
+ children,
39
+ ...props
40
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
41
+ size?: "sm" | "default"
42
+ }) {
43
+ return (
44
+ <SelectPrimitive.Trigger
45
+ data-slot="select-trigger"
46
+ data-size={size}
47
+ className={cn(
48
+ "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
49
+ className
50
+ )}
51
+ {...props}
52
+ >
53
+ {children}
54
+ <SelectPrimitive.Icon asChild>
55
+ <ChevronDownIcon className="pointer-events-none size-4 text-muted-foreground" />
56
+ </SelectPrimitive.Icon>
57
+ </SelectPrimitive.Trigger>
58
+ )
59
+ }
60
+
61
+ function SelectContent({
62
+ className,
63
+ children,
64
+ position = "item-aligned",
65
+ align = "center",
66
+ ...props
67
+ }: React.ComponentProps<typeof SelectPrimitive.Content>) {
68
+ const portalContainer = usePortalContainer()
69
+ return (
70
+ <SelectPrimitive.Portal container={portalContainer ?? undefined}>
71
+ <SelectPrimitive.Content
72
+ data-slot="select-content"
73
+ data-align-trigger={position === "item-aligned"}
74
+ className={cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", position ==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className )}
75
+ position={position}
76
+ align={align}
77
+ {...props}
78
+ >
79
+ <SelectScrollUpButton />
80
+ <SelectPrimitive.Viewport
81
+ data-position={position}
82
+ className={cn(
83
+ "data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
84
+ position === "popper" && ""
85
+ )}
86
+ >
87
+ {children}
88
+ </SelectPrimitive.Viewport>
89
+ <SelectScrollDownButton />
90
+ </SelectPrimitive.Content>
91
+ </SelectPrimitive.Portal>
92
+ )
93
+ }
94
+
95
+ function SelectLabel({
96
+ className,
97
+ ...props
98
+ }: React.ComponentProps<typeof SelectPrimitive.Label>) {
99
+ return (
100
+ <SelectPrimitive.Label
101
+ data-slot="select-label"
102
+ className={cn("px-1.5 py-1 text-xs text-muted-foreground", className)}
103
+ {...props}
104
+ />
105
+ )
106
+ }
107
+
108
+ function SelectItem({
109
+ className,
110
+ children,
111
+ ...props
112
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
113
+ return (
114
+ <SelectPrimitive.Item
115
+ data-slot="select-item"
116
+ className={cn(
117
+ "relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
118
+ className
119
+ )}
120
+ {...props}
121
+ >
122
+ <span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center">
123
+ <SelectPrimitive.ItemIndicator>
124
+ <CheckIcon className="pointer-events-none" />
125
+ </SelectPrimitive.ItemIndicator>
126
+ </span>
127
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
128
+ </SelectPrimitive.Item>
129
+ )
130
+ }
131
+
132
+ function SelectSeparator({
133
+ className,
134
+ ...props
135
+ }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
136
+ return (
137
+ <SelectPrimitive.Separator
138
+ data-slot="select-separator"
139
+ className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
140
+ {...props}
141
+ />
142
+ )
143
+ }
144
+
145
+ function SelectScrollUpButton({
146
+ className,
147
+ ...props
148
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
149
+ return (
150
+ <SelectPrimitive.ScrollUpButton
151
+ data-slot="select-scroll-up-button"
152
+ className={cn(
153
+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
154
+ className
155
+ )}
156
+ {...props}
157
+ >
158
+ <ChevronUpIcon
159
+ />
160
+ </SelectPrimitive.ScrollUpButton>
161
+ )
162
+ }
163
+
164
+ function SelectScrollDownButton({
165
+ className,
166
+ ...props
167
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
168
+ return (
169
+ <SelectPrimitive.ScrollDownButton
170
+ data-slot="select-scroll-down-button"
171
+ className={cn(
172
+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
173
+ className
174
+ )}
175
+ {...props}
176
+ >
177
+ <ChevronDownIcon
178
+ />
179
+ </SelectPrimitive.ScrollDownButton>
180
+ )
181
+ }
182
+
183
+ export {
184
+ Select,
185
+ SelectContent,
186
+ SelectGroup,
187
+ SelectItem,
188
+ SelectLabel,
189
+ SelectScrollDownButton,
190
+ SelectScrollUpButton,
191
+ SelectSeparator,
192
+ SelectTrigger,
193
+ SelectValue,
194
+ }
@@ -0,0 +1,26 @@
1
+ import * as React from "react"
2
+ import { Separator as SeparatorPrimitive } from "radix-ui"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Separator({
7
+ className,
8
+ orientation = "horizontal",
9
+ decorative = true,
10
+ ...props
11
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
+ return (
13
+ <SeparatorPrimitive.Root
14
+ data-slot="separator"
15
+ decorative={decorative}
16
+ orientation={orientation}
17
+ className={cn(
18
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
19
+ className
20
+ )}
21
+ {...props}
22
+ />
23
+ )
24
+ }
25
+
26
+ export { Separator }
@@ -0,0 +1,149 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Dialog as SheetPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { Button } from "@/components/ui/button"
8
+ import { XIcon } from "lucide-react"
9
+ import { usePortalContainer } from "@/runtime/PortalContainer"
10
+
11
+ function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
12
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
13
+ }
14
+
15
+ function SheetTrigger({
16
+ ...props
17
+ }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
18
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
19
+ }
20
+
21
+ function SheetClose({
22
+ ...props
23
+ }: React.ComponentProps<typeof SheetPrimitive.Close>) {
24
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
25
+ }
26
+
27
+ function SheetPortal({
28
+ ...props
29
+ }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
30
+ const portalContainer = usePortalContainer()
31
+ return <SheetPrimitive.Portal container={portalContainer ?? undefined} data-slot="sheet-portal" {...props} />
32
+ }
33
+
34
+ function SheetOverlay({
35
+ className,
36
+ ...props
37
+ }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
38
+ return (
39
+ <SheetPrimitive.Overlay
40
+ data-slot="sheet-overlay"
41
+ className={cn(
42
+ "fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
43
+ className
44
+ )}
45
+ {...props}
46
+ />
47
+ )
48
+ }
49
+
50
+ function SheetContent({
51
+ className,
52
+ children,
53
+ side = "right",
54
+ showCloseButton = true,
55
+ ...props
56
+ }: React.ComponentProps<typeof SheetPrimitive.Content> & {
57
+ side?: "top" | "right" | "bottom" | "left"
58
+ showCloseButton?: boolean
59
+ }) {
60
+ return (
61
+ <SheetPortal>
62
+ <SheetOverlay />
63
+ <SheetPrimitive.Content
64
+ data-slot="sheet-content"
65
+ data-side={side}
66
+ className={cn(
67
+ "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
68
+ className
69
+ )}
70
+ {...props}
71
+ >
72
+ {children}
73
+ {showCloseButton && (
74
+ <SheetPrimitive.Close data-slot="sheet-close" asChild>
75
+ <Button
76
+ variant="ghost"
77
+ className="absolute top-3 right-3"
78
+ size="icon-sm"
79
+ >
80
+ <XIcon
81
+ />
82
+ <span className="sr-only">Close</span>
83
+ </Button>
84
+ </SheetPrimitive.Close>
85
+ )}
86
+ </SheetPrimitive.Content>
87
+ </SheetPortal>
88
+ )
89
+ }
90
+
91
+ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
92
+ return (
93
+ <div
94
+ data-slot="sheet-header"
95
+ className={cn("flex flex-col gap-0.5 p-4", className)}
96
+ {...props}
97
+ />
98
+ )
99
+ }
100
+
101
+ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
102
+ return (
103
+ <div
104
+ data-slot="sheet-footer"
105
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
106
+ {...props}
107
+ />
108
+ )
109
+ }
110
+
111
+ function SheetTitle({
112
+ className,
113
+ ...props
114
+ }: React.ComponentProps<typeof SheetPrimitive.Title>) {
115
+ return (
116
+ <SheetPrimitive.Title
117
+ data-slot="sheet-title"
118
+ className={cn(
119
+ "text-base font-medium text-foreground",
120
+ className
121
+ )}
122
+ {...props}
123
+ />
124
+ )
125
+ }
126
+
127
+ function SheetDescription({
128
+ className,
129
+ ...props
130
+ }: React.ComponentProps<typeof SheetPrimitive.Description>) {
131
+ return (
132
+ <SheetPrimitive.Description
133
+ data-slot="sheet-description"
134
+ className={cn("text-sm text-muted-foreground", className)}
135
+ {...props}
136
+ />
137
+ )
138
+ }
139
+
140
+ export {
141
+ Sheet,
142
+ SheetTrigger,
143
+ SheetClose,
144
+ SheetContent,
145
+ SheetHeader,
146
+ SheetFooter,
147
+ SheetTitle,
148
+ SheetDescription,
149
+ }