@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
|
@@ -9,6 +9,7 @@ import Card from '../../../Ui/Card';
|
|
|
9
9
|
import Color from '../../../Color/Color';
|
|
10
10
|
import Typography from '../../../Typography/Typography';
|
|
11
11
|
import Icon from '../../../Icon';
|
|
12
|
+
import { getTestID } from '../../../helpers/getTestID';
|
|
12
13
|
import type { FileItem } from '../../type';
|
|
13
14
|
|
|
14
15
|
interface Props {
|
|
@@ -19,6 +20,7 @@ interface Props {
|
|
|
19
20
|
onDelete: (index: number) => void;
|
|
20
21
|
variant?: 'default' | 'small';
|
|
21
22
|
loading?: boolean;
|
|
23
|
+
testID?: string;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export default function ItemPreview({
|
|
@@ -29,12 +31,14 @@ export default function ItemPreview({
|
|
|
29
31
|
onReplace,
|
|
30
32
|
variant = 'default',
|
|
31
33
|
loading = false,
|
|
34
|
+
testID,
|
|
32
35
|
}: Props) {
|
|
33
36
|
const Wrapper = variant === 'default' ? Card : View;
|
|
34
37
|
|
|
35
38
|
return (
|
|
36
39
|
<Wrapper>
|
|
37
40
|
<TouchableOpacity
|
|
41
|
+
testID={testID}
|
|
38
42
|
onPress={onPress}
|
|
39
43
|
style={styles.containerPreview}
|
|
40
44
|
activeOpacity={0.7}
|
|
@@ -125,11 +129,17 @@ export default function ItemPreview({
|
|
|
125
129
|
/>
|
|
126
130
|
)}
|
|
127
131
|
|
|
128
|
-
<TouchableOpacity
|
|
132
|
+
<TouchableOpacity
|
|
133
|
+
testID={getTestID(testID, 'replace')}
|
|
134
|
+
onPress={() => onReplace(index)}
|
|
135
|
+
>
|
|
129
136
|
<Icon name="rotate-right" size={18} color={Color.gray[700]} />
|
|
130
137
|
</TouchableOpacity>
|
|
131
138
|
|
|
132
|
-
<TouchableOpacity
|
|
139
|
+
<TouchableOpacity
|
|
140
|
+
testID={getTestID(testID, 'delete')}
|
|
141
|
+
onPress={() => onDelete(index)}
|
|
142
|
+
>
|
|
133
143
|
<Icon name="Times" size={12} color={Color.gray[700]} />
|
|
134
144
|
</TouchableOpacity>
|
|
135
145
|
</View>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { Pressable, StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
2
|
+
import Color from '../../Color/Color';
|
|
3
|
+
import Icon from '../../Icon/Icon';
|
|
4
|
+
import Typography from '../../Typography/Typography';
|
|
5
|
+
import { getTestID } from '../../helpers/getTestID';
|
|
6
|
+
import { layouting } from '../../styles/layouting';
|
|
7
|
+
import { spacing } from '../../styles/spacing';
|
|
8
|
+
|
|
9
|
+
interface PickerFieldProps {
|
|
10
|
+
/** Omitted entirely when absent -- no empty element is left behind. */
|
|
11
|
+
label?: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
placeholderEnd?: string;
|
|
14
|
+
mode?: 'single' | 'range';
|
|
15
|
+
/** Already formatted for display; the field does no formatting itself. */
|
|
16
|
+
display?: string | null;
|
|
17
|
+
displayEnd?: string | null;
|
|
18
|
+
hasClear?: boolean;
|
|
19
|
+
onPress: () => void;
|
|
20
|
+
onClear?: () => void;
|
|
21
|
+
testID?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The read-only trigger a picker-backed field sits behind: a label, one or two
|
|
26
|
+
* pressable slots, and an optional clear button.
|
|
27
|
+
*
|
|
28
|
+
* Shared by InputMonth and InputYear so the two cannot drift apart visually,
|
|
29
|
+
* and so neither has to restate InputDate's markup. It holds no state and does
|
|
30
|
+
* no formatting -- callers pass strings that are ready to show.
|
|
31
|
+
*/
|
|
32
|
+
export default function PickerField({
|
|
33
|
+
label,
|
|
34
|
+
placeholder,
|
|
35
|
+
placeholderEnd,
|
|
36
|
+
mode = 'single',
|
|
37
|
+
display,
|
|
38
|
+
displayEnd,
|
|
39
|
+
hasClear,
|
|
40
|
+
onPress,
|
|
41
|
+
onClear,
|
|
42
|
+
testID,
|
|
43
|
+
}: PickerFieldProps) {
|
|
44
|
+
return (
|
|
45
|
+
<View style={styles.gap4}>
|
|
46
|
+
{label ? (
|
|
47
|
+
<Typography
|
|
48
|
+
testID={getTestID(testID, 'label')}
|
|
49
|
+
variant="t2"
|
|
50
|
+
weight="semibold"
|
|
51
|
+
color={Color.gray[900]}
|
|
52
|
+
>
|
|
53
|
+
{label}
|
|
54
|
+
</Typography>
|
|
55
|
+
) : null}
|
|
56
|
+
|
|
57
|
+
<View style={styles.wrapper}>
|
|
58
|
+
<Pressable
|
|
59
|
+
testID={getTestID(testID, 'trigger')}
|
|
60
|
+
style={[styles.pickerTrigger, !!display && styles.hasValue]}
|
|
61
|
+
onPress={onPress}
|
|
62
|
+
>
|
|
63
|
+
<Typography variant="t2" color={Color.gray[900]} weight="medium">
|
|
64
|
+
{display || placeholder}
|
|
65
|
+
</Typography>
|
|
66
|
+
<View style={[layouting.flex.rowCenter, spacing.gap[8]]}>
|
|
67
|
+
{hasClear && !!display && (
|
|
68
|
+
<TouchableOpacity
|
|
69
|
+
testID={getTestID(testID, 'clear')}
|
|
70
|
+
style={styles.clear}
|
|
71
|
+
onPress={onClear}
|
|
72
|
+
>
|
|
73
|
+
<Icon name="times-new" size={14} color="white" />
|
|
74
|
+
</TouchableOpacity>
|
|
75
|
+
)}
|
|
76
|
+
<Icon name="ArrowDown" size={14} color={Color.gray[700]} />
|
|
77
|
+
</View>
|
|
78
|
+
</Pressable>
|
|
79
|
+
|
|
80
|
+
{mode === 'range' && (
|
|
81
|
+
<Pressable
|
|
82
|
+
testID={getTestID(testID, 'trigger-end')}
|
|
83
|
+
style={[styles.pickerTrigger, !!displayEnd && styles.hasValue]}
|
|
84
|
+
onPress={onPress}
|
|
85
|
+
>
|
|
86
|
+
<Typography variant="t2" color={Color.gray[900]} weight="medium">
|
|
87
|
+
{displayEnd || placeholderEnd}
|
|
88
|
+
</Typography>
|
|
89
|
+
<Icon name="ArrowDown" size={14} color={Color.gray[700]} />
|
|
90
|
+
</Pressable>
|
|
91
|
+
)}
|
|
92
|
+
</View>
|
|
93
|
+
</View>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const styles = StyleSheet.create({
|
|
98
|
+
gap4: {
|
|
99
|
+
gap: 4,
|
|
100
|
+
},
|
|
101
|
+
pickerTrigger: {
|
|
102
|
+
paddingVertical: 10,
|
|
103
|
+
paddingHorizontal: 12,
|
|
104
|
+
borderRadius: 8,
|
|
105
|
+
flexDirection: 'row',
|
|
106
|
+
justifyContent: 'space-between',
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
borderWidth: 1,
|
|
109
|
+
borderColor: Color.gray[200],
|
|
110
|
+
flex: 1,
|
|
111
|
+
},
|
|
112
|
+
hasValue: {
|
|
113
|
+
borderColor: Color.primary[300],
|
|
114
|
+
},
|
|
115
|
+
wrapper: {
|
|
116
|
+
flexDirection: 'row',
|
|
117
|
+
gap: 8,
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
},
|
|
120
|
+
clear: {
|
|
121
|
+
backgroundColor: Color.gray[600],
|
|
122
|
+
borderRadius: 999,
|
|
123
|
+
padding: 3,
|
|
124
|
+
},
|
|
125
|
+
});
|
package/src/Input/type.tsx
CHANGED
|
@@ -90,6 +90,7 @@ export type FileItem = (PickedFile | ImageAsset) & FileItemExtras;
|
|
|
90
90
|
export type DocumentType = (typeof types)[keyof typeof types];
|
|
91
91
|
|
|
92
92
|
export interface BaseInputFileProps {
|
|
93
|
+
testID?: string;
|
|
93
94
|
title?: string;
|
|
94
95
|
accept?: string[] | DocumentType[];
|
|
95
96
|
multiple?: boolean;
|
|
@@ -126,3 +127,16 @@ export type SmallVariantProps = BaseInputFileProps & {
|
|
|
126
127
|
};
|
|
127
128
|
|
|
128
129
|
export type InputFileProps = DefaultVariantProps | SmallVariantProps;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* What a picker-backed field reports back.
|
|
133
|
+
*
|
|
134
|
+
* `value` carries a single selection; `startValue`/`endValue` carry a range.
|
|
135
|
+
* Only one pair is ever populated, decided by the field's `mode`. Shared by
|
|
136
|
+
* InputMonth and InputYear so both read the same on the consumer side.
|
|
137
|
+
*/
|
|
138
|
+
export interface PickerFieldValue {
|
|
139
|
+
value: number | null;
|
|
140
|
+
startValue: number | null;
|
|
141
|
+
endValue: number | null;
|
|
142
|
+
}
|
package/src/Label/Label.tsx
CHANGED
|
@@ -12,6 +12,7 @@ interface LabelProps {
|
|
|
12
12
|
color?: string;
|
|
13
13
|
icon?: IconNameProps;
|
|
14
14
|
size?: 'medium' | 'small';
|
|
15
|
+
testID?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
type LabelColor = ColorVariantType;
|
|
@@ -73,6 +74,7 @@ export default function Label({
|
|
|
73
74
|
icon,
|
|
74
75
|
children,
|
|
75
76
|
color = 'default',
|
|
77
|
+
testID,
|
|
76
78
|
}: LabelProps) {
|
|
77
79
|
const safeColor = validColors.includes(color as LabelColor)
|
|
78
80
|
? (color as LabelColor)
|
|
@@ -81,6 +83,7 @@ export default function Label({
|
|
|
81
83
|
|
|
82
84
|
return (
|
|
83
85
|
<View
|
|
86
|
+
testID={testID}
|
|
84
87
|
style={[styles.container, { backgroundColor: colors.backgroundColor }]}
|
|
85
88
|
>
|
|
86
89
|
{children ? (
|
package/src/Label/README.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| `color` | `'default' \| 'success' \| 'danger' \| 'primary' \| 'warning' \| 'info' \| 'purple' \| 'orange'` | `'default'` | Variasi warna latar dan teks. |
|
|
12
12
|
| `icon` | `IconNameProps` | `undefined` | Menampilkan ikon di sebelah kiri teks. |
|
|
13
13
|
| `size` | `'small' \| 'medium'` | `'medium'` | (Belum digunakan – untuk ekspansi ukuran ke depan.) |
|
|
14
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
14
15
|
|
|
15
16
|
---
|
|
16
17
|
|
|
@@ -6,15 +6,17 @@ interface Props {
|
|
|
6
6
|
title: string;
|
|
7
7
|
required?: boolean;
|
|
8
8
|
color?: string;
|
|
9
|
+
testID?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export default function LabelForm({
|
|
12
13
|
title,
|
|
13
14
|
required,
|
|
14
15
|
color = Color.gray[900],
|
|
16
|
+
testID,
|
|
15
17
|
}: Props) {
|
|
16
18
|
return (
|
|
17
|
-
<View>
|
|
19
|
+
<View testID={testID}>
|
|
18
20
|
<Typography variant="t2" weight="semibold" color={color}>
|
|
19
21
|
{title}{' '}
|
|
20
22
|
{required && (
|
package/src/List/List.tsx
CHANGED
|
@@ -4,13 +4,13 @@ import Color from '../Color/Color';
|
|
|
4
4
|
import Theme from '../Theme/Theme';
|
|
5
5
|
import type { ListItemProps, ListProps } from './type';
|
|
6
6
|
|
|
7
|
-
export default function List({ children, style }: ListProps) {
|
|
7
|
+
export default function List({ children, style, testID }: ListProps) {
|
|
8
8
|
const validChildren = React.Children.toArray(children).filter((child) =>
|
|
9
9
|
React.isValidElement(child)
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
|
-
<View style={[styles.container, style]}>
|
|
13
|
+
<View testID={testID} style={[styles.container, style]}>
|
|
14
14
|
{React.Children.map(validChildren, (child, index) => {
|
|
15
15
|
const isLast = index === validChildren.length - 1;
|
|
16
16
|
return React.isValidElement<ListItemProps>(child)
|
package/src/List/ListItem.tsx
CHANGED
|
@@ -8,11 +8,13 @@ export default function ListItem({
|
|
|
8
8
|
onPress,
|
|
9
9
|
style,
|
|
10
10
|
isLast = false,
|
|
11
|
+
testID,
|
|
11
12
|
}: ListItemProps) {
|
|
12
13
|
const Wrapper = onPress ? TouchableOpacity : View;
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<Wrapper
|
|
17
|
+
testID={testID}
|
|
16
18
|
onPress={onPress}
|
|
17
19
|
style={[styles.container, !isLast && styles.withBorder, style]}
|
|
18
20
|
>
|
package/src/List/README.md
CHANGED
|
@@ -38,6 +38,7 @@ export default function SettingMenu() {
|
|
|
38
38
|
| ---------- | ----------- | ----- | ------- | ------------------------------ |
|
|
39
39
|
| `children` | `ReactNode` | ✅ | — | Satu atau beberapa `ListItem`. |
|
|
40
40
|
| `style` | `ViewStyle` | ❌ | — | Gaya tambahan untuk container. |
|
|
41
|
+
| `testID` | `string` | ❌ | — | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
41
42
|
|
|
42
43
|
### ListItem
|
|
43
44
|
| Prop | Type | Wajib | Default | Deskripsi |
|
|
@@ -47,3 +48,4 @@ export default function SettingMenu() {
|
|
|
47
48
|
| `style` | `StyleProp<ViewStyle>` | ❌ | — | Gaya tambahan untuk baris. |
|
|
48
49
|
| `isLast` | `boolean` | 🚫 | — | Diisi otomatis oleh `List` untuk menghapus border bawah pada baris akhir. |
|
|
49
50
|
| `index` | `number` | 🚫 | — | Tidak digunakan—disediakan untuk extensibility. |
|
|
51
|
+
| `testID` | `string` | ❌ | — | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
package/src/List/type.tsx
CHANGED
package/src/Loading/Loading.tsx
CHANGED
|
@@ -6,6 +6,7 @@ interface LoadingProps {
|
|
|
6
6
|
size?: 'small' | 'large' | number;
|
|
7
7
|
color?: string;
|
|
8
8
|
variant?: 'circle' | 'square';
|
|
9
|
+
testID?: string;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
const Loading: React.FC<LoadingProps> = ({
|
|
@@ -13,9 +14,10 @@ const Loading: React.FC<LoadingProps> = ({
|
|
|
13
14
|
size = 'large',
|
|
14
15
|
color = '#007AFF',
|
|
15
16
|
variant = 'circle',
|
|
17
|
+
testID,
|
|
16
18
|
}) => {
|
|
17
19
|
return (
|
|
18
|
-
<View style={styles.wrapper}>
|
|
20
|
+
<View testID={testID} style={styles.wrapper}>
|
|
19
21
|
<View
|
|
20
22
|
style={[
|
|
21
23
|
styles.container,
|
package/src/Modal/Modal.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Color, Icon } from '@herca/rn-kit';
|
|
2
1
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
3
2
|
import {
|
|
4
3
|
View,
|
|
@@ -11,6 +10,9 @@ import {
|
|
|
11
10
|
Platform,
|
|
12
11
|
type ViewStyle,
|
|
13
12
|
} from 'react-native';
|
|
13
|
+
import Color from '../Color/Color';
|
|
14
|
+
import Icon from '../Icon/Icon';
|
|
15
|
+
import { getTestID } from '../helpers/getTestID';
|
|
14
16
|
|
|
15
17
|
interface ModalPopUpProps {
|
|
16
18
|
isOpen: boolean;
|
|
@@ -24,6 +26,7 @@ interface ModalPopUpProps {
|
|
|
24
26
|
height?: DimensionValue;
|
|
25
27
|
containerStyle?: ViewStyle;
|
|
26
28
|
modalStyle?: ViewStyle;
|
|
29
|
+
testID?: string;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
const ModalPopUp: React.FC<ModalPopUpProps> = ({
|
|
@@ -37,6 +40,7 @@ const ModalPopUp: React.FC<ModalPopUpProps> = ({
|
|
|
37
40
|
width = '90%',
|
|
38
41
|
containerStyle,
|
|
39
42
|
modalStyle,
|
|
43
|
+
testID,
|
|
40
44
|
}) => {
|
|
41
45
|
const [isVisible, setIsVisible] = useState(isOpen ?? false);
|
|
42
46
|
const scaleAnim = useState(() => new Animated.Value(0))[0];
|
|
@@ -98,15 +102,23 @@ const ModalPopUp: React.FC<ModalPopUpProps> = ({
|
|
|
98
102
|
<View style={[styles.modalContainer, containerStyle]}>
|
|
99
103
|
{backdrop && (
|
|
100
104
|
<TouchableOpacity
|
|
105
|
+
testID={getTestID(testID, 'backdrop')}
|
|
101
106
|
style={[styles.backdrop, styles.backdropTouch]}
|
|
102
107
|
activeOpacity={1}
|
|
103
108
|
onPress={handleBackdropPress}
|
|
104
109
|
/>
|
|
105
110
|
)}
|
|
106
|
-
<Animated.View
|
|
111
|
+
<Animated.View
|
|
112
|
+
testID={testID}
|
|
113
|
+
style={[styles.modalContent, modalContentStyle]}
|
|
114
|
+
>
|
|
107
115
|
{closable && (
|
|
108
116
|
<View style={styles.closeButtonContainer}>
|
|
109
|
-
<TouchableOpacity
|
|
117
|
+
<TouchableOpacity
|
|
118
|
+
testID={getTestID(testID, 'close')}
|
|
119
|
+
onPress={userClose}
|
|
120
|
+
style={styles.closeButton}
|
|
121
|
+
>
|
|
110
122
|
<View style={styles.iconButtonClose}>
|
|
111
123
|
<Icon name="Times" size={13} color={Color.gray[900]} />
|
|
112
124
|
</View>
|
package/src/Modal/README.md
CHANGED
|
@@ -37,3 +37,4 @@ export default function ExampleModal() {
|
|
|
37
37
|
| `height` | `DimensionValue` | `undefined` | Tinggi modal (opsional, gunakan scroll jika tidak cukup). |
|
|
38
38
|
| `containerStyle` | `ViewStyle` | `undefined` | Gaya tambahan untuk wrapper container (pusat layar). |
|
|
39
39
|
| `modalStyle` | `ViewStyle` | `undefined` | Gaya tambahan untuk modal box. |
|
|
40
|
+
| `testID` | `string` | `undefined` | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan pada elemen konten modal (tanpa suffix); menurunkan `-backdrop` dan `-close`. |
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { Image, Platform, StyleSheet, View } from 'react-native';
|
|
3
|
-
|
|
3
|
+
// Imported from their own modules rather than the package barrel ('..'):
|
|
4
|
+
// index.tsx re-exports Provider, so going through the barrel here made
|
|
5
|
+
// index -> Provider -> index a cycle and dragged every native-backed export
|
|
6
|
+
// (document picker, blob util, pdf, webview) into anything that renders a
|
|
7
|
+
// Provider. Same modules, no cycle.
|
|
8
|
+
import Button from '../Button/Button';
|
|
9
|
+
import Card from '../Ui/Card';
|
|
10
|
+
import Color from '../Color/Color';
|
|
11
|
+
import Modal from '../Modal/Modal';
|
|
12
|
+
import Typography from '../Typography/Typography';
|
|
4
13
|
import type { RequiredUpdateAppsProviderProps } from './type';
|
|
5
14
|
|
|
6
15
|
export default function RequiredUpdateAppsProvider({
|
|
@@ -18,6 +18,7 @@ import RadioButton from './RadioButton';
|
|
|
18
18
|
| `selectedValue` | `string \| null` | `null` | Nilai yang saat ini dipilih oleh pengguna. |
|
|
19
19
|
| `onChange` | `(value: string) => void` | - | Fungsi callback saat item dipilih. |
|
|
20
20
|
| `direction` | `'vertical' \| 'horizontal'` | `'vertical'`| Arah layout dari item radio: vertikal atau horizontal. |
|
|
21
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-option-{value}` dan `-option-{value}-label` untuk tiap item. |
|
|
21
22
|
|
|
22
23
|
## 📄 Tipe `RadioButtonItem`
|
|
23
24
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { View, StyleSheet, Pressable } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import Typography from '../Typography/Typography';
|
|
4
|
+
import Color from '../Color/Color';
|
|
5
|
+
import { getTestID } from '../helpers/getTestID';
|
|
4
6
|
|
|
5
7
|
interface RadioButtonItem {
|
|
6
8
|
label: string;
|
|
@@ -13,6 +15,7 @@ interface RadioButtonProps {
|
|
|
13
15
|
selectedValue: string | null;
|
|
14
16
|
onChange?: (value: string) => void;
|
|
15
17
|
direction?: 'vertical' | 'horizontal';
|
|
18
|
+
testID?: string;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
const RadioButton: React.FC<RadioButtonProps> = ({
|
|
@@ -20,6 +23,7 @@ const RadioButton: React.FC<RadioButtonProps> = ({
|
|
|
20
23
|
selectedValue,
|
|
21
24
|
onChange,
|
|
22
25
|
direction = 'vertical',
|
|
26
|
+
testID,
|
|
23
27
|
}) => {
|
|
24
28
|
const [internalValue, setInternalValue] = useState<string | null>(
|
|
25
29
|
selectedValue
|
|
@@ -57,6 +61,7 @@ const RadioButton: React.FC<RadioButtonProps> = ({
|
|
|
57
61
|
return (
|
|
58
62
|
<View key={item.value} style={styles.item}>
|
|
59
63
|
<Pressable
|
|
64
|
+
testID={getTestID(testID, `option-${item.value}`)}
|
|
60
65
|
onPress={() => handleOnPress(item)}
|
|
61
66
|
style={[styles.radioContainer, item.disabled && styles.disabled]}
|
|
62
67
|
>
|
|
@@ -65,7 +70,12 @@ const RadioButton: React.FC<RadioButtonProps> = ({
|
|
|
65
70
|
>
|
|
66
71
|
{isChecked && <View style={styles.innerCircle} />}
|
|
67
72
|
</View>
|
|
68
|
-
<Typography
|
|
73
|
+
<Typography
|
|
74
|
+
testID={getTestID(testID, `option-${item.value}-label`)}
|
|
75
|
+
variant="t2"
|
|
76
|
+
weight="medium"
|
|
77
|
+
color={Color.gray[800]}
|
|
78
|
+
>
|
|
69
79
|
{item.label}
|
|
70
80
|
</Typography>
|
|
71
81
|
</Pressable>
|
package/src/Select/README.md
CHANGED
|
@@ -31,6 +31,7 @@ Komponen `Select` adalah komponen pemilihan data berbasis bottom sheet dengan du
|
|
|
31
31
|
| `header` | ReactElement | – | Jika ingin chip mempunyai header. |
|
|
32
32
|
| `footer` | ReactElement | – | Jika ingin chip mempunyai footer. |
|
|
33
33
|
| `value` | ChipSelectedProps | – | Nilai pilihan yang dikontrol dari luar. Cocok untuk membuat komponen controlled. Akan mensinkronkan state internal selected dengan value setiap kali berubah. |
|
|
34
|
+
| `testID` | `string` | – | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-sheet`, `-search`, `-submit`, dan `-option-{value}` (via `Chip`). |
|
|
34
35
|
|
|
35
36
|
## 📌 Contoh Penggunaan
|
|
36
37
|
|
|
@@ -34,6 +34,7 @@ Komponen `Select` adalah komponen pemilihan data berbasis bottom sheet dengan du
|
|
|
34
34
|
| `refreshing` | `boolean` | `false` | Status untuk pull-to-refresh |
|
|
35
35
|
| `onEndReached` | `() => void` | - | Dipanggil saat scroll mencapai akhir list |
|
|
36
36
|
| `onSelectedChange` | `onSelectedChange?: (value: ChipOptionProps[]) => void;` | - | Dipanggil saat selected berubah |
|
|
37
|
+
| `testID` | `string` | – | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-sheet`, `-search`, `-submit`, dan `-option-{value}` (via `Chip`). |
|
|
37
38
|
|
|
38
39
|
## 📌 Contoh Penggunaan
|
|
39
40
|
|
package/src/Select/Select.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import Loading from '../Loading/Loading';
|
|
|
14
14
|
import { useToast } from '../Toast/ToastContext';
|
|
15
15
|
import { type SelectProps } from './type';
|
|
16
16
|
import { useRef } from 'react';
|
|
17
|
+
import { getTestID } from '../helpers/getTestID';
|
|
17
18
|
export default function Select({
|
|
18
19
|
isOpen,
|
|
19
20
|
data,
|
|
@@ -35,6 +36,7 @@ export default function Select({
|
|
|
35
36
|
searchValue,
|
|
36
37
|
value,
|
|
37
38
|
onSelectedChange,
|
|
39
|
+
testID,
|
|
38
40
|
}: SelectProps) {
|
|
39
41
|
const [selected, setSelected] = useState<ChipSelectedProps>();
|
|
40
42
|
const [searchQuery, setSearchQuery] = useState<string>(searchValue || '');
|
|
@@ -49,13 +51,17 @@ export default function Select({
|
|
|
49
51
|
[onClose]
|
|
50
52
|
);
|
|
51
53
|
|
|
52
|
-
const handleOnPresSubmitSelect = ()
|
|
54
|
+
const handleOnPresSubmitSelect = () => {
|
|
53
55
|
if (required && (!selected || selected.length === 0)) {
|
|
54
56
|
show('Please fill a item');
|
|
55
|
-
return
|
|
57
|
+
return;
|
|
56
58
|
}
|
|
59
|
+
|
|
57
60
|
onSubmit?.(selected ? selected : []);
|
|
58
|
-
|
|
61
|
+
|
|
62
|
+
// The single-select path closes itself right after onSubmit; this one used
|
|
63
|
+
// to just return a boolean that nothing read, so the sheet stayed open.
|
|
64
|
+
handleOnCloseBottom(false);
|
|
59
65
|
};
|
|
60
66
|
|
|
61
67
|
const searchTimeout = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
@@ -94,12 +100,14 @@ export default function Select({
|
|
|
94
100
|
}, [searchValue]);
|
|
95
101
|
return (
|
|
96
102
|
<BottomSheet
|
|
103
|
+
testID={getTestID(testID, 'sheet')}
|
|
97
104
|
onClose={(val: boolean) => handleOnCloseBottom(val)}
|
|
98
105
|
isOpen={isOpen}
|
|
99
106
|
height={height}
|
|
100
107
|
footer={
|
|
101
108
|
multiple ? (
|
|
102
109
|
<Button
|
|
110
|
+
testID={getTestID(testID, 'submit')}
|
|
103
111
|
title={submitBtnLabel ?? 'Lanjutkan'}
|
|
104
112
|
color="primary"
|
|
105
113
|
disabled={(!selected || selected.length === 0) && required}
|
|
@@ -115,6 +123,7 @@ export default function Select({
|
|
|
115
123
|
accessible={false}
|
|
116
124
|
>
|
|
117
125
|
<Input
|
|
126
|
+
testID={getTestID(testID, 'search')}
|
|
118
127
|
submitBehavior="submit"
|
|
119
128
|
icon="Search"
|
|
120
129
|
placeholder="Search"
|
|
@@ -128,6 +137,7 @@ export default function Select({
|
|
|
128
137
|
) : (
|
|
129
138
|
<View style={styles.containerChip}>
|
|
130
139
|
<Chip
|
|
140
|
+
testID={testID}
|
|
131
141
|
options={data}
|
|
132
142
|
direction="vertical"
|
|
133
143
|
scrollable={true}
|
package/src/Select/type.tsx
CHANGED
package/src/Skeleton/README.md
CHANGED
|
@@ -14,6 +14,7 @@ Komponen `Skeleton` adalah placeholder UI yang menampilkan efek shimmer animasi,
|
|
|
14
14
|
| `backgroundColor` | `string` | `"#F0F0F0"` | Warna latar belakang dari blok skeleton. |
|
|
15
15
|
| `shimmerColor` | `string` | `"rgba(255, 255, 255, 0.7)"` | Warna efek shimmer yang bergerak. |
|
|
16
16
|
| `duration` | `number` | `1500` | Durasi animasi shimmer (dalam milidetik). |
|
|
17
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
17
18
|
|
|
18
19
|
---
|
|
19
20
|
|
|
@@ -17,6 +17,7 @@ const Skeleton: React.FC<SkeletonProps> = ({
|
|
|
17
17
|
backgroundColor = '#F0F0F0',
|
|
18
18
|
shimmerColor = 'rgba(255, 255, 255, 0.7)',
|
|
19
19
|
duration = 1500,
|
|
20
|
+
testID,
|
|
20
21
|
}) => {
|
|
21
22
|
const shimmerAnimation = useRef(new Animated.Value(0)).current;
|
|
22
23
|
const skeletonWidth = useRef(0);
|
|
@@ -59,6 +60,7 @@ const Skeleton: React.FC<SkeletonProps> = ({
|
|
|
59
60
|
|
|
60
61
|
return (
|
|
61
62
|
<View
|
|
63
|
+
testID={testID}
|
|
62
64
|
onLayout={handleLayout}
|
|
63
65
|
style={[
|
|
64
66
|
styles.skeletonCard,
|
package/src/Skeleton/type.ts
CHANGED
package/src/Spinner/Spinner.tsx
CHANGED
|
@@ -2,7 +2,17 @@ import { useRef, useEffect } from 'react';
|
|
|
2
2
|
import { Animated, Easing, StyleSheet, View } from 'react-native';
|
|
3
3
|
import Svg, { Defs, LinearGradient, Stop, Circle } from 'react-native-svg';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
interface SpinnerProps {
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
testID?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function Spinner({
|
|
12
|
+
size = 48,
|
|
13
|
+
color = '#FFFFFF',
|
|
14
|
+
testID,
|
|
15
|
+
}: SpinnerProps) {
|
|
6
16
|
const rotateAnim = useRef(new Animated.Value(0)).current;
|
|
7
17
|
|
|
8
18
|
useEffect(() => {
|
|
@@ -29,7 +39,10 @@ export default function Spinner({ size = 48, color = '#FFFFFF' }) {
|
|
|
29
39
|
const darkerColor = '#999';
|
|
30
40
|
|
|
31
41
|
return (
|
|
32
|
-
<View
|
|
42
|
+
<View
|
|
43
|
+
testID={testID}
|
|
44
|
+
style={[styles.container, { width: size, height: size }]}
|
|
45
|
+
>
|
|
33
46
|
<Animated.View
|
|
34
47
|
style={{
|
|
35
48
|
transform: [{ rotate: rotateInterpolate }],
|
package/src/Step/README.md
CHANGED
|
@@ -40,6 +40,7 @@ export default function CheckoutWizard() {
|
|
|
40
40
|
| `children` | `ReactElement<StepItemProps>` \| array | ✅ | — | Satu atau beberapa `StepItem`. |
|
|
41
41
|
| `current` | `number` | ✅ | — | Indeks langkah aktif (dimulai dari `0`). |
|
|
42
42
|
| `onChangeStep` | `(activeIndex: number) => void` | ✅ | — | Callback yang dipicu setiap kali nilai `current` berubah di dalam komponen. |
|
|
43
|
+
| `testID` | `string` | ❌ | — | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
### StepItem
|
|
@@ -55,6 +56,7 @@ Sebagai konten – ditampilkan bila index-nya sama dengan current.
|
|
|
55
56
|
| `children` | `ReactNode` | ✅ | — | Konten yang muncul ketika langkah ini aktif. |
|
|
56
57
|
| `color` | `'primary' \| 'success' \| 'warning' \| 'danger' \| 'purple'` | ❌ | `'primary'` | Warna lingkaran & garis pada header. |
|
|
57
58
|
| `title` | `string` | ❌ | `''` | (Opsional) Judul untuk ditampilkan di header (bisa dikustom lagi). |
|
|
59
|
+
| `testID` | `string` | ❌ | — | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
58
60
|
|
|
59
61
|
## ⚙️ Cara Kerja
|
|
60
62
|
|
package/src/Step/Step.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import type { StepItemProps, StepProps } from './type';
|
|
|
5
5
|
|
|
6
6
|
const { width: screenWidth } = Dimensions.get('window');
|
|
7
7
|
|
|
8
|
-
const Step = ({ children, current = 0, onChangeStep }: StepProps) => {
|
|
8
|
+
const Step = ({ children, current = 0, onChangeStep, testID }: StepProps) => {
|
|
9
9
|
const childrenArray = React.Children.toArray(children).filter(
|
|
10
10
|
React.isValidElement
|
|
11
11
|
) as React.ReactElement<StepItemProps>[];
|
|
@@ -25,7 +25,7 @@ const Step = ({ children, current = 0, onChangeStep }: StepProps) => {
|
|
|
25
25
|
}, [current, onChangeStep]);
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<View style={styles.container}>
|
|
28
|
+
<View testID={testID} style={styles.container}>
|
|
29
29
|
<View style={[styles.headerContainer]}>
|
|
30
30
|
<ScrollView
|
|
31
31
|
ref={scrollRef}
|