@uva-glass/component-library 1.50.1 → 1.52.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/{MultiSelect-Ckf3uGw5.js → MultiSelect-D1FnMER4.js} +3 -2
- package/dist/{MultiSelect-Ckf3uGw5.js.map → MultiSelect-D1FnMER4.js.map} +1 -1
- package/dist/assets/HorizontalList.css +1 -1
- package/dist/components/ActionList/ActionList.js +5 -3
- package/dist/components/ActionList/ActionList.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
- package/dist/components/{Button → Buttons}/Button.d.ts +1 -1
- package/dist/components/Buttons/Button.js +22 -0
- package/dist/components/Buttons/Button.js.map +1 -0
- package/dist/components/Buttons/Button.stories.js.map +1 -0
- package/dist/components/Buttons/LinkButton.d.ts +11 -0
- package/dist/components/Buttons/LinkButton.js +12 -0
- package/dist/components/Buttons/LinkButton.js.map +1 -0
- package/dist/components/Buttons/LinkButton.stories.d.ts +6 -0
- package/dist/components/Buttons/LinkButton.stories.js +51 -0
- package/dist/components/Buttons/LinkButton.stories.js.map +1 -0
- package/dist/components/Buttons/MenuButton.js.map +1 -0
- package/dist/components/Buttons/MenuButton.stories.js.map +1 -0
- package/dist/components/Buttons/index.d.ts +3 -0
- package/dist/components/Buttons/index.js +9 -0
- package/dist/components/{Button → Buttons}/index.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +5 -4
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +19 -17
- package/dist/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.d.ts +3 -2
- package/dist/components/HorizontalList/HorizontalList.js +10 -9
- package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.stories.d.ts +1 -0
- package/dist/components/HorizontalList/HorizontalList.stories.js +35 -14
- package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +5 -4
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +5 -3
- package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +4 -3
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +5 -4
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +82 -80
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +82 -80
- package/dist/index.js.map +1 -1
- package/dist/types/UserInterface.d.ts +1 -1
- package/package.json +21 -21
- package/dist/components/Button/Button.js +0 -23
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/Button.stories.js.map +0 -1
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Button/index.js +0 -5
- package/dist/components/MenuButton/MenuButton.js.map +0 -1
- package/dist/components/MenuButton/MenuButton.stories.js.map +0 -1
- package/dist/components/MenuButton/index.d.ts +0 -1
- package/dist/components/MenuButton/index.js +0 -5
- package/dist/components/MenuButton/index.js.map +0 -1
- /package/dist/components/{Button → Buttons}/Button.stories.d.ts +0 -0
- /package/dist/components/{Button → Buttons}/Button.stories.js +0 -0
- /package/dist/components/{MenuButton → Buttons}/MenuButton.d.ts +0 -0
- /package/dist/components/{MenuButton → Buttons}/MenuButton.js +0 -0
- /package/dist/components/{MenuButton → Buttons}/MenuButton.stories.d.ts +0 -0
- /package/dist/components/{MenuButton → Buttons}/MenuButton.stories.js +0 -0
package/dist/index.js
CHANGED
|
@@ -2,91 +2,93 @@ import { Accordion as t } from "./components/Accordion/Accordion.js";
|
|
|
2
2
|
import { ActionList as p } from "./components/ActionList/ActionList.js";
|
|
3
3
|
import { AppStatusBar as m } from "./components/AppStatusBar/AppStatusBar.js";
|
|
4
4
|
import { Attention as i } from "./components/Attention/Attention.js";
|
|
5
|
-
import { Backdrop as
|
|
6
|
-
import { Button as c } from "./components/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
5
|
+
import { Backdrop as a } from "./components/Backdrop/Backdrop.js";
|
|
6
|
+
import { Button as c } from "./components/Buttons/Button.js";
|
|
7
|
+
import { LinkButton as d } from "./components/Buttons/LinkButton.js";
|
|
8
|
+
import { MenuButton as B } from "./components/Buttons/MenuButton.js";
|
|
9
|
+
import { ButtonGroup as k } from "./components/ButtonGroup/ButtonGroup.js";
|
|
10
|
+
import { Card as C } from "./components/Card/Card.js";
|
|
11
|
+
import { Checkbox as M } from "./components/Checkbox/Checkbox.js";
|
|
12
|
+
import { CheckboxButton as D } from "./components/CheckboxButton/CheckboxButton.js";
|
|
13
|
+
import { CheckboxButtonBar as P } from "./components/CheckboxButtonBar/CheckboxButtonBar.js";
|
|
14
|
+
import { CheckboxTree as A } from "./components/CheckboxTree/CheckboxTree.js";
|
|
15
|
+
import { Drawer as g } from "./components/Drawer/Drawer.js";
|
|
16
|
+
import { EmptyStateDataDisplay as v } from "./components/EmptyStateDataDisplay/EmptyStateDataDisplay.js";
|
|
17
|
+
import { FeedbackBox as E } from "./components/FeedbackBox/FeedbackBox.js";
|
|
18
|
+
import { FieldHint as H } from "./components/FieldHint/FieldHint.js";
|
|
19
|
+
import { Fieldset as z } from "./components/Fieldset/Fieldset.js";
|
|
20
|
+
import { FormField as O } from "./components/FormField/FormField.js";
|
|
21
|
+
import { GridRow as q } from "./components/GridRow/GridRow.js";
|
|
22
|
+
import { HorizontalList as K } from "./components/HorizontalList/HorizontalList.js";
|
|
23
|
+
import { Icon as U } from "./components/Icon/Icon.js";
|
|
24
|
+
import { IconButton as W } from "./components/IconButton/IconButton.js";
|
|
25
|
+
import { InfoMessage as Y } from "./components/InfoMessage/InfoMessage.js";
|
|
26
|
+
import { Input as _ } from "./components/Input/Input.js";
|
|
27
|
+
import { InputField as oo } from "./components/InputField/InputField.js";
|
|
28
|
+
import { Label as to } from "./components/Label/Label.js";
|
|
29
|
+
import { MenuLink as po } from "./components/MenuLink/MenuLink.js";
|
|
30
|
+
import { MetaDataList as mo } from "./components/MetaDataList/MetaDataList.js";
|
|
31
|
+
import { ModalDialog as io } from "./components/ModalDialog/ModalDialog.js";
|
|
32
|
+
import { M as ao } from "./MultiSelect-D1FnMER4.js";
|
|
33
|
+
import { OverlayCloseButton as co } from "./components/OverlayCloseButton/OverlayCloseButton.js";
|
|
34
|
+
import { Periods as so } from "./components/Periods/Periods.js";
|
|
35
|
+
import { PeriodSelector as So } from "./components/PeriodSelector/PeriodSelector.js";
|
|
36
|
+
import { ProgrammeCard as bo } from "./components/ProgrammeCard/ProgrammeCard.js";
|
|
37
|
+
import { RadioButton as Lo } from "./components/RadioButton/RadioButton.js";
|
|
38
|
+
import { Repeater as Fo } from "./components/Repeater/Repeater.js";
|
|
39
|
+
import { RteEditor as Io } from "./components/RteEditor/RteEditor.js";
|
|
40
|
+
import { SectionNotification as ho } from "./components/SectionNotification/SectionNotification.js";
|
|
41
|
+
import { SelectListbox as Ro } from "./components/SelectListbox/SelectListbox.js";
|
|
42
|
+
import { SelectProvider as yo, useSelect as vo } from "./components/SelectListbox/SelectProvider.js";
|
|
43
|
+
import { Spinner as Eo } from "./components/Spinner/Spinner.js";
|
|
44
|
+
import { StatusPill as Ho } from "./components/StatusPill/StatusPill.js";
|
|
45
|
+
import { Tooltip as zo } from "./components/Tooltip/Tooltip.js";
|
|
45
46
|
export {
|
|
46
47
|
t as Accordion,
|
|
47
48
|
p as ActionList,
|
|
48
49
|
m as AppStatusBar,
|
|
49
50
|
i as Attention,
|
|
50
|
-
|
|
51
|
+
a as Backdrop,
|
|
51
52
|
c as Button,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
po as
|
|
75
|
-
mo as
|
|
76
|
-
io as
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Io as
|
|
85
|
-
ho as
|
|
86
|
-
Ro as
|
|
87
|
-
|
|
88
|
-
Eo as
|
|
89
|
-
Ho as
|
|
90
|
-
|
|
53
|
+
k as ButtonGroup,
|
|
54
|
+
C as Card,
|
|
55
|
+
M as Checkbox,
|
|
56
|
+
D as CheckboxButton,
|
|
57
|
+
P as CheckboxButtonBar,
|
|
58
|
+
A as CheckboxTree,
|
|
59
|
+
g as Drawer,
|
|
60
|
+
v as EmptyStateDataDisplay,
|
|
61
|
+
E as FeedbackBox,
|
|
62
|
+
H as FieldHint,
|
|
63
|
+
z as Fieldset,
|
|
64
|
+
O as FormField,
|
|
65
|
+
q as GridRow,
|
|
66
|
+
K as HorizontalList,
|
|
67
|
+
U as Icon,
|
|
68
|
+
W as IconButton,
|
|
69
|
+
Y as InfoMessage,
|
|
70
|
+
_ as Input,
|
|
71
|
+
oo as InputField,
|
|
72
|
+
to as Label,
|
|
73
|
+
d as LinkButton,
|
|
74
|
+
B as MenuButton,
|
|
75
|
+
po as MenuLink,
|
|
76
|
+
mo as MetaDataList,
|
|
77
|
+
io as ModalDialog,
|
|
78
|
+
ao as MultiSelect,
|
|
79
|
+
co as OverlayCloseButton,
|
|
80
|
+
So as PeriodSelector,
|
|
81
|
+
so as Periods,
|
|
82
|
+
bo as ProgrammeCard,
|
|
83
|
+
Lo as RadioButton,
|
|
84
|
+
Fo as Repeater,
|
|
85
|
+
Io as RteEditor,
|
|
86
|
+
ho as SectionNotification,
|
|
87
|
+
Ro as SelectListbox,
|
|
88
|
+
yo as SelectProvider,
|
|
89
|
+
Eo as Spinner,
|
|
90
|
+
Ho as StatusPill,
|
|
91
|
+
zo as Tooltip,
|
|
92
|
+
vo as useSelect
|
|
91
93
|
};
|
|
92
94
|
//# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type UIButtonVariant = 'primary' | 'secondary' | 'destructive' | 'blank' | 'blank-icon';
|
|
1
|
+
export type UIButtonVariant = 'primary' | 'secondary' | 'destructive-primary' | 'destructive-secondary' | 'blank' | 'blank-icon';
|
|
2
2
|
export type UISelectVariant = 'small' | 'regular';
|
|
3
3
|
export type UITooltipSize = 'small' | 'medium' | 'large';
|
|
4
4
|
export type UIStatus = 'information' | 'danger' | 'warning' | 'success' | 'default';
|
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.52.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -41,33 +41,33 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@commitlint/cli": "^19.5.0",
|
|
43
43
|
"@commitlint/config-conventional": "^19.5.0",
|
|
44
|
-
"@react-aria/button": "^3.
|
|
45
|
-
"@react-aria/dialog": "^3.5.
|
|
46
|
-
"@react-aria/overlays": "^3.23.
|
|
47
|
-
"@react-types/dialog": "^3.5.
|
|
44
|
+
"@react-aria/button": "^3.10.0",
|
|
45
|
+
"@react-aria/dialog": "^3.5.18",
|
|
46
|
+
"@react-aria/overlays": "^3.23.3",
|
|
47
|
+
"@react-types/dialog": "^3.5.13",
|
|
48
48
|
"@semantic-release/git": "^10.0.1",
|
|
49
49
|
"@semantic-release/gitlab": "^13.2.1",
|
|
50
50
|
"@semantic-release/npm": "^12.0.1",
|
|
51
|
-
"@storybook/addon-a11y": "^8.3.
|
|
52
|
-
"@storybook/addon-essentials": "^8.3.
|
|
53
|
-
"@storybook/addon-links": "^8.3.
|
|
54
|
-
"@storybook/blocks": "^8.3.
|
|
55
|
-
"@storybook/manager-api": "^8.3.
|
|
56
|
-
"@storybook/preview-api": "^8.3.
|
|
57
|
-
"@storybook/react": "^8.3.
|
|
58
|
-
"@storybook/react-vite": "^8.3.
|
|
59
|
-
"@storybook/test": "^8.3.
|
|
60
|
-
"@types/node": "^20.16.
|
|
61
|
-
"@types/react": "^18.3.
|
|
51
|
+
"@storybook/addon-a11y": "^8.3.4",
|
|
52
|
+
"@storybook/addon-essentials": "^8.3.4",
|
|
53
|
+
"@storybook/addon-links": "^8.3.4",
|
|
54
|
+
"@storybook/blocks": "^8.3.4",
|
|
55
|
+
"@storybook/manager-api": "^8.3.4",
|
|
56
|
+
"@storybook/preview-api": "^8.3.4",
|
|
57
|
+
"@storybook/react": "^8.3.4",
|
|
58
|
+
"@storybook/react-vite": "^8.3.4",
|
|
59
|
+
"@storybook/test": "^8.3.4",
|
|
60
|
+
"@types/node": "^20.16.10",
|
|
61
|
+
"@types/react": "^18.3.10",
|
|
62
62
|
"@types/react-dom": "^18.3.0",
|
|
63
63
|
"@uva-glass/eslint-config": "^1.3.1",
|
|
64
64
|
"@uva-glass/stylelint-config": "^1.1.0",
|
|
65
|
-
"@vitejs/plugin-react": "^4.3.
|
|
65
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
66
66
|
"clsx": "^2.1.1",
|
|
67
67
|
"eslint": "^8.57.1",
|
|
68
68
|
"eslint-config-prettier": "^9.1.0",
|
|
69
69
|
"eslint-plugin-prettier": "^5.2.1",
|
|
70
|
-
"eslint-plugin-react": "^7.37.
|
|
70
|
+
"eslint-plugin-react": "^7.37.1",
|
|
71
71
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
72
72
|
"eslint-plugin-react-refresh": "^0.4.12",
|
|
73
73
|
"eslint-plugin-storybook": "^0.9.0",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"react": "^18.3.1",
|
|
81
81
|
"react-dom": "^18.3.1",
|
|
82
82
|
"react-router-dom": "^6.26.2",
|
|
83
|
-
"semantic-release": "^24.1.
|
|
84
|
-
"storybook": "^8.3.
|
|
83
|
+
"semantic-release": "^24.1.2",
|
|
84
|
+
"storybook": "^8.3.4",
|
|
85
85
|
"style-dictionary": "^4.1.2",
|
|
86
86
|
"stylelint": "^16.9.0",
|
|
87
87
|
"stylelint-config-recommended": "^14.0.1",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"stylelint-order": "^6.0.4",
|
|
90
90
|
"typescript": "^5.6.2",
|
|
91
91
|
"vite": "^5.4.8",
|
|
92
|
-
"vite-plugin-dts": "^4.2.
|
|
92
|
+
"vite-plugin-dts": "^4.2.3",
|
|
93
93
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
94
94
|
"vite-plugin-static-copy": "^1.0.6",
|
|
95
95
|
"vite-plugin-svgr": "^4.2.0",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { forwardRef as i } from "react";
|
|
4
|
-
import { s as t } from "../../Button.module-Gr3KvBvb.js";
|
|
5
|
-
const d = i((o, r) => {
|
|
6
|
-
const { children: s, type: n = "button", variant: e, displayColumn: m = !1, ...a } = o;
|
|
7
|
-
return /* @__PURE__ */ u(
|
|
8
|
-
"button",
|
|
9
|
-
{
|
|
10
|
-
...a,
|
|
11
|
-
type: n,
|
|
12
|
-
ref: r,
|
|
13
|
-
className: f(t.button, t[`button--${e}`], {
|
|
14
|
-
[t["button--wide-column"]]: m
|
|
15
|
-
}),
|
|
16
|
-
children: s
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
export {
|
|
21
|
-
d as Button
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 /** The variant of the button. */\n variant: UIButtonVariant;\n /** The element to show inside the button. */\n children: ReactNode;\n /** Renders the button as a flex column. */\n displayColumn?: boolean;\n}\n\n/** Represents a component for a button. */\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":";;;;AAmBO,MAAMA,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;"}
|
|
@@ -1 +0,0 @@
|
|
|
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\nconst codeString = '<Button variant={variant} onClick={onClictFunction}>{children}</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 parameters: {\n inspectComponent: Button,\n codeString: codeString,\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":["codeString","Button_stories","Button","Template","args","jsx","defaultArgs","fn","ButtonExample","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IAAa,2EAGJC,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;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,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 +0,0 @@
|
|
|
1
|
-
export * from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.js","sources":["../../../src/components/MenuButton/MenuButton.tsx"],"sourcesContent":["import { useButton } from '@react-aria/button';\nimport { clsx } from 'clsx';\n\nimport type { AriaButtonProps } from '@react-aria/button';\nimport type { IconProps } from 'components/Icon';\nimport type { MouseEvent, RefObject } from 'react';\nimport type { UIButtonVariant } from 'types/UserInterface';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/Button/Button.module.css';\n\nexport interface MenuButtonProps extends AriaButtonProps<'button'> {\n buttonRef: RefObject<HTMLButtonElement>;\n /** The variant of the button. */\n variant: UIButtonVariant;\n /** The icon to show. */\n iconName?: IconProps['name'];\n /** The callback function that is invoked when the button is clicked. */\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n}\n\n/** Represents a button that is used to open a menu. */\nexport function MenuButton({ buttonRef, variant, iconName, children, ...restProps }: MenuButtonProps) {\n const { buttonProps } = useButton(restProps, buttonRef);\n\n return (\n <button {...buttonProps} ref={buttonRef} className={clsx(styles['button'], styles[`button--${variant}`])}>\n {children}\n {iconName && <Icon name={iconName} />}\n </button>\n );\n}\n"],"names":["MenuButton","buttonRef","variant","iconName","children","restProps","buttonProps","useButton","clsx","styles","jsx","Icon"],"mappings":";;;;;AAsBgB,SAAAA,EAAW,EAAE,WAAAC,GAAW,SAAAC,GAAS,UAAAC,GAAU,UAAAC,GAAU,GAAGC,KAA8B;AACpG,QAAM,EAAE,aAAAC,EAAgB,IAAAC,EAAUF,GAAWJ,CAAS;AAEtD,2BACG,UAAQ,EAAA,GAAGK,GAAa,KAAKL,GAAW,WAAWO,EAAKC,EAAO,QAAWA,EAAO,WAAWP,CAAO,EAAE,CAAC,GACpG,UAAA;AAAA,IAAAE;AAAA,IACAD,KAAY,gBAAAO,EAACC,GAAK,EAAA,MAAMR,EAAU,CAAA;AAAA,EACrC,EAAA,CAAA;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.stories.js","sources":["../../../src/components/MenuButton/MenuButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MenuButtonProps } from './MenuButton';\n\nimport { MenuButton } from './MenuButton';\n\nconst codeString = `\n// Has all LabelHTMLAttributes props available except \"className\" and \"style\" \n <MenuButton variant={variant} onClick={onClickFunction} onKeyDown={onKeyDown} onKeyUp={onKeyUp} buttonRef={buttonRef}>{children}</MenuButton>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/MenuButton',\n component: MenuButton,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank', 'blank-icon'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: MenuButton,\n codeString: codeString,\n },\n} as Meta<MenuButtonProps>;\n\nconst Template: StoryFn<MenuButtonProps> = (args) => <MenuButton {...args} />;\n\nconst defaultArgs: Partial<MenuButtonProps> = {\n variant: 'primary',\n onClick: fn(),\n};\n\nexport const MenuButtonExample = Template.bind({});\nMenuButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithIconChildren = Template.bind({});\nWithIconChildren.args = {\n ...defaultArgs,\n iconName: 'EllipsisVertical',\n};\n\nWithIconChildren.argTypes = {\n ...WithIconChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\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};\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":["codeString","MenuButton_stories","MenuButton","Template","args","jsx","defaultArgs","fn","MenuButtonExample","WithIconChildren","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,SAAS,YAAY;AAAA,MACvG,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAqC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAY,GAAGE,EAAM,CAAA,GAErEE,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,SAASC,EAAG;AACd,GAEaC,IAAoBL,EAAS,KAAK,EAAE;AACjDK,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAmBN,EAAS,KAAK,EAAE;AAChDM,EAAiB,OAAO;AAAA,EACtB,GAAGH;AAAA,EACH,UAAU;AACZ;AAEAG,EAAiB,WAAW;AAAA,EAC1B,GAAGA,EAAiB;AAAA,EACpB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;AAEO,MAAMC,IAAuBP,EAAS,KAAK,EAAE;AACpDO,EAAqB,OAAO;AAAA,EAC1B,GAAGJ;AAAA,EACH,UAEI,gBAAAK,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAP,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AAEAK,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MenuButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|