@uva-glass/component-library 1.2.0 → 1.3.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,8 +1,9 @@
1
1
  import { ButtonHTMLAttributes, ReactNode } from 'react';
2
2
 
3
- export type UIButtonVariant = 'primary' | 'secondary' | 'destructive' | 'blank';
3
+ export type UIButtonVariant = 'primary' | 'secondary' | 'destructive-primary' | 'destructive-secondary' | 'blank';
4
4
  export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> {
5
5
  variant: UIButtonVariant;
6
6
  children: ReactNode;
7
+ displayColumn?: boolean;
7
8
  }
8
9
  export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,28 +1,32 @@
1
1
  import '../../assets/Button.css';
2
- import { jsx as c } from "react/jsx-runtime";
3
- import { c as _ } from "../../clsx-DB4S2d7J.js";
2
+ import { jsx as _ } from "react/jsx-runtime";
3
+ import { c as m } from "../../clsx-DB4S2d7J.js";
4
4
  import { forwardRef as b } from "react";
5
- const e = "_button_isgcr_3", t = {
6
- "visually-hidden": "_visually-hidden_isgcr_1",
7
- button: e,
8
- "button--blank": "_button--blank_isgcr_37",
9
- "button--primary": "_button--primary_isgcr_54",
10
- "button--secondary": "_button--secondary_isgcr_70",
11
- "button--destructive": "_button--destructive_isgcr_86"
12
- }, m = b((o, r) => {
13
- const { children: n, type: s = "button", variant: u, ...i } = o;
14
- return /* @__PURE__ */ c(
5
+ const a = "_button_1gimu_3", t = {
6
+ "visually-hidden": "_visually-hidden_1gimu_1",
7
+ button: a,
8
+ "button--blank": "_button--blank_1gimu_36",
9
+ "button--primary": "_button--primary_1gimu_53",
10
+ "button--secondary": "_button--secondary_1gimu_69",
11
+ "button--destructive-primary": "_button--destructive-primary_1gimu_85",
12
+ "button--destructive-secondary": "_button--destructive-secondary_1gimu_103",
13
+ "button--wide-column": "_button--wide-column_1gimu_121"
14
+ }, y = b((o, n) => {
15
+ const { children: u, type: r = "button", variant: i, displayColumn: e = !1, ...s } = o;
16
+ return /* @__PURE__ */ _(
15
17
  "button",
16
18
  {
17
- ...i,
18
- type: s,
19
- ref: r,
20
- className: _(t.button, t[`button--${u}`]),
21
- children: n
19
+ ...s,
20
+ type: r,
21
+ ref: n,
22
+ className: m(t.button, t[`button--${i}`], {
23
+ [t["button--wide-column"]]: e
24
+ }),
25
+ children: u
22
26
  }
23
27
  );
24
28
  });
25
29
  export {
26
- m as Button
30
+ y as Button
27
31
  };
28
32
  //# 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' | 'blank';\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> {\n variant: UIButtonVariant;\n children: ReactNode;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>((props, forwardedRef) => {\n const { children, type = 'button', variant, ...restProps } = props;\n\n return (\n <button\n {...restProps}\n type={type}\n ref={forwardedRef}\n className={clsx(styles['button'], styles[`button--${variant}`])}\n >\n {children}\n </button>\n );\n});\n"],"names":["Button","forwardRef","props","forwardedRef","children","type","variant","restProps","jsx","clsx","styles"],"mappings":";;;;;;;;;;GAcaA,IAASC,EAA2C,CAACC,GAAOC,MAAiB;AACxF,QAAM,EAAE,UAAAC,GAAU,MAAAC,IAAO,UAAU,SAAAC,GAAS,GAAGC,EAAc,IAAAL;AAG3D,SAAA,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,MAAAF;AAAA,MACA,KAAKF;AAAA,MACL,WAAWM,EAAKC,EAAO,QAAWA,EAAO,WAAWJ,CAAO,EAAE,CAAC;AAAA,MAE7D,UAAAF;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;"}
@@ -3,3 +3,4 @@ import { ButtonProps } from './Button';
3
3
  declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, ButtonProps>;
4
4
  export default _default;
5
5
  export declare const ButtonExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ButtonProps>;
6
+ export declare const WithMultipleChildren: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ButtonProps>;
@@ -1,25 +1,45 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { f as a } from "../../index-DHAcOIyn.js";
3
- import { Button as t } from "./Button.js";
4
- const m = {
1
+ import { jsxs as o, Fragment as s, jsx as t } from "react/jsx-runtime";
2
+ import { f as l } from "../../index-DHAcOIyn.js";
3
+ import { Button as e } from "./Button.js";
4
+ const u = {
5
5
  title: "Atoms/Button",
6
- component: t,
6
+ component: e,
7
7
  argTypes: {
8
8
  variant: {
9
- options: ["primary", "secondary", "destructive", "blank"],
10
- control: { type: "radio" },
11
- disabled: !1
9
+ options: ["primary", "secondary", "destructive-primary", "destructive-secondary", "blank"],
10
+ control: { type: "radio" }
12
11
  }
13
12
  }
14
- }, e = (o) => /* @__PURE__ */ r(t, { ...o }), n = e.bind({});
15
- n.args = {
13
+ }, i = (a) => /* @__PURE__ */ t(e, { ...a }), n = {
16
14
  variant: "primary",
17
- children: "Click me!",
18
15
  disabled: !1,
19
- onClick: a()
16
+ displayColumn: !1,
17
+ onClick: l()
18
+ }, d = i.bind({});
19
+ d.args = {
20
+ children: "Click me!",
21
+ ...n
22
+ };
23
+ const r = i.bind({});
24
+ r.args = {
25
+ ...n,
26
+ children: /* @__PURE__ */ o(s, { children: [
27
+ /* @__PURE__ */ t("div", { children: "Child 1" }),
28
+ /* @__PURE__ */ t("div", { children: "Child 2" })
29
+ ] })
30
+ };
31
+ r.argTypes = {
32
+ ...r.argTypes,
33
+ children: {
34
+ table: {
35
+ disable: !0
36
+ // Disable children controls for this specific story
37
+ }
38
+ }
20
39
  };
21
40
  export {
22
- n as ButtonExample,
23
- m as default
41
+ d as ButtonExample,
42
+ r as WithMultipleChildren,
43
+ u as default
24
44
  };
25
45
  //# sourceMappingURL=Button.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.js","sources":["../../../src/components/Button/Button.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ButtonProps } from './Button';\n\nimport { Button } from './Button';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Button',\n component: Button,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive', 'blank'],\n control: { type: 'radio' },\n disabled: false,\n },\n },\n} as Meta<ButtonProps>;\n\nconst Template: StoryFn<ButtonProps> = (args) => <Button {...args} />;\n\nexport const ButtonExample = Template.bind({});\nButtonExample.args = {\n variant: 'primary',\n children: 'Click me!',\n disabled: false,\n onClick: fn(),\n};\n"],"names":["Button_stories","Button","Template","args","jsx","ButtonExample","fn"],"mappings":";;;AAQA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,eAAe,OAAO;AAAA,MACxD,SAAS,EAAE,MAAM,QAAQ;AAAA,MACzB,UAAU;AAAA,IACZ;AAAA,EACF;AACF,GAEMC,IAAiC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAQ,GAAGE,EAAM,CAAA,GAEtDE,IAAgBH,EAAS,KAAK,EAAE;AAC7CG,EAAc,OAAO;AAAA,EACnB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAASC,EAAG;AACd;"}
1
+ {"version":3,"file":"Button.stories.js","sources":["../../../src/components/Button/Button.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ButtonProps } from './Button';\n\nimport { Button } from './Button';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Button',\n component: Button,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank'],\n control: { type: 'radio' },\n },\n },\n} as Meta<ButtonProps>;\n\nconst Template: StoryFn<ButtonProps> = (args) => <Button {...args} />;\n\nconst defaultArgs: Partial<ButtonProps> = {\n variant: 'primary',\n disabled: false,\n displayColumn: false,\n onClick: fn(),\n};\n\nexport const ButtonExample = Template.bind({});\nButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["Button_stories","Button","Template","args","jsx","defaultArgs","fn","ButtonExample","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAQA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,OAAO;AAAA,MACzF,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AACF,GAEMC,IAAiC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAQ,GAAGE,EAAM,CAAA,GAE7DE,IAAoC;AAAA,EACxC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,eAAe;AAAA,EACf,SAASC,EAAG;AACd,GAEaC,IAAgBL,EAAS,KAAK,EAAE;AAC7CK,EAAc,OAAO;AAAA,EACnB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAuBN,EAAS,KAAK,EAAE;AACpDM,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,UAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAN,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AACAI,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
@@ -1,41 +1,41 @@
1
1
  import '../../assets/Card.css';
2
- import { jsxs as s, jsx as d } from "react/jsx-runtime";
3
- import { c as _ } from "../../clsx-DB4S2d7J.js";
2
+ import { jsxs as h, jsx as d } from "react/jsx-runtime";
3
+ import { c as t } from "../../clsx-DB4S2d7J.js";
4
4
  import { SectionNotification as i } from "../SectionNotification/SectionNotification.js";
5
- const n = "_card_vqoto_3", r = {
6
- "visually-hidden": "_visually-hidden_vqoto_1",
5
+ const n = "_card_aw9hz_3", a = {
6
+ "visually-hidden": "_visually-hidden_aw9hz_1",
7
7
  card: n,
8
- "card--regular": "_card--regular_vqoto_9",
9
- "card--small": "_card--small_vqoto_14",
10
- "card--large": "_card--large_vqoto_19",
11
- "card-header": "_card-header_vqoto_24",
12
- "card--high-contrast": "_card--high-contrast_vqoto_31",
13
- "card--align-center": "_card--align-center_vqoto_35"
14
- }, v = ({
8
+ "card--regular": "_card--regular_aw9hz_9",
9
+ "card--large": "_card--large_aw9hz_10",
10
+ "card--small": "_card--small_aw9hz_15",
11
+ "card-header": "_card-header_aw9hz_28",
12
+ "card--high-contrast": "_card--high-contrast_aw9hz_35",
13
+ "card--align-center": "_card--align-center_aw9hz_39"
14
+ }, w = ({
15
15
  children: e,
16
16
  header: c,
17
- highContrast: o,
17
+ highContrast: s,
18
18
  notification: l,
19
- padding: a = "regular",
20
- alignCenter: t = !1
21
- }) => /* @__PURE__ */ s(
19
+ padding: r = "regular",
20
+ alignCenter: _ = !1
21
+ }) => /* @__PURE__ */ h(
22
22
  "div",
23
23
  {
24
- className: _(r.card, {
25
- [r["card--high-contrast"]]: o,
26
- [r["card--regular"]]: a === "regular",
27
- [r["card--small"]]: a === "small",
28
- [r["card--large"]]: a === "large",
29
- [r["card--align-center"]]: t
24
+ className: t(a.card, {
25
+ [a["card--high-contrast"]]: s,
26
+ [a["card--regular"]]: r === "regular",
27
+ [a["card--small"]]: r === "small",
28
+ [a["card--large"]]: r === "large",
29
+ [a["card--align-center"]]: _
30
30
  }),
31
31
  children: [
32
32
  l && /* @__PURE__ */ d(i, { children: l }),
33
- c && /* @__PURE__ */ d("div", { className: r["card-header"], children: c }),
33
+ c && /* @__PURE__ */ d("div", { className: a["card-header"], children: c }),
34
34
  e
35
35
  ]
36
36
  }
37
37
  );
38
38
  export {
39
- v as Card
39
+ w as Card
40
40
  };
41
41
  //# sourceMappingURL=Card.js.map
@@ -1,5 +1,5 @@
1
- import { CardProps } from './Card';
2
1
  import { PropsWithChildren } from 'react';
2
+ import { CardProps } from './Card';
3
3
 
4
4
  declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, PropsWithChildren<CardProps>>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
- import { Icons } from './icons';
2
1
  import { ReactNode, SVGAttributes } from 'react';
2
+ import { Icons } from './icons';
3
3
 
4
4
  type IconName = keyof typeof Icons;
5
5
  export interface IconProps extends Omit<SVGAttributes<SVGElement>, 'height' | 'width'> {
@@ -1,30 +1,30 @@
1
1
  import '../../assets/IconButton.css';
2
- import { jsx as b } from "react/jsx-runtime";
3
- import { c as d } from "../../clsx-DB4S2d7J.js";
4
- import { forwardRef as s } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import { c as b } from "../../clsx-DB4S2d7J.js";
4
+ import { forwardRef as l } from "react";
5
5
  const t = {
6
- "visually-hidden": "_visually-hidden_6yk4c_1",
7
- "icon-button": "_icon-button_6yk4c_3",
8
- "icon-button--destructive": "_icon-button--destructive_6yk4c_29",
9
- "icon-button--no-border": "_icon-button--no-border_6yk4c_37",
10
- "icon-button--wide": "_icon-button--wide_6yk4c_46"
11
- }, m = s(
12
- ({ children: o, type: n = "button", variant: c, noBorder: i, wide: e, ...u }, r) => /* @__PURE__ */ b(
6
+ "visually-hidden": "_visually-hidden_ldxal_1",
7
+ "icon-button": "_icon-button_ldxal_3",
8
+ "icon-button--destructive": "_icon-button--destructive_ldxal_29",
9
+ "icon-button--no-border": "_icon-button--no-border_ldxal_37",
10
+ "icon-button--wide": "_icon-button--wide_ldxal_46"
11
+ }, x = l(
12
+ ({ children: o, type: n = "button", variant: i, noBorder: c, wide: e, ...u }, d) => /* @__PURE__ */ r(
13
13
  "button",
14
14
  {
15
15
  ...u,
16
- className: d(t["icon-button"], {
17
- [t["icon-button--destructive"]]: c === "destructive",
18
- [t["icon-button--no-border"]]: i,
16
+ className: b(t["icon-button"], {
17
+ [t["icon-button--destructive"]]: i === "destructive",
18
+ [t["icon-button--no-border"]]: c,
19
19
  [t["icon-button--wide"]]: e
20
20
  }),
21
- ref: r,
21
+ ref: d,
22
22
  type: n,
23
23
  children: o
24
24
  }
25
25
  )
26
26
  );
27
27
  export {
28
- m as IconButton
28
+ x as IconButton
29
29
  };
30
30
  //# sourceMappingURL=IconButton.js.map
@@ -1,8 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { f as n } from "../../index-DHAcOIyn.js";
2
+ import { f as a } from "../../index-DHAcOIyn.js";
3
3
  import { IconButton as o } from "./IconButton.js";
4
- import { Icon as r } from "../Icon/Icon.js";
5
- const m = {
4
+ import { Icon as n } from "../Icon/Icon.js";
5
+ const f = {
6
6
  title: "Atoms/IconButton",
7
7
  component: o,
8
8
  argTypes: {
@@ -33,16 +33,18 @@ const m = {
33
33
  }
34
34
  }
35
35
  }
36
- }, a = (e) => /* @__PURE__ */ t(o, { ...e }), l = a.bind({});
36
+ }, r = (e) => /* @__PURE__ */ t(o, { ...e }), l = r.bind({});
37
37
  l.args = {
38
+ "aria-label": "Trash",
38
39
  variant: "destructive",
39
40
  noBorder: !1,
40
41
  wide: !1,
41
- children: /* @__PURE__ */ t(r, { name: "Trash" }),
42
- onClick: n()
42
+ disabled: !1,
43
+ children: /* @__PURE__ */ t(n, { name: "Trash" }),
44
+ onClick: a()
43
45
  };
44
46
  export {
45
47
  l as IconButtonExample,
46
- m as default
48
+ f as default
47
49
  };
48
50
  //# 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 variant: 'destructive',\n noBorder: false,\n wide: 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,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,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) => <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,5 +1,5 @@
1
- import { SectionNotificationProps } from 'components/SectionNotification';
2
1
  import { PropsWithChildren } from 'react';
2
+ import { SectionNotificationProps } from 'components/SectionNotification';
3
3
 
4
4
  declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, PropsWithChildren<SectionNotificationProps>>;
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
- import { SelectListboxProps } from './SelectListbox';
2
1
  import { PropsWithChildren } from 'react';
2
+ import { SelectListboxProps } from './SelectListbox';
3
3
 
4
4
  declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, SelectListboxProps & {
5
5
  children?: import('react').ReactNode;
@@ -1,9 +1,9 @@
1
- import { SelectOption } from './components/SelectOption';
2
- import { SelectOptionBox } from './components/SelectOptionBox';
3
- import { SelectContainer } from './components/SelectContainer';
4
- import { SelectButton } from './components/SelectButton';
5
- import { OptionValue, SelectValue } from './SelectProvider';
6
1
  import { ReactNode, PropsWithChildren } from 'react';
2
+ import { OptionValue, SelectValue } from './SelectProvider';
3
+ import { SelectButton } from './components/SelectButton';
4
+ import { SelectContainer } from './components/SelectContainer';
5
+ import { SelectOptionBox } from './components/SelectOptionBox';
6
+ import { SelectOption } from './components/SelectOption';
7
7
 
8
8
  interface ISelect {
9
9
  options: OptionValue[];
@@ -1,5 +1,5 @@
1
- import { OptionValue } from 'components/SelectListbox/SelectProvider';
2
1
  import { ReactNode } from 'react';
2
+ import { OptionValue } from 'components/SelectListbox/SelectProvider';
3
3
 
4
4
  export interface SelectOptionProps {
5
5
  option: OptionValue;
@@ -3,15 +3,15 @@ import { jsx as e } from "react/jsx-runtime";
3
3
  import { useState as i } from "react";
4
4
  const C = {
5
5
  "clipboard-button": "_clipboard-button_1ihmb_1"
6
- }, n = 2e3, c = ({ text: l }) => {
7
- const [o, t] = i(!1);
6
+ }, n = 2e3, a = ({ text: o }) => {
7
+ const [l, t] = i(!1);
8
8
  return /* @__PURE__ */ e("div", { style: { position: "relative" }, children: /* @__PURE__ */ e("button", { onClick: () => {
9
- o || navigator.clipboard.writeText(l).then(() => {
9
+ l || navigator.clipboard.writeText(o).then(() => {
10
10
  t(!0), setTimeout(() => {
11
11
  t(!1);
12
12
  }, n);
13
13
  });
14
- }, className: C["clipboard-button"], children: /* @__PURE__ */ e(
14
+ }, className: C["clipboard-button"], "aria-label": `Copy ${o}`, children: /* @__PURE__ */ e(
15
15
  "svg",
16
16
  {
17
17
  width: "15",
@@ -20,7 +20,7 @@ const C = {
20
20
  fill: "none",
21
21
  xmlns: "http://www.w3.org/2000/svg",
22
22
  className: "h-3 w-3",
23
- children: o ? /* @__PURE__ */ e(
23
+ children: l ? /* @__PURE__ */ e(
24
24
  "path",
25
25
  {
26
26
  d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
@@ -41,6 +41,6 @@ const C = {
41
41
  ) }) });
42
42
  };
43
43
  export {
44
- c as ClipboardButton
44
+ a as ClipboardButton
45
45
  };
46
46
  //# sourceMappingURL=ClipboardButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClipboardButton.js","sources":["../../../../src/components/storyComponents/ClipboardButton/ClipboardButton.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport styles from './ClipboardButton.module.css';\n\ninterface ClipboardButtonProps {\n text: string;\n}\n\nconst DELAY = 2000;\n\nexport const ClipboardButton = ({ text }: ClipboardButtonProps) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopyClick = () => {\n if (!isCopied) {\n void navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => {\n setIsCopied(false);\n }, DELAY);\n });\n }\n };\n\n return (\n <div style={{ position: 'relative' }}>\n <button onClick={handleCopyClick} className={styles['clipboard-button']}>\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-3 w-3\"\n >\n {isCopied ? (\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n ) : (\n <path\n d=\"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n )}\n </svg>\n </button>\n </div>\n );\n};\n"],"names":["DELAY","ClipboardButton","text","isCopied","setIsCopied","useState","jsx","styles"],"mappings":";;;;GAQMA,IAAQ,KAEDC,IAAkB,CAAC,EAAE,MAAAC,QAAiC;AACjE,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK;AAa9C,SACG,gBAAAC,EAAA,OAAA,EAAI,OAAO,EAAE,UAAU,WAAW,GACjC,UAAC,gBAAAA,EAAA,UAAA,EAAO,SAbY,MAAM;AAC5B,IAAKH,KACE,UAAU,UAAU,UAAUD,CAAI,EAAE,KAAK,MAAM;AAClD,MAAAE,EAAY,EAAI,GAChB,WAAW,MAAM;AACf,QAAAA,EAAY,EAAK;AAAA,SAChBJ,CAAK;AAAA,IAAA,CACT;AAAA,EACH,GAKoC,WAAWO,EAAO,kBAAkB,GACpE,UAAA,gBAAAD;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN,WAAU;AAAA,MAET,UACCH,IAAA,gBAAAG;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,UACL,UAAS;AAAA,UACT,UAAS;AAAA,QAAA;AAAA,MAAA,IAGX,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,UACL,UAAS;AAAA,UACT,UAAS;AAAA,QAAA;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,EAGN,CAAA,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"ClipboardButton.js","sources":["../../../../src/components/storyComponents/ClipboardButton/ClipboardButton.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport styles from './ClipboardButton.module.css';\n\ninterface ClipboardButtonProps {\n text: string;\n}\n\nconst DELAY = 2000;\n\nexport const ClipboardButton = ({ text }: ClipboardButtonProps) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopyClick = () => {\n if (!isCopied) {\n void navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => {\n setIsCopied(false);\n }, DELAY);\n });\n }\n };\n\n return (\n <div style={{ position: 'relative' }}>\n <button onClick={handleCopyClick} className={styles['clipboard-button']} aria-label={`Copy ${text}`}>\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-3 w-3\"\n >\n {isCopied ? (\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n ) : (\n <path\n d=\"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n )}\n </svg>\n </button>\n </div>\n );\n};\n"],"names":["DELAY","ClipboardButton","text","isCopied","setIsCopied","useState","jsx","styles"],"mappings":";;;;GAQMA,IAAQ,KAEDC,IAAkB,CAAC,EAAE,MAAAC,QAAiC;AACjE,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK;AAa9C,2BACG,OAAI,EAAA,OAAO,EAAE,UAAU,cACtB,UAAC,gBAAAC,EAAA,UAAA,EAAO,SAbY,MAAM;AAC5B,IAAKH,KACE,UAAU,UAAU,UAAUD,CAAI,EAAE,KAAK,MAAM;AAClD,MAAAE,EAAY,EAAI,GAChB,WAAW,MAAM;AACf,QAAAA,EAAY,EAAK;AAAA,SAChBJ,CAAK;AAAA,IAAA,CACT;AAAA,EACH,GAKoC,WAAWO,EAAO,kBAAkB,GAAG,cAAY,QAAQL,CAAI,IAC/F,UAAA,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN,WAAU;AAAA,MAET,UACCH,IAAA,gBAAAG;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,UACL,UAAS;AAAA,UACT,UAAS;AAAA,QAAA;AAAA,MAAA,IAGX,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,UACL,UAAS;AAAA,UACT,UAAS;AAAA,QAAA;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,EAGN,CAAA,EACF,CAAA;AAEJ;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uva-glass/component-library",
3
3
  "author": "Team Glass - Frontend vrienden",
4
4
  "private": false,
5
- "version": "1.2.0",
5
+ "version": "1.3.1",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -44,18 +44,19 @@
44
44
  "@semantic-release/git": "^10.0.1",
45
45
  "@semantic-release/gitlab": "^13.0.4",
46
46
  "@semantic-release/npm": "^12.0.0",
47
- "@storybook/addon-essentials": "^8.0.9",
48
- "@storybook/addon-interactions": "^8.0.9",
49
- "@storybook/addon-links": "^8.0.9",
50
- "@storybook/blocks": "^8.0.9",
51
- "@storybook/react": "^8.0.9",
52
- "@storybook/react-vite": "^8.0.9",
53
- "@storybook/test": "^8.0.9",
54
- "@types/node": "^20.12.7",
47
+ "@storybook/addon-a11y": "^8.0.10",
48
+ "@storybook/addon-essentials": "^8.0.10",
49
+ "@storybook/addon-interactions": "^8.0.10",
50
+ "@storybook/addon-links": "^8.0.10",
51
+ "@storybook/blocks": "^8.0.10",
52
+ "@storybook/react": "^8.0.10",
53
+ "@storybook/react-vite": "^8.0.10",
54
+ "@storybook/test": "^8.0.10",
55
+ "@types/node": "^20.12.10",
55
56
  "@types/react": "^18.3.1",
56
57
  "@types/react-dom": "^18.3.0",
57
- "@typescript-eslint/eslint-plugin": "^7.7.1",
58
- "@typescript-eslint/parser": "^7.7.1",
58
+ "@typescript-eslint/eslint-plugin": "^7.8.0",
59
+ "@typescript-eslint/parser": "^7.8.0",
59
60
  "@uva-glass/eslint-config": "^1.2.0",
60
61
  "@uva-glass/stylelint-config": "^1.1.0",
61
62
  "@vitejs/plugin-react": "^4.2.1",
@@ -76,15 +77,15 @@
76
77
  "react": "^18.3.1",
77
78
  "react-dom": "^18.3.1",
78
79
  "semantic-release": "^23.0.8",
79
- "storybook": "^8.0.9",
80
+ "storybook": "^8.0.10",
80
81
  "style-dictionary": "^3.9.2",
81
- "stylelint": "^16.4.0",
82
+ "stylelint": "^16.5.0",
82
83
  "stylelint-config-recommended": "^14.0.0",
83
84
  "stylelint-config-standard": "^36.0.0",
84
85
  "stylelint-order": "^6.0.4",
85
86
  "typescript": "^5.4.5",
86
- "vite": "^5.2.10",
87
- "vite-plugin-dts": "^3.9.0",
87
+ "vite": "^5.2.11",
88
+ "vite-plugin-dts": "^3.9.1",
88
89
  "vite-plugin-lib-inject-css": "^2.0.1",
89
90
  "vite-plugin-svgr": "^4.2.0",
90
91
  "vite-tsconfig-paths": "^4.3.2"