@uva-glass/component-library 1.3.3 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/SelectListbox.module-1nd3xIGj.js +1 -2
  2. package/dist/assets/Spinner.css +1 -0
  3. package/dist/components/Button/Button.js +1 -2
  4. package/dist/components/Card/Card.js +1 -2
  5. package/dist/components/Icon/Icon.stories.js +1 -2
  6. package/dist/components/Icon/icons/index.d.ts +40 -4
  7. package/dist/components/Icon/icons/index.js +63 -51
  8. package/dist/components/Icon/icons/index.js.map +1 -1
  9. package/dist/components/IconButton/IconButton.js +1 -2
  10. package/dist/components/InfoMessage/InfoMessage.js +1 -2
  11. package/dist/components/InfoMessage/{InfoMassage.stories.js → InfoMessage.stories.js} +1 -1
  12. package/dist/components/InfoMessage/{InfoMassage.stories.js.map → InfoMessage.stories.js.map} +1 -1
  13. package/dist/components/SectionNotification/SectionNotification.js +1 -2
  14. package/dist/components/Spinner/Spinner.d.ts +8 -0
  15. package/dist/components/Spinner/Spinner.js +34 -0
  16. package/dist/components/Spinner/Spinner.js.map +1 -0
  17. package/dist/components/Spinner/Spinner.stories.d.ts +7 -0
  18. package/dist/components/Spinner/Spinner.stories.js +41 -0
  19. package/dist/components/Spinner/Spinner.stories.js.map +1 -0
  20. package/dist/components/Spinner/index.d.ts +1 -0
  21. package/dist/components/Spinner/index.js +5 -0
  22. package/dist/components/Spinner/index.js.map +1 -0
  23. package/dist/components/index.d.ts +1 -0
  24. package/dist/components/index.js +10 -8
  25. package/dist/components/index.js.map +1 -1
  26. package/dist/components/storyComponents/ClipboardButton/ClipboardButton.js +1 -2
  27. package/dist/index.js +10 -8
  28. package/dist/index.js.map +1 -1
  29. package/package.json +11 -11
  30. /package/dist/components/InfoMessage/{InfoMassage.stories.d.ts → InfoMessage.stories.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"InfoMassage.stories.js","sources":["../../../src/components/InfoMessage/InfoMassage.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InfoMessageProps } from './InfoMessage';\n\nimport { InfoMessage } from './InfoMessage';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InfoMessage',\n component: InfoMessage,\n argTypes: {\n message: {\n control: 'text',\n },\n hasOwnContainer: {\n control: 'boolean',\n },\n },\n} as Meta<InfoMessageProps>;\n\nconst Template: StoryFn<InfoMessageProps> = (args) => <InfoMessage {...args} />;\n\nexport const InfoMessageExample = Template.bind({});\nInfoMessageExample.args = {\n message: 'This is an example info message',\n hasOwnContainer: false,\n};\n"],"names":["InfoMassage_stories","InfoMessage","Template","args","jsx","InfoMessageExample"],"mappings":";;AAMA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,IACX;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAAsC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAa,GAAGE,EAAM,CAAA,GAEhEE,IAAqBH,EAAS,KAAK,EAAE;AAClDG,EAAmB,OAAO;AAAA,EACxB,SAAS;AAAA,EACT,iBAAiB;AACnB;"}
1
+ {"version":3,"file":"InfoMessage.stories.js","sources":["../../../src/components/InfoMessage/InfoMessage.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InfoMessageProps } from './InfoMessage';\n\nimport { InfoMessage } from './InfoMessage';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InfoMessage',\n component: InfoMessage,\n argTypes: {\n message: {\n control: 'text',\n },\n hasOwnContainer: {\n control: 'boolean',\n },\n },\n} as Meta<InfoMessageProps>;\n\nconst Template: StoryFn<InfoMessageProps> = (args) => <InfoMessage {...args} />;\n\nexport const InfoMessageExample = Template.bind({});\nInfoMessageExample.args = {\n message: 'This is an example info message',\n hasOwnContainer: false,\n};\n"],"names":["InfoMessage_stories","InfoMessage","Template","args","jsx","InfoMessageExample"],"mappings":";;AAMA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,IACX;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAAsC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAa,GAAGE,EAAM,CAAA,GAEhEE,IAAqBH,EAAS,KAAK,EAAE;AAClDG,EAAmB,OAAO;AAAA,EACxB,SAAS;AAAA,EACT,iBAAiB;AACnB;"}
@@ -1,7 +1,6 @@
1
- import '../../assets/SectionNotification.css';
2
1
  import { jsx as n } from "react/jsx-runtime";
