@herca/rn-kit 0.1.112 → 0.1.114
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 +7 -1
- 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 +1 -0
- package/lib/module/DatePicker/README_TIMEPICKER.md +1 -0
- package/lib/module/DatePicker/README_YEARPICKER.md +1 -0
- package/lib/module/DatePicker/TimePicker.js +8 -1
- package/lib/module/DatePicker/TimePicker.js.map +1 -1
- package/lib/module/DatePicker/YearPicker.js +13 -4
- 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 +19 -3
- package/lib/module/Icon/Icon.js.map +1 -1
- package/lib/module/Icon/README.md +1 -0
- package/lib/module/Icon/icons/FileListStar.js +22 -0
- package/lib/module/Icon/icons/FileListStar.js.map +1 -0
- package/lib/module/Icon/icons/TextFill.js +22 -0
- package/lib/module/Icon/icons/TextFill.js.map +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 +111 -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 +94 -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/Typography/type.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 +2 -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 +5 -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/icons/FileListStar.d.ts +9 -0
- package/lib/typescript/src/Icon/icons/FileListStar.d.ts.map +1 -0
- package/lib/typescript/src/Icon/icons/TextFill.d.ts +9 -0
- package/lib/typescript/src/Icon/icons/TextFill.d.ts.map +1 -0
- package/lib/typescript/src/Icon/type.d.ts +2 -1
- 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 +19 -6
- 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 +7 -0
- package/src/DatePicker/README_DATEPICKER.md +1 -0
- package/src/DatePicker/README_MONTHPICKER.md +1 -0
- package/src/DatePicker/README_TIMEPICKER.md +1 -0
- package/src/DatePicker/README_YEARPICKER.md +1 -0
- package/src/DatePicker/TimePicker.tsx +8 -0
- package/src/DatePicker/YearPicker.tsx +16 -3
- 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 +14 -2
- package/src/Icon/README.md +1 -0
- package/src/Icon/icons/FileListStar.tsx +23 -0
- package/src/Icon/icons/TextFill.tsx +19 -0
- package/src/Icon/type.tsx +3 -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 +152 -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 +125 -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 +2 -10
- 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
package/src/Chip/Chip.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect, useMemo } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useMemo, useRef } from 'react';
|
|
2
2
|
import { Dimensions, FlatList, StyleSheet } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
type ChipOptionProps,
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type ChipValue,
|
|
8
8
|
} from './type';
|
|
9
9
|
import ChipItem from './ChipItem';
|
|
10
|
+
import { getTestID } from '../helpers/getTestID';
|
|
10
11
|
|
|
11
12
|
const Chip: React.FC<ChipProps> = ({
|
|
12
13
|
options,
|
|
@@ -25,6 +26,7 @@ const Chip: React.FC<ChipProps> = ({
|
|
|
25
26
|
onEndReached,
|
|
26
27
|
footer,
|
|
27
28
|
header,
|
|
29
|
+
testID,
|
|
28
30
|
}) => {
|
|
29
31
|
const isHorizontal = direction === 'horizontal';
|
|
30
32
|
const [chipItemWidth, setChipItemWidth] = useState(0);
|
|
@@ -40,12 +42,22 @@ const Chip: React.FC<ChipProps> = ({
|
|
|
40
42
|
normalizeSelected(selected)
|
|
41
43
|
);
|
|
42
44
|
|
|
45
|
+
// Sync only when the `selected` prop's own value changes, tracked against a
|
|
46
|
+
// ref rather than against internalSelected. Comparing to internalSelected
|
|
47
|
+
// made this effect watch the state it writes: every internal pick differed
|
|
48
|
+
// from the prop and was immediately reverted, so an uncontrolled Chip could
|
|
49
|
+
// never hold — or show — a selection. The ref is needed because `selected`
|
|
50
|
+
// defaults to a fresh [] each render, which would otherwise retrigger the
|
|
51
|
+
// reset on every pass.
|
|
52
|
+
const lastSelectedProp = useRef(JSON.stringify(normalizeSelected(selected)));
|
|
53
|
+
|
|
43
54
|
useEffect(() => {
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
|
|
55
|
+
const serialized = JSON.stringify(normalizeSelected(selected));
|
|
56
|
+
if (serialized !== lastSelectedProp.current) {
|
|
57
|
+
lastSelectedProp.current = serialized;
|
|
58
|
+
setInternalSelected(normalizeSelected(selected));
|
|
47
59
|
}
|
|
48
|
-
}, [selected
|
|
60
|
+
}, [selected]);
|
|
49
61
|
|
|
50
62
|
const isSelected = (value: ChipValue) => internalSelected.includes(value);
|
|
51
63
|
|
|
@@ -89,6 +101,7 @@ const Chip: React.FC<ChipProps> = ({
|
|
|
89
101
|
renderItem={({ item }) => (
|
|
90
102
|
<ChipItem
|
|
91
103
|
item={item}
|
|
104
|
+
itemTestID={getTestID(testID, `option-${item.value}`)}
|
|
92
105
|
isSelected={() => isSelected(item.value)}
|
|
93
106
|
color={color}
|
|
94
107
|
block={block}
|
package/src/Chip/ChipItem.tsx
CHANGED
|
@@ -13,6 +13,7 @@ export default function ChipItem({
|
|
|
13
13
|
isHorizontal,
|
|
14
14
|
onPress,
|
|
15
15
|
onLayout,
|
|
16
|
+
itemTestID,
|
|
16
17
|
}: ChipItem) {
|
|
17
18
|
const validColors: ColorVariantType[] = [
|
|
18
19
|
'default',
|
|
@@ -67,6 +68,7 @@ export default function ChipItem({
|
|
|
67
68
|
return (
|
|
68
69
|
<Pressable
|
|
69
70
|
key={item.value}
|
|
71
|
+
testID={itemTestID}
|
|
70
72
|
style={[
|
|
71
73
|
styles.chip,
|
|
72
74
|
getSizeStyle(),
|
package/src/Chip/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Komponen `Chip` digunakan untuk menampilkan daftar pilihan seperti tag, filter,
|
|
|
11
11
|
| Nama Props | Tipe | Default | Deskripsi |
|
|
12
12
|
|------------------|----------------------------------------------|----------------|--------------------------------------------------------------------------|
|
|
13
13
|
| `options` | `ChipOption[]` | – | Daftar opsi yang akan ditampilkan. Setiap opsi memiliki `label`, `value`, dan opsional `disabled`. |
|
|
14
|
-
| `selected` | `string \| string[] \| null \| undefined` | `[]` | Nilai yang dipilih. Bisa
|
|
14
|
+
| `selected` | `string \| string[] \| null \| undefined` | `[]` | Nilai yang dipilih. Bisa string (single), array (multiple), atau null. Opsional: kalau dilewat, Chip menyimpan pilihannya sendiri (uncontrolled). |
|
|
15
15
|
| `onSelect` | `(value: string \| string[]) => void` | – | Fungsi callback saat chip dipilih. Akan mengembalikan value terpilih. |
|
|
16
16
|
| `multiple` | `boolean` | `false` | Jika `true`, bisa memilih lebih dari satu chip. |
|
|
17
17
|
| `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | Arah layout chip: horizontal (dalam baris) atau vertical (ke bawah). |
|
|
@@ -21,6 +21,7 @@ Komponen `Chip` digunakan untuk menampilkan daftar pilihan seperti tag, filter,
|
|
|
21
21
|
| `renderItem` | `(item, isSelected, isDisabled) => ReactNode`| – | Jika ingin custom tampilan chip secara manual. |
|
|
22
22
|
| `header` | ReactElement| – | Jika ingin chip mempunyai header. |
|
|
23
23
|
| `footer` | ReactElement| – | Jika ingin chip mempunyai footer. |
|
|
24
|
+
| `testID` | `string` | – | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-option-{value}` untuk tiap chip item (Chip sendiri tidak merender testID pada root). |
|
|
24
25
|
|
|
25
26
|
---
|
|
26
27
|
|
|
@@ -89,4 +90,27 @@ interface ChipOption {
|
|
|
89
90
|
- gunakan scrollable = false jika ingin membungkus di ScrollView
|
|
90
91
|
---
|
|
91
92
|
|
|
92
|
-
© 2025 – Komponen Chip by YourTeam
|
|
93
|
+
© 2025 – Komponen Chip by YourTeam
|
|
94
|
+
|
|
95
|
+
## Controlled vs uncontrolled
|
|
96
|
+
|
|
97
|
+
Kirim `selected` kalau state pilihan disimpan di luar. Chip akan mengikuti
|
|
98
|
+
nilai prop itu setiap kali berubah:
|
|
99
|
+
|
|
100
|
+
```jsx
|
|
101
|
+
const [selected, setSelected] = useState(['apple']);
|
|
102
|
+
|
|
103
|
+
<Chip options={options} selected={selected} onSelect={setSelected} multiple />
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Lewati `selected` kalau tidak perlu menyimpannya sendiri. Chip mengurus
|
|
107
|
+
pilihannya secara internal dan `onSelect` cukup dipakai untuk membaca hasil:
|
|
108
|
+
|
|
109
|
+
```jsx
|
|
110
|
+
<Chip options={options} onSelect={(value) => console.log(value)} multiple />
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Jangan mengirim `selected` dengan nilai tetap sambil mengharapkan chip tidak
|
|
114
|
+
pernah menyala — chip tetap menyala dari state internalnya. Untuk chip yang
|
|
115
|
+
murni tampilan, kendalikan `selected` sungguhan dan jangan perbarui di
|
|
116
|
+
`onSelect`.
|
|
@@ -17,6 +17,7 @@ Komponen `ChipItem` merupakan komponen presentasional dalam bentuk "chip" atau "
|
|
|
17
17
|
| `isHorizontal` | `boolean` | `false` | Jika true, maka `block` akan diabaikan agar chip tetap fleksibel secara horizontal |
|
|
18
18
|
| `onPress` | `(disabled: boolean, val: ChipOptionProps) => void` | `undefined` | Callback saat chip ditekan |
|
|
19
19
|
| `onLayout` | `(event: LayoutChangeEvent) => void` | `undefined` | Callback ketika layout chip dihitung oleh React Native |
|
|
20
|
+
| `itemTestID` | `string` | `undefined` | ID untuk automation testing (Maestro/Detox/Appium), diterapkan langsung ke `Pressable` chip tanpa suffix tambahan. Biasanya diisi otomatis oleh `Chip` sebagai `{testID}-option-{value}`. |
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
package/src/Chip/type.tsx
CHANGED
|
@@ -135,6 +135,7 @@ export interface ChipItem {
|
|
|
135
135
|
isHorizontal?: boolean;
|
|
136
136
|
onPress?: (isDisabled: boolean, value: ChipOptionProps) => void;
|
|
137
137
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
138
|
+
itemTestID?: string;
|
|
138
139
|
}
|
|
139
140
|
export interface ChipProps {
|
|
140
141
|
options: ChipOptionProps[];
|
|
@@ -153,4 +154,5 @@ export interface ChipProps {
|
|
|
153
154
|
refreshing?: boolean;
|
|
154
155
|
footer?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
155
156
|
header?: React.ComponentType<any> | React.ReactElement | null | undefined;
|
|
157
|
+
testID?: string;
|
|
156
158
|
}
|
|
@@ -4,6 +4,7 @@ import Color from '../Color/Color';
|
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import type { CounterButtonType } from './type';
|
|
6
6
|
import { fontSizeMap } from '../Typography/type';
|
|
7
|
+
import { getTestID } from '../helpers/getTestID';
|
|
7
8
|
|
|
8
9
|
export default function CounterButton({
|
|
9
10
|
variant = 'default',
|
|
@@ -13,6 +14,7 @@ export default function CounterButton({
|
|
|
13
14
|
max,
|
|
14
15
|
disabledDecrease = false,
|
|
15
16
|
disabledIncrease = false,
|
|
17
|
+
testID,
|
|
16
18
|
}: CounterButtonType) {
|
|
17
19
|
const [count, setCount] = useState<number>(value);
|
|
18
20
|
const [inputValue, setInputValue] = useState<string>(String(value));
|
|
@@ -74,6 +76,7 @@ export default function CounterButton({
|
|
|
74
76
|
]}
|
|
75
77
|
>
|
|
76
78
|
<Pressable
|
|
79
|
+
testID={getTestID(testID, 'decrement')}
|
|
77
80
|
style={[
|
|
78
81
|
variant === 'default' ? styles.buttonDefault : styles.buttonColor,
|
|
79
82
|
isDecreaseDisabled && variant === 'color'
|
|
@@ -99,6 +102,7 @@ export default function CounterButton({
|
|
|
99
102
|
</Pressable>
|
|
100
103
|
|
|
101
104
|
<TextInput
|
|
105
|
+
testID={getTestID(testID, 'input')}
|
|
102
106
|
style={[
|
|
103
107
|
styles.input,
|
|
104
108
|
{ fontSize: fontSizeMap['t3'], color: Color.gray[900] },
|
|
@@ -109,6 +113,7 @@ export default function CounterButton({
|
|
|
109
113
|
/>
|
|
110
114
|
|
|
111
115
|
<Pressable
|
|
116
|
+
testID={getTestID(testID, 'increment')}
|
|
112
117
|
style={[
|
|
113
118
|
variant === 'default' ? styles.buttonDefault : styles.buttonColor,
|
|
114
119
|
isIncreaseDisabled && variant === 'color'
|
|
@@ -24,6 +24,7 @@ Komponen `CounterButton` adalah tombol penghitung sederhana (+ / -) yang digunak
|
|
|
24
24
|
| `variant` | `'default'` \| `'color'` | `'default'` | Menentukan gaya visual: `default` (outline) atau `color` (filled). |
|
|
25
25
|
| `disabledDecrease` | boolean | `'false'` | disabled decrease |
|
|
26
26
|
| `disabledIncrease` | boolean | `'false'` | disabled increase |
|
|
27
|
+
| `testID` | `string` | `undefined` | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-decrement`, `-input`, dan `-increment` untuk tiap elemen. |
|
|
27
28
|
|
|
28
29
|
---
|
|
29
30
|
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
type DateRangeProps,
|
|
12
12
|
} from '../Calendar/CalendarPropsType';
|
|
13
13
|
import Color from '../Color/Color';
|
|
14
|
+
import { getTestID } from '../helpers/getTestID';
|
|
14
15
|
|
|
15
16
|
interface DatePickerProps extends CalendarTypes {
|
|
16
17
|
onChange: (selectedDate: DateRangeProps) => void;
|
|
@@ -26,6 +27,7 @@ interface DatePickerProps extends CalendarTypes {
|
|
|
26
27
|
cancelLabel?: string;
|
|
27
28
|
isCancelButtonDisabled?: boolean;
|
|
28
29
|
isConfirmButtonDisabled?: boolean;
|
|
30
|
+
testID?: string;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export default function DatePicker({
|
|
@@ -42,6 +44,7 @@ export default function DatePicker({
|
|
|
42
44
|
cancelLabel = 'Batalkan',
|
|
43
45
|
isCancelButtonDisabled = false,
|
|
44
46
|
isConfirmButtonDisabled = false,
|
|
47
|
+
testID,
|
|
45
48
|
...calendarProps
|
|
46
49
|
}: DatePickerProps) {
|
|
47
50
|
const [errorValidate, setErrorValidate] = useState<boolean>(false);
|
|
@@ -136,12 +139,14 @@ export default function DatePicker({
|
|
|
136
139
|
return (
|
|
137
140
|
<View>
|
|
138
141
|
<BottomSheet
|
|
142
|
+
testID={getTestID(testID, 'sheet')}
|
|
139
143
|
isOpen={isOpen}
|
|
140
144
|
onClose={onClose}
|
|
141
145
|
footer={
|
|
142
146
|
<View style={styles.footerContainer}>
|
|
143
147
|
<View style={styles.buttonWrapper}>
|
|
144
148
|
<Button
|
|
149
|
+
testID={getTestID(testID, 'cancel')}
|
|
145
150
|
variant="tertiary"
|
|
146
151
|
title={cancelLabel}
|
|
147
152
|
color="primary"
|
|
@@ -151,6 +156,7 @@ export default function DatePicker({
|
|
|
151
156
|
</View>
|
|
152
157
|
<View style={styles.buttonWrapper}>
|
|
153
158
|
<Button
|
|
159
|
+
testID={getTestID(testID, 'confirm')}
|
|
154
160
|
title={confirmLabel}
|
|
155
161
|
color="primary"
|
|
156
162
|
onPress={handleOnPressSubmitButton}
|
|
@@ -166,11 +172,21 @@ export default function DatePicker({
|
|
|
166
172
|
onChange={handleOnChangeCalendar}
|
|
167
173
|
{...calendarProps}
|
|
168
174
|
/>
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
175
|
+
{testID ? (
|
|
176
|
+
<View testID={getTestID(testID, 'error')}>
|
|
177
|
+
<Alert
|
|
178
|
+
color="danger"
|
|
179
|
+
message={hint ? hint : 'Error validation'}
|
|
180
|
+
hide={!errorValidate}
|
|
181
|
+
/>
|
|
182
|
+
</View>
|
|
183
|
+
) : (
|
|
184
|
+
<Alert
|
|
185
|
+
color="danger"
|
|
186
|
+
message={hint ? hint : 'Error validation'}
|
|
187
|
+
hide={!errorValidate}
|
|
188
|
+
/>
|
|
189
|
+
)}
|
|
174
190
|
</BottomSheet>
|
|
175
191
|
</View>
|
|
176
192
|
);
|
|
@@ -5,6 +5,7 @@ import Typography from '../Typography/Typography';
|
|
|
5
5
|
import Button from '../Button/Button';
|
|
6
6
|
import Color from '../Color/Color';
|
|
7
7
|
import { generateMonthOptions } from './helpers';
|
|
8
|
+
import { getTestID } from '../helpers/getTestID';
|
|
8
9
|
|
|
9
10
|
type PickerMode = 'single' | 'range' | 'multiple';
|
|
10
11
|
|
|
@@ -18,6 +19,7 @@ interface MonthPickerProps {
|
|
|
18
19
|
title?: string;
|
|
19
20
|
cancelLabel?: string;
|
|
20
21
|
confirmLabel?: string;
|
|
22
|
+
testID?: string;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export default function MonthPicker({
|
|
@@ -28,6 +30,7 @@ export default function MonthPicker({
|
|
|
28
30
|
cancelLabel = 'Batal',
|
|
29
31
|
confirmLabel = 'pilih',
|
|
30
32
|
title = 'Pilih Bulan',
|
|
33
|
+
testID,
|
|
31
34
|
}: MonthPickerProps) {
|
|
32
35
|
const [rangeValue, setRangeValue] = useState<{
|
|
33
36
|
startDate: number | null;
|
|
@@ -91,12 +94,14 @@ export default function MonthPicker({
|
|
|
91
94
|
|
|
92
95
|
return (
|
|
93
96
|
<BottomSheet
|
|
97
|
+
testID={getTestID(testID, 'sheet')}
|
|
94
98
|
isOpen={isOpen}
|
|
95
99
|
onClose={onClose}
|
|
96
100
|
footer={
|
|
97
101
|
<View style={styles.containerBottomSheetFooter}>
|
|
98
102
|
<View style={styles.flex1}>
|
|
99
103
|
<Button
|
|
104
|
+
testID={getTestID(testID, 'cancel')}
|
|
100
105
|
title={cancelLabel}
|
|
101
106
|
variant="tertiary"
|
|
102
107
|
size="medium"
|
|
@@ -106,6 +111,7 @@ export default function MonthPicker({
|
|
|
106
111
|
</View>
|
|
107
112
|
<View style={styles.flex1}>
|
|
108
113
|
<Button
|
|
114
|
+
testID={getTestID(testID, 'confirm')}
|
|
109
115
|
title={confirmLabel}
|
|
110
116
|
color="primary"
|
|
111
117
|
size="medium"
|
|
@@ -137,6 +143,7 @@ export default function MonthPicker({
|
|
|
137
143
|
return (
|
|
138
144
|
<View style={styles.yearItem}>
|
|
139
145
|
<TouchableOpacity
|
|
146
|
+
testID={getTestID(testID, `option-${item.value}`)}
|
|
140
147
|
onPress={() => handleSelectMonth(item.value)}
|
|
141
148
|
style={[
|
|
142
149
|
styles.option,
|
|
@@ -26,6 +26,7 @@ Komponen ini extend dari Calendar, jadi kalian bisa menggunakan semua props yang
|
|
|
26
26
|
| `isOpen` | `boolean` | Menentukan apakah BottomSheet sedang terbuka |
|
|
27
27
|
| `hasError` | `boolean` | (Opsional) Menandai jika terjadi kesalahan validasi |
|
|
28
28
|
| `value` | DateRangeProps | (Opsional) set default value |
|
|
29
|
+
| `testID` | `string` | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-sheet`, `-cancel`, `-confirm`, dan `-error`. |
|
|
29
30
|
|
|
30
31
|
---
|
|
31
32
|
|
|
@@ -14,6 +14,7 @@ Komponen **MonthPicker** adalah komponen pemilih bulan berbasis **React Native**
|
|
|
14
14
|
| `onClose` | `() => void` | `undefined` | Callback yang dipanggil saat pengguna menekan tombol **Batal** atau menutup **BottomSheet**. |
|
|
15
15
|
| `onChange` | `(value: number[] \| { startDate: number \| null; endDate: number \| null }) => void` | `undefined` | Callback yang dipanggil ketika pengguna menekan tombol **Pilih**. Parameter yang dikirim tergantung pada `mode`. |
|
|
16
16
|
| `mode` | `'single' \| 'range' \| 'multiple'` | `'single'` | Menentukan cara pemilihan bulan. |
|
|
17
|
+
| `testID` | `string` | `undefined` | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-sheet`, `-cancel`, `-confirm`, dan `-option-{value}` untuk tiap bulan. |
|
|
17
18
|
|
|
18
19
|
### Bentuk *value* yang Dikirim oleh `onChange`
|
|
19
20
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| `onClose` | `() => void` | `-` | Callback saat pengguna menutup **BottomSheet** atau menekan tombol **Batal**. |
|
|
13
13
|
| `onChange` | `(value: { hour: number; minute: number }) => void` | `-` | Callback saat pengguna menekan tombol **Pilih**. Objek yang dikirim berisi `hour` & `minute`. |
|
|
14
14
|
| `value` | `{ hour: number; minute: number }` | `{hour: 0, minute: 0}` | Props untuk mengontrol value dari parent |
|
|
15
|
+
| `testID` | `string` | `-` | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-sheet`, `-cancel`, `-confirm`, `-hour`, dan `-minute`. |
|
|
15
16
|
|
|
16
17
|
### Bentuk _value_ `onChange`
|
|
17
18
|
|
|
@@ -18,6 +18,7 @@ Semua outputnya dibungkus dalam komponen **BottomSheet** untuk konsistensi UI.
|
|
|
18
18
|
| `onClose` | `() => void` | `-` | Dipanggil saat pengguna menutup picker atau menekan **Batal**. |
|
|
19
19
|
| `onChange` | `(value: number[] \| { startDate: number \| null; endDate: number \| null }) => void` | `-` | Dipanggil setelah pengguna menekan **Pilih**. Bentuk *value* bergantung pada `mode`. |
|
|
20
20
|
| `mode` | `'single' \| 'range' \| 'multiple'` | `'single'` | Menentukan mode pemilihan. |
|
|
21
|
+
| `testID` | `string` | `-` | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-sheet`, `-cancel`, `-confirm`, dan `-option-{year}` untuk tiap tahun. |
|
|
21
22
|
|
|
22
23
|
### Bentuk *value* `onChange`
|
|
23
24
|
|
|
@@ -13,6 +13,7 @@ import Button from '../Button/Button';
|
|
|
13
13
|
import Color from '../Color/Color';
|
|
14
14
|
import Typography from '../Typography/Typography';
|
|
15
15
|
import AnimatedItem from './partials/AnimatedItem';
|
|
16
|
+
import { getTestID } from '../helpers/getTestID';
|
|
16
17
|
|
|
17
18
|
const ITEM_HEIGHT = 40;
|
|
18
19
|
const SCREEN_WIDTH = Dimensions.get('window').width;
|
|
@@ -29,6 +30,7 @@ interface TimePickerProps {
|
|
|
29
30
|
title?: string;
|
|
30
31
|
confirmLabel?: string;
|
|
31
32
|
cancelLabel?: string;
|
|
33
|
+
testID?: string;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
const generateInfiniteData = (max: number, cycles: number) => {
|
|
@@ -44,6 +46,7 @@ export default function TimePickerWheel({
|
|
|
44
46
|
title = 'Pilih Waktu',
|
|
45
47
|
cancelLabel = 'Batal',
|
|
46
48
|
confirmLabel = 'Pilih',
|
|
49
|
+
testID,
|
|
47
50
|
}: TimePickerProps) {
|
|
48
51
|
const [selectedHour, setSelectedHour] = useState<number>(value?.hour ?? 0);
|
|
49
52
|
const [selectedMinute, setSelectedMinute] = useState<number>(
|
|
@@ -188,12 +191,14 @@ export default function TimePickerWheel({
|
|
|
188
191
|
|
|
189
192
|
return (
|
|
190
193
|
<BottomSheet
|
|
194
|
+
testID={getTestID(testID, 'sheet')}
|
|
191
195
|
isOpen={isOpen}
|
|
192
196
|
onClose={onClose}
|
|
193
197
|
footer={
|
|
194
198
|
<View style={styles.footer}>
|
|
195
199
|
<View style={styles.flex1}>
|
|
196
200
|
<Button
|
|
201
|
+
testID={getTestID(testID, 'cancel')}
|
|
197
202
|
title={cancelLabel}
|
|
198
203
|
variant="tertiary"
|
|
199
204
|
onPress={onClose}
|
|
@@ -203,6 +208,7 @@ export default function TimePickerWheel({
|
|
|
203
208
|
</View>
|
|
204
209
|
<View style={styles.flex1}>
|
|
205
210
|
<Button
|
|
211
|
+
testID={getTestID(testID, 'confirm')}
|
|
206
212
|
title={confirmLabel}
|
|
207
213
|
onPress={handleSubmit}
|
|
208
214
|
color="primary"
|
|
@@ -232,6 +238,7 @@ export default function TimePickerWheel({
|
|
|
232
238
|
{/* Hour Picker */}
|
|
233
239
|
<View style={styles.pickerColumn}>
|
|
234
240
|
<Animated.FlatList
|
|
241
|
+
testID={getTestID(testID, 'hour')}
|
|
235
242
|
ref={hourRef}
|
|
236
243
|
data={hours}
|
|
237
244
|
renderItem={renderHourItem}
|
|
@@ -258,6 +265,7 @@ export default function TimePickerWheel({
|
|
|
258
265
|
{/* Minute Picker */}
|
|
259
266
|
<View style={styles.pickerColumn}>
|
|
260
267
|
<Animated.FlatList
|
|
268
|
+
testID={getTestID(testID, 'minute')}
|
|
261
269
|
ref={minuteRef}
|
|
262
270
|
data={minutes}
|
|
263
271
|
renderItem={renderMinuteItem}
|
|
@@ -5,6 +5,7 @@ import Typography from '../Typography/Typography';
|
|
|
5
5
|
import Button from '../Button/Button';
|
|
6
6
|
import Color from '../Color/Color';
|
|
7
7
|
import Icon from '../Icon';
|
|
8
|
+
import { getTestID } from '../helpers/getTestID';
|
|
8
9
|
|
|
9
10
|
type PickerMode = 'single' | 'range' | 'multiple';
|
|
10
11
|
|
|
@@ -15,6 +16,10 @@ interface YearPickerProps {
|
|
|
15
16
|
value: number[] | { startDate: number | null; endDate: number | null }
|
|
16
17
|
) => void;
|
|
17
18
|
mode?: PickerMode;
|
|
19
|
+
title?: string;
|
|
20
|
+
cancelLabel?: string;
|
|
21
|
+
confirmLabel?: string;
|
|
22
|
+
testID?: string;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
export default function YearPicker({
|
|
@@ -22,6 +27,10 @@ export default function YearPicker({
|
|
|
22
27
|
onClose,
|
|
23
28
|
onChange,
|
|
24
29
|
mode = 'single',
|
|
30
|
+
title = 'Pilih Tahun',
|
|
31
|
+
cancelLabel = 'Batal',
|
|
32
|
+
confirmLabel = 'Pilih',
|
|
33
|
+
testID,
|
|
25
34
|
}: YearPickerProps) {
|
|
26
35
|
const currentYear = new Date().getFullYear();
|
|
27
36
|
const pageSize = 9;
|
|
@@ -103,13 +112,15 @@ export default function YearPicker({
|
|
|
103
112
|
|
|
104
113
|
return (
|
|
105
114
|
<BottomSheet
|
|
115
|
+
testID={getTestID(testID, 'sheet')}
|
|
106
116
|
isOpen={isOpen}
|
|
107
117
|
onClose={onClose}
|
|
108
118
|
footer={
|
|
109
119
|
<View style={styles.containerBottomSheetFooter}>
|
|
110
120
|
<View style={styles.flex1}>
|
|
111
121
|
<Button
|
|
112
|
-
|
|
122
|
+
testID={getTestID(testID, 'cancel')}
|
|
123
|
+
title={cancelLabel}
|
|
113
124
|
variant="tertiary"
|
|
114
125
|
size="medium"
|
|
115
126
|
color="primary"
|
|
@@ -118,7 +129,8 @@ export default function YearPicker({
|
|
|
118
129
|
</View>
|
|
119
130
|
<View style={styles.flex1}>
|
|
120
131
|
<Button
|
|
121
|
-
|
|
132
|
+
testID={getTestID(testID, 'confirm')}
|
|
133
|
+
title={confirmLabel}
|
|
122
134
|
color="primary"
|
|
123
135
|
size="medium"
|
|
124
136
|
onPress={handleSubmit}
|
|
@@ -136,7 +148,7 @@ export default function YearPicker({
|
|
|
136
148
|
<Icon name="ArrowLeft" color={Color.base.white100} size={10} />
|
|
137
149
|
</TouchableOpacity>
|
|
138
150
|
<Typography variant="t1" weight="semibold" color={Color.gray[900]}>
|
|
139
|
-
|
|
151
|
+
{title}
|
|
140
152
|
</Typography>
|
|
141
153
|
<TouchableOpacity
|
|
142
154
|
style={styles.buttonNav}
|
|
@@ -162,6 +174,7 @@ export default function YearPicker({
|
|
|
162
174
|
return (
|
|
163
175
|
<View style={styles.yearItem}>
|
|
164
176
|
<TouchableOpacity
|
|
177
|
+
testID={getTestID(testID, `option-${item}`)}
|
|
165
178
|
onPress={() => handleSelectYear(item)}
|
|
166
179
|
style={[
|
|
167
180
|
styles.option,
|
package/src/Drawing/Drawing.tsx
CHANGED
|
@@ -16,6 +16,7 @@ interface DrawingProps {
|
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
hint?: string;
|
|
18
18
|
hasError?: boolean;
|
|
19
|
+
testID?: string;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
const Drawing = ({
|
|
@@ -26,6 +27,7 @@ const Drawing = ({
|
|
|
26
27
|
disabled,
|
|
27
28
|
hint,
|
|
28
29
|
hasError,
|
|
30
|
+
testID,
|
|
29
31
|
}: DrawingProps) => {
|
|
30
32
|
const ref = useRef<SignatureViewRef | null>(null);
|
|
31
33
|
|
|
@@ -108,7 +110,7 @@ const Drawing = ({
|
|
|
108
110
|
}, [dataURL]);
|
|
109
111
|
|
|
110
112
|
return (
|
|
111
|
-
<View style={styles.container}>
|
|
113
|
+
<View testID={testID} style={styles.container}>
|
|
112
114
|
<View style={styles.drawerContainer}>
|
|
113
115
|
<SignatureCanvas
|
|
114
116
|
key={canvasKey}
|
package/src/Drawing/README.md
CHANGED
|
@@ -56,3 +56,4 @@ export default function SignatureForm() {
|
|
|
56
56
|
| Prop | Tipe | Default | Deskripsi |
|
|
57
57
|
| -------- | -------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
58
58
|
| `onDraw` | `(value?: string \| undefined) ⇒ void` | `undefined` | Callback berisi tanda tangan **base64** saat pengguna menggambar (dipicu otomatis di `onDraw`). |
|
|
59
|
+
| `testID` | `string` | `undefined` | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import Color from '../Color/Color';
|
|
15
15
|
import type { DropDownProps } from './type';
|
|
16
16
|
import type { ChipOptionProps } from '../Chip/type';
|
|
17
|
+
import { getTestID } from '../helpers/getTestID';
|
|
17
18
|
|
|
18
19
|
const Dropdown = ({
|
|
19
20
|
options,
|
|
@@ -23,6 +24,7 @@ const Dropdown = ({
|
|
|
23
24
|
renderItem,
|
|
24
25
|
width,
|
|
25
26
|
value,
|
|
27
|
+
testID,
|
|
26
28
|
}: DropDownProps) => {
|
|
27
29
|
const [isOpen, setIsOpen] = useState(false);
|
|
28
30
|
const [selected, setSelected] = useState<string | number>();
|
|
@@ -67,12 +69,17 @@ const Dropdown = ({
|
|
|
67
69
|
|
|
68
70
|
return (
|
|
69
71
|
<>
|
|
70
|
-
<TouchableOpacity
|
|
72
|
+
<TouchableOpacity
|
|
73
|
+
testID={getTestID(testID, 'trigger')}
|
|
74
|
+
ref={buttonRef}
|
|
75
|
+
onPress={handleToggle}
|
|
76
|
+
>
|
|
71
77
|
{renderButton}
|
|
72
78
|
</TouchableOpacity>
|
|
73
79
|
{isOpen && (
|
|
74
80
|
<Modal transparent animationType="none" visible>
|
|
75
81
|
<Pressable
|
|
82
|
+
testID={getTestID(testID, 'modal')}
|
|
76
83
|
style={StyleSheet.absoluteFillObject}
|
|
77
84
|
onPress={() => setIsOpen(false)}
|
|
78
85
|
/>
|
|
@@ -95,6 +102,10 @@ const Dropdown = ({
|
|
|
95
102
|
{options.map((item, idx) => (
|
|
96
103
|
<TouchableOpacity
|
|
97
104
|
key={idx}
|
|
105
|
+
testID={getTestID(
|
|
106
|
+
testID,
|
|
107
|
+
item.value != null ? `option-${item.value}` : `item-${idx}`
|
|
108
|
+
)}
|
|
98
109
|
onPress={() => handlePressOption(item)}
|
|
99
110
|
style={[
|
|
100
111
|
styles.option,
|
package/src/DropDown/README.md
CHANGED
|
@@ -26,6 +26,7 @@ Serta modul standar React Native: `Modal`, `ScrollView`, dll. Tidak memerlukan l
|
|
|
26
26
|
| `renderItem` | `React.ReactNode` | `undefined` | Elemen yang dipakai sebagai tombol di tiap item yang ada di dalam dropdown |
|
|
27
27
|
| `width` | `number` | `undefined` | Angka yang digunakan untuk mengatur lebar pembungkus list |
|
|
28
28
|
| `value` | `number \| string` | `undefined` | Props yang dapat memungkinkan state selected dari luar |
|
|
29
|
+
| `testID` | `string` | `undefined` | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-trigger`, `-modal`, dan `-option-{value}` (atau `-item-{index}` jika opsi tidak memiliki `value`) untuk tiap opsi. |
|
|
29
30
|
|
|
30
31
|
### Struktur `ChipOptionProps`
|
|
31
32
|
|
package/src/DropDown/type.tsx
CHANGED
|
@@ -13,3 +13,14 @@ npm install react-native-pdf
|
|
|
13
13
|
# atau
|
|
14
14
|
yarn add react-native-pdf
|
|
15
15
|
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Props | Tipe | Wajib | Default | Deskripsi |
|
|
22
|
+
| -------- | --------------------------------- | ----- | ------- | ----------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| `source` | `{ uri, headers, cache, ... }` | ✅ | - | Sumber dokumen PDF. Kalau kosong, komponen merender container placeholder. |
|
|
24
|
+
| `testID` | `string` | ❌ | - | ID untuk automation testing (Maestro/Detox/Appium). Tetap terpasang pada placeholder saat `source` kosong. |
|
|
25
|
+
|
|
26
|
+
Props lain diteruskan apa adanya ke `Pdf` dari `react-native-pdf`.
|
package/src/FileView/PdfView.tsx
CHANGED
|
@@ -14,13 +14,14 @@ type Source = {
|
|
|
14
14
|
|
|
15
15
|
interface Props extends React.ComponentProps<typeof Pdf> {
|
|
16
16
|
source: Source;
|
|
17
|
+
testID?: string;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
const PdfView = ({ source, ...props }: Props) => {
|
|
20
|
-
if (!source) return <View />;
|
|
20
|
+
const PdfView = ({ source, testID, ...props }: Props) => {
|
|
21
|
+
if (!source) return <View testID={testID} />;
|
|
21
22
|
|
|
22
23
|
return (
|
|
23
|
-
<View style={styles.container}>
|
|
24
|
+
<View testID={testID} style={styles.container}>
|
|
24
25
|
<Pdf source={source} style={styles.pdf} {...props} />
|
|
25
26
|
</View>
|
|
26
27
|
);
|