@majoo-ui/react 2.0.1 → 2.1.0-rc.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.
- package/charts.esm.js +3 -1453
- package/colors/Colors.esm.js +93 -0
- package/components/accordion/Accordion.esm.js +109 -0
- package/components/alertDialog/AlertDialog.esm.js +440 -0
- package/components/avatar/Avatar.esm.js +83 -0
- package/components/badge/Badge.esm.js +255 -0
- package/components/banner/Banner.esm.js +341 -0
- package/components/barChart/BarChart.esm.js +212 -0
- package/components/breadcrumb/Breadcrumb.esm.js +65 -0
- package/components/breadcrumb/index.esm.js +19 -0
- package/components/button/Button.esm.js +331 -0
- package/components/buttonGroup/ButtonGroup.esm.js +350 -0
- package/components/card/Card.esm.js +236 -0
- package/components/chart/assets/data_kosong.png.esm.js +3 -0
- package/components/chart/lineChart/LineChart.esm.js +358 -0
- package/components/chart/lineChart/components/Comparator.esm.js +82 -0
- package/components/chart/lineChart/components/ComparatorController.esm.js +112 -0
- package/components/chart/lineChart/components/ComparatorItem.esm.js +104 -0
- package/components/chart/lineChart/components/ProductList.esm.js +78 -0
- package/components/chart/lineChart/components/TitleLegend.esm.js +107 -0
- package/components/chart/lineChart/components/Tooltip.esm.js +90 -0
- package/components/chart/utils/index.esm.js +109 -0
- package/components/checkboxTable/CheckboxTable.esm.js +287 -0
- package/components/colorPicker/ColorPicker.esm.js +342 -0
- package/components/colorPicker/InputColorPicker.esm.js +120 -0
- package/components/colorPicker/assets/img_colormap.gif.esm.js +3 -0
- package/components/colorPicker/components/ColorFields.esm.js +144 -0
- package/components/colorPicker/components/ColorMap.esm.js +1188 -0
- package/components/contentEditor/ContentEditor.esm.js +251 -0
- package/components/contentEditor/assets/Inline-code-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/Link-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/List-bulleted-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/List-numbered-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/Redo-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/Text-bold-filled.svg.esm.js +3 -0
- package/components/contentEditor/assets/Text-clear-format-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/Text-italic-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/Text-strikethrough-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/Text-underline-outline.svg.esm.js +3 -0
- package/components/contentEditor/assets/Undo-outline.svg.esm.js +3 -0
- package/components/contextMenu/ContextMenu.esm.js +298 -0
- package/components/datePicker/AdvancedOption.esm.js +37 -0
- package/components/datePicker/CustomDatePicker.esm.js +121 -0
- package/components/datePicker/DatePicker.esm.js +244 -0
- package/components/datePicker/DatePickerMulti.esm.js +70 -0
- package/components/datePicker/InputDatePicker.esm.js +290 -0
- package/components/datePicker/InputDateRangePicker.esm.js +174 -0
- package/components/datePicker/components/Calendar.esm.js +654 -0
- package/components/datePicker/components/CalendarMulti.esm.js +407 -0
- package/components/datePicker/components/CalendarTimePicker.esm.js +104 -0
- package/components/datePicker/components/DateNumber.esm.js +89 -0
- package/components/datePicker/components/MobileCalendar.esm.js +522 -0
- package/components/datePicker/state/reducer.esm.js +286 -0
- package/components/datePicker/timePicker/InputTimePicker.esm.js +205 -0
- package/components/datePicker/timePicker/TimePicker.esm.js +481 -0
- package/components/devicePreview/DevicePreview.esm.js +631 -0
- package/components/devicePreview/deviceFrame/android-transparant.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/android-wide-transparant.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/bg-email.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/bg-notification.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/bg-sms.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/bg-whatsapp.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/desktop-transparant.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/ic-majoo-profpic.png.esm.js +3 -0
- package/components/devicePreview/deviceFrame/iphone-transparant.png.esm.js +3 -0
- package/components/dialog/Dialog.esm.js +106 -0
- package/components/drawer/Drawer.esm.js +294 -0
- package/components/dropdownMenu/DropdownMenu.esm.js +281 -0
- package/components/editableTable/EditableMobile.esm.js +361 -0
- package/components/editableTable/EditableTable.esm.js +618 -0
- package/components/editableTable/transition.esm.js +37 -0
- package/components/form/components/FormGroup/FormGroup.esm.js +142 -0
- package/components/form/components/FormHelper/Helper.esm.js +50 -0
- package/components/form/components/FormLabel/Label.esm.js +90 -0
- package/components/form/components/InputAddon/InputAddon.esm.js +105 -0
- package/components/form/components/InputCheckbox/CheckboxGroup.esm.js +60 -0
- package/components/form/components/InputCheckbox/InputCheckbox.esm.js +129 -0
- package/components/form/components/InputCheckbox/icon/CheckOutline.esm.js +33 -0
- package/components/form/components/InputCheckbox/icon/MinusOutline.esm.js +33 -0
- package/components/form/components/InputCombobox/InputCombobox.esm.js +169 -0
- package/components/form/components/InputCounter/InputCounter.esm.js +226 -0
- package/components/form/components/InputCreatable/InputCreatable.esm.js +229 -0
- package/components/form/components/InputDateRange/InputDateRange.esm.js +46 -0
- package/components/form/components/InputElement/InputElement.esm.js +35 -0
- package/components/form/components/InputGroup/InputGroup.esm.js +188 -0
- package/components/form/components/InputLetter/InputLetter.esm.js +68 -0
- package/components/form/components/InputNumber/InputNumber.esm.js +248 -0
- package/components/form/components/InputNumber/NumberFormat.esm.js +1263 -0
- package/components/form/components/InputOTP/InputOTP.esm.js +70 -0
- package/components/form/components/InputRadio/InputRadio.esm.js +273 -0
- package/components/form/components/InputRadio/InputRadioGroup.esm.js +35 -0
- package/components/form/components/InputRadio/context.esm.js +5 -0
- package/components/form/components/InputResourceList/InputResourceList.esm.js +429 -0
- package/components/form/components/InputSearchbox/CloseFilled.esm.js +34 -0
- package/components/form/components/InputSearchbox/InputSearchbox.esm.js +90 -0
- package/components/form/components/InputSearchbox/SearchOutline.esm.js +26 -0
- package/components/form/components/InputSelect/InputSelect.esm.js +964 -0
- package/components/form/components/InputSelectCheck/InputSelectCheck.esm.js +1388 -0
- package/components/form/components/InputSelectCheck/OptionGroupItem.esm.js +39 -0
- package/components/form/components/InputSelectCheck/icon/CheckOutline.esm.js +33 -0
- package/components/form/components/InputSelectTag/InputSelectTag.esm.js +62 -0
- package/components/form/components/InputSignature/InputSignature.esm.js +122 -0
- package/components/form/components/InputSignature/SignatureModal.esm.js +67 -0
- package/components/form/components/InputSwitch/InputSwitch.esm.js +96 -0
- package/components/form/components/InputSwitch/InputSwitchWithImage.esm.js +136 -0
- package/components/form/components/InputTags/InputTags.esm.js +268 -0
- package/components/form/components/InputText/InputText.esm.js +197 -0
- package/components/form/components/InputTextArea/InputTextArea.esm.js +77 -0
- package/components/heading/Heading.esm.js +64 -0
- package/components/iconButton/IconButton.esm.js +71 -0
- package/components/image/Image.esm.js +141 -0
- package/components/link/Link.esm.js +59 -0
- package/components/loadingBar/LoadingBar.esm.js +113 -0
- package/components/mapPicker/InputMapPicker.esm.js +160 -0
- package/components/mapPicker/MapPicker.esm.js +122 -0
- package/components/mapPicker/MapPicker.styles.esm.js +70 -0
- package/components/mapPicker/assets/images/Mapsicle.png.esm.js +3 -0
- package/components/mapPicker/components/AddressCard.esm.js +25 -0
- package/components/mapPicker/components/ButtonSelect.esm.js +46 -0
- package/components/mapPicker/components/ChangeView.esm.js +20 -0
- package/components/mapPicker/components/InputSearch.esm.js +74 -0
- package/components/mapPicker/components/MarkerIcon.esm.js +22 -0
- package/components/mapPicker/components/MarkerSvg.esm.js +62 -0
- package/components/mapPicker/components/ZoomControls.esm.js +36 -0
- package/components/mapPicker/hooks/useMapSearch.esm.js +161 -0
- package/components/modalDialog/ModalDialog.esm.js +247 -0
- package/components/notificationBadge/NotificationBadge.esm.js +149 -0
- package/components/pageDialog/PageDialog.esm.js +291 -0
- package/components/pageDialog/logo.svg.esm.js +3 -0
- package/components/pagination/Pagination.esm.js +94 -0
- package/components/pagination/PaginationButton.esm.js +346 -0
- package/components/pagination/PaginationInfo.esm.js +146 -0
- package/components/paper/Paper.esm.js +76 -0
- package/components/paragraph/Paragraph.esm.js +52 -0
- package/components/pieChart/PieChart.esm.js +287 -0
- package/components/popover/Popover.esm.js +142 -0
- package/components/progress/Progress.esm.js +170 -0
- package/components/progressIndicator/ProgressIndicator.esm.js +287 -0
- package/components/scrollSync/ScrollSync.esm.js +172 -0
- package/components/scrollSync/ScrollSyncNode.esm.js +87 -0
- package/components/scrollSync/utils.esm.js +9 -0
- package/components/separator/Separator.esm.js +43 -0
- package/components/skeleton/Skeleton.esm.js +131 -0
- package/components/slider/Slider.esm.js +345 -0
- package/components/stepWizard/StepWizard.esm.js +451 -0
- package/components/stepWizard/index.esm.js +14 -0
- package/components/table/MobileTable.esm.js +415 -0
- package/components/table/Table.esm.js +1472 -0
- package/components/table/components/columns/DateColumn.esm.js +26 -0
- package/components/table/components/columns/DecimalColumn.esm.js +36 -0
- package/components/table/components/columns/PriceColumn.esm.js +57 -0
- package/components/table/components/columns/RowDraggableColumn.esm.js +24 -0
- package/components/table/components/columns/RowExpanderColumn.esm.js +32 -0
- package/components/table/components/columns/RowExpanderMultipleColumn.esm.js +24 -0
- package/components/table/components/columns/RowMenuColumn.esm.js +101 -0
- package/components/table/components/columns/RowSelectionCallbackColumn.esm.js +38 -0
- package/components/table/components/columns/RowSelectionColumn.esm.js +34 -0
- package/components/table/images/img-emptydata.webp.esm.js +3 -0
- package/components/table/images/img-emptysearchdata.webp.esm.js +3 -0
- package/components/tableOfContent/TableOfContent.esm.js +267 -0
- package/components/tableOfContent/index.esm.js +18 -0
- package/components/tableOfContent/transition.esm.js +38 -0
- package/components/tabs/Tabs.esm.js +282 -0
- package/components/tag/Tag.esm.js +161 -0
- package/components/tagList/TagList.esm.js +90 -0
- package/components/tagStatus/TagStatus.esm.js +134 -0
- package/components/text/Text.esm.js +140 -0
- package/components/toast/Toast.esm.js +297 -0
- package/components/toast/ToastContainer.esm.js +73 -0
- package/components/toast/context/ToastContext.esm.js +5 -0
- package/components/toast/context/ToastProvider.esm.js +96 -0
- package/components/tooltip/Tooltip.esm.js +175 -0
- package/components/upload/Upload.esm.js +1103 -0
- package/components/upload/utils/canvasPreview.esm.js +39 -0
- package/components/upload/utils/imgPreview.esm.js +21 -0
- package/config/stitches.config.esm.js +216 -0
- package/editor.esm.js +1 -264
- package/hooks/useListOption/useListOption.esm.js +56 -0
- package/hooks/useToggle/useToggle.esm.js +8 -0
- package/index.esm.js +106 -42293
- package/layout/box/Box.esm.js +24 -0
- package/layout/flex/Flex.esm.js +135 -0
- package/layout/grid/Grid.esm.js +270 -0
- package/layout/pageContainer/PageContainer.esm.js +60 -0
- package/majoo-provider/MajooProvider.esm.js +42 -0
- package/majoo-provider/ThemeProvider.esm.js +41 -0
- package/majoo-provider/globalStyles.esm.js +242 -0
- package/majoo-provider/styles/modern-normalize.esm.js +95 -0
- package/map.esm.js +2 -734
- package/package.json +8 -4
- package/utils/calendar.esm.js +26 -0
- package/utils/element.esm.js +21 -0
- package/utils/object.esm.js +12 -0
- package/utils/request.esm.js +74 -0
- package/utils/strings.esm.js +6 -0
- package/{useMediaQuery.esm.js → utils/useMediaQuery.esm.js} +1 -1
- package/utils/useNavigatorOnline.esm.js +19 -0
- package/utils/variant.esm.js +12 -0
- package/wrapper/ConditionalWrapper.esm.js +9 -0
- package/ModalDialog.esm.js +0 -2669
- package/Separator.esm.js +0 -3002
- package/stitches.config.esm.js +0 -2284
- package/{index.esm.css → charts.esm.css} +4 -4
|
@@ -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 };
|