@herca/rn-kit 0.1.113 → 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 +14 -2
- package/lib/module/Icon/Icon.js.map +1 -1
- package/lib/module/Icon/README.md +1 -0
- package/lib/module/Input/Input.js +7 -0
- package/lib/module/Input/Input.js.map +1 -1
- package/lib/module/Input/InputDate.js +35 -8
- package/lib/module/Input/InputDate.js.map +1 -1
- package/lib/module/Input/InputFile.js +28 -11
- package/lib/module/Input/InputFile.js.map +1 -1
- package/lib/module/Input/InputMonth.js +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/type.d.ts +1 -0
- package/lib/typescript/src/Icon/type.d.ts.map +1 -1
- package/lib/typescript/src/Input/Input.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputDate.d.ts +6 -2
- package/lib/typescript/src/Input/InputDate.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputFile.d.ts +1 -1
- package/lib/typescript/src/Input/InputFile.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputMonth.d.ts +29 -1
- package/lib/typescript/src/Input/InputMonth.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputOtp.d.ts +1 -0
- package/lib/typescript/src/Input/InputOtp.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputPassword.d.ts +2 -1
- package/lib/typescript/src/Input/InputPassword.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputSelect.d.ts +4 -2
- package/lib/typescript/src/Input/InputSelect.d.ts.map +1 -1
- package/lib/typescript/src/Input/InputYear.d.ts +34 -0
- package/lib/typescript/src/Input/InputYear.d.ts.map +1 -0
- package/lib/typescript/src/Input/Switch.d.ts +2 -1
- package/lib/typescript/src/Input/Switch.d.ts.map +1 -1
- package/lib/typescript/src/Input/TextArea.d.ts +1 -1
- package/lib/typescript/src/Input/TextArea.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTrigger.d.ts +2 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTrigger.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTriggerSmall.d.ts +2 -1
- package/lib/typescript/src/Input/partials/InputFile/CardTriggerSmall.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/InputFile/ItemPreview.d.ts +2 -1
- package/lib/typescript/src/Input/partials/InputFile/ItemPreview.d.ts.map +1 -1
- package/lib/typescript/src/Input/partials/PickerField.d.ts +25 -0
- package/lib/typescript/src/Input/partials/PickerField.d.ts.map +1 -0
- package/lib/typescript/src/Input/type.d.ts +13 -0
- package/lib/typescript/src/Input/type.d.ts.map +1 -1
- package/lib/typescript/src/Label/Label.d.ts +2 -1
- package/lib/typescript/src/Label/Label.d.ts.map +1 -1
- package/lib/typescript/src/LabelForm/LabelForm.d.ts +2 -1
- package/lib/typescript/src/LabelForm/LabelForm.d.ts.map +1 -1
- package/lib/typescript/src/List/List.d.ts +1 -1
- package/lib/typescript/src/List/List.d.ts.map +1 -1
- package/lib/typescript/src/List/ListItem.d.ts +1 -1
- package/lib/typescript/src/List/ListItem.d.ts.map +1 -1
- package/lib/typescript/src/List/type.d.ts +2 -0
- package/lib/typescript/src/List/type.d.ts.map +1 -1
- package/lib/typescript/src/Loading/Loading.d.ts +1 -0
- package/lib/typescript/src/Loading/Loading.d.ts.map +1 -1
- package/lib/typescript/src/Modal/Modal.d.ts +1 -0
- package/lib/typescript/src/Modal/Modal.d.ts.map +1 -1
- package/lib/typescript/src/Provider/RequiredUpdateAppsProvider.d.ts.map +1 -1
- package/lib/typescript/src/RadioButton/RadioButton.d.ts +1 -0
- package/lib/typescript/src/RadioButton/RadioButton.d.ts.map +1 -1
- package/lib/typescript/src/Select/Select.d.ts +1 -1
- package/lib/typescript/src/Select/Select.d.ts.map +1 -1
- package/lib/typescript/src/Select/type.d.ts +1 -0
- package/lib/typescript/src/Select/type.d.ts.map +1 -1
- package/lib/typescript/src/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/src/Skeleton/type.d.ts +1 -0
- package/lib/typescript/src/Skeleton/type.d.ts.map +1 -1
- package/lib/typescript/src/Spinner/Spinner.d.ts +7 -4
- package/lib/typescript/src/Spinner/Spinner.d.ts.map +1 -1
- package/lib/typescript/src/Step/Step.d.ts +1 -1
- package/lib/typescript/src/Step/Step.d.ts.map +1 -1
- package/lib/typescript/src/Step/StepItem.d.ts +1 -1
- package/lib/typescript/src/Step/StepItem.d.ts.map +1 -1
- package/lib/typescript/src/Step/type.d.ts +2 -0
- package/lib/typescript/src/Step/type.d.ts.map +1 -1
- package/lib/typescript/src/Tab/Tab.d.ts.map +1 -1
- package/lib/typescript/src/Tab/type.d.ts +1 -0
- package/lib/typescript/src/Tab/type.d.ts.map +1 -1
- package/lib/typescript/src/TextEditor/LinkSheet.d.ts +26 -0
- package/lib/typescript/src/TextEditor/LinkSheet.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/TextEditor.d.ts +2 -19
- package/lib/typescript/src/TextEditor/TextEditor.d.ts.map +1 -1
- package/lib/typescript/src/TextEditor/Toolbar.d.ts +16 -0
- package/lib/typescript/src/TextEditor/Toolbar.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/editorDocument.d.ts +20 -0
- package/lib/typescript/src/TextEditor/editorDocument.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/formatState.d.ts +34 -0
- package/lib/typescript/src/TextEditor/formatState.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/toolbarButtons.d.ts +5 -0
- package/lib/typescript/src/TextEditor/toolbarButtons.d.ts.map +1 -0
- package/lib/typescript/src/TextEditor/types.d.ts +42 -0
- package/lib/typescript/src/TextEditor/types.d.ts.map +1 -1
- package/lib/typescript/src/Timeline/Timeline.d.ts +2 -1
- package/lib/typescript/src/Timeline/Timeline.d.ts.map +1 -1
- package/lib/typescript/src/Timeline/TimelineItem.d.ts +2 -1
- package/lib/typescript/src/Timeline/TimelineItem.d.ts.map +1 -1
- package/lib/typescript/src/Toast/Toast.d.ts +2 -1
- package/lib/typescript/src/Toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/Typography/Typography.d.ts.map +1 -1
- package/lib/typescript/src/Typography/type.d.ts +1 -0
- package/lib/typescript/src/Typography/type.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Card.d.ts +2 -1
- package/lib/typescript/src/Ui/Card.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Center.d.ts +2 -1
- package/lib/typescript/src/Ui/Center.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Col.d.ts +1 -0
- package/lib/typescript/src/Ui/Col.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Container.d.ts +2 -1
- package/lib/typescript/src/Ui/Container.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Devider.d.ts +3 -1
- package/lib/typescript/src/Ui/Devider.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Footer.d.ts +1 -0
- package/lib/typescript/src/Ui/Footer.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Gap.d.ts +2 -1
- package/lib/typescript/src/Ui/Gap.d.ts.map +1 -1
- package/lib/typescript/src/Ui/Grid.d.ts +1 -0
- package/lib/typescript/src/Ui/Grid.d.ts.map +1 -1
- package/lib/typescript/src/function/dateFormatter.d.ts +11 -0
- package/lib/typescript/src/function/dateFormatter.d.ts.map +1 -1
- package/lib/typescript/src/helpers/getTestID.d.ts +10 -0
- package/lib/typescript/src/helpers/getTestID.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +16 -3
- package/src/Accordion/Accordion.tsx +6 -1
- package/src/Accordion/AccordionItem.tsx +2 -1
- package/src/Accordion/README.md +2 -0
- package/src/Accordion/type.tsx +2 -0
- package/src/Alert/Alert.tsx +3 -0
- package/src/Alert/README.md +1 -0
- package/src/Avatar/Avatar.tsx +2 -0
- package/src/Avatar/AvatarGroup.tsx +2 -1
- package/src/Avatar/README_AVATAR.md +1 -0
- package/src/Avatar/README_AVATARGROUP.md +1 -0
- package/src/Avatar/type.tsx +2 -0
- package/src/Badge/Badge.tsx +4 -0
- package/src/Badge/README.md +1 -0
- package/src/BadgeIcon/BadgeIcon.tsx +3 -0
- package/src/BadgeIcon/README.md +1 -0
- package/src/BottomSheet/BottomSheet.tsx +20 -13
- package/src/BottomSheet/README.md +1 -0
- package/src/BottomSheet/type.tsx +1 -0
- package/src/Button/Button.tsx +2 -0
- package/src/Button/README.md +1 -0
- package/src/Button/type.tsx +1 -0
- package/src/Calendar/Calendar.tsx +8 -1
- package/src/Calendar/CalendarPropsType.tsx +6 -0
- package/src/Calendar/README.md +2 -0
- package/src/CheckBox/CheckBox.tsx +13 -2
- package/src/CheckBox/CheckBoxList.tsx +7 -1
- package/src/CheckBox/README_CHECKBOX.md +1 -0
- package/src/CheckBox/README_CHECKBOXLIST.md +1 -0
- package/src/Chip/Chip.tsx +18 -5
- package/src/Chip/ChipItem.tsx +2 -0
- package/src/Chip/README.md +26 -2
- package/src/Chip/README_CHIP_ITEM.md +1 -0
- package/src/Chip/type.tsx +2 -0
- package/src/CounterButton/CounterButton.tsx +5 -0
- package/src/CounterButton/README.md +1 -0
- package/src/CounterButton/type.tsx +1 -0
- package/src/DatePicker/DatePicker.tsx +21 -5
- package/src/DatePicker/MonthPicker.tsx +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 +10 -2
- package/src/Icon/README.md +1 -0
- package/src/Icon/type.tsx +1 -0
- package/src/Input/Input.tsx +17 -2
- package/src/Input/InputDate.tsx +40 -15
- package/src/Input/InputFile.tsx +27 -14
- package/src/Input/InputMonth.tsx +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/Accordion/README.md
CHANGED
|
@@ -43,6 +43,7 @@ export default function FAQSection() {
|
|
|
43
43
|
| `isOpen` | `boolean` | ❌ | `true` | Menentukan apakah Accordion terbuka saat pertama kali dirender. |
|
|
44
44
|
| `onCollapse` | `(isOpen: boolean) => void` | ❌ | - | Callback saat status terbuka/tutup berubah. |
|
|
45
45
|
| `variant` | `'default' \| 'borderless'` | ❌ | - | Opsi untuk menampilkan sebuah border di pembungkus accordion nya atau tidak |
|
|
46
|
+
| `testID` | `string` | ❌ | - | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-trigger` untuk header; tiap `AccordionItem` menerima `testID`-nya sendiri. |
|
|
46
47
|
|
|
47
48
|
### AccordionItem
|
|
48
49
|
|
|
@@ -50,6 +51,7 @@ export default function FAQSection() {
|
|
|
50
51
|
| ---------- | ----------- | ----- | ------- | --------------------------------------------------------------- |
|
|
51
52
|
| `children` | `ReactNode` | ✅ | - | Konten yang akan ditampilkan saat Accordion dibuka. |
|
|
52
53
|
| `index` | `number` | ❌ | - | Untuk pengendalian item tertentu jika diperlukan secara manual. |
|
|
54
|
+
| `testID` | `string` | ❌ | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
53
55
|
|
|
54
56
|
## Note
|
|
55
57
|
|
package/src/Accordion/type.tsx
CHANGED
|
@@ -13,8 +13,10 @@ export interface AccordionProps {
|
|
|
13
13
|
isOpen?: boolean;
|
|
14
14
|
onCollapse?: (isOpen: boolean) => void;
|
|
15
15
|
variant?: 'default' | 'borderless';
|
|
16
|
+
testID?: string;
|
|
16
17
|
}
|
|
17
18
|
export interface AccordionItemProps {
|
|
18
19
|
children: ReactNode;
|
|
19
20
|
index?: number;
|
|
21
|
+
testID?: string;
|
|
20
22
|
}
|
package/src/Alert/Alert.tsx
CHANGED
|
@@ -14,6 +14,7 @@ interface AlertProps {
|
|
|
14
14
|
style?: ViewStyle;
|
|
15
15
|
titleStyle?: StyleProp<ViewStyle>;
|
|
16
16
|
messageStyle?: StyleProp<ViewStyle>;
|
|
17
|
+
testID?: string;
|
|
17
18
|
hide?: boolean;
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -75,11 +76,13 @@ const Alert: React.FC<AlertProps> = ({
|
|
|
75
76
|
titleStyle,
|
|
76
77
|
messageStyle,
|
|
77
78
|
hide = false,
|
|
79
|
+
testID,
|
|
78
80
|
}) => {
|
|
79
81
|
const { background, fontColor, borderColor } = COLORS[color];
|
|
80
82
|
|
|
81
83
|
return (
|
|
82
84
|
<View
|
|
85
|
+
testID={testID}
|
|
83
86
|
style={[
|
|
84
87
|
styles.container,
|
|
85
88
|
{
|
package/src/Alert/README.md
CHANGED
|
@@ -22,6 +22,7 @@ Komponen `Alert` digunakan untuk menampilkan pesan notifikasi dengan ikon, judul
|
|
|
22
22
|
| `style` | `ViewStyle` | `undefined` | Gaya tambahan untuk container |
|
|
23
23
|
| `titleStyle` | `StyleProp<ViewStyle>` | `undefined` | Gaya tambahan untuk judul |
|
|
24
24
|
| `messageStyle` | `StyleProp<ViewStyle>` | `undefined` | Gaya tambahan untuk pesan |
|
|
25
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
25
26
|
|
|
26
27
|
## 🎨 Warna yang Didukung
|
|
27
28
|
|
package/src/Avatar/Avatar.tsx
CHANGED
|
@@ -16,11 +16,13 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
16
16
|
backgroundColor = '#ccc',
|
|
17
17
|
textColor = '#fff',
|
|
18
18
|
style,
|
|
19
|
+
testID,
|
|
19
20
|
}) => {
|
|
20
21
|
const avatarSize = SIZE_MAP[size] || SIZE_MAP.medium;
|
|
21
22
|
|
|
22
23
|
return (
|
|
23
24
|
<View
|
|
25
|
+
testID={testID}
|
|
24
26
|
style={[
|
|
25
27
|
styles.container,
|
|
26
28
|
{
|
|
@@ -13,13 +13,14 @@ const AvatarGroup: React.FC<AvatarGroupProps> = ({
|
|
|
13
13
|
avatars = [],
|
|
14
14
|
maxVisible = 5,
|
|
15
15
|
size = 'medium',
|
|
16
|
+
testID,
|
|
16
17
|
}) => {
|
|
17
18
|
const avatarSize = SIZE_MAP[size] || SIZE_MAP.medium;
|
|
18
19
|
const visibleAvatars = avatars.slice(0, maxVisible);
|
|
19
20
|
const remainingCount = avatars.length - maxVisible;
|
|
20
21
|
|
|
21
22
|
return (
|
|
22
|
-
<View style={[styles.container, { height: avatarSize }]}>
|
|
23
|
+
<View testID={testID} style={[styles.container, { height: avatarSize }]}>
|
|
23
24
|
{visibleAvatars.map((avatar, index) => {
|
|
24
25
|
const hasImage = avatar.source;
|
|
25
26
|
const initials = avatar.name;
|
|
@@ -20,6 +20,7 @@ Komponen `Avatar` digunakan untuk menampilkan foto pengguna atau inisial nama ji
|
|
|
20
20
|
| `backgroundColor` | `string` | `'#ccc'` | Warna latar belakang jika tanpa gambar |
|
|
21
21
|
| `textColor` | `string` | `'#fff'` | Warna teks inisial jika tanpa gambar |
|
|
22
22
|
| `style` | `ViewStyle` | `undefined` | Gaya tambahan untuk container |
|
|
23
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
23
24
|
|
|
24
25
|
## 📏 Ukuran Avatar
|
|
25
26
|
|
|
@@ -16,6 +16,7 @@ The `AvatarGroup` component displays a group of user avatars. It supports image
|
|
|
16
16
|
| `avatars` | `AvatarProps[]` | `[]` | Array of avatar objects. |
|
|
17
17
|
| `maxVisible` | `number` | `5` | Max number of avatars to display. |
|
|
18
18
|
| `size` | `'small' | 'medium' | 'large'` | `'medium'` | Size of avatars. |
|
|
19
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
19
20
|
|
|
20
21
|
### `AvatarProps`
|
|
21
22
|
|
package/src/Avatar/type.tsx
CHANGED
|
@@ -8,10 +8,12 @@ export interface AvatarProps {
|
|
|
8
8
|
backgroundColor?: string;
|
|
9
9
|
textColor?: string;
|
|
10
10
|
style?: object;
|
|
11
|
+
testID?: string;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export interface AvatarGroupProps {
|
|
14
15
|
avatars?: AvatarProps[];
|
|
15
16
|
maxVisible?: number;
|
|
16
17
|
size?: AvatarSizeType;
|
|
18
|
+
testID?: string;
|
|
17
19
|
}
|
package/src/Badge/Badge.tsx
CHANGED
|
@@ -12,6 +12,7 @@ interface BadgeProps {
|
|
|
12
12
|
variant?: Variant;
|
|
13
13
|
dot?: boolean;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
+
testID?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
const COLORS: Record<Variant, { background: string; fontColor: string }> = {
|
|
@@ -47,6 +48,7 @@ const Badge: React.FC<BadgeProps> = ({
|
|
|
47
48
|
color = 'default',
|
|
48
49
|
dot = false,
|
|
49
50
|
children,
|
|
51
|
+
testID,
|
|
50
52
|
}) => {
|
|
51
53
|
const safeSize: Size = ['small', 'medium'].includes(size) ? size : 'medium';
|
|
52
54
|
|
|
@@ -69,6 +71,7 @@ const Badge: React.FC<BadgeProps> = ({
|
|
|
69
71
|
if (dot) {
|
|
70
72
|
return (
|
|
71
73
|
<View
|
|
74
|
+
testID={testID}
|
|
72
75
|
style={[
|
|
73
76
|
styles.dot,
|
|
74
77
|
{
|
|
@@ -85,6 +88,7 @@ const Badge: React.FC<BadgeProps> = ({
|
|
|
85
88
|
|
|
86
89
|
return (
|
|
87
90
|
<View
|
|
91
|
+
testID={testID}
|
|
88
92
|
style={[
|
|
89
93
|
styles.badge,
|
|
90
94
|
{
|
package/src/Badge/README.md
CHANGED
|
@@ -20,6 +20,7 @@ Komponen `Badge` digunakan untuk menampilkan label kecil yang memberikan informa
|
|
|
20
20
|
| `size` | `'small'` \\| `'medium'` | `'medium'` | Ukuran badge |
|
|
21
21
|
| `dot` | `boolean` | `false` | Jika `true`, hanya menampilkan titik kecil |
|
|
22
22
|
| `children` | `React.ReactNode` | `undefined` | Jika ada, akan menggantikan `value` sebagai isi badge |
|
|
23
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
23
24
|
|
|
24
25
|
## 🎨 Warna default yang Tersedia
|
|
25
26
|
|
|
@@ -9,6 +9,7 @@ interface BaseBadgeProps {
|
|
|
9
9
|
color?: Variant | HexColor;
|
|
10
10
|
size?: Size;
|
|
11
11
|
variant?: Variant;
|
|
12
|
+
testID?: string;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
interface IconBadgeProps extends BaseBadgeProps {
|
|
@@ -67,6 +68,7 @@ const BadgeIcon: React.FC<BadgeProps> = ({
|
|
|
67
68
|
size = 'medium',
|
|
68
69
|
color = 'default',
|
|
69
70
|
children,
|
|
71
|
+
testID,
|
|
70
72
|
}) => {
|
|
71
73
|
const safeSize: Size = ['small', 'medium', 'large'].includes(size)
|
|
72
74
|
? size
|
|
@@ -91,6 +93,7 @@ const BadgeIcon: React.FC<BadgeProps> = ({
|
|
|
91
93
|
|
|
92
94
|
return (
|
|
93
95
|
<View
|
|
96
|
+
testID={testID}
|
|
94
97
|
style={[
|
|
95
98
|
styles.badge,
|
|
96
99
|
{
|
package/src/BadgeIcon/README.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| `color` | `Variant` \| `HexColor` | `"default"` | Warna badge. Bisa berupa nama varian yang tersedia atau kode warna HEX. |
|
|
14
14
|
| `size` | `"small"` \| `"medium"` \| `"large"` | `"medium"` | Ukuran badge. Mengatur tinggi, lebar minimum, padding, dan radius border. |
|
|
15
15
|
| `variant` | `Variant` | - | Alias untuk varian warna (tidak digunakan langsung di komponen ini). |
|
|
16
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
16
17
|
|
|
17
18
|
---
|
|
18
19
|
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { useEffect, useRef, useState
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
View,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
PanResponder,
|
|
6
|
-
TouchableOpacity,
|
|
7
3
|
Animated,
|
|
8
|
-
Modal,
|
|
9
|
-
KeyboardAvoidingView,
|
|
10
|
-
Keyboard,
|
|
11
4
|
Dimensions,
|
|
12
|
-
|
|
5
|
+
Keyboard,
|
|
6
|
+
KeyboardAvoidingView,
|
|
7
|
+
Modal,
|
|
8
|
+
PanResponder,
|
|
13
9
|
Platform,
|
|
10
|
+
SafeAreaView,
|
|
14
11
|
StatusBar,
|
|
12
|
+
StyleSheet,
|
|
13
|
+
TouchableOpacity,
|
|
14
|
+
View,
|
|
15
15
|
type KeyboardEvent,
|
|
16
16
|
} from 'react-native';
|
|
17
|
-
import Container from '../Ui/Container';
|
|
18
|
-
import Typography from '../Typography/Typography';
|
|
19
17
|
import Color from '../Color/Color';
|
|
18
|
+
import { getTestID } from '../helpers/getTestID';
|
|
19
|
+
import Icon from '../Icon';
|
|
20
|
+
import Container from '../Ui/Container';
|
|
20
21
|
import type { BottomSheetHeighProps, BottomSheetProops } from './type';
|
|
21
22
|
|
|
22
23
|
const statusBarHeight =
|
|
@@ -39,6 +40,7 @@ export default function BottomSheet({
|
|
|
39
40
|
height,
|
|
40
41
|
pullBar,
|
|
41
42
|
footer,
|
|
43
|
+
testID,
|
|
42
44
|
}: BottomSheetProops) {
|
|
43
45
|
const [isVisible, setIsVisible] = useState(false);
|
|
44
46
|
const [heightFooter, setHeightFooter] = useState(0);
|
|
@@ -149,6 +151,7 @@ export default function BottomSheet({
|
|
|
149
151
|
>
|
|
150
152
|
<View style={[styles.modalContainer, backdrop && styles.backdrop]}>
|
|
151
153
|
<TouchableOpacity
|
|
154
|
+
testID={getTestID(testID, 'backdrop')}
|
|
152
155
|
onPress={handleRequestClose}
|
|
153
156
|
activeOpacity={1}
|
|
154
157
|
style={styles.backdropTouchable}
|
|
@@ -160,6 +163,7 @@ export default function BottomSheet({
|
|
|
160
163
|
style={styles.keyboardAvoiding}
|
|
161
164
|
>
|
|
162
165
|
<Animated.View
|
|
166
|
+
testID={testID}
|
|
163
167
|
style={[
|
|
164
168
|
styles.bottomSheet,
|
|
165
169
|
{
|
|
@@ -172,15 +176,17 @@ export default function BottomSheet({
|
|
|
172
176
|
>
|
|
173
177
|
{buttonClose && (
|
|
174
178
|
<TouchableOpacity
|
|
179
|
+
testID={getTestID(testID, 'close')}
|
|
175
180
|
onPress={handleRequestClose}
|
|
176
181
|
style={styles.closeButton}
|
|
177
182
|
>
|
|
178
|
-
<
|
|
183
|
+
<Icon name="times-new" color={Color.gray[900]} size={20} />
|
|
179
184
|
</TouchableOpacity>
|
|
180
185
|
)}
|
|
181
186
|
{closable && (
|
|
182
187
|
<View
|
|
183
188
|
{...panResponder.panHandlers}
|
|
189
|
+
testID={getTestID(testID, 'pullbar')}
|
|
184
190
|
style={styles.dragIndicatorContainer}
|
|
185
191
|
>
|
|
186
192
|
{pullBar ? pullBar : <View style={styles.dragIndicator} />}
|
|
@@ -196,6 +202,7 @@ export default function BottomSheet({
|
|
|
196
202
|
</SafeAreaView>
|
|
197
203
|
{footer && (
|
|
198
204
|
<SafeAreaView
|
|
205
|
+
testID={getTestID(testID, 'footer')}
|
|
199
206
|
onLayout={(event) => {
|
|
200
207
|
const { height: layoutHeight } = event.nativeEvent.layout;
|
|
201
208
|
setHeightFooter(layoutHeight);
|
|
@@ -235,7 +242,7 @@ const styles = StyleSheet.create({
|
|
|
235
242
|
position: 'absolute',
|
|
236
243
|
backgroundColor: 'white',
|
|
237
244
|
paddingVertical: 10,
|
|
238
|
-
paddingHorizontal:
|
|
245
|
+
paddingHorizontal: 10,
|
|
239
246
|
borderRadius: 50,
|
|
240
247
|
top: -50,
|
|
241
248
|
right: 24,
|
|
@@ -19,6 +19,7 @@ Komponen `BottomSheet` adalah modal bawah (slide-up) untuk menampilkan konten di
|
|
|
19
19
|
| `height` | `number \| string` | `'auto'` | Tinggi dari konten bottom sheet. |
|
|
20
20
|
| `pullBar` | `React.ReactNode` | - | Custom elemen untuk drag indicator. |
|
|
21
21
|
| `footer` | `React.ReactNode` | - | Menambahkan elemen tetap di bawah konten. |
|
|
22
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan pada elemen konten (tanpa suffix); menurunkan `-backdrop`, `-close`, `-pullbar`, dan `-footer`. |
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
package/src/BottomSheet/type.tsx
CHANGED
package/src/Button/Button.tsx
CHANGED
|
@@ -115,6 +115,7 @@ const Button: React.FC<ButtonProps> = ({
|
|
|
115
115
|
width,
|
|
116
116
|
block = false,
|
|
117
117
|
loading = false,
|
|
118
|
+
testID,
|
|
118
119
|
}) => {
|
|
119
120
|
const sizeStyles = sizeStyleMap[size];
|
|
120
121
|
const fontVariant = fontVariantMap[size];
|
|
@@ -131,6 +132,7 @@ const Button: React.FC<ButtonProps> = ({
|
|
|
131
132
|
|
|
132
133
|
return (
|
|
133
134
|
<Pressable
|
|
135
|
+
testID={testID}
|
|
134
136
|
onPress={onPress}
|
|
135
137
|
disabled={disabled}
|
|
136
138
|
style={({ pressed }) => {
|
package/src/Button/README.md
CHANGED
|
@@ -24,6 +24,7 @@ Komponen `Button` ini adalah tombol serbaguna untuk aplikasi React Native. Mendu
|
|
|
24
24
|
| `width` | `number | string` | - | Lebar tombol bisa dalam piksel atau persentase. |
|
|
25
25
|
| `block` | `boolean` | `false` | Jika `true`, tombol akan penuh lebar (`width: 100%`). |
|
|
26
26
|
| `loading` | `boolean` | `false` | Menampilkan indikator loading jika `true`. |
|
|
27
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen `Pressable` tombol, tanpa suffix. |
|
|
27
28
|
|
|
28
29
|
---
|
|
29
30
|
|
package/src/Button/type.tsx
CHANGED
|
@@ -23,6 +23,7 @@ const DEFAULT_SELECTED_BACKGROUND_COLOR = Color.primary[1000];
|
|
|
23
23
|
const DEFAULT_SELECTED_TEXT_COLOR = Color.base.white100;
|
|
24
24
|
const DEFAULT_DISABLED_BACKGROUND_COLOR = Color.base.white100;
|
|
25
25
|
const DEFAULT_DISABLED_TEXT_COLOR = Color.gray[400];
|
|
26
|
+
const DEFAULT_TODAY_TEXT_COLOR = Color.info[500];
|
|
26
27
|
|
|
27
28
|
export const formatDate = (date: Date | undefined | null) => {
|
|
28
29
|
if (!date) return null;
|
|
@@ -43,6 +44,7 @@ const Calendar = ({
|
|
|
43
44
|
selectedTextColor = DEFAULT_SELECTED_TEXT_COLOR,
|
|
44
45
|
disabledBackgroundColor = DEFAULT_DISABLED_BACKGROUND_COLOR,
|
|
45
46
|
disabledTextColor = DEFAULT_DISABLED_TEXT_COLOR,
|
|
47
|
+
todayTextColor = DEFAULT_TODAY_TEXT_COLOR,
|
|
46
48
|
dayName = DAYS,
|
|
47
49
|
language = 'en',
|
|
48
50
|
initialDate = new Date(),
|
|
@@ -50,6 +52,7 @@ const Calendar = ({
|
|
|
50
52
|
dateEnd,
|
|
51
53
|
onMonthChange,
|
|
52
54
|
onYearChange,
|
|
55
|
+
testID,
|
|
53
56
|
}: CalendarTypes) => {
|
|
54
57
|
const [currentDate, setCurrentDate] = useState(initialDate);
|
|
55
58
|
const [startDate, setStartDate] = useState<Date | null>(null);
|
|
@@ -256,6 +259,10 @@ const Calendar = ({
|
|
|
256
259
|
|
|
257
260
|
if (mark?.selected) return mark?.textColor || selectedTextColor;
|
|
258
261
|
|
|
262
|
+
// Last before the ordinary colour: today is a hint about which day it is,
|
|
263
|
+
// so anything the user or the caller actually decided outranks it.
|
|
264
|
+
if (isSameDate(new Date(), date)) return todayTextColor;
|
|
265
|
+
|
|
259
266
|
return Color.gray[700];
|
|
260
267
|
};
|
|
261
268
|
|
|
@@ -322,7 +329,7 @@ const Calendar = ({
|
|
|
322
329
|
const year = currentDate.getFullYear();
|
|
323
330
|
|
|
324
331
|
return (
|
|
325
|
-
<View style={styles.container}>
|
|
332
|
+
<View testID={testID} style={styles.container}>
|
|
326
333
|
<View style={styles.header}>
|
|
327
334
|
<TouchableOpacity style={styles.buttonNav} onPress={goToPrevMonth}>
|
|
328
335
|
<Icon name="ArrowLeft" color={Color.base.white100} size={10} />
|
|
@@ -62,6 +62,11 @@ export interface CalendarTypes {
|
|
|
62
62
|
selectedTextColor?: string;
|
|
63
63
|
disabledBackgroundColor?: string;
|
|
64
64
|
disabledTextColor?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Colour of today's number. Applies only when today is not selected,
|
|
67
|
+
* disabled or marked -- those outrank it.
|
|
68
|
+
*/
|
|
69
|
+
todayTextColor?: string;
|
|
65
70
|
disabledDays?: {
|
|
66
71
|
[day in WeekDay]?: boolean | DisabledDayStyle;
|
|
67
72
|
};
|
|
@@ -72,4 +77,5 @@ export interface CalendarTypes {
|
|
|
72
77
|
dateEnd?: string | null;
|
|
73
78
|
onMonthChange?: (month: number) => void;
|
|
74
79
|
onYearChange?: (year: number) => void;
|
|
80
|
+
testID?: string;
|
|
75
81
|
}
|
package/src/Calendar/README.md
CHANGED
|
@@ -29,9 +29,11 @@ Komponen kalender ini dibuat menggunakan React Native dan memungkinkan pengguna
|
|
|
29
29
|
| `onChange` | `(date: Date \| [Date, Date]) => void` | — | Fungsi callback saat tanggal dipilih |
|
|
30
30
|
| `selectedBackgroundColor` | `string` (CSS color) | `'#0f62fe'` | Warna latar belakang tanggal yang dipilih |
|
|
31
31
|
| `selectedTextColor` | `string` (CSS color) | `'#ffffff'` | Warna teks pada tanggal yang dipilih |
|
|
32
|
+
| `todayTextColor` | `string` (CSS color) | `Color.info[500]` | Warna angka tanggal hari ini. Hanya berlaku bila hari ini tidak sedang dipilih, dinonaktifkan, atau ditandai lewat `markedDates` — ketiganya menang atas ini. |
|
|
32
33
|
| `initialDate` | `Date` | `new Date(2026, 1, 1)` | Inisialisasi tanggal saat pertamakali render |
|
|
33
34
|
| `dateStart` | `string \| null` | `2025-11-28` | Kontroler tanggal mulai |
|
|
34
35
|
| `dateEnd` | `string \| null` | `2025-11-28` | Kontroler tanggal selesai |
|
|
36
|
+
| `testID` | `string` | - | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan langsung ke elemen akar, tanpa suffix. |
|
|
35
37
|
|
|
36
38
|
---
|
|
37
39
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Color from '../Color/Color';
|
|
2
|
+
import Icon from '../Icon';
|
|
3
|
+
import Typography from '../Typography/Typography';
|
|
2
4
|
import React, { useEffect, useState } from 'react';
|
|
3
5
|
import { Pressable, StyleSheet, View } from 'react-native';
|
|
4
6
|
import type { Variant } from './type';
|
|
7
|
+
import { getTestID } from '../helpers/getTestID';
|
|
5
8
|
// import type { ColorVariantType } from '../Color/type';
|
|
6
9
|
|
|
7
10
|
interface CheckBoxProps {
|
|
@@ -13,6 +16,7 @@ interface CheckBoxProps {
|
|
|
13
16
|
renderLabel?: () => React.ReactNode;
|
|
14
17
|
renderHint?: () => React.ReactNode;
|
|
15
18
|
color?: Variant;
|
|
19
|
+
testID?: string;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
const COLORS: Record<Variant, { background: string; borderColor: string }> = {
|
|
@@ -38,6 +42,7 @@ const CheckBox: React.FC<CheckBoxProps> = ({
|
|
|
38
42
|
renderLabel,
|
|
39
43
|
renderHint,
|
|
40
44
|
color = 'primary',
|
|
45
|
+
testID,
|
|
41
46
|
}) => {
|
|
42
47
|
const [value, setValue] = useState<boolean>(false);
|
|
43
48
|
const { background, borderColor } = COLORS[color];
|
|
@@ -54,6 +59,7 @@ const CheckBox: React.FC<CheckBoxProps> = ({
|
|
|
54
59
|
|
|
55
60
|
return (
|
|
56
61
|
<Pressable
|
|
62
|
+
testID={testID}
|
|
57
63
|
onPress={() => !disabled && handlePress()}
|
|
58
64
|
style={styles.container}
|
|
59
65
|
>
|
|
@@ -71,7 +77,12 @@ const CheckBox: React.FC<CheckBoxProps> = ({
|
|
|
71
77
|
</View>
|
|
72
78
|
<View>
|
|
73
79
|
{label && (
|
|
74
|
-
<Typography
|
|
80
|
+
<Typography
|
|
81
|
+
testID={getTestID(testID, 'label')}
|
|
82
|
+
variant="t2"
|
|
83
|
+
weight="medium"
|
|
84
|
+
color={Color.gray[900]}
|
|
85
|
+
>
|
|
75
86
|
{label}
|
|
76
87
|
</Typography>
|
|
77
88
|
)}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import Typography from '../Typography/Typography';
|
|
4
|
+
import Color from '../Color/Color';
|
|
5
|
+
import CheckBox from './CheckBox';
|
|
6
|
+
import { getTestID } from '../helpers/getTestID';
|
|
4
7
|
import type { Variant } from './type';
|
|
5
8
|
|
|
6
9
|
interface CheckBoxListItem {
|
|
@@ -15,6 +18,7 @@ interface CheckBoxListProps {
|
|
|
15
18
|
onChange: (selected: string[]) => void;
|
|
16
19
|
direction?: 'vertical' | 'horizontal';
|
|
17
20
|
color?: Variant;
|
|
21
|
+
testID?: string;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
const CheckBoxList: React.FC<CheckBoxListProps> = ({
|
|
@@ -23,6 +27,7 @@ const CheckBoxList: React.FC<CheckBoxListProps> = ({
|
|
|
23
27
|
onChange,
|
|
24
28
|
direction = 'vertical',
|
|
25
29
|
color = 'primary',
|
|
30
|
+
testID,
|
|
26
31
|
}) => {
|
|
27
32
|
const toggleValue = (value: string) => {
|
|
28
33
|
const newSelected = selectedValues.includes(value)
|
|
@@ -42,6 +47,7 @@ const CheckBoxList: React.FC<CheckBoxListProps> = ({
|
|
|
42
47
|
{items.map((item) => (
|
|
43
48
|
<CheckBox
|
|
44
49
|
key={item.value}
|
|
50
|
+
testID={getTestID(testID, `option-${item.value}`)}
|
|
45
51
|
checked={selectedValues.includes(item.value)}
|
|
46
52
|
color={color}
|
|
47
53
|
onChange={() => toggleValue(item.value)}
|
|
@@ -47,3 +47,4 @@ export default function App() {
|
|
|
47
47
|
| `disabled` | `boolean` | Jika `true`, checkbox tidak bisa ditekan. Default: `false`. |
|
|
48
48
|
| `renderLabel` | `() => React.ReactNode` | Alternatif render untuk label kustom selain `label`. |
|
|
49
49
|
| `renderHint` | `() => React.ReactNode` | Alternatif render untuk hint kustom selain `hint`. |
|
|
50
|
+
| `testID` | `string` | ID untuk automation testing (Maestro/Detox/Appium). Diterapkan ke `Pressable`; menurunkan `-label` untuk elemen label. |
|
|
@@ -46,3 +46,4 @@ export default function App() {
|
|
|
46
46
|
| `onChange` | `(selected: string[]) => void` | Callback saat nilai pilihan berubah. | |
|
|
47
47
|
| `direction` | \`'vertical' | 'horizontal'\` (opsional) | Arah tampilan checkbox (default: `'vertical'`). |
|
|
48
48
|
| `color` | `primary \| danger \| warning \| orange \| info \| success \| purple ` | warna background jika checkbox di centang | Arah tampilan checkbox (default: `'vertical'`). |
|
|
49
|
+
| `testID` | `string` | ID untuk automation testing (Maestro/Detox/Appium). Menurunkan `-option-{value}` untuk tiap item checkbox. | |
|
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
|
|