@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.
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 +26 -23
  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 +35 -23
  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,7 +1,7 @@
1
1
  import { jsx as l } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as h } from "react";
3
- import f from "@emotion/styled";
4
- const a = f.div`
2
+ import { forwardRef as s, useId as f } from "react";
3
+ import m from "@emotion/styled";
4
+ const a = m.div`
5
5
  text-align: ${({ textAlign: i }) => i};
6
6
 
7
7
  ${({
@@ -22,9 +22,21 @@ const a = f.div`
22
22
  lineHeight: t.lineHeight,
23
23
  letterSpacing: t.letterSpacing
24
24
  }}
25
- `, s = h(function({ children: t, type: e = "main", textAlign: o = "center", inlineCSS: n, ...r }, g) {
26
- return /* @__PURE__ */ l(a, { ref: g, type: e, textAlign: o, ...r, css: n, children: t });
25
+ `, d = s(function({ children: t, type: e = "main", textAlign: o = "center", inlineCSS: n, ...r }, g) {
26
+ const h = f();
27
+ return /* @__PURE__ */ l(
28
+ a,
29
+ {
30
+ ref: g,
31
+ type: e,
32
+ textAlign: o,
33
+ id: `bottom-sheet-text-${h}`,
34
+ ...r,
35
+ css: n,
36
+ children: t
37
+ }
38
+ );
27
39
  });
28
40
  export {
29
- s as default
41
+ d as default
30
42
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("@emotion/react/jsx-runtime"),u=require("react"),p=require("../../Icon/Icon.cjs"),f=require("@emotion/styled"),h=e=>e&&e.__esModule?e:{default:e},o=h(f),x=o.default.div`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("@emotion/react/jsx-runtime"),n=require("react"),f=require("../../Icon/Icon.cjs"),m=require("@emotion/styled"),x=e=>e&&e.__esModule?e:{default:e},o=x(m),g=o.default.div`
2
2
  position: relative;
3
3
  display: flex;
4
4
  align-items: center;
@@ -9,8 +9,8 @@
9
9
  min-height: 48px;
10
10
  max-height: 48px;
11
11
  border-bottom: 1px solid
12
- ${({theme:{palette:{grey:e}},hideLine:n})=>n?"transparent":e[10]};
13
- `,m=o.default.div`
12
+ ${({theme:{palette:{grey:e}},hideLine:i})=>i?"transparent":e[10]};
13
+ `,S=o.default.div`
14
14
  flex-grow: 1;
15
15
  text-align: center;
16
16
  text-overflow: ellipsis;
@@ -18,11 +18,11 @@
18
18
  overflow: hidden;
19
19
 
20
20
  ${({theme:{typography:{h4B:e}}})=>({fontSize:e.size,fontWeight:e.weight,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing})};
21
- `,g=o.default.button`
21
+ `,j=o.default.button`
22
22
  position: absolute;
23
23
  top: 50%;
24
24
  right: 16px;
25
25
  transform: translateY(-50%);
26
- `,i=o.default.div`
26
+ `,s=o.default.div`
27
27
  min-width: 24px;
28
- `,S=u.forwardRef(function({children:n,onClose:l,hideCloseButton:s,hideLine:a,inlineCSS:r,...c},d){return t.jsxs(x,{ref:d,hideLine:a,...c,css:r,children:[t.jsx(i,{}),t.jsx(m,{children:n}),t.jsx(i,{}),!s&&t.jsx(g,{className:"closeButton",onClick:l,"aria-label":"닫기",children:t.jsx(p.default,{name:"CloseLine"})})]})});exports.default=S;
28
+ `,y=n.forwardRef(function({children:i,onClose:l,hideCloseButton:a,hideLine:r,tag:c="h2",inlineCSS:d,...u},p){const h=n.useId();return t.jsxs(g,{ref:p,hideLine:r,id:`bottom-sheet-title-${h}`,...u,css:d,children:[t.jsx(s,{}),t.jsx(S,{as:c,children:i}),t.jsx(s,{}),!a&&t.jsx(j,{className:"closeButton",onClick:l,"aria-label":"닫기",children:t.jsx(f.default,{name:"CloseLine"})})]})});exports.default=y;
@@ -1,10 +1,11 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { ElementType, HTMLAttributes } from 'react';
2
2
  import { GeneralComponentProps } from '../../typings/component';
3
3
 
4
4
  export interface BottomSheetTitleProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
5
5
  onClose?: () => void;
6
6
  hideCloseButton?: boolean;
7
7
  hideLine?: boolean;
8
+ tag?: ElementType;
8
9
  }
9
10
  declare const BottomSheetTitle: import('react').ForwardRefExoticComponent<BottomSheetTitleProps & import('react').RefAttributes<HTMLDivElement>>;
10
11
  export default BottomSheetTitle;
@@ -1,8 +1,8 @@
1
- import { jsxs as c, jsx as e } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as h } from "react";
3
- import d from "../../Icon/Icon.es.js";
1
+ import { jsxs as d, jsx as e } from "@emotion/react/jsx-runtime";
2
+ import { forwardRef as f, useId as x } from "react";
3
+ import g from "../../Icon/Icon.es.js";
4
4
  import o from "@emotion/styled";
5
- const f = o.div`
5
+ const u = o.div`
6
6
  position: relative;
7
7
  display: flex;
8
8
  align-items: center;
@@ -19,7 +19,7 @@ const f = o.div`
19
19
  },
20
20
  hideLine: i
21
21
  }) => i ? "transparent" : t[10]};
22
- `, x = o.div`
22
+ `, w = o.div`
23
23
  flex-grow: 1;
24
24
  text-align: center;
25
25
  text-overflow: ellipsis;
@@ -36,23 +36,34 @@ const f = o.div`
36
36
  lineHeight: t.lineHeight,
37
37
  letterSpacing: t.letterSpacing
38
38
  })};
39
- `, g = o.button`
39
+ `, S = o.button`
40
40
  position: absolute;
41
41
  top: 50%;
42
42
  right: 16px;
43
43
  transform: translateY(-50%);
44
44
  `, n = o.div`
45
45
  min-width: 24px;
46
- `, v = h(
47
- function({ children: i, onClose: r, hideCloseButton: l, hideLine: s, inlineCSS: p, ...a }, m) {
48
- return /* @__PURE__ */ c(f, { ref: m, hideLine: s, ...a, css: p, children: [
49
- /* @__PURE__ */ e(n, {}),
50
- /* @__PURE__ */ e(x, { children: i }),
51
- /* @__PURE__ */ e(n, {}),
52
- !l && /* @__PURE__ */ e(g, { className: "closeButton", onClick: r, "aria-label": "창 닫기", children: /* @__PURE__ */ e(d, { name: "CloseLine" }) })
53
- ] });
46
+ `, T = f(
47
+ function({ children: i, onClose: l, hideCloseButton: r, hideLine: s, tag: a = "h2", inlineCSS: p, ...m }, c) {
48
+ const h = x();
49
+ return /* @__PURE__ */ d(
50
+ u,
51
+ {
52
+ ref: c,
53
+ hideLine: s,
54
+ id: `bottom-sheet-title-${h}`,
55
+ ...m,
56
+ css: p,
57
+ children: [
58
+ /* @__PURE__ */ e(n, {}),
59
+ /* @__PURE__ */ e(w, { as: a, children: i }),
60
+ /* @__PURE__ */ e(n, {}),
61
+ !r && /* @__PURE__ */ e(S, { className: "closeButton", onClick: l, "aria-label": "닫기", children: /* @__PURE__ */ e(g, { name: "CloseLine" }) })
62
+ ]
63
+ }
64
+ );
54
65
  }
55
66
  );
56
67
  export {
57
- v as default
68
+ T as default
58
69
  };
package/Button/Button.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("@emotion/react/jsx-runtime"),h=require("react"),C=require("../hooks/useCheckHoverPossible/useCheckHoverPossible.cjs"),H=require("../utils/getIconLabel/getIconLabel.cjs"),k=require("@emotion/styled"),a=require("../utils/getContrastingTextColor/getContrastingTextColor.cjs"),R=l=>l&&l.__esModule?l:{default:l},M=R(k),z=M.default.button`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("@emotion/react/jsx-runtime"),b=require("react"),M=require("../hooks/useCheckHoverPossible/useCheckHoverPossible.cjs"),z=require("../utils/getIconLabel/getIconLabel.cjs"),W=require("@emotion/styled"),a=require("../utils/getContrastingTextColor/getContrastingTextColor.cjs"),j=l=>l&&l.__esModule?l:{default:l},m=j(W),_=m.default.button`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -7,18 +7,18 @@
7
7
  color: inherit;
8
8
  }
9
9
 
10
- ${({theme:{palette:{brand:l,grey:e}},variant:i,color:u})=>{let p={backgroundColor:l.primary.main,color:a.default(l.primary.main,[e.white,e[100]])};return i==="filled"&&u==="secondary"&&(p={backgroundColor:l.secondary,color:a.default(l.secondary,[e.white,e[100]])}),i==="filled"&&u==="tertiary"&&(p={backgroundColor:l.tertiary,color:a.default(l.tertiary,[e.white,e[100]])}),i==="outlined"&&(p={borderColor:e[50],backgroundColor:e.white,color:a.default(e.white,[e.white,e[100]])}),i==="text"&&u==="primary"&&(p={backgroundColor:"transparent",color:a.default("transparent",[e.white,e[100]])}),i==="text"&&u==="secondary"&&(p={backgroundColor:"transparent",color:e[70]}),p}};
10
+ ${({theme:{palette:{brand:l,grey:e}},variant:i,color:r})=>{let p={backgroundColor:l.primary.main,color:a.default(l.primary.main,[e.white,e[100]])};return i==="filled"&&r==="secondary"&&(p={backgroundColor:l.secondary,color:a.default(l.secondary,[e.white,e[100]])}),i==="filled"&&r==="tertiary"&&(p={backgroundColor:l.tertiary,color:a.default(l.tertiary,[e.white,e[100]])}),i==="outlined"&&(p={borderColor:e[50],backgroundColor:e.white,color:a.default(e.white,[e.white,e[100]])}),i==="text"&&r==="primary"&&(p={backgroundColor:"transparent",color:a.default("transparent",[e.white,e[100]])}),i==="text"&&r==="secondary"&&(p={backgroundColor:"transparent",color:e[70]}),p}};
11
11
 
12
- ${({theme:{spacing:l,typography:e},variant:i,size:u,startAdornment:p,endAdornment:o,iconOnly:r})=>{let f={gap:l.content(1),padding:10,borderRadius:8,fontSize:e.b4M.size,fontWeight:e.b4M.weight,lineHeight:e.b4M.lineHeight,letterSpacing:e.b4M.letterSpacing,"& svg":{width:20,height:20}};if(u==="2xLarge"){const{h0B:x}=e;let t="26px 24px";p&&(t=i==="text"?"26px 16px 26px 12px":"26px 36px 26px 24px"),o&&(t=i==="text"?"26px 12px 26px 16px":"26px 24px 26px 36px"),p&&o&&(t=i==="text"?"26px 12px":"26px 24px"),r&&(t="26px 25px"),f={gap:l.content(3),maxHeight:100,padding:t,borderRadius:20,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:48,height:48}}}if(u==="xLarge"){const{h4B:x}=e;let t="16px 12px";p&&(t=i==="text"?"16px 8px 16px 4px":"16px 16px 16px 12px"),o&&(t=i==="text"?"16px 4px 16px 8px":"16px 12px 16px 16px"),p&&o&&(t=i==="text"?"16px 4px":"16px 12px"),r&&(t="16px 15px"),f={gap:l.content(2),maxHeight:56,padding:t,borderRadius:12,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:24,height:24}}}if(u==="large"){const{b2M:x}=e;let t="12px 8px";p&&(t=i==="text"?"12px 8px 12px 4px":"12px 12px 12px 8px"),o&&(t=i==="text"?"12px 4px 12px 8px":"12px 8px 12px 12px"),p&&o&&(t=i==="text"?"12px 4px":"12px 8px"),r&&(t="12px 11px"),f={gap:6,maxHeight:48,padding:t,borderRadius:10,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:24,height:24}}}if(u==="medium"){const{b4M:x}=e;let t="10px 8px";p&&(t=i==="text"?"10px 8px 10px 4px":"10px 10px 10px 8px"),o&&(t=i==="text"?"10px 4px 10px 8px":"10px 8px 10px 10px"),p&&o&&(t=i==="text"?"10px 4px":"10px 8px"),r&&(t="10px 9px"),f={gap:l.content(1),maxHeight:40,padding:t,borderRadius:8,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:20,height:20}}}if(u==="small"){const{c3M:x}=e;let t="8px 6px";p&&(t=i==="text"?"8px 8px 8px 4px":"8px 8px 8px 6px"),o&&(t=i==="text"?"8px 4px 8px 8px":"8px 6px 8px 8px"),p&&o&&(t=i==="text"?"8px 6px":"8px 4px"),r&&(t="8px 7px"),f={gap:l.content(1),maxHeight:32,padding:t,borderRadius:6,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:16,height:16}}}if(u==="xSmall"){const{c3M:x}=e;let t="4px 6px";p&&(t=i==="text"?"4px 8px 4px 4px":"4px 8px 4px 6px"),o&&(t=i==="text"?"4px 4px 4px 8px":"4px 6px 4px 8px"),p&&o&&(t=i==="text"?"4px":"4px 6px"),r&&(t="4px 3px"),r?f={gap:l.content(1),maxHeight:24,width:24,height:24,borderRadius:6,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:16,height:16}}:f={gap:l.content(1),maxHeight:24,padding:t,borderRadius:6,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:16,height:16}}}return i==="text"&&u==="xLarge"&&(f={...f,borderWidth:1.5}),f}};
12
+ ${({theme:{spacing:l,typography:e},variant:i,size:r,startAdornment:p,endAdornment:o,iconOnly:f})=>{let u={gap:l.content(1),padding:10,borderRadius:8,fontSize:e.b4M.size,fontWeight:e.b4M.weight,lineHeight:e.b4M.lineHeight,letterSpacing:e.b4M.letterSpacing,"& svg":{width:20,height:20}};if(r==="2xLarge"){const{h0B:x}=e;let t="26px 24px";p&&(t=i==="text"?"26px 16px 26px 12px":"26px 36px 26px 24px"),o&&(t=i==="text"?"26px 12px 26px 16px":"26px 24px 26px 36px"),p&&o&&(t=i==="text"?"26px 12px":"26px 24px"),f&&(t="26px 25px"),u={gap:l.content(3),maxHeight:100,padding:t,borderRadius:20,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:48,height:48}}}if(r==="xLarge"){const{h4B:x}=e;let t="16px 12px";p&&(t=i==="text"?"16px 8px 16px 4px":"16px 16px 16px 12px"),o&&(t=i==="text"?"16px 4px 16px 8px":"16px 12px 16px 16px"),p&&o&&(t=i==="text"?"16px 4px":"16px 12px"),f&&(t="16px 15px"),u={gap:l.content(2),maxHeight:56,padding:t,borderRadius:12,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:24,height:24}}}if(r==="large"){const{b2M:x}=e;let t="12px 8px";p&&(t=i==="text"?"12px 8px 12px 4px":"12px 12px 12px 8px"),o&&(t=i==="text"?"12px 4px 12px 8px":"12px 8px 12px 12px"),p&&o&&(t=i==="text"?"12px 4px":"12px 8px"),f&&(t="12px 11px"),u={gap:6,maxHeight:48,padding:t,borderRadius:10,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:24,height:24}}}if(r==="medium"){const{b4M:x}=e;let t="10px 8px";p&&(t=i==="text"?"10px 8px 10px 4px":"10px 10px 10px 8px"),o&&(t=i==="text"?"10px 4px 10px 8px":"10px 8px 10px 10px"),p&&o&&(t=i==="text"?"10px 4px":"10px 8px"),f&&(t="10px 9px"),u={gap:l.content(1),maxHeight:40,padding:t,borderRadius:8,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:20,height:20}}}if(r==="small"){const{c3M:x}=e;let t="8px 6px";p&&(t=i==="text"?"8px 8px 8px 4px":"8px 8px 8px 6px"),o&&(t=i==="text"?"8px 4px 8px 8px":"8px 6px 8px 8px"),p&&o&&(t=i==="text"?"8px 6px":"8px 4px"),f&&(t="8px 7px"),u={gap:l.content(1),maxHeight:32,padding:t,borderRadius:6,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:16,height:16}}}if(r==="xSmall"){const{c3M:x}=e;let t="4px 6px";p&&(t=i==="text"?"4px 8px 4px 4px":"4px 8px 4px 6px"),o&&(t=i==="text"?"4px 4px 4px 8px":"4px 6px 4px 8px"),p&&o&&(t=i==="text"?"4px":"4px 6px"),f&&(t="4px 3px"),f?u={gap:l.content(1),maxHeight:24,width:24,height:24,borderRadius:6,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:16,height:16}}:u={gap:l.content(1),maxHeight:24,padding:t,borderRadius:6,fontSize:x.size,fontWeight:x.weight,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing,"& svg":{width:16,height:16}}}return i==="text"&&r==="xLarge"&&(u={...u,borderWidth:1.5}),u}};
13
13
 
14
14
  ${({rounded:l})=>l?{}:{borderRadius:"unset"}}
15
15
 
16
- ${({theme:{palette:{brand:l,grey:e}},variant:i,color:u,isHoverPossible:p})=>{let o={'&:active:not([aria-disabled="true"])':{backgroundColor:l.primary.press},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:l.primary.press}}:{}};return i==="filled"&&u==="secondary"&&(o={'&:active:not([aria-disabled="true"])':{backgroundColor:e[100]},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:e[100]}}:{}}),i==="filled"&&u==="tertiary"&&(o={'&:active:not([aria-disabled="true"])':{backgroundColor:e[70]},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:e[70]}}:{}}),(i==="outlined"||i==="text")&&(o={'&:active:not([aria-disabled="true"])':{backgroundColor:e[10]},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:e[10]}}:{}}),o}}
16
+ ${({theme:{palette:{brand:l,grey:e}},variant:i,color:r,isHoverPossible:p})=>{let o={'&:active:not([aria-disabled="true"])':{backgroundColor:l.primary.press},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:l.primary.press}}:{}};return i==="filled"&&r==="secondary"&&(o={'&:active:not([aria-disabled="true"])':{backgroundColor:e[100]},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:e[100]}}:{}}),i==="filled"&&r==="tertiary"&&(o={'&:active:not([aria-disabled="true"])':{backgroundColor:e[70]},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:e[70]}}:{}}),(i==="outlined"||i==="text")&&(o={'&:active:not([aria-disabled="true"])':{backgroundColor:e[10]},...p?{'&:hover:not([aria-disabled="true"])':{backgroundColor:e[10]}}:{}}),o}}
17
17
 
18
18
  &[aria-disabled="true"] {
19
19
  cursor: not-allowed;
20
- ${({theme:{palette:{brand:l,grey:e}},variant:i,color:u})=>{let p={backgroundColor:l.primary.disable,color:a.default(l.primary.disable,[e[30],e.white])};return i==="filled"&&u==="secondary"&&(p={backgroundColor:e[10],color:a.default(e[10],[e[30],e.white])}),i==="outlined"&&(p={borderColor:e[30],backgroundColor:e[10],color:a.default(e[30],[e[30],e.white])}),i==="text"&&(p={color:a.default(e[30],[e[30],e.white])}),p}};
20
+ ${({theme:{palette:{brand:l,grey:e}},variant:i,color:r})=>{let p={backgroundColor:l.primary.disable,color:a.default(l.primary.disable,[e[30],e.white])};return i==="filled"&&r==="secondary"&&(p={backgroundColor:e[10],color:a.default(e[10],[e[30],e.white])}),i==="outlined"&&(p={borderColor:e[30],backgroundColor:e[10],color:a.default(e[30],[e[30],e.white])}),i==="text"&&(p={color:a.default(e[30],[e[30],e.white])}),p}};
21
21
  }
22
22
 
23
23
  ${({fullWidth:l})=>l?{width:"100%"}:null};
24
- `,W=h.forwardRef(function({children:e,variant:i="filled",size:u="medium",color:p="primary",startAdornment:o,endAdornment:r,iconOnly:f,fullWidth:x,inlineCSS:t,rounded:s=!0,disabled:g,...d},b){const{isHoverPossible:n}=C.default(),w=()=>{if(!f)return;if(d["aria-label"])return d["aria-label"];const c=o||r||e;if(h.isValidElement(c))return H.default(c.props.name)};return S.jsxs(z,{ref:b,variant:i,size:u,color:p,fullWidth:x,rounded:s,startAdornment:o,endAdornment:r,iconOnly:f,isHoverPossible:n,"aria-disabled":g,"aria-label":w(),...d,css:t,children:[o,!f&&e,r]})});exports.default=W;
24
+ `,q=b.forwardRef(function({children:e,variant:i="filled",size:r="medium",color:p="primary",startAdornment:o,endAdornment:f,iconOnly:u,fullWidth:x,inlineCSS:t,rounded:n=!0,disabled:h,onClick:c,onKeyDown:s,...g},w){const{isHoverPossible:S}=M.default(),H=()=>{if(!u)return;if(g["aria-label"])return g["aria-label"];const d=o||f||e;if(b.isValidElement(d))return z.default(d.props.name)},C=d=>{h||c==null||c(d)},k=d=>{h||s==null||s(d)};return R.jsxs(_,{ref:w,variant:i,size:r,color:p,fullWidth:x,rounded:n,startAdornment:o,endAdornment:f,iconOnly:u,isHoverPossible:S,"aria-disabled":h,"aria-label":H(),onClick:C,onKeyDown:k,...g,css:t,children:[o,!u&&e,f]})});exports.default=q;
@@ -1,10 +1,10 @@
1
- import { jsxs as n } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as w, isValidElement as S } from "react";
3
- import C from "../hooks/useCheckHoverPossible/useCheckHoverPossible.es.js";
4
- import H from "../utils/getIconLabel/getIconLabel.es.js";
5
- import k from "@emotion/styled";
1
+ import { jsxs as m } from "@emotion/react/jsx-runtime";
2
+ import { forwardRef as k, isValidElement as z } from "react";
3
+ import R from "../hooks/useCheckHoverPossible/useCheckHoverPossible.es.js";
4
+ import W from "../utils/getIconLabel/getIconLabel.es.js";
5
+ import M from "@emotion/styled";
6
6
  import c from "../utils/getContrastingTextColor/getContrastingTextColor.es.js";
7
- const m = k.button`
7
+ const j = M.button`
8
8
  display: inline-flex;
9
9
  align-items: center;
10
10
  justify-content: center;
@@ -249,7 +249,7 @@ const m = k.button`
249
249
  ${({ fullWidth: l }) => l ? {
250
250
  width: "100%"
251
251
  } : null};
252
- `, B = w(function({
252
+ `, V = k(function({
253
253
  children: e,
254
254
  variant: i = "filled",
255
255
  size: r = "medium",
@@ -259,35 +259,41 @@ const m = k.button`
259
259
  iconOnly: h,
260
260
  fullWidth: x,
261
261
  inlineCSS: t,
262
- rounded: d = !0,
263
- disabled: u,
264
- ...a
265
- }, s) {
266
- const { isHoverPossible: b } = C();
267
- return /* @__PURE__ */ n(
268
- m,
262
+ rounded: b = !0,
263
+ disabled: g,
264
+ onClick: d,
265
+ onKeyDown: u,
266
+ ...s
267
+ }, n) {
268
+ const { isHoverPossible: w } = R(), S = () => {
269
+ if (!h) return;
270
+ if (s["aria-label"]) return s["aria-label"];
271
+ const a = o || f || e;
272
+ if (z(a))
273
+ return W(a.props.name);
274
+ }, H = (a) => {
275
+ g || d == null || d(a);
276
+ }, C = (a) => {
277
+ g || u == null || u(a);
278
+ };
279
+ return /* @__PURE__ */ m(
280
+ j,
269
281
  {
270
- ref: s,
282
+ ref: n,
271
283
  variant: i,
272
284
  size: r,
273
285
  color: p,
274
286
  fullWidth: x,
275
- rounded: d,
287
+ rounded: b,
276
288
  startAdornment: o,
277
289
  endAdornment: f,
278
290
  iconOnly: h,
279
- isHoverPossible: b,
280
- "aria-disabled": u,
281
- "aria-label": (() => {
282
- if (!h)
283
- return;
284
- if (a["aria-label"])
285
- return a["aria-label"];
286
- const g = o || f || e;
287
- if (S(g))
288
- return H(g.props.name);
289
- })(),
290
- ...a,
291
+ isHoverPossible: w,
292
+ "aria-disabled": g,
293
+ "aria-label": S(),
294
+ onClick: H,
295
+ onKeyDown: C,
296
+ ...s,
291
297
  css: t,
292
298
  children: [
293
299
  o,
@@ -298,5 +304,5 @@ const m = k.button`
298
304
  );
299
305
  });
300
306
  export {
301
- B as default
307
+ V as default
302
308
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("@emotion/react/jsx-runtime"),l=require("react"),A=require("@emotion/styled"),U=require("../hooks/useCheckHoverPossible/useCheckHoverPossible.cjs"),B=a=>a&&a.__esModule?a:{default:a},T=B(A),G=T.default.ul`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("@emotion/react/jsx-runtime"),l=require("react"),B=require("@emotion/styled"),G=require("../hooks/useCheckHasFocus/useCheckHasFocus.cjs"),J=require("../hooks/useCheckHoverPossible/useCheckHoverPossible.cjs"),Q=require("../hooks/useCheckKeyboardMode/useCheckKeyboardMode.cjs"),X=s=>s&&s.__esModule?s:{default:s},H=X(B),Z=H.default.div`
2
2
  list-style-type: none;
3
3
  margin: 0;
4
4
  padding: 0;
@@ -8,7 +8,7 @@
8
8
  position: relative;
9
9
  cursor: grab;
10
10
  transition: transform 0.3s ease-out;
11
- `,J=T.default.div`
11
+ `,ee=H.default.div`
12
12
  position: relative;
13
13
  width: auto;
14
14
  height: fit-content;
@@ -30,7 +30,17 @@
30
30
  );
31
31
  pointer-events: none;
32
32
  }
33
- `,x=T.default.li`
33
+
34
+ @supports selector(:has(:focus-visible)) {
35
+ &:has(:focus-visible) {
36
+ outline: ${({theme:s})=>s.palette.grey[100]} solid 2px;
37
+ }
38
+ }
39
+
40
+ @supports not selector(:has(:focus-visible)) {
41
+ ${({focusWithin:s,theme:t})=>s?{outline:`${t.palette.grey[100]} solid 2px`}:{}}
42
+ }
43
+ `,m=H.default.div`
34
44
  height: 54px;
35
45
  display: flex;
36
46
  align-items: center;
@@ -38,7 +48,7 @@
38
48
  scroll-snap-align: start;
39
49
  position: relative;
40
50
 
41
- ${({theme:{palette:{grey:a},typography:{h2M:e},spacing:{content:o}}})=>({fontSize:e.size,fontWeight:e.weight,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,color:a[100],padding:o(3)})};
51
+ ${({theme:{palette:{grey:s},typography:{h2M:t},spacing:{content:r}}})=>({fontSize:t.size,fontWeight:t.weight,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,color:s[100],padding:r(3)})};
42
52
 
43
- ${({selected:a,theme:{palette:{grey:e},typography:{h4M:o}}})=>a?{"&, & *":{color:`${e[100]} !important`}}:{color:`${e[30]} !important`,fontSize:`${o.size} !important`,fontWeight:`${o.weight} !important`,lineHeight:`${o.lineHeight} !important`,letterSpacing:`${o.letterSpacing} !important`,"& *":{color:`${e[30]} !important`}}}
44
- `,k=3,K=l.forwardRef(function({column:e,value:o=e[0].value,onChange:y,renderLabel:P,inlineCSS:j,wrapperProps:S,...w},C){const s=l.useRef(null),r=54,L=e.findIndex(n=>n.value===o),[g,p]=l.useState(L*r),[M,I]=l.useState(!1),[_,O]=l.useState(0),[R,E]=l.useState(0),Y=l.useId(),{isHoverPossible:q}=U.default(),D=n=>{I(!0),E(n),O(g)},H=n=>{if(!M)return;const i=R-n;let t=_+i;const c=r*(e.length-1);t<0?t=0:t>c&&(t=c),p(t),s.current&&(s.current.children[0].scrollTop=t)},N=n=>D(n.clientY),W=n=>D(n.touches[0].clientY),z=n=>H(n.clientY),F=n=>H(n.touches[0].clientY),v=n=>{if(!M||(I(!1),!q&&n.type==="mouseup"))return;if(Math.abs(_-g)<k){const h=n.target.closest("[data-index]");if(h){const m=Number(h.dataset.index);if(e[m]&&s.current){const b=s.current.children[0];b.scrollTo({top:m*r,behavior:"smooth"});const $=()=>{Math.abs(b.scrollTop-m*r)<1&&(y(e[m].value),b.removeEventListener("scroll",$))};b.addEventListener("scroll",$)}}return}let i=Math.round(g/r),t=i*r;const c=r*(e.length-1);t<0?(t=0,i=0):t>c&&(t=c,i=e.length-1);const d=u=>{if(Math.abs(u-t)<1)p(t),s.current&&(s.current.children[0].scrollTop=t);else{const h=u+(t-u)/5;p(h),s.current&&(s.current.children[0].scrollTop=h),requestAnimationFrame(()=>d(h))}};requestAnimationFrame(()=>d(g)),e[i]&&y(e[i].value)};return l.useLayoutEffect(()=>{const i=e.findIndex(t=>t.value===o)*r;p(i),s.current&&(s.current.children[0].scrollTop=i)},[o,e,r]),f.jsx(J,{ref:s,...S,css:S==null?void 0:S.inlineCSS,children:f.jsx(G,{ref:C,css:j,...w,onMouseDown:N,onMouseMove:z,onMouseUp:v,onMouseLeave:v,onTouchStart:W,onTouchMove:F,onTouchEnd:v,onTouchCancel:v,children:e.map((n,i)=>{const t=e.findIndex(u=>u.value===o),c=t===0?0:Math.round(g/r),d=i===c;return f.jsxs(l.Fragment,{children:[i===0&&f.jsx(x,{className:"chain-picker-item","data-index":i,selected:!1,distance:(t+1)*-1}),f.jsx(x,{className:"chain-picker-item","data-index":i,"data-selected":d,selected:d,distance:i-t,children:P?P(n,d):n.label}),i===e.length-1&&f.jsx(x,{className:"chain-picker-item","data-index":i,selected:!1,distance:e.length-t})]},`${Y}_${n.label}`)})})})});exports.SCROLL_POSITION_THRESHOLD=k;exports.default=K;
53
+ ${({selected:s,theme:{palette:{grey:t},typography:{h4M:r}}})=>s?{"&, & *":{color:`${t[100]} !important`}}:{color:`${t[30]} !important`,fontSize:`${r.size} !important`,fontWeight:`${r.weight} !important`,lineHeight:`${r.lineHeight} !important`,letterSpacing:`${r.letterSpacing} !important`,"& *":{color:`${t[30]} !important`}}}
54
+ `,_=3,te=l.forwardRef(function({column:t,value:r=t[0].value,onChange:y,renderLabel:k,inlineCSS:C,wrapperProps:g,thumbProps:R,...j},q){const T=t.findIndex(i=>i.value===r),p=l.useRef(T),o=l.useRef(null),[f,S]=l.useState(T*54),[w,P]=l.useState(!1),[D,E]=l.useState(0),[L,O]=l.useState(0),Y=l.useId(),{isHoverPossible:N}=J.default(),{isKeyboardMode:W}=Q.default(),{hasFocus:F}=G.default({ref:o}),I=i=>{P(!0),O(i),E(f)},M=i=>{if(!w)return;const e=L-i;let n=D+e;const a=54*(t.length-1);n<0?n=0:n>a&&(n=a),S(n),o.current&&(o.current.children[0].scrollTop=n)},z=i=>{var n,a;i.stopPropagation();let e=p.current;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),y(t[e].value),p.current=e,(a=(n=o.current)==null?void 0:n.querySelector(`.chain-picker-item[data-index="${p.current}"]`))==null||a.focus()},A=i=>I(i.clientY),K=i=>I(i.touches[0].clientY),U=i=>M(i.clientY),V=i=>M(i.touches[0].clientY),v=i=>{if(!w||(P(!1),!N&&i.type==="mouseup"))return;if(Math.abs(D-f)<_){const u=i.target.closest("[data-index]");if(u){const x=Number(u.dataset.index);if(t[x]&&o.current){const b=o.current.children[0];b.scrollTo({top:x*54,behavior:"smooth"});const $=()=>{Math.abs(b.scrollTop-x*54)<1&&(y(t[x].value),b.removeEventListener("scroll",$))};b.addEventListener("scroll",$)}}return}let e=Math.round(f/54),n=e*54;const a=54*(t.length-1);n<0?(n=0,e=0):n>a&&(n=a,e=t.length-1),p.current=e;const c=d=>{if(Math.abs(d-n)<1)S(n),o.current&&(o.current.children[0].scrollTop=n);else{const u=d+(n-d)/5;S(u),o.current&&(o.current.children[0].scrollTop=u),requestAnimationFrame(()=>c(u))}};requestAnimationFrame(()=>c(f)),t[e]&&y(t[e].value)};return l.useLayoutEffect(()=>{const e=t.findIndex(n=>n.value===r)*54;S(e),o.current&&(o.current.children[0].scrollTop=e)},[r,t,54]),h.jsx(ee,{ref:o,...g,css:g==null?void 0:g.inlineCSS,focusWithin:W&&F,children:h.jsx(Z,{role:"group",ref:q,css:C,...j,onMouseDown:A,onMouseMove:U,onMouseUp:v,onMouseLeave:v,onTouchStart:K,onTouchMove:V,onTouchEnd:v,onTouchCancel:v,children:t.map((i,e)=>{const n=t.findIndex(d=>d.value===r),a=n===0?0:Math.round(f/54),c=e===a;return h.jsxs(l.Fragment,{children:[e===0&&h.jsx(m,{className:"chain-picker-item","data-index":e-1,selected:!1,distance:(n+1)*-1}),h.jsx(m,{className:"chain-picker-item","data-index":e,"data-selected":c,selected:c,distance:e-n,role:"spinbutton",tabIndex:c?0:-1,"aria-hidden":c?"false":"true","aria-valuenow":i.value,"aria-valuetext":i.ariaValueText??i.label,"aria-valuemin":t[0].value,"aria-valuemax":t[t.length-1].value,...R,onKeyDown:z,children:k?k(i,c):i.label}),e===t.length-1&&h.jsx(m,{className:"chain-picker-item","data-index":e+1,selected:!1,distance:t.length-n})]},`${Y}_${i.label}`)})})})});exports.SCROLL_POSITION_THRESHOLD=_;exports.default=te;
@@ -5,13 +5,15 @@ export declare const SCROLL_POSITION_THRESHOLD = 3;
5
5
  export interface ChainPickerItem {
6
6
  label: string;
7
7
  value: number;
8
+ ariaValueText?: string;
8
9
  }
9
- export interface ChainPickerProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLUListElement>, 'onChange'>> {
10
+ export interface ChainPickerProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
10
11
  column: ChainPickerItem[];
11
12
  value?: number;
12
13
  onChange: (selectedValue: number) => void;
13
14
  renderLabel?: (item: ChainPickerItem, isSelected: boolean) => ReactNode;
14
15
  wrapperProps?: GeneralComponentProps<HTMLAttributes<HTMLDivElement>>;
16
+ thumbProps?: GeneralComponentProps<HTMLAttributes<HTMLDivElement>>;
15
17
  }
16
- declare const ChainPicker: import('react').ForwardRefExoticComponent<ChainPickerProps & import('react').RefAttributes<HTMLUListElement>>;
18
+ declare const ChainPicker: import('react').ForwardRefExoticComponent<ChainPickerProps & import('react').RefAttributes<HTMLDivElement>>;
17
19
  export default ChainPicker;