@ceed/cds 0.0.186 → 0.0.187-treeshaking.1

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 (334) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +30 -0
  2. package/dist/_virtual/bind-all.js +3 -0
  3. package/dist/_virtual/bind.js +3 -0
  4. package/dist/_virtual/colorManipulator.js +5 -0
  5. package/dist/_virtual/colorManipulator2.js +3 -0
  6. package/dist/_virtual/createStyled.js +7 -0
  7. package/dist/_virtual/createStyled2.js +3 -0
  8. package/dist/_virtual/extends.js +3 -0
  9. package/dist/_virtual/index.js +5 -0
  10. package/dist/_virtual/index10.js +6 -0
  11. package/dist/_virtual/index11.js +6 -0
  12. package/dist/_virtual/index12.js +6 -0
  13. package/dist/_virtual/index2.js +3 -0
  14. package/dist/_virtual/index3.js +7 -0
  15. package/dist/_virtual/index4.js +3 -0
  16. package/dist/_virtual/index5.js +6 -0
  17. package/dist/_virtual/index6.js +6 -0
  18. package/dist/_virtual/index7.js +6 -0
  19. package/dist/_virtual/index8.js +6 -0
  20. package/dist/_virtual/index9.js +6 -0
  21. package/dist/_virtual/interopRequireDefault.js +3 -0
  22. package/dist/_virtual/objectWithoutPropertiesLoose.js +3 -0
  23. package/dist/components/Accordions/Accordions.js +43 -0
  24. package/dist/components/Accordions/index.d.ts +2 -2
  25. package/dist/components/Autocomplete/Autocomplete.js +196 -0
  26. package/dist/components/Autocomplete/index.d.ts +2 -2
  27. package/dist/components/Autocomplete/index.js +5 -0
  28. package/dist/components/Avatar/Avatar.js +42 -0
  29. package/dist/components/Avatar/index.d.ts +2 -2
  30. package/dist/components/Box/Box.js +8 -0
  31. package/dist/components/Box/index.d.ts +2 -2
  32. package/dist/components/Box/index.js +5 -0
  33. package/dist/components/Breadcrumbs/Breadcrumbs.js +47 -0
  34. package/dist/components/Breadcrumbs/index.d.ts +2 -2
  35. package/dist/components/Button/Button.js +20 -0
  36. package/dist/components/Button/index.d.ts +2 -2
  37. package/dist/components/Button/index.js +5 -0
  38. package/dist/components/Calendar/Calendar.d.ts +1 -1
  39. package/dist/components/Calendar/Calendar.js +333 -0
  40. package/dist/components/Calendar/hooks/use-calendar-props.d.ts +3 -3
  41. package/dist/components/Calendar/hooks/use-calendar-props.js +74 -0
  42. package/dist/components/Calendar/hooks/use-calendar.d.ts +1 -1
  43. package/dist/components/Calendar/hooks/use-calendar.js +247 -0
  44. package/dist/components/Calendar/index.d.ts +2 -2
  45. package/dist/components/Calendar/index.js +5 -0
  46. package/dist/components/Calendar/utils/index.js +74 -0
  47. package/dist/components/Card/Card.js +20 -0
  48. package/dist/components/Card/index.d.ts +2 -2
  49. package/dist/components/Checkbox/Checkbox.js +19 -0
  50. package/dist/components/Checkbox/index.d.ts +2 -2
  51. package/dist/components/Checkbox/index.js +5 -0
  52. package/dist/components/Chip/Chip.js +8 -0
  53. package/dist/components/Chip/index.d.ts +2 -2
  54. package/dist/components/Chip/index.js +5 -0
  55. package/dist/components/Container/Container.js +49 -0
  56. package/dist/components/Container/index.d.ts +2 -2
  57. package/dist/components/CurrencyInput/CurrencyInput.js +91 -0
  58. package/dist/components/CurrencyInput/hooks/use-currency-setting.js +167 -0
  59. package/dist/components/CurrencyInput/index.d.ts +2 -2
  60. package/dist/components/CurrencyInput/index.js +5 -0
  61. package/dist/components/DataTable/DataTable.d.ts +1 -1
  62. package/dist/components/DataTable/DataTable.js +568 -0
  63. package/dist/components/DataTable/index.d.ts +2 -2
  64. package/dist/components/DataTable/types.d.ts +7 -7
  65. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  66. package/dist/components/DatePicker/DatePicker.js +210 -0
  67. package/dist/components/DatePicker/index.d.ts +2 -2
  68. package/dist/components/DatePicker/index.js +5 -0
  69. package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  70. package/dist/components/DateRangePicker/DateRangePicker.js +213 -0
  71. package/dist/components/DateRangePicker/index.d.ts +2 -2
  72. package/dist/components/DialogActions/DialogActions.js +14 -0
  73. package/dist/components/DialogActions/index.d.ts +2 -2
  74. package/dist/components/DialogActions/index.js +5 -0
  75. package/dist/components/DialogContent/DialogContent.js +11 -0
  76. package/dist/components/DialogContent/index.d.ts +2 -2
  77. package/dist/components/DialogContent/index.js +5 -0
  78. package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
  79. package/dist/components/DialogFrame/DialogFrame.js +31 -0
  80. package/dist/components/DialogFrame/index.d.ts +2 -2
  81. package/dist/components/DialogTitle/DialogTitle.js +11 -0
  82. package/dist/components/DialogTitle/index.d.ts +2 -2
  83. package/dist/components/DialogTitle/index.js +5 -0
  84. package/dist/components/Divider/Divider.js +19 -0
  85. package/dist/components/Divider/index.d.ts +2 -2
  86. package/dist/components/Drawer/Drawer.js +40 -0
  87. package/dist/components/Drawer/index.d.ts +2 -2
  88. package/dist/components/Dropdown/Dropdown.js +8 -0
  89. package/dist/components/Dropdown/index.d.ts +2 -2
  90. package/dist/components/Dropdown/index.js +5 -0
  91. package/dist/components/FormControl/FormControl.js +15 -0
  92. package/dist/components/FormControl/index.d.ts +2 -2
  93. package/dist/components/FormControl/index.js +5 -0
  94. package/dist/components/FormHelperText/FormHelperText.js +8 -0
  95. package/dist/components/FormHelperText/index.d.ts +2 -2
  96. package/dist/components/FormHelperText/index.js +5 -0
  97. package/dist/components/FormLabel/FormLabel.js +8 -0
  98. package/dist/components/FormLabel/index.d.ts +2 -2
  99. package/dist/components/FormLabel/index.js +5 -0
  100. package/dist/components/Grid/index.d.ts +2 -2
  101. package/dist/components/IconButton/IconButton.js +20 -0
  102. package/dist/components/IconButton/index.d.ts +2 -2
  103. package/dist/components/IconButton/index.js +5 -0
  104. package/dist/components/Input/Input.d.ts +1 -1
  105. package/dist/components/Input/Input.js +60 -0
  106. package/dist/components/Input/index.d.ts +2 -2
  107. package/dist/components/Input/index.js +5 -0
  108. package/dist/components/InsetDrawer/InsetDrawer.js +30 -0
  109. package/dist/components/InsetDrawer/index.d.ts +2 -2
  110. package/dist/components/Markdown/Markdown.d.ts +6 -22
  111. package/dist/components/Markdown/Markdown.js +36 -0
  112. package/dist/components/Markdown/index.d.ts +2 -2
  113. package/dist/components/Menu/Menu.js +43 -0
  114. package/dist/components/Menu/index.d.ts +2 -2
  115. package/dist/components/Menu/index.js +6 -0
  116. package/dist/components/MenuButton/MenuButton.js +26 -0
  117. package/dist/components/Modal/Modal.d.ts +4 -4
  118. package/dist/components/Modal/Modal.js +43 -0
  119. package/dist/components/Modal/index.d.ts +2 -2
  120. package/dist/components/MonthPicker/MonthPicker.d.ts +1 -1
  121. package/dist/components/MonthPicker/MonthPicker.js +162 -0
  122. package/dist/components/MonthPicker/index.d.ts +2 -2
  123. package/dist/components/MonthRangePicker/MonthRangePicker.d.ts +1 -1
  124. package/dist/components/MonthRangePicker/MonthRangePicker.js +172 -0
  125. package/dist/components/MonthRangePicker/index.d.ts +2 -2
  126. package/dist/components/NavigationGroup/NavigationGroup.js +42 -0
  127. package/dist/components/NavigationGroup/index.d.ts +2 -2
  128. package/dist/components/NavigationItem/NavigationItem.js +45 -0
  129. package/dist/components/NavigationItem/index.d.ts +2 -2
  130. package/dist/components/Navigator/Navigator.js +30 -0
  131. package/dist/components/Navigator/index.d.ts +2 -2
  132. package/dist/components/Pagination/Pagination.d.ts +2 -2
  133. package/dist/components/Pagination/Pagination.js +117 -0
  134. package/dist/components/Pagination/index.d.ts +2 -2
  135. package/dist/components/Pagination/index.js +5 -0
  136. package/dist/components/PercentageInput/PercentageInput.js +85 -0
  137. package/dist/components/PercentageInput/index.d.ts +2 -2
  138. package/dist/components/Radio/Radio.js +11 -0
  139. package/dist/components/Radio/index.d.ts +2 -2
  140. package/dist/components/RadioList/RadioList.d.ts +1 -1
  141. package/dist/components/RadioList/RadioList.js +18 -0
  142. package/dist/components/RadioList/index.d.ts +2 -2
  143. package/dist/components/Select/Select.d.ts +1 -1
  144. package/dist/components/Select/Select.js +56 -0
  145. package/dist/components/Select/index.d.ts +2 -2
  146. package/dist/components/Select/index.js +6 -0
  147. package/dist/components/Sheet/Sheet.js +8 -0
  148. package/dist/components/Sheet/index.d.ts +2 -2
  149. package/dist/components/Sheet/index.js +5 -0
  150. package/dist/components/Stack/index.d.ts +2 -2
  151. package/dist/components/Stack/index.js +2 -0
  152. package/dist/components/Stepper/Stepper.js +66 -0
  153. package/dist/components/Stepper/index.d.ts +2 -2
  154. package/dist/components/Switch/Switch.js +46 -0
  155. package/dist/components/Switch/index.d.ts +2 -2
  156. package/dist/components/Table/Table.js +64 -0
  157. package/dist/components/Table/index.d.ts +2 -2
  158. package/dist/components/Tabs/Tabs.js +17 -0
  159. package/dist/components/Tabs/index.d.ts +2 -2
  160. package/dist/components/Textarea/Textarea.d.ts +3 -17
  161. package/dist/components/Textarea/Textarea.js +31 -0
  162. package/dist/components/Textarea/index.d.ts +2 -2
  163. package/dist/components/Textarea/index.js +5 -0
  164. package/dist/components/ThemeProvider/ThemeProvider.d.ts +7 -7
  165. package/dist/components/ThemeProvider/ThemeProvider.js +240 -0
  166. package/dist/components/ThemeProvider/index.d.ts +2 -2
  167. package/dist/components/Tooltip/Tooltip.js +19 -0
  168. package/dist/components/Tooltip/index.d.ts +2 -2
  169. package/dist/components/Tooltip/index.js +5 -0
  170. package/dist/components/Typography/Typography.js +19 -0
  171. package/dist/components/Typography/index.d.ts +2 -2
  172. package/dist/components/Typography/index.js +5 -0
  173. package/dist/components/Uploader/Uploader.d.ts +4 -3
  174. package/dist/components/Uploader/Uploader.js +402 -0
  175. package/dist/components/Uploader/index.d.ts +2 -2
  176. package/dist/components/index.d.ts +53 -53
  177. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +8 -0
  178. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/external-adapter.js +245 -0
  179. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js +1 -0
  180. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js +1 -0
  181. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js +1 -0
  182. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js +1 -0
  183. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +19 -0
  184. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +5 -0
  185. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +7 -0
  186. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +128 -0
  187. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +340 -0
  188. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +33 -0
  189. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +60 -0
  190. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +312 -0
  191. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +96 -0
  192. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +13 -0
  193. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/external/file.js +23 -0
  194. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +18 -0
  195. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/prevent-unhandled.js +102 -0
  196. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +10 -0
  197. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +3 -0
  198. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +123 -0
  199. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-entering-window.js +55 -0
  200. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +18 -0
  201. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +55 -0
  202. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +49 -0
  203. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +16 -0
  204. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +15 -0
  205. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +18 -0
  206. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +8 -0
  207. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayLikeToArray.js +7 -0
  208. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithHoles.js +5 -0
  209. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
  210. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/defineProperty.js +18 -0
  211. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArray.js +5 -0
  212. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArrayLimit.js +26 -0
  213. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableRest.js +5 -0
  214. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableSpread.js +5 -0
  215. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
  216. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
  217. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  218. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  219. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/typeof.js +11 -0
  220. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +12 -0
  221. package/dist/external/@babel/runtime/helpers/esm/extends.js +16 -0
  222. package/dist/external/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
  223. package/dist/external/@babel/runtime/helpers/extends.js +28 -0
  224. package/dist/external/@babel/runtime/helpers/interopRequireDefault.js +19 -0
  225. package/dist/external/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +26 -0
  226. package/dist/external/@emotion/cache/dist/emotion-cache.esm.js +653 -0
  227. package/dist/external/@emotion/memoize/dist/emotion-memoize.esm.js +9 -0
  228. package/dist/external/@emotion/sheet/dist/emotion-sheet.esm.js +154 -0
  229. package/dist/external/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
  230. package/dist/external/@mui/icons-material/esm/ArrowUpwardRounded.js +8 -0
  231. package/dist/external/@mui/icons-material/esm/CalendarToday.js +8 -0
  232. package/dist/external/@mui/icons-material/esm/Check.js +8 -0
  233. package/dist/external/@mui/icons-material/esm/ChevronLeft.js +8 -0
  234. package/dist/external/@mui/icons-material/esm/ChevronRight.js +8 -0
  235. package/dist/external/@mui/icons-material/esm/ClearRounded.js +8 -0
  236. package/dist/external/@mui/icons-material/esm/Close.js +8 -0
  237. package/dist/external/@mui/icons-material/esm/CloudUploadRounded.js +8 -0
  238. package/dist/external/@mui/icons-material/esm/ExpandMore.js +8 -0
  239. package/dist/external/@mui/icons-material/esm/Info.js +8 -0
  240. package/dist/external/@mui/icons-material/esm/UploadFileRounded.js +8 -0
  241. package/dist/external/@mui/material/SvgIcon/SvgIcon.js +186 -0
  242. package/dist/external/@mui/material/SvgIcon/svgIconClasses.js +9 -0
  243. package/dist/external/@mui/material/colors/blue.js +18 -0
  244. package/dist/external/@mui/material/colors/common.js +6 -0
  245. package/dist/external/@mui/material/colors/green.js +18 -0
  246. package/dist/external/@mui/material/colors/grey.js +18 -0
  247. package/dist/external/@mui/material/colors/lightBlue.js +18 -0
  248. package/dist/external/@mui/material/colors/orange.js +18 -0
  249. package/dist/external/@mui/material/colors/purple.js +18 -0
  250. package/dist/external/@mui/material/colors/red.js +18 -0
  251. package/dist/external/@mui/material/styles/createMixins.js +19 -0
  252. package/dist/external/@mui/material/styles/createPalette.js +308 -0
  253. package/dist/external/@mui/material/styles/createTheme.js +82 -0
  254. package/dist/external/@mui/material/styles/createTransitions.js +91 -0
  255. package/dist/external/@mui/material/styles/createTypography.js +93 -0
  256. package/dist/external/@mui/material/styles/defaultTheme.js +5 -0
  257. package/dist/external/@mui/material/styles/identifier.js +3 -0
  258. package/dist/external/@mui/material/styles/rootShouldForwardProp.js +5 -0
  259. package/dist/external/@mui/material/styles/shadows.js +11 -0
  260. package/dist/external/@mui/material/styles/slotShouldForwardProp.js +6 -0
  261. package/dist/external/@mui/material/styles/styled.js +12 -0
  262. package/dist/external/@mui/material/styles/useThemeProps.js +17 -0
  263. package/dist/external/@mui/material/styles/zIndex.js +14 -0
  264. package/dist/external/@mui/material/utils/capitalize.js +5 -0
  265. package/dist/external/@mui/material/utils/createSvgIcon.js +24 -0
  266. package/dist/external/@mui/styled-engine/GlobalStyles/GlobalStyles.js +24 -0
  267. package/dist/external/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +37 -0
  268. package/dist/external/@mui/styled-engine/index.js +38 -0
  269. package/dist/external/@mui/system/colorManipulator.js +385 -0
  270. package/dist/external/@mui/system/createStyled.js +270 -0
  271. package/dist/external/@mui/system/esm/borders.js +51 -0
  272. package/dist/external/@mui/system/esm/breakpoints.js +66 -0
  273. package/dist/external/@mui/system/esm/compose.js +26 -0
  274. package/dist/external/@mui/system/esm/createTheme/applyStyles.js +76 -0
  275. package/dist/external/@mui/system/esm/createTheme/createBreakpoints.js +82 -0
  276. package/dist/external/@mui/system/esm/createTheme/createSpacing.js +34 -0
  277. package/dist/external/@mui/system/esm/createTheme/createTheme.js +45 -0
  278. package/dist/external/@mui/system/esm/createTheme/index.js +3 -0
  279. package/dist/external/@mui/system/esm/createTheme/shape.js +5 -0
  280. package/dist/external/@mui/system/esm/cssGrid.js +86 -0
  281. package/dist/external/@mui/system/esm/memoize.js +11 -0
  282. package/dist/external/@mui/system/esm/merge.js +12 -0
  283. package/dist/external/@mui/system/esm/palette.js +28 -0
  284. package/dist/external/@mui/system/esm/responsivePropType.js +5 -0
  285. package/dist/external/@mui/system/esm/sizing.js +67 -0
  286. package/dist/external/@mui/system/esm/spacing.js +144 -0
  287. package/dist/external/@mui/system/esm/style.js +77 -0
  288. package/dist/external/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +293 -0
  289. package/dist/external/@mui/system/esm/styleFunctionSx/extendSxProp.js +51 -0
  290. package/dist/external/@mui/system/esm/styleFunctionSx/index.js +3 -0
  291. package/dist/external/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +129 -0
  292. package/dist/external/@mui/system/esm/useTheme.js +9 -0
  293. package/dist/external/@mui/system/esm/useThemeProps/getThemeProps.js +15 -0
  294. package/dist/external/@mui/system/esm/useThemeProps/useThemeProps.js +22 -0
  295. package/dist/external/@mui/system/esm/useThemeWithoutDefault.js +12 -0
  296. package/dist/external/@mui/utils/ClassNameGenerator/ClassNameGenerator.js +18 -0
  297. package/dist/external/@mui/utils/capitalize/capitalize.js +14 -0
  298. package/dist/external/@mui/utils/capitalize/index.js +1 -0
  299. package/dist/external/@mui/utils/clamp/clamp.js +5 -0
  300. package/dist/external/@mui/utils/clamp/index.js +1 -0
  301. package/dist/external/@mui/utils/composeClasses/composeClasses.js +23 -0
  302. package/dist/external/@mui/utils/deepmerge/deepmerge.js +44 -0
  303. package/dist/external/@mui/utils/deepmerge/index.js +1 -0
  304. package/dist/external/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js +21 -0
  305. package/dist/external/@mui/utils/formatMuiErrorMessage/index.js +1 -0
  306. package/dist/external/@mui/utils/generateUtilityClass/generateUtilityClass.js +22 -0
  307. package/dist/external/@mui/utils/generateUtilityClasses/generateUtilityClasses.js +11 -0
  308. package/dist/external/@mui/utils/getDisplayName/getDisplayName.js +49 -0
  309. package/dist/external/@mui/utils/getDisplayName/index.js +1 -0
  310. package/dist/external/@mui/utils/resolveProps/resolveProps.js +37 -0
  311. package/dist/external/bind-event-listener/dist/bind-all.js +54 -0
  312. package/dist/external/bind-event-listener/dist/bind.js +21 -0
  313. package/dist/external/bind-event-listener/dist/index.js +21 -0
  314. package/dist/external/clsx/dist/clsx.js +3 -0
  315. package/dist/external/object-assign/index.js +99 -0
  316. package/dist/external/prop-types/checkPropTypes.js +115 -0
  317. package/dist/external/prop-types/factoryWithThrowingShims.js +74 -0
  318. package/dist/external/prop-types/factoryWithTypeCheckers.js +625 -0
  319. package/dist/external/prop-types/index.js +33 -0
  320. package/dist/external/prop-types/lib/ReactPropTypesSecret.js +21 -0
  321. package/dist/external/prop-types/lib/has.js +11 -0
  322. package/dist/external/raf-schd/dist/raf-schd.esm.js +34 -0
  323. package/dist/external/stylis/src/Enum.js +12 -0
  324. package/dist/external/stylis/src/Middleware.js +32 -0
  325. package/dist/external/stylis/src/Parser.js +193 -0
  326. package/dist/external/stylis/src/Serializer.js +38 -0
  327. package/dist/external/stylis/src/Tokenizer.js +223 -0
  328. package/dist/external/stylis/src/Utility.js +117 -0
  329. package/dist/hooks/use-controlled-state/index.js +23 -0
  330. package/dist/index.d.ts +1 -1
  331. package/dist/index.js +52 -2
  332. package/dist/libs/rehype-accent/index.js +39 -0
  333. package/framer/index.js +30 -30
  334. package/package.json +8 -4
