@equal-experts/kuat-react 0.4.2 → 0.5.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/README.md +80 -120
- package/dist/checkbox-field-Bslh9sHw.js +65 -0
- package/dist/checkbox-field.css +1 -0
- package/dist/checkbox.d.ts +3 -0
- package/dist/checkbox.js +10 -0
- package/dist/components/ui/checkbox/checkbox-field.d.ts +23 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox/index.d.ts +4 -0
- package/dist/components/ui/field/field.d.ts +28 -0
- package/dist/components/ui/field/index.d.ts +2 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/input.d.ts +20 -0
- package/dist/components/ui/radio/index.d.ts +4 -0
- package/dist/components/ui/radio/radio-field.d.ts +25 -0
- package/dist/components/ui/radio/radio.d.ts +7 -0
- package/dist/components/ui/select/constants.d.ts +19 -0
- package/dist/components/ui/select/index.d.ts +3 -0
- package/dist/components/ui/select/select.d.ts +53 -0
- package/dist/components/ui/switch/index.d.ts +4 -0
- package/dist/components/ui/switch/switch-field.d.ts +23 -0
- package/dist/components/ui/switch/switch.d.ts +5 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/textarea.d.ts +9 -0
- package/dist/components/ui/toggle/constants.d.ts +4 -0
- package/dist/components/ui/toggle/index.d.ts +6 -0
- package/dist/components/ui/toggle/toggle-group.d.ts +11 -0
- package/dist/components/ui/toggle/toggle.d.ts +9 -0
- package/dist/constants-DHz0LWRt.js +49 -0
- package/dist/constants.css +1 -0
- package/dist/field-DRLopwY4.js +141 -0
- package/dist/field.css +1 -0
- package/dist/field.d.ts +3 -0
- package/dist/field.js +17 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +785 -731
- package/dist/input-2x92vprz.js +43 -0
- package/dist/input.css +1 -0
- package/dist/input.d.ts +3 -0
- package/dist/input.js +8 -0
- package/dist/radio-field-G8dvdsLE.js +82 -0
- package/dist/radio-field.css +1 -0
- package/dist/radio.d.ts +3 -0
- package/dist/radio.js +11 -0
- package/dist/select-Oz2Zj-L0.js +232 -0
- package/dist/select.css +1 -0
- package/dist/select.d.ts +3 -0
- package/dist/select.js +19 -0
- package/dist/styles.css +1 -1
- package/dist/switch-field-Ce9CiRqk.js +61 -0
- package/dist/switch-field.css +1 -0
- package/dist/switch.d.ts +1 -0
- package/dist/switch.js +7 -0
- package/dist/textarea-DiU8h_H0.js +19 -0
- package/dist/textarea.css +1 -0
- package/dist/textarea.d.ts +3 -0
- package/dist/textarea.js +8 -0
- package/dist/toggle-group.d.ts +3 -0
- package/dist/toggle-group.js +10 -0
- package/dist/toggle.d.ts +3 -0
- package/dist/toggle.js +9 -0
- package/package.json +47 -11
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { SELECT_LINES, SELECT_SIZES, SelectItems, SelectLines, SelectSize } from './constants';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
9
|
+
size?: SelectSize;
|
|
10
|
+
lines?: SelectLines;
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
prepend?: React.ReactNode;
|
|
13
|
+
decoration?: React.ReactNode;
|
|
14
|
+
invalid?: boolean;
|
|
15
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
19
|
+
size?: SelectSize;
|
|
20
|
+
maxHeight?: number | string;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export interface SelectItemProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {
|
|
24
|
+
prepend?: React.ReactNode;
|
|
25
|
+
description?: React.ReactNode;
|
|
26
|
+
decoration?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export interface KuatSelectProps extends Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, "children"> {
|
|
30
|
+
items?: SelectItems;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
size?: SelectSize;
|
|
33
|
+
lines?: SelectLines;
|
|
34
|
+
prepend?: React.ReactNode;
|
|
35
|
+
decoration?: React.ReactNode;
|
|
36
|
+
label?: React.ReactNode;
|
|
37
|
+
invalid?: boolean;
|
|
38
|
+
position?: React.ComponentPropsWithoutRef<typeof SelectContent>["position"];
|
|
39
|
+
maxHeight?: number | string;
|
|
40
|
+
triggerClassName?: string;
|
|
41
|
+
contentClassName?: string;
|
|
42
|
+
emptyText?: React.ReactNode;
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
triggerProps?: Omit<React.ComponentPropsWithoutRef<typeof SelectTrigger>, "children" | "size" | "lines" | "label" | "prepend" | "decoration" | "invalid">;
|
|
45
|
+
}
|
|
46
|
+
declare function KuatSelect({ items, placeholder, size, lines, prepend, decoration, label, invalid, position, maxHeight, triggerClassName, contentClassName, emptyText, children, triggerProps, ...rootProps }: KuatSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export type SelectProps = React.ComponentPropsWithoutRef<typeof Select>;
|
|
48
|
+
export type SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectTrigger>;
|
|
49
|
+
export type SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectContent>;
|
|
50
|
+
export type SelectLabelProps = React.ComponentPropsWithoutRef<typeof SelectLabel>;
|
|
51
|
+
export type SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof SelectSeparator>;
|
|
52
|
+
export type SelectValueProps = React.ComponentPropsWithoutRef<typeof SelectValue>;
|
|
53
|
+
export { KuatSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SELECT_LINES, SELECT_SIZES, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Switch } from './switch';
|
|
2
|
+
export type { SwitchProps } from './switch';
|
|
3
|
+
export { SwitchField, SWITCH_FIELD_APPEARANCES, SWITCH_FIELD_LAYOUTS, } from './switch-field';
|
|
4
|
+
export type { SwitchFieldAppearance, SwitchFieldLayout, SwitchFieldProps, } from './switch-field';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Switch } from './switch';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const SWITCH_FIELD_APPEARANCES: readonly ["plain", "card"];
|
|
4
|
+
export type SwitchFieldAppearance = (typeof SWITCH_FIELD_APPEARANCES)[number];
|
|
5
|
+
export declare const SWITCH_FIELD_LAYOUTS: readonly ["inline", "block"];
|
|
6
|
+
export type SwitchFieldLayout = (typeof SWITCH_FIELD_LAYOUTS)[number];
|
|
7
|
+
/** @deprecated Prefer composing `Field` + `Switch` for new form layouts. */
|
|
8
|
+
export interface SwitchFieldProps extends Omit<React.ComponentPropsWithoutRef<typeof Switch>, "id" | "children"> {
|
|
9
|
+
/** Primary label (always shown). */
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
/** Optional secondary line (12px muted); works for both plain and card. */
|
|
12
|
+
secondaryText?: React.ReactNode;
|
|
13
|
+
/** `plain` — no border/padding; `card` — bordered padded container. */
|
|
14
|
+
appearance?: SwitchFieldAppearance;
|
|
15
|
+
/** `inline` — compact label; `block` — label row can grow. */
|
|
16
|
+
layout?: SwitchFieldLayout;
|
|
17
|
+
/** Place switch on the right of the text block. */
|
|
18
|
+
flipped?: boolean;
|
|
19
|
+
id?: string;
|
|
20
|
+
}
|
|
21
|
+
/** @deprecated Prefer composing `Field` + `Switch` for new form layouts. */
|
|
22
|
+
declare const SwitchField: React.ForwardRefExoticComponent<SwitchFieldProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export { SwitchField };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export type SwitchProps = React.ComponentPropsWithoutRef<typeof Switch>;
|
|
5
|
+
export { Switch };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const TEXTAREA_RESIZE: readonly ["none", "vertical", "horizontal", "both"];
|
|
3
|
+
export type TextareaResize = (typeof TEXTAREA_RESIZE)[number];
|
|
4
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "resize"> {
|
|
5
|
+
/** Controls CSS `resize`. Default `vertical`. */
|
|
6
|
+
resize?: TextareaResize;
|
|
7
|
+
}
|
|
8
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
export { Textarea };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Toggle } from './toggle';
|
|
2
|
+
export type { ToggleProps } from './toggle';
|
|
3
|
+
export { ToggleGroup, ToggleGroupItem } from './toggle-group';
|
|
4
|
+
export type { ToggleGroupProps, ToggleGroupItemProps } from './toggle-group';
|
|
5
|
+
export { TOGGLE_SIZES, TOGGLE_SKINS } from './constants';
|
|
6
|
+
export type { ToggleSize, ToggleSkin } from './constants';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ToggleSize, ToggleSkin } from './constants';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
4
|
+
export type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;
|
|
5
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<ToggleGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export interface ToggleGroupItemProps extends React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> {
|
|
7
|
+
size?: ToggleSize;
|
|
8
|
+
skin?: ToggleSkin;
|
|
9
|
+
}
|
|
10
|
+
declare const ToggleGroupItem: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToggleSize, ToggleSkin } from './constants';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
4
|
+
export interface ToggleProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> {
|
|
5
|
+
size?: ToggleSize;
|
|
6
|
+
skin?: ToggleSkin;
|
|
7
|
+
}
|
|
8
|
+
declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { Toggle };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import * as i from "@radix-ui/react-toggle";
|
|
4
|
+
import { c as m } from "./utils-DLUjLwnh.js";
|
|
5
|
+
import * as a from "@radix-ui/react-toggle-group";
|
|
6
|
+
const p = s.forwardRef(({ className: e, size: o = "regular", skin: t = "outlined", ...g }, l) => /* @__PURE__ */ r(
|
|
7
|
+
i.Root,
|
|
8
|
+
{
|
|
9
|
+
ref: l,
|
|
10
|
+
className: m("toggle", `toggle--size-${o}`, `toggle--skin-${t}`, e),
|
|
11
|
+
"data-slot": "toggle",
|
|
12
|
+
...g
|
|
13
|
+
}
|
|
14
|
+
));
|
|
15
|
+
p.displayName = i.Root.displayName;
|
|
16
|
+
const d = s.forwardRef(({ className: e, orientation: o = "horizontal", ...t }, g) => /* @__PURE__ */ r(
|
|
17
|
+
a.Root,
|
|
18
|
+
{
|
|
19
|
+
ref: g,
|
|
20
|
+
className: m("toggle-group", `toggle-group--${o}`, e),
|
|
21
|
+
"data-slot": "toggle-group",
|
|
22
|
+
orientation: o,
|
|
23
|
+
...t
|
|
24
|
+
}
|
|
25
|
+
));
|
|
26
|
+
d.displayName = a.Root.displayName;
|
|
27
|
+
const u = s.forwardRef(({ className: e, size: o = "regular", skin: t = "outlined", ...g }, l) => /* @__PURE__ */ r(
|
|
28
|
+
a.Item,
|
|
29
|
+
{
|
|
30
|
+
ref: l,
|
|
31
|
+
className: m(
|
|
32
|
+
"toggle-group-item",
|
|
33
|
+
`toggle-group-item--size-${o}`,
|
|
34
|
+
`toggle-group-item--skin-${t}`,
|
|
35
|
+
e
|
|
36
|
+
),
|
|
37
|
+
"data-slot": "toggle-group-item",
|
|
38
|
+
...g
|
|
39
|
+
}
|
|
40
|
+
));
|
|
41
|
+
u.displayName = a.Item.displayName;
|
|
42
|
+
const n = ["mini", "small", "regular", "large"], N = ["outlined", "ghost"];
|
|
43
|
+
export {
|
|
44
|
+
p as T,
|
|
45
|
+
n as a,
|
|
46
|
+
N as b,
|
|
47
|
+
d as c,
|
|
48
|
+
u as d
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration:initial;--tw-ease:initial}}}.toggle,.toggle-group-item{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem)*2);white-space:nowrap;transition-property:background-color,border-color,box-shadow,color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;--tw-ease:var(--ease-in-out,cubic-bezier(.4,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));--tw-outline-style:none;color:#020617;letter-spacing:.5px;background:0 0;border:1px solid #0000;border-radius:4px;outline-style:none;min-height:36px;padding:7px 8px;font-size:14px;font-weight:600;line-height:21px;display:inline-flex}.toggle svg,.toggle-group-item svg{pointer-events:none;flex-shrink:0;width:20px;height:20px}.toggle:focus-visible,.toggle-group-item:focus-visible{box-shadow:0 0 0 3px var(--ring)}.toggle:disabled,.toggle-group-item:disabled{pointer-events:none;cursor:not-allowed;opacity:.45}.toggle--skin-outlined,.toggle-group-item--skin-outlined{background:0 0;border-color:#e2e8f0}.toggle--skin-outlined[data-state=on],.toggle-group-item--skin-outlined[data-state=on]{background:#3341550d}.toggle--skin-ghost,.toggle-group-item--skin-ghost{background:0 0;border-color:#0000}.toggle--skin-ghost[data-state=on],.toggle-group-item--skin-ghost[data-state=on]{background:#0000000d}.toggle--size-mini,.toggle-group-item--size-mini{min-height:24px;padding:2px 8px;font-size:12px;line-height:18px}.toggle--size-small,.toggle-group-item--size-small{min-height:32px;padding:5px 8px}.toggle--size-regular,.toggle-group-item--size-regular{min-height:36px;padding:7px 8px}.toggle--size-large,.toggle-group-item--size-large{min-height:40px;padding:9px 12px}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */.toggle-group{align-items:stretch;width:fit-content;display:inline-flex}.toggle-group--vertical{flex-direction:column}.toggle-group--horizontal>.toggle-group-item:only-child,.toggle-group--vertical>.toggle-group-item:only-child{border-radius:4px}.toggle-group--horizontal>.toggle-group-item:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.toggle-group--horizontal>.toggle-group-item:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.toggle-group--horizontal>.toggle-group-item:not(:first-child):not(:last-child){border-radius:0}.toggle-group--vertical>.toggle-group-item:first-child{border-bottom-right-radius:0;border-bottom-left-radius:0}.toggle-group--vertical>.toggle-group-item:last-child{border-top-left-radius:0;border-top-right-radius:0}.toggle-group--vertical>.toggle-group-item:not(:first-child):not(:last-child){border-radius:0}.toggle-group--horizontal>.toggle-group-item--skin-outlined:not(:first-child){border-left-width:0}.toggle-group--vertical>.toggle-group-item--skin-outlined:not(:first-child){border-top-width:0}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { jsx as d, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { c as i } from "./utils-DLUjLwnh.js";
|
|
4
|
+
function s(l, e) {
|
|
5
|
+
const a = l["data-slot"];
|
|
6
|
+
return typeof a == "string" ? a : e;
|
|
7
|
+
}
|
|
8
|
+
const E = ["responsive", "vertical", "horizontal"], g = t.forwardRef(
|
|
9
|
+
({ className: l, orientation: e = "responsive", ...a }, r) => /* @__PURE__ */ d(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
ref: r,
|
|
13
|
+
className: i("field", `field--orientation-${e}`, l),
|
|
14
|
+
"data-slot": s(a, "field"),
|
|
15
|
+
...a
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
g.displayName = "Field";
|
|
20
|
+
const p = t.forwardRef(({ className: l, ...e }, a) => /* @__PURE__ */ d(
|
|
21
|
+
"fieldset",
|
|
22
|
+
{
|
|
23
|
+
ref: a,
|
|
24
|
+
className: i("field-set", l),
|
|
25
|
+
"data-slot": s(e, "field-set"),
|
|
26
|
+
...e
|
|
27
|
+
}
|
|
28
|
+
));
|
|
29
|
+
p.displayName = "FieldSet";
|
|
30
|
+
const y = t.forwardRef(
|
|
31
|
+
({ className: l, variant: e = "legend", ...a }, r) => /* @__PURE__ */ d(
|
|
32
|
+
"legend",
|
|
33
|
+
{
|
|
34
|
+
ref: r,
|
|
35
|
+
className: i("field-legend", `field-legend--${e}`, l),
|
|
36
|
+
"data-slot": s(a, "field-legend"),
|
|
37
|
+
...a
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
y.displayName = "FieldLegend";
|
|
42
|
+
const R = t.forwardRef(({ className: l, ...e }, a) => /* @__PURE__ */ d(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref: a,
|
|
46
|
+
className: i("field-group", l),
|
|
47
|
+
"data-slot": s(e, "field-group"),
|
|
48
|
+
...e
|
|
49
|
+
}
|
|
50
|
+
));
|
|
51
|
+
R.displayName = "FieldGroup";
|
|
52
|
+
const w = t.forwardRef(({ className: l, ...e }, a) => /* @__PURE__ */ d(
|
|
53
|
+
"label",
|
|
54
|
+
{
|
|
55
|
+
ref: a,
|
|
56
|
+
className: i("field-label", l),
|
|
57
|
+
"data-slot": s(e, "field-label"),
|
|
58
|
+
...e
|
|
59
|
+
}
|
|
60
|
+
));
|
|
61
|
+
w.displayName = "FieldLabel";
|
|
62
|
+
const u = t.forwardRef(({ className: l, ...e }, a) => /* @__PURE__ */ d(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
ref: a,
|
|
66
|
+
className: i("field-content", l),
|
|
67
|
+
"data-slot": s(e, "field-content"),
|
|
68
|
+
...e
|
|
69
|
+
}
|
|
70
|
+
));
|
|
71
|
+
u.displayName = "FieldContent";
|
|
72
|
+
const v = t.forwardRef(({ className: l, ...e }, a) => /* @__PURE__ */ d(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
ref: a,
|
|
76
|
+
className: i("field-title", l),
|
|
77
|
+
"data-slot": s(e, "field-title"),
|
|
78
|
+
...e
|
|
79
|
+
}
|
|
80
|
+
));
|
|
81
|
+
v.displayName = "FieldTitle";
|
|
82
|
+
const b = t.forwardRef(({ className: l, ...e }, a) => /* @__PURE__ */ d(
|
|
83
|
+
"p",
|
|
84
|
+
{
|
|
85
|
+
ref: a,
|
|
86
|
+
className: i("field-description", l),
|
|
87
|
+
"data-slot": s(e, "field-description"),
|
|
88
|
+
...e
|
|
89
|
+
}
|
|
90
|
+
));
|
|
91
|
+
b.displayName = "FieldDescription";
|
|
92
|
+
const L = t.forwardRef(({ className: l, ...e }, a) => /* @__PURE__ */ d(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
ref: a,
|
|
96
|
+
role: "separator",
|
|
97
|
+
className: i("field-separator", l),
|
|
98
|
+
"data-slot": s(e, "field-separator"),
|
|
99
|
+
...e
|
|
100
|
+
}
|
|
101
|
+
));
|
|
102
|
+
L.displayName = "FieldSeparator";
|
|
103
|
+
const S = t.forwardRef(
|
|
104
|
+
({ className: l, children: e, errors: a, issues: r, ...c }, N) => {
|
|
105
|
+
const n = [
|
|
106
|
+
...Array.isArray(a) ? a : a ? [a] : [],
|
|
107
|
+
...r ?? []
|
|
108
|
+
].map((o) => {
|
|
109
|
+
var m;
|
|
110
|
+
return (m = o == null ? void 0 : o.message) == null ? void 0 : m.trim();
|
|
111
|
+
}).filter((o) => !!o), f = n.length;
|
|
112
|
+
return !e && f === 0 ? null : /* @__PURE__ */ F(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
ref: N,
|
|
116
|
+
className: i("field-error", l),
|
|
117
|
+
"data-slot": s(c, "field-error"),
|
|
118
|
+
...c,
|
|
119
|
+
children: [
|
|
120
|
+
e,
|
|
121
|
+
!e && f === 1 ? /* @__PURE__ */ d("span", { children: n[0] }) : null,
|
|
122
|
+
!e && f > 1 ? /* @__PURE__ */ d("ul", { className: "field-error__list", children: n.map((o) => /* @__PURE__ */ d("li", { children: o }, o)) }) : null
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
S.displayName = "FieldError";
|
|
129
|
+
export {
|
|
130
|
+
g as F,
|
|
131
|
+
u as a,
|
|
132
|
+
b,
|
|
133
|
+
S as c,
|
|
134
|
+
R as d,
|
|
135
|
+
w as e,
|
|
136
|
+
y as f,
|
|
137
|
+
L as g,
|
|
138
|
+
p as h,
|
|
139
|
+
v as i,
|
|
140
|
+
E as j
|
|
141
|
+
};
|
package/dist/field.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-tracking:initial}}}.field{min-width:calc(var(--spacing,.25rem)*0);gap:calc(var(--spacing,.25rem)*2);flex-direction:column;display:flex}.field--orientation-vertical{flex-direction:column;align-items:flex-start}.field--orientation-horizontal{align-items:flex-start;gap:calc(var(--spacing,.25rem)*3);flex-direction:row}.field--orientation-responsive{align-items:flex-start;gap:calc(var(--spacing,.25rem)*2);flex-direction:column}.field-set{min-width:calc(var(--spacing,.25rem)*0)}:where(.field-set>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing,.25rem)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing,.25rem)*3)*calc(1 - var(--tw-space-y-reverse)))}.field-set{border-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem)*0);border-width:0}.field-legend{margin:calc(var(--spacing,.25rem)*0);font-family:var(--font-sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-leading:calc(var(--spacing,.25rem)*6);line-height:calc(var(--spacing,.25rem)*6);--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal);color:var(--foreground)}.field-legend--label{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-leading:1.5;line-height:1.5}.field-group{min-width:calc(var(--spacing,.25rem)*0);gap:calc(var(--spacing,.25rem)*4);flex-direction:column;display:flex}.field-label{min-width:calc(var(--spacing,.25rem)*0);align-items:flex-start;gap:calc(var(--spacing,.25rem)*2);font-family:var(--font-sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-leading:1.5;--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal);color:var(--foreground);line-height:1.5;display:inline-flex}.field-content{min-height:1px;min-width:calc(var(--spacing,.25rem)*0);gap:calc(var(--spacing,.25rem)*1);flex-direction:column;flex:1;display:flex}.field-title{font-family:var(--font-sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-leading:1.5;--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal);color:var(--foreground);line-height:1.5}.field-description{margin:calc(var(--spacing,.25rem)*0);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)));--tw-leading:calc(var(--spacing,.25rem)*4);line-height:calc(var(--spacing,.25rem)*4);--tw-tracking:calc(var(--tracking-normal) + .025em);letter-spacing:calc(var(--tracking-normal) + .025em);color:var(--muted-foreground)}.field-separator{background-color:var(--border);justify-content:center;align-items:center;width:100%;height:1px;display:flex}.field-error{margin:calc(var(--spacing,.25rem)*0);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)));--tw-leading:calc(var(--spacing,.25rem)*4);line-height:calc(var(--spacing,.25rem)*4);--tw-tracking:calc(var(--tracking-normal) + .025em);letter-spacing:calc(var(--tracking-normal) + .025em);color:var(--destructive)}.field-error__list{margin:calc(var(--spacing,.25rem)*0);padding-left:calc(var(--spacing,.25rem)*4);list-style-type:disc}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}
|
package/dist/field.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { cn } from './lib/utils';
|
|
2
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FIELD_ORIENTATIONS, } from './components/ui/field';
|
|
3
|
+
export type { FieldErrorProps, FieldLegendProps, FieldLegendVariant, FieldOrientation, FieldProps, } from './components/ui/field';
|
package/dist/field.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { c as s } from "./utils-DLUjLwnh.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { j as l, F as r, a as F, b as o, c as t, d as p, e as n, f as c, g as f, h as m, i as E } from "./field-DRLopwY4.js";
|
|
4
|
+
export {
|
|
5
|
+
l as FIELD_ORIENTATIONS,
|
|
6
|
+
r as Field,
|
|
7
|
+
F as FieldContent,
|
|
8
|
+
o as FieldDescription,
|
|
9
|
+
t as FieldError,
|
|
10
|
+
p as FieldGroup,
|
|
11
|
+
n as FieldLabel,
|
|
12
|
+
c as FieldLegend,
|
|
13
|
+
f as FieldSeparator,
|
|
14
|
+
m as FieldSet,
|
|
15
|
+
E as FieldTitle,
|
|
16
|
+
s as cn
|
|
17
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -34,3 +34,19 @@ export { Breadcrumb, BreadcrumbRoot, BreadcrumbList, BreadcrumbItem, BreadcrumbL
|
|
|
34
34
|
export type { BreadcrumbProps, BreadcrumbItemEntry, BreadcrumbLinkProps, } from './components/ui/breadcrumb';
|
|
35
35
|
export { Button, buttonVariants, BUTTON_VARIANTS, BUTTON_SIZES, BUTTON_COLORS, } from './components/ui/button';
|
|
36
36
|
export type { ButtonProps, ButtonVariant, ButtonSize, ButtonColor } from './components/ui/button';
|
|
37
|
+
export { Textarea, TEXTAREA_RESIZE } from './components/ui/textarea';
|
|
38
|
+
export type { TextareaProps, TextareaResize } from './components/ui/textarea';
|
|
39
|
+
export { Input, INPUT_SIZES } from './components/ui/input';
|
|
40
|
+
export type { InputProps, InputSize } from './components/ui/input';
|
|
41
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FIELD_ORIENTATIONS, } from './components/ui/field';
|
|
42
|
+
export type { FieldErrorProps, FieldLegendProps, FieldLegendVariant, FieldOrientation, FieldProps, } from './components/ui/field';
|
|
43
|
+
export { KuatSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SELECT_LINES, SELECT_SIZES, } from './components/ui/select';
|
|
44
|
+
export type { KuatSelectProps, SelectContentProps, SelectItemGroup, SelectItemOption, SelectItemProps, SelectItems, SelectLabelProps, SelectLines, SelectProps, SelectSeparatorProps, SelectSize, SelectTriggerProps, SelectValueProps, } from './components/ui/select';
|
|
45
|
+
export { Checkbox, CheckboxField, CHECKBOX_FIELD_APPEARANCES, CHECKBOX_FIELD_LAYOUTS, } from './components/ui/checkbox';
|
|
46
|
+
export type { CheckboxProps, CheckboxFieldAppearance, CheckboxFieldLayout, CheckboxFieldProps, } from './components/ui/checkbox';
|
|
47
|
+
export { RadioGroup, RadioGroupItem, RadioField, RADIO_FIELD_APPEARANCES, RADIO_FIELD_LAYOUTS, } from './components/ui/radio';
|
|
48
|
+
export type { RadioGroupProps, RadioGroupItemProps, RadioFieldAppearance, RadioFieldLayout, RadioFieldProps, } from './components/ui/radio';
|
|
49
|
+
export { Switch, SwitchField, SWITCH_FIELD_APPEARANCES, SWITCH_FIELD_LAYOUTS, } from './components/ui/switch';
|
|
50
|
+
export type { SwitchProps, SwitchFieldAppearance, SwitchFieldLayout, SwitchFieldProps, } from './components/ui/switch';
|
|
51
|
+
export { Toggle, ToggleGroup, ToggleGroupItem, TOGGLE_SIZES, TOGGLE_SKINS, } from './components/ui/toggle';
|
|
52
|
+
export type { ToggleProps, ToggleGroupProps, ToggleGroupItemProps, ToggleSize, ToggleSkin, } from './components/ui/toggle';
|