@worknice/whiteboard 0.23.3 → 0.25.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 (45) hide show
  1. package/dist/controls/Action.stories.d.ts +52 -0
  2. package/dist/controls/Action.stories.js +93 -0
  3. package/dist/controls/Button.stories.d.ts +2 -16
  4. package/dist/controls/Button.stories.js +5 -28
  5. package/dist/controls/ButtonCard.stories.d.ts +31 -0
  6. package/dist/controls/ButtonCard.stories.js +77 -0
  7. package/dist/controls/ButtonLink.d.ts +6 -1
  8. package/dist/controls/ButtonLink.js +1 -1
  9. package/dist/controls/ButtonLink.stories.d.ts +46 -0
  10. package/dist/controls/ButtonLink.stories.js +72 -0
  11. package/dist/controls/Disclosure.d.ts +4 -0
  12. package/dist/controls/Disclosure.stories.d.ts +53 -0
  13. package/dist/controls/Disclosure.stories.js +132 -0
  14. package/dist/controls/Link.d.ts +5 -0
  15. package/dist/controls/Link.stories.d.ts +38 -0
  16. package/dist/controls/Link.stories.js +34 -0
  17. package/dist/controls/LinkCard.stories.d.ts +23 -0
  18. package/dist/controls/LinkCard.stories.js +25 -0
  19. package/dist/controls/MenuButton.d.ts +2 -0
  20. package/dist/controls/MenuButton.js +2 -1
  21. package/dist/controls/MenuButton.stories.d.ts +71 -0
  22. package/dist/controls/MenuButton.stories.js +275 -0
  23. package/dist/controls/PageTabSet.d.ts +6 -2
  24. package/dist/controls/PageTabSet.js +2 -2
  25. package/dist/controls/PageTabSet.stories.d.ts +49 -0
  26. package/dist/controls/PageTabSet.stories.js +106 -0
  27. package/dist/controls/Sortable.d.ts +8 -4
  28. package/dist/controls/Sortable.stories.d.ts +32 -0
  29. package/dist/controls/Sortable.stories.js +106 -0
  30. package/dist/controls/SortableItem.d.ts +1 -0
  31. package/dist/controls/TabSet.stories.d.ts +43 -0
  32. package/dist/controls/TabSet.stories.js +109 -0
  33. package/dist/controls/TabSetLink.d.ts +3 -0
  34. package/dist/controls/TabSetLink.stories.d.ts +44 -0
  35. package/dist/controls/TabSetLink.stories.js +204 -0
  36. package/dist/fields/StringField.d.ts +1 -1
  37. package/dist/fields/StringField.js +3 -2
  38. package/dist/presentation/PersonAvatar.js +1 -0
  39. package/dist/utils/storybook.d.ts +2 -0
  40. package/dist/utils/storybook.js +26 -0
  41. package/dist/validators/isFutureDate.d.ts +8 -0
  42. package/dist/validators/isFutureDate.js +23 -0
  43. package/dist/validators/isFutureDate.test.d.ts +1 -0
  44. package/dist/validators/isFutureDate.test.js +119 -0
  45. package/package.json +12 -14
