@dotss/ui 0.0.10 → 0.0.12

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 (159) hide show
  1. package/Accordion/Accordion.cjs +13 -7
  2. package/Accordion/Accordion.d.ts +2 -0
  3. package/Accordion/Accordion.es.js +86 -65
  4. package/Autocomplete/Autocomplete.cjs +1 -1
  5. package/Autocomplete/Autocomplete.d.ts +1 -1
  6. package/Autocomplete/Autocomplete.es.js +235 -80
  7. package/BottomSheet/BottomSheet.cjs +5 -5
  8. package/BottomSheet/BottomSheet.d.ts +3 -0
  9. package/BottomSheet/BottomSheet.es.js +88 -70
  10. package/BottomSheet/BottomSheetText/BottomSheetText.cjs +2 -2
  11. package/BottomSheet/BottomSheetText/BottomSheetText.es.js +18 -6
  12. package/BottomSheet/BottomSheetTitle/BottomSheetTitle.cjs +6 -6
  13. package/BottomSheet/BottomSheetTitle/BottomSheetTitle.d.ts +2 -1
  14. package/BottomSheet/BottomSheetTitle/BottomSheetTitle.es.js +26 -15
  15. package/Button/Button.cjs +6 -6
  16. package/Button/Button.es.js +35 -29
  17. package/ChainPicker/ChainPicker.cjs +16 -6
  18. package/ChainPicker/ChainPicker.d.ts +4 -2
  19. package/ChainPicker/ChainPicker.es.js +155 -110
  20. package/ChainPicker/ChainPicker.stories.d.ts +1 -1
  21. package/Checkbox/Checkbox.cjs +3 -3
  22. package/Checkbox/Checkbox.es.js +12 -10
  23. package/CircularProgressIndicator/CircularProgressIndicator.cjs +5 -5
  24. package/CircularProgressIndicator/CircularProgressIndicator.es.js +25 -22
  25. package/DatePicker/DatePicker.cjs +37 -20
  26. package/DatePicker/DatePicker.d.ts +2 -1
  27. package/DatePicker/DatePicker.es.js +345 -320
  28. package/DatePicker/DatePicker.stories.d.ts +1 -0
  29. package/DatePicker/EventDot/EventDot.cjs +8 -0
  30. package/DatePicker/EventDot/EventDot.d.ts +8 -0
  31. package/DatePicker/EventDot/EventDot.es.js +19 -0
  32. package/DatePicker/EventDot/index.cjs +1 -0
  33. package/DatePicker/EventDot/index.d.ts +3 -0
  34. package/DatePicker/EventDot/index.es.js +4 -0
  35. package/DatePicker/EventDotGroup/EventDotGroup.cjs +8 -0
  36. package/DatePicker/EventDotGroup/EventDotGroup.d.ts +8 -0
  37. package/DatePicker/EventDotGroup/EventDotGroup.es.js +39 -0
  38. package/DatePicker/EventDotGroup/index.cjs +1 -0
  39. package/DatePicker/EventDotGroup/index.d.ts +3 -0
  40. package/DatePicker/EventDotGroup/index.es.js +4 -0
  41. package/DatePicker/index.cjs +1 -1
  42. package/DatePicker/index.d.ts +2 -0
  43. package/DatePicker/index.es.js +6 -2
  44. package/Dialog/Dialog.cjs +2 -2
  45. package/Dialog/Dialog.d.ts +2 -0
  46. package/Dialog/Dialog.es.js +45 -40
  47. package/Dialog/Dialog.stories.d.ts +10 -0
  48. package/Dialog/DialogText/DialogText.cjs +1 -1
  49. package/Dialog/DialogText/DialogText.es.js +1 -1
  50. package/Dialog/DialogTitle/DialogTitle.cjs +4 -4
  51. package/Dialog/DialogTitle/DialogTitle.d.ts +2 -1
  52. package/Dialog/DialogTitle/DialogTitle.es.js +17 -17
  53. package/FocusBoundary/FocusBoundary.cjs +1 -1
  54. package/FocusBoundary/FocusBoundary.d.ts +3 -1
  55. package/FocusBoundary/FocusBoundary.es.js +49 -42
  56. package/FormControlText/FormControlText.cjs +7 -5
  57. package/FormControlText/FormControlText.d.ts +2 -0
  58. package/FormControlText/FormControlText.es.js +50 -40
  59. package/Icon/Icon.cjs +1 -1
  60. package/Icon/Icon.es.js +1 -1
  61. package/IconButton/IconButton.cjs +8 -8
  62. package/IconButton/IconButton.es.js +32 -25
  63. package/LineProgressIndicator/LineProgressIndicator.cjs +6 -6
  64. package/LineProgressIndicator/LineProgressIndicator.es.js +34 -22
  65. package/Menu/Menu.cjs +16 -16
  66. package/Menu/Menu.d.ts +3 -2
  67. package/Menu/Menu.es.js +115 -81
  68. package/Menu/Menu.stories.d.ts +1 -0
  69. package/Menu/MenuBlock/MenuBlock.cjs +14 -7
  70. package/Menu/MenuBlock/MenuBlock.d.ts +1 -0
  71. package/Menu/MenuBlock/MenuBlock.es.js +47 -35
  72. package/Menu/MenuButton/MenuButton.cjs +1 -0
  73. package/Menu/MenuButton/MenuButton.d.ts +10 -0
  74. package/Menu/MenuButton/MenuButton.es.js +44 -0
  75. package/Menu/MenuButton/index.cjs +1 -0
  76. package/Menu/MenuButton/index.d.ts +3 -0
  77. package/Menu/MenuButton/index.es.js +4 -0
  78. package/Menu/index.cjs +1 -1
  79. package/Menu/index.d.ts +1 -0
  80. package/Menu/index.es.js +4 -2
  81. package/NumberKeypad/NumberKeypad.cjs +2 -2
  82. package/NumberKeypad/NumberKeypad.es.js +18 -16
  83. package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.cjs +1 -1
  84. package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.es.js +10 -1
  85. package/PageControl/PageControl.cjs +16 -5
  86. package/PageControl/PageControl.d.ts +3 -0
  87. package/PageControl/PageControl.es.js +77 -24
  88. package/PageControl/PageControl.stories.d.ts +1 -0
  89. package/Radio/Radio.cjs +3 -3
  90. package/Radio/Radio.es.js +22 -20
  91. package/RadioGroup/RadioGroup.cjs +1 -0
  92. package/RadioGroup/RadioGroup.d.ts +8 -0
  93. package/RadioGroup/RadioGroup.es.js +28 -0
  94. package/RadioGroup/RadioGroup.stories.d.ts +14 -0
  95. package/RadioGroup/index.cjs +1 -0
  96. package/RadioGroup/index.d.ts +3 -0
  97. package/RadioGroup/index.es.js +4 -0
  98. package/SegmentedButton/SegmentedButton.cjs +14 -3
  99. package/SegmentedButton/SegmentedButton.es.js +108 -34
  100. package/Select/Select.cjs +4 -4
  101. package/Select/Select.es.js +95 -86
  102. package/Slider/Slider.cjs +27 -12
  103. package/Slider/Slider.d.ts +1 -0
  104. package/Slider/Slider.es.js +177 -90
  105. package/Switch/Switch.cjs +28 -11
  106. package/Switch/Switch.d.ts +2 -0
  107. package/Switch/Switch.es.js +185 -65
  108. package/Switch/Switch.stories.d.ts +1 -0
  109. package/Tab/Tab.es.js +2 -4
  110. package/TextArea/TextArea.cjs +42 -34
  111. package/TextArea/TextArea.es.js +116 -82
  112. package/TextArea/TextArea.stories.d.ts +1 -1
  113. package/TextField/TextField.cjs +29 -13
  114. package/TextField/TextField.d.ts +2 -1
  115. package/TextField/TextField.es.js +122 -79
  116. package/TextField/TextField.stories.d.ts +1 -0
  117. package/Tooltip/Tooltip.cjs +7 -6
  118. package/Tooltip/Tooltip.d.ts +8 -3
  119. package/Tooltip/Tooltip.es.js +248 -146
  120. package/Tooltip/Tooltip.stories.d.ts +1 -0
  121. package/hooks/index.cjs +1 -1
  122. package/hooks/index.d.ts +3 -0
  123. package/hooks/index.es.js +7 -1
  124. package/hooks/useCheckHasFocus/useCheckHasFocus.cjs +1 -0
  125. package/hooks/useCheckHasFocus/useCheckHasFocus.d.ts +9 -0
  126. package/hooks/useCheckHasFocus/useCheckHasFocus.es.js +21 -0
  127. package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.cjs +1 -0
  128. package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.d.ts +4 -0
  129. package/hooks/useCheckKeyboardMode/useCheckKeyboardMode.es.js +30 -0
  130. package/hooks/useFocusBoundary/useFocusBoundary.cjs +1 -0
  131. package/hooks/useFocusBoundary/useFocusBoundary.d.ts +12 -0
  132. package/hooks/useFocusBoundary/useFocusBoundary.es.js +63 -0
  133. package/index.cjs +1 -1
  134. package/index.d.ts +2 -1
  135. package/index.es.js +97 -90
  136. package/package.json +3 -3
  137. package/resources/tictoccroc/icons/fill/certified-fill.svg-B_RVx6K_.cjs +1 -0
  138. package/resources/tictoccroc/icons/fill/certified-fill.svg-CK7UqYft.js +5 -0
  139. package/resources/tictoccroc/icons/fill/index.d.ts +3 -0
  140. package/resources/tictoccroc/icons/fill/location-fill.svg-DfSHAnsd.js +5 -0
  141. package/resources/tictoccroc/icons/fill/location-fill.svg-Die9mxQH.cjs +1 -0
  142. package/resources/tictoccroc/icons/fill/send-fill.svg-CItD_2L1.js +5 -0
  143. package/resources/tictoccroc/icons/fill/send-fill.svg-D197Lwl0.cjs +1 -0
  144. package/resources/tictoccroc/icons/index.ts-BmqvB_n6.cjs +1 -0
  145. package/resources/tictoccroc/icons/index.ts-CzTh-XsD.js +228 -0
  146. package/resources/tictoccroc/icons/line/index.d.ts +4 -0
  147. package/resources/tictoccroc/icons/line/list-line.svg-r5d5htjN.cjs +1 -0
  148. package/resources/tictoccroc/icons/line/list-line.svg-yFfhZxUp.js +5 -0
  149. package/resources/tictoccroc/icons/line/monthly-line.svg-BdyaJ1t_.cjs +1 -0
  150. package/resources/tictoccroc/icons/line/monthly-line.svg-DY5-Xv34.js +5 -0
  151. package/resources/tictoccroc/icons/line/review-line.svg-B4rfJrsO.js +5 -0
  152. package/resources/tictoccroc/icons/line/review-line.svg-DYUuUybx.cjs +1 -0
  153. package/resources/tictoccroc/icons/line/weekly-line.svg-BCO-LS_a.cjs +1 -0
  154. package/resources/tictoccroc/icons/line/weekly-line.svg-BUPmmgeE.js +5 -0
  155. package/utils/getIconLabel/getIconLabel.cjs +1 -1
  156. package/utils/getIconLabel/getIconLabel.es.js +8 -1
  157. package/utils/getSibling/getSibling.es.js +1 -2
  158. package/resources/tictoccroc/icons/index.ts-CarI_z7q.js +0 -214
  159. package/resources/tictoccroc/icons/index.ts-IVJAK4qr.cjs +0 -1
