ncore-ui-kit 1.1.0-alpha.7 → 1.1.0-alpha.8
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/LICENSE +20 -20
- package/lib/module/assets/svg/cayCoreIcon/index.js +36 -36
- package/lib/module/assets/svg/cayCoreIcon/index.js.map +1 -1
- package/lib/module/assets/svg/enUSIcon/index.js +13 -13
- package/lib/module/assets/svg/enUSIcon/index.js.map +1 -1
- package/lib/module/assets/svg/loadingIcon/index.js +6 -6
- package/lib/module/assets/svg/loadingIcon/index.js.map +1 -1
- package/lib/module/assets/svg/nibgatCommunityIcon/index.js +4 -4
- package/lib/module/assets/svg/nibgatCommunityIcon/index.js.map +1 -1
- package/lib/module/assets/svg/nibgatIcon/index.js +2 -2
- package/lib/module/assets/svg/nibgatIcon/index.js.map +1 -1
- package/lib/module/assets/svg/trTRIcon/index.js +6 -6
- package/lib/module/assets/svg/trTRIcon/index.js.map +1 -1
- package/lib/module/components/avatar/index.js +10 -10
- package/lib/module/components/avatar/index.js.map +1 -1
- package/lib/module/components/avatar/stylesheet.js +36 -36
- package/lib/module/components/avatar/stylesheet.js.map +1 -1
- package/lib/module/components/avatarGroup/index.js +10 -10
- package/lib/module/components/avatarGroup/index.js.map +1 -1
- package/lib/module/components/avatarGroup/stylesheet.js +33 -33
- package/lib/module/components/avatarGroup/stylesheet.js.map +1 -1
- package/lib/module/components/bottomSheet/index.js +90 -90
- package/lib/module/components/bottomSheet/index.js.map +1 -1
- package/lib/module/components/button/index.js +5 -5
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/button/stylesheet.js +37 -37
- package/lib/module/components/button/stylesheet.js.map +1 -1
- package/lib/module/components/checkBox/index.js +8 -8
- package/lib/module/components/checkBox/index.js.map +1 -1
- package/lib/module/components/checkBox/stylesheet.js +41 -41
- package/lib/module/components/checkBox/stylesheet.js.map +1 -1
- package/lib/module/components/chip/index.js +9 -9
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/chip/stylesheet.js +19 -19
- package/lib/module/components/chip/stylesheet.js.map +1 -1
- package/lib/module/components/codeEditor/index.js +247 -0
- package/lib/module/components/codeEditor/index.js.map +1 -0
- package/lib/module/components/codeEditor/stylesheet.js +195 -0
- package/lib/module/components/codeEditor/stylesheet.js.map +1 -0
- package/lib/module/components/codeEditor/type.js +4 -0
- package/lib/module/components/codeEditor/type.js.map +1 -0
- package/lib/module/components/codeViewer/index.js +9 -9
- package/lib/module/components/codeViewer/index.js.map +1 -1
- package/lib/module/components/codeViewer/parser.js +13 -15
- package/lib/module/components/codeViewer/parser.js.map +1 -1
- package/lib/module/components/codeViewer/stylesheet.js +41 -38
- package/lib/module/components/codeViewer/stylesheet.js.map +1 -1
- package/lib/module/components/dateSelector/index.js +4 -4
- package/lib/module/components/dateSelector/index.js.map +1 -1
- package/lib/module/components/dateSelector/stylesheet.js +24 -24
- package/lib/module/components/dateSelector/stylesheet.js.map +1 -1
- package/lib/module/components/dateTimePicker/index.js +36 -36
- package/lib/module/components/dateTimePicker/index.js.map +1 -1
- package/lib/module/components/dateTimePicker/stylesheet.js +71 -71
- package/lib/module/components/dateTimePicker/stylesheet.js.map +1 -1
- package/lib/module/components/dateTimePicker/type.js.map +1 -1
- package/lib/module/components/dateTimeSheet/index.js +23 -23
- package/lib/module/components/dateTimeSheet/index.js.map +1 -1
- package/lib/module/components/dateTimeSheet/stylesheet.js +38 -38
- package/lib/module/components/dateTimeSheet/stylesheet.js.map +1 -1
- package/lib/module/components/dialog/index.js +11 -11
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/dialog/stylesheet.js +18 -18
- package/lib/module/components/dialog/stylesheet.js.map +1 -1
- package/lib/module/components/embeddedMenu/components/menuButton/index.js +10 -10
- package/lib/module/components/embeddedMenu/components/menuButton/index.js.map +1 -1
- package/lib/module/components/embeddedMenu/index.js +20 -20
- package/lib/module/components/embeddedMenu/index.js.map +1 -1
- package/lib/module/components/embeddedMenu/stylesheet.js +18 -18
- package/lib/module/components/embeddedMenu/stylesheet.js.map +1 -1
- package/lib/module/components/header/index.js +15 -15
- package/lib/module/components/header/index.js.map +1 -1
- package/lib/module/components/header/stylesheet.js +19 -19
- package/lib/module/components/header/stylesheet.js.map +1 -1
- package/lib/module/components/highlightButton/index.js +4 -4
- package/lib/module/components/highlightButton/index.js.map +1 -1
- package/lib/module/components/highlightButton/stylesheet.js +32 -32
- package/lib/module/components/highlightButton/stylesheet.js.map +1 -1
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/loading/index.js +4 -4
- package/lib/module/components/loading/index.js.map +1 -1
- package/lib/module/components/localeSwitcher/index.js +10 -10
- package/lib/module/components/localeSwitcher/index.js.map +1 -1
- package/lib/module/components/mainHeader/index.js +4 -4
- package/lib/module/components/mainHeader/index.js.map +1 -1
- package/lib/module/components/markdownEditor/index.js +302 -0
- package/lib/module/components/markdownEditor/index.js.map +1 -0
- package/lib/module/components/markdownEditor/stylesheet.js +130 -0
- package/lib/module/components/markdownEditor/stylesheet.js.map +1 -0
- package/lib/module/components/markdownEditor/type.js +5 -0
- package/lib/module/components/markdownEditor/type.js.map +1 -0
- package/lib/module/components/markdownViewer/constant.js +6 -6
- package/lib/module/components/markdownViewer/constant.js.map +1 -1
- package/lib/module/components/markdownViewer/index.js +88 -87
- package/lib/module/components/markdownViewer/index.js.map +1 -1
- package/lib/module/components/markdownViewer/stylesheet.js +25 -30
- package/lib/module/components/markdownViewer/stylesheet.js.map +1 -1
- package/lib/module/components/markdownViewer/type.js.map +1 -1
- package/lib/module/components/markdownViewer/util.js +30 -12
- package/lib/module/components/markdownViewer/util.js.map +1 -1
- package/lib/module/components/menu/components/menuButton/index.js +6 -6
- package/lib/module/components/menu/components/menuButton/index.js.map +1 -1
- package/lib/module/components/menu/index.js +12 -12
- package/lib/module/components/menu/index.js.map +1 -1
- package/lib/module/components/menu/stylesheet.js +10 -10
- package/lib/module/components/menu/stylesheet.js.map +1 -1
- package/lib/module/components/modal/index.js +15 -15
- package/lib/module/components/modal/index.js.map +1 -1
- package/lib/module/components/modal/stylesheet.js +6 -6
- package/lib/module/components/modal/stylesheet.js.map +1 -1
- package/lib/module/components/monthSelector/index.js +3 -3
- package/lib/module/components/monthSelector/index.js.map +1 -1
- package/lib/module/components/monthSelector/stylesheet.js +22 -22
- package/lib/module/components/monthSelector/stylesheet.js.map +1 -1
- package/lib/module/components/notificationIndicator/index.js +2 -2
- package/lib/module/components/notificationIndicator/index.js.map +1 -1
- package/lib/module/components/notificationIndicator/stylesheet.js +15 -15
- package/lib/module/components/notificationIndicator/stylesheet.js.map +1 -1
- package/lib/module/components/numericInput/index.js +24 -24
- package/lib/module/components/numericInput/index.js.map +1 -1
- package/lib/module/components/numericInput/stylesheet.js +69 -69
- package/lib/module/components/numericInput/stylesheet.js.map +1 -1
- package/lib/module/components/pageContainer/index.js +1 -1
- package/lib/module/components/pageContainer/index.js.map +1 -1
- package/lib/module/components/pageContainer/stylesheet.js +4 -4
- package/lib/module/components/pageContainer/stylesheet.js.map +1 -1
- package/lib/module/components/paletteSwitcher/index.js +14 -14
- package/lib/module/components/paletteSwitcher/index.js.map +1 -1
- package/lib/module/components/radioButton/index.js +5 -5
- package/lib/module/components/radioButton/index.js.map +1 -1
- package/lib/module/components/radioButton/stylesheet.js +45 -45
- package/lib/module/components/radioButton/stylesheet.js.map +1 -1
- package/lib/module/components/rowCard/index.js +7 -7
- package/lib/module/components/rowCard/index.js.map +1 -1
- package/lib/module/components/rowCard/stylesheet.js +23 -23
- package/lib/module/components/rowCard/stylesheet.js.map +1 -1
- package/lib/module/components/selectBox/index.js +32 -32
- package/lib/module/components/selectBox/index.js.map +1 -1
- package/lib/module/components/selectBox/stylesheet.js +71 -71
- package/lib/module/components/selectBox/stylesheet.js.map +1 -1
- package/lib/module/components/selectSheet/index.js +34 -34
- package/lib/module/components/selectSheet/index.js.map +1 -1
- package/lib/module/components/selectSheet/stylesheet.js +39 -39
- package/lib/module/components/selectSheet/stylesheet.js.map +1 -1
- package/lib/module/components/seperator/index.js +3 -3
- package/lib/module/components/seperator/index.js.map +1 -1
- package/lib/module/components/seperator/stylesheet.js +3 -3
- package/lib/module/components/seperator/stylesheet.js.map +1 -1
- package/lib/module/components/siteLogo/index.js +17 -17
- package/lib/module/components/siteLogo/index.js.map +1 -1
- package/lib/module/components/siteLogo/stylesheet.js +41 -41
- package/lib/module/components/siteLogo/stylesheet.js.map +1 -1
- package/lib/module/components/snackBar/index.js +37 -37
- package/lib/module/components/snackBar/index.js.map +1 -1
- package/lib/module/components/snackBar/stylesheet.js +36 -36
- package/lib/module/components/snackBar/stylesheet.js.map +1 -1
- package/lib/module/components/stateCard/index.js +5 -5
- package/lib/module/components/stateCard/index.js.map +1 -1
- package/lib/module/components/stateCard/stylesheet.js +17 -17
- package/lib/module/components/stateCard/stylesheet.js.map +1 -1
- package/lib/module/components/sticker/index.js +4 -4
- package/lib/module/components/sticker/index.js.map +1 -1
- package/lib/module/components/sticker/stylesheet.js +12 -12
- package/lib/module/components/sticker/stylesheet.js.map +1 -1
- package/lib/module/components/switch/index.js +6 -6
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/switch/stylesheet.js +46 -46
- package/lib/module/components/switch/stylesheet.js.map +1 -1
- package/lib/module/components/systemToolbar/index.js +133 -0
- package/lib/module/components/systemToolbar/index.js.map +1 -0
- package/lib/module/components/systemToolbar/stylesheet.js +50 -0
- package/lib/module/components/systemToolbar/stylesheet.js.map +1 -0
- package/lib/module/components/systemToolbar/type.js +4 -0
- package/lib/module/components/systemToolbar/type.js.map +1 -0
- package/lib/module/components/textAreaInput/index.js +54 -36
- package/lib/module/components/textAreaInput/index.js.map +1 -1
- package/lib/module/components/textAreaInput/stylesheet.js +84 -77
- package/lib/module/components/textAreaInput/stylesheet.js.map +1 -1
- package/lib/module/components/textAreaInput/type.js.map +1 -1
- package/lib/module/components/textInput/index.js +46 -34
- package/lib/module/components/textInput/index.js.map +1 -1
- package/lib/module/components/textInput/stylesheet.js +87 -80
- package/lib/module/components/textInput/stylesheet.js.map +1 -1
- package/lib/module/components/textInput/type.js.map +1 -1
- package/lib/module/components/themeSwitcher/index.js +15 -15
- package/lib/module/components/themeSwitcher/index.js.map +1 -1
- package/lib/module/components/timeSelector/components/timeInput/index.js +1 -1
- package/lib/module/components/timeSelector/components/timeInput/index.js.map +1 -1
- package/lib/module/components/timeSelector/components/timeInput/stylesheet.js +2 -2
- package/lib/module/components/timeSelector/components/timeInput/stylesheet.js.map +1 -1
- package/lib/module/components/timeSelector/index.js +14 -14
- package/lib/module/components/timeSelector/index.js.map +1 -1
- package/lib/module/components/timeSelector/stylesheet.js +10 -10
- package/lib/module/components/timeSelector/stylesheet.js.map +1 -1
- package/lib/module/components/toast/index.js +22 -22
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toast/stylesheet.js +33 -33
- package/lib/module/components/toast/stylesheet.js.map +1 -1
- package/lib/module/components/tooltip/index.js +350 -0
- package/lib/module/components/tooltip/index.js.map +1 -0
- package/lib/module/components/tooltip/stylesheet.js +144 -0
- package/lib/module/components/tooltip/stylesheet.js.map +1 -0
- package/lib/module/components/tooltip/type.js +4 -0
- package/lib/module/components/tooltip/type.js.map +1 -0
- package/lib/module/components/yearSelector/index.js +3 -3
- package/lib/module/components/yearSelector/index.js.map +1 -1
- package/lib/module/components/yearSelector/stylesheet.js +25 -25
- package/lib/module/components/yearSelector/stylesheet.js.map +1 -1
- package/lib/module/context/bottomSheet.js +3 -3
- package/lib/module/context/bottomSheet.js.map +1 -1
- package/lib/module/context/dialog.js +2 -2
- package/lib/module/context/dialog.js.map +1 -1
- package/lib/module/context/embeddedMenu.js +12 -12
- package/lib/module/context/embeddedMenu.js.map +1 -1
- package/lib/module/context/index.js +4 -4
- package/lib/module/context/index.js.map +1 -1
- package/lib/module/context/localize.js +6 -6
- package/lib/module/context/localize.js.map +1 -1
- package/lib/module/context/menu.js +10 -10
- package/lib/module/context/menu.js.map +1 -1
- package/lib/module/context/modal.js +2 -2
- package/lib/module/context/modal.js.map +1 -1
- package/lib/module/context/snackBar.js +3 -3
- package/lib/module/context/snackBar.js.map +1 -1
- package/lib/module/context/theme.js +5 -5
- package/lib/module/context/theme.js.map +1 -1
- package/lib/module/context/toast.js +3 -3
- package/lib/module/context/toast.js.map +1 -1
- package/lib/module/core/index.js +1 -1
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/helpers/portalize/Host.js +2 -2
- package/lib/module/helpers/portalize/Host.js.map +1 -1
- package/lib/module/helpers/portalize/Manager.js +1 -1
- package/lib/module/helpers/portalize/Manager.js.map +1 -1
- package/lib/module/helpers/portalize/context/index.js +12 -12
- package/lib/module/helpers/portalize/context/index.js.map +1 -1
- package/lib/module/helpers/theme/palette.js +1 -1
- package/lib/module/helpers/theme/palette.js.map +1 -1
- package/lib/module/helpers/theme/shapes.js +1 -1
- package/lib/module/helpers/theme/shapes.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -1
- package/lib/module/utils/index.js +8 -8
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/variants/locales/default.json +49 -11
- package/lib/module/variants/themes/default.json +1 -0
- package/lib/package.json +1 -1
- package/lib/src/assets/svg/cayCoreIcon/index.js +12 -12
- package/lib/src/assets/svg/enUSIcon/index.js +6 -6
- package/lib/src/assets/svg/loadingIcon/index.js +8 -8
- package/lib/src/assets/svg/nibgatCommunityIcon/index.js +2 -2
- package/lib/src/assets/svg/nibgatIcon/index.js +1 -1
- package/lib/src/assets/svg/trTRIcon/index.js +4 -4
- package/lib/src/components/avatar/index.js +10 -10
- package/lib/src/components/avatar/stylesheet.js +36 -36
- package/lib/src/components/avatarGroup/index.js +5 -5
- package/lib/src/components/avatarGroup/stylesheet.js +33 -33
- package/lib/src/components/bottomSheet/index.js +77 -77
- package/lib/src/components/button/index.js +3 -3
- package/lib/src/components/button/stylesheet.js +35 -35
- package/lib/src/components/checkBox/index.js +7 -7
- package/lib/src/components/checkBox/stylesheet.js +41 -41
- package/lib/src/components/chip/index.js +10 -10
- package/lib/src/components/chip/stylesheet.js +18 -18
- package/lib/src/components/codeEditor/index.js +252 -0
- package/lib/src/components/codeEditor/stylesheet.js +182 -0
- package/lib/src/components/codeEditor/type.js +1 -0
- package/lib/src/components/codeViewer/index.js +12 -12
- package/lib/src/components/codeViewer/parser.js +156 -158
- package/lib/src/components/codeViewer/stylesheet.js +41 -38
- package/lib/src/components/dateSelector/index.js +5 -5
- package/lib/src/components/dateSelector/stylesheet.js +24 -24
- package/lib/src/components/dateTimePicker/index.js +32 -32
- package/lib/src/components/dateTimePicker/stylesheet.js +71 -71
- package/lib/src/components/dateTimeSheet/index.js +14 -14
- package/lib/src/components/dateTimeSheet/stylesheet.js +38 -38
- package/lib/src/components/dialog/index.js +8 -8
- package/lib/src/components/dialog/stylesheet.js +18 -18
- package/lib/src/components/embeddedMenu/components/menuButton/index.js +9 -9
- package/lib/src/components/embeddedMenu/index.js +15 -15
- package/lib/src/components/embeddedMenu/stylesheet.js +18 -18
- package/lib/src/components/header/index.js +7 -7
- package/lib/src/components/header/stylesheet.js +19 -19
- package/lib/src/components/highlightButton/index.js +3 -3
- package/lib/src/components/highlightButton/stylesheet.js +30 -30
- package/lib/src/components/index.js +4 -0
- package/lib/src/components/loading/index.js +2 -2
- package/lib/src/components/localeSwitcher/index.js +12 -12
- package/lib/src/components/mainHeader/index.js +11 -11
- package/lib/src/components/markdownEditor/index.js +223 -0
- package/lib/src/components/markdownEditor/stylesheet.js +122 -0
- package/lib/src/components/markdownEditor/type.js +2 -0
- package/lib/src/components/markdownViewer/constant.js +6 -6
- package/lib/src/components/markdownViewer/index.js +72 -75
- package/lib/src/components/markdownViewer/stylesheet.js +25 -30
- package/lib/src/components/markdownViewer/util.js +28 -11
- package/lib/src/components/menu/components/menuButton/index.js +3 -3
- package/lib/src/components/menu/index.js +10 -10
- package/lib/src/components/menu/stylesheet.js +10 -10
- package/lib/src/components/modal/index.js +17 -17
- package/lib/src/components/modal/stylesheet.js +6 -6
- package/lib/src/components/monthSelector/index.js +4 -4
- package/lib/src/components/monthSelector/stylesheet.js +22 -22
- package/lib/src/components/notificationIndicator/index.js +1 -1
- package/lib/src/components/notificationIndicator/stylesheet.js +15 -15
- package/lib/src/components/numericInput/index.js +25 -25
- package/lib/src/components/numericInput/stylesheet.js +69 -69
- package/lib/src/components/pageContainer/index.js +1 -1
- package/lib/src/components/pageContainer/stylesheet.js +4 -4
- package/lib/src/components/paletteSwitcher/index.js +15 -15
- package/lib/src/components/radioButton/index.js +4 -4
- package/lib/src/components/radioButton/stylesheet.js +45 -45
- package/lib/src/components/rowCard/index.js +6 -6
- package/lib/src/components/rowCard/stylesheet.js +23 -23
- package/lib/src/components/selectBox/index.js +24 -24
- package/lib/src/components/selectBox/stylesheet.js +71 -71
- package/lib/src/components/selectSheet/index.js +22 -22
- package/lib/src/components/selectSheet/stylesheet.js +39 -39
- package/lib/src/components/seperator/index.js +1 -1
- package/lib/src/components/seperator/stylesheet.js +3 -3
- package/lib/src/components/siteLogo/index.js +14 -14
- package/lib/src/components/siteLogo/stylesheet.js +40 -40
- package/lib/src/components/snackBar/index.js +31 -31
- package/lib/src/components/snackBar/stylesheet.js +36 -36
- package/lib/src/components/stateCard/index.js +4 -4
- package/lib/src/components/stateCard/stylesheet.js +17 -17
- package/lib/src/components/sticker/index.js +3 -3
- package/lib/src/components/sticker/stylesheet.js +11 -11
- package/lib/src/components/switch/index.js +5 -5
- package/lib/src/components/switch/stylesheet.js +46 -46
- package/lib/src/components/systemToolbar/index.js +69 -0
- package/lib/src/components/systemToolbar/stylesheet.js +43 -0
- package/lib/src/components/systemToolbar/type.js +3 -0
- package/lib/src/components/textAreaInput/index.js +40 -28
- package/lib/src/components/textAreaInput/stylesheet.js +82 -77
- package/lib/src/components/textInput/index.js +38 -31
- package/lib/src/components/textInput/stylesheet.js +85 -80
- package/lib/src/components/themeSwitcher/index.js +16 -16
- package/lib/src/components/timeSelector/components/timeInput/index.js +2 -2
- package/lib/src/components/timeSelector/components/timeInput/stylesheet.js +2 -2
- package/lib/src/components/timeSelector/index.js +23 -23
- package/lib/src/components/timeSelector/stylesheet.js +10 -10
- package/lib/src/components/toast/index.js +18 -18
- package/lib/src/components/toast/stylesheet.js +33 -33
- package/lib/src/components/tooltip/index.js +303 -0
- package/lib/src/components/tooltip/stylesheet.js +133 -0
- package/lib/src/components/tooltip/type.js +2 -0
- package/lib/src/components/yearSelector/index.js +4 -4
- package/lib/src/components/yearSelector/stylesheet.js +25 -25
- package/lib/src/context/bottomSheet.js +3 -3
- package/lib/src/context/dialog.js +3 -3
- package/lib/src/context/embeddedMenu.js +10 -10
- package/lib/src/context/index.js +4 -4
- package/lib/src/context/localize.js +6 -6
- package/lib/src/context/menu.js +10 -10
- package/lib/src/context/modal.js +3 -3
- package/lib/src/context/snackBar.js +3 -3
- package/lib/src/context/theme.js +4 -4
- package/lib/src/context/toast.js +3 -3
- package/lib/src/core/index.js +1 -1
- package/lib/src/helpers/portalize/Host.js +3 -3
- package/lib/src/helpers/portalize/Manager.js +2 -2
- package/lib/src/helpers/portalize/context/index.js +12 -12
- package/lib/src/helpers/theme/palette.js +1 -1
- package/lib/src/helpers/theme/shapes.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/utils/index.js +8 -8
- package/lib/src/variants/locales/default.json +49 -11
- package/lib/src/variants/themes/default.json +1 -0
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/typescript/package.json +1 -1
- package/lib/typescript/src/components/avatar/index.d.ts +1 -1
- package/lib/typescript/src/components/avatar/stylesheet.d.ts +6 -6
- package/lib/typescript/src/components/avatar/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar/type.d.ts +1 -1
- package/lib/typescript/src/components/avatar/type.d.ts.map +1 -1
- package/lib/typescript/src/components/avatarGroup/index.d.ts +1 -1
- package/lib/typescript/src/components/avatarGroup/stylesheet.d.ts +8 -8
- package/lib/typescript/src/components/avatarGroup/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/bottomSheet/type.d.ts +6 -6
- package/lib/typescript/src/components/bottomSheet/type.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/stylesheet.d.ts +7 -7
- package/lib/typescript/src/components/button/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/checkBox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/checkBox/stylesheet.d.ts +18 -18
- package/lib/typescript/src/components/checkBox/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/checkBox/type.d.ts +1 -1
- package/lib/typescript/src/components/checkBox/type.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/stylesheet.d.ts +8 -8
- package/lib/typescript/src/components/chip/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/codeEditor/index.d.ts +4 -0
- package/lib/typescript/src/components/codeEditor/index.d.ts.map +1 -0
- package/lib/typescript/src/components/codeEditor/stylesheet.d.ts +749 -0
- package/lib/typescript/src/components/codeEditor/stylesheet.d.ts.map +1 -0
- package/lib/typescript/src/components/codeEditor/type.d.ts +29 -0
- package/lib/typescript/src/components/codeEditor/type.d.ts.map +1 -0
- package/lib/typescript/src/components/codeViewer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/codeViewer/stylesheet.d.ts +33 -30
- package/lib/typescript/src/components/codeViewer/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/dateSelector/stylesheet.d.ts +11 -11
- package/lib/typescript/src/components/dateSelector/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/dateTimePicker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/dateTimePicker/stylesheet.d.ts +39 -39
- package/lib/typescript/src/components/dateTimePicker/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/dateTimePicker/type.d.ts +1 -1
- package/lib/typescript/src/components/dateTimePicker/type.d.ts.map +1 -1
- package/lib/typescript/src/components/dateTimeSheet/index.d.ts +1 -1
- package/lib/typescript/src/components/dateTimeSheet/stylesheet.d.ts +24 -24
- package/lib/typescript/src/components/dateTimeSheet/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/dateTimeSheet/type.d.ts +4 -4
- package/lib/typescript/src/components/dateTimeSheet/type.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/stylesheet.d.ts +12 -12
- package/lib/typescript/src/components/dialog/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/type.d.ts +5 -5
- package/lib/typescript/src/components/dialog/type.d.ts.map +1 -1
- package/lib/typescript/src/components/embeddedMenu/stylesheet.d.ts +17 -17
- package/lib/typescript/src/components/embeddedMenu/type.d.ts +1 -1
- package/lib/typescript/src/components/embeddedMenu/type.d.ts.map +1 -1
- package/lib/typescript/src/components/header/index.d.ts +1 -1
- package/lib/typescript/src/components/header/stylesheet.d.ts +22 -22
- package/lib/typescript/src/components/header/type.d.ts +4 -1
- package/lib/typescript/src/components/header/type.d.ts.map +1 -1
- package/lib/typescript/src/components/highlightButton/index.d.ts.map +1 -1
- package/lib/typescript/src/components/highlightButton/stylesheet.d.ts +7 -7
- package/lib/typescript/src/components/highlightButton/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +14 -6
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/mainHeader/index.d.ts +1 -1
- package/lib/typescript/src/components/markdownEditor/index.d.ts +5 -0
- package/lib/typescript/src/components/markdownEditor/index.d.ts.map +1 -0
- package/lib/typescript/src/components/markdownEditor/stylesheet.d.ts +112 -0
- package/lib/typescript/src/components/markdownEditor/stylesheet.d.ts.map +1 -0
- package/lib/typescript/src/components/markdownEditor/type.d.ts +22 -0
- package/lib/typescript/src/components/markdownEditor/type.d.ts.map +1 -0
- package/lib/typescript/src/components/markdownViewer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/markdownViewer/stylesheet.d.ts +24 -29
- package/lib/typescript/src/components/markdownViewer/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/markdownViewer/type.d.ts +5 -4
- package/lib/typescript/src/components/markdownViewer/type.d.ts.map +1 -1
- package/lib/typescript/src/components/markdownViewer/util.d.ts +3 -2
- package/lib/typescript/src/components/markdownViewer/util.d.ts.map +1 -1
- package/lib/typescript/src/components/menu/stylesheet.d.ts +10 -10
- package/lib/typescript/src/components/menu/type.d.ts +2 -2
- package/lib/typescript/src/components/menu/type.d.ts.map +1 -1
- package/lib/typescript/src/components/modal/stylesheet.d.ts +4 -4
- package/lib/typescript/src/components/modal/type.d.ts +2 -2
- package/lib/typescript/src/components/modal/type.d.ts.map +1 -1
- package/lib/typescript/src/components/monthSelector/stylesheet.d.ts +12 -12
- package/lib/typescript/src/components/monthSelector/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/notificationIndicator/stylesheet.d.ts +6 -6
- package/lib/typescript/src/components/notificationIndicator/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/notificationIndicator/type.d.ts +2 -2
- package/lib/typescript/src/components/notificationIndicator/type.d.ts.map +1 -1
- package/lib/typescript/src/components/numericInput/index.d.ts.map +1 -1
- package/lib/typescript/src/components/numericInput/stylesheet.d.ts +37 -37
- package/lib/typescript/src/components/numericInput/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/numericInput/type.d.ts +1 -1
- package/lib/typescript/src/components/numericInput/type.d.ts.map +1 -1
- package/lib/typescript/src/components/pageContainer/stylesheet.d.ts +3 -3
- package/lib/typescript/src/components/pageContainer/type.d.ts +6 -6
- package/lib/typescript/src/components/pageContainer/type.d.ts.map +1 -1
- package/lib/typescript/src/components/radioButton/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radioButton/stylesheet.d.ts +22 -22
- package/lib/typescript/src/components/radioButton/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/radioButton/type.d.ts +2 -2
- package/lib/typescript/src/components/radioButton/type.d.ts.map +1 -1
- package/lib/typescript/src/components/rowCard/stylesheet.d.ts +16 -16
- package/lib/typescript/src/components/rowCard/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/selectBox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selectBox/stylesheet.d.ts +39 -39
- package/lib/typescript/src/components/selectBox/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/selectBox/type.d.ts +41 -41
- package/lib/typescript/src/components/selectBox/type.d.ts.map +1 -1
- package/lib/typescript/src/components/selectSheet/index.d.ts +1 -1
- package/lib/typescript/src/components/selectSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selectSheet/stylesheet.d.ts +27 -27
- package/lib/typescript/src/components/selectSheet/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/selectSheet/type.d.ts +11 -11
- package/lib/typescript/src/components/selectSheet/type.d.ts.map +1 -1
- package/lib/typescript/src/components/seperator/stylesheet.d.ts +2 -2
- package/lib/typescript/src/components/seperator/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/siteLogo/index.d.ts +1 -1
- package/lib/typescript/src/components/siteLogo/stylesheet.d.ts +7 -7
- package/lib/typescript/src/components/siteLogo/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/snackBar/stylesheet.d.ts +14 -14
- package/lib/typescript/src/components/snackBar/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/snackBar/type.d.ts +10 -10
- package/lib/typescript/src/components/snackBar/type.d.ts.map +1 -1
- package/lib/typescript/src/components/stateCard/stylesheet.d.ts +2 -2
- package/lib/typescript/src/components/stateCard/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/sticker/stylesheet.d.ts +1 -1
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/stylesheet.d.ts +18 -18
- package/lib/typescript/src/components/switch/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/type.d.ts +2 -2
- package/lib/typescript/src/components/switch/type.d.ts.map +1 -1
- package/lib/typescript/src/components/systemToolbar/index.d.ts +5 -0
- package/lib/typescript/src/components/systemToolbar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/systemToolbar/stylesheet.d.ts +23 -0
- package/lib/typescript/src/components/systemToolbar/stylesheet.d.ts.map +1 -0
- package/lib/typescript/src/components/systemToolbar/type.d.ts +28 -0
- package/lib/typescript/src/components/systemToolbar/type.d.ts.map +1 -0
- package/lib/typescript/src/components/text/type.d.ts +4 -4
- package/lib/typescript/src/components/text/type.d.ts.map +1 -1
- package/lib/typescript/src/components/textAreaInput/index.d.ts.map +1 -1
- package/lib/typescript/src/components/textAreaInput/stylesheet.d.ts +47 -46
- package/lib/typescript/src/components/textAreaInput/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/textAreaInput/type.d.ts +13 -7
- package/lib/typescript/src/components/textAreaInput/type.d.ts.map +1 -1
- package/lib/typescript/src/components/textInput/index.d.ts.map +1 -1
- package/lib/typescript/src/components/textInput/stylesheet.d.ts +41 -44
- package/lib/typescript/src/components/textInput/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/textInput/type.d.ts +6 -0
- package/lib/typescript/src/components/textInput/type.d.ts.map +1 -1
- package/lib/typescript/src/components/timeSelector/components/timeInput/stylesheet.d.ts +1 -1
- package/lib/typescript/src/components/timeSelector/components/timeInput/type.d.ts +1 -1
- package/lib/typescript/src/components/timeSelector/components/timeInput/type.d.ts.map +1 -1
- package/lib/typescript/src/components/timeSelector/index.d.ts +1 -1
- package/lib/typescript/src/components/timeSelector/stylesheet.d.ts +8 -8
- package/lib/typescript/src/components/timeSelector/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/stylesheet.d.ts +12 -12
- package/lib/typescript/src/components/toast/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/type.d.ts +10 -10
- package/lib/typescript/src/components/toast/type.d.ts.map +1 -1
- package/lib/typescript/src/components/tooltip/index.d.ts +5 -0
- package/lib/typescript/src/components/tooltip/index.d.ts.map +1 -0
- package/lib/typescript/src/components/tooltip/stylesheet.d.ts +66 -0
- package/lib/typescript/src/components/tooltip/stylesheet.d.ts.map +1 -0
- package/lib/typescript/src/components/tooltip/type.d.ts +74 -0
- package/lib/typescript/src/components/tooltip/type.d.ts.map +1 -0
- package/lib/typescript/src/components/yearSelector/stylesheet.d.ts +16 -15
- package/lib/typescript/src/components/yearSelector/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/context/index.d.ts +4 -4
- package/lib/typescript/src/context/index.d.ts.map +1 -1
- package/lib/typescript/src/context/theme.d.ts +1 -1
- package/lib/typescript/src/context/theme.d.ts.map +1 -1
- package/lib/typescript/src/core/hooks.d.ts +5 -5
- package/lib/typescript/src/core/hooks.d.ts.map +1 -1
- package/lib/typescript/src/core/index.d.ts.map +1 -1
- package/lib/typescript/src/helpers/portalize/Host.d.ts.map +1 -1
- package/lib/typescript/src/helpers/portalize/context/index.d.ts +2 -2
- package/lib/typescript/src/helpers/portalize/context/index.d.ts.map +1 -1
- package/lib/typescript/src/helpers/theme/shapes.d.ts +1 -0
- package/lib/typescript/src/helpers/theme/shapes.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/bottomSheet.d.ts +1 -1
- package/lib/typescript/src/types/bottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/types/dialog.d.ts +1 -1
- package/lib/typescript/src/types/dialog.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +1 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/locale.d.ts +3 -3
- package/lib/typescript/src/types/locale.d.ts.map +1 -1
- package/lib/typescript/src/types/modal.d.ts +1 -1
- package/lib/typescript/src/types/modal.d.ts.map +1 -1
- package/lib/typescript/src/types/snackBar.d.ts +1 -1
- package/lib/typescript/src/types/snackBar.d.ts.map +1 -1
- package/lib/typescript/src/types/toast.d.ts +1 -1
- package/lib/typescript/src/types/toast.d.ts.map +1 -1
- package/lib/typescript/src/variants/locales/default.json +49 -11
- package/lib/typescript/src/variants/themes/default.json +1 -0
- package/package.json +1 -1
- package/src/assets/svg/cayCoreIcon/index.tsx +94 -94
- package/src/assets/svg/enUSIcon/index.tsx +21 -21
- package/src/assets/svg/loadingIcon/index.tsx +10 -10
- package/src/assets/svg/nibgatCommunityIcon/index.tsx +7 -7
- package/src/assets/svg/nibgatIcon/index.tsx +5 -5
- package/src/assets/svg/trTRIcon/index.tsx +9 -9
- package/src/components/avatar/index.tsx +19 -19
- package/src/components/avatar/stylesheet.ts +42 -42
- package/src/components/avatar/type.ts +1 -1
- package/src/components/avatarGroup/index.tsx +18 -18
- package/src/components/avatarGroup/stylesheet.ts +35 -35
- package/src/components/avatarGroup/type.ts +10 -10
- package/src/components/bottomSheet/index.tsx +115 -115
- package/src/components/bottomSheet/type.ts +6 -6
- package/src/components/button/index.tsx +5 -6
- package/src/components/button/stylesheet.ts +37 -37
- package/src/components/checkBox/index.tsx +11 -14
- package/src/components/checkBox/stylesheet.ts +41 -41
- package/src/components/checkBox/type.ts +1 -1
- package/src/components/chip/index.tsx +19 -19
- package/src/components/chip/stylesheet.ts +21 -21
- package/src/components/codeEditor/index.tsx +438 -0
- package/src/components/codeEditor/stylesheet.ts +208 -0
- package/src/components/codeEditor/type.ts +39 -0
- package/src/components/codeViewer/index.tsx +30 -32
- package/src/components/codeViewer/parser.ts +160 -160
- package/src/components/codeViewer/stylesheet.ts +43 -40
- package/src/components/dateSelector/index.tsx +13 -13
- package/src/components/dateSelector/stylesheet.ts +24 -24
- package/src/components/dateTimePicker/index.tsx +77 -81
- package/src/components/dateTimePicker/stylesheet.ts +81 -81
- package/src/components/dateTimePicker/type.ts +20 -19
- package/src/components/dateTimeSheet/index.tsx +66 -66
- package/src/components/dateTimeSheet/stylesheet.ts +36 -36
- package/src/components/dateTimeSheet/type.ts +21 -21
- package/src/components/dialog/index.tsx +24 -24
- package/src/components/dialog/stylesheet.ts +18 -18
- package/src/components/dialog/type.ts +9 -9
- package/src/components/embeddedMenu/components/menuButton/index.tsx +15 -15
- package/src/components/embeddedMenu/index.tsx +50 -50
- package/src/components/embeddedMenu/stylesheet.ts +17 -17
- package/src/components/embeddedMenu/type.ts +4 -4
- package/src/components/header/index.tsx +18 -18
- package/src/components/header/stylesheet.ts +18 -18
- package/src/components/header/type.ts +4 -1
- package/src/components/highlightButton/index.tsx +4 -5
- package/src/components/highlightButton/stylesheet.ts +32 -32
- package/src/components/index.ts +41 -6
- package/src/components/loading/index.tsx +4 -4
- package/src/components/loading/stylesheet.ts +10 -10
- package/src/components/loading/type.ts +18 -18
- package/src/components/localeSwitcher/index.tsx +23 -23
- package/src/components/mainHeader/index.tsx +18 -18
- package/src/components/markdownEditor/index.tsx +530 -0
- package/src/components/markdownEditor/stylesheet.ts +140 -0
- package/src/components/markdownEditor/type.ts +34 -0
- package/src/components/markdownViewer/constant.ts +6 -6
- package/src/components/markdownViewer/index.tsx +117 -112
- package/src/components/markdownViewer/stylesheet.ts +25 -30
- package/src/components/markdownViewer/type.ts +15 -13
- package/src/components/markdownViewer/util.ts +34 -12
- package/src/components/menu/components/menuButton/index.tsx +9 -9
- package/src/components/menu/index.tsx +29 -29
- package/src/components/menu/stylesheet.ts +10 -10
- package/src/components/menu/type.ts +6 -6
- package/src/components/modal/index.tsx +20 -20
- package/src/components/modal/stylesheet.ts +6 -6
- package/src/components/modal/type.ts +2 -2
- package/src/components/monthSelector/index.tsx +24 -24
- package/src/components/monthSelector/stylesheet.ts +22 -22
- package/src/components/notificationIndicator/index.tsx +2 -2
- package/src/components/notificationIndicator/stylesheet.ts +16 -16
- package/src/components/notificationIndicator/type.ts +2 -2
- package/src/components/numericInput/index.tsx +52 -57
- package/src/components/numericInput/stylesheet.ts +71 -71
- package/src/components/numericInput/type.ts +1 -1
- package/src/components/pageContainer/index.tsx +1 -1
- package/src/components/pageContainer/stylesheet.ts +3 -3
- package/src/components/pageContainer/type.ts +6 -6
- package/src/components/paletteSwitcher/index.tsx +27 -27
- package/src/components/radioButton/index.tsx +7 -10
- package/src/components/radioButton/stylesheet.ts +45 -45
- package/src/components/radioButton/type.ts +2 -2
- package/src/components/rowCard/index.tsx +11 -11
- package/src/components/rowCard/stylesheet.ts +23 -23
- package/src/components/selectBox/index.tsx +53 -59
- package/src/components/selectBox/stylesheet.ts +76 -76
- package/src/components/selectBox/type.ts +51 -51
- package/src/components/selectSheet/index.tsx +84 -84
- package/src/components/selectSheet/stylesheet.ts +39 -39
- package/src/components/selectSheet/type.ts +21 -21
- package/src/components/seperator/index.tsx +3 -3
- package/src/components/seperator/stylesheet.ts +4 -4
- package/src/components/siteLogo/index.tsx +35 -35
- package/src/components/siteLogo/stylesheet.ts +42 -42
- package/src/components/snackBar/index.tsx +50 -50
- package/src/components/snackBar/stylesheet.ts +40 -40
- package/src/components/snackBar/type.ts +10 -10
- package/src/components/stateCard/index.tsx +13 -13
- package/src/components/stateCard/stylesheet.ts +17 -17
- package/src/components/sticker/index.tsx +4 -4
- package/src/components/sticker/stylesheet.ts +12 -12
- package/src/components/switch/index.tsx +10 -13
- package/src/components/switch/stylesheet.ts +48 -48
- package/src/components/switch/type.ts +2 -2
- package/src/components/systemToolbar/index.tsx +188 -0
- package/src/components/systemToolbar/stylesheet.ts +59 -0
- package/src/components/systemToolbar/type.ts +43 -0
- package/src/components/text/type.ts +4 -4
- package/src/components/textAreaInput/index.tsx +55 -42
- package/src/components/textAreaInput/stylesheet.ts +88 -81
- package/src/components/textAreaInput/type.ts +13 -7
- package/src/components/textInput/index.tsx +55 -48
- package/src/components/textInput/stylesheet.ts +90 -81
- package/src/components/textInput/type.ts +6 -0
- package/src/components/themeSwitcher/index.tsx +27 -27
- package/src/components/timeSelector/components/timeInput/index.tsx +6 -6
- package/src/components/timeSelector/components/timeInput/stylesheet.ts +2 -2
- package/src/components/timeSelector/components/timeInput/type.ts +2 -2
- package/src/components/timeSelector/index.tsx +42 -42
- package/src/components/timeSelector/stylesheet.ts +11 -11
- package/src/components/toast/index.tsx +32 -32
- package/src/components/toast/stylesheet.ts +37 -37
- package/src/components/toast/type.ts +10 -10
- package/src/components/tooltip/index.tsx +477 -0
- package/src/components/tooltip/stylesheet.ts +177 -0
- package/src/components/tooltip/type.ts +93 -0
- package/src/components/yearSelector/index.tsx +24 -24
- package/src/components/yearSelector/stylesheet.ts +25 -25
- package/src/context/bottomSheet.tsx +9 -9
- package/src/context/dialog.tsx +8 -8
- package/src/context/embeddedMenu.tsx +18 -18
- package/src/context/index.tsx +11 -11
- package/src/context/localize.tsx +12 -12
- package/src/context/menu.tsx +16 -16
- package/src/context/modal.tsx +8 -8
- package/src/context/snackBar.tsx +7 -7
- package/src/context/theme.tsx +16 -16
- package/src/context/toast.tsx +7 -7
- package/src/core/hooks.ts +10 -10
- package/src/core/index.tsx +11 -12
- package/src/helpers/portalize/Host.tsx +9 -10
- package/src/helpers/portalize/Manager.tsx +3 -3
- package/src/helpers/portalize/context/index.ts +12 -12
- package/src/helpers/theme/palette.ts +1 -1
- package/src/helpers/theme/shapes.ts +1 -1
- package/src/index.tsx +11 -2
- package/src/types/bottomSheet.ts +1 -1
- package/src/types/dialog.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/locale.ts +4 -4
- package/src/types/modal.ts +1 -1
- package/src/types/portalize.ts +3 -3
- package/src/types/snackBar.ts +1 -1
- package/src/types/toast.ts +1 -1
- package/src/utils/index.ts +8 -8
- package/src/variants/locales/default.json +49 -11
- package/src/variants/themes/default.json +1 -0
|
@@ -3,9 +3,9 @@ import {} from "react";
|
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import stylesheet, { getStateCardType, useStyles } from "./stylesheet";
|
|
5
5
|
import { NCoreUIKitTheme } from "../../core/hooks";
|
|
6
|
-
import Text from "../text";
|
|
7
6
|
import Button from "../button";
|
|
8
|
-
|
|
7
|
+
import Text from "../text";
|
|
8
|
+
const StateCard = ({ type = "neutral", icon: IconProp, subTitleStyle, customTheme, titleStyle, iconSize, subTitle, action, style, title, ...props }) => {
|
|
9
9
|
const { spaces } = NCoreUIKitTheme.useContext(customTheme);
|
|
10
10
|
const currentType = getStateCardType({
|
|
11
11
|
type
|
|
@@ -55,10 +55,10 @@ const StateCard = ({ type = "neutral", icon: IconProp, subTitleStyle, customThem
|
|
|
55
55
|
if (!action) {
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
|
-
return _jsx(Button, { size: "small", ...action,
|
|
58
|
+
return _jsx(Button, { size: "small", ...action, style: [
|
|
59
59
|
action.style,
|
|
60
60
|
actionButtonDynamicStyle
|
|
61
|
-
] });
|
|
61
|
+
], spreadBehaviour: "free", type: type });
|
|
62
62
|
};
|
|
63
63
|
return _jsxs(View, { ...props, style: [
|
|
64
64
|
style,
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import {} from "./type";
|
|
3
3
|
export const CHECK_BOX_TYPE_STYLES = {
|
|
4
|
-
primary: {
|
|
5
|
-
iconColor: "emphasized",
|
|
6
|
-
containerColor: "mid",
|
|
7
|
-
subTitleColor: "low",
|
|
8
|
-
titleColor: "mid"
|
|
9
|
-
},
|
|
10
|
-
danger: {
|
|
11
|
-
subTitleColor: "dangerLow",
|
|
12
|
-
containerColor: "danger",
|
|
13
|
-
titleColor: "danger",
|
|
14
|
-
iconColor: "danger"
|
|
15
|
-
},
|
|
16
4
|
success: {
|
|
17
5
|
subTitleColor: "successLow",
|
|
18
6
|
containerColor: "success",
|
|
@@ -25,6 +13,12 @@ export const CHECK_BOX_TYPE_STYLES = {
|
|
|
25
13
|
titleColor: "warning",
|
|
26
14
|
iconColor: "warning"
|
|
27
15
|
},
|
|
16
|
+
danger: {
|
|
17
|
+
subTitleColor: "dangerLow",
|
|
18
|
+
containerColor: "danger",
|
|
19
|
+
titleColor: "danger",
|
|
20
|
+
iconColor: "danger"
|
|
21
|
+
},
|
|
28
22
|
info: {
|
|
29
23
|
subTitleColor: "infoLow",
|
|
30
24
|
containerColor: "info",
|
|
@@ -36,6 +30,12 @@ export const CHECK_BOX_TYPE_STYLES = {
|
|
|
36
30
|
containerColor: "mid",
|
|
37
31
|
subTitleColor: "low",
|
|
38
32
|
titleColor: "mid"
|
|
33
|
+
},
|
|
34
|
+
primary: {
|
|
35
|
+
iconColor: "emphasized",
|
|
36
|
+
containerColor: "mid",
|
|
37
|
+
subTitleColor: "low",
|
|
38
|
+
titleColor: "mid"
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
export const getStateCardType = ({ type }) => {
|
|
@@ -64,10 +64,6 @@ const stylesheet = StyleSheet.create({
|
|
|
64
64
|
});
|
|
65
65
|
export const useStyles = ({ spaces }) => {
|
|
66
66
|
const styles = {
|
|
67
|
-
container: {
|
|
68
|
-
padding: spaces.spacingSm
|
|
69
|
-
},
|
|
70
|
-
titleContainer: {},
|
|
71
67
|
icon: {
|
|
72
68
|
marginBottom: spaces.spacingXs,
|
|
73
69
|
marginTop: spaces.spacingXs
|
|
@@ -83,7 +79,11 @@ export const useStyles = ({ spaces }) => {
|
|
|
83
79
|
actionButton: {
|
|
84
80
|
marginBottom: spaces.spacingXs,
|
|
85
81
|
marginTop: spaces.spacingXs
|
|
86
|
-
}
|
|
82
|
+
},
|
|
83
|
+
container: {
|
|
84
|
+
padding: spaces.spacingSm
|
|
85
|
+
},
|
|
86
|
+
titleContainer: {}
|
|
87
87
|
};
|
|
88
88
|
return styles;
|
|
89
89
|
};
|
|
@@ -4,7 +4,7 @@ import { View } from "react-native";
|
|
|
4
4
|
import stylesheet, { getStickerType, useStyles } from "./stylesheet";
|
|
5
5
|
import { NCoreUIKitTheme } from "../../core/hooks";
|
|
6
6
|
import Text from "../text";
|
|
7
|
-
const Sticker = ({ spreadBehaviour = "baseline", iconPosition = "left", type = "neutral",
|
|
7
|
+
const Sticker = ({ spreadBehaviour = "baseline", iconPosition = "left", customTitleColor, type = "neutral", customIconColor, size = "medium", icon: IconProp, customColor, customTheme, titleStyle, style, title, ...props }) => {
|
|
8
8
|
const { typography, radiuses, spaces, colors } = NCoreUIKitTheme.useContext(customTheme);
|
|
9
9
|
const currentType = getStickerType({
|
|
10
10
|
type
|
|
@@ -12,11 +12,11 @@ const Sticker = ({ spreadBehaviour = "baseline", iconPosition = "left", type = "
|
|
|
12
12
|
const { titleContainer: titleContainerDynamicStyle, container: containerDynamicStyle, title: titleDynamicStyle, icon: iconDynamicStyle } = useStyles({
|
|
13
13
|
spreadBehaviour,
|
|
14
14
|
iconPosition,
|
|
15
|
-
customColor,
|
|
16
15
|
currentType,
|
|
16
|
+
customColor,
|
|
17
17
|
radiuses,
|
|
18
|
-
spaces,
|
|
19
18
|
colors,
|
|
19
|
+
spaces,
|
|
20
20
|
size
|
|
21
21
|
});
|
|
22
22
|
const iconProps = {
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import {} from "./type";
|
|
3
3
|
export const CHECK_BOX_TYPE_STYLES = {
|
|
4
|
-
primary: {
|
|
5
|
-
containerColor: "mid",
|
|
6
|
-
titleColor: "mid",
|
|
7
|
-
iconColor: "mid"
|
|
8
|
-
},
|
|
9
|
-
danger: {
|
|
10
|
-
containerColor: "danger",
|
|
11
|
-
titleColor: "danger",
|
|
12
|
-
iconColor: "danger"
|
|
13
|
-
},
|
|
14
4
|
success: {
|
|
15
5
|
containerColor: "success",
|
|
16
6
|
titleColor: "success",
|
|
@@ -21,6 +11,11 @@ export const CHECK_BOX_TYPE_STYLES = {
|
|
|
21
11
|
titleColor: "warning",
|
|
22
12
|
iconColor: "warning"
|
|
23
13
|
},
|
|
14
|
+
danger: {
|
|
15
|
+
containerColor: "danger",
|
|
16
|
+
titleColor: "danger",
|
|
17
|
+
iconColor: "danger"
|
|
18
|
+
},
|
|
24
19
|
info: {
|
|
25
20
|
containerColor: "info",
|
|
26
21
|
titleColor: "info",
|
|
@@ -30,6 +25,11 @@ export const CHECK_BOX_TYPE_STYLES = {
|
|
|
30
25
|
containerColor: "mid",
|
|
31
26
|
titleColor: "mid",
|
|
32
27
|
iconColor: "mid"
|
|
28
|
+
},
|
|
29
|
+
primary: {
|
|
30
|
+
containerColor: "mid",
|
|
31
|
+
titleColor: "mid",
|
|
32
|
+
iconColor: "mid"
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
export const getStickerType = ({ type }) => {
|
|
@@ -53,7 +53,7 @@ const stylesheet = StyleSheet.create({
|
|
|
53
53
|
margin: 0
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
export const useStyles = ({ spreadBehaviour, iconPosition,
|
|
56
|
+
export const useStyles = ({ spreadBehaviour, iconPosition, currentType, customColor, radiuses, colors, spaces, size }) => {
|
|
57
57
|
const styles = {
|
|
58
58
|
container: {
|
|
59
59
|
paddingHorizontal: size === "small" ? spaces.spacingSm : spaces.spacingMd,
|
|
@@ -5,7 +5,7 @@ import stylesheet, { getSwitchType, useStyles } from "./stylesheet";
|
|
|
5
5
|
import { NCoreUIKitLocalize, NCoreUIKitTheme } from "../../core/hooks";
|
|
6
6
|
import Loading from "../loading";
|
|
7
7
|
import Text from "../text";
|
|
8
|
-
const Switch = ({ displayBehaviourWhileLoading = "disabled", spreadBehaviour = "baseline", animationDuration = 100,
|
|
8
|
+
const Switch = ({ displayBehaviourWhileLoading = "disabled", spreadBehaviour = "baseline", animationDuration = 100, isDisabled = false, isOptional = false, type = "neutral", customLocalize, isFlip = false, subTitleStyle, optionalText, customTheme, titleStyle, isLoading, isActive, subTitle, onPress, style, title, ...props }) => {
|
|
9
9
|
const { inlineSpaces, colors, spaces } = NCoreUIKitTheme.useContext(customTheme);
|
|
10
10
|
const { localize } = NCoreUIKitLocalize.useContext(customLocalize);
|
|
11
11
|
const indicatorAnim = useRef(new Animated.Value(0)).current;
|
|
@@ -22,8 +22,8 @@ const Switch = ({ displayBehaviourWhileLoading = "disabled", spreadBehaviour = "
|
|
|
22
22
|
isDisabled,
|
|
23
23
|
isLoading,
|
|
24
24
|
isActive,
|
|
25
|
-
isFlip,
|
|
26
25
|
colors,
|
|
26
|
+
isFlip,
|
|
27
27
|
spaces,
|
|
28
28
|
type
|
|
29
29
|
});
|
|
@@ -39,8 +39,8 @@ const Switch = ({ displayBehaviourWhileLoading = "disabled", spreadBehaviour = "
|
|
|
39
39
|
else {
|
|
40
40
|
Animated.timing(indicatorAnim, {
|
|
41
41
|
duration: animationDuration,
|
|
42
|
-
useNativeDriver: true,
|
|
43
42
|
easing: Easing.linear,
|
|
43
|
+
useNativeDriver: true,
|
|
44
44
|
toValue: 0
|
|
45
45
|
}).start();
|
|
46
46
|
}
|
|
@@ -71,9 +71,9 @@ const Switch = ({ displayBehaviourWhileLoading = "disabled", spreadBehaviour = "
|
|
|
71
71
|
if (!isOptional && !optionalText) {
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
|
-
return _jsxs(Text, {
|
|
74
|
+
return _jsxs(Text, { style: [
|
|
75
75
|
optionalTextDynamicStyle
|
|
76
|
-
], ...titleProps, children: ["( ", isOptional ? localize("is-optional") : optionalText, " )"] });
|
|
76
|
+
], variant: "labelLargeSize", color: titleProps.color, ...titleProps, children: ["( ", isOptional ? localize("is-optional") : optionalText, " )"] });
|
|
77
77
|
};
|
|
78
78
|
const renderTitle = () => {
|
|
79
79
|
if (!title) {
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import {} from "./type";
|
|
3
3
|
export const SWITCH_TYPE_STYLES = {
|
|
4
|
-
primary: {
|
|
5
|
-
indicatorColor: "default",
|
|
6
|
-
containerColor: "mid",
|
|
7
|
-
subTitleColor: "low",
|
|
8
|
-
titleColor: "mid"
|
|
9
|
-
},
|
|
10
|
-
danger: {
|
|
11
|
-
subTitleColor: "dangerLow",
|
|
12
|
-
indicatorColor: "danger",
|
|
13
|
-
containerColor: "danger",
|
|
14
|
-
titleColor: "danger"
|
|
15
|
-
},
|
|
16
4
|
success: {
|
|
17
5
|
subTitleColor: "successLow",
|
|
18
|
-
indicatorColor: "success",
|
|
19
6
|
containerColor: "success",
|
|
7
|
+
indicatorColor: "success",
|
|
20
8
|
titleColor: "success"
|
|
21
9
|
},
|
|
22
10
|
warning: {
|
|
23
11
|
subTitleColor: "warningLow",
|
|
24
|
-
indicatorColor: "warning",
|
|
25
12
|
containerColor: "warning",
|
|
13
|
+
indicatorColor: "warning",
|
|
26
14
|
titleColor: "warning"
|
|
27
15
|
},
|
|
28
|
-
|
|
29
|
-
subTitleColor: "
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
titleColor: "
|
|
16
|
+
danger: {
|
|
17
|
+
subTitleColor: "dangerLow",
|
|
18
|
+
containerColor: "danger",
|
|
19
|
+
indicatorColor: "danger",
|
|
20
|
+
titleColor: "danger"
|
|
33
21
|
},
|
|
34
22
|
neutral: {
|
|
35
23
|
indicatorColor: "default",
|
|
36
24
|
containerColor: "mid",
|
|
37
25
|
subTitleColor: "low",
|
|
38
26
|
titleColor: "mid"
|
|
27
|
+
},
|
|
28
|
+
primary: {
|
|
29
|
+
indicatorColor: "default",
|
|
30
|
+
containerColor: "mid",
|
|
31
|
+
subTitleColor: "low",
|
|
32
|
+
titleColor: "mid"
|
|
33
|
+
},
|
|
34
|
+
info: {
|
|
35
|
+
subTitleColor: "infoLow",
|
|
36
|
+
containerColor: "info",
|
|
37
|
+
indicatorColor: "info",
|
|
38
|
+
titleColor: "info"
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
export const getSwitchType = ({ type }) => {
|
|
@@ -51,27 +51,15 @@ const stylesheet = StyleSheet.create({
|
|
|
51
51
|
alignItems: "center",
|
|
52
52
|
display: "flex"
|
|
53
53
|
},
|
|
54
|
-
indicatorContainer: {
|
|
55
|
-
position: "relative"
|
|
56
|
-
},
|
|
57
|
-
indicator: {},
|
|
58
|
-
contentContainer: {
|
|
59
|
-
justifyContent: "center",
|
|
60
|
-
flexDirection: "column"
|
|
61
|
-
},
|
|
62
54
|
titleContainer: {
|
|
63
55
|
justifyContent: "flex-start",
|
|
64
56
|
flexDirection: "row",
|
|
65
57
|
alignItems: "center"
|
|
66
58
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
subTitle: {
|
|
72
|
-
textAlign: "left"
|
|
59
|
+
contentContainer: {
|
|
60
|
+
justifyContent: "center",
|
|
61
|
+
flexDirection: "column"
|
|
73
62
|
},
|
|
74
|
-
loading: {},
|
|
75
63
|
overlay: {
|
|
76
64
|
position: "absolute",
|
|
77
65
|
display: "none",
|
|
@@ -80,40 +68,52 @@ const stylesheet = StyleSheet.create({
|
|
|
80
68
|
right: 0,
|
|
81
69
|
left: 0,
|
|
82
70
|
top: 0
|
|
83
|
-
}
|
|
71
|
+
},
|
|
72
|
+
indicatorContainer: {
|
|
73
|
+
position: "relative"
|
|
74
|
+
},
|
|
75
|
+
title: {
|
|
76
|
+
textAlign: "left",
|
|
77
|
+
margin: 0
|
|
78
|
+
},
|
|
79
|
+
subTitle: {
|
|
80
|
+
textAlign: "left"
|
|
81
|
+
},
|
|
82
|
+
indicator: {},
|
|
83
|
+
loading: {}
|
|
84
84
|
});
|
|
85
85
|
export const useStyles = ({ displayBehaviourWhileLoading, SWITCH_INDICATOR_SIZE, spreadBehaviour, inlineSpaces, currentType, isDisabled, isLoading, isActive, colors, isFlip, spaces, type }) => {
|
|
86
86
|
const styleType = type === "danger" ? "error" : type;
|
|
87
87
|
const styles = {
|
|
88
|
-
container: {
|
|
89
|
-
padding: spaces.spacingSm,
|
|
90
|
-
alignSelf: "auto"
|
|
91
|
-
},
|
|
92
88
|
indicatorContainer: {
|
|
93
89
|
backgroundColor: colors.content.container[currentType.containerColor],
|
|
94
90
|
borderRadius: (SWITCH_INDICATOR_SIZE + (spaces.spacingSm * 2)) / 2,
|
|
95
91
|
width: (SWITCH_INDICATOR_SIZE * 1.5) + (spaces.spacingSm * 2),
|
|
96
92
|
padding: spaces.spacingXs
|
|
97
93
|
},
|
|
94
|
+
overlay: {
|
|
95
|
+
borderRadius: (SWITCH_INDICATOR_SIZE + (spaces.spacingSm * 2)) / 2
|
|
96
|
+
},
|
|
98
97
|
indicator: {
|
|
99
98
|
backgroundColor: colors.content.icon[currentType.indicatorColor],
|
|
100
99
|
borderRadius: SWITCH_INDICATOR_SIZE / 2,
|
|
101
100
|
height: SWITCH_INDICATOR_SIZE,
|
|
102
101
|
width: SWITCH_INDICATOR_SIZE
|
|
103
102
|
},
|
|
103
|
+
optionalText: {
|
|
104
|
+
marginLeft: inlineSpaces.subTitle
|
|
105
|
+
},
|
|
104
106
|
contentContainer: {
|
|
105
107
|
marginLeft: spaces.spacingSm
|
|
106
108
|
},
|
|
109
|
+
container: {
|
|
110
|
+
padding: spaces.spacingSm,
|
|
111
|
+
alignSelf: "auto"
|
|
112
|
+
},
|
|
107
113
|
titleContainer: {},
|
|
108
114
|
title: {},
|
|
109
115
|
subTitle: {},
|
|
110
|
-
loading: {}
|
|
111
|
-
overlay: {
|
|
112
|
-
borderRadius: (SWITCH_INDICATOR_SIZE + (spaces.spacingSm * 2)) / 2
|
|
113
|
-
},
|
|
114
|
-
optionalText: {
|
|
115
|
-
marginLeft: inlineSpaces.subTitle
|
|
116
|
-
}
|
|
116
|
+
loading: {}
|
|
117
117
|
};
|
|
118
118
|
if (isLoading) {
|
|
119
119
|
if (displayBehaviourWhileLoading === "disabled") {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Pressable, View } from "react-native";
|
|
4
|
+
import {} from "./type";
|
|
5
|
+
import stylesheet, { useStyles } from "./stylesheet";
|
|
6
|
+
import { NCoreUIKitLocalize, NCoreUIKitTheme } from "../../core/hooks";
|
|
7
|
+
import Tooltip from "../tooltip";
|
|
8
|
+
import Button from "../button";
|
|
9
|
+
import Text from "../text";
|
|
10
|
+
const ActionItem = ({ action }) => {
|
|
11
|
+
const { localize } = NCoreUIKitLocalize.useContext();
|
|
12
|
+
const { borders, colors, spaces } = NCoreUIKitTheme.useContext();
|
|
13
|
+
const { tooltipContainer: tooltipContainerDynamicStyle, childCaret: childCaretDynamicStyle, actionItem: actionItemDynamicStyle } = useStyles({
|
|
14
|
+
borders,
|
|
15
|
+
colors,
|
|
16
|
+
spaces
|
|
17
|
+
});
|
|
18
|
+
const pressableStyle = useMemo(() => {
|
|
19
|
+
return [
|
|
20
|
+
stylesheet.systemToolbarAction,
|
|
21
|
+
actionItemDynamicStyle,
|
|
22
|
+
action.style
|
|
23
|
+
];
|
|
24
|
+
}, [
|
|
25
|
+
actionItemDynamicStyle,
|
|
26
|
+
action.style
|
|
27
|
+
]);
|
|
28
|
+
const titleText = action.titleKey ? localize(action.titleKey) : undefined;
|
|
29
|
+
const ActionIcon = action.icon;
|
|
30
|
+
const btn = _jsxs(Pressable, { onPress: action.onPress, style: pressableStyle, children: [ActionIcon ?
|
|
31
|
+
_jsx(ActionIcon, { color: "mid", size: 16 })
|
|
32
|
+
:
|
|
33
|
+
null, titleText ?
|
|
34
|
+
_jsx(Text, { variant: "labelMediumSize", style: action.titleProps, children: titleText })
|
|
35
|
+
:
|
|
36
|
+
null] });
|
|
37
|
+
if (!action.content || action.content.length === 0) {
|
|
38
|
+
return btn;
|
|
39
|
+
}
|
|
40
|
+
return _jsx(Tooltip, { content: _jsx(View, { style: stylesheet.systemToolbarContent, children: action.content.map((childAction, index) => _jsx(ActionItem, { action: childAction }, `system-toolbar-child-action-${index}`)) }), containerStyle: tooltipContainerDynamicStyle, caretStyle: childCaretDynamicStyle, location: {
|
|
41
|
+
horizontal: "right",
|
|
42
|
+
vertical: "center"
|
|
43
|
+
}, triggerMode: "hover", sizing: "content", children: btn });
|
|
44
|
+
};
|
|
45
|
+
const SystemToolbar = ({ variant = "filled", type = "neutral", size = "medium", titleKey, actions, style, title, icon }) => {
|
|
46
|
+
const { localize } = NCoreUIKitLocalize.useContext();
|
|
47
|
+
const { borders, colors, spaces } = NCoreUIKitTheme.useContext();
|
|
48
|
+
const { tooltipContainer: tooltipContainerDynamicStyle, triggerBtn: triggerBtnDynamicStyle, rootCaret: rootCaretDynamicStyle } = useStyles({
|
|
49
|
+
borders,
|
|
50
|
+
colors,
|
|
51
|
+
spaces
|
|
52
|
+
});
|
|
53
|
+
const mainTitle = titleKey ? localize(titleKey) : title;
|
|
54
|
+
const triggerBtn = _jsx(Button, { onPress: () => {
|
|
55
|
+
// Dropdown triggers typically don't have a main action unless specified.
|
|
56
|
+
// Wait, we don't have onPress on the root SystemToolbar based on user request.
|
|
57
|
+
}, customColor: colors.content.container.default, style: [
|
|
58
|
+
style,
|
|
59
|
+
triggerBtnDynamicStyle
|
|
60
|
+
], isCustomPadding: true, variant: variant, title: mainTitle, size: size, type: type, icon: icon });
|
|
61
|
+
if (!actions || actions.length === 0) {
|
|
62
|
+
return triggerBtn;
|
|
63
|
+
}
|
|
64
|
+
return _jsx(Tooltip, { content: _jsx(View, { style: stylesheet.systemToolbarContent, children: actions.map((action, index) => _jsx(ActionItem, { action: action }, `system-toolbar-action-${index}`)) }), containerStyle: tooltipContainerDynamicStyle, caretStyle: rootCaretDynamicStyle, location: {
|
|
65
|
+
horizontal: "center",
|
|
66
|
+
vertical: "bottom"
|
|
67
|
+
}, triggerMode: "hover", sizing: "content", children: triggerBtn });
|
|
68
|
+
};
|
|
69
|
+
export default SystemToolbar;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
const stylesheet = StyleSheet.create({
|
|
3
|
+
systemToolbarAction: {
|
|
4
|
+
justifyContent: "flex-start",
|
|
5
|
+
flexDirection: "row",
|
|
6
|
+
alignItems: "center"
|
|
7
|
+
},
|
|
8
|
+
systemToolbarContent: {
|
|
9
|
+
minWidth: 100,
|
|
10
|
+
gap: 2
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export const useStyles = ({ borders, colors, spaces }) => {
|
|
14
|
+
const styles = {
|
|
15
|
+
tooltipContainer: {
|
|
16
|
+
backgroundColor: colors.content.container.default,
|
|
17
|
+
borderColor: colors.content.border.default,
|
|
18
|
+
borderWidth: borders.line
|
|
19
|
+
},
|
|
20
|
+
childCaret: {
|
|
21
|
+
backgroundColor: colors.content.container.default,
|
|
22
|
+
borderColor: colors.content.border.default,
|
|
23
|
+
borderBottomWidth: borders.line,
|
|
24
|
+
borderLeftWidth: borders.line
|
|
25
|
+
},
|
|
26
|
+
rootCaret: {
|
|
27
|
+
backgroundColor: colors.content.container.default,
|
|
28
|
+
borderColor: colors.content.border.default,
|
|
29
|
+
borderLeftWidth: borders.line,
|
|
30
|
+
borderTopWidth: borders.line
|
|
31
|
+
},
|
|
32
|
+
actionItem: {
|
|
33
|
+
paddingHorizontal: spaces.spacingSm,
|
|
34
|
+
paddingVertical: spaces.spacingSm
|
|
35
|
+
},
|
|
36
|
+
triggerBtn: {
|
|
37
|
+
paddingHorizontal: spaces.spacingMd,
|
|
38
|
+
paddingVertical: spaces.spacingSm
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
return styles;
|
|
42
|
+
};
|
|
43
|
+
export default stylesheet;
|
|
@@ -14,7 +14,7 @@ const TextInputTypeIcon = {
|
|
|
14
14
|
"info": BadgeInfoIcon,
|
|
15
15
|
"danger": BadgeXIcon
|
|
16
16
|
};
|
|
17
|
-
const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIconComponentProp, hintTextIcon: HintTextIconProp, spreadBehaviour = "baseline",
|
|
17
|
+
const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIconComponentProp, hintTextIcon: HintTextIconProp, spreadBehaviour = "baseline", isShowHintTextIcon = false, isShowLengthLimiter = true, isUpdateOnRealtime = false, icon: IconComponentProp, hintTextContainerStyle, isCleanEnabled = false, contentContainerStyle, subTitle = "Optional", onFocus: onFocusProp, isDisabled = false, isRequired = false, onBlur: onBlurProp, customBorderColor, customTitleColor, rightIconOnPress, type = "default", customIconColor, maxHeight = 350, minHeight = 250, cleanIconStyle, customLocalize, isShowSubTitle, rightIconStyle, initialValue, onChangeText, customColor, customTheme, iconOnPress, placeholder, inputStyle, isOptional, validation, iconStyle, maxLength, hintText, style, title, ...props }, ref) => {
|
|
18
18
|
const { inlineSpaces, typography, radiuses, borders, spaces, colors } = NCoreUIKitTheme.useContext(customTheme);
|
|
19
19
|
const { localize } = NCoreUIKitLocalize.useContext(customLocalize);
|
|
20
20
|
const currentType = getTextAreaInputType({
|
|
@@ -24,11 +24,13 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
24
24
|
const styleType = type === "default" ? "neutral" : type === "question" ? "neutral" : type === "danger" ? "error" : type;
|
|
25
25
|
const [value, setValue] = useState(initialValue ? initialValue : "");
|
|
26
26
|
const [isFocused, setIsFocused] = useState(false);
|
|
27
|
-
const { lengthLimiterContainer: lengthLimiterContainerDynamicStyle,
|
|
27
|
+
const { lengthLimiterContainer: lengthLimiterContainerDynamicStyle, inputContainer: inputContainerDynamicStyle, titleContainer: titleContainerDynamicStyle, hintTextIcon: hintTextIconDynamicStyle, cleanButton: cleanButtonDynamicStyle, container: containerDynamicStyle, rightIcon: rightIconDynamicStyle, hintText: hintTextDynamicStyle, required: requiredDynamicStyle, subTitle: subTitleDynamicStyle, content: contentDynamicStyle, overlay: overlayDynamicStyle, input: inputDynamicStyle, title: titleDynamicStyle, icon: iconDynamicStyle } = useStyles({
|
|
28
28
|
icon: IconComponentProp ? true : false,
|
|
29
|
+
customBorderColor,
|
|
29
30
|
spreadBehaviour,
|
|
30
31
|
inlineSpaces,
|
|
31
32
|
currentType,
|
|
33
|
+
customColor,
|
|
32
34
|
isDisabled,
|
|
33
35
|
typography,
|
|
34
36
|
isFocused,
|
|
@@ -43,9 +45,14 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
43
45
|
});
|
|
44
46
|
useEffect(() => {
|
|
45
47
|
if (initialValue) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
if (Platform.OS !== "web") {
|
|
49
|
+
inputRef.current?.setNativeProps({
|
|
50
|
+
text: initialValue
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
else if (inputRef.current) {
|
|
54
|
+
inputRef.current.value = initialValue;
|
|
55
|
+
}
|
|
49
56
|
}
|
|
50
57
|
}, []);
|
|
51
58
|
useImperativeHandle(ref, () => ({
|
|
@@ -80,9 +87,14 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
80
87
|
};
|
|
81
88
|
const updateValue = (text) => {
|
|
82
89
|
setValue(text);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
if (Platform.OS !== "web") {
|
|
91
|
+
inputRef.current?.setNativeProps({
|
|
92
|
+
text: text
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
else if (inputRef.current) {
|
|
96
|
+
inputRef.current.value = text;
|
|
97
|
+
}
|
|
86
98
|
};
|
|
87
99
|
const onFocus = () => {
|
|
88
100
|
setIsFocused(true);
|
|
@@ -105,18 +117,18 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
105
117
|
if (!isCleanEnabled || !value.length) {
|
|
106
118
|
return null;
|
|
107
119
|
}
|
|
108
|
-
return _jsx(TouchableOpacity, {
|
|
109
|
-
cleanIconStyle,
|
|
110
|
-
stylesheet.cleanButton,
|
|
111
|
-
cleanButtonDynamicStyle
|
|
112
|
-
], onPress: () => {
|
|
120
|
+
return _jsx(TouchableOpacity, { onPress: () => {
|
|
113
121
|
if (inputRef.current)
|
|
114
122
|
inputRef.current?.clear();
|
|
115
123
|
if (onChangeText) {
|
|
116
124
|
onChangeText("");
|
|
117
125
|
}
|
|
118
126
|
setValue("");
|
|
119
|
-
},
|
|
127
|
+
}, style: [
|
|
128
|
+
cleanIconStyle,
|
|
129
|
+
stylesheet.cleanButton,
|
|
130
|
+
cleanButtonDynamicStyle
|
|
131
|
+
], children: _jsx(CircleXIcon, { color: colors.content.icon[currentType.iconColor], size: 20 }) });
|
|
120
132
|
};
|
|
121
133
|
const renderIcon = () => {
|
|
122
134
|
if (!IconComponentProp) {
|
|
@@ -126,7 +138,7 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
126
138
|
iconStyle,
|
|
127
139
|
stylesheet.icon,
|
|
128
140
|
iconDynamicStyle
|
|
129
|
-
], children: _jsx(IconComponentProp, { color: iconProps.color, size: iconProps.size }) });
|
|
141
|
+
], children: _jsx(IconComponentProp, { customColor: customIconColor, color: iconProps.color, size: iconProps.size }) });
|
|
130
142
|
};
|
|
131
143
|
const renderRightIcon = () => {
|
|
132
144
|
if (!RightIconComponentProp) {
|
|
@@ -146,20 +158,20 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
146
158
|
return null;
|
|
147
159
|
}
|
|
148
160
|
if (HintTextIconProp) {
|
|
149
|
-
return _jsx(HintTextIconProp, { color: isDisabled ? "disabled" : currentType.hintTextIconColor,
|
|
161
|
+
return _jsx(HintTextIconProp, { color: isDisabled ? "disabled" : currentType.hintTextIconColor, style: [
|
|
150
162
|
stylesheet.hintTextIcon,
|
|
151
163
|
hintTextIconDynamicStyle
|
|
152
|
-
] });
|
|
164
|
+
], size: 20 });
|
|
153
165
|
}
|
|
154
166
|
const CurrentHintIcon = TextInputTypeIcon[type === "default" ? "question" : type];
|
|
155
167
|
let hintIconColor = colors.content.icon[currentType.hintTextIconColor];
|
|
156
168
|
if (isDisabled) {
|
|
157
169
|
hintIconColor = colors.system.state.content.disabled[styleType];
|
|
158
170
|
}
|
|
159
|
-
return _jsx(CurrentHintIcon, {
|
|
171
|
+
return _jsx(CurrentHintIcon, { style: [
|
|
160
172
|
stylesheet.hintTextIcon,
|
|
161
173
|
hintTextIconDynamicStyle
|
|
162
|
-
] });
|
|
174
|
+
], color: hintIconColor, size: 20 });
|
|
163
175
|
};
|
|
164
176
|
const renderHintText = () => {
|
|
165
177
|
if (!hintText) {
|
|
@@ -175,16 +187,16 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
175
187
|
if (!isRequired) {
|
|
176
188
|
return null;
|
|
177
189
|
}
|
|
178
|
-
return _jsx(Text, {
|
|
190
|
+
return _jsx(Text, { style: [
|
|
179
191
|
stylesheet.required,
|
|
180
192
|
requiredDynamicStyle
|
|
181
|
-
], children: "*" });
|
|
193
|
+
], color: "danger", children: "*" });
|
|
182
194
|
};
|
|
183
195
|
const renderSubtitle = () => {
|
|
184
196
|
if (!isShowSubTitle && !isOptional) {
|
|
185
197
|
return null;
|
|
186
198
|
}
|
|
187
|
-
return _jsxs(Text, { variant: "labelLargeSize", color: titleProps.color, style: [
|
|
199
|
+
return _jsxs(Text, { customColor: customTitleColor, variant: "labelLargeSize", color: titleProps.color, style: [
|
|
188
200
|
stylesheet.subTitle,
|
|
189
201
|
subTitleDynamicStyle
|
|
190
202
|
], children: ["( ", isOptional ? localize("is-optional") : subTitle, " )"] });
|
|
@@ -196,7 +208,7 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
196
208
|
return _jsxs(View, { style: [
|
|
197
209
|
stylesheet.titleContainer,
|
|
198
210
|
titleContainerDynamicStyle
|
|
199
|
-
], children: [renderRequired(), _jsx(Text, { ...titleProps, variant: titleProps.variant, color: titleProps.color, style: [
|
|
211
|
+
], children: [renderRequired(), _jsx(Text, { ...titleProps, customColor: customTitleColor, variant: titleProps.variant, color: titleProps.color, style: [
|
|
200
212
|
stylesheet.title,
|
|
201
213
|
titleDynamicStyle
|
|
202
214
|
], children: title }), renderSubtitle()] });
|
|
@@ -214,7 +226,7 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
214
226
|
return _jsxs(View, { style: [
|
|
215
227
|
stylesheet.inputContainer,
|
|
216
228
|
inputContainerDynamicStyle
|
|
217
|
-
], children: [_jsx(NativeTextInput, { ...props, placeholderTextColor: colors.content.text[currentType.placeholderColor],
|
|
229
|
+
], children: [_jsx(NativeTextInput, { ...props, placeholderTextColor: colors.content.text[currentType.placeholderColor], onEndEditing: (t) => {
|
|
218
230
|
const text = t.nativeEvent.text;
|
|
219
231
|
if (!isUpdateOnRealtime) {
|
|
220
232
|
if (validation) {
|
|
@@ -245,17 +257,17 @@ const TextAreaInput = ({ isAutoKeyboardDismissOnBlur = true, rightIcon: RightIco
|
|
|
245
257
|
onChangeText(text);
|
|
246
258
|
}
|
|
247
259
|
}
|
|
248
|
-
}, style: [
|
|
260
|
+
}, value: isUpdateOnRealtime ? value : undefined, underlineColorAndroid: "rgba(255,255,255,0)", placeholder: placeholder, allowFontScaling: false, editable: !isDisabled, maxLength: maxLength, style: [
|
|
249
261
|
inputStyle,
|
|
250
262
|
stylesheet.input,
|
|
251
263
|
inputDynamicStyle
|
|
252
|
-
] }), renderLengthLimiter()] });
|
|
264
|
+
], onFocus: onFocus, multiline: true, onBlur: onBlur, ref: inputRef }), renderLengthLimiter()] });
|
|
253
265
|
};
|
|
254
266
|
const renderOverlay = () => {
|
|
255
|
-
return _jsx(View, {
|
|
267
|
+
return _jsx(View, { style: [
|
|
256
268
|
stylesheet.overlay,
|
|
257
269
|
overlayDynamicStyle
|
|
258
|
-
] });
|
|
270
|
+
], pointerEvents: "none" });
|
|
259
271
|
};
|
|
260
272
|
return _jsxs(View, { style: [
|
|
261
273
|
style,
|