@majoo-ui/react 2.0.1 → 2.1.0-rc.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 (202) hide show
  1. package/charts.esm.js +3 -1453
  2. package/colors/Colors.esm.js +93 -0
  3. package/components/accordion/Accordion.esm.js +109 -0
  4. package/components/alertDialog/AlertDialog.esm.js +440 -0
  5. package/components/avatar/Avatar.esm.js +83 -0
  6. package/components/badge/Badge.esm.js +255 -0
  7. package/components/banner/Banner.esm.js +341 -0
  8. package/components/barChart/BarChart.esm.js +212 -0
  9. package/components/breadcrumb/Breadcrumb.esm.js +65 -0
  10. package/components/breadcrumb/index.esm.js +19 -0
  11. package/components/button/Button.esm.js +331 -0
  12. package/components/buttonGroup/ButtonGroup.esm.js +350 -0
  13. package/components/card/Card.esm.js +236 -0
  14. package/components/chart/assets/data_kosong.png.esm.js +3 -0
  15. package/components/chart/lineChart/LineChart.esm.js +358 -0
  16. package/components/chart/lineChart/components/Comparator.esm.js +82 -0
  17. package/components/chart/lineChart/components/ComparatorController.esm.js +112 -0
  18. package/components/chart/lineChart/components/ComparatorItem.esm.js +104 -0
  19. package/components/chart/lineChart/components/ProductList.esm.js +78 -0
  20. package/components/chart/lineChart/components/TitleLegend.esm.js +107 -0
  21. package/components/chart/lineChart/components/Tooltip.esm.js +90 -0
  22. package/components/chart/utils/index.esm.js +109 -0
  23. package/components/checkboxTable/CheckboxTable.esm.js +287 -0
  24. package/components/colorPicker/ColorPicker.esm.js +342 -0
  25. package/components/colorPicker/InputColorPicker.esm.js +120 -0
  26. package/components/colorPicker/assets/img_colormap.gif.esm.js +3 -0
  27. package/components/colorPicker/components/ColorFields.esm.js +144 -0
  28. package/components/colorPicker/components/ColorMap.esm.js +1188 -0
  29. package/components/contentEditor/ContentEditor.esm.js +251 -0
  30. package/components/contentEditor/assets/Inline-code-outline.svg.esm.js +3 -0
  31. package/components/contentEditor/assets/Link-outline.svg.esm.js +3 -0
  32. package/components/contentEditor/assets/List-bulleted-outline.svg.esm.js +3 -0
  33. package/components/contentEditor/assets/List-numbered-outline.svg.esm.js +3 -0
  34. package/components/contentEditor/assets/Redo-outline.svg.esm.js +3 -0
  35. package/components/contentEditor/assets/Text-bold-filled.svg.esm.js +3 -0
  36. package/components/contentEditor/assets/Text-clear-format-outline.svg.esm.js +3 -0
  37. package/components/contentEditor/assets/Text-italic-outline.svg.esm.js +3 -0
  38. package/components/contentEditor/assets/Text-strikethrough-outline.svg.esm.js +3 -0
  39. package/components/contentEditor/assets/Text-underline-outline.svg.esm.js +3 -0
  40. package/components/contentEditor/assets/Undo-outline.svg.esm.js +3 -0
  41. package/components/contextMenu/ContextMenu.esm.js +298 -0
  42. package/components/datePicker/AdvancedOption.esm.js +37 -0
  43. package/components/datePicker/CustomDatePicker.esm.js +121 -0
  44. package/components/datePicker/DatePicker.esm.js +244 -0
  45. package/components/datePicker/DatePickerMulti.esm.js +70 -0
  46. package/components/datePicker/InputDatePicker.esm.js +290 -0
  47. package/components/datePicker/InputDateRangePicker.esm.js +174 -0
  48. package/components/datePicker/components/Calendar.esm.js +654 -0
  49. package/components/datePicker/components/CalendarMulti.esm.js +407 -0
  50. package/components/datePicker/components/CalendarTimePicker.esm.js +104 -0
  51. package/components/datePicker/components/DateNumber.esm.js +89 -0
  52. package/components/datePicker/components/MobileCalendar.esm.js +522 -0
  53. package/components/datePicker/state/reducer.esm.js +286 -0
  54. package/components/datePicker/timePicker/InputTimePicker.esm.js +205 -0
  55. package/components/datePicker/timePicker/TimePicker.esm.js +481 -0
  56. package/components/devicePreview/DevicePreview.esm.js +631 -0
  57. package/components/devicePreview/deviceFrame/android-transparant.png.esm.js +3 -0
  58. package/components/devicePreview/deviceFrame/android-wide-transparant.png.esm.js +3 -0
  59. package/components/devicePreview/deviceFrame/bg-email.png.esm.js +3 -0
  60. package/components/devicePreview/deviceFrame/bg-notification.png.esm.js +3 -0
  61. package/components/devicePreview/deviceFrame/bg-sms.png.esm.js +3 -0
  62. package/components/devicePreview/deviceFrame/bg-whatsapp.png.esm.js +3 -0
  63. package/components/devicePreview/deviceFrame/desktop-transparant.png.esm.js +3 -0
  64. package/components/devicePreview/deviceFrame/ic-majoo-profpic.png.esm.js +3 -0
  65. package/components/devicePreview/deviceFrame/iphone-transparant.png.esm.js +3 -0
  66. package/components/dialog/Dialog.esm.js +106 -0
  67. package/components/drawer/Drawer.esm.js +294 -0
  68. package/components/dropdownMenu/DropdownMenu.esm.js +281 -0
  69. package/components/editableTable/EditableMobile.esm.js +361 -0
  70. package/components/editableTable/EditableTable.esm.js +618 -0
  71. package/components/editableTable/transition.esm.js +37 -0
  72. package/components/form/components/FormGroup/FormGroup.esm.js +142 -0
  73. package/components/form/components/FormHelper/Helper.esm.js +50 -0
  74. package/components/form/components/FormLabel/Label.esm.js +90 -0
  75. package/components/form/components/InputAddon/InputAddon.esm.js +105 -0
  76. package/components/form/components/InputCheckbox/CheckboxGroup.esm.js +60 -0
  77. package/components/form/components/InputCheckbox/InputCheckbox.esm.js +129 -0
  78. package/components/form/components/InputCheckbox/icon/CheckOutline.esm.js +33 -0
  79. package/components/form/components/InputCheckbox/icon/MinusOutline.esm.js +33 -0
  80. package/components/form/components/InputCombobox/InputCombobox.esm.js +169 -0
  81. package/components/form/components/InputCounter/InputCounter.esm.js +226 -0
  82. package/components/form/components/InputCreatable/InputCreatable.esm.js +229 -0
  83. package/components/form/components/InputDateRange/InputDateRange.esm.js +46 -0
  84. package/components/form/components/InputElement/InputElement.esm.js +35 -0
  85. package/components/form/components/InputGroup/InputGroup.esm.js +188 -0
  86. package/components/form/components/InputLetter/InputLetter.esm.js +68 -0
  87. package/components/form/components/InputNumber/InputNumber.esm.js +248 -0
  88. package/components/form/components/InputNumber/NumberFormat.esm.js +1263 -0
  89. package/components/form/components/InputOTP/InputOTP.esm.js +70 -0
  90. package/components/form/components/InputRadio/InputRadio.esm.js +273 -0
  91. package/components/form/components/InputRadio/InputRadioGroup.esm.js +35 -0
  92. package/components/form/components/InputRadio/context.esm.js +5 -0
  93. package/components/form/components/InputResourceList/InputResourceList.esm.js +429 -0
  94. package/components/form/components/InputSearchbox/CloseFilled.esm.js +34 -0
  95. package/components/form/components/InputSearchbox/InputSearchbox.esm.js +90 -0
  96. package/components/form/components/InputSearchbox/SearchOutline.esm.js +26 -0
  97. package/components/form/components/InputSelect/InputSelect.esm.js +964 -0
  98. package/components/form/components/InputSelectCheck/InputSelectCheck.esm.js +1388 -0
  99. package/components/form/components/InputSelectCheck/OptionGroupItem.esm.js +39 -0
  100. package/components/form/components/InputSelectCheck/icon/CheckOutline.esm.js +33 -0
  101. package/components/form/components/InputSelectTag/InputSelectTag.esm.js +62 -0
  102. package/components/form/components/InputSignature/InputSignature.esm.js +122 -0
  103. package/components/form/components/InputSignature/SignatureModal.esm.js +67 -0
  104. package/components/form/components/InputSwitch/InputSwitch.esm.js +96 -0
  105. package/components/form/components/InputSwitch/InputSwitchWithImage.esm.js +136 -0
  106. package/components/form/components/InputTags/InputTags.esm.js +268 -0
  107. package/components/form/components/InputText/InputText.esm.js +197 -0
  108. package/components/form/components/InputTextArea/InputTextArea.esm.js +77 -0
  109. package/components/heading/Heading.esm.js +64 -0
  110. package/components/iconButton/IconButton.esm.js +71 -0
  111. package/components/image/Image.esm.js +141 -0
  112. package/components/link/Link.esm.js +59 -0
  113. package/components/loadingBar/LoadingBar.esm.js +113 -0
  114. package/components/mapPicker/InputMapPicker.esm.js +160 -0
  115. package/components/mapPicker/MapPicker.esm.js +122 -0
  116. package/components/mapPicker/MapPicker.styles.esm.js +70 -0
  117. package/components/mapPicker/assets/images/Mapsicle.png.esm.js +3 -0
  118. package/components/mapPicker/components/AddressCard.esm.js +25 -0
  119. package/components/mapPicker/components/ButtonSelect.esm.js +46 -0
  120. package/components/mapPicker/components/ChangeView.esm.js +20 -0
  121. package/components/mapPicker/components/InputSearch.esm.js +74 -0
  122. package/components/mapPicker/components/MarkerIcon.esm.js +22 -0
  123. package/components/mapPicker/components/MarkerSvg.esm.js +62 -0
  124. package/components/mapPicker/components/ZoomControls.esm.js +36 -0
  125. package/components/mapPicker/hooks/useMapSearch.esm.js +161 -0
  126. package/components/modalDialog/ModalDialog.esm.js +247 -0
  127. package/components/notificationBadge/NotificationBadge.esm.js +149 -0
  128. package/components/pageDialog/PageDialog.esm.js +291 -0
  129. package/components/pageDialog/logo.svg.esm.js +3 -0
  130. package/components/pagination/Pagination.esm.js +94 -0
  131. package/components/pagination/PaginationButton.esm.js +346 -0
  132. package/components/pagination/PaginationInfo.esm.js +146 -0
  133. package/components/paper/Paper.esm.js +76 -0
  134. package/components/paragraph/Paragraph.esm.js +52 -0
  135. package/components/pieChart/PieChart.esm.js +287 -0
  136. package/components/popover/Popover.esm.js +142 -0
  137. package/components/progress/Progress.esm.js +170 -0
  138. package/components/progressIndicator/ProgressIndicator.esm.js +287 -0
  139. package/components/scrollSync/ScrollSync.esm.js +172 -0
  140. package/components/scrollSync/ScrollSyncNode.esm.js +87 -0
  141. package/components/scrollSync/utils.esm.js +9 -0
  142. package/components/separator/Separator.esm.js +43 -0
  143. package/components/skeleton/Skeleton.esm.js +131 -0
  144. package/components/slider/Slider.esm.js +345 -0
  145. package/components/stepWizard/StepWizard.esm.js +451 -0
  146. package/components/stepWizard/index.esm.js +14 -0
  147. package/components/table/MobileTable.esm.js +415 -0
  148. package/components/table/Table.esm.js +1472 -0
  149. package/components/table/components/columns/DateColumn.esm.js +26 -0
  150. package/components/table/components/columns/DecimalColumn.esm.js +36 -0
  151. package/components/table/components/columns/PriceColumn.esm.js +57 -0
  152. package/components/table/components/columns/RowDraggableColumn.esm.js +24 -0
  153. package/components/table/components/columns/RowExpanderColumn.esm.js +32 -0
  154. package/components/table/components/columns/RowExpanderMultipleColumn.esm.js +24 -0
  155. package/components/table/components/columns/RowMenuColumn.esm.js +101 -0
  156. package/components/table/components/columns/RowSelectionCallbackColumn.esm.js +38 -0
  157. package/components/table/components/columns/RowSelectionColumn.esm.js +34 -0
  158. package/components/table/images/img-emptydata.webp.esm.js +3 -0
  159. package/components/table/images/img-emptysearchdata.webp.esm.js +3 -0
  160. package/components/tableOfContent/TableOfContent.esm.js +267 -0
  161. package/components/tableOfContent/index.esm.js +18 -0
  162. package/components/tableOfContent/transition.esm.js +38 -0
  163. package/components/tabs/Tabs.esm.js +282 -0
  164. package/components/tag/Tag.esm.js +161 -0
  165. package/components/tagList/TagList.esm.js +90 -0
  166. package/components/tagStatus/TagStatus.esm.js +134 -0
  167. package/components/text/Text.esm.js +140 -0
  168. package/components/toast/Toast.esm.js +297 -0
  169. package/components/toast/ToastContainer.esm.js +73 -0
  170. package/components/toast/context/ToastContext.esm.js +5 -0
  171. package/components/toast/context/ToastProvider.esm.js +96 -0
  172. package/components/tooltip/Tooltip.esm.js +175 -0
  173. package/components/upload/Upload.esm.js +1103 -0
  174. package/components/upload/utils/canvasPreview.esm.js +39 -0
  175. package/components/upload/utils/imgPreview.esm.js +21 -0
  176. package/config/stitches.config.esm.js +216 -0
  177. package/editor.esm.js +1 -264
  178. package/hooks/useListOption/useListOption.esm.js +56 -0
  179. package/hooks/useToggle/useToggle.esm.js +8 -0
  180. package/index.esm.js +106 -42293
  181. package/layout/box/Box.esm.js +24 -0
  182. package/layout/flex/Flex.esm.js +135 -0
  183. package/layout/grid/Grid.esm.js +270 -0
  184. package/layout/pageContainer/PageContainer.esm.js +60 -0
  185. package/majoo-provider/MajooProvider.esm.js +42 -0
  186. package/majoo-provider/ThemeProvider.esm.js +41 -0
  187. package/majoo-provider/globalStyles.esm.js +242 -0
  188. package/majoo-provider/styles/modern-normalize.esm.js +95 -0
  189. package/map.esm.js +2 -734
  190. package/package.json +8 -4
  191. package/utils/calendar.esm.js +26 -0
  192. package/utils/element.esm.js +21 -0
  193. package/utils/object.esm.js +12 -0
  194. package/utils/request.esm.js +74 -0
  195. package/utils/strings.esm.js +6 -0
  196. package/{useMediaQuery.esm.js → utils/useMediaQuery.esm.js} +1 -1
  197. package/utils/useNavigatorOnline.esm.js +19 -0
  198. package/utils/variant.esm.js +12 -0
  199. package/wrapper/ConditionalWrapper.esm.js +9 -0
  200. package/ModalDialog.esm.js +0 -2669
  201. package/Separator.esm.js +0 -3002
  202. package/stitches.config.esm.js +0 -2284
