@cognite/aura 1.46870.0 → 1.47006.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 +5 -0
- package/dist/components/ui/core/banner/banner.gallery.d.ts +2 -0
- package/dist/components/ui/core/banner/banner.gallery.js +56 -0
- package/dist/components/ui/core/banner/banner.gallery.js.map +1 -0
- package/dist/components/ui/core/input/input.gallery.d.ts +2 -0
- package/dist/components/ui/core/input/input.gallery.js +89 -0
- package/dist/components/ui/core/input/input.gallery.js.map +1 -0
- package/dist/components/ui/core/label/label.gallery.d.ts +2 -0
- package/dist/components/ui/core/label/label.gallery.js +57 -0
- package/dist/components/ui/core/label/label.gallery.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.gallery.d.ts +2 -0
- package/dist/components/ui/core/radio-group/radio-group.gallery.js +44 -0
- package/dist/components/ui/core/radio-group/radio-group.gallery.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.gallery.d.ts +2 -0
- package/dist/components/ui/core/textarea/textarea.gallery.js +51 -0
- package/dist/components/ui/core/textarea/textarea.gallery.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/core/banner/banner.md +51 -0
- package/src/components/ui/core/input/input.md +48 -0
- package/src/components/ui/core/label/label.md +35 -0
- package/src/components/ui/core/radio-group/radio-group.md +38 -0
- package/src/components/ui/core/textarea/textarea.md +42 -0
package/DESIGN.md
CHANGED
|
@@ -1182,6 +1182,7 @@ Compact label for status, category, or metadata.
|
|
|
1182
1182
|
|
|
1183
1183
|
**Storybook-slug:** banner
|
|
1184
1184
|
**Docs-slug:** banner-alert
|
|
1185
|
+
**Full guidance:** [banner.md](./src/components/ui/core/banner/banner.md)
|
|
1185
1186
|
|
|
1186
1187
|
**Definition**
|
|
1187
1188
|
Persistent or dismissible message scoped at page or section level — stronger than inline helper text, broader than a single-field `Alert` in some layouts.
|
|
@@ -1665,6 +1666,7 @@ A structural wrapper for form fields that manages layout, spacing, validation st
|
|
|
1665
1666
|
|
|
1666
1667
|
**Storybook-slug:** input
|
|
1667
1668
|
**Docs-slug:** input
|
|
1669
|
+
**Full guidance:** [input.md](./src/components/ui/core/input/input.md)
|
|
1668
1670
|
|
|
1669
1671
|
**Definition**
|
|
1670
1672
|
Single-line text field for capturing short text-based information in forms and toolbars.
|
|
@@ -1740,6 +1742,7 @@ A flexible list-row primitive for displaying a title, optional description, lead
|
|
|
1740
1742
|
|
|
1741
1743
|
**Storybook-slug:** label
|
|
1742
1744
|
**Docs-slug:** label
|
|
1745
|
+
**Full guidance:** [label.md](./src/components/ui/core/label/label.md)
|
|
1743
1746
|
|
|
1744
1747
|
**Definition**
|
|
1745
1748
|
A form label that identifies and is programmatically associated with an input field. Not intended as general-purpose text.
|
|
@@ -1862,6 +1865,7 @@ A click-triggered panel for interactive or structured supplemental content. Stay
|
|
|
1862
1865
|
|
|
1863
1866
|
**Storybook-slug:** radio
|
|
1864
1867
|
**Docs-slug:** radio
|
|
1868
|
+
**Full guidance:** [radio-group.md](./src/components/ui/core/radio-group/radio-group.md)
|
|
1865
1869
|
|
|
1866
1870
|
**Definition**
|
|
1867
1871
|
Allows users to select exactly one option from a small set of mutually exclusive choices.
|
|
@@ -2176,6 +2180,7 @@ Organizes related content into switchable sections, allowing users to navigate b
|
|
|
2176
2180
|
|
|
2177
2181
|
**Storybook-slug:** textarea
|
|
2178
2182
|
**Docs-slug:** textarea
|
|
2183
|
+
**Full guidance:** [textarea.md](./src/components/ui/core/textarea/textarea.md)
|
|
2179
2184
|
|
|
2180
2185
|
**Definition**
|
|
2181
2186
|
A multi-line text field for extended free-form input such as comments, feedback, messages, descriptions, or notes.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconAlertCircleFilled, IconAlertTriangleFilled, IconInfoCircleFilled } from "@tabler/icons-react";
|
|
3
|
+
import { Banner, BannerIcon, BannerTitle } from "./banner.js";
|
|
4
|
+
export function BannerGallery() {
|
|
5
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
6
|
+
className: "w-full space-y-4",
|
|
7
|
+
children: [
|
|
8
|
+
/*#__PURE__*/ _jsxs(Banner, {
|
|
9
|
+
variant: "default",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(BannerIcon, {
|
|
12
|
+
icon: IconInfoCircleFilled
|
|
13
|
+
}),
|
|
14
|
+
/*#__PURE__*/ _jsx(BannerTitle, {
|
|
15
|
+
children: "Default variant"
|
|
16
|
+
})
|
|
17
|
+
]
|
|
18
|
+
}),
|
|
19
|
+
/*#__PURE__*/ _jsxs(Banner, {
|
|
20
|
+
variant: "info",
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ _jsx(BannerIcon, {
|
|
23
|
+
icon: IconInfoCircleFilled
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ _jsx(BannerTitle, {
|
|
26
|
+
children: "Info variant"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ _jsxs(Banner, {
|
|
31
|
+
variant: "warning",
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsx(BannerIcon, {
|
|
34
|
+
icon: IconAlertTriangleFilled
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsx(BannerTitle, {
|
|
37
|
+
children: "Warning variant"
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsxs(Banner, {
|
|
42
|
+
variant: "destructive",
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ _jsx(BannerIcon, {
|
|
45
|
+
icon: IconAlertCircleFilled
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ _jsx(BannerTitle, {
|
|
48
|
+
children: "Destructive variant"
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=banner.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/banner/banner.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport {\n IconAlertCircleFilled,\n IconAlertTriangleFilled,\n IconInfoCircleFilled,\n} from '@tabler/icons-react';\n\nimport { Banner, BannerIcon, BannerTitle } from './banner';\n\nexport function BannerGallery(): ReactElement {\n return (\n <div className=\"w-full space-y-4\">\n <Banner variant=\"default\">\n <BannerIcon icon={IconInfoCircleFilled} />\n <BannerTitle>Default variant</BannerTitle>\n </Banner>\n <Banner variant=\"info\">\n <BannerIcon icon={IconInfoCircleFilled} />\n <BannerTitle>Info variant</BannerTitle>\n </Banner>\n <Banner variant=\"warning\">\n <BannerIcon icon={IconAlertTriangleFilled} />\n <BannerTitle>Warning variant</BannerTitle>\n </Banner>\n <Banner variant=\"destructive\">\n <BannerIcon icon={IconAlertCircleFilled} />\n <BannerTitle>Destructive variant</BannerTitle>\n </Banner>\n </div>\n );\n}\n"],"names":["IconAlertCircleFilled","IconAlertTriangleFilled","IconInfoCircleFilled","Banner","BannerIcon","BannerTitle","BannerGallery","div","className","variant","icon"],"mappings":";AAEA,SACEA,qBAAqB,EACrBC,uBAAuB,EACvBC,oBAAoB,QACf,sBAAsB;AAE7B,SAASC,MAAM,EAAEC,UAAU,EAAEC,WAAW,QAAQ,cAAW;AAE3D,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,MAACL;gBAAOM,SAAQ;;kCACd,KAACL;wBAAWM,MAAMR;;kCAClB,KAACG;kCAAY;;;;0BAEf,MAACF;gBAAOM,SAAQ;;kCACd,KAACL;wBAAWM,MAAMR;;kCAClB,KAACG;kCAAY;;;;0BAEf,MAACF;gBAAOM,SAAQ;;kCACd,KAACL;wBAAWM,MAAMT;;kCAClB,KAACI;kCAAY;;;;0BAEf,MAACF;gBAAOM,SAAQ;;kCACd,KAACL;wBAAWM,MAAMV;;kCAClB,KAACK;kCAAY;;;;;;AAIrB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { HelperText } from "../helper-text/helper-text.js";
|
|
4
|
+
import { Label } from "../label/label.js";
|
|
5
|
+
import { Input } from "./input.js";
|
|
6
|
+
export function InputGallery() {
|
|
7
|
+
const id = useId();
|
|
8
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
9
|
+
className: "w-75 space-y-4",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
12
|
+
className: "grid w-full items-center gap-1",
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
15
|
+
htmlFor: `${id}-default`,
|
|
16
|
+
children: "Default"
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
19
|
+
id: `${id}-default`,
|
|
20
|
+
placeholder: "Placeholder"
|
|
21
|
+
})
|
|
22
|
+
]
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
25
|
+
className: "grid w-full items-center gap-1",
|
|
26
|
+
children: [
|
|
27
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
28
|
+
htmlFor: `${id}-filled`,
|
|
29
|
+
children: "Filled"
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
32
|
+
id: `${id}-filled`,
|
|
33
|
+
defaultValue: "Input text"
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
38
|
+
className: "group grid w-full items-center gap-1",
|
|
39
|
+
"data-disabled": "true",
|
|
40
|
+
children: [
|
|
41
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
42
|
+
htmlFor: `${id}-disabled`,
|
|
43
|
+
children: "Disabled"
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
46
|
+
id: `${id}-disabled`,
|
|
47
|
+
placeholder: "Placeholder",
|
|
48
|
+
disabled: true
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
53
|
+
className: "grid w-full items-center gap-1",
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
56
|
+
htmlFor: `${id}-readonly`,
|
|
57
|
+
children: "Read-only"
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
60
|
+
id: `${id}-readonly`,
|
|
61
|
+
defaultValue: "Input text",
|
|
62
|
+
readOnly: true
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
}),
|
|
66
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
67
|
+
className: "grid w-full items-center gap-1",
|
|
68
|
+
children: [
|
|
69
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
70
|
+
htmlFor: `${id}-error`,
|
|
71
|
+
children: "Error"
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
74
|
+
id: `${id}-error`,
|
|
75
|
+
placeholder: "Placeholder",
|
|
76
|
+
"aria-invalid": true
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ _jsx(HelperText, {
|
|
79
|
+
isError: true,
|
|
80
|
+
className: "pt-1",
|
|
81
|
+
children: "Help text"
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=input.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/input/input.gallery.tsx"],"sourcesContent":["import { type ReactElement, useId } from 'react';\n\nimport { HelperText } from '../helper-text/helper-text';\nimport { Label } from '../label/label';\n\nimport { Input } from './input';\n\nexport function InputGallery(): ReactElement {\n const id = useId();\n\n return (\n <div className=\"w-75 space-y-4\">\n <div className=\"grid w-full items-center gap-1\">\n <Label htmlFor={`${id}-default`}>Default</Label>\n <Input id={`${id}-default`} placeholder=\"Placeholder\" />\n </div>\n <div className=\"grid w-full items-center gap-1\">\n <Label htmlFor={`${id}-filled`}>Filled</Label>\n <Input id={`${id}-filled`} defaultValue=\"Input text\" />\n </div>\n <div\n className=\"group grid w-full items-center gap-1\"\n data-disabled=\"true\"\n >\n <Label htmlFor={`${id}-disabled`}>Disabled</Label>\n <Input id={`${id}-disabled`} placeholder=\"Placeholder\" disabled />\n </div>\n <div className=\"grid w-full items-center gap-1\">\n <Label htmlFor={`${id}-readonly`}>Read-only</Label>\n <Input id={`${id}-readonly`} defaultValue=\"Input text\" readOnly />\n </div>\n <div className=\"grid w-full items-center gap-1\">\n <Label htmlFor={`${id}-error`}>Error</Label>\n <Input id={`${id}-error`} placeholder=\"Placeholder\" aria-invalid />\n <HelperText isError className=\"pt-1\">\n Help text\n </HelperText>\n </div>\n </div>\n );\n}\n"],"names":["useId","HelperText","Label","Input","InputGallery","id","div","className","htmlFor","placeholder","defaultValue","data-disabled","disabled","readOnly","aria-invalid","isError"],"mappings":";AAAA,SAA4BA,KAAK,QAAQ,QAAQ;AAEjD,SAASC,UAAU,QAAQ,gCAA6B;AACxD,SAASC,KAAK,QAAQ,oBAAiB;AAEvC,SAASC,KAAK,QAAQ,aAAU;AAEhC,OAAO,SAASC;IACd,MAAMC,KAAKL;IAEX,qBACE,MAACM;QAAIC,WAAU;;0BACb,MAACD;gBAAIC,WAAU;;kCACb,KAACL;wBAAMM,SAAS,GAAGH,GAAG,QAAQ,CAAC;kCAAE;;kCACjC,KAACF;wBAAME,IAAI,GAAGA,GAAG,QAAQ,CAAC;wBAAEI,aAAY;;;;0BAE1C,MAACH;gBAAIC,WAAU;;kCACb,KAACL;wBAAMM,SAAS,GAAGH,GAAG,OAAO,CAAC;kCAAE;;kCAChC,KAACF;wBAAME,IAAI,GAAGA,GAAG,OAAO,CAAC;wBAAEK,cAAa;;;;0BAE1C,MAACJ;gBACCC,WAAU;gBACVI,iBAAc;;kCAEd,KAACT;wBAAMM,SAAS,GAAGH,GAAG,SAAS,CAAC;kCAAE;;kCAClC,KAACF;wBAAME,IAAI,GAAGA,GAAG,SAAS,CAAC;wBAAEI,aAAY;wBAAcG,QAAQ;;;;0BAEjE,MAACN;gBAAIC,WAAU;;kCACb,KAACL;wBAAMM,SAAS,GAAGH,GAAG,SAAS,CAAC;kCAAE;;kCAClC,KAACF;wBAAME,IAAI,GAAGA,GAAG,SAAS,CAAC;wBAAEK,cAAa;wBAAaG,QAAQ;;;;0BAEjE,MAACP;gBAAIC,WAAU;;kCACb,KAACL;wBAAMM,SAAS,GAAGH,GAAG,MAAM,CAAC;kCAAE;;kCAC/B,KAACF;wBAAME,IAAI,GAAGA,GAAG,MAAM,CAAC;wBAAEI,aAAY;wBAAcK,cAAY;;kCAChE,KAACb;wBAAWc,OAAO;wBAACR,WAAU;kCAAO;;;;;;AAM7C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { Input } from "../input/input.js";
|
|
4
|
+
import { Label } from "./label.js";
|
|
5
|
+
export function LabelGallery() {
|
|
6
|
+
const id = useId();
|
|
7
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
8
|
+
className: "w-75 space-y-4",
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
11
|
+
className: "grid w-full items-center gap-1",
|
|
12
|
+
children: [
|
|
13
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
14
|
+
htmlFor: `${id}-name`,
|
|
15
|
+
children: "Name"
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
18
|
+
id: `${id}-name`,
|
|
19
|
+
placeholder: "Enter name"
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
24
|
+
className: "grid w-full items-center gap-1",
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
27
|
+
htmlFor: `${id}-email`,
|
|
28
|
+
required: true,
|
|
29
|
+
children: "Email address"
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
32
|
+
id: `${id}-email`,
|
|
33
|
+
type: "email",
|
|
34
|
+
required: true
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
39
|
+
className: "group grid w-full items-center gap-1",
|
|
40
|
+
"data-disabled": "true",
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
43
|
+
htmlFor: `${id}-workspace`,
|
|
44
|
+
children: "Workspace"
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
47
|
+
id: `${id}-workspace`,
|
|
48
|
+
defaultValue: "Default",
|
|
49
|
+
disabled: true
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=label.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/label/label.gallery.tsx"],"sourcesContent":["import { type ReactElement, useId } from 'react';\n\nimport { Input } from '../input/input';\n\nimport { Label } from './label';\n\nexport function LabelGallery(): ReactElement {\n const id = useId();\n\n return (\n <div className=\"w-75 space-y-4\">\n <div className=\"grid w-full items-center gap-1\">\n <Label htmlFor={`${id}-name`}>Name</Label>\n <Input id={`${id}-name`} placeholder=\"Enter name\" />\n </div>\n <div className=\"grid w-full items-center gap-1\">\n <Label htmlFor={`${id}-email`} required>\n Email address\n </Label>\n <Input id={`${id}-email`} type=\"email\" required />\n </div>\n <div\n className=\"group grid w-full items-center gap-1\"\n data-disabled=\"true\"\n >\n <Label htmlFor={`${id}-workspace`}>Workspace</Label>\n <Input id={`${id}-workspace`} defaultValue=\"Default\" disabled />\n </div>\n </div>\n );\n}\n"],"names":["useId","Input","Label","LabelGallery","id","div","className","htmlFor","placeholder","required","type","data-disabled","defaultValue","disabled"],"mappings":";AAAA,SAA4BA,KAAK,QAAQ,QAAQ;AAEjD,SAASC,KAAK,QAAQ,oBAAiB;AAEvC,SAASC,KAAK,QAAQ,aAAU;AAEhC,OAAO,SAASC;IACd,MAAMC,KAAKJ;IAEX,qBACE,MAACK;QAAIC,WAAU;;0BACb,MAACD;gBAAIC,WAAU;;kCACb,KAACJ;wBAAMK,SAAS,GAAGH,GAAG,KAAK,CAAC;kCAAE;;kCAC9B,KAACH;wBAAMG,IAAI,GAAGA,GAAG,KAAK,CAAC;wBAAEI,aAAY;;;;0BAEvC,MAACH;gBAAIC,WAAU;;kCACb,KAACJ;wBAAMK,SAAS,GAAGH,GAAG,MAAM,CAAC;wBAAEK,QAAQ;kCAAC;;kCAGxC,KAACR;wBAAMG,IAAI,GAAGA,GAAG,MAAM,CAAC;wBAAEM,MAAK;wBAAQD,QAAQ;;;;0BAEjD,MAACJ;gBACCC,WAAU;gBACVK,iBAAc;;kCAEd,KAACT;wBAAMK,SAAS,GAAGH,GAAG,UAAU,CAAC;kCAAE;;kCACnC,KAACH;wBAAMG,IAAI,GAAGA,GAAG,UAAU,CAAC;wBAAEQ,cAAa;wBAAUC,QAAQ;;;;;;AAIrE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemLabel } from "./radio-group.js";
|
|
3
|
+
export function RadioGroupGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs(RadioGroup, {
|
|
5
|
+
defaultValue: "option1",
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ _jsxs(RadioGroupItem, {
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ _jsx(RadioGroupItemControl, {
|
|
10
|
+
value: "option1",
|
|
11
|
+
"aria-label": "Option 1"
|
|
12
|
+
}),
|
|
13
|
+
/*#__PURE__*/ _jsx(RadioGroupItemLabel, {
|
|
14
|
+
children: "Option 1"
|
|
15
|
+
})
|
|
16
|
+
]
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsxs(RadioGroupItem, {
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(RadioGroupItemControl, {
|
|
21
|
+
value: "option2",
|
|
22
|
+
"aria-label": "Option 2"
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ _jsx(RadioGroupItemLabel, {
|
|
25
|
+
children: "Option 2"
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsxs(RadioGroupItem, {
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx(RadioGroupItemControl, {
|
|
32
|
+
value: "option3",
|
|
33
|
+
"aria-label": "Option 3"
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsx(RadioGroupItemLabel, {
|
|
36
|
+
children: "Option 3"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=radio-group.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/radio-group/radio-group.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport {\n RadioGroup,\n RadioGroupItem,\n RadioGroupItemControl,\n RadioGroupItemLabel,\n} from './radio-group';\n\nexport function RadioGroupGallery(): ReactElement {\n return (\n <RadioGroup defaultValue=\"option1\">\n <RadioGroupItem>\n <RadioGroupItemControl value=\"option1\" aria-label=\"Option 1\" />\n <RadioGroupItemLabel>Option 1</RadioGroupItemLabel>\n </RadioGroupItem>\n <RadioGroupItem>\n <RadioGroupItemControl value=\"option2\" aria-label=\"Option 2\" />\n <RadioGroupItemLabel>Option 2</RadioGroupItemLabel>\n </RadioGroupItem>\n <RadioGroupItem>\n <RadioGroupItemControl value=\"option3\" aria-label=\"Option 3\" />\n <RadioGroupItemLabel>Option 3</RadioGroupItemLabel>\n </RadioGroupItem>\n </RadioGroup>\n );\n}\n"],"names":["RadioGroup","RadioGroupItem","RadioGroupItemControl","RadioGroupItemLabel","RadioGroupGallery","defaultValue","value","aria-label"],"mappings":";AAEA,SACEA,UAAU,EACVC,cAAc,EACdC,qBAAqB,EACrBC,mBAAmB,QACd,mBAAgB;AAEvB,OAAO,SAASC;IACd,qBACE,MAACJ;QAAWK,cAAa;;0BACvB,MAACJ;;kCACC,KAACC;wBAAsBI,OAAM;wBAAUC,cAAW;;kCAClD,KAACJ;kCAAoB;;;;0BAEvB,MAACF;;kCACC,KAACC;wBAAsBI,OAAM;wBAAUC,cAAW;;kCAClD,KAACJ;kCAAoB;;;;0BAEvB,MAACF;;kCACC,KAACC;wBAAsBI,OAAM;wBAAUC,cAAW;;kCAClD,KAACJ;kCAAoB;;;;;;AAI7B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { HelperText } from "../helper-text/helper-text.js";
|
|
4
|
+
import { Label } from "../label/label.js";
|
|
5
|
+
import { Textarea } from "./textarea.js";
|
|
6
|
+
export function TextareaGallery() {
|
|
7
|
+
const id = useId();
|
|
8
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
9
|
+
className: "w-88 space-y-4",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
12
|
+
className: "grid w-full gap-1.5",
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
15
|
+
htmlFor: `${id}-message`,
|
|
16
|
+
children: "Your message"
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsx(Textarea, {
|
|
19
|
+
id: `${id}-message`,
|
|
20
|
+
placeholder: "Type your message here..."
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ _jsx(HelperText, {
|
|
23
|
+
className: "pt-2",
|
|
24
|
+
children: "Visible to everyone on the team."
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
29
|
+
className: "grid w-full gap-1.5",
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
32
|
+
htmlFor: `${id}-comments`,
|
|
33
|
+
children: "Comments"
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsx(Textarea, {
|
|
36
|
+
id: `${id}-comments`,
|
|
37
|
+
defaultValue: "Too short",
|
|
38
|
+
"aria-invalid": true
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ _jsx(HelperText, {
|
|
41
|
+
className: "pt-2",
|
|
42
|
+
isError: true,
|
|
43
|
+
children: "Enter at least 20 characters."
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=textarea.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/textarea/textarea.gallery.tsx"],"sourcesContent":["import { type ReactElement, useId } from 'react';\n\nimport { HelperText } from '../helper-text/helper-text';\nimport { Label } from '../label/label';\n\nimport { Textarea } from './textarea';\n\nexport function TextareaGallery(): ReactElement {\n const id = useId();\n\n return (\n <div className=\"w-88 space-y-4\">\n <div className=\"grid w-full gap-1.5\">\n <Label htmlFor={`${id}-message`}>Your message</Label>\n <Textarea\n id={`${id}-message`}\n placeholder=\"Type your message here...\"\n />\n <HelperText className=\"pt-2\">\n Visible to everyone on the team.\n </HelperText>\n </div>\n <div className=\"grid w-full gap-1.5\">\n <Label htmlFor={`${id}-comments`}>Comments</Label>\n <Textarea id={`${id}-comments`} defaultValue=\"Too short\" aria-invalid />\n <HelperText className=\"pt-2\" isError>\n Enter at least 20 characters.\n </HelperText>\n </div>\n </div>\n );\n}\n"],"names":["useId","HelperText","Label","Textarea","TextareaGallery","id","div","className","htmlFor","placeholder","defaultValue","aria-invalid","isError"],"mappings":";AAAA,SAA4BA,KAAK,QAAQ,QAAQ;AAEjD,SAASC,UAAU,QAAQ,gCAA6B;AACxD,SAASC,KAAK,QAAQ,oBAAiB;AAEvC,SAASC,QAAQ,QAAQ,gBAAa;AAEtC,OAAO,SAASC;IACd,MAAMC,KAAKL;IAEX,qBACE,MAACM;QAAIC,WAAU;;0BACb,MAACD;gBAAIC,WAAU;;kCACb,KAACL;wBAAMM,SAAS,GAAGH,GAAG,QAAQ,CAAC;kCAAE;;kCACjC,KAACF;wBACCE,IAAI,GAAGA,GAAG,QAAQ,CAAC;wBACnBI,aAAY;;kCAEd,KAACR;wBAAWM,WAAU;kCAAO;;;;0BAI/B,MAACD;gBAAIC,WAAU;;kCACb,KAACL;wBAAMM,SAAS,GAAGH,GAAG,SAAS,CAAC;kCAAE;;kCAClC,KAACF;wBAASE,IAAI,GAAGA,GAAG,SAAS,CAAC;wBAAEK,cAAa;wBAAYC,cAAY;;kCACrE,KAACV;wBAAWM,WAAU;wBAAOK,OAAO;kCAAC;;;;;;AAM7C"}
|