@uva-glass/component-library 1.5.0 → 1.7.1

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.
Files changed (56) hide show
  1. package/dist/{SelectListbox.module-1nd3xIGj.js → SelectListbox.module-DSjx989r.js} +1 -2
  2. package/dist/SelectListbox.module-DSjx989r.js.map +1 -0
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/Card.css +1 -1
  5. package/dist/assets/FieldHint.css +1 -0
  6. package/dist/assets/IconButton.css +1 -1
  7. package/dist/assets/InfoMessage.css +1 -1
  8. package/dist/assets/Input.css +1 -0
  9. package/dist/assets/InputField.css +1 -0
  10. package/dist/assets/InputField2.css +1 -0
  11. package/dist/assets/SectionNotification.css +1 -1
  12. package/dist/assets/SelectListbox.css +1 -1
  13. package/dist/components/Button/Button.js +10 -11
  14. package/dist/components/Button/Button.js.map +1 -1
  15. package/dist/components/Card/Card.js +9 -10
  16. package/dist/components/Card/Card.js.map +1 -1
  17. package/dist/components/IconButton/IconButton.js +12 -13
  18. package/dist/components/IconButton/IconButton.js.map +1 -1
  19. package/dist/components/IconButton/IconButton.stories.js +13 -10
  20. package/dist/components/IconButton/IconButton.stories.js.map +1 -1
  21. package/dist/components/InfoMessage/InfoMessage.js +8 -9
  22. package/dist/components/InfoMessage/InfoMessage.js.map +1 -1
  23. package/dist/components/Input/Input.d.ts +10 -0
  24. package/dist/components/Input/Input.js +28 -0
  25. package/dist/components/Input/Input.js.map +1 -0
  26. package/dist/components/Input/Input.stories.d.ts +8 -0
  27. package/dist/components/Input/Input.stories.js +41 -0
  28. package/dist/components/Input/Input.stories.js.map +1 -0
  29. package/dist/components/Input/index.d.ts +1 -0
  30. package/dist/components/Input/index.js +5 -0
  31. package/dist/components/Input/index.js.map +1 -0
  32. package/dist/components/InputField/InputField.d.ts +12 -0
  33. package/dist/components/InputField/InputField.js +29 -0
  34. package/dist/components/InputField/InputField.js.map +1 -0
  35. package/dist/components/InputField/InputField.stories.d.ts +7 -0
  36. package/dist/components/InputField/InputField.stories.js +65 -0
  37. package/dist/components/InputField/InputField.stories.js.map +1 -0
  38. package/dist/components/InputField/components/FieldHint.d.ts +7 -0
  39. package/dist/components/InputField/components/FieldHint.js +15 -0
  40. package/dist/components/InputField/components/FieldHint.js.map +1 -0
  41. package/dist/components/InputField/index.d.ts +1 -0
  42. package/dist/components/InputField/index.js +5 -0
  43. package/dist/components/InputField/index.js.map +1 -0
  44. package/dist/components/SectionNotification/SectionNotification.js +2 -3
  45. package/dist/components/SectionNotification/SectionNotification.js.map +1 -1
  46. package/dist/components/SelectListbox/components/SelectButton.js +1 -1
  47. package/dist/components/SelectListbox/components/SelectContainer.js +1 -1
  48. package/dist/components/SelectListbox/components/SelectOption.js +1 -1
  49. package/dist/components/SelectListbox/components/SelectOptionBox.js +1 -1
  50. package/dist/components/index.d.ts +2 -0
  51. package/dist/components/index.js +17 -13
  52. package/dist/components/index.js.map +1 -1
  53. package/dist/index.js +17 -13
  54. package/dist/index.js.map +1 -1
  55. package/package.json +10 -10
  56. package/dist/SelectListbox.module-1nd3xIGj.js.map +0 -1
@@ -1,31 +1,30 @@
1
- import { jsx as _ } from "react/jsx-runtime";
1
+ import { jsx as b } from "react/jsx-runtime";
2
2
  import { c as m } from "../../clsx-DB4S2d7J.js";
