@uva-glass/component-library 1.30.0 → 1.31.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.
@@ -1 +1 @@
1
- ._attention_1kulj_1{display:flex;gap:1rem}._attention_1kulj_1>svg{flex-shrink:0;height:1.5rem;width:1.5rem}
1
+ ._attention_kdl29_1{display:flex;gap:.5rem}._attention_kdl29_1>svg{flex-shrink:0;height:1.5rem;width:1.5rem}
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
2
  import { Icon as o } from "../Icon/Icon.js";
3
- import '../../assets/Attention.css';const e = "_attention_1kulj_1", s = {
3
+ import '../../assets/Attention.css';const e = "_attention_kdl29_1", s = {
4
4
  attention: e
5
5
  }, l = ({ children: t }) => /* @__PURE__ */ n("div", { className: s.attention, children: [
6
6
  /* @__PURE__ */ i(o, { name: "ExclamationCircleFillMini", size: 24 }),
@@ -5,5 +5,6 @@ export interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputEleme
5
5
  type?: 'text' | 'search' | 'password' | 'email';
6
6
  id: string;
7
7
  clearTrigger?: ReactNode;
8
+ onClear?: () => void;
8
9
  }
9
10
  export declare const InputField: import('react').ForwardRefExoticComponent<InputFieldProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,54 +1,51 @@
1
- import { jsxs as b, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as x, useState as s, useRef as C, useEffect as v } from "react";
1
+ import { jsxs as h, jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as m, useState as b, useRef as g, useEffect as x } from "react";
3
3
  import { c as y } from "../../clsx-DB4S2d7J.js";
4
- import '../../assets/InputField.css';const n = {
4
+ import '../../assets/InputField.css';const i = {
5
5
  "input-field-wrapper": "_input-field-wrapper_hh88t_1",
6
6
  "input-field": "_input-field_hh88t_1",
7
7
  "input-field--large": "_input-field--large_hh88t_22",
8
8
  "input-field__clear-button": "_input-field__clear-button_hh88t_30"
9
- }, j = x(
10
- ({ autoComplete: c = "off", id: u, variant: o, type: p = "text", clearTrigger: i, ...f }, t) => {
11
- const [e, r] = s(""), [h, _] = s(0), l = C(null);
12
- v(() => {
9
+ }, W = m(
10
+ ({ autoComplete: c = "off", id: r, value: e, variant: s, type: f = "text", clearTrigger: n, onClear: u, ...o }, t) => {
11
+ const [a, _] = b(0), l = g(null);
12
+ x(() => {
13
13
  l.current && _(l.current.offsetWidth);
14
14
  }, [e]);
15
15
  const d = () => {
16
- r(""), t && "current" in t && t.current && t.current.focus();
17
- }, m = (g) => {
18
- r(g.target.value);
16
+ u && t && "current" in t && t.current && (u(), t.current.focus());
19
17
  };
20
- return /* @__PURE__ */ b("div", { className: n["input-field-wrapper"], children: [
21
- /* @__PURE__ */ a(
18
+ return /* @__PURE__ */ h("div", { className: i["input-field-wrapper"], children: [
19
+ /* @__PURE__ */ p(
22
20
  "input",
23
21
  {
24
- ...f,
22
+ ...o,
25
23
  autoComplete: c,
26
24
  ref: t,
27
- id: u,
28
- className: y(n["input-field"], {
29
- [n["input-field--large"]]: o === "large"
25
+ id: r,
26
+ className: y(i["input-field"], {
27
+ [i["input-field--large"]]: s === "large"
30
28
  }),
31
- type: p,
29
+ type: f,
32
30
  value: e,
33
- onChange: m,
34
- style: { paddingRight: e && i ? h : void 0 }
31
+ style: { paddingRight: e && n ? a : void 0 }
35
32
  }
36
33
  ),
37
- e && i && /* @__PURE__ */ a(
34
+ e && n && /* @__PURE__ */ p(
38
35
  "button",
39
36
  {
40
37
  type: "button",
41
- className: n["input-field__clear-button"],
38
+ className: i["input-field__clear-button"],
42
39
  onClick: d,
43
40
  ref: l,
44
- "aria-label": `clear trigger for ${u}`,
45
- children: i
41
+ "aria-label": `clear trigger for ${r}`,
42
+ children: n
46
43
  }
47
44
  )
48
45
  ] });
49
46
  }
50
47
  );
51
48
  export {
52
- j as InputField
49
+ W as InputField
53
50
  };
54
51
  //# sourceMappingURL=InputField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputField.js","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import { forwardRef, useState, useEffect, useRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './InputField.module.css';\n\nexport interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {\n variant?: 'large';\n type?: 'text' | 'search' | 'password' | 'email';\n id: string;\n clearTrigger?: ReactNode;\n}\n\nexport const InputField = forwardRef<HTMLInputElement, InputFieldProps>(\n ({ autoComplete = 'off', id, variant, type = 'text', clearTrigger, ...restProps }: InputFieldProps, forwardedRef) => {\n const [value, setValue] = useState<string>('');\n const [clearButtonWidth, setClearButtonWidth] = useState<number>(0);\n const clearButtonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (clearButtonRef.current) {\n setClearButtonWidth(clearButtonRef.current.offsetWidth);\n }\n }, [value]);\n\n const handleClear = () => {\n setValue('');\n if (forwardedRef && 'current' in forwardedRef && forwardedRef.current) {\n forwardedRef.current.focus();\n }\n };\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setValue(event.target.value);\n };\n\n return (\n <div className={styles['input-field-wrapper']}>\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 value={value}\n onChange={handleChange}\n style={{ paddingRight: value && clearTrigger ? clearButtonWidth : undefined }}\n />\n {value && clearTrigger && (\n <button\n type=\"button\"\n className={styles['input-field__clear-button']}\n onClick={handleClear}\n ref={clearButtonRef}\n aria-label={`clear trigger for ${id}`}\n >\n {clearTrigger}\n </button>\n )}\n </div>\n );\n }\n);\n"],"names":["InputField","forwardRef","autoComplete","id","variant","type","clearTrigger","restProps","forwardedRef","value","setValue","useState","clearButtonWidth","setClearButtonWidth","clearButtonRef","useRef","useEffect","handleClear","handleChange","event","jsxs","styles","jsx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AElC,UAAAG;AAAA,QAAA;AAAA,MACH;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"InputField.js","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import { forwardRef, useState, useEffect, useRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './InputField.module.css';\n\nexport interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {\n variant?: 'large';\n type?: 'text' | 'search' | 'password' | 'email';\n id: string;\n clearTrigger?: ReactNode;\n onClear?: () => void;\n}\n\nexport const InputField = forwardRef<HTMLInputElement, InputFieldProps>(\n (\n { autoComplete = 'off', id, value, variant, type = 'text', clearTrigger, onClear, ...restProps }: InputFieldProps,\n forwardedRef\n ) => {\n const [clearButtonWidth, setClearButtonWidth] = useState<number>(0);\n const clearButtonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (clearButtonRef.current) {\n setClearButtonWidth(clearButtonRef.current.offsetWidth);\n }\n }, [value]);\n\n const handleClearTriggerClick = () => {\n if (onClear && forwardedRef && 'current' in forwardedRef && forwardedRef.current) {\n onClear();\n forwardedRef.current.focus();\n }\n };\n\n return (\n <div className={styles['input-field-wrapper']}>\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 value={value}\n style={{ paddingRight: value && clearTrigger ? clearButtonWidth : undefined }}\n />\n {value && clearTrigger && (\n <button\n type=\"button\"\n className={styles['input-field__clear-button']}\n onClick={handleClearTriggerClick}\n ref={clearButtonRef}\n aria-label={`clear trigger for ${id}`}\n >\n {clearTrigger}\n </button>\n )}\n </div>\n );\n }\n);\n"],"names":["InputField","forwardRef","autoComplete","id","value","variant","type","clearTrigger","onClear","restProps","forwardedRef","clearButtonWidth","setClearButtonWidth","useState","clearButtonRef","use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,21 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useRef as a } from "react";
3
- import { InputField as n } from "./InputField.js";
4
- import { Container as s } from "../storyComponents/Container/Container.js";
5
- import { Icon as p } from "../Icon/Icon.js";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useState as d, useRef as g } from "react";
3
+ import { f as i } from "../../index-DFUrxrKJ.js";
4
+ import { InputField as l } from "./InputField.js";
5
+ import { Container as u } from "../storyComponents/Container/Container.js";
6
+ import { Icon as f } from "../Icon/Icon.js";
6
7
  import "../Button/Button.js";
7
8
  import "../OverlayCloseButton/OverlayCloseButton.js";
8
9
  import "../IconButton/IconButton.js";
9
10
  import "../Input/Input.js";
10
11
  import "../SelectListbox/SelectListbox.js";
11
12
  import "../SelectListbox/SelectProvider.js";
12
- const l = (t) => {
13
+ const h = (t) => {
13
14
  const r = t.variant ?? [];
14
15
  return { ...t, variant: r.toString() };
15
- }, A = {
16
+ }, w = {
16
17
  title: "Atoms/InputField",
17
- component: n,
18
+ component: l,
18
19
  argTypes: {
19
20
  variant: {
20
21
  options: ["large"],
@@ -33,31 +34,44 @@ const l = (t) => {
33
34
  }
34
35
  }
35
36
  }
36
- }, e = (t) => {
37
- const r = a(null);
38
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(n, { ...l(t), ref: r }) });
39
- }, i = {
37
+ }, o = (t) => {
38
+ const [r, a] = d(""), s = g(null), p = (c) => {
39
+ a(c.target.value), i()("handleChange");
40
+ }, m = () => {
41
+ a(""), i()("handleClear");
42
+ };
43
+ return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(
44
+ l,
45
+ {
46
+ ...h(t),
47
+ value: r,
48
+ onChange: p,
49
+ onClear: m,
50
+ ref: s
51
+ }
52
+ ) });
53
+ }, n = {
40
54
  type: "text",
41
55
  variant: void 0,
42
56
  id: "4f9ca77d"
43
- }, m = e.bind({});
44
- m.args = {
45
- ...i
57
+ }, C = o.bind({});
58
+ C.args = {
59
+ ...n
46
60
  };
47
- const c = e.bind({});
48
- c.args = {
49
- ...i,
61
+ const v = o.bind({});
62
+ v.args = {
63
+ ...n,
50
64
  clearTrigger: "Clear"
51
65
  };
52
- const d = e.bind({});
53
- d.args = {
54
- ...i,
55
- clearTrigger: /* @__PURE__ */ o(p, { name: "Cross" })
66
+ const I = o.bind({});
67
+ I.args = {
68
+ ...n,
69
+ clearTrigger: /* @__PURE__ */ e(f, { name: "Cross" })
56
70
  };
57
71
  export {
58
- m as InputFieldExample,
59
- d as WithIconClearTrigger,
60
- c as WithStringClearTrigger,
61
- A as default
72
+ C as InputFieldExample,
73
+ I as WithIconClearTrigger,
74
+ v as WithStringClearTrigger,
75
+ w as default
62
76
  };
63
77
  //# sourceMappingURL=InputField.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'search', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const inputRef = useRef<HTMLInputElement>(null);\n\n return (\n <Container>\n <InputField {...transformArgs(args)} ref={inputRef} />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","inputRef","useRef","jsx","Container","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;AAUA,MAAMA,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,UAAU,YAAY,OAAO;AAAA,IACjD;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAqC,CAACJ,MAAS;AAC7C,QAAAK,IAAWC,EAAyB,IAAI;AAG5C,SAAA,gBAAAC,EAACC,GACC,EAAA,UAAA,gBAAAD,EAACJ,GAAY,EAAA,GAAGJ,EAAcC,CAAI,GAAG,KAAKK,EAAU,CAAA,EACtD,CAAA;AAEJ,GAEMI,IAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AACN,GAEaC,IAAoBN,EAAS,KAAK,EAAE;AACjDM,EAAkB,OAAO;AAAA,EACvB,GAAGD;AACL;AAEO,MAAME,IAAyBP,EAAS,KAAK,EAAE;AACtDO,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,cAAc;AAChB;AAEO,MAAMG,IAAuBR,EAAS,KAAK,EAAE;AACpDQ,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,cAAc,gBAAAF,EAACM,GAAK,EAAA,MAAK,QAAQ,CAAA;AACnC;"}
1
+ {"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'search', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;;AAYA,MAAMA,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,UAAU,YAAY,OAAO;AAAA,IACjD;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAqC,CAACJ,MAAS;AACnD,QAAM,CAACK,GAAYC,CAAa,IAAIC,EAAmC,EAAE,GACnEC,IAAWC,EAAyB,IAAI,GAExCC,IAAe,CAACC,MAAyC;AAC/C,IAAAL,EAAAK,EAAM,OAAO,KAAK,GAChCC,EAAA,EAAK,cAAc;AAAA,EAAA,GAGfC,IAAc,MAAM;AACxB,IAAAP,EAAc,EAAE,GAChB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