@uva-glass/component-library 1.8.0 → 1.10.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.
@@ -0,0 +1 @@
1
+ .fieldset{border:0;display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0}
@@ -0,0 +1 @@
1
+ ._radio-button_1if7s_1{align-items:center;display:grid;gap:0 .5rem;grid-template-columns:auto [label] 1fr}._radio-button_1if7s_1 ._radio-button__input_1if7s_8{cursor:pointer;margin-top:0}._radio-button__label_1if7s_13{cursor:pointer;display:flex;flex-direction:column}._radio-button__description_1if7s_19{color:var(--color-scarpa-flow);grid-area:label;margin:0}._radio-button_1if7s_1 ._radio-button__label_1if7s_13{width:fit-content}._radio-button_1if7s_1 :disabled+._radio-button__label_1if7s_13{color:var(--color-scarpa-flow);cursor:unset}._radio-button--gap-large_1if7s_34{column-gap:1rem}
@@ -1,26 +1,26 @@
1
1
  import { jsx as b } from "react/jsx-runtime";
2
- import { c as m } from "../../clsx-DB4S2d7J.js";
3
- import { forwardRef as _ } from "react";
4
- import '../../assets/Button.css';const c = "_button_1gimu_3", t = {
5
- button: c,
6
- "button--blank": "_button--blank_1gimu_36",
7
- "button--primary": "_button--primary_1gimu_53",
8
- "button--secondary": "_button--secondary_1gimu_69",
9
- "button--destructive-primary": "_button--destructive-primary_1gimu_85",
10
- "button--destructive-secondary": "_button--destructive-secondary_1gimu_103",
11
- "button--wide-column": "_button--wide-column_1gimu_121"
12
- }, p = _((o, n) => {
13
- const { children: u, type: r = "button", variant: e, displayColumn: i = !1, ...s } = o;
2
+ import { c as _ } from "../../clsx-DB4S2d7J.js";
3
+ import { forwardRef as a } from "react";
4
+ import '../../assets/Button.css';const i = "_button_gc28t_3", t = {
5
+ button: i,
6
+ "button--blank": "_button--blank_gc28t_37",
7
+ "button--primary": "_button--primary_gc28t_54",
8
+ "button--secondary": "_button--secondary_gc28t_70",
9
+ "button--destructive-primary": "_button--destructive-primary_gc28t_86",
10
+ "button--destructive-secondary": "_button--destructive-secondary_gc28t_104",
11
+ "button--wide-column": "_button--wide-column_gc28t_122"
12
+ }, p = a((o, n) => {
13
+ const { children: r, type: u = "button", variant: c, displayColumn: e = !1, ...s } = o;
14
14
  return /* @__PURE__ */ b(
15
15
  "button",
16
16
  {
17
17
  ...s,
18
- type: r,
18
+ type: u,
19
19
  ref: n,
20
- className: m(t.button, t[`button--${e}`], {
21
- [t["button--wide-column"]]: i
20
+ className: _(t.button, t[`button--${c}`], {
21
+ [t["button--wide-column"]]: e
22
22
  }),
23
- children: u
23
+ children: r
24
24
  }
25
25
  );
26
26
  });
@@ -0,0 +1,9 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+
3
+ export interface RadioButtonProps extends InputHTMLAttributes<HTMLInputElement> {
4
+ id: string;
5
+ label: string;
6
+ description?: string;
7
+ gap?: 'normal' | 'large';
8
+ }
9
+ export declare const RadioButton: ({ id, label, gap, description, ...restProps }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
+ import { c as d } from "../../clsx-DB4S2d7J.js";
3
+ import '../../assets/RadioButton2.css';const t = {
4
+ "radio-button": "_radio-button_1if7s_1",
5
+ "radio-button__input": "_radio-button__input_1if7s_8",
6
+ "radio-button__label": "_radio-button__label_1if7s_13",
7
+ "radio-button__description": "_radio-button__description_1if7s_19",
8
+ "radio-button--gap-large": "_radio-button--gap-large_1if7s_34"
9
+ }, l = ({ id: o, label: r, gap: _ = "normal", description: i, ...n }) => /* @__PURE__ */ s("div", { className: d(t["radio-button"], t[`radio-button--gap-${_}`]), children: [
10
+ /* @__PURE__ */ a(
11
+ "input",
12
+ {
13
+ className: t["radio-button__input"],
14
+ ...n,
15
+ id: o,
16
+ type: "radio",
17
+ "aria-describedby": i ? `${o}-description` : void 0
18
+ }
19
+ ),
20
+ /* @__PURE__ */ a("label", { className: t["radio-button__label"], htmlFor: o, children: r }),
21
+ i && /* @__PURE__ */ a("p", { id: `${o}-description`, className: t["radio-button__description"], children: i })
22
+ ] });
23
+ export {
24
+ l as RadioButton
25
+ };
26
+ //# sourceMappingURL=RadioButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.js","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes } from 'react';\n\nimport styles from './RadioButton.module.css';\n\nexport interface RadioButtonProps extends InputHTMLAttributes<HTMLInputElement> {\n id: string;\n label: string;\n description?: string;\n gap?: 'normal' | 'large';\n}\n\nexport const RadioButton = ({ id, label, gap = 'normal', description, ...restProps }: RadioButtonProps) => (\n <div className={clsx(styles['radio-button'], styles[`radio-button--gap-${gap}`])}>\n <input\n className={styles['radio-button__input']}\n {...restProps}\n id={id}\n type=\"radio\"\n aria-describedby={description ? `${id}-description` : undefined}\n />\n <label className={styles['radio-button__label']} htmlFor={id}>\n {label}\n </label>\n {description && (\n <p id={`${id}-description`} className={styles['radio-button__description']}>\n {description}\n </p>\n )}\n </div>\n);\n"],"names":["RadioButton","id","label","gap","description","restProps","clsx","styles","jsx"],"mappings":";;;;;;;;GAaaA,IAAc,CAAC,EAAE,IAAAC,GAAI,OAAAC,GAAO,KAAAC,IAAM,UAAU,aAAAC,GAAa,GAAGC,0BACtE,OAAI,EAAA,WAAWC,EAAKC,EAAO,cAAc,GAAGA,EAAO,qBAAqBJ,CAAG,EAAE,CAAC,GAC7E,UAAA;AAAA,EAAA,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD,EAAO,qBAAqB;AAAA,MACtC,GAAGF;AAAA,MACJ,IAAAJ;AAAA,MACA,MAAK;AAAA,MACL,oBAAkBG,IAAc,GAAGH,CAAE,iBAAiB;AAAA,IAAA;AAAA,EACxD;AAAA,EACA,gBAAAO,EAAC,WAAM,WAAWD,EAAO,qBAAqB,GAAG,SAASN,GACvD,UACHC,GAAA;AAAA,EACCE,KACE,gBAAAI,EAAA,KAAA,EAAE,IAAI,GAAGP,CAAE,gBAAgB,WAAWM,EAAO,2BAA2B,GACtE,UACHH,EAAA,CAAA;AAAA,EAEJ,CAAA;"}
@@ -0,0 +1,5 @@
1
+ import { RadioButtonProps } from './RadioButton';
2
+
3
+ declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, RadioButtonProps>;
4
+ export default _default;
5
+ export declare const RadioButtonExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RadioButtonProps>;
@@ -0,0 +1,35 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { RadioButton as t } from "./RadioButton.js";
3
+ import '../../assets/RadioButton.css';const d = {
4
+ title: "Atoms/RadioButton",
5
+ component: t,
6
+ argTypes: {
7
+ id: {
8
+ control: "text"
9
+ },
10
+ label: {
11
+ control: "text"
12
+ },
13
+ description: {
14
+ control: "text"
15
+ },
16
+ disabled: {
17
+ control: "boolean"
18
+ },
19
+ gap: {
20
+ control: "radio"
21
+ }
22
+ }
23
+ }, l = (e) => /* @__PURE__ */ o("fieldset", { className: "fieldset", children: /* @__PURE__ */ o(t, { ...e }) }), a = l.bind({});
24
+ a.args = {
25
+ gap: "normal",
26
+ disabled: !1,
27
+ label: "Sample label",
28
+ description: "Sample description",
29
+ id: "de501f21"
30
+ };
31
+ export {
32
+ a as RadioButtonExample,
33
+ d as default
34
+ };
35
+ //# sourceMappingURL=RadioButton.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.stories.js","sources":["../../../src/components/RadioButton/RadioButton.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { RadioButtonProps } from './RadioButton';\n\nimport { RadioButton } from './RadioButton';\nimport './RadioButton.stories.css';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/RadioButton',\n component: RadioButton,\n argTypes: {\n id: {\n control: 'text',\n },\n label: {\n control: 'text',\n },\n description: {\n control: 'text',\n },\n disabled: {\n control: 'boolean',\n },\n gap: {\n control: 'radio',\n },\n },\n} as Meta<RadioButtonProps>;\n\nconst Template: StoryFn<RadioButtonProps> = (args) => (\n <fieldset className=\"fieldset\">\n <RadioButton {...args} />\n </fieldset>\n);\n\nexport const RadioButtonExample = Template.bind({});\nRadioButtonExample.args = {\n gap: 'normal',\n disabled: false,\n label: 'Sample label',\n description: 'Sample description',\n id: 'de501f21',\n};\n"],"names":["RadioButton_stories","RadioButton","Template","args","jsx","RadioButtonExample"],"mappings":";;AAOA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IACX;AAAA,IACA,KAAK;AAAA,MACH,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAAsC,CAACC,MAC1C,gBAAAC,EAAA,YAAA,EAAS,WAAU,YAClB,UAAC,gBAAAA,EAAAH,GAAA,EAAa,GAAGE,EAAM,CAAA,EACzB,CAAA,GAGWE,IAAqBH,EAAS,KAAK,EAAE;AAClDG,EAAmB,OAAO;AAAA,EACxB,KAAK;AAAA,EACL,UAAU;AAAA,EACV,OAAO;AAAA,EACP,aAAa;AAAA,EACb,IAAI;AACN;"}
@@ -0,0 +1 @@
1
+ export * from './RadioButton';
@@ -0,0 +1,5 @@
1
+ import { RadioButton as r } from "./RadioButton.js";
2
+ export {
3
+ r as RadioButton
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -7,6 +7,7 @@ export * from './InfoMessage';
7
7
  export * from './Input';
8
8
  export * from './InputField';
9
9
  export * from './Label';
10
+ export * from './RadioButton';
10
11
  export * from './SectionNotification';
11
12
  export * from './SelectListbox';
12
13
  export * from './SelectListbox/SelectProvider';
@@ -2,29 +2,31 @@ import { AppStatusBar as t } from "./AppStatusBar/AppStatusBar.js";
2
2
  import { Button as p } from "./Button/Button.js";
3
3
  import { Card as x } from "./Card/Card.js";
4
4
  import { Icon as n } from "./Icon/Icon.js";
5
- import { IconButton as c } from "./IconButton/IconButton.js";
5
+ import { IconButton as a } from "./IconButton/IconButton.js";
6
6
  import { InfoMessage as u } from "./InfoMessage/InfoMessage.js";
7
7
  import { Input as l } from "./Input/Input.js";
8
8
  import { InputField as I } from "./InputField/InputField.js";
9
9
  import { Label as B } from "./Label/Label.js";
10
- import { SectionNotification as L } from "./SectionNotification/SectionNotification.js";
11
- import { SelectListbox as v } from "./SelectListbox/SelectListbox.js";
12
- import { SelectProvider as C, useSelect as F } from "./SelectListbox/SelectProvider.js";
13
- import { Spinner as N } from "./Spinner/Spinner.js";
10
+ import { RadioButton as L } from "./RadioButton/RadioButton.js";
11
+ import { SectionNotification as v } from "./SectionNotification/SectionNotification.js";
12
+ import { SelectListbox as C } from "./SelectListbox/SelectListbox.js";
13
+ import { SelectProvider as M, useSelect as N } from "./SelectListbox/SelectProvider.js";
14
+ import { Spinner as R } from "./Spinner/Spinner.js";
14
15
  export {
15
16
  t as AppStatusBar,
16
17
  p as Button,
17
18
  x as Card,
18
19
  n as Icon,
19
- c as IconButton,
20
+ a as IconButton,
20
21
  u as InfoMessage,
21
22
  l as Input,
22
23
  I as InputField,
23
24
  B as Label,
24
- L as SectionNotification,
25
- v as SelectListbox,
26
- C as SelectProvider,
27
- N as Spinner,
28
- F as useSelect
25
+ L as RadioButton,
26
+ v as SectionNotification,
27
+ C as SelectListbox,
28
+ M as SelectProvider,
29
+ R as Spinner,
30
+ N as useSelect
29
31
  };
30
32
  //# 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":";;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -2,29 +2,31 @@ import { AppStatusBar as t } from "./components/AppStatusBar/AppStatusBar.js";
2
2
  import { Button as p } from "./components/Button/Button.js";
3
3
  import { Card as x } from "./components/Card/Card.js";
4
4
  import { Icon as n } from "./components/Icon/Icon.js";
5
- import { IconButton as c } from "./components/IconButton/IconButton.js";
5
+ import { IconButton as a } from "./components/IconButton/IconButton.js";
6
6
  import { InfoMessage as u } from "./components/InfoMessage/InfoMessage.js";
7
7
  import { Input as l } from "./components/Input/Input.js";
8
8
  import { InputField as I } from "./components/InputField/InputField.js";
9
9
  import { Label as B } from "./components/Label/Label.js";
10
- import { SectionNotification as L } from "./components/SectionNotification/SectionNotification.js";
11
- import { SelectListbox as v } from "./components/SelectListbox/SelectListbox.js";
12
- import { SelectProvider as C, useSelect as F } from "./components/SelectListbox/SelectProvider.js";
13
- import { Spinner as N } from "./components/Spinner/Spinner.js";
10
+ import { RadioButton as L } from "./components/RadioButton/RadioButton.js";
11
+ import { SectionNotification as v } from "./components/SectionNotification/SectionNotification.js";
12
+ import { SelectListbox as C } from "./components/SelectListbox/SelectListbox.js";
13
+ import { SelectProvider as M, useSelect as N } from "./components/SelectListbox/SelectProvider.js";
14
+ import { Spinner as R } from "./components/Spinner/Spinner.js";
14
15
  export {
15
16
  t as AppStatusBar,
16
17
  p as Button,
17
18
  x as Card,
18
19
  n as Icon,
19
- c as IconButton,
20
+ a as IconButton,
20
21
  u as InfoMessage,
21
22
  l as Input,
22
23
  I as InputField,
23
24
  B as Label,
24
- L as SectionNotification,
25
- v as SelectListbox,
26
- C as SelectProvider,
27
- N as Spinner,
28
- F as useSelect
25
+ L as RadioButton,
26
+ v as SectionNotification,
27
+ C as SelectListbox,
28
+ M as SelectProvider,
29
+ R as Spinner,
30
+ N as useSelect
29
31
  };
30
32
  //# 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.8.0",
5
+ "version": "1.10.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -44,22 +44,22 @@
44
44
  "@semantic-release/git": "^10.0.1",
45
45
  "@semantic-release/gitlab": "^13.1.0",
46
46
  "@semantic-release/npm": "^12.0.1",
47
- "@storybook/addon-a11y": "^8.1.1",
48
- "@storybook/addon-essentials": "^8.1.1",
49
- "@storybook/addon-interactions": "^8.1.1",
50
- "@storybook/addon-links": "^8.1.1",
51
- "@storybook/blocks": "^8.1.1",
52
- "@storybook/react": "^8.1.1",
53
- "@storybook/react-vite": "^8.1.1",
54
- "@storybook/test": "^8.1.1",
47
+ "@storybook/addon-a11y": "^8.1.2",
48
+ "@storybook/addon-essentials": "^8.1.2",
49
+ "@storybook/addon-interactions": "^8.1.2",
50
+ "@storybook/addon-links": "^8.1.2",
51
+ "@storybook/blocks": "^8.1.2",
52
+ "@storybook/react": "^8.1.2",
53
+ "@storybook/react-vite": "^8.1.2",
54
+ "@storybook/test": "^8.1.2",
55
55
  "@types/node": "^20.12.12",
56
56
  "@types/react": "^18.3.2",
57
57
  "@types/react-dom": "^18.3.0",
58
- "@typescript-eslint/eslint-plugin": "^7.9.0",
59
- "@typescript-eslint/parser": "^7.9.0",
58
+ "@typescript-eslint/eslint-plugin": "^7.10.0",
59
+ "@typescript-eslint/parser": "^7.10.0",
60
60
  "@uva-glass/eslint-config": "^1.2.0",
61
61
  "@uva-glass/stylelint-config": "^1.1.0",
62
- "@vitejs/plugin-react": "^4.2.1",
62
+ "@vitejs/plugin-react": "^4.3.0",
63
63
  "clsx": "^2.1.1",
64
64
  "eslint": "^8.57.0",
65
65
  "eslint-config-prettier": "^9.1.0",
@@ -68,7 +68,7 @@
68
68
  "eslint-plugin-react-hooks": "^4.6.2",
69
69
  "eslint-plugin-react-refresh": "^0.4.7",
70
70
  "eslint-plugin-storybook": "^0.8.0",
71
- "glob": "^10.3.15",
71
+ "glob": "^10.3.16",
72
72
  "jest": "^29.7.0",
73
73
  "jest-environment-jsdom": "^29.7.0",
74
74
  "jest-junit": "^16.0.0",
@@ -77,7 +77,7 @@
77
77
  "react": "^18.3.1",
78
78
  "react-dom": "^18.3.1",
79
79
  "semantic-release": "^23.1.1",
80
- "storybook": "^8.1.1",
80
+ "storybook": "^8.1.2",
81
81
  "style-dictionary": "^3.9.2",
82
82
  "stylelint": "^16.5.0",
83
83
  "stylelint-config-recommended": "^14.0.0",