@arkyn/components 3.0.1-beta.17 → 3.0.1-beta.170
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 +41 -0
- package/package.json +458 -20
- package/styles.d.ts +3 -0
- package/dist/bundle.js +0 -4292
- package/dist/bundle.umd.cjs +0 -30
- package/dist/documentation/src/app.d.ts +0 -3
- package/dist/documentation/src/app.d.ts.map +0 -1
- package/dist/documentation/src/app.js +0 -55
- package/dist/documentation/src/components/examples.alert.d.ts +0 -3
- package/dist/documentation/src/components/examples.alert.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.alert.js +0 -7
- package/dist/documentation/src/components/examples.audioPlayer.d.ts +0 -3
- package/dist/documentation/src/components/examples.audioPlayer.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.audioPlayer.js +0 -8
- package/dist/documentation/src/components/examples.badge.d.ts +0 -3
- package/dist/documentation/src/components/examples.badge.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.badge.js +0 -9
- package/dist/documentation/src/components/examples.button.d.ts +0 -3
- package/dist/documentation/src/components/examples.button.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.button.js +0 -9
- package/dist/documentation/src/components/examples.cardTab.d.ts +0 -3
- package/dist/documentation/src/components/examples.cardTab.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.cardTab.js +0 -7
- package/dist/documentation/src/components/examples.checkbox.d.ts +0 -3
- package/dist/documentation/src/components/examples.checkbox.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.checkbox.js +0 -13
- package/dist/documentation/src/components/examples.currencyInput.d.ts +0 -3
- package/dist/documentation/src/components/examples.currencyInput.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.currencyInput.js +0 -9
- package/dist/documentation/src/components/examples.divider.d.ts +0 -3
- package/dist/documentation/src/components/examples.divider.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.divider.js +0 -7
- package/dist/documentation/src/components/examples.drawer.d.ts +0 -3
- package/dist/documentation/src/components/examples.drawer.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.drawer.js +0 -11
- package/dist/documentation/src/components/examples.iconButton.d.ts +0 -3
- package/dist/documentation/src/components/examples.iconButton.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.iconButton.js +0 -9
- package/dist/documentation/src/components/examples.input.d.ts +0 -3
- package/dist/documentation/src/components/examples.input.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.input.js +0 -9
- package/dist/documentation/src/components/examples.maskedInput.d.ts +0 -3
- package/dist/documentation/src/components/examples.maskedInput.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.maskedInput.js +0 -9
- package/dist/documentation/src/components/examples.modal.d.ts +0 -3
- package/dist/documentation/src/components/examples.modal.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.modal.js +0 -10
- package/dist/documentation/src/components/examples.multiSelect.d.ts +0 -3
- package/dist/documentation/src/components/examples.multiSelect.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.multiSelect.js +0 -92
- package/dist/documentation/src/components/examples.phoneInput.d.ts +0 -3
- package/dist/documentation/src/components/examples.phoneInput.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.phoneInput.js +0 -26
- package/dist/documentation/src/components/examples.radio.d.ts +0 -3
- package/dist/documentation/src/components/examples.radio.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.radio.js +0 -11
- package/dist/documentation/src/components/examples.slider.d.ts +0 -3
- package/dist/documentation/src/components/examples.slider.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.slider.js +0 -10
- package/dist/documentation/src/components/examples.switch.d.ts +0 -3
- package/dist/documentation/src/components/examples.switch.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.switch.js +0 -20
- package/dist/documentation/src/components/examples.tab.d.ts +0 -3
- package/dist/documentation/src/components/examples.tab.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.tab.js +0 -7
- package/dist/documentation/src/components/examples.texarea.d.ts +0 -3
- package/dist/documentation/src/components/examples.texarea.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.texarea.js +0 -34
- package/dist/documentation/src/components/examples.tooltip.d.ts +0 -3
- package/dist/documentation/src/components/examples.tooltip.d.ts.map +0 -1
- package/dist/documentation/src/components/examples.tooltip.js +0 -8
- package/dist/documentation/src/main.d.ts +0 -3
- package/dist/documentation/src/main.d.ts.map +0 -1
- package/dist/documentation/src/main.js +0 -7
- package/dist/documentation/src/ui/box.d.ts +0 -8
- package/dist/documentation/src/ui/box.d.ts.map +0 -1
- package/dist/documentation/src/ui/box.js +0 -5
- package/dist/documentation/src/ui/row.d.ts +0 -7
- package/dist/documentation/src/ui/row.d.ts.map +0 -1
- package/dist/documentation/src/ui/row.js +0 -5
- package/dist/documentation/vite.config.d.ts +0 -3
- package/dist/documentation/vite.config.d.ts.map +0 -1
- package/dist/documentation/vite.config.js +0 -12
- package/dist/src/components/alert/alertContainer/index.d.ts +0 -44
- package/dist/src/components/alert/alertContainer/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertContainer/index.js +0 -71
- package/dist/src/components/alert/alertContent/index.d.ts +0 -45
- package/dist/src/components/alert/alertContent/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertContent/index.js +0 -47
- package/dist/src/components/alert/alertDescription/index.d.ts +0 -49
- package/dist/src/components/alert/alertDescription/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertDescription/index.js +0 -51
- package/dist/src/components/alert/alertIcon/index.d.ts +0 -52
- package/dist/src/components/alert/alertIcon/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertIcon/index.js +0 -66
- package/dist/src/components/alert/alertTitle/index.d.ts +0 -46
- package/dist/src/components/alert/alertTitle/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertTitle/index.js +0 -48
- package/dist/src/components/audioPlayer/index.d.ts +0 -60
- package/dist/src/components/audioPlayer/index.d.ts.map +0 -1
- package/dist/src/components/audioPlayer/index.js +0 -130
- package/dist/src/components/badge/index.d.ts +0 -51
- package/dist/src/components/badge/index.d.ts.map +0 -1
- package/dist/src/components/badge/index.js +0 -49
- package/dist/src/components/button/index.d.ts +0 -60
- package/dist/src/components/button/index.d.ts.map +0 -1
- package/dist/src/components/button/index.js +0 -61
- package/dist/src/components/cardTab/cardTabButton/index.d.ts +0 -72
- package/dist/src/components/cardTab/cardTabButton/index.d.ts.map +0 -1
- package/dist/src/components/cardTab/cardTabButton/index.js +0 -80
- package/dist/src/components/cardTab/cardTabContainer/index.d.ts +0 -83
- package/dist/src/components/cardTab/cardTabContainer/index.d.ts.map +0 -1
- package/dist/src/components/cardTab/cardTabContainer/index.js +0 -88
- package/dist/src/components/cardTab/cardTabContext.d.ts +0 -16
- package/dist/src/components/cardTab/cardTabContext.d.ts.map +0 -1
- package/dist/src/components/cardTab/cardTabContext.js +0 -10
- package/dist/src/components/checkbox/index.d.ts +0 -73
- package/dist/src/components/checkbox/index.d.ts.map +0 -1
- package/dist/src/components/checkbox/index.js +0 -86
- package/dist/src/components/currencyInput/index.d.ts +0 -98
- package/dist/src/components/currencyInput/index.d.ts.map +0 -1
- package/dist/src/components/currencyInput/index.js +0 -140
- package/dist/src/components/divider/index.d.ts +0 -45
- package/dist/src/components/divider/index.d.ts.map +0 -1
- package/dist/src/components/divider/index.js +0 -45
- package/dist/src/components/drawer/drawerContainer/index.d.ts +0 -71
- package/dist/src/components/drawer/drawerContainer/index.d.ts.map +0 -1
- package/dist/src/components/drawer/drawerContainer/index.js +0 -75
- package/dist/src/components/drawer/drawerContext.d.ts +0 -12
- package/dist/src/components/drawer/drawerContext.d.ts.map +0 -1
- package/dist/src/components/drawer/drawerContext.js +0 -10
- package/dist/src/components/drawer/drawerHeader/index.d.ts +0 -55
- package/dist/src/components/drawer/drawerHeader/index.d.ts.map +0 -1
- package/dist/src/components/drawer/drawerHeader/index.js +0 -58
- package/dist/src/components/fieldError/index.d.ts +0 -29
- package/dist/src/components/fieldError/index.d.ts.map +0 -1
- package/dist/src/components/fieldError/index.js +0 -33
- package/dist/src/components/fieldLabel/index.d.ts +0 -38
- package/dist/src/components/fieldLabel/index.d.ts.map +0 -1
- package/dist/src/components/fieldLabel/index.js +0 -39
- package/dist/src/components/fieldWrapper/index.d.ts +0 -41
- package/dist/src/components/fieldWrapper/index.d.ts.map +0 -1
- package/dist/src/components/fieldWrapper/index.js +0 -41
- package/dist/src/components/iconButton/index.d.ts +0 -44
- package/dist/src/components/iconButton/index.d.ts.map +0 -1
- package/dist/src/components/iconButton/index.js +0 -41
- package/dist/src/components/input/index.d.ts +0 -81
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/input/index.js +0 -112
- package/dist/src/components/maskedInput/index.d.ts +0 -103
- package/dist/src/components/maskedInput/index.d.ts.map +0 -1
- package/dist/src/components/maskedInput/index.js +0 -130
- package/dist/src/components/modal/modalContainer/index.d.ts +0 -78
- package/dist/src/components/modal/modalContainer/index.d.ts.map +0 -1
- package/dist/src/components/modal/modalContainer/index.js +0 -82
- package/dist/src/components/modal/modalContext.d.ts +0 -12
- package/dist/src/components/modal/modalContext.d.ts.map +0 -1
- package/dist/src/components/modal/modalContext.js +0 -10
- package/dist/src/components/modal/modalFooter/index.d.ts +0 -72
- package/dist/src/components/modal/modalFooter/index.d.ts.map +0 -1
- package/dist/src/components/modal/modalFooter/index.js +0 -72
- package/dist/src/components/modal/modalHeader/index.d.ts +0 -66
- package/dist/src/components/modal/modalHeader/index.d.ts.map +0 -1
- package/dist/src/components/modal/modalHeader/index.js +0 -69
- package/dist/src/components/multiSelect/index.d.ts +0 -125
- package/dist/src/components/multiSelect/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/index.js +0 -169
- package/dist/src/components/multiSelect/multiSelectChevron/index.d.ts +0 -11
- package/dist/src/components/multiSelect/multiSelectChevron/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectChevron/index.js +0 -13
- package/dist/src/components/multiSelect/multiSelectContainer/index.d.ts +0 -19
- package/dist/src/components/multiSelect/multiSelectContainer/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectContainer/index.js +0 -11
- package/dist/src/components/multiSelect/multiSelectContent/index.d.ts +0 -9
- package/dist/src/components/multiSelect/multiSelectContent/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectContent/index.js +0 -8
- package/dist/src/components/multiSelect/multiSelectMark/index.d.ts +0 -10
- package/dist/src/components/multiSelect/multiSelectMark/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectMark/index.js +0 -11
- package/dist/src/components/multiSelect/multiSelectOption/index.d.ts +0 -11
- package/dist/src/components/multiSelect/multiSelectOption/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectOption/index.js +0 -10
- package/dist/src/components/multiSelect/multiSelectOptionsContainer/index.d.ts +0 -12
- package/dist/src/components/multiSelect/multiSelectOptionsContainer/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectOptionsContainer/index.js +0 -44
- package/dist/src/components/multiSelect/multiSelectOverlay/index.d.ts +0 -8
- package/dist/src/components/multiSelect/multiSelectOverlay/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectOverlay/index.js +0 -9
- package/dist/src/components/multiSelect/multiSelectSpinner/index.d.ts +0 -8
- package/dist/src/components/multiSelect/multiSelectSpinner/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectSpinner/index.js +0 -10
- package/dist/src/components/phoneInput/index.d.ts +0 -127
- package/dist/src/components/phoneInput/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/index.js +0 -202
- package/dist/src/components/phoneInput/phoneInputContainer/index.d.ts +0 -18
- package/dist/src/components/phoneInput/phoneInputContainer/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputContainer/index.js +0 -11
- package/dist/src/components/phoneInput/phoneInputCountriesOverlay/index.d.ts +0 -8
- package/dist/src/components/phoneInput/phoneInputCountriesOverlay/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountriesOverlay/index.js +0 -9
- package/dist/src/components/phoneInput/phoneInputCountryOption/index.d.ts +0 -18
- package/dist/src/components/phoneInput/phoneInputCountryOption/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountryOption/index.js +0 -10
- package/dist/src/components/phoneInput/phoneInputCountryOptionsContainer/index.d.ts +0 -12
- package/dist/src/components/phoneInput/phoneInputCountryOptionsContainer/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountryOptionsContainer/index.js +0 -40
- package/dist/src/components/phoneInput/phoneInputCountrySelector/index.d.ts +0 -17
- package/dist/src/components/phoneInput/phoneInputCountrySelector/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountrySelector/index.js +0 -9
- package/dist/src/components/phoneInput/phoneInputMask/index.d.ts +0 -21
- package/dist/src/components/phoneInput/phoneInputMask/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputMask/index.js +0 -34
- package/dist/src/components/radio/radioBox/index.d.ts +0 -85
- package/dist/src/components/radio/radioBox/index.d.ts.map +0 -1
- package/dist/src/components/radio/radioBox/index.js +0 -90
- package/dist/src/components/radio/radioContext.d.ts +0 -18
- package/dist/src/components/radio/radioContext.d.ts.map +0 -1
- package/dist/src/components/radio/radioContext.js +0 -11
- package/dist/src/components/radio/radioGroup/index.d.ts +0 -92
- package/dist/src/components/radio/radioGroup/index.d.ts.map +0 -1
- package/dist/src/components/radio/radioGroup/index.js +0 -100
- package/dist/src/components/slider/index.d.ts +0 -57
- package/dist/src/components/slider/index.d.ts.map +0 -1
- package/dist/src/components/slider/index.js +0 -97
- package/dist/src/components/switch/index.d.ts +0 -94
- package/dist/src/components/switch/index.d.ts.map +0 -1
- package/dist/src/components/switch/index.js +0 -99
- package/dist/src/components/tab/tabButton/index.d.ts +0 -72
- package/dist/src/components/tab/tabButton/index.d.ts.map +0 -1
- package/dist/src/components/tab/tabButton/index.js +0 -80
- package/dist/src/components/tab/tabContainer/index.d.ts +0 -83
- package/dist/src/components/tab/tabContainer/index.d.ts.map +0 -1
- package/dist/src/components/tab/tabContainer/index.js +0 -88
- package/dist/src/components/tab/tabContext.d.ts +0 -16
- package/dist/src/components/tab/tabContext.d.ts.map +0 -1
- package/dist/src/components/tab/tabContext.js +0 -10
- package/dist/src/components/textarea/index.d.ts +0 -103
- package/dist/src/components/textarea/index.d.ts.map +0 -1
- package/dist/src/components/textarea/index.js +0 -127
- package/dist/src/components/tooltip/index.d.ts +0 -80
- package/dist/src/components/tooltip/index.d.ts.map +0 -1
- package/dist/src/components/tooltip/index.js +0 -135
- package/dist/src/hooks/useForm.d.ts +0 -52
- package/dist/src/hooks/useForm.d.ts.map +0 -1
- package/dist/src/hooks/useForm.js +0 -52
- package/dist/src/hooks/useScopedParams.d.ts +0 -89
- package/dist/src/hooks/useScopedParams.d.ts.map +0 -1
- package/dist/src/hooks/useScopedParams.js +0 -107
- package/dist/src/hooks/useScrollLock.d.ts +0 -39
- package/dist/src/hooks/useScrollLock.d.ts.map +0 -1
- package/dist/src/hooks/useScrollLock.js +0 -49
- package/dist/src/hooks/useSlider.d.ts +0 -31
- package/dist/src/hooks/useSlider.d.ts.map +0 -1
- package/dist/src/hooks/useSlider.js +0 -49
- package/dist/src/index.d.ts +0 -40
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -42
- package/dist/src/providers/formProvider.d.ts +0 -76
- package/dist/src/providers/formProvider.d.ts.map +0 -1
- package/dist/src/providers/formProvider.js +0 -69
- package/dist/src/services/iconRenderer.d.ts +0 -10
- package/dist/src/services/iconRenderer.d.ts.map +0 -1
- package/dist/src/services/iconRenderer.js +0 -13
- package/dist/src/services/maskCurrencyValues.d.ts +0 -4
- package/dist/src/services/maskCurrencyValues.d.ts.map +0 -1
- package/dist/src/services/maskCurrencyValues.js +0 -23
- package/dist/src/utils/phoneInputUtilities.d.ts +0 -1722
- package/dist/src/utils/phoneInputUtilities.d.ts.map +0 -1
- package/dist/src/utils/phoneInputUtilities.js +0 -99
- package/dist/style.css +0 -1
- package/dist/vite.config.d.ts +0 -3
- package/dist/vite.config.d.ts.map +0 -1
- package/dist/vite.config.js +0 -24
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -4
- package/documentation/css/reset.css +0 -38
- package/documentation/css/variables.css +0 -41
- package/documentation/index.html +0 -13
- package/documentation/src/app.tsx +0 -93
- package/documentation/src/components/examples.alert.tsx +0 -49
- package/documentation/src/components/examples.audioPlayer.tsx +0 -16
- package/documentation/src/components/examples.badge.tsx +0 -38
- package/documentation/src/components/examples.button.tsx +0 -66
- package/documentation/src/components/examples.cardTab.tsx +0 -36
- package/documentation/src/components/examples.checkbox.tsx +0 -94
- package/documentation/src/components/examples.currencyInput.tsx +0 -263
- package/documentation/src/components/examples.divider.tsx +0 -12
- package/documentation/src/components/examples.drawer.tsx +0 -43
- package/documentation/src/components/examples.iconButton.tsx +0 -78
- package/documentation/src/components/examples.input.tsx +0 -256
- package/documentation/src/components/examples.maskedInput.tsx +0 -274
- package/documentation/src/components/examples.modal.tsx +0 -31
- package/documentation/src/components/examples.multiSelect.tsx +0 -320
- package/documentation/src/components/examples.phoneInput.tsx +0 -262
- package/documentation/src/components/examples.radio.tsx +0 -149
- package/documentation/src/components/examples.slider.tsx +0 -28
- package/documentation/src/components/examples.switch.tsx +0 -180
- package/documentation/src/components/examples.tab.tsx +0 -36
- package/documentation/src/components/examples.texarea.tsx +0 -188
- package/documentation/src/components/examples.tooltip.tsx +0 -45
- package/documentation/src/main.tsx +0 -12
- package/documentation/src/ui/box.tsx +0 -17
- package/documentation/src/ui/row.tsx +0 -11
- package/documentation/vite.config.ts +0 -13
- package/src/components/alert/alertContainer/index.tsx +0 -87
- package/src/components/alert/alertContainer/styles.css +0 -33
- package/src/components/alert/alertContent/index.tsx +0 -53
- package/src/components/alert/alertContent/styles.css +0 -5
- package/src/components/alert/alertDescription/index.tsx +0 -57
- package/src/components/alert/alertDescription/styles.css +0 -7
- package/src/components/alert/alertIcon/index.tsx +0 -79
- package/src/components/alert/alertIcon/styles.css +0 -23
- package/src/components/alert/alertTitle/index.tsx +0 -54
- package/src/components/alert/alertTitle/styles.css +0 -7
- package/src/components/audioPlayer/index.tsx +0 -187
- package/src/components/audioPlayer/styles.css +0 -50
- package/src/components/badge/index.tsx +0 -80
- package/src/components/badge/styles.css +0 -145
- package/src/components/button/index.tsx +0 -104
- package/src/components/button/styles.css +0 -208
- package/src/components/cardTab/cardTabButton/index.tsx +0 -114
- package/src/components/cardTab/cardTabButton/styles.css +0 -30
- package/src/components/cardTab/cardTabContainer/index.tsx +0 -121
- package/src/components/cardTab/cardTabContainer/styles.css +0 -9
- package/src/components/cardTab/cardTabContext.tsx +0 -30
- package/src/components/checkbox/index.tsx +0 -158
- package/src/components/checkbox/styles.css +0 -78
- package/src/components/currencyInput/index.tsx +0 -312
- package/src/components/currencyInput/style.css +0 -226
- package/src/components/divider/index.tsx +0 -58
- package/src/components/divider/styles.css +0 -17
- package/src/components/drawer/drawerContainer/index.tsx +0 -123
- package/src/components/drawer/drawerContainer/styles.css +0 -46
- package/src/components/drawer/drawerContext.tsx +0 -26
- package/src/components/drawer/drawerHeader/index.tsx +0 -88
- package/src/components/drawer/drawerHeader/styles.css +0 -38
- package/src/components/fieldError/index.tsx +0 -43
- package/src/components/fieldError/styles.css +0 -6
- package/src/components/fieldLabel/index.tsx +0 -52
- package/src/components/fieldLabel/styles.css +0 -15
- package/src/components/fieldWrapper/index.tsx +0 -54
- package/src/components/fieldWrapper/styles.css +0 -7
- package/src/components/iconButton/index.tsx +0 -83
- package/src/components/iconButton/styles.css +0 -166
- package/src/components/input/index.tsx +0 -233
- package/src/components/input/style.css +0 -226
- package/src/components/maskedInput/index.tsx +0 -260
- package/src/components/maskedInput/style.css +0 -226
- package/src/components/modal/modalContainer/index.tsx +0 -127
- package/src/components/modal/modalContainer/styles.css +0 -37
- package/src/components/modal/modalContext.tsx +0 -26
- package/src/components/modal/modalFooter/index.tsx +0 -80
- package/src/components/modal/modalFooter/styles.css +0 -27
- package/src/components/modal/modalHeader/index.tsx +0 -99
- package/src/components/modal/modalHeader/styles.css +0 -38
- package/src/components/multiSelect/index.tsx +0 -319
- package/src/components/multiSelect/multiSelectChevron/index.tsx +0 -26
- package/src/components/multiSelect/multiSelectChevron/styles.css +0 -7
- package/src/components/multiSelect/multiSelectContainer/index.tsx +0 -51
- package/src/components/multiSelect/multiSelectContainer/styles.css +0 -134
- package/src/components/multiSelect/multiSelectContent/index.tsx +0 -15
- package/src/components/multiSelect/multiSelectContent/styles.css +0 -24
- package/src/components/multiSelect/multiSelectMark/index.tsx +0 -32
- package/src/components/multiSelect/multiSelectMark/styles.css +0 -44
- package/src/components/multiSelect/multiSelectOption/index.tsx +0 -25
- package/src/components/multiSelect/multiSelectOption/styles.css +0 -37
- package/src/components/multiSelect/multiSelectOptionsContainer/index.tsx +0 -81
- package/src/components/multiSelect/multiSelectOptionsContainer/styles.css +0 -45
- package/src/components/multiSelect/multiSelectOverlay/index.tsx +0 -14
- package/src/components/multiSelect/multiSelectOverlay/styles.css +0 -8
- package/src/components/multiSelect/multiSelectSpinner/index.tsx +0 -22
- package/src/components/multiSelect/multiSelectSpinner/styles.css +0 -12
- package/src/components/phoneInput/index.tsx +0 -332
- package/src/components/phoneInput/phoneInputContainer/index.tsx +0 -46
- package/src/components/phoneInput/phoneInputContainer/styles.css +0 -59
- package/src/components/phoneInput/phoneInputCountriesOverlay/index.tsx +0 -16
- package/src/components/phoneInput/phoneInputCountriesOverlay/styles.css +0 -8
- package/src/components/phoneInput/phoneInputCountryOption/index.tsx +0 -35
- package/src/components/phoneInput/phoneInputCountryOption/styles.css +0 -50
- package/src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx +0 -77
- package/src/components/phoneInput/phoneInputCountryOptionsContainer/styles.css +0 -59
- package/src/components/phoneInput/phoneInputCountrySelector/index.tsx +0 -37
- package/src/components/phoneInput/phoneInputCountrySelector/styles.css +0 -26
- package/src/components/phoneInput/phoneInputMask/index.tsx +0 -105
- package/src/components/phoneInput/phoneInputMask/style.css +0 -36
- package/src/components/radio/radioBox/index.tsx +0 -124
- package/src/components/radio/radioBox/styles.css +0 -95
- package/src/components/radio/radioContext.tsx +0 -34
- package/src/components/radio/radioGroup/index.tsx +0 -150
- package/src/components/radio/radioGroup/styles.css +0 -5
- package/src/components/slider/index.tsx +0 -132
- package/src/components/slider/styles.css +0 -45
- package/src/components/switch/index.tsx +0 -156
- package/src/components/switch/styles.css +0 -90
- package/src/components/tab/tabButton/index.tsx +0 -114
- package/src/components/tab/tabButton/styles.css +0 -41
- package/src/components/tab/tabContainer/index.tsx +0 -121
- package/src/components/tab/tabContainer/styles.css +0 -11
- package/src/components/tab/tabContext.tsx +0 -28
- package/src/components/textarea/index.tsx +0 -193
- package/src/components/textarea/styles.css +0 -93
- package/src/components/tooltip/index.tsx +0 -172
- package/src/components/tooltip/styles.css +0 -112
- package/src/hooks/useForm.ts +0 -55
- package/src/hooks/useScopedParams.ts +0 -111
- package/src/hooks/useScrollLock.ts +0 -52
- package/src/hooks/useSlider.ts +0 -52
- package/src/index.ts +0 -44
- package/src/providers/formProvider.tsx +0 -88
- package/src/services/iconRenderer.tsx +0 -23
- package/src/services/maskCurrencyValues.ts +0 -54
- package/src/utils/phoneInputUtilities.ts +0 -138
- package/tsconfig.json +0 -35
- package/variables.css +0 -41
- package/vite.config.ts +0 -24
- package/vitest.config.ts +0 -5
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { type Replacement } from "@react-input/mask";
|
|
2
|
-
import { LucideIcon } from "lucide-react";
|
|
3
|
-
import { InputHTMLAttributes } from "react";
|
|
4
|
-
import "./style.css";
|
|
5
|
-
type MaskedInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix" | "name" | "type"> & {
|
|
6
|
-
name: string;
|
|
7
|
-
mask: string;
|
|
8
|
-
replacement: string | Replacement;
|
|
9
|
-
separate?: boolean;
|
|
10
|
-
showMask?: boolean;
|
|
11
|
-
label?: string;
|
|
12
|
-
errorMessage?: string;
|
|
13
|
-
isLoading?: boolean;
|
|
14
|
-
size?: "md" | "lg";
|
|
15
|
-
variant?: "solid" | "outline" | "underline";
|
|
16
|
-
prefix?: string | LucideIcon;
|
|
17
|
-
suffix?: string | LucideIcon;
|
|
18
|
-
showAsterisk?: boolean;
|
|
19
|
-
leftIcon?: LucideIcon;
|
|
20
|
-
rightIcon?: LucideIcon;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* MaskedInput component - used for text input fields with input masking support, labels, validation, icons, and loading states
|
|
24
|
-
*
|
|
25
|
-
* @param props - MaskedInput component properties
|
|
26
|
-
* @param props.name - Required field name for form handling
|
|
27
|
-
* @param props.mask - Input mask pattern (e.g., "___.___.___-__" for CPF)
|
|
28
|
-
* @param props.replacement - Character or replacement configuration for mask positions
|
|
29
|
-
* @param props.separate - Whether to separate mask characters from input value. Default: undefined
|
|
30
|
-
* @param props.showMask - Whether to show the mask placeholder. Default: undefined
|
|
31
|
-
* @param props.label - Optional label text to display above the input
|
|
32
|
-
* @param props.errorMessage - Error message to display below the input
|
|
33
|
-
* @param props.isLoading - Controls loading state with spinner. Default: false
|
|
34
|
-
* @param props.size - Input size. Default: "md"
|
|
35
|
-
* @param props.variant - Visual variant of the input. Default: "solid"
|
|
36
|
-
* @param props.prefix - Text or icon to display at the beginning of the input
|
|
37
|
-
* @param props.suffix - Text or icon to display at the end of the input
|
|
38
|
-
* @param props.showAsterisk - Whether to show asterisk on label for required fields
|
|
39
|
-
* @param props.leftIcon - Optional icon to display on the left side
|
|
40
|
-
* @param props.rightIcon - Optional icon to display on the right side
|
|
41
|
-
*
|
|
42
|
-
* **...Other valid HTML properties for input element (except 'type' which is controlled by the mask)**
|
|
43
|
-
*
|
|
44
|
-
* @returns MaskedInput JSX element wrapped in FieldGroup with optional label and error
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```tsx
|
|
48
|
-
* // Basic masked input for phone number
|
|
49
|
-
* <MaskedInput
|
|
50
|
-
* name="phone"
|
|
51
|
-
* mask="(__) _____-____"
|
|
52
|
-
* replacement={{ _: /\d/ }}
|
|
53
|
-
* placeholder="(00) 00000-0000"
|
|
54
|
-
* />
|
|
55
|
-
*
|
|
56
|
-
* // CPF input with label and validation
|
|
57
|
-
* <MaskedInput
|
|
58
|
-
* name="cpf"
|
|
59
|
-
* label="CPF"
|
|
60
|
-
* mask="___.___.___-__"
|
|
61
|
-
* replacement="_"
|
|
62
|
-
* showAsterisk
|
|
63
|
-
* errorMessage="Please enter a valid CPF"
|
|
64
|
-
* showMask
|
|
65
|
-
* />
|
|
66
|
-
*
|
|
67
|
-
* // Credit card input with icons and loading state
|
|
68
|
-
* <MaskedInput
|
|
69
|
-
* name="creditCard"
|
|
70
|
-
* label="Credit Card"
|
|
71
|
-
* mask="____ ____ ____ ____"
|
|
72
|
-
* replacement={{ _: /\d/ }}
|
|
73
|
-
* leftIcon={CreditCardIcon}
|
|
74
|
-
* rightIcon={ShieldIcon}
|
|
75
|
-
* isLoading
|
|
76
|
-
* />
|
|
77
|
-
*
|
|
78
|
-
* // Date input with prefix/suffix
|
|
79
|
-
* <MaskedInput
|
|
80
|
-
* name="birthDate"
|
|
81
|
-
* label="Birth Date"
|
|
82
|
-
* mask="__/__/____"
|
|
83
|
-
* replacement="_"
|
|
84
|
-
* prefix="📅"
|
|
85
|
-
* variant="outline"
|
|
86
|
-
* separate
|
|
87
|
-
* />
|
|
88
|
-
*
|
|
89
|
-
* // Large masked input with underline variant
|
|
90
|
-
* <MaskedInput
|
|
91
|
-
* name="zipCode"
|
|
92
|
-
* label="ZIP Code"
|
|
93
|
-
* mask="_____-___"
|
|
94
|
-
* replacement={{ _: /\d/ }}
|
|
95
|
-
* size="lg"
|
|
96
|
-
* variant="underline"
|
|
97
|
-
* placeholder="00000-000"
|
|
98
|
-
* />
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
declare function MaskedInput(props: MaskedInputProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
-
export { MaskedInput };
|
|
103
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/maskedInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAW,UAAU,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAEL,mBAAmB,EAKpB,MAAM,OAAO,CAAC;AASf,OAAO,aAAa,CAAC;AAErB,KAAK,gBAAgB,GAAG,IAAI,CAC1B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CACpC,GAAG;IACF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,WAAW,CAAC;IAElC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;IAE5C,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB,CAAC;AASF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AAEH,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA4H3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { InputMask } from "@react-input/mask";
|
|
3
|
-
import { Loader2 } from "lucide-react";
|
|
4
|
-
import { forwardRef, useId, useRef, useState, } from "react";
|
|
5
|
-
import { useForm } from "../../hooks/useForm";
|
|
6
|
-
import { IconRenderer } from "../../services/iconRenderer";
|
|
7
|
-
import { FieldError } from "../fieldError";
|
|
8
|
-
import { FieldLabel } from "../fieldLabel";
|
|
9
|
-
import { FieldWrapper } from "../fieldWrapper";
|
|
10
|
-
import "./style.css";
|
|
11
|
-
const BaseInput = forwardRef((props, ref) => {
|
|
12
|
-
return _jsx("input", { ref: ref, ...props });
|
|
13
|
-
});
|
|
14
|
-
/**
|
|
15
|
-
* MaskedInput component - used for text input fields with input masking support, labels, validation, icons, and loading states
|
|
16
|
-
*
|
|
17
|
-
* @param props - MaskedInput component properties
|
|
18
|
-
* @param props.name - Required field name for form handling
|
|
19
|
-
* @param props.mask - Input mask pattern (e.g., "___.___.___-__" for CPF)
|
|
20
|
-
* @param props.replacement - Character or replacement configuration for mask positions
|
|
21
|
-
* @param props.separate - Whether to separate mask characters from input value. Default: undefined
|
|
22
|
-
* @param props.showMask - Whether to show the mask placeholder. Default: undefined
|
|
23
|
-
* @param props.label - Optional label text to display above the input
|
|
24
|
-
* @param props.errorMessage - Error message to display below the input
|
|
25
|
-
* @param props.isLoading - Controls loading state with spinner. Default: false
|
|
26
|
-
* @param props.size - Input size. Default: "md"
|
|
27
|
-
* @param props.variant - Visual variant of the input. Default: "solid"
|
|
28
|
-
* @param props.prefix - Text or icon to display at the beginning of the input
|
|
29
|
-
* @param props.suffix - Text or icon to display at the end of the input
|
|
30
|
-
* @param props.showAsterisk - Whether to show asterisk on label for required fields
|
|
31
|
-
* @param props.leftIcon - Optional icon to display on the left side
|
|
32
|
-
* @param props.rightIcon - Optional icon to display on the right side
|
|
33
|
-
*
|
|
34
|
-
* **...Other valid HTML properties for input element (except 'type' which is controlled by the mask)**
|
|
35
|
-
*
|
|
36
|
-
* @returns MaskedInput JSX element wrapped in FieldGroup with optional label and error
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```tsx
|
|
40
|
-
* // Basic masked input for phone number
|
|
41
|
-
* <MaskedInput
|
|
42
|
-
* name="phone"
|
|
43
|
-
* mask="(__) _____-____"
|
|
44
|
-
* replacement={{ _: /\d/ }}
|
|
45
|
-
* placeholder="(00) 00000-0000"
|
|
46
|
-
* />
|
|
47
|
-
*
|
|
48
|
-
* // CPF input with label and validation
|
|
49
|
-
* <MaskedInput
|
|
50
|
-
* name="cpf"
|
|
51
|
-
* label="CPF"
|
|
52
|
-
* mask="___.___.___-__"
|
|
53
|
-
* replacement="_"
|
|
54
|
-
* showAsterisk
|
|
55
|
-
* errorMessage="Please enter a valid CPF"
|
|
56
|
-
* showMask
|
|
57
|
-
* />
|
|
58
|
-
*
|
|
59
|
-
* // Credit card input with icons and loading state
|
|
60
|
-
* <MaskedInput
|
|
61
|
-
* name="creditCard"
|
|
62
|
-
* label="Credit Card"
|
|
63
|
-
* mask="____ ____ ____ ____"
|
|
64
|
-
* replacement={{ _: /\d/ }}
|
|
65
|
-
* leftIcon={CreditCardIcon}
|
|
66
|
-
* rightIcon={ShieldIcon}
|
|
67
|
-
* isLoading
|
|
68
|
-
* />
|
|
69
|
-
*
|
|
70
|
-
* // Date input with prefix/suffix
|
|
71
|
-
* <MaskedInput
|
|
72
|
-
* name="birthDate"
|
|
73
|
-
* label="Birth Date"
|
|
74
|
-
* mask="__/__/____"
|
|
75
|
-
* replacement="_"
|
|
76
|
-
* prefix="📅"
|
|
77
|
-
* variant="outline"
|
|
78
|
-
* separate
|
|
79
|
-
* />
|
|
80
|
-
*
|
|
81
|
-
* // Large masked input with underline variant
|
|
82
|
-
* <MaskedInput
|
|
83
|
-
* name="zipCode"
|
|
84
|
-
* label="ZIP Code"
|
|
85
|
-
* mask="_____-___"
|
|
86
|
-
* replacement={{ _: /\d/ }}
|
|
87
|
-
* size="lg"
|
|
88
|
-
* variant="underline"
|
|
89
|
-
* placeholder="00000-000"
|
|
90
|
-
* />
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
function MaskedInput(props) {
|
|
94
|
-
const { name, disabled, title, style, variant = "solid", separate, mask, showMask, replacement, label, className: baseClassName = "", prefix, suffix, isLoading = false, leftIcon, readOnly, onFocus, onBlur, errorMessage: baseErrorMessage, defaultValue, showAsterisk, rightIcon, size = "md", id, ...rest } = props;
|
|
95
|
-
const { fieldErrors } = useForm();
|
|
96
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
97
|
-
const inputRef = useRef(null);
|
|
98
|
-
const inputId = id || useId();
|
|
99
|
-
const errorMessage = baseErrorMessage || fieldErrors?.[name];
|
|
100
|
-
const isError = !!errorMessage;
|
|
101
|
-
const iconSizes = { md: 20, lg: 20 };
|
|
102
|
-
const iconSize = iconSizes[size];
|
|
103
|
-
const loadingPosition = rightIcon ? "right" : "left";
|
|
104
|
-
const showLeftSpinner = loadingPosition === "left" && isLoading;
|
|
105
|
-
const showRightSpinner = loadingPosition === "right" && isLoading;
|
|
106
|
-
function handleSectionClick() {
|
|
107
|
-
if (disabled || !inputRef?.current)
|
|
108
|
-
return;
|
|
109
|
-
setIsFocused(true);
|
|
110
|
-
inputRef.current.focus();
|
|
111
|
-
}
|
|
112
|
-
function handleFocus(e) {
|
|
113
|
-
setIsFocused(true);
|
|
114
|
-
if (onFocus)
|
|
115
|
-
onFocus(e);
|
|
116
|
-
}
|
|
117
|
-
function handleBlur(e) {
|
|
118
|
-
setIsFocused(false);
|
|
119
|
-
if (onBlur)
|
|
120
|
-
onBlur(e);
|
|
121
|
-
}
|
|
122
|
-
const hasPrefix = !!prefix ? "hasPrefix" : "";
|
|
123
|
-
const hasSuffix = !!suffix ? "hasSuffix" : "";
|
|
124
|
-
const errored = isError ? "errored" : "";
|
|
125
|
-
const opacity = disabled || readOnly || isLoading ? "opacity" : "";
|
|
126
|
-
const focused = isFocused ? "focused" : "";
|
|
127
|
-
const className = `arkynMaskedInput ${hasPrefix} ${hasSuffix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
|
128
|
-
return (_jsxs(FieldWrapper, { children: [label && (_jsx(FieldLabel, { showAsterisk: showAsterisk, htmlFor: inputId, children: label })), _jsxs("section", { title: title, style: style, onClick: handleSectionClick, className: className, children: [_jsx(IconRenderer, { iconSize: iconSize, icon: prefix, className: "prefix" }), _jsx(IconRenderer, { show: showLeftSpinner, iconSize: iconSize, className: "spinner", icon: Loader2 }), _jsx(IconRenderer, { show: !isLoading, icon: leftIcon, iconSize: iconSize }), _jsx(InputMask, { component: BaseInput, mask: mask, replacement: replacement, separate: separate, showMask: showMask, ref: inputRef, onFocus: handleFocus, onBlur: handleBlur, disabled: disabled, readOnly: readOnly, id: inputId, ...rest }), _jsx(IconRenderer, { show: !isLoading, icon: rightIcon, iconSize: iconSize }), _jsx(IconRenderer, { show: showRightSpinner, iconSize: iconSize, className: "spinner", icon: Loader2 }), _jsx(IconRenderer, { iconSize: iconSize, icon: suffix, className: "suffix" })] }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
|
|
129
|
-
}
|
|
130
|
-
export { MaskedInput };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import "./styles.css";
|
|
3
|
-
type ModalContainerProps = HTMLAttributes<HTMLElement> & {
|
|
4
|
-
isVisible: boolean;
|
|
5
|
-
makeInvisible: () => void;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* ModalContainer component - animated overlay modal for dialogs and content
|
|
9
|
-
*
|
|
10
|
-
* @param props - ModalContainer component properties
|
|
11
|
-
* @param props.isVisible - Controls modal visibility state
|
|
12
|
-
* @param props.makeInvisible - Callback function to hide the modal
|
|
13
|
-
*
|
|
14
|
-
* **...Other valid HTML properties for aside element**
|
|
15
|
-
*
|
|
16
|
-
* @returns ModalContainer JSX element
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* // Basic modal
|
|
21
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
22
|
-
* <ModalContainer
|
|
23
|
-
* isVisible={isOpen}
|
|
24
|
-
* makeInvisible={() => setIsOpen(false)}
|
|
25
|
-
* >
|
|
26
|
-
* <p>Modal content</p>
|
|
27
|
-
* </ModalContainer>
|
|
28
|
-
*
|
|
29
|
-
* // Modal with custom styling
|
|
30
|
-
* <ModalContainer
|
|
31
|
-
* isVisible={isOpen}
|
|
32
|
-
* makeInvisible={() => setIsOpen(false)}
|
|
33
|
-
* className="custom-modal"
|
|
34
|
-
* >
|
|
35
|
-
* <div className="modal-content">
|
|
36
|
-
* <h2>Confirmation</h2>
|
|
37
|
-
* <p>Are you sure you want to proceed?</p>
|
|
38
|
-
* </div>
|
|
39
|
-
* </ModalContainer>
|
|
40
|
-
*
|
|
41
|
-
* // Complete modal example
|
|
42
|
-
* function ModalExample() {
|
|
43
|
-
* const [isModalOpen, setIsModalOpen] = useState(false);
|
|
44
|
-
*
|
|
45
|
-
* return (
|
|
46
|
-
* <>
|
|
47
|
-
* <button onClick={() => setIsModalOpen(true)}>
|
|
48
|
-
* Open Modal
|
|
49
|
-
* </button>
|
|
50
|
-
*
|
|
51
|
-
* <ModalContainer
|
|
52
|
-
* isVisible={isModalOpen}
|
|
53
|
-
* makeInvisible={() => setIsModalOpen(false)}
|
|
54
|
-
* >
|
|
55
|
-
* <div className="modal-dialog">
|
|
56
|
-
* <header>
|
|
57
|
-
* <h2>Modal Title</h2>
|
|
58
|
-
* </header>
|
|
59
|
-
*
|
|
60
|
-
* <main>
|
|
61
|
-
* <p>This is the modal content.</p>
|
|
62
|
-
* </main>
|
|
63
|
-
*
|
|
64
|
-
* <footer>
|
|
65
|
-
* <button onClick={() => setIsModalOpen(false)}>
|
|
66
|
-
* Close
|
|
67
|
-
* </button>
|
|
68
|
-
* </footer>
|
|
69
|
-
* </div>
|
|
70
|
-
* </ModalContainer>
|
|
71
|
-
* </>
|
|
72
|
-
* );
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
declare function ModalContainer(args: ModalContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
77
|
-
export { ModalContainer };
|
|
78
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/modal/modalContainer/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,cAAc,CAAC;AAEtB,KAAK,mBAAmB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,iBAAS,cAAc,CAAC,IAAI,EAAE,mBAAmB,2CA0ChD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AnimatePresence, motion } from "framer-motion";
|
|
3
|
-
import { useScrollLock } from "../../../hooks/useScrollLock";
|
|
4
|
-
import { ModalProvider } from "../modalContext";
|
|
5
|
-
import "./styles.css";
|
|
6
|
-
/**
|
|
7
|
-
* ModalContainer component - animated overlay modal for dialogs and content
|
|
8
|
-
*
|
|
9
|
-
* @param props - ModalContainer component properties
|
|
10
|
-
* @param props.isVisible - Controls modal visibility state
|
|
11
|
-
* @param props.makeInvisible - Callback function to hide the modal
|
|
12
|
-
*
|
|
13
|
-
* **...Other valid HTML properties for aside element**
|
|
14
|
-
*
|
|
15
|
-
* @returns ModalContainer JSX element
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* // Basic modal
|
|
20
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
21
|
-
* <ModalContainer
|
|
22
|
-
* isVisible={isOpen}
|
|
23
|
-
* makeInvisible={() => setIsOpen(false)}
|
|
24
|
-
* >
|
|
25
|
-
* <p>Modal content</p>
|
|
26
|
-
* </ModalContainer>
|
|
27
|
-
*
|
|
28
|
-
* // Modal with custom styling
|
|
29
|
-
* <ModalContainer
|
|
30
|
-
* isVisible={isOpen}
|
|
31
|
-
* makeInvisible={() => setIsOpen(false)}
|
|
32
|
-
* className="custom-modal"
|
|
33
|
-
* >
|
|
34
|
-
* <div className="modal-content">
|
|
35
|
-
* <h2>Confirmation</h2>
|
|
36
|
-
* <p>Are you sure you want to proceed?</p>
|
|
37
|
-
* </div>
|
|
38
|
-
* </ModalContainer>
|
|
39
|
-
*
|
|
40
|
-
* // Complete modal example
|
|
41
|
-
* function ModalExample() {
|
|
42
|
-
* const [isModalOpen, setIsModalOpen] = useState(false);
|
|
43
|
-
*
|
|
44
|
-
* return (
|
|
45
|
-
* <>
|
|
46
|
-
* <button onClick={() => setIsModalOpen(true)}>
|
|
47
|
-
* Open Modal
|
|
48
|
-
* </button>
|
|
49
|
-
*
|
|
50
|
-
* <ModalContainer
|
|
51
|
-
* isVisible={isModalOpen}
|
|
52
|
-
* makeInvisible={() => setIsModalOpen(false)}
|
|
53
|
-
* >
|
|
54
|
-
* <div className="modal-dialog">
|
|
55
|
-
* <header>
|
|
56
|
-
* <h2>Modal Title</h2>
|
|
57
|
-
* </header>
|
|
58
|
-
*
|
|
59
|
-
* <main>
|
|
60
|
-
* <p>This is the modal content.</p>
|
|
61
|
-
* </main>
|
|
62
|
-
*
|
|
63
|
-
* <footer>
|
|
64
|
-
* <button onClick={() => setIsModalOpen(false)}>
|
|
65
|
-
* Close
|
|
66
|
-
* </button>
|
|
67
|
-
* </footer>
|
|
68
|
-
* </div>
|
|
69
|
-
* </ModalContainer>
|
|
70
|
-
* </>
|
|
71
|
-
* );
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
function ModalContainer(args) {
|
|
76
|
-
const { isVisible, makeInvisible, children, className: baseClassName = "", ...rest } = args;
|
|
77
|
-
useScrollLock(isVisible);
|
|
78
|
-
const visibleClass = isVisible ? "visibleTrue" : "visibleFalse";
|
|
79
|
-
const className = `arkynModalContainer ${visibleClass} ${baseClassName}`;
|
|
80
|
-
return (_jsx(ModalProvider, { makeInvisible: makeInvisible, children: _jsx(AnimatePresence, { children: isVisible && (_jsxs("aside", { className: className.trim(), ...rest, children: [_jsx(motion.div, { className: "arkynModalContainerOverlay", transition: { duration: 0.15, ease: "easeOut" }, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: makeInvisible }), _jsx(motion.div, { className: "arkynModalContainerContent", transition: { duration: 0.15, ease: "easeOut" }, initial: { opacity: 0, scale: 0.75 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0 }, children: children })] })) }) }));
|
|
81
|
-
}
|
|
82
|
-
export { ModalContainer };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
type ModalContextProps = {
|
|
3
|
-
makeInvisible: () => void;
|
|
4
|
-
};
|
|
5
|
-
type ModalProviderProps = {
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
makeInvisible: () => void;
|
|
8
|
-
};
|
|
9
|
-
declare function ModalProvider(props: ModalProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare function useModal(): ModalContextProps;
|
|
11
|
-
export { ModalProvider, useModal };
|
|
12
|
-
//# sourceMappingURL=modalContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modalContext.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/modalContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AAE7D,KAAK,iBAAiB,GAAG;IACvB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAIF,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAM/C;AAED,iBAAS,QAAQ,sBAEhB;AAED,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext } from "react";
|
|
3
|
-
const modalContext = createContext({});
|
|
4
|
-
function ModalProvider(props) {
|
|
5
|
-
return (_jsx(modalContext.Provider, { value: { makeInvisible: props.makeInvisible }, children: props.children }));
|
|
6
|
-
}
|
|
7
|
-
function useModal() {
|
|
8
|
-
return useContext(modalContext);
|
|
9
|
-
}
|
|
10
|
-
export { ModalProvider, useModal };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import "./styles.css";
|
|
3
|
-
type ModalFooterProps = HTMLAttributes<HTMLElement> & {
|
|
4
|
-
alignment?: "left" | "center" | "right" | "between" | "around";
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* ModalFooter component - footer section for modals with flexible alignment options
|
|
8
|
-
*
|
|
9
|
-
* @param props - ModalFooter component properties
|
|
10
|
-
* @param props.alignment - Content alignment within the footer. Default: "right"
|
|
11
|
-
*
|
|
12
|
-
* **...Other valid HTML properties for footer element**
|
|
13
|
-
*
|
|
14
|
-
* @returns ModalFooter JSX element
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* // Basic footer with right alignment (default)
|
|
19
|
-
* <ModalFooter>
|
|
20
|
-
* <button>Cancel</button>
|
|
21
|
-
* <button>Save</button>
|
|
22
|
-
* </ModalFooter>
|
|
23
|
-
*
|
|
24
|
-
* // Left aligned footer
|
|
25
|
-
* <ModalFooter alignment="left">
|
|
26
|
-
* <button>Delete</button>
|
|
27
|
-
* </ModalFooter>
|
|
28
|
-
*
|
|
29
|
-
* // Center aligned footer
|
|
30
|
-
* <ModalFooter alignment="center">
|
|
31
|
-
* <button>OK</button>
|
|
32
|
-
* </ModalFooter>
|
|
33
|
-
*
|
|
34
|
-
* // Space between buttons
|
|
35
|
-
* <ModalFooter alignment="between">
|
|
36
|
-
* <button>Cancel</button>
|
|
37
|
-
* <button>Confirm</button>
|
|
38
|
-
* </ModalFooter>
|
|
39
|
-
*
|
|
40
|
-
* // Space around buttons
|
|
41
|
-
* <ModalFooter alignment="around">
|
|
42
|
-
* <button>Previous</button>
|
|
43
|
-
* <button>Next</button>
|
|
44
|
-
* <button>Finish</button>
|
|
45
|
-
* </ModalFooter>
|
|
46
|
-
*
|
|
47
|
-
* // Complete modal example
|
|
48
|
-
* <ModalContainer isVisible={isOpen} makeInvisible={() => setIsOpen(false)}>
|
|
49
|
-
* <div className="modal-content">
|
|
50
|
-
* <header>
|
|
51
|
-
* <h2>Confirm Action</h2>
|
|
52
|
-
* </header>
|
|
53
|
-
*
|
|
54
|
-
* <main>
|
|
55
|
-
* <p>Are you sure you want to delete this item?</p>
|
|
56
|
-
* </main>
|
|
57
|
-
*
|
|
58
|
-
* <ModalFooter alignment="right">
|
|
59
|
-
* <button onClick={() => setIsOpen(false)}>
|
|
60
|
-
* Cancel
|
|
61
|
-
* </button>
|
|
62
|
-
* <button onClick={handleDelete}>
|
|
63
|
-
* Delete
|
|
64
|
-
* </button>
|
|
65
|
-
* </ModalFooter>
|
|
66
|
-
* </div>
|
|
67
|
-
* </ModalContainer>
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
declare function ModalFooter(args: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
71
|
-
export { ModalFooter };
|
|
72
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/modal/modalFooter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACpD,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;CAChE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,iBAAS,WAAW,CAAC,IAAI,EAAE,gBAAgB,2CAK1C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "./styles.css";
|
|
3
|
-
/**
|
|
4
|
-
* ModalFooter component - footer section for modals with flexible alignment options
|
|
5
|
-
*
|
|
6
|
-
* @param props - ModalFooter component properties
|
|
7
|
-
* @param props.alignment - Content alignment within the footer. Default: "right"
|
|
8
|
-
*
|
|
9
|
-
* **...Other valid HTML properties for footer element**
|
|
10
|
-
*
|
|
11
|
-
* @returns ModalFooter JSX element
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* // Basic footer with right alignment (default)
|
|
16
|
-
* <ModalFooter>
|
|
17
|
-
* <button>Cancel</button>
|
|
18
|
-
* <button>Save</button>
|
|
19
|
-
* </ModalFooter>
|
|
20
|
-
*
|
|
21
|
-
* // Left aligned footer
|
|
22
|
-
* <ModalFooter alignment="left">
|
|
23
|
-
* <button>Delete</button>
|
|
24
|
-
* </ModalFooter>
|
|
25
|
-
*
|
|
26
|
-
* // Center aligned footer
|
|
27
|
-
* <ModalFooter alignment="center">
|
|
28
|
-
* <button>OK</button>
|
|
29
|
-
* </ModalFooter>
|
|
30
|
-
*
|
|
31
|
-
* // Space between buttons
|
|
32
|
-
* <ModalFooter alignment="between">
|
|
33
|
-
* <button>Cancel</button>
|
|
34
|
-
* <button>Confirm</button>
|
|
35
|
-
* </ModalFooter>
|
|
36
|
-
*
|
|
37
|
-
* // Space around buttons
|
|
38
|
-
* <ModalFooter alignment="around">
|
|
39
|
-
* <button>Previous</button>
|
|
40
|
-
* <button>Next</button>
|
|
41
|
-
* <button>Finish</button>
|
|
42
|
-
* </ModalFooter>
|
|
43
|
-
*
|
|
44
|
-
* // Complete modal example
|
|
45
|
-
* <ModalContainer isVisible={isOpen} makeInvisible={() => setIsOpen(false)}>
|
|
46
|
-
* <div className="modal-content">
|
|
47
|
-
* <header>
|
|
48
|
-
* <h2>Confirm Action</h2>
|
|
49
|
-
* </header>
|
|
50
|
-
*
|
|
51
|
-
* <main>
|
|
52
|
-
* <p>Are you sure you want to delete this item?</p>
|
|
53
|
-
* </main>
|
|
54
|
-
*
|
|
55
|
-
* <ModalFooter alignment="right">
|
|
56
|
-
* <button onClick={() => setIsOpen(false)}>
|
|
57
|
-
* Cancel
|
|
58
|
-
* </button>
|
|
59
|
-
* <button onClick={handleDelete}>
|
|
60
|
-
* Delete
|
|
61
|
-
* </button>
|
|
62
|
-
* </ModalFooter>
|
|
63
|
-
* </div>
|
|
64
|
-
* </ModalContainer>
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
function ModalFooter(args) {
|
|
68
|
-
const { alignment = "right", className: baseClassName, ...rest } = args;
|
|
69
|
-
const className = `arkynModalFooter ${alignment} ${baseClassName}`;
|
|
70
|
-
return _jsx("footer", { className: className.trim(), ...rest });
|
|
71
|
-
}
|
|
72
|
-
export { ModalFooter };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import "./styles.css";
|
|
3
|
-
type ModalHeaderProps = HTMLAttributes<HTMLElement> & {
|
|
4
|
-
showCloseButton?: boolean;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* ModalHeader component - header section for modals with optional close button
|
|
8
|
-
*
|
|
9
|
-
* @param props - ModalHeader component properties
|
|
10
|
-
* @param props.showCloseButton - Shows close button in header. Default: true
|
|
11
|
-
*
|
|
12
|
-
* **...Other valid HTML properties for header element**
|
|
13
|
-
*
|
|
14
|
-
* @returns ModalHeader JSX element
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* // Basic modal header with close button
|
|
19
|
-
* <ModalHeader>
|
|
20
|
-
* <h2>Modal Title</h2>
|
|
21
|
-
* </ModalHeader>
|
|
22
|
-
*
|
|
23
|
-
* // Header without close button
|
|
24
|
-
* <ModalHeader showCloseButton={false}>
|
|
25
|
-
* <h2>Important Notice</h2>
|
|
26
|
-
* </ModalHeader>
|
|
27
|
-
*
|
|
28
|
-
* // Header with subtitle
|
|
29
|
-
* <ModalHeader>
|
|
30
|
-
* <div>
|
|
31
|
-
* <h2>Settings</h2>
|
|
32
|
-
* <p>Manage your preferences</p>
|
|
33
|
-
* </div>
|
|
34
|
-
* </ModalHeader>
|
|
35
|
-
*
|
|
36
|
-
* // Complete modal example
|
|
37
|
-
* <ModalContainer isVisible={isOpen} makeInvisible={() => setIsOpen(false)}>
|
|
38
|
-
* <div className="modal-content">
|
|
39
|
-
* <ModalHeader>
|
|
40
|
-
* <h2>Confirm Delete</h2>
|
|
41
|
-
* <p>This action cannot be undone</p>
|
|
42
|
-
* </ModalHeader>
|
|
43
|
-
*
|
|
44
|
-
* <main>
|
|
45
|
-
* <p>Are you sure you want to delete this item?</p>
|
|
46
|
-
* </main>
|
|
47
|
-
*
|
|
48
|
-
* <ModalFooter>
|
|
49
|
-
* <button onClick={() => setIsOpen(false)}>Cancel</button>
|
|
50
|
-
* <button onClick={handleDelete}>Delete</button>
|
|
51
|
-
* </ModalFooter>
|
|
52
|
-
* </div>
|
|
53
|
-
* </ModalContainer>
|
|
54
|
-
*
|
|
55
|
-
* // Custom styled header
|
|
56
|
-
* <ModalHeader className="custom-header">
|
|
57
|
-
* <div className="header-content">
|
|
58
|
-
* <img src="/icon.png" alt="Icon" />
|
|
59
|
-
* <h1>Welcome</h1>
|
|
60
|
-
* </div>
|
|
61
|
-
* </ModalHeader>
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
declare function ModalHeader(args: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
-
export { ModalHeader };
|
|
66
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/modal/modalHeader/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,iBAAS,WAAW,CAAC,IAAI,EAAE,gBAAgB,2CA2B1C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|