@clubmed/trident-ui 2.0.0-beta.3 → 2.0.0-beta.5
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/chunks/DateField.js +4 -4
- package/examples/checkbox-demo.js +13 -19
- package/examples/checkbox-demo.js.map +1 -1
- package/examples/checkbox-disabled-demo.js +15 -12
- package/examples/checkbox-disabled-demo.js.map +1 -1
- package/examples/checkboxes-demo.js +6 -6
- package/examples/checkboxes-demo.js.map +1 -1
- package/examples/checkboxes-with-form-control-demo.js +6 -6
- package/examples/checkboxes-with-form-control-demo.js.map +1 -1
- package/examples/form-checkbox-demo.d.ts +1 -0
- package/examples/form-checkbox-demo.js +30 -0
- package/examples/form-checkbox-demo.js.map +1 -0
- package/examples/form-checkbox-disabled-demo.d.ts +1 -0
- package/examples/form-checkbox-disabled-demo.js +25 -0
- package/examples/form-checkbox-disabled-demo.js.map +1 -0
- package/examples/sidebar-layout-demo.js +5 -5
- package/examples/sidebar-layout-demo.js.map +1 -1
- package/examples/sidebar-layout-minimal-demo.js +2 -2
- package/examples/sidebar-layout-minimal-demo.js.map +1 -1
- package/examples/sidebar-layout-with-header-demo.js +2 -2
- package/examples/sidebar-layout-with-header-demo.js.map +1 -1
- package/package.json +1 -1
- package/styles/animate.css +19 -19
- package/styles/theme.css +18 -18
- package/styles/ui/button.css +18 -24
- package/styles/ui/controls.css +1 -11
- package/styles/variants.css +0 -2
- package/ui/Breadcrumb.d.ts +2 -2
- package/ui/Breadcrumb.js +31 -35
- package/ui/Breadcrumb.js.map +1 -1
- package/ui/Popin.js +2 -2
- package/ui/Popin.js.map +1 -1
- package/ui/SidebarLayout.d.ts +8 -6
- package/ui/SidebarLayout.js +28 -15
- package/ui/SidebarLayout.js.map +1 -1
- package/ui/arrows/Arrows.d.ts +1 -0
- package/ui/arrows/Arrows.js +19 -17
- package/ui/arrows/Arrows.js.map +1 -1
- package/ui/forms/Filter.js +4 -4
- package/ui/forms/FormControl.js +4 -4
- package/ui/forms/NumberField.d.ts +32 -32
- package/ui/forms/Select.js +4 -4
- package/ui/forms/TextField.js +4 -4
- package/ui/forms/checkboxes/Checkbox.d.ts +8 -13
- package/ui/forms/checkboxes/Checkbox.js +22 -55
- package/ui/forms/checkboxes/Checkbox.js.map +1 -1
- package/ui/forms/checkboxes/Checkboxes.js +2 -2
- package/ui/forms/checkboxes/Checkboxes.js.map +1 -1
- package/ui/forms/checkboxes/FormCheckbox.d.ts +12 -0
- package/ui/forms/checkboxes/FormCheckbox.js +38 -0
- package/ui/forms/checkboxes/FormCheckbox.js.map +1 -0
- package/ui/forms/checkboxes/index.d.ts +1 -0
- package/ui/forms/checkboxes/index.js +2 -1
- package/ui/forms/password/Password.js +4 -4
- package/ui/forms/radios/RadioGroup.js +9 -9
- package/ui/helpers/colors/colors.d.ts +4 -0
- package/ui/helpers/colors/colors.js +6 -1
- package/ui/helpers/colors/colors.js.map +1 -1
- package/ui/Breadcrumb.themes.d.ts +0 -8
- package/ui/Breadcrumb.themes.js +0 -16
- package/ui/Breadcrumb.themes.js.map +0 -1
package/chunks/DateField.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./clsx.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useValue as t } from "../ui/hooks/useValue.js";
|
|
3
|
+
import { useInternalStatus as n } from "../ui/hooks/useInternalStatus.js";
|
|
4
4
|
import { FormControl as r } from "../ui/forms/FormControl.js";
|
|
5
5
|
import { useCallback as i, useEffect as a, useId as o, useRef as s, useState as c } from "react";
|
|
6
6
|
import { Icon as l } from "@clubmed/trident-icons";
|
|
@@ -71,10 +71,10 @@ var S = (e) => !e || !v(new Date(e)) ? "" : x(new Date(e), { representation: "da
|
|
|
71
71
|
let r = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), i = r(new Date(e));
|
|
72
72
|
return !(t && i < r(t) || n && i > r(n));
|
|
73
73
|
}, w = (f) => {
|
|
74
|
-
let p = o(), { id: m = p, name: h = m, label: g, description: _, openDatepicker: v, validationStatus: b = "default", icon: x = "CalendarDefault", iconType: w, errorMessage: T, disabled: E = !1, required: D = !1, hideRequiredStar: O, dataTestId: k = "DateField", value: A, min: j, max: M, onChange: N, ...P } = f, F = s(null), [I, L] = c(!1), R =
|
|
74
|
+
let p = o(), { id: m = p, name: h = m, label: g, description: _, openDatepicker: v, validationStatus: b = "default", icon: x = "CalendarDefault", iconType: w, errorMessage: T, disabled: E = !1, required: D = !1, hideRequiredStar: O, dataTestId: k = "DateField", value: A, min: j, max: M, onChange: N, ...P } = f, F = s(null), [I, L] = c(!1), R = n({
|
|
75
75
|
isDisabled: E,
|
|
76
76
|
validationStatus: b
|
|
77
|
-
}), { setValue: z, value: B } =
|
|
77
|
+
}), { setValue: z, value: B } = t({
|
|
78
78
|
name: h,
|
|
79
79
|
formatter: S,
|
|
80
80
|
initialValue: A,
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Clickable as e } from "../ui/Clickable.js";
|
|
3
|
+
import { Checkbox as t } from "../ui/forms/checkboxes/Checkbox.js";
|
|
4
|
+
import { useState as n } from "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
6
|
//#region lib/examples/checkbox-demo.tsx
|
|
6
7
|
function i() {
|
|
7
|
-
let [i, a] =
|
|
8
|
+
let [i, a] = n(!1);
|
|
8
9
|
return /* @__PURE__ */ r("div", {
|
|
9
10
|
className: "space-y-4",
|
|
10
|
-
children:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
value: "demo-value2",
|
|
19
|
-
checked: o,
|
|
20
|
-
onChange: (e) => s(e.target.checked),
|
|
21
|
-
validationStatus: "error",
|
|
22
|
-
errorMessage: "This is an error",
|
|
23
|
-
children: "Checkbox with error"
|
|
24
|
-
})]
|
|
11
|
+
children: /* @__PURE__ */ r(e, {
|
|
12
|
+
onClick: () => a(!i),
|
|
13
|
+
children: /* @__PURE__ */ r(t, {
|
|
14
|
+
id: "demo",
|
|
15
|
+
name: "demo",
|
|
16
|
+
checked: i
|
|
17
|
+
})
|
|
18
|
+
})
|
|
25
19
|
});
|
|
26
20
|
}
|
|
27
21
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-demo.js","names":[],"sources":["../../lib/examples/checkbox-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkbox } from '@/ui/forms/checkboxes/Checkbox';\nimport { useState } from 'react';\n\nexport default function CheckboxDemo() {\n const [
|
|
1
|
+
{"version":3,"file":"checkbox-demo.js","names":[],"sources":["../../lib/examples/checkbox-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Clickable } from '@/ui/Clickable';\nimport { Checkbox } from '@/ui/forms/checkboxes/Checkbox';\nimport { useState } from 'react';\n\nexport default function CheckboxDemo() {\n const [checked, setChecked] = useState(false);\n\n return (\n <div className=\"space-y-4\">\n <Clickable onClick={() => setChecked(!checked)}>\n <Checkbox id=\"demo\" name=\"demo\" checked={checked} />\n </Clickable>\n </div>\n );\n}\n"],"mappings":";;;;;;AAMA,SAAwB,IAAe;CACrC,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM;AAE7C,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GAAW,eAAe,EAAW,CAAC,EAAQ;aAC5C,kBAAC,GAAD;IAAU,IAAG;IAAO,MAAK;IAAgB;IAAW,CAAA;GAC1C,CAAA;EACR,CAAA"}
|
|
@@ -5,18 +5,21 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
5
5
|
function r() {
|
|
6
6
|
return /* @__PURE__ */ n("div", {
|
|
7
7
|
className: "space-y-4",
|
|
8
|
-
children: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
children: [
|
|
9
|
+
"Disabled unchecked",
|
|
10
|
+
/* @__PURE__ */ t(e, {
|
|
11
|
+
name: "disabled-unchecked",
|
|
12
|
+
value: "disabled",
|
|
13
|
+
disabled: !0
|
|
14
|
+
}),
|
|
15
|
+
"Disabled checked",
|
|
16
|
+
/* @__PURE__ */ t(e, {
|
|
17
|
+
name: "disabled-checked",
|
|
18
|
+
value: "disabled-checked",
|
|
19
|
+
disabled: !0,
|
|
20
|
+
checked: !0
|
|
21
|
+
})
|
|
22
|
+
]
|
|
20
23
|
});
|
|
21
24
|
}
|
|
22
25
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-disabled-demo.js","names":[],"sources":["../../lib/examples/checkbox-disabled-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkbox } from '@/ui/forms/checkboxes/Checkbox';\n\nexport default function CheckboxDisabledDemo() {\n return (\n <div className=\"space-y-4\">\n <Checkbox name=\"disabled-unchecked\" value=\"disabled\" disabled>\n
|
|
1
|
+
{"version":3,"file":"checkbox-disabled-demo.js","names":[],"sources":["../../lib/examples/checkbox-disabled-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkbox } from '@/ui/forms/checkboxes/Checkbox';\n\nexport default function CheckboxDisabledDemo() {\n return (\n <div className=\"space-y-4\">\n Disabled unchecked\n <Checkbox name=\"disabled-unchecked\" value=\"disabled\" disabled></Checkbox>\n Disabled checked\n <Checkbox name=\"disabled-checked\" value=\"disabled-checked\" disabled checked></Checkbox>\n </div>\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAuB;AAC7C,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GAA2B;GAEzB,kBAAC,GAAD;IAAU,MAAK;IAAqB,OAAM;IAAW,UAAA;IAAoB,CAAA;;GAEzE,kBAAC,GAAD;IAAU,MAAK;IAAmB,OAAM;IAAmB,UAAA;IAAS,SAAA;IAAmB,CAAA"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Checkboxes as e } from "../ui/forms/checkboxes/Checkboxes.js";
|
|
3
|
+
import { FormCheckbox as t } from "../ui/forms/checkboxes/FormCheckbox.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/examples/checkboxes-demo.tsx
|
|
6
6
|
function i() {
|
|
7
|
-
return /* @__PURE__ */ r(
|
|
7
|
+
return /* @__PURE__ */ r(e, {
|
|
8
8
|
name: "options",
|
|
9
9
|
children: [
|
|
10
|
-
/* @__PURE__ */ n(
|
|
10
|
+
/* @__PURE__ */ n(t, {
|
|
11
11
|
value: "option1",
|
|
12
12
|
children: "Option 1"
|
|
13
13
|
}),
|
|
14
|
-
/* @__PURE__ */ n(
|
|
14
|
+
/* @__PURE__ */ n(t, {
|
|
15
15
|
value: "option2",
|
|
16
16
|
children: "Option 2"
|
|
17
17
|
}),
|
|
18
|
-
/* @__PURE__ */ n(
|
|
18
|
+
/* @__PURE__ */ n(t, {
|
|
19
19
|
value: "option3",
|
|
20
20
|
children: "Option 3"
|
|
21
21
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkboxes-demo.js","names":[],"sources":["../../lib/examples/checkboxes-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkboxes } from '@/ui/forms/checkboxes/Checkboxes';\nimport {
|
|
1
|
+
{"version":3,"file":"checkboxes-demo.js","names":[],"sources":["../../lib/examples/checkboxes-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkboxes } from '@/ui/forms/checkboxes/Checkboxes';\nimport { FormCheckbox } from '@/ui/forms/checkboxes/FormCheckbox';\n\nexport default function CheckboxesDemo() {\n return (\n <Checkboxes name=\"options\">\n <FormCheckbox value=\"option1\">Option 1</FormCheckbox>\n <FormCheckbox value=\"option2\">Option 2</FormCheckbox>\n <FormCheckbox value=\"option3\">Option 3</FormCheckbox>\n </Checkboxes>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAiB;AACvC,QACE,kBAAC,GAAD;EAAY,MAAK;YAAjB;GACE,kBAAC,GAAD;IAAc,OAAM;cAAU;IAAuB,CAAA;GACrD,kBAAC,GAAD;IAAc,OAAM;cAAU;IAAuB,CAAA;GACrD,kBAAC,GAAD;IAAc,OAAM;cAAU;IAAuB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Checkboxes as e } from "../ui/forms/checkboxes/Checkboxes.js";
|
|
3
|
+
import { FormCheckbox as t } from "../ui/forms/checkboxes/FormCheckbox.js";
|
|
4
4
|
import { FormControl as n } from "../ui/forms/FormControl.js";
|
|
5
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
//#region lib/examples/checkboxes-with-form-control-demo.tsx
|
|
@@ -8,19 +8,19 @@ function a() {
|
|
|
8
8
|
return /* @__PURE__ */ r(n, {
|
|
9
9
|
label: "Select options",
|
|
10
10
|
description: "Choose one or more options",
|
|
11
|
-
children: /* @__PURE__ */ i(
|
|
11
|
+
children: /* @__PURE__ */ i(e, {
|
|
12
12
|
name: "options",
|
|
13
13
|
"aria-labelledby": "options-label",
|
|
14
14
|
children: [
|
|
15
|
-
/* @__PURE__ */ r(
|
|
15
|
+
/* @__PURE__ */ r(t, {
|
|
16
16
|
value: "option1",
|
|
17
17
|
children: "Option 1"
|
|
18
18
|
}),
|
|
19
|
-
/* @__PURE__ */ r(
|
|
19
|
+
/* @__PURE__ */ r(t, {
|
|
20
20
|
value: "option2",
|
|
21
21
|
children: "Option 2"
|
|
22
22
|
}),
|
|
23
|
-
/* @__PURE__ */ r(
|
|
23
|
+
/* @__PURE__ */ r(t, {
|
|
24
24
|
value: "option3",
|
|
25
25
|
children: "Option 3"
|
|
26
26
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkboxes-with-form-control-demo.js","names":[],"sources":["../../lib/examples/checkboxes-with-form-control-demo.tsx"],"sourcesContent":["'use client';\n\nimport { FormControl } from '@/ui/forms/FormControl';\nimport { Checkboxes } from '@/ui/forms/checkboxes/Checkboxes';\nimport {
|
|
1
|
+
{"version":3,"file":"checkboxes-with-form-control-demo.js","names":[],"sources":["../../lib/examples/checkboxes-with-form-control-demo.tsx"],"sourcesContent":["'use client';\n\nimport { FormControl } from '@/ui/forms/FormControl';\nimport { Checkboxes } from '@/ui/forms/checkboxes/Checkboxes';\nimport { FormCheckbox } from '@/ui/forms/checkboxes/FormCheckbox';\n\nexport default function CheckboxesWithFormControlDemo() {\n return (\n <FormControl label=\"Select options\" description=\"Choose one or more options\">\n <Checkboxes name=\"options\" aria-labelledby=\"options-label\">\n <FormCheckbox value=\"option1\">Option 1</FormCheckbox>\n <FormCheckbox value=\"option2\">Option 2</FormCheckbox>\n <FormCheckbox value=\"option3\">Option 3</FormCheckbox>\n </Checkboxes>\n </FormControl>\n );\n}\n"],"mappings":";;;;;;AAMA,SAAwB,IAAgC;AACtD,QACE,kBAAC,GAAD;EAAa,OAAM;EAAiB,aAAY;YAC9C,kBAAC,GAAD;GAAY,MAAK;GAAU,mBAAgB;aAA3C;IACE,kBAAC,GAAD;KAAc,OAAM;eAAU;KAAuB,CAAA;IACrD,kBAAC,GAAD;KAAc,OAAM;eAAU;KAAuB,CAAA;IACrD,kBAAC,GAAD;KAAc,OAAM;eAAU;KAAuB,CAAA;;;EAE3C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FormCheckboxDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { FormCheckbox as e } from "../ui/forms/checkboxes/FormCheckbox.js";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/examples/form-checkbox-demo.tsx
|
|
6
|
+
function i() {
|
|
7
|
+
let [i, a] = t(!1), [o, s] = t(!1);
|
|
8
|
+
return /* @__PURE__ */ r("div", {
|
|
9
|
+
className: "space-y-4",
|
|
10
|
+
children: [/* @__PURE__ */ n(e, {
|
|
11
|
+
name: "demo",
|
|
12
|
+
value: "demo-value",
|
|
13
|
+
checked: i,
|
|
14
|
+
onChange: (e) => a(e.target.checked),
|
|
15
|
+
children: "Basic checkbox"
|
|
16
|
+
}), /* @__PURE__ */ n(e, {
|
|
17
|
+
name: "demo2",
|
|
18
|
+
value: "demo-value2",
|
|
19
|
+
checked: o,
|
|
20
|
+
onChange: (e) => s(e.target.checked),
|
|
21
|
+
validationStatus: "error",
|
|
22
|
+
errorMessage: "This field is required",
|
|
23
|
+
children: "Checkbox with validation"
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { i as default };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=form-checkbox-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-checkbox-demo.js","names":[],"sources":["../../lib/examples/form-checkbox-demo.tsx"],"sourcesContent":["'use client';\n\nimport { FormCheckbox } from '@/ui/forms/checkboxes/FormCheckbox';\nimport { useState } from 'react';\n\nexport default function FormCheckboxDemo() {\n const [checked1, setChecked1] = useState(false);\n const [checked2, setChecked2] = useState(false);\n\n return (\n <div className=\"space-y-4\">\n <FormCheckbox\n name=\"demo\"\n value=\"demo-value\"\n checked={checked1}\n onChange={(e) => setChecked1(e.target.checked)}\n >\n Basic checkbox\n </FormCheckbox>\n <FormCheckbox\n name=\"demo2\"\n value=\"demo-value2\"\n checked={checked2}\n onChange={(e) => setChecked2(e.target.checked)}\n validationStatus=\"error\"\n errorMessage=\"This field is required\"\n >\n Checkbox with validation\n </FormCheckbox>\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAmB;CACzC,IAAM,CAAC,GAAU,KAAe,EAAS,GAAM,EACzC,CAAC,GAAU,KAAe,EAAS,GAAM;AAE/C,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GACE,MAAK;GACL,OAAM;GACN,SAAS;GACT,WAAW,MAAM,EAAY,EAAE,OAAO,QAAQ;aAC/C;GAEc,CAAA,EACf,kBAAC,GAAD;GACE,MAAK;GACL,OAAM;GACN,SAAS;GACT,WAAW,MAAM,EAAY,EAAE,OAAO,QAAQ;GAC9C,kBAAiB;GACjB,cAAa;aACd;GAEc,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FormCheckboxDisabledDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { FormCheckbox as e } from "../ui/forms/checkboxes/FormCheckbox.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/form-checkbox-disabled-demo.tsx
|
|
5
|
+
function r() {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
className: "space-y-4",
|
|
8
|
+
children: [/* @__PURE__ */ t(e, {
|
|
9
|
+
name: "disabled-unchecked",
|
|
10
|
+
value: "disabled",
|
|
11
|
+
disabled: !0,
|
|
12
|
+
children: "Disabled unchecked"
|
|
13
|
+
}), /* @__PURE__ */ t(e, {
|
|
14
|
+
name: "disabled-checked",
|
|
15
|
+
value: "disabled-checked",
|
|
16
|
+
disabled: !0,
|
|
17
|
+
checked: !0,
|
|
18
|
+
children: "Disabled checked"
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { r as default };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=form-checkbox-disabled-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-checkbox-disabled-demo.js","names":[],"sources":["../../lib/examples/form-checkbox-disabled-demo.tsx"],"sourcesContent":["'use client';\n\nimport { FormCheckbox } from '@/ui/forms/checkboxes/FormCheckbox';\n\nexport default function FormCheckboxDisabledDemo() {\n return (\n <div className=\"space-y-4\">\n <FormCheckbox name=\"disabled-unchecked\" value=\"disabled\" disabled>\n Disabled unchecked\n </FormCheckbox>\n <FormCheckbox name=\"disabled-checked\" value=\"disabled-checked\" disabled checked>\n Disabled checked\n </FormCheckbox>\n </div>\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAA2B;AACjD,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GAAc,MAAK;GAAqB,OAAM;GAAW,UAAA;aAAS;GAEnD,CAAA,EACf,kBAAC,GAAD;GAAc,MAAK;GAAmB,OAAM;GAAmB,UAAA;GAAS,SAAA;aAAQ;GAEjE,CAAA,CAAA"}
|
|
@@ -9,7 +9,7 @@ var o = [
|
|
|
9
9
|
{
|
|
10
10
|
label: "Home",
|
|
11
11
|
icon: "Home",
|
|
12
|
-
|
|
12
|
+
href: "#"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
label: "Projects",
|
|
@@ -17,22 +17,22 @@ var o = [
|
|
|
17
17
|
items: [
|
|
18
18
|
{
|
|
19
19
|
label: "Project A",
|
|
20
|
-
|
|
20
|
+
href: "#"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
label: "Project B",
|
|
24
|
-
|
|
24
|
+
href: "#"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
label: "Project C",
|
|
28
|
-
|
|
28
|
+
href: "#"
|
|
29
29
|
}
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
label: "Team",
|
|
34
34
|
icon: "PeopleDouble",
|
|
35
|
-
|
|
35
|
+
href: "#"
|
|
36
36
|
}
|
|
37
37
|
];
|
|
38
38
|
function s() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-layout-demo.js","names":[],"sources":["../../lib/examples/sidebar-layout-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Avatar } from '@/ui/Avatar';\nimport { Dropdown } from '@/ui/Dropdown';\nimport { SidebarLayout } from '@/ui/SidebarLayout';\nimport { Button } from '@/ui/buttons/Button';\n\nconst items = [\n { label: 'Home', icon: 'Home' as const,
|
|
1
|
+
{"version":3,"file":"sidebar-layout-demo.js","names":[],"sources":["../../lib/examples/sidebar-layout-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Avatar } from '@/ui/Avatar';\nimport { Dropdown } from '@/ui/Dropdown';\nimport { SidebarLayout } from '@/ui/SidebarLayout';\nimport { Button } from '@/ui/buttons/Button';\n\nconst items = [\n { label: 'Home', icon: 'Home' as const, href: '#' },\n {\n label: 'Projects',\n icon: 'HeartOutlined' as const,\n items: [\n { label: 'Project A', href: '#' },\n { label: 'Project B', href: '#' },\n { label: 'Project C', href: '#' },\n ],\n },\n { label: 'Team', icon: 'PeopleDouble' as const, href: '#' },\n];\n\nexport default function SidebarLayoutDemo() {\n const user = { firstName: 'John', lastName: 'Doe' };\n\n return (\n <SidebarLayout items={items}>\n <div data-slot=\"header-logo\" className=\"text-white text-b3 font-semibold\">\n CM\n </div>\n <div data-slot=\"header\" className=\"text-white text-h6\">\n Project Dashboard\n </div>\n <Dropdown data-slot=\"header-actions\" aria-label=\"Open user actions\">\n <span data-slot=\"label\" className=\"hidden md:inline text-body\">\n {user.firstName} {user.lastName}\n </span>\n <Avatar\n data-slot=\"label\"\n alt={`${user.firstName} ${user.lastName}`}\n className=\"w-40 h-40\"\n style={{ width: '40px', height: '40px' }}\n />\n <Button size=\"small\">Logout</Button>\n </Dropdown>\n\n <div>\n <h1 className=\"text-h3 mb-16\">Welcome to your dashboard</h1>\n <p className=\"text-body\">This example shows SidebarLayout with composable header slots.</p>\n </div>\n </SidebarLayout>\n );\n}\n"],"mappings":";;;;;;;AAOA,IAAM,IAAQ;CACZ;EAAE,OAAO;EAAQ,MAAM;EAAiB,MAAM;EAAK;CACnD;EACE,OAAO;EACP,MAAM;EACN,OAAO;GACL;IAAE,OAAO;IAAa,MAAM;IAAK;GACjC;IAAE,OAAO;IAAa,MAAM;IAAK;GACjC;IAAE,OAAO;IAAa,MAAM;;;EAE/B;CACD;EAAE,OAAO;EAAQ,MAAM;EAAyB,MAAM;;CACvD;AAED,SAAwB,IAAoB;CAC1C,IAAM,IAAO;EAAE,WAAW;EAAQ,UAAU;EAAO;AAEnD,QACE,kBAAC,GAAD;EAAsB;YAAtB;GACE,kBAAC,OAAD;IAAK,aAAU;IAAc,WAAU;cAAmC;IAEpE,CAAA;GACN,kBAAC,OAAD;IAAK,aAAU;IAAS,WAAU;cAAqB;IAEjD,CAAA;GACN,kBAAC,GAAD;IAAU,aAAU;IAAiB,cAAW;cAAhD;KACE,kBAAC,QAAD;MAAM,aAAU;MAAQ,WAAU;gBAAlC;OACG,EAAK;OAAU;OAAE,EAAK;;;KAEzB,kBAAC,GAAD;MACE,aAAU;MACV,KAAK,GAAG,EAAK,UAAU,GAAG,EAAK;MAC/B,WAAU;MACV,OAAO;OAAE,OAAO;OAAQ,QAAQ;;MAChC,CAAA;KACF,kBAAC,GAAD;MAAQ,MAAK;gBAAQ;MAAe,CAAA;;;GAGtC,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cAAgB;IAA8B,CAAA,EAC5D,kBAAC,KAAD;IAAG,WAAU;cAAY;IAAkE,CAAA,CACvF,EAAA,CAAA"}
|
|
@@ -5,11 +5,11 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
5
5
|
var r = [{
|
|
6
6
|
label: "Home",
|
|
7
7
|
icon: "Home",
|
|
8
|
-
|
|
8
|
+
href: "#"
|
|
9
9
|
}, {
|
|
10
10
|
label: "Settings",
|
|
11
11
|
icon: "Compare",
|
|
12
|
-
|
|
12
|
+
href: "#"
|
|
13
13
|
}];
|
|
14
14
|
function i() {
|
|
15
15
|
return /* @__PURE__ */ n(e, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-layout-minimal-demo.js","names":[],"sources":["../../lib/examples/sidebar-layout-minimal-demo.tsx"],"sourcesContent":["'use client';\n\nimport { SidebarLayout } from '@/ui/SidebarLayout';\n\nconst items = [\n { label: 'Home', icon: 'Home' as const,
|
|
1
|
+
{"version":3,"file":"sidebar-layout-minimal-demo.js","names":[],"sources":["../../lib/examples/sidebar-layout-minimal-demo.tsx"],"sourcesContent":["'use client';\n\nimport { SidebarLayout } from '@/ui/SidebarLayout';\n\nconst items = [\n { label: 'Home', icon: 'Home' as const, href: '#' },\n { label: 'Settings', icon: 'Compare' as const, href: '#' },\n];\n\nexport default function SidebarLayoutMinimalDemo() {\n return (\n <SidebarLayout items={items} activeIndex={1}>\n <div data-slot=\"header\" className=\"text-white text-h6\">\n Minimal Layout\n </div>\n\n <div>\n <h1 className=\"text-h3 mb-16\">Minimal navigation</h1>\n <p className=\"text-body\">This layout demonstrates a compact SidebarLayout setup.</p>\n </div>\n </SidebarLayout>\n );\n}\n"],"mappings":";;;;AAIA,IAAM,IAAQ,CACZ;CAAE,OAAO;CAAQ,MAAM;CAAiB,MAAM;CAAK,EACnD;CAAE,OAAO;CAAY,MAAM;CAAoB,MAAM;CAAK,CAC3D;AAED,SAAwB,IAA2B;AACjD,QACE,kBAAC,GAAD;EAAsB;EAAO,aAAa;YAA1C,CACE,kBAAC,OAAD;GAAK,aAAU;GAAS,WAAU;aAAqB;GAEjD,CAAA,EAEN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAAgB;GAAuB,CAAA,EACrD,kBAAC,KAAD;GAAG,WAAU;aAAY;GAA2D,CAAA,CAChF,EAAA,CAAA,CAAA"}
|
|
@@ -5,11 +5,11 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
5
5
|
var r = [{
|
|
6
6
|
label: "Dashboard",
|
|
7
7
|
icon: "Home",
|
|
8
|
-
|
|
8
|
+
href: "#"
|
|
9
9
|
}, {
|
|
10
10
|
label: "Analytics",
|
|
11
11
|
icon: "CheckOutlined",
|
|
12
|
-
|
|
12
|
+
href: "#"
|
|
13
13
|
}];
|
|
14
14
|
function i() {
|
|
15
15
|
return /* @__PURE__ */ n(e, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-layout-with-header-demo.js","names":[],"sources":["../../lib/examples/sidebar-layout-with-header-demo.tsx"],"sourcesContent":["'use client';\n\nimport { SidebarLayout } from '@/ui/SidebarLayout';\n\nconst items = [\n { label: 'Dashboard', icon: 'Home' as const,
|
|
1
|
+
{"version":3,"file":"sidebar-layout-with-header-demo.js","names":[],"sources":["../../lib/examples/sidebar-layout-with-header-demo.tsx"],"sourcesContent":["'use client';\n\nimport { SidebarLayout } from '@/ui/SidebarLayout';\n\nconst items = [\n { label: 'Dashboard', icon: 'Home' as const, href: '#' },\n { label: 'Analytics', icon: 'CheckOutlined' as const, href: '#' },\n];\n\nexport default function SidebarLayoutWithHeaderDemo() {\n return (\n <SidebarLayout items={items}>\n <div data-slot=\"header-logo\" className=\"text-white text-b3 font-semibold\">\n CM\n </div>\n <div data-slot=\"header\" className=\"text-white text-h6\">\n Project Dashboard\n </div>\n\n <div>\n <h1 className=\"text-h3 mb-16\">Custom header example</h1>\n <p className=\"text-body\">\n This layout demonstrates custom `header-logo` and `header` slots.\n </p>\n </div>\n </SidebarLayout>\n );\n}\n"],"mappings":";;;;AAIA,IAAM,IAAQ,CACZ;CAAE,OAAO;CAAa,MAAM;CAAiB,MAAM;CAAK,EACxD;CAAE,OAAO;CAAa,MAAM;CAA0B,MAAM;CAAK,CAClE;AAED,SAAwB,IAA8B;AACpD,QACE,kBAAC,GAAD;EAAsB;YAAtB;GACE,kBAAC,OAAD;IAAK,aAAU;IAAc,WAAU;cAAmC;IAEpE,CAAA;GACN,kBAAC,OAAD;IAAK,aAAU;IAAS,WAAU;cAAqB;IAEjD,CAAA;GAEN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cAAgB;IAA0B,CAAA,EACxD,kBAAC,KAAD;IAAG,WAAU;cAAY;IAErB,CAAA,CACA,EAAA,CAAA"}
|
package/package.json
CHANGED
package/styles/animate.css
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@keyframes
|
|
16
|
+
@keyframes bounce-enter {
|
|
17
17
|
0% {
|
|
18
18
|
opacity: 0;
|
|
19
19
|
transform: scale(0.5);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
@keyframes
|
|
31
|
+
@keyframes bounce-enter-strong {
|
|
32
32
|
0% {
|
|
33
33
|
opacity: 0;
|
|
34
34
|
transform: scale(0.5);
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
@keyframes
|
|
46
|
+
@keyframes bounce-exit {
|
|
47
47
|
0% {
|
|
48
48
|
opacity: 1;
|
|
49
49
|
transform: scale(1);
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
@keyframes
|
|
66
|
+
@keyframes loader-dash {
|
|
67
67
|
0% {
|
|
68
68
|
stroke-dashoffset: 38;
|
|
69
69
|
stroke-dasharray: 38;
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
@keyframes
|
|
96
|
+
@keyframes rotates-in {
|
|
97
97
|
0% {
|
|
98
98
|
transform: translateY(-20px);
|
|
99
99
|
opacity: 0;
|
|
@@ -104,16 +104,16 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
@keyframes
|
|
107
|
+
@keyframes slide-down {
|
|
108
108
|
0% {
|
|
109
|
-
transform: translateY(var(--tw-
|
|
109
|
+
transform: translateY(var(--tw-slide-down, -100%));
|
|
110
110
|
}
|
|
111
111
|
100% {
|
|
112
112
|
transform: translateY(0%);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
@keyframes
|
|
116
|
+
@keyframes slide-right-enter {
|
|
117
117
|
0% {
|
|
118
118
|
transform: translateX(100%);
|
|
119
119
|
opacity: 0;
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
@keyframes
|
|
127
|
+
@keyframes slide-right-exit {
|
|
128
128
|
0% {
|
|
129
129
|
transform: translateX(0%);
|
|
130
130
|
}
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
@keyframes
|
|
136
|
+
@keyframes slide-up {
|
|
137
137
|
0% {
|
|
138
|
-
transform: translateY(var(--tw-
|
|
138
|
+
transform: translateY(var(--tw-slide-up, 100%));
|
|
139
139
|
}
|
|
140
140
|
100% {
|
|
141
141
|
transform: translateY(0%);
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
@keyframes
|
|
181
|
+
@keyframes backdrop-fade-in {
|
|
182
182
|
0% {
|
|
183
183
|
backdrop-filter: blur(0px);
|
|
184
184
|
opacity: 0;
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
@keyframes
|
|
192
|
+
@keyframes backdrop-fade-out {
|
|
193
193
|
0% {
|
|
194
194
|
backdrop-filter: blur(10px);
|
|
195
195
|
opacity: 0.8;
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
@keyframes
|
|
203
|
+
@keyframes backdrop-sweep-in {
|
|
204
204
|
0% {
|
|
205
205
|
backdrop-filter: blur(0px);
|
|
206
206
|
opacity: 0;
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
@keyframes
|
|
216
|
+
@keyframes backdrop-sweep-out {
|
|
217
217
|
0% {
|
|
218
218
|
backdrop-filter: blur(10px);
|
|
219
219
|
opacity: 0.8;
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
@keyframes
|
|
249
|
+
@keyframes toast-enter {
|
|
250
250
|
0% {
|
|
251
251
|
transform: translateX(100%);
|
|
252
252
|
opacity: 0;
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
@keyframes
|
|
260
|
+
@keyframes toast-exit {
|
|
261
261
|
0% {
|
|
262
262
|
transform: translateX(0%);
|
|
263
263
|
}
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
@keyframes
|
|
269
|
+
@keyframes zoom-in {
|
|
270
270
|
0% {
|
|
271
271
|
transform: scale(0.3);
|
|
272
272
|
opacity: 0.3;
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
@keyframes
|
|
280
|
+
@keyframes zoom-out {
|
|
281
281
|
0% {
|
|
282
282
|
transform: scale(1);
|
|
283
283
|
opacity: 1;
|
package/styles/theme.css
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
--radius-16: 1rem;
|
|
99
99
|
--radius-22: 1.375rem;
|
|
100
100
|
--radius-32: 2rem;
|
|
101
|
-
--radius-pill:
|
|
101
|
+
--radius-pill: calc(infinity * 1px);
|
|
102
102
|
--radius-full: 100%;
|
|
103
103
|
|
|
104
104
|
/* Breakpoints */
|
|
@@ -143,32 +143,32 @@
|
|
|
143
143
|
--transition-duration-boop: 0.4s;
|
|
144
144
|
|
|
145
145
|
--animate-none: none;
|
|
146
|
-
--animate-
|
|
147
|
-
--animate-
|
|
148
|
-
--animate-
|
|
149
|
-
--animate-
|
|
146
|
+
--animate-backdrop-fade-in: backdrop-fade-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* NOT IN DCX */
|
|
147
|
+
--animate-backdrop-fade-out: backdrop-fade-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards; /* NOT IN DCX */
|
|
148
|
+
--animate-backdrop-sweep-in: backdrop-sweep-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* NOT IN DCX */
|
|
149
|
+
--animate-backdrop-sweep-out: backdrop-sweep-out 260ms cubic-bezier(0.4, 0, 1, 1) forwards; /* NOT IN DCX */
|
|
150
150
|
--animate-boop: boop 230ms cubic-bezier(0.76, 0.24, 0.65, 0.85) normal both;
|
|
151
151
|
--animate-bounce: bounce 1s infinite; /* NOT IN DCX */
|
|
152
|
-
--animate-
|
|
153
|
-
--animate-
|
|
154
|
-
--animate-
|
|
152
|
+
--animate-bounce-enter: bounce-enter 500ms linear;
|
|
153
|
+
--animate-bounce-enter-strong: bounce-enter-strong 600ms linear;
|
|
154
|
+
--animate-bounce-exit: bounce-exit 500ms linear;
|
|
155
155
|
--animate-filling: filling 10s linear;
|
|
156
|
-
--animate-
|
|
156
|
+
--animate-loader-dash: loader-dash 1.5s ease-in-out infinite;
|
|
157
157
|
--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; /* NOT IN DCX */
|
|
158
158
|
--animate-pulsation: pulsation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
159
159
|
--animate-pulse: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
160
|
-
--animate-
|
|
161
|
-
--animate-
|
|
162
|
-
--animate-
|
|
163
|
-
--animate-
|
|
164
|
-
--animate-
|
|
160
|
+
--animate-rotates-in: rotates-in 0.4s ease-in-out;
|
|
161
|
+
--animate-slide-down: slide-down 0.5s ease-out;
|
|
162
|
+
--animate-slide-right-enter: slide-right-enter 0.4s ease;
|
|
163
|
+
--animate-slide-right-exit: slide-right-exit 0.4s ease;
|
|
164
|
+
--animate-slide-up: slide-up 0.5s ease-out;
|
|
165
165
|
--animate-spin: spin 1s linear infinite;
|
|
166
166
|
--animate-tick: tick 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
|
|
167
|
-
--animate-
|
|
168
|
-
--animate-
|
|
167
|
+
--animate-toast-enter: toast-enter 0.4s ease; /* NOT IN DCX */
|
|
168
|
+
--animate-toast-exit: toast-exit 0.4s ease; /* NOT IN DCX */
|
|
169
169
|
--animate-tock: tock 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
|
|
170
170
|
--animate-wave: wave 4s linear infinite;
|
|
171
|
-
--animate-
|
|
172
|
-
--animate-
|
|
171
|
+
--animate-zoom-in: zoom-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* NOT IN DCX */
|
|
172
|
+
--animate-zoom-out: zoom-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards; /* NOT IN DCX */
|
|
173
173
|
--animate-wiggle: wiggle 0.75s ease-in-out;
|
|
174
174
|
}
|