@uva-glass/component-library 1.47.3 → 1.47.4
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/dist/components/InfoMessage/InfoMessage.stories.js +8 -5
- package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
- package/dist/components/Input/Input.stories.js +22 -16
- package/dist/components/Input/Input.stories.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +39 -32
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.stories.js +18 -12
- package/dist/components/Label/Label.stories.js.map +1 -1
- package/dist/components/MenuButton/MenuButton.stories.js +23 -17
- package/dist/components/MenuButton/MenuButton.stories.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { InfoMessage as e } from "./InfoMessage.js";
|
|
3
|
-
const
|
|
3
|
+
const a = "<InfoMessage message={message} />", g = {
|
|
4
4
|
title: "Atoms/InfoMessage",
|
|
5
5
|
component: e,
|
|
6
6
|
argTypes: {
|
|
@@ -10,14 +10,17 @@ const r = {
|
|
|
10
10
|
hasOwnContainer: {
|
|
11
11
|
control: "boolean"
|
|
12
12
|
}
|
|
13
|
+
},
|
|
14
|
+
parameters: {
|
|
15
|
+
codeString: a
|
|
13
16
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
17
|
+
}, n = (s) => /* @__PURE__ */ o(e, { ...s }), t = n.bind({});
|
|
18
|
+
t.args = {
|
|
16
19
|
message: "This is an example info message",
|
|
17
20
|
hasOwnContainer: !1
|
|
18
21
|
};
|
|
19
22
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
t as InfoMessageExample,
|
|
24
|
+
g as default
|
|
22
25
|
};
|
|
23
26
|
//# sourceMappingURL=InfoMessage.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoMessage.stories.js","sources":["../../../src/components/InfoMessage/InfoMessage.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InfoMessageProps } from './InfoMessage';\n\nimport { InfoMessage } from './InfoMessage';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InfoMessage',\n component: InfoMessage,\n argTypes: {\n message: {\n control: 'text',\n },\n hasOwnContainer: {\n control: 'boolean',\n },\n },\n} as Meta<InfoMessageProps>;\n\nconst Template: StoryFn<InfoMessageProps> = (args) => <InfoMessage {...args} />;\n\nexport const InfoMessageExample = Template.bind({});\nInfoMessageExample.args = {\n message: 'This is an example info message',\n hasOwnContainer: false,\n};\n"],"names":["InfoMessage_stories","InfoMessage","Template","args","jsx","InfoMessageExample"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"InfoMessage.stories.js","sources":["../../../src/components/InfoMessage/InfoMessage.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InfoMessageProps } from './InfoMessage';\n\nimport { InfoMessage } from './InfoMessage';\n\nconst codeString = '<InfoMessage message={message} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InfoMessage',\n component: InfoMessage,\n argTypes: {\n message: {\n control: 'text',\n },\n hasOwnContainer: {\n control: 'boolean',\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<InfoMessageProps>;\n\nconst Template: StoryFn<InfoMessageProps> = (args) => <InfoMessage {...args} />;\n\nexport const InfoMessageExample = Template.bind({});\nInfoMessageExample.args = {\n message: 'This is an example info message',\n hasOwnContainer: false,\n};\n"],"names":["codeString","InfoMessage_stories","InfoMessage","Template","args","jsx","InfoMessageExample"],"mappings":";;AAKA,MAAMA,IAAa,qCAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,IACX;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAsC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAa,GAAGE,EAAM,CAAA,GAEhEE,IAAqBH,EAAS,KAAK,EAAE;AAClDG,EAAmB,OAAO;AAAA,EACxB,SAAS;AAAA,EACT,iBAAiB;AACnB;"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Input as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Input as t } from "./Input.js";
|
|
3
|
+
const n = `
|
|
4
|
+
// Has all HTMLInputElement props available except "className" and "style"
|
|
5
|
+
<Input id={id} type={type} aria-label={aria-label} onChange={onChangeFunction} value={value}/>
|
|
6
|
+
`, u = {
|
|
4
7
|
title: "Atoms/Input",
|
|
5
|
-
component:
|
|
8
|
+
component: t,
|
|
6
9
|
argTypes: {
|
|
7
10
|
appearance: {
|
|
8
11
|
table: {
|
|
@@ -16,26 +19,29 @@ const u = {
|
|
|
16
19
|
args: {
|
|
17
20
|
id: "30daa7c7",
|
|
18
21
|
type: "text"
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
codeString: n
|
|
19
25
|
}
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
26
|
+
}, e = (a) => /* @__PURE__ */ r(t, { ...a }), p = e.bind({});
|
|
27
|
+
p.args = {};
|
|
28
|
+
const i = e.bind({});
|
|
29
|
+
i.args = {
|
|
24
30
|
fullWidth: !0
|
|
25
31
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
32
|
+
const o = e.bind({});
|
|
33
|
+
o.args = {
|
|
28
34
|
isNumeric: !0
|
|
29
35
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
36
|
+
const s = e.bind({});
|
|
37
|
+
s.args = {
|
|
32
38
|
appearance: "error"
|
|
33
39
|
};
|
|
34
40
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
i as FullWidth,
|
|
42
|
+
p as InputExample,
|
|
43
|
+
o as Numeric,
|
|
44
|
+
s as WithErrorAppearance,
|
|
39
45
|
u as default
|
|
40
46
|
};
|
|
41
47
|
//# sourceMappingURL=Input.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.js","sources":["../../../src/components/Input/Input.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InputProps } from './Input';\n\nimport { Input } from './Input';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Input',\n component: Input,\n argTypes: {\n appearance: {\n table: {\n disable: true,\n },\n },\n type: {\n control: 'inline-radio',\n },\n },\n args: {\n id: '30daa7c7',\n type: 'text',\n },\n} as Meta<InputProps>;\n\nconst Template: StoryFn<InputProps> = (args) => {\n return <Input {...args} />;\n};\n\nexport const InputExample = Template.bind({});\nInputExample.args = {};\n\nexport const FullWidth = Template.bind({});\nFullWidth.args = {\n fullWidth: true,\n};\n\nexport const Numeric = Template.bind({});\nNumeric.args = {\n isNumeric: true,\n};\n\nexport const WithErrorAppearance = Template.bind({});\nWithErrorAppearance.args = {\n appearance: 'error',\n};\n"],"names":["Input_stories","Input","Template","args","jsx","InputExample","FullWidth","Numeric","WithErrorAppearance"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Input.stories.js","sources":["../../../src/components/Input/Input.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InputProps } from './Input';\n\nimport { Input } from './Input';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<Input id={id} type={type} aria-label={aria-label} onChange={onChangeFunction} value={value}/>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Input',\n component: Input,\n argTypes: {\n appearance: {\n table: {\n disable: true,\n },\n },\n type: {\n control: 'inline-radio',\n },\n },\n args: {\n id: '30daa7c7',\n type: 'text',\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<InputProps>;\n\nconst Template: StoryFn<InputProps> = (args) => {\n return <Input {...args} />;\n};\n\nexport const InputExample = Template.bind({});\nInputExample.args = {};\n\nexport const FullWidth = Template.bind({});\nFullWidth.args = {\n fullWidth: true,\n};\n\nexport const Numeric = Template.bind({});\nNumeric.args = {\n isNumeric: true,\n};\n\nexport const WithErrorAppearance = Template.bind({});\nWithErrorAppearance.args = {\n appearance: 'error',\n};\n"],"names":["codeString","Input_stories","Input","Template","args","jsx","InputExample","FullWidth","Numeric","WithErrorAppearance"],"mappings":";;AAKA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAgC,CAACC,MAC9B,gBAAAC,EAACH,GAAO,EAAA,GAAGE,EAAM,CAAA,GAGbE,IAAeH,EAAS,KAAK,EAAE;AAC5CG,EAAa,OAAO,CAAA;AAEb,MAAMC,IAAYJ,EAAS,KAAK,EAAE;AACzCI,EAAU,OAAO;AAAA,EACf,WAAW;AACb;AAEO,MAAMC,IAAUL,EAAS,KAAK,EAAE;AACvCK,EAAQ,OAAO;AAAA,EACb,WAAW;AACb;AAEO,MAAMC,IAAsBN,EAAS,KAAK,EAAE;AACnDM,EAAoB,OAAO;AAAA,EACzB,YAAY;AACd;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g } from "react";
|
|
3
|
-
import { f as
|
|
4
|
-
import { InputField as
|
|
3
|
+
import { f as i } from "../../index-C7tAT8j7.js";
|
|
4
|
+
import { InputField as l } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../storyComponents/Container/Container.js";
|
|
6
6
|
import { Icon as f } from "../Icon/Icon.js";
|
|
7
7
|
import "@react-aria/button";
|
|
@@ -17,12 +17,16 @@ import "react-router-dom";
|
|
|
17
17
|
import "../../MultiSelect-Ckf3uGw5.js";
|
|
18
18
|
import "../SelectListbox/SelectListbox.js";
|
|
19
19
|
import "../SelectListbox/SelectProvider.js";
|
|
20
|
-
const C =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
20
|
+
const C = `
|
|
21
|
+
// Has all HTMLInputElement props available except "className" and "style"
|
|
22
|
+
<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}
|
|
23
|
+
value={value} type={type} clearTrigger={clearTrigger} />
|
|
24
|
+
`, h = (t) => {
|
|
25
|
+
const e = t.variant ?? [];
|
|
26
|
+
return { ...t, variant: e.toString() };
|
|
27
|
+
}, z = {
|
|
24
28
|
title: "Atoms/InputField",
|
|
25
|
-
component:
|
|
29
|
+
component: l,
|
|
26
30
|
argTypes: {
|
|
27
31
|
variant: {
|
|
28
32
|
options: ["large"],
|
|
@@ -40,45 +44,48 @@ const C = (t) => {
|
|
|
40
44
|
disable: !0
|
|
41
45
|
}
|
|
42
46
|
}
|
|
47
|
+
},
|
|
48
|
+
parameters: {
|
|
49
|
+
codeString: C
|
|
43
50
|
}
|
|
44
|
-
},
|
|
45
|
-
const [
|
|
46
|
-
|
|
51
|
+
}, a = (t) => {
|
|
52
|
+
const [e, n] = d(""), p = g(null), s = (c) => {
|
|
53
|
+
n(c.target.value), i()("handleChange");
|
|
47
54
|
}, m = () => {
|
|
48
|
-
|
|
55
|
+
n(""), i()("handleClear");
|
|
49
56
|
};
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
-
|
|
57
|
+
return /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
|
|
58
|
+
l,
|
|
52
59
|
{
|
|
53
|
-
...
|
|
54
|
-
value:
|
|
60
|
+
...h(t),
|
|
61
|
+
value: e,
|
|
55
62
|
onChange: s,
|
|
56
63
|
onClear: m,
|
|
57
|
-
ref:
|
|
64
|
+
ref: p
|
|
58
65
|
}
|
|
59
66
|
) });
|
|
60
|
-
},
|
|
67
|
+
}, o = {
|
|
61
68
|
type: "text",
|
|
62
69
|
variant: void 0,
|
|
63
70
|
id: "4f9ca77d"
|
|
64
|
-
},
|
|
65
|
-
h.args = {
|
|
66
|
-
...n
|
|
67
|
-
};
|
|
68
|
-
const v = e.bind({});
|
|
71
|
+
}, v = a.bind({});
|
|
69
72
|
v.args = {
|
|
70
|
-
...
|
|
73
|
+
...o
|
|
74
|
+
};
|
|
75
|
+
const b = a.bind({});
|
|
76
|
+
b.args = {
|
|
77
|
+
...o,
|
|
71
78
|
clearTrigger: "Clear"
|
|
72
79
|
};
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
...
|
|
76
|
-
clearTrigger: /* @__PURE__ */
|
|
80
|
+
const y = a.bind({});
|
|
81
|
+
y.args = {
|
|
82
|
+
...o,
|
|
83
|
+
clearTrigger: /* @__PURE__ */ r(f, { name: "Cross" })
|
|
77
84
|
};
|
|
78
85
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
v as InputFieldExample,
|
|
87
|
+
y as WithIconClearTrigger,
|
|
88
|
+
b as WithStringClearTrigger,
|
|
89
|
+
z as default
|
|
83
90
|
};
|
|
84
91
|
//# sourceMappingURL=InputField.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,YAAY,OAAO;AAAA,IACvC;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,
|
|
1
|
+
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}\n value={value} type={type} clearTrigger={clearTrigger} />\n`;\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["codeString","transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA,GAMbC,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,YAAY,OAAO;AAAA,IACvC;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAL;AAAA,EACF;AACF,GAEMM,IAAqC,CAACJ,MAAS;AACnD,QAAM,CAACK,GAAYC,CAAa,IAAIC,EAAmC,EAAE,GACnEC,IAAWC,EAAyB,IAAI,GAExCC,IAAe,CAACC,MAAyC;AAC/C,IAAAL,EAAAK,EAAM,OAAO,KAAK,GAChCC,EAAA,EAAK,cAAc;AAAA,EAAA,GAGfC,IAAc,MAAM;AACxB,IAAAP,EAAc,EAAE,GAChBM,EAAA,EAAK,aAAa;AAAA,EAAA;AAGpB,2BACGE,GACC,EAAA,UAAA,gBAAAC;AAAA,IAACZ;AAAA,IAAA;AAAA,MACE,GAAGJ,EAAcC,CAAI;AAAA,MACtB,OAAOK;AAAA,MACP,UAAUK;AAAA,MACV,SAASG;AAAA,MACT,KAAKL;AAAA,IAAA;AAAA,EAET,EAAA,CAAA;AAEJ,GAEMQ,IAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AACN,GAEaC,IAAoBb,EAAS,KAAK,EAAE;AACjDa,EAAkB,OAAO;AAAA,EACvB,GAAGD;AACL;AAEO,MAAME,IAAyBd,EAAS,KAAK,EAAE;AACtDc,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,cAAc;AAChB;AAEO,MAAMG,IAAuBf,EAAS,KAAK,EAAE;AACpDe,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,cAAc,gBAAAD,EAACK,GAAK,EAAA,MAAK,QAAQ,CAAA;AACnC;"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { Label as t } from "./Label.js";
|
|
3
|
-
const
|
|
3
|
+
const a = `
|
|
4
|
+
// Has all LabelHTMLAttributes props available except "className" and "style"
|
|
5
|
+
<Label htmlFor={htmlFor}>{children}</Label>
|
|
6
|
+
`, i = {
|
|
4
7
|
title: "Atoms/Label",
|
|
5
8
|
component: t,
|
|
6
9
|
argTypes: {
|
|
@@ -10,22 +13,25 @@ const c = {
|
|
|
10
13
|
children: {
|
|
11
14
|
control: "text"
|
|
12
15
|
}
|
|
16
|
+
},
|
|
17
|
+
parameters: {
|
|
18
|
+
codeString: a
|
|
13
19
|
}
|
|
14
|
-
},
|
|
20
|
+
}, e = (l) => /* @__PURE__ */ r(t, { ...l }), o = {
|
|
15
21
|
children: "Lorem Ipsum",
|
|
16
22
|
htmlFor: "bd79f7ec"
|
|
17
|
-
},
|
|
18
|
-
l.args = {
|
|
19
|
-
...e
|
|
20
|
-
};
|
|
21
|
-
const s = o.bind({});
|
|
23
|
+
}, s = e.bind({});
|
|
22
24
|
s.args = {
|
|
23
|
-
...
|
|
25
|
+
...o
|
|
26
|
+
};
|
|
27
|
+
const n = e.bind({});
|
|
28
|
+
n.args = {
|
|
29
|
+
...o,
|
|
24
30
|
noFontWeight: !0
|
|
25
31
|
};
|
|
26
32
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
s as LabelExample,
|
|
34
|
+
n as WithNoFontWeight,
|
|
35
|
+
i as default
|
|
30
36
|
};
|
|
31
37
|
//# sourceMappingURL=Label.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.stories.js","sources":["../../../src/components/Label/Label.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { LabelProps } from './Label';\n\nimport { Label } from './Label';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Label',\n component: Label,\n argTypes: {\n htmlFor: {\n control: 'text',\n },\n children: {\n control: 'text',\n },\n },\n} as Meta<LabelProps>;\n\nconst Template: StoryFn<LabelProps> = (args) => <Label {...args} />;\n\nconst defaultArgs: Partial<LabelProps> = {\n children: 'Lorem Ipsum',\n htmlFor: 'bd79f7ec',\n};\n\nexport const LabelExample = Template.bind({});\nLabelExample.args = {\n ...defaultArgs,\n};\n\nexport const WithNoFontWeight = Template.bind({});\nWithNoFontWeight.args = {\n ...defaultArgs,\n noFontWeight: true,\n};\n"],"names":["Label_stories","Label","Template","args","jsx","defaultArgs","LabelExample","WithNoFontWeight"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Label.stories.js","sources":["../../../src/components/Label/Label.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { LabelProps } from './Label';\n\nimport { Label } from './Label';\n\nconst codeString = `\n// Has all LabelHTMLAttributes props available except \"className\" and \"style\" \n <Label htmlFor={htmlFor}>{children}</Label>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Label',\n component: Label,\n argTypes: {\n htmlFor: {\n control: 'text',\n },\n children: {\n control: 'text',\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<LabelProps>;\n\nconst Template: StoryFn<LabelProps> = (args) => <Label {...args} />;\n\nconst defaultArgs: Partial<LabelProps> = {\n children: 'Lorem Ipsum',\n htmlFor: 'bd79f7ec',\n};\n\nexport const LabelExample = Template.bind({});\nLabelExample.args = {\n ...defaultArgs,\n};\n\nexport const WithNoFontWeight = Template.bind({});\nWithNoFontWeight.args = {\n ...defaultArgs,\n noFontWeight: true,\n};\n"],"names":["codeString","Label_stories","Label","Template","args","jsx","defaultArgs","LabelExample","WithNoFontWeight"],"mappings":";;AAKA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAgC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAO,GAAGE,EAAM,CAAA,GAE3DE,IAAmC;AAAA,EACvC,UAAU;AAAA,EACV,SAAS;AACX,GAEaC,IAAeJ,EAAS,KAAK,EAAE;AAC5CI,EAAa,OAAO;AAAA,EAClB,GAAGD;AACL;AAEO,MAAME,IAAmBL,EAAS,KAAK,EAAE;AAChDK,EAAiB,OAAO;AAAA,EACtB,GAAGF;AAAA,EACH,cAAc;AAChB;"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, Fragment as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { f as c } from "../../index-C7tAT8j7.js";
|
|
3
3
|
import { MenuButton as a } from "./MenuButton.js";
|
|
4
|
-
const
|
|
4
|
+
const d = `
|
|
5
|
+
// Has all LabelHTMLAttributes props available except "className" and "style"
|
|
6
|
+
<MenuButton variant={variant} onClick={onClickFunction} onKeyDown={onKeyDown} onKeyUp={onKeyUp} buttonRef={buttonRef}>{children}</MenuButton>
|
|
7
|
+
`, b = {
|
|
5
8
|
title: "Atoms/MenuButton",
|
|
6
9
|
component: a,
|
|
7
10
|
argTypes: {
|
|
@@ -9,22 +12,25 @@ const h = {
|
|
|
9
12
|
options: ["primary", "secondary", "destructive-primary", "destructive-secondary", "blank", "blank-icon"],
|
|
10
13
|
control: { type: "radio" }
|
|
11
14
|
}
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
codeString: d
|
|
12
18
|
}
|
|
13
|
-
},
|
|
19
|
+
}, r = (o) => /* @__PURE__ */ e(a, { ...o }), i = {
|
|
14
20
|
variant: "primary",
|
|
15
21
|
onClick: c()
|
|
16
|
-
},
|
|
17
|
-
|
|
22
|
+
}, p = r.bind({});
|
|
23
|
+
p.args = {
|
|
18
24
|
children: "Click me!",
|
|
19
|
-
...
|
|
25
|
+
...i
|
|
20
26
|
};
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
...
|
|
27
|
+
const n = r.bind({});
|
|
28
|
+
n.args = {
|
|
29
|
+
...i,
|
|
24
30
|
iconName: "EllipsisVertical"
|
|
25
31
|
};
|
|
26
|
-
|
|
27
|
-
...
|
|
32
|
+
n.argTypes = {
|
|
33
|
+
...n.argTypes,
|
|
28
34
|
children: {
|
|
29
35
|
table: {
|
|
30
36
|
disable: !0
|
|
@@ -32,10 +38,10 @@ r.argTypes = {
|
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
};
|
|
35
|
-
const t =
|
|
41
|
+
const t = r.bind({});
|
|
36
42
|
t.args = {
|
|
37
|
-
...
|
|
38
|
-
children: /* @__PURE__ */ s
|
|
43
|
+
...i,
|
|
44
|
+
children: /* @__PURE__ */ l(s, { children: [
|
|
39
45
|
/* @__PURE__ */ e("div", { children: "Child 1" }),
|
|
40
46
|
/* @__PURE__ */ e("div", { children: "Child 2" })
|
|
41
47
|
] })
|
|
@@ -50,9 +56,9 @@ t.argTypes = {
|
|
|
50
56
|
}
|
|
51
57
|
};
|
|
52
58
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
p as MenuButtonExample,
|
|
60
|
+
n as WithIconChildren,
|
|
55
61
|
t as WithMultipleChildren,
|
|
56
|
-
|
|
62
|
+
b as default
|
|
57
63
|
};
|
|
58
64
|
//# sourceMappingURL=MenuButton.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.stories.js","sources":["../../../src/components/MenuButton/MenuButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MenuButtonProps } from './MenuButton';\n\nimport { MenuButton } from './MenuButton';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/MenuButton',\n component: MenuButton,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank', 'blank-icon'],\n control: { type: 'radio' },\n },\n },\n} as Meta<MenuButtonProps>;\n\nconst Template: StoryFn<MenuButtonProps> = (args) => <MenuButton {...args} />;\n\nconst defaultArgs: Partial<MenuButtonProps> = {\n variant: 'primary',\n onClick: fn(),\n};\n\nexport const MenuButtonExample = Template.bind({});\nMenuButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithIconChildren = Template.bind({});\nWithIconChildren.args = {\n ...defaultArgs,\n iconName: 'EllipsisVertical',\n};\n\nWithIconChildren.argTypes = {\n ...WithIconChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\n\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["MenuButton_stories","MenuButton","Template","args","jsx","defaultArgs","fn","MenuButtonExample","WithIconChildren","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"MenuButton.stories.js","sources":["../../../src/components/MenuButton/MenuButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MenuButtonProps } from './MenuButton';\n\nimport { MenuButton } from './MenuButton';\n\nconst codeString = `\n// Has all LabelHTMLAttributes props available except \"className\" and \"style\" \n <MenuButton variant={variant} onClick={onClickFunction} onKeyDown={onKeyDown} onKeyUp={onKeyUp} buttonRef={buttonRef}>{children}</MenuButton>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/MenuButton',\n component: MenuButton,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank', 'blank-icon'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<MenuButtonProps>;\n\nconst Template: StoryFn<MenuButtonProps> = (args) => <MenuButton {...args} />;\n\nconst defaultArgs: Partial<MenuButtonProps> = {\n variant: 'primary',\n onClick: fn(),\n};\n\nexport const MenuButtonExample = Template.bind({});\nMenuButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithIconChildren = Template.bind({});\nWithIconChildren.args = {\n ...defaultArgs,\n iconName: 'EllipsisVertical',\n};\n\nWithIconChildren.argTypes = {\n ...WithIconChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\n\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["codeString","MenuButton_stories","MenuButton","Template","args","jsx","defaultArgs","fn","MenuButtonExample","WithIconChildren","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,SAAS,YAAY;AAAA,MACvG,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAqC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAY,GAAGE,EAAM,CAAA,GAErEE,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,SAASC,EAAG;AACd,GAEaC,IAAoBL,EAAS,KAAK,EAAE;AACjDK,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAmBN,EAAS,KAAK,EAAE;AAChDM,EAAiB,OAAO;AAAA,EACtB,GAAGH;AAAA,EACH,UAAU;AACZ;AAEAG,EAAiB,WAAW;AAAA,EAC1B,GAAGA,EAAiB;AAAA,EACpB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;AAEO,MAAMC,IAAuBP,EAAS,KAAK,EAAE;AACpDO,EAAqB,OAAO;AAAA,EAC1B,GAAGJ;AAAA,EACH,UAEI,gBAAAK,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAP,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AAEAK,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|