@@ -1,8 +1,10 @@
1
- import { jsx as f, jsxs as q } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as A, useRef as U, useState as b, useId as B, useLayoutEffect as G, Fragment as J } from "react";
3
- import T from "@emotion/styled";
4
- import K from "../hooks/useCheckHoverPossible/useCheckHoverPossible.es.js";
5
- const Q = T.ul`
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
- `, V = T.div`
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
- `, x = T.li`
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: g },
48
- typography: { h2M: e },
49
- spacing: { content: o }
61
+ palette: { grey: a },
62
+ typography: { h2M: t },
63
+ spacing: { content: r }
50
64
  }
51
65
  }) => ({
52
- fontSize: e.size,
53
- fontWeight: e.weight,
54
- lineHeight: e.lineHeight,
55
- letterSpacing: e.letterSpacing,
56
- color: g[100],
57
- padding: o(3)
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: g,
75
+ selected: a,
62
76
  theme: {
63
- palette: { grey: e },
64
- typography: { h4M: o }
77
+ palette: { grey: t },
78
+ typography: { h4M: r }
65
79
  }
66
- }) => g ? {
80
+ }) => a ? {
67
81
  "&, & *": {
68
- color: `${e[100]} !important`
82
+ color: `${t[100]} !important`
69
83
  }
70
84
  } : {
71
- color: `${e[30]} !important`,
72
- fontSize: `${o.size} !important`,
73
- fontWeight: `${o.weight} !important`,
74
- lineHeight: `${o.lineHeight} !important`,
75
- letterSpacing: `${o.letterSpacing} !important`,
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: `${e[30]} !important`
91
+ color: `${t[30]} !important`
78
92
  }
79
93
  }}
80
- `, X = 3, ie = A(function({ column: e, value: o = e[0].value, onChange: y, renderLabel: P, inlineCSS: H, wrapperProps: u, ...C }, Y) {
81
- const s = U(null), r = 54, E = e.findIndex((n) => n.value === o), [h, p] = b(E * r), [$, k] = b(!1), [I, L] = b(0), [N, R] = b(0), W = B(), { isHoverPossible: z } = K(), M = (n) => {
82
- k(!0), R(n), L(h);
83
- }, w = (n) => {
84
- if (!$)
85
- return;
86
- const i = N - n;
87
- let t = I + i;
88
- const a = r * (e.length - 1);
89
- t < 0 ? t = 0 : t > a && (t = a), p(t), s.current && (s.current.children[0].scrollTop = t);
90
- }, O = (n) => M(n.clientY), j = (n) => M(n.touches[0].clientY), F = (n) => w(n.clientY), _ = (n) => w(n.touches[0].clientY), S = (n) => {
91
- if (!$ || (k(!1), !z && n.type === "mouseup"))
92
- return;
93
- if (Math.abs(I - h) < X) {
94
- const d = n.target.closest("[data-index]");
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 m = Number(d.dataset.index);
97
- if (e[m] && s.current) {
98
- const v = s.current.children[0];
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: m * r,
126
+ top: S * 54,
101
127
  behavior: "smooth"
102
128
  });
103
- const D = () => {
104
- Math.abs(v.scrollTop - m * r) < 1 && (y(e[m].value), v.removeEventListener("scroll", D));
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", D);
132
+ v.addEventListener("scroll", M);
107
133
  }
108
134
  }
109
135
  return;
110
136
  }
111
- let i = Math.round(h / r), t = i * r;
112
- const a = r * (e.length - 1);
113
- t < 0 ? (t = 0, i = 0) : t > a && (t = a, i = e.length - 1);
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 - t) < 1)
116
- p(t), s.current && (s.current.children[0].scrollTop = t);
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 + (t - c) / 5;
119
- p(d), s.current && (s.current.children[0].scrollTop = d), requestAnimationFrame(() => l(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[i] && y(e[i].value);
148
+ requestAnimationFrame(() => l(h)), t[e] && x(t[e].value);
123
149
  };
124
- return G(() => {
125
- const i = e.findIndex((t) => t.value === o) * r;
126
- p(i), s.current && (s.current.children[0].scrollTop = i);
127
- }, [o, e, r]), /* @__PURE__ */ f(V, { ref: s, ...u, css: u == null ? void 0 : u.inlineCSS, children: /* @__PURE__ */ f(
128
- Q,
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: Y,
131
- css: H,
132
- ...C,
133
- onMouseDown: O,
134
- onMouseMove: F,
135
- onMouseUp: S,
136
- onMouseLeave: S,
137
- onTouchStart: j,
138
- onTouchMove: _,
139
- onTouchEnd: S,
140
- onTouchCancel: S,
141
- children: e.map((n, i) => {
142
- const t = e.findIndex((c) => c.value === o), a = t === 0 ? 0 : Math.round(h / r), l = i === a;
143
- return /* @__PURE__ */ q(J, { children: [
144
- i === 0 && /* @__PURE__ */ f(
145
- x,
146
- {
147
- className: "chain-picker-item",
148
- "data-index": i,
149
- selected: !1,
150
- distance: (t + 1) * -1
151
- }
152
- ),
153
- /* @__PURE__ */ f(
154
- x,
155
- {
156
- className: "chain-picker-item",
157
- "data-index": i,
158
- "data-selected": l,
159
- selected: l,
160
- distance: i - t,
161
- children: P ? P(n, l) : n.label
162
- }
163
- ),
164
- i === e.length - 1 && /* @__PURE__ */ f(
165
- x,
166
- {
167
- className: "chain-picker-item",
168
- "data-index": i,
169
- selected: !1,
170
- distance: e.length - t
171
- }
172
- )
173
- ] }, `${W}_${n.label}`);
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
- X as SCROLL_POSITION_THRESHOLD,
180
- ie as default
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<HTMLUListElement>>;
5
+ component: import('react').ForwardRefExoticComponent<import('./ChainPicker').ChainPickerProps & import('react').RefAttributes<HTMLDivElement>>;
6
6
  tags: string[];
7
7
  };
8
8
  export default meta;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@emotion/react/jsx-runtime"),C=require("react"),c=require("@emotion/styled"),f=require("../core/useTheme.cjs"),h=t=>t&&t.__esModule?t:{default:t},p=h(c),x=p.default.span`
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
- opacity: 0;
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:s,color:i="primary"}){const{palette:{brand:r,grey:e,background:d}}=f.default();let o=e.white,a=e[50],u=e[20];return n&&(o=i==="primary"?r.primary.main:r[i],a=i==="primary"?r.primary.main:r[i],u=e.white),n&&s&&(o=e[30],a=e[30],u=e[10]),!n&&s&&(o=d.primary,a=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",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:a}),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 g=C.forwardRef(function({size:n="medium",color:s="primary",checked:i,disabled:r,inlineCSS:e,...d},o){return l.jsxs(x,{ref:o,css:e,children:[l.jsx(m,{type:"checkbox",checked:i,disabled:r,...d}),l.jsx(y,{size:n,color:s,checked:i,disabled:r})]})});exports.default=g;
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;
@@ -1,17 +1,17 @@
1
1
  import { jsxs as f, jsx as l } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- import m from "@emotion/styled";
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 = m.span`
5
+ const h = s.span`
6
6
  position: relative;
7
7
  display: inline-flex;
8
- `, c = m.input`
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
- opacity: 0;
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, p = e[50], a = e[20];
31
- return o && (t = r === "primary" ? i.primary.main : i[r], p = r === "primary" ? i.primary.main : i[r], a = e.white), o && n && (t = e[30], p = e[30], a = e[10]), !o && n && (t = d.primary, p = e[30], a = e[20]), /* @__PURE__ */ f(
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: p
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: a
64
+ fill: p
63
65
  }
64
66
  )
65
67
  ]
66
68
  }
67
69
  );
68
70
  }
