@plastic-js/tsumiki 0.1.22 → 0.1.24
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 +838 -65
- package/dist/components/Accordion.js +93 -4
- package/dist/components/Avatar.js +96 -4
- package/dist/components/BottomSheet.js +131 -0
- package/dist/components/Button.js +194 -0
- package/dist/components/CardNumberInput.js +28 -44
- package/dist/components/Carousel.js +71 -5
- package/dist/components/Checkbox.js +178 -4
- package/dist/components/Clipboard.js +135 -5
- package/dist/components/CloseButton.js +97 -0
- package/dist/components/Collapsible.js +22 -4
- package/dist/components/ColorPicker.js +327 -4
- package/dist/components/Combobox.js +86 -13
- package/dist/components/ConfirmDialog.js +174 -19
- package/dist/components/DateInput.js +437 -5
- package/dist/components/{DatePickerMobile/wheel.js → DateWheel.js} +1 -3
- package/dist/components/Dialog.js +214 -110
- package/dist/components/Drawer.js +169 -4
- package/dist/components/Field.js +121 -5
- package/dist/components/Fieldset.js +64 -5
- package/dist/components/FileUpload.js +181 -4
- package/dist/components/FocusTrap.js +0 -2
- package/dist/components/Icon.js +32 -17
- package/dist/components/Input.js +211 -0
- package/dist/components/Listbox.js +47 -4
- package/dist/components/Menu.js +99 -4
- package/dist/components/MoneyInput.js +33 -85
- package/dist/components/NumberInput.js +117 -4
- package/dist/components/Pagination.js +91 -5
- package/dist/components/Popover.js +123 -4
- package/dist/components/Portal.js +0 -2
- package/dist/components/Presence.js +0 -2
- package/dist/components/Progress.js +107 -4
- package/dist/components/RadioGroup.js +104 -4
- package/dist/components/RatingGroup.js +75 -4
- package/dist/components/SearchInput.js +60 -55
- package/dist/components/Select.js +428 -5
- package/dist/components/SelectPc.js +239 -0
- package/dist/components/SignaturePad.js +77 -4
- package/dist/components/Skeleton.js +2 -4
- package/dist/components/Slider.js +112 -4
- package/dist/components/Spinner.js +41 -0
- package/dist/components/Splitter.js +51 -4
- package/dist/components/Steps.js +259 -4
- package/dist/components/SwipeReveal.js +2 -4
- package/dist/components/Switch.js +147 -4
- package/dist/components/Tabs.js +80 -4
- package/dist/components/TagsInput.js +128 -4
- package/dist/components/Toast.js +174 -4
- package/dist/components/Toggle.js +39 -4
- package/dist/components/ToggleGroup.js +103 -4
- package/dist/components/Tour.js +63 -4
- package/dist/components/TreeView.js +113 -4
- package/dist/index.js +44 -45
- package/dist/tsumiki.css +1 -0
- package/docs/api.md +670 -0
- package/docs/component-api-pattern.md +362 -0
- package/package.json +16 -6
- package/src/styles/color.css +112 -0
- package/src/styles/index.css +1 -0
- package/src/styles/radius.css +27 -0
- package/src/styles/reset.css +111 -0
- package/src/styles/shadow.css +5 -0
- package/src/styles/sizing.css +59 -0
- package/src/styles/spacing.css +9 -0
- package/src/styles/theme.css +38 -0
- package/src/styles/tokens.css +22 -0
- package/src/styles/transition.css +5 -0
- package/src/styles/typography.css +8 -0
- package/dist/components/Accordion.js.map +0 -1
- package/dist/components/Avatar.js.map +0 -1
- package/dist/components/CardNumberInput.js.map +0 -1
- package/dist/components/Carousel.js.map +0 -1
- package/dist/components/Checkbox.js.map +0 -1
- package/dist/components/Clipboard.js.map +0 -1
- package/dist/components/Collapsible.js.map +0 -1
- package/dist/components/ColorPicker.js.map +0 -1
- package/dist/components/Combobox.js.map +0 -1
- package/dist/components/ConfirmDialog.js.map +0 -1
- package/dist/components/DateInput.js.map +0 -1
- package/dist/components/DatePicker.js +0 -7
- package/dist/components/DatePicker.js.map +0 -1
- package/dist/components/DatePickerMobile/index.js +0 -479
- package/dist/components/DatePickerMobile/index.js.map +0 -1
- package/dist/components/DatePickerMobile/wheel.js.map +0 -1
- package/dist/components/Dialog.js.map +0 -1
- package/dist/components/Drawer.js.map +0 -1
- package/dist/components/Field.js.map +0 -1
- package/dist/components/Fieldset.js.map +0 -1
- package/dist/components/FileUpload.js.map +0 -1
- package/dist/components/FilterableSelect.js +0 -210
- package/dist/components/FilterableSelect.js.map +0 -1
- package/dist/components/FilterableSelectMobile.js +0 -167
- package/dist/components/FilterableSelectMobile.js.map +0 -1
- package/dist/components/FocusTrap.js.map +0 -1
- package/dist/components/HoverCard.js +0 -7
- package/dist/components/HoverCard.js.map +0 -1
- package/dist/components/Icon.js.map +0 -1
- package/dist/components/Listbox.js.map +0 -1
- package/dist/components/Menu.js.map +0 -1
- package/dist/components/MoneyInput.js.map +0 -1
- package/dist/components/NumberInput.js.map +0 -1
- package/dist/components/Pagination.js.map +0 -1
- package/dist/components/Popover.js.map +0 -1
- package/dist/components/Portal.js.map +0 -1
- package/dist/components/Presence.js.map +0 -1
- package/dist/components/Progress.js.map +0 -1
- package/dist/components/RadioGroup.js.map +0 -1
- package/dist/components/RatingGroup.js.map +0 -1
- package/dist/components/SearchInput.js.map +0 -1
- package/dist/components/Select.js.map +0 -1
- package/dist/components/SelectMobile/anatomy.js +0 -10
- package/dist/components/SelectMobile/anatomy.js.map +0 -1
- package/dist/components/SelectMobile/index.js +0 -310
- package/dist/components/SelectMobile/index.js.map +0 -1
- package/dist/components/SignaturePad.js.map +0 -1
- package/dist/components/Skeleton.js.map +0 -1
- package/dist/components/Slider.js.map +0 -1
- package/dist/components/Splitter.js.map +0 -1
- package/dist/components/Steps.js.map +0 -1
- package/dist/components/SwipeReveal.js.map +0 -1
- package/dist/components/Switch.js.map +0 -1
- package/dist/components/Tabs.js.map +0 -1
- package/dist/components/TagsInput.js.map +0 -1
- package/dist/components/Toast.js.map +0 -1
- package/dist/components/Toggle.js.map +0 -1
- package/dist/components/ToggleGroup.js.map +0 -1
- package/dist/components/Tooltip.js +0 -7
- package/dist/components/Tooltip.js.map +0 -1
- package/dist/components/Tour.js.map +0 -1
- package/dist/components/TreeView.js.map +0 -1
- package/dist/node_modules/framesync/dist/es/create-render-step.js +0 -54
- package/dist/node_modules/framesync/dist/es/create-render-step.js.map +0 -1
- package/dist/node_modules/framesync/dist/es/index.js +0 -61
- package/dist/node_modules/framesync/dist/es/index.js.map +0 -1
- package/dist/node_modules/framesync/dist/es/on-next-frame.js +0 -8
- package/dist/node_modules/framesync/dist/es/on-next-frame.js.map +0 -1
- package/dist/node_modules/hey-listen/dist/hey-listen.es.js +0 -15
- package/dist/node_modules/hey-listen/dist/hey-listen.es.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/generators/decay.js +0 -24
- package/dist/node_modules/popmotion/dist/es/animations/generators/decay.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/generators/keyframes.js +0 -40
- package/dist/node_modules/popmotion/dist/es/animations/generators/keyframes.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/generators/spring.js +0 -96
- package/dist/node_modules/popmotion/dist/es/animations/generators/spring.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/index.js +0 -94
- package/dist/node_modules/popmotion/dist/es/animations/index.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/inertia.js +0 -74
- package/dist/node_modules/popmotion/dist/es/animations/inertia.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js +0 -21
- package/dist/node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/utils/elapsed.js +0 -14
- package/dist/node_modules/popmotion/dist/es/animations/utils/elapsed.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/animations/utils/find-spring.js +0 -68
- package/dist/node_modules/popmotion/dist/es/animations/utils/find-spring.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/easing/index.js +0 -28
- package/dist/node_modules/popmotion/dist/es/easing/index.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/easing/utils.js +0 -13
- package/dist/node_modules/popmotion/dist/es/easing/utils.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/clamp.js +0 -6
- package/dist/node_modules/popmotion/dist/es/utils/clamp.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/hsla-to-rgba.js +0 -35
- package/dist/node_modules/popmotion/dist/es/utils/hsla-to-rgba.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/inc.js +0 -6
- package/dist/node_modules/popmotion/dist/es/utils/inc.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/interpolate.js +0 -69
- package/dist/node_modules/popmotion/dist/es/utils/interpolate.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/mix-color.js +0 -45
- package/dist/node_modules/popmotion/dist/es/utils/mix-color.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/mix-complex.js +0 -61
- package/dist/node_modules/popmotion/dist/es/utils/mix-complex.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/mix.js +0 -6
- package/dist/node_modules/popmotion/dist/es/utils/mix.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/pipe.js +0 -7
- package/dist/node_modules/popmotion/dist/es/utils/pipe.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/progress.js +0 -9
- package/dist/node_modules/popmotion/dist/es/utils/progress.js.map +0 -1
- package/dist/node_modules/popmotion/dist/es/utils/velocity-per-second.js +0 -8
- package/dist/node_modules/popmotion/dist/es/utils/velocity-per-second.js.map +0 -1
- package/dist/node_modules/popmotion/node_modules/tslib/tslib.es6.js +0 -13
- package/dist/node_modules/popmotion/node_modules/tslib/tslib.es6.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/color/hex.js +0 -39
- package/dist/node_modules/style-value-types/dist/es/color/hex.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/color/hsla.js +0 -16
- package/dist/node_modules/style-value-types/dist/es/color/hsla.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/color/index.js +0 -20
- package/dist/node_modules/style-value-types/dist/es/color/index.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/color/rgba.js +0 -15
- package/dist/node_modules/style-value-types/dist/es/color/rgba.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/color/utils.js +0 -19
- package/dist/node_modules/style-value-types/dist/es/color/utils.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/complex/index.js +0 -58
- package/dist/node_modules/style-value-types/dist/es/complex/index.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/numbers/index.js +0 -13
- package/dist/node_modules/style-value-types/dist/es/numbers/index.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/numbers/units.js +0 -16
- package/dist/node_modules/style-value-types/dist/es/numbers/units.js.map +0 -1
- package/dist/node_modules/style-value-types/dist/es/utils.js +0 -13
- package/dist/node_modules/style-value-types/dist/es/utils.js.map +0 -1
|
@@ -1,7 +1,80 @@
|
|
|
1
|
+
import { jsx, mergeProps } from "@plastic-js/plastic/jsx-runtime";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
1
3
|
import { SignaturePad } from "@plastic-js/ark";
|
|
4
|
+
import { mergeProps as mergeProps$2, splitProps } from "@plastic-js/plastic";
|
|
2
5
|
//#region src/components/SignaturePad.jsx
|
|
3
|
-
var
|
|
6
|
+
var rootClass = css({
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
gap: "var(--tsu-spacing-sm)"
|
|
10
|
+
});
|
|
11
|
+
var labelClass = css({
|
|
12
|
+
fontSize: "var(--tsu-comp-font-size-sm)",
|
|
13
|
+
color: "var(--tsu-fg)",
|
|
14
|
+
fontWeight: 500
|
|
15
|
+
});
|
|
16
|
+
var canvasClass = css({
|
|
17
|
+
border: "1px solid var(--tsu-neutral-7)",
|
|
18
|
+
borderRadius: "var(--tsu-radius-l2-md)",
|
|
19
|
+
backgroundColor: "var(--tsu-bg)",
|
|
20
|
+
touchAction: "none",
|
|
21
|
+
width: "100%"
|
|
22
|
+
});
|
|
23
|
+
var clearClass = css({
|
|
24
|
+
display: "inline-flex",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
justifyContent: "center",
|
|
27
|
+
gap: "6px",
|
|
28
|
+
padding: "var(--tsu-comp-padding-y-sm) var(--tsu-comp-padding-x-md)",
|
|
29
|
+
border: "1px solid var(--tsu-neutral-7)",
|
|
30
|
+
borderRadius: "var(--tsu-radius-l2-md)",
|
|
31
|
+
background: "var(--tsu-bg)",
|
|
32
|
+
color: "var(--tsu-neutral-11)",
|
|
33
|
+
fontSize: "var(--tsu-comp-font-size-sm)",
|
|
34
|
+
fontFamily: "inherit",
|
|
35
|
+
cursor: "pointer",
|
|
36
|
+
touchAction: "manipulation",
|
|
37
|
+
"&:hover": { borderColor: "var(--tsu-focus-border)" },
|
|
38
|
+
"&:active": { background: "var(--tsu-neutral-3)" }
|
|
39
|
+
});
|
|
40
|
+
var ClearTrigger = (props = {}) => {
|
|
41
|
+
const [local, rest] = splitProps(props, ["className", "children"]);
|
|
42
|
+
return jsx(SignaturePad.ClearTrigger, mergeProps(rest, {
|
|
43
|
+
get className() {
|
|
44
|
+
return `${clearClass} ${local.className || ""}`;
|
|
45
|
+
},
|
|
46
|
+
children: () => local.children || "Clear"
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
var SignaturePad$1 = (props = {}) => {
|
|
50
|
+
const [local, rest] = splitProps(mergeProps$2({
|
|
51
|
+
label: "Signature",
|
|
52
|
+
height: 160
|
|
53
|
+
}, props), [
|
|
54
|
+
"className",
|
|
55
|
+
"label",
|
|
56
|
+
"height",
|
|
57
|
+
"children"
|
|
58
|
+
]);
|
|
59
|
+
return jsx(SignaturePad.Root, mergeProps(rest, {
|
|
60
|
+
get className() {
|
|
61
|
+
return `${rootClass} ${local.className || ""}`;
|
|
62
|
+
},
|
|
63
|
+
children: [
|
|
64
|
+
jsx(SignaturePad.Label, mergeProps({
|
|
65
|
+
className: labelClass,
|
|
66
|
+
children: () => local.label
|
|
67
|
+
})),
|
|
68
|
+
jsx(SignaturePad.Canvas, mergeProps({
|
|
69
|
+
className: canvasClass,
|
|
70
|
+
get height() {
|
|
71
|
+
return local.height;
|
|
72
|
+
}
|
|
73
|
+
})),
|
|
74
|
+
() => local.children,
|
|
75
|
+
jsx(SignaturePad.HiddenInput, {})
|
|
76
|
+
]
|
|
77
|
+
}));
|
|
78
|
+
};
|
|
4
79
|
//#endregion
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=SignaturePad.js.map
|
|
80
|
+
export { ClearTrigger, SignaturePad$1 as default };
|
|
@@ -4,13 +4,13 @@ import { css, keyframes } from "@emotion/css";
|
|
|
4
4
|
var _tmpl = template("<span></span>");
|
|
5
5
|
var baseClass = css({
|
|
6
6
|
display: "block",
|
|
7
|
-
background: "linear-gradient(90deg, var(--
|
|
7
|
+
background: "linear-gradient(90deg, var(--tsu-neutral-6) 25%, var(--tsu-neutral-7) 50%, var(--tsu-neutral-6) 75%)",
|
|
8
8
|
backgroundSize: "200% 100%",
|
|
9
9
|
animation: `${keyframes({
|
|
10
10
|
"0%": { backgroundPosition: "-200% 0" },
|
|
11
11
|
"100%": { backgroundPosition: "200% 0" }
|
|
12
12
|
})} 1.4s ease-in-out infinite`,
|
|
13
|
-
borderRadius: "
|
|
13
|
+
borderRadius: "var(--tsu-radius-l2-xs)"
|
|
14
14
|
});
|
|
15
15
|
var Skeleton = ({ width = "100%", height = "14px", radius, className, style }) => (() => {
|
|
16
16
|
const _el0 = _tmpl.cloneNode(true);
|
|
@@ -25,5 +25,3 @@ var Skeleton = ({ width = "100%", height = "14px", radius, className, style }) =
|
|
|
25
25
|
})();
|
|
26
26
|
//#endregion
|
|
27
27
|
export { Skeleton as default };
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -1,7 +1,115 @@
|
|
|
1
|
+
import { jsx, mergeProps } from "@plastic-js/plastic/jsx-runtime";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
1
3
|
import { Slider } from "@plastic-js/ark";
|
|
4
|
+
import { mergeProps as mergeProps$2, splitProps } from "@plastic-js/plastic";
|
|
2
5
|
//#region src/components/Slider.jsx
|
|
3
|
-
var
|
|
6
|
+
var rootClass = css({
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
gap: "var(--tsu-spacing-sm)",
|
|
10
|
+
width: "100%",
|
|
11
|
+
fontFamily: "inherit"
|
|
12
|
+
});
|
|
13
|
+
var labelClass = css({
|
|
14
|
+
fontSize: "var(--tsu-comp-font-size-md)",
|
|
15
|
+
fontWeight: 500,
|
|
16
|
+
color: "var(--tsu-fg)"
|
|
17
|
+
});
|
|
18
|
+
var controlClass = css({
|
|
19
|
+
position: "relative",
|
|
20
|
+
display: "flex",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
height: "24px",
|
|
23
|
+
touchAction: "none"
|
|
24
|
+
});
|
|
25
|
+
var trackClass = css({
|
|
26
|
+
position: "relative",
|
|
27
|
+
width: "100%",
|
|
28
|
+
height: "4px",
|
|
29
|
+
borderRadius: "2px",
|
|
30
|
+
backgroundColor: "var(--tsu-neutral-7)"
|
|
31
|
+
});
|
|
32
|
+
var rangeClass = css({
|
|
33
|
+
position: "absolute",
|
|
34
|
+
height: "100%",
|
|
35
|
+
borderRadius: "2px",
|
|
36
|
+
backgroundColor: "var(--tsu-accent-9)"
|
|
37
|
+
});
|
|
38
|
+
var thumbClass = css({
|
|
39
|
+
width: "20px",
|
|
40
|
+
height: "20px",
|
|
41
|
+
borderRadius: "50%",
|
|
42
|
+
backgroundColor: "var(--tsu-accent-9)",
|
|
43
|
+
border: "2px solid var(--tsu-accent-9)",
|
|
44
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.4)",
|
|
45
|
+
cursor: "pointer",
|
|
46
|
+
outline: "none",
|
|
47
|
+
zIndex: 2,
|
|
48
|
+
transition: "box-shadow var(--tsu-transition-fast)",
|
|
49
|
+
"&:focus-visible": { boxShadow: "0 0 0 3px var(--tsu-accent-3)" }
|
|
50
|
+
});
|
|
51
|
+
var indicatorClass = css({
|
|
52
|
+
position: "absolute",
|
|
53
|
+
top: "-30px",
|
|
54
|
+
left: "50%",
|
|
55
|
+
transform: "translateX(-50%)",
|
|
56
|
+
padding: "4px 8px",
|
|
57
|
+
borderRadius: "6px",
|
|
58
|
+
backgroundColor: "var(--tsu-fg)",
|
|
59
|
+
color: "var(--tsu-bg)",
|
|
60
|
+
fontSize: "13px",
|
|
61
|
+
lineHeight: 1,
|
|
62
|
+
fontFamily: "inherit",
|
|
63
|
+
whiteSpace: "nowrap",
|
|
64
|
+
pointerEvents: "none"
|
|
65
|
+
});
|
|
66
|
+
var Slider$1 = (props = {}) => {
|
|
67
|
+
const [local, rest] = splitProps(mergeProps$2({
|
|
68
|
+
min: 0,
|
|
69
|
+
max: 100,
|
|
70
|
+
step: 1,
|
|
71
|
+
thumbAlignment: "center"
|
|
72
|
+
}, props), [
|
|
73
|
+
"label",
|
|
74
|
+
"className",
|
|
75
|
+
"children"
|
|
76
|
+
]);
|
|
77
|
+
return () => jsx(Slider.Root, mergeProps(rest, {
|
|
78
|
+
get className() {
|
|
79
|
+
return [rootClass, local.className].filter(Boolean).join(" ");
|
|
80
|
+
},
|
|
81
|
+
children: [() => local.label && jsx(Slider.Label, mergeProps({
|
|
82
|
+
className: labelClass,
|
|
83
|
+
children: () => local.label
|
|
84
|
+
})), jsx(Slider.Control, mergeProps({
|
|
85
|
+
className: controlClass,
|
|
86
|
+
children: [
|
|
87
|
+
jsx(Slider.Track, mergeProps({
|
|
88
|
+
className: trackClass,
|
|
89
|
+
children: jsx(Slider.Range, mergeProps({ className: rangeClass }))
|
|
90
|
+
})),
|
|
91
|
+
jsx(Slider.Thumb, mergeProps({
|
|
92
|
+
className: thumbClass,
|
|
93
|
+
children: [jsx(Slider.DraggingIndicator, mergeProps({
|
|
94
|
+
className: indicatorClass,
|
|
95
|
+
children: jsx(Slider.ValueText, {})
|
|
96
|
+
})), jsx(Slider.HiddenInput, {})]
|
|
97
|
+
})),
|
|
98
|
+
() => local.children
|
|
99
|
+
]
|
|
100
|
+
}))]
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
103
|
+
Slider$1.origin = {
|
|
104
|
+
Root: Slider.Root,
|
|
105
|
+
Label: Slider.Label,
|
|
106
|
+
Control: Slider.Control,
|
|
107
|
+
Track: Slider.Track,
|
|
108
|
+
Range: Slider.Range,
|
|
109
|
+
Thumb: Slider.Thumb,
|
|
110
|
+
DraggingIndicator: Slider.DraggingIndicator,
|
|
111
|
+
ValueText: Slider.ValueText,
|
|
112
|
+
HiddenInput: Slider.HiddenInput
|
|
113
|
+
};
|
|
4
114
|
//#endregion
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=Slider.js.map
|
|
115
|
+
export { Slider$1 as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { setProp, template } from "@plastic-js/plastic/jsx-runtime";
|
|
2
|
+
import { css, keyframes } from "@emotion/css";
|
|
3
|
+
//#region src/components/Spinner.jsx
|
|
4
|
+
var _tmpl = template("<span aria-label=\"Loading\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeLinecap=\"round\"><path d=\"M21 12a9 9 0 1 1-6.219-8.56\"></path></svg></span>");
|
|
5
|
+
var rotate = keyframes({
|
|
6
|
+
from: { transform: "rotate(0deg)" },
|
|
7
|
+
to: { transform: "rotate(360deg)" }
|
|
8
|
+
});
|
|
9
|
+
var Spinner = ({ size = 24, strokeWidth = 2, color = "var(--tsu-accent-9)", duration = "0.8s", easing = "cubic-bezier(0.4, 0, 0.2, 1)", className } = {}) => {
|
|
10
|
+
const style = {
|
|
11
|
+
"--spinner-size": typeof size === "number" ? `${size}px` : size,
|
|
12
|
+
"--spinner-stroke": strokeWidth,
|
|
13
|
+
"--spinner-color": color,
|
|
14
|
+
"--spinner-duration": duration,
|
|
15
|
+
"--spinner-easing": easing
|
|
16
|
+
};
|
|
17
|
+
const spinnerClass = css({
|
|
18
|
+
display: "inline-flex",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
width: "var(--spinner-size)",
|
|
22
|
+
height: "var(--spinner-size)",
|
|
23
|
+
color: "var(--spinner-color)",
|
|
24
|
+
animation: `${rotate} var(--spinner-duration) var(--spinner-easing) infinite`,
|
|
25
|
+
"& svg": {
|
|
26
|
+
width: "100%",
|
|
27
|
+
height: "100%",
|
|
28
|
+
display: "block"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return (() => {
|
|
32
|
+
const _el0 = _tmpl.cloneNode(true);
|
|
33
|
+
const _el1 = _el0.firstChild;
|
|
34
|
+
setProp(_el1, "strokeWidth", () => strokeWidth);
|
|
35
|
+
setProp(_el0, "className", () => className ? `${spinnerClass} ${className}` : spinnerClass);
|
|
36
|
+
setProp(_el0, "style", () => style);
|
|
37
|
+
return _el0;
|
|
38
|
+
})();
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Spinner as default };
|
|
@@ -1,7 +1,54 @@
|
|
|
1
|
+
import { jsx, mergeProps } from "@plastic-js/plastic/jsx-runtime";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
1
3
|
import { Splitter } from "@plastic-js/ark";
|
|
4
|
+
import { mergeProps as mergeProps$2, splitProps } from "@plastic-js/plastic";
|
|
2
5
|
//#region src/components/Splitter.jsx
|
|
3
|
-
var
|
|
6
|
+
var rootClass = css({
|
|
7
|
+
display: "flex",
|
|
8
|
+
width: "100%",
|
|
9
|
+
"&[data-orientation=\"vertical\"]": { flexDirection: "column" }
|
|
10
|
+
});
|
|
11
|
+
var SplitterPanel = (props = {}) => {
|
|
12
|
+
const [local, rest] = splitProps(mergeProps$2({}, props), ["className", "children"]);
|
|
13
|
+
return jsx(Splitter.Panel, mergeProps(rest, {
|
|
14
|
+
get className() {
|
|
15
|
+
return [local.className].filter(Boolean).join(" ");
|
|
16
|
+
},
|
|
17
|
+
children: () => local.children
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
var SplitterResizeTrigger = (props = {}) => {
|
|
21
|
+
const [local, rest] = splitProps(mergeProps$2({}, props), ["className", "children"]);
|
|
22
|
+
return jsx(Splitter.ResizeTrigger, mergeProps(rest, {
|
|
23
|
+
get className() {
|
|
24
|
+
return [local.className].filter(Boolean).join(" ");
|
|
25
|
+
},
|
|
26
|
+
children: () => local.children
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
var SplitterResizeTriggerIndicator = (props = {}) => {
|
|
30
|
+
const [local, rest] = splitProps(mergeProps$2({}, props), ["className", "children"]);
|
|
31
|
+
return jsx(Splitter.ResizeTriggerIndicator, mergeProps(rest, {
|
|
32
|
+
get className() {
|
|
33
|
+
return [local.className].filter(Boolean).join(" ");
|
|
34
|
+
},
|
|
35
|
+
children: () => local.children
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
var Splitter$1 = (props = {}) => {
|
|
39
|
+
const [local, rest] = splitProps(mergeProps$2({}, props), ["className", "children"]);
|
|
40
|
+
return jsx(Splitter.Root, mergeProps(rest, {
|
|
41
|
+
get className() {
|
|
42
|
+
return [rootClass, local.className].filter(Boolean).join(" ");
|
|
43
|
+
},
|
|
44
|
+
children: () => local.children
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
Splitter$1.origin = {
|
|
48
|
+
Root: Splitter.Root,
|
|
49
|
+
Panel: Splitter.Panel,
|
|
50
|
+
ResizeTrigger: Splitter.ResizeTrigger,
|
|
51
|
+
ResizeTriggerIndicator: Splitter.ResizeTriggerIndicator
|
|
52
|
+
};
|
|
4
53
|
//#endregion
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=Splitter.js.map
|
|
54
|
+
export { SplitterPanel, SplitterResizeTrigger, SplitterResizeTriggerIndicator, Splitter$1 as default };
|
package/dist/components/Steps.js
CHANGED
|
@@ -1,7 +1,262 @@
|
|
|
1
|
+
import { insert, jsx, mergeProps, setProp, template } from "@plastic-js/plastic/jsx-runtime";
|
|
2
|
+
import { css } from "@emotion/css";
|
|
1
3
|
import { Steps } from "@plastic-js/ark";
|
|
4
|
+
import { mergeProps as mergeProps$2, splitProps } from "@plastic-js/plastic";
|
|
2
5
|
//#region src/components/Steps.jsx
|
|
3
|
-
var
|
|
6
|
+
var _tmpl5 = template("<div><!><!></div>");
|
|
7
|
+
var _tmpl4 = template("<span></span>");
|
|
8
|
+
var _tmpl3 = template("<span class=\"steps-indicator-check\"></span>");
|
|
9
|
+
var _tmpl2 = template("<span class=\"steps-indicator-index\"></span>");
|
|
10
|
+
var _tmpl = template("<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\"><path d=\"M20 6 9 17l-5-5\"></path></svg>");
|
|
11
|
+
var read = (v) => typeof v === "function" ? v() : v;
|
|
12
|
+
var rootClass = css({
|
|
13
|
+
display: "flex",
|
|
14
|
+
flexDirection: "column",
|
|
15
|
+
gap: "var(--tsu-spacing-md)"
|
|
16
|
+
});
|
|
17
|
+
var verticalClass = css({
|
|
18
|
+
"& .steps-list": {
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
gap: 0
|
|
21
|
+
},
|
|
22
|
+
"& .steps-item": {
|
|
23
|
+
flex: "none",
|
|
24
|
+
minHeight: "40px"
|
|
25
|
+
},
|
|
26
|
+
"& .steps-item-trigger": {
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
gap: "var(--tsu-spacing-sm)",
|
|
29
|
+
alignItems: "center"
|
|
30
|
+
},
|
|
31
|
+
"& .steps-separator": {
|
|
32
|
+
flex: "none",
|
|
33
|
+
width: "2px",
|
|
34
|
+
height: "auto",
|
|
35
|
+
minHeight: "16px",
|
|
36
|
+
margin: "0 0 0 13px"
|
|
37
|
+
},
|
|
38
|
+
"& .steps-content": { marginLeft: "calc(28px + var(--tsu-spacing-sm))" }
|
|
39
|
+
});
|
|
40
|
+
var listClass = css({
|
|
41
|
+
display: "flex",
|
|
42
|
+
listStyle: "none",
|
|
43
|
+
margin: 0,
|
|
44
|
+
padding: 0
|
|
45
|
+
});
|
|
46
|
+
var itemClass = css({
|
|
47
|
+
display: "flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
flex: 1
|
|
50
|
+
});
|
|
51
|
+
var triggerClass = css({
|
|
52
|
+
display: "flex",
|
|
53
|
+
flexDirection: "column",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
gap: "var(--tsu-spacing-xs)",
|
|
56
|
+
cursor: "pointer",
|
|
57
|
+
border: "none",
|
|
58
|
+
background: "none",
|
|
59
|
+
padding: 0,
|
|
60
|
+
fontFamily: "inherit",
|
|
61
|
+
touchAction: "manipulation",
|
|
62
|
+
"&[data-complete] .steps-title, &[data-current] .steps-title": {
|
|
63
|
+
color: "var(--tsu-accent-9)",
|
|
64
|
+
fontWeight: 600
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
var titleClass = css({
|
|
68
|
+
fontSize: "var(--tsu-font-size-xs)",
|
|
69
|
+
color: "var(--tsu-neutral-9)",
|
|
70
|
+
textAlign: "center"
|
|
71
|
+
});
|
|
72
|
+
var indicatorClass = css({
|
|
73
|
+
display: "flex",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
justifyContent: "center",
|
|
76
|
+
width: "28px",
|
|
77
|
+
height: "28px",
|
|
78
|
+
borderRadius: "50%",
|
|
79
|
+
border: "2px solid var(--tsu-neutral-5)",
|
|
80
|
+
backgroundColor: "var(--tsu-bg)",
|
|
81
|
+
fontSize: "var(--tsu-font-size-sm)",
|
|
82
|
+
fontWeight: 600,
|
|
83
|
+
color: "var(--tsu-neutral-9)",
|
|
84
|
+
transition: "background-color var(--tsu-transition-fast), border-color var(--tsu-transition-fast), color var(--tsu-transition-fast)",
|
|
85
|
+
".steps-trigger[data-current] &": {
|
|
86
|
+
borderColor: "var(--tsu-accent-8)",
|
|
87
|
+
backgroundColor: "var(--tsu-accent-9)",
|
|
88
|
+
color: "var(--tsu-bg)"
|
|
89
|
+
},
|
|
90
|
+
".steps-trigger[data-complete] &": {
|
|
91
|
+
borderColor: "var(--tsu-accent-8)",
|
|
92
|
+
backgroundColor: "var(--tsu-accent-3)",
|
|
93
|
+
color: "var(--tsu-accent-9)"
|
|
94
|
+
},
|
|
95
|
+
".steps-trigger[data-complete] & .steps-indicator-index": { display: "none" },
|
|
96
|
+
".steps-trigger[data-complete] & .steps-indicator-check": { display: "flex" },
|
|
97
|
+
".steps-indicator-check": { display: "none" },
|
|
98
|
+
"& svg": {
|
|
99
|
+
width: "14px",
|
|
100
|
+
height: "14px",
|
|
101
|
+
display: "block"
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
var separatorClass = css({
|
|
105
|
+
flex: 1,
|
|
106
|
+
height: "2px",
|
|
107
|
+
backgroundColor: "var(--tsu-neutral-5)",
|
|
108
|
+
margin: "0 var(--tsu-spacing-xs)",
|
|
109
|
+
marginBottom: "20px",
|
|
110
|
+
"&[data-complete]": { backgroundColor: "var(--tsu-accent-9)" }
|
|
111
|
+
});
|
|
112
|
+
var contentClass = css({
|
|
113
|
+
padding: "var(--tsu-spacing-md)",
|
|
114
|
+
backgroundColor: "var(--tsu-neutral-2)",
|
|
115
|
+
borderRadius: "var(--tsu-radius-l2-md)",
|
|
116
|
+
fontSize: "var(--tsu-font-size-sm)",
|
|
117
|
+
color: "var(--tsu-neutral-11)"
|
|
118
|
+
});
|
|
119
|
+
var completedContentClass = css({
|
|
120
|
+
padding: "var(--tsu-spacing-md)",
|
|
121
|
+
textAlign: "center",
|
|
122
|
+
fontSize: "var(--tsu-font-size-md)",
|
|
123
|
+
fontWeight: 600,
|
|
124
|
+
color: "var(--tsu-success-9)"
|
|
125
|
+
});
|
|
126
|
+
var navClass = css({
|
|
127
|
+
display: "flex",
|
|
128
|
+
gap: "var(--tsu-spacing-sm)",
|
|
129
|
+
marginTop: "12px"
|
|
130
|
+
});
|
|
131
|
+
var navBtnClass = css({
|
|
132
|
+
padding: "var(--tsu-spacing-sm) var(--tsu-spacing-md)",
|
|
133
|
+
border: "1px solid var(--tsu-accent-7)",
|
|
134
|
+
borderRadius: "var(--tsu-radius-l2-md)",
|
|
135
|
+
backgroundColor: "var(--tsu-bg)",
|
|
136
|
+
color: "var(--tsu-neutral-11)",
|
|
137
|
+
fontSize: "var(--tsu-font-size-sm)",
|
|
138
|
+
fontWeight: 500,
|
|
139
|
+
cursor: "pointer",
|
|
140
|
+
fontFamily: "inherit",
|
|
141
|
+
touchAction: "manipulation",
|
|
142
|
+
"&:disabled": {
|
|
143
|
+
opacity: .4,
|
|
144
|
+
cursor: "not-allowed"
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
var navNextClass = css({
|
|
148
|
+
backgroundColor: "var(--tsu-accent-9)",
|
|
149
|
+
borderColor: "var(--tsu-accent-8)",
|
|
150
|
+
color: "var(--tsu-bg)"
|
|
151
|
+
});
|
|
152
|
+
var checkIcon = _tmpl.cloneNode(true);
|
|
153
|
+
var Steps$1 = (props = {}) => {
|
|
154
|
+
const [local, rest] = splitProps(mergeProps$2({
|
|
155
|
+
vertical: false,
|
|
156
|
+
value: 0
|
|
157
|
+
}, props), [
|
|
158
|
+
"items",
|
|
159
|
+
"vertical",
|
|
160
|
+
"value",
|
|
161
|
+
"onValueChange",
|
|
162
|
+
"completedContent",
|
|
163
|
+
"className"
|
|
164
|
+
]);
|
|
165
|
+
const items = () => read(local.items) ?? [];
|
|
166
|
+
const count = () => items().length;
|
|
167
|
+
const vertical = () => read(local.vertical);
|
|
168
|
+
return jsx(Steps.Root, mergeProps(rest, {
|
|
169
|
+
count,
|
|
170
|
+
get step() {
|
|
171
|
+
return read(local.value);
|
|
172
|
+
},
|
|
173
|
+
onStepChange: ({ step }) => local.onValueChange?.(step),
|
|
174
|
+
get className() {
|
|
175
|
+
return [rootClass, vertical() && verticalClass].filter(Boolean).join(" ");
|
|
176
|
+
},
|
|
177
|
+
children: [
|
|
178
|
+
jsx(Steps.List, mergeProps({
|
|
179
|
+
get className() {
|
|
180
|
+
return [listClass, "steps-list"].filter(Boolean).join(" ");
|
|
181
|
+
},
|
|
182
|
+
children: () => items().map((item, i) => jsx(Steps.Item, mergeProps({
|
|
183
|
+
index: i,
|
|
184
|
+
get className() {
|
|
185
|
+
return [itemClass, "steps-item"].filter(Boolean).join(" ");
|
|
186
|
+
},
|
|
187
|
+
children: [jsx(Steps.Trigger, mergeProps({
|
|
188
|
+
get className() {
|
|
189
|
+
return [
|
|
190
|
+
triggerClass,
|
|
191
|
+
"steps-item-trigger",
|
|
192
|
+
"steps-trigger"
|
|
193
|
+
].filter(Boolean).join(" ");
|
|
194
|
+
},
|
|
195
|
+
children: [jsx(Steps.Indicator, mergeProps({
|
|
196
|
+
className: indicatorClass,
|
|
197
|
+
children: [() => {
|
|
198
|
+
const _el0 = _tmpl2.cloneNode(true);
|
|
199
|
+
insert(_el0, () => i + 1);
|
|
200
|
+
return _el0;
|
|
201
|
+
}, () => {
|
|
202
|
+
const _el0 = _tmpl3.cloneNode(true);
|
|
203
|
+
insert(_el0, () => checkIcon);
|
|
204
|
+
return _el0;
|
|
205
|
+
}]
|
|
206
|
+
})), () => {
|
|
207
|
+
const _el0 = _tmpl4.cloneNode(true);
|
|
208
|
+
insert(_el0, () => item.title);
|
|
209
|
+
setProp(_el0, "className", () => ["steps-title", titleClass].filter(Boolean).join(" "));
|
|
210
|
+
return _el0;
|
|
211
|
+
}]
|
|
212
|
+
})), () => i < items().length - 1 && jsx(Steps.Separator, mergeProps({ get className() {
|
|
213
|
+
return [separatorClass, "steps-separator"].filter(Boolean).join(" ");
|
|
214
|
+
} }))]
|
|
215
|
+
})))
|
|
216
|
+
})),
|
|
217
|
+
() => items().map((item, i) => jsx(Steps.Content, mergeProps({
|
|
218
|
+
index: i,
|
|
219
|
+
get className() {
|
|
220
|
+
return [contentClass, "steps-content"].filter(Boolean).join(" ");
|
|
221
|
+
},
|
|
222
|
+
children: () => item.content
|
|
223
|
+
}))),
|
|
224
|
+
() => read(local.completedContent) && jsx(Steps.CompletedContent, mergeProps({
|
|
225
|
+
className: completedContentClass,
|
|
226
|
+
children: () => read(local.completedContent)
|
|
227
|
+
})),
|
|
228
|
+
() => {
|
|
229
|
+
const _el0 = _tmpl5.cloneNode(true);
|
|
230
|
+
const _el1 = _el0.firstChild;
|
|
231
|
+
const _el2 = _el0.firstChild.nextSibling;
|
|
232
|
+
insert(_el0, () => jsx(Steps.PrevTrigger, mergeProps({
|
|
233
|
+
className: navBtnClass,
|
|
234
|
+
children: "Previous"
|
|
235
|
+
})), _el1);
|
|
236
|
+
insert(_el0, () => jsx(Steps.NextTrigger, mergeProps({
|
|
237
|
+
get className() {
|
|
238
|
+
return [navBtnClass, navNextClass].filter(Boolean).join(" ");
|
|
239
|
+
},
|
|
240
|
+
children: "Next"
|
|
241
|
+
})), _el2);
|
|
242
|
+
setProp(_el0, "className", () => navClass);
|
|
243
|
+
return _el0;
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
}));
|
|
247
|
+
};
|
|
248
|
+
Steps$1.origin = {
|
|
249
|
+
Root: Steps.Root,
|
|
250
|
+
List: Steps.List,
|
|
251
|
+
Item: Steps.Item,
|
|
252
|
+
Trigger: Steps.Trigger,
|
|
253
|
+
Content: Steps.Content,
|
|
254
|
+
CompletedContent: Steps.CompletedContent,
|
|
255
|
+
Separator: Steps.Separator,
|
|
256
|
+
PrevTrigger: Steps.PrevTrigger,
|
|
257
|
+
NextTrigger: Steps.NextTrigger,
|
|
258
|
+
Indicator: Steps.Indicator,
|
|
259
|
+
Progress: Steps.Progress
|
|
260
|
+
};
|
|
4
261
|
//#endregion
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=Steps.js.map
|
|
262
|
+
export { Steps$1 as default };
|
|
@@ -10,7 +10,7 @@ var RUBBER_BAND_LIMIT = 50;
|
|
|
10
10
|
var wrapperClass = css`
|
|
11
11
|
position: relative;
|
|
12
12
|
overflow: hidden;
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: var(--tsu-radius-l2-md);
|
|
14
14
|
user-select: none;
|
|
15
15
|
`;
|
|
16
16
|
var trackClass = css`
|
|
@@ -32,7 +32,7 @@ var actionBtnClass = css`
|
|
|
32
32
|
justify-content: center;
|
|
33
33
|
border: none;
|
|
34
34
|
color: #fff;
|
|
35
|
-
font-size:
|
|
35
|
+
font-size: var(--tsu-comp-font-size-md);
|
|
36
36
|
font-weight: 600;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
font-family: inherit;
|
|
@@ -178,5 +178,3 @@ var SwipeReveal = ({ actions, children, onSwipeStart, onOpenChange, activeId, th
|
|
|
178
178
|
};
|
|
179
179
|
//#endregion
|
|
180
180
|
export { SwipeReveal as default };
|
|
181
|
-
|
|
182
|
-
//# sourceMappingURL=SwipeReveal.js.map
|