@cognite/aura 1.46768.0 → 1.46840.0
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/DESIGN.md +12 -0
- package/dist/components/ui/core/alert/alert.gallery.d.ts +2 -0
- package/dist/components/ui/core/alert/alert.gallery.js +54 -0
- package/dist/components/ui/core/alert/alert.gallery.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.gallery.d.ts +2 -0
- package/dist/components/ui/core/avatar/avatar.gallery.js +67 -0
- package/dist/components/ui/core/avatar/avatar.gallery.js.map +1 -0
- package/dist/components/ui/core/badge/badge.gallery.d.ts +2 -0
- package/dist/components/ui/core/badge/badge.gallery.js +64 -0
- package/dist/components/ui/core/badge/badge.gallery.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.gallery.d.ts +2 -0
- package/dist/components/ui/core/checkbox/checkbox.gallery.js +36 -0
- package/dist/components/ui/core/checkbox/checkbox.gallery.js.map +1 -0
- package/dist/components/ui/core/switch/switch.gallery.d.ts +2 -0
- package/dist/components/ui/core/switch/switch.gallery.js +67 -0
- package/dist/components/ui/core/switch/switch.gallery.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/core/alert/alert.md +46 -0
- package/src/components/ui/core/avatar/avatar.md +30 -0
- package/src/components/ui/core/badge/badge.md +32 -0
- package/src/components/ui/core/checkbox/checkbox.md +37 -0
- package/src/components/ui/core/switch/switch.md +26 -0
package/DESIGN.md
CHANGED
|
@@ -991,6 +991,12 @@ Anytime you need to reference a component in Storybook, use the following URL an
|
|
|
991
991
|
|
|
992
992
|
Anytime you need to reference a component in docs, use the following URL and replace the slug with the component's doc slug: https://docs.cognite.com/aura-design-system/primitives/{docs-slug}
|
|
993
993
|
|
|
994
|
+
#### Component guidance files
|
|
995
|
+
|
|
996
|
+
Some components have full usage guidance in a Markdown file next to their source, linked from their section below as **Full guidance**.
|
|
997
|
+
These files ship in the npm package and are importable as `@cognite/aura/docs/{component}`, with a matching example gallery at `@cognite/aura/examples/{component}`.
|
|
998
|
+
When a component has a guidance file, treat it as the primary reference and its section below as a summary.
|
|
999
|
+
|
|
994
1000
|
#### Accordion
|
|
995
1001
|
|
|
996
1002
|
**Storybook-slug:** accordion
|
|
@@ -1068,6 +1074,7 @@ Action toolbar is a transient bottom-aligned action row that appears when users
|
|
|
1068
1074
|
|
|
1069
1075
|
**Storybook-slug:** alert
|
|
1070
1076
|
**Docs-slug:** alert
|
|
1077
|
+
**Full guidance:** [alert.md](./src/components/ui/core/alert/alert.md)
|
|
1071
1078
|
|
|
1072
1079
|
**Definition**
|
|
1073
1080
|
Alert communicates contextual, medium-emphasis information inside page/task flow. It is not a blocking modal.
|
|
@@ -1126,6 +1133,7 @@ Short, focused confirmation or acknowledgment that interrupts the user for a cle
|
|
|
1126
1133
|
|
|
1127
1134
|
**Storybook-slug:** avatar
|
|
1128
1135
|
**Docs-slug:** avatar
|
|
1136
|
+
**Full guidance:** [avatar.md](./src/components/ui/core/avatar/avatar.md)
|
|
1129
1137
|
|
|
1130
1138
|
**Definition**
|
|
1131
1139
|
Avatar visually represents a user, team, or concept and helps recognition in collaborative UI.
|
|
@@ -1151,6 +1159,7 @@ Avatar visually represents a user, team, or concept and helps recognition in col
|
|
|
1151
1159
|
|
|
1152
1160
|
**Storybook-slug:** badge
|
|
1153
1161
|
**Docs-slug:** badge
|
|
1162
|
+
**Full guidance:** [badge.md](./src/components/ui/core/badge/badge.md)
|
|
1154
1163
|
|
|
1155
1164
|
**Definition**
|
|
1156
1165
|
Compact label for status, category, or metadata.
|
|
@@ -1227,6 +1236,7 @@ Hierarchical navigation aid that shows users their current location within the p
|
|
|
1227
1236
|
|
|
1228
1237
|
**Storybook-slug:** button
|
|
1229
1238
|
**Docs-slug:** button
|
|
1239
|
+
**Full guidance:** [button.md](./src/components/ui/core/button/button.md)
|
|
1230
1240
|
|
|
1231
1241
|
**Definition**
|
|
1232
1242
|
Primary control for discrete actions.
|
|
@@ -1299,6 +1309,7 @@ A structural container with optional header, body, and footer slots for displayi
|
|
|
1299
1309
|
|
|
1300
1310
|
**Storybook-slug:** checkbox
|
|
1301
1311
|
**Docs-slug:** checkbox
|
|
1312
|
+
**Full guidance:** [checkbox.md](./src/components/ui/core/checkbox/checkbox.md)
|
|
1302
1313
|
|
|
1303
1314
|
**Definition**
|
|
1304
1315
|
Enables users to independently select one or multiple options. Can appear standalone or within menus, tree views, tables, or cards.
|
|
@@ -2074,6 +2085,7 @@ Lightweight, auto-dismiss feedback for outcomes that do not need a blocking surf
|
|
|
2074
2085
|
|
|
2075
2086
|
**Storybook-slug:** switch
|
|
2076
2087
|
**Docs-slug:** switch
|
|
2088
|
+
**Full guidance:** [switch.md](./src/components/ui/core/switch/switch.md)
|
|
2077
2089
|
|
|
2078
2090
|
**Definition**
|
|
2079
2091
|
A binary toggle control that turns a setting on or off, with changes taking effect immediately.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Alert, AlertDescription, AlertTitle } from "./alert.js";
|
|
3
|
+
export function AlertGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
5
|
+
className: "w-100 space-y-4",
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ _jsxs(Alert, {
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ _jsx(AlertTitle, {
|
|
10
|
+
children: "Default Alert"
|
|
11
|
+
}),
|
|
12
|
+
/*#__PURE__*/ _jsx(AlertDescription, {
|
|
13
|
+
children: "This is the default alert style."
|
|
14
|
+
})
|
|
15
|
+
]
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ _jsxs(Alert, {
|
|
18
|
+
variant: "info",
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(AlertTitle, {
|
|
21
|
+
children: "Info Alert"
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx(AlertDescription, {
|
|
24
|
+
children: "This is the info alert style."
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ _jsxs(Alert, {
|
|
29
|
+
variant: "warning",
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx(AlertTitle, {
|
|
32
|
+
children: "Warning Alert"
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ _jsx(AlertDescription, {
|
|
35
|
+
children: "This is the warning alert style."
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ _jsxs(Alert, {
|
|
40
|
+
variant: "error",
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsx(AlertTitle, {
|
|
43
|
+
children: "Error Alert"
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/ _jsx(AlertDescription, {
|
|
46
|
+
children: "This is the error alert style."
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=alert.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/alert/alert.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Alert, AlertDescription, AlertTitle } from './alert';\n\nexport function AlertGallery(): ReactElement {\n return (\n <div className=\"w-100 space-y-4\">\n <Alert>\n <AlertTitle>Default Alert</AlertTitle>\n <AlertDescription>This is the default alert style.</AlertDescription>\n </Alert>\n <Alert variant=\"info\">\n <AlertTitle>Info Alert</AlertTitle>\n <AlertDescription>This is the info alert style.</AlertDescription>\n </Alert>\n <Alert variant=\"warning\">\n <AlertTitle>Warning Alert</AlertTitle>\n <AlertDescription>This is the warning alert style.</AlertDescription>\n </Alert>\n <Alert variant=\"error\">\n <AlertTitle>Error Alert</AlertTitle>\n <AlertDescription>This is the error alert style.</AlertDescription>\n </Alert>\n </div>\n );\n}\n"],"names":["Alert","AlertDescription","AlertTitle","AlertGallery","div","className","variant"],"mappings":";AAEA,SAASA,KAAK,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,aAAU;AAE9D,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,MAACL;;kCACC,KAACE;kCAAW;;kCACZ,KAACD;kCAAiB;;;;0BAEpB,MAACD;gBAAMM,SAAQ;;kCACb,KAACJ;kCAAW;;kCACZ,KAACD;kCAAiB;;;;0BAEpB,MAACD;gBAAMM,SAAQ;;kCACb,KAACJ;kCAAW;;kCACZ,KAACD;kCAAiB;;;;0BAEpB,MAACD;gBAAMM,SAAQ;;kCACb,KAACJ;kCAAW;;kCACZ,KAACD;kCAAiB;;;;;;AAI1B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar, AvatarFallback } from "./avatar.js";
|
|
3
|
+
export function AvatarGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
5
|
+
className: "flex flex-wrap gap-4",
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
8
|
+
variant: "decorative-1",
|
|
9
|
+
"aria-label": "Mountain decorative avatar",
|
|
10
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
11
|
+
children: "PJ"
|
|
12
|
+
})
|
|
13
|
+
}),
|
|
14
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
15
|
+
variant: "decorative-2",
|
|
16
|
+
"aria-label": "Fjord decorative avatar",
|
|
17
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
18
|
+
children: "PJ"
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
22
|
+
variant: "decorative-3",
|
|
23
|
+
"aria-label": "Nordic decorative avatar",
|
|
24
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
25
|
+
children: "PJ"
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
29
|
+
variant: "decorative-4",
|
|
30
|
+
"aria-label": "Aurora decorative avatar",
|
|
31
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
32
|
+
children: "PJ"
|
|
33
|
+
})
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
36
|
+
variant: "decorative-5",
|
|
37
|
+
"aria-label": "Dusk decorative avatar",
|
|
38
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
39
|
+
children: "PJ"
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
43
|
+
variant: "decorative-6",
|
|
44
|
+
"aria-label": "Amber decorative avatar",
|
|
45
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
46
|
+
children: "PJ"
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
50
|
+
variant: "decorative-7",
|
|
51
|
+
"aria-label": "Pink decorative avatar",
|
|
52
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
53
|
+
children: "PJ"
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ _jsx(Avatar, {
|
|
57
|
+
variant: "overflow",
|
|
58
|
+
"aria-label": "Overflow colorway avatar",
|
|
59
|
+
children: /*#__PURE__*/ _jsx(AvatarFallback, {
|
|
60
|
+
children: "+4"
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=avatar.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/avatar/avatar.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Avatar, AvatarFallback } from './avatar';\n\nexport function AvatarGallery(): ReactElement {\n return (\n <div className=\"flex flex-wrap gap-4\">\n <Avatar variant=\"decorative-1\" aria-label=\"Mountain decorative avatar\">\n <AvatarFallback>PJ</AvatarFallback>\n </Avatar>\n <Avatar variant=\"decorative-2\" aria-label=\"Fjord decorative avatar\">\n <AvatarFallback>PJ</AvatarFallback>\n </Avatar>\n <Avatar variant=\"decorative-3\" aria-label=\"Nordic decorative avatar\">\n <AvatarFallback>PJ</AvatarFallback>\n </Avatar>\n <Avatar variant=\"decorative-4\" aria-label=\"Aurora decorative avatar\">\n <AvatarFallback>PJ</AvatarFallback>\n </Avatar>\n <Avatar variant=\"decorative-5\" aria-label=\"Dusk decorative avatar\">\n <AvatarFallback>PJ</AvatarFallback>\n </Avatar>\n <Avatar variant=\"decorative-6\" aria-label=\"Amber decorative avatar\">\n <AvatarFallback>PJ</AvatarFallback>\n </Avatar>\n <Avatar variant=\"decorative-7\" aria-label=\"Pink decorative avatar\">\n <AvatarFallback>PJ</AvatarFallback>\n </Avatar>\n <Avatar variant=\"overflow\" aria-label=\"Overflow colorway avatar\">\n <AvatarFallback>+4</AvatarFallback>\n </Avatar>\n </div>\n );\n}\n"],"names":["Avatar","AvatarFallback","AvatarGallery","div","className","variant","aria-label"],"mappings":";AAEA,SAASA,MAAM,EAAEC,cAAc,QAAQ,cAAW;AAElD,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,KAACJ;gBAAOK,SAAQ;gBAAeC,cAAW;0BACxC,cAAA,KAACL;8BAAe;;;0BAElB,KAACD;gBAAOK,SAAQ;gBAAeC,cAAW;0BACxC,cAAA,KAACL;8BAAe;;;0BAElB,KAACD;gBAAOK,SAAQ;gBAAeC,cAAW;0BACxC,cAAA,KAACL;8BAAe;;;0BAElB,KAACD;gBAAOK,SAAQ;gBAAeC,cAAW;0BACxC,cAAA,KAACL;8BAAe;;;0BAElB,KAACD;gBAAOK,SAAQ;gBAAeC,cAAW;0BACxC,cAAA,KAACL;8BAAe;;;0BAElB,KAACD;gBAAOK,SAAQ;gBAAeC,cAAW;0BACxC,cAAA,KAACL;8BAAe;;;0BAElB,KAACD;gBAAOK,SAAQ;gBAAeC,cAAW;0BACxC,cAAA,KAACL;8BAAe;;;0BAElB,KAACD;gBAAOK,SAAQ;gBAAWC,cAAW;0BACpC,cAAA,KAACL;8BAAe;;;;;AAIxB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconAlertTriangle, IconArchive, IconCircleCheck, IconHexagon, IconInnerShadowTopLeft } from "@tabler/icons-react";
|
|
3
|
+
import { Badge } from "./badge.js";
|
|
4
|
+
export function BadgeGallery() {
|
|
5
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
6
|
+
className: "flex max-w-120 flex-wrap justify-center gap-2",
|
|
7
|
+
children: [
|
|
8
|
+
/*#__PURE__*/ _jsx(Badge, {
|
|
9
|
+
variant: "decorative-1",
|
|
10
|
+
children: "Decorative 1"
|
|
11
|
+
}),
|
|
12
|
+
/*#__PURE__*/ _jsx(Badge, {
|
|
13
|
+
variant: "decorative-3",
|
|
14
|
+
children: "Decorative 3"
|
|
15
|
+
}),
|
|
16
|
+
/*#__PURE__*/ _jsx(Badge, {
|
|
17
|
+
variant: "decorative-5",
|
|
18
|
+
children: "Decorative 5"
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsxs(Badge, {
|
|
21
|
+
variant: "inProgress",
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ _jsx(IconInnerShadowTopLeft, {}),
|
|
24
|
+
"In progress"
|
|
25
|
+
]
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ _jsxs(Badge, {
|
|
28
|
+
variant: "success",
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ _jsx(IconCircleCheck, {}),
|
|
31
|
+
"Success"
|
|
32
|
+
]
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ _jsxs(Badge, {
|
|
35
|
+
variant: "warning",
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ _jsx(IconAlertTriangle, {}),
|
|
38
|
+
"Warning"
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsxs(Badge, {
|
|
42
|
+
variant: "error",
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ _jsx(IconHexagon, {}),
|
|
45
|
+
"Error"
|
|
46
|
+
]
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ _jsxs(Badge, {
|
|
49
|
+
variant: "archived",
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ _jsx(IconArchive, {}),
|
|
52
|
+
"Archived"
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ _jsx(Badge, {
|
|
56
|
+
variant: "secondary",
|
|
57
|
+
dot: true,
|
|
58
|
+
children: "12"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=badge.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/badge/badge.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport {\n IconAlertTriangle,\n IconArchive,\n IconCircleCheck,\n IconHexagon,\n IconInnerShadowTopLeft,\n} from '@tabler/icons-react';\n\nimport { Badge } from './badge';\n\nexport function BadgeGallery(): ReactElement {\n return (\n <div className=\"flex max-w-120 flex-wrap justify-center gap-2\">\n <Badge variant=\"decorative-1\">Decorative 1</Badge>\n <Badge variant=\"decorative-3\">Decorative 3</Badge>\n <Badge variant=\"decorative-5\">Decorative 5</Badge>\n <Badge variant=\"inProgress\">\n <IconInnerShadowTopLeft />\n In progress\n </Badge>\n <Badge variant=\"success\">\n <IconCircleCheck />\n Success\n </Badge>\n <Badge variant=\"warning\">\n <IconAlertTriangle />\n Warning\n </Badge>\n <Badge variant=\"error\">\n <IconHexagon />\n Error\n </Badge>\n <Badge variant=\"archived\">\n <IconArchive />\n Archived\n </Badge>\n <Badge variant=\"secondary\" dot>\n 12\n </Badge>\n </div>\n );\n}\n"],"names":["IconAlertTriangle","IconArchive","IconCircleCheck","IconHexagon","IconInnerShadowTopLeft","Badge","BadgeGallery","div","className","variant","dot"],"mappings":";AAEA,SACEA,iBAAiB,EACjBC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,sBAAsB,QACjB,sBAAsB;AAE7B,SAASC,KAAK,QAAQ,aAAU;AAEhC,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,KAACH;gBAAMI,SAAQ;0BAAe;;0BAC9B,KAACJ;gBAAMI,SAAQ;0BAAe;;0BAC9B,KAACJ;gBAAMI,SAAQ;0BAAe;;0BAC9B,MAACJ;gBAAMI,SAAQ;;kCACb,KAACL;oBAAyB;;;0BAG5B,MAACC;gBAAMI,SAAQ;;kCACb,KAACP;oBAAkB;;;0BAGrB,MAACG;gBAAMI,SAAQ;;kCACb,KAACT;oBAAoB;;;0BAGvB,MAACK;gBAAMI,SAAQ;;kCACb,KAACN;oBAAc;;;0BAGjB,MAACE;gBAAMI,SAAQ;;kCACb,KAACR;oBAAc;;;0BAGjB,KAACI;gBAAMI,SAAQ;gBAAYC,GAAG;0BAAC;;;;AAKrC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CheckboxGroup, CheckboxItem, CheckboxItemControl, CheckboxItemLabel } from "./checkbox.js";
|
|
3
|
+
export function CheckboxGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs(CheckboxGroup, {
|
|
5
|
+
children: [
|
|
6
|
+
/*#__PURE__*/ _jsxs(CheckboxItem, {
|
|
7
|
+
children: [
|
|
8
|
+
/*#__PURE__*/ _jsx(CheckboxItemControl, {
|
|
9
|
+
defaultChecked: true
|
|
10
|
+
}),
|
|
11
|
+
/*#__PURE__*/ _jsx(CheckboxItemLabel, {
|
|
12
|
+
children: "Option 1"
|
|
13
|
+
})
|
|
14
|
+
]
|
|
15
|
+
}),
|
|
16
|
+
/*#__PURE__*/ _jsxs(CheckboxItem, {
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ _jsx(CheckboxItemControl, {}),
|
|
19
|
+
/*#__PURE__*/ _jsx(CheckboxItemLabel, {
|
|
20
|
+
children: "Option 2"
|
|
21
|
+
})
|
|
22
|
+
]
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ _jsxs(CheckboxItem, {
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ _jsx(CheckboxItemControl, {}),
|
|
27
|
+
/*#__PURE__*/ _jsx(CheckboxItemLabel, {
|
|
28
|
+
children: "Option 3"
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=checkbox.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/checkbox/checkbox.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport {\n CheckboxGroup,\n CheckboxItem,\n CheckboxItemControl,\n CheckboxItemLabel,\n} from './checkbox';\n\nexport function CheckboxGallery(): ReactElement {\n return (\n <CheckboxGroup>\n <CheckboxItem>\n <CheckboxItemControl defaultChecked />\n <CheckboxItemLabel>Option 1</CheckboxItemLabel>\n </CheckboxItem>\n <CheckboxItem>\n <CheckboxItemControl />\n <CheckboxItemLabel>Option 2</CheckboxItemLabel>\n </CheckboxItem>\n <CheckboxItem>\n <CheckboxItemControl />\n <CheckboxItemLabel>Option 3</CheckboxItemLabel>\n </CheckboxItem>\n </CheckboxGroup>\n );\n}\n"],"names":["CheckboxGroup","CheckboxItem","CheckboxItemControl","CheckboxItemLabel","CheckboxGallery","defaultChecked"],"mappings":";AAEA,SACEA,aAAa,EACbC,YAAY,EACZC,mBAAmB,EACnBC,iBAAiB,QACZ,gBAAa;AAEpB,OAAO,SAASC;IACd,qBACE,MAACJ;;0BACC,MAACC;;kCACC,KAACC;wBAAoBG,cAAc;;kCACnC,KAACF;kCAAkB;;;;0BAErB,MAACF;;kCACC,KAACC;kCACD,KAACC;kCAAkB;;;;0BAErB,MAACF;;kCACC,KAACC;kCACD,KAACC;kCAAkB;;;;;;AAI3B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Label } from "../label/label.js";
|
|
3
|
+
import { Switch } from "./switch.js";
|
|
4
|
+
export function SwitchGallery() {
|
|
5
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
6
|
+
className: "flex w-48 flex-col items-start",
|
|
7
|
+
children: [
|
|
8
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
9
|
+
className: "flex h-9 w-full items-center gap-3",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
12
|
+
htmlFor: "default-email",
|
|
13
|
+
className: "flex-1 pb-0",
|
|
14
|
+
children: "Email"
|
|
15
|
+
}),
|
|
16
|
+
/*#__PURE__*/ _jsx(Switch, {
|
|
17
|
+
id: "default-email",
|
|
18
|
+
defaultChecked: true
|
|
19
|
+
})
|
|
20
|
+
]
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
23
|
+
className: "flex h-9 w-full items-center gap-3",
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
26
|
+
htmlFor: "default-slack",
|
|
27
|
+
className: "flex-1 pb-0",
|
|
28
|
+
children: "Slack"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ _jsx(Switch, {
|
|
31
|
+
id: "default-slack"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
36
|
+
className: "flex h-9 w-full items-center gap-3",
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
39
|
+
htmlFor: "default-in-app",
|
|
40
|
+
className: "flex-1 pb-0",
|
|
41
|
+
children: "In app"
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsx(Switch, {
|
|
44
|
+
id: "default-in-app",
|
|
45
|
+
defaultChecked: true
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
50
|
+
className: "flex h-9 w-full items-center gap-3",
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
53
|
+
htmlFor: "default-sms",
|
|
54
|
+
className: "flex-1 pb-0",
|
|
55
|
+
children: "SMS"
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsx(Switch, {
|
|
58
|
+
id: "default-sms",
|
|
59
|
+
disabled: true
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=switch.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/switch/switch.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Label } from '../label/label';\n\nimport { Switch } from './switch';\n\nexport function SwitchGallery(): ReactElement {\n return (\n <div className=\"flex w-48 flex-col items-start\">\n <div className=\"flex h-9 w-full items-center gap-3\">\n <Label htmlFor=\"default-email\" className=\"flex-1 pb-0\">\n Email\n </Label>\n <Switch id=\"default-email\" defaultChecked />\n </div>\n <div className=\"flex h-9 w-full items-center gap-3\">\n <Label htmlFor=\"default-slack\" className=\"flex-1 pb-0\">\n Slack\n </Label>\n <Switch id=\"default-slack\" />\n </div>\n <div className=\"flex h-9 w-full items-center gap-3\">\n <Label htmlFor=\"default-in-app\" className=\"flex-1 pb-0\">\n In app\n </Label>\n <Switch id=\"default-in-app\" defaultChecked />\n </div>\n <div className=\"flex h-9 w-full items-center gap-3\">\n <Label htmlFor=\"default-sms\" className=\"flex-1 pb-0\">\n SMS\n </Label>\n <Switch id=\"default-sms\" disabled />\n </div>\n </div>\n );\n}\n"],"names":["Label","Switch","SwitchGallery","div","className","htmlFor","id","defaultChecked","disabled"],"mappings":";AAEA,SAASA,KAAK,QAAQ,oBAAiB;AAEvC,SAASC,MAAM,QAAQ,cAAW;AAElC,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,MAACD;gBAAIC,WAAU;;kCACb,KAACJ;wBAAMK,SAAQ;wBAAgBD,WAAU;kCAAc;;kCAGvD,KAACH;wBAAOK,IAAG;wBAAgBC,cAAc;;;;0BAE3C,MAACJ;gBAAIC,WAAU;;kCACb,KAACJ;wBAAMK,SAAQ;wBAAgBD,WAAU;kCAAc;;kCAGvD,KAACH;wBAAOK,IAAG;;;;0BAEb,MAACH;gBAAIC,WAAU;;kCACb,KAACJ;wBAAMK,SAAQ;wBAAiBD,WAAU;kCAAc;;kCAGxD,KAACH;wBAAOK,IAAG;wBAAiBC,cAAc;;;;0BAE5C,MAACJ;gBAAIC,WAAU;;kCACb,KAACJ;wBAAMK,SAAQ;wBAAcD,WAAU;kCAAc;;kCAGrD,KAACH;wBAAOK,IAAG;wBAAcE,QAAQ;;;;;;AAIzC"}
|