@pismo/marola 0.0.1-alpha.16 → 0.0.1-alpha.18

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 (93) hide show
  1. package/dist/{Button-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
  2. package/dist/{ClickAwayListener-HI1G6ob9.js → ClickAwayListener-BSW-Nd-y.js} +3 -3
  3. package/dist/{Popup-DFJQc_jn.js → Popup-B6ZSGIEI.js} +12 -13
  4. package/dist/{Portal-D__zvwbZ.js → Portal-DIeBsWdL.js} +2 -2
  5. package/dist/{SelectButton-DWZ2BRaX.js → SelectButton-pciwIWcj.js} +24 -22
  6. package/dist/assets/Chip.css +1 -1
  7. package/dist/assets/Input.css +1 -1
  8. package/dist/assets/PageHeader.css +1 -1
  9. package/dist/assets/Pagination.css +1 -1
  10. package/dist/assets/SelectButton.css +1 -1
  11. package/dist/assets/TextDisplay.css +1 -0
  12. package/dist/{combineHooksSlotProps-BHqhiBfc.js → combineHooksSlotProps-DVjg9PRh.js} +18 -19
  13. package/dist/components/Button/Button.js +1 -1
  14. package/dist/components/Checkbox/Checkbox.d.ts +15 -0
  15. package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
  16. package/dist/components/Chip/Chip.js +1 -1
  17. package/dist/components/Dialog/CloseIconButton.js +1 -1
  18. package/dist/components/Dialog/Dialog.js +15 -16
  19. package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
  20. package/dist/components/Icon/Icon.d.ts +10 -1
  21. package/dist/components/Icon/Icon.js +39 -25
  22. package/dist/components/Icon/Icon.stories.d.ts +16 -0
  23. package/dist/components/IconButton/Icon.stories.d.ts +15 -0
  24. package/dist/components/IconButton/IconButton.d.ts +14 -0
  25. package/dist/components/IconButton/IconButton.js +1 -1
  26. package/dist/components/Input/Input.js +38 -39
  27. package/dist/components/PageHeader/PageHeader.js +23 -23
  28. package/dist/components/Pagination/Pagination.d.ts +24 -5
  29. package/dist/components/Pagination/Pagination.js +119 -116
  30. package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
  31. package/dist/components/Select/Select.js +137 -138
  32. package/dist/components/Select/SelectButton.js +1 -1
  33. package/dist/components/Skeleton/Skeleton.d.ts +10 -3
  34. package/dist/components/Skeleton/Skeleton.js +12 -15
  35. package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
  36. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
  37. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
  38. package/dist/components/Snackbar/Snackbar.js +6 -7
  39. package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
  40. package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
  41. package/dist/components/SortTooltip/SortTooltip.js +27 -16
  42. package/dist/components/Stepper/Stepper.d.ts +11 -1
  43. package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
  44. package/dist/components/Table/Table.js +38 -40
  45. package/dist/components/Tabs/Tab.d.ts +5 -0
  46. package/dist/components/Tabs/Tab.js +9 -10
  47. package/dist/components/Tabs/Tab.stories.d.ts +15 -0
  48. package/dist/components/Tabs/TabPanel.d.ts +4 -0
  49. package/dist/components/Tabs/TabPanel.js +13 -14
  50. package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
  51. package/dist/components/Tabs/Tabs.d.ts +5 -1
  52. package/dist/components/Tabs/Tabs.js +36 -37
  53. package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
  54. package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
  55. package/dist/components/TextDisplay/TextDisplay.js +37 -0
  56. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
  57. package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
  58. package/dist/components/Toggle/Toggle.js +7 -8
  59. package/dist/components/Tooltip/Tooltip.d.ts +18 -6
  60. package/dist/components/Tooltip/Tooltip.js +104 -92
  61. package/dist/components/Tooltip/Tooltip.stories.d.ts +33 -0
  62. package/dist/components/Typography/Typography.d.ts +2 -0
  63. package/dist/components/Typography/Typography.js +40 -29
  64. package/dist/components/Typography/Typography.stories.d.ts +1 -0
  65. package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
  66. package/dist/{index-BJ8HbRCy.js → index-CjW42-M-.js} +5 -6
  67. package/dist/main.d.ts +5 -1
  68. package/dist/main.js +34 -32
  69. package/dist/marola.css +1 -0
  70. package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
  71. package/dist/{useEventCallback-vAfOD-oT.js → useEventCallback-xTG9piMa.js} +1 -1
  72. package/dist/{useList-ByMguSS_.js → useList-B0hog_3-.js} +48 -49
  73. package/package.json +2 -2
  74. package/dist/_commonjsHelpers-CT_km90n.js +0 -30
  75. package/dist/components/Advice/Advice.stories.js +0 -48
  76. package/dist/components/Button/Button.stories.js +0 -40
  77. package/dist/components/Chip/Chip.stories.js +0 -59
  78. package/dist/components/Chip/chip.test.js +0 -17303
  79. package/dist/components/Dialog/Dialog.stories.js +0 -59
  80. package/dist/components/Input/Input.stories.js +0 -106
  81. package/dist/components/InputSearch/InputSearch.stories.js +0 -73
  82. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
  83. package/dist/components/PageHeader/PageHeader.stories.js +0 -49
  84. package/dist/components/Select/Select.stories.js +0 -89
  85. package/dist/components/Snackbar/Snackbar.stories.js +0 -62
  86. package/dist/components/Toggle/Toggle.stories.js +0 -33
  87. package/dist/components/Typography/Typography.stories.js +0 -30
  88. package/dist/components/Typography/typography.test.js +0 -234
  89. package/dist/magic-string.es-O_8lTkE3.js +0 -738
  90. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
  91. package/dist/react.esm-DGd9_oKA.js +0 -11126
  92. package/dist/utils/styleStrings.test.js +0 -41
  93. package/dist/vi.Y_w82WR8-XVYrIxgm.js +0 -9861
@@ -1,59 +0,0 @@
1
- import { jsx as e, Fragment as r, jsxs as i } from "react/jsx-runtime";
2
- import { useState as d } from "react";
3
- import "../Chip/Chip.js";
4
- import { Button as l } from "../Button/Button.js";
5
- import { Dialog as a } from "./Dialog.js";
6
- import "../IconButton/IconButton.js";
7
- import { Typography as n } from "../Typography/Typography.js";
8
- import "../Select/Select.js";
9
- import "../Table/Table.js";
10
- import "../Tabs/Tabs.js";
11
- import s from "./Content.js";
12
- import c from "./Actions.js";
13
- const y = {
14
- title: "Components/Dialog",
15
- component: a,
16
- tags: ["autodocs"],
17
- decorators: [
18
- (o) => /* @__PURE__ */ e("div", { style: { padding: "1em" }, children: /* @__PURE__ */ e(o, {}) })
19
- ]
20
- };
21
- function p(o) {
22
- const [m, t] = d(!1);
23
- return /* @__PURE__ */ i(r, { children: [
24
- /* @__PURE__ */ e(l, { onClick: () => t(!0), children: "Open" }),
25
- /* @__PURE__ */ e(
26
- a,
27
- {
28
- dialogTitle: o.dialogTitle,
29
- dialogSubtitle: o.dialogSubtitle,
30
- open: m,
31
- onClose: () => {
32
- t(!1), o != null && o.onClose && (o == null || o.onClose());
33
- },
34
- children: /* @__PURE__ */ i(r, { children: [
35
- /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(n, { element: "p", children: "Lorem, ipsum dolor sit amet consectetur adipisicing elit. Voluptates eum ipsum, corrupti, quod eveniet non sed recusandae iusto alias consectetur ipsam! Officia doloremque voluptates molestiae, autem maxime soluta? Blanditiis, consequuntur!" }) }),
36
- /* @__PURE__ */ i(c, { children: [
37
- /* @__PURE__ */ e(l, { onClick: () => t(!1), children: /* @__PURE__ */ e(n, { variant: "button", children: "Cancel" }) }),
38
- /* @__PURE__ */ e(l, { onClick: () => t(!1), children: /* @__PURE__ */ e(n, { variant: "button", children: "Submit" }) }),
39
- " "
40
- ] })
41
- ] })
42
- }
43
- )
44
- ] });
45
- }
46
- const O = {
47
- render: p,
48
- args: {
49
- dialogTitle: "This is a dialog title",
50
- dialogSubtitle: "Here is a dialog sub title",
51
- onClose: () => alert("Consider the dialog closed"),
52
- children: /* @__PURE__ */ e(r, {}),
53
- open: !1
54
- }
55
- };
56
- export {
57
- O as Simple,
58
- y as default
59
- };
@@ -1,106 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { useState as t } from "react";
3
- import { Input as n } from "./Input.js";
4
- const m = {
5
- title: "Components/Input",
6
- component: n,
7
- tags: ["autodocs"],
8
- parameters: {
9
- layout: "padded"
10
- }
11
- }, g = {
12
- args: {}
13
- }, u = {
14
- name: "With label",
15
- args: {
16
- label: "What is your name?"
17
- }
18
- }, W = {
19
- name: "With placeholder",
20
- args: {
21
- label: "What is your name?",
22
- placeholder: "What is your name?"
23
- }
24
- }, d = {
25
- args: {
26
- label: "What is your name?",
27
- value: "Marola DS",
28
- disabled: !0
29
- }
30
- }, p = {
31
- name: "With max length",
32
- args: {
33
- label: "What is your name?",
34
- infoMessage: "Text length counter",
35
- maxLength: 10
36
- }
37
- }, y = {
38
- name: "With max length and no chars counter",
39
- args: {
40
- label: "What is your name?",
41
- infoMessage: "Text length counter",
42
- maxLength: 10,
43
- hideCharsCounter: !0
44
- }
45
- }, f = {
46
- name: "With left icon",
47
- args: {
48
- label: "What is your name?",
49
- placeholder: "Hey, I have an icon!",
50
- leftIcon: "😁"
51
- }
52
- }, b = {
53
- name: "With right icon and click event",
54
- render: () => {
55
- const [o, s] = t(""), [r, h] = t(!1);
56
- return /* @__PURE__ */ a(
57
- n,
58
- {
59
- label: "What is your name?",
60
- placeholder: "What is your name?",
61
- type: r ? "text" : "password",
62
- rightIcon: /* @__PURE__ */ a("span", { style: { cursor: "pointer" }, onClick: () => h((e) => !e), children: "😁" }),
63
- value: o,
64
- onChange: (e) => s(e.target.value),
65
- infoMessage: "Type something and click on the icon"
66
- }
67
- );
68
- }
69
- }, x = {
70
- name: "With both icons",
71
- args: {
72
- label: "What is your name?",
73
- placeholder: "Hey, I have icons!",
74
- leftIcon: "😁",
75
- rightIcon: "😁"
76
- }
77
- }, I = {
78
- name: "With info message",
79
- args: {
80
- label: "What is your name?",
81
- placeholder: "What is your name?",
82
- infoMessage: "The name must have less than 50 chars"
83
- }
84
- }, M = {
85
- name: "With error message",
86
- args: {
87
- label: "What is your name?",
88
- placeholder: "What is your name?",
89
- infoMessage: "The name must have less than 50 chars",
90
- errorMessage: "Invalid name"
91
- }
92
- };
93
- export {
94
- d as Disabled,
95
- g as Simple,
96
- x as WithBothIcons,
97
- M as WithErrorMessage,
98
- I as WithInfoMessage,
99
- u as WithLabel,
100
- f as WithLeftIcon,
101
- p as WithMaxLength,
102
- y as WithMaxLengthAndHideCharsCounter,
103
- W as WithPlaceholder,
104
- b as WithRightIconAndClickEvent,
105
- m as default
106
- };
@@ -1,73 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useState as l, useEffect as n } from "react";
3
- import { InputSearch as t } from "./InputSearch.js";
4
- const d = {
5
- title: "Components/InputSearch",
6
- component: t,
7
- tags: ["autodocs"],
8
- parameters: {
9
- layout: "padded"
10
- }
11
- }, h = {
12
- render: () => {
13
- const [e, a] = l(void 0);
14
- return n(() => {
15
- e !== void 0 && alert("Search triggered after 500 milliseconds");
16
- }, [e]), /* @__PURE__ */ o(t, { value: e, onChange: (r) => a(r.target.value) });
17
- }
18
- }, m = {
19
- name: "With label",
20
- render: () => {
21
- const [e, a] = l(void 0);
22
- return n(() => {
23
- e !== void 0 && alert("Search triggered after 500 milliseconds");
24
- }, [e]), /* @__PURE__ */ o(t, { label: "Search by name or id", value: e, onChange: (r) => a(r.target.value) });
25
- }
26
- }, u = {
27
- name: "With custom delay",
28
- render: () => {
29
- const [e, a] = l(void 0);
30
- return n(() => {
31
- e !== void 0 && alert("Search triggered after 2000 milliseconds");
32
- }, [e]), /* @__PURE__ */ o(
33
- t,
34
- {
35
- label: "Search by name or id",
36
- value: e,
37
- onChange: (r) => a(r.target.value),
38
- triggerDelay: 2e3
39
- }
40
- );
41
- }
42
- }, g = {
43
- name: "With placeholder",
44
- render: () => {
45
- const [e, a] = l(void 0);
46
- return n(() => {
47
- e !== void 0 && alert("Search triggered after 500 milliseconds");
48
- }, [e]), /* @__PURE__ */ o(
49
- t,
50
- {
51
- label: "Search",
52
- placeholder: "Search by name or id",
53
- value: e,
54
- onChange: (r) => a(r.target.value)
55
- }
56
- );
57
- }
58
- }, S = {
59
- args: {
60
- label: "Search",
61
- placeholder: "Search by name or id",
62
- value: "Marola DS",
63
- disabled: !0
64
- }
65
- };
66
- export {
67
- S as Disabled,
68
- h as Simple,
69
- u as WithCustomDelay,
70
- m as WithLabel,
71
- g as WithPlaceholder,
72
- d as default
73
- };
@@ -1,38 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import "../Chip/Chip.js";
3
- import "../Button/Button.js";
4
- import "react";
5
- import "../Dialog/Backdrop.js";
6
- import "../Typography/Typography.js";
7
- import "../IconButton/IconButton.js";
8
- import { LoadingSpinner as i } from "./LoadingSpinner.js";
9
- import "../Select/Select.js";
10
- import "../Table/Table.js";
11
- import "../Tabs/Tabs.js";
12
- const f = {
13
- title: "Components/LoadingSpinner",
14
- component: i,
15
- tags: ["autodocs"],
16
- decorators: [
17
- (o) => /* @__PURE__ */ t(
18
- "div",
19
- {
20
- style: {
21
- backgroundColor: "#423755",
22
- width: "5em",
23
- height: "5em",
24
- display: "flex",
25
- justifyContent: "center",
26
- alignItems: "center"
27
- },
28
- children: /* @__PURE__ */ t(o, {})
29
- }
30
- )
31
- ]
32
- }, h = {
33
- args: {}
34
- };
35
- export {
36
- h as Simple,
37
- f as default
38
- };
@@ -1,49 +0,0 @@
1
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { Button as r } from "../Button/Button.js";
3
- import { Tab as e } from "../Tabs/Tab.js";
4
- import { TabPanel as a } from "../Tabs/TabPanel.js";
5
- import { Tabs as o } from "../Tabs/Tabs.js";
6
- import { PageHeader as l } from "./PageHeader.js";
7
- const g = {
8
- title: "Components/PageHeader",
9
- component: l,
10
- tags: ["autodocs"]
11
- }, c = {
12
- args: {
13
- title: "Marola Design System",
14
- subtitle: "A Pismo design system"
15
- }
16
- }, i = {
17
- name: "With back link",
18
- args: {
19
- ...c.args,
20
- backLinkText: "Back",
21
- onBackLinkClick: () => alert("Back button clicked!")
22
- }
23
- }, u = {
24
- name: "With right children",
25
- args: {
26
- ...i.args,
27
- rightChildren: /* @__PURE__ */ t(r, { variant: "quick", onClick: () => alert("button clicked"), children: "Click me!" })
28
- }
29
- }, p = {
30
- name: "With bottom children",
31
- args: {
32
- ...i.args,
33
- bottomChildren: /* @__PURE__ */ n(o, { children: [
34
- /* @__PURE__ */ t(e, { value: "1", children: "Tab 1" }),
35
- /* @__PURE__ */ t(e, { value: "2", children: "Tab 2" }),
36
- /* @__PURE__ */ t(e, { value: "3", children: "Tab 3" }),
37
- /* @__PURE__ */ t(a, { value: "1", children: "Tab 1 content" }),
38
- /* @__PURE__ */ t(a, { value: "2", children: "Tab 2 content" }),
39
- /* @__PURE__ */ t(a, { value: "3", children: "Tab 3 content" })
40
- ] })
41
- }
42
- };
43
- export {
44
- c as Simple,
45
- i as WithBackLink,
46
- p as WithBottomChildren,
47
- u as WithRightChildren,
48
- g as default
49
- };
@@ -1,89 +0,0 @@
1
- import { jsx as e, Fragment as r, jsxs as a } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { useState as h } from "react";
4
- import { Select as n } from "./Select.js";
5
- const o = (t) => /* @__PURE__ */ d.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ d.createElement("path", { d: "M0.512792 11.6594C0.139667 11.2516 0.167167 10.6184 0.574323 10.2447C0.766229 10.0688 1.00839 9.98175 1.24964 9.98175C1.52063 9.98175 1.79026 10.0912 1.98745 10.3064L2.99998 11.4406V2.00094C2.99998 1.44781 3.44779 1 3.99998 1C4.55217 1 4.99998 1.44781 4.99998 2.00094V11.4384L6.01248 10.3325C6.38748 9.92812 7.01873 9.89687 7.42498 10.2719C7.83216 10.6453 7.85935 11.2787 7.48651 11.6866L4.76463 14.6894C4.38588 15.1037 3.66901 15.1037 3.28995 14.6894L0.512792 11.6594Z", fill: "#1897F3" }), /* @__PURE__ */ d.createElement("path", { opacity: 0.4, d: "M9.99998 3H11.5859L9.29279 5.29313C9.00666 5.57925 8.92123 6.00906 9.07598 6.38313C9.23073 6.75719 9.59566 7 9.99973 7H13.9716C14.5531 6.97188 15 6.55313 15 6C15 5.44688 14.5522 5 14 5H12.414L14.7072 2.70688C14.9933 2.42075 15.0787 1.99094 14.924 1.61688C14.7692 1.24281 14.4031 1 13.9719 1H9.99998C9.44685 1 8.99998 1.44719 8.99998 2C8.99998 2.55281 9.44685 3 9.99998 3ZM15.3937 13.5406L12.894 8.5375C12.5553 7.85594 11.444 7.85594 11.1053 8.5375L8.6056 13.5406C8.35854 14.0378 8.55873 14.6419 9.05279 14.8903C9.54873 15.1379 10.1478 14.9365 10.3944 14.4403L10.6179 13.9906H13.3814L13.6049 14.4403C13.7979 14.8288 14.354 15.1863 14.9465 14.8903C15.4406 14.6438 15.6406 14.0375 15.3937 13.5406ZM11.4937 12.2313L12 11.2094L12.5069 12.2291H11.4937V12.2313Z", fill: "#1897F3" })), g = {
6
- title: "Components/Select",
7
- component: n,
8
- tags: ["autodocs"],
9
- parameters: {
10
- layout: "padded"
11
- }
12
- };
13
- function c(t) {
14
- const [l, s] = h(""), p = [
15
- { id: "1", name: "Frodo" },
16
- { id: "2", name: "Sam" },
17
- { id: "3", name: "Merry" },
18
- { id: "4", name: "Pippin" }
19
- ];
20
- return /* @__PURE__ */ a(r, { children: [
21
- /* @__PURE__ */ e(n, { ...t, value: l, onChange: (i) => s(i), children: p.map((i) => /* @__PURE__ */ e(n.Option, { value: i.id, children: i.name }, i.id)) }),
22
- l && /* @__PURE__ */ a("pre", { style: { borderRadius: 4, background: "#fafafa", padding: 16, color: "#777777" }, children: [
23
- "// selected character",
24
- /* @__PURE__ */ e("br", {}),
25
- JSON.stringify(
26
- p.find((i) => i.id === l),
27
- null,
28
- 4
29
- )
30
- ] })
31
- ] });
32
- }
33
- const f = {
34
- args: {
35
- placeholder: "Select an option"
36
- },
37
- render: c
38
- }, S = {
39
- name: "With all options disabled",
40
- args: {
41
- placeholder: "Select an option",
42
- disabled: !0
43
- },
44
- render: c
45
- }, v = {
46
- name: "With some options disabled",
47
- args: {
48
- placeholder: "Select an option",
49
- children: /* @__PURE__ */ a(r, { children: [
50
- /* @__PURE__ */ e(n.Option, { value: "1", disabled: !0, children: "Frodo" }),
51
- /* @__PURE__ */ e(n.Option, { value: "2", children: "Sam" }),
52
- /* @__PURE__ */ e(n.Option, { value: "3", disabled: !0, children: "Merry" }),
53
- /* @__PURE__ */ e(n.Option, { value: "4", children: "Pippin" })
54
- ] })
55
- }
56
- }, O = {
57
- name: "With prefix",
58
- args: {
59
- placeholder: "Select an option",
60
- prefix: "Filter by:"
61
- },
62
- render: c
63
- }, y = {
64
- name: "With icons",
65
- args: {
66
- placeholder: "Select an option",
67
- children: /* @__PURE__ */ a(r, { children: [
68
- /* @__PURE__ */ e(n.Option, { value: "1", icon: /* @__PURE__ */ e(o, {}), children: "Frodo" }),
69
- /* @__PURE__ */ e(n.Option, { value: "2", icon: /* @__PURE__ */ e(o, {}), children: "Sam" }),
70
- /* @__PURE__ */ e(n.Option, { value: "3", icon: /* @__PURE__ */ e(o, {}), children: "Merry" }),
71
- /* @__PURE__ */ e(n.Option, { value: "4", icon: /* @__PURE__ */ e(o, {}), children: "Pippin" })
72
- ] })
73
- }
74
- }, L = {
75
- name: "With many options",
76
- args: {
77
- placeholder: "Select an option",
78
- children: /* @__PURE__ */ e(r, { children: [...Array(20).keys()].map((t) => /* @__PURE__ */ e(n.Option, { value: String(t + 1), children: `Item #${t + 1}` })) })
79
- }
80
- };
81
- export {
82
- f as Simple,
83
- S as WithAllOptionsDisabled,
84
- y as WithIcons,
85
- L as WithManyOptions,
86
- O as WithPrefix,
87
- v as WithSomeOptionsDisabled,
88
- g as default
89
- };
@@ -1,62 +0,0 @@
1
- import { jsx as o, jsxs as s, Fragment as i } from "react/jsx-runtime";
2
- import { useState as l } from "react";
3
- import { Button as c } from "../Button/Button.js";
4
- import { Snackbar as a } from "./Snackbar.js";
5
- const C = {
6
- title: "Components/Snackbar",
7
- component: a,
8
- tags: ["autodocs"],
9
- decorators: [
10
- (e) => /* @__PURE__ */ o("div", { style: { padding: "1em" }, children: /* @__PURE__ */ o(e, {}) })
11
- ]
12
- };
13
- function n(e) {
14
- const [r, t] = l(!1);
15
- return /* @__PURE__ */ s(i, { children: [
16
- /* @__PURE__ */ o(c, { onClick: () => t(!0), children: "Open Snackbar" }),
17
- /* @__PURE__ */ o(
18
- a,
19
- {
20
- ...e,
21
- open: r,
22
- onClose: () => {
23
- t(!1), e != null && e.onClose && (e == null || e.onClose());
24
- }
25
- }
26
- )
27
- ] });
28
- }
29
- const f = {
30
- render: n,
31
- args: {
32
- snackbarMessage: "Dialog success",
33
- variant: "success",
34
- autoHideDuration: 5e3,
35
- onClose: () => alert("Consider the dialog closed"),
36
- open: !1
37
- }
38
- }, g = {
39
- render: n,
40
- args: {
41
- variant: "error",
42
- snackbarMessage: "Dialog error",
43
- autoHideDuration: 5e3,
44
- onClose: () => alert("Consider the dialog closed"),
45
- open: !1
46
- }
47
- }, k = {
48
- render: n,
49
- args: {
50
- variant: "warning",
51
- snackbarMessage: "Dialog attention",
52
- autoHideDuration: 5e3,
53
- onClose: () => alert("Consider the dialog closed"),
54
- open: !1
55
- }
56
- };
57
- export {
58
- g as Error,
59
- f as Success,
60
- k as Warning,
61
- C as default
62
- };
@@ -1,33 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useState as r } from "react";
3
- import { Toggle as c } from "./Toggle.js";
4
- const l = {
5
- title: "Components/Toggle",
6
- component: c,
7
- tags: ["autodocs"],
8
- parameters: {
9
- layout: "padded"
10
- }
11
- }, h = {
12
- render: () => {
13
- const [e, t] = r(!1);
14
- return /* @__PURE__ */ o(c, { checked: e, onChange: (a) => t(a.target.checked) });
15
- }
16
- }, m = {
17
- name: "With label",
18
- render: () => {
19
- const [e, t] = r(!1);
20
- return /* @__PURE__ */ o(c, { label: "Active", checked: e, onChange: (a) => t(a.target.checked) });
21
- }
22
- }, g = {
23
- render: () => {
24
- const [e, t] = r(!1);
25
- return /* @__PURE__ */ o(c, { label: "Active", disabled: !0, checked: e, onChange: (a) => t(a.target.checked) });
26
- }
27
- };
28
- export {
29
- g as Disabled,
30
- h as Simple,
31
- m as WithLabel,
32
- l as default
33
- };
@@ -1,30 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import "../Chip/Chip.js";
3
- import "../Button/Button.js";
4
- import "react";
5
- import "../Dialog/Backdrop.js";
6
- import { Typography as p } from "./Typography.js";
7
- import "../IconButton/IconButton.js";
8
- import "../Select/Select.js";
9
- import "../Table/Table.js";
10
- import "../Tabs/Tabs.js";
11
- const d = {
12
- title: "Components/Typography",
13
- component: p,
14
- tags: ["autodocs"],
15
- argTypes: {
16
- element: {
17
- options: ["span", "p", "h1", "h2", "h3", "h4", "h5", "h6", "td", "th"],
18
- control: { type: "select" }
19
- }
20
- },
21
- decorators: [
22
- (o) => /* @__PURE__ */ t("div", { style: { margin: "1em" }, children: /* @__PURE__ */ t(o, {}) })
23
- ]
24
- }, y = {
25
- args: { children: "Example text" }
26
- };
27
- export {
28
- y as Simple,
29
- d as default
30
- };