@oneplatformdev/ui 0.1.99-beta.4 → 0.1.99-beta.40
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/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.d.ts.map +1 -1
- package/Accordion/Accordion.js +48 -26
- package/Accordion/Accordion.js.map +1 -1
- package/Badge/badgeVariants.d.ts +1 -1
- package/Button/Button.d.ts +6 -6
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.js +44 -42
- package/Button/Button.js.map +1 -1
- package/Button/Button.stories.js +45 -53
- package/Button/Button.stories.js.map +1 -1
- package/Button/Button.types.d.ts +24 -1
- package/Button/Button.types.d.ts.map +1 -1
- package/Button/ButtonCounterBadge.d.ts +7 -0
- package/Button/ButtonCounterBadge.d.ts.map +1 -0
- package/Button/ButtonCounterBadge.js +20 -0
- package/Button/ButtonCounterBadge.js.map +1 -0
- package/Button/buttonVariants.d.ts +11 -20
- package/Button/buttonVariants.d.ts.map +1 -1
- package/Button/buttonVariants.js +76 -12
- package/Button/buttonVariants.js.map +1 -1
- package/Button/index.js +6 -5
- package/ButtonIcon/ButtonIcon.d.ts +30 -19
- package/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/ButtonIcon/ButtonIcon.js +70 -46
- package/ButtonIcon/ButtonIcon.js.map +1 -1
- package/ButtonIcon/ButtonIcon.stories.js +121 -78
- package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
- package/ButtonIcon/ButtonIcon.types.d.ts +2 -1
- package/ButtonIcon/ButtonIcon.types.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.js +7 -6
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +466 -0
- package/Combobox/Combobox.d.ts.map +1 -1
- package/Combobox/Combobox.js +25 -26
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js +192 -0
- package/Combobox/Combobox.stories.js.map +1 -0
- package/Combobox/ComboboxOptions.d.ts.map +1 -1
- package/Combobox/ComboboxOptions.js +42 -42
- package/Combobox/ComboboxOptions.js.map +1 -1
- package/Dialog/Dialog.js +13 -13
- package/Dialog/Dialog.js.map +1 -1
- package/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/DropdownMenu/DropdownMenu.js +33 -20
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/Form/Form.d.ts.map +1 -1
- package/Form/Form.js.map +1 -1
- package/Form/FormRenderControl.d.ts.map +1 -1
- package/Form/FormRenderControl.js +26 -13
- package/Form/FormRenderControl.js.map +1 -1
- package/Form/FormRenderControl.types.d.ts +2 -1
- package/Form/FormRenderControl.types.d.ts.map +1 -1
- package/Form/FormTooltipButton.d.ts +6 -0
- package/Form/FormTooltipButton.d.ts.map +1 -0
- package/Form/FormTooltipButton.js +34 -0
- package/Form/FormTooltipButton.js.map +1 -0
- package/FormInput/FormInput.d.ts.map +1 -1
- package/FormInput/FormInput.js +22 -21
- package/FormInput/FormInput.js.map +1 -1
- package/Input/Input.js +1 -1
- package/Input/Input.js.map +1 -1
- package/Input/inputVariants.d.ts.map +1 -1
- package/Input/inputVariants.js +5 -4
- package/Input/inputVariants.js.map +1 -1
- package/LoadedIcon/LoadedIcon.d.ts.map +1 -1
- package/LoadedIcon/LoadedIcon.js +3 -1
- package/LoadedIcon/LoadedIcon.js.map +1 -1
- package/Resizable/Resizable.d.ts +5 -20
- package/Resizable/Resizable.d.ts.map +1 -1
- package/Resizable/Resizable.js +48 -31
- package/Resizable/Resizable.js.map +1 -1
- package/Resizable/Resizable.stories.js +140 -0
- package/Resizable/Resizable.stories.js.map +1 -0
- package/Search/Search.js +12 -12
- package/Search/Search.js.map +1 -1
- package/Search/Search.stories.js +17 -0
- package/Search/Search.stories.js.map +1 -0
- package/Textarea/Textarea.d.ts.map +1 -1
- package/Textarea/Textarea.js +50 -45
- package/Textarea/Textarea.js.map +1 -1
- package/Textarea/Textarea.stories.js +12 -0
- package/Textarea/Textarea.stories.js.map +1 -0
- package/Textarea/Textarea.types.d.ts +3 -1
- package/Textarea/Textarea.types.d.ts.map +1 -1
- package/Textarea/useAutosizeTextArea.d.ts +1 -1
- package/Textarea/useAutosizeTextArea.d.ts.map +1 -1
- package/Textarea/useAutosizeTextArea.js.map +1 -1
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js.map +1 -1
- package/index.js +326 -325
- package/package.json +7 -4
- package/Button/Button.s.d.ts +0 -83
- package/Button/Button.s.d.ts.map +0 -1
- package/Button/Button.s.js +0 -163
- package/Button/Button.s.js.map +0 -1
package/Accordion/Accordion.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
-
declare function Accordion(
|
|
3
|
+
declare function Accordion(props: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function AccordionTrigger({ className, children, showChevron, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger> & {
|
|
6
6
|
showChevron?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../src/Accordion/Accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAK/D,iBAAS,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../src/Accordion/Accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAK/D,iBAAS,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAe7E;AAED,iBAAS,aAAa,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAY7E;AAED,iBAAS,gBAAgB,CAAC,EACE,SAAS,EACT,QAAQ,EACR,WAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,2CAsB/G;AAED,iBAAS,gBAAgB,CAAC,EACE,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAUnF;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
package/Accordion/Accordion.js
CHANGED
|
@@ -1,50 +1,72 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "@radix-ui/react-accordion";
|
|
3
|
-
import {
|
|
3
|
+
import { ChevronRightIcon as s } from "lucide-react";
|
|
4
4
|
import { cn as i } from "@oneplatformdev/utils";
|
|
5
|
-
function u({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
function u(o) {
|
|
6
|
+
const {
|
|
7
|
+
className: t,
|
|
8
|
+
...r
|
|
9
|
+
} = o;
|
|
10
|
+
return /* @__PURE__ */ e(
|
|
11
|
+
n.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "accordion",
|
|
14
|
+
className: i(
|
|
15
|
+
"group group/accordion",
|
|
16
|
+
t
|
|
17
|
+
),
|
|
18
|
+
...r
|
|
19
|
+
}
|
|
20
|
+
);
|
|
9
21
|
}
|
|
10
|
-
function
|
|
11
|
-
className:
|
|
12
|
-
...
|
|
22
|
+
function p({
|
|
23
|
+
className: o,
|
|
24
|
+
...t
|
|
13
25
|
}) {
|
|
14
26
|
return /* @__PURE__ */ e(
|
|
15
27
|
n.Item,
|
|
16
28
|
{
|
|
17
29
|
"data-slot": "accordion-item",
|
|
18
|
-
className: i(
|
|
19
|
-
|
|
30
|
+
className: i(
|
|
31
|
+
"group group/accordion-item",
|
|
32
|
+
"border-b last:border-b-0",
|
|
33
|
+
o
|
|
34
|
+
),
|
|
35
|
+
...t
|
|
20
36
|
}
|
|
21
37
|
);
|
|
22
38
|
}
|
|
23
|
-
function
|
|
24
|
-
className:
|
|
25
|
-
children:
|
|
39
|
+
function g({
|
|
40
|
+
className: o,
|
|
41
|
+
children: t,
|
|
26
42
|
showChevron: r = !0,
|
|
27
43
|
...a
|
|
28
44
|
}) {
|
|
29
|
-
return /* @__PURE__ */ e(n.Header, { className: "flex", children: /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ e(n.Header, { className: "flex", children: /* @__PURE__ */ c(
|
|
30
46
|
n.Trigger,
|
|
31
47
|
{
|
|
32
48
|
"data-slot": "accordion-trigger",
|
|
33
49
|
className: i(
|
|
34
|
-
"
|
|
35
|
-
|
|
50
|
+
"group group/accordion-trigger",
|
|
51
|
+
"flex flex-1 items-start justify-between gap-4 rounded-md py-4",
|
|
52
|
+
"text-left text-sm font-medium",
|
|
53
|
+
"transition-all outline-none",
|
|
54
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
55
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
56
|
+
"[&[data-state=open]>svg]:rotate-90",
|
|
57
|
+
o
|
|
36
58
|
),
|
|
37
59
|
...a,
|
|
38
60
|
children: [
|
|
39
|
-
|
|
40
|
-
|
|
61
|
+
r && /* @__PURE__ */ e(s, { "data-slot": "accordion-chevrone", className: "text-[#06080D] pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" }),
|
|
62
|
+
t
|
|
41
63
|
]
|
|
42
64
|
}
|
|
43
65
|
) });
|
|
44
66
|
}
|
|
45
|
-
function
|
|
46
|
-
className:
|
|
47
|
-
children:
|
|
67
|
+
function f({
|
|
68
|
+
className: o,
|
|
69
|
+
children: t,
|
|
48
70
|
...r
|
|
49
71
|
}) {
|
|
50
72
|
return /* @__PURE__ */ e(
|
|
@@ -53,14 +75,14 @@ function g({
|
|
|
53
75
|
"data-slot": "accordion-content",
|
|
54
76
|
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
55
77
|
...r,
|
|
56
|
-
children: /* @__PURE__ */ e("div", { className: i("pt-0 pb-4",
|
|
78
|
+
children: /* @__PURE__ */ e("div", { className: i("group group/accordion-content", "pt-0 pb-4", o), children: t })
|
|
57
79
|
}
|
|
58
80
|
);
|
|
59
81
|
}
|
|
60
82
|
export {
|
|
61
83
|
u as Accordion,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
84
|
+
f as AccordionContent,
|
|
85
|
+
p as AccordionItem,
|
|
86
|
+
g as AccordionTrigger
|
|
65
87
|
};
|
|
66
88
|
//# sourceMappingURL=Accordion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","sources":["../../src/Accordion/Accordion.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport {
|
|
1
|
+
{"version":3,"file":"Accordion.js","sources":["../../src/Accordion/Accordion.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronRightIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Accordion(props: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n const {\n className,\n ...rest\n } = props;\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\n 'group group/accordion',\n className\n )}\n {...rest}\n />\n )\n}\n\nfunction AccordionItem({\n className,\n ...props\n }: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\n 'group group/accordion-item',\n \"border-b last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AccordionTrigger({\n className,\n children,\n showChevron = true,\n ...props\n }: React.ComponentProps<typeof AccordionPrimitive.Trigger> & { showChevron?: boolean }) {\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n 'group group/accordion-trigger',\n 'flex flex-1 items-start justify-between gap-4 rounded-md py-4',\n 'text-left text-sm font-medium',\n 'transition-all outline-none',\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&[data-state=open]>svg]:rotate-90',\n className\n )}\n {...props}\n >\n {showChevron && <ChevronRightIcon data-slot=\"accordion-chevrone\" className=\"text-[#06080D] pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200\" />}\n {children}\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\nfunction AccordionContent({\n className,\n children,\n ...props\n }: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot=\"accordion-content\"\n className=\"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm\"\n {...props}\n >\n <div className={cn('group group/accordion-content', \"pt-0 pb-4\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"],"names":["Accordion","props","className","rest","jsx","AccordionPrimitive","cn","AccordionItem","AccordionTrigger","children","showChevron","jsxs","ChevronRightIcon","AccordionContent"],"mappings":";;;;AAQA,SAASA,EAAUC,GAA6D;AAC9E,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDF;AACJ,SACE,gBAAAG;AAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASI,EAAc;AAAA,EACE,WAAAL;AAAA,EACA,GAAGD;AACL,GAAyD;AAC9E,SACE,gBAAAG;AAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASO,EAAiB;AAAA,EACE,WAAAN;AAAA,EACA,UAAAO;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,GAAGT;AACL,GAAwF;AAChH,SACE,gBAAAG,EAACC,EAAmB,QAAnB,EAA0B,WAAU,QACnC,UAAA,gBAAAM;AAAA,IAACN,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGD;AAAA,MAEH,UAAA;AAAA,QAAAS,KAAe,gBAAAN,EAACQ,GAAA,EAAiB,aAAU,sBAAqB,WAAU,wGAAuG;AAAA,QACjLH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;AAEA,SAASI,EAAiB;AAAA,EACE,WAAAX;AAAA,EACA,UAAAO;AAAA,EACA,GAAGR;AACL,GAA4D;AACpF,SACE,gBAAAG;AAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAU;AAAA,MACT,GAAGJ;AAAA,MAEJ,UAAA,gBAAAG,EAAC,SAAI,WAAWE,EAAG,iCAAiC,aAAaJ,CAAS,GAAI,UAAAO,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAG7F;"}
|
package/Badge/badgeVariants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const badgeVariants: (props?: ({
|
|
2
|
-
variant?: "default" | "destructive" | "
|
|
2
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
3
3
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
4
|
//# sourceMappingURL=badgeVariants.d.ts.map
|
package/Button/Button.d.ts
CHANGED
|
@@ -51,12 +51,12 @@ import * as React from "react";
|
|
|
51
51
|
* ```tsx
|
|
52
52
|
* <Button disabled>Disabled</Button>
|
|
53
53
|
* ```
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
54
|
+
*
|
|
55
|
+
* Sizes
|
|
56
|
+
* xs — compact, for tight UI areas. Classes: rounded-sm p-1 gap-1 text-xs min-h-4 min-w-14.
|
|
57
|
+
* sm — small; slightly larger than xs. Classes: rounded-md p-1 gap-1 text-sm min-h-6 min-w-20.
|
|
58
|
+
* md — default/text-heavy buttons. Classes: min-h-8 min-w-[102px] rounded-lg gap-1 px-2 py-1 text-sm leading-[1.12] [&_svg]:size-6.
|
|
59
|
+
* lg — large/call-to-action. Classes: min-h-10 min-w-35 rounded-lg gap-1 px-3 py-2 text-base leading-normal [&_svg]:size-6.
|
|
60
60
|
*
|
|
61
61
|
* @remarks
|
|
62
62
|
* - Designed for texted usage. If you need icon-only, use `ButtonIcon`.
|
package/Button/Button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAqDxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,eAAO,MAAM,MAAM,uFA0ElB,CAAA;AAED,eAAe,MAAM,CAAC"}
|
package/Button/Button.js
CHANGED
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as N, Fragment as E, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as R from "react";
|
|
3
3
|
import { isValidElement as V, createElement as j } from "react";
|
|
4
4
|
import { Slot as C } from "@radix-ui/react-slot";
|
|
5
5
|
import { cn as I } from "@oneplatformdev/utils";
|
|
6
|
-
import { buttonVariants as
|
|
6
|
+
import { buttonVariants as F } from "./buttonVariants.js";
|
|
7
7
|
import "@radix-ui/react-tooltip";
|
|
8
|
-
import { Tooltip as
|
|
9
|
-
import { LoadedIcon as
|
|
10
|
-
const
|
|
11
|
-
const { variant:
|
|
12
|
-
if (
|
|
8
|
+
import { Tooltip as L } from "../Tooltip/Tooltip.js";
|
|
9
|
+
import { LoadedIcon as y } from "../LoadedIcon/LoadedIcon.js";
|
|
10
|
+
const S = (n) => {
|
|
11
|
+
const { variant: t, size: r, color: s } = n, e = { color: s, variant: t, size: r };
|
|
12
|
+
if (t === "default")
|
|
13
13
|
return console.warn('Button variant "default" is deprecated. Please use "variant=contained color=primary" instead.'), e.variant = "contained", e.color = "primary", e;
|
|
14
14
|
if (r === "icon")
|
|
15
15
|
return console.warn('Button size "icon" is deprecated. Please use "<ButtonIcon/>" component instead.'), e.variant = "contained", e.color = "secondary", e;
|
|
16
|
-
if (
|
|
16
|
+
if (t === "transparent")
|
|
17
17
|
throw console.warn('Button variant "transparent" is removed. Please use "variant=none" instead.'), new Error('Button variant "transparent" is removed. Please use "variant=none" instead.');
|
|
18
|
-
return
|
|
19
|
-
},
|
|
20
|
-
(
|
|
18
|
+
return t === "outline" ? (console.warn('Button variant "outline" is deprecated. Please use "variant=outlined color=primary" instead.'), e.variant = "outlined", e.color = "primary", e) : t === "secondary" ? (console.warn('Button variant "secondary" is deprecated. Please use "variant=contained color=secondary" instead.'), e.variant = "contained", e.color = "secondary", e) : (t === "destructive" && (console.warn('Button variant "destructive" is deprecated. Please use "variant=contained color=error" instead.'), e.variant = "contained", e.color = "error"), e);
|
|
19
|
+
}, B = (n) => n ? V(n) ? n : j(n) : null, T = R.forwardRef(
|
|
20
|
+
(n, t) => {
|
|
21
21
|
const {
|
|
22
22
|
disabled: r,
|
|
23
|
-
className:
|
|
23
|
+
className: s,
|
|
24
24
|
variant: e,
|
|
25
|
-
color:
|
|
26
|
-
size:
|
|
27
|
-
asChild:
|
|
25
|
+
color: h,
|
|
26
|
+
size: c,
|
|
27
|
+
asChild: d = !1,
|
|
28
28
|
title: w = "",
|
|
29
29
|
tooltip: P,
|
|
30
|
-
tooltipProps:
|
|
31
|
-
message:
|
|
32
|
-
loading:
|
|
33
|
-
children:
|
|
30
|
+
tooltipProps: u = {},
|
|
31
|
+
message: g,
|
|
32
|
+
loading: a = !1,
|
|
33
|
+
children: p,
|
|
34
34
|
startAdornment: m,
|
|
35
|
-
endAdornment:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
endAdornment: f,
|
|
36
|
+
screenReader: i,
|
|
37
|
+
...b
|
|
38
|
+
} = n, x = d ? C : "button", l = g || P || w, z = d ? p : /* @__PURE__ */ N(E, { children: [
|
|
39
|
+
!!m && /* @__PURE__ */ o(y, { loading: a, size: c, children: B(m) }),
|
|
40
|
+
p,
|
|
41
|
+
!!f && /* @__PURE__ */ o(y, { loading: a, size: c, children: B(f) }),
|
|
42
|
+
!!i && /* @__PURE__ */ o("span", { className: "sr-only", children: typeof i == "string" ? i : i.text })
|
|
43
|
+
] }), v = /* @__PURE__ */ o(
|
|
44
|
+
x,
|
|
43
45
|
{
|
|
44
46
|
type: "button",
|
|
45
|
-
ref:
|
|
47
|
+
ref: t,
|
|
46
48
|
disabled: r,
|
|
47
49
|
className: I(
|
|
48
|
-
|
|
49
|
-
...
|
|
50
|
-
className:
|
|
50
|
+
F({
|
|
51
|
+
...S({ variant: e, size: c, color: h }),
|
|
52
|
+
className: s
|
|
51
53
|
}),
|
|
52
|
-
|
|
54
|
+
a && "pointer-events-none opacity-80 user-select-none"
|
|
53
55
|
),
|
|
54
|
-
...
|
|
56
|
+
...b,
|
|
55
57
|
children: z
|
|
56
58
|
}
|
|
57
59
|
);
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
+
return l ? /* @__PURE__ */ o(
|
|
61
|
+
L,
|
|
60
62
|
{
|
|
61
|
-
...
|
|
62
|
-
open:
|
|
63
|
-
message:
|
|
63
|
+
...u || {},
|
|
64
|
+
open: u.open ?? (r || a || !l) ? !1 : void 0,
|
|
65
|
+
message: l,
|
|
64
66
|
children: v
|
|
65
67
|
}
|
|
66
68
|
) : v;
|
|
67
69
|
}
|
|
68
70
|
);
|
|
69
|
-
|
|
71
|
+
T.displayName = "Button";
|
|
70
72
|
export {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
T as Button,
|
|
74
|
+
T as default
|
|
73
75
|
};
|
|
74
76
|
//# sourceMappingURL=Button.js.map
|
package/Button/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport {
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { ButtonVarianceProps, buttonVariants } from './buttonVariants';\nimport { ButtonAdornmentProps, type ButtonProps } from './Button.types';\n\nimport { Tooltip } from '../Tooltip';\nimport { LoadedIcon } from \"../LoadedIcon\";\nimport { createElement, isValidElement } from \"react\";\n\nconst normalizedVariantProperties = (props: ButtonVarianceProps): ButtonVarianceProps => {\n const { variant, size, color } = props;\n const vls = { color, variant, size }\n if ((variant as string) === 'default') {\n console.warn('Button variant \"default\" is deprecated. Please use \"variant=contained color=primary\" instead.')\n vls.variant = 'contained'\n vls.color = 'primary'\n return vls\n }\n if ((size as string) === 'icon') {\n console.warn('Button size \"icon\" is deprecated. Please use \"<ButtonIcon/>\" component instead.')\n vls.variant = 'contained'\n vls.color = 'secondary'\n return vls\n // throw new Error('Button variant \"transparent\" is removed. Please use \"variant=none\" instead.')\n }\n if ((variant as string) === 'transparent') {\n console.warn('Button variant \"transparent\" is removed. Please use \"variant=none\" instead.')\n throw new Error('Button variant \"transparent\" is removed. Please use \"variant=none\" instead.')\n }\n if ((variant as string) === 'outline') {\n console.warn('Button variant \"outline\" is deprecated. Please use \"variant=outlined color=primary\" instead.')\n vls.variant = 'outlined'\n vls.color = 'primary'\n return vls\n }\n if ((variant as string) === 'secondary') {\n console.warn('Button variant \"secondary\" is deprecated. Please use \"variant=contained color=secondary\" instead.')\n vls.variant = 'contained'\n vls.color = 'secondary'\n return vls\n }\n if ((variant as string) === 'destructive') {\n console.warn('Button variant \"destructive\" is deprecated. Please use \"variant=contained color=error\" instead.')\n vls.variant = 'contained'\n vls.color = 'error'\n return vls\n }\n return vls;\n}\n\nconst renderAdornment = (Adornment?: ButtonAdornmentProps) => {\n if (!Adornment) return null;\n if (isValidElement(Adornment)) return Adornment;\n return createElement(Adornment);\n};\n\n/**\n * Universal Button component used for triggering actions and UI interactions.\n * Supports variants, sizes, colors, start/end icon adornments, custom slot content,\n * tooltip integration, loading state, and polymorphic rendering via `asChild`.\n *\n * @public\n * @see [Documentation](#) // TODO: add link to docs\n *\n * @example\n * > Import:\n * ```tsx\n * import { Button } from '@oneplatformdev/ui/Button';\n * ```\n * > Basic usage:\n * ```tsx\n * <Button>Click me</Button>\n * ```\n * > Variant and size:\n * ```tsx\n * <Button variant=\"outline\" size=\"lg\">Large Button</Button>\n * ```\n * > With icons:\n * ```tsx\n * <Button startAdornment={<PlusIcon />}>Create</Button>\n * <Button endAdornment={<ArrowRightIcon />}>Next</Button>\n * ```\n * > Icon style button:\n * ```tsx\n * <Button size=\"icon\">\n * <PlusIcon />\n * </Button>\n * ```\n * > Polymorphic rendering (`asChild`):\n * ```tsx\n * <Button asChild>\n * <a href=\"/dashboard\">Go to Dashboard</a>\n * </Button>\n * ```\n * > Tooltip via `message` or native `title`:\n * ```tsx\n * <Button title=\"Tooltip text\">Hover me</Button>\n * <Button message=\"Tooltip content\">Hover me</Button>\n * ```\n * > Loading state:\n * ```tsx\n * <Button loading>Processing...</Button>\n * ```\n * > Disabled:\n * ```tsx\n * <Button disabled>Disabled</Button>\n * ```\n *\n * Sizes\n * xs — compact, for tight UI areas. Classes: rounded-sm p-1 gap-1 text-xs min-h-4 min-w-14.\n * sm — small; slightly larger than xs. Classes: rounded-md p-1 gap-1 text-sm min-h-6 min-w-20.\n * md — default/text-heavy buttons. Classes: min-h-8 min-w-[102px] rounded-lg gap-1 px-2 py-1 text-sm leading-[1.12] [&_svg]:size-6.\n * lg — large/call-to-action. Classes: min-h-10 min-w-35 rounded-lg gap-1 px-3 py-2 text-base leading-normal [&_svg]:size-6.\n *\n * @remarks\n * - Designed for texted usage. If you need icon-only, use `ButtonIcon`.\n * - Works with any SVG React component or element, e.g. lucide-react, heroicons, custom icons.\n *\n * @see {@link ButtonIcon} for icon-only buttons\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref) => {\n const {\n disabled,\n className,\n variant,\n color,\n size,\n asChild = false,\n title = '',\n tooltip,\n tooltipProps = {},\n message,\n loading = false,\n children,\n startAdornment,\n endAdornment,\n screenReader,\n ...rest\n } = props;\n const Comp = asChild ? Slot : \"button\"\n const msg = message || tooltip || title;\n\n const content = asChild\n ? children\n : (\n <>\n {!!startAdornment && (\n <LoadedIcon loading={loading} size={size}>\n {renderAdornment(startAdornment)}\n </LoadedIcon>\n )}\n\n {children}\n\n {!!endAdornment && (\n <LoadedIcon loading={loading} size={size}>\n {renderAdornment(endAdornment)}\n </LoadedIcon>\n )}\n\n {!!screenReader && <span className=\"sr-only\">{typeof screenReader === 'string' ? screenReader : screenReader.text}</span>}\n </>\n )\n\n const cmp = (\n <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(\n buttonVariants({\n ...normalizedVariantProperties({ variant, size, color }),\n className\n }),\n loading && 'pointer-events-none opacity-80 user-select-none',\n )}\n {...rest}\n >\n {content}\n </Comp>\n )\n\n if (!msg) return cmp\n return (\n <Tooltip\n {...(tooltipProps || {})}\n open={tooltipProps.open ?? (disabled || loading || !msg) ? false : undefined}\n message={msg}\n >\n {cmp}\n </Tooltip>\n )\n }\n)\nButton.displayName = \"Button\"\nexport default Button;\n"],"names":["normalizedVariantProperties","props","variant","size","color","vls","renderAdornment","Adornment","isValidElement","createElement","Button","React","ref","disabled","className","asChild","title","tooltip","tooltipProps","message","loading","children","startAdornment","endAdornment","screenReader","rest","Comp","Slot","msg","content","jsxs","Fragment","jsx","LoadedIcon","cmp","cn","buttonVariants","Tooltip"],"mappings":";;;;;;;;;AAWA,MAAMA,IAA8B,CAACC,MAAoD;AACvF,QAAM,EAAE,SAAAC,GAAS,MAAAC,GAAM,OAAAC,EAAA,IAAUH,GAC3BI,IAAM,EAAE,OAAAD,GAAO,SAAAF,GAAS,MAAAC,EAAA;AAC9B,MAAKD,MAAuB;AAC1B,mBAAQ,KAAK,+FAA+F,GAC5GG,EAAI,UAAU,aACdA,EAAI,QAAQ,WACLA;AAET,MAAKF,MAAoB;AACvB,mBAAQ,KAAK,iFAAiF,GAC9FE,EAAI,UAAU,aACdA,EAAI,QAAQ,aACLA;AAGT,MAAKH,MAAuB;AAC1B,kBAAQ,KAAK,6EAA6E,GACpF,IAAI,MAAM,6EAA6E;AAE/F,SAAKA,MAAuB,aAC1B,QAAQ,KAAK,8FAA8F,GAC3GG,EAAI,UAAU,YACdA,EAAI,QAAQ,WACLA,KAEJH,MAAuB,eAC1B,QAAQ,KAAK,mGAAmG,GAChHG,EAAI,UAAU,aACdA,EAAI,QAAQ,aACLA,MAEJH,MAAuB,kBAC1B,QAAQ,KAAK,iGAAiG,GAC9GG,EAAI,UAAU,aACdA,EAAI,QAAQ,UACLA;AAGX,GAEMC,IAAkB,CAACC,MAClBA,IACDC,EAAeD,CAAS,IAAUA,IAC/BE,EAAcF,CAAS,IAFP,MAqEZG,IAASC,EAAM;AAAA,EAC1B,CAACV,GAAOW,MAAQ;AACd,UAAM;AAAA,MACJ,UAAAC;AAAA,MACA,WAAAC;AAAA,MACA,SAAAZ;AAAA,MACA,OAAAE;AAAA,MACA,MAAAD;AAAA,MACA,SAAAY,IAAU;AAAA,MACV,OAAAC,IAAQ;AAAA,MACR,SAAAC;AAAA,MACA,cAAAC,IAAe,CAAA;AAAA,MACf,SAAAC;AAAA,MACA,SAAAC,IAAU;AAAA,MACV,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,GAAGC;AAAA,IAAA,IACDxB,GACEyB,IAAOX,IAAUY,IAAO,UACxBC,IAAMT,KAAWF,KAAWD,GAE5Ba,IAAUd,IACZM,IAEA,gBAAAS,EAAAC,GAAA,EACG,UAAA;AAAA,MAAA,CAAC,CAACT,KACD,gBAAAU,EAACC,GAAA,EAAW,SAAAb,GAAkB,MAAAjB,GAC3B,UAAAG,EAAgBgB,CAAc,GACjC;AAAA,MAGDD;AAAA,MAEA,CAAC,CAACE,KACD,gBAAAS,EAACC,KAAW,SAAAb,GAAkB,MAAAjB,GAC3B,UAAAG,EAAgBiB,CAAY,GAC/B;AAAA,MAGD,CAAC,CAACC,KAAgB,gBAAAQ,EAAC,QAAA,EAAK,WAAU,WAAW,UAAA,OAAOR,KAAiB,WAAWA,IAAeA,EAAa,KAAA,CAAK;AAAA,IAAA,GACpH,GAGEU,IACJ,gBAAAF;AAAA,MAACN;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,KAAAd;AAAA,QACA,UAAAC;AAAA,QACA,WAAWsB;AAAA,UACTC,EAAe;AAAA,YACb,GAAGpC,EAA4B,EAAE,SAAAE,GAAS,MAAAC,GAAM,OAAAC,GAAO;AAAA,YACvD,WAAAU;AAAA,UAAA,CACD;AAAA,UACDM,KAAW;AAAA,QAAA;AAAA,QAEZ,GAAGK;AAAA,QAEH,UAAAI;AAAA,MAAA;AAAA,IAAA;AAIL,WAAKD,IAEH,gBAAAI;AAAA,MAACK;AAAA,MAAA;AAAA,QACE,GAAInB,KAAgB,CAAA;AAAA,QACrB,MAAMA,EAAa,SAASL,KAAYO,KAAW,CAACQ,KAAO,KAAQ;AAAA,QACnE,SAASA;AAAA,QAER,UAAAM;AAAA,MAAA;AAAA,IAAA,IAPYA;AAAA,EAUnB;AACF;AACAxB,EAAO,cAAc;"}
|
package/Button/Button.stories.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { Button as
|
|
2
|
+
import { Button as o } from "./Button.js";
|
|
3
3
|
import { FileDownIcon as m, Trash2Icon as p, PlusIcon as n } from "lucide-react";
|
|
4
4
|
import { DashedWrapper as a } from "../.storybook/Wrappers.js";
|
|
5
|
-
const r = (
|
|
5
|
+
const r = (e) => /* @__PURE__ */ t(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
8
8
|
style: {
|
|
@@ -12,13 +12,13 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
12
12
|
gap: "16px"
|
|
13
13
|
},
|
|
14
14
|
children: ["default", "hover", "focus", "active", "disabled", "loading"].map((l) => /* @__PURE__ */ t(
|
|
15
|
-
|
|
15
|
+
o,
|
|
16
16
|
{
|
|
17
17
|
id: l,
|
|
18
|
-
...
|
|
19
|
-
disabled: l === "disabled" ||
|
|
20
|
-
loading: l === "loading" ||
|
|
21
|
-
children:
|
|
18
|
+
...e,
|
|
19
|
+
disabled: l === "disabled" || e.disabled,
|
|
20
|
+
loading: l === "loading" || e.loading,
|
|
21
|
+
children: e.children
|
|
22
22
|
},
|
|
23
23
|
l
|
|
24
24
|
))
|
|
@@ -32,10 +32,8 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
32
32
|
Trash2Icon: p,
|
|
33
33
|
FileDownIcon: m
|
|
34
34
|
}, d = {
|
|
35
|
-
// title: 'Components/Button/Button',
|
|
36
|
-
// title: 'ui/Button',
|
|
37
35
|
title: "Button",
|
|
38
|
-
component:
|
|
36
|
+
component: o,
|
|
39
37
|
// render: Template,
|
|
40
38
|
args: {
|
|
41
39
|
tooltip: void 0,
|
|
@@ -58,7 +56,7 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
58
56
|
control: !1
|
|
59
57
|
},
|
|
60
58
|
asChild: {
|
|
61
|
-
name: "
|
|
59
|
+
name: "asChild",
|
|
62
60
|
description: "Button asChild from ButtonProps [boolean]",
|
|
63
61
|
control: !1
|
|
64
62
|
},
|
|
@@ -115,13 +113,7 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
115
113
|
control: { type: "object" }
|
|
116
114
|
}
|
|
117
115
|
},
|
|
118
|
-
tags: ["autodocs"],
|
|
119
116
|
parameters: {
|
|
120
|
-
docs: {
|
|
121
|
-
description: {
|
|
122
|
-
component: "Universal button component with variants, icons and tooltip support."
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
117
|
pseudo: {
|
|
126
118
|
hover: "#hover",
|
|
127
119
|
focus: "#focus",
|
|
@@ -140,11 +132,11 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
140
132
|
children: "_children_"
|
|
141
133
|
}
|
|
142
134
|
}, x = {
|
|
143
|
-
render: (
|
|
144
|
-
/* @__PURE__ */ t(
|
|
145
|
-
/* @__PURE__ */ t(
|
|
146
|
-
/* @__PURE__ */ t(
|
|
147
|
-
/* @__PURE__ */ t(
|
|
135
|
+
render: (e) => /* @__PURE__ */ i(a, { children: [
|
|
136
|
+
/* @__PURE__ */ t(o, { ...e }),
|
|
137
|
+
/* @__PURE__ */ t(o, { ...e, startAdornment: /* @__PURE__ */ t(n, {}) }),
|
|
138
|
+
/* @__PURE__ */ t(o, { ...e, startAdornment: /* @__PURE__ */ t(n, {}), endAdornment: /* @__PURE__ */ t(n, {}) }),
|
|
139
|
+
/* @__PURE__ */ t(o, { ...e, endAdornment: /* @__PURE__ */ t(n, {}) })
|
|
148
140
|
] }),
|
|
149
141
|
args: {
|
|
150
142
|
...d.args,
|
|
@@ -152,59 +144,59 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
152
144
|
children: "disabled"
|
|
153
145
|
}
|
|
154
146
|
}, S = {
|
|
155
|
-
render: (
|
|
156
|
-
/* @__PURE__ */ t(
|
|
157
|
-
/* @__PURE__ */ t(
|
|
158
|
-
/* @__PURE__ */ t(
|
|
159
|
-
/* @__PURE__ */ t(
|
|
147
|
+
render: (e) => /* @__PURE__ */ i(a, { children: [
|
|
148
|
+
/* @__PURE__ */ t(o, { ...e }),
|
|
149
|
+
/* @__PURE__ */ t(o, { ...e, startAdornment: /* @__PURE__ */ t(n, {}) }),
|
|
150
|
+
/* @__PURE__ */ t(o, { ...e, startAdornment: /* @__PURE__ */ t(n, {}), endAdornment: /* @__PURE__ */ t(n, {}) }),
|
|
151
|
+
/* @__PURE__ */ t(o, { ...e, endAdornment: /* @__PURE__ */ t(n, {}) })
|
|
160
152
|
] }),
|
|
161
153
|
args: {
|
|
162
154
|
children: "Loading…",
|
|
163
155
|
loading: !0
|
|
164
156
|
}
|
|
165
157
|
}, G = {
|
|
166
|
-
render: (
|
|
158
|
+
render: (e) => /* @__PURE__ */ t(a, { children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
167
159
|
/* @__PURE__ */ t(
|
|
168
|
-
|
|
160
|
+
o,
|
|
169
161
|
{
|
|
170
|
-
...
|
|
162
|
+
...e,
|
|
171
163
|
title: "delayDuration: 0",
|
|
172
164
|
tooltipProps: { delayDuration: 0 },
|
|
173
165
|
children: "delayDuration: 0"
|
|
174
166
|
}
|
|
175
167
|
),
|
|
176
168
|
/* @__PURE__ */ t(
|
|
177
|
-
|
|
169
|
+
o,
|
|
178
170
|
{
|
|
179
|
-
...
|
|
171
|
+
...e,
|
|
180
172
|
title: "delayDuration: 300 [default]",
|
|
181
173
|
tooltipProps: { delayDuration: 300 },
|
|
182
174
|
children: "delayDuration: 300"
|
|
183
175
|
}
|
|
184
176
|
),
|
|
185
177
|
/* @__PURE__ */ t(
|
|
186
|
-
|
|
178
|
+
o,
|
|
187
179
|
{
|
|
188
|
-
...
|
|
180
|
+
...e,
|
|
189
181
|
title: "delayDuration: 700",
|
|
190
182
|
tooltipProps: { delayDuration: 700 },
|
|
191
183
|
children: "delayDuration: 700"
|
|
192
184
|
}
|
|
193
185
|
),
|
|
194
|
-
/* @__PURE__ */ t(
|
|
195
|
-
/* @__PURE__ */ t(
|
|
186
|
+
/* @__PURE__ */ t(o, { ...e, title: "title_string", children: "title" }),
|
|
187
|
+
/* @__PURE__ */ t(o, { ...e, message: "message_string", children: "message: string" }),
|
|
196
188
|
/* @__PURE__ */ t(
|
|
197
|
-
|
|
189
|
+
o,
|
|
198
190
|
{
|
|
199
|
-
...
|
|
191
|
+
...e,
|
|
200
192
|
message: /* @__PURE__ */ t("span", { children: "message_node_span" }),
|
|
201
193
|
children: "message: ReactNode"
|
|
202
194
|
}
|
|
203
195
|
),
|
|
204
196
|
/* @__PURE__ */ t(
|
|
205
|
-
|
|
197
|
+
o,
|
|
206
198
|
{
|
|
207
|
-
...
|
|
199
|
+
...e,
|
|
208
200
|
message: "message_string",
|
|
209
201
|
tooltipProps: {
|
|
210
202
|
showQuestionMark: !0
|
|
@@ -212,7 +204,7 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
212
204
|
children: "showQuestionMark: true"
|
|
213
205
|
}
|
|
214
206
|
)
|
|
215
|
-
] }),
|
|
207
|
+
] }) }),
|
|
216
208
|
args: {
|
|
217
209
|
children: "tooltips",
|
|
218
210
|
tooltipProps: {
|
|
@@ -230,10 +222,10 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
230
222
|
variant: { control: !1 },
|
|
231
223
|
color: { control: !1 }
|
|
232
224
|
},
|
|
233
|
-
render: (
|
|
234
|
-
/* @__PURE__ */ t(r, { ...
|
|
235
|
-
/* @__PURE__ */ t(r, { ...
|
|
236
|
-
/* @__PURE__ */ t(r, { ...
|
|
225
|
+
render: (e) => /* @__PURE__ */ t("div", { className: "flex", children: /* @__PURE__ */ i(a, { children: [
|
|
226
|
+
/* @__PURE__ */ t(r, { ...e, variant: "contained" }),
|
|
227
|
+
/* @__PURE__ */ t(r, { ...e, variant: "outlined" }),
|
|
228
|
+
/* @__PURE__ */ t(r, { ...e, variant: "ghost" })
|
|
237
229
|
] }) })
|
|
238
230
|
}, T = {
|
|
239
231
|
args: {
|
|
@@ -246,10 +238,10 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
246
238
|
variant: { control: !1 },
|
|
247
239
|
color: { control: !1 }
|
|
248
240
|
},
|
|
249
|
-
render: (
|
|
250
|
-
/* @__PURE__ */ t(r, { ...
|
|
251
|
-
/* @__PURE__ */ t(r, { ...
|
|
252
|
-
/* @__PURE__ */ t(r, { ...
|
|
241
|
+
render: (e) => /* @__PURE__ */ t("div", { className: "flex", children: /* @__PURE__ */ i(a, { children: [
|
|
242
|
+
/* @__PURE__ */ t(r, { ...e, variant: "contained" }),
|
|
243
|
+
/* @__PURE__ */ t(r, { ...e, variant: "outlined" }),
|
|
244
|
+
/* @__PURE__ */ t(r, { ...e, variant: "ghost" })
|
|
253
245
|
] }) })
|
|
254
246
|
}, _ = {
|
|
255
247
|
args: {
|
|
@@ -262,10 +254,10 @@ const r = (o) => /* @__PURE__ */ t(
|
|
|
262
254
|
variant: { control: !1 },
|
|
263
255
|
color: { control: !1 }
|
|
264
256
|
},
|
|
265
|
-
render: (
|
|
266
|
-
/* @__PURE__ */ t(r, { ...
|
|
267
|
-
/* @__PURE__ */ t(r, { ...
|
|
268
|
-
/* @__PURE__ */ t(r, { ...
|
|
257
|
+
render: (e) => /* @__PURE__ */ t("div", { className: "flex", children: /* @__PURE__ */ i(a, { children: [
|
|
258
|
+
/* @__PURE__ */ t(r, { ...e, variant: "contained" }),
|
|
259
|
+
/* @__PURE__ */ t(r, { ...e, variant: "outlined" }),
|
|
260
|
+
/* @__PURE__ */ t(r, { ...e, variant: "ghost" })
|
|
269
261
|
] }) })
|
|
270
262
|
};
|
|
271
263
|
export {
|