@ceed/cds 0.0.185 → 0.0.187-cjs.0

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 (260) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +33 -0
  2. package/dist/_virtual/bind-all.js +5 -0
  3. package/dist/_virtual/bind.js +5 -0
  4. package/dist/_virtual/colorManipulator.js +7 -0
  5. package/dist/_virtual/colorManipulator2.js +5 -0
  6. package/dist/_virtual/createStyled.js +9 -0
  7. package/dist/_virtual/createStyled2.js +5 -0
  8. package/dist/_virtual/extends.js +5 -0
  9. package/dist/_virtual/index.js +7 -0
  10. package/dist/_virtual/index10.js +8 -0
  11. package/dist/_virtual/index11.js +12 -0
  12. package/dist/_virtual/index12.js +12 -0
  13. package/dist/_virtual/index2.js +5 -0
  14. package/dist/_virtual/index3.js +9 -0
  15. package/dist/_virtual/index4.js +5 -0
  16. package/dist/_virtual/index5.js +8 -0
  17. package/dist/_virtual/index6.js +8 -0
  18. package/dist/_virtual/index7.js +12 -0
  19. package/dist/_virtual/index8.js +8 -0
  20. package/dist/_virtual/index9.js +8 -0
  21. package/dist/_virtual/interopRequireDefault.js +5 -0
  22. package/dist/_virtual/objectWithoutPropertiesLoose.js +5 -0
  23. package/dist/components/Accordions/Accordions.js +48 -0
  24. package/dist/components/Autocomplete/Autocomplete.js +198 -0
  25. package/dist/components/Autocomplete/index.js +10 -0
  26. package/dist/components/Avatar/Avatar.js +47 -0
  27. package/dist/components/Box/Box.js +10 -0
  28. package/dist/components/Box/index.js +10 -0
  29. package/dist/components/Breadcrumbs/Breadcrumbs.js +49 -0
  30. package/dist/components/Button/Button.js +22 -0
  31. package/dist/components/Button/index.js +10 -0
  32. package/dist/components/Calendar/Calendar.js +335 -0
  33. package/dist/components/Calendar/hooks/use-calendar-props.js +76 -0
  34. package/dist/components/Calendar/hooks/use-calendar.js +249 -0
  35. package/dist/components/Calendar/index.js +10 -0
  36. package/dist/components/Calendar/utils/index.js +84 -0
  37. package/dist/components/Card/Card.js +26 -0
  38. package/dist/components/Checkbox/Checkbox.js +21 -0
  39. package/dist/components/Checkbox/index.js +10 -0
  40. package/dist/components/Chip/Chip.js +10 -0
  41. package/dist/components/Chip/index.js +10 -0
  42. package/dist/components/Container/Container.js +51 -0
  43. package/dist/components/CurrencyInput/CurrencyInput.js +93 -0
  44. package/dist/components/CurrencyInput/hooks/use-currency-setting.js +169 -0
  45. package/dist/components/CurrencyInput/index.js +10 -0
  46. package/dist/components/DataTable/DataTable.js +570 -0
  47. package/dist/components/DatePicker/DatePicker.js +212 -0
  48. package/dist/components/DatePicker/index.js +10 -0
  49. package/dist/components/DateRangePicker/DateRangePicker.js +215 -0
  50. package/dist/components/DialogActions/DialogActions.js +16 -0
  51. package/dist/components/DialogActions/index.js +10 -0
  52. package/dist/components/DialogContent/DialogContent.js +13 -0
  53. package/dist/components/DialogContent/index.js +10 -0
  54. package/dist/components/DialogFrame/DialogFrame.js +33 -0
  55. package/dist/components/DialogTitle/DialogTitle.js +13 -0
  56. package/dist/components/DialogTitle/index.js +10 -0
  57. package/dist/components/Divider/Divider.js +21 -0
  58. package/dist/components/Drawer/Drawer.js +42 -0
  59. package/dist/components/Dropdown/Dropdown.js +10 -0
  60. package/dist/components/Dropdown/index.js +10 -0
  61. package/dist/components/FormControl/FormControl.js +17 -0
  62. package/dist/components/FormControl/index.js +10 -0
  63. package/dist/components/FormHelperText/FormHelperText.js +10 -0
  64. package/dist/components/FormHelperText/index.js +10 -0
  65. package/dist/components/FormLabel/FormLabel.js +10 -0
  66. package/dist/components/FormLabel/index.js +10 -0
  67. package/dist/components/IconButton/IconButton.js +22 -0
  68. package/dist/components/IconButton/index.js +10 -0
  69. package/dist/components/Input/Input.js +62 -0
  70. package/dist/components/Input/index.js +10 -0
  71. package/dist/components/InsetDrawer/InsetDrawer.js +32 -0
  72. package/dist/components/Markdown/Markdown.d.ts +6 -22
  73. package/dist/components/Markdown/Markdown.js +86 -0
  74. package/dist/components/Menu/Menu.js +46 -0
  75. package/dist/components/Menu/index.js +11 -0
  76. package/dist/components/MenuButton/MenuButton.d.ts +7 -5
  77. package/dist/components/MenuButton/MenuButton.js +28 -0
  78. package/dist/components/Modal/Modal.js +49 -0
  79. package/dist/components/MonthPicker/MonthPicker.js +164 -0
  80. package/dist/components/MonthRangePicker/MonthRangePicker.js +174 -0
  81. package/dist/components/NavigationGroup/NavigationGroup.js +44 -0
  82. package/dist/components/NavigationItem/NavigationItem.js +47 -0
  83. package/dist/components/Navigator/Navigator.js +32 -0
  84. package/dist/components/Pagination/Pagination.js +119 -0
  85. package/dist/components/Pagination/index.js +10 -0
  86. package/dist/components/PercentageInput/PercentageInput.js +87 -0
  87. package/dist/components/Radio/Radio.js +14 -0
  88. package/dist/components/RadioList/RadioList.js +20 -0
  89. package/dist/components/Select/Select.js +59 -0
  90. package/dist/components/Select/index.js +11 -0
  91. package/dist/components/Sheet/Sheet.js +10 -0
  92. package/dist/components/Sheet/index.js +10 -0
  93. package/dist/components/Stack/index.js +16 -0
  94. package/dist/components/Stepper/Stepper.js +70 -0
  95. package/dist/components/Switch/Switch.js +48 -0
  96. package/dist/components/Table/Table.js +68 -0
  97. package/dist/components/Tabs/Tabs.js +22 -0
  98. package/dist/components/Textarea/Textarea.d.ts +3 -17
  99. package/dist/components/Textarea/Textarea.js +33 -0
  100. package/dist/components/Textarea/index.js +10 -0
  101. package/dist/components/ThemeProvider/ThemeProvider.js +250 -0
  102. package/dist/components/Tooltip/Tooltip.js +21 -0
  103. package/dist/components/Tooltip/index.js +10 -0
  104. package/dist/components/Typography/Typography.js +21 -0
  105. package/dist/components/Typography/index.js +10 -0
  106. package/dist/components/Uploader/Uploader.d.ts +1 -1
  107. package/dist/components/Uploader/Uploader.js +366 -0
  108. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +10 -0
  109. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/external-adapter.js +251 -0
  110. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +21 -0
  111. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +7 -0
  112. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +9 -0
  113. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +130 -0
  114. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +342 -0
  115. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +35 -0
  116. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +62 -0
  117. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +314 -0
  118. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +98 -0
  119. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +15 -0
  120. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/external/file.js +26 -0
  121. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +20 -0
  122. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/prevent-unhandled.js +104 -0
  123. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +12 -0
  124. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +5 -0
  125. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +126 -0
  126. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-entering-window.js +57 -0
  127. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +20 -0
  128. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +57 -0
  129. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +51 -0
  130. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +18 -0
  131. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +17 -0
  132. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +20 -0
  133. package/dist/external/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +10 -0
  134. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayLikeToArray.js +9 -0
  135. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithHoles.js +7 -0
  136. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/arrayWithoutHoles.js +9 -0
  137. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/defineProperty.js +20 -0
  138. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArray.js +7 -0
  139. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/iterableToArrayLimit.js +28 -0
  140. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableRest.js +7 -0
  141. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/nonIterableSpread.js +7 -0
  142. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/slicedToArray.js +12 -0
  143. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toConsumableArray.js +12 -0
  144. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPrimitive.js +16 -0
  145. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/toPropertyKey.js +11 -0
  146. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/typeof.js +13 -0
  147. package/dist/external/@atlaskit/pragmatic-drag-and-drop/external/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +14 -0
  148. package/dist/external/@babel/runtime/helpers/esm/extends.js +18 -0
  149. package/dist/external/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +16 -0
  150. package/dist/external/@babel/runtime/helpers/extends.js +30 -0
  151. package/dist/external/@babel/runtime/helpers/interopRequireDefault.js +21 -0
  152. package/dist/external/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +28 -0
  153. package/dist/external/@emotion/cache/dist/emotion-cache.esm.js +655 -0
  154. package/dist/external/@emotion/memoize/dist/emotion-memoize.esm.js +11 -0
  155. package/dist/external/@emotion/sheet/dist/emotion-sheet.esm.js +156 -0
  156. package/dist/external/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +18 -0
  157. package/dist/external/@mui/icons-material/esm/ArrowUpwardRounded.js +10 -0
  158. package/dist/external/@mui/icons-material/esm/CalendarToday.js +10 -0
  159. package/dist/external/@mui/icons-material/esm/Check.js +10 -0
  160. package/dist/external/@mui/icons-material/esm/ChevronLeft.js +10 -0
  161. package/dist/external/@mui/icons-material/esm/ChevronRight.js +10 -0
  162. package/dist/external/@mui/icons-material/esm/ClearRounded.js +10 -0
  163. package/dist/external/@mui/icons-material/esm/Close.js +10 -0
  164. package/dist/external/@mui/icons-material/esm/CloudUploadRounded.js +10 -0
  165. package/dist/external/@mui/icons-material/esm/ExpandMore.js +10 -0
  166. package/dist/external/@mui/icons-material/esm/Info.js +10 -0
  167. package/dist/external/@mui/icons-material/esm/UploadFileRounded.js +10 -0
  168. package/dist/external/@mui/material/SvgIcon/SvgIcon.js +207 -0
  169. package/dist/external/@mui/material/SvgIcon/svgIconClasses.js +11 -0
  170. package/dist/external/@mui/material/colors/blue.js +20 -0
  171. package/dist/external/@mui/material/colors/common.js +8 -0
  172. package/dist/external/@mui/material/colors/green.js +20 -0
  173. package/dist/external/@mui/material/colors/grey.js +20 -0
  174. package/dist/external/@mui/material/colors/lightBlue.js +20 -0
  175. package/dist/external/@mui/material/colors/orange.js +20 -0
  176. package/dist/external/@mui/material/colors/purple.js +20 -0
  177. package/dist/external/@mui/material/colors/red.js +20 -0
  178. package/dist/external/@mui/material/styles/createMixins.js +21 -0
  179. package/dist/external/@mui/material/styles/createPalette.js +314 -0
  180. package/dist/external/@mui/material/styles/createTheme.js +84 -0
  181. package/dist/external/@mui/material/styles/createTransitions.js +97 -0
  182. package/dist/external/@mui/material/styles/createTypography.js +95 -0
  183. package/dist/external/@mui/material/styles/defaultTheme.js +7 -0
  184. package/dist/external/@mui/material/styles/identifier.js +5 -0
  185. package/dist/external/@mui/material/styles/rootShouldForwardProp.js +7 -0
  186. package/dist/external/@mui/material/styles/shadows.js +13 -0
  187. package/dist/external/@mui/material/styles/slotShouldForwardProp.js +8 -0
  188. package/dist/external/@mui/material/styles/styled.js +17 -0
  189. package/dist/external/@mui/material/styles/useThemeProps.js +19 -0
  190. package/dist/external/@mui/material/styles/zIndex.js +16 -0
  191. package/dist/external/@mui/material/utils/capitalize.js +7 -0
  192. package/dist/external/@mui/material/utils/createSvgIcon.js +45 -0
  193. package/dist/external/@mui/styled-engine/GlobalStyles/GlobalStyles.js +26 -0
  194. package/dist/external/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +39 -0
  195. package/dist/external/@mui/styled-engine/index.js +57 -0
  196. package/dist/external/@mui/system/colorManipulator.js +387 -0
  197. package/dist/external/@mui/system/createStyled.js +272 -0
  198. package/dist/external/@mui/system/esm/borders.js +66 -0
  199. package/dist/external/@mui/system/esm/breakpoints.js +71 -0
  200. package/dist/external/@mui/system/esm/compose.js +28 -0
  201. package/dist/external/@mui/system/esm/createTheme/applyStyles.js +78 -0
  202. package/dist/external/@mui/system/esm/createTheme/createBreakpoints.js +84 -0
  203. package/dist/external/@mui/system/esm/createTheme/createSpacing.js +36 -0
  204. package/dist/external/@mui/system/esm/createTheme/createTheme.js +47 -0
  205. package/dist/external/@mui/system/esm/createTheme/index.js +13 -0
  206. package/dist/external/@mui/system/esm/createTheme/shape.js +7 -0
  207. package/dist/external/@mui/system/esm/cssGrid.js +99 -0
  208. package/dist/external/@mui/system/esm/memoize.js +13 -0
  209. package/dist/external/@mui/system/esm/merge.js +14 -0
  210. package/dist/external/@mui/system/esm/palette.js +33 -0
  211. package/dist/external/@mui/system/esm/responsivePropType.js +7 -0
  212. package/dist/external/@mui/system/esm/sizing.js +76 -0
  213. package/dist/external/@mui/system/esm/spacing.js +153 -0
  214. package/dist/external/@mui/system/esm/style.js +83 -0
  215. package/dist/external/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +295 -0
  216. package/dist/external/@mui/system/esm/styleFunctionSx/extendSxProp.js +53 -0
  217. package/dist/external/@mui/system/esm/styleFunctionSx/index.js +14 -0
  218. package/dist/external/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +134 -0
  219. package/dist/external/@mui/system/esm/useTheme.js +14 -0
  220. package/dist/external/@mui/system/esm/useThemeProps/getThemeProps.js +17 -0
  221. package/dist/external/@mui/system/esm/useThemeProps/useThemeProps.js +24 -0
  222. package/dist/external/@mui/system/esm/useThemeWithoutDefault.js +33 -0
  223. package/dist/external/@mui/utils/ClassNameGenerator/ClassNameGenerator.js +20 -0
  224. package/dist/external/@mui/utils/capitalize/capitalize.js +16 -0
  225. package/dist/external/@mui/utils/capitalize/index.js +7 -0
  226. package/dist/external/@mui/utils/clamp/clamp.js +7 -0
  227. package/dist/external/@mui/utils/clamp/index.js +7 -0
  228. package/dist/external/@mui/utils/composeClasses/composeClasses.js +25 -0
  229. package/dist/external/@mui/utils/deepmerge/deepmerge.js +49 -0
  230. package/dist/external/@mui/utils/deepmerge/index.js +10 -0
  231. package/dist/external/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js +23 -0
  232. package/dist/external/@mui/utils/formatMuiErrorMessage/index.js +7 -0
  233. package/dist/external/@mui/utils/generateUtilityClass/generateUtilityClass.js +27 -0
  234. package/dist/external/@mui/utils/generateUtilityClasses/generateUtilityClasses.js +13 -0
  235. package/dist/external/@mui/utils/getDisplayName/getDisplayName.js +54 -0
  236. package/dist/external/@mui/utils/getDisplayName/index.js +10 -0
  237. package/dist/external/@mui/utils/resolveProps/resolveProps.js +39 -0
  238. package/dist/external/bind-event-listener/dist/bind-all.js +56 -0
  239. package/dist/external/bind-event-listener/dist/bind.js +23 -0
  240. package/dist/external/bind-event-listener/dist/index.js +23 -0
  241. package/dist/external/clsx/dist/clsx.js +8 -0
  242. package/dist/external/object-assign/index.js +101 -0
  243. package/dist/external/prop-types/checkPropTypes.js +117 -0
  244. package/dist/external/prop-types/factoryWithThrowingShims.js +76 -0
  245. package/dist/external/prop-types/factoryWithTypeCheckers.js +627 -0
  246. package/dist/external/prop-types/index.js +35 -0
  247. package/dist/external/prop-types/lib/ReactPropTypesSecret.js +23 -0
  248. package/dist/external/prop-types/lib/has.js +13 -0
  249. package/dist/external/raf-schd/dist/raf-schd.esm.js +36 -0
  250. package/dist/external/stylis/src/Enum.js +22 -0
  251. package/dist/external/stylis/src/Middleware.js +35 -0
  252. package/dist/external/stylis/src/Parser.js +199 -0
  253. package/dist/external/stylis/src/Serializer.js +41 -0
  254. package/dist/external/stylis/src/Tokenizer.js +241 -0
  255. package/dist/external/stylis/src/Utility.js +132 -0
  256. package/dist/hooks/use-controlled-state/index.js +25 -0
  257. package/dist/index.js +521 -2
  258. package/dist/libs/rehype-accent/index.js +41 -0
  259. package/framer/index.js +30 -30
  260. package/package.json +8 -5
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ const getCalendarDates = (date) => {
4
+ const dates = [];
5
+ const firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
6
+ const lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
7
+ const firstWeekInThisMonth = Math.ceil((firstDay.getDay() + 1) / 7);
8
+ const lastWeekInThisMonth = Math.ceil((lastDay.getDate() + firstDay.getDay()) / 7);
9
+ let day = 1;
10
+ for (let i = 1; i <= lastWeekInThisMonth; i++) {
11
+ const week = [];
12
+ for (let j = 1; j <= 7; j++) {
13
+ if (i === firstWeekInThisMonth && j < firstDay.getDay() + 1) {
14
+ week.push(undefined);
15
+ }
16
+ else if (day > lastDay.getDate()) {
17
+ week.push(undefined);
18
+ }
19
+ else {
20
+ week.push(day);
21
+ day++;
22
+ }
23
+ }
24
+ dates.push(week);
25
+ }
26
+ return dates;
27
+ };
28
+ const getYearName = (date, locale) => {
29
+ return date.toLocaleString(locale, { year: "numeric" });
30
+ };
31
+ const getMonthName = (date, locale) => {
32
+ return date.toLocaleString(locale, { year: "numeric", month: "long" });
33
+ };
34
+ const getMonthNameFromIndex = (index, locale) => {
35
+ return new Date(0, index).toLocaleString(locale, { month: "short" });
36
+ };
37
+ /**
38
+ * 일~토 / Sun ~ Sat 같은 요일 이름을 가져옵니다.
39
+ */
40
+ const getWeekdayNames = (locale) => {
41
+ const currentDay = new Date().getDay();
42
+ const date = new Date();
43
+ date.setDate(date.getDate() - currentDay);
44
+ return Array.from({ length: 7 }).map(() => {
45
+ const day = date.toLocaleString(locale, { weekday: "short" });
46
+ date.setDate(date.getDate() + 1);
47
+ return day;
48
+ });
49
+ };
50
+ const isToday = (date) => {
51
+ const today = new Date();
52
+ const d = new Date(date);
53
+ d.setHours(0, 0, 0, 0);
54
+ today.setHours(0, 0, 0, 0);
55
+ return d.getTime() === today.getTime();
56
+ };
57
+ const isSameDay = (date1, date2) => {
58
+ const d1 = new Date(date1);
59
+ const d2 = new Date(date2);
60
+ d1.setHours(0, 0, 0, 0);
61
+ d2.setHours(0, 0, 0, 0);
62
+ return d1.getTime() === d2.getTime();
63
+ };
64
+ const isWithinRange = (d1, d2, date) => {
65
+ const dateToCheck = new Date(date);
66
+ dateToCheck.setHours(0, 0, 0, 0);
67
+ const minDate = new Date(Math.min(d1.getTime(), d2.getTime()));
68
+ const maxDate = new Date(Math.max(d1.getTime(), d2.getTime()));
69
+ return dateToCheck >= minDate && dateToCheck <= maxDate;
70
+ };
71
+ const isSameMonth = (date1, date2) => {
72
+ return (date1.getFullYear() === date2.getFullYear() &&
73
+ date1.getMonth() === date2.getMonth());
74
+ };
75
+
76
+ exports.getCalendarDates = getCalendarDates;
77
+ exports.getMonthName = getMonthName;
78
+ exports.getMonthNameFromIndex = getMonthNameFromIndex;
79
+ exports.getWeekdayNames = getWeekdayNames;
80
+ exports.getYearName = getYearName;
81
+ exports.isSameDay = isSameDay;
82
+ exports.isSameMonth = isSameMonth;
83
+ exports.isToday = isToday;
84
+ exports.isWithinRange = isWithinRange;
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var joy = require('@mui/joy');
4
+ var framerMotion = require('framer-motion');
5
+
6
+ const MotionCard = framerMotion.motion(joy.Card);
7
+ const Card = MotionCard;
8
+ Card.displayName = "Card";
9
+ const MotionCardContent = framerMotion.motion(joy.CardContent);
10
+ const CardContent = MotionCardContent;
11
+ CardContent.displayName = "CardContent";
12
+ const MotionCardCover = framerMotion.motion(joy.CardCover);
13
+ const CardCover = MotionCardCover;
14
+ CardCover.displayName = "CardCover";
15
+ const MotionCardActions = framerMotion.motion(joy.CardActions);
16
+ const CardActions = MotionCardActions;
17
+ CardActions.displayName = "CardActions";
18
+ const MotionCardOverflow = framerMotion.motion(joy.CardOverflow);
19
+ const CardOverflow = MotionCardOverflow;
20
+ CardOverflow.displayName = "CardOverflow";
21
+
22
+ exports.Card = Card;
23
+ exports.CardActions = CardActions;
24
+ exports.CardContent = CardContent;
25
+ exports.CardCover = CardCover;
26
+ exports.CardOverflow = CardOverflow;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var joy = require('@mui/joy');
5
+ var framerMotion = require('framer-motion');
6
+
7
+ const MotionCheckbox = framerMotion.motion(joy.Checkbox);
8
+ const Checkbox = (props) => {
9
+ // prop destruction
10
+ // lib hooks
11
+ // state, ref, querystring hooks
12
+ // form hooks
13
+ // query hooks
14
+ // calculated values
15
+ // effects
16
+ // handlers
17
+ return React.createElement(MotionCheckbox, { ...props });
18
+ };
19
+ Checkbox.displayName = "Checkbox";
20
+
21
+ exports.Checkbox = Checkbox;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Checkbox = require('./Checkbox.js');
6
+
7
+
8
+
9
+ exports.Checkbox = Checkbox.Checkbox;
10
+ exports.default = Checkbox.Checkbox;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var joy = require('@mui/joy');
4
+ var framerMotion = require('framer-motion');
5
+
6
+ const MotionChip = framerMotion.motion(joy.Chip);
7
+ const Chip = MotionChip;
8
+ Chip.displayName = "Chip";
9
+
10
+ exports.Chip = Chip;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Chip = require('./Chip.js');
6
+
7
+
8
+
9
+ exports.Chip = Chip.Chip;
10
+ exports.default = Chip.Chip;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ var joy = require('@mui/joy');
4
+ var React = require('react');
5
+
6
+ const ContainerRoot = joy.styled("div", {
7
+ name: "Container",
8
+ slot: "root",
9
+ shouldForwardProp: (prop) => prop !== "maxWidth" && prop !== "overrideBreakpoint",
10
+ })(({ theme, maxWidth = "lg", overrideBreakpoint }) => [
11
+ {
12
+ width: "100%",
13
+ marginLeft: "auto",
14
+ boxSizing: "border-box",
15
+ marginRight: "auto",
16
+ display: "block", // Fix IE11 layout when used with main.
17
+ paddingLeft: theme.spacing(4),
18
+ paddingRight: theme.spacing(4),
19
+ [theme.breakpoints.up("md")]: {
20
+ paddingLeft: theme.spacing(8),
21
+ paddingRight: theme.spacing(8),
22
+ },
23
+ maxWidth: theme.breakpoints.values[maxWidth],
24
+ },
25
+ overrideBreakpoint
26
+ ? {
27
+ paddingLeft: theme.breakpoints.values[overrideBreakpoint] >=
28
+ theme.breakpoints.values.lg
29
+ ? theme.spacing(8)
30
+ : theme.spacing(4),
31
+ paddingRight: theme.breakpoints.values[overrideBreakpoint] >=
32
+ theme.breakpoints.values.lg
33
+ ? theme.spacing(8)
34
+ : theme.spacing(4),
35
+ }
36
+ : null,
37
+ ]);
38
+ const Container = React.forwardRef(function Container(props, ref) {
39
+ // prop destruction
40
+ // lib hooks
41
+ // state, ref, querystring hooks
42
+ // form hooks
43
+ // query hooks
44
+ // calculated values
45
+ // effects
46
+ // handlers
47
+ return React.createElement(ContainerRoot, { ref: ref, ...props });
48
+ });
49
+ Container.displayName = "Container";
50
+
51
+ exports.Container = Container;
@@ -0,0 +1,93 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var IntlMessageFormat = require('intl-messageformat');
5
+ var reactNumberFormat = require('react-number-format');
6
+ var Input = require('../Input/Input.js');
7
+ var joy = require('@mui/joy');
8
+ var useCurrencySetting = require('./hooks/use-currency-setting.js');
9
+ var index = require('../../hooks/use-controlled-state/index.js');
10
+
11
+ const TextMaskAdapter = React.forwardRef(function TextMaskAdapter(props, ref) {
12
+ // prop destruction
13
+ const { onChange, ...innerProps } = props;
14
+ // lib hooks
15
+ // state, ref, querystring hooks
16
+ // form hooks
17
+ // query hooks
18
+ // calculated values
19
+ // effects
20
+ // handlers
21
+ return (React.createElement(reactNumberFormat.NumericFormat, { ...innerProps, onValueChange: ({ value }) => {
22
+ onChange?.({
23
+ target: { name: props.name, value },
24
+ });
25
+ }, valueIsNumericString: true, getInputRef: ref, allowNegative: false }));
26
+ });
27
+ const CurrencyInputRoot = joy.styled(Input.Input, {
28
+ name: "CurrencyInput",
29
+ slot: "root",
30
+ overridesResolver: (props, styles) => styles.root,
31
+ })({});
32
+ const CurrencyInput = React.forwardRef(function CurrencyInput(inProps, ref) {
33
+ // prop destruction
34
+ const props = joy.useThemeProps({ props: inProps, name: "CurrencyInput" });
35
+ const { currency = "USD", name, onChange, label, error, helperText, required, disabled, useMinorUnit,
36
+ // NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
37
+ sx, className, ...innerProps } = props;
38
+ // lib hooks
39
+ const { symbol, thousandSeparator, decimalSeparator, placeholder, fixedDecimalScale, decimalScale, } = useCurrencySetting.useCurrencySetting(currency);
40
+ // state, ref, querystring hooks
41
+ const [_value, setValue] = index.useControlledState(props.value, props.defaultValue, React.useCallback((value) => onChange?.({ target: { name, value } }), [onChange, name]));
42
+ const value = React.useMemo(() => {
43
+ if (_value && useMinorUnit) {
44
+ return _value / Math.pow(10, decimalScale);
45
+ }
46
+ return _value;
47
+ }, [_value, useMinorUnit, decimalScale]);
48
+ const max = React.useMemo(() => {
49
+ if (props.max && useMinorUnit) {
50
+ return props.max / Math.pow(10, decimalScale);
51
+ }
52
+ return props.max;
53
+ }, [props.max, useMinorUnit, decimalScale]);
54
+ const [isOverLimit, setIsOverLimit] = React.useState(!!max && !!value && value > max);
55
+ // form hooks
56
+ // query hooks
57
+ // calculated values
58
+ // effects
59
+ // handlers
60
+ const handleChange = React.useCallback((event) => {
61
+ if (event.target.value === "") {
62
+ setValue(undefined);
63
+ return;
64
+ }
65
+ const amount = useMinorUnit
66
+ ? Number(event.target.value?.replace(decimalSeparator, ""))
67
+ : Number(event.target.value);
68
+ if (!!max && Number(event.target.value) > max) {
69
+ setIsOverLimit(true);
70
+ }
71
+ else {
72
+ setIsOverLimit(false);
73
+ }
74
+ setValue(amount);
75
+ }, [decimalSeparator, max, useMinorUnit, setValue]);
76
+ return (React.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
77
+ ? new IntlMessageFormat.IntlMessageFormat(`limit: {amount, number, ::currency/${currency} unit-width-narrow}`).format({ amount: max })
78
+ : helperText, slotProps: {
79
+ input: {
80
+ component: TextMaskAdapter,
81
+ decimalSeparator,
82
+ thousandSeparator,
83
+ prefix: symbol,
84
+ fixedDecimalScale,
85
+ decimalScale,
86
+ "aria-label": innerProps["aria-label"],
87
+ },
88
+ }, sx: {
89
+ ...sx,
90
+ }, className: className }));
91
+ });
92
+
93
+ exports.CurrencyInput = CurrencyInput;
@@ -0,0 +1,169 @@
1
+ 'use strict';
2
+
3
+ var IntlMessageFormat = require('intl-messageformat');
4
+
5
+ /**
6
+ * @see https://docs.adyen.com/development-resources/currency-codes/
7
+ */
8
+ const CURRENCY_DECIMAL_MAP = {
9
+ AED: 2,
10
+ ALL: 2,
11
+ AMD: 2,
12
+ ANG: 2,
13
+ AOA: 2,
14
+ ARS: 2,
15
+ AUD: 2,
16
+ AWG: 2,
17
+ AZN: 2,
18
+ BAM: 2,
19
+ BBD: 2,
20
+ BDT: 2,
21
+ BGN: 2,
22
+ BHD: 3,
23
+ BMD: 2,
24
+ BND: 2,
25
+ BOB: 2,
26
+ BRL: 2,
27
+ BSD: 2,
28
+ BWP: 2,
29
+ BYN: 2,
30
+ BZD: 2,
31
+ CAD: 2,
32
+ CHF: 2,
33
+ CLP: 2,
34
+ CNH: 2,
35
+ CNY: 2,
36
+ COP: 2,
37
+ CRC: 2,
38
+ CUP: 2,
39
+ CVE: 0,
40
+ CZK: 2,
41
+ DJF: 0,
42
+ DKK: 2,
43
+ DOP: 2,
44
+ DZD: 2,
45
+ EGP: 2,
46
+ ETB: 2,
47
+ EUR: 2,
48
+ FJD: 2,
49
+ FKP: 2,
50
+ GBP: 2,
51
+ GEL: 2,
52
+ GHS: 2,
53
+ GIP: 2,
54
+ GMD: 2,
55
+ GNF: 0,
56
+ GTQ: 2,
57
+ GYD: 2,
58
+ HKD: 2,
59
+ HNL: 2,
60
+ HTG: 2,
61
+ HUF: 2,
62
+ IDR: 0,
63
+ ILS: 2,
64
+ INR: 2,
65
+ IQD: 3,
66
+ ISK: 2,
67
+ JMD: 2,
68
+ JOD: 3,
69
+ JPY: 0,
70
+ KES: 2,
71
+ KGS: 2,
72
+ KHR: 2,
73
+ KMF: 0,
74
+ KRW: 0,
75
+ KWD: 3,
76
+ KYD: 2,
77
+ KZT: 2,
78
+ LAK: 2,
79
+ LBP: 2,
80
+ LKR: 2,
81
+ LYD: 3,
82
+ MAD: 2,
83
+ MDL: 2,
84
+ MKD: 2,
85
+ MMK: 2,
86
+ MNT: 2,
87
+ MOP: 2,
88
+ MRU: 2,
89
+ MUR: 2,
90
+ MVR: 2,
91
+ MWK: 2,
92
+ MXN: 2,
93
+ MYR: 2,
94
+ MZN: 2,
95
+ NAD: 2,
96
+ NGN: 2,
97
+ NIO: 2,
98
+ NOK: 2,
99
+ NPR: 2,
100
+ NZD: 2,
101
+ OMR: 3,
102
+ PAB: 2,
103
+ PEN: 2,
104
+ PGK: 2,
105
+ PHP: 2,
106
+ PKR: 2,
107
+ PLN: 2,
108
+ PYG: 0,
109
+ QAR: 2,
110
+ RON: 2,
111
+ RSD: 2,
112
+ RUB: 2,
113
+ RWF: 0,
114
+ SAR: 2,
115
+ SBD: 2,
116
+ SCR: 2,
117
+ SEK: 2,
118
+ SGD: 2,
119
+ SHP: 2,
120
+ SLE: 2,
121
+ SOS: 2,
122
+ SRD: 2,
123
+ STN: 2,
124
+ SVC: 2,
125
+ SZL: 2,
126
+ THB: 2,
127
+ TND: 3,
128
+ TOP: 2,
129
+ TRY: 2,
130
+ TTD: 2,
131
+ TWD: 2,
132
+ TZS: 2,
133
+ UAH: 2,
134
+ UGX: 0,
135
+ USD: 2,
136
+ UYU: 2,
137
+ UZS: 2,
138
+ VEF: 2,
139
+ VND: 0,
140
+ VUV: 0,
141
+ WST: 2,
142
+ XAF: 0,
143
+ XCD: 2,
144
+ XOF: 0,
145
+ XPF: 0,
146
+ YER: 2,
147
+ ZAR: 2,
148
+ ZMW: 2,
149
+ };
150
+ const useCurrencySetting = (currencyCode = "USD") => {
151
+ const [symbol, thousandSeparator, decimalSeparator, ...rest] = new IntlMessageFormat(`{amount, number, ::currency/${currencyCode} unit-width-narrow}`)
152
+ .format({ amount: 1000 })
153
+ .toString()
154
+ .replace(/\d/g, "")
155
+ .split("");
156
+ const decimalScale = CURRENCY_DECIMAL_MAP[currencyCode];
157
+ return {
158
+ symbol: `${symbol} `,
159
+ thousandSeparator,
160
+ decimalSeparator,
161
+ placeholder: decimalSeparator
162
+ ? `${symbol} 0${decimalSeparator}${Array.from(Array(decimalScale)).map(() => 0).join('')}`
163
+ : `${symbol} 0`,
164
+ fixedDecimalScale: !!decimalSeparator,
165
+ decimalScale,
166
+ };
167
+ };
168
+
169
+ exports.useCurrencySetting = useCurrencySetting;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var CurrencyInput = require('./CurrencyInput.js');
6
+
7
+
8
+
9
+ exports.CurrencyInput = CurrencyInput.CurrencyInput;
10
+ exports.default = CurrencyInput.CurrencyInput;