laif-ds 0.2.49 → 0.2.50
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/components/kanban.js +21 -20
- package/dist/components/ui/app-kanban.js +89 -95
- package/dist/components/ui/app-radio-group.js +62 -48
- package/dist/components/ui/app-select.js +93 -90
- package/dist/components/ui/async-select.js +134 -126
- package/dist/components/ui/badge.js +38 -31
- package/dist/components/ui/button.js +49 -40
- package/dist/components/ui/card.js +36 -28
- package/dist/components/ui/checkbox.js +23 -20
- package/dist/components/ui/date-picker.js +64 -59
- package/dist/components/ui/dialog.js +54 -42
- package/dist/components/ui/input.js +116 -111
- package/dist/components/ui/popover.js +15 -13
- package/dist/components/ui/radio-group.js +29 -27
- package/dist/components/ui/select.js +74 -67
- package/dist/components/ui/sheet.js +39 -28
- package/dist/components/ui/slider.js +34 -28
- package/dist/components/ui/switch.js +16 -13
- package/dist/components/ui/tabs.js +35 -26
- package/dist/components/ui/textarea.js +26 -17
- package/dist/index.d.ts +2 -2
- package/dist/lib/design-tokens.js +43 -0
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,68 +1,77 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
-
import { Root as o, Content as
|
|
3
|
+
import { Root as o, Content as r, List as i, Trigger as c } from "../../node_modules/@radix-ui/react-tabs/dist/index.js";
|
|
4
|
+
import { designTokens as a } from "../../lib/design-tokens.js";
|
|
4
5
|
import { cn as n } from "../../lib/utils.js";
|
|
5
6
|
function u({
|
|
6
|
-
className:
|
|
7
|
-
...
|
|
7
|
+
className: t,
|
|
8
|
+
...e
|
|
8
9
|
}) {
|
|
9
10
|
return /* @__PURE__ */ s(
|
|
10
11
|
o,
|
|
11
12
|
{
|
|
12
13
|
"data-slot": "tabs",
|
|
13
|
-
className: n("flex flex-col gap-2",
|
|
14
|
-
...
|
|
14
|
+
className: n("flex flex-col gap-2", t),
|
|
15
|
+
...e
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
className:
|
|
20
|
-
...
|
|
19
|
+
function p({
|
|
20
|
+
className: t,
|
|
21
|
+
...e
|
|
21
22
|
}) {
|
|
22
23
|
return /* @__PURE__ */ s(
|
|
23
|
-
|
|
24
|
+
i,
|
|
24
25
|
{
|
|
25
26
|
"data-slot": "tabs-list",
|
|
26
27
|
className: n(
|
|
27
|
-
"bg-d-secondary text-d-secondary-foreground inline-flex h-9 w-fit items-center justify-center
|
|
28
|
-
|
|
28
|
+
"bg-d-secondary text-d-secondary-foreground inline-flex h-9 w-fit items-center justify-center p-[3px]",
|
|
29
|
+
a.radius.lg,
|
|
30
|
+
t
|
|
29
31
|
),
|
|
30
|
-
...
|
|
32
|
+
...e
|
|
31
33
|
}
|
|
32
34
|
);
|
|
33
35
|
}
|
|
34
36
|
function b({
|
|
35
|
-
className:
|
|
36
|
-
...
|
|
37
|
+
className: t,
|
|
38
|
+
...e
|
|
37
39
|
}) {
|
|
38
40
|
return /* @__PURE__ */ s(
|
|
39
|
-
|
|
41
|
+
c,
|
|
40
42
|
{
|
|
41
43
|
"data-slot": "tabs-trigger",
|
|
42
44
|
className: n(
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
+
"inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 border-transparent px-2 py-1 whitespace-nowrap transition-[color,box-shadow]",
|
|
46
|
+
a.text.base,
|
|
47
|
+
a.radius.default,
|
|
48
|
+
a.focusRing,
|
|
49
|
+
a.interaction.disabled,
|
|
50
|
+
// Active state
|
|
51
|
+
"data-[state=active]:bg-d-background data-[state=active]:text-d-foreground data-[state=active]:shadow-sm",
|
|
52
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
53
|
+
t
|
|
45
54
|
),
|
|
46
|
-
...
|
|
55
|
+
...e
|
|
47
56
|
}
|
|
48
57
|
);
|
|
49
58
|
}
|
|
50
|
-
function
|
|
51
|
-
className:
|
|
52
|
-
...
|
|
59
|
+
function m({
|
|
60
|
+
className: t,
|
|
61
|
+
...e
|
|
53
62
|
}) {
|
|
54
63
|
return /* @__PURE__ */ s(
|
|
55
|
-
|
|
64
|
+
r,
|
|
56
65
|
{
|
|
57
66
|
"data-slot": "tabs-content",
|
|
58
|
-
className: n("flex-1 outline-none",
|
|
59
|
-
...
|
|
67
|
+
className: n("flex-1 outline-none", t),
|
|
68
|
+
...e
|
|
60
69
|
}
|
|
61
70
|
);
|
|
62
71
|
}
|
|
63
72
|
export {
|
|
64
73
|
u as Tabs,
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
m as TabsContent,
|
|
75
|
+
p as TabsList,
|
|
67
76
|
b as TabsTrigger
|
|
68
77
|
};
|
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Label as
|
|
4
|
-
import {
|
|
2
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { Label as m } from "./label.js";
|
|
4
|
+
import { designTokens as t } from "../../lib/design-tokens.js";
|
|
5
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
6
|
function b({
|
|
6
|
-
wrpClassName:
|
|
7
|
-
className:
|
|
7
|
+
wrpClassName: o,
|
|
8
|
+
className: a,
|
|
8
9
|
label: e,
|
|
9
|
-
labelClassName:
|
|
10
|
-
id:
|
|
11
|
-
...
|
|
10
|
+
labelClassName: n,
|
|
11
|
+
id: d,
|
|
12
|
+
...l
|
|
12
13
|
}) {
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
e && /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
14
|
+
const i = d || (e ? `textarea-${Math.random().toString(36).substring(2, 9)}` : void 0);
|
|
15
|
+
return /* @__PURE__ */ c("div", { className: s("space-y-1.5", o), children: [
|
|
16
|
+
e && /* @__PURE__ */ r(m, { htmlFor: i, className: n, children: e }),
|
|
17
|
+
/* @__PURE__ */ r(
|
|
17
18
|
"textarea",
|
|
18
19
|
{
|
|
19
|
-
id:
|
|
20
|
+
id: i,
|
|
20
21
|
"data-slot": "textarea",
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
className: s(
|
|
23
|
+
t.input.base,
|
|
24
|
+
t.radius.default,
|
|
25
|
+
t.text.base,
|
|
26
|
+
t.text.placeholder,
|
|
27
|
+
t.interaction.disabled,
|
|
28
|
+
"flex field-sizing-content min-h-16 w-full px-3 py-2 shadow-xs transition-[color,box-shadow] outline-none md:text-sm",
|
|
29
|
+
// Focus states
|
|
30
|
+
"focus-visible:ring-d-ring/50 focus-visible:border-d-ring focus-visible:ring-[3px]",
|
|
31
|
+
t.input.invalid,
|
|
32
|
+
a
|
|
24
33
|
),
|
|
25
|
-
...
|
|
34
|
+
...l
|
|
26
35
|
}
|
|
27
36
|
)
|
|
28
37
|
] });
|
package/dist/index.d.ts
CHANGED
|
@@ -184,7 +184,7 @@ declare interface AppFormProps {
|
|
|
184
184
|
showSubmitButton?: boolean;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
export declare function AppKanban<T = any>({ columns, initialTasks, onTaskMove, onTaskEdit, onTaskCreate, taskActions, renderTaskContent, className, allowTaskCreate,
|
|
187
|
+
export declare function AppKanban<T = any>({ columns, initialTasks, onTaskMove, onTaskEdit, onTaskCreate, taskActions, renderTaskContent, className, allowTaskCreate, }: AppKanbanConfig<T>): JSX.Element;
|
|
188
188
|
|
|
189
189
|
export declare type AppKanbanColumn = {
|
|
190
190
|
id: string;
|
|
@@ -1421,7 +1421,7 @@ export declare interface DataTableState {
|
|
|
1421
1421
|
computedSorting?: DataTableSorting;
|
|
1422
1422
|
}
|
|
1423
1423
|
|
|
1424
|
-
export declare function DatePicker({ value, onChange, placeholder, dateFormat, className,
|
|
1424
|
+
export declare function DatePicker({ value, onChange, placeholder, dateFormat, className, disabled, size, firstDate, lastDate, availableDates, locale, initialCalendarMonth, customCalendarProps, }: DatePickerProps): JSX.Element;
|
|
1425
1425
|
|
|
1426
1426
|
export declare interface DatePickerProps {
|
|
1427
1427
|
value?: Date;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = {
|
|
3
|
+
// Interaction states
|
|
4
|
+
focusRing: "focus-visible:ring-d-ring/50 focus-visible:ring-[3px] focus-visible:border-d-ring outline-none transition-all duration-200",
|
|
5
|
+
// Base shapes
|
|
6
|
+
radius: {
|
|
7
|
+
default: "rounded-md",
|
|
8
|
+
sm: "rounded-sm",
|
|
9
|
+
lg: "rounded-lg",
|
|
10
|
+
full: "rounded-full"
|
|
11
|
+
},
|
|
12
|
+
// Input & Button heights/paddings
|
|
13
|
+
sizes: {
|
|
14
|
+
default: "h-9 px-3 py-2",
|
|
15
|
+
sm: "h-8 px-2.5 py-1.5 text-xs",
|
|
16
|
+
lg: "h-10 px-4 py-2 text-base",
|
|
17
|
+
icon: {
|
|
18
|
+
default: "size-9"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
// Text styles for inputs/buttons
|
|
22
|
+
text: {
|
|
23
|
+
base: "text-sm font-medium whitespace-nowrap",
|
|
24
|
+
placeholder: "placeholder:text-d-muted-foreground"
|
|
25
|
+
},
|
|
26
|
+
// Common interactive behaviors
|
|
27
|
+
interaction: {
|
|
28
|
+
active: "active:scale-[0.98] active:shadow-sm transform-gpu",
|
|
29
|
+
disabled: "disabled:cursor-not-allowed disabled:opacity-50"
|
|
30
|
+
},
|
|
31
|
+
// Input specific
|
|
32
|
+
input: {
|
|
33
|
+
base: "flex w-full border border-d-border/50 bg-d-input transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
34
|
+
invalid: "aria-invalid:ring-d-destructive/20 aria-invalid:border-d-destructive"
|
|
35
|
+
},
|
|
36
|
+
// Badge specific
|
|
37
|
+
badge: {
|
|
38
|
+
base: "inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 gap-1"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
e as designTokens
|
|
43
|
+
};
|