@clubmed/trident-ui 2.0.0-beta.2 → 2.0.0-beta.21
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 +36 -35
- package/chunks/DateField.js.map +1 -1
- package/examples/button-demo.js +2 -2
- package/examples/button-demo.js.map +1 -1
- package/examples/checkbox-demo.js +16 -20
- package/examples/checkbox-demo.js.map +1 -1
- package/examples/checkboxes-demo.js +6 -6
- package/examples/checkboxes-demo.js.map +1 -1
- package/examples/choice-expander-demo.js +4 -67
- package/examples/choice-expander-demo.js.map +1 -1
- package/examples/dropdown-demo.js +9 -1
- package/examples/dropdown-demo.js.map +1 -1
- package/examples/elastic-height-demo.js +2 -1
- package/examples/elastic-height-demo.js.map +1 -1
- package/examples/frame-demo.d.ts +1 -0
- package/examples/frame-demo.js +18 -0
- package/examples/frame-demo.js.map +1 -0
- package/examples/frame-horizontal-demo.d.ts +1 -0
- package/examples/frame-horizontal-demo.js +18 -0
- package/examples/frame-horizontal-demo.js.map +1 -0
- package/examples/frame-vertical-demo.d.ts +1 -0
- package/examples/frame-vertical-demo.js +18 -0
- package/examples/frame-vertical-demo.js.map +1 -0
- package/examples/frame-with-tag-demo.d.ts +1 -0
- package/examples/frame-with-tag-demo.js +23 -0
- package/examples/frame-with-tag-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 +2 -1
- package/styles/animate.css +19 -19
- package/styles/theme.css +23 -18
- package/styles/ui/button.css +18 -24
- package/styles/ui/controls.css +1 -11
- package/styles/variants.css +0 -2
- package/ui/AdvancedToast.js +11 -11
- package/ui/AdvancedToast.js.map +1 -1
- package/ui/BasicToast.js +1 -1
- package/ui/BasicToast.js.map +1 -1
- package/ui/Breadcrumb.d.ts +2 -2
- package/ui/Breadcrumb.js +31 -35
- package/ui/Breadcrumb.js.map +1 -1
- package/ui/ChoiceExpander.js +1 -1
- package/ui/ChoiceExpander.js.map +1 -1
- package/ui/Dropdown.d.ts +20 -3
- package/ui/Dropdown.js +57 -23
- package/ui/Dropdown.js.map +1 -1
- package/ui/ElasticHeight.d.ts +0 -1
- package/ui/ElasticHeight.js +14 -23
- package/ui/ElasticHeight.js.map +1 -1
- package/ui/Frame.d.ts +15 -0
- package/ui/Frame.js +39 -0
- package/ui/Frame.js.map +1 -0
- 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/SidebarLayout.d.ts +11 -7
- package/ui/SidebarLayout.js +55 -34
- 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/buttons/Button.type.d.ts +1 -1
- package/ui/buttons/Button.type.js.map +1 -1
- package/ui/forms/Filter.d.ts +8 -4
- package/ui/forms/Filter.js +23 -45
- package/ui/forms/Filter.js.map +1 -1
- package/ui/forms/FormControl.js +6 -6
- package/ui/forms/NumberField.d.ts +10 -10
- package/ui/forms/checkboxes/Checkbox.d.ts +10 -12
- package/ui/forms/checkboxes/Checkbox.js +38 -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/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/hooks/useValue.js +1 -1
- package/ui/hooks/useValue.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
|
@@ -30,7 +30,15 @@ function a() {
|
|
|
30
30
|
height: "40px"
|
|
31
31
|
}
|
|
32
32
|
}),
|
|
33
|
-
/* @__PURE__ */ r(
|
|
33
|
+
/* @__PURE__ */ r("a", {
|
|
34
|
+
href: "/account",
|
|
35
|
+
className: "text-b3 font-semibold",
|
|
36
|
+
children: "Account"
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ r(e, {
|
|
39
|
+
"data-dropdown-item": "",
|
|
40
|
+
children: "Logout"
|
|
41
|
+
})
|
|
34
42
|
]
|
|
35
43
|
});
|
|
36
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-demo.js","names":[],"sources":["../../lib/examples/dropdown-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Avatar } from '@/ui/Avatar';\nimport { Dropdown } from '@/ui/Dropdown';\nimport { Button } from '@/ui/buttons/Button';\n\nexport default function DropdownDemo() {\n const user = { firstName: 'John', lastName: 'Doe' };\n\n return (\n <Dropdown 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 cursor-pointer hover:opacity-80 transition-opacity\"\n style={{ width: '40px', height: '40px' }}\n />\n\n <Button>Logout</Button>\n </Dropdown>\n );\n}\n"],"mappings":";;;;;;AAMA,SAAwB,IAAe;CACrC,IAAM,IAAO;EAAE,WAAW;EAAQ,UAAU;EAAO;AAEnD,QACE,kBAAC,GAAD;EAAU,cAAW;YAArB;GACE,kBAAC,QAAD;IAAM,aAAU;IAAQ,WAAU;cAAlC;KACG,EAAK;KAAU;KAAE,EAAK;;;GAEzB,kBAAC,GAAD;IACE,aAAU;IACV,KAAK,GAAG,EAAK,UAAU,GAAG,EAAK;IAC/B,WAAU;IACV,OAAO;KAAE,OAAO;KAAQ,QAAQ;;IAChC,CAAA;GAEF,kBAAC,
|
|
1
|
+
{"version":3,"file":"dropdown-demo.js","names":[],"sources":["../../lib/examples/dropdown-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Avatar } from '@/ui/Avatar';\nimport { Dropdown } from '@/ui/Dropdown';\nimport { Button } from '@/ui/buttons/Button';\n\nexport default function DropdownDemo() {\n const user = { firstName: 'John', lastName: 'Doe' };\n\n return (\n <Dropdown 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 cursor-pointer hover:opacity-80 transition-opacity\"\n style={{ width: '40px', height: '40px' }}\n />\n\n <a href=\"/account\" className=\"text-b3 font-semibold\">\n Account\n </a>\n <Button data-dropdown-item=\"\">Logout</Button>\n </Dropdown>\n );\n}\n"],"mappings":";;;;;;AAMA,SAAwB,IAAe;CACrC,IAAM,IAAO;EAAE,WAAW;EAAQ,UAAU;EAAO;AAEnD,QACE,kBAAC,GAAD;EAAU,cAAW;YAArB;GACE,kBAAC,QAAD;IAAM,aAAU;IAAQ,WAAU;cAAlC;KACG,EAAK;KAAU;KAAE,EAAK;;;GAEzB,kBAAC,GAAD;IACE,aAAU;IACV,KAAK,GAAG,EAAK,UAAU,GAAG,EAAK;IAC/B,WAAU;IACV,OAAO;KAAE,OAAO;KAAQ,QAAQ;;IAChC,CAAA;GAEF,kBAAC,KAAD;IAAG,MAAK;IAAW,WAAU;cAAwB;IAEjD,CAAA;GACJ,kBAAC,GAAD;IAAQ,sBAAmB;cAAG;IAAe,CAAA"}
|
|
@@ -9,11 +9,12 @@ function i() {
|
|
|
9
9
|
className: "w-full max-w-md space-y-4",
|
|
10
10
|
children: [/* @__PURE__ */ n("button", {
|
|
11
11
|
onClick: () => a(!i),
|
|
12
|
-
className: "rounded-md bg-
|
|
12
|
+
className: "rounded-md bg-ultramarine px-4 py-2 text-white hover:bg-blue-700",
|
|
13
13
|
children: i ? "Collapse" : "Expand"
|
|
14
14
|
}), /* @__PURE__ */ n(e, {
|
|
15
15
|
isExpanded: i,
|
|
16
16
|
className: "border rounded-md",
|
|
17
|
+
min: 24,
|
|
17
18
|
children: /* @__PURE__ */ r("div", {
|
|
18
19
|
className: "p-4 space-y-2",
|
|
19
20
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elastic-height-demo.js","names":[],"sources":["../../lib/examples/elastic-height-demo.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { ElasticHeight } from '@/ui/ElasticHeight';\n\nexport default function ElasticHeightDemo() {\n const [isExpanded, setIsExpanded] = useState(false);\n\n return (\n <div className=\"w-full max-w-md space-y-4\">\n <button\n onClick={() => setIsExpanded(!isExpanded)}\n className=\"rounded-md bg-
|
|
1
|
+
{"version":3,"file":"elastic-height-demo.js","names":[],"sources":["../../lib/examples/elastic-height-demo.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { ElasticHeight } from '@/ui/ElasticHeight';\n\nexport default function ElasticHeightDemo() {\n const [isExpanded, setIsExpanded] = useState(false);\n\n return (\n <div className=\"w-full max-w-md space-y-4\">\n <button\n onClick={() => setIsExpanded(!isExpanded)}\n className=\"rounded-md bg-ultramarine px-4 py-2 text-white hover:bg-blue-700\"\n >\n {isExpanded ? 'Collapse' : 'Expand'}\n </button>\n <ElasticHeight isExpanded={isExpanded} className=\"border rounded-md\" min={24}>\n <div className=\"p-4 space-y-2\">\n <p className=\"font-semibold\">Expandable Content</p>\n <p>\n This content smoothly animates when the container expands or collapses. The\n ElasticHeight component automatically adjusts to the height of its children.\n </p>\n <p>\n Perfect for accordions, collapsible sections, and any UI element that needs smooth\n height transitions.\n </p>\n </div>\n </ElasticHeight>\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAoB;CAC1C,IAAM,CAAC,GAAY,KAAiB,EAAS,GAAM;AAEnD,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,UAAD;GACE,eAAe,EAAc,CAAC,EAAW;GACzC,WAAU;aAET,IAAa,aAAa;GACpB,CAAA,EACT,kBAAC,GAAD;GAA2B;GAAY,WAAU;GAAoB,KAAK;aACxE,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,KAAD;MAAG,WAAU;gBAAgB;MAAsB,CAAA;KACnD,kBAAC,KAAD,EAAA,UAAG,4JAGC,CAAA;KACJ,kBAAC,KAAD,EAAA,UAAG,0GAGC,CAAA;;;GAEQ,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FrameDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Frame as e } from "../ui/Frame.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/frame-demo.tsx
|
|
5
|
+
function n() {
|
|
6
|
+
return /* @__PURE__ */ t(e, {
|
|
7
|
+
format: "horizontal",
|
|
8
|
+
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4",
|
|
9
|
+
alt: "Mountain landscape",
|
|
10
|
+
title: "Mountain Resort",
|
|
11
|
+
subtitle: "Winter",
|
|
12
|
+
className: "max-w-380"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as default };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=frame-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame-demo.js","names":[],"sources":["../../lib/examples/frame-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Frame } from '@/ui/Frame';\n\nexport default function FrameDemo() {\n return (\n <Frame\n format=\"horizontal\"\n src=\"https://images.unsplash.com/photo-1506905925346-21bda4d32df4\"\n alt=\"Mountain landscape\"\n title=\"Mountain Resort\"\n subtitle=\"Winter\"\n className=\"max-w-380\"\n />\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAY;AAClC,QACE,kBAAC,GAAD;EACE,QAAO;EACP,KAAI;EACJ,KAAI;EACJ,OAAM;EACN,UAAS;EACT,WAAU;EACV,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FrameHorizontalDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Frame as e } from "../ui/Frame.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/frame-horizontal-demo.tsx
|
|
5
|
+
function n() {
|
|
6
|
+
return /* @__PURE__ */ t(e, {
|
|
7
|
+
format: "horizontal",
|
|
8
|
+
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4",
|
|
9
|
+
alt: "Mountain landscape",
|
|
10
|
+
title: "Alpine Adventures",
|
|
11
|
+
subtitle: "Explore",
|
|
12
|
+
className: "max-w-380"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as default };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=frame-horizontal-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame-horizontal-demo.js","names":[],"sources":["../../lib/examples/frame-horizontal-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Frame } from '@/ui/Frame';\n\nexport default function FrameHorizontalDemo() {\n return (\n <Frame\n format=\"horizontal\"\n src=\"https://images.unsplash.com/photo-1506905925346-21bda4d32df4\"\n alt=\"Mountain landscape\"\n title=\"Alpine Adventures\"\n subtitle=\"Explore\"\n className=\"max-w-380\"\n />\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAsB;AAC5C,QACE,kBAAC,GAAD;EACE,QAAO;EACP,KAAI;EACJ,KAAI;EACJ,OAAM;EACN,UAAS;EACT,WAAU;EACV,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FrameVerticalDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Frame as e } from "../ui/Frame.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/frame-vertical-demo.tsx
|
|
5
|
+
function n() {
|
|
6
|
+
return /* @__PURE__ */ t(e, {
|
|
7
|
+
format: "vertical",
|
|
8
|
+
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4",
|
|
9
|
+
alt: "Mountain landscape",
|
|
10
|
+
title: "Ski Resort",
|
|
11
|
+
subtitle: "Winter",
|
|
12
|
+
className: "max-w-280"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as default };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=frame-vertical-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame-vertical-demo.js","names":[],"sources":["../../lib/examples/frame-vertical-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Frame } from '@/ui/Frame';\n\nexport default function FrameVerticalDemo() {\n return (\n <Frame\n format=\"vertical\"\n src=\"https://images.unsplash.com/photo-1506905925346-21bda4d32df4\"\n alt=\"Mountain landscape\"\n title=\"Ski Resort\"\n subtitle=\"Winter\"\n className=\"max-w-280\"\n />\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAoB;AAC1C,QACE,kBAAC,GAAD;EACE,QAAO;EACP,KAAI;EACJ,KAAI;EACJ,OAAM;EACN,UAAS;EACT,WAAU;EACV,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FrameWithTagDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Tag as e } from "../ui/Tag.js";
|
|
3
|
+
import { Frame as t } from "../ui/Frame.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/examples/frame-with-tag-demo.tsx
|
|
6
|
+
function r() {
|
|
7
|
+
return /* @__PURE__ */ n(t, {
|
|
8
|
+
format: "horizontal",
|
|
9
|
+
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4",
|
|
10
|
+
alt: "Mountain landscape",
|
|
11
|
+
title: "Mountain Resort",
|
|
12
|
+
subtitle: "Winter",
|
|
13
|
+
className: "max-w-380",
|
|
14
|
+
children: /* @__PURE__ */ n(e, {
|
|
15
|
+
label: "Best Seller",
|
|
16
|
+
className: "mx-12 mt-12 self-start px-8 sm:mx-24 sm:mt-24 sm:px-16"
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as default };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=frame-with-tag-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame-with-tag-demo.js","names":[],"sources":["../../lib/examples/frame-with-tag-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Frame } from '@/ui/Frame';\nimport { Tag } from '@/ui/Tag';\n\nexport default function FrameWithTagDemo() {\n return (\n <Frame\n format=\"horizontal\"\n src=\"https://images.unsplash.com/photo-1506905925346-21bda4d32df4\"\n alt=\"Mountain landscape\"\n title=\"Mountain Resort\"\n subtitle=\"Winter\"\n className=\"max-w-380\"\n >\n <Tag label=\"Best Seller\" className=\"mx-12 mt-12 self-start px-8 sm:mx-24 sm:mt-24 sm:px-16\" />\n </Frame>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAmB;AACzC,QACE,kBAAC,GAAD;EACE,QAAO;EACP,KAAI;EACJ,KAAI;EACJ,OAAM;EACN,UAAS;EACT,WAAU;YAEV,kBAAC,GAAD;GAAK,OAAM;GAAc,WAAU;GAA2D,CAAA;EACxF,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clubmed/trident-ui",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shared ClubMed React UI components",
|
|
6
6
|
"keywords": [
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@clubmed/trident-icons": ">=1.7.1",
|
|
94
94
|
"@tailwindcss/vite": "4.1.18",
|
|
95
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
95
96
|
"add": "^2.0.6",
|
|
96
97
|
"autoprefixer": "^10.4.17",
|
|
97
98
|
"change-case": "^5.4.3",
|
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,12 @@
|
|
|
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
|
+
/*
|
|
103
|
+
Transitioning from Infinity*1px to another value causes jumps in the layout
|
|
104
|
+
This is not ideal, but currently necessary to achieve a pill that can transition to other border-radius values without jank.
|
|
105
|
+
*/
|
|
106
|
+
--radius-pill-transitionable: 8rem;
|
|
102
107
|
--radius-full: 100%;
|
|
103
108
|
|
|
104
109
|
/* Breakpoints */
|
|
@@ -143,32 +148,32 @@
|
|
|
143
148
|
--transition-duration-boop: 0.4s;
|
|
144
149
|
|
|
145
150
|
--animate-none: none;
|
|
146
|
-
--animate-
|
|
147
|
-
--animate-
|
|
148
|
-
--animate-
|
|
149
|
-
--animate-
|
|
151
|
+
--animate-backdrop-fade-in: backdrop-fade-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* NOT IN DCX */
|
|
152
|
+
--animate-backdrop-fade-out: backdrop-fade-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards; /* NOT IN DCX */
|
|
153
|
+
--animate-backdrop-sweep-in: backdrop-sweep-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* NOT IN DCX */
|
|
154
|
+
--animate-backdrop-sweep-out: backdrop-sweep-out 260ms cubic-bezier(0.4, 0, 1, 1) forwards; /* NOT IN DCX */
|
|
150
155
|
--animate-boop: boop 230ms cubic-bezier(0.76, 0.24, 0.65, 0.85) normal both;
|
|
151
156
|
--animate-bounce: bounce 1s infinite; /* NOT IN DCX */
|
|
152
|
-
--animate-
|
|
153
|
-
--animate-
|
|
154
|
-
--animate-
|
|
157
|
+
--animate-bounce-enter: bounce-enter 500ms linear;
|
|
158
|
+
--animate-bounce-enter-strong: bounce-enter-strong 600ms linear;
|
|
159
|
+
--animate-bounce-exit: bounce-exit 500ms linear;
|
|
155
160
|
--animate-filling: filling 10s linear;
|
|
156
|
-
--animate-
|
|
161
|
+
--animate-loader-dash: loader-dash 1.5s ease-in-out infinite;
|
|
157
162
|
--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; /* NOT IN DCX */
|
|
158
163
|
--animate-pulsation: pulsation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
159
164
|
--animate-pulse: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
160
|
-
--animate-
|
|
161
|
-
--animate-
|
|
162
|
-
--animate-
|
|
163
|
-
--animate-
|
|
164
|
-
--animate-
|
|
165
|
+
--animate-rotates-in: rotates-in 0.4s ease-in-out;
|
|
166
|
+
--animate-slide-down: slide-down 0.5s ease-out;
|
|
167
|
+
--animate-slide-right-enter: slide-right-enter 0.4s ease;
|
|
168
|
+
--animate-slide-right-exit: slide-right-exit 0.4s ease;
|
|
169
|
+
--animate-slide-up: slide-up 0.5s ease-out;
|
|
165
170
|
--animate-spin: spin 1s linear infinite;
|
|
166
171
|
--animate-tick: tick 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
|
|
167
|
-
--animate-
|
|
168
|
-
--animate-
|
|
172
|
+
--animate-toast-enter: toast-enter 0.4s ease; /* NOT IN DCX */
|
|
173
|
+
--animate-toast-exit: toast-exit 0.4s ease; /* NOT IN DCX */
|
|
169
174
|
--animate-tock: tock 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
|
|
170
175
|
--animate-wave: wave 4s linear infinite;
|
|
171
|
-
--animate-
|
|
172
|
-
--animate-
|
|
176
|
+
--animate-zoom-in: zoom-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* NOT IN DCX */
|
|
177
|
+
--animate-zoom-out: zoom-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards; /* NOT IN DCX */
|
|
173
178
|
--animate-wiggle: wiggle 0.75s ease-in-out;
|
|
174
179
|
}
|
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) {
|