@arkyn/components 3.0.1-beta.21 → 3.0.1-beta.22
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/dist/components/alert/alertContainer/index.d.ts.map +1 -0
- package/dist/components/alert/alertContent/index.d.ts.map +1 -0
- package/dist/components/alert/alertDescription/index.d.ts.map +1 -0
- package/dist/components/alert/alertIcon/index.d.ts.map +1 -0
- package/dist/components/alert/alertTitle/index.d.ts.map +1 -0
- package/dist/components/audioPlayer/index.d.ts.map +1 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/cardTab/cardTabButton/index.d.ts.map +1 -0
- package/dist/components/cardTab/cardTabContainer/index.d.ts.map +1 -0
- package/dist/components/cardTab/cardTabContext.d.ts.map +1 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/currencyInput/index.d.ts.map +1 -0
- package/dist/components/divider/index.d.ts.map +1 -0
- package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -0
- package/dist/components/drawer/drawerContext.d.ts.map +1 -0
- package/dist/components/drawer/drawerHeader/index.d.ts.map +1 -0
- package/dist/components/fieldError/index.d.ts.map +1 -0
- package/dist/components/fieldLabel/index.d.ts.map +1 -0
- package/dist/components/fieldWrapper/index.d.ts.map +1 -0
- package/dist/components/iconButton/index.d.ts.map +1 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/maskedInput/index.d.ts.map +1 -0
- package/dist/components/modal/modalContainer/index.d.ts.map +1 -0
- package/dist/components/modal/modalContext.d.ts.map +1 -0
- package/dist/components/modal/modalFooter/index.d.ts.map +1 -0
- package/dist/components/modal/modalHeader/index.d.ts.map +1 -0
- package/dist/components/multiSelect/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectChevron/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectContainer/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectContent/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectMark/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectOption/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectOptionsContainer/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectOverlay/index.d.ts.map +1 -0
- package/dist/components/multiSelect/multiSelectSpinner/index.d.ts.map +1 -0
- package/dist/components/phoneInput/index.d.ts.map +1 -0
- package/dist/components/phoneInput/phoneInputContainer/index.d.ts.map +1 -0
- package/dist/components/phoneInput/phoneInputCountriesOverlay/index.d.ts.map +1 -0
- package/dist/components/phoneInput/phoneInputCountryOption/index.d.ts.map +1 -0
- package/dist/components/phoneInput/phoneInputCountryOptionsContainer/index.d.ts.map +1 -0
- package/dist/components/phoneInput/phoneInputCountrySelector/index.d.ts.map +1 -0
- package/dist/components/phoneInput/phoneInputMask/index.d.ts.map +1 -0
- package/dist/components/radio/radioBox/index.d.ts.map +1 -0
- package/dist/components/radio/radioContext.d.ts.map +1 -0
- package/dist/components/radio/radioGroup/index.d.ts.map +1 -0
- package/dist/components/slider/index.d.ts.map +1 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/tab/tabButton/index.d.ts.map +1 -0
- package/dist/components/tab/tabContainer/index.d.ts.map +1 -0
- package/dist/components/tab/tabContext.d.ts.map +1 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/hooks/useForm.d.ts.map +1 -0
- package/dist/hooks/useScopedParams.d.ts.map +1 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -0
- package/dist/hooks/useSlider.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/providers/formProvider.d.ts.map +1 -0
- package/dist/services/iconRenderer.d.ts.map +1 -0
- package/dist/services/maskCurrencyValues.d.ts.map +1 -0
- package/dist/{src/utils → utils}/phoneInputUtilities.d.ts.map +1 -1
- package/package.json +1 -1
- 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.map +0 -1
- package/dist/src/components/alert/alertContent/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertDescription/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertIcon/index.d.ts.map +0 -1
- package/dist/src/components/alert/alertTitle/index.d.ts.map +0 -1
- package/dist/src/components/audioPlayer/index.d.ts.map +0 -1
- package/dist/src/components/badge/index.d.ts.map +0 -1
- package/dist/src/components/button/index.d.ts.map +0 -1
- package/dist/src/components/cardTab/cardTabButton/index.d.ts.map +0 -1
- package/dist/src/components/cardTab/cardTabContainer/index.d.ts.map +0 -1
- package/dist/src/components/cardTab/cardTabContext.d.ts.map +0 -1
- package/dist/src/components/checkbox/index.d.ts.map +0 -1
- package/dist/src/components/currencyInput/index.d.ts.map +0 -1
- package/dist/src/components/divider/index.d.ts.map +0 -1
- package/dist/src/components/drawer/drawerContainer/index.d.ts.map +0 -1
- package/dist/src/components/drawer/drawerContext.d.ts.map +0 -1
- package/dist/src/components/drawer/drawerHeader/index.d.ts.map +0 -1
- package/dist/src/components/fieldError/index.d.ts.map +0 -1
- package/dist/src/components/fieldLabel/index.d.ts.map +0 -1
- package/dist/src/components/fieldWrapper/index.d.ts.map +0 -1
- package/dist/src/components/iconButton/index.d.ts.map +0 -1
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/maskedInput/index.d.ts.map +0 -1
- package/dist/src/components/modal/modalContainer/index.d.ts.map +0 -1
- package/dist/src/components/modal/modalContext.d.ts.map +0 -1
- package/dist/src/components/modal/modalFooter/index.d.ts.map +0 -1
- package/dist/src/components/modal/modalHeader/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectChevron/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectContainer/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectContent/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectMark/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectOption/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectOptionsContainer/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectOverlay/index.d.ts.map +0 -1
- package/dist/src/components/multiSelect/multiSelectSpinner/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputContainer/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountriesOverlay/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountryOption/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountryOptionsContainer/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputCountrySelector/index.d.ts.map +0 -1
- package/dist/src/components/phoneInput/phoneInputMask/index.d.ts.map +0 -1
- package/dist/src/components/radio/radioBox/index.d.ts.map +0 -1
- package/dist/src/components/radio/radioContext.d.ts.map +0 -1
- package/dist/src/components/radio/radioGroup/index.d.ts.map +0 -1
- package/dist/src/components/slider/index.d.ts.map +0 -1
- package/dist/src/components/switch/index.d.ts.map +0 -1
- package/dist/src/components/tab/tabButton/index.d.ts.map +0 -1
- package/dist/src/components/tab/tabContainer/index.d.ts.map +0 -1
- package/dist/src/components/tab/tabContext.d.ts.map +0 -1
- package/dist/src/components/textarea/index.d.ts.map +0 -1
- package/dist/src/components/tooltip/index.d.ts.map +0 -1
- package/dist/src/hooks/useForm.d.ts.map +0 -1
- package/dist/src/hooks/useScopedParams.d.ts.map +0 -1
- package/dist/src/hooks/useScrollLock.d.ts.map +0 -1
- package/dist/src/hooks/useSlider.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/providers/formProvider.d.ts.map +0 -1
- package/dist/src/services/iconRenderer.d.ts.map +0 -1
- package/dist/src/services/maskCurrencyValues.d.ts.map +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 -30
- 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 -92
- 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 -31
- package/vitest.config.ts +0 -5
- /package/dist/{src/components → components}/alert/alertContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/alert/alertContainer/index.js +0 -0
- /package/dist/{src/components → components}/alert/alertContent/index.d.ts +0 -0
- /package/dist/{src/components → components}/alert/alertContent/index.js +0 -0
- /package/dist/{src/components → components}/alert/alertDescription/index.d.ts +0 -0
- /package/dist/{src/components → components}/alert/alertDescription/index.js +0 -0
- /package/dist/{src/components → components}/alert/alertIcon/index.d.ts +0 -0
- /package/dist/{src/components → components}/alert/alertIcon/index.js +0 -0
- /package/dist/{src/components → components}/alert/alertTitle/index.d.ts +0 -0
- /package/dist/{src/components → components}/alert/alertTitle/index.js +0 -0
- /package/dist/{src/components → components}/audioPlayer/index.d.ts +0 -0
- /package/dist/{src/components → components}/audioPlayer/index.js +0 -0
- /package/dist/{src/components → components}/badge/index.d.ts +0 -0
- /package/dist/{src/components → components}/badge/index.js +0 -0
- /package/dist/{src/components → components}/button/index.d.ts +0 -0
- /package/dist/{src/components → components}/button/index.js +0 -0
- /package/dist/{src/components → components}/cardTab/cardTabButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/cardTab/cardTabButton/index.js +0 -0
- /package/dist/{src/components → components}/cardTab/cardTabContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/cardTab/cardTabContainer/index.js +0 -0
- /package/dist/{src/components → components}/cardTab/cardTabContext.d.ts +0 -0
- /package/dist/{src/components → components}/cardTab/cardTabContext.js +0 -0
- /package/dist/{src/components → components}/checkbox/index.d.ts +0 -0
- /package/dist/{src/components → components}/checkbox/index.js +0 -0
- /package/dist/{src/components → components}/currencyInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/currencyInput/index.js +0 -0
- /package/dist/{src/components → components}/divider/index.d.ts +0 -0
- /package/dist/{src/components → components}/divider/index.js +0 -0
- /package/dist/{src/components → components}/drawer/drawerContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/drawer/drawerContainer/index.js +0 -0
- /package/dist/{src/components → components}/drawer/drawerContext.d.ts +0 -0
- /package/dist/{src/components → components}/drawer/drawerContext.js +0 -0
- /package/dist/{src/components → components}/drawer/drawerHeader/index.d.ts +0 -0
- /package/dist/{src/components → components}/drawer/drawerHeader/index.js +0 -0
- /package/dist/{src/components → components}/fieldError/index.d.ts +0 -0
- /package/dist/{src/components → components}/fieldError/index.js +0 -0
- /package/dist/{src/components → components}/fieldLabel/index.d.ts +0 -0
- /package/dist/{src/components → components}/fieldLabel/index.js +0 -0
- /package/dist/{src/components → components}/fieldWrapper/index.d.ts +0 -0
- /package/dist/{src/components → components}/fieldWrapper/index.js +0 -0
- /package/dist/{src/components → components}/iconButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/iconButton/index.js +0 -0
- /package/dist/{src/components → components}/input/index.d.ts +0 -0
- /package/dist/{src/components → components}/input/index.js +0 -0
- /package/dist/{src/components → components}/maskedInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/maskedInput/index.js +0 -0
- /package/dist/{src/components → components}/modal/modalContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/modal/modalContainer/index.js +0 -0
- /package/dist/{src/components → components}/modal/modalContext.d.ts +0 -0
- /package/dist/{src/components → components}/modal/modalContext.js +0 -0
- /package/dist/{src/components → components}/modal/modalFooter/index.d.ts +0 -0
- /package/dist/{src/components → components}/modal/modalFooter/index.js +0 -0
- /package/dist/{src/components → components}/modal/modalHeader/index.d.ts +0 -0
- /package/dist/{src/components → components}/modal/modalHeader/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectChevron/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectChevron/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectContainer/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectContent/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectContent/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectMark/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectMark/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectOption/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectOption/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectOptionsContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectOptionsContainer/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectOverlay/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectOverlay/index.js +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectSpinner/index.d.ts +0 -0
- /package/dist/{src/components → components}/multiSelect/multiSelectSpinner/index.js +0 -0
- /package/dist/{src/components → components}/phoneInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/phoneInput/index.js +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputContainer/index.js +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountriesOverlay/index.d.ts +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountriesOverlay/index.js +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountryOption/index.d.ts +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountryOption/index.js +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountryOptionsContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountryOptionsContainer/index.js +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountrySelector/index.d.ts +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputCountrySelector/index.js +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputMask/index.d.ts +0 -0
- /package/dist/{src/components → components}/phoneInput/phoneInputMask/index.js +0 -0
- /package/dist/{src/components → components}/radio/radioBox/index.d.ts +0 -0
- /package/dist/{src/components → components}/radio/radioBox/index.js +0 -0
- /package/dist/{src/components → components}/radio/radioContext.d.ts +0 -0
- /package/dist/{src/components → components}/radio/radioContext.js +0 -0
- /package/dist/{src/components → components}/radio/radioGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/radio/radioGroup/index.js +0 -0
- /package/dist/{src/components → components}/slider/index.d.ts +0 -0
- /package/dist/{src/components → components}/slider/index.js +0 -0
- /package/dist/{src/components → components}/switch/index.d.ts +0 -0
- /package/dist/{src/components → components}/switch/index.js +0 -0
- /package/dist/{src/components → components}/tab/tabButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/tab/tabButton/index.js +0 -0
- /package/dist/{src/components → components}/tab/tabContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/tab/tabContainer/index.js +0 -0
- /package/dist/{src/components → components}/tab/tabContext.d.ts +0 -0
- /package/dist/{src/components → components}/tab/tabContext.js +0 -0
- /package/dist/{src/components → components}/textarea/index.d.ts +0 -0
- /package/dist/{src/components → components}/textarea/index.js +0 -0
- /package/dist/{src/components → components}/tooltip/index.d.ts +0 -0
- /package/dist/{src/components → components}/tooltip/index.js +0 -0
- /package/dist/{src/hooks → hooks}/useForm.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useForm.js +0 -0
- /package/dist/{src/hooks → hooks}/useScopedParams.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useScopedParams.js +0 -0
- /package/dist/{src/hooks → hooks}/useScrollLock.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useScrollLock.js +0 -0
- /package/dist/{src/hooks → hooks}/useSlider.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useSlider.js +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/providers → providers}/formProvider.d.ts +0 -0
- /package/dist/{src/providers → providers}/formProvider.js +0 -0
- /package/dist/{src/services → services}/iconRenderer.d.ts +0 -0
- /package/dist/{src/services → services}/iconRenderer.js +0 -0
- /package/dist/{src/services → services}/maskCurrencyValues.d.ts +0 -0
- /package/dist/{src/services → services}/maskCurrencyValues.js +0 -0
- /package/dist/{src/utils → utils}/phoneInputUtilities.d.ts +0 -0
- /package/dist/{src/utils → utils}/phoneInputUtilities.js +0 -0
@@ -1,35 +0,0 @@
|
|
1
|
-
import { Check } from "lucide-react";
|
2
|
-
import "./styles.css";
|
3
|
-
|
4
|
-
type CountryType = {
|
5
|
-
name: string;
|
6
|
-
code: string;
|
7
|
-
iso: string;
|
8
|
-
prefix: null | string;
|
9
|
-
flag: string;
|
10
|
-
mask: string;
|
11
|
-
};
|
12
|
-
|
13
|
-
type PhoneInputCountryOptionProps = {
|
14
|
-
country: CountryType;
|
15
|
-
size: "md" | "lg";
|
16
|
-
isActive: boolean;
|
17
|
-
handleChangeValue: (country: CountryType) => void;
|
18
|
-
};
|
19
|
-
|
20
|
-
function PhoneInputCountryOption(props: PhoneInputCountryOptionProps) {
|
21
|
-
const { country, isActive, handleChangeValue, size } = props;
|
22
|
-
|
23
|
-
const hasActive = isActive ? "active" : "";
|
24
|
-
const className = `arkynPhoneInputCountryOption ${size} ${hasActive}`;
|
25
|
-
|
26
|
-
return (
|
27
|
-
<div onClick={() => handleChangeValue(country)} className={className}>
|
28
|
-
<img src={country.flag} alt={country.name} className="flag" />
|
29
|
-
{country.name} <span>{country.code}</span>
|
30
|
-
<Check className="check" />
|
31
|
-
</div>
|
32
|
-
);
|
33
|
-
}
|
34
|
-
|
35
|
-
export { PhoneInputCountryOption };
|
@@ -1,50 +0,0 @@
|
|
1
|
-
.arkynPhoneInputCountryOption {
|
2
|
-
display: flex;
|
3
|
-
align-items: center;
|
4
|
-
|
5
|
-
font-weight: 400;
|
6
|
-
line-height: 21.79px;
|
7
|
-
|
8
|
-
color: var(--text-body);
|
9
|
-
user-select: none;
|
10
|
-
gap: 10px;
|
11
|
-
}
|
12
|
-
.arkynPhoneInputCountryOption > span {
|
13
|
-
font-weight: 400;
|
14
|
-
font-size: 14px;
|
15
|
-
line-height: 21.79px;
|
16
|
-
color: var(--text-muted);
|
17
|
-
font-weight: 300;
|
18
|
-
}
|
19
|
-
.arkynPhoneInputCountryOption.md {
|
20
|
-
font-size: 14px;
|
21
|
-
padding: 8px 16px;
|
22
|
-
}
|
23
|
-
.arkynPhoneInputCountryOption.lg {
|
24
|
-
font-size: 16px;
|
25
|
-
padding: 8px 16px;
|
26
|
-
}
|
27
|
-
.arkynPhoneInputCountryOption .flag {
|
28
|
-
max-height: 20px;
|
29
|
-
max-width: 30px;
|
30
|
-
border-radius: 4px;
|
31
|
-
}
|
32
|
-
.arkynPhoneInputCountryOption .check {
|
33
|
-
margin-left: auto;
|
34
|
-
display: none;
|
35
|
-
height: 20px;
|
36
|
-
width: 20px;
|
37
|
-
color: rgba(var(--spotlight-primary), 1);
|
38
|
-
}
|
39
|
-
.arkynPhoneInputCountryOption:hover {
|
40
|
-
cursor: pointer;
|
41
|
-
background-color: var(--card-foreground-primary);
|
42
|
-
}
|
43
|
-
.arkynPhoneInputCountryOption.active {
|
44
|
-
font-weight: 600;
|
45
|
-
color: var(--text-heading);
|
46
|
-
background-color: var(--card-foreground-primary);
|
47
|
-
}
|
48
|
-
.arkynPhoneInputCountryOption.active svg {
|
49
|
-
display: unset;
|
50
|
-
}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
import { ChangeEvent, ReactNode, useEffect, useRef, useState } from "react";
|
2
|
-
import { useScrollLock } from "../../../hooks/useScrollLock";
|
3
|
-
import "./styles.css";
|
4
|
-
|
5
|
-
type PhoneInputCountryOptionsContainerProps = {
|
6
|
-
isOpen: boolean;
|
7
|
-
children: ReactNode;
|
8
|
-
search: string;
|
9
|
-
placeholder: string;
|
10
|
-
onSearch: (value: string) => void;
|
11
|
-
};
|
12
|
-
|
13
|
-
function PhoneInputCountryOptionsContainer(
|
14
|
-
props: PhoneInputCountryOptionsContainerProps
|
15
|
-
) {
|
16
|
-
const { children, isOpen, onSearch, search, placeholder } = props;
|
17
|
-
|
18
|
-
const containerRef = useRef<HTMLDivElement>(null);
|
19
|
-
const [position, setPosition] = useState<"bottom" | "top">("bottom");
|
20
|
-
|
21
|
-
function handleSearch(e: ChangeEvent<HTMLInputElement>) {
|
22
|
-
onSearch(e.target.value);
|
23
|
-
}
|
24
|
-
|
25
|
-
useScrollLock(isOpen);
|
26
|
-
|
27
|
-
useEffect(() => {
|
28
|
-
if (!isOpen) return;
|
29
|
-
|
30
|
-
const checkContainerPosition = () => {
|
31
|
-
if (!containerRef.current) return;
|
32
|
-
|
33
|
-
const parentElement = containerRef.current.parentElement;
|
34
|
-
if (!parentElement) return;
|
35
|
-
|
36
|
-
const parentRect = parentElement.getBoundingClientRect();
|
37
|
-
const viewportHeight = window.innerHeight;
|
38
|
-
|
39
|
-
const estimatedContainerHeight = 300;
|
40
|
-
const spaceBelow = viewportHeight - parentRect.bottom;
|
41
|
-
|
42
|
-
if (
|
43
|
-
spaceBelow < estimatedContainerHeight &&
|
44
|
-
parentRect.top > estimatedContainerHeight
|
45
|
-
) {
|
46
|
-
setPosition("top");
|
47
|
-
} else {
|
48
|
-
setPosition("bottom");
|
49
|
-
}
|
50
|
-
};
|
51
|
-
|
52
|
-
checkContainerPosition();
|
53
|
-
}, [isOpen]);
|
54
|
-
|
55
|
-
if (!isOpen) return <></>;
|
56
|
-
|
57
|
-
return (
|
58
|
-
<div
|
59
|
-
className={`arkynPhoneInputCountryOptionsContainer ${position}`}
|
60
|
-
ref={containerRef}
|
61
|
-
>
|
62
|
-
<input
|
63
|
-
type="search"
|
64
|
-
name="search-select"
|
65
|
-
className="arkynPhoneInputCountryOptionsContainerSearchSelect"
|
66
|
-
value={search}
|
67
|
-
id="input-search"
|
68
|
-
placeholder={placeholder}
|
69
|
-
onChange={handleSearch}
|
70
|
-
/>
|
71
|
-
|
72
|
-
{children}
|
73
|
-
</div>
|
74
|
-
);
|
75
|
-
}
|
76
|
-
|
77
|
-
export { PhoneInputCountryOptionsContainer };
|
@@ -1,59 +0,0 @@
|
|
1
|
-
/* BASE CSS */
|
2
|
-
.arkynPhoneInputCountryOptionsContainer {
|
3
|
-
position: absolute;
|
4
|
-
z-index: 7;
|
5
|
-
|
6
|
-
left: -2px;
|
7
|
-
right: -2px;
|
8
|
-
|
9
|
-
border-radius: 6px;
|
10
|
-
list-style: none;
|
11
|
-
|
12
|
-
display: flex;
|
13
|
-
flex-direction: column;
|
14
|
-
|
15
|
-
flex: 1;
|
16
|
-
overflow: hidden;
|
17
|
-
height: max-content;
|
18
|
-
|
19
|
-
border: 1px solid var(--border);
|
20
|
-
background-color: var(--card);
|
21
|
-
|
22
|
-
max-height: 300px;
|
23
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
24
|
-
|
25
|
-
max-height: 200px;
|
26
|
-
overflow: auto;
|
27
|
-
}
|
28
|
-
|
29
|
-
.arkynPhoneInputCountryOptionsContainer.bottom {
|
30
|
-
top: calc(100% + 5px);
|
31
|
-
}
|
32
|
-
|
33
|
-
.arkynPhoneInputCountryOptionsContainer.top {
|
34
|
-
bottom: calc(100% + 5px);
|
35
|
-
}
|
36
|
-
|
37
|
-
/* NOT FOUND TEXT */
|
38
|
-
.arkynPhoneInputCountryOptionsContainer > p {
|
39
|
-
font-weight: 400;
|
40
|
-
font-size: 14px;
|
41
|
-
padding: 16px;
|
42
|
-
text-align: center;
|
43
|
-
line-height: 21.79px;
|
44
|
-
|
45
|
-
color: var(--text-body);
|
46
|
-
}
|
47
|
-
|
48
|
-
.arkynPhoneInputCountryOptionsContainerSearchSelect {
|
49
|
-
padding: 16px;
|
50
|
-
border: none;
|
51
|
-
border-bottom: 1px solid var(--border);
|
52
|
-
outline: none;
|
53
|
-
color: var(--text-heading);
|
54
|
-
font-size: 14px;
|
55
|
-
}
|
56
|
-
|
57
|
-
.arkynPhoneInputCountryOptionsContainerSearchSelect::placeholder {
|
58
|
-
color: var(--text-muted);
|
59
|
-
}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { ChevronDown } from "lucide-react";
|
2
|
-
|
3
|
-
import { Divider } from "../../divider";
|
4
|
-
import "./styles.css";
|
5
|
-
|
6
|
-
type CountryType = {
|
7
|
-
name: string;
|
8
|
-
code: string;
|
9
|
-
iso: string;
|
10
|
-
prefix: null | string;
|
11
|
-
flag: string;
|
12
|
-
mask: string;
|
13
|
-
};
|
14
|
-
|
15
|
-
type PhoneInputCountrySelectorProps = {
|
16
|
-
size: "md" | "lg";
|
17
|
-
currentCountry: CountryType;
|
18
|
-
onClick: () => void;
|
19
|
-
};
|
20
|
-
|
21
|
-
function PhoneInputCountrySelector(props: PhoneInputCountrySelectorProps) {
|
22
|
-
const { currentCountry, onClick } = props;
|
23
|
-
|
24
|
-
return (
|
25
|
-
<div className="phoneInputSelectCountry" onClick={onClick}>
|
26
|
-
<img
|
27
|
-
className="flag"
|
28
|
-
src={currentCountry.flag}
|
29
|
-
alt={currentCountry.name}
|
30
|
-
/>
|
31
|
-
<ChevronDown className="chevronDown" strokeWidth={2.5} />
|
32
|
-
<Divider orientation="vertical" />
|
33
|
-
</div>
|
34
|
-
);
|
35
|
-
}
|
36
|
-
|
37
|
-
export { PhoneInputCountrySelector };
|
@@ -1,26 +0,0 @@
|
|
1
|
-
.phoneInputSelectCountry {
|
2
|
-
display: flex;
|
3
|
-
align-items: center;
|
4
|
-
gap: 8px;
|
5
|
-
cursor: pointer;
|
6
|
-
min-width: 58px;
|
7
|
-
}
|
8
|
-
|
9
|
-
.phoneInputSelectCountry .flag {
|
10
|
-
max-height: 20px;
|
11
|
-
max-width: 30px;
|
12
|
-
border-radius: 4px;
|
13
|
-
}
|
14
|
-
|
15
|
-
.phoneInputSelectCountry .chevronDown {
|
16
|
-
min-height: 12px;
|
17
|
-
max-height: 12px;
|
18
|
-
min-width: 12px;
|
19
|
-
max-width: 12px;
|
20
|
-
color: var(--text-muted);
|
21
|
-
}
|
22
|
-
|
23
|
-
.phoneInputSelectCountry > .arkynDivider {
|
24
|
-
min-width: 1px;
|
25
|
-
min-height: 20px;
|
26
|
-
}
|
@@ -1,105 +0,0 @@
|
|
1
|
-
import { InputMask } from "@react-input/mask";
|
2
|
-
import {
|
3
|
-
ChangeEvent,
|
4
|
-
forwardRef,
|
5
|
-
InputHTMLAttributes,
|
6
|
-
useEffect,
|
7
|
-
useState,
|
8
|
-
} from "react";
|
9
|
-
|
10
|
-
import {
|
11
|
-
applyMask,
|
12
|
-
clear,
|
13
|
-
getMask,
|
14
|
-
MAX_LENGTH,
|
15
|
-
TYPES,
|
16
|
-
} from "../../../utils/phoneInputUtilities";
|
17
|
-
|
18
|
-
import "./style.css";
|
19
|
-
|
20
|
-
type CountryType = {
|
21
|
-
name: string;
|
22
|
-
code: string;
|
23
|
-
iso: string;
|
24
|
-
prefix: null | string;
|
25
|
-
flag: string;
|
26
|
-
mask: string;
|
27
|
-
};
|
28
|
-
|
29
|
-
type PhoneInputMaskProps = {
|
30
|
-
onFocus: () => void;
|
31
|
-
onBlur: () => void;
|
32
|
-
disabled: boolean;
|
33
|
-
size: "md" | "lg";
|
34
|
-
currentCountry: CountryType;
|
35
|
-
value: string;
|
36
|
-
onChange: (e: string) => void;
|
37
|
-
};
|
38
|
-
|
39
|
-
const BaseInput = forwardRef<
|
40
|
-
HTMLInputElement,
|
41
|
-
InputHTMLAttributes<HTMLInputElement>
|
42
|
-
>((props, ref) => {
|
43
|
-
return <input ref={ref} {...props} />;
|
44
|
-
});
|
45
|
-
|
46
|
-
const PhoneInputMask = forwardRef<HTMLInputElement, PhoneInputMaskProps>(
|
47
|
-
(props, ref) => {
|
48
|
-
const { onFocus, onBlur, size, onChange, value, currentCountry, disabled } =
|
49
|
-
props;
|
50
|
-
|
51
|
-
const [isMounted, setIsMounted] = useState(false);
|
52
|
-
|
53
|
-
useEffect(() => {
|
54
|
-
if (isMounted) onChange(currentCountry.mask);
|
55
|
-
else setIsMounted(true);
|
56
|
-
}, [currentCountry]);
|
57
|
-
|
58
|
-
const className = `phoneInputMask ${size}`;
|
59
|
-
|
60
|
-
function handleChange(event: ChangeEvent<HTMLInputElement>) {
|
61
|
-
let value = clear(event.target.value);
|
62
|
-
const mask = getMask(value);
|
63
|
-
|
64
|
-
let nextLength = value.length;
|
65
|
-
if (nextLength > MAX_LENGTH) return;
|
66
|
-
|
67
|
-
value = applyMask(value, TYPES[mask] as "EIGHT" | "NINE");
|
68
|
-
event.target.value = value;
|
69
|
-
|
70
|
-
onChange(value);
|
71
|
-
}
|
72
|
-
|
73
|
-
if (currentCountry.code === "+55") {
|
74
|
-
return (
|
75
|
-
<input
|
76
|
-
value={value}
|
77
|
-
onChange={handleChange}
|
78
|
-
className={className}
|
79
|
-
onFocus={onFocus}
|
80
|
-
onBlur={onBlur}
|
81
|
-
disabled={disabled}
|
82
|
-
ref={ref}
|
83
|
-
/>
|
84
|
-
);
|
85
|
-
}
|
86
|
-
|
87
|
-
return (
|
88
|
-
<InputMask
|
89
|
-
value={value}
|
90
|
-
onChange={(e) => onChange(e.target.value)}
|
91
|
-
className={className}
|
92
|
-
component={BaseInput}
|
93
|
-
onFocus={onFocus}
|
94
|
-
onBlur={onBlur}
|
95
|
-
disabled={disabled}
|
96
|
-
mask={currentCountry.mask}
|
97
|
-
showMask
|
98
|
-
replacement={{ _: /\d/ }}
|
99
|
-
ref={ref}
|
100
|
-
/>
|
101
|
-
);
|
102
|
-
}
|
103
|
-
);
|
104
|
-
|
105
|
-
export { PhoneInputMask };
|
@@ -1,36 +0,0 @@
|
|
1
|
-
.phoneInputMask {
|
2
|
-
border: none;
|
3
|
-
outline: none;
|
4
|
-
background: transparent;
|
5
|
-
width: 100%;
|
6
|
-
margin-left: 8px;
|
7
|
-
}
|
8
|
-
|
9
|
-
/* SIZE */
|
10
|
-
.phoneInputMask.md {
|
11
|
-
min-height: 40px;
|
12
|
-
max-height: 40px;
|
13
|
-
font-size: 14px;
|
14
|
-
line-height: 14px;
|
15
|
-
font-weight: 400;
|
16
|
-
}
|
17
|
-
|
18
|
-
.phoneInputMask.md::placeholder {
|
19
|
-
font-weight: 400;
|
20
|
-
font-size: 14px;
|
21
|
-
line-height: 14px;
|
22
|
-
}
|
23
|
-
|
24
|
-
.phoneInputMask.lg {
|
25
|
-
min-height: 44px;
|
26
|
-
max-height: 44px;
|
27
|
-
line-height: 16px;
|
28
|
-
font-size: 16px;
|
29
|
-
font-weight: 400;
|
30
|
-
}
|
31
|
-
|
32
|
-
.phoneInputMask.lg::placeholder {
|
33
|
-
font-weight: 400;
|
34
|
-
font-size: 16px;
|
35
|
-
line-height: 16px;
|
36
|
-
}
|
@@ -1,124 +0,0 @@
|
|
1
|
-
import { ButtonHTMLAttributes } from "react";
|
2
|
-
|
3
|
-
import { useForm } from "../../../hooks/useForm";
|
4
|
-
import { useRadioGroup } from "../radioContext";
|
5
|
-
import "./styles.css";
|
6
|
-
|
7
|
-
type RadioBoxProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
8
|
-
value: string;
|
9
|
-
isError?: boolean;
|
10
|
-
size?: "sm" | "md" | "lg";
|
11
|
-
};
|
12
|
-
|
13
|
-
/**
|
14
|
-
* RadioBox component - individual radio button option that must be used within a RadioGroup
|
15
|
-
*
|
16
|
-
* @param props - RadioBox component properties
|
17
|
-
* @param props.value - Required unique value for this radio option within the group
|
18
|
-
* @param props.isError - Optional error state indicator for styling
|
19
|
-
* @param props.size - Size variant for the radio box, inherits from RadioGroup if not specified
|
20
|
-
* @param props.children - Content to display next to the radio button (label text, icons, etc.)
|
21
|
-
*
|
22
|
-
* **...Other valid HTML properties for button element**
|
23
|
-
*
|
24
|
-
* @returns RadioBox JSX element wrapped in a label for accessibility
|
25
|
-
*
|
26
|
-
* @example
|
27
|
-
* ```tsx
|
28
|
-
* // Basic radio boxes within a group
|
29
|
-
* <RadioGroup name="gender">
|
30
|
-
* <RadioBox value="male">Male</RadioBox>
|
31
|
-
* <RadioBox value="female">Female</RadioBox>
|
32
|
-
* <RadioBox value="other">Other</RadioBox>
|
33
|
-
* </RadioGroup>
|
34
|
-
*
|
35
|
-
* // Radio boxes with rich content
|
36
|
-
* <RadioGroup name="plan" label="Choose your plan">
|
37
|
-
* <RadioBox value="basic">
|
38
|
-
* <div>
|
39
|
-
* <h4>Basic Plan</h4>
|
40
|
-
* <p>$9.99/month - Perfect for individuals</p>
|
41
|
-
* </div>
|
42
|
-
* </RadioBox>
|
43
|
-
* <RadioBox value="premium">
|
44
|
-
* <div>
|
45
|
-
* <h4>Premium Plan</h4>
|
46
|
-
* <p>$19.99/month - Great for small teams</p>
|
47
|
-
* </div>
|
48
|
-
* </RadioBox>
|
49
|
-
* </RadioGroup>
|
50
|
-
*
|
51
|
-
* // Radio boxes with custom size override
|
52
|
-
* <RadioGroup name="priority" size="md">
|
53
|
-
* <RadioBox value="low" size="sm">Low Priority</RadioBox>
|
54
|
-
* <RadioBox value="medium">Medium Priority</RadioBox>
|
55
|
-
* <RadioBox value="high" size="lg">High Priority</RadioBox>
|
56
|
-
* </RadioGroup>
|
57
|
-
*
|
58
|
-
* // Radio boxes with disabled state
|
59
|
-
* <RadioGroup name="options">
|
60
|
-
* <RadioBox value="option1">Available Option</RadioBox>
|
61
|
-
* <RadioBox value="option2" disabled>Disabled Option</RadioBox>
|
62
|
-
* <RadioBox value="option3">Another Available Option</RadioBox>
|
63
|
-
* </RadioGroup>
|
64
|
-
*
|
65
|
-
* // Radio boxes with custom styling
|
66
|
-
* <RadioGroup name="theme">
|
67
|
-
* <RadioBox value="light" className="theme-option">
|
68
|
-
* 🌞 Light Theme
|
69
|
-
* </RadioBox>
|
70
|
-
* <RadioBox value="dark" className="theme-option">
|
71
|
-
* 🌙 Dark Theme
|
72
|
-
* </RadioBox>
|
73
|
-
* <RadioBox value="auto" className="theme-option">
|
74
|
-
* 🔄 Auto Theme
|
75
|
-
* </RadioBox>
|
76
|
-
* </RadioGroup>
|
77
|
-
* ```
|
78
|
-
*
|
79
|
-
* @remarks
|
80
|
-
* This component must be used as a child of RadioGroup. It automatically inherits:
|
81
|
-
* - Group name for form handling
|
82
|
-
* - Size from parent RadioGroup (unless overridden)
|
83
|
-
* - Change handlers and state management
|
84
|
-
* - Error states from form validation
|
85
|
-
*
|
86
|
-
* The component handles both click and focus events for accessibility.
|
87
|
-
*/
|
88
|
-
|
89
|
-
function RadioBox(props: RadioBoxProps) {
|
90
|
-
const {
|
91
|
-
value: componentValue,
|
92
|
-
size: componentSize,
|
93
|
-
disabled,
|
94
|
-
children,
|
95
|
-
className: baseClassName = "",
|
96
|
-
...rest
|
97
|
-
} = props;
|
98
|
-
|
99
|
-
const { handleChange, size: groupSize, value, isError } = useRadioGroup();
|
100
|
-
|
101
|
-
const isChecked = value === componentValue;
|
102
|
-
const size = componentSize || groupSize;
|
103
|
-
|
104
|
-
const checkedClass = isChecked ? "checkedTrue" : "checkedFalse";
|
105
|
-
const errorClass = !!isError ? "errorTrue" : "errorFalse";
|
106
|
-
const disabledClass = disabled ? "disabledTrue" : "disabledFalse";
|
107
|
-
const className = `arkynRadioBox ${size} ${checkedClass} ${errorClass} ${disabledClass} ${baseClassName}`;
|
108
|
-
|
109
|
-
return (
|
110
|
-
<label className={className.trim()}>
|
111
|
-
<button
|
112
|
-
type="button"
|
113
|
-
disabled={disabled}
|
114
|
-
onClick={() => handleChange(componentValue)}
|
115
|
-
onFocus={() => handleChange(componentValue)}
|
116
|
-
{...rest}
|
117
|
-
/>
|
118
|
-
|
119
|
-
{children}
|
120
|
-
</label>
|
121
|
-
);
|
122
|
-
}
|
123
|
-
|
124
|
-
export { RadioBox };
|
@@ -1,95 +0,0 @@
|
|
1
|
-
.arkynRadioBox {
|
2
|
-
display: flex;
|
3
|
-
align-items: center;
|
4
|
-
gap: 8px;
|
5
|
-
|
6
|
-
color: var(--text-body);
|
7
|
-
font-size: 14px;
|
8
|
-
line-height: 19.07px;
|
9
|
-
}
|
10
|
-
|
11
|
-
.arkynRadioBox > button {
|
12
|
-
position: relative;
|
13
|
-
background-color: rgba(var(--spotlight-secondary), 1);
|
14
|
-
|
15
|
-
border: 2px solid var(--border);
|
16
|
-
border-radius: 99999px;
|
17
|
-
}
|
18
|
-
|
19
|
-
.arkynRadioBox > button:not(:disabled):hover {
|
20
|
-
cursor: pointer;
|
21
|
-
}
|
22
|
-
|
23
|
-
.arkynRadioBox.checkedTrue > button {
|
24
|
-
border-color: rgba(var(--spotlight-primary), 1);
|
25
|
-
}
|
26
|
-
|
27
|
-
.arkynRadioBox.errorTrue > button {
|
28
|
-
border-color: rgba(var(--spotlight-danger), 1);
|
29
|
-
}
|
30
|
-
|
31
|
-
.arkynRadioBox.checkedTrue > button::before {
|
32
|
-
content: " ";
|
33
|
-
position: absolute;
|
34
|
-
top: 50%;
|
35
|
-
left: 50%;
|
36
|
-
transform: translate(-50%, -50%);
|
37
|
-
border-radius: 99999px;
|
38
|
-
background-color: rgba(var(--spotlight-primary), 1);
|
39
|
-
}
|
40
|
-
|
41
|
-
.arkynRadioBox.sm > button {
|
42
|
-
min-height: 20px;
|
43
|
-
min-width: 20px;
|
44
|
-
|
45
|
-
max-height: 20px;
|
46
|
-
max-width: 20px;
|
47
|
-
}
|
48
|
-
|
49
|
-
.arkynRadioBox.md > button {
|
50
|
-
min-height: 24px;
|
51
|
-
min-width: 24px;
|
52
|
-
|
53
|
-
max-height: 24px;
|
54
|
-
max-width: 24px;
|
55
|
-
}
|
56
|
-
|
57
|
-
.arkynRadioBox.lg > button {
|
58
|
-
min-height: 24px;
|
59
|
-
min-width: 24px;
|
60
|
-
|
61
|
-
max-height: 24px;
|
62
|
-
max-width: 24px;
|
63
|
-
}
|
64
|
-
|
65
|
-
.arkynRadioBox.checkedTrue.sm > button::before {
|
66
|
-
min-height: 10px;
|
67
|
-
min-width: 10px;
|
68
|
-
|
69
|
-
max-height: 10px;
|
70
|
-
max-width: 10px;
|
71
|
-
}
|
72
|
-
|
73
|
-
.arkynRadioBox.checkedTrue.md > button::before {
|
74
|
-
min-height: 12px;
|
75
|
-
min-width: 12px;
|
76
|
-
|
77
|
-
max-height: 12px;
|
78
|
-
max-width: 12px;
|
79
|
-
}
|
80
|
-
|
81
|
-
.arkynRadioBox.checkedTrue.lg > button::before {
|
82
|
-
min-height: 12px;
|
83
|
-
min-width: 12px;
|
84
|
-
|
85
|
-
max-height: 12px;
|
86
|
-
max-width: 12px;
|
87
|
-
}
|
88
|
-
|
89
|
-
.arkynRadioBox.disabledTrue {
|
90
|
-
opacity: 0.5;
|
91
|
-
}
|
92
|
-
|
93
|
-
.arkynRadioBox.disabledTrue > button {
|
94
|
-
cursor: not-allowed;
|
95
|
-
}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import { createContext, ReactNode, useContext, useState } from "react";
|
2
|
-
|
3
|
-
type RadioGroupContextType = {
|
4
|
-
value: string;
|
5
|
-
isError: boolean;
|
6
|
-
size: "sm" | "md" | "lg";
|
7
|
-
handleChange: (value: string) => void;
|
8
|
-
};
|
9
|
-
|
10
|
-
type RadioProviderProps = {
|
11
|
-
children: ReactNode;
|
12
|
-
isError: boolean;
|
13
|
-
size: "sm" | "md" | "lg";
|
14
|
-
value: string;
|
15
|
-
handleChange: (value: string) => void;
|
16
|
-
};
|
17
|
-
|
18
|
-
const radioContext = createContext({} as RadioGroupContextType);
|
19
|
-
|
20
|
-
function RadioProvider(props: RadioProviderProps) {
|
21
|
-
const { children, size, isError, handleChange, value } = props;
|
22
|
-
|
23
|
-
return (
|
24
|
-
<radioContext.Provider value={{ handleChange, value, size, isError }}>
|
25
|
-
{children}
|
26
|
-
</radioContext.Provider>
|
27
|
-
);
|
28
|
-
}
|
29
|
-
|
30
|
-
function useRadioGroup() {
|
31
|
-
return useContext(radioContext);
|
32
|
-
}
|
33
|
-
|
34
|
-
export { RadioProvider, useRadioGroup };
|