@waveso/ui 0.14.0 → 0.15.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/dist/autocomplete.d.ts +4 -1
- package/dist/autocomplete.js +4 -2
- package/dist/badge.d.ts +1 -1
- package/dist/button.d.ts +2 -2
- package/dist/button.js +6 -6
- package/dist/combobox.d.ts +11 -3
- package/dist/combobox.js +21 -7
- package/dist/input-group.d.ts +8 -4
- package/dist/input-group.js +25 -17
- package/dist/input.d.ts +1 -1
- package/dist/input.js +4 -4
- package/dist/select.d.ts +7 -4
- package/dist/select.js +12 -2
- package/dist/sidebar.d.ts +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/styles.css +18 -0
- package/dist/textarea.d.ts +8 -2
- package/dist/textarea.js +14 -3
- package/package.json +1 -1
package/dist/autocomplete.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { inputVariants } from "./input.js";
|
|
1
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
3
|
import * as React from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
5
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
4
6
|
|
|
5
7
|
//#region src/autocomplete.d.ts
|
|
6
8
|
type AutocompleteProps = React.ComponentProps<typeof Autocomplete$1.Root>;
|
|
7
|
-
type AutocompleteInputProps = React.ComponentProps<typeof Autocomplete$1.Input>;
|
|
9
|
+
type AutocompleteInputProps = Omit<React.ComponentProps<typeof Autocomplete$1.Input>, "size"> & VariantProps<typeof inputVariants>;
|
|
8
10
|
type AutocompleteTriggerProps = React.ComponentProps<typeof Autocomplete$1.Trigger>;
|
|
9
11
|
type AutocompleteIconProps = React.ComponentProps<typeof Autocomplete$1.Icon>;
|
|
10
12
|
type AutocompleteClearProps = React.ComponentProps<typeof Autocomplete$1.Clear>;
|
|
@@ -29,6 +31,7 @@ declare function Autocomplete({
|
|
|
29
31
|
}: AutocompleteProps): _$react_jsx_runtime0.JSX.Element;
|
|
30
32
|
declare function AutocompleteInput({
|
|
31
33
|
className,
|
|
34
|
+
size,
|
|
32
35
|
...props
|
|
33
36
|
}: AutocompleteInputProps): _$react_jsx_runtime0.JSX.Element;
|
|
34
37
|
declare function AutocompleteTrigger({
|
package/dist/autocomplete.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/utils.js";
|
|
3
|
+
import { inputVariants } from "./input.js";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
5
6
|
//#region src/autocomplete.tsx
|
|
@@ -9,10 +10,11 @@ function Autocomplete({ ...props }) {
|
|
|
9
10
|
...props
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
|
-
function AutocompleteInput({ className, ...props }) {
|
|
13
|
+
function AutocompleteInput({ className, size = "default", ...props }) {
|
|
13
14
|
return /* @__PURE__ */ jsx(Autocomplete$1.Input, {
|
|
14
15
|
"data-slot": "autocomplete-input",
|
|
15
|
-
|
|
16
|
+
"data-size": size,
|
|
17
|
+
className: cn(inputVariants({ size }), className),
|
|
16
18
|
...props
|
|
17
19
|
});
|
|
18
20
|
}
|
package/dist/badge.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
5
5
|
|
|
6
6
|
//#region src/badge.d.ts
|
|
7
7
|
declare const badgeVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "link" | "outline" | "success" | "warning" | "
|
|
8
|
+
variant?: "default" | "link" | "outline" | "success" | "warning" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
type BadgeProps = useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>;
|
|
11
11
|
declare function Badge({
|
package/dist/button.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
6
6
|
|
|
7
7
|
//#region src/button.d.ts
|
|
8
8
|
declare const buttonVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "link" | "outline" | "
|
|
10
|
-
size?: "default" | "sm" | "
|
|
9
|
+
variant?: "default" | "link" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "xs" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
11
11
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
12
12
|
type ButtonProps = React.ComponentProps<typeof Button$1> & VariantProps<typeof buttonVariants>;
|
|
13
13
|
declare function Button({
|
package/dist/button.js
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
//#region src/button.tsx
|
|
7
|
-
const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/30 aria-invalid:border-destructive rounded-md border border-transparent bg-clip-padding
|
|
7
|
+
const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/30 aria-invalid:border-destructive rounded-md border border-transparent bg-clip-padding font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap motion-color disabled:pointer-events-none disabled:opacity-30 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-hidden group/button select-none active:not-aria-[haspopup]:scale-[0.97]", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-primary text-white hover:bg-primary/80",
|
|
@@ -15,14 +15,14 @@ const buttonVariants = cva("cursor-clickable focus-visible:border-focus focus-vi
|
|
|
15
15
|
link: "text-primary underline-offset-4 hover:underline"
|
|
16
16
|
},
|
|
17
17
|
size: {
|
|
18
|
-
default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pe-2.5 has-data-[icon=inline-start]:ps-2.5",
|
|
19
|
-
xs: "h-6 gap-1 rounded-sm px-2
|
|
20
|
-
sm: "h-8 gap-1 px-3 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
21
|
-
lg: "h-
|
|
18
|
+
default: "h-9 gap-1.5 px-3 text-base has-data-[icon=inline-end]:pe-2.5 has-data-[icon=inline-start]:ps-2.5",
|
|
19
|
+
xs: "h-6 gap-1 rounded-sm px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-3",
|
|
20
|
+
sm: "h-8 gap-1 px-3 text-sm has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
21
|
+
lg: "h-11 gap-1.5 px-4 text-lg has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3",
|
|
22
22
|
icon: "size-9",
|
|
23
23
|
"icon-xs": "size-6 rounded-sm in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
24
24
|
"icon-sm": "size-8",
|
|
25
|
-
"icon-lg": "size-
|
|
25
|
+
"icon-lg": "size-11"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: {
|
package/dist/combobox.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
4
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
5
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
6
|
|
|
5
7
|
//#region src/combobox.d.ts
|
|
6
8
|
type ComboboxProps = React.ComponentProps<typeof Combobox$1.Root>;
|
|
@@ -18,12 +20,13 @@ type ComboboxLabelProps = React.ComponentProps<typeof Combobox$1.GroupLabel>;
|
|
|
18
20
|
type ComboboxCollectionProps = React.ComponentProps<typeof Combobox$1.Collection>;
|
|
19
21
|
type ComboboxEmptyProps = React.ComponentProps<typeof Combobox$1.Empty>;
|
|
20
22
|
type ComboboxSeparatorProps = React.ComponentProps<typeof Combobox$1.Separator>;
|
|
21
|
-
type ComboboxChipsProps = React.ComponentProps<typeof Combobox$1.Chips>;
|
|
23
|
+
type ComboboxChipsProps = React.ComponentProps<typeof Combobox$1.Chips> & VariantProps<typeof comboboxChipsVariants>;
|
|
22
24
|
type ComboboxChipBaseProps = React.ComponentProps<typeof Combobox$1.Chip>;
|
|
23
25
|
type ComboboxChipsInputProps = React.ComponentProps<typeof Combobox$1.Input>;
|
|
24
|
-
type ComboboxInputProps = ComboboxInputBaseProps & {
|
|
26
|
+
type ComboboxInputProps = Omit<ComboboxInputBaseProps, "size"> & {
|
|
25
27
|
showTrigger?: boolean;
|
|
26
28
|
showClear?: boolean;
|
|
29
|
+
size?: "xs" | "sm" | "default" | "lg";
|
|
27
30
|
};
|
|
28
31
|
type ComboboxChipProps = ComboboxChipBaseProps & {
|
|
29
32
|
showRemove?: boolean;
|
|
@@ -50,6 +53,7 @@ declare function ComboboxInput({
|
|
|
50
53
|
disabled,
|
|
51
54
|
showTrigger,
|
|
52
55
|
showClear,
|
|
56
|
+
size,
|
|
53
57
|
...props
|
|
54
58
|
}: ComboboxInputProps): _$react_jsx_runtime0.JSX.Element;
|
|
55
59
|
declare function ComboboxContent({
|
|
@@ -89,8 +93,12 @@ declare function ComboboxSeparator({
|
|
|
89
93
|
className,
|
|
90
94
|
...props
|
|
91
95
|
}: ComboboxSeparatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
96
|
+
declare const comboboxChipsVariants: (props?: ({
|
|
97
|
+
size?: "default" | "sm" | "xs" | "lg" | null | undefined;
|
|
98
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
92
99
|
declare function ComboboxChips({
|
|
93
100
|
className,
|
|
101
|
+
size,
|
|
94
102
|
...props
|
|
95
103
|
}: ComboboxChipsProps): _$react_jsx_runtime0.JSX.Element;
|
|
96
104
|
declare function ComboboxChip({
|
|
@@ -105,4 +113,4 @@ declare function ComboboxChipsInput({
|
|
|
105
113
|
}: ComboboxChipsInputProps): _$react_jsx_runtime0.JSX.Element;
|
|
106
114
|
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
107
115
|
//#endregion
|
|
108
|
-
export { Combobox, ComboboxChip, type ComboboxChipProps, ComboboxChips, ComboboxChipsInput, type ComboboxChipsInputProps, type ComboboxChipsProps, ComboboxClear, type ComboboxClearProps, ComboboxCollection, type ComboboxCollectionProps, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxLabel, type ComboboxLabelProps, ComboboxList, type ComboboxListProps, type ComboboxPortalProps, type ComboboxPositionerProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxTrigger, type ComboboxTriggerProps, ComboboxValue, type ComboboxValueProps, useComboboxAnchor };
|
|
116
|
+
export { Combobox, ComboboxChip, type ComboboxChipProps, ComboboxChips, ComboboxChipsInput, type ComboboxChipsInputProps, type ComboboxChipsProps, ComboboxClear, type ComboboxClearProps, ComboboxCollection, type ComboboxCollectionProps, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxLabel, type ComboboxLabelProps, ComboboxList, type ComboboxListProps, type ComboboxPortalProps, type ComboboxPositionerProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxTrigger, type ComboboxTriggerProps, ComboboxValue, type ComboboxValueProps, comboboxChipsVariants, useComboboxAnchor };
|
package/dist/combobox.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Button } from "./button.js";
|
|
|
5
5
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import * as React from "react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
8
9
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
9
10
|
//#region src/combobox.tsx
|
|
10
11
|
function Combobox({ ...props }) {
|
|
@@ -33,16 +34,19 @@ function ComboboxClear({ className, ...props }) {
|
|
|
33
34
|
"aria-label": "Clear",
|
|
34
35
|
render: /* @__PURE__ */ jsx(InputGroupButton, {
|
|
35
36
|
variant: "ghost",
|
|
36
|
-
size: "icon
|
|
37
|
+
size: "icon"
|
|
37
38
|
}),
|
|
38
39
|
className: cn("motion-scale-sm", className),
|
|
39
40
|
...props,
|
|
40
41
|
children: /* @__PURE__ */ jsx(CloseIcon, { className: "pointer-events-none" })
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
|
-
function ComboboxInput({ className, children, disabled, showTrigger = true, showClear = false, ...props }) {
|
|
44
|
+
function ComboboxInput({ className, children, disabled, showTrigger = true, showClear = false, size = "default", ...props }) {
|
|
44
45
|
return /* @__PURE__ */ jsxs(Combobox$1.InputGroup, {
|
|
45
|
-
render: /* @__PURE__ */ jsx(InputGroup, {
|
|
46
|
+
render: /* @__PURE__ */ jsx(InputGroup, {
|
|
47
|
+
size,
|
|
48
|
+
className: cn(className)
|
|
49
|
+
}),
|
|
46
50
|
children: [
|
|
47
51
|
/* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
48
52
|
render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
|
|
@@ -53,7 +57,7 @@ function ComboboxInput({ className, children, disabled, showTrigger = true, show
|
|
|
53
57
|
children: /* @__PURE__ */ jsxs("div", {
|
|
54
58
|
className: "relative grid size-6 *:[grid-area:1/1]",
|
|
55
59
|
children: [showTrigger ? /* @__PURE__ */ jsx(InputGroupButton, {
|
|
56
|
-
size: "icon
|
|
60
|
+
size: "icon",
|
|
57
61
|
variant: "ghost",
|
|
58
62
|
nativeButton: true,
|
|
59
63
|
render: /* @__PURE__ */ jsx(ComboboxTrigger, {}),
|
|
@@ -150,10 +154,20 @@ function ComboboxSeparator({ className, ...props }) {
|
|
|
150
154
|
...props
|
|
151
155
|
});
|
|
152
156
|
}
|
|
153
|
-
|
|
157
|
+
const comboboxChipsVariants = cva("bg-edge hover:border-focus focus-within:border-focus focus-within:ring-focus/50 has-aria-invalid:ring-destructive/30 has-aria-invalid:border-destructive flex flex-wrap items-center gap-1 rounded-md border border-transparent motion-color focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1", {
|
|
158
|
+
variants: { size: {
|
|
159
|
+
xs: "min-h-6 rounded-sm px-2 py-0.5 text-xs",
|
|
160
|
+
sm: "min-h-8 px-3 py-1 text-sm",
|
|
161
|
+
default: "min-h-9 px-3 py-1 text-base",
|
|
162
|
+
lg: "min-h-11 px-4 py-1.5 text-lg"
|
|
163
|
+
} },
|
|
164
|
+
defaultVariants: { size: "default" }
|
|
165
|
+
});
|
|
166
|
+
function ComboboxChips({ className, size = "default", ...props }) {
|
|
154
167
|
return /* @__PURE__ */ jsx(Combobox$1.Chips, {
|
|
155
168
|
"data-slot": "combobox-chips",
|
|
156
|
-
|
|
169
|
+
"data-size": size,
|
|
170
|
+
className: cn(comboboxChipsVariants({ size }), className),
|
|
157
171
|
...props
|
|
158
172
|
});
|
|
159
173
|
}
|
|
@@ -185,4 +199,4 @@ function useComboboxAnchor() {
|
|
|
185
199
|
return React.useRef(null);
|
|
186
200
|
}
|
|
187
201
|
//#endregion
|
|
188
|
-
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
|
202
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, comboboxChipsVariants, useComboboxAnchor };
|
package/dist/input-group.d.ts
CHANGED
|
@@ -6,7 +6,10 @@ import { VariantProps } from "class-variance-authority";
|
|
|
6
6
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
7
|
|
|
8
8
|
//#region src/input-group.d.ts
|
|
9
|
-
|
|
9
|
+
declare const inputGroupVariants: (props?: ({
|
|
10
|
+
size?: "default" | "sm" | "xs" | "lg" | null | undefined;
|
|
11
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
12
|
+
type InputGroupProps = React.ComponentProps<"div"> & VariantProps<typeof inputGroupVariants>;
|
|
10
13
|
type InputGroupAddonProps = React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>;
|
|
11
14
|
type InputGroupButtonProps = Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
|
|
12
15
|
type?: "button" | "submit" | "reset";
|
|
@@ -16,10 +19,11 @@ type InputGroupInputProps = React.ComponentProps<typeof Input>;
|
|
|
16
19
|
type InputGroupTextareaProps = React.ComponentProps<"textarea">;
|
|
17
20
|
declare function InputGroup({
|
|
18
21
|
className,
|
|
22
|
+
size,
|
|
19
23
|
...props
|
|
20
24
|
}: InputGroupProps): _$react_jsx_runtime0.JSX.Element;
|
|
21
25
|
declare const inputGroupAddonVariants: (props?: ({
|
|
22
|
-
align?: "inline-
|
|
26
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
23
27
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
24
28
|
declare function InputGroupAddon({
|
|
25
29
|
className,
|
|
@@ -27,7 +31,7 @@ declare function InputGroupAddon({
|
|
|
27
31
|
...props
|
|
28
32
|
}: InputGroupAddonProps): _$react_jsx_runtime0.JSX.Element;
|
|
29
33
|
declare const inputGroupButtonVariants: (props?: ({
|
|
30
|
-
size?: "
|
|
34
|
+
size?: "default" | "icon" | null | undefined;
|
|
31
35
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
32
36
|
declare function InputGroupButton({
|
|
33
37
|
className,
|
|
@@ -49,4 +53,4 @@ declare function InputGroupTextarea({
|
|
|
49
53
|
...props
|
|
50
54
|
}: InputGroupTextareaProps): _$react_jsx_runtime0.JSX.Element;
|
|
51
55
|
//#endregion
|
|
52
|
-
export { InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputGroupTextarea, type InputGroupTextareaProps, inputGroupAddonVariants, inputGroupButtonVariants };
|
|
56
|
+
export { InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputGroupTextarea, type InputGroupTextareaProps, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants };
|
package/dist/input-group.js
CHANGED
|
@@ -6,20 +6,30 @@ import { Textarea } from "./textarea.js";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
//#region src/input-group.tsx
|
|
9
|
-
|
|
9
|
+
const inputGroupVariants = cva("bg-edge hover:border-focus has-[[data-slot=input-group-control]:focus-visible]:border-focus has-[[data-slot=input-group-control]:focus-visible]:ring-focus/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/30 has-[[data-slot][aria-invalid=true]]:border-destructive group/input-group relative flex w-full min-w-0 items-center rounded-md border border-transparent motion-color outline-hidden in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:pointer-events-none has-disabled:opacity-30 not-has-disabled:has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3", {
|
|
10
|
+
variants: { size: {
|
|
11
|
+
xs: "h-6 rounded-sm",
|
|
12
|
+
sm: "h-8",
|
|
13
|
+
default: "h-9",
|
|
14
|
+
lg: "h-11"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { size: "default" }
|
|
17
|
+
});
|
|
18
|
+
function InputGroup({ className, size = "default", ...props }) {
|
|
10
19
|
return /* @__PURE__ */ jsx("div", {
|
|
11
20
|
"data-slot": "input-group",
|
|
21
|
+
"data-size": size,
|
|
12
22
|
role: "group",
|
|
13
|
-
className: cn(
|
|
23
|
+
className: cn(inputGroupVariants({ size }), className),
|
|
14
24
|
...props
|
|
15
25
|
});
|
|
16
26
|
}
|
|
17
|
-
const inputGroupAddonVariants = cva("text-muted h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>
|
|
27
|
+
const inputGroupAddonVariants = cva("text-muted h-auto gap-2 has-[>button]:gap-[3px] py-2 not-has-[>button]:group-data-[size=xs]/input-group:py-1 not-has-[>button]:group-data-[size=sm]/input-group:py-1.5 not-has-[>button]:group-data-[size=lg]/input-group:py-2.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none", {
|
|
18
28
|
variants: { align: {
|
|
19
|
-
"inline-start": "
|
|
20
|
-
"inline-end": "
|
|
21
|
-
"block-start": "px-2
|
|
22
|
-
"block-end": "px-2
|
|
29
|
+
"inline-start": "order-first ps-3 not-has-[>button]:group-data-[size=xs]/input-group:ps-2 not-has-[>button]:group-data-[size=sm]/input-group:ps-3 not-has-[>button]:group-data-[size=lg]/input-group:ps-4 has-[>kbd]:-ms-1 has-[>button]:self-stretch has-[>button]:py-[3px] has-[>button]:ps-[3px] [&>button]:h-full",
|
|
30
|
+
"inline-end": "order-last pe-3 not-has-[>button]:group-data-[size=xs]/input-group:pe-2 not-has-[>button]:group-data-[size=sm]/input-group:pe-3 not-has-[>button]:group-data-[size=lg]/input-group:pe-4 has-[>kbd]:-me-1 has-[>button]:self-stretch has-[>button]:py-[3px] has-[>button]:pe-[3px] [&>button]:h-full",
|
|
31
|
+
"block-start": "order-first w-full justify-start px-3 group-data-[size=xs]/input-group:px-2 group-data-[size=sm]/input-group:px-3 group-data-[size=lg]/input-group:px-4 pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5",
|
|
32
|
+
"block-end": "order-last w-full justify-start px-3 group-data-[size=xs]/input-group:px-2 group-data-[size=sm]/input-group:px-3 group-data-[size=lg]/input-group:px-4 pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"
|
|
23
33
|
} },
|
|
24
34
|
defaultVariants: { align: "inline-start" }
|
|
25
35
|
});
|
|
@@ -36,16 +46,14 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
|
36
46
|
...props
|
|
37
47
|
});
|
|
38
48
|
}
|
|
39
|
-
const inputGroupButtonVariants = cva("gap-
|
|
49
|
+
const inputGroupButtonVariants = cva("shadow-none flex items-center gap-1.5 rounded-md text-sm [&>svg:not([class*='size-'])]:size-4 group-data-[size=xs]/input-group:gap-1 group-data-[size=xs]/input-group:rounded-sm group-data-[size=xs]/input-group:text-xs group-data-[size=xs]/input-group:[&>svg:not([class*='size-'])]:size-3.5", {
|
|
40
50
|
variants: { size: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"icon-xs": "size-6 rounded-sm p-0",
|
|
44
|
-
"icon-sm": "size-8 p-0"
|
|
51
|
+
default: "h-7 px-2 group-data-[size=xs]/input-group:px-1.5 group-data-[size=lg]/input-group:px-2.5",
|
|
52
|
+
icon: "h-6 aspect-square p-0"
|
|
45
53
|
} },
|
|
46
|
-
defaultVariants: { size: "
|
|
54
|
+
defaultVariants: { size: "default" }
|
|
47
55
|
});
|
|
48
|
-
function InputGroupButton({ className, type = "button", variant = "
|
|
56
|
+
function InputGroupButton({ className, type = "button", variant = "default", size = "default", ...props }) {
|
|
49
57
|
return /* @__PURE__ */ jsx(Button, {
|
|
50
58
|
type,
|
|
51
59
|
"data-size": size,
|
|
@@ -64,16 +72,16 @@ function InputGroupText({ className, ...props }) {
|
|
|
64
72
|
function InputGroupInput({ className, ...props }) {
|
|
65
73
|
return /* @__PURE__ */ jsx(Input, {
|
|
66
74
|
"data-slot": "input-group-control",
|
|
67
|
-
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0
|
|
75
|
+
className: cn("h-full flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 group-data-[size=xs]/input-group:px-2 group-data-[size=xs]/input-group:text-xs group-data-[size=sm]/input-group:px-3 group-data-[size=sm]/input-group:text-sm group-data-[size=lg]/input-group:px-4 group-data-[size=lg]/input-group:text-lg", className),
|
|
68
76
|
...props
|
|
69
77
|
});
|
|
70
78
|
}
|
|
71
79
|
function InputGroupTextarea({ className, ...props }) {
|
|
72
80
|
return /* @__PURE__ */ jsx(Textarea, {
|
|
73
81
|
"data-slot": "input-group-control",
|
|
74
|
-
className: cn("flex-1
|
|
82
|
+
className: cn("flex-1 rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0", className),
|
|
75
83
|
...props
|
|
76
84
|
});
|
|
77
85
|
}
|
|
78
86
|
//#endregion
|
|
79
|
-
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupButtonVariants };
|
|
87
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants };
|
package/dist/input.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
6
6
|
|
|
7
7
|
//#region src/input.d.ts
|
|
8
8
|
declare const inputVariants: (props?: ({
|
|
9
|
-
size?: "default" | "sm" | "
|
|
9
|
+
size?: "default" | "sm" | "xs" | "lg" | null | undefined;
|
|
10
10
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
type InputProps = Omit<React.ComponentProps<typeof Input$1>, "size"> & VariantProps<typeof inputVariants>;
|
|
12
12
|
declare function Input({
|
package/dist/input.js
CHANGED
|
@@ -3,12 +3,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
5
5
|
//#region src/input.tsx
|
|
6
|
-
const inputVariants = cva("
|
|
6
|
+
const inputVariants = cva("bg-edge hover:border-focus focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/30 aria-invalid:border-destructive placeholder:text-soft flex w-full min-w-0 items-center overflow-hidden rounded-md border border-transparent motion-color outline-hidden file:inline-flex file:my-[3px] file:items-center file:me-3 file:cursor-clickable file:rounded-md file:border-0 file:bg-primary file:px-2.5 file:leading-none file:font-medium file:text-white file:motion-color file:hover:bg-primary/80 focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-30 aria-invalid:ring-3", {
|
|
7
7
|
variants: { size: {
|
|
8
8
|
xs: "h-6 rounded-sm px-2 text-xs file:-ms-[5px] file:h-4",
|
|
9
|
-
sm: "h-8 px-
|
|
10
|
-
default: "h-9 px-3 text-base file:-ms-[9px] file:h-7
|
|
11
|
-
lg: "h-
|
|
9
|
+
sm: "h-8 px-3 text-sm file:-ms-[9px] file:h-6",
|
|
10
|
+
default: "h-9 px-3 text-base file:-ms-[9px] file:h-7",
|
|
11
|
+
lg: "h-11 px-4 text-lg file:-ms-[13px] file:h-9"
|
|
12
12
|
} },
|
|
13
13
|
defaultVariants: { size: "default" }
|
|
14
14
|
});
|
package/dist/select.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
4
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
5
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
6
|
|
|
5
7
|
//#region src/select.d.ts
|
|
6
8
|
type SelectProps<Value, Multiple extends boolean | undefined = false> = Select$1.Root.Props<Value, Multiple>;
|
|
@@ -16,9 +18,10 @@ type SelectItemProps = React.ComponentProps<typeof Select$1.Item>;
|
|
|
16
18
|
type SelectSeparatorProps = React.ComponentProps<typeof Select$1.Separator>;
|
|
17
19
|
type SelectScrollUpButtonProps = React.ComponentProps<typeof Select$1.ScrollUpArrow>;
|
|
18
20
|
type SelectScrollDownButtonProps = React.ComponentProps<typeof Select$1.ScrollDownArrow>;
|
|
19
|
-
|
|
20
|
-
size?: "sm" | "
|
|
21
|
-
};
|
|
21
|
+
declare const selectTriggerVariants: (props?: ({
|
|
22
|
+
size?: "default" | "sm" | "xs" | "lg" | null | undefined;
|
|
23
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
24
|
+
type SelectTriggerProps = SelectTriggerBaseProps & VariantProps<typeof selectTriggerVariants>;
|
|
22
25
|
type SelectContentProps = SelectPopupProps & Pick<SelectPositionerProps, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">;
|
|
23
26
|
declare function Select<Value, Multiple extends boolean | undefined = false>({
|
|
24
27
|
...props
|
|
@@ -80,4 +83,4 @@ declare function SelectScrollDownButton({
|
|
|
80
83
|
...props
|
|
81
84
|
}: SelectScrollDownButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
82
85
|
//#endregion
|
|
83
|
-
export { Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectList, type SelectListProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps };
|
|
86
|
+
export { Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, SelectList, type SelectListProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, selectTriggerVariants };
|
package/dist/select.js
CHANGED
|
@@ -2,8 +2,18 @@
|
|
|
2
2
|
import { cn } from "./lib/utils.js";
|
|
3
3
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon, ChevronsUpDownIcon } from "./lib/internal-icons.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
5
6
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
6
7
|
//#region src/select.tsx
|
|
8
|
+
const selectTriggerVariants = cva("data-placeholder:text-soft bg-edge hover:border-focus focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/30 aria-invalid:border-destructive flex w-fit items-center justify-between gap-1.5 rounded-md border border-transparent whitespace-nowrap motion-color outline-hidden select-none focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-30 aria-invalid:ring-3 *: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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
9
|
+
variants: { size: {
|
|
10
|
+
xs: "h-6 rounded-sm px-2 text-xs",
|
|
11
|
+
sm: "h-8 px-3 text-sm",
|
|
12
|
+
default: "h-9 px-3 text-base",
|
|
13
|
+
lg: "h-11 px-4 text-lg"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { size: "default" }
|
|
16
|
+
});
|
|
7
17
|
function Select({ ...props }) {
|
|
8
18
|
return /* @__PURE__ */ jsx(Select$1.Root, {
|
|
9
19
|
"data-slot": "select",
|
|
@@ -48,7 +58,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
48
58
|
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
49
59
|
"data-slot": "select-trigger",
|
|
50
60
|
"data-size": size,
|
|
51
|
-
className: cn(
|
|
61
|
+
className: cn(selectTriggerVariants({ size }), className),
|
|
52
62
|
...props,
|
|
53
63
|
children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
54
64
|
"data-slot": "select-icon",
|
|
@@ -125,4 +135,4 @@ function SelectScrollDownButton({ className, ...props }) {
|
|
|
125
135
|
});
|
|
126
136
|
}
|
|
127
137
|
//#endregion
|
|
128
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectList, SelectPortal, SelectPositioner, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
138
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectList, SelectPortal, SelectPositioner, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, selectTriggerVariants };
|
package/dist/sidebar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
|
-
import { Separator } from "./separator.js";
|
|
3
2
|
import { Input } from "./input.js";
|
|
3
|
+
import { Separator } from "./separator.js";
|
|
4
4
|
import { TooltipContent } from "./tooltip.js";
|
|
5
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
import * as React from "react";
|
package/dist/sidebar.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { cn } from "./lib/utils.js";
|
|
3
3
|
import { SidebarPanelIcon } from "./lib/internal-icons.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
|
-
import { Separator } from "./separator.js";
|
|
6
5
|
import { Input } from "./input.js";
|
|
6
|
+
import { Separator } from "./separator.js";
|
|
7
7
|
import { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from "./drawer.js";
|
|
8
8
|
import { Skeleton } from "./skeleton.js";
|
|
9
9
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
package/dist/styles.css
CHANGED
|
@@ -457,6 +457,24 @@
|
|
|
457
457
|
cursor: var(--cursor-clickable);
|
|
458
458
|
}
|
|
459
459
|
|
|
460
|
+
/* `resize-handle` — a subtle corner grip for a resizable field, shown on hover.
|
|
461
|
+
* Painted as a `background-image` (a <textarea> is a replaced element, so no
|
|
462
|
+
* `::after`) inset into the bottom-right corner, while the native
|
|
463
|
+
* `::-webkit-resizer` is kept transparent so the corner still drags. A neutral
|
|
464
|
+
* gray reads on every theme, like a native scrollbar grip. WebKit/Chromium
|
|
465
|
+
* paint it; Firefox keeps its own native grip. Pair with a `resize-*` utility. */
|
|
466
|
+
@utility resize-handle {
|
|
467
|
+
&::-webkit-resizer {
|
|
468
|
+
background: transparent;
|
|
469
|
+
}
|
|
470
|
+
&:hover {
|
|
471
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M12 0C12 5.4 11.5 8.5 10 10C8.5 11.5 5.4 12 0 12' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
472
|
+
background-repeat: no-repeat;
|
|
473
|
+
background-position: right 5px bottom 5px;
|
|
474
|
+
background-size: 12px 12px;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
460
478
|
/* `motion-color` — interaction-state transition for controls: smoothly
|
|
461
479
|
* animates color / background / border / ring (box-shadow) on hover, focus,
|
|
462
480
|
* pressed, checked, etc. Runs at the `sm` tier (controls are small + fast). A
|
package/dist/textarea.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
3
5
|
|
|
4
6
|
//#region src/textarea.d.ts
|
|
7
|
+
declare const textareaVariants: (props?: ({
|
|
8
|
+
size?: "default" | "sm" | "xs" | "lg" | null | undefined;
|
|
9
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
5
10
|
type TextareaProps = Omit<React.ComponentProps<"textarea">, "onChange"> & {
|
|
6
11
|
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
7
12
|
onValueChange?: (value: string) => void;
|
|
8
|
-
}
|
|
13
|
+
} & VariantProps<typeof textareaVariants>;
|
|
9
14
|
declare function Textarea({
|
|
10
15
|
className,
|
|
16
|
+
size,
|
|
11
17
|
onChange,
|
|
12
18
|
onValueChange,
|
|
13
19
|
...props
|
|
14
20
|
}: TextareaProps): _$react_jsx_runtime0.JSX.Element;
|
|
15
21
|
//#endregion
|
|
16
|
-
export { Textarea, type TextareaProps };
|
|
22
|
+
export { Textarea, type TextareaProps, textareaVariants };
|
package/dist/textarea.js
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/utils.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
4
5
|
//#region src/textarea.tsx
|
|
5
|
-
|
|
6
|
+
const textareaVariants = cva("bg-edge hover:border-focus focus-visible:border-focus focus-visible:ring-focus/50 aria-invalid:ring-destructive/30 aria-invalid:border-destructive resize-y resize-handle disabled:pointer-events-none placeholder:text-soft flex field-sizing-content w-full rounded-md border border-transparent motion-color outline-hidden focus-visible:ring-3 disabled:opacity-30 aria-invalid:ring-3", {
|
|
7
|
+
variants: { size: {
|
|
8
|
+
xs: "min-h-12 rounded-sm px-2 py-1 text-xs",
|
|
9
|
+
sm: "min-h-14 px-3 py-1.5 text-sm",
|
|
10
|
+
default: "min-h-16 px-3 py-2 text-base",
|
|
11
|
+
lg: "min-h-20 px-4 py-2.5 text-lg"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { size: "default" }
|
|
14
|
+
});
|
|
15
|
+
function Textarea({ className, size = "default", onChange, onValueChange, ...props }) {
|
|
6
16
|
function handleChange(e) {
|
|
7
17
|
onChange?.(e);
|
|
8
18
|
onValueChange?.(e.target.value);
|
|
9
19
|
}
|
|
10
20
|
return /* @__PURE__ */ jsx("textarea", {
|
|
11
21
|
"data-slot": "textarea",
|
|
12
|
-
|
|
22
|
+
"data-size": size,
|
|
23
|
+
className: cn(textareaVariants({ size }), className),
|
|
13
24
|
onChange: handleChange,
|
|
14
25
|
...props
|
|
15
26
|
});
|
|
16
27
|
}
|
|
17
28
|
//#endregion
|
|
18
|
-
export { Textarea };
|
|
29
|
+
export { Textarea, textareaVariants };
|