3
- import { forwardRef as b } from "react";
4
- import '../../assets/Button.css';const a = "_button_1gimu_3", t = {
5
- "visually-hidden": "_visually-hidden_1gimu_1",
6
- button: a,
3
+ import { forwardRef as _ } from "react";
4
+ import '../../assets/Button.css';const c = "_button_1gimu_3", t = {
5
+ button: c,
7
6
  "button--blank": "_button--blank_1gimu_36",
8
7
  "button--primary": "_button--primary_1gimu_53",
9
8
  "button--secondary": "_button--secondary_1gimu_69",
10
9
  "button--destructive-primary": "_button--destructive-primary_1gimu_85",
11
10
  "button--destructive-secondary": "_button--destructive-secondary_1gimu_103",
12
11
  "button--wide-column": "_button--wide-column_1gimu_121"
13
- }, y = b((o, n) => {
14
- const { children: u, type: r = "button", variant: i, displayColumn: e = !1, ...s } = o;
15
- return /* @__PURE__ */ _(
12
+ }, p = _((o, n) => {
13
+ const { children: u, type: r = "button", variant: e, displayColumn: i = !1, ...s } = o;
14
+ return /* @__PURE__ */ b(
16
15
  "button",
17
16
  {
18
17
  ...s,
19
18
  type: r,
20
19
  ref: n,
21
- className: m(t.button, t[`button--${i}`], {
22
- [t["button--wide-column"]]: e
20
+ className: m(t.button, t[`button--${e}`], {
21
+ [t["button--wide-column"]]: i
23
22
  }),
24
23
  children: u
25
24
  }
26
25
  );
27
26
  });
28
27
  export {
29
- y as Button
28
+ p as Button
30
29
  };
31
30
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Button.module.css';\n\nexport type UIButtonVariant = 'primary' | 'secondary' | 'destructive-primary' | 'destructive-secondary' | 'blank';\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> {\n variant: UIButtonVariant;\n children: ReactNode;\n displayColumn?: boolean;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>((props, forwardedRef) => {\n const { children, type = 'button', variant, displayColumn = false, ...restProps } = props;\n\n return (\n <button\n {...restProps}\n type={type}\n ref={forwardedRef}\n className={clsx(styles['button'], styles[`button--${variant}`], {\n [styles['button--wide-column']]: displayColumn,\n })}\n >\n {children}\n </button>\n );\n});\n"],"names":["Button","forwardRef","props","forwardedRef","children","type","variant","displayColumn","restProps","jsx","clsx","styles"],"mappings":";;;;;;;;;;;;GAeaA,IAASC,EAA2C,CAACC,GAAOC,MAAiB;AAClF,QAAA,EAAE,UAAAC,GAAU,MAAAC,IAAO,UAAU,SAAAC,GAAS,eAAAC,IAAgB,IAAO,GAAGC,EAAc,IAAAN;AAGlF,SAAA,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,MAAAH;AAAA,MACA,KAAKF;AAAA,MACL,WAAWO,EAAKC,EAAO,QAAWA,EAAO,WAAWL,CAAO,EAAE,GAAG;AAAA,QAC9D,CAACK,EAAO,qBAAqB,CAAC,GAAGJ;AAAA,MAAA,CAClC;AAAA,MAEA,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Button.module.css';\n\nexport type UIButtonVariant = 'primary' | 'secondary' | 'destructive-primary' | 'destructive-secondary' | 'blank';\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> {\n variant: UIButtonVariant;\n children: ReactNode;\n displayColumn?: boolean;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>((props, forwardedRef) => {\n const { children, type = 'button', variant, displayColumn = false, ...restProps } = props;\n\n return (\n <button\n {...restProps}\n type={type}\n ref={forwardedRef}\n className={clsx(styles['button'], styles[`button--${variant}`], {\n [styles['button--wide-column']]: displayColumn,\n })}\n >\n {children}\n </button>\n );\n});\n"],"names":["Button","forwardRef","props","forwardedRef","children","type","variant","displayColumn","restProps","jsx","clsx","styles"],"mappings":";;;;;;;;;;;GAeaA,IAASC,EAA2C,CAACC,GAAOC,MAAiB;AAClF,QAAA,EAAE,UAAAC,GAAU,MAAAC,IAAO,UAAU,SAAAC,GAAS,eAAAC,IAAgB,IAAO,GAAGC,EAAc,IAAAN;AAGlF,SAAA,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,MAAAH;AAAA,MACA,KAAKF;AAAA,MACL,WAAWO,EAAKC,EAAO,QAAWA,EAAO,WAAWL,CAAO,EAAE,GAAG;AAAA,QAC9D,CAACK,EAAO,qBAAqB,CAAC,GAAGJ;AAAA,MAAA,CAClC;AAAA,MAEA,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1,9 +1,8 @@
1
- import { jsxs as h, jsx as d } from "react/jsx-runtime";
1
+ import { jsxs as h, jsx as l } from "react/jsx-runtime";
2
2
  import { c as t } from "../../clsx-DB4S2d7J.js";
3
- import { SectionNotification as i } from "../SectionNotification/SectionNotification.js";
4
- import '../../assets/Card.css';const n = "_card_aw9hz_3", a = {
5
- "visually-hidden": "_visually-hidden_aw9hz_1",
6
- card: n,
3
+ import { SectionNotification as o } from "../SectionNotification/SectionNotification.js";
4
+ import '../../assets/Card.css';const g = "_card_aw9hz_3", a = {
5
+ card: g,
7
6
  "card--regular": "_card--regular_aw9hz_9",
8
7
  "card--large": "_card--large_aw9hz_10",
9
8
  "card--small": "_card--small_aw9hz_15",
@@ -11,10 +10,10 @@ import '../../assets/Card.css';const n = "_card_aw9hz_3", a = {
11
10
  "card--high-contrast": "_card--high-contrast_aw9hz_35",
12
11
  "card--align-center": "_card--align-center_aw9hz_39"
13
12
  }, w = ({
14
- children: e,
13
+ children: d,
15
14
  header: c,
16
15
  highContrast: s,
17
- notification: l,
16
+ notification: e,
18
17
  padding: r = "regular",
19
18
  alignCenter: _ = !1
20
19
  }) => /* @__PURE__ */ h(
@@ -28,9 +27,9 @@ import '../../assets/Card.css';const n = "_card_aw9hz_3", a = {
28
27
  [a["card--align-center"]]: _
29
28
  }),
30
29
  children: [
31
- l && /* @__PURE__ */ d(i, { children: l }),
32
- c && /* @__PURE__ */ d("div", { className: a["card-header"], children: c }),
33
- e
30
+ e && /* @__PURE__ */ l(o, { children: e }),
31
+ c && /* @__PURE__ */ l("div", { className: a["card-header"], children: c }),
32
+ d
34
33
  ]
35
34
  }
36
35
  );
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import classNames from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Card.module.css';\n\nimport { SectionNotification } from 'components/SectionNotification';\n\nexport interface CardProps {\n header?: ReactNode;\n highContrast?: boolean;\n notification?: ReactNode;\n padding?: 'small' | 'regular' | 'large';\n alignCenter?: boolean;\n}\n\nexport const Card = ({\n children,\n header,\n highContrast,\n notification,\n padding = 'regular',\n alignCenter = false,\n}: PropsWithChildren<CardProps>) => (\n <div\n className={classNames(styles['card'], {\n [styles['card--high-contrast']]: highContrast,\n [styles['card--regular']]: padding === 'regular',\n [styles['card--small']]: padding === 'small',\n [styles['card--large']]: padding === 'large',\n [styles['card--align-center']]: alignCenter,\n })}\n >\n {notification && <SectionNotification>{notification}</SectionNotification>}\n {header && <div className={styles['card-header']}>{header}</div>}\n {children}\n </div>\n);\n"],"names":["Card","children","header","highContrast","notification","padding","alignCenter","jsxs","classNames","styles","jsx","SectionNotification"],"mappings":";;;;;;;;;;;;GAgBaA,IAAO,CAAC;AAAA,EACnB,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAAC,IAAc;AAChB,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,MAAS;AAAA,MACpC,CAACA,EAAO,qBAAqB,CAAC,GAAGN;AAAA,MACjC,CAACM,EAAO,eAAe,CAAC,GAAGJ,MAAY;AAAA,MACvC,CAACI,EAAO,aAAa,CAAC,GAAGJ,MAAY;AAAA,MACrC,CAACI,EAAO,aAAa,CAAC,GAAGJ,MAAY;AAAA,MACrC,CAACI,EAAO,oBAAoB,CAAC,GAAGH;AAAA,IAAA,CACjC;AAAA,IAEA,UAAA;AAAA,MAAgBF,KAAA,gBAAAM,EAACC,KAAqB,UAAaP,EAAA,CAAA;AAAA,MACnDF,KAAW,gBAAAQ,EAAA,OAAA,EAAI,WAAWD,EAAO,aAAa,GAAI,UAAOP,GAAA;AAAA,MACzDD;AAAA,IAAA;AAAA,EAAA;AACH;"}
1
+ {"version":3,"file":"Card.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import classNames from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './Card.module.css';\n\nimport { SectionNotification } from 'components/SectionNotification';\n\nexport interface CardProps {\n header?: ReactNode;\n highContrast?: boolean;\n notification?: ReactNode;\n padding?: 'small' | 'regular' | 'large';\n alignCenter?: boolean;\n}\n\nexport const Card = ({\n children,\n header,\n highContrast,\n notification,\n padding = 'regular',\n alignCenter = false,\n}: PropsWithChildren<CardProps>) => (\n <div\n className={classNames(styles['card'], {\n [styles['card--high-contrast']]: highContrast,\n [styles['card--regular']]: padding === 'regular',\n [styles['card--small']]: padding === 'small',\n [styles['card--large']]: padding === 'large',\n [styles['card--align-center']]: alignCenter,\n })}\n >\n {notification && <SectionNotification>{notification}</SectionNotification>}\n {header && <div className={styles['card-header']}>{header}</div>}\n {children}\n </div>\n);\n"],"names":["Card","children","header","highContrast","notification","padding","alignCenter","jsxs","classNames","styles","jsx","SectionNotification"],"mappings":";;;;;;;;;;;GAgBaA,IAAO,CAAC;AAAA,EACnB,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAAC,IAAc;AAChB,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,MAAS;AAAA,MACpC,CAACA,EAAO,qBAAqB,CAAC,GAAGN;AAAA,MACjC,CAACM,EAAO,eAAe,CAAC,GAAGJ,MAAY;AAAA,MACvC,CAACI,EAAO,aAAa,CAAC,GAAGJ,MAAY;AAAA,MACrC,CAACI,EAAO,aAAa,CAAC,GAAGJ,MAAY;AAAA,MACrC,CAACI,EAAO,oBAAoB,CAAC,GAAGH;AAAA,IAAA,CACjC;AAAA,IAEA,UAAA;AAAA,MAAgBF,KAAA,gBAAAM,EAACC,KAAqB,UAAaP,EAAA,CAAA;AAAA,MACnDF,KAAW,gBAAAQ,EAAA,OAAA,EAAI,WAAWD,EAAO,aAAa,GAAI,UAAOP,GAAA;AAAA,MACzDD;AAAA,IAAA;AAAA,EAAA;AACH;"}
@@ -1,29 +1,28 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { c as b } from "../../clsx-DB4S2d7J.js";
3
- import { forwardRef as l } from "react";
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { c as d } from "../../clsx-DB4S2d7J.js";
3
+ import { forwardRef as s } from "react";
4
4
  import '../../assets/IconButton.css';const t = {
5
- "visually-hidden": "_visually-hidden_ldxal_1",
6
5
  "icon-button": "_icon-button_ldxal_3",
7
6
  "icon-button--destructive": "_icon-button--destructive_ldxal_29",
8
7
  "icon-button--no-border": "_icon-button--no-border_ldxal_37",
9
8
  "icon-button--wide": "_icon-button--wide_ldxal_46"
10
- }, x = l(
11
- ({ children: o, type: n = "button", variant: i, noBorder: c, wide: e, ...u }, d) => /* @__PURE__ */ r(
9
+ }, m = s(
10
+ ({ children: o, type: n = "button", variant: c, noBorder: i, wide: r, ...e }, u) => /* @__PURE__ */ b(
12
11
  "button",
13
12
  {
14
- ...u,
15
- className: b(t["icon-button"], {
16
- [t["icon-button--destructive"]]: i === "destructive",
17
- [t["icon-button--no-border"]]: c,
18
- [t["icon-button--wide"]]: e
13
+ ...e,
14
+ className: d(t["icon-button"], {
15
+ [t["icon-button--destructive"]]: c === "destructive",
16
+ [t["icon-button--no-border"]]: i,
17
+ [t["icon-button--wide"]]: r
19
18
  }),
20
- ref: d,
19
+ ref: u,
21
20
  type: n,
22
21
  children: o
23
22
  }
24
23
  )
25
24
  );
26
25
  export {
27
- x as IconButton
26
+ m as IconButton
28
27
  };
29
28
  //# sourceMappingURL=IconButton.js.map
@@ -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":";;;;;;;;;GAcaA,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;"}
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":";;;;;;;;GAcaA,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;"}
@@ -1,10 +1,10 @@
1
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { f as a } from "../../index-Ca2Q7D5u.js";
3
- import { IconButton as o } from "./IconButton.js";
4
- import { Icon as n } from "../Icon/Icon.js";
5
- const f = {
3
+ import { IconButton as e } from "./IconButton.js";
4
+ import { Icon as l } from "../Icon/Icon.js";
5
+ const m = {
6
6
  title: "Atoms/IconButton",
7
- component: o,
7
+ component: e,
8
8
  argTypes: {
9
9
  variant: {
10
10
  options: ["destructive"],
@@ -33,18 +33,21 @@ const f = {
33
33
  }
34
34
  }
35
35
  }
36
- }, r = (e) => /* @__PURE__ */ t(o, { ...e }), l = r.bind({});
37
- l.args = {
36
+ }, s = (t) => {
37
+ const n = t.variant ?? [], r = { ...t, variant: n.toString() };
38
+ return /* @__PURE__ */ o(e, { ...r });
39
+ }, i = s.bind({});
40
+ i.args = {
38
41
  "aria-label": "Trash",
39
42
  variant: "destructive",
40
43
  noBorder: !1,
41
44
  wide: !1,
42
45
  disabled: !1,
43
- children: /* @__PURE__ */ t(n, { name: "Trash" }),
46
+ children: /* @__PURE__ */ o(l, { name: "Trash" }),
44
47
  onClick: a()
45
48
  };
46
49
  export {
47
- l as IconButtonExample,
48
- f as default
50
+ i as IconButtonExample,
51
+ m as default
49
52
  };
50
53
  //# sourceMappingURL=IconButton.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.stories.js","sources":["../../../src/components/IconButton/IconButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { IconButtonProps } from 'components/IconButton';\n\nimport { IconButton } from 'components/IconButton';\nimport { Icon } from 'components/Icon';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/IconButton',\n component: IconButton,\n argTypes: {\n variant: {\n options: ['destructive'],\n control: { type: 'check' },\n },\n noBorder: {\n control: 'boolean',\n default: false,\n },\n wide: {\n control: 'boolean',\n default: false,\n },\n 'aria-label': {\n table: {\n disable: true,\n },\n },\n type: {\n options: ['button', 'submit', 'reset'],\n control: { type: 'select' },\n },\n children: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<IconButtonProps>;\n\nconst Template: StoryFn<IconButtonProps> = (args) => <IconButton {...args} />;\n\nexport const IconButtonExample = Template.bind({});\nIconButtonExample.args = {\n 'aria-label': 'Trash',\n variant: 'destructive',\n noBorder: false,\n wide: false,\n disabled: false,\n children: <Icon name=\"Trash\" />,\n onClick: fn(),\n};\n"],"names":["IconButton_stories","IconButton","Template","args","jsx","IconButtonExample","Icon","fn"],"mappings":";;;;AASA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,aAAa;AAAA,MACvB,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,SAAS,CAAC,UAAU,UAAU,OAAO;AAAA,MACrC,SAAS,EAAE,MAAM,SAAS;AAAA,IAC5B;AAAA,IACA,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAqC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAY,GAAGE,EAAM,CAAA,GAE9DE,IAAoBH,EAAS,KAAK,EAAE;AACjDG,EAAkB,OAAO;AAAA,EACvB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU,gBAAAD,EAACE,GAAK,EAAA,MAAK,QAAQ,CAAA;AAAA,EAC7B,SAASC,EAAG;AACd;"}
1
+ {"version":3,"file":"IconButton.stories.js","sources":["../../../src/components/IconButton/IconButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { IconButtonProps } from 'components/IconButton';\n\nimport { IconButton } from 'components/IconButton';\nimport { Icon } from 'components/Icon';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/IconButton',\n component: IconButton,\n argTypes: {\n variant: {\n options: ['destructive'],\n control: { type: 'check' },\n },\n noBorder: {\n control: 'boolean',\n default: false,\n },\n wide: {\n control: 'boolean',\n default: false,\n },\n 'aria-label': {\n table: {\n disable: true,\n },\n },\n type: {\n options: ['button', 'submit', 'reset'],\n control: { type: 'select' },\n },\n children: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<IconButtonProps>;\n\nconst Template: StoryFn<IconButtonProps> = (args) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n const iconButtonArgs = { ...args, ...{ variant: variantArray.toString() } } as IconButtonProps;\n\n return <IconButton {...iconButtonArgs} />;\n};\n\nexport const IconButtonExample = Template.bind({});\nIconButtonExample.args = {\n 'aria-label': 'Trash',\n variant: 'destructive',\n noBorder: false,\n wide: false,\n disabled: false,\n children: <Icon name=\"Trash\" />,\n onClick: fn(),\n};\n"],"names":["IconButton_stories","IconButton","Template","args","variantArray","iconButtonArgs","jsx","IconButtonExample","Icon","fn"],"mappings":";;;;AASA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,aAAa;AAAA,MACvB,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,SAAS,CAAC,UAAU,UAAU,OAAO;AAAA,MACrC,SAAS,EAAE,MAAM,SAAS;AAAA,IAC5B;AAAA,IACA,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAqC,CAACC,MAAS;AAE7C,QAAAC,IAAgBD,EAAK,WAAmC,IACxDE,IAAiB,EAAE,GAAGF,GAAW,SAASC,EAAa,SAAS;AAE/D,SAAA,gBAAAE,EAACL,GAAY,EAAA,GAAGI,EAAgB,CAAA;AACzC,GAEaE,IAAoBL,EAAS,KAAK,EAAE;AACjDK,EAAkB,OAAO;AAAA,EACvB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU,gBAAAD,EAACE,GAAK,EAAA,MAAK,QAAQ,CAAA;AAAA,EAC7B,SAASC,EAAG;AACd;"}
@@ -1,24 +1,23 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
- import { c as _ } from "../../clsx-DB4S2d7J.js";
3
- import { Icon as a } from "../Icon/Icon.js";
1
+ import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
+ import { c as a } from "../../clsx-DB4S2d7J.js";
3
+ import { Icon as _ } from "../Icon/Icon.js";
4
4
  import '../../assets/InfoMessage.css';const e = {
5
- "visually-hidden": "_visually-hidden_elg9f_1",
6
5
  "info-message": "_info-message_elg9f_3",
7
6
  "info-message__container": "_info-message__container_elg9f_8",
8
7
  "info-message__icon": "_info-message__icon_elg9f_13"
9
- }, c = ({ message: s, hasOwnContainer: i = !1 }) => /* @__PURE__ */ n(
8
+ }, g = ({ message: s, hasOwnContainer: o = !1 }) => /* @__PURE__ */ n(
10
9
  "div",
11
10
  {
12
- className: _(e["info-message"], {
13
- [e["info-message__container"]]: i
11
+ className: a(e["info-message"], {
12
+ [e["info-message__container"]]: o
14
13
  }),
15
14
  children: [
16
- /* @__PURE__ */ o(a, { name: "InformationCircleFillMini", className: e["info-message__icon"] }),
15
+ /* @__PURE__ */ i(_, { name: "InformationCircleFillMini", className: e["info-message__icon"] }),
17
16
  s
18
17
  ]
19
18
  }
20
19
  );
21
20
  export {
22
- c as InfoMessage
21
+ g as InfoMessage
23
22
  };
24
23
  //# sourceMappingURL=InfoMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoMessage.js","sources":["../../../src/components/InfoMessage/InfoMessage.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { PropsWithChildren } from 'react';\n\nimport styles from './InfoMessage.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport interface InfoMessageProps {\n message: string;\n hasOwnContainer?: boolean;\n}\n\nexport const InfoMessage = ({ message, hasOwnContainer = false }: PropsWithChildren<InfoMessageProps>) => (\n <div\n className={clsx(styles['info-message'], {\n [styles['info-message__container']]: hasOwnContainer,\n })}\n >\n <Icon name=\"InformationCircleFillMini\" className={styles['info-message__icon']} />\n {message}\n </div>\n);\n"],"names":["InfoMessage","message","hasOwnContainer","jsxs","clsx","styles","jsx","Icon"],"mappings":";;;;;;;;GAaaA,IAAc,CAAC,EAAE,SAAAC,GAAS,iBAAAC,IAAkB,GACvD,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,cAAc,GAAG;AAAA,MACtC,CAACA,EAAO,yBAAyB,CAAC,GAAGH;AAAA,IAAA,CACtC;AAAA,IAED,UAAA;AAAA,MAAA,gBAAAI,EAACC,KAAK,MAAK,6BAA4B,WAAWF,EAAO,oBAAoB,GAAG;AAAA,MAC/EJ;AAAA,IAAA;AAAA,EAAA;AACH;"}
1
+ {"version":3,"file":"InfoMessage.js","sources":["../../../src/components/InfoMessage/InfoMessage.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { PropsWithChildren } from 'react';\n\nimport styles from './InfoMessage.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport interface InfoMessageProps {\n message: string;\n hasOwnContainer?: boolean;\n}\n\nexport const InfoMessage = ({ message, hasOwnContainer = false }: PropsWithChildren<InfoMessageProps>) => (\n <div\n className={clsx(styles['info-message'], {\n [styles['info-message__container']]: hasOwnContainer,\n })}\n >\n <Icon name=\"InformationCircleFillMini\" className={styles['info-message__icon']} />\n {message}\n </div>\n);\n"],"names":["InfoMessage","message","hasOwnContainer","jsxs","clsx","styles","jsx","Icon"],"mappings":";;;;;;;GAaaA,IAAc,CAAC,EAAE,SAAAC,GAAS,iBAAAC,IAAkB,GACvD,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,cAAc,GAAG;AAAA,MACtC,CAACA,EAAO,yBAAyB,CAAC,GAAGH;AAAA,IAAA,CACtC;AAAA,IAED,UAAA;AAAA,MAAA,gBAAAI,EAACC,KAAK,MAAK,6BAA4B,WAAWF,EAAO,oBAAoB,GAAG;AAAA,MAC/EJ;AAAA,IAAA;AAAA,EAAA;AACH;"}
@@ -0,0 +1,10 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+
3
+ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {
4
+ appearance?: 'error';
5
+ type?: 'text' | 'search' | 'password' | 'email' | 'file';
6
+ fullWidth?: boolean;
7
+ id: string;
8
+ isNumeric?: boolean;
9
+ }
10
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,28 @@
1
+ import { jsx as _ } from "react/jsx-runtime";
2
+ import { forwardRef as c } from "react";
3
+ import { c as f } from "../../clsx-DB4S2d7J.js";
4
+ import '../../assets/Input.css';const m = "_input_96vyw_1", t = {
5
+ input: m,
6
+ "input--numeric": "_input--numeric_96vyw_13",
7
+ "input--error": "_input--error_96vyw_18",
8
+ "input--full-with": "_input--full-with_96vyw_23"
9
+ }, a = c(function({ id: r, appearance: n, type: i = "text", isNumeric: u, fullWidth: p, ...o }, e) {
10
+ return /* @__PURE__ */ _(
11
+ "input",
12
+ {
13
+ ...o,
14
+ ref: e,
15
+ id: r,
16
+ className: f(t.input, {
17
+ [t["input--error"]]: n === "error",
18
+ [t["input--full-with"]]: p,
19
+ [t["input--numeric"]]: u
20
+ }),
21
+ type: i
22
+ }
23
+ );
24
+ });
25
+ export {
26
+ a as Input
27
+ };
28
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.js","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes } from 'react';\n\nimport styles from './Input.module.css';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {\n appearance?: 'error';\n type?: 'text' | 'search' | 'password' | 'email' | 'file';\n fullWidth?: boolean;\n id: string;\n isNumeric?: boolean;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { id, appearance, type = 'text', isNumeric, fullWidth, ...restProps }: InputProps,\n forwardedRef\n) {\n return (\n <input\n {...restProps}\n ref={forwardedRef}\n id={id}\n className={clsx(styles['input'], {\n [styles['input--error']]: appearance === 'error',\n [styles['input--full-with']]: fullWidth,\n [styles['input--numeric']]: isNumeric,\n })}\n type={type}\n />\n );\n});\n"],"names":["Input","forwardRef","id","appearance","type","isNumeric","fullWidth","restProps","forwardedRef","jsx","clsx","styles"],"mappings":";;;;;;;;GAeaA,IAAQC,EAAyC,SAC5D,EAAE,IAAAC,GAAI,YAAAC,GAAY,MAAAC,IAAO,QAAQ,WAAAC,GAAW,WAAAC,GAAW,GAAGC,EAAA,GAC1DC,GACA;AAEE,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,KAAKC;AAAA,MACL,IAAAN;AAAA,MACA,WAAWQ,EAAKC,EAAO,OAAU;AAAA,QAC/B,CAACA,EAAO,cAAc,CAAC,GAAGR,MAAe;AAAA,QACzC,CAACQ,EAAO,kBAAkB,CAAC,GAAGL;AAAA,QAC9B,CAACK,EAAO,gBAAgB,CAAC,GAAGN;AAAA,MAAA,CAC7B;AAAA,MACD,MAAAD;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -0,0 +1,8 @@
1
+ import { InputProps } from './Input';
2
+
3
+ declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, InputProps>;
4
+ export default _default;
5
+ export declare const InputExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
6
+ export declare const FullWidth: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
7
+ export declare const Numeric: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
8
+ export declare const WithErrorAppearance: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
@@ -0,0 +1,41 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { Input as r } from "./Input.js";
3
+ const u = {
4
+ title: "Atoms/Input",
5
+ component: r,
6
+ argTypes: {
7
+ appearance: {
8
+ table: {
9
+ disable: !0
10
+ }
11
+ },
12
+ type: {
13
+ control: "inline-radio"
14
+ }
15
+ },
16
+ args: {
17
+ id: "30daa7c7",
18
+ type: "text"
19
+ }
20
+ }, t = (e) => /* @__PURE__ */ a(r, { ...e }), n = t.bind({});
21
+ n.args = {};
22
+ const o = t.bind({});
23
+ o.args = {
24
+ fullWidth: !0
25
+ };
26
+ const i = t.bind({});
27
+ i.args = {
28
+ isNumeric: !0
29
+ };
30
+ const p = t.bind({});
31
+ p.args = {
32
+ appearance: "error"
33
+ };
34
+ export {
35
+ o as FullWidth,
36
+ n as InputExample,
37
+ i as Numeric,
38
+ p as WithErrorAppearance,
39
+ u as default
40
+ };
41
+ //# sourceMappingURL=Input.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.stories.js","sources":["../../../src/components/Input/Input.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InputProps } from './Input';\n\nimport { Input } from './Input';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Input',\n component: Input,\n argTypes: {\n appearance: {\n table: {\n disable: true,\n },\n },\n type: {\n control: 'inline-radio',\n },\n },\n args: {\n id: '30daa7c7',\n type: 'text',\n },\n} as Meta<InputProps>;\n\nconst Template: StoryFn<InputProps> = (args) => {\n return <Input {...args} />;\n};\n\nexport const InputExample = Template.bind({});\nInputExample.args = {};\n\nexport const FullWidth = Template.bind({});\nFullWidth.args = {\n fullWidth: true,\n};\n\nexport const Numeric = Template.bind({});\nNumeric.args = {\n isNumeric: true,\n};\n\nexport const WithErrorAppearance = Template.bind({});\nWithErrorAppearance.args = {\n appearance: 'error',\n};\n"],"names":["Input_stories","Input","Template","args","jsx","InputExample","FullWidth","Numeric","WithErrorAppearance"],"mappings":";;AAMA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,MAAM;AAAA,EACR;AACF,GAEMC,IAAgC,CAACC,MAC9B,gBAAAC,EAACH,GAAO,EAAA,GAAGE,EAAM,CAAA,GAGbE,IAAeH,EAAS,KAAK,EAAE;AAC5CG,EAAa,OAAO,CAAA;AAEb,MAAMC,IAAYJ,EAAS,KAAK,EAAE;AACzCI,EAAU,OAAO;AAAA,EACf,WAAW;AACb;AAEO,MAAMC,IAAUL,EAAS,KAAK,EAAE;AACvCK,EAAQ,OAAO;AAAA,EACb,WAAW;AACb;AAEO,MAAMC,IAAsBN,EAAS,KAAK,EAAE;AACnDM,EAAoB,OAAO;AAAA,EACzB,YAAY;AACd;"}
@@ -0,0 +1 @@
1
+ export * from './Input';
@@ -0,0 +1,5 @@
1
+ import { Input as r } from "./Input.js";
2
+ export {
3
+ r as Input
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,12 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+
3
+ export interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {
4
+ variant?: 'large';
5
+ hint?: string;
6
+ spinnerAriaValueText: string;
7
+ isHintLoading?: boolean;
8
+ type?: 'text' | 'search' | 'password' | 'email';
9
+ autoComplete?: 'off';
10
+ id: string;
11
+ }
12
+ export declare const InputField: import('react').ForwardRefExoticComponent<InputFieldProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,29 @@
1
+ import { jsxs as m, Fragment as s, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as u } from "react";
3
+ import { c } from "../../clsx-DB4S2d7J.js";
4
+ import { FieldHint as _ } from "./components/FieldHint.js";
5
+ import '../../assets/InputField2.css';const i = {
6
+ "input-field": "_input-field_16tae_1",
7
+ "input-field--large": "_input-field--large_16tae_15"
8
+ }, v = u(
9
+ ({ autoComplete: l = "off", id: f, variant: o, hint: e, isHintLoading: t, spinnerAriaValueText: p, type: a = "text", ...n }, d) => /* @__PURE__ */ m(s, { children: [
10
+ /* @__PURE__ */ r(
11
+ "input",
12
+ {
13
+ ...n,
14
+ autoComplete: l,
15
+ ref: d,
16
+ id: f,
17
+ className: c(i["input-field"], {
18
+ [i["input-field--large"]]: o === "large"
19
+ }),
20
+ type: a
21
+ }
22
+ ),
23
+ (e || t) && /* @__PURE__ */ r(_, { loading: t, spinnerAriaValueText: p, value: e })
24
+ ] })
25
+ );
26
+ export {
27
+ v as InputField
28
+ };
29
+ //# sourceMappingURL=InputField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputField.js","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes } from 'react';\n\nimport styles from './InputField.module.css';\nimport { FieldHint } from './components/FieldHint';\n\nexport interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {\n variant?: 'large';\n hint?: string;\n spinnerAriaValueText: string;\n isHintLoading?: boolean;\n type?: 'text' | 'search' | 'password' | 'email';\n autoComplete?: 'off'\n id: string;\n}\n\nexport const InputField = forwardRef<HTMLInputElement, InputFieldProps>(\n (\n { autoComplete = 'off', id, variant, hint, isHintLoading, spinnerAriaValueText, type = 'text', ...restProps }: InputFieldProps,\n forwardedRef\n ) => {\n return (\n <>\n <input\n {...restProps}\n autoComplete={autoComplete}\n ref={forwardedRef}\n id={id}\n className={clsx(styles['input-field'], {\n [styles['input-field--large']]: variant === 'large',\n })}\n type={type}\n />\n {(hint || isHintLoading) && <FieldHint loading={isHintLoading} spinnerAriaValueText={spinnerAriaValueText} value={hint} />}\n </>\n );\n }\n);\n"],"names":["InputField","forwardRef","autoComplete","id","variant","hint","isHintLoading","spinnerAriaValueText","type","restProps","forwardedRef","jsxs","Fragment","jsx","clsx","styles","FieldHint"],"mappings":";;;;;;;GAkBaA,IAAaC;AAAA,EACxB,CACE,EAAE,cAAAC,IAAe,OAAO,IAAAC,GAAI,SAAAC,GAAS,MAAAC,GAAM,eAAAC,GAAe,sBAAAC,GAAsB,MAAAC,IAAO,QAAQ,GAAGC,EAAA,GAClGC,MAII,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAGJ;AAAA,QACJ,cAAAP;AAAA,QACA,KAAKQ;AAAA,QACL,IAAAP;AAAA,QACA,WAAWW,EAAKC,EAAO,aAAa,GAAG;AAAA,UACrC,CAACA,EAAO,oBAAoB,CAAC,GAAGX,MAAY;AAAA,QAAA,CAC7C;AAAA,QACD,MAAAI;AAAA,MAAA;AAAA,IACF;AAAA,KACEH,KAAQC,MAAmB,gBAAAO,EAAAG,GAAA,EAAU,SAASV,GAAe,sBAAAC,GAA4C,OAAOF,GAAM;AAAA,EAC1H,EAAA,CAAA;AAGN;"}
@@ -0,0 +1,7 @@
1
+ import { InputFieldProps } from './InputField';
2
+
3
+ declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, InputFieldProps>;
4
+ export default _default;
5
+ export declare const InputFieldExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputFieldProps>;
6
+ export declare const WithHint: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputFieldProps>;
7
+ export declare const WithLoadingHint: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputFieldProps>;
@@ -0,0 +1,65 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { InputField as e } from "./InputField.js";
3
+ import '../../assets/InputField.css';const r = (t) => {
4
+ const a = t.variant ?? [];
5
+ return { ...t, variant: a.toString() };
6
+ }, m = {
7
+ title: "Atoms/InputField",
8
+ component: e,
9
+ argTypes: {
10
+ variant: {
11
+ options: ["large"],
12
+ control: "check"
13
+ },
14
+ hint: {
15
+ control: "text"
16
+ },
17
+ spinnerAriaValueText: {
18
+ control: "text"
19
+ },
20
+ isHintLoading: {
21
+ control: Boolean,
22
+ table: {
23
+ disable: !0
24
+ }
25
+ },
26
+ type: {
27
+ control: "radio",
28
+ options: ["text", "search", "password", "email"]
29
+ },
30
+ id: {
31
+ control: "text"
32
+ },
33
+ autoComplete: {
34
+ control: "radio",
35
+ options: ["off"]
36
+ }
37
+ }
38
+ }, n = (t) => /* @__PURE__ */ o("div", { className: "form", children: /* @__PURE__ */ o("div", { className: "form-field", children: /* @__PURE__ */ o(e, { ...r(t) }) }) }), i = {
39
+ type: "text",
40
+ variant: void 0,
41
+ hint: void 0,
42
+ spinnerAriaValueText: "Loading",
43
+ autoComplete: "off",
44
+ id: "4f9ca77d"
45
+ }, s = n.bind({});
46
+ s.args = {
47
+ ...i
48
+ };
49
+ const l = n.bind({});
50
+ l.args = {
51
+ ...i,
52
+ hint: "Example hint"
53
+ };
54
+ const d = n.bind({});
55
+ d.args = {
56
+ ...i,
57
+ isHintLoading: !0
58
+ };
59
+ export {
60
+ s as InputFieldExample,
61
+ l as WithHint,
62
+ d as WithLoadingHint,
63
+ m as default
64
+ };
65
+ //# sourceMappingURL=InputField.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport './InputField.stories.css';\n\nimport { InputField } from './InputField';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n hint: {\n control: 'text',\n },\n spinnerAriaValueText: {\n control: 'text',\n },\n isHintLoading: {\n control: Boolean,\n table: {\n disable: true,\n },\n },\n type: {\n control: 'radio',\n options: ['text', 'search', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n control: 'radio',\n options: ['off'],\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => (\n <div className=\"form\">\n <div className=\"form-field\">\n <InputField {...transformArgs(args)} />\n </div>\n </div>\n);\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n hint: undefined,\n spinnerAriaValueText: 'Loading',\n autoComplete: 'off',\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithHint = Template.bind({});\nWithHint.args = {\n ...defaultArgs,\n hint: 'Example hint',\n};\n\nexport const WithLoadingHint = Template.bind({});\nWithLoadingHint.args = {\n ...defaultArgs,\n isHintLoading: true\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","jsx","defaultArgs","InputFieldExample","WithHint","WithLoadingHint"],"mappings":";;AAOA,MAAMA,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,IACX;AAAA,IACA,sBAAsB;AAAA,MACpB,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,SAAS;AAAA,MACT,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,UAAU,YAAY,OAAO;AAAA,IACjD;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,SAAS,CAAC,KAAK;AAAA,IACjB;AAAA,EACF;AACF,GAEMC,IAAqC,CAACJ,wBACzC,OAAI,EAAA,WAAU,QACb,UAAC,gBAAAK,EAAA,OAAA,EAAI,WAAU,cACb,4BAACF,GAAY,EAAA,GAAGJ,EAAcC,CAAI,EAAG,CAAA,GACvC,EACF,CAAA,GAGIM,IAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd,IAAI;AACN,GAEaC,IAAoBH,EAAS,KAAK,EAAE;AACjDG,EAAkB,OAAO;AAAA,EACvB,GAAGD;AACL;AAEO,MAAME,IAAWJ,EAAS,KAAK,EAAE;AACxCI,EAAS,OAAO;AAAA,EACd,GAAGF;AAAA,EACH,MAAM;AACR;AAEO,MAAMG,IAAkBL,EAAS,KAAK,EAAE;AAC/CK,EAAgB,OAAO;AAAA,EACrB,GAAGH;AAAA,EACH,eAAe;AACjB;"}
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ value?: string;
3
+ spinnerAriaValueText: string;
4
+ loading?: boolean;
5
+ }
6
+ export declare function FieldHint({ value, spinnerAriaValueText, loading }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsxs as r, jsx as n, Fragment as s } from "react/jsx-runtime";
2
+ import { Spinner as f } from "../../Spinner/Spinner.js";
3
+ import '../../../assets/FieldHint.css';const l = {
4
+ "field-hint": "_field-hint_f5ej1_1"
5
+ };
6
+ function m({ value: i, spinnerAriaValueText: e, loading: t }) {
7
+ return /* @__PURE__ */ r("span", { className: l["field-hint"], children: [
8
+ i && /* @__PURE__ */ n(s, { children: i }),
9
+ !i && t && /* @__PURE__ */ n(f, { ariaValueText: e })
10
+ ] });
11
+ }
12
+ export {
13
+ m as FieldHint
14
+ };
15
+ //# sourceMappingURL=FieldHint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldHint.js","sources":["../../../../src/components/InputField/components/FieldHint.tsx"],"sourcesContent":["import styles from './FieldHint.module.css';\n\nimport { Spinner } from 'components/Spinner/Spinner';\n\ninterface Props {\n value?: string;\n spinnerAriaValueText: string;\n loading?: boolean;\n}\n\nexport function FieldHint({ value, spinnerAriaValueText, loading }: Props) {\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":";;;;;AAUO,SAASA,EAAU,EAAE,OAAAC,GAAO,sBAAAC,GAAsB,SAAAC,KAAkB;AACzE,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;"}
@@ -0,0 +1 @@
1
+ export * from './InputField';
@@ -0,0 +1,5 @@
1
+ import { InputField as p } from "./InputField.js";
2
+ export {
3
+ p as InputField
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,13 +1,12 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { c as s } from "../../clsx-DB4S2d7J.js";
2
+ import { c } from "../../clsx-DB4S2d7J.js";
3
3
  import '../../assets/SectionNotification.css';const i = {
4
- "visually-hidden": "_visually-hidden_xsb8x_1",
5
4
  "section-notification": "_section-notification_xsb8x_3",
6
5
  "section-notification--fullwidth": "_section-notification--fullwidth_xsb8x_12"
7
6
  }, a = ({ fullWidth: t = !1, children: o }) => /* @__PURE__ */ n(
8
7
  "div",
9
8
  {
10
- className: s(i["section-notification"], {
9
+ className: c(i["section-notification"], {
11
10
  [i["section-notification--fullwidth"]]: t
12
11
  }),
13
12
  children: o
@@ -1 +1 @@
1
- {"version":3,"file":"SectionNotification.js","sources":["../../../src/components/SectionNotification/SectionNotification.tsx"],"sourcesContent":["import classNames from 'clsx';\n\nimport type { PropsWithChildren } from 'react';\n\nimport styles from './SectionNotification.module.css';\n\nexport interface SectionNotificationProps {\n fullWidth?: boolean;\n}\n\nexport const SectionNotification = ({ fullWidth = false, children }: PropsWithChildren<SectionNotificationProps>) => (\n <div\n className={classNames(styles['section-notification'], {\n [styles['section-notification--fullwidth']]: fullWidth,\n })}\n >\n {children}\n </div>\n);\n"],"names":["SectionNotification","fullWidth","children","jsx","classNames","styles"],"mappings":";;;;;;GAUaA,IAAsB,CAAC,EAAE,WAAAC,IAAY,IAAO,UAAAC,EACvD,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,sBAAsB,GAAG;AAAA,MACpD,CAACA,EAAO,iCAAiC,CAAC,GAAGJ;AAAA,IAAA,CAC9C;AAAA,IAEA,UAAAC;AAAA,EAAA;AACH;"}
1
+ {"version":3,"file":"SectionNotification.js","sources":["../../../src/components/SectionNotification/SectionNotification.tsx"],"sourcesContent":["import classNames from 'clsx';\n\nimport type { PropsWithChildren } from 'react';\n\nimport styles from './SectionNotification.module.css';\n\nexport interface SectionNotificationProps {\n fullWidth?: boolean;\n}\n\nexport const SectionNotification = ({ fullWidth = false, children }: PropsWithChildren<SectionNotificationProps>) => (\n <div\n className={classNames(styles['section-notification'], {\n [styles['section-notification--fullwidth']]: fullWidth,\n })}\n >\n {children}\n </div>\n);\n"],"names":["SectionNotification","fullWidth","children","jsx","classNames","styles"],"mappings":";;;;;GAUaA,IAAsB,CAAC,EAAE,WAAAC,IAAY,IAAO,UAAAC,EACvD,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,sBAAsB,GAAG;AAAA,MACpD,CAACA,EAAO,iCAAiC,CAAC,GAAGJ;AAAA,IAAA,CAC9C;AAAA,IAEA,UAAAC;AAAA,EAAA;AACH;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as a, jsxs as C } from "react/jsx-runtime";
2
2
  import { c as f } from "../../../clsx-DB4S2d7J.js";
3
3
  import { forwardRef as E, useRef as g, useEffect as c } from "react";
4
- import { s as t } from "../../../SelectListbox.module-1nd3xIGj.js";
4
+ import { s as t } from "../../../SelectListbox.module-DSjx989r.js";
5
5
  import { Icon as L } from "../../Icon/Icon.js";
6
6
  import { useSelect as N } from "../SelectProvider.js";
7
7
  const O = E((d, u) => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import { useRef as i, useCallback as u, useEffect as l } from "react";
3
3
  import { useSelect as m } from "../SelectProvider.js";
4
- import { s as f } from "../../../SelectListbox.module-1nd3xIGj.js";
4
+ import { s as f } from "../../../SelectListbox.module-DSjx989r.js";
5
5
  const E = ({ children: o }) => {
6
6
  const { isOpen: r, setIsOpen: n } = m(), t = i(null), e = u(
7
7
  ({ target: s }) => {