@@ -0,0 +1,52 @@
1
+ import type { StoryObj } from "@storybook/nextjs-vite";
2
+ declare const meta: {
3
+ component: ({ children, disabled, icon, id, onClick, size, title, type, tooltip, }: ({
4
+ disabled?: boolean;
5
+ id?: string;
6
+ onClick?: (event: React.MouseEvent) => void;
7
+ size?: "normal" | "small";
8
+ title?: string;
9
+ type?: "submit" | "primary" | "secondary" | "danger";
10
+ tooltip?: import("react").ReactNode | null;
11
+ } & ({
12
+ children: import("react").ReactNode;
13
+ icon?: import("react").ReactNode;
14
+ } | {
15
+ children?: import("react").ReactNode;
16
+ icon: import("react").ReactNode;
17
+ })) & {
18
+ onClick: (event: React.MouseEvent) => void | Promise<void>;
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ argTypes: {
21
+ id: {
22
+ control: false;
23
+ };
24
+ title: {
25
+ control: false;
26
+ };
27
+ children: {
28
+ table: {
29
+ type: {
30
+ summary: string;
31
+ };
32
+ };
33
+ };
34
+ icon: import("storybook/internal/csf").InputType;
35
+ };
36
+ args: {
37
+ disabled: false;
38
+ id: string;
39
+ onClick: import("storybook/test").Mock<(...args: any[]) => any>;
40
+ children: import("react/jsx-runtime").JSX.Element;
41
+ };
42
+ };
43
+ export default meta;
44
+ type Story = StoryObj<typeof meta>;
45
+ export declare const Normal: Story;
46
+ export declare const Primary: Story;
47
+ export declare const Disabled: Story;
48
+ export declare const Small: Story;
49
+ export declare const WithIcon: Story;
50
+ export declare const WithTooltip: Story;
51
+ export declare const Loading: Story;
52
+ export declare const Submit: Story;
@@ -0,0 +1,93 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__ from "storybook/test";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__ from "../presentation/Icon.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__ from "../utils/storybook.js";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__Action_js_1d67bb71__ from "./Action.js";
6
+ const meta = {
7
+ component: __WEBPACK_EXTERNAL_MODULE__Action_js_1d67bb71__["default"],
8
+ argTypes: {
9
+ id: {
10
+ control: false
11
+ },
12
+ title: {
13
+ control: false
14
+ },
15
+ children: {
16
+ table: {
17
+ type: {
18
+ summary: "ReactNode"
19
+ }
20
+ }
21
+ },
22
+ icon: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__.iconStoryControl)()
23
+ },
24
+ args: {
25
+ disabled: false,
26
+ id: "action-1",
27
+ onClick: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)(),
28
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
29
+ children: "Click me!"
30
+ })
31
+ }
32
+ };
33
+ const Action_stories_rslib_entry_ = meta;
34
+ const Normal = {
35
+ args: {}
36
+ };
37
+ const Primary = {
38
+ args: {
39
+ id: "primary-action",
40
+ type: "primary"
41
+ }
42
+ };
43
+ const Disabled = {
44
+ args: {
45
+ id: "disabled-action",
46
+ disabled: true
47
+ }
48
+ };
49
+ const Small = {
50
+ args: {
51
+ id: "small-action",
52
+ size: "small"
53
+ }
54
+ };
55
+ const WithIcon = {
56
+ args: {
57
+ id: "with-icon-action",
58
+ children: "Edit",
59
+ icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
60
+ symbol: "Edit"
61
+ })
62
+ }
63
+ };
64
+ const WithTooltip = {
65
+ args: {
66
+ id: "with-tooltip-action",
67
+ tooltip: "This is a tooltip"
68
+ }
69
+ };
70
+ const Loading = {
71
+ args: {
72
+ id: "loading-action",
73
+ children: "Loading",
74
+ icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
75
+ animate: true,
76
+ symbol: "Loading"
77
+ })
78
+ }
79
+ };
80
+ const Submit = {
81
+ args: {
82
+ id: "submit-action",
83
+ type: "submit",
84
+ children: "Submit"
85
+ },
86
+ play: async ({ args, canvas, userEvent })=>{
87
+ await userEvent.click(canvas.getByRole("button", {
88
+ name: "Submit"
89
+ }));
90
+ await (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.expect)(args.onClick).toHaveBeenCalled();
91
+ }
92
+ };
93
+ export { Disabled, Loading, Normal, Primary, Small, Submit, WithIcon, WithTooltip, Action_stories_rslib_entry_ as default };
@@ -29,27 +29,13 @@ declare const meta: {
29
29
  };
30
30
  };
31
31
  };
32
- icon: {
33
- control: "inline-radio";
34
- options: string[];
35
- mapping: {
36
- None: null;
37
- Edit: import("react/jsx-runtime").JSX.Element;
38
- Plus: import("react/jsx-runtime").JSX.Element;
39
- Loading: import("react/jsx-runtime").JSX.Element;
40
- };
41
- table: {
42
- type: {
43
- summary: string;
44
- };
45
- };
46
- };
32
+ icon: import("storybook/internal/csf").InputType;
47
33
  };
48
34
  args: {
49
35
  id: string;
50
36
  type: "primary";
51
37
  onClick: import("storybook/test").Mock<(...args: any[]) => any>;
52
- children: string;
38
+ children: import("react/jsx-runtime").JSX.Element;
53
39
  size: "normal";
54
40
  disabled: false;
55
41
  tooltip: string;
@@ -1,6 +1,7 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
2
  import * as __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__ from "storybook/test";
3
3
  import * as __WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__ from "../presentation/Icon.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__ from "../utils/storybook.js";
4
5
  import * as __WEBPACK_EXTERNAL_MODULE__Button_js_17bdd71d__ from "./Button.js";
5
6
  const meta = {
6
7
  component: __WEBPACK_EXTERNAL_MODULE__Button_js_17bdd71d__["default"],
@@ -18,39 +19,15 @@ const meta = {
18
19
  }
19
20
  }
20
21
  },