@@ -0,0 +1,24 @@
1
+ import { styled } from '../../config/stitches.config.esm.js';
2
+
3
+ const Box = styled('div', {
4
+ variants: {
5
+ mobileOnly: {
6
+ true: {
7
+ '@lg': {
8
+ display: 'none !important'
9
+ }
10
+ }
11
+ },
12
+ desktopOnly: {
13
+ true: {
14
+ display: 'none !important',
15
+ '@lg': {
16
+ display: 'inherit !important'
17
+ }
18
+ }
19
+ }
20
+ }
21
+ });
22
+ Box.displayName = 'Box';
23
+
24
+ export { Box as default };
@@ -0,0 +1,135 @@
1
+ import 'react';
2
+ import { styled } from '../../config/stitches.config.esm.js';
3
+ import PropTypes from 'prop-types';
4
+ import { seqNumberVariants } from '../../utils/variant.esm.js';
5
+
6
+ const Flex = styled('div', {
7
+ display: 'flex',
8
+ variants: {
9
+ direction: {
10
+ row: {
11
+ flexDirection: 'row'
12
+ },
13
+ column: {
14
+ flexDirection: 'column'
15
+ },
16
+ rowReverse: {
17
+ flexDirection: 'row-reverse'
18
+ },
19
+ columnReverse: {
20
+ flexDirection: 'column-reverse'
21
+ }
22
+ },
23
+ align: {
24
+ start: {
25
+ alignItems: 'flex-start'
26
+ },
27
+ center: {
28
+ alignItems: 'center'
29
+ },
30
+ end: {
31
+ alignItems: 'flex-end'
32
+ },
33
+ stretch: {
34
+ alignItems: 'stretch'
35
+ },
36
+ baseline: {
37
+ alignItems: 'baseline'
38
+ }
39
+ },
40
+ justify: {
41
+ start: {
42
+ justifyContent: 'flex-start'
43
+ },
44
+ center: {
45
+ justifyContent: 'center'
46
+ },
47
+ end: {
48
+ justifyContent: 'flex-end'
49
+ },
50
+ between: {
51
+ justifyContent: 'space-between'
52
+ },
53
+ evenly: {
54
+ justifyContent: 'space-evenly'
55
+ },
56
+ around: {
57
+ justifyContent: 'space-around'
58
+ }
59
+ },
60
+ wrap: {
61
+ noWrap: {
62
+ flexWrap: 'nowrap'
63
+ },
64
+ wrap: {
65
+ flexWrap: 'wrap'
66
+ },
67
+ wrapReverse: {
68
+ flexWrap: 'wrap-reverse'
69
+ }
70
+ },
71
+ gap: seqNumberVariants(value => ({
72
+ gap: `$spacing-${value < 10 ? '0' + value : value}`
73
+ }), 12),
74
+ m: seqNumberVariants(value => ({
75
+ m: `$spacing-${value < 10 ? '0' + value : value}`
76
+ }), 12),
77
+ mt: seqNumberVariants(value => ({
78
+ mt: `$spacing-${value < 10 ? '0' + value : value}`
79
+ }), 12),
80
+ mb: seqNumberVariants(value => ({
81
+ mb: `$spacing-${value < 10 ? '0' + value : value}`
82
+ }), 12),
83
+ mr: seqNumberVariants(value => ({
84
+ mr: `$spacing-${value < 10 ? '0' + value : value}`
85
+ }), 12),
86
+ ml: seqNumberVariants(value => ({
87
+ ml: `$spacing-${value < 10 ? '0' + value : value}`
88
+ }), 12),
89
+ mx: seqNumberVariants(value => ({
90
+ mx: `$spacing-${value < 10 ? '0' + value : value}`
91
+ }), 12),
92
+ my: seqNumberVariants(value => ({
93
+ my: `$spacing-${value < 10 ? '0' + value : value}`
94
+ }), 12),
95
+ mobileOnly: {
96
+ true: {
97
+ '@lg': {
98
+ display: 'none !important'
99
+ }
100
+ }
101
+ },
102
+ desktopOnly: {
103
+ true: {
104
+ display: 'none !important',
105
+ '@lg': {
106
+ display: 'flex !important'
107
+ }
108
+ }
109
+ }
110
+ }
111
+ });
112
+ Flex.propTypes = {
113
+ direction: PropTypes.string,
114
+ align: PropTypes.string,
115
+ justify: PropTypes.string,
116
+ wrap: PropTypes.string,
117
+ gap: PropTypes.number,
118
+ m: PropTypes.number,
119
+ mt: PropTypes.number,
120
+ mb: PropTypes.number,
121
+ mr: PropTypes.number,
122
+ ml: PropTypes.number,
123
+ mx: PropTypes.number,
124
+ my: PropTypes.number
125
+ };
126
+ Flex.defaultProps = {
127
+ direction: 'row',
128
+ align: 'stretch',
129
+ justify: 'start',
130
+ wrap: 'noWrap',
131
+ gap: 0
132
+ };
133
+ Flex.displayName = 'Flex';
134
+
135
+ export { Flex as default };
@@ -0,0 +1,270 @@
1
+ import 'react';
2
+ import { styled } from '../../config/stitches.config.esm.js';
3
+ import PropTypes from 'prop-types';
4
+ import { seqNumberVariants } from '../../utils/variant.esm.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ //@ts-nocheck
8
+ const GridComponent = styled('div', {
9
+ display: 'grid',
10
+ variants: {
11
+ align: {
12
+ start: {
13
+ alignItems: 'start'
14
+ },
15
+ center: {
16
+ alignItems: 'center'
17
+ },
18
+ end: {
19
+ alignItems: 'end'
20
+ },
21
+ stretch: {
22
+ alignItems: 'stretch'
23
+ },
24
+ baseline: {
25
+ alignItems: 'baseline'
26
+ }
27
+ },
28
+ justify: {
29
+ start: {
30
+ justifyContent: 'start'
31
+ },
32
+ center: {
33
+ justifyContent: 'center'
34
+ },
35
+ end: {
36
+ justifyContent: 'end'
37
+ },
38
+ between: {
39
+ justifyContent: 'space-between'
40
+ }
41
+ },
42
+ flow: {
43
+ row: {
44
+ gridAutoFlow: 'row'
45
+ },
46
+ column: {
47
+ gridAutoFlow: 'column'
48
+ },
49
+ dense: {
50
+ gridAutoFlow: 'dense'
51
+ },
52
+ rowDense: {
53
+ gridAutoFlow: 'row dense'
54
+ },
55
+ columnDense: {
56
+ gridAutoFlow: 'column dense'
57
+ }
58
+ },
59
+ columns: seqNumberVariants(value => ({
60
+ gridTemplateColumns: `repeat(${value}, 1fr)`
61
+ }), 10),
62
+ rows: seqNumberVariants(value => ({
63
+ gridTemplateRows: `repeat(${value}, 1fr)`
64
+ }), 10),
65
+ placeItems: {
66
+ stretch: {
67
+ placeItems: 'stretch'
68
+ },
69
+ start: {
70
+ placeItems: 'start'
71
+ },
72
+ end: {
73
+ placeItems: 'end'
74
+ },
75
+ center: {
76
+ placeItems: 'center'
77
+ },
78
+ left: {
79
+ placeItems: 'left'
80
+ },
81
+ right: {
82
+ placeItems: 'right'
83
+ }
84
+ },
85
+ gap: {
86
+ 1: {
87
+ gap: '$spacing-03'
88
+ },
89
+ 2: {
90
+ gap: '$spacing-05'
91
+ },
92
+ 3: {
93
+ gap: '$spacing-06'
94
+ },
95
+ 4: {
96
+ gap: '$spacing-07'
97
+ },
98
+ 5: {
99
+ gap: '$spacing-08'
100
+ },
101
+ 6: {
102
+ gap: '$spacing-09'
103
+ },
104
+ 7: {
105
+ gap: '$spacing-10'
106
+ },
107
+ 8: {
108
+ gap: '$spacing-11'
109
+ },
110
+ 9: {
111
+ gap: '$spacing-12'
112
+ }
113
+ },
114
+ gapX: {
115
+ normal: {
116
+ columnGap: 'normal'
117
+ },
118
+ 1: {
119
+ columnGap: '$spacing-03'
120
+ },
121
+ 2: {
122
+ columnGap: '$spacing-05'
123
+ },
124
+ 3: {
125
+ columnGap: '$spacing-06'
126
+ },
127
+ 4: {
128
+ columnGap: '$spacing-07'
129
+ },
130
+ 5: {
131
+ columnGap: '$spacing-08'
132
+ },
133
+ 6: {
134
+ columnGap: '$spacing-09'
135
+ },
136
+ 7: {
137
+ columnGap: '$spacing-10'
138
+ },
139
+ 8: {
140
+ columnGap: '$spacing-11'
141
+ },
142
+ 9: {
143
+ columnGap: '$spacing-12'
144
+ }
145
+ },
146
+ gapY: {
147
+ 1: {
148
+ rowGap: '$spacing-03'
149
+ },
150
+ 2: {
151
+ rowGap: '$spacing-05'
152
+ },
153
+ 3: {
154
+ rowGap: '$spacing-06'
155
+ },
156
+ 4: {
157
+ rowGap: '$spacing-07'
158
+ },
159
+ 5: {
160
+ rowGap: '$spacing-08'
161
+ },
162
+ 6: {
163
+ rowGap: '$spacing-09'
164
+ },
165
+ 7: {
166
+ rowGap: '$spacing-10'
167
+ },
168
+ 8: {
169
+ rowGap: '$spacing-11'
170
+ },
171
+ 9: {
172
+ rowGap: '$spacing-12'
173
+ }
174
+ },
175
+ mobileOnly: {
176
+ true: {
177
+ '@lg': {
178
+ display: 'none !important'
179
+ }
180
+ }
181
+ },
182
+ desktopOnly: {
183
+ true: {
184
+ display: 'none !important',
185
+ '@lg': {
186
+ display: 'grid !important'
187
+ }
188
+ }
189
+ }
190
+ }
191
+ });
192
+ const Grid = ({
193
+ children,
194
+ ...props
195
+ }) => {
196
+ return /*#__PURE__*/jsx(GridComponent, {
197
+ ...props,
198
+ css: {
199
+ ...props.css,
200
+ gridAutoColumns: props.autoColumns,
201
+ gridAutoRows: props.autoRows,
202
+ gridTemplateColumns: props.templateColumns,
203
+ gridTemplateRows: props.templateRows
204
+ },
205
+ children: children
206
+ });
207
+ };
208
+ Grid.propTypes = {
209
+ align: PropTypes.string,
210
+ justify: PropTypes.string,
211
+ autoColumns: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
212
+ autoRows: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
213
+ autoFlow: PropTypes.string,
214
+ templateColumns: PropTypes.string,
215
+ templateRows: PropTypes.string,
216
+ columns: PropTypes.number,
217
+ rows: PropTypes.number,
218
+ gap: PropTypes.number,
219
+ gapX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
220
+ gapY: PropTypes.number
221
+ };
222
+ Grid.displayName = 'Grid';
223
+ function spanFn(value) {
224
+ return value === 'auto' ? 'auto' : `span ${value}/span ${value}`;
225
+ }
226
+ const GridItemComponent = styled('div', {
227
+ variants: {
228
+ colSpan: {
229
+ auto: spanFn('auto'),
230
+ ...seqNumberVariants(value => ({
231
+ gridColumn: spanFn(value)
232
+ }), 10)
233
+ },
234
+ rowSpan: {
235
+ auto: spanFn('auto'),
236
+ ...seqNumberVariants(value => ({
237
+ gridRow: spanFn(value)
238
+ }), 10)
239
+ }
240
+ }
241
+ });
242
+ const GridItem = ({
243
+ children,
244
+ ...props
245
+ }) => {
246
+ return /*#__PURE__*/jsx(GridItemComponent, {
247
+ ...props,
248
+ css: {
249
+ ...props.css,
250
+ gridArea: props.area,
251
+ gridColumnStart: props.colStart,
252
+ gridColumnEnd: props.colEnd,
253
+ gridRowStart: props.rowStart,
254
+ gridRowEnd: props.rowEnd
255
+ },
256
+ children: children
257
+ });
258
+ };
259
+ GridItem.propTypes = {
260
+ gridArea: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
261
+ colSpan: PropTypes.number,
262
+ rowSpan: PropTypes.number,
263
+ colStart: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
264
+ colEnd: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
265
+ rowStart: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
266
+ rowEnd: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
267
+ };
268
+ GridItem.displayName = 'Grid Item';
269
+
270
+ export { Grid, GridItem, Grid as default };
@@ -0,0 +1,60 @@
1
+ import 'react';
2
+ import { styled } from '../../config/stitches.config.esm.js';
3
+ import Flex from '../flex/Flex.esm.js';
4
+ import { jsxs } from 'react/jsx-runtime';
5
+
6
+ const StyledDiv = styled(Flex, {
7
+ justifyContent: 'center',
8
+ marginLeft: 'auto',
9
+ marginRight: 'auto',
10
+ '@sm': {
11
+ padding: '0 $spacing-05 $spacing-06',
12
+ backgroundColor: '$white',
13
+ width: '100%'
14
+ },
15
+ '@lg': {
16
+ padding: '0',
17
+ backgroundColor: '$bgGray'
18
+ },
19
+ '@3xl': {
20
+ maxWidth: '1206px !important'
21
+ },
22
+ defaultVariants: {
23
+ direction: 'column'
24
+ },
25
+ mobileOnly: {
26
+ true: {
27
+ '@lg': {
28
+ display: 'none !important'
29
+ }
30
+ }
31
+ },
32
+ desktopOnly: {
33
+ true: {
34
+ display: 'none !important',
35
+ '@lg': {
36
+ display: 'inherit !important'
37
+ }
38
+ }
39
+ }
40
+ });
41
+ const PageContainer = ({
42
+ children,
43
+ isCollapse,
44
+ css,
45
+ contentHeader,
46
+ ...props
47
+ }) => {
48
+ return /*#__PURE__*/jsxs(StyledDiv, {
49
+ id: "retina-container",
50
+ css: {
51
+ maxWidth: isCollapse ? '1206px' : '1006px',
52
+ ...css
53
+ },
54
+ ...props,
55
+ children: [contentHeader, children]
56
+ });
57
+ };
58
+ PageContainer.displayName = 'PageContainer';
59
+
60
+ export { PageContainer as default };
@@ -0,0 +1,42 @@
1
+ import 'react';
2
+ import ThemeProvider from './ThemeProvider.esm.js';
3
+ import { applyGlobalStyles } from './globalStyles.esm.js';
4
+ import { theme } from '../config/stitches.config.esm.js';
5
+ import PropTypes from 'prop-types';
6
+ import { useTranslation } from 'react-i18next';
7
+ import moment from 'moment';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ function MajooProvider({
11
+ children,
12
+ name,
13
+ theme: theme$1 = theme,
14
+ extendStyle,
15
+ disableGlobalStyle
16
+ }) {
17
+ !disableGlobalStyle && applyGlobalStyles(extendStyle, theme$1);
18
+ const {
19
+ i18n
20
+ } = useTranslation();
21
+ moment.locale(i18n && i18n.language ? i18n.language : 'id');
22
+ return /*#__PURE__*/jsx(ThemeProvider, {
23
+ name: name,
24
+ theme: theme$1,
25
+ children: children
26
+ });
27
+ }
28
+ MajooProvider.propTypes = {
29
+ name: PropTypes.string,
30
+ theme: PropTypes.object.isRequired,
31
+ children: PropTypes.node.isRequired,
32
+ extendStyle: PropTypes.object,
33
+ disableGlobalStyle: PropTypes.bool
34
+ };
35
+ MajooProvider.defaultProps = {
36
+ name: 'default',
37
+ theme: theme,
38
+ extendStyle: {},
39
+ disableGlobalStyle: false
40
+ };
41
+
42
+ export { MajooProvider as default };
@@ -0,0 +1,41 @@
1
+ import React__default from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ function ThemeProvider({
6
+ name,
7
+ theme,
8
+ children
9
+ }) {
10
+ // Apply theme class to document.body so that Radix Portal content
11
+ // (which renders outside this ThemeProvider div) also inherits
12
+ // the active theme's CSS variables.
13
+ React__default.useEffect(() => {
14
+ if (typeof document === 'undefined') return;
15
+ const body = document.body;
16
+ const themeClass = theme?.className || String(theme || '');
17
+ if (themeClass) {
18
+ body.classList.add(themeClass);
19
+ }
20
+ return () => {
21
+ if (themeClass) {
22
+ body.classList.remove(themeClass);
23
+ }
24
+ };
25
+ }, [theme]);
26
+ return /*#__PURE__*/jsx("div", {
27
+ id: name,
28
+ className: theme,
29
+ children: children
30
+ });
31
+ }
32
+ ThemeProvider.propTypes = {
33
+ name: PropTypes.string,
34
+ theme: PropTypes.object.isRequired,
35
+ children: PropTypes.node.isRequired
36
+ };
37
+ ThemeProvider.defaultProps = {
38
+ name: 'default'
39
+ };
40
+
41
+ export { ThemeProvider as default };