laif-ds 0.2.48 → 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.
@@ -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 i, List as r, Trigger as a } from "../../node_modules/@radix-ui/react-tabs/dist/index.js";
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: e,
7
- ...t
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", e),
14
- ...t
14
+ className: n("flex flex-col gap-2", t),
15
+ ...e
15
16
  }
16
17
  );
17
18
  }
18
- function f({
19
- className: e,
20
- ...t
19
+ function p({
20
+ className: t,
21
+ ...e
21
22
  }) {
22
23
  return /* @__PURE__ */ s(
23
- r,
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 rounded-lg p-[3px]",
28
- e
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
- ...t
32
+ ...e
31
33
  }
32
34
  );
33
35
  }
34
36
  function b({
35
- className: e,
36
- ...t
37
+ className: t,
38
+ ...e
37
39
  }) {
38
40
  return /* @__PURE__ */ s(
39
- a,
41
+ c,
40
42
  {
41
43
  "data-slot": "tabs-trigger",
42
44
  className: n(
43
- "data-[state=active]:bg-d-background focus-visible:border-d-ring focus-visible:ring-d-ring/50 focus-visible:outline-d-ring text-d-foreground d-border inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
44
- e
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
- ...t
55
+ ...e
47
56
  }
48
57
  );
49
58
  }
50
- function g({
51
- className: e,
52
- ...t
59
+ function m({
60
+ className: t,
61
+ ...e
53
62
  }) {
54
63
  return /* @__PURE__ */ s(
55
- i,
64
+ r,
56
65
  {
57
66
  "data-slot": "tabs-content",
58
- className: n("flex-1 outline-none", e),
59
- ...t
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
- g as TabsContent,
66
- f as TabsList,
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 l, jsx as t } from "react/jsx-runtime";
3
- import { Label as c } from "./label.js";
4
- import { cn as d } from "../../lib/utils.js";
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: i,
7
- className: o,
7
+ wrpClassName: o,
8
+ className: a,
8
9
  label: e,
9
- labelClassName: a,
10
- id: s,
11
- ...n
10
+ labelClassName: n,
11
+ id: d,
12
+ ...l
12
13
  }) {
13
- const r = s || (e ? `textarea-${Math.random().toString(36).substring(2, 9)}` : void 0);
14
- return /* @__PURE__ */ l("div", { className: d("space-y-1.5", i), children: [
15
- e && /* @__PURE__ */ t(c, { htmlFor: r, className: a, children: e }),
16
- /* @__PURE__ */ t(
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: r,
20
+ id: i,
20
21
  "data-slot": "textarea",
21
- className: d(
22
- "border-d-border/50 placeholder:text-d-muted-foreground focus-visible:border-d-ring focus-visible:ring-d-ring/50 aria-invalid:ring-d-destructive/20 aria-invalid:border-d-destructive bg-d-input flex field-sizing-content min-h-16 w-full rounded-md border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
23
- o
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
- ...n
34
+ ...l
26
35
  }
27
36
  )
28
37
  ] });
package/dist/index.d.ts CHANGED
@@ -201,6 +201,7 @@ export declare type AppKanbanConfig<T = any> = {
201
201
  renderTaskContent?: (task: AppKanbanTask<T>, columnId: string) => ReactNode;
202
202
  className?: string;
203
203
  allowTaskCreate?: boolean;
204
+ createTaskLabel?: string;
204
205
  };
205
206
 
206
207
  export declare type AppKanbanTask<T = any> = {
@@ -209,6 +210,8 @@ export declare type AppKanbanTask<T = any> = {
209
210
  description?: string;
210
211
  data?: T;
211
212
  meta?: KanbanBoardCardMetaItem[];
213
+ icon?: IconName;
214
+ createTaskLabel?: string;
212
215
  };
213
216
 
214
217
  /**
@@ -1418,7 +1421,7 @@ export declare interface DataTableState {
1418
1421
  computedSorting?: DataTableSorting;
1419
1422
  }
1420
1423
 
1421
- export declare function DatePicker({ value, onChange, placeholder, dateFormat, className, buttonVariant, disabled, size, firstDate, lastDate, availableDates, locale, initialCalendarMonth, customCalendarProps, }: DatePickerProps): JSX.Element;
1424
+ export declare function DatePicker({ value, onChange, placeholder, dateFormat, className, disabled, size, firstDate, lastDate, availableDates, locale, initialCalendarMonth, customCalendarProps, }: DatePickerProps): JSX.Element;
1422
1425
 
1423
1426
  export declare interface DatePickerProps {
1424
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
+ };