21
- icon: {
22
- control: "inline-radio",
23
- options: [
24
- "None",
25
- "Edit",
26
- "Plus",
27
- "Loading"
28
- ],
29
- mapping: {
30
- None: null,
31
- Edit: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
32
- symbol: "Edit"
33
- }),
34
- Plus: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
35
- symbol: "Plus"
36
- }),
37
- Loading: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
38
- animate: true,
39
- symbol: "Loading"
40
- })
41
- },
42
- table: {
43
- type: {
44
- summary: "ReactNode"
45
- }
46
- }
47
- }
22
+ icon: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__.iconStoryControl)()
48
23
  },
49
24
  args: {
50
25
  id: "default-button",
51
26
  type: "primary",
52
27
  onClick: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)(),
53
- children: "Click Me!",
28
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
29
+ children: "Click me!"
30
+ }),
54
31
  size: "normal",
55
32
  disabled: false,
56
33
  tooltip: "This is a tooltip"
@@ -0,0 +1,31 @@
1
+ import type { StoryObj } from "@storybook/nextjs-vite";
2
+ declare const meta: {
3
+ component: (props: {
4
+ children: import("react").ReactNode;
5
+ } & ({
6
+ onClick: (event: React.MouseEvent) => void;
7
+ async?: false;
8
+ } | {
9
+ onClick: (event: React.MouseEvent) => Promise<void>;
10
+ async: true;
11
+ })) => import("react/jsx-runtime").JSX.Element;
12
+ argTypes: {
13
+ children: {
14
+ table: {
15
+ type: {
16
+ summary: string;
17
+ };
18
+ };
19
+ };
20
+ };
21
+ args: {
22
+ onClick: import("storybook/test").Mock<(...args: any[]) => any>;
23
+ children: import("react/jsx-runtime").JSX.Element;
24
+ async: false;
25
+ };
26
+ };
27
+ export default meta;
28
+ type Story = StoryObj<typeof meta>;
29
+ export declare const Normal: Story;
30
+ export declare const Async: Story;
31
+ export declare const WithContent: Story;
@@ -0,0 +1,77 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__ from "storybook/test";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__presentation_Avatar_js_27d78da9__ from "../presentation/Avatar.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__presentation_HStack_js_10bfc552__ from "../presentation/HStack.js";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__presentation_PlainText_js_e98763ad__ from "../presentation/PlainText.js";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__presentation_VStack_js_fd392b79__ from "../presentation/VStack.js";
7
+ import * as __WEBPACK_EXTERNAL_MODULE__ButtonCard_js_7f145c20__ from "./ButtonCard.js";
8
+ const meta = {
9
+ component: __WEBPACK_EXTERNAL_MODULE__ButtonCard_js_7f145c20__["default"],
10
+ argTypes: {
11
+ children: {
12
+ table: {
13
+ type: {
14
+ summary: "ReactNode"
15
+ }
16
+ }
17
+ }
18
+ },
19
+ args: {
20
+ onClick: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)(),
21
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
22
+ children: "Click me!"
23
+ }),
24
+ async: false
25
+ }
26
+ };
27
+ const ButtonCard_stories_rslib_entry_ = meta;
28
+ const Normal = {
29
+ args: {}
30
+ };
31
+ const Async = {
32
+ args: {
33
+ async: true,
34
+ onClick: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)(async ()=>{
35
+ await new Promise((resolve)=>setTimeout(resolve, 2000));
36
+ }),
37
+ children: "Save Changes"
38
+ },
39
+ play: async ({ args, canvas, userEvent })=>{
40
+ const button = canvas.getByRole("button", {
41
+ name: "Save Changes"
42
+ });
43
+ await userEvent.click(button);
44
+ await (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.waitFor)(async ()=>{
45
+ await (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.expect)(args.onClick).toHaveBeenCalled();
46
+ }, {
47
+ timeout: 3000
48
+ });
49
+ }
50
+ };
51
+ const WithContent = {
52
+ args: {
53
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__presentation_HStack_js_10bfc552__["default"], {
54
+ children: [
55
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Avatar_js_27d78da9__["default"], {
56
+ width: 40,
57
+ height: 40
58
+ }),
59
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__presentation_VStack_js_fd392b79__["default"], {
60
+ spacing: "n4",
61
+ children: [
62
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_PlainText_js_e98763ad__["default"], {
63
+ font: "regular-bold",
64
+ children: "John Doe"
65
+ }),
66
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_PlainText_js_e98763ad__["default"], {
67
+ font: "small",
68
+ tone: "muted",
69
+ children: "Administrator"
70
+ })
71
+ ]
72
+ })
73
+ ]
74
+ })
75
+ }
76
+ };
77
+ export { Async, Normal, WithContent, ButtonCard_stories_rslib_entry_ as default };
@@ -2,13 +2,18 @@ import { type ReactNode } from "react";
2
2
  type Props = {
3
3
  children: ReactNode;
4
4
  disabled?: boolean;
5
+ /** What to download, if true the href is used as the download filename.
6
+ *
7
+ * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#download
8
+ * */
5
9
  download?: string | boolean;
10
+ /** Whether the link should open in a new tab. */
6
11
  external?: boolean;
7
12
  href: string;
8
13
  icon?: ReactNode;
9
14
  iconRight?: ReactNode;
10
15
  id?: string;
11
- type?: "submit" | "primary" | "secondary";
16
+ type?: "primary" | "secondary";
12
17
  size?: "normal" | "small";
13
18
  };
