@clubmed/trident-ui 2.0.0-beta.4 → 2.0.0-beta.6
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/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/Loader.d.ts +5 -4
- package/ui/Loader.js +11 -10
- package/ui/Loader.js.map +1 -1
- package/ui/Popin.js +2 -2
- package/ui/Popin.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"}
|
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
|
}
|
package/styles/ui/button.css
CHANGED
|
@@ -18,14 +18,6 @@
|
|
|
18
18
|
pointer-events: none;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
@media (hover: hover) and (pointer: fine) {
|
|
22
|
-
.button:active:not(:disabled) {
|
|
23
|
-
transform: scale(0.98);
|
|
24
|
-
/* TODO: replace with: */
|
|
25
|
-
/* @apply active:animate-boop; */
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
21
|
/* themes */
|
|
30
22
|
.button-outline,
|
|
31
23
|
.button-solid {
|
|
@@ -45,7 +37,25 @@
|
|
|
45
37
|
color: var(--button-primary);
|
|
46
38
|
}
|
|
47
39
|
|
|
40
|
+
.button-solid {
|
|
41
|
+
background-color: color-mix(
|
|
42
|
+
in oklab,
|
|
43
|
+
var(--button-primary) var(--button-bg-opacity),
|
|
44
|
+
transparent
|
|
45
|
+
);
|
|
46
|
+
border-color: color-mix(
|
|
47
|
+
in oklab,
|
|
48
|
+
var(--button-primary) var(--button-border-opacity),
|
|
49
|
+
transparent
|
|
50
|
+
);
|
|
51
|
+
color: var(--button-secondary);
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
@media (hover: hover) and (pointer: fine) {
|
|
55
|
+
.button:active:not(:disabled) {
|
|
56
|
+
transform: scale(0.98);
|
|
57
|
+
}
|
|
58
|
+
|
|
49
59
|
.button-outline:active:not(:disabled),
|
|
50
60
|
.button-outline:hover:not(:disabled),
|
|
51
61
|
.button-outline:focus:not(:disabled),
|
|
@@ -62,23 +72,7 @@
|
|
|
62
72
|
);
|
|
63
73
|
color: var(--button-secondary);
|
|
64
74
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.button-solid {
|
|
68
|
-
background-color: color-mix(
|
|
69
|
-
in oklab,
|
|
70
|
-
var(--button-primary) var(--button-bg-opacity),
|
|
71
|
-
transparent
|
|
72
|
-
);
|
|
73
|
-
border-color: color-mix(
|
|
74
|
-
in oklab,
|
|
75
|
-
var(--button-primary) var(--button-border-opacity),
|
|
76
|
-
transparent
|
|
77
|
-
);
|
|
78
|
-
color: var(--button-secondary);
|
|
79
|
-
}
|
|
80
75
|
|
|
81
|
-
@media (hover: hover) and (pointer: fine) {
|
|
82
76
|
.button-solid:active:not(:disabled),
|
|
83
77
|
.button-solid:hover:not(:disabled),
|
|
84
78
|
.button-solid:focus:not(:disabled),
|
package/styles/ui/controls.css
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@layer utilities {
|
|
2
2
|
/* This file is for styling the controls of the form inputs (checkbox, radio, switch, filter) */
|
|
3
3
|
/* Styling the controls by their HTML semantic allows us to visually guarantee the non-regression of this semantic */
|
|
4
|
-
/* Radio
|
|
5
|
-
label > span > input[type='checkbox']:not([role='switch']),
|
|
4
|
+
/* Radio */
|
|
6
5
|
label > span > input[type='radio'] {
|
|
7
6
|
opacity: 0;
|
|
8
7
|
position: absolute;
|
|
@@ -10,7 +9,6 @@
|
|
|
10
9
|
height: 100%;
|
|
11
10
|
border: 0;
|
|
12
11
|
}
|
|
13
|
-
label > span > input[type='checkbox']:not([role='switch']) + span,
|
|
14
12
|
label > span > input[type='radio'] + span {
|
|
15
13
|
@apply border transition-all duration-200;
|
|
16
14
|
--tw-ring-color: transparent;
|
|
@@ -20,25 +18,20 @@
|
|
|
20
18
|
align-items: center;
|
|
21
19
|
justify-content: center;
|
|
22
20
|
}
|
|
23
|
-
label > span > input[type='checkbox']:not([role='switch']) + span svg,
|
|
24
21
|
label > span > input[type='radio'] + span svg {
|
|
25
22
|
opacity: 0;
|
|
26
23
|
transform: scale(0);
|
|
27
24
|
transform-origin: center;
|
|
28
25
|
transition: all var(--transition-duration-boop) var(--transition-fn-boop);
|
|
29
26
|
}
|
|
30
|
-
label > span > input[type='checkbox']:not([role='switch']):checked + span svg,
|
|
31
27
|
label > span > input[type='radio']:checked + span svg {
|
|
32
28
|
opacity: 1;
|
|
33
29
|
transform: scale(1);
|
|
34
30
|
}
|
|
35
|
-
label > span > input[type='checkbox']:not([role='switch']):checked + span,
|
|
36
|
-
label > span > input[type='checkbox']:not([role='switch']):not([disabled]):hover + span,
|
|
37
31
|
label > span > input[type='radio']:checked + span,
|
|
38
32
|
label > span > input[type='radio']:not([disabled]):hover + span {
|
|
39
33
|
@apply border-black;
|
|
40
34
|
}
|
|
41
|
-
label > span > input[type='checkbox']:not([role='switch']):focus-visible + span,
|
|
42
35
|
label > span > input[type='radio']:focus-visible + span {
|
|
43
36
|
@apply ring-8;
|
|
44
37
|
--tw-ring-color: color-mix(in oklab, var(--color-lavender) 20%, transparent);
|
|
@@ -46,9 +39,6 @@
|
|
|
46
39
|
label > span > input[type='radio'] + span {
|
|
47
40
|
@apply rounded-full;
|
|
48
41
|
}
|
|
49
|
-
label > span > input[type='checkbox']:not([role='switch']) + span {
|
|
50
|
-
border-radius: calc(var(--spacing) * 8);
|
|
51
|
-
}
|
|
52
42
|
/* Filter */
|
|
53
43
|
@media (hover: hover) and (pointer: fine) {
|
|
54
44
|
label:active > input[type='checkbox'][data-name='Filter']:not(:disabled) {
|
package/styles/variants.css
CHANGED
package/ui/Breadcrumb.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, FunctionComponent } from 'react';
|
|
2
2
|
import { Theme } from './types/Theme';
|
|
3
3
|
export interface BreadcrumbProps extends ComponentPropsWithoutRef<'nav'> {
|
|
4
|
-
items:
|
|
4
|
+
items: Array<{
|
|
5
5
|
href: string;
|
|
6
6
|
label: string;
|
|
7
|
-
}
|
|
7
|
+
}>;
|
|
8
8
|
theme?: Theme;
|
|
9
9
|
}
|
|
10
10
|
export declare const Breadcrumb: FunctionComponent<BreadcrumbProps>;
|