@uva-glass/component-library 1.47.2 → 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/Fieldset/Fieldset.stories.js +15 -12
- package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
- package/dist/components/FormField/FormField.stories.js +21 -18
- package/dist/components/FormField/FormField.stories.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.stories.js +11 -8
- package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/components/Icon/Icon.stories.js +19 -16
- package/dist/components/Icon/Icon.stories.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js +18 -13
- package/dist/components/IconButton/IconButton.stories.js.map +1 -1
- 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 +4 -4
|
@@ -4,7 +4,7 @@ import { InputField as i } from "../InputField/InputField.js";
|
|
|
4
4
|
import { Label as t } from "../Label/Label.js";
|
|
5
5
|
import { Container as n } from "../storyComponents/Container/Container.js";
|
|
6
6
|
import { FormField as r } from "../FormField/FormField.js";
|
|
7
|
-
const
|
|
7
|
+
const m = "<Fieldset legend={legend} description={description}>{children}</Fieldset>", u = {
|
|
8
8
|
title: "Atoms/Fieldset",
|
|
9
9
|
component: s,
|
|
10
10
|
argTypes: {
|
|
@@ -13,8 +13,11 @@ const g = {
|
|
|
13
13
|
disable: !0
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
},
|
|
17
|
+
parameters: {
|
|
18
|
+
codeString: m
|
|
16
19
|
}
|
|
17
|
-
},
|
|
20
|
+
}, d = (a) => /* @__PURE__ */ e(n, { size: "large", children: /* @__PURE__ */ l(s, { ...a, children: [
|
|
18
21
|
/* @__PURE__ */ l(r, { children: [
|
|
19
22
|
/* @__PURE__ */ e(t, { htmlFor: "d6aa53fd", children: "Example label 1" }),
|
|
20
23
|
/* @__PURE__ */ e(i, { id: "d6aa53fd" })
|
|
@@ -23,21 +26,21 @@ const g = {
|
|
|
23
26
|
/* @__PURE__ */ e(t, { htmlFor: "4e7a2f22", children: "Example label 2" }),
|
|
24
27
|
/* @__PURE__ */ e(i, { id: "4e7a2f22" })
|
|
25
28
|
] })
|
|
26
|
-
] }) }),
|
|
29
|
+
] }) }), o = {
|
|
27
30
|
legend: "Fieldset example",
|
|
28
31
|
inline: !1
|
|
29
|
-
},
|
|
30
|
-
m.args = {
|
|
31
|
-
...a
|
|
32
|
-
};
|
|
33
|
-
const p = o.bind({});
|
|
32
|
+
}, p = d.bind({});
|
|
34
33
|
p.args = {
|
|
35
|
-
...
|
|
34
|
+
...o
|
|
35
|
+
};
|
|
36
|
+
const c = d.bind({});
|
|
37
|
+
c.args = {
|
|
38
|
+
...o,
|
|
36
39
|
description: "A Fieldset groups several controls as well as labels"
|
|
37
40
|
};
|
|
38
41
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
p as FieldsetExample,
|
|
43
|
+
c as WithDescriptionExample,
|
|
44
|
+
u as default
|
|
42
45
|
};
|
|
43
46
|
//# sourceMappingURL=Fieldset.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.stories.js","sources":["../../../src/components/Fieldset/Fieldset.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FieldsetProps } from './Fieldset';\n\nimport { Fieldset } from './Fieldset';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'components/storyComponents/Container';\nimport { FormField } from 'components/FormField';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Fieldset',\n component: Fieldset,\n argTypes: {\n descriptionId: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<PropsWithChildren<FieldsetProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FieldsetProps>> = (args) => (\n <Container size=\"large\">\n <Fieldset {...args}>\n <FormField>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Fieldset>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FieldsetProps>> = {\n legend: 'Fieldset example',\n inline: false,\n};\n\nexport const FieldsetExample = Template.bind({});\nFieldsetExample.args = {\n ...defaultArgs,\n};\n\nexport const WithDescriptionExample = Template.bind({});\nWithDescriptionExample.args = {\n ...defaultArgs,\n description: 'A Fieldset groups several controls as well as labels',\n};\n"],"names":["Fieldset_stories","Fieldset","Template","args","jsx","Container","jsxs","FormField","Label","InputField","defaultArgs","FieldsetExample","WithDescriptionExample"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"Fieldset.stories.js","sources":["../../../src/components/Fieldset/Fieldset.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FieldsetProps } from './Fieldset';\n\nimport { Fieldset } from './Fieldset';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'components/storyComponents/Container';\nimport { FormField } from 'components/FormField';\n\nconst codeString = '<Fieldset legend={legend} description={description}>{children}</Fieldset>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Fieldset',\n component: Fieldset,\n argTypes: {\n descriptionId: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<FieldsetProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FieldsetProps>> = (args) => (\n <Container size=\"large\">\n <Fieldset {...args}>\n <FormField>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Fieldset>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FieldsetProps>> = {\n legend: 'Fieldset example',\n inline: false,\n};\n\nexport const FieldsetExample = Template.bind({});\nFieldsetExample.args = {\n ...defaultArgs,\n};\n\nexport const WithDescriptionExample = Template.bind({});\nWithDescriptionExample.args = {\n ...defaultArgs,\n description: 'A Fieldset groups several controls as well as labels',\n};\n"],"names":["codeString","Fieldset_stories","Fieldset","Template","args","jsx","Container","jsxs","FormField","Label","InputField","defaultArgs","FieldsetExample","WithDescriptionExample"],"mappings":";;;;;;AAWA,MAAMA,IAAa,6EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,eAAe;AAAA,MACb,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAsD,CAACC,MAC1D,gBAAAC,EAAAC,GAAA,EAAU,MAAK,SACd,UAAA,gBAAAC,EAACL,GAAU,EAAA,GAAGE,GACZ,UAAA;AAAA,EAAA,gBAAAG,EAACC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAJ,EAACK,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,oBACCF,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAJ,EAACK,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,EACF,CAAA,EACF,CAAA,GAGIC,IAAyD;AAAA,EAC7D,QAAQ;AAAA,EACR,QAAQ;AACV,GAEaC,IAAkBT,EAAS,KAAK,EAAE;AAC/CS,EAAgB,OAAO;AAAA,EACrB,GAAGD;AACL;AAEO,MAAME,IAAyBV,EAAS,KAAK,EAAE;AACtDU,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,aAAa;AACf;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { FormField as
|
|
3
|
-
import { InputField as
|
|
4
|
-
import { Label as
|
|
2
|
+
import { FormField as r } from "./FormField.js";
|
|
3
|
+
import { InputField as i } from "../InputField/InputField.js";
|
|
4
|
+
import { Label as t } from "../Label/Label.js";
|
|
5
5
|
import { Container as a } from "../storyComponents/Container/Container.js";
|
|
6
|
-
const
|
|
6
|
+
const n = "<FormField>{children}</FormField>", b = {
|
|
7
7
|
title: "Atoms/FormField",
|
|
8
|
-
component:
|
|
8
|
+
component: r,
|
|
9
9
|
argTypes: {
|
|
10
10
|
outerSpace: {
|
|
11
11
|
control: "boolean"
|
|
@@ -13,25 +13,28 @@ const h = {
|
|
|
13
13
|
inline: {
|
|
14
14
|
control: "boolean"
|
|
15
15
|
}
|
|
16
|
+
},
|
|
17
|
+
parameters: {
|
|
18
|
+
codeString: n
|
|
16
19
|
}
|
|
17
|
-
},
|
|
18
|
-
/* @__PURE__ */ o(
|
|
19
|
-
/* @__PURE__ */ e(
|
|
20
|
-
/* @__PURE__ */ e(
|
|
20
|
+
}, m = (l) => /* @__PURE__ */ o(a, { children: [
|
|
21
|
+
/* @__PURE__ */ o(r, { ...l, children: [
|
|
22
|
+
/* @__PURE__ */ e(t, { htmlFor: "d6aa53fd", children: "Example label 1" }),
|
|
23
|
+
/* @__PURE__ */ e(i, { id: "d6aa53fd" })
|
|
21
24
|
] }),
|
|
22
|
-
/* @__PURE__ */ o(
|
|
23
|
-
/* @__PURE__ */ e(
|
|
24
|
-
/* @__PURE__ */ e(
|
|
25
|
+
/* @__PURE__ */ o(r, { ...l, children: [
|
|
26
|
+
/* @__PURE__ */ e(t, { htmlFor: "4e7a2f22", children: "Example label 2" }),
|
|
27
|
+
/* @__PURE__ */ e(i, { id: "4e7a2f22" })
|
|
25
28
|
] })
|
|
26
|
-
] }),
|
|
29
|
+
] }), d = {
|
|
27
30
|
outerSpace: !1,
|
|
28
31
|
inline: !1
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
...
|
|
32
|
+
}, c = m.bind({});
|
|
33
|
+
c.args = {
|
|
34
|
+
...d
|
|
32
35
|
};
|
|
33
36
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
c as FormFieldExample,
|
|
38
|
+
b as default
|
|
36
39
|
};
|
|
37
40
|
//# sourceMappingURL=FormField.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.stories.js","sources":["../../../src/components/FormField/FormField.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FormFieldProps } from './FormField';\n\nimport { FormField } from './FormField';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'components/storyComponents/Container';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FormField',\n component: FormField,\n argTypes: {\n outerSpace: {\n control: 'boolean',\n },\n inline: {\n control: 'boolean',\n },\n },\n} as Meta<PropsWithChildren<FormFieldProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FormFieldProps>> = (args) => (\n <Container>\n <FormField {...args}>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField {...args}>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FormFieldProps>> = {\n outerSpace: false,\n inline: false,\n};\n\nexport const FormFieldExample = Template.bind({});\nFormFieldExample.args = {\n ...defaultArgs,\n};\n"],"names":["FormField_stories","FormField","Template","args","jsxs","Container","jsx","Label","InputField","defaultArgs","FormFieldExample"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"FormField.stories.js","sources":["../../../src/components/FormField/FormField.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PropsWithChildren } from 'react';\nimport type { FormFieldProps } from './FormField';\n\nimport { FormField } from './FormField';\n\nimport { InputField } from 'components/InputField';\nimport { Label } from 'components/Label';\nimport { Container } from 'components/storyComponents/Container';\n\nconst codeString = '<FormField>{children}</FormField>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FormField',\n component: FormField,\n argTypes: {\n outerSpace: {\n control: 'boolean',\n },\n inline: {\n control: 'boolean',\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<PropsWithChildren<FormFieldProps>>;\n\nconst Template: StoryFn<PropsWithChildren<FormFieldProps>> = (args) => (\n <Container>\n <FormField {...args}>\n <Label htmlFor=\"d6aa53fd\">Example label 1</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField {...args}>\n <Label htmlFor=\"4e7a2f22\">Example label 2</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FormFieldProps>> = {\n outerSpace: false,\n inline: false,\n};\n\nexport const FormFieldExample = Template.bind({});\nFormFieldExample.args = {\n ...defaultArgs,\n};\n"],"names":["codeString","FormField_stories","FormField","Template","args","jsxs","Container","jsx","Label","InputField","defaultArgs","FormFieldExample"],"mappings":";;;;;AAUA,MAAMA,IAAa,qCAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAAS;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAuD,CAACC,MAC5D,gBAAAC,EAACC,GACC,EAAA,UAAA;AAAA,EAAC,gBAAAD,EAAAH,GAAA,EAAW,GAAGE,GACb,UAAA;AAAA,IAAC,gBAAAG,EAAAC,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAD,EAACE,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,EACA,gBAAAJ,EAACH,GAAW,EAAA,GAAGE,GACb,UAAA;AAAA,IAAC,gBAAAG,EAAAC,GAAA,EAAM,SAAQ,YAAW,UAAe,mBAAA;AAAA,IACzC,gBAAAD,EAACE,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,GAC5B;AAAA,EACF,CAAA,GAGIC,IAA0D;AAAA,EAC9D,YAAY;AAAA,EACZ,QAAQ;AACV,GAEaC,IAAmBR,EAAS,KAAK,EAAE;AAChDQ,EAAiB,OAAO;AAAA,EACtB,GAAGD;AACL;"}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { HorizontalList as t } from "./HorizontalList.js";
|
|
3
|
-
const
|
|
3
|
+
const a = '<HorizontalList values={values} separator="•" />', u = {
|
|
4
4
|
title: "Atoms/HorizontalList",
|
|
5
5
|
component: t,
|
|
6
6
|
argTypes: {
|
|
7
7
|
separator: {
|
|
8
8
|
control: "text"
|
|
9
9
|
}
|
|
10
|
+
},
|
|
11
|
+
parameters: {
|
|
12
|
+
codeString: a
|
|
10
13
|
}
|
|
11
|
-
},
|
|
14
|
+
}, r = (s) => /* @__PURE__ */ o(t, { ...s }), e = {
|
|
12
15
|
values: ["Curabitur consequat", "Lectus sit amet luctus vulputate", "Nisi semi mattis"],
|
|
13
16
|
separator: "•"
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
...
|
|
17
|
+
}, i = r.bind({});
|
|
18
|
+
i.args = {
|
|
19
|
+
...e
|
|
17
20
|
};
|
|
18
21
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
i as HorizontalListExample,
|
|
23
|
+
u as default
|
|
21
24
|
};
|
|
22
25
|
//# sourceMappingURL=HorizontalList.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalList.stories.js","sources":["../../../src/components/HorizontalList/HorizontalList.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { HorizontalListProps } from './HorizontalList';\n\nimport { HorizontalList } from './HorizontalList';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/HorizontalList',\n component: HorizontalList,\n argTypes: {\n separator: {\n control: 'text',\n },\n },\n} as Meta<HorizontalListProps>;\n\nconst Template: StoryFn<HorizontalListProps> = (args) => <HorizontalList {...args} />;\n\nconst defaultArgs: Partial<HorizontalListProps> = {\n values: ['Curabitur consequat', 'Lectus sit amet luctus vulputate', 'Nisi semi mattis'],\n separator: '•',\n};\n\nexport const HorizontalListExample = Template.bind({});\nHorizontalListExample.args = {\n ...defaultArgs,\n};\n"],"names":["HorizontalList_stories","HorizontalList","Template","args","jsx","defaultArgs","HorizontalListExample"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"HorizontalList.stories.js","sources":["../../../src/components/HorizontalList/HorizontalList.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { HorizontalListProps } from './HorizontalList';\n\nimport { HorizontalList } from './HorizontalList';\n\nconst codeString = '<HorizontalList values={values} separator=\"•\" />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/HorizontalList',\n component: HorizontalList,\n argTypes: {\n separator: {\n control: 'text',\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<HorizontalListProps>;\n\nconst Template: StoryFn<HorizontalListProps> = (args) => <HorizontalList {...args} />;\n\nconst defaultArgs: Partial<HorizontalListProps> = {\n values: ['Curabitur consequat', 'Lectus sit amet luctus vulputate', 'Nisi semi mattis'],\n separator: '•',\n};\n\nexport const HorizontalListExample = Template.bind({});\nHorizontalListExample.args = {\n ...defaultArgs,\n};\n"],"names":["codeString","HorizontalList_stories","HorizontalList","Template","args","jsx","defaultArgs","HorizontalListExample"],"mappings":";;AAKA,MAAMA,IAAa,oDAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,WAAW;AAAA,MACT,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAyC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAgB,GAAGE,EAAM,CAAA,GAE7EE,IAA4C;AAAA,EAChD,QAAQ,CAAC,uBAAuB,oCAAoC,kBAAkB;AAAA,EACtF,WAAW;AACb,GAEaC,IAAwBJ,EAAS,KAAK,EAAE;AACrDI,EAAsB,OAAO;AAAA,EAC3B,GAAGD;AACL;"}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { Icon as i } from "./Icon.js";
|
|
3
3
|
import { Icons as r } from "./icons/index.js";
|
|
4
4
|
import { ClipboardButton as c } from "../storyComponents/ClipboardButton/ClipboardButton.js";
|
|
5
|
-
import '../../assets/Icon.css';const s = "_icon__wrapper_lse0u_1", p = "_icon__item_lse0u_13",
|
|
5
|
+
import '../../assets/Icon.css';const s = "_icon__wrapper_lse0u_1", p = "_icon__item_lse0u_13", t = {
|
|
6
6
|
icon__wrapper: s,
|
|
7
7
|
icon__item: p
|
|
8
|
-
},
|
|
8
|
+
}, a = "<Icon name={iconName} size={size} />", w = {
|
|
9
9
|
title: "Atoms/Icon",
|
|
10
|
-
component: i
|
|
11
|
-
|
|
12
|
-
a
|
|
10
|
+
component: i,
|
|
11
|
+
parameters: {
|
|
12
|
+
codeString: a
|
|
13
|
+
}
|
|
14
|
+
}, m = (e) => /* @__PURE__ */ o(i, { ...e }), _ = m.bind({});
|
|
15
|
+
_.args = {
|
|
13
16
|
name: "ArrowDownOnSquare",
|
|
14
17
|
size: 32,
|
|
15
18
|
title: "Optional Icon title"
|
|
16
19
|
};
|
|
17
|
-
const
|
|
20
|
+
const x = () => /* @__PURE__ */ o(
|
|
18
21
|
"div",
|
|
19
22
|
{
|
|
20
23
|
style: {
|
|
@@ -24,18 +27,18 @@ const w = () => /* @__PURE__ */ e(
|
|
|
24
27
|
padding: "1rem",
|
|
25
28
|
maxWidth: "1024px"
|
|
26
29
|
},
|
|
27
|
-
children: Object.keys(r).map((
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
30
|
+
children: Object.keys(r).map((e) => /* @__PURE__ */ n("div", { className: t.icon__wrapper, children: [
|
|
31
|
+
/* @__PURE__ */ o(i, { name: e, size: 48 }),
|
|
32
|
+
/* @__PURE__ */ n("div", { className: t.icon__item, children: [
|
|
33
|
+
/* @__PURE__ */ o("span", { children: e }),
|
|
34
|
+
/* @__PURE__ */ o(c, { text: `<Icon icon={${e}} />` })
|
|
32
35
|
] })
|
|
33
|
-
] },
|
|
36
|
+
] }, e))
|
|
34
37
|
}
|
|
35
38
|
);
|
|
36
39
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
_ as IconExample,
|
|
41
|
+
x as IconOverview,
|
|
42
|
+
w as default
|
|
40
43
|
};
|
|
41
44
|
//# sourceMappingURL=Icon.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.stories.js","sources":["../../../src/components/Icon/Icon.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { IconProps } from './Icon';\n\nimport { Icon } from './Icon';\nimport { Icons } from './icons';\nimport styles from './story.module.css';\n\nimport { ClipboardButton } from 'components/storyComponents/ClipboardButton/';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Icon',\n component: Icon,\n} as Meta<IconProps>;\n\nconst Template: StoryFn<IconProps> = (args) => <Icon {...args} />;\n\nexport const IconExample = Template.bind({});\nIconExample.args = {\n name: 'ArrowDownOnSquare',\n size: 32,\n title: 'Optional Icon title',\n};\n\nexport const IconOverview = () => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(4, 1fr)',\n gridGap: '1rem',\n padding: '1rem',\n maxWidth: '1024px',\n }}\n >\n {Object.keys(Icons).map((name) => (\n <div key={name} className={styles.icon__wrapper}>\n <Icon name={name as keyof typeof Icons} size={48} />\n <div className={styles.icon__item}>\n <span>{name}</span>\n <ClipboardButton text={`<Icon icon={${name}} />`} />\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["Icon_stories","Icon","Template","args","jsx","IconExample","IconOverview","Icons","name","jsxs","styles","ClipboardButton"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"Icon.stories.js","sources":["../../../src/components/Icon/Icon.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { IconProps } from './Icon';\n\nimport { Icon } from './Icon';\nimport { Icons } from './icons';\nimport styles from './story.module.css';\n\nimport { ClipboardButton } from 'components/storyComponents/ClipboardButton/';\n\nconst codeString = '<Icon name={iconName} size={size} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Icon',\n component: Icon,\n parameters: {\n codeString: codeString,\n },\n} as Meta<IconProps>;\n\nconst Template: StoryFn<IconProps> = (args) => <Icon {...args} />;\n\nexport const IconExample = Template.bind({});\nIconExample.args = {\n name: 'ArrowDownOnSquare',\n size: 32,\n title: 'Optional Icon title',\n};\n\nexport const IconOverview = () => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(4, 1fr)',\n gridGap: '1rem',\n padding: '1rem',\n maxWidth: '1024px',\n }}\n >\n {Object.keys(Icons).map((name) => (\n <div key={name} className={styles.icon__wrapper}>\n <Icon name={name as keyof typeof Icons} size={48} />\n <div className={styles.icon__item}>\n <span>{name}</span>\n <ClipboardButton text={`<Icon icon={${name}} />`} />\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["codeString","Icon_stories","Icon","Template","args","jsx","IconExample","IconOverview","Icons","name","jsxs","styles","ClipboardButton"],"mappings":";;;;;;;GASMA,IAAa,wCAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAA+B,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAM,GAAGE,EAAM,CAAA,GAElDE,IAAcH,EAAS,KAAK,EAAE;AAC3CG,EAAY,OAAO;AAAA,EACjB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAEO,MAAMC,IAAe,MAExB,gBAAAF;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAO;AAAA,MACL,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,IAEC,UAAA,OAAO,KAAKG,CAAK,EAAE,IAAI,CAACC,MACtB,gBAAAC,EAAA,OAAA,EAAe,WAAWC,EAAO,eAChC,UAAA;AAAA,MAAC,gBAAAN,EAAAH,GAAA,EAAK,MAAAO,GAAkC,MAAM,GAAI,CAAA;AAAA,MACjD,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,YACrB,UAAA;AAAA,QAAA,gBAAAN,EAAC,UAAM,UAAKI,EAAA,CAAA;AAAA,QACX,gBAAAJ,EAAAO,GAAA,EAAgB,MAAM,eAAeH,CAAI,QAAQ;AAAA,MAAA,GACpD;AAAA,IAAA,EAAA,GALQA,CAMV,CACD;AAAA,EAAA;AAAA;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { f as
|
|
3
|
-
import { IconButton as
|
|
4
|
-
import { Icon as
|
|
5
|
-
const
|
|
2
|
+
import { f as r } from "../../index-C7tAT8j7.js";
|
|
3
|
+
import { IconButton as n } from "./IconButton.js";
|
|
4
|
+
import { Icon as i } from "../Icon/Icon.js";
|
|
5
|
+
const l = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>
|
|
6
|
+
<Icon name={iconName} size={size} />
|
|
7
|
+
</IconButton>`, b = {
|
|
6
8
|
title: "Atoms/IconButton",
|
|
7
|
-
component:
|
|
9
|
+
component: n,
|
|
8
10
|
argTypes: {
|
|
9
11
|
variant: {
|
|
10
12
|
options: ["destructive"],
|
|
@@ -32,22 +34,25 @@ const m = {
|
|
|
32
34
|
disable: !0
|
|
33
35
|
}
|
|
34
36
|
}
|
|
37
|
+
},
|
|
38
|
+
parameters: {
|
|
39
|
+
codeString: l
|
|
35
40
|
}
|
|
36
41
|
}, s = (t) => {
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */ o(
|
|
39
|
-
},
|
|
40
|
-
|
|
42
|
+
const e = t.variant ?? [], a = { ...t, variant: e.toString() };
|
|
43
|
+
return /* @__PURE__ */ o(n, { ...a });
|
|
44
|
+
}, c = s.bind({});
|
|
45
|
+
c.args = {
|
|
41
46
|
"aria-label": "Trash",
|
|
42
47
|
variant: "destructive",
|
|
43
48
|
noBorder: !1,
|
|
44
49
|
wide: !1,
|
|
45
50
|
disabled: !1,
|
|
46
|
-
children: /* @__PURE__ */ o(
|
|
47
|
-
onClick:
|
|
51
|
+
children: /* @__PURE__ */ o(i, { name: "Trash" }),
|
|
52
|
+
onClick: r()
|
|
48
53
|
};
|
|
49
54
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
c as IconButtonExample,
|
|
56
|
+
b as default
|
|
52
57
|
};
|
|
53
58
|
//# sourceMappingURL=IconButton.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.stories.js","sources":["../../../src/components/IconButton/IconButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { IconButtonProps } from 'components/IconButton';\n\nimport { IconButton } from 'components/IconButton';\nimport { Icon } from 'components/Icon';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/IconButton',\n component: IconButton,\n argTypes: {\n variant: {\n options: ['destructive'],\n control: { type: 'check' },\n },\n noBorder: {\n control: 'boolean',\n default: false,\n },\n wide: {\n control: 'boolean',\n default: false,\n },\n 'aria-label': {\n table: {\n disable: true,\n },\n },\n type: {\n options: ['button', 'submit', 'reset'],\n control: { type: 'select' },\n },\n children: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<IconButtonProps>;\n\nconst Template: StoryFn<IconButtonProps> = (args) => {\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 const iconButtonArgs = { ...args, ...{ variant: variantArray.toString() } } as IconButtonProps;\n\n return <IconButton {...iconButtonArgs} />;\n};\n\nexport const IconButtonExample = Template.bind({});\nIconButtonExample.args = {\n 'aria-label': 'Trash',\n variant: 'destructive',\n noBorder: false,\n wide: false,\n disabled: false,\n children: <Icon name=\"Trash\" />,\n onClick: fn(),\n};\n"],"names":["IconButton_stories","IconButton","Template","args","variantArray","iconButtonArgs","jsx","IconButtonExample","Icon","fn"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"IconButton.stories.js","sources":["../../../src/components/IconButton/IconButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { IconButtonProps } from 'components/IconButton';\n\nimport { IconButton } from 'components/IconButton';\nimport { Icon } from 'components/Icon';\n\nconst codeString = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>\n <Icon name={iconName} size={size} />\n </IconButton>`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/IconButton',\n component: IconButton,\n argTypes: {\n variant: {\n options: ['destructive'],\n control: { type: 'check' },\n },\n noBorder: {\n control: 'boolean',\n default: false,\n },\n wide: {\n control: 'boolean',\n default: false,\n },\n 'aria-label': {\n table: {\n disable: true,\n },\n },\n type: {\n options: ['button', 'submit', 'reset'],\n control: { type: 'select' },\n },\n children: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<IconButtonProps>;\n\nconst Template: StoryFn<IconButtonProps> = (args) => {\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 const iconButtonArgs = { ...args, ...{ variant: variantArray.toString() } } as IconButtonProps;\n\n return <IconButton {...iconButtonArgs} />;\n};\n\nexport const IconButtonExample = Template.bind({});\nIconButtonExample.args = {\n 'aria-label': 'Trash',\n variant: 'destructive',\n noBorder: false,\n wide: false,\n disabled: false,\n children: <Icon name=\"Trash\" />,\n onClick: fn(),\n};\n"],"names":["codeString","IconButton_stories","IconButton","Template","args","variantArray","iconButtonArgs","jsx","IconButtonExample","Icon","fn"],"mappings":";;;;AAQA,MAAMA,IAAa;AAAA;AAAA,kBAKJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,aAAa;AAAA,MACvB,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,SAAS,CAAC,UAAU,UAAU,OAAO;AAAA,MACrC,SAAS,EAAE,MAAM,SAAS;AAAA,IAC5B;AAAA,IACA,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAqC,CAACC,MAAS;AAE7C,QAAAC,IAAgBD,EAAK,WAAmC,IACxDE,IAAiB,EAAE,GAAGF,GAAW,SAASC,EAAa,SAAS;AAE/D,SAAA,gBAAAE,EAACL,GAAY,EAAA,GAAGI,EAAgB,CAAA;AACzC,GAEaE,IAAoBL,EAAS,KAAK,EAAE;AACjDK,EAAkB,OAAO;AAAA,EACvB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU,gBAAAD,EAACE,GAAK,EAAA,MAAK,QAAQ,CAAA;AAAA,EAC7B,SAASC,EAAG;AACd;"}
|
|
@@ -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;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uva-glass/component-library",
|
|
3
3
|
"author": "Team Glass - Frontend vrienden",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "1.47.
|
|
5
|
+
"version": "1.47.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"react-dom": "^18.3.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@commitlint/cli": "^19.
|
|
43
|
-
"@commitlint/config-conventional": "^19.
|
|
42
|
+
"@commitlint/cli": "^19.5.0",
|
|
43
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
44
44
|
"@react-aria/button": "^3.9.8",
|
|
45
45
|
"@react-aria/dialog": "^3.5.17",
|
|
46
46
|
"@react-aria/overlays": "^3.23.2",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"stylelint-config-standard": "^36.0.1",
|
|
89
89
|
"stylelint-order": "^6.0.4",
|
|
90
90
|
"typescript": "^5.6.2",
|
|
91
|
-
"vite": "^5.4.
|
|
91
|
+
"vite": "^5.4.4",
|
|
92
92
|
"vite-plugin-dts": "^4.2.1",
|
|
93
93
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
94
94
|
"vite-plugin-static-copy": "^1.0.6",
|