14
19
  declare const ButtonLink: ({ children, disabled, download, external, href, icon, iconRight, id, type, size, }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -20,7 +20,7 @@ const ButtonLink = ({ children, disabled, download, external, href, icon, iconRi
20
20
  ]
21
21
  }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(NextLink, {
22
22
  className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__ButtonLink_module_js_d4c014da__["default"].button, {
23
- [__WEBPACK_EXTERNAL_MODULE__ButtonLink_module_js_d4c014da__["default"].primary]: "submit" === type || "primary" === type,
23
+ [__WEBPACK_EXTERNAL_MODULE__ButtonLink_module_js_d4c014da__["default"].primary]: "primary" === type,
24
24
  [__WEBPACK_EXTERNAL_MODULE__ButtonLink_module_js_d4c014da__["default"].small]: "small" === size,
25
25
  [__WEBPACK_EXTERNAL_MODULE__ButtonLink_module_js_d4c014da__["default"].iconOnly]: void 0 === children
26
26
  }),
@@ -0,0 +1,46 @@
1
+ import type { StoryObj } from "@storybook/nextjs-vite";
2
+ declare const meta: {
3
+ component: ({ children, disabled, download, external, href, icon, iconRight, id, type, size, }: {
4
+ children: import("react").ReactNode;
5
+ disabled?: boolean;
6
+ download?: string | boolean;
7
+ external?: boolean;
8
+ href: string;
9
+ icon?: import("react").ReactNode;
10
+ iconRight?: import("react").ReactNode;
11
+ id?: string;
12
+ type?: "primary" | "secondary";
13
+ size?: "normal" | "small";
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ argTypes: {
16
+ id: {
17
+ control: false;
18
+ };
19
+ children: {
20
+ table: {
21
+ type: {
22
+ summary: string;
23
+ };
24
+ };
25
+ };
26
+ icon: import("storybook/internal/csf").InputType;
27
+ iconRight: import("storybook/internal/csf").InputType;
28
+ };
29
+ args: {
30
+ download: false;
31
+ href: string;
32
+ children: import("react/jsx-runtime").JSX.Element;
33
+ disabled: false;
34
+ external: false;
35
+ id: string;
36
+ };
37
+ };
38
+ export default meta;
39
+ type Story = StoryObj<typeof meta>;
40
+ export declare const Normal: Story;
41
+ export declare const Disabled: Story;
42
+ export declare const Primary: Story;
43
+ export declare const Secondary: Story;
44
+ export declare const Small: Story;
45
+ export declare const WithIcon: Story;
46
+ export declare const WithIconRight: Story;
@@ -0,0 +1,72 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__ from "../presentation/Icon.js";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__ from "../utils/storybook.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__ButtonLink_js_87472ad1__ from "./ButtonLink.js";
5
+ const meta = {
6
+ component: __WEBPACK_EXTERNAL_MODULE__ButtonLink_js_87472ad1__["default"],
7
+ argTypes: {
8
+ id: {
9
+ control: false
10
+ },
11
+ children: {
12
+ table: {
13
+ type: {
14
+ summary: "ReactNode"
15
+ }
16
+ }
17
+ },
18
+ icon: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__.iconStoryControl)(),
19
+ iconRight: (0, __WEBPACK_EXTERNAL_MODULE__utils_storybook_js_3cc1ba9c__.iconStoryControl)()
20
+ },
21
+ args: {
22
+ download: false,
23
+ href: "#",
24
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
25
+ children: "Click me!"
26
+ }),
27
+ disabled: false,
28
+ external: false,
29
+ id: "button-link-1"
30
+ }
31
+ };
32
+ const ButtonLink_stories_rslib_entry_ = meta;
33
+ const Normal = {
34
+ args: {}
35
+ };
36
+ const Disabled = {
37
+ args: {
38
+ disabled: true
39
+ }
40
+ };
41
+ const Primary = {
42
+ args: {
43
+ type: "primary"
44
+ }
45
+ };
46
+ const Secondary = {
47
+ args: {
48
+ type: "secondary"
49
+ }
50
+ };
51
+ const Small = {
52
+ args: {
53
+ size: "small"
54
+ }
55
+ };
56
+ const WithIcon = {
57
+ args: {
58
+ icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
59
+ symbol: "Plus"
60
+ }),
61
+ children: "Add"
62
+ }
63
+ };
64
+ const WithIconRight = {
65
+ args: {
66
+ iconRight: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
67
+ symbol: "Archive"
68
+ }),
69
+ children: "Archive"
70
+ }
71
+ };
72
+ export { Disabled, Normal, Primary, Secondary, Small, WithIcon, WithIconRight, ButtonLink_stories_rslib_entry_ as default };
@@ -3,5 +3,9 @@ import Button from "./Button";
3
3
  type Props = ComponentProps<typeof Button> & {
4
4
  render: (onClose: () => void) => ReactNode;
5
5
  };
