@dinachi/cli 0.7.2 → 0.8.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/package.json +2 -2
- package/templates/autocomplete/autocomplete.tsx +2 -0
- package/templates/autocomplete/index.ts +1 -0
- package/templates/combobox/combobox.tsx +15 -0
- package/templates/combobox/index.ts +2 -0
- package/templates/drawer/drawer.tsx +3 -1
- package/templates/drawer/index.ts +1 -0
- package/templates/select/select.tsx +13 -0
- package/templates/slider/index.ts +2 -0
- package/templates/slider/slider.tsx +18 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dinachi/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "CLI for adding Dinachi UI components to your project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"ts-morph": "^27.0.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@base-ui/react": "1.
|
|
39
|
+
"@base-ui/react": "1.3.0",
|
|
40
40
|
"@types/fs-extra": "^11.0.4",
|
|
41
41
|
"@types/prompts": "^2.4.9",
|
|
42
42
|
"@types/react": "^19.2.14",
|
|
@@ -9,6 +9,7 @@ const Autocomplete = AutocompletePrimitive.Root
|
|
|
9
9
|
const AutocompleteValue = AutocompletePrimitive.Value
|
|
10
10
|
const AutocompleteCollection = AutocompletePrimitive.Collection
|
|
11
11
|
const AutocompletePortal = AutocompletePrimitive.Portal
|
|
12
|
+
const AutocompleteInputGroup = AutocompletePrimitive.InputGroup
|
|
12
13
|
|
|
13
14
|
const AutocompleteInput = React.forwardRef<
|
|
14
15
|
React.ComponentRef<typeof AutocompletePrimitive.Input>,
|
|
@@ -188,6 +189,7 @@ export {
|
|
|
188
189
|
AutocompleteValue,
|
|
189
190
|
AutocompleteCollection,
|
|
190
191
|
AutocompletePortal,
|
|
192
|
+
AutocompleteInputGroup,
|
|
191
193
|
AutocompleteInput,
|
|
192
194
|
AutocompleteTrigger,
|
|
193
195
|
AutocompleteClear,
|
|
@@ -9,6 +9,7 @@ const Combobox = ComboboxPrimitive.Root
|
|
|
9
9
|
const ComboboxValue = ComboboxPrimitive.Value
|
|
10
10
|
const ComboboxCollection = ComboboxPrimitive.Collection
|
|
11
11
|
const ComboboxPortal = ComboboxPrimitive.Portal
|
|
12
|
+
const ComboboxInputGroup = ComboboxPrimitive.InputGroup
|
|
12
13
|
|
|
13
14
|
const ComboboxInput = React.forwardRef<
|
|
14
15
|
React.ComponentRef<typeof ComboboxPrimitive.Input>,
|
|
@@ -176,6 +177,18 @@ const ComboboxStatus = React.forwardRef<
|
|
|
176
177
|
))
|
|
177
178
|
ComboboxStatus.displayName = "ComboboxStatus"
|
|
178
179
|
|
|
180
|
+
const ComboboxLabel = React.forwardRef<
|
|
181
|
+
React.ComponentRef<typeof ComboboxPrimitive.Label>,
|
|
182
|
+
React.ComponentPropsWithoutRef<typeof ComboboxPrimitive.Label>
|
|
183
|
+
>(({ className, ...props }, ref) => (
|
|
184
|
+
<ComboboxPrimitive.Label
|
|
185
|
+
ref={ref}
|
|
186
|
+
className={cn("block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className)}
|
|
187
|
+
{...props}
|
|
188
|
+
/>
|
|
189
|
+
))
|
|
190
|
+
ComboboxLabel.displayName = "ComboboxLabel"
|
|
191
|
+
|
|
179
192
|
const ComboboxSeparator = React.forwardRef<
|
|
180
193
|
React.ComponentRef<typeof ComboboxPrimitive.Separator>,
|
|
181
194
|
React.ComponentPropsWithoutRef<typeof ComboboxPrimitive.Separator>
|
|
@@ -193,9 +206,11 @@ export {
|
|
|
193
206
|
ComboboxValue,
|
|
194
207
|
ComboboxCollection,
|
|
195
208
|
ComboboxPortal,
|
|
209
|
+
ComboboxInputGroup,
|
|
196
210
|
ComboboxInput,
|
|
197
211
|
ComboboxTrigger,
|
|
198
212
|
ComboboxClear,
|
|
213
|
+
ComboboxLabel,
|
|
199
214
|
ComboboxContent,
|
|
200
215
|
ComboboxList,
|
|
201
216
|
ComboboxItem,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import {
|
|
4
|
+
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer"
|
|
5
5
|
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
7
|
const Drawer = DrawerPrimitive.Root
|
|
8
8
|
const DrawerTrigger = DrawerPrimitive.Trigger
|
|
9
9
|
const DrawerPortal = DrawerPrimitive.Portal
|
|
10
10
|
const DrawerClose = DrawerPrimitive.Close
|
|
11
|
+
const DrawerSwipeArea = DrawerPrimitive.SwipeArea
|
|
11
12
|
|
|
12
13
|
const DrawerBackdrop = React.forwardRef<
|
|
13
14
|
React.ComponentRef<typeof DrawerPrimitive.Backdrop>,
|
|
@@ -105,6 +106,7 @@ export {
|
|
|
105
106
|
DrawerTitle,
|
|
106
107
|
DrawerDescription,
|
|
107
108
|
DrawerClose,
|
|
109
|
+
DrawerSwipeArea,
|
|
108
110
|
DrawerHeader,
|
|
109
111
|
DrawerFooter,
|
|
110
112
|
}
|
|
@@ -118,6 +118,18 @@ const SelectScrollDownArrow = React.forwardRef<
|
|
|
118
118
|
))
|
|
119
119
|
SelectScrollDownArrow.displayName = "SelectScrollDownArrow"
|
|
120
120
|
|
|
121
|
+
const SelectFieldLabel = React.forwardRef<
|
|
122
|
+
React.ComponentRef<typeof SelectPrimitive.Label>,
|
|
123
|
+
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
124
|
+
>(({ className, ...props }, ref) => (
|
|
125
|
+
<SelectPrimitive.Label
|
|
126
|
+
ref={ref}
|
|
127
|
+
className={cn("block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className)}
|
|
128
|
+
{...props}
|
|
129
|
+
/>
|
|
130
|
+
))
|
|
131
|
+
SelectFieldLabel.displayName = "SelectFieldLabel"
|
|
132
|
+
|
|
121
133
|
const SelectLabel = React.forwardRef<
|
|
122
134
|
React.ComponentRef<typeof SelectPrimitive.GroupLabel>,
|
|
123
135
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.GroupLabel>
|
|
@@ -203,6 +215,7 @@ export {
|
|
|
203
215
|
SelectTrigger,
|
|
204
216
|
SelectContent,
|
|
205
217
|
SelectBackdrop,
|
|
218
|
+
SelectFieldLabel,
|
|
206
219
|
SelectLabel,
|
|
207
220
|
SelectItem,
|
|
208
221
|
SelectItemIndicator,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
Slider,
|
|
3
3
|
SliderValue,
|
|
4
|
+
SliderLabel,
|
|
4
5
|
SliderControl,
|
|
5
6
|
SliderTrack,
|
|
6
7
|
SliderRange,
|
|
@@ -11,6 +12,7 @@ export {
|
|
|
11
12
|
export type {
|
|
12
13
|
SliderProps,
|
|
13
14
|
SliderValueProps,
|
|
15
|
+
SliderLabelProps,
|
|
14
16
|
SliderControlProps,
|
|
15
17
|
SliderTrackProps,
|
|
16
18
|
SliderRangeProps,
|
|
@@ -9,7 +9,7 @@ const Slider = React.forwardRef<
|
|
|
9
9
|
>(({ className, ...props }, ref) => (
|
|
10
10
|
<BaseSlider.Root
|
|
11
11
|
ref={ref}
|
|
12
|
-
className={cn("relative flex w-full
|
|
12
|
+
className={cn("relative flex w-full flex-col gap-2", className)}
|
|
13
13
|
{...props}
|
|
14
14
|
/>
|
|
15
15
|
));
|
|
@@ -84,9 +84,21 @@ const SliderThumb = React.forwardRef<
|
|
|
84
84
|
));
|
|
85
85
|
SliderThumb.displayName = "SliderThumb";
|
|
86
86
|
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
const SliderLabel = React.forwardRef<
|
|
88
|
+
React.ComponentRef<typeof BaseSlider.Label>,
|
|
89
|
+
React.ComponentProps<typeof BaseSlider.Label>
|
|
90
|
+
>(({ className, ...props }, ref) => (
|
|
91
|
+
<BaseSlider.Label
|
|
92
|
+
ref={ref}
|
|
93
|
+
className={cn("block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
));
|
|
97
|
+
SliderLabel.displayName = "SliderLabel";
|
|
98
|
+
|
|
99
|
+
const SliderDirectionProvider: React.FC<React.ComponentProps<typeof DirectionProvider>> = ({
|
|
100
|
+
children,
|
|
101
|
+
...props
|
|
90
102
|
}) => (
|
|
91
103
|
<DirectionProvider {...props}>
|
|
92
104
|
{children}
|
|
@@ -100,11 +112,13 @@ export type SliderControlProps = React.ComponentProps<typeof BaseSlider.Control>
|
|
|
100
112
|
export type SliderTrackProps = React.ComponentProps<typeof BaseSlider.Track>;
|
|
101
113
|
export type SliderRangeProps = React.ComponentProps<typeof BaseSlider.Indicator>;
|
|
102
114
|
export type SliderThumbProps = React.ComponentProps<typeof BaseSlider.Thumb>;
|
|
115
|
+
export type SliderLabelProps = React.ComponentProps<typeof BaseSlider.Label>;
|
|
103
116
|
export type SliderDirectionProviderProps = React.ComponentProps<typeof DirectionProvider>;
|
|
104
117
|
|
|
105
118
|
export {
|
|
106
119
|
Slider,
|
|
107
120
|
SliderValue,
|
|
121
|
+
SliderLabel,
|
|
108
122
|
SliderControl,
|
|
109
123
|
SliderTrack,
|
|
110
124
|
SliderRange,
|