laif-ds 0.2.68 → 0.2.70

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,35 +1,36 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as r } from "react/jsx-runtime";
3
- import { designTokens as t } from "../design-tokens.js";
4
- import { Label as m } from "./label.js";
5
- import { cn as s } from "../../lib/utils.js";
6
- function b({
2
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
3
+ import { designTokens as e } from "../design-tokens.js";
4
+ import { Label as x } from "./label.js";
5
+ import { cn as a } from "../../lib/utils.js";
6
+ function h({
7
7
  wrpClassName: o,
8
- className: a,
9
- label: e,
8
+ className: s,
9
+ label: t,
10
10
  labelClassName: n,
11
11
  id: d,
12
12
  ...l
13
13
  }) {
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 }),
14
+ const i = d || (t ? `textarea-${Math.random().toString(36).substring(2, 9)}` : void 0);
15
+ return /* @__PURE__ */ m("div", { className: a("space-y-1.5", o), children: [
16
+ t && /* @__PURE__ */ r(x, { htmlFor: i, className: n, children: t }),
17
17
  /* @__PURE__ */ r(
18
18
  "textarea",
19
19
  {
20
20
  id: i,
21
21
  "data-slot": "textarea",
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",
22
+ className: a(
23
+ e.input.base,
24
+ e.radius.default,
25
+ e.text.base,
26
+ e.text.placeholder,
27
+ e.interaction.disabled,
28
+ "flex min-h-16 w-full min-w-0 max-w-full px-3 py-2 shadow-xs transition-[color,box-shadow] outline-none md:text-sm",
29
+ "whitespace-pre-wrap break-words overflow-x-hidden",
29
30
  // Focus states
30
31
  "focus-visible:ring-d-ring/50 focus-visible:border-d-ring focus-visible:ring-[3px]",
31
- t.input.invalid,
32
- a
32
+ e.input.invalid,
33
+ s
33
34
  ),
34
35
  ...l
35
36
  }
@@ -37,5 +38,5 @@ function b({
37
38
  ] });
38
39
  }
39
40
  export {
40
- b as Textarea
41
+ h as Textarea
41
42
  };
@@ -1,26 +1,71 @@
1
1
  "use client";
2
- import { jsx as r } from "react/jsx-runtime";
3
- import { useTheme as s } from "../../node_modules/next-themes/dist/index.js";
4
- import { Toaster as e } from "../../node_modules/sonner/dist/index.js";
5
- const g = ({ ...o }) => {
6
- const { theme: t = "system" } = s();
7
- return /* @__PURE__ */ r(
8
- e,
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import { useTheme as u } from "../../node_modules/next-themes/dist/index.js";
4
+ import { Toaster as n } from "../../node_modules/sonner/dist/index.js";
5
+ import { toast as w } from "../../node_modules/sonner/dist/index.js";
6
+ import { Icon as o } from "./icon.js";
7
+ import { Spinner as l } from "./spinner.js";
8
+ import { cn as e } from "../../lib/utils.js";
9
+ const x = ({ toastOptions: r, icons: t, theme: c, ...s }) => {
10
+ const { theme: d = "system" } = u();
11
+ return /* @__PURE__ */ a(
12
+ n,
9
13
  {
10
- theme: t,
11
- className: "toaster group",
14
+ theme: c ?? d,
15
+ className: e("group/toaster", s.className),
12
16
  toastOptions: {
17
+ ...r,
13
18
  classNames: {
14
- toast: "group toast group-[.toaster]:bg-d-background group-[.toaster]:text-d-foreground group-[.toaster]:border-d-border group-[.toaster]:shadow-lg",
15
- description: "group-[.toast]:text-d-secondary-foreground",
16
- actionButton: "group-[.toast]:bg-d-primary group-[.toast]:text-d-primary-foreground",
17
- cancelButton: "group-[.toast]:bg-d-secondary group-[.toast]:text-d-secondary-foreground"
19
+ closeButton: e(
20
+ "!bg-d-background !text-d-foreground !border-d-border",
21
+ r?.classNames?.closeButton
22
+ ),
23
+ toast: e(
24
+ "group/toast !bg-d-background/85 backdrop-blur-md !text-d-foreground !border-d-border !shadow-lg",
25
+ r?.classNames?.toast
26
+ ),
27
+ description: e(
28
+ "!text-d-muted-foreground group-data-[rich-colors=true]/toast:group-data-[type=error]/toast:!text-d-destructive-foreground group-data-[rich-colors=true]/toast:group-data-[type=warning]/toast:!text-d-warning-foreground group-data-[rich-colors=true]/toast:group-data-[type=info]/toast:!text-d-muted-foreground group-data-[rich-colors=true]/toast:group-data-[type=success]/toast:!text-d-success-foreground",
29
+ r?.classNames?.description
30
+ ),
31
+ actionButton: e(
32
+ "bg-d-primary text-d-primary-foreground",
33
+ r?.classNames?.actionButton
34
+ ),
35
+ cancelButton: e(
36
+ "bg-d-secondary text-d-secondary-foreground",
37
+ r?.classNames?.cancelButton
38
+ ),
39
+ error: e(
40
+ "data-[rich-colors=true]:!bg-d-destructive/85 data-[rich-colors=true]:!text-d-destructive-foreground data-[rich-colors=true]:!border-d-destructive data-[rich-colors=false]:!text-d-destructive",
41
+ r?.classNames?.error
42
+ ),
43
+ warning: e(
44
+ "data-[rich-colors=true]:!bg-d-warning-background/85 data-[rich-colors=true]:!text-d-warning-foreground data-[rich-colors=true]:!border-d-warning data-[rich-colors=false]:!text-d-warning",
45
+ r?.classNames?.warning
46
+ ),
47
+ success: e(
48
+ "data-[rich-colors=true]:!bg-d-success-background/85 data-[rich-colors=true]:!text-d-success-foreground data-[rich-colors=true]:!border-d-success data-[rich-colors=false]:!text-d-success",
49
+ r?.classNames?.success
50
+ ),
51
+ loader: e("", r?.classNames?.loader),
52
+ icon: e("!size-5 !mx-0", r?.classNames?.icon),
53
+ ...r?.classNames
18
54
  }
19
55
  },
20
- ...o
56
+ icons: {
57
+ success: /* @__PURE__ */ a(o, { name: "Check", className: "size-5" }),
58
+ info: /* @__PURE__ */ a(o, { name: "Info", className: "size-5" }),
59
+ warning: /* @__PURE__ */ a(o, { name: "TriangleAlert", className: "size-5" }),
60
+ error: /* @__PURE__ */ a(o, { name: "OctagonAlert", className: "size-5" }),
61
+ loading: /* @__PURE__ */ a(l, { className: "size-5" }),
62
+ ...t
63
+ },
64
+ ...s
21
65
  }
22
66
  );
23
67
  };
24
68
  export {
25
- g as Toaster
69
+ x as Toaster,
70
+ w as toast
26
71
  };
package/dist/index.d.ts CHANGED
@@ -54,6 +54,7 @@ import * as SliderPrimitive from '@radix-ui/react-slider';
54
54
  import { Slot } from '@radix-ui/react-slot';
55
55
  import * as SwitchPrimitive from '@radix-ui/react-switch';
56
56
  import * as TabsPrimitive from '@radix-ui/react-tabs';
57
+ import { toast } from 'sonner';
57
58
  import { Toaster as Toaster_2 } from 'sonner';
58
59
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
59
60
  import * as TogglePrimitive from '@radix-ui/react-toggle';
@@ -263,6 +264,7 @@ export declare function AppKanban<T = any>({ columns, initialTasks, onTaskMove,
263
264
  export declare type AppKanbanColumn = {
264
265
  id: string;
265
266
  label: string;
267
+ disabled?: boolean;
266
268
  };
267
269
 
268
270
  export declare type AppKanbanConfig<T = any> = {
@@ -2731,9 +2733,11 @@ declare type ThemeSwitcherProps = {
2731
2733
  className?: string;
2732
2734
  };
2733
2735
 
2734
- export declare const Toaster: ({ ...props }: ToasterProps) => JSX.Element;
2736
+ export { toast }
2737
+
2738
+ export declare const Toaster: ({ toastOptions, icons, theme, ...props }: ToasterProps) => JSX.Element;
2735
2739
 
2736
- declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;
2740
+ export declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;
2737
2741
 
2738
2742
  export declare function Toggle({ className, variant, size, ...props }: React_2.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): JSX.Element;
2739
2743