@uva-glass/component-library 1.48.1 → 1.49.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/MultiSelect-Ckf3uGw5.js.map +1 -1
- package/dist/assets/CheckboxButton.css +1 -0
- package/dist/assets/CheckboxButtonBar.css +1 -0
- package/dist/assets/CheckboxTree.css +1 -1
- package/dist/assets/Label.css +1 -1
- package/dist/assets/PeriodSelector.css +1 -0
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.stories.js +14 -13
- package/dist/components/Button/Button.stories.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +3 -0
- package/dist/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.js +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
- package/dist/components/Card/Card.d.ts +6 -0
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.stories.js +14 -13
- package/dist/components/Card/Card.stories.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +17 -16
- package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.d.ts +16 -0
- package/dist/components/CheckboxButton/CheckboxButton.js +51 -0
- package/dist/components/CheckboxButton/CheckboxButton.js.map +1 -0
- package/dist/components/CheckboxButton/CheckboxButton.stories.d.ts +5 -0
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +48 -0
- package/dist/components/CheckboxButton/CheckboxButton.stories.js.map +1 -0
- package/dist/components/CheckboxButton/index.d.ts +1 -0
- package/dist/components/CheckboxButton/index.js +5 -0
- package/dist/components/CheckboxButton/index.js.map +1 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.d.ts +22 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +62 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.d.ts +5 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +70 -0
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -0
- package/dist/components/CheckboxButtonBar/index.d.ts +1 -0
- package/dist/components/CheckboxButtonBar/index.js +5 -0
- package/dist/components/CheckboxButtonBar/index.js.map +1 -0
- package/dist/components/CheckboxTree/CheckboxTree.d.ts +5 -3
- package/dist/components/CheckboxTree/CheckboxTree.js +42 -42
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +6 -0
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +16 -15
- package/dist/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.d.ts +3 -0
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js.map +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js +3 -2
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.d.ts +4 -0
- package/dist/components/FeedbackBox/FeedbackBox.js.map +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.stories.js +10 -9
- package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
- package/dist/components/FieldHint/FieldHint.d.ts +4 -0
- package/dist/components/FieldHint/FieldHint.js.map +1 -1
- package/dist/components/FieldHint/FieldHint.stories.js +1 -0
- package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
- package/dist/components/Fieldset/Fieldset.d.ts +5 -0
- package/dist/components/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/Fieldset/Fieldset.stories.js +20 -19
- package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
- package/dist/components/FormField/FormField.d.ts +3 -0
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/FormField/FormField.stories.js +16 -15
- package/dist/components/FormField/FormField.stories.js.map +1 -1
- package/dist/components/GridRow/GridRow.d.ts +4 -0
- package/dist/components/GridRow/GridRow.js +4 -4
- package/dist/components/GridRow/GridRow.js.map +1 -1
- package/dist/components/GridRow/GridRow.stories.js +1 -0
- package/dist/components/GridRow/GridRow.stories.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.d.ts +3 -0
- package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.stories.js +7 -6
- package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/components/Icon/Icon.d.ts +4 -0
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon/Icon.stories.js +1 -0
- package/dist/components/Icon/Icon.stories.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +5 -0
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js +8 -7
- package/dist/components/IconButton/IconButton.stories.js.map +1 -1
- package/dist/components/InfoMessage/InfoMessage.d.ts +3 -0
- package/dist/components/InfoMessage/InfoMessage.js.map +1 -1
- package/dist/components/InfoMessage/InfoMessage.stories.js +4 -3
- package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
- package/dist/components/Input/Input.d.ts +6 -0
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.stories.js +11 -10
- package/dist/components/Input/Input.stories.js.map +1 -1
- package/dist/components/InputField/InputField.d.ts +6 -0
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +16 -15
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.d.ts +6 -1
- package/dist/components/Label/Label.js +12 -10
- package/dist/components/Label/Label.js.map +1 -1
- package/dist/components/Label/Label.stories.js +1 -0
- package/dist/components/Label/Label.stories.js.map +1 -1
- package/dist/components/MenuButton/MenuButton.d.ts +4 -0
- package/dist/components/MenuButton/MenuButton.js +1 -1
- package/dist/components/MenuButton/MenuButton.js.map +1 -1
- package/dist/components/MenuButton/MenuButton.stories.js +19 -18
- package/dist/components/MenuButton/MenuButton.stories.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.d.ts +1 -0
- package/dist/components/MenuLink/MenuLink.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.stories.js +5 -4
- package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
- package/dist/components/MetaDataList/MetaDataList.d.ts +2 -0
- package/dist/components/MetaDataList/MetaDataList.js.map +1 -1
- package/dist/components/MetaDataList/MetaDataList.stories.js +5 -4
- package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.d.ts +20 -1
- package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +9 -8
- package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +4 -0
- package/dist/components/MultiSelect/MultiSelect.stories.js +23 -22
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.d.ts +3 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +11 -10
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.d.ts +16 -0
- package/dist/components/PeriodSelector/PeriodSelector.js +74 -0
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -0
- package/dist/components/PeriodSelector/PeriodSelector.stories.d.ts +5 -0
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +25 -0
- package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -0
- package/dist/components/PeriodSelector/index.d.ts +1 -0
- package/dist/components/PeriodSelector/index.js +5 -0
- package/dist/components/PeriodSelector/index.js.map +1 -0
- package/dist/components/Periods/Periods.d.ts +4 -0
- package/dist/components/Periods/Periods.js.map +1 -1
- package/dist/components/Periods/Periods.stories.js +1 -0
- package/dist/components/Periods/Periods.stories.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.d.ts +4 -0
- package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +19 -18
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +5 -0
- package/dist/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.stories.js +9 -8
- package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
- package/dist/components/Repeater/Repeater.d.ts +3 -0
- package/dist/components/Repeater/Repeater.js.map +1 -1
- package/dist/components/Repeater/Repeater.stories.js +6 -5
- package/dist/components/Repeater/Repeater.stories.js.map +1 -1
- package/dist/components/SectionNotification/SectionNotification.d.ts +2 -0
- package/dist/components/SectionNotification/SectionNotification.js.map +1 -1
- package/dist/components/SectionNotification/SectionNotification.stories.js +1 -0
- package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.d.ts +2 -2
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -0
- package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListbox.d.ts +12 -0
- package/dist/components/SelectListbox/SelectListbox.js +9 -9
- package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +3 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner/Spinner.stories.js +4 -3
- package/dist/components/Spinner/Spinner.stories.js.map +1 -1
- package/dist/components/StatusPill/StatusPill.d.ts +4 -0
- package/dist/components/StatusPill/StatusPill.js.map +1 -1
- package/dist/components/StatusPill/StatusPill.stories.js +7 -6
- package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +6 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.stories.js +10 -9
- package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +73 -67
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +73 -67
- package/dist/index.js.map +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyStateDataDisplay.stories.js","sources":["../../../src/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { EmptyStateDataDisplayProps } from './EmptyStateDataDisplay';\n\nimport { EmptyStateDataDisplay } from './EmptyStateDataDisplay';\n\nconst codeString = '<EmptyStateDataDisplay label={label} paragraph={paragraph} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/EmptyStateDataDisplay',\n component: EmptyStateDataDisplay,\n parameters: {\n codeString: codeString,\n },\n} as Meta<EmptyStateDataDisplayProps>;\n\nconst Template: StoryFn<EmptyStateDataDisplayProps> = (args) => <EmptyStateDataDisplay {...args} />;\n\nexport const EmptyStateDataDisplayExample = Template.bind({});\nEmptyStateDataDisplayExample.args = {\n label: 'This is an example info empty state data display label',\n paragraph: 'This is an example info empty state data display paragraph',\n};\n"],"names":["codeString","EmptyStateDataDisplay_stories","EmptyStateDataDisplay","Template","args","jsx","EmptyStateDataDisplayExample"],"mappings":";;AAKA,MAAMA,IAAa,iEAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAgD,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAuB,GAAGE,EAAM,CAAA,GAEpFE,IAA+BH,EAAS,KAAK,EAAE;AAC5DG,EAA6B,OAAO;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AACb;"}
|
|
1
|
+
{"version":3,"file":"EmptyStateDataDisplay.stories.js","sources":["../../../src/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { EmptyStateDataDisplayProps } from './EmptyStateDataDisplay';\n\nimport { EmptyStateDataDisplay } from './EmptyStateDataDisplay';\n\nconst codeString = '<EmptyStateDataDisplay label={label} paragraph={paragraph} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/EmptyStateDataDisplay',\n component: EmptyStateDataDisplay,\n parameters: {\n inspectComponent: EmptyStateDataDisplay,\n codeString: codeString,\n },\n} as Meta<EmptyStateDataDisplayProps>;\n\nconst Template: StoryFn<EmptyStateDataDisplayProps> = (args) => <EmptyStateDataDisplay {...args} />;\n\nexport const EmptyStateDataDisplayExample = Template.bind({});\nEmptyStateDataDisplayExample.args = {\n label: 'This is an example info empty state data display label',\n paragraph: 'This is an example info empty state data display paragraph',\n};\n"],"names":["codeString","EmptyStateDataDisplay_stories","EmptyStateDataDisplay","Template","args","jsx","EmptyStateDataDisplayExample"],"mappings":";;AAKA,MAAMA,IAAa,iEAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAgD,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAuB,GAAGE,EAAM,CAAA,GAEpFE,IAA+BH,EAAS,KAAK,EAAE;AAC5DG,EAA6B,OAAO;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AACb;"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
type FeedbackLevel = 'success' | 'warning' | 'error';
|
|
2
2
|
export interface FeedbackBoxProps {
|
|
3
|
+
/** The id of the element. */
|
|
3
4
|
id?: string;
|
|
5
|
+
/** The feedback level, indicates what icon is used. */
|
|
4
6
|
level: FeedbackLevel;
|
|
7
|
+
/** The feedback value. */
|
|
5
8
|
feedback: string;
|
|
6
9
|
}
|
|
10
|
+
/** Represents a component to show feedback. */
|
|
7
11
|
export declare const FeedbackBox: ({ id, level, feedback }: FeedbackBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
12
|
export {};
|
|
@@ -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: 'ExclamationTriangleMini',\n error: 'ExclamationCircle',\n};\n\nexport interface FeedbackBoxProps {\n id?: string;\n level: FeedbackLevel;\n feedback: string;\n}\n\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":";;;;;;;;GAUMA,IAA2D;AAAA,EAC/D,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT,
|
|
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: 'ExclamationTriangleMini',\n error: 'ExclamationCircle',\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":";;;;;;;;GAUMA,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;"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { FeedbackBox as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { FeedbackBox as e } from "./FeedbackBox.js";
|
|
3
3
|
import { Container as c } from "../../storyComponents/Container/Container.js";
|
|
4
|
-
const
|
|
4
|
+
const a = "<FeedbackBox id={id} level={level} feedback={feedback} />", i = {
|
|
5
5
|
title: "Molecules/FeedbackBox",
|
|
6
|
-
component:
|
|
6
|
+
component: e,
|
|
7
7
|
parameters: {
|
|
8
|
-
|
|
8
|
+
inspectComponent: e,
|
|
9
|
+
codeString: a
|
|
9
10
|
}
|
|
10
|
-
}, d = (
|
|
11
|
-
|
|
11
|
+
}, d = (t) => /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(e, { ...t }) }), s = d.bind({});
|
|
12
|
+
s.args = {
|
|
12
13
|
id: "gba0d2d4",
|
|
13
14
|
level: "success",
|
|
14
15
|
feedback: "Example FeedbackBox text"
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
s as FeedbackBoxExample,
|
|
19
|
+
i as default
|
|
19
20
|
};
|
|
20
21
|
//# 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 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":";;;AAOA,MAAMA,IAAa,6DAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAsC,CAACC,MAC3C,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAH,GAAA,EAAa,GAAGE,EAAM,CAAA,EACzB,CAAA,GAGWG,IAAqBJ,EAAS,KAAK,EAAE;AAClDI,EAAmB,OAAO;AAAA,EACxB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,UAAU;AACZ;"}
|
|
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":";;;AAOA,MAAMA,IAAa,6DAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAsC,CAACC,MAC3C,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAH,GAAA,EAAa,GAAGE,EAAM,CAAA,EACzB,CAAA,GAGWG,IAAqBJ,EAAS,KAAK,EAAE;AAClDI,EAAmB,OAAO;AAAA,EACxB,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,UAAU;AACZ;"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface FieldHintProps {
|
|
2
|
+
/** The value to display. */
|
|
2
3
|
value?: string;
|
|
4
|
+
/** The aria-valuetext value of the spinner component. */
|
|
3
5
|
spinnerAriaValueText: string;
|
|
6
|
+
/** true if the field hint is loading; otherwise, false. The default is false. */
|
|
4
7
|
loading?: boolean;
|
|
5
8
|
}
|
|
9
|
+
/** Represents a component to show a hint for an input element. */
|
|
6
10
|
export declare function FieldHint({ value, spinnerAriaValueText, loading }: FieldHintProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHint.js","sources":["../../../src/components/FieldHint/FieldHint.tsx"],"sourcesContent":["import styles from './FieldHint.module.css';\n\nimport { Spinner } from 'components/Spinner/Spinner';\n\nexport interface FieldHintProps {\n value?: string;\n spinnerAriaValueText: string;\n loading?: boolean;\n}\n\nexport function FieldHint({ value, spinnerAriaValueText, loading }: FieldHintProps) {\n return (\n <span className={styles['field-hint']}>\n {value && <>{value}</>}\n {!value && loading && <Spinner ariaValueText={spinnerAriaValueText} />}\n </span>\n );\n}\n"],"names":["FieldHint","value","spinnerAriaValueText","loading","jsxs","styles","jsx","Spinner"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"FieldHint.js","sources":["../../../src/components/FieldHint/FieldHint.tsx"],"sourcesContent":["import styles from './FieldHint.module.css';\n\nimport { Spinner } from 'components/Spinner/Spinner';\n\nexport interface FieldHintProps {\n /** The value to display. */\n value?: string;\n /** The aria-valuetext value of the spinner component. */\n spinnerAriaValueText: string;\n /** true if the field hint is loading; otherwise, false. The default is false. */\n loading?: boolean;\n}\n\n/** Represents a component to show a hint for an input element. */\nexport function FieldHint({ value, spinnerAriaValueText, loading }: FieldHintProps) {\n return (\n <span className={styles['field-hint']}>\n {value && <>{value}</>}\n {!value && loading && <Spinner ariaValueText={spinnerAriaValueText} />}\n </span>\n );\n}\n"],"names":["FieldHint","value","spinnerAriaValueText","loading","jsxs","styles","jsx","Spinner"],"mappings":";;;;;AAcO,SAASA,EAAU,EAAE,OAAAC,GAAO,sBAAAC,GAAsB,SAAAC,KAA2B;AAClF,SACG,gBAAAC,EAAA,QAAA,EAAK,WAAWC,EAAO,YAAY,GACjC,UAAA;AAAA,IAAAJ,4BAAY,UAAMA,EAAA,CAAA;AAAA,IAClB,CAACA,KAASE,KAAY,gBAAAG,EAAAC,GAAA,EAAQ,eAAeL,GAAsB;AAAA,EACtE,EAAA,CAAA;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHint.stories.js","sources":["../../../src/components/FieldHint/FieldHint.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FieldHintProps } from './FieldHint';\n\nimport { FieldHint } from './FieldHint';\n\nconst codeString = '<FieldHint value={value} loading={loading} spinnerAriaValueText={spinnerAriaValueText} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FieldHint',\n component: FieldHint,\n argTypes: {\n value: {\n control: 'text',\n },\n spinnerAriaValueText: {\n control: 'text',\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<FieldHintProps>;\n\nconst Template: StoryFn<FieldHintProps> = (args) => <FieldHint {...args} />;\n\nconst defaultArgs: Partial<FieldHintProps> = {\n spinnerAriaValueText: 'FieldHint Loading',\n};\n\nexport const FieldHintExample = Template.bind({});\nFieldHintExample.args = {\n value: 'This is a FieldHint',\n loading: false,\n ...defaultArgs,\n};\n\nexport const LoadingFieldHint = Template.bind({});\nLoadingFieldHint.args = {\n value: '',\n loading: true,\n ...defaultArgs,\n};\n"],"names":["codeString","FieldHint_stories","FieldHint","Template","args","jsx","defaultArgs","FieldHintExample","LoadingFieldHint"],"mappings":";;AAKA,MAAMA,IAAa,6FAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,sBAAsB;AAAA,MACpB,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,YAAAF;AAAA,EACF;AACF,GAEMG,IAAoC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAW,GAAGE,EAAM,CAAA,GAEnEE,IAAuC;AAAA,EAC3C,sBAAsB;AACxB,GAEaC,IAAmBJ,EAAS,KAAK,EAAE;AAChDI,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGD;AACL;AAEO,MAAME,IAAmBL,EAAS,KAAK,EAAE;AAChDK,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGF;AACL;"}
|
|
1
|
+
{"version":3,"file":"FieldHint.stories.js","sources":["../../../src/components/FieldHint/FieldHint.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FieldHintProps } from './FieldHint';\n\nimport { FieldHint } from './FieldHint';\n\nconst codeString = '<FieldHint value={value} loading={loading} spinnerAriaValueText={spinnerAriaValueText} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FieldHint',\n component: FieldHint,\n argTypes: {\n value: {\n control: 'text',\n },\n spinnerAriaValueText: {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: FieldHint,\n codeString: codeString,\n },\n} as Meta<FieldHintProps>;\n\nconst Template: StoryFn<FieldHintProps> = (args) => <FieldHint {...args} />;\n\nconst defaultArgs: Partial<FieldHintProps> = {\n spinnerAriaValueText: 'FieldHint Loading',\n};\n\nexport const FieldHintExample = Template.bind({});\nFieldHintExample.args = {\n value: 'This is a FieldHint',\n loading: false,\n ...defaultArgs,\n};\n\nexport const LoadingFieldHint = Template.bind({});\nLoadingFieldHint.args = {\n value: '',\n loading: true,\n ...defaultArgs,\n};\n"],"names":["codeString","FieldHint_stories","FieldHint","Template","args","jsx","defaultArgs","FieldHintExample","LoadingFieldHint"],"mappings":";;AAKA,MAAMA,IAAa,6FAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,sBAAsB;AAAA,MACpB,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAoC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAW,GAAGE,EAAM,CAAA,GAEnEE,IAAuC;AAAA,EAC3C,sBAAsB;AACxB,GAEaC,IAAmBJ,EAAS,KAAK,EAAE;AAChDI,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGD;AACL;AAEO,MAAME,IAAmBL,EAAS,KAAK,EAAE;AAChDK,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGF;AACL;"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
export interface FieldsetProps {
|
|
3
|
+
/** The description to render. */
|
|
3
4
|
description?: ReactNode;
|
|
5
|
+
/** The id of the description element. Used together with the description property. */
|
|
4
6
|
descriptionId?: string;
|
|
7
|
+
/** true if the form fields should render inline; otherwise, false. The default is false. */
|
|
5
8
|
inline?: boolean;
|
|
9
|
+
/** The legend to render. */
|
|
6
10
|
legend: string;
|
|
7
11
|
}
|
|
12
|
+
/** Represents a component to show a collection of form field elements. */
|
|
8
13
|
export declare const Fieldset: ({ inline, legend, description, descriptionId, children, }: PropsWithChildren<FieldsetProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.js","sources":["../../../src/components/Fieldset/Fieldset.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Fieldset.module.css';\n\nexport interface FieldsetProps {\n description?: ReactNode;\n descriptionId?: string;\n inline?: boolean;\n legend: string;\n}\n\nexport const Fieldset = ({\n inline,\n legend,\n description,\n descriptionId,\n children,\n}: PropsWithChildren<FieldsetProps>) => (\n <fieldset\n className={clsx(styles['fieldset'], {\n [styles['fieldset--inline']]: inline,\n })}\n >\n <div>\n <legend className={styles['fieldset__legend']}>{legend}</legend>\n {description && (\n <p className={styles['fieldset__description']} id={descriptionId}>\n {description}\n </p>\n )}\n </div>\n {children}\n </fieldset>\n);\n"],"names":["Fieldset","inline","legend","description","descriptionId","children","jsxs","clsx","styles","jsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"Fieldset.js","sources":["../../../src/components/Fieldset/Fieldset.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Fieldset.module.css';\n\nexport interface FieldsetProps {\n /** The description to render. */\n description?: ReactNode;\n /** The id of the description element. Used together with the description property. */\n descriptionId?: string;\n /** true if the form fields should render inline; otherwise, false. The default is false. */\n inline?: boolean;\n /** The legend to render. */\n legend: string;\n}\n\n/** Represents a component to show a collection of form field elements. */\nexport const Fieldset = ({\n inline,\n legend,\n description,\n descriptionId,\n children,\n}: PropsWithChildren<FieldsetProps>) => (\n <fieldset\n className={clsx(styles['fieldset'], {\n [styles['fieldset--inline']]: inline,\n })}\n >\n <div>\n <legend className={styles['fieldset__legend']}>{legend}</legend>\n {description && (\n <p className={styles['fieldset__description']} id={descriptionId}>\n {description}\n </p>\n )}\n </div>\n {children}\n </fieldset>\n);\n"],"names":["Fieldset","inline","legend","description","descriptionId","children","jsxs","clsx","styles","jsx"],"mappings":";;;;;;;GAkBaA,IAAW,CAAC;AAAA,EACvB,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AACF,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,UAAa;AAAA,MAClC,CAACA,EAAO,kBAAkB,CAAC,GAAGP;AAAA,IAAA,CAC/B;AAAA,IAED,UAAA;AAAA,MAAA,gBAAAK,EAAC,OACC,EAAA,UAAA;AAAA,QAAA,gBAAAG,EAAC,UAAO,EAAA,WAAWD,EAAO,kBAAsB,UAAON,GAAA;AAAA,QACtDC,uBACE,KAAE,EAAA,WAAWK,EAAO,uBAA0B,IAAIJ,GAChD,UACHD,EAAA,CAAA;AAAA,MAAA,GAEJ;AAAA,MACCE;AAAA,IAAA;AAAA,EAAA;AACH;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { Fieldset as
|
|
3
|
-
import { InputField as
|
|
4
|
-
import { Label as
|
|
5
|
-
import { Container as
|
|
6
|
-
import { FormField as
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { Fieldset as l } from "./Fieldset.js";
|
|
3
|
+
import { InputField as t } from "../InputField/InputField.js";
|
|
4
|
+
import { Label as r } from "../Label/Label.js";
|
|
5
|
+
import { Container as a } from "../../storyComponents/Container/Container.js";
|
|
6
|
+
import { FormField as s } from "../FormField/FormField.js";
|
|
7
7
|
const m = "<Fieldset legend={legend} description={description}>{children}</Fieldset>", u = {
|
|
8
8
|
title: "Atoms/Fieldset",
|
|
9
|
-
component:
|
|
9
|
+
component: l,
|
|
10
10
|
argTypes: {
|
|
11
11
|
descriptionId: {
|
|
12
12
|
table: {
|
|
@@ -15,27 +15,28 @@ const m = "<Fieldset legend={legend} description={description}>{children}</Field
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
parameters: {
|
|
18
|
+
inspectComponent: l,
|
|
18
19
|
codeString: m
|
|
19
20
|
}
|
|
20
|
-
},
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */ e(
|
|
23
|
-
/* @__PURE__ */ e(
|
|
21
|
+
}, o = (n) => /* @__PURE__ */ e(a, { size: "large", children: /* @__PURE__ */ i(l, { ...n, children: [
|
|
22
|
+
/* @__PURE__ */ i(s, { children: [
|
|
23
|
+
/* @__PURE__ */ e(r, { htmlFor: "d6aa53fd", children: "Example label 1" }),
|
|
24
|
+
/* @__PURE__ */ e(t, { id: "d6aa53fd" })
|
|
24
25
|
] }),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
/* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ i(s, { children: [
|
|
27
|
+
/* @__PURE__ */ e(r, { htmlFor: "4e7a2f22", children: "Example label 2" }),
|
|
28
|
+
/* @__PURE__ */ e(t, { id: "4e7a2f22" })
|
|
28
29
|
] })
|
|
29
|
-
] }) }),
|
|
30
|
+
] }) }), d = {
|
|
30
31
|
legend: "Fieldset example",
|
|
31
32
|
inline: !1
|
|
32
|
-
}, p =
|
|
33
|
+
}, p = o.bind({});
|
|
33
34
|
p.args = {
|
|
34
|
-
...
|
|
35
|
+
...d
|
|
35
36
|
};
|
|
36
|
-
const c =
|
|
37
|
+
const c = o.bind({});
|
|
37
38
|
c.args = {
|
|
38
|
-
...
|
|
39
|
+
...d,
|
|
39
40
|
description: "A Fieldset groups several controls as well as labels"
|
|
40
41
|
};
|
|
41
42
|
export {
|
|
@@ -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 '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
|
+
{"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 '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 inspectComponent: Fieldset,\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,kBAAkBA;AAAA,IAClB,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,6 +1,9 @@
|
|
|
1
1
|
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
export interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** true if a margin at the top and bottom should be added; otherwise, false. The default is false. */
|
|
3
4
|
outerSpace?: boolean;
|
|
5
|
+
/** true if the label and input field should be rendered on the same row; otherwise, false. The default is false. */
|
|
4
6
|
inline?: boolean;
|
|
5
7
|
}
|
|
8
|
+
/** Represents an element to wrap a label and input field. */
|
|
6
9
|
export declare const FormField: ({ children, outerSpace, inline, ...rest }: PropsWithChildren<FormFieldProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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 outerSpace?: boolean;\n inline?: boolean;\n}\n\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}\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":";;;;;;GAcaA,IAAY,CAAC,EAAE,UAAAC,GAAU,YAAAC,GAAY,QAAAC,GAAQ,GAAGC,QAC3D,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,YAAY,GAAG;AAAA,MAC1C,CAACA,EAAO,wBAAwB,CAAC,GAAGL;AAAA,MACpC,CAACK,EAAO,oBAAoB,CAAC,GAAGJ;AAAA,IAAA,CACjC;AAAA,IACA,GAAGC;AAAA,IAEH,UAAAH;AAAA,EAAA;AACH;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FormField as
|
|
3
|
-
import { InputField as
|
|
4
|
-
import { Label as
|
|
5
|
-
import { Container as
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { FormField as o } from "./FormField.js";
|
|
3
|
+
import { InputField as t } from "../InputField/InputField.js";
|
|
4
|
+
import { Label as i } from "../Label/Label.js";
|
|
5
|
+
import { Container as n } from "../../storyComponents/Container/Container.js";
|
|
6
|
+
const a = "<FormField>{children}</FormField>", b = {
|
|
7
7
|
title: "Atoms/FormField",
|
|
8
|
-
component:
|
|
8
|
+
component: o,
|
|
9
9
|
argTypes: {
|
|
10
10
|
outerSpace: {
|
|
11
11
|
control: "boolean"
|
|
@@ -15,16 +15,17 @@ const n = "<FormField>{children}</FormField>", b = {
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
parameters: {
|
|
18
|
-
|
|
18
|
+
inspectComponent: o,
|
|
19
|
+
codeString: a
|
|
19
20
|
}
|
|
20
|
-
}, m = (l) => /* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */ o
|
|
22
|
-
/* @__PURE__ */ e(
|
|
23
|
-
/* @__PURE__ */ e(
|
|
21
|
+
}, m = (l) => /* @__PURE__ */ r(n, { children: [
|
|
22
|
+
/* @__PURE__ */ r(o, { ...l, children: [
|
|
23
|
+
/* @__PURE__ */ e(i, { htmlFor: "d6aa53fd", children: "Example label 1" }),
|
|
24
|
+
/* @__PURE__ */ e(t, { id: "d6aa53fd" })
|
|
24
25
|
] }),
|
|
25
|
-
/* @__PURE__ */ o
|
|
26
|
-
/* @__PURE__ */ e(
|
|
27
|
-
/* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ r(o, { ...l, children: [
|
|
27
|
+
/* @__PURE__ */ e(i, { htmlFor: "4e7a2f22", children: "Example label 2" }),
|
|
28
|
+
/* @__PURE__ */ e(t, { id: "4e7a2f22" })
|
|
28
29
|
] })
|
|
29
30
|
] }), d = {
|
|
30
31
|
outerSpace: !1,
|
|
@@ -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 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
|
+
{"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</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,kBAAkBA;AAAA,IAClB,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,10 +1,14 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
type spacing = '0' | '025' | '050' | '075' | '100' | '125' | '150' | '175' | '200' | '250' | '300' | '350';
|
|
3
3
|
export interface GridRowProps {
|
|
4
|
+
/** The horizontal padding between columns. */
|
|
4
5
|
gutter?: spacing;
|
|
6
|
+
/** The vertical padding (at the bottom) between rows. */
|
|
5
7
|
marginBottom?: spacing;
|
|
8
|
+
/** The vertical padding (at the top) between rows. */
|
|
6
9
|
marginTop?: spacing;
|
|
7
10
|
}
|
|
11
|
+
/** Represents a component for a grid. */
|
|
8
12
|
export declare const GridRow: {
|
|
9
13
|
({ gutter, marginBottom, marginTop, children, }: PropsWithChildren<GridRowProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
14
|
Column: ({ size, mediumSize, startPositon, mediumStartPosition, position, children, }: PropsWithChildren<import('./Column').ColumnProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { s as r, C as d } from "../../Column-BUyVh2Oo.js";
|
|
4
4
|
const s = {
|
|
5
5
|
0: { "--grid-gap": "0.25rem" },
|
|
@@ -19,10 +19,10 @@ const s = {
|
|
|
19
19
|
marginBottom: e = "0",
|
|
20
20
|
marginTop: m = "0",
|
|
21
21
|
children: a
|
|
22
|
-
}) => /* @__PURE__ */
|
|
22
|
+
}) => /* @__PURE__ */ p(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
|
-
className:
|
|
25
|
+
className: i(
|
|
26
26
|
r["page-grid__row"],
|
|
27
27
|
e && r[`page-grid__row-mb-${e}`],
|
|
28
28
|
m && r[`page-grid__row-mt-${m}`]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridRow.js","sources":["../../../src/components/GridRow/GridRow.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { CSSProperties, PropsWithChildren } from 'react';\n\nimport { Column } from './Column';\nimport styles from './GridRow.module.css';\n\ntype spacing = '0' | '025' | '050' | '075' | '100' | '125' | '150' | '175' | '200' | '250' | '300' | '350';\nexport interface GridRowProps {\n gutter?: spacing;\n marginBottom?: spacing;\n marginTop?: spacing;\n}\n\nconst
|
|
1
|
+
{"version":3,"file":"GridRow.js","sources":["../../../src/components/GridRow/GridRow.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { CSSProperties, PropsWithChildren } from 'react';\n\nimport { Column } from './Column';\nimport styles from './GridRow.module.css';\n\ntype spacing = '0' | '025' | '050' | '075' | '100' | '125' | '150' | '175' | '200' | '250' | '300' | '350';\nexport interface GridRowProps {\n /** The horizontal padding between columns. */\n gutter?: spacing;\n /** The vertical padding (at the bottom) between rows. */\n marginBottom?: spacing;\n /** The vertical padding (at the top) between rows. */\n marginTop?: spacing;\n}\n\nconst gapStyles = {\n '0': { '--grid-gap': '0.25rem' },\n '025': { '--grid-gap': '0.25rem' },\n '050': { '--grid-gap': '0.5rem' },\n '075': { '--grid-gap': '0.75rem' },\n '100': { '--grid-gap': '1rem' },\n '125': { '--grid-gap': '1.25rem' },\n '150': { '--grid-gap': '1.5rem' },\n '175': { '--grid-gap': '1.75rem' },\n '200': { '--grid-gap': '2rem' },\n '250': { '--grid-gap': '2.5rem' },\n '300': { '--grid-gap': '3rem' },\n '350': { '--grid-gap': '3.5rem' },\n};\n\n/** Represents a component for a grid. */\nexport const GridRow = ({\n gutter = '200',\n marginBottom = '0',\n marginTop = '0',\n children,\n}: PropsWithChildren<GridRowProps>) => {\n return (\n <div\n className={clsx(\n styles['page-grid__row'],\n marginBottom && styles[`page-grid__row-mb-${marginBottom}`],\n marginTop && styles[`page-grid__row-mt-${marginTop}`]\n )}\n style={gutter && (gapStyles[gutter] as CSSProperties)}\n >\n {children}\n </div>\n );\n};\n\nGridRow.Column = Column;\n"],"names":["gapStyles","GridRow","gutter","marginBottom","marginTop","children","jsx","clsx","styles","Column"],"mappings":";;;AAiBA,MAAMA,IAAY;AAAA,EAChB,GAAK,EAAE,cAAc,UAAU;AAAA,EAC/B,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,OAAO,EAAE,cAAc,SAAS;AAAA,EAChC,OAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,UAAU;AAAA,EACjC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAAA,EAChC,KAAO,EAAE,cAAc,OAAO;AAAA,EAC9B,KAAO,EAAE,cAAc,SAAS;AAClC,GAGaC,IAAU,CAAC;AAAA,EACtB,QAAAC,IAAS;AAAA,EACT,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACTC,EAAO,gBAAgB;AAAA,MACvBL,KAAgBK,EAAO,qBAAqBL,CAAY,EAAE;AAAA,MAC1DC,KAAaI,EAAO,qBAAqBJ,CAAS,EAAE;AAAA,IACtD;AAAA,IACA,OAAOF,KAAWF,EAAUE,CAAM;AAAA,IAEjC,UAAAG;AAAA,EAAA;AAAA;AAKPJ,EAAQ,SAASQ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridRow.stories.js","sources":["../../../src/components/GridRow/GridRow.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { GridRowProps } from './GridRow';\nimport type { CSSProperties } from 'react';\n\nimport { GridRow } from './GridRow';\n\nimport './GridRow.stories.css';\n\nconst gapStyles = {\n '0': { '--grid-gap': '0.25rem' },\n '025': { '--grid-gap': '0.25rem' },\n '050': { '--grid-gap': '0.5rem' },\n '075': { '--grid-gap': '0.75rem' },\n '100': { '--grid-gap': '1rem' },\n '125': { '--grid-gap': '1.25rem' },\n '150': { '--grid-gap': '1.5rem' },\n '175': { '--grid-gap': '1.75rem' },\n '200': { '--grid-gap': '2rem' },\n '250': { '--grid-gap': '2.5rem' },\n '300': { '--grid-gap': '3rem' },\n '350': { '--grid-gap': '3.5rem' },\n};\n\nconst codeString = `\n <GridRow gutter={gutter} marginTop={marginTop} marginBottom={marginBottom}>\n // Up to 12 GridRow.Column's can be added as needed.\n <GridRow.Column size={size} mediumSize={mediumSize} startPositon={startPositon}\n mediumStartPosition={mediumStartPosition}> {children} </GridRow.Column> </GridRow>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/GridRow',\n component: GridRow,\n argTypes: {\n gutter: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginBottom: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginTop: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n },\n parameters: {\n codeString: codeString,\n },\n} as Meta<GridRowProps>;\n\nconst Template: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column>Col-12</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"1\">Col-1</GridRow.Column>\n <GridRow.Column size=\"11\">Col-11</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"2\">Col-2</GridRow.Column>\n <GridRow.Column size=\"10\">Col-10</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\">Col-3</GridRow.Column>\n <GridRow.Column size=\"9\">Col-9</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"4\">Col-4</GridRow.Column>\n <GridRow.Column size=\"8\">Col-8</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"5\">Col-5</GridRow.Column>\n <GridRow.Column size=\"7\">Col-7</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n </GridRow>\n </div>\n);\n\nconst defaultArgs: Partial<GridRowProps> = {\n gutter: '200',\n marginBottom: '050',\n marginTop: '0',\n};\n\nexport const GridRowExample = Template.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n\nconst TemplateMedium: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"12\">\n L: 4, Md: 12\n </GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 12\n </GridRow.Column>\n <GridRow.Column size=\"6\" mediumSize=\"12\">\n L: 6, Md: 12, S: 12\n </GridRow.Column>\n </GridRow>\n </div>\n);\n\nexport const WithMediumBreakpoint = TemplateMedium.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n"],"names":["gapStyles","codeString","GridRow_stories","GridRow","Template","args","jsxs","jsx","defaultArgs","GridRowExample","TemplateMedium","WithMediumBreakpoint"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"GridRow.stories.js","sources":["../../../src/components/GridRow/GridRow.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { GridRowProps } from './GridRow';\nimport type { CSSProperties } from 'react';\n\nimport { GridRow } from './GridRow';\n\nimport './GridRow.stories.css';\n\nconst gapStyles = {\n '0': { '--grid-gap': '0.25rem' },\n '025': { '--grid-gap': '0.25rem' },\n '050': { '--grid-gap': '0.5rem' },\n '075': { '--grid-gap': '0.75rem' },\n '100': { '--grid-gap': '1rem' },\n '125': { '--grid-gap': '1.25rem' },\n '150': { '--grid-gap': '1.5rem' },\n '175': { '--grid-gap': '1.75rem' },\n '200': { '--grid-gap': '2rem' },\n '250': { '--grid-gap': '2.5rem' },\n '300': { '--grid-gap': '3rem' },\n '350': { '--grid-gap': '3.5rem' },\n};\n\nconst codeString = `\n <GridRow gutter={gutter} marginTop={marginTop} marginBottom={marginBottom}>\n // Up to 12 GridRow.Column's can be added as needed.\n <GridRow.Column size={size} mediumSize={mediumSize} startPositon={startPositon}\n mediumStartPosition={mediumStartPosition}> {children} </GridRow.Column> </GridRow>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/GridRow',\n component: GridRow,\n argTypes: {\n gutter: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginBottom: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n marginTop: {\n options: ['0', '025', '050', '075', '100', '125', '150', '175', '200', '250', '300', '350'],\n control: { type: 'select' },\n },\n },\n parameters: {\n inspectComponent: GridRow,\n codeString: codeString,\n },\n} as Meta<GridRowProps>;\n\nconst Template: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column>Col-12</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"1\">Col-1</GridRow.Column>\n <GridRow.Column size=\"11\">Col-11</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"2\">Col-2</GridRow.Column>\n <GridRow.Column size=\"10\">Col-10</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\">Col-3</GridRow.Column>\n <GridRow.Column size=\"9\">Col-9</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"4\">Col-4</GridRow.Column>\n <GridRow.Column size=\"8\">Col-8</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"5\">Col-5</GridRow.Column>\n <GridRow.Column size=\"7\">Col-7</GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n <GridRow.Column size=\"6\">Col-6</GridRow.Column>\n </GridRow>\n </div>\n);\n\nconst defaultArgs: Partial<GridRowProps> = {\n gutter: '200',\n marginBottom: '050',\n marginTop: '0',\n};\n\nexport const GridRowExample = Template.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n\nconst TemplateMedium: StoryFn<GridRowProps> = (args) => (\n <div className=\"page-wrapper\" style={args.gutter && (gapStyles[args.gutter] as CSSProperties)}>\n <GridRow {...args}>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"6\">\n L: 4, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"4\" mediumSize=\"12\">\n L: 4, Md: 12\n </GridRow.Column>\n </GridRow>\n <GridRow {...args}>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 6, S: 12\n </GridRow.Column>\n <GridRow.Column size=\"3\" mediumSize=\"6\">\n L: 3, Md: 12\n </GridRow.Column>\n <GridRow.Column size=\"6\" mediumSize=\"12\">\n L: 6, Md: 12, S: 12\n </GridRow.Column>\n </GridRow>\n </div>\n);\n\nexport const WithMediumBreakpoint = TemplateMedium.bind({});\nGridRowExample.args = {\n ...defaultArgs,\n};\n"],"names":["gapStyles","codeString","GridRow_stories","GridRow","Template","args","jsxs","jsx","defaultArgs","GridRowExample","TemplateMedium","WithMediumBreakpoint"],"mappings":"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"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export interface HorizontalListProps {
|
|
2
|
+
/** The items to display. */
|
|
2
3
|
values: string[];
|
|
4
|
+
/** The separator to use. */
|
|
3
5
|
separator?: string;
|
|
4
6
|
}
|
|
7
|
+
/** Represents a component to show text separated by a given separator in a horizontal direction. */
|
|
5
8
|
export declare const HorizontalList: ({ values, separator }: HorizontalListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n values: string[];\n separator?: string;\n}\n\nexport const HorizontalList = ({ values, separator = '•' }: HorizontalListProps) => {\n return (\n <div className={styles['horizontal-list-wrapper']}>\n {values.map((string, index) => (\n <span key={`${string.replace(' ', '-')}_${index}`}>\n {string}\n {index < values.length - 1 && (\n <span className={styles['horizontal-list-separator']} dangerouslySetInnerHTML={{ __html: separator }} />\n )}\n </span>\n ))}\n </div>\n );\n};\n"],"names":["HorizontalList","values","separator","jsx","styles","string","index","jsxs"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n /** The items to display. */\n values: string[];\n /** The separator to use. */\n separator?: string;\n}\n\n/** Represents a component to show text separated by a given separator in a horizontal direction. */\nexport const HorizontalList = ({ values, separator = '•' }: HorizontalListProps) => {\n return (\n <div className={styles['horizontal-list-wrapper']}>\n {values.map((string, index) => (\n <span key={`${string.replace(' ', '-')}_${index}`}>\n {string}\n {index < values.length - 1 && (\n <span className={styles['horizontal-list-separator']} dangerouslySetInnerHTML={{ __html: separator }} />\n )}\n </span>\n ))}\n </div>\n );\n};\n"],"names":["HorizontalList","values","separator","jsx","styles","string","index","jsxs"],"mappings":";;;;GAUaA,IAAiB,CAAC,EAAE,QAAAC,GAAQ,WAAAC,IAAY,eAEhD,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,yBAAyB,GAC7C,UAAOH,EAAA,IAAI,CAACI,GAAQC,MACnB,gBAAAC,EAAC,QACE,EAAA,UAAA;AAAA,EAAAF;AAAA,EACAC,IAAQL,EAAO,SAAS,uBACtB,QAAK,EAAA,WAAWG,EAAO,2BAA2B,GAAG,yBAAyB,EAAE,QAAQF,EAAa,EAAA,CAAA;AAH/F,EAAA,GAAA,GAAGG,EAAO,QAAQ,KAAK,GAAG,CAAC,IAAIC,CAAK,EAK/C,CACD,EACH,CAAA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { HorizontalList as t } from "./HorizontalList.js";
|
|
3
|
-
const a = '<HorizontalList values={values} separator="•" />',
|
|
3
|
+
const a = '<HorizontalList values={values} separator="•" />', p = {
|
|
4
4
|
title: "Atoms/HorizontalList",
|
|
5
5
|
component: t,
|
|
6
6
|
argTypes: {
|
|
@@ -9,17 +9,18 @@ const a = '<HorizontalList values={values} separator="•" />', u = {
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
parameters: {
|
|
12
|
+
inspectComponent: t,
|
|
12
13
|
codeString: a
|
|
13
14
|
}
|
|
14
|
-
},
|
|
15
|
+
}, e = (o) => /* @__PURE__ */ s(t, { ...o }), r = {
|
|
15
16
|
values: ["Curabitur consequat", "Lectus sit amet luctus vulputate", "Nisi semi mattis"],
|
|
16
17
|
separator: "•"
|
|
17
|
-
}, i =
|
|
18
|
+
}, i = e.bind({});
|
|
18
19
|
i.args = {
|
|
19
|
-
...
|
|
20
|
+
...r
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
23
|
i as HorizontalListExample,
|
|
23
|
-
|
|
24
|
+
p as default
|
|
24
25
|
};
|
|
25
26
|
//# 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\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
|
+
{"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 inspectComponent: HorizontalList,\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,kBAAkBA;AAAA,IAClB,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;"}
|
|
@@ -2,9 +2,13 @@ import { ReactNode, SVGAttributes } from 'react';
|
|
|
2
2
|
import { Icons } from './icons';
|
|
3
3
|
type IconName = keyof typeof Icons;
|
|
4
4
|
export interface IconProps extends Omit<SVGAttributes<SVGElement>, 'height' | 'width'> {
|
|
5
|
+
/** The name of the icon to render. */
|
|
5
6
|
name: IconName;
|
|
7
|
+
/** The size (in pixels) of the icon to render. */
|
|
6
8
|
size?: 16 | 20 | 24 | 32 | 48 | 64 | 96 | 128;
|
|
9
|
+
/** The title used for a tooltip. */
|
|
7
10
|
title?: string;
|
|
8
11
|
}
|
|
12
|
+
/** Represents a component to render an icon. */
|
|
9
13
|
export declare const Icon: ({ name, size, title, ...restProps }: IconProps) => ReactNode;
|
|
10
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { ReactNode, SVGAttributes } from 'react';\n\nimport { Icons } from './icons';\n\ntype IconName = keyof typeof Icons;\n\nexport interface IconProps extends Omit<SVGAttributes<SVGElement>, 'height' | 'width'> {\n name: IconName;\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n size?: 16 | 20 | 24 | 32 | 48 | 64 | 96 | 128;\n title?: string;\n}\n\nconst defaultSize = 24;\n\nexport const Icon = ({ name, size = defaultSize, title, ...restProps }: IconProps): ReactNode => {\n const Icon = Icons[name];\n\n return <Icon aria-hidden={true} height={size} width={size} title={title} {...restProps} />;\n};\n"],"names":["defaultSize","Icon","name","size","title","restProps","Icons","jsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { ReactNode, SVGAttributes } from 'react';\n\nimport { Icons } from './icons';\n\ntype IconName = keyof typeof Icons;\n\nexport interface IconProps extends Omit<SVGAttributes<SVGElement>, 'height' | 'width'> {\n /** The name of the icon to render. */\n name: IconName;\n /** The size (in pixels) of the icon to render. */\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n size?: 16 | 20 | 24 | 32 | 48 | 64 | 96 | 128;\n /** The title used for a tooltip. */\n title?: string;\n}\n\nconst defaultSize = 24;\n\n/** Represents a component to render an icon. */\nexport const Icon = ({ name, size = defaultSize, title, ...restProps }: IconProps): ReactNode => {\n const Icon = Icons[name];\n\n return <Icon aria-hidden={true} height={size} width={size} title={title} {...restProps} />;\n};\n"],"names":["defaultSize","Icon","name","size","title","restProps","Icons","jsx"],"mappings":";;AAgBA,MAAMA,IAAc,IAGPC,IAAO,CAAC,EAAE,MAAAC,GAAM,MAAAC,IAAOH,GAAa,OAAAI,GAAO,GAAGC,QAAsC;AACzFJ,QAAAA,IAAOK,EAAMJ,CAAI;AAEhB,SAAA,gBAAAK,EAACN,GAAA,EAAK,eAAa,IAAM,QAAQE,GAAM,OAAOA,GAAM,OAAAC,GAAe,GAAGC,EAAW,CAAA;AAC1F;"}
|
|
@@ -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 '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
|
+
{"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 '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 inspectComponent: Icon,\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,kBAAkBA;AAAA,IAClB,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,8 +1,13 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
|
|
3
|
+
/** The value of the aria-label. */
|
|
3
4
|
'aria-label': string;
|
|
5
|
+
/** The variant of the button. */
|
|
4
6
|
variant?: 'destructive';
|
|
7
|
+
/** true if the button should be rendered without a border; otherwise, false. The default is false. */
|
|
5
8
|
noBorder?: boolean;
|
|
9
|
+
/** true to render the button a bit wider; otherwise, false. The default is false. */
|
|
6
10
|
wide?: boolean;
|
|
7
11
|
}
|
|
12
|
+
/** Represents a component for a button with an icon. */
|
|
8
13
|
export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport styles from './IconButton.module.css';\n\nexport interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {\n 'aria-label': string;\n variant?: 'destructive';\n noBorder?: boolean;\n wide?: boolean;\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ children, type = 'button', variant, noBorder, wide, ...restProps }: IconButtonProps, forwardedRef) => (\n <button\n {...restProps}\n className={clsx(styles['icon-button'], {\n [styles['icon-button--destructive']]: variant === 'destructive',\n [styles['icon-button--no-border']]: noBorder,\n [styles['icon-button--wide']]: wide,\n })}\n ref={forwardedRef}\n type={type}\n >\n {children}\n </button>\n )\n);\n"],"names":["IconButton","forwardRef","children","type","variant","noBorder","wide","restProps","forwardedRef","jsx","clsx","styles"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport styles from './IconButton.module.css';\n\nexport interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {\n /** The value of the aria-label. */\n 'aria-label': string;\n /** The variant of the button. */\n variant?: 'destructive';\n /** true if the button should be rendered without a border; otherwise, false. The default is false. */\n noBorder?: boolean;\n /** true to render the button a bit wider; otherwise, false. The default is false. */\n wide?: boolean;\n}\n\n/** Represents a component for a button with an icon. */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ children, type = 'button', variant, noBorder, wide, ...restProps }: IconButtonProps, forwardedRef) => (\n <button\n {...restProps}\n className={clsx(styles['icon-button'], {\n [styles['icon-button--destructive']]: variant === 'destructive',\n [styles['icon-button--no-border']]: noBorder,\n [styles['icon-button--wide']]: wide,\n })}\n ref={forwardedRef}\n type={type}\n >\n {children}\n </button>\n )\n);\n"],"names":["IconButton","forwardRef","children","type","variant","noBorder","wide","restProps","forwardedRef","jsx","clsx","styles"],"mappings":";;;;;;;;GAmBaA,IAAaC;AAAA,EACxB,CAAC,EAAE,UAAAC,GAAU,MAAAC,IAAO,UAAU,SAAAC,GAAS,UAAAC,GAAU,MAAAC,GAAM,GAAGC,KAA8BC,MACtF,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,WAAWG,EAAKC,EAAO,aAAa,GAAG;AAAA,QACrC,CAACA,EAAO,0BAA0B,CAAC,GAAGP,MAAY;AAAA,QAClD,CAACO,EAAO,wBAAwB,CAAC,GAAGN;AAAA,QACpC,CAACM,EAAO,mBAAmB,CAAC,GAAGL;AAAA,MAAA,CAChC;AAAA,MACD,KAAKE;AAAA,MACL,MAAAL;AAAA,MAEC,UAAAD;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|