laif-ds 0.1.97 → 0.1.99

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,34 +1,34 @@
1
1
  "use client";
2
2
  import { jsx as a, jsxs as n } from "react/jsx-runtime";
3
- import { Root as l, Trigger as d, Content as c, Close as s, Title as g, Description as f, Portal as u, Overlay as m } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
3
+ import { Root as c, Trigger as g, Content as f, Close as l, Title as u, Description as m, Portal as p, Overlay as x } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
4
4
  import { cn as o } from "../../lib/utils.js";
5
- import p from "../../node_modules/lucide-react/dist/esm/icons/x.js";
6
- function w({
5
+ import D from "../../node_modules/lucide-react/dist/esm/icons/x.js";
6
+ function C({
7
7
  ...t
8
8
  }) {
9
- return /* @__PURE__ */ a(l, { "data-slot": "dialog", ...t });
9
+ return /* @__PURE__ */ a(c, { "data-slot": "dialog", ...t });
10
10
  }
11
- function z({
11
+ function k({
12
12
  ...t
13
13
  }) {
14
- return /* @__PURE__ */ a(d, { "data-slot": "dialog-trigger", ...t });
14
+ return /* @__PURE__ */ a(g, { "data-slot": "dialog-trigger", ...t });
15
15
  }
16
- function x({
16
+ function v({
17
17
  ...t
18
18
  }) {
19
- return /* @__PURE__ */ a(u, { "data-slot": "dialog-portal", ...t });
19
+ return /* @__PURE__ */ a(p, { "data-slot": "dialog-portal", ...t });
20
20
  }
21
- function C({
21
+ function T({
22
22
  ...t
23
23
  }) {
24
- return /* @__PURE__ */ a(s, { "data-slot": "dialog-close", ...t });
24
+ return /* @__PURE__ */ a(l, { "data-slot": "dialog-close", ...t });
25
25
  }
26
- function D({
26
+ function b({
27
27
  className: t,
28
28
  ...e
29
29
  }) {
30
30
  return /* @__PURE__ */ a(
31
- m,
31
+ x,
32
32
  {
33
33
  "data-slot": "dialog-overlay",
34
34
  className: o(
@@ -39,29 +39,37 @@ function D({
39
39
  }
40
40
  );
41
41
  }
42
- function k({
42
+ function j({
43
43
  className: t,
44
44
  children: e,
45
+ size: r = "default",
45
46
  ...i
46
47
  }) {
47
- return /* @__PURE__ */ n(x, { "data-slot": "dialog-portal", children: [
48
- /* @__PURE__ */ a(D, {}),
48
+ const d = {
49
+ sm: "sm:max-w-sm",
50
+ default: "sm:max-w-lg",
51
+ lg: "sm:max-w-2xl",
52
+ xl: "sm:max-w-3xl"
53
+ }[r];
54
+ return /* @__PURE__ */ n(v, { "data-slot": "dialog-portal", children: [
55
+ /* @__PURE__ */ a(b, {}),
49
56
  /* @__PURE__ */ n(
50
- c,
57
+ f,
51
58
  {
52
59
  "data-slot": "dialog-content",
53
- onPointerDownOutside: (r) => {
54
- r.target?.closest("[data-command-portal]") && r.preventDefault();
60
+ onPointerDownOutside: (s) => {
61
+ s.target?.closest("[data-command-portal]") && s.preventDefault();
55
62
  },
56
63
  className: o(
57
- "bg-d-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-d-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
64
+ "bg-d-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-d-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",
65
+ d,
58
66
  t
59
67
  ),
60
68
  ...i,
61
69
  children: [
62
70
  e,
63
- /* @__PURE__ */ n(s, { className: "ring-offset-d-background focus:ring-d-ring data-[state=open]:bg-d-accent data-[state=open]:text-d-secondary-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
64
- /* @__PURE__ */ a(p, {}),
71
+ /* @__PURE__ */ n(l, { className: "ring-offset-d-background focus:ring-d-ring data-[state=open]:bg-d-accent data-[state=open]:text-d-secondary-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
72
+ /* @__PURE__ */ a(D, {}),
65
73
  /* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
66
74
  ] })
67
75
  ]
@@ -69,7 +77,7 @@ function k({
69
77
  )
70
78
  ] });
71
79
  }
72
- function T({ className: t, ...e }) {
80
+ function O({ className: t, ...e }) {
73
81
  return /* @__PURE__ */ a(
74
82
  "div",
75
83
  {
@@ -79,7 +87,7 @@ function T({ className: t, ...e }) {
79
87
  }
80
88
  );
81
89
  }
82
- function j({ className: t, ...e }) {
90
+ function P({ className: t, ...e }) {
83
91
  return /* @__PURE__ */ a(
84
92
  "div",
85
93
  {
@@ -92,12 +100,12 @@ function j({ className: t, ...e }) {
92
100
  }
93
101
  );
94
102
  }
95
- function O({
103
+ function _({
96
104
  className: t,
97
105
  ...e
98
106
  }) {
99
107
  return /* @__PURE__ */ a(
100
- g,
108
+ u,
101
109
  {
102
110
  "data-slot": "dialog-title",
103
111
  className: o("text-lg leading-none font-semibold", t),
@@ -105,12 +113,12 @@ function O({
105
113
  }
106
114
  );
107
115
  }
108
- function P({
116
+ function F({
109
117
  className: t,
110
118
  ...e
111
119
  }) {
112
120
  return /* @__PURE__ */ a(
113
- f,
121
+ m,
114
122
  {
115
123
  "data-slot": "dialog-description",
116
124
  className: o("text-d-secondary-foreground text-sm", t),
@@ -119,14 +127,14 @@ function P({
119
127
  );
120
128
  }
121
129
  export {
122
- w as Dialog,
123
- C as DialogClose,
124
- k as DialogContent,
125
- P as DialogDescription,
126
- j as DialogFooter,
127
- T as DialogHeader,
128
- D as DialogOverlay,
129
- x as DialogPortal,
130
- O as DialogTitle,
131
- z as DialogTrigger
130
+ C as Dialog,
131
+ T as DialogClose,
132
+ j as DialogContent,
133
+ F as DialogDescription,
134
+ P as DialogFooter,
135
+ O as DialogHeader,
136
+ b as DialogOverlay,
137
+ v as DialogPortal,
138
+ _ as DialogTitle,
139
+ k as DialogTrigger
132
140
  };
package/dist/index.d.ts CHANGED
@@ -189,9 +189,34 @@ export declare function AspectRatio({ ...props }: AspectRatioProps): JSX.Element
189
189
 
190
190
  declare type AspectRatioProps = React.ComponentProps<typeof AspectRatioPrimitive.Root>;
191
191
 
192
- export declare function AsyncSelect<T>({ fetcher, preload, filterFn, renderOption, getOptionValue, getDisplayValue, notFound, loadingSkeleton, label, labelClassName, placeholder, value, onChange, disabled, width, triggerClassName, noResultsMessage, clearable, size, }: AsyncSelectProps<T>): JSX.Element;
192
+ export declare function AsyncSelect<T>({ fetcher, preload, filterFn, renderOption, getOptionValue, getDisplayValue, notFound, loadingSkeleton, label, labelClassName, placeholder, value, onChange, disabled, width, triggerClassName, noResultsMessage, clearable, multiple, size, }: AsyncSelectProps<T>): JSX.Element;
193
193
 
194
- declare interface AsyncSelectProps<T> extends VariantProps<typeof selectTriggerVariants> {
194
+ declare interface AsyncSelectMultipleProps<T> extends VariantProps<typeof selectTriggerVariants> {
195
+ multiple: true;
196
+ fetcher: (query?: string) => Promise<T[]>;
197
+ preload?: boolean;
198
+ filterFn?: (option: T, query: string) => boolean;
199
+ renderOption: (option: T) => React_2.ReactNode;
200
+ getOptionValue: (option: T) => string;
201
+ getDisplayValue: (option: T) => React_2.ReactNode;
202
+ notFound?: React_2.ReactNode;
203
+ loadingSkeleton?: React_2.ReactNode;
204
+ value?: string[];
205
+ onChange?: (value: string[]) => void;
206
+ label?: string | React_2.ReactNode;
207
+ labelClassName?: string;
208
+ placeholder?: string;
209
+ disabled?: boolean;
210
+ width?: string | number | "auto";
211
+ triggerClassName?: string;
212
+ noResultsMessage?: string;
213
+ clearable?: boolean;
214
+ }
215
+
216
+ declare type AsyncSelectProps<T> = AsyncSelectSingleProps<T> | AsyncSelectMultipleProps<T>;
217
+
218
+ declare interface AsyncSelectSingleProps<T> extends VariantProps<typeof selectTriggerVariants> {
219
+ multiple?: false;
195
220
  fetcher: (query?: string) => Promise<T[]>;
196
221
  preload?: boolean;
197
222
  filterFn?: (option: T, query: string) => boolean;
@@ -766,7 +791,9 @@ declare interface DatePickerProps {
766
791
 
767
792
  export declare function Dialog({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
768
793
 
769
- export declare function DialogContent({ className, children, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content>): JSX.Element;
794
+ export declare function DialogContent({ className, children, size, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
795
+ size?: "sm" | "default" | "lg";
796
+ }): JSX.Element;
770
797
 
771
798
  export declare function DialogDescription({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Description>): JSX.Element;
772
799
 
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import e from "../../_virtual/index5.js";
2
+ import e from "../../_virtual/index3.js";
3
3
  export {
4
4
  e as EventEmitter,
5
5
  e as default
@@ -3,7 +3,7 @@ import { stringify as w } from "../../comma-separated-tokens/index.js";
3
3
  import { ok as u } from "../../devlop/lib/default.js";
4
4
  import { svg as m, html as C } from "../../property-information/index.js";
5
5
  import { stringify as N } from "../../space-separated-tokens/index.js";
6
- import S from "../../../_virtual/index3.js";
6
+ import S from "../../../_virtual/index4.js";
7
7
  import { whitespace as j } from "../../hast-util-whitespace/lib/index.js";
8
8
  import { name as x } from "../../estree-util-is-identifier-name/lib/index.js";
9
9
  import { VFileMessage as h } from "../../vfile-message/lib/index.js";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import e from "../../../../_virtual/index5.js";
2
+ import e from "../../../../_virtual/index3.js";
3
3
  var r = new e(), n = "recharts.syncEvent.tooltip";
4
4
  export {
5
5
  n as TOOLTIP_SYNC_EVENT,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { bail as P } from "../../bail/index.js";
3
- import y from "../../../_virtual/index4.js";
3
+ import y from "../../../_virtual/index5.js";
4
4
  import z from "../../is-plain-obj/index.js";
5
5
  import { CallableInstance as C } from "./callable-instance.js";
6
6
  import { trough as A } from "../../trough/lib/index.js";