@herca/rn-kit 0.1.113 → 0.1.115
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/README.md +66 -0
- package/lib/module/Accordion/Accordion.js +4 -1
- package/lib/module/Accordion/Accordion.js.map +1 -1
- package/lib/module/Accordion/AccordionItem.js +3 -1
- package/lib/module/Accordion/AccordionItem.js.map +1 -1
- package/lib/module/Accordion/README.md +2 -0
- package/lib/module/Alert/Alert.js +3 -1
- package/lib/module/Alert/Alert.js.map +1 -1
- package/lib/module/Alert/README.md +1 -0
- package/lib/module/Avatar/Avatar.js +3 -1
- package/lib/module/Avatar/Avatar.js.map +1 -1
- package/lib/module/Avatar/AvatarGroup.js +3 -1
- package/lib/module/Avatar/AvatarGroup.js.map +1 -1
- package/lib/module/Avatar/README_AVATAR.md +1 -0
- package/lib/module/Avatar/README_AVATARGROUP.md +1 -0
- package/lib/module/Badge/Badge.js +4 -1
- package/lib/module/Badge/Badge.js.map +1 -1
- package/lib/module/Badge/README.md +1 -0
- package/lib/module/BadgeIcon/BadgeIcon.js +3 -1
- package/lib/module/BadgeIcon/BadgeIcon.js.map +1 -1
- package/lib/module/BadgeIcon/README.md +1 -0
- package/lib/module/BottomSheet/BottomSheet.js +17 -8
- package/lib/module/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/BottomSheet/README.md +1 -0
- package/lib/module/Button/Button.js +3 -1
- package/lib/module/Button/Button.js.map +1 -1
- package/lib/module/Button/README.md +1 -0
- package/lib/module/Button/type.js.map +1 -1
- package/lib/module/Calendar/Calendar.js +9 -1
- package/lib/module/Calendar/Calendar.js.map +1 -1
- package/lib/module/Calendar/README.md +2 -0
- package/lib/module/CheckBox/CheckBox.js +8 -3
- package/lib/module/CheckBox/CheckBox.js.map +1 -1
- package/lib/module/CheckBox/CheckBoxList.js +7 -2
- package/lib/module/CheckBox/CheckBoxList.js.map +1 -1
- package/lib/module/CheckBox/README_CHECKBOX.md +1 -0
- package/lib/module/CheckBox/README_CHECKBOXLIST.md +1 -0
- package/lib/module/Chip/Chip.js +19 -6
- package/lib/module/Chip/Chip.js.map +1 -1
- package/lib/module/Chip/ChipItem.js +3 -1
- package/lib/module/Chip/ChipItem.js.map +1 -1
- package/lib/module/Chip/README.md +26 -2
- package/lib/module/Chip/README_CHIP_ITEM.md +1 -0
- package/lib/module/CounterButton/CounterButton.js +6 -1
- package/lib/module/CounterButton/CounterButton.js.map +1 -1
- package/lib/module/CounterButton/README.md +1 -0
- package/lib/module/DatePicker/DatePicker.js +13 -1
- package/lib/module/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/DatePicker/MonthPicker.js +35 -2
- package/lib/module/DatePicker/MonthPicker.js.map +1 -1
- package/lib/module/DatePicker/README_DATEPICKER.md +1 -0
- package/lib/module/DatePicker/README_MONTHPICKER.md +2 -0
- package/lib/module/DatePicker/README_TIMEPICKER.md +1 -0
- package/lib/module/DatePicker/README_YEARPICKER.md +2 -0
- package/lib/module/DatePicker/TimePicker.js +8 -1
- package/lib/module/DatePicker/TimePicker.js.map +1 -1
- package/lib/module/DatePicker/YearPicker.js +50 -5
- package/lib/module/DatePicker/YearPicker.js.map +1 -1
- package/lib/module/Drawing/Drawing.js +3 -1
- package/lib/module/Drawing/Drawing.js.map +1 -1
- package/lib/module/Drawing/README.md +1 -0
- package/lib/module/DropDown/DropDown.js +6 -1
- package/lib/module/DropDown/DropDown.js.map +1 -1
- package/lib/module/DropDown/README.md +1 -0
- package/lib/module/FileView/PDF_VIEW_README.md +11 -0
- package/lib/module/FileView/PdfView.js +5 -1
- package/lib/module/FileView/PdfView.js.map +1 -1
- package/lib/module/Icon/Icon.js +14 -2
- package/lib/module/Icon/Icon.js.map +1 -1
- package/lib/module/Icon/README.md +1 -0
- package/lib/module/Input/Input.js +7 -0
- package/lib/module/Input/Input.js.map +1 -1
- package/lib/module/Input/InputDate.js +35 -8
- package/lib/module/Input/InputDate.js.map +1 -1
- package/lib/module/Input/InputFile.js +28 -11
- package/lib/module/Input/InputFile.js.map +1 -1
- package/lib/module/Input/InputMonth.js +126 -1
- package/lib/module/Input/InputMonth.js.map +1 -1
- package/lib/module/Input/InputOtp.js +6 -1
- package/lib/module/Input/InputOtp.js.map +1 -1
- package/lib/module/Input/InputPassword.js +5 -1
- package/lib/module/Input/InputPassword.js.map +1 -1
- package/lib/module/Input/InputSelect.js +21 -2
- package/lib/module/Input/InputSelect.js.map +1 -1
- package/lib/module/Input/InputYear.js +103 -0
- package/lib/module/Input/InputYear.js.map +1 -0
- package/lib/module/Input/README_INPUT.md +1 -0
- package/lib/module/Input/README_INPUT_DATE.md +18 -0
- package/lib/module/Input/README_INPUT_FILE.md +1 -0
- package/lib/module/Input/README_INPUT_MONTH.md +132 -0
- package/lib/module/Input/README_INPUT_OTP.md +1 -0
- package/lib/module/Input/README_INPUT_SELECT.md +1 -0
- package/lib/module/Input/README_INPUT_YEAR.md +115 -0
- package/lib/module/Input/Switch.js +6 -2
- package/lib/module/Input/Switch.js.map +1 -1
- package/lib/module/Input/TextArea.js +5 -0
- package/lib/module/Input/TextArea.js.map +1 -1
- package/lib/module/Input/partials/InputFile/CardTrigger.js +3 -1
- package/lib/module/Input/partials/InputFile/CardTrigger.js.map +1 -1
- package/lib/module/Input/partials/InputFile/CardTriggerSmall.js +5 -2
- package/lib/module/Input/partials/InputFile/CardTriggerSmall.js.map +1 -1
- package/lib/module/Input/partials/InputFile/ItemPreview.js +6 -1
- package/lib/module/Input/partials/InputFile/ItemPreview.js.map +1 -1
- package/lib/module/Input/partials/PickerField.js +114 -0
- package/lib/module/Input/partials/PickerField.js.map +1 -0
- package/lib/module/Label/Label.js +3 -1
- package/lib/module/Label/Label.js.map +1 -1
- package/lib/module/Label/README.md +1 -0
- package/lib/module/LabelForm/LabelForm.js +3 -1
- package/lib/module/LabelForm/LabelForm.js.map +1 -1
- package/lib/module/List/List.js +3 -1
- package/lib/module/List/List.js.map +1 -1
- package/lib/module/List/ListItem.js +3 -1
- package/lib/module/List/ListItem.js.map +1 -1
- package/lib/module/List/README.md +2 -0
- package/lib/module/Loading/Loading.js +3 -1
- package/lib/module/Loading/Loading.js.map +1 -1
- package/lib/module/Modal/Modal.js +8 -2
- package/lib/module/Modal/Modal.js.map +1 -1
- package/lib/module/Modal/README.md +1 -0
- package/lib/module/Provider/RequiredUpdateAppsProvider.js +10 -1
- package/lib/module/Provider/RequiredUpdateAppsProvider.js.map +1 -1
- package/lib/module/RadioButton/README.md +1 -0
- package/lib/module/RadioButton/RadioButton.js +7 -2
- package/lib/module/RadioButton/RadioButton.js.map +1 -1
- package/lib/module/Select/README.md +1 -0
- package/lib/module/Select/README_Select.md +1 -0
- package/lib/module/Select/Select.js +12 -3
- package/lib/module/Select/Select.js.map +1 -1
- package/lib/module/Skeleton/README.md +1 -0
- package/lib/module/Skeleton/Skeleton.js +3 -1
- package/lib/module/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/Spinner/Spinner.js +3 -1
- package/lib/module/Spinner/Spinner.js.map +1 -1
- package/lib/module/Step/README.md +2 -0
- package/lib/module/Step/Step.js +3 -1
- package/lib/module/Step/Step.js.map +1 -1
- package/lib/module/Step/StepItem.js +4 -1
- package/lib/module/Step/StepItem.js.map +1 -1
- package/lib/module/Tab/README.md +1 -0
- package/lib/module/Tab/Tab.js +6 -1
- package/lib/module/Tab/Tab.js.map +1 -1
- package/lib/module/TextEditor/LinkSheet.js +84 -0
- package/lib/module/TextEditor/LinkSheet.js.map +1 -0
- package/lib/module/TextEditor/README.md +52 -2
- package/lib/module/TextEditor/TextEditor.js +77 -458
- package/lib/module/TextEditor/TextEditor.js.map +1 -1
- package/lib/module/TextEditor/Toolbar.js +71 -0
- package/lib/module/TextEditor/Toolbar.js.map +1 -0
- package/lib/module/TextEditor/editorDocument.js +235 -0
- package/lib/module/TextEditor/editorDocument.js.map +1 -0
- package/lib/module/TextEditor/formatState.js +186 -0
- package/lib/module/TextEditor/formatState.js.map +1 -0
- package/lib/module/TextEditor/toolbarButtons.js +81 -0
- package/lib/module/TextEditor/toolbarButtons.js.map +1 -0
- package/lib/module/TextEditor/types.js +2 -0
- package/lib/module/Timeline/README.md +2 -0
- package/lib/module/Timeline/Timeline.js +3 -1
- package/lib/module/Timeline/Timeline.js.map +1 -1
- package/lib/module/Timeline/TimelineItem.js +3 -1
- package/lib/module/Timeline/TimelineItem.js.map +1 -1
- package/lib/module/Toast/README.md +16 -0
- package/lib/module/Toast/Toast.js +6 -1
- package/lib/module/Toast/Toast.js.map +1 -1
- package/lib/module/Typography/README.md +1 -0
- package/lib/module/Typography/Typography.js +3 -1
- package/lib/module/Typography/Typography.js.map +1 -1
- package/lib/module/Ui/Card.js +4 -1
- package/lib/module/Ui/Card.js.map +1 -1
- package/lib/module/Ui/Center.js +3 -1
- package/lib/module/Ui/Center.js.map +1 -1
- package/lib/module/Ui/Col.js +3 -1
- package/lib/module/Ui/Col.js.map +1 -1
- package/lib/module/Ui/Container.js +3 -1
- package/lib/module/Ui/Container.js.map +1 -1
- package/lib/module/Ui/Devider.js +4 -1
- package/lib/module/Ui/Devider.js.map +1 -1
- package/lib/module/Ui/Footer.js +4 -2
- package/lib/module/Ui/Footer.js.map +1 -1
- package/lib/module/Ui/Gap.js +3 -1
- package/lib/module/Ui/Gap.js.map +1 -1
- package/lib/module/Ui/Grid.js +3 -1
- package/lib/module/Ui/Grid.js.map +1 -1
- package/lib/module/Ui/README_CARD.md +1 -0
- package/lib/module/Ui/README_CONTAINER.md +1 -0
- package/lib/module/Ui/README_DEVIDER.md +5 -0
- package/lib/module/Ui/README_FOOTER.md +9 -0
- package/lib/module/Ui/README_VIEWINSETS.md +1 -0
- package/lib/module/function/README_DATE_FORMATTER.md +35 -0
- package/lib/module/function/dateFormatter.js +29 -0
- package/lib/module/function/dateFormatter.js.map +1 -1
- package/lib/module/helpers/getTestID.js +15 -0
- package/lib/module/helpers/getTestID.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/Accordion/Accordion.d.ts +1 -1
- package/lib/typescript/src/Accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/src/Accordion/AccordionItem.d.ts +1 -1
- package/lib/typescript/src/Accordion/AccordionItem.d.ts.map +1 -1
- package/lib/typescript/src/Accordion/type.d.ts +2 -0
- package/lib/typescript/src/Accordion/type.d.ts.map +1 -1
- package/lib/typescript/src/Alert/Alert.d.ts +1 -0
- package/lib/typescript/src/Alert/Alert.d.ts.map +1 -1
- package/lib/typescript/src/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/Avatar/AvatarGroup.d.ts.map +1 -1
- package/lib/typescript/src/Avatar/type.d.ts +2 -0
- package/lib/typescript/src/Avatar/type.d.ts.map +1 -1
- package/lib/typescript/src/Badge/Badge.d.ts +1 -0
- package/lib/typescript/src/Badge/Badge.d.ts.map +1 -1
- package/lib/typescript/src/BadgeIcon/BadgeIcon.d.ts +1 -0
- package/lib/typescript/src/BadgeIcon/BadgeIcon.d.ts.map +1 -1
- package/lib/typescript/src/BottomSheet/BottomSheet.d.ts +1 -1
- package/lib/typescript/src/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/BottomSheet/type.d.ts +1 -0
- package/lib/typescript/src/BottomSheet/type.d.ts.map +1 -1
- package/lib/typescript/src/Button/Button.d.ts.map +1 -1
- package/lib/typescript/src/Button/type.d.ts +1 -0
- package/lib/typescript/src/Button/type.d.ts.map +1 -1
- package/lib/typescript/src/Calendar/Calendar.d.ts +1 -1
- package/lib/typescript/src/Calendar/Calendar.d.ts.map +1 -1
- package/lib/typescript/src/Calendar/CalendarPropsType.d.ts +6 -0
- package/lib/typescript/src/Calendar/CalendarPropsType.d.ts.map +1 -1
- package/lib/typescript/src/CheckBox/CheckBox.d.ts +1 -0
- package/lib/typescript/src/CheckBox/CheckBox.d.ts.map +1 -1
- package/lib/typescript/src/CheckBox/CheckBoxList.d.ts +1 -0
- package/lib/typescript/src/CheckBox/CheckBoxList.d.ts.map +1 -1
- package/lib/typescript/src/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/src/Chip/ChipItem.d.ts +1 -1
- package/lib/typescript/src/Chip/ChipItem.d.ts.map +1 -1
- package/lib/typescript/src/Chip/type.d.ts +2 -0
- package/lib/typescript/src/Chip/type.d.ts.map +1 -1
- package/lib/typescript/src/CounterButton/CounterButton.d.ts +1 -1
- package/lib/typescript/src/CounterButton/CounterButton.d.ts.map +1 -1
- package/lib/typescript/src/CounterButton/type.d.ts +1 -0
- package/lib/typescript/src/CounterButton/type.d.ts.map +1 -1
- package/lib/typescript/src/DatePicker/DatePicker.d.ts +2 -1
- package/lib/typescript/src/DatePicker/DatePicker.d.ts.map +1 -1
- package/lib/typescript/src/DatePicker/MonthPicker.d.ts +11 -1
- package/lib/typescript/src/DatePicker/MonthPicker.d.ts.map +1 -1
- package/lib/typescript/src/DatePicker/TimePicker.d.ts +2 -1
- package/lib/typescript/src/DatePicker/TimePicker.d.ts.map +1 -1
- package/lib/typescript/src/DatePicker/YearPicker.d.ts +14 -1
- package/lib/typescript/src/DatePicker/YearPicker.d.ts.map +1 -1
- package/lib/typescript/src/Drawing/Drawing.d.ts +2 -1
- package/lib/typescript/src/Drawing/Drawing.d.ts.map +1 -1
- package/lib/typescript/src/DropDown/DropDown.d.ts +1 -1
- package/lib/typescript/src/DropDown/DropDown.d.ts.map +1 -1
- package/lib/typescript/src/DropDown/type.d.ts +1 -0
- package/lib/typescript/src/DropDown/type.d.ts.map +1 -1
- package/lib/typescript/src/FileView/PdfView.d.ts +2 -1
- package/lib/typescript/src/FileView/PdfView.d.ts.map +1 -1
- package/lib/typescript/src/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/src/Icon/type.d.ts +1 -0
- package/lib/typescript/src/Icon/type.d.ts.map +1 -1
- package/lib/typescript/src/Input/Input.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputDate.d.ts +6 -2
- package/lib/typescript/src/Input/InputDate.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputFile.d.ts +1 -1
- package/lib/typescript/src/Input/InputFile.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputMonth.d.ts +29 -1
- package/lib/typescript/src/Input/InputMonth.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputOtp.d.ts +1 -0
- package/lib/typescript/src/Input/InputOtp.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputPassword.d.ts +2 -1
- package/lib/typescript/src/Input/InputPassword.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputSelect.d.ts +4 -2
- package/lib/typescript/src/Input/InputSelect.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputYear.d.ts +34 -0
- package/lib/typescript/src/Input/InputYear.d.ts.map +1 -0
- package/lib/typescript/src/Input/Switch.d.ts +2 -1
- package/lib/typescript/src/Input/Switch.d.ts.map +1 -1
- package/lib/typescript/src/Input/TextArea.d.ts +1 -1
- package/lib/typescript/src/Input/TextArea.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTrigger.d.ts +2 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTrigger.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTriggerSmall.d.ts +2 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTriggerSmall.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/InputFile/ItemPreview.d.ts +2 -1
- package/lib/typescript/src/Input/partials/InputFile/ItemPreview.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/PickerField.d.ts +25 -0
- package/lib/typescript/src/Input/partials/PickerField.d.ts.map +1 -0
- package/lib/typescript/src/Input/type.d.ts +13 -0
- package/lib/typescript/src/Input/type.d.ts.map +1 -1
- package/lib/typescript/src/Label/Label.d.ts +2 -1
- package/lib/typescript/src/Label/Label.d.ts.map +1 -1
- package/lib/typescript/src/LabelForm/LabelForm.d.ts +2 -1
- package/lib/typescript/src/LabelForm/LabelForm.d.ts.map +1 -1
- package/lib/typescript/src/List/List.d.ts +1 -1
- package/lib/typescript/src/List/List.d.ts.map +1 -1
- package/lib/typescript/src/List/ListItem.d.ts +1 -1
- package/lib/typescript/src/List/ListItem.d.ts.map +1 -1
- package/lib/typescript/src/List/type.d.ts +2 -0
- package/lib/typescript/src/List/type.d.ts.map +1 -1
- package/lib/typescript/src/Loading/Loading.d.ts +1 -0
- package/lib/typescript/src/Loading/Loading.d.ts.map +1 -1
- package/lib/typescript/src/Modal/Modal.d.ts +1 -0
- package/lib/typescript/src/Modal/Modal.d.ts.map +1 -1
- package/lib/typescript/src/Provider/RequiredUpdateAppsProvider.d.ts.map +1 -1
- package/lib/typescript/src/RadioButton/RadioButton.d.ts +1 -0
- package/lib/typescript/src/RadioButton/RadioButton.d.ts.map +1 -1
- package/lib/typescript/src/Select/Select.d.ts +1 -1
- package/lib/typescript/src/Select/Select.d.ts.map +1 -1
- package/lib/typescript/src/Select/type.d.ts +1 -0
- package/lib/typescript/src/Select/type.d.ts.map +1 -1
- package/lib/typescript/src/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/src/Skeleton/type.d.ts +1 -0
- package/lib/typescript/src/Skeleton/type.d.ts.map +1 -1
- package/lib/typescript/src/Spinner/Spinner.d.ts +7 -4
- package/lib/typescript/src/Spinner/Spinner.d.ts.map +1 -1
- package/lib/typescript/src/Step/Step.d.ts +1 -1
- package/lib/typescript/src/Step/Step.d.ts.map +1 -1
- package/lib/typescript/src/Step/StepItem.d.ts +1 -1
- package/lib/typescript/src/Step/StepItem.d.ts.map +1 -1
- package/lib/typescript/src/Step/type.d.ts +2 -0
- package/lib/typescript/src/Step/type.d.ts.map +1 -1
- package/lib/typescript/src/Tab/Tab.d.ts.map +1 -1
- package/lib/typescript/src/Tab/type.d.ts +1 -0
- package/lib/typescript/src/Tab/type.d.ts.map +1 -1
- package/lib/typescript/src/TextEditor/LinkSheet.d.ts +26 -0
- package/lib/typescript/src/TextEditor/LinkSheet.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/TextEditor.d.ts +2 -19
- package/lib/typescript/src/TextEditor/TextEditor.d.ts.map +1 -1
- package/lib/typescript/src/TextEditor/Toolbar.d.ts +16 -0
- package/lib/typescript/src/TextEditor/Toolbar.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/editorDocument.d.ts +20 -0
- package/lib/typescript/src/TextEditor/editorDocument.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/formatState.d.ts +34 -0
- package/lib/typescript/src/TextEditor/formatState.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/toolbarButtons.d.ts +5 -0
- package/lib/typescript/src/TextEditor/toolbarButtons.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/types.d.ts +42 -0
- package/lib/typescript/src/TextEditor/types.d.ts.map +1 -1
- package/lib/typescript/src/Timeline/Timeline.d.ts +2 -1
- package/lib/typescript/src/Timeline/Timeline.d.ts.map +1 -1
- package/lib/typescript/src/Timeline/TimelineItem.d.ts +2 -1
- package/lib/typescript/src/Timeline/TimelineItem.d.ts.map +1 -1
- package/lib/typescript/src/Toast/Toast.d.ts +2 -1
- package/lib/typescript/src/Toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/Typography/Typography.d.ts.map +1 -1
- package/lib/typescript/src/Typography/type.d.ts +1 -0
- package/lib/typescript/src/Typography/type.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Card.d.ts +2 -1
- package/lib/typescript/src/Ui/Card.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Center.d.ts +2 -1
- package/lib/typescript/src/Ui/Center.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Col.d.ts +1 -0
- package/lib/typescript/src/Ui/Col.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Container.d.ts +2 -1
- package/lib/typescript/src/Ui/Container.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Devider.d.ts +3 -1
- package/lib/typescript/src/Ui/Devider.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Footer.d.ts +1 -0
- package/lib/typescript/src/Ui/Footer.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Gap.d.ts +2 -1
- package/lib/typescript/src/Ui/Gap.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Grid.d.ts +1 -0
- package/lib/typescript/src/Ui/Grid.d.ts.map +1 -1
- package/lib/typescript/src/function/dateFormatter.d.ts +11 -0
- package/lib/typescript/src/function/dateFormatter.d.ts.map +1 -1
- package/lib/typescript/src/helpers/getTestID.d.ts +10 -0
- package/lib/typescript/src/helpers/getTestID.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +16 -3
- package/src/Accordion/Accordion.tsx +6 -1
- package/src/Accordion/AccordionItem.tsx +2 -1
- package/src/Accordion/README.md +2 -0
- package/src/Accordion/type.tsx +2 -0
- package/src/Alert/Alert.tsx +3 -0
- package/src/Alert/README.md +1 -0
- package/src/Avatar/Avatar.tsx +2 -0
- package/src/Avatar/AvatarGroup.tsx +2 -1
- package/src/Avatar/README_AVATAR.md +1 -0
- package/src/Avatar/README_AVATARGROUP.md +1 -0
- package/src/Avatar/type.tsx +2 -0
- package/src/Badge/Badge.tsx +4 -0
- package/src/Badge/README.md +1 -0
- package/src/BadgeIcon/BadgeIcon.tsx +3 -0
- package/src/BadgeIcon/README.md +1 -0
- package/src/BottomSheet/BottomSheet.tsx +20 -13
- package/src/BottomSheet/README.md +1 -0
- package/src/BottomSheet/type.tsx +1 -0
- package/src/Button/Button.tsx +2 -0
- package/src/Button/README.md +1 -0
- package/src/Button/type.tsx +1 -0
- package/src/Calendar/Calendar.tsx +8 -1
- package/src/Calendar/CalendarPropsType.tsx +6 -0
- package/src/Calendar/README.md +2 -0
- package/src/CheckBox/CheckBox.tsx +13 -2
- package/src/CheckBox/CheckBoxList.tsx +7 -1
- package/src/CheckBox/README_CHECKBOX.md +1 -0
- package/src/CheckBox/README_CHECKBOXLIST.md +1 -0
- package/src/Chip/Chip.tsx +18 -5
- package/src/Chip/ChipItem.tsx +2 -0
- package/src/Chip/README.md +26 -2
- package/src/Chip/README_CHIP_ITEM.md +1 -0
- package/src/Chip/type.tsx +2 -0
- package/src/CounterButton/CounterButton.tsx +5 -0
- package/src/CounterButton/README.md +1 -0
- package/src/CounterButton/type.tsx +1 -0
- package/src/DatePicker/DatePicker.tsx +21 -5
- package/src/DatePicker/MonthPicker.tsx +40 -1
- package/src/DatePicker/README_DATEPICKER.md +1 -0
- package/src/DatePicker/README_MONTHPICKER.md +2 -0
- package/src/DatePicker/README_TIMEPICKER.md +1 -0
- package/src/DatePicker/README_YEARPICKER.md +2 -0
- package/src/DatePicker/TimePicker.tsx +8 -0
- package/src/DatePicker/YearPicker.tsx +59 -4
- package/src/Drawing/Drawing.tsx +3 -1
- package/src/Drawing/README.md +1 -0
- package/src/DropDown/DropDown.tsx +12 -1
- package/src/DropDown/README.md +1 -0
- package/src/DropDown/type.tsx +1 -0
- package/src/FileView/PDF_VIEW_README.md +11 -0
- package/src/FileView/PdfView.tsx +4 -3
- package/src/Icon/Icon.tsx +10 -2
- package/src/Icon/README.md +1 -0
- package/src/Icon/type.tsx +1 -0
- package/src/Input/Input.tsx +17 -2
- package/src/Input/InputDate.tsx +40 -15
- package/src/Input/InputFile.tsx +27 -14
- package/src/Input/InputMonth.tsx +170 -1
- package/src/Input/InputOtp.tsx +12 -2
- package/src/Input/InputPassword.tsx +6 -1
- package/src/Input/InputSelect.tsx +30 -13
- package/src/Input/InputYear.tsx +134 -0
- package/src/Input/README_INPUT.md +1 -0
- package/src/Input/README_INPUT_DATE.md +18 -0
- package/src/Input/README_INPUT_FILE.md +1 -0
- package/src/Input/README_INPUT_MONTH.md +132 -0
- package/src/Input/README_INPUT_OTP.md +1 -0
- package/src/Input/README_INPUT_SELECT.md +1 -0
- package/src/Input/README_INPUT_YEAR.md +115 -0
- package/src/Input/Switch.tsx +7 -1
- package/src/Input/TextArea.tsx +15 -2
- package/src/Input/partials/InputFile/CardTrigger.tsx +3 -0
- package/src/Input/partials/InputFile/CardTriggerSmall.tsx +4 -1
- package/src/Input/partials/InputFile/ItemPreview.tsx +12 -2
- package/src/Input/partials/PickerField.tsx +125 -0
- package/src/Input/type.tsx +14 -0
- package/src/Label/Label.tsx +3 -0
- package/src/Label/README.md +1 -0
- package/src/LabelForm/LabelForm.tsx +3 -1
- package/src/List/List.tsx +2 -2
- package/src/List/ListItem.tsx +2 -0
- package/src/List/README.md +2 -0
- package/src/List/type.tsx +2 -0
- package/src/Loading/Loading.tsx +3 -1
- package/src/Modal/Modal.tsx +15 -3
- package/src/Modal/README.md +1 -0
- package/src/Provider/RequiredUpdateAppsProvider.tsx +10 -1
- package/src/RadioButton/README.md +1 -0
- package/src/RadioButton/RadioButton.tsx +12 -2
- package/src/Select/README.md +1 -0
- package/src/Select/README_Select.md +1 -0
- package/src/Select/Select.tsx +13 -3
- package/src/Select/type.tsx +1 -0
- package/src/Skeleton/README.md +1 -0
- package/src/Skeleton/Skeleton.tsx +2 -0
- package/src/Skeleton/type.ts +1 -0
- package/src/Spinner/Spinner.tsx +15 -2
- package/src/Step/README.md +2 -0
- package/src/Step/Step.tsx +2 -2
- package/src/Step/StepItem.tsx +7 -2
- package/src/Step/type.tsx +2 -0
- package/src/Tab/README.md +1 -0
- package/src/Tab/Tab.tsx +12 -2
- package/src/Tab/type.tsx +1 -0
- package/src/TextEditor/LinkSheet.tsx +100 -0
- package/src/TextEditor/README.md +52 -2
- package/src/TextEditor/TextEditor.tsx +92 -500
- package/src/TextEditor/Toolbar.tsx +104 -0
- package/src/TextEditor/editorDocument.ts +246 -0
- package/src/TextEditor/formatState.ts +186 -0
- package/src/TextEditor/toolbarButtons.ts +41 -0
- package/src/TextEditor/types.tsx +63 -0
- package/src/Timeline/README.md +2 -0
- package/src/Timeline/Timeline.tsx +7 -2
- package/src/Timeline/TimelineItem.tsx +3 -1
- package/src/Toast/README.md +16 -0
- package/src/Toast/Toast.tsx +13 -2
- package/src/Typography/README.md +1 -0
- package/src/Typography/Typography.tsx +6 -1
- package/src/Typography/type.tsx +1 -0
- package/src/Ui/Card.tsx +4 -0
- package/src/Ui/Center.tsx +7 -2
- package/src/Ui/Col.tsx +7 -2
- package/src/Ui/Container.tsx +7 -2
- package/src/Ui/Devider.tsx +2 -2
- package/src/Ui/Footer.tsx +6 -3
- package/src/Ui/Gap.tsx +8 -2
- package/src/Ui/Grid.tsx +3 -2
- package/src/Ui/README_CARD.md +1 -0
- package/src/Ui/README_CONTAINER.md +1 -0
- package/src/Ui/README_DEVIDER.md +5 -0
- package/src/Ui/README_FOOTER.md +9 -0
- package/src/Ui/README_VIEWINSETS.md +1 -0
- package/src/function/README_DATE_FORMATTER.md +35 -0
- package/src/function/dateFormatter.ts +40 -0
- package/src/helpers/getTestID.ts +15 -0
- package/src/index.tsx +6 -0
- package/lib/module/Button/tests/Button.test.js +0 -70
- package/lib/module/Button/tests/Button.test.js.map +0 -1
- package/lib/typescript/src/Button/tests/Button.test.d.ts +0 -2
- package/lib/typescript/src/Button/tests/Button.test.d.ts.map +0 -1
- package/src/Button/tests/Button.test.tsx +0 -49
|
@@ -19,12 +19,14 @@ interface TimelineItemProps {
|
|
|
19
19
|
children: React.ReactNode;
|
|
20
20
|
color?: ColorKey;
|
|
21
21
|
isLast?: boolean;
|
|
22
|
+
testID?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export default function TimelineItem({
|
|
25
26
|
children,
|
|
26
27
|
color = 'primary',
|
|
27
28
|
isLast = false,
|
|
29
|
+
testID,
|
|
28
30
|
}: TimelineItemProps) {
|
|
29
31
|
const [contentHeight, setContentHeight] = useState(0);
|
|
30
32
|
const renderDashes = (count: number) => {
|
|
@@ -34,7 +36,7 @@ export default function TimelineItem({
|
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
return (
|
|
37
|
-
<View style={styles.container}>
|
|
39
|
+
<View testID={testID} style={styles.container}>
|
|
38
40
|
<View style={styles.contentLeft}>
|
|
39
41
|
<Icon name="RadioButton" color={COLOR_MAP[color]} />
|
|
40
42
|
<View>
|
package/src/Toast/README.md
CHANGED
|
@@ -62,6 +62,22 @@ Menyediakan context global toast. Harus membungkus komponen root Anda.
|
|
|
62
62
|
| `duration` | `number` (ms) | `3000` | Waktu tampil Toast sebelum hilang. |
|
|
63
63
|
| `children` | `React.ReactNode` | `-` | Konten opsional yang bisa diisi dengan Semua komponen di dalam aplikasi |
|
|
64
64
|
|
|
65
|
+
### 🧪 Automation Testing (testID)
|
|
66
|
+
|
|
67
|
+
Komponen `Toast` (yang di-export langsung dari package) mendukung prop `testID` untuk kebutuhan automation testing (Maestro/Detox/Appium):
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
import { Toast } from '@herca/rn-kit';
|
|
71
|
+
|
|
72
|
+
<Toast testID="save-toast" visible message="Data berhasil disimpan" />
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
| Prop | Type | Description |
|
|
76
|
+
| -------- | -------- | ------------------------------------------------------------------------------------------------ |
|
|
77
|
+
| `testID` | `string` | ID untuk automation testing. Diterapkan ke root Toast; menurunkan `-message` dan `-clear`. |
|
|
78
|
+
|
|
79
|
+
> ⚠️ **Catatan:** `testID` saat ini **belum** diteruskan lewat `ToastOptions` pada `useToast().show()` (API imperatif via `ToastProvider`). Jika automation testing untuk Toast dibutuhkan, render komponen `Toast` secara langsung seperti contoh di atas.
|
|
80
|
+
|
|
65
81
|
### 🎨 ToastColor (Available Values)
|
|
66
82
|
|
|
67
83
|
| Value | Keterangan |
|
package/src/Toast/Toast.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { Animated, Pressable, StyleSheet, View } from 'react-native';
|
|
|
3
3
|
import Color from '../Color/Color';
|
|
4
4
|
import Typography from '../Typography/Typography';
|
|
5
5
|
import Icon, { type IconNameProps } from '../Icon';
|
|
6
|
+
import { getTestID } from '../helpers/getTestID';
|
|
6
7
|
|
|
7
8
|
type ToastColor =
|
|
8
9
|
| 'default'
|
|
@@ -73,6 +74,7 @@ interface ToastProps {
|
|
|
73
74
|
onClear?: (val: boolean) => void;
|
|
74
75
|
onHide?: (val: boolean) => void;
|
|
75
76
|
children?: React.ReactNode;
|
|
77
|
+
testID?: string;
|
|
76
78
|
}
|
|
77
79
|
const Toast = ({
|
|
78
80
|
visible,
|
|
@@ -83,6 +85,7 @@ const Toast = ({
|
|
|
83
85
|
icon = 'ExclamationMark',
|
|
84
86
|
onClear,
|
|
85
87
|
children,
|
|
88
|
+
testID,
|
|
86
89
|
}: ToastProps) => {
|
|
87
90
|
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
88
91
|
const validColors: ToastColor[] = [
|
|
@@ -130,19 +133,27 @@ const Toast = ({
|
|
|
130
133
|
|
|
131
134
|
return (
|
|
132
135
|
<Animated.View
|
|
136
|
+
testID={testID}
|
|
133
137
|
style={[styles.toast, baseContainerStyle, { opacity: fadeAnim }]}
|
|
134
138
|
>
|
|
135
139
|
<View style={styles.wrapper}>
|
|
136
140
|
<View style={styles.container}>
|
|
137
141
|
<View style={styles.content}>
|
|
138
142
|
<Icon name={icon} size={20} color={COLOR_MAP[safeColor].text} />
|
|
139
|
-
<Typography
|
|
143
|
+
<Typography
|
|
144
|
+
testID={getTestID(testID, 'message')}
|
|
145
|
+
variant="t2"
|
|
146
|
+
color={COLOR_MAP[safeColor].text}
|
|
147
|
+
>
|
|
140
148
|
{message}
|
|
141
149
|
</Typography>
|
|
142
150
|
</View>
|
|
143
151
|
<View style={styles.actionWrapper}>
|
|
144
152
|
{children}
|
|
145
|
-
<Pressable
|
|
153
|
+
<Pressable
|
|
154
|
+
testID={getTestID(testID, 'clear')}
|
|
155
|
+
onPress={handlePressClearButton}
|
|
156
|
+
>
|
|
146
157
|
<Icon name="Times" size={10} color={COLOR_MAP[safeColor].text} />
|
|
147
158
|
</Pressable>
|
|
148
159
|
</View>
|
package/src/Typography/README.md
CHANGED
|
@@ -23,6 +23,7 @@ Komponen `Typography` digunakan untuk menampilkan teks dengan berbagai ukuran, k
|
|
|
23
23
|
| `center` | `boolean` | `false` | Mengatur teks ke tengah |
|
|
24
24
|
| `right` | `boolean` | `false` | Mengatur teks ke kanan |
|
|
25
25
|
| `left` | `boolean` | `false` | Mengatur teks ke kiri |
|
|
26
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
26
27
|
|
|
27
28
|
## 🔠 Varian & Ukuran
|
|
28
29
|
|
|
@@ -18,6 +18,7 @@ const Typography: React.FC<TypographyProps> = ({
|
|
|
18
18
|
center,
|
|
19
19
|
right,
|
|
20
20
|
left,
|
|
21
|
+
testID,
|
|
21
22
|
}) => {
|
|
22
23
|
const textStyle: TextStyle = {
|
|
23
24
|
fontSize: fontSizeMap[variant],
|
|
@@ -28,7 +29,11 @@ const Typography: React.FC<TypographyProps> = ({
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
return (
|
|
31
|
-
<Text
|
|
32
|
+
<Text
|
|
33
|
+
testID={testID}
|
|
34
|
+
style={[styles.text, textStyle, style]}
|
|
35
|
+
numberOfLines={numberOfLines}
|
|
36
|
+
>
|
|
32
37
|
{children}
|
|
33
38
|
</Text>
|
|
34
39
|
);
|
package/src/Typography/type.tsx
CHANGED
package/src/Ui/Card.tsx
CHANGED
|
@@ -14,6 +14,7 @@ interface CardProps {
|
|
|
14
14
|
backgroundImage?: any;
|
|
15
15
|
backgroundColor?: string;
|
|
16
16
|
borderColor?: string;
|
|
17
|
+
testID?: string;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export default function Card({
|
|
@@ -22,10 +23,12 @@ export default function Card({
|
|
|
22
23
|
backgroundImage,
|
|
23
24
|
backgroundColor,
|
|
24
25
|
borderColor = Color.gray['100'],
|
|
26
|
+
testID,
|
|
25
27
|
}: CardProps) {
|
|
26
28
|
if (backgroundImage) {
|
|
27
29
|
return (
|
|
28
30
|
<ImageBackground
|
|
31
|
+
testID={testID}
|
|
29
32
|
source={backgroundImage}
|
|
30
33
|
style={[styles.imageBackground, style, { borderColor: borderColor }]}
|
|
31
34
|
imageStyle={styles.imageStyle}
|
|
@@ -36,6 +39,7 @@ export default function Card({
|
|
|
36
39
|
}
|
|
37
40
|
return (
|
|
38
41
|
<View
|
|
42
|
+
testID={testID}
|
|
39
43
|
style={[
|
|
40
44
|
styles.container,
|
|
41
45
|
style,
|
package/src/Ui/Center.tsx
CHANGED
|
@@ -4,10 +4,15 @@ interface CenterProps {
|
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
size?: number;
|
|
6
6
|
style?: StyleProp<ViewStyle>;
|
|
7
|
+
testID?: string;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
const Center = ({ children, style }: CenterProps) => {
|
|
10
|
-
return
|
|
10
|
+
const Center = ({ children, style, testID }: CenterProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<View testID={testID} style={[styles.center, style]}>
|
|
13
|
+
{children}
|
|
14
|
+
</View>
|
|
15
|
+
);
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
const styles = StyleSheet.create({
|
package/src/Ui/Col.tsx
CHANGED
|
@@ -6,12 +6,17 @@ interface ColProps {
|
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
size?: number;
|
|
8
8
|
style?: ViewStyle;
|
|
9
|
+
testID?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
const Col: React.FC<ColProps> = ({ children, size = 12, style }) => {
|
|
12
|
+
const Col: React.FC<ColProps> = ({ children, size = 12, style, testID }) => {
|
|
12
13
|
const widthPercent = (size / 12) * 100;
|
|
13
14
|
|
|
14
|
-
return
|
|
15
|
+
return (
|
|
16
|
+
<View testID={testID} style={[{ width: `${widthPercent}%` }, style]}>
|
|
17
|
+
{children}
|
|
18
|
+
</View>
|
|
19
|
+
);
|
|
15
20
|
};
|
|
16
21
|
|
|
17
22
|
export default Col;
|
package/src/Ui/Container.tsx
CHANGED
|
@@ -3,10 +3,15 @@ import { StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
style?: StyleProp<ViewStyle>;
|
|
6
|
+
testID?: string;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
export default function Container({ children, style }: Props) {
|
|
9
|
-
return
|
|
9
|
+
export default function Container({ children, style, testID }: Props) {
|
|
10
|
+
return (
|
|
11
|
+
<View testID={testID} style={[styles.container, style]}>
|
|
12
|
+
{children}
|
|
13
|
+
</View>
|
|
14
|
+
);
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
const styles = StyleSheet.create({
|
package/src/Ui/Devider.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { View, StyleSheet } from 'react-native';
|
|
2
2
|
import Color from '../Color/Color';
|
|
3
3
|
|
|
4
|
-
const Divider = () => {
|
|
5
|
-
return <View style={styles.divider} />;
|
|
4
|
+
const Divider = ({ testID }: { testID?: string } = {}) => {
|
|
5
|
+
return <View testID={testID} style={styles.divider} />;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const styles = StyleSheet.create({
|
package/src/Ui/Footer.tsx
CHANGED
|
@@ -13,16 +13,19 @@ import { useOptionalFocusEffect } from '../hooks/useOptionalFocusEffect';
|
|
|
13
13
|
interface FooterProps {
|
|
14
14
|
children: React.ReactNode;
|
|
15
15
|
style?: StyleProp<ViewStyle>;
|
|
16
|
+
testID?: string;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
const Footer: React.FC<FooterProps> = ({ children, style }) => {
|
|
19
|
+
const Footer: React.FC<FooterProps> = ({ children, style, testID }) => {
|
|
19
20
|
const { setFooter } = useFooter();
|
|
20
21
|
|
|
21
22
|
const footerElement = useMemo(
|
|
22
23
|
() => (
|
|
23
|
-
<SafeAreaView style={[styles.container, style]}>
|
|
24
|
+
<SafeAreaView testID={testID} style={[styles.container, style]}>
|
|
25
|
+
{children}
|
|
26
|
+
</SafeAreaView>
|
|
24
27
|
),
|
|
25
|
-
[children, style]
|
|
28
|
+
[children, style, testID]
|
|
26
29
|
);
|
|
27
30
|
|
|
28
31
|
useOptionalFocusEffect(() => {
|
package/src/Ui/Gap.tsx
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
const Gap = ({
|
|
5
|
-
|
|
4
|
+
const Gap = ({
|
|
5
|
+
children,
|
|
6
|
+
testID,
|
|
7
|
+
}: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
testID?: string;
|
|
10
|
+
}) => {
|
|
11
|
+
return <View testID={testID}>{children}</View>;
|
|
6
12
|
};
|
|
7
13
|
|
|
8
14
|
export default Gap;
|
package/src/Ui/Grid.tsx
CHANGED
|
@@ -5,13 +5,14 @@ import type { ViewStyle } from 'react-native';
|
|
|
5
5
|
interface GridProps {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
style: ViewStyle;
|
|
8
|
+
testID?: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const Grid: React.FC<GridProps> = ({ children, style }) => {
|
|
11
|
+
const Grid: React.FC<GridProps> = ({ children, style, testID }) => {
|
|
11
12
|
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
|
-
<View style={[styles.row, style]}>
|
|
15
|
+
<View testID={testID} style={[styles.row, style]}>
|
|
15
16
|
{childrenArray.map((child, index) => (
|
|
16
17
|
<View key={index} style={styles.children}>
|
|
17
18
|
{child}
|
package/src/Ui/README_CARD.md
CHANGED
|
@@ -89,6 +89,7 @@ export default function CardScreen() {
|
|
|
89
89
|
| `backgroundImage` | `ImageSourcePropType` (`any`) | ❌ | - | Gambar latar belakang menggunakan `ImageBackground`. |
|
|
90
90
|
| `backgroundColor` | `string` | ❌ | `#fff` | Warna latar belakang Card. |
|
|
91
91
|
| `borderColor` | `string` | ❌ | `#F2F2F2` | Warna border. |
|
|
92
|
+
| `testID` | `string` | ❌ | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
92
93
|
|
|
93
94
|
## Catatan
|
|
94
95
|
- Saat backgroundImage digunakan, ImageBackground akan membungkus children dan otomatis mengikuti styling dari Card.
|
|
@@ -24,3 +24,4 @@ export default function HomeScreen() {
|
|
|
24
24
|
| ---------- | ---------------------- | ----- | ------- | ------------------------------------------------------------ |
|
|
25
25
|
| `children` | `ReactNode` | ✅ | - | Komponen atau tampilan yang dibungkus di dalam container. |
|
|
26
26
|
| `style` | `StyleProp<ViewStyle>` | ❌ | - | Tambahan gaya jika ingin menimpa atau menambah gaya default. |
|
|
27
|
+
| `testID` | `string` | ❌ | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
package/src/Ui/README_DEVIDER.md
CHANGED
|
@@ -60,3 +60,8 @@ import Divider from '@/components/Divider/Divider';
|
|
|
60
60
|
}
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
## Props
|
|
64
|
+
|
|
65
|
+
| Props | Tipe | Wajib | Default | Deskripsi |
|
|
66
|
+
| -------- | -------- | ----- | ------- | ---------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `testID` | `string` | ❌ | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
package/src/Ui/README_FOOTER.md
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
## Props
|
|
4
|
+
|
|
5
|
+
| Props | Tipe | Wajib | Default | Deskripsi |
|
|
6
|
+
| ---------- | ---------------------- | ----- | ------- | ---------------------------------------------------------------------------------------------- |
|
|
7
|
+
| `children` | `ReactNode` | ✅ | - | Konten footer yang dititipkan ke slot footer milik `Provider`. |
|
|
8
|
+
| `style` | `StyleProp<ViewStyle>` | ❌ | - | Gaya tambahan untuk container footer. |
|
|
9
|
+
| `testID` | `string` | ❌ | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan ke `SafeAreaView` footer, tanpa suffix. |
|
|
@@ -47,6 +47,7 @@ function MyScreen() {
|
|
|
47
47
|
| `useRight` | `boolean` | `false` | Menambahkan padding right sesuai safe area inset kanan |
|
|
48
48
|
| `style` | `StyleProp<ViewStyle>` | `undefined` | Style tambahan untuk container |
|
|
49
49
|
| `...rest` | `ViewProps` | - | Props lainnya akan diteruskan ke komponen View |
|
|
50
|
+
| `testID` | `string` | `undefined` | ID untuk automation testing (Maestro/Detox/Appium), diteruskan lewat `...rest` |
|
|
50
51
|
|
|
51
52
|
## Contoh Penggunaan
|
|
52
53
|
|
|
@@ -32,6 +32,7 @@ dateFormatter({ date, options }: DateFormatterProps): string
|
|
|
32
32
|
| `monthFormat` | `'numeric' \| '2-digit' \| 'long' \| 'short' \| 'narrow'` | `'long'` | Format tampilan bulan (hanya untuk format localized) |
|
|
33
33
|
| `language` | `'en' \| 'id'` | `'en'` | Bahasa untuk format localized |
|
|
34
34
|
| `format` | `'default' \| 'iso' \| 'localized'` | `'default'` | Tipe format output |
|
|
35
|
+
| `pattern` | `string` | - | Pola token, mis. `'DD/MM/YYYY HH:mm'`. Menang atas `format`. |
|
|
35
36
|
|
|
36
37
|
## Format Types
|
|
37
38
|
|
|
@@ -88,6 +89,40 @@ dateFormatter({
|
|
|
88
89
|
// Output: "15 March 2024"
|
|
89
90
|
```
|
|
90
91
|
|
|
92
|
+
|
|
93
|
+
### 4. Pattern (custom)
|
|
94
|
+
|
|
95
|
+
Isi `pattern` kalau ingin susunan bebas. Kalau diisi, ia menang atas `format`.
|
|
96
|
+
|
|
97
|
+
| Token | Contoh | Token | Contoh |
|
|
98
|
+
| ------ | --------- | ------ | ------ |
|
|
99
|
+
| `YYYY` | `2024` | `DD` | `05` |
|
|
100
|
+
| `YY` | `24` | `D` | `5` |
|
|
101
|
+
| `MMMM` | `Januari` | `dddd` | `Jumat`|
|
|
102
|
+
| `MMM` | `Jan` | `HH` | `09` |
|
|
103
|
+
| `MM` | `01` | `mm` | `30` |
|
|
104
|
+
| `M` | `1` | `ss` | `05` |
|
|
105
|
+
|
|
106
|
+
Nama bulan dan hari mengikuti `language`.
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
dateFormatter({ date, options: { pattern: 'MM YYYY' } });
|
|
110
|
+
// "01 2024"
|
|
111
|
+
|
|
112
|
+
dateFormatter({ date, options: { pattern: 'MMMM YYYY' } });
|
|
113
|
+
// "Januari 2024"
|
|
114
|
+
|
|
115
|
+
dateFormatter({ date, options: { pattern: 'DD/MM/YYYY HH:mm' } });
|
|
116
|
+
// "05/01/2024 09:30"
|
|
117
|
+
|
|
118
|
+
dateFormatter({ date, options: { pattern: 'dddd, DD MMMM YYYY', language: 'en' } });
|
|
119
|
+
// "Friday, 05 January 2024"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Teks selain token disalin apa adanya, dan tidak ada sintaks escape — hindari
|
|
123
|
+
teks literal yang mengandung token persis seperti di tabel.
|
|
124
|
+
|
|
125
|
+
|
|
91
126
|
## Contoh Penggunaan
|
|
92
127
|
|
|
93
128
|
### Basic Usage
|
|
@@ -8,6 +8,17 @@ interface DateFormatterProps {
|
|
|
8
8
|
monthFormat?: Intl.DateTimeFormatOptions['month'];
|
|
9
9
|
language?: 'en' | 'id';
|
|
10
10
|
format?: 'default' | 'iso' | 'localized';
|
|
11
|
+
/**
|
|
12
|
+
* Token pattern, e.g. 'DD/MM/YYYY HH:mm' or 'MMMM YYYY'.
|
|
13
|
+
* Wins over `format` when set. Month and weekday names follow `language`.
|
|
14
|
+
*
|
|
15
|
+
* YYYY 2024 | YY 24 | MMMM Januari | MMM Jan | MM 01 | M 1
|
|
16
|
+
* DD 05 | D 5 | dddd Jumat | HH 09 | mm 30 | ss 05
|
|
17
|
+
*
|
|
18
|
+
* Anything that is not a token is copied through as-is. There is no
|
|
19
|
+
* escape syntax, so avoid literal text containing these exact tokens.
|
|
20
|
+
*/
|
|
21
|
+
pattern?: string;
|
|
11
22
|
};
|
|
12
23
|
}
|
|
13
24
|
|
|
@@ -24,6 +35,35 @@ export const dateFormatter = ({ date, options }: DateFormatterProps) => {
|
|
|
24
35
|
const minutes = String(dateObj.getMinutes()).padStart(2, '0');
|
|
25
36
|
const seconds = String(dateObj.getSeconds()).padStart(2, '0');
|
|
26
37
|
|
|
38
|
+
if (options?.pattern) {
|
|
39
|
+
const locale = options?.language !== 'en' ? 'id-ID' : 'en-GB';
|
|
40
|
+
const named = (opts: Intl.DateTimeFormatOptions) =>
|
|
41
|
+
new Intl.DateTimeFormat(locale, opts).format(dateObj);
|
|
42
|
+
|
|
43
|
+
const tokens: Record<string, string> = {
|
|
44
|
+
YYYY: String(year),
|
|
45
|
+
YY: String(year).slice(-2),
|
|
46
|
+
MMMM: named({ month: 'long' }),
|
|
47
|
+
MMM: named({ month: 'short' }),
|
|
48
|
+
MM: month,
|
|
49
|
+
M: String(dateObj.getMonth() + 1),
|
|
50
|
+
DD: day,
|
|
51
|
+
D: String(dateObj.getDate()),
|
|
52
|
+
dddd: named({ weekday: 'long' }),
|
|
53
|
+
HH: hours,
|
|
54
|
+
mm: minutes,
|
|
55
|
+
ss: seconds,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// One pass, longest token first: a sequential replace would go on to chew
|
|
59
|
+
// its own output (MMMM -> 'Januari' still contains 'a', 'n', 'M'-less but
|
|
60
|
+
// MM -> '01' inside a longer run would misfire the same way).
|
|
61
|
+
return options.pattern.replace(
|
|
62
|
+
/dddd|YYYY|MMMM|MMM|YY|MM|DD|HH|mm|ss|M|D/g,
|
|
63
|
+
(token) => tokens[token] ?? token
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
27
67
|
if (options?.format === 'iso') {
|
|
28
68
|
return `${year}-${month}-${day}${options?.useTime ? ` ${hours}:${minutes}:${seconds}` : ''}`;
|
|
29
69
|
} else if (options?.format === 'localized') {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive a stable testID for a sub-element from a single base testID.
|
|
3
|
+
* Returns undefined when base is falsy so no empty testID is rendered.
|
|
4
|
+
*
|
|
5
|
+
* @example getTestID('email', 'input') // 'email-input'
|
|
6
|
+
* @example getTestID('email') // 'email'
|
|
7
|
+
* @example getTestID(undefined, 'x') // undefined
|
|
8
|
+
*/
|
|
9
|
+
export const getTestID = (
|
|
10
|
+
base?: string,
|
|
11
|
+
suffix?: string
|
|
12
|
+
): string | undefined => {
|
|
13
|
+
if (!base) return undefined;
|
|
14
|
+
return suffix ? `${base}-${suffix}` : base;
|
|
15
|
+
};
|
package/src/index.tsx
CHANGED
|
@@ -85,6 +85,7 @@ export { default as TabItem } from './Tab/TabItem';
|
|
|
85
85
|
export { default as Toast } from './Toast/Toast';
|
|
86
86
|
export { default as TextArea } from './Input/TextArea';
|
|
87
87
|
export { default as TextEditor } from './TextEditor/TextEditor';
|
|
88
|
+
export type { TextEditorRef } from './TextEditor/TextEditor';
|
|
88
89
|
// export { default as PdfView } from './FileView/PdfView';
|
|
89
90
|
export { ToastProvider, useToast } from './Toast/ToastContext';
|
|
90
91
|
export { default as Skeleton } from './Skeleton/Skeleton';
|
|
@@ -95,6 +96,11 @@ export { default as PdfView } from './FileView/PdfView';
|
|
|
95
96
|
export { default as InputSelect } from './Input/InputSelect';
|
|
96
97
|
export type { ChipValue } from './Chip/type';
|
|
97
98
|
export { default as InputDate } from './Input/InputDate';
|
|
99
|
+
export { default as InputMonth } from './Input/InputMonth';
|
|
100
|
+
export type { InputMonthProps } from './Input/InputMonth';
|
|
101
|
+
export { default as InputYear } from './Input/InputYear';
|
|
102
|
+
export type { InputYearProps } from './Input/InputYear';
|
|
103
|
+
export type { PickerFieldValue } from './Input/type';
|
|
98
104
|
export { dateFormatter } from './function/dateFormatter';
|
|
99
105
|
export { default as ViewInsets } from './Ui/ViewInsets';
|
|
100
106
|
export { default as Spinner } from './Spinner/Spinner';
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { render, fireEvent } from '@testing-library/react-native';
|
|
5
|
-
import { Text } from 'react-native';
|
|
6
|
-
import Button from "../Button.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
describe('Button Component', () => {
|
|
9
|
-
it('renders with title', () => {
|
|
10
|
-
const {
|
|
11
|
-
getByText
|
|
12
|
-
} = render(/*#__PURE__*/_jsx(Button, {
|
|
13
|
-
title: "Submit",
|
|
14
|
-
onPress: () => {}
|
|
15
|
-
}));
|
|
16
|
-
expect(getByText('Submit')).toBeTruthy();
|
|
17
|
-
});
|
|
18
|
-
it('calls onPress when pressed', () => {
|
|
19
|
-
const mockFn = jest.fn();
|
|
20
|
-
const {
|
|
21
|
-
getByText
|
|
22
|
-
} = render(/*#__PURE__*/_jsx(Button, {
|
|
23
|
-
title: "Click me",
|
|
24
|
-
onPress: mockFn
|
|
25
|
-
}));
|
|
26
|
-
fireEvent.press(getByText('Click me'));
|
|
27
|
-
expect(mockFn).toHaveBeenCalledTimes(1);
|
|
28
|
-
});
|
|
29
|
-
it('does not call onPress when disabled', () => {
|
|
30
|
-
const mockFn = jest.fn();
|
|
31
|
-
const {
|
|
32
|
-
getByText
|
|
33
|
-
} = render(/*#__PURE__*/_jsx(Button, {
|
|
34
|
-
title: "Disabled",
|
|
35
|
-
onPress: mockFn,
|
|
36
|
-
disabled: true
|
|
37
|
-
}));
|
|
38
|
-
fireEvent.press(getByText('Disabled'));
|
|
39
|
-
expect(mockFn).not.toHaveBeenCalled();
|
|
40
|
-
});
|
|
41
|
-
it('renders loading indicator when loading', () => {
|
|
42
|
-
const {
|
|
43
|
-
getByTestId
|
|
44
|
-
} = render(/*#__PURE__*/_jsx(Button, {
|
|
45
|
-
title: "Load",
|
|
46
|
-
onPress: () => {},
|
|
47
|
-
loading: true
|
|
48
|
-
}));
|
|
49
|
-
// You might want to set `testID="loading-indicator"` in <ActivityIndicator /> in the component
|
|
50
|
-
// For now, we check for presence of ActivityIndicator via accessibilityRole
|
|
51
|
-
const indicator = getByTestId('ActivityIndicator');
|
|
52
|
-
expect(indicator).toBeTruthy();
|
|
53
|
-
});
|
|
54
|
-
it('renders custom child instead of title', () => {
|
|
55
|
-
const {
|
|
56
|
-
queryByText,
|
|
57
|
-
getByText
|
|
58
|
-
} = render(/*#__PURE__*/_jsx(Button, {
|
|
59
|
-
onPress: () => {},
|
|
60
|
-
children: /*#__PURE__*/_jsx(React.Fragment, {
|
|
61
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
62
|
-
children: "Custom Child"
|
|
63
|
-
})
|
|
64
|
-
})
|
|
65
|
-
}));
|
|
66
|
-
expect(getByText('Custom Child')).toBeTruthy();
|
|
67
|
-
expect(queryByText('title')).toBeNull();
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=Button.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","render","fireEvent","Text","Button","jsx","_jsx","describe","it","getByText","title","onPress","expect","toBeTruthy","mockFn","jest","fn","press","toHaveBeenCalledTimes","disabled","not","toHaveBeenCalled","getByTestId","loading","indicator","queryByText","children","Fragment","toBeNull"],"sourceRoot":"../../../../src","sources":["Button/tests/Button.test.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,SAAS,QAAQ,+BAA+B;AACjE,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,MAAM,MAAM,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/BC,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCC,EAAE,CAAC,oBAAoB,EAAE,MAAM;IAC7B,MAAM;MAAEC;IAAU,CAAC,GAAGR,MAAM,cAACK,IAAA,CAACF,MAAM;MAACM,KAAK,EAAC,QAAQ;MAACC,OAAO,EAAEA,CAAA,KAAM,CAAC;IAAE,CAAE,CAAC,CAAC;IAC1EC,MAAM,CAACH,SAAS,CAAC,QAAQ,CAAC,CAAC,CAACI,UAAU,CAAC,CAAC;EAC1C,CAAC,CAAC;EAEFL,EAAE,CAAC,4BAA4B,EAAE,MAAM;IACrC,MAAMM,MAAM,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;IACxB,MAAM;MAAEP;IAAU,CAAC,GAAGR,MAAM,cAACK,IAAA,CAACF,MAAM;MAACM,KAAK,EAAC,UAAU;MAACC,OAAO,EAAEG;IAAO,CAAE,CAAC,CAAC;IAC1EZ,SAAS,CAACe,KAAK,CAACR,SAAS,CAAC,UAAU,CAAC,CAAC;IACtCG,MAAM,CAACE,MAAM,CAAC,CAACI,qBAAqB,CAAC,CAAC,CAAC;EACzC,CAAC,CAAC;EAEFV,EAAE,CAAC,qCAAqC,EAAE,MAAM;IAC9C,MAAMM,MAAM,GAAGC,IAAI,CAACC,EAAE,CAAC,CAAC;IACxB,MAAM;MAAEP;IAAU,CAAC,GAAGR,MAAM,cAC1BK,IAAA,CAACF,MAAM;MAACM,KAAK,EAAC,UAAU;MAACC,OAAO,EAAEG,MAAO;MAACK,QAAQ;IAAA,CAAE,CACtD,CAAC;IACDjB,SAAS,CAACe,KAAK,CAACR,SAAS,CAAC,UAAU,CAAC,CAAC;IACtCG,MAAM,CAACE,MAAM,CAAC,CAACM,GAAG,CAACC,gBAAgB,CAAC,CAAC;EACvC,CAAC,CAAC;EAEFb,EAAE,CAAC,wCAAwC,EAAE,MAAM;IACjD,MAAM;MAAEc;IAAY,CAAC,GAAGrB,MAAM,cAC5BK,IAAA,CAACF,MAAM;MAACM,KAAK,EAAC,MAAM;MAACC,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAE;MAACY,OAAO;IAAA,CAAE,CACnD,CAAC;IACD;IACA;IACA,MAAMC,SAAS,GAAGF,WAAW,CAAC,mBAAmB,CAAC;IAClDV,MAAM,CAACY,SAAS,CAAC,CAACX,UAAU,CAAC,CAAC;EAChC,CAAC,CAAC;EAEFL,EAAE,CAAC,uCAAuC,EAAE,MAAM;IAChD,MAAM;MAAEiB,WAAW;MAAEhB;IAAU,CAAC,GAAGR,MAAM,cACvCK,IAAA,CAACF,MAAM;MAACO,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAE;MAAAe,QAAA,eACxBpB,IAAA,CAACN,KAAK,CAAC2B,QAAQ;QAAAD,QAAA,eACbpB,IAAA,CAACH,IAAI;UAAAuB,QAAA,EAAC;QAAY,CAAM;MAAC,CACX;IAAC,CACX,CACV,CAAC;IACDd,MAAM,CAACH,SAAS,CAAC,cAAc,CAAC,CAAC,CAACI,UAAU,CAAC,CAAC;IAC9CD,MAAM,CAACa,WAAW,CAAC,OAAO,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EACzC,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.test.d.ts","sourceRoot":"","sources":["../../../../../src/Button/tests/Button.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, fireEvent } from '@testing-library/react-native';
|
|
3
|
-
import { Text } from 'react-native';
|
|
4
|
-
import Button from '../Button';
|
|
5
|
-
|
|
6
|
-
describe('Button Component', () => {
|
|
7
|
-
it('renders with title', () => {
|
|
8
|
-
const { getByText } = render(<Button title="Submit" onPress={() => {}} />);
|
|
9
|
-
expect(getByText('Submit')).toBeTruthy();
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('calls onPress when pressed', () => {
|
|
13
|
-
const mockFn = jest.fn();
|
|
14
|
-
const { getByText } = render(<Button title="Click me" onPress={mockFn} />);
|
|
15
|
-
fireEvent.press(getByText('Click me'));
|
|
16
|
-
expect(mockFn).toHaveBeenCalledTimes(1);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('does not call onPress when disabled', () => {
|
|
20
|
-
const mockFn = jest.fn();
|
|
21
|
-
const { getByText } = render(
|
|
22
|
-
<Button title="Disabled" onPress={mockFn} disabled />
|
|
23
|
-
);
|
|
24
|
-
fireEvent.press(getByText('Disabled'));
|
|
25
|
-
expect(mockFn).not.toHaveBeenCalled();
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('renders loading indicator when loading', () => {
|
|
29
|
-
const { getByTestId } = render(
|
|
30
|
-
<Button title="Load" onPress={() => {}} loading />
|
|
31
|
-
);
|
|
32
|
-
// You might want to set `testID="loading-indicator"` in <ActivityIndicator /> in the component
|
|
33
|
-
// For now, we check for presence of ActivityIndicator via accessibilityRole
|
|
34
|
-
const indicator = getByTestId('ActivityIndicator');
|
|
35
|
-
expect(indicator).toBeTruthy();
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
it('renders custom child instead of title', () => {
|
|
39
|
-
const { queryByText, getByText } = render(
|
|
40
|
-
<Button onPress={() => {}}>
|
|
41
|
-
<React.Fragment>
|
|
42
|
-
<Text>Custom Child</Text>
|
|
43
|
-
</React.Fragment>
|
|
44
|
-
</Button>
|
|
45
|
-
);
|
|
46
|
-
expect(getByText('Custom Child')).toBeTruthy();
|
|
47
|
-
expect(queryByText('title')).toBeNull();
|
|
48
|
-
});
|
|
49
|
-
});
|