6
+ /**
7
+ * A disclosure component that renders a component when clicked.
8
+ * It is intended to be used with a modal or a confirmation modal.
9
+ */
6
10
  declare const Disclosure: ({ render, children, disabled, icon, id, size, title, tooltip, type, }: Omit<Props, "onClick">) => import("react/jsx-runtime").JSX.Element;
7
11
  export default Disclosure;
@@ -0,0 +1,53 @@
1
+ import type { StoryObj } from "@storybook/nextjs-vite";
2
+ declare const meta: {
3
+ component: ({ render, children, disabled, icon, id, size, title, tooltip, type, }: Omit<({
4
+ disabled?: boolean;
5
+ id?: string;
6
+ onClick?: (event: React.MouseEvent) => void;
7
+ size?: "normal" | "small";
8
+ title?: string;
9
+ type?: "submit" | "primary" | "secondary" | "danger";
10
+ tooltip?: import("react").ReactNode | null;
11
+ } & ({
12
+ children: import("react").ReactNode;
13
+ icon?: import("react").ReactNode;
14
+ } | {
15
+ children?: import("react").ReactNode;
16
+ icon: import("react").ReactNode;
17
+ })) & {
18
+ render: (onClose: () => void) => import("react").ReactNode;
19
+ }, "onClick">) => import("react/jsx-runtime").JSX.Element;
20
+ argTypes: {
21
+ id: {
22
+ control: false;
23
+ };
24
+ title: {
25
+ control: false;
26
+ };
27
+ children: {
28
+ table: {
29
+ type: {
30
+ summary: string;
31
+ };
32
+ };
33
+ };
34
+ icon: import("storybook/internal/csf").InputType;
35
+ };
36
+ args: {
37
+ id: string;
38
+ children: import("react/jsx-runtime").JSX.Element;
39
+ type: "secondary";
40
+ size: "normal";
41
+ disabled: false;
42
+ tooltip: string;
43
+ render: (onClose: () => void) => import("react/jsx-runtime").JSX.Element;
44
+ };
45
+ };
46
+ export default meta;
47
+ type Story = StoryObj<typeof meta>;
48
+ export declare const WithSimpleModal: Story;
49
+ export declare const WithConfirmationModal: Story;
50
+ export declare const WithIcon: Story;
51
+ export declare const Primary: Story;
52
+ export declare const Small: Story;
53
+ export declare const Disabled: Story;