@dotss/ui 0.0.10 → 0.0.11
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/Accordion/Accordion.cjs +13 -7
- package/Accordion/Accordion.d.ts +2 -0
- package/Accordion/Accordion.es.js +86 -65
- package/Autocomplete/Autocomplete.cjs +1 -1
- package/Autocomplete/Autocomplete.d.ts +1 -1
- package/Autocomplete/Autocomplete.es.js +235 -80
- package/BottomSheet/BottomSheet.cjs +5 -5
- package/BottomSheet/BottomSheet.d.ts +3 -0
- package/BottomSheet/BottomSheet.es.js +88 -70
- package/BottomSheet/BottomSheetText/BottomSheetText.cjs +2 -2
- package/BottomSheet/BottomSheetText/BottomSheetText.es.js +18 -6
- package/BottomSheet/BottomSheetTitle/BottomSheetTitle.cjs +6 -6
- package/BottomSheet/BottomSheetTitle/BottomSheetTitle.d.ts +2 -1
- package/BottomSheet/BottomSheetTitle/BottomSheetTitle.es.js +26 -15
- package/Button/Button.cjs +6 -6
- package/Button/Button.es.js +35 -29
- package/ChainPicker/ChainPicker.cjs +16 -6
- package/ChainPicker/ChainPicker.d.ts +4 -2
- package/ChainPicker/ChainPicker.es.js +155 -110
- package/ChainPicker/ChainPicker.stories.d.ts +1 -1
- package/Checkbox/Checkbox.cjs +3 -3
- package/Checkbox/Checkbox.es.js +12 -10
- package/CircularProgressIndicator/CircularProgressIndicator.cjs +5 -5
- package/CircularProgressIndicator/CircularProgressIndicator.es.js +26 -23
- package/DatePicker/DatePicker.cjs +37 -20
- package/DatePicker/DatePicker.d.ts +2 -1
- package/DatePicker/DatePicker.es.js +345 -320
- package/DatePicker/DatePicker.stories.d.ts +1 -0
- package/DatePicker/EventDot/EventDot.cjs +8 -0
- package/DatePicker/EventDot/EventDot.d.ts +8 -0
- package/DatePicker/EventDot/EventDot.es.js +19 -0
- package/DatePicker/EventDot/index.cjs +1 -0
- package/DatePicker/EventDot/index.d.ts +3 -0
- package/DatePicker/EventDot/index.es.js +4 -0
- package/DatePicker/EventDotGroup/EventDotGroup.cjs +8 -0
- package/DatePicker/EventDotGroup/EventDotGroup.d.ts +8 -0
- package/DatePicker/EventDotGroup/EventDotGroup.es.js +39 -0
- package/DatePicker/EventDotGroup/index.cjs +1 -0
- package/DatePicker/EventDotGroup/index.d.ts +3 -0
- package/DatePicker/EventDotGroup/index.es.js +4 -0
- package/DatePicker/index.cjs +1 -1
- package/DatePicker/index.d.ts +2 -0
- package/DatePicker/index.es.js +6 -2
- package/Dialog/Dialog.cjs +2 -2
- package/Dialog/Dialog.d.ts +2 -0
- package/Dialog/Dialog.es.js +45 -40
- package/Dialog/Dialog.stories.d.ts +10 -0
- package/Dialog/DialogText/DialogText.cjs +1 -1
- package/Dialog/DialogText/DialogText.es.js +1 -1
- package/Dialog/DialogTitle/DialogTitle.cjs +4 -4
- package/Dialog/DialogTitle/DialogTitle.d.ts +2 -1
- package/Dialog/DialogTitle/DialogTitle.es.js +17 -17
- package/FocusBoundary/FocusBoundary.cjs +1 -1
- package/FocusBoundary/FocusBoundary.d.ts +3 -1
- package/FocusBoundary/FocusBoundary.es.js +49 -42
- package/FormControlText/FormControlText.cjs +7 -5
- package/FormControlText/FormControlText.d.ts +2 -0
- package/FormControlText/FormControlText.es.js +50 -40
- package/Icon/Icon.cjs +1 -1
- package/Icon/Icon.es.js +1 -1
- package/IconButton/IconButton.cjs +8 -8
- package/IconButton/IconButton.es.js +32 -25
- package/LineProgressIndicator/LineProgressIndicator.cjs +6 -6
- package/LineProgressIndicator/LineProgressIndicator.es.js +35 -23
- package/Menu/Menu.cjs +16 -16
- package/Menu/Menu.d.ts +3 -2
- package/Menu/Menu.es.js +115 -81
- package/Menu/Menu.stories.d.ts +1 -0
- package/Menu/MenuBlock/MenuBlock.cjs +14 -7
- package/Menu/MenuBlock/MenuBlock.d.ts +1 -0
- package/Menu/MenuBlock/MenuBlock.es.js +47 -35
- package/Menu/MenuButton/MenuButton.cjs +1 -0
- package/Menu/MenuButton/MenuButton.d.ts +10 -0
- package/Menu/MenuButton/MenuButton.es.js +44 -0
- package/Menu/MenuButton/index.cjs +1 -0
- package/Menu/MenuButton/index.d.ts +3 -0
- package/Menu/MenuButton/index.es.js +4 -0
- package/Menu/index.cjs +1 -1
- package/Menu/index.d.ts +1 -0
- package/Menu/index.es.js +4 -2
- package/NumberKeypad/NumberKeypad.cjs +2 -2
- package/NumberKeypad/NumberKeypad.es.js +18 -16
- package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.cjs +1 -1
- package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.es.js +10 -1
- package/PageControl/PageControl.cjs +16 -5
- package/PageControl/PageControl.d.ts +3 -0
- package/PageControl/PageControl.es.js +77 -24
- package/PageControl/PageControl.stories.d.ts +1 -0
- package/Radio/Radio.cjs +3 -3
- package/Radio/Radio.es.js +22 -20
- package/RadioGroup/RadioGroup.cjs +1 -0
- package/RadioGroup/RadioGroup.d.ts +8 -0
- package/RadioGroup/RadioGroup.es.js +28 -0
- package/RadioGroup/RadioGroup.stories.d.ts +14 -0
- package/RadioGroup/index.cjs +1 -0
- package/RadioGroup/index.d.ts +3 -0
- package/RadioGroup/index.es.js +4 -0
- package/SegmentedButton/SegmentedButton.cjs +14 -3
- package/SegmentedButton/SegmentedButton.es.js +108 -34
- package/Select/Select.cjs +4 -4
- package/Select/Select.es.js +95 -86
- package/Slider/Slider.cjs +27 -12
- package/Slider/Slider.d.ts +1 -0
- package/Slider/Slider.es.js +177 -90
- package/Switch/Switch.cjs +28 -11
- package/Switch/Switch.d.ts +2 -0
- package/Switch/Switch.es.js +185 -65
- package/Switch/Switch.stories.d.ts +1 -0
- package/Tab/Tab.es.js +2 -4
- package/TextArea/TextArea.cjs +42 -34
- package/TextArea/TextArea.es.js +116 -82
- package/TextArea/TextArea.stories.d.ts +1 -1
- package/TextField/TextField.cjs +29 -13
- package/TextField/TextField.d.ts +2 -1
- package/TextField/TextField.es.js +122 -79
- package/TextField/TextField.stories.d.ts +1 -0
- package/Tooltip/Tooltip.cjs +7 -6
- package/Tooltip/Tooltip.d.ts +8 -3
- package/Tooltip/Tooltip.es.js +248 -146
- package/Tooltip/Tooltip.stories.d.ts +1 -0
- package/hooks/index.cjs +1 -1
- package/hooks/index.d.ts +3 -0
- package/hooks/index.es.js +7 -1
- package/hooks/useCheckHasFocus/useCheckHasFocus.cjs +1 -0
- package/hooks/useCheckHasFocus/useCheckHasFocus.d.ts +9 -0
- package/hooks/useCheckHasFocus/useCheckHasFocus.es.js +21 -0
- package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.cjs +1 -0
- package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.d.ts +4 -0
- package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.es.js +30 -0
- package/hooks/useFocusBoundary/useFocusBoundary.cjs +1 -0
- package/hooks/useFocusBoundary/useFocusBoundary.d.ts +12 -0
- package/hooks/useFocusBoundary/useFocusBoundary.es.js +63 -0
- package/index.cjs +1 -1
- package/index.d.ts +2 -1
- package/index.es.js +97 -90
- package/package.json +3 -3
- package/resources/tictoccroc/icons/fill/certified-fill.svg-B_RVx6K_.cjs +1 -0
- package/resources/tictoccroc/icons/fill/certified-fill.svg-CK7UqYft.js +5 -0
- package/resources/tictoccroc/icons/fill/index.d.ts +3 -0
- package/resources/tictoccroc/icons/fill/location-fill.svg-DfSHAnsd.js +5 -0
- package/resources/tictoccroc/icons/fill/location-fill.svg-Die9mxQH.cjs +1 -0
- package/resources/tictoccroc/icons/fill/send-fill.svg-CItD_2L1.js +5 -0
- package/resources/tictoccroc/icons/fill/send-fill.svg-D197Lwl0.cjs +1 -0
- package/resources/tictoccroc/icons/index.ts-BmqvB_n6.cjs +1 -0
- package/resources/tictoccroc/icons/index.ts-CzTh-XsD.js +228 -0
- package/resources/tictoccroc/icons/line/index.d.ts +4 -0
- package/resources/tictoccroc/icons/line/list-line.svg-r5d5htjN.cjs +1 -0
- package/resources/tictoccroc/icons/line/list-line.svg-yFfhZxUp.js +5 -0
- package/resources/tictoccroc/icons/line/monthly-line.svg-BdyaJ1t_.cjs +1 -0
- package/resources/tictoccroc/icons/line/monthly-line.svg-DY5-Xv34.js +5 -0
- package/resources/tictoccroc/icons/line/review-line.svg-B4rfJrsO.js +5 -0
- package/resources/tictoccroc/icons/line/review-line.svg-DYUuUybx.cjs +1 -0
- package/resources/tictoccroc/icons/line/weekly-line.svg-BCO-LS_a.cjs +1 -0
- package/resources/tictoccroc/icons/line/weekly-line.svg-BUPmmgeE.js +5 -0
- package/utils/getIconLabel/getIconLabel.cjs +1 -1
- package/utils/getIconLabel/getIconLabel.es.js +8 -1
- package/utils/getSibling/getSibling.es.js +1 -2
- package/resources/tictoccroc/icons/index.ts-CarI_z7q.js +0 -214
- package/resources/tictoccroc/icons/index.ts-IVJAK4qr.cjs +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { jsx as f, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { jsx as f, jsxs as B } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as G, useRef as C, useState as b, useId as J, useLayoutEffect as Q, Fragment as X } from "react";
|
|
3
|
+
import H from "@emotion/styled";
|
|
4
|
+
import Z from "../hooks/useCheckHasFocus/useCheckHasFocus.es.js";
|
|
5
|
+
import ee from "../hooks/useCheckHoverPossible/useCheckHoverPossible.es.js";
|
|
6
|
+
import te from "../hooks/useCheckKeyboardMode/useCheckKeyboardMode.es.js";
|
|
7
|
+
const ie = H.div`
|
|
6
8
|
list-style-type: none;
|
|
7
9
|
margin: 0;
|
|
8
10
|
padding: 0;
|
|
@@ -12,7 +14,7 @@ const Q = T.ul`
|
|
|
12
14
|
position: relative;
|
|
13
15
|
cursor: grab;
|
|
14
16
|
transition: transform 0.3s ease-out;
|
|
15
|
-
`,
|
|
17
|
+
`, ne = H.div`
|
|
16
18
|
position: relative;
|
|
17
19
|
width: auto;
|
|
18
20
|
height: fit-content;
|
|
@@ -34,7 +36,19 @@ const Q = T.ul`
|
|
|
34
36
|
);
|
|
35
37
|
pointer-events: none;
|
|
36
38
|
}
|
|
37
|
-
|
|
39
|
+
|
|
40
|
+
@supports selector(:has(:focus-visible)) {
|
|
41
|
+
&:has(:focus-visible) {
|
|
42
|
+
outline: ${({ theme: a }) => a.palette.grey[100]} solid 2px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@supports not selector(:has(:focus-visible)) {
|
|
47
|
+
${({ focusWithin: a, theme: t }) => a ? {
|
|
48
|
+
outline: `${t.palette.grey[100]} solid 2px`
|
|
49
|
+
} : {}}
|
|
50
|
+
}
|
|
51
|
+
`, y = H.div`
|
|
38
52
|
height: 54px;
|
|
39
53
|
display: flex;
|
|
40
54
|
align-items: center;
|
|
@@ -44,138 +58,169 @@ const Q = T.ul`
|
|
|
44
58
|
|
|
45
59
|
${({
|
|
46
60
|
theme: {
|
|
47
|
-
palette: { grey:
|
|
48
|
-
typography: { h2M:
|
|
49
|
-
spacing: { content:
|
|
61
|
+
palette: { grey: a },
|
|
62
|
+
typography: { h2M: t },
|
|
63
|
+
spacing: { content: r }
|
|
50
64
|
}
|
|
51
65
|
}) => ({
|
|
52
|
-
fontSize:
|
|
53
|
-
fontWeight:
|
|
54
|
-
lineHeight:
|
|
55
|
-
letterSpacing:
|
|
56
|
-
color:
|
|
57
|
-
padding:
|
|
66
|
+
fontSize: t.size,
|
|
67
|
+
fontWeight: t.weight,
|
|
68
|
+
lineHeight: t.lineHeight,
|
|
69
|
+
letterSpacing: t.letterSpacing,
|
|
70
|
+
color: a[100],
|
|
71
|
+
padding: r(3)
|
|
58
72
|
})};
|
|
59
73
|
|
|
60
74
|
${({
|
|
61
|
-
selected:
|
|
75
|
+
selected: a,
|
|
62
76
|
theme: {
|
|
63
|
-
palette: { grey:
|
|
64
|
-
typography: { h4M:
|
|
77
|
+
palette: { grey: t },
|
|
78
|
+
typography: { h4M: r }
|
|
65
79
|
}
|
|
66
|
-
}) =>
|
|
80
|
+
}) => a ? {
|
|
67
81
|
"&, & *": {
|
|
68
|
-
color: `${
|
|
82
|
+
color: `${t[100]} !important`
|
|
69
83
|
}
|
|
70
84
|
} : {
|
|
71
|
-
color: `${
|
|
72
|
-
fontSize: `${
|
|
73
|
-
fontWeight: `${
|
|
74
|
-
lineHeight: `${
|
|
75
|
-
letterSpacing: `${
|
|
85
|
+
color: `${t[30]} !important`,
|
|
86
|
+
fontSize: `${r.size} !important`,
|
|
87
|
+
fontWeight: `${r.weight} !important`,
|
|
88
|
+
lineHeight: `${r.lineHeight} !important`,
|
|
89
|
+
letterSpacing: `${r.letterSpacing} !important`,
|
|
76
90
|
"& *": {
|
|
77
|
-
color: `${
|
|
91
|
+
color: `${t[30]} !important`
|
|
78
92
|
}
|
|
79
93
|
}}
|
|
80
|
-
`,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
|
|
94
|
+
`, oe = 3, fe = G(function({
|
|
95
|
+
column: t,
|
|
96
|
+
value: r = t[0].value,
|
|
97
|
+
onChange: x,
|
|
98
|
+
renderLabel: k,
|
|
99
|
+
inlineCSS: E,
|
|
100
|
+
wrapperProps: g,
|
|
101
|
+
thumbProps: Y,
|
|
102
|
+
...L
|
|
103
|
+
}, W) {
|
|
104
|
+
const w = t.findIndex((i) => i.value === r), u = C(w), o = C(null), [h, p] = b(w * 54), [P, T] = b(!1), [$, F] = b(0), [N, R] = b(0), z = J(), { isHoverPossible: A } = ee(), { isKeyboardMode: K } = te(), { hasFocus: O } = Z({ ref: o }), D = (i) => {
|
|
105
|
+
T(!0), R(i), F(h);
|
|
106
|
+
}, I = (i) => {
|
|
107
|
+
if (!P) return;
|
|
108
|
+
const e = N - i;
|
|
109
|
+
let n = $ + e;
|
|
110
|
+
const s = 54 * (t.length - 1);
|
|
111
|
+
n < 0 ? n = 0 : n > s && (n = s), p(n), o.current && (o.current.children[0].scrollTop = n);
|
|
112
|
+
}, j = (i) => {
|
|
113
|
+
var n, s;
|
|
114
|
+
i.stopPropagation();
|
|
115
|
+
let e = u.current;
|
|
116
|
+
i.key === "ArrowUp" ? (e += 1, e > t.length - 1 && (e = 0)) : i.key === "ArrowDown" ? (e -= 1, e < 0 && (e = t.length - 1)) : i.key === "PageUp" ? (e += 5, e > t.length - 1 && (e = 0)) : i.key === "PageDown" ? (e -= 5, e < 0 && (e = t.length - 1)) : i.key === "Home" ? e = 0 : i.key === "End" && (e = t.length - 1), x(t[e].value), u.current = e, (s = (n = o.current) == null ? void 0 : n.querySelector(`.chain-picker-item[data-index="${u.current}"]`)) == null || s.focus();
|
|
117
|
+
}, q = (i) => D(i.clientY), U = (i) => D(i.touches[0].clientY), _ = (i) => I(i.clientY), V = (i) => I(i.touches[0].clientY), m = (i) => {
|
|
118
|
+
if (!P || (T(!1), !A && i.type === "mouseup")) return;
|
|
119
|
+
if (Math.abs($ - h) < oe) {
|
|
120
|
+
const d = i.target.closest("[data-index]");
|
|
95
121
|
if (d) {
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
const v =
|
|
122
|
+
const S = Number(d.dataset.index);
|
|
123
|
+
if (t[S] && o.current) {
|
|
124
|
+
const v = o.current.children[0];
|
|
99
125
|
v.scrollTo({
|
|
100
|
-
top:
|
|
126
|
+
top: S * 54,
|
|
101
127
|
behavior: "smooth"
|
|
102
128
|
});
|
|
103
|
-
const
|
|
104
|
-
Math.abs(v.scrollTop -
|
|
129
|
+
const M = () => {
|
|
130
|
+
Math.abs(v.scrollTop - S * 54) < 1 && (x(t[S].value), v.removeEventListener("scroll", M));
|
|
105
131
|
};
|
|
106
|
-
v.addEventListener("scroll",
|
|
132
|
+
v.addEventListener("scroll", M);
|
|
107
133
|
}
|
|
108
134
|
}
|
|
109
135
|
return;
|
|
110
136
|
}
|
|
111
|
-
let
|
|
112
|
-
const
|
|
113
|
-
|
|
137
|
+
let e = Math.round(h / 54), n = e * 54;
|
|
138
|
+
const s = 54 * (t.length - 1);
|
|
139
|
+
n < 0 ? (n = 0, e = 0) : n > s && (n = s, e = t.length - 1), u.current = e;
|
|
114
140
|
const l = (c) => {
|
|
115
|
-
if (Math.abs(c -
|
|
116
|
-
p(
|
|
141
|
+
if (Math.abs(c - n) < 1)
|
|
142
|
+
p(n), o.current && (o.current.children[0].scrollTop = n);
|
|
117
143
|
else {
|
|
118
|
-
const d = c + (
|
|
119
|
-
p(d),
|
|
144
|
+
const d = c + (n - c) / 5;
|
|
145
|
+
p(d), o.current && (o.current.children[0].scrollTop = d), requestAnimationFrame(() => l(d));
|
|
120
146
|
}
|
|
121
147
|
};
|
|
122
|
-
requestAnimationFrame(() => l(h)), e
|
|
148
|
+
requestAnimationFrame(() => l(h)), t[e] && x(t[e].value);
|
|
123
149
|
};
|
|
124
|
-
return
|
|
125
|
-
const
|
|
126
|
-
p(
|
|
127
|
-
}, [
|
|
128
|
-
|
|
150
|
+
return Q(() => {
|
|
151
|
+
const e = t.findIndex((n) => n.value === r) * 54;
|
|
152
|
+
p(e), o.current && (o.current.children[0].scrollTop = e);
|
|
153
|
+
}, [r, t, 54]), /* @__PURE__ */ f(
|
|
154
|
+
ne,
|
|
129
155
|
{
|
|
130
|
-
ref:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
156
|
+
ref: o,
|
|
157
|
+
...g,
|
|
158
|
+
css: g == null ? void 0 : g.inlineCSS,
|
|
159
|
+
focusWithin: K && O,
|
|
160
|
+
children: /* @__PURE__ */ f(
|
|
161
|
+
ie,
|
|
162
|
+
{
|
|
163
|
+
role: "group",
|
|
164
|
+
ref: W,
|
|
165
|
+
css: E,
|
|
166
|
+
...L,
|
|
167
|
+
onMouseDown: q,
|
|
168
|
+
onMouseMove: _,
|
|
169
|
+
onMouseUp: m,
|
|
170
|
+
onMouseLeave: m,
|
|
171
|
+
onTouchStart: U,
|
|
172
|
+
onTouchMove: V,
|
|
173
|
+
onTouchEnd: m,
|
|
174
|
+
onTouchCancel: m,
|
|
175
|
+
children: t.map((i, e) => {
|
|
176
|
+
const n = t.findIndex((c) => c.value === r), s = n === 0 ? 0 : Math.round(h / 54), l = e === s;
|
|
177
|
+
return /* @__PURE__ */ B(X, { children: [
|
|
178
|
+
e === 0 && /* @__PURE__ */ f(
|
|
179
|
+
y,
|
|
180
|
+
{
|
|
181
|
+
className: "chain-picker-item",
|
|
182
|
+
"data-index": e - 1,
|
|
183
|
+
selected: !1,
|
|
184
|
+
distance: (n + 1) * -1
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ f(
|
|
188
|
+
y,
|
|
189
|
+
{
|
|
190
|
+
className: "chain-picker-item",
|
|
191
|
+
"data-index": e,
|
|
192
|
+
"data-selected": l,
|
|
193
|
+
selected: l,
|
|
194
|
+
distance: e - n,
|
|
195
|
+
role: "spinbutton",
|
|
196
|
+
tabIndex: l ? 0 : -1,
|
|
197
|
+
"aria-hidden": l ? "false" : "true",
|
|
198
|
+
"aria-valuenow": i.value,
|
|
199
|
+
"aria-valuetext": i.ariaValueText ?? i.label,
|
|
200
|
+
"aria-valuemin": t[0].value,
|
|
201
|
+
"aria-valuemax": t[t.length - 1].value,
|
|
202
|
+
...Y,
|
|
203
|
+
onKeyDown: j,
|
|
204
|
+
children: k ? k(i, l) : i.label
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
e === t.length - 1 && /* @__PURE__ */ f(
|
|
208
|
+
y,
|
|
209
|
+
{
|
|
210
|
+
className: "chain-picker-item",
|
|
211
|
+
"data-index": e + 1,
|
|
212
|
+
selected: !1,
|
|
213
|
+
distance: t.length - n
|
|
214
|
+
}
|
|
215
|
+
)
|
|
216
|
+
] }, `${z}_${i.label}`);
|
|
217
|
+
})
|
|
218
|
+
}
|
|
219
|
+
)
|
|
175
220
|
}
|
|
176
|
-
)
|
|
221
|
+
);
|
|
177
222
|
});
|
|
178
223
|
export {
|
|
179
|
-
|
|
180
|
-
|
|
224
|
+
oe as SCROLL_POSITION_THRESHOLD,
|
|
225
|
+
fe as default
|
|
181
226
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import('react').ForwardRefExoticComponent<import('./ChainPicker').ChainPickerProps & import('react').RefAttributes<
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<import('./ChainPicker').ChainPickerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
6
|
tags: string[];
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
package/Checkbox/Checkbox.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@emotion/react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@emotion/react/jsx-runtime"),f=require("react"),c=require("@emotion/styled"),C=require("../core/useTheme.cjs"),h=t=>t&&t.__esModule?t:{default:t},p=h(c),x=p.default.span`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
`,m=p.default.input`
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
height: 100%;
|
|
8
8
|
top: 0;
|
|
9
9
|
left: 0;
|
|
10
|
-
|
|
10
|
+
appearance: none;
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
|
|
13
13
|
&:disabled {
|
|
14
14
|
cursor: not-allowed;
|
|
15
15
|
}
|
|
16
|
-
`;function y({size:t,checked:n,disabled:
|
|
16
|
+
`;function y({size:t,checked:n,disabled:a,color:r="primary"}){const{palette:{brand:i,grey:e,background:d}}=C.default();let o=e.white,s=e[50],u=e[20];return n&&(o=r==="primary"?i.primary.main:i[r],s=r==="primary"?i.primary.main:i[r],u=e.white),n&&a&&(o=e[30],s=e[30],u=e[10]),!n&&a&&(o=d.primary,s=e[30],u=e[20]),l.jsxs("svg",{width:t==="2xLarge"?48:24,height:t==="2xLarge"?48:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,focusable:"false",children:[l.jsx("path",{d:"M2 6C2 3.79086 3.79086 2 6 2H18C20.2091 2 22 3.79086 22 6V18C22 20.2091 20.2091 22 18 22H6C3.79086 22 2 20.2091 2 18V6Z",fill:o}),l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 3H6C4.34315 3 3 4.34315 3 6V18C3 19.6569 4.34315 21 6 21H18C19.6569 21 21 19.6569 21 18V6C21 4.34315 19.6569 3 18 3ZM6 2C3.79086 2 2 3.79086 2 6V18C2 20.2091 3.79086 22 6 22H18C20.2091 22 22 20.2091 22 18V6C22 3.79086 20.2091 2 18 2H6Z",fill:s}),l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.604 6.20309C19.0442 6.53668 19.1306 7.16392 18.797 7.60408L11.218 17.6041C11.0406 17.8382 10.7692 17.9824 10.4759 17.9985C10.1826 18.0147 9.89706 17.901 9.69505 17.6878L5.27405 13.0211C4.89422 12.6202 4.91133 11.9873 5.31227 11.6074C5.7132 11.2276 6.34613 11.2447 6.72596 11.6456L10.3362 15.4564L17.203 6.39603C17.5366 5.95588 18.1639 5.8695 18.604 6.20309Z",fill:u})]})}const b=f.forwardRef(function({size:n="medium",color:a="primary",checked:r,disabled:i,inlineCSS:e,...d},o){return l.jsxs(x,{ref:o,css:e,children:[l.jsx(m,{type:"checkbox",checked:r,disabled:i,...d}),l.jsx(y,{size:n,color:a,checked:r,disabled:i})]})});exports.default=b;
|
package/Checkbox/Checkbox.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as f, jsx as l } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import s from "@emotion/styled";
|
|
4
4
|
import u from "../core/useTheme.es.js";
|
|
5
|
-
const h =
|
|
5
|
+
const h = s.span`
|
|
6
6
|
position: relative;
|
|
7
7
|
display: inline-flex;
|
|
8
|
-
`, c =
|
|
8
|
+
`, c = s.input`
|
|
9
9
|
position: absolute;
|
|
10
10
|
width: 100%;
|
|
11
11
|
height: 100%;
|
|
12
12
|
top: 0;
|
|
13
13
|
left: 0;
|
|
14
|
-
|
|
14
|
+
appearance: none;
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
|
|
17
17
|
&:disabled {
|
|
@@ -27,8 +27,8 @@ function x({
|
|
|
27
27
|
const {
|
|
28
28
|
palette: { brand: i, grey: e, background: d }
|
|
29
29
|
} = u();
|
|
30
|
-
let t = e.white,
|
|
31
|
-
return o && (t = r === "primary" ? i.primary.main : i[r],
|
|
30
|
+
let t = e.white, a = e[50], p = e[20];
|
|
31
|
+
return o && (t = r === "primary" ? i.primary.main : i[r], a = r === "primary" ? i.primary.main : i[r], p = e.white), o && n && (t = e[30], a = e[30], p = e[10]), !o && n && (t = d.primary, a = e[30], p = e[20]), /* @__PURE__ */ f(
|
|
32
32
|
"svg",
|
|
33
33
|
{
|
|
34
34
|
width: C === "2xLarge" ? 48 : 24,
|
|
@@ -36,6 +36,8 @@ function x({
|
|
|
36
36
|
viewBox: "0 0 24 24",
|
|
37
37
|
fill: "none",
|
|
38
38
|
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
"aria-hidden": !0,
|
|
40
|
+
focusable: "false",
|
|
39
41
|
children: [
|
|
40
42
|
/* @__PURE__ */ l(
|
|
41
43
|
"path",
|
|
@@ -50,7 +52,7 @@ function x({
|
|
|
50
52
|
fillRule: "evenodd",
|
|
51
53
|
clipRule: "evenodd",
|
|
52
54
|
d: "M18 3H6C4.34315 3 3 4.34315 3 6V18C3 19.6569 4.34315 21 6 21H18C19.6569 21 21 19.6569 21 18V6C21 4.34315 19.6569 3 18 3ZM6 2C3.79086 2 2 3.79086 2 6V18C2 20.2091 3.79086 22 6 22H18C20.2091 22 22 20.2091 22 18V6C22 3.79086 20.2091 2 18 2H6Z",
|
|
53
|
-
fill:
|
|
55
|
+
fill: a
|
|
54
56
|
}
|
|
55
57
|
),
|
|
56
58
|
/* @__PURE__ */ l(
|
|
@@ -59,14 +61,14 @@ function x({
|
|
|
59
61
|
fillRule: "evenodd",
|
|
60
62
|
clipRule: "evenodd",
|
|
61
63
|
d: "M18.604 6.20309C19.0442 6.53668 19.1306 7.16392 18.797 7.60408L11.218 17.6041C11.0406 17.8382 10.7692 17.9824 10.4759 17.9985C10.1826 18.0147 9.89706 17.901 9.69505 17.6878L5.27405 13.0211C4.89422 12.6202 4.91133 11.9873 5.31227 11.6074C5.7132 11.2276 6.34613 11.2447 6.72596 11.6456L10.3362 15.4564L17.203 6.39603C17.5366 5.95588 18.1639 5.8695 18.604 6.20309Z",
|
|
62
|
-
fill:
|
|
64
|
+
fill: p
|
|
63
65
|
}
|
|
64
66
|
)
|
|
65
67
|
]
|
|
66
68
|
}
|
|
67
69
|
);
|
|
68
70
|
}
|
|
69
|
-
const v =
|
|
71
|
+
const v = m(function({ size: o = "medium", color: n = "primary", checked: r, disabled: i, inlineCSS: e, ...d }, t) {
|
|
70
72
|
return /* @__PURE__ */ f(h, { ref: t, css: e, children: [
|
|
71
73
|
/* @__PURE__ */ l(c, { type: "checkbox", checked: r, disabled: i, ...d }),
|
|
72
74
|
/* @__PURE__ */ l(x, { size: o, color: n, checked: r, disabled: i })
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@emotion/react/jsx-runtime"),h=require("react"),m=require("/Users/dong-yeon/Desktop/codes/dots/node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.3_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.browser.esm.js"),g=require("@emotion/styled"),y=e=>e&&e.__esModule?e:{default:e},i=y(g),k=m.keyframes`
|
|
2
2
|
100% {
|
|
3
3
|
transform: rotate(270deg);
|
|
4
4
|
}
|
|
5
|
-
`,
|
|
5
|
+
`,_=i.default.svg`
|
|
6
6
|
${({size:e})=>e==="large"?{width:120,height:120}:{width:40,height:40}};
|
|
7
7
|
|
|
8
8
|
transform: rotate(-90deg);
|
|
9
9
|
|
|
10
10
|
${({loop:e})=>e?{animation:`${k} 1s infinite`}:{}};
|
|
11
|
-
|
|
11
|
+
`,x=i.default.circle`
|
|
12
12
|
${({size:e})=>e==="large"?{cx:60,cy:60,strokeWidth:16}:{cx:20,cy:20,strokeWidth:4}};
|
|
13
13
|
stroke: ${({theme:{palette:{grey:e}}})=>e[10]};
|
|
14
|
-
|
|
14
|
+
`,$=i.default.circle`
|
|
15
15
|
transition: stroke-dashoffset ${({transitionDuration:e})=>e}ms linear 0s;
|
|
16
16
|
${({size:e})=>e==="large"?{cx:60,cy:60,strokeWidth:16}:{cx:20,cy:20,strokeWidth:4}};
|
|
17
17
|
stroke: ${({theme:{palette:{brand:e}}})=>e.primary.main};
|
|
18
|
-
`,
|
|
18
|
+
`,b=h.forwardRef(function({size:r="small",value:c=0,transitionDuration:l=500,inlineCSS:d,loop:t,...a},u){const s=r==="large"?52:18,n=2*Math.PI*s,f=n*(1-(t?20:c)/100);return o.jsxs(_,{ref:u,viewBox:r==="large"?"0 0 120 120":"0 0 40 40",fill:"none",size:r,loop:t,role:"progressbar","aria-valuenow":t?void 0:c,"aria-label":a["aria-label"]?a["aria-label"]:"로딩 중",...a,css:d,children:[o.jsx(x,{size:r,r:s}),o.jsx($,{size:r,transitionDuration:l,r:s,strokeLinecap:"round",strokeDashoffset:f,strokeDasharray:n})]})});exports.default=b;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as h, jsx as
|
|
1
|
+
import { jsxs as h, jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
|
-
import { keyframes as k } from "@emotion/react";
|
|
4
|
-
import
|
|
3
|
+
import { keyframes as k } from "/Users/dong-yeon/Desktop/codes/dots/node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.3_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.browser.esm.js";
|
|
4
|
+
import s from "@emotion/styled";
|
|
5
5
|
const y = k`
|
|
6
6
|
100% {
|
|
7
7
|
transform: rotate(270deg);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`, u = s.svg`
|
|
10
10
|
${({ size: r }) => r === "large" ? {
|
|
11
11
|
width: 120,
|
|
12
12
|
height: 120
|
|
@@ -20,7 +20,7 @@ const y = k`
|
|
|
20
20
|
${({ loop: r }) => r ? {
|
|
21
21
|
animation: `${y} 1s infinite`
|
|
22
22
|
} : {}};
|
|
23
|
-
`,
|
|
23
|
+
`, x = s.circle`
|
|
24
24
|
${({ size: r }) => r === "large" ? {
|
|
25
25
|
cx: 60,
|
|
26
26
|
cy: 60,
|
|
@@ -35,7 +35,7 @@ const y = k`
|
|
|
35
35
|
palette: { grey: r }
|
|
36
36
|
}
|
|
37
37
|
}) => r[10]};
|
|
38
|
-
`,
|
|
38
|
+
`, $ = s.circle`
|
|
39
39
|
transition: stroke-dashoffset ${({ transitionDuration: r }) => r}ms linear 0s;
|
|
40
40
|
${({ size: r }) => r === "large" ? {
|
|
41
41
|
cx: 60,
|
|
@@ -51,30 +51,33 @@ const y = k`
|
|
|
51
51
|
palette: { brand: r }
|
|
52
52
|
}
|
|
53
53
|
}) => r.primary.main};
|
|
54
|
-
`,
|
|
55
|
-
function({ size:
|
|
56
|
-
const
|
|
54
|
+
`, b = g(
|
|
55
|
+
function({ size: e = "small", value: i = 0, transitionDuration: l = 500, inlineCSS: d, loop: t, ...a }, f) {
|
|
56
|
+
const o = e === "large" ? 52 : 18, c = 2 * Math.PI * o, m = c * (1 - (t ? 20 : i) / 100);
|
|
57
57
|
return /* @__PURE__ */ h(
|
|
58
|
-
|
|
58
|
+
u,
|
|
59
59
|
{
|
|
60
60
|
ref: f,
|
|
61
|
-
viewBox:
|
|
61
|
+
viewBox: e === "large" ? "0 0 120 120" : "0 0 40 40",
|
|
62
62
|
fill: "none",
|
|
63
|
-
size:
|
|
64
|
-
loop:
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
size: e,
|
|
64
|
+
loop: t,
|
|
65
|
+
role: "progressbar",
|
|
66
|
+
"aria-valuenow": t ? void 0 : i,
|
|
67
|
+
"aria-label": a["aria-label"] ? a["aria-label"] : "로딩 중",
|
|
68
|
+
...a,
|
|
69
|
+
css: d,
|
|
67
70
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
71
|
+
/* @__PURE__ */ n(x, { size: e, r: o }),
|
|
72
|
+
/* @__PURE__ */ n(
|
|
73
|
+
$,
|
|
71
74
|
{
|
|
72
|
-
size:
|
|
73
|
-
transitionDuration:
|
|
74
|
-
r:
|
|
75
|
+
size: e,
|
|
76
|
+
transitionDuration: l,
|
|
77
|
+
r: o,
|
|
75
78
|
strokeLinecap: "round",
|
|
76
79
|
strokeDashoffset: m,
|
|
77
|
-
strokeDasharray:
|
|
80
|
+
strokeDasharray: c
|
|
78
81
|
}
|
|
79
82
|
)
|
|
80
83
|
]
|
|
@@ -83,5 +86,5 @@ const y = k`
|
|
|
83
86
|
}
|
|
84
87
|
);
|
|
85
88
|
export {
|
|
86
|
-
|
|
89
|
+
b as default
|
|
87
90
|
};
|