@@ -0,0 +1,247 @@
1
+ import { useState, useCallback } from 'react';
2
+ import { getYearName, getMonthName, isWithinRange, isSameDay, isToday, isSameMonth } from '../utils/index.js';
3
+
4
+ const useCalendar = (ownerState) => {
5
+ const [hoverDay, setHoverDay] = useState(null);
6
+ const [hoverMonth, setHoverMonth] = useState(null);
7
+ return {
8
+ calendarTitle: ownerState.view === "month"
9
+ ? getYearName(ownerState.viewMonth, ownerState.locale || "default")
10
+ : getMonthName(ownerState.viewMonth, ownerState.locale || "default"),
11
+ onPrev: useCallback(() => {
12
+ if (ownerState.view === "day") {
13
+ const prevMonth = new Date(ownerState.viewMonth || new Date());
14
+ prevMonth.setMonth(prevMonth.getMonth() - 1);
15
+ ownerState.onMonthChange?.(prevMonth);
16
+ }
17
+ else if (ownerState.view === "month") {
18
+ const prevYear = new Date(ownerState.viewMonth || new Date());
19
+ prevYear.setFullYear(prevYear.getFullYear() - 1);
20
+ ownerState.onMonthChange?.(prevYear);
21
+ }
22
+ }, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
23
+ onNext: useCallback(() => {
24
+ if (ownerState.view === "day") {
25
+ const nextMonth = new Date(ownerState.viewMonth || new Date());
26
+ nextMonth.setMonth(nextMonth.getMonth() + 1);
27
+ ownerState.onMonthChange?.(nextMonth);
28
+ }
29
+ else if (ownerState.view === "month") {
30
+ const nextYear = new Date(ownerState.viewMonth || new Date());
31
+ nextYear.setFullYear(nextYear.getFullYear() + 1);
32
+ ownerState.onMonthChange?.(nextYear);
33
+ }
34
+ }, [ownerState.onMonthChange, ownerState.viewMonth, ownerState.view]),
35
+ getDayCellProps: useCallback((day) => {
36
+ const thisDay = new Date(ownerState.viewMonth || new Date());
37
+ thisDay.setHours(0, 0, 0, 0);
38
+ thisDay.setDate(day);
39
+ const inRange = ownerState.rangeSelection &&
40
+ ownerState.value &&
41
+ ownerState.value[0] &&
42
+ // NOTE: hover day is not included in the range
43
+ ((hoverDay &&
44
+ isWithinRange(ownerState.value[0], hoverDay, thisDay)) ||
45
+ // NOTE: Selected range is included in the range
46
+ (ownerState.value[1] &&
47
+ isWithinRange(ownerState.value[0], ownerState.value[1], thisDay)));
48
+ return {
49
+ "aria-label": thisDay.toLocaleDateString(),
50
+ "aria-current": inRange ? "date" : undefined,
51
+ };
52
+ }, [
53
+ ownerState.rangeSelection,
54
+ ownerState.value,
55
+ ownerState.viewMonth,
56
+ hoverDay,
57
+ ]),
58
+ getMonthCellProps: useCallback((monthIndex) => {
59
+ const thisMonth = new Date(ownerState.viewMonth || new Date());
60
+ thisMonth.setDate(1);
61
+ thisMonth.setHours(0, 0, 0, 0);
62
+ thisMonth.setMonth(monthIndex);
63
+ const isMonthRangeSelection = !ownerState.views?.find((view) => view === "day") &&
64
+ ownerState.rangeSelection;
65
+ const inRange = isMonthRangeSelection &&
66
+ ownerState.value &&
67
+ ownerState.value[0] &&
68
+ // NOTE: hover day is not included in the range
69
+ ((hoverMonth &&
70
+ isWithinRange(ownerState.value[0], hoverMonth, thisMonth)) ||
71
+ // NOTE: Selected range is included in the range
72
+ (ownerState.value[1] &&
73
+ isWithinRange(ownerState.value[0], ownerState.value[1], thisMonth)));
74
+ return {
75
+ "aria-label": thisMonth.toLocaleDateString(),
76
+ "aria-current": inRange ? "date" : undefined,
77
+ };
78
+ }, [
79
+ ownerState.rangeSelection,
80
+ ownerState.value,
81
+ ownerState.viewMonth,
82
+ hoverMonth,
83
+ ]),
84
+ getPickerDayProps: useCallback((day) => {
85
+ const thisDay = new Date(ownerState.viewMonth || new Date());
86
+ thisDay.setHours(0, 0, 0, 0);
87
+ thisDay.setDate(day);
88
+ const isSelected = !!ownerState.value &&
89
+ (isSameDay(thisDay, ownerState.value[0]) ||
90
+ (ownerState.value[1] && isSameDay(thisDay, ownerState.value[1])));
91
+ const inRange = ownerState.rangeSelection &&
92
+ ownerState.value &&
93
+ ownerState.value[0] &&
94
+ // NOTE: hover day is not included in the range
95
+ ((hoverDay &&
96
+ isWithinRange(ownerState.value[0], hoverDay, thisDay)) ||
97
+ // NOTE: Selected range is included in the range
98
+ (ownerState.value[1] &&
99
+ isWithinRange(ownerState.value[0], ownerState.value[1], thisDay)));
100
+ const handleDayClick = () => {
101
+ if (ownerState.rangeSelection) {
102
+ if (!ownerState.value) {
103
+ ownerState.onChange?.([thisDay, undefined]);
104
+ }
105
+ else if (ownerState.value[0] && !ownerState.value[1]) {
106
+ ownerState.onChange?.([
107
+ new Date(Math.min(ownerState.value[0].getTime(), thisDay.getTime())),
108
+ new Date(Math.max(ownerState.value[0].getTime(), thisDay.getTime())),
109
+ ]);
110
+ }
111
+ else {
112
+ ownerState.onChange?.([thisDay, undefined]);
113
+ }
114
+ }
115
+ else {
116
+ ownerState.onChange?.([thisDay, undefined]);
117
+ }
118
+ setHoverDay(null);
119
+ };
120
+ return {
121
+ isToday: isToday(thisDay),
122
+ isSelected,
123
+ onClick: handleDayClick,
124
+ onMouseEnter: ownerState.rangeSelection &&
125
+ ownerState.value?.[0] &&
126
+ !ownerState.value?.[1]
127
+ ? () => setHoverDay(thisDay)
128
+ : undefined,
129
+ disabled: (ownerState.minDate && thisDay < ownerState.minDate) ||
130
+ (ownerState.maxDate && thisDay > ownerState.maxDate) ||
131
+ (ownerState.disableFuture && thisDay > new Date()) ||
132
+ (ownerState.disablePast &&
133
+ thisDay <
134
+ (() => {
135
+ const today = new Date();
136
+ today.setHours(0, 0, 0, 0);
137
+ return today;
138
+ })()),
139
+ tabIndex: -1,
140
+ "aria-label": thisDay.toLocaleDateString(),
141
+ "aria-selected": isSelected ? "true" : undefined,
142
+ "aria-current": inRange ? "date" : undefined,
143
+ };
144
+ }, [
145
+ ownerState.onChange,
146
+ ownerState.value,
147
+ ownerState.viewMonth,
148
+ ownerState.rangeSelection,
149
+ ownerState.minDate,
150
+ ownerState.maxDate,
151
+ ownerState.disableFuture,
152
+ ownerState.disablePast,
153
+ hoverDay,
154
+ ]),
155
+ getPickerMonthProps: useCallback((monthIndex) => {
156
+ const thisMonth = new Date(ownerState.viewMonth || new Date());
157
+ thisMonth.setDate(1);
158
+ thisMonth.setHours(0, 0, 0, 0);
159
+ thisMonth.setMonth(monthIndex);
160
+ const isMonthPicker = !ownerState.views?.find((view) => view === "day");
161
+ const isMonthRangeSelection = isMonthPicker && ownerState.rangeSelection;
162
+ const isSelected = !!ownerState.value &&
163
+ (isSameMonth(thisMonth, ownerState.value[0]) ||
164
+ (ownerState.value[1] &&
165
+ isSameMonth(thisMonth, ownerState.value[1])));
166
+ const inRange = isMonthRangeSelection &&
167
+ ownerState.value &&
168
+ ownerState.value[0] &&
169
+ // NOTE: hover day is not included in the range
170
+ ((hoverMonth &&
171
+ isWithinRange(ownerState.value[0], hoverMonth, thisMonth)) ||
172
+ // NOTE: Selected range is included in the range
173
+ (ownerState.value[1] &&
174
+ isWithinRange(ownerState.value[0], ownerState.value[1], thisMonth)));
175
+ const handleMonthClick = () => {
176
+ if (isMonthRangeSelection) {
177
+ if (!ownerState.value) {
178
+ ownerState.onChange?.([thisMonth, undefined]);
179
+ }
180
+ else if (ownerState.value[0] && !ownerState.value[1]) {
181
+ ownerState.onChange?.([
182
+ new Date(Math.min(ownerState.value[0].getTime(), thisMonth.getTime())),
183
+ new Date(Math.max(ownerState.value[0].getTime(), thisMonth.getTime())),
184
+ ]);
185
+ }
186
+ else {
187
+ ownerState.onChange?.([thisMonth, undefined]);
188
+ }
189
+ }
190
+ else if (isMonthPicker) {
191
+ ownerState.onChange?.([thisMonth, undefined]);
192
+ }
193
+ else {
194
+ ownerState.onViewChange?.("day");
195
+ ownerState.onMonthChange?.(thisMonth);
196
+ }
197
+ setHoverMonth(null);
198
+ };
199
+ return {
200
+ isSelected,
201
+ onMouseEnter: isMonthRangeSelection &&
202
+ ownerState.value?.[0] &&
203
+ !ownerState.value?.[1]
204
+ ? () => setHoverMonth(thisMonth)
205
+ : undefined,
206
+ disabled: (ownerState.minDate &&
207
+ (() => {
208
+ // check all days disabled in this month
209
+ const lastDay = new Date(thisMonth);
210
+ lastDay.setMonth(lastDay.getMonth() + 1);
211
+ lastDay.setDate(0);
212
+ return lastDay < ownerState.minDate;
213
+ })()) ||
214
+ (ownerState.maxDate &&
215
+ (() => {
216
+ // check all days disabled in this month
217
+ const lastDay = new Date(thisMonth);
218
+ lastDay.setDate(0);
219
+ return lastDay > ownerState.maxDate;
220
+ })()) ||
221
+ (ownerState.disableFuture && thisMonth > new Date()) ||
222
+ (ownerState.disablePast &&
223
+ thisMonth < new Date() &&
224
+ !isSameMonth(thisMonth, new Date())),
225
+ onClick: handleMonthClick,
226
+ tabIndex: -1,
227
+ "aria-label": getMonthName(thisMonth, ownerState.locale || "default"),
228
+ "aria-selected": isSelected ? "true" : undefined,
229
+ "aria-current": inRange ? "date" : undefined,
230
+ };
231
+ }, [
232
+ ownerState.onMonthChange,
233
+ ownerState.onViewChange,
234
+ ownerState.onChange,
235
+ ownerState.viewMonth,
236
+ ownerState.locale,
237
+ ownerState.value,
238
+ ownerState.minDate,
239
+ ownerState.maxDate,
240
+ ownerState.disableFuture,
241
+ ownerState.disablePast,
242
+ hoverMonth,
243
+ ]),
244
+ };
245
+ };
246
+
247
+ export { useCalendar };
@@ -1,3 +1,3 @@
1
- import { Calendar } from "./Calendar";
2
- export * from "./Calendar";
1
+ import { Calendar } from "./Calendar.js";
2
+ export * from "./Calendar.js";
3
3
  export default Calendar;
@@ -0,0 +1,5 @@
1
+ import { Calendar } from './Calendar.js';
2
+
3
+
4
+
5
+ export { Calendar, Calendar as default };
@@ -0,0 +1,74 @@
1
+ const getCalendarDates = (date) => {
2
+ const dates = [];
3
+ const firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
4
+ const lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
5
+ const firstWeekInThisMonth = Math.ceil((firstDay.getDay() + 1) / 7);
6
+ const lastWeekInThisMonth = Math.ceil((lastDay.getDate() + firstDay.getDay()) / 7);
7
+ let day = 1;
8
+ for (let i = 1; i <= lastWeekInThisMonth; i++) {
9
+ const week = [];
10
+ for (let j = 1; j <= 7; j++) {
11
+ if (i === firstWeekInThisMonth && j < firstDay.getDay() + 1) {
12
+ week.push(undefined);
13
+ }
14
+ else if (day > lastDay.getDate()) {
15
+ week.push(undefined);
16
+ }
17
+ else {
18
+ week.push(day);
19
+ day++;
20
+ }
21
+ }
22
+ dates.push(week);
23
+ }
24
+ return dates;
25
+ };
26
+ const getYearName = (date, locale) => {
27
+ return date.toLocaleString(locale, { year: "numeric" });
28
+ };
29
+ const getMonthName = (date, locale) => {
30
+ return date.toLocaleString(locale, { year: "numeric", month: "long" });
31
+ };
32
+ const getMonthNameFromIndex = (index, locale) => {
33
+ return new Date(0, index).toLocaleString(locale, { month: "short" });
34
+ };
35
+ /**
36
+ * 일~토 / Sun ~ Sat 같은 요일 이름을 가져옵니다.
37
+ */
38
+ const getWeekdayNames = (locale) => {
39
+ const currentDay = new Date().getDay();
40
+ const date = new Date();
41
+ date.setDate(date.getDate() - currentDay);
42
+ return Array.from({ length: 7 }).map(() => {
43
+ const day = date.toLocaleString(locale, { weekday: "short" });
44
+ date.setDate(date.getDate() + 1);
45
+ return day;
46
+ });
47
+ };
48
+ const isToday = (date) => {
49
+ const today = new Date();
50
+ const d = new Date(date);
51
+ d.setHours(0, 0, 0, 0);
52
+ today.setHours(0, 0, 0, 0);
53
+ return d.getTime() === today.getTime();
54
+ };
55
+ const isSameDay = (date1, date2) => {
56
+ const d1 = new Date(date1);
57
+ const d2 = new Date(date2);
58
+ d1.setHours(0, 0, 0, 0);
59
+ d2.setHours(0, 0, 0, 0);
60
+ return d1.getTime() === d2.getTime();
61
+ };
62
+ const isWithinRange = (d1, d2, date) => {
63
+ const dateToCheck = new Date(date);
64
+ dateToCheck.setHours(0, 0, 0, 0);
65
+ const minDate = new Date(Math.min(d1.getTime(), d2.getTime()));
66
+ const maxDate = new Date(Math.max(d1.getTime(), d2.getTime()));
67
+ return dateToCheck >= minDate && dateToCheck <= maxDate;
68
+ };
69
+ const isSameMonth = (date1, date2) => {
70
+ return (date1.getFullYear() === date2.getFullYear() &&
71
+ date1.getMonth() === date2.getMonth());
72
+ };
73
+
74
+ export { getCalendarDates, getMonthName, getMonthNameFromIndex, getWeekdayNames, getYearName, isSameDay, isSameMonth, isToday, isWithinRange };
@@ -0,0 +1,20 @@
1
+ import { Card as Card$1, CardContent as CardContent$1, CardCover as CardCover$1, CardActions as CardActions$1, CardOverflow as CardOverflow$1 } from '@mui/joy';
2
+ import { motion } from 'framer-motion';
3
+
4
+ const MotionCard = motion(Card$1);
5
+ const Card = MotionCard;
6
+ Card.displayName = "Card";
7
+ const MotionCardContent = motion(CardContent$1);
8
+ const CardContent = MotionCardContent;
9
+ CardContent.displayName = "CardContent";
10
+ const MotionCardCover = motion(CardCover$1);
11
+ const CardCover = MotionCardCover;
12
+ CardCover.displayName = "CardCover";
13
+ const MotionCardActions = motion(CardActions$1);
14
+ const CardActions = MotionCardActions;
15
+ CardActions.displayName = "CardActions";
16
+ const MotionCardOverflow = motion(CardOverflow$1);
17
+ const CardOverflow = MotionCardOverflow;
18
+ CardOverflow.displayName = "CardOverflow";
19
+
20
+ export { Card, CardActions, CardContent, CardCover, CardOverflow };
@@ -1,3 +1,3 @@
1
- import { Card } from "./Card";
2
- export * from "./Card";
1
+ import { Card } from "./Card.js";
2
+ export * from "./Card.js";
3
3
  export default Card;
@@ -0,0 +1,19 @@
1
+ import React__default from 'react';
2
+ import { Checkbox as Checkbox$1 } from '@mui/joy';
3
+ import { motion } from 'framer-motion';
4
+
5
+ const MotionCheckbox = motion(Checkbox$1);
6
+ const Checkbox = (props) => {
7
+ // prop destruction
8
+ // lib hooks
9
+ // state, ref, querystring hooks
10
+ // form hooks
11
+ // query hooks
12
+ // calculated values
13
+ // effects
14
+ // handlers
15
+ return React__default.createElement(MotionCheckbox, { ...props });
16
+ };
17
+ Checkbox.displayName = "Checkbox";
18
+
19
+ export { Checkbox };
@@ -1,3 +1,3 @@
1
- import { Checkbox } from "./Checkbox";
2
- export * from "./Checkbox";
1
+ import { Checkbox } from "./Checkbox.js";
2
+ export * from "./Checkbox.js";
3
3
  export default Checkbox;
@@ -0,0 +1,5 @@
1
+ import { Checkbox } from './Checkbox.js';
2
+
3
+
4
+
5
+ export { Checkbox, Checkbox as default };
@@ -0,0 +1,8 @@
1
+ import { Chip as Chip$1 } from '@mui/joy';
2
+ import { motion } from 'framer-motion';
3
+
4
+ const MotionChip = motion(Chip$1);
5
+ const Chip = MotionChip;
6
+ Chip.displayName = "Chip";
7
+
8
+ export { Chip };
@@ -1,3 +1,3 @@
1
- import { Chip } from './Chip';
2
- export * from './Chip';
1
+ import { Chip } from "./Chip.js";
2
+ export * from "./Chip.js";
3
3
  export default Chip;
@@ -0,0 +1,5 @@
1
+ import { Chip } from './Chip.js';
2
+
3
+
4
+
5
+ export { Chip, Chip as default };
@@ -0,0 +1,49 @@
1
+ import { styled } from '@mui/joy';
2
+ import React__default, { forwardRef } from 'react';
3
+
4
+ const ContainerRoot = styled("div", {
5
+ name: "Container",
6
+ slot: "root",
7
+ shouldForwardProp: (prop) => prop !== "maxWidth" && prop !== "overrideBreakpoint",
8
+ })(({ theme, maxWidth = "lg", overrideBreakpoint }) => [
9
+ {
10
+ width: "100%",
11
+ marginLeft: "auto",
12
+ boxSizing: "border-box",
13
+ marginRight: "auto",
14
+ display: "block", // Fix IE11 layout when used with main.
15
+ paddingLeft: theme.spacing(4),
16
+ paddingRight: theme.spacing(4),
17
+ [theme.breakpoints.up("md")]: {
18
+ paddingLeft: theme.spacing(8),
19
+ paddingRight: theme.spacing(8),
20
+ },
21
+ maxWidth: theme.breakpoints.values[maxWidth],
22
+ },
23
+ overrideBreakpoint
24
+ ? {
25
+ paddingLeft: theme.breakpoints.values[overrideBreakpoint] >=
26
+ theme.breakpoints.values.lg
27
+ ? theme.spacing(8)
28
+ : theme.spacing(4),
29
+ paddingRight: theme.breakpoints.values[overrideBreakpoint] >=
30
+ theme.breakpoints.values.lg
31
+ ? theme.spacing(8)
32
+ : theme.spacing(4),
33
+ }
34
+ : null,
35
+ ]);
36
+ const Container = forwardRef(function Container(props, ref) {
37
+ // prop destruction
38
+ // lib hooks
39
+ // state, ref, querystring hooks
40
+ // form hooks
41
+ // query hooks
42
+ // calculated values
43
+ // effects
44
+ // handlers
45
+ return React__default.createElement(ContainerRoot, { ref: ref, ...props });
46
+ });
47
+ Container.displayName = "Container";
48
+
49
+ export { Container };
@@ -1,3 +1,3 @@
1
- import { Container } from "./Container";
2
- export * from "./Container";
1
+ import { Container } from "./Container.js";
2
+ export * from "./Container.js";
3
3
  export default Container;
@@ -0,0 +1,91 @@
1
+ import React__default, { useCallback, useMemo, useState } from 'react';
2
+ import { IntlMessageFormat } from 'intl-messageformat';
3
+ import { NumericFormat } from 'react-number-format';
4
+ import { Input } from '../Input/Input.js';
5
+ import { styled, useThemeProps } from '@mui/joy';
6
+ import { useCurrencySetting } from './hooks/use-currency-setting.js';
7
+ import { useControlledState } from '../../hooks/use-controlled-state/index.js';
8
+
9
+ const TextMaskAdapter = React__default.forwardRef(function TextMaskAdapter(props, ref) {
10
+ // prop destruction
11
+ const { onChange, ...innerProps } = props;
12
+ // lib hooks
13
+ // state, ref, querystring hooks
14
+ // form hooks
15
+ // query hooks
16
+ // calculated values
17
+ // effects
18
+ // handlers
19
+ return (React__default.createElement(NumericFormat, { ...innerProps, onValueChange: ({ value }) => {
20
+ onChange?.({
21
+ target: { name: props.name, value },
22
+ });
23
+ }, valueIsNumericString: true, getInputRef: ref, allowNegative: false }));
24
+ });
25
+ const CurrencyInputRoot = styled(Input, {
26
+ name: "CurrencyInput",
27
+ slot: "root",
28
+ overridesResolver: (props, styles) => styles.root,
29
+ })({});
30
+ const CurrencyInput = React__default.forwardRef(function CurrencyInput(inProps, ref) {
31
+ // prop destruction
32
+ const props = useThemeProps({ props: inProps, name: "CurrencyInput" });
33
+ const { currency = "USD", name, onChange, label, error, helperText, required, disabled, useMinorUnit,
34
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
35
+ sx, className, ...innerProps } = props;
36
+ // lib hooks
37
+ const { symbol, thousandSeparator, decimalSeparator, placeholder, fixedDecimalScale, decimalScale, } = useCurrencySetting(currency);
38
+ // state, ref, querystring hooks
39
+ const [_value, setValue] = useControlledState(props.value, props.defaultValue, useCallback((value) => onChange?.({ target: { name, value } }), [onChange, name]));
40
+ const value = useMemo(() => {
41
+ if (_value && useMinorUnit) {
42
+ return _value / Math.pow(10, decimalScale);
43
+ }
44
+ return _value;
45
+ }, [_value, useMinorUnit, decimalScale]);
46
+ const max = useMemo(() => {
47
+ if (props.max && useMinorUnit) {
48
+ return props.max / Math.pow(10, decimalScale);
49
+ }
50
+ return props.max;
51
+ }, [props.max, useMinorUnit, decimalScale]);
52
+ const [isOverLimit, setIsOverLimit] = useState(!!max && !!value && value > max);
53
+ // form hooks
54
+ // query hooks
55
+ // calculated values
56
+ // effects
57
+ // handlers
58
+ const handleChange = useCallback((event) => {
59
+ if (event.target.value === "") {
60
+ setValue(undefined);
61
+ return;
62
+ }
63
+ const amount = useMinorUnit
64
+ ? Number(event.target.value?.replace(decimalSeparator, ""))
65
+ : Number(event.target.value);
66
+ if (!!max && Number(event.target.value) > max) {
67
+ setIsOverLimit(true);
68
+ }
69
+ else {
70
+ setIsOverLimit(false);
71
+ }
72
+ setValue(amount);
73
+ }, [decimalSeparator, max, useMinorUnit, setValue]);
74
+ return (React__default.createElement(CurrencyInputRoot, { ...innerProps, ref: ref, value: value, placeholder: placeholder, onChange: handleChange, error: error || isOverLimit, disabled: disabled, required: required, color: error || isOverLimit ? "danger" : props.color, label: label, helperText: isOverLimit
75
+ ? new IntlMessageFormat(`limit: {amount, number, ::currency/${currency} unit-width-narrow}`).format({ amount: max })
76
+ : helperText, slotProps: {
77
+ input: {
78
+ component: TextMaskAdapter,
79
+ decimalSeparator,
80
+ thousandSeparator,
81
+ prefix: symbol,
82
+ fixedDecimalScale,
83
+ decimalScale,
84
+ "aria-label": innerProps["aria-label"],
85
+ },
86
+ }, sx: {
87
+ ...sx,
88
+ }, className: className }));
89
+ });
90
+
91
+ export { CurrencyInput };