@uva-glass/component-library 3.7.0 → 3.9.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/dist/assets/FormField.css +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.d.ts +2 -1
- package/dist/components/FeedbackBox/FeedbackBox.js.map +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.stories.d.ts +1 -0
- package/dist/components/FeedbackBox/FeedbackBox.stories.js +26 -11
- package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
- package/dist/components/FormField/FormField.d.ts +3 -1
- package/dist/components/FormField/FormField.js +15 -13
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/FormField/FormField.stories.js +19 -15
- package/dist/components/FormField/FormField.stories.js.map +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
._form-
|
|
1
|
+
._form-field_hcyqx_1{display:flex;flex-direction:column;gap:.5rem 1rem}._form-field--outerspace_hcyqx_7{margin:1.5rem 0}._form-field--inline_hcyqx_11{align-items:center;flex-direction:row}._form-field--align-start_hcyqx_16{align-items:flex-start}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
type FeedbackLevel = 'success' | 'warning' | 'error';
|
|
2
3
|
export interface FeedbackBoxProps {
|
|
3
4
|
/** The id of the element. */
|
|
@@ -5,7 +6,7 @@ export interface FeedbackBoxProps {
|
|
|
5
6
|
/** The feedback level, indicates what icon is used. */
|
|
6
7
|
level: FeedbackLevel;
|
|
7
8
|
/** The feedback value. */
|
|
8
|
-
feedback: string;
|
|
9
|
+
feedback: string | ReactElement;
|
|
9
10
|
}
|
|
10
11
|
/** Represents a component to show feedback. */
|
|
11
12
|
export declare const FeedbackBox: ({ id, level, feedback }: FeedbackBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackBox.js","sources":["../../../src/components/FeedbackBox/FeedbackBox.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { IconProps } from 'components/Icon';\n\nimport styles from './FeedbackBox.module.css';\n\nimport { Icon } from 'components/Icon';\n\ntype FeedbackLevel = 'success' | 'warning' | 'error';\n\nconst LEVEL_ICON_MAP: Record<FeedbackLevel, IconProps['name']> = {\n success: 'CheckCircle',\n warning: 'ExclamationCircle',\n error: 'ExclamationTriangleMini',\n};\n\nexport interface FeedbackBoxProps {\n /** The id of the element. */\n id?: string;\n /** The feedback level, indicates what icon is used. */\n level: FeedbackLevel;\n /** The feedback value. */\n feedback: string;\n}\n\n/** Represents a component to show feedback. */\nexport const FeedbackBox = ({ id, level, feedback }: FeedbackBoxProps) => (\n <div\n className={clsx(styles['feedback-box'], {\n [styles['feedback-box__success']]: level === 'success',\n [styles['feedback-box__warning']]: level === 'warning',\n [styles['feedback-box__error']]: level === 'error',\n })}\n id={id}\n >\n <Icon name={LEVEL_ICON_MAP[level]} size={16} />\n {feedback}\n </div>\n);\n"],"names":["LEVEL_ICON_MAP","FeedbackBox","id","level","feedback","jsxs","clsx","styles","jsx","Icon"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"FeedbackBox.js","sources":["../../../src/components/FeedbackBox/FeedbackBox.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { ReactElement } from 'react';\nimport type { IconProps } from 'components/Icon';\n\nimport styles from './FeedbackBox.module.css';\n\nimport { Icon } from 'components/Icon';\n\ntype FeedbackLevel = 'success' | 'warning' | 'error';\n\nconst LEVEL_ICON_MAP: Record<FeedbackLevel, IconProps['name']> = {\n success: 'CheckCircle',\n warning: 'ExclamationCircle',\n error: 'ExclamationTriangleMini',\n};\n\nexport interface FeedbackBoxProps {\n /** The id of the element. */\n id?: string;\n /** The feedback level, indicates what icon is used. */\n level: FeedbackLevel;\n /** The feedback value. */\n feedback: string | ReactElement;\n}\n\n/** Represents a component to show feedback. */\nexport const FeedbackBox = ({ id, level, feedback }: FeedbackBoxProps) => (\n <div\n className={clsx(styles['feedback-box'], {\n [styles['feedback-box__success']]: level === 'success',\n [styles['feedback-box__warning']]: level === 'warning',\n [styles['feedback-box__error']]: level === 'error',\n })}\n id={id}\n >\n <Icon name={LEVEL_ICON_MAP[level]} size={16} />\n {feedback}\n </div>\n);\n"],"names":["LEVEL_ICON_MAP","FeedbackBox","id","level","feedback","jsxs","clsx","styles","jsx","Icon"],"mappings":";;;;;;;;GAWMA,IAA2D;AAAA,EAC/D,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT,GAYaC,IAAc,CAAC,EAAE,IAAAC,GAAI,OAAAC,GAAO,UAAAC,EACvC,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,cAAc,GAAG;AAAA,MACtC,CAACA,EAAO,uBAAuB,CAAC,GAAGJ,MAAU;AAAA,MAC7C,CAACI,EAAO,uBAAuB,CAAC,GAAGJ,MAAU;AAAA,MAC7C,CAACI,EAAO,qBAAqB,CAAC,GAAGJ,MAAU;AAAA,IAAA,CAC5C;AAAA,IACD,IAAAD;AAAA,IAEA,UAAA;AAAA,MAAA,gBAAAM,EAACC,KAAK,MAAMT,EAAeG,CAAK,GAAG,MAAM,IAAI;AAAA,MAC5CC;AAAA,IAAA;AAAA,EAAA;AACH;"}
|
|
@@ -3,3 +3,4 @@ import { FeedbackBoxProps } from './FeedbackBox';
|
|
|
3
3
|
declare const _default: Meta<FeedbackBoxProps>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const FeedbackBoxExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FeedbackBoxProps>;
|
|
6
|
+
export declare const WithElementFeedback: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FeedbackBoxProps>;
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { FeedbackBox as
|
|
3
|
-
import { Container as
|
|
4
|
-
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { FeedbackBox as c } from "./FeedbackBox.js";
|
|
3
|
+
import { Container as o } from "../../storyComponents/Container/Container.js";
|
|
4
|
+
import { Repeater as t } from "../Repeater/Repeater.js";
|
|
5
|
+
const i = "<FeedbackBox id={id} level={level} feedback={feedback} />", p = {
|
|
5
6
|
title: "Molecules/FeedbackBox",
|
|
6
|
-
component:
|
|
7
|
+
component: c,
|
|
7
8
|
parameters: {
|
|
8
|
-
inspectComponent:
|
|
9
|
-
codeString:
|
|
9
|
+
inspectComponent: c,
|
|
10
|
+
codeString: i
|
|
10
11
|
}
|
|
11
|
-
},
|
|
12
|
-
|
|
12
|
+
}, a = (l) => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(c, { ...l }) }), n = a.bind({});
|
|
13
|
+
n.args = {
|
|
13
14
|
id: "gba0d2d4",
|
|
14
15
|
level: "success",
|
|
15
16
|
feedback: "Example FeedbackBox text"
|
|
16
17
|
};
|
|
18
|
+
const r = a.bind({});
|
|
19
|
+
r.args = {
|
|
20
|
+
id: "gba0d2d4",
|
|
21
|
+
level: "success",
|
|
22
|
+
feedback: /* @__PURE__ */ d(t, { children: [
|
|
23
|
+
/* @__PURE__ */ e("h2", { children: "FeedbackElement" }),
|
|
24
|
+
/* @__PURE__ */ d("ul", { children: [
|
|
25
|
+
/* @__PURE__ */ e("li", { children: "Feedback 1" }),
|
|
26
|
+
/* @__PURE__ */ e("li", { children: "Feedback 2" }),
|
|
27
|
+
/* @__PURE__ */ e("li", { children: "Feedback 3" })
|
|
28
|
+
] })
|
|
29
|
+
] })
|
|
30
|
+
};
|
|
17
31
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
32
|
+
n as FeedbackBoxExample,
|
|
33
|
+
r as WithElementFeedback,
|
|
34
|
+
p as default
|
|
20
35
|
};
|
|
21
36
|
//# sourceMappingURL=FeedbackBox.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackBox.stories.js","sources":["../../../src/components/FeedbackBox/FeedbackBox.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FeedbackBoxProps } from './FeedbackBox';\n\nimport { FeedbackBox } from './FeedbackBox';\n\nimport { Container } from 'storyComponents/Container';\n\nconst codeString = '<FeedbackBox id={id} level={level} feedback={feedback} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/FeedbackBox',\n component: FeedbackBox,\n parameters: {\n inspectComponent: FeedbackBox,\n codeString,\n },\n} as Meta<FeedbackBoxProps>;\n\nconst Template: StoryFn<FeedbackBoxProps> = (args) => (\n <Container>\n <FeedbackBox {...args} />\n </Container>\n);\n\nexport const FeedbackBoxExample = Template.bind({});\nFeedbackBoxExample.args = {\n id: 'gba0d2d4',\n level: 'success',\n feedback: 'Example FeedbackBox text',\n};\n"],"names":["codeString","FeedbackBox_stories","FeedbackBox","Template","args","jsx","Container","FeedbackBoxExample"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FeedbackBox.stories.js","sources":["../../../src/components/FeedbackBox/FeedbackBox.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FeedbackBoxProps } from './FeedbackBox';\n\nimport { FeedbackBox } from './FeedbackBox';\n\nimport { Container } from 'storyComponents/Container';\nimport { Repeater } from 'components/Repeater';\n\nconst codeString = '<FeedbackBox id={id} level={level} feedback={feedback} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/FeedbackBox',\n component: FeedbackBox,\n parameters: {\n inspectComponent: FeedbackBox,\n codeString,\n },\n} as Meta<FeedbackBoxProps>;\n\nconst Template: StoryFn<FeedbackBoxProps> = (args) => (\n <Container>\n <FeedbackBox {...args} />\n </Container>\n);\n\nexport const FeedbackBoxExample = Template.bind({});\nFeedbackBoxExample.args = {\n id: 'gba0d2d4',\n level: 'success',\n feedback: 'Example FeedbackBox text',\n};\n\nexport const WithElementFeedback = Template.bind({});\nWithElementFeedback.args = {\n id: 'gba0d2d4',\n level: 'success',\n feedback: (\n <Repeater>\n <h2>FeedbackElement</h2>\n <ul>\n <li>Feedback 1</li>\n <li>Feedback 2</li>\n <li>Feedback 3</li>\n </ul>\n </Repeater>\n ),\n};\n"],"names":["codeString","FeedbackBox_stories","FeedbackBox","Template","args","jsx","Container","FeedbackBoxExample","WithElementFeedback","Repeater"],"mappings":";;;;AAQA,MAAMA,IAAa,6DAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAsC,CAACC,MAC3C,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAH,GAAA,EAAa,GAAGE,EAAA,CAAM,EACzB,CAAA,GAGWG,IAAqBJ,EAAS,KAAK,CAAE,CAAA;AAClDI,EAAmB,OAAO;AAAA,EACxB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,MAAMC,IAAsBL,EAAS,KAAK,CAAE,CAAA;AACnDK,EAAoB,OAAO;AAAA,EACzB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,4BACGC,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAJ,EAAC,QAAG,UAAe,kBAAA,CAAA;AAAA,sBAClB,MACC,EAAA,UAAA;AAAA,MAAA,gBAAAA,EAAC,QAAG,UAAU,aAAA,CAAA;AAAA,MACd,gBAAAA,EAAC,QAAG,UAAU,aAAA,CAAA;AAAA,MACd,gBAAAA,EAAC,QAAG,UAAU,aAAA,CAAA;AAAA,IAAA,EAChB,CAAA;AAAA,EAAA,EACF,CAAA;AAEJ;"}
|
|
@@ -4,6 +4,8 @@ export interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
outerSpace?: boolean;
|
|
5
5
|
/** true if the label and input field should be rendered on the same row; otherwise, false. The default is false. */
|
|
6
6
|
inline?: boolean;
|
|
7
|
+
/** to be used in combination with 'inline'; true if the label and input field should be rendered on start of the same row; otherwise, false. The default is false. */
|
|
8
|
+
alignStart?: boolean;
|
|
7
9
|
}
|
|
8
10
|
/** Represents an element to wrap a label and input field. */
|
|
9
|
-
export declare const FormField: ({ children, outerSpace, inline, ...rest }: PropsWithChildren<FormFieldProps>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const FormField: ({ children, outerSpace, inline, alignStart, ...rest }: PropsWithChildren<FormFieldProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import '../../assets/FormField.css';const
|
|
4
|
-
"form-field": "_form-
|
|
5
|
-
"form-field--outerspace": "_form-field--
|
|
6
|
-
"form-field--inline": "_form-field--
|
|
7
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import '../../assets/FormField.css';const f = {
|
|
4
|
+
"form-field": "_form-field_hcyqx_1",
|
|
5
|
+
"form-field--outerspace": "_form-field--outerspace_hcyqx_7",
|
|
6
|
+
"form-field--inline": "_form-field--inline_hcyqx_11",
|
|
7
|
+
"form-field--align-start": "_form-field--align-start_hcyqx_16"
|
|
8
|
+
}, a = ({ children: e, outerSpace: i, inline: r, alignStart: o, ...l }) => /* @__PURE__ */ m(
|
|
8
9
|
"div",
|
|
9
10
|
{
|
|
10
|
-
className:
|
|
11
|
-
[
|
|
12
|
-
[
|
|
11
|
+
className: s(f["form-field"], {
|
|
12
|
+
[f["form-field--outerspace"]]: i,
|
|
13
|
+
[f["form-field--inline"]]: r,
|
|
14
|
+
[f["form-field--align-start"]]: o
|
|
13
15
|
}),
|
|
14
|
-
...
|
|
15
|
-
children:
|
|
16
|
+
...l,
|
|
17
|
+
children: e
|
|
16
18
|
}
|
|
17
19
|
);
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
a as FormField
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=FormField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.js","sources":["../../../src/components/FormField/FormField.tsx"],"sourcesContent":["import classNames from 'clsx';\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react';\n\nimport styles from './FormField.module.css';\n\nexport interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {\n /** true if a margin at the top and bottom should be added; otherwise, false. The default is false. */\n outerSpace?: boolean;\n /** true if the label and input field should be rendered on the same row; otherwise, false. The default is false. */\n inline?: boolean;\n}\n\n/** Represents an element to wrap a label and input field. */\nexport const FormField = ({ children, outerSpace, inline, ...rest }: PropsWithChildren<FormFieldProps>) => (\n <div\n className={classNames(styles['form-field'], {\n [styles['form-field--outerspace']]: outerSpace,\n [styles['form-field--inline']]: inline,\n })}\n {...rest}\n >\n {children}\n </div>\n);\n"],"names":["FormField","children","outerSpace","inline","rest","jsx","classNames","styles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormField.js","sources":["../../../src/components/FormField/FormField.tsx"],"sourcesContent":["import classNames from 'clsx';\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react';\n\nimport styles from './FormField.module.css';\n\nexport interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {\n /** true if a margin at the top and bottom should be added; otherwise, false. The default is false. */\n outerSpace?: boolean;\n /** true if the label and input field should be rendered on the same row; otherwise, false. The default is false. */\n inline?: boolean;\n /** to be used in combination with 'inline'; true if the label and input field should be rendered on start of the same row; otherwise, false. The default is false. */\n alignStart?: boolean;\n}\n\n/** Represents an element to wrap a label and input field. */\nexport const FormField = ({ children, outerSpace, inline, alignStart, ...rest }: PropsWithChildren<FormFieldProps>) => (\n <div\n className={classNames(styles['form-field'], {\n [styles['form-field--outerspace']]: outerSpace,\n [styles['form-field--inline']]: inline,\n [styles['form-field--align-start']]: alignStart,\n })}\n {...rest}\n >\n {children}\n </div>\n);\n"],"names":["FormField","children","outerSpace","inline","alignStart","rest","jsx","classNames","styles"],"mappings":";;;;;;;GAgBaA,IAAY,CAAC,EAAE,UAAAC,GAAU,YAAAC,GAAY,QAAAC,GAAQ,YAAAC,GAAY,GAAGC,EAAA,MACvE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,YAAY,GAAG;AAAA,MAC1C,CAACA,EAAO,wBAAwB,CAAC,GAAGN;AAAA,MACpC,CAACM,EAAO,oBAAoB,CAAC,GAAGL;AAAA,MAChC,CAACK,EAAO,yBAAyB,CAAC,GAAGJ;AAAA,IAAA,CACtC;AAAA,IACA,GAAGC;AAAA,IAEH,UAAAJ;AAAA,EAAA;AACH;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { FormField as o } from "./FormField.js";
|
|
3
3
|
import { InputField as t } from "../InputField/InputField.js";
|
|
4
|
-
import { Label as
|
|
5
|
-
import { Container as
|
|
6
|
-
const
|
|
4
|
+
import { Label as n } from "../Label/Label.js";
|
|
5
|
+
import { Container as a } from "../../storyComponents/Container/Container.js";
|
|
6
|
+
const i = "<FormField>{children}</FormField>", h = {
|
|
7
7
|
title: "Atoms/FormField",
|
|
8
8
|
component: o,
|
|
9
9
|
argTypes: {
|
|
@@ -12,30 +12,34 @@ const a = "<FormField>{children}</FormField>", b = {
|
|
|
12
12
|
},
|
|
13
13
|
inline: {
|
|
14
14
|
control: "boolean"
|
|
15
|
+
},
|
|
16
|
+
alignStart: {
|
|
17
|
+
control: "boolean"
|
|
15
18
|
}
|
|
16
19
|
},
|
|
17
20
|
parameters: {
|
|
18
21
|
inspectComponent: o,
|
|
19
|
-
codeString:
|
|
22
|
+
codeString: i
|
|
20
23
|
}
|
|
21
|
-
}, m = (
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ e(
|
|
24
|
+
}, m = (r) => /* @__PURE__ */ l(a, { children: [
|
|
25
|
+
/* @__PURE__ */ l(o, { ...r, children: [
|
|
26
|
+
/* @__PURE__ */ e(n, { htmlFor: "d6aa53fd", children: "Example label" }),
|
|
24
27
|
/* @__PURE__ */ e(t, { id: "d6aa53fd" })
|
|
25
28
|
] }),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ e(
|
|
29
|
+
/* @__PURE__ */ l(o, { ...r, children: [
|
|
30
|
+
/* @__PURE__ */ e(n, { htmlFor: "4e7a2f22", children: "Example very very very long label to display input alingment compared to label" }),
|
|
28
31
|
/* @__PURE__ */ e(t, { id: "4e7a2f22" })
|
|
29
32
|
] })
|
|
30
33
|
] }), d = {
|
|
31
34
|
outerSpace: !1,
|
|
32
|
-
inline: !1
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
inline: !1,
|
|
36
|
+
alignStart: !1
|
|
37
|
+
}, p = m.bind({});
|
|
38
|
+
p.args = {
|
|
35
39
|
...d
|
|
36
40
|
};
|
|
37
41
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
p as FormFieldExample,
|
|
43
|
+
h as default
|
|
40
44
|
};
|
|
41
45
|
//# 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 '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 inspectComponent: FormField,\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
|
+
{"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 '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 alignStart: {\n control: 'boolean',\n },\n },\n parameters: {\n inspectComponent: FormField,\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</Label>\n <InputField id=\"d6aa53fd\" />\n </FormField>\n <FormField {...args}>\n <Label htmlFor=\"4e7a2f22\">Example very very very long label to display input alingment compared to label</Label>\n <InputField id=\"4e7a2f22\" />\n </FormField>\n </Container>\n);\n\nconst defaultArgs: Partial<PropsWithChildren<FormFieldProps>> = {\n outerSpace: false,\n inline: false,\n alignStart: 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,IACA,YAAY;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,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,UAAa,iBAAA;AAAA,IACvC,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,UAA8E,kFAAA;AAAA,IACxG,gBAAAD,EAACE,GAAW,EAAA,IAAG,WAAW,CAAA;AAAA,EAAA,EAC5B,CAAA;AAAA,GACF,GAGIC,IAA0D;AAAA,EAC9D,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,YAAY;AACd,GAEaC,IAAmBR,EAAS,KAAK,CAAE,CAAA;AAChDQ,EAAiB,OAAO;AAAA,EACtB,GAAGD;AACL;"}
|
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": "3.
|
|
5
|
+
"version": "3.9.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@testing-library/jest-dom": "^6.6.3",
|
|
65
65
|
"@testing-library/react": "^16.3.0",
|
|
66
66
|
"@types/jest": "^29.5.14",
|
|
67
|
-
"@types/node": "^22.14.
|
|
68
|
-
"@types/react-dom": "^19.1.
|
|
69
|
-
"@types/react": "^19.1.
|
|
67
|
+
"@types/node": "^22.14.1",
|
|
68
|
+
"@types/react-dom": "^19.1.2",
|
|
69
|
+
"@types/react": "^19.1.1",
|
|
70
70
|
"@uva-glass/eslint-config": "^1.3.10",
|
|
71
71
|
"@uva-glass/stylelint-config": "^1.2.2",
|
|
72
72
|
"@vitejs/plugin-react": "^4.3.4",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"jest-environment-jsdom": "^29.7.0",
|
|
81
81
|
"jest-junit": "^16.0.0",
|
|
82
82
|
"jest": "^29.7.0",
|
|
83
|
-
"jsdom": "^26.
|
|
83
|
+
"jsdom": "^26.1.0",
|
|
84
84
|
"npm-run-all2": "^7.0.2",
|
|
85
85
|
"react-dom": "^18.3.1",
|
|
86
86
|
"react-router": "^7.5.0",
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
"ts-node": "^10.9.2",
|
|
96
96
|
"typescript": "^5.8.3",
|
|
97
97
|
"vite-plugin-dts": "^4.5.3",
|
|
98
|
-
"vite-plugin-lib-inject-css": "^2.2.
|
|
99
|
-
"vite-plugin-static-copy": "^2.3.
|
|
98
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
99
|
+
"vite-plugin-static-copy": "^2.3.1",
|
|
100
100
|
"vite-plugin-svgr": "^4.3.0",
|
|
101
101
|
"vite-tsconfig-paths": "^5.1.4",
|
|
102
|
-
"vite": "^6.2.
|
|
102
|
+
"vite": "^6.2.6"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@babel/preset-env": "^7.26.9",
|
|
@@ -112,9 +112,9 @@
|
|
|
112
112
|
"lexical": "^0.30.0"
|
|
113
113
|
},
|
|
114
114
|
"optionalDependencies": {
|
|
115
|
-
"@rollup/rollup-linux-x64-gnu": "^4.
|
|
116
|
-
"@rspack/binding-darwin-arm64": "1.3.
|
|
117
|
-
"@rspack/binding-linux-x64-gnu": "1.3.
|
|
118
|
-
"@ast-grep/napi-linux-x64-gnu": "0.36.
|
|
115
|
+
"@rollup/rollup-linux-x64-gnu": "^4.40.0",
|
|
116
|
+
"@rspack/binding-darwin-arm64": "1.3.4",
|
|
117
|
+
"@rspack/binding-linux-x64-gnu": "1.3.4",
|
|
118
|
+
"@ast-grep/napi-linux-x64-gnu": "0.36.3"
|
|
119
119
|
}
|
|
120
120
|
}
|