69
- const v = s(function({ size: o = "medium", color: n = "primary", checked: r, disabled: i, inlineCSS: e, ...d }, t) {
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 s=require("@emotion/react/jsx-runtime"),h=require("react"),g=require("@emotion/react"),m=require("@emotion/styled"),y=e=>e&&e.__esModule?e:{default:e},o=y(m),k=g.keyframes`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@emotion/react/jsx-runtime"),h=require("react"),g=require("@emotion/react"),m=require("@emotion/styled"),y=e=>e&&e.__esModule?e:{default:e},i=y(m),k=g.keyframes`
2
2
  100% {
3
3
  transform: rotate(270deg);
4
4
  }
5
- `,x=o.default.svg`
5
+ `,x=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
- `,$=o.default.circle`
11
+ `,$=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
- `,_=o.default.circle`
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
- `,p=h.forwardRef(function({size:t="small",value:i=0,transitionDuration:n=500,inlineCSS:l,loop:a,...d},u){const r=t==="large"?52:18,c=2*Math.PI*r,f=c*(1-(a?20:i)/100);return s.jsxs(x,{ref:u,viewBox:t==="large"?"0 0 120 120":"0 0 40 40",fill:"none",size:t,loop:a,...d,css:l,children:[s.jsx($,{size:t,r}),s.jsx(_,{size:t,transitionDuration:n,r,strokeLinecap:"round",strokeDashoffset:f,strokeDasharray:c})]})});exports.default=p;
18
+ `,b=h.forwardRef(function({size:r="small",value:c=0,transitionDuration:n=500,inlineCSS:d,loop:t,...a},u){const s=r==="large"?52:18,l=2*Math.PI*s,f=l*(1-(t?20:c)/100);return o.jsxs(x,{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($,{size:r,r:s}),o.jsx(_,{size:r,transitionDuration:n,r:s,strokeLinecap:"round",strokeDashoffset:f,strokeDasharray:l})]})});exports.default=b;
@@ -1,12 +1,12 @@
1
- import { jsxs as h, jsx as c } from "@emotion/react/jsx-runtime";
1
+ import { jsxs as h, jsx as n } from "@emotion/react/jsx-runtime";
2
2
  import { forwardRef as g } from "react";
3
3
  import { keyframes as k } from "@emotion/react";
4
- import o from "@emotion/styled";
4
+ import s from "@emotion/styled";
5
5
  const y = k`
6
6
  100% {
7
7
  transform: rotate(270deg);
8
8
  }
9
- `, p = o.svg`
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
- `, u = o.circle`
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
- `, x = o.circle`
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
- `, P = g(
55
- function({ size: t = "small", value: i = 0, transitionDuration: n = 500, inlineCSS: l, loop: s, ...d }, f) {
56
- const e = t === "large" ? 52 : 18, a = 2 * Math.PI * e, m = a * (1 - (s ? 20 : i) / 100);
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
- p,
58
+ u,
59
59
  {
60
60
  ref: f,
61
- viewBox: t === "large" ? "0 0 120 120" : "0 0 40 40",
61
+ viewBox: e === "large" ? "0 0 120 120" : "0 0 40 40",
62
62
  fill: "none",
63
- size: t,
64
- loop: s,
65
- ...d,
66
- css: l,
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__ */ c(u, { size: t, r: e }),
69
- /* @__PURE__ */ c(
70
- x,
71
+ /* @__PURE__ */ n(x, { size: e, r: o }),
72
+ /* @__PURE__ */ n(
73
+ $,
71
74
  {
72
- size: t,
73
- transitionDuration: n,
74
- r: e,
75
+ size: e,
76
+ transitionDuration: l,
77
+ r: o,
75
78
  strokeLinecap: "round",
76
79
  strokeDashoffset: m,
77
- strokeDasharray: a
80
+ strokeDasharray: c
78
81
  }
79
82
  )
80
83
  ]
@@ -83,5 +86,5 @@ const y = k`
83
86
  }
84
87
  );
85
88
  export {
86
- P as default
89
+ b as default
87
90
  };