@pismo/marola 0.0.1-alpha.19 → 0.0.1-alpha.2
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/README.md +5 -17
- package/dist/Button-REznN-RP.js +1139 -0
- package/dist/Dialog.module-BO0mdB7d.js +15 -0
- package/dist/assets/CallToActionButton.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -0
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +23 -0
- package/dist/components/CallToActionButton/CallToActionButton.js +57 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +1 -1
- package/dist/components/Dialog/Backdrop.js +9 -2
- package/dist/components/Dialog/CloseIconButton.js +10 -11
- package/dist/components/Dialog/Dialog.d.ts +4 -5
- package/dist/components/Dialog/Dialog.js +20103 -445
- package/dist/components/Dialog/Title.js +7 -22
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
- package/dist/components/LoadingSpinner/LoadingSpinner.js +13 -12
- package/dist/components/Typography/Typography.d.ts +6 -17
- package/dist/components/Typography/Typography.js +64 -85
- package/dist/main.d.ts +3 -25
- package/dist/main.js +15 -62
- package/dist/types/helpers.d.ts +7 -14
- package/package.json +9 -51
- package/src/playground/Playground.tsx +58 -0
- package/dist/Button-2b1peDFT.js +0 -130
- package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
- package/dist/Dialog.module-B8COssqi.js +0 -15
- package/dist/Popup-B6ZSGIEI.js +0 -1248
- package/dist/Portal-DIeBsWdL.js +0 -73
- package/dist/SelectButton-pciwIWcj.js +0 -46
- package/dist/Tabs.module-jkH1Qjn7.js +0 -22
- package/dist/assets/Advice.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Checkbox.css +0 -1
- package/dist/assets/Chip.css +0 -1
- package/dist/assets/IconButton.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/InputSearch.css +0 -1
- package/dist/assets/PageHeader.css +0 -1
- package/dist/assets/Pagination.css +0 -1
- package/dist/assets/SelectButton.css +0 -1
- package/dist/assets/Skeleton.css +0 -1
- package/dist/assets/Snackbar.css +0 -1
- package/dist/assets/SortTooltip.css +0 -1
- package/dist/assets/Stepper.css +0 -1
- package/dist/assets/Table.css +0 -1
- package/dist/assets/Tabs.css +0 -1
- package/dist/assets/TextDisplay.css +0 -1
- package/dist/assets/Toggle.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
- package/dist/components/Advice/Advice.d.ts +0 -28
- package/dist/components/Advice/Advice.js +0 -25
- package/dist/components/Advice/Advice.stories.d.ts +0 -16
- package/dist/components/Button/Button.d.ts +0 -32
- package/dist/components/Button/Button.js +0 -94
- package/dist/components/Button/Button.stories.d.ts +0 -62
- package/dist/components/Checkbox/Checkbox.d.ts +0 -34
- package/dist/components/Checkbox/Checkbox.js +0 -56
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
- package/dist/components/Chip/Chip.d.ts +0 -37
- package/dist/components/Chip/Chip.js +0 -143
- package/dist/components/Chip/Chip.stories.d.ts +0 -40
- package/dist/components/Chip/chip.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
- package/dist/components/Icon/Icon.d.ts +0 -27
- package/dist/components/Icon/Icon.js +0 -116
- package/dist/components/Icon/Icon.stories.d.ts +0 -16
- package/dist/components/IconButton/Icon.stories.d.ts +0 -15
- package/dist/components/IconButton/IconButton.d.ts +0 -36
- package/dist/components/IconButton/IconButton.js +0 -70
- package/dist/components/Input/Input.d.ts +0 -44
- package/dist/components/Input/Input.js +0 -496
- package/dist/components/Input/Input.stories.d.ts +0 -43
- package/dist/components/InputSearch/InputSearch.d.ts +0 -9
- package/dist/components/InputSearch/InputSearch.js +0 -34
- package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
- package/dist/components/PageHeader/PageHeader.d.ts +0 -36
- package/dist/components/PageHeader/PageHeader.js +0 -51
- package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -43
- package/dist/components/Pagination/Pagination.d.ts +0 -55
- package/dist/components/Pagination/Pagination.js +0 -222
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
- package/dist/components/Select/Select.d.ts +0 -26
- package/dist/components/Select/Select.js +0 -857
- package/dist/components/Select/Select.stories.d.ts +0 -22
- package/dist/components/Select/SelectButton.d.ts +0 -12
- package/dist/components/Select/SelectButton.js +0 -8
- package/dist/components/Skeleton/Skeleton.d.ts +0 -25
- package/dist/components/Skeleton/Skeleton.js +0 -23
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
- package/dist/components/Snackbar/Snackbar.d.ts +0 -25
- package/dist/components/Snackbar/Snackbar.js +0 -622
- package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -318
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
- package/dist/components/SortTooltip/SortTooltip.js +0 -78
- package/dist/components/Stepper/Stepper.d.ts +0 -26
- package/dist/components/Stepper/Stepper.js +0 -33
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
- package/dist/components/Table/Table.d.ts +0 -39
- package/dist/components/Table/Table.js +0 -120
- package/dist/components/Table/TableContext.d.ts +0 -19
- package/dist/components/Table/TableContext.js +0 -21
- package/dist/components/Tabs/Tab.d.ts +0 -14
- package/dist/components/Tabs/Tab.js +0 -181
- package/dist/components/Tabs/Tab.stories.d.ts +0 -15
- package/dist/components/Tabs/TabPanel.d.ts +0 -12
- package/dist/components/Tabs/TabPanel.js +0 -118
- package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
- package/dist/components/Tabs/Tabs.d.ts +0 -15
- package/dist/components/Tabs/Tabs.js +0 -401
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
- package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
- package/dist/components/TextDisplay/TextDisplay.js +0 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
- package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -11
- package/dist/components/Toggle/Toggle.js +0 -251
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
- package/dist/components/Tooltip/Tooltip.d.ts +0 -29
- package/dist/components/Tooltip/Tooltip.js +0 -139
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -33
- package/dist/components/Typography/Typography.stories.d.ts +0 -32
- package/dist/components/Typography/typography.test.d.ts +0 -1
- package/dist/index-CH45lKw7.js +0 -840
- package/dist/index-CjW42-M-.js +0 -19584
- package/dist/marola.css +0 -1
- package/dist/test-utils/assertStyles.d.ts +0 -1
- package/dist/test-utils/assertStyles.js +0 -11
- package/dist/useButton-DNk3wrQp.js +0 -105
- package/dist/useCompoundItem-D1iRfg8D.js +0 -84
- package/dist/useControlled-CCMYYdCM.js +0 -31
- package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
- package/dist/useEventCallback-xTG9piMa.js +0 -45
- package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
- package/dist/useList-B0hog_3-.js +0 -436
- package/dist/useTimeout-DxF9kiZL.js +0 -36
- package/dist/utils/styleStrings.d.ts +0 -6
- package/dist/utils/styleStrings.js +0 -10
- package/dist/utils/styleStrings.test.d.ts +0 -1
package/dist/Button-2b1peDFT.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { g as T, a as _, _ as x, b as i, c as B, P as e, d as O, e as D } from "./index-CH45lKw7.js";
|
|
2
|
-
import * as c from "react";
|
|
3
|
-
import { jsx as F } from "react/jsx-runtime";
|
|
4
|
-
import { u as S } from "./useButton-DNk3wrQp.js";
|
|
5
|
-
const m = "Button";
|
|
6
|
-
function U(s) {
|
|
7
|
-
return T(m, s);
|
|
8
|
-
}
|
|
9
|
-
_(m, ["root", "active", "disabled", "focusVisible"]);
|
|
10
|
-
const W = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVisible", "slotProps", "slots", "rootElementName"], j = (s) => {
|
|
11
|
-
const {
|
|
12
|
-
active: o,
|
|
13
|
-
disabled: n,
|
|
14
|
-
focusVisible: r
|
|
15
|
-
} = s;
|
|
16
|
-
return O({
|
|
17
|
-
root: ["root", n && "disabled", r && "focusVisible", o && "active"]
|
|
18
|
-
}, D(U));
|
|
19
|
-
}, w = /* @__PURE__ */ c.forwardRef(function(o, n) {
|
|
20
|
-
var r;
|
|
21
|
-
const {
|
|
22
|
-
action: u,
|
|
23
|
-
children: h,
|
|
24
|
-
focusableWhenDisabled: f = !1,
|
|
25
|
-
slotProps: P = {},
|
|
26
|
-
slots: l = {},
|
|
27
|
-
rootElementName: N = "button"
|
|
28
|
-
} = o, t = x(o, W), g = c.useRef();
|
|
29
|
-
let a = N;
|
|
30
|
-
typeof l.root == "string" ? a = l.root : (t.href || t.to) && (a = "a");
|
|
31
|
-
const {
|
|
32
|
-
active: y,
|
|
33
|
-
focusVisible: E,
|
|
34
|
-
setFocusVisible: d,
|
|
35
|
-
getRootProps: V
|
|
36
|
-
} = S(i({}, o, {
|
|
37
|
-
focusableWhenDisabled: f,
|
|
38
|
-
rootElementName: a
|
|
39
|
-
}));
|
|
40
|
-
c.useImperativeHandle(u, () => ({
|
|
41
|
-
focusVisible: () => {
|
|
42
|
-
d(!0), g.current.focus();
|
|
43
|
-
}
|
|
44
|
-
}), [d]);
|
|
45
|
-
const p = i({}, o, {
|
|
46
|
-
active: y,
|
|
47
|
-
focusableWhenDisabled: f,
|
|
48
|
-
focusVisible: E
|
|
49
|
-
}), v = j(p), C = t.href || t.to ? "a" : "button", b = (r = l.root) != null ? r : C, R = B({
|
|
50
|
-
elementType: b,
|
|
51
|
-
getSlotProps: V,
|
|
52
|
-
externalForwardedProps: t,
|
|
53
|
-
externalSlotProps: P.root,
|
|
54
|
-
additionalProps: {
|
|
55
|
-
ref: n
|
|
56
|
-
},
|
|
57
|
-
ownerState: p,
|
|
58
|
-
className: v.root
|
|
59
|
-
});
|
|
60
|
-
return /* @__PURE__ */ F(b, i({}, R, {
|
|
61
|
-
children: h
|
|
62
|
-
}));
|
|
63
|
-
});
|
|
64
|
-
process.env.NODE_ENV !== "production" && (w.propTypes = {
|
|
65
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
66
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
67
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
68
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
69
|
-
/**
|
|
70
|
-
* A ref for imperative actions. It currently only supports `focusVisible()` action.
|
|
71
|
-
*/
|
|
72
|
-
action: e.oneOfType([e.func, e.shape({
|
|
73
|
-
current: e.shape({
|
|
74
|
-
focusVisible: e.func.isRequired
|
|
75
|
-
})
|
|
76
|
-
})]),
|
|
77
|
-
/**
|
|
78
|
-
* @ignore
|
|
79
|
-
*/
|
|
80
|
-
children: e.node,
|
|
81
|
-
/**
|
|
82
|
-
* @ignore
|
|
83
|
-
*/
|
|
84
|
-
className: e.string,
|
|
85
|
-
/**
|
|
86
|
-
* If `true`, the component is disabled.
|
|
87
|
-
* @default false
|
|
88
|
-
*/
|
|
89
|
-
disabled: e.bool,
|
|
90
|
-
/**
|
|
91
|
-
* If `true`, allows a disabled button to receive focus.
|
|
92
|
-
* @default false
|
|
93
|
-
*/
|
|
94
|
-
focusableWhenDisabled: e.bool,
|
|
95
|
-
/**
|
|
96
|
-
* @ignore
|
|
97
|
-
*/
|
|
98
|
-
href: e.string,
|
|
99
|
-
/**
|
|
100
|
-
* @ignore
|
|
101
|
-
*/
|
|
102
|
-
onFocusVisible: e.func,
|
|
103
|
-
/**
|
|
104
|
-
* The HTML element that is ultimately rendered, for example 'button' or 'a'
|
|
105
|
-
* @default 'button'
|
|
106
|
-
*/
|
|
107
|
-
rootElementName: e.string,
|
|
108
|
-
/**
|
|
109
|
-
* The props used for each slot inside the Button.
|
|
110
|
-
* @default {}
|
|
111
|
-
*/
|
|
112
|
-
slotProps: e.shape({
|
|
113
|
-
root: e.oneOfType([e.func, e.object])
|
|
114
|
-
}),
|
|
115
|
-
/**
|
|
116
|
-
* The components used for each slot inside the Button.
|
|
117
|
-
* Either a string to use a HTML element or a component.
|
|
118
|
-
* @default {}
|
|
119
|
-
*/
|
|
120
|
-
slots: e.shape({
|
|
121
|
-
root: e.elementType
|
|
122
|
-
}),
|
|
123
|
-
/**
|
|
124
|
-
* @ignore
|
|
125
|
-
*/
|
|
126
|
-
to: e.string
|
|
127
|
-
});
|
|
128
|
-
export {
|
|
129
|
-
w as B
|
|
130
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import * as t from "react";
|
|
2
|
-
import { u as C, P as f } from "./index-CH45lKw7.js";
|
|
3
|
-
import { jsx as w } from "react/jsx-runtime";
|
|
4
|
-
import { u as L, o as h, e as b } from "./useEventCallback-xTG9piMa.js";
|
|
5
|
-
import { e as g } from "./index-CjW42-M-.js";
|
|
6
|
-
function T(c) {
|
|
7
|
-
return c.substring(2).toLowerCase();
|
|
8
|
-
}
|
|
9
|
-
function D(c, s) {
|
|
10
|
-
return s.documentElement.clientWidth < c.clientX || s.documentElement.clientHeight < c.clientY;
|
|
11
|
-
}
|
|
12
|
-
function v(c) {
|
|
13
|
-
const {
|
|
14
|
-
children: s,
|
|
15
|
-
disableReactTree: y = !1,
|
|
16
|
-
mouseEvent: i = "onClick",
|
|
17
|
-
onClickAway: P,
|
|
18
|
-
touchEvent: u = "onTouchEnd"
|
|
19
|
-
} = c, l = t.useRef(!1), o = t.useRef(null), d = t.useRef(!1), p = t.useRef(!1);
|
|
20
|
-
t.useEffect(() => (setTimeout(() => {
|
|
21
|
-
d.current = !0;
|
|
22
|
-
}, 0), () => {
|
|
23
|
-
d.current = !1;
|
|
24
|
-
}), []);
|
|
25
|
-
const k = C(
|
|
26
|
-
// @ts-expect-error TODO upstream fix
|
|
27
|
-
s.ref,
|
|
28
|
-
o
|
|
29
|
-
), a = L((e) => {
|
|
30
|
-
const n = p.current;
|
|
31
|
-
p.current = !1;
|
|
32
|
-
const r = h(o.current);
|
|
33
|
-
if (!d.current || !o.current || "clientX" in e && D(e, r))
|
|
34
|
-
return;
|
|
35
|
-
if (l.current) {
|
|
36
|
-
l.current = !1;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
let E;
|
|
40
|
-
e.composedPath ? E = e.composedPath().indexOf(o.current) > -1 : E = !r.documentElement.contains(
|
|
41
|
-
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
42
|
-
e.target
|
|
43
|
-
) || o.current.contains(
|
|
44
|
-
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
45
|
-
e.target
|
|
46
|
-
), !E && (y || !n) && P(e);
|
|
47
|
-
}), R = (e) => (n) => {
|
|
48
|
-
p.current = !0;
|
|
49
|
-
const r = s.props[e];
|
|
50
|
-
r && r(n);
|
|
51
|
-
}, m = {
|
|
52
|
-
ref: k
|
|
53
|
-
};
|
|
54
|
-
return u !== !1 && (m[u] = R(u)), t.useEffect(() => {
|
|
55
|
-
if (u !== !1) {
|
|
56
|
-
const e = T(u), n = h(o.current), r = () => {
|
|
57
|
-
l.current = !0;
|
|
58
|
-
};
|
|
59
|
-
return n.addEventListener(e, a), n.addEventListener("touchmove", r), () => {
|
|
60
|
-
n.removeEventListener(e, a), n.removeEventListener("touchmove", r);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}, [a, u]), i !== !1 && (m[i] = R(i)), t.useEffect(() => {
|
|
64
|
-
if (i !== !1) {
|
|
65
|
-
const e = T(i), n = h(o.current);
|
|
66
|
-
return n.addEventListener(e, a), () => {
|
|
67
|
-
n.removeEventListener(e, a);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}, [a, i]), /* @__PURE__ */ w(t.Fragment, {
|
|
71
|
-
children: /* @__PURE__ */ t.cloneElement(s, m)
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
process.env.NODE_ENV !== "production" && (v.propTypes = {
|
|
75
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
76
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
77
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
78
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
79
|
-
/**
|
|
80
|
-
* The wrapped element.
|
|
81
|
-
*/
|
|
82
|
-
children: b.isRequired,
|
|
83
|
-
/**
|
|
84
|
-
* If `true`, the React tree is ignored and only the DOM tree is considered.
|
|
85
|
-
* This prop changes how portaled elements are handled.
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
disableReactTree: f.bool,
|
|
89
|
-
/**
|
|
90
|
-
* The mouse event to listen to. You can disable the listener by providing `false`.
|
|
91
|
-
* @default 'onClick'
|
|
92
|
-
*/
|
|
93
|
-
mouseEvent: f.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
|
|
94
|
-
/**
|
|
95
|
-
* Callback fired when a "click away" event is detected.
|
|
96
|
-
*/
|
|
97
|
-
onClickAway: f.func.isRequired,
|
|
98
|
-
/**
|
|
99
|
-
* The touch event to listen to. You can disable the listener by providing `false`.
|
|
100
|
-
* @default 'onTouchEnd'
|
|
101
|
-
*/
|
|
102
|
-
touchEvent: f.oneOf(["onTouchEnd", "onTouchStart", !1])
|
|
103
|
-
});
|
|
104
|
-
process.env.NODE_ENV !== "production" && (v.propTypes = g(v.propTypes));
|
|
105
|
-
export {
|
|
106
|
-
v as C
|
|
107
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import './assets/Dialog.css';
|
|
2
|
-
const _ = "_dialog_aobxu_1", o = "_dialog__backdrop_aobxu_11", a = "_dialog__panel_aobxu_19", i = "_dialog__title_aobxu_35", l = "_dialog__subtitle_aobxu_42", d = "_dialog__divider_aobxu_51", t = "_dialog__actions_aobxu_64", g = {
|
|
3
|
-
dialog: _,
|
|
4
|
-
dialog__backdrop: o,
|
|
5
|
-
dialog__panel: a,
|
|
6
|
-
dialog__title: i,
|
|
7
|
-
"dialog__title--small": "_dialog__title--small_aobxu_39",
|
|
8
|
-
dialog__subtitle: l,
|
|
9
|
-
dialog__divider: d,
|
|
10
|
-
"dialog__close-icon": "_dialog__close-icon_aobxu_55",
|
|
11
|
-
dialog__actions: t
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
g as s
|
|
15
|
-
};
|