3
2
  import { c as s } from "../../clsx-DB4S2d7J.js";
4
- const i = {
3
+ import '../../assets/SectionNotification.css';const i = {
5
4
  "visually-hidden": "_visually-hidden_xsb8x_1",
6
5
  "section-notification": "_section-notification_xsb8x_3",
7
6
  "section-notification--fullwidth": "_section-notification--fullwidth_xsb8x_12"
@@ -0,0 +1,8 @@
1
+ export interface SpinnerProps {
2
+ ariaValueText: string;
3
+ /** Delay in milliseconds after which the spinner becomes visible. The default is 250. */
4
+ visibleAfter?: number;
5
+ centered?: boolean;
6
+ fullScreen?: boolean;
7
+ }
8
+ export declare const Spinner: ({ ariaValueText, centered, fullScreen, visibleAfter }: SpinnerProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,34 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useState as p, useEffect as l } from "react";
3
+ import { c as u } from "../../clsx-DB4S2d7J.js";
4
+ import '../../assets/Spinner.css';const _ = "_spinner_132ki_11", m = "_spin_132ki_11", n = {
5
+ spinner: _,
6
+ spin: m,
7
+ "spinner-container--centered": "_spinner-container--centered_132ki_33",
8
+ "spinner-container--full-screen": "_spinner-container--full-screen_132ki_40"
9
+ }, f = 250, x = ({ ariaValueText: i, centered: s, fullScreen: t, visibleAfter: e = f }) => {
10
+ const [c, o] = p(() => e === 0);
11
+ return l(() => {
12
+ if (e === 0)
13
+ return;
14
+ const a = window.setTimeout(() => {
15
+ o(!0);
16
+ }, e);
17
+ return () => {
18
+ window.clearTimeout(a);
19
+ };
20
+ }), c ? /* @__PURE__ */ r(
21
+ "div",
22
+ {
23
+ className: u(n["spinner-container"], {
24
+ [n["spinner-container--centered"]]: s,
25
+ [n["spinner-container--full-screen"]]: t
26
+ }),
27
+ children: /* @__PURE__ */ r("div", { className: n.spinner, role: "progressbar", "aria-label": "Spinner", "aria-valuetext": i })
28
+ }
29
+ ) : null;
30
+ };
31
+ export {
32
+ x as Spinner
33
+ };
34
+ //# sourceMappingURL=Spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.js","sources":["../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport styles from './Spinner.module.css';\n\nconst DEFAULT_DELAY_IN_MS = 250;\n\nexport interface SpinnerProps {\n ariaValueText: string;\n /** Delay in milliseconds after which the spinner becomes visible. The default is 250. */\n visibleAfter?: number;\n centered?: boolean;\n fullScreen?: boolean;\n}\n\nexport const Spinner = ({ ariaValueText, centered, fullScreen, visibleAfter = DEFAULT_DELAY_IN_MS }: SpinnerProps) => {\n const [visible, setVisible] = useState(() => (visibleAfter === 0 ? true : false));\n\n useEffect(() => {\n if (visibleAfter === 0) {\n return;\n }\n const t = window.setTimeout(() => {\n setVisible(true);\n }, visibleAfter);\n\n return () => {\n window.clearTimeout(t);\n };\n });\n\n if (!visible) {\n return null;\n }\n\n return (\n <div\n className={clsx(styles['spinner-container'], {\n [styles['spinner-container--centered']]: centered,\n [styles['spinner-container--full-screen']]: fullScreen,\n })}\n >\n <div className={styles['spinner']} role=\"progressbar\" aria-label=\"Spinner\" aria-valuetext={ariaValueText}></div>\n </div>\n );\n};\n"],"names":["DEFAULT_DELAY_IN_MS","Spinner","ariaValueText","centered","fullScreen","visibleAfter","visible","setVisible","useState","useEffect","t","jsx","clsx","styles"],"mappings":";;;;;;;;GAKMA,IAAsB,KAUfC,IAAU,CAAC,EAAE,eAAAC,GAAe,UAAAC,GAAU,YAAAC,GAAY,cAAAC,IAAeL,QAAwC;AAC9G,QAAA,CAACM,GAASC,CAAU,IAAIC,EAAS,MAAOH,MAAiB,CAAiB;AAehF,SAbAI,EAAU,MAAM;AACd,QAAIJ,MAAiB;AACnB;AAEI,UAAAK,IAAI,OAAO,WAAW,MAAM;AAChC,MAAAH,EAAW,EAAI;AAAA,OACdF,CAAY;AAEf,WAAO,MAAM;AACX,aAAO,aAAaK,CAAC;AAAA,IAAA;AAAA,EACvB,CACD,GAEIJ,IAKH,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,mBAAmB,GAAG;AAAA,QAC3C,CAACA,EAAO,6BAA6B,CAAC,GAAGV;AAAA,QACzC,CAACU,EAAO,gCAAgC,CAAC,GAAGT;AAAA,MAAA,CAC7C;AAAA,MAED,UAAA,gBAAAO,EAAC,OAAI,EAAA,WAAWE,EAAO,SAAY,MAAK,eAAc,cAAW,WAAU,kBAAgBX,EAAe,CAAA;AAAA,IAAA;AAAA,EAAA,IAVrG;AAaX;"}
@@ -0,0 +1,7 @@
1
+ import { SpinnerProps } from './Spinner';
2
+
3
+ declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, SpinnerProps>;
4
+ export default _default;
5
+ export declare const SpinnerExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, SpinnerProps>;
6
+ export declare const Centered: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, SpinnerProps>;
7
+ export declare const FullScreen: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, SpinnerProps>;
@@ -0,0 +1,41 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { Spinner as r } from "./Spinner.js";
3
+ const c = {
4
+ title: "Atoms/Spinner",
5
+ component: r,
6
+ argTypes: {
7
+ ariaValueText: {
8
+ control: "text"
9
+ },
10
+ centered: {
11
+ control: "boolean"
12
+ },
13
+ fullScreen: {
14
+ control: "boolean"
15
+ },
16
+ visibleAfter: {
17
+ control: "number"
18
+ }
19
+ }
20
+ }, e = (o) => /* @__PURE__ */ l(r, { ...o }), t = e.bind({});
21
+ t.args = {
22
+ ariaValueText: "Example value text",
23
+ visibleAfter: 250
24
+ };
25
+ const n = e.bind({});
26
+ n.args = {
27
+ ...t.args,
28
+ centered: !0
29
+ };
30
+ const a = e.bind({});
31
+ a.args = {
32
+ ...n.args,
33
+ fullScreen: !0
34
+ };
35
+ export {
36
+ n as Centered,
37
+ a as FullScreen,
38
+ t as SpinnerExample,
39
+ c as default
40
+ };
41
+ //# sourceMappingURL=Spinner.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.stories.js","sources":["../../../src/components/Spinner/Spinner.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { SpinnerProps } from './Spinner';\n\nimport { Spinner } from './Spinner';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Spinner',\n component: Spinner,\n argTypes: {\n ariaValueText: {\n control: 'text'\n },\n centered: {\n control: 'boolean'\n },\n fullScreen: {\n control: 'boolean'\n },\n visibleAfter: {\n control: 'number'\n }\n },\n} as Meta<SpinnerProps>;\n\nconst Template: StoryFn<SpinnerProps> = (args) => <Spinner {...args} />;\n\nexport const SpinnerExample = Template.bind({});\nSpinnerExample.args = {\n ariaValueText: 'Example value text',\n visibleAfter: 250\n};\n\nexport const Centered = Template.bind({});\nCentered.args = {\n ...SpinnerExample.args,\n centered: true\n};\n\nexport const FullScreen = Template.bind({});\nFullScreen.args = {\n ...Centered.args,\n fullScreen: true\n};\n"],"names":["Spinner_stories","Spinner","Template","args","jsx","SpinnerExample","Centered","FullScreen"],"mappings":";;AAMA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,eAAe;AAAA,MACX,SAAS;AAAA,IACb;AAAA,IACA,UAAU;AAAA,MACN,SAAS;AAAA,IACb;AAAA,IACA,YAAY;AAAA,MACR,SAAS;AAAA,IACb;AAAA,IACA,cAAc;AAAA,MACV,SAAS;AAAA,IACb;AAAA,EACF;AACF,GAEMC,IAAkC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAS,GAAGE,EAAM,CAAA,GAExDE,IAAiBH,EAAS,KAAK,EAAE;AAC9CG,EAAe,OAAO;AAAA,EACpB,eAAe;AAAA,EACf,cAAc;AAChB;AAEO,MAAMC,IAAWJ,EAAS,KAAK,EAAE;AACxCI,EAAS,OAAO;AAAA,EACZ,GAAGD,EAAe;AAAA,EAClB,UAAU;AACd;AAEO,MAAME,IAAaL,EAAS,KAAK,EAAE;AAC1CK,EAAW,OAAO;AAAA,EACd,GAAGD,EAAS;AAAA,EACZ,YAAY;AAChB;"}
@@ -0,0 +1 @@
1
+ export * from './Spinner';
@@ -0,0 +1,5 @@
1
+ import { Spinner as n } from "./Spinner.js";
2
+ export {
3
+ n as Spinner
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -6,3 +6,4 @@ export * from './InfoMessage';
6
6
  export * from './SectionNotification';
7
7
  export * from './SelectListbox';
8
8
  export * from './SelectListbox/SelectProvider';
9
+ export * from './Spinner';
@@ -1,20 +1,22 @@
1
- import { Button as r } from "./Button/Button.js";
1
+ import { Button as e } from "./Button/Button.js";
2
2
  import { Card as f } from "./Card/Card.js";
3
- import { Icon as m } from "./Icon/Icon.js";
4
- import { IconButton as c } from "./IconButton/IconButton.js";
3
+ import { Icon as x } from "./Icon/Icon.js";
4
+ import { IconButton as n } from "./IconButton/IconButton.js";
5
5
  import { InfoMessage as i } from "./InfoMessage/InfoMessage.js";
6
- import { SectionNotification as S } from "./SectionNotification/SectionNotification.js";
6
+ import { SectionNotification as s } from "./SectionNotification/SectionNotification.js";
7
7
  import { SelectListbox as l } from "./SelectListbox/SelectListbox.js";
8
8
  import { SelectProvider as I, useSelect as d } from "./SelectListbox/SelectProvider.js";
9
+ import { Spinner as b } from "./Spinner/Spinner.js";
9
10
  export {
10
- r as Button,
11
+ e as Button,
11
12
  f as Card,
12
- m as Icon,
13
- c as IconButton,
13
+ x as Icon,
14
+ n as IconButton,
14
15
  i as InfoMessage,
15
- S as SectionNotification,
16
+ s as SectionNotification,
16
17
  l as SelectListbox,
17
18
  I as SelectProvider,
19
+ b as Spinner,
18
20
  d as useSelect
19
21
  };
20
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1,7 +1,6 @@
1
- import '../../../assets/ClipboardButton.css';
2
1
  import { jsx as e } from "react/jsx-runtime";
3
2
  import { useState as i } from "react";
4
- const C = {
3
+ import '../../../assets/ClipboardButton.css';const C = {
5
4
  "clipboard-button": "_clipboard-button_1ihmb_1"
6
5
  }, n = 2e3, a = ({ text: o }) => {
7
6
  const [l, t] = i(!1);
package/dist/index.js CHANGED
@@ -1,20 +1,22 @@
1
- import { Button as r } from "./components/Button/Button.js";
1
+ import { Button as e } from "./components/Button/Button.js";
2
2
  import { Card as f } from "./components/Card/Card.js";
3
- import { Icon as m } from "./components/Icon/Icon.js";
4
- import { IconButton as c } from "./components/IconButton/IconButton.js";
3
+ import { Icon as x } from "./components/Icon/Icon.js";
4
+ import { IconButton as n } from "./components/IconButton/IconButton.js";
5
5
  import { InfoMessage as i } from "./components/InfoMessage/InfoMessage.js";
6
- import { SectionNotification as S } from "./components/SectionNotification/SectionNotification.js";
6
+ import { SectionNotification as s } from "./components/SectionNotification/SectionNotification.js";
7
7
  import { SelectListbox as l } from "./components/SelectListbox/SelectListbox.js";
8
8
  import { SelectProvider as I, useSelect as d } from "./components/SelectListbox/SelectProvider.js";
9
+ import { Spinner as b } from "./components/Spinner/Spinner.js";
9
10
  export {
10
- r as Button,
11
+ e as Button,
11
12
  f as Card,
12
- m as Icon,
13
- c as IconButton,
13
+ x as Icon,
14
+ n as IconButton,
14
15
  i as InfoMessage,
15
- S as SectionNotification,
16
+ s as SectionNotification,
16
17
  l as SelectListbox,
17
18
  I as SelectProvider,
19
+ b as Spinner,
18
20
  d as useSelect
19
21
  };
20
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
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.3.3",
5
+ "version": "1.4.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -42,8 +42,8 @@
42
42
  "@commitlint/cli": "^19.3.0",
43
43
  "@commitlint/config-conventional": "^19.2.2",
44
44
  "@semantic-release/git": "^10.0.1",
45
- "@semantic-release/gitlab": "^13.0.4",
46
- "@semantic-release/npm": "^12.0.0",
45
+ "@semantic-release/gitlab": "^13.1.0",
46
+ "@semantic-release/npm": "^12.0.1",
47
47
  "@storybook/addon-a11y": "^8.0.10",
48
48
  "@storybook/addon-essentials": "^8.0.10",
49
49
  "@storybook/addon-interactions": "^8.0.10",
@@ -52,11 +52,11 @@
52
52
  "@storybook/react": "^8.0.10",
53
53
  "@storybook/react-vite": "^8.0.10",
54
54
  "@storybook/test": "^8.0.10",
55
- "@types/node": "^20.12.10",
56
- "@types/react": "^18.3.1",
55
+ "@types/node": "^20.12.12",
56
+ "@types/react": "^18.3.2",
57
57
  "@types/react-dom": "^18.3.0",
58
- "@typescript-eslint/eslint-plugin": "^7.8.0",
59
- "@typescript-eslint/parser": "^7.8.0",
58
+ "@typescript-eslint/eslint-plugin": "^7.9.0",
59
+ "@typescript-eslint/parser": "^7.9.0",
60
60
  "@uva-glass/eslint-config": "^1.2.0",
61
61
  "@uva-glass/stylelint-config": "^1.1.0",
62
62
  "@vitejs/plugin-react": "^4.2.1",
@@ -66,9 +66,9 @@
66
66
  "eslint-plugin-prettier": "^5.1.3",
67
67
  "eslint-plugin-react": "^7.34.1",
68
68
  "eslint-plugin-react-hooks": "^4.6.2",
69
- "eslint-plugin-react-refresh": "^0.4.6",
69
+ "eslint-plugin-react-refresh": "^0.4.7",
70
70
  "eslint-plugin-storybook": "^0.8.0",
71
- "glob": "^10.3.12",
71
+ "glob": "^10.3.15",
72
72
  "jest": "^29.7.0",
73
73
  "jest-environment-jsdom": "^29.7.0",
74
74
  "jest-junit": "^16.0.0",
@@ -76,7 +76,7 @@
76
76
  "npm-run-all2": "^6.1.2",
77
77
  "react": "^18.3.1",
78
78
  "react-dom": "^18.3.1",
79
- "semantic-release": "^23.0.8",
79
+ "semantic-release": "^23.1.1",
80
80
  "storybook": "^8.0.10",
81
81
  "style-dictionary": "^3.9.2",
82
82
  "stylelint": "^16.5.0",
@@ -86,7 +86,7 @@
86
86
  "typescript": "^5.4.5",
87
87
  "vite": "^5.2.11",
88
88
  "vite-plugin-dts": "^3.9.1",
89
- "vite-plugin-lib-inject-css": "^2.0.1",
89
+ "vite-plugin-lib-inject-css": "^2.1.1",
90
90
  "vite-plugin-svgr": "^4.2.0",
91
91
  "vite-tsconfig-paths": "^4.3.2"
92
92
  }