@pismo/marola 0.0.1-alpha.9 → 1.0.0-beta.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 (165) hide show
  1. package/README.md +1 -1
  2. package/dist/{Button-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
  3. package/dist/{ClickAwayListener-BKznXF1d.js → ClickAwayListener-BSW-Nd-y.js} +3 -2
  4. package/dist/Dialog.module-DFEmFdYT.js +30 -0
  5. package/dist/Group-B3p31ftp.js +26 -0
  6. package/dist/Popup-B6ZSGIEI.js +1248 -0
  7. package/dist/{Portal-BcdMtRGF.js → Portal-DIeBsWdL.js} +2 -2
  8. package/dist/SelectButton-C8JQKaf4.js +61 -0
  9. package/dist/Tabs.module-jkH1Qjn7.js +22 -0
  10. package/dist/Toggle-BCgIItCc.js +142 -0
  11. package/dist/assets/Advice.css +1 -1
  12. package/dist/assets/Button.css +1 -1
  13. package/dist/assets/Checkbox.css +1 -1
  14. package/dist/assets/Dialog.css +1 -1
  15. package/dist/assets/EllipsisTooltip.css +1 -0
  16. package/dist/assets/Group.css +1 -0
  17. package/dist/assets/IconButton.css +1 -1
  18. package/dist/assets/Input.css +1 -1
  19. package/dist/assets/InputSearch.css +1 -1
  20. package/dist/assets/PageHeader.css +1 -1
  21. package/dist/assets/Pagination.css +1 -1
  22. package/dist/assets/SelectButton.css +1 -0
  23. package/dist/assets/Skeleton.css +1 -1
  24. package/dist/assets/Snackbar.css +1 -1
  25. package/dist/assets/SortTooltip.css +1 -1
  26. package/dist/assets/Stepper.css +1 -1
  27. package/dist/assets/Table.css +1 -1
  28. package/dist/assets/TextDisplay.css +1 -0
  29. package/dist/assets/Toggle.css +1 -1
  30. package/dist/assets/Toggle2.css +1 -0
  31. package/dist/assets/Typography.css +1 -1
  32. package/dist/combineHooksSlotProps-DVjg9PRh.js +80 -0
  33. package/dist/components/Advice/Advice.d.ts +17 -3
  34. package/dist/components/Advice/Advice.js +39 -17
  35. package/dist/components/Advice/Advice.stories.d.ts +18 -0
  36. package/dist/components/Button/Button.d.ts +6 -3
  37. package/dist/components/Button/Button.js +60 -65
  38. package/dist/components/Button/Button.stories.d.ts +3 -1
  39. package/dist/components/Checkbox/Checkbox.d.ts +19 -2
  40. package/dist/components/Checkbox/Checkbox.js +63 -40
  41. package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
  42. package/dist/components/Chip/Chip.d.ts +39 -0
  43. package/dist/components/Chip/Chip.js +19 -0
  44. package/dist/components/Chip/Chip.stories.d.ts +42 -0
  45. package/dist/components/Chip/chip.test.d.ts +1 -0
  46. package/dist/components/Dialog/Actions.js +1 -1
  47. package/dist/components/Dialog/Backdrop.js +1 -1
  48. package/dist/components/Dialog/CloseIconButton.js +2 -2
  49. package/dist/components/Dialog/Dialog.d.ts +1 -1
  50. package/dist/components/Dialog/Dialog.js +13 -13
  51. package/dist/components/Dialog/Dialog.stories.d.ts +10 -10
  52. package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
  53. package/dist/components/Dialog/DialogTitle.js +29 -0
  54. package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +7 -0
  55. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +23 -0
  56. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +31 -0
  57. package/dist/components/Icon/Icon.d.ts +8 -15
  58. package/dist/components/Icon/Icon.js +85 -41
  59. package/dist/components/Icon/Icon.stories.d.ts +15 -0
  60. package/dist/components/Icon/types.d.ts +5 -0
  61. package/dist/components/Icon/types.js +1 -0
  62. package/dist/components/IconButton/Icon.stories.d.ts +15 -0
  63. package/dist/components/IconButton/IconButton.d.ts +18 -2
  64. package/dist/components/IconButton/IconButton.js +58 -63
  65. package/dist/components/Input/Input.d.ts +1 -1
  66. package/dist/components/Input/Input.js +241 -230
  67. package/dist/components/InputSearch/InputSearch.d.ts +7 -9
  68. package/dist/components/InputSearch/InputSearch.js +30 -25
  69. package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -4
  70. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
  71. package/dist/components/PageHeader/PageHeader.d.ts +36 -6
  72. package/dist/components/PageHeader/PageHeader.js +83 -47
  73. package/dist/components/PageHeader/PageHeader.stories.d.ts +2 -31
  74. package/dist/components/Pagination/Pagination.d.ts +24 -5
  75. package/dist/components/Pagination/Pagination.js +127 -109
  76. package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
  77. package/dist/components/Select/Select.d.ts +26 -0
  78. package/dist/components/Select/Select.js +857 -0
  79. package/dist/components/Select/Select.stories.d.ts +22 -0
  80. package/dist/components/Select/SelectButton.d.ts +12 -0
  81. package/dist/components/Select/SelectButton.js +8 -0
  82. package/dist/components/Skeleton/Skeleton.d.ts +10 -3
  83. package/dist/components/Skeleton/Skeleton.js +16 -19
  84. package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
  85. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
  86. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
  87. package/dist/components/Snackbar/Snackbar.d.ts +19 -5
  88. package/dist/components/Snackbar/Snackbar.js +247 -230
  89. package/dist/components/Snackbar/Snackbar.stories.d.ts +319 -0
  90. package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
  91. package/dist/components/SortTooltip/SortTooltip.js +55 -29
  92. package/dist/components/Stepper/Stepper.d.ts +11 -1
  93. package/dist/components/Stepper/Stepper.js +37 -22
  94. package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
  95. package/dist/components/Table/Table.d.ts +33 -16
  96. package/dist/components/Table/Table.js +106 -91
  97. package/dist/components/Table/Table.stories.d.ts +29 -0
  98. package/dist/components/Table/_Table.TBody.stories.d.ts +14 -0
  99. package/dist/components/Table/_Table.THead.stories.d.ts +14 -0
  100. package/dist/components/Table/_Table.Td.stories.d.ts +16 -0
  101. package/dist/components/Table/_Table.Th.stories.d.ts +15 -0
  102. package/dist/components/Table/_Table.Tr.stories.d.ts +15 -0
  103. package/dist/components/Tabs/Tab.d.ts +5 -0
  104. package/dist/components/Tabs/Tab.js +179 -6
  105. package/dist/components/Tabs/Tab.stories.d.ts +15 -0
  106. package/dist/components/Tabs/TabPanel.d.ts +4 -0
  107. package/dist/components/Tabs/TabPanel.js +12 -12
  108. package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
  109. package/dist/components/Tabs/Tabs.d.ts +5 -1
  110. package/dist/components/Tabs/Tabs.js +242 -668
  111. package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
  112. package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
  113. package/dist/components/TextDisplay/TextDisplay.js +37 -0
  114. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
  115. package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
  116. package/dist/components/Toggle/Toggle.js +143 -129
  117. package/dist/components/ToggleGroup/Group.d.ts +18 -0
  118. package/dist/components/ToggleGroup/Group.js +7 -0
  119. package/dist/components/ToggleGroup/Group.test.d.ts +1 -0
  120. package/dist/components/ToggleGroup/Toggle.d.ts +15 -0
  121. package/dist/components/ToggleGroup/Toggle.js +17 -0
  122. package/dist/components/ToggleGroup/Toggle.test.d.ts +1 -0
  123. package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
  124. package/dist/components/ToggleGroup/ToggleGroup.js +6 -0
  125. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +25 -0
  126. package/dist/components/Tooltip/Tooltip.d.ts +22 -6
  127. package/dist/components/Tooltip/Tooltip.js +114 -1339
  128. package/dist/components/Tooltip/Tooltip.stories.d.ts +35 -0
  129. package/dist/components/Typography/Typography.d.ts +4 -2
  130. package/dist/components/Typography/Typography.js +56 -73
  131. package/dist/components/Typography/Typography.stories.d.ts +1 -0
  132. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +11 -0
  133. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +50 -0
  134. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +21 -0
  135. package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
  136. package/dist/{index-BNWbc5Kh.js → index-CjW42-M-.js} +3108 -3152
  137. package/dist/main.d.ts +10 -1
  138. package/dist/main.js +73 -55
  139. package/dist/marola.css +1 -0
  140. package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
  141. package/dist/useCompoundItem-D1iRfg8D.js +84 -0
  142. package/dist/useEventCallback-xTG9piMa.js +45 -0
  143. package/dist/useList-B0hog_3-.js +436 -0
  144. package/dist/utils/styleStrings.d.ts +1 -1
  145. package/dist/utils/styleStrings.js +7 -7
  146. package/package.json +4 -4
  147. package/dist/Dialog.module-CGVM5V_D.js +0 -15
  148. package/dist/Tab-CRwnhsj5.js +0 -254
  149. package/dist/Tabs.module-yYcTJnj6.js +0 -103
  150. package/dist/_commonjsHelpers-CT_km90n.js +0 -30
  151. package/dist/assets/global.css +0 -1
  152. package/dist/components/Button/Button.stories.js +0 -40
  153. package/dist/components/Dialog/Dialog.stories.js +0 -59
  154. package/dist/components/Dialog/Title.js +0 -29
  155. package/dist/components/Input/Input.stories.js +0 -106
  156. package/dist/components/InputSearch/InputSearch.stories.js +0 -36
  157. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
  158. package/dist/components/PageHeader/PageHeader.stories.js +0 -49
  159. package/dist/components/Toggle/Toggle.stories.js +0 -33
  160. package/dist/components/Typography/Typography.stories.js +0 -30
  161. package/dist/components/Typography/typography.test.js +0 -11357
  162. package/dist/magic-string.es-O_8lTkE3.js +0 -738
  163. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
  164. package/dist/utils/styleStrings.test.js +0 -41
  165. package/dist/vi.Y_w82WR8-Df0JUamG.js +0 -9860
@@ -1,254 +0,0 @@
1
- import { jsx as N } from "react/jsx-runtime";
2
- import * as f from "react";
3
- import { forwardRef as F, useContext as U, useMemo as j } from "react";
4
- import { c as $ } from "./clsx-DB4S2d7J.js";
5
- import { a as A, u as B, b as W, T as q, s as y } from "./Tabs.module-yYcTJnj6.js";
6
- import { a as p, _ as z } from "./objectWithoutPropertiesLoose-D7Cp0Pg_.js";
7
- import { e as O, g as G, a as J, u as k, b as K, P as o, c as Q, d as X } from "./index-CqjC7P5Y.js";
8
- import { u as Y } from "./useButton-Bc8IAgyk.js";
9
- const E = {
10
- blur: "list:blur",
11
- focus: "list:focus",
12
- itemClick: "list:itemClick",
13
- itemHover: "list:itemHover",
14
- itemsChange: "list:itemsChange",
15
- keyDown: "list:keyDown",
16
- resetHighlight: "list:resetHighlight",
17
- highlightLast: "list:highlightLast",
18
- textNavigation: "list:textNavigation",
19
- clearSelection: "list:clearSelection"
20
- }, w = /* @__PURE__ */ f.createContext(null);
21
- process.env.NODE_ENV !== "production" && (w.displayName = "ListContext");
22
- function Z(n) {
23
- const {
24
- handlePointerOverEvents: t = !1,
25
- item: e
26
- } = n, s = f.useContext(w);
27
- if (!s)
28
- throw new Error("useListItem must be used within a ListProvider");
29
- const {
30
- dispatch: i,
31
- getItemState: a
32
- } = s, {
33
- highlighted: c,
34
- selected: b,
35
- focusable: m
36
- } = a(e), h = f.useCallback((l) => (r) => {
37
- var d;
38
- if ((d = l.onClick) == null || d.call(l, r), !r.defaultPrevented) {
39
- if (process.env.NODE_ENV !== "production" && e === void 0)
40
- throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join(`
41
- `));
42
- i({
43
- type: E.itemClick,
44
- item: e,
45
- event: r
46
- });
47
- }
48
- }, [i, e]), g = f.useCallback((l) => (r) => {
49
- var d;
50
- if ((d = l.onMouseOver) == null || d.call(l, r), !r.defaultPrevented) {
51
- if (process.env.NODE_ENV !== "production" && e === void 0)
52
- throw new Error(["MUI: The `item` provided to useListItem() is undefined.", "This should happen only during server-side rendering under React 17."].join(`
53
- `));
54
- i({
55
- type: E.itemHover,
56
- item: e,
57
- event: r
58
- });
59
- }
60
- }, [i, e]);
61
- let u;
62
- return m && (u = c ? 0 : -1), {
63
- getRootProps: (l = {}) => {
64
- const r = O(l);
65
- return p({}, l, {
66
- onClick: h(r),
67
- onPointerOver: t ? g(r) : void 0,
68
- tabIndex: u
69
- });
70
- },
71
- highlighted: c,
72
- selected: b
73
- };
74
- }
75
- function ee(n, t) {
76
- return function(s = {}) {
77
- const i = p({}, s, n(s));
78
- return p({}, i, t(i));
79
- };
80
- }
81
- const I = "Tab";
82
- function te(n) {
83
- return G(I, n);
84
- }
85
- J(I, ["root", "selected", "disabled"]);
86
- function oe(n) {
87
- return n.size;
88
- }
89
- function se(n) {
90
- const {
91
- value: t,
92
- rootRef: e,
93
- disabled: s = !1,
94
- id: i
95
- } = n, a = f.useRef(null), c = A(i), {
96
- value: b,
97
- selectionFollowsFocus: m,
98
- getTabPanelId: h
99
- } = B(), g = f.useMemo(() => ({
100
- disabled: s,
101
- ref: a,
102
- id: c
103
- }), [s, a, c]), {
104
- id: u,
105
- index: v,
106
- totalItemCount: l
107
- } = W(t ?? oe, g), {
108
- getRootProps: r,
109
- highlighted: d,
110
- selected: C
111
- } = Z({
112
- item: u
113
- }), {
114
- getRootProps: R,
115
- rootRef: P,
116
- active: T,
117
- focusVisible: L,
118
- setFocusVisible: M
119
- } = Y({
120
- disabled: s,
121
- focusableWhenDisabled: !m,
122
- type: "button"
123
- }), x = k(a, e, P), V = u !== void 0 ? h(u) : void 0;
124
- return {
125
- getRootProps: (_ = {}) => {
126
- const S = O(_), D = ee(r, R);
127
- return p({}, _, D(S), {
128
- role: "tab",
129
- "aria-controls": V,
130
- "aria-selected": C,
131
- id: c,
132
- ref: x
133
- });
134
- },
135
- active: T,
136
- focusVisible: L,
137
- highlighted: d,
138
- index: v,
139
- rootRef: x,
140
- // the `selected` state isn't set on the server (it relies on effects to be calculated),
141
- // so we fall back to checking the `value` prop with the selectedValue from the TabsContext
142
- selected: C || u === b,
143
- setFocusVisible: M,
144
- totalTabsCount: l
145
- };
146
- }
147
- const ne = ["action", "children", "disabled", "onChange", "onClick", "onFocus", "slotProps", "slots", "value"], re = (n) => {
148
- const {
149
- selected: t,
150
- disabled: e
151
- } = n;
152
- return Q({
153
- root: ["root", t && "selected", e && "disabled"]
154
- }, X(te));
155
- }, H = /* @__PURE__ */ f.forwardRef(function(t, e) {
156
- var s;
157
- const {
158
- children: i,
159
- disabled: a = !1,
160
- slotProps: c = {},
161
- slots: b = {},
162
- value: m
163
- } = t, h = z(t, ne), g = f.useRef(), u = k(g, e), {
164
- active: v,
165
- highlighted: l,
166
- selected: r,
167
- getRootProps: d
168
- } = se(p({}, t, {
169
- rootRef: u,
170
- value: m
171
- })), C = p({}, t, {
172
- active: v,
173
- disabled: a,
174
- highlighted: l,
175
- selected: r
176
- }), R = re(C), P = (s = b.root) != null ? s : "button", T = K({
177
- elementType: P,
178
- getSlotProps: d,
179
- externalSlotProps: c.root,
180
- externalForwardedProps: h,
181
- additionalProps: {
182
- ref: e
183
- },
184
- ownerState: C,
185
- className: R.root
186
- });
187
- return /* @__PURE__ */ N(P, p({}, T, {
188
- children: i
189
- }));
190
- });
191
- process.env.NODE_ENV !== "production" && (H.propTypes = {
192
- // ┌────────────────────────────── Warning ──────────────────────────────┐
193
- // │ These PropTypes are generated from the TypeScript type definitions. │
194
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
195
- // └─────────────────────────────────────────────────────────────────────┘
196
- /**
197
- * A ref for imperative actions. It currently only supports `focusVisible()` action.
198
- */
199
- action: o.oneOfType([o.func, o.shape({
200
- current: o.shape({
201
- focusVisible: o.func.isRequired
202
- })
203
- })]),
204
- /**
205
- * @ignore
206
- */
207
- children: o.node,
208
- /**
209
- * If `true`, the component is disabled.
210
- * @default false
211
- */
212
- disabled: o.bool,
213
- /**
214
- * Callback invoked when new value is being set.
215
- */
216
- onChange: o.func,
217
- /**
218
- * The props used for each slot inside the Tab.
219
- * @default {}
220
- */
221
- slotProps: o.shape({
222
- root: o.oneOfType([o.func, o.object])
223
- }),
224
- /**
225
- * The components used for each slot inside the Tab.
226
- * Either a string to use a HTML element or a component.
227
- * @default {}
228
- */
229
- slots: o.shape({
230
- root: o.elementType
231
- }),
232
- /**
233
- * You can provide your own value. Otherwise, it falls back to the child position index.
234
- */
235
- value: o.oneOfType([o.number, o.string])
236
- });
237
- const be = F(
238
- ({ children: n, value: t, disabled: e, dataTestId: s }, i) => {
239
- const a = U(q), c = j(
240
- () => $(
241
- y.tabs__tab,
242
- t === (a == null ? void 0 : a.value) && y["tabs__tab--selected"],
243
- e && y["tabs__tab--disabled"]
244
- ),
245
- [t, a, e]
246
- );
247
- return /* @__PURE__ */ N(H, { className: c, disabled: e, value: t, "data-testid": s, ref: i, children: n });
248
- }
249
- );
250
- export {
251
- E as L,
252
- be as T,
253
- w as a
254
- };
@@ -1,103 +0,0 @@
1
- import './assets/Tabs.css';
2
- import * as n from "react";
3
- import { u as x } from "./useEnhancedEffect-CJGo-L3B.js";
4
- let f = 0;
5
- function y(t) {
6
- const [s, e] = n.useState(t), o = t || s;
7
- return n.useEffect(() => {
8
- s == null && (f += 1, e(`mui-${f}`));
9
- }, [s]), o;
10
- }
11
- const _ = n.useId;
12
- function E(t) {
13
- if (_ !== void 0) {
14
- const s = _();
15
- return t ?? s;
16
- }
17
- return y(t);
18
- }
19
- const p = /* @__PURE__ */ n.createContext(null);
20
- process.env.NODE_ENV !== "production" && (p.displayName = "CompoundComponentContext");
21
- function g(t) {
22
- const s = Array.from(t.keys()).map((e) => {
23
- const o = t.get(e);
24
- return {
25
- key: e,
26
- subitem: o
27
- };
28
- });
29
- return s.sort((e, o) => {
30
- const u = e.subitem.ref.current, r = o.subitem.ref.current;
31
- return u === null || r === null || u === r ? 0 : u.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
32
- }), new Map(s.map((e) => [e.key, e.subitem]));
33
- }
34
- function z() {
35
- const [t, s] = n.useState(/* @__PURE__ */ new Map()), e = n.useRef(/* @__PURE__ */ new Set()), o = n.useCallback(function(c) {
36
- e.current.delete(c), s((i) => {
37
- const a = new Map(i);
38
- return a.delete(c), a;
39
- });
40
- }, []), u = n.useCallback(function(c, i) {
41
- let a;
42
- return typeof c == "function" ? a = c(e.current) : a = c, e.current.add(a), s((C) => {
43
- const l = new Map(C);
44
- return l.set(a, i), l;
45
- }), {
46
- id: a,
47
- deregister: () => o(a)
48
- };
49
- }, [o]), r = n.useMemo(() => g(t), [t]), d = n.useCallback(function(c) {
50
- return Array.from(r.keys()).indexOf(c);
51
- }, [r]);
52
- return {
53
- contextValue: n.useMemo(() => ({
54
- getItemIndex: d,
55
- registerItem: u,
56
- totalSubitemCount: t.size
57
- }), [d, u, t.size]),
58
- subitems: r
59
- };
60
- }
61
- function T(t, s) {
62
- const e = n.useContext(p);
63
- if (e === null)
64
- throw new Error("useCompoundItem must be used within a useCompoundParent");
65
- const {
66
- registerItem: o
67
- } = e, [u, r] = n.useState(typeof t == "function" ? void 0 : t);
68
- return x(() => {
69
- const {
70
- id: d,
71
- deregister: m
72
- } = o(t, s);
73
- return r(d), m;
74
- }, [o, s, t]), {
75
- id: u,
76
- index: u !== void 0 ? e.getItemIndex(u) : -1,
77
- totalItemCount: e.totalSubitemCount
78
- };
79
- }
80
- const I = /* @__PURE__ */ n.createContext(null);
81
- process.env.NODE_ENV !== "production" && (I.displayName = "TabsContext");
82
- function D() {
83
- const t = n.useContext(I);
84
- if (t == null)
85
- throw new Error("No TabsContext provided");
86
- return t;
87
- }
88
- const N = "_tabs_18ymz_1", S = "_tabs__tab_18ymz_5", M = {
89
- tabs: N,
90
- tabs__tab: S,
91
- "tabs__tab--disabled": "_tabs__tab--disabled_18ymz_22",
92
- "tabs__tab--selected": "_tabs__tab--selected_18ymz_31",
93
- "tabs__tab-panel": "_tabs__tab-panel_18ymz_35"
94
- };
95
- export {
96
- p as C,
97
- I as T,
98
- E as a,
99
- T as b,
100
- z as c,
101
- M as s,
102
- D as u
103
- };
@@ -1,30 +0,0 @@
1
- var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function f(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
5
- function l(e) {
6
- if (e.__esModule)
7
- return e;
8
- var r = e.default;
9
- if (typeof r == "function") {
10
- var t = function o() {
11
- return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
12
- };
13
- t.prototype = r.prototype;
14
- } else
15
- t = {};
16
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
17
- var n = Object.getOwnPropertyDescriptor(e, o);
18
- Object.defineProperty(t, o, n.get ? n : {
19
- enumerable: !0,
20
- get: function() {
21
- return e[o];
22
- }
23
- });
24
- }), t;
25
- }
26
- export {
27
- l as a,
28
- u as c,
29
- f as g
30
- };
@@ -1 +0,0 @@
1
- :root{--secondary-orange: #ffa945;--secondary-orange-rgb: 255, 169, 69;--secondary-orange-dark: #fe8d53;--secondary-orange-dark-rgb: 254, 141, 83;--secondary-orange-light: #525061;--secondary-orange-light-rgb: 82, 80, 97;--secondary-green: #99dec3;--secondary-green-rgb: 153, 222, 195;--secondary-green-dark: #6acbb1;--secondary-green-dark-rgb: 106, 203, 177;--secondary-green-darker: #31aa7e;--secondary-green-darker-rgb: 49, 170, 126;--secondary-green-light: #baedd9;--secondary-green-light-rgb: 186, 237, 217;--accent: #1897f3;--accent-rgb: 24, 151, 243;--accent-dark: #1672c7;--accent-dark-rgb: 22, 114, 199;--accent-light: #4fb1f9;--accent-light-rgb: 79, 177, 249;--accent-lighter: #8ae1fd;--accent-lighter-rgb: 138, 225, 253;--alert: #df4561;--alert-rgb: 223, 69, 97;--alert-dark: #bb2b45;--alert-dark-rgb: 187, 43, 69;--accent-alert-light: #f37c91;--accent-alert-light-rgb: 243, 124, 145;--cream: #fafafa;--cream-rgb: 250, 250, 250;--hover: #42b7ff;--hover-rgb: 66, 183, 255;--active: #0a75cc;--active-rgb: 10, 117, 204}:root{--gray-100: #16161e;--gray-100-rgb: 22, 22, 30;--gray-95: #3f3d4b;--gray-95-rgb: 63, 61, 75;--gray-90: #525061;--gray-90-rgb: 82, 80, 97;--gray-75: #838192;--gray-75-rgb: 131, 129, 146;--gray-50: #bcbac8;--gray-50-rgb: 188, 186, 200;--gray-25: #dbdae2;--gray-25-rgb: 219, 218, 226;--gray-10: #ebeaf0;--gray-10-rgb: 235, 234, 240;--gray-5: #f7f7fc;--gray-5-rgb: 247, 247, 252;--black-100: #000000;--black-100-rgb: 0, 0, 0;--black-75: #616161;--black-75-rgb: 97, 97, 97;--black-50: #838192;--black-50-rgb: 131, 129, 146;--black-25: #bcbac8;--black-25-rgb: 188, 186, 200;--black-10: #ebeaf0;--black-10-rgb: 235, 234, 240;--white-100: #ffffff;--white-100-rgb: 255, 255, 255}:root{--heading-font-weight: 700;--heading-font-size-xl: 3.75rem;--heading-line-height-xl: 4.875rem;--heading-font-size-l: 3rem;--heading-line-height-l: 3.9375rem;--heading-font-size: 2.25rem;--heading-line-height: 2.875rem;--heading-font-size-s: 1.5rem;--heading-line-height-s: 2rem;--body-font-size: 1rem;--body-line-height: 1.3125rem;--body-weight: normal;--body-bold: bold;--body-font-size-large: 1.5rem;--body-line-height-large: 1.625rem;--body-font-size-medium: 1.125;--body-line-height-medium: 1rem;--body-font-size-small: .875rem;--body-line-height-small: 1.125rem;--body-font-size-tiny: .75rem;--body-line-height-tiny: 1rem;--quote-font-size-large: 1.5rem;--quote-line-height-large: 2rem;--quote-font-weight-large: normal;--quote-font-size: 1rem;--quote-line-height: 1.3125rem;--quote-font-weight: normal;--form-input-font-size: 1rem;--form-input-line-height: 1.3125rem;--form-input-font-weight: bold;--form-hint-font-size: .875rem;--form-hint-line-height: 1.3125rem;--form-hint-font-weight: normal;--form-label-font-size: .875rem;--form-label-line-height: 1.3125rem;--form-label-font-weight: normal;--form-dropdown-font-size: 1rem;--form-dropdown-line-height: 1.3125rem;--form-dropdown-font-weight: normal;--table-font-size: .875rem;--table-line-height: 1.0625rem;--table-header-font-weight: bold;--table-body-font-weight: normal;--table-body-secondary-line-height: 1.3125rem;--button-font-size: 1rem;--button-line-height: 1.25rem;--button-font-weight: bold}:root{--spacing: 8px;--border-radius: 6px;--border-radius-soft: 4px;--transition-soft: .3s;--transition-long: .75s}*{box-sizing:border-box}
@@ -1,40 +0,0 @@
1
- import '../../assets/global.css';
2
- import { jsx as t } from "react/jsx-runtime";
3
- /* empty css */
4
- import { Button as i } from "./Button.js";
5
- import "react";
6
- import "../Dialog/Backdrop.js";
7
- import "../Typography/Typography.js";
8
- import "../IconButton/IconButton.js";
9
- import "../Table/Table.js";
10
- import "../Tabs/Tabs.js";
11
- const d = {
12
- title: "Components/Button",
13
- component: i,
14
- tags: ["autodocs"],
15
- decorators: [
16
- (o) => /* @__PURE__ */ t("div", { style: { padding: "1em" }, children: /* @__PURE__ */ t(o, {}) })
17
- ],
18
- argTypes: {
19
- onClick: {
20
- if: { arg: "link", exists: !1 }
21
- },
22
- type: {
23
- control: { type: "text" },
24
- if: { arg: "onClick", exists: !0 }
25
- },
26
- link: {
27
- control: { type: "text" },
28
- if: { arg: "onClick", exists: !1 }
29
- }
30
- }
31
- }, k = {
32
- args: { children: "Button", onClick: () => alert("Button was clicked!") }
33
- }, f = {
34
- args: { children: "Button", link: "https://marola.pismolabs.io" }
35
- };
36
- export {
37
- f as Link,
38
- k as Simple,
39
- d as default
40
- };
@@ -1,59 +0,0 @@
1
- import '../../assets/global.css';
2
- import { jsx as e, Fragment as r, jsxs as i } from "react/jsx-runtime";
3
- import { useState as m } from "react";
4
- /* empty css */
5
- import { Button as l } from "../Button/Button.js";
6
- import { Dialog as a } from "./Dialog.js";
7
- import "../IconButton/IconButton.js";
8
- import { Typography as n } from "../Typography/Typography.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 q = {
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 [d, t] = m(!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: d,
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 y = {
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
- y as Simple,
58
- q as default
59
- };
@@ -1,29 +0,0 @@
1
- import { jsxs as l, Fragment as s, jsx as e } from "react/jsx-runtime";
2
- import { Typography as a } from "../Typography/Typography.js";
3
- import { s as r } from "../../Dialog.module-CGVM5V_D.js";
4
- const n = ({ title: i, subTitle: t }) => /* @__PURE__ */ l(s, { children: [
5
- /* @__PURE__ */ e(
6
- a,
7
- {
8
- element: "h1",
9
- elementProps: { id: "alert-dialog-title" },
10
- variant: "h4",
11
- className: r.dialog__title,
12
- children: i
13
- }
14
- ),
15
- /* @__PURE__ */ e("hr", { className: r.dialog__divider, "aria-hidden": !0 }),
16
- t && /* @__PURE__ */ e(
17
- a,
18
- {
19
- element: "h2",
20
- elementProps: { id: "alert-dialog-description" },
21
- variant: "h4",
22
- className: r.dialog__subtitle,
23
- children: t
24
- }
25
- )
26
- ] });
27
- export {
28
- n as default
29
- };
@@ -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,36 +0,0 @@
1
- import { InputSearch as a } from "./InputSearch.js";
2
- const l = {
3
- title: "Components/InputSearch",
4
- component: a,
5
- tags: ["autodocs"],
6
- parameters: {
7
- layout: "padded"
8
- }
9
- }, r = {
10
- args: {}
11
- }, t = {
12
- name: "With label",
13
- args: {
14
- label: "Search by name or id"
15
- }
16
- }, o = {
17
- name: "With placeholder",
18
- args: {
19
- label: "Search",
20
- placeholder: "Search by name or id"
21
- }
22
- }, c = {
23
- args: {
24
- label: "Search",
25
- placeholder: "Search by name or id",
26
- value: "Marola DS",
27
- disabled: !0
28
- }
29
- };
30
- export {
31
- c as Disabled,
32
- r as Simple,
33
- t as WithLabel,
34
- o as WithPlaceholder,
35
- l as default
36
- };