@uva-glass/component-library 1.9.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.
- package/dist/assets/RadioButton.css +1 -0
- package/dist/assets/RadioButton2.css +1 -0
- package/dist/components/RadioButton/RadioButton.d.ts +9 -0
- package/dist/components/RadioButton/RadioButton.js +26 -0
- package/dist/components/RadioButton/RadioButton.js.map +1 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +5 -0
- package/dist/components/RadioButton/RadioButton.stories.js +35 -0
- package/dist/components/RadioButton/RadioButton.stories.js.map +1 -0
- package/dist/components/RadioButton/index.d.ts +1 -0
- package/dist/components/RadioButton/index.js +5 -0
- package/dist/components/RadioButton/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +13 -11
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -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}
|
|
@@ -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 @@
|
|
|
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';
|
package/dist/components/index.js
CHANGED
|
@@ -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
|
|
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 {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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
|
-
|
|
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
|
|
25
|
-
v as
|
|
26
|
-
C as
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
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 {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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
|
-
|
|
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
|
|
25
|
-
v as
|
|
26
|
-
C as
|
|
27
|
-
|
|
28
|
-
|
|
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.
|
|
5
|
+
"version": "1.10.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
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.
|
|
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",
|