@itcase/ui-react-native 1.10.81
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/.storybook-react-native/index.ts +15 -0
- package/.storybook-react-native/main.ts +13 -0
- package/.storybook-react-native/preview.tsx +83 -0
- package/.storybook-react-native/tsconfig.json +5 -0
- package/.storybook-react-native-web/main.ts +49 -0
- package/.storybook-react-native-web/preview.tsx +104 -0
- package/.storybook-react-native-web/tsconfig.json +5 -0
- package/demoApp/.bundle/config +2 -0
- package/demoApp/.watchmanconfig +8 -0
- package/demoApp/App.tsx +61 -0
- package/demoApp/Gemfile +17 -0
- package/demoApp/README.md +97 -0
- package/demoApp/android/app/build.gradle +119 -0
- package/demoApp/android/app/debug.keystore +0 -0
- package/demoApp/android/app/proguard-rules.pro +10 -0
- package/demoApp/android/app/src/main/AndroidManifest.xml +27 -0
- package/demoApp/android/app/src/main/java/com/demoapp/MainActivity.kt +22 -0
- package/demoApp/android/app/src/main/java/com/demoapp/MainApplication.kt +27 -0
- package/demoApp/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/demoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/demoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/demoApp/android/app/src/main/res/values/strings.xml +3 -0
- package/demoApp/android/app/src/main/res/values/styles.xml +9 -0
- package/demoApp/android/build.gradle +21 -0
- package/demoApp/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/demoApp/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/demoApp/android/gradle.properties +49 -0
- package/demoApp/android/gradlew +251 -0
- package/demoApp/android/gradlew.bat +99 -0
- package/demoApp/android/settings.gradle +6 -0
- package/demoApp/app.json +4 -0
- package/demoApp/babel.config.js +7 -0
- package/demoApp/index.js +9 -0
- package/demoApp/ios/.xcode.env +11 -0
- package/demoApp/ios/Podfile +34 -0
- package/demoApp/ios/Podfile.lock +2445 -0
- package/demoApp/ios/demoApp/AppDelegate.swift +48 -0
- package/demoApp/ios/demoApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/demoApp/ios/demoApp/Images.xcassets/Contents.json +6 -0
- package/demoApp/ios/demoApp/Info.plist +60 -0
- package/demoApp/ios/demoApp/LaunchScreen.storyboard +47 -0
- package/demoApp/ios/demoApp/PrivacyInfo.xcprivacy +37 -0
- package/demoApp/ios/demoApp.xcodeproj/project.pbxproj +494 -0
- package/demoApp/ios/demoApp.xcodeproj/xcshareddata/xcschemes/demoApp.xcscheme +88 -0
- package/demoApp/ios/demoApp.xcworkspace/contents.xcworkspacedata +10 -0
- package/demoApp/metro-transformer.js +16 -0
- package/demoApp/metro.config.js +296 -0
- package/demoApp/package-lock.json +41233 -0
- package/demoApp/package.json +56 -0
- package/demoApp/tsconfig.json +8 -0
- package/package.json +58 -0
- package/postcss.config.mjs +1 -0
- package/src/components/Avatar/Avatar.appearance.ts +14 -0
- package/src/components/Avatar/Avatar.interface.ts +99 -0
- package/src/components/Avatar/Avatar.styles.ts +11 -0
- package/src/components/Avatar/Avatar.tsx +181 -0
- package/src/components/Avatar/appearance/avatarShape.ts +24 -0
- package/src/components/Avatar/appearance/avatarSize.ts +66 -0
- package/src/components/Avatar/appearance/avatarStyle.ts +17 -0
- package/src/components/Avatar/appearance/avatarSurface.ts +42 -0
- package/src/components/Avatar/index.ts +36 -0
- package/src/components/Avatar/stories/AvatarCount.stories.tsx +35 -0
- package/src/components/Avatar/stories/AvatarImage.stories.tsx +36 -0
- package/src/components/Avatar/stories/AvatarInteraction.stories.tsx +25 -0
- package/src/components/Avatar/stories/AvatarLetters.stories.tsx +36 -0
- package/src/components/Avatar/stories/AvatarShape.stories.tsx +54 -0
- package/src/components/Avatar/stories/AvatarSize.stories.tsx +78 -0
- package/src/components/Avatar/stories/AvatarStories.config.ts +12 -0
- package/src/components/Avatar/stories/AvatarStyle.stories.tsx +42 -0
- package/src/components/Avatar/styles/avatar.ts +32 -0
- package/src/components/Avatar/styles/avatarShape.ts +34 -0
- package/src/components/Avatar/styles/avatarSize.ts +22 -0
- package/src/components/AvatarStack/AvatarStack.interface.ts +19 -0
- package/src/components/AvatarStack/AvatarStack.styles.ts +11 -0
- package/src/components/AvatarStack/AvatarStack.tsx +82 -0
- package/src/components/AvatarStack/index.ts +7 -0
- package/src/components/AvatarStack/stories/AvatarStack.stories.tsx +56 -0
- package/src/components/AvatarStack/styles/avatarStack.ts +17 -0
- package/src/components/AvatarStack/styles/avatarStackDirection.ts +22 -0
- package/src/components/AvatarStack/styles/avatarStackSize.ts +76 -0
- package/src/components/Badge/Badge.appearance.ts +14 -0
- package/src/components/Badge/Badge.interface.ts +50 -0
- package/src/components/Badge/Badge.styles.ts +13 -0
- package/src/components/Badge/Badge.tsx +93 -0
- package/src/components/Badge/appearance/badgeAccent.ts +10 -0
- package/src/components/Badge/appearance/badgeDanger.ts +10 -0
- package/src/components/Badge/appearance/badgeExtra.ts +10 -0
- package/src/components/Badge/appearance/badgeShape.ts +24 -0
- package/src/components/Badge/index.ts +34 -0
- package/src/components/Badge/stories/BadgeDefault.stories.tsx +39 -0
- package/src/components/Badge/stories/BadgeShape.stories.tsx +57 -0
- package/src/components/Badge/stories/BadgeSize.stories.tsx +33 -0
- package/src/components/Badge/stories/BadgeStatus.stories.tsx +23 -0
- package/src/components/Badge/styles/badge.ts +13 -0
- package/src/components/Badge/styles/badgeShape.ts +34 -0
- package/src/components/Badge/styles/badgeSize.ts +25 -0
- package/src/components/Badge/styles/badgeType.ts +20 -0
- package/src/components/Breadcrumbs/Breadcrumbs.appearance.ts +12 -0
- package/src/components/Breadcrumbs/Breadcrumbs.interface.ts +46 -0
- package/src/components/Breadcrumbs/Breadcrumbs.styles.ts +9 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +94 -0
- package/src/components/Breadcrumbs/appearance/breadcrumbsAccent.ts +10 -0
- package/src/components/Breadcrumbs/appearance/breadcrumbsSize.ts +22 -0
- package/src/components/Breadcrumbs/appearance/breadcrumbsSurface.ts +22 -0
- package/src/components/Breadcrumbs/index.ts +26 -0
- package/src/components/Breadcrumbs/stories/Breadcrumbs.stories.tsx +35 -0
- package/src/components/Breadcrumbs/styles/breadcrumbs.ts +18 -0
- package/src/components/Breadcrumbs/styles/breadcrumbsSize.ts +28 -0
- package/src/components/Button/Button.appearance.ts +16 -0
- package/src/components/Button/Button.interface.ts +76 -0
- package/src/components/Button/Button.styles.ts +11 -0
- package/src/components/Button/Button.tsx +147 -0
- package/src/components/Button/appearance/buttonAccent.ts +24 -0
- package/src/components/Button/appearance/buttonDanger.ts +14 -0
- package/src/components/Button/appearance/buttonExtra.ts +14 -0
- package/src/components/Button/appearance/buttonStyle.ts +17 -0
- package/src/components/Button/appearance/buttonSurface.ts +30 -0
- package/src/components/Button/index.ts +30 -0
- package/src/components/Button/stories/ButtonDefault.stories.tsx +77 -0
- package/src/components/Button/stories/ButtonDisabled.stories.tsx +23 -0
- package/src/components/Button/stories/ButtonSize.stories.tsx +63 -0
- package/src/components/Button/stories/ButtonStories.config.ts +46 -0
- package/src/components/Button/stories/ButtonStyle.stories.tsx +47 -0
- package/src/components/Button/styles/button.ts +26 -0
- package/src/components/Button/styles/buttonSize.ts +42 -0
- package/src/components/Button/styles/buttonText.ts +28 -0
- package/src/components/Cell/Cell.interface.ts +45 -0
- package/src/components/Cell/Cell.styles.ts +13 -0
- package/src/components/Cell/Cell.tsx +96 -0
- package/src/components/Cell/index.ts +17 -0
- package/src/components/Cell/stories/Cell.stories.tsx +35 -0
- package/src/components/Cell/styles/cell.ts +9 -0
- package/src/components/Cell/styles/cellDirection.ts +24 -0
- package/src/components/Cell/styles/cellShape.ts +16 -0
- package/src/components/Cell/styles/cellSize.ts +21 -0
- package/src/components/Checkbox/Checkbox.appearance.ts +22 -0
- package/src/components/Checkbox/Checkbox.interface.ts +99 -0
- package/src/components/Checkbox/Checkbox.styles.ts +13 -0
- package/src/components/Checkbox/Checkbox.tsx +193 -0
- package/src/components/Checkbox/appearance/checkboxDefault.ts +42 -0
- package/src/components/Checkbox/appearance/checkboxDisabled.ts +15 -0
- package/src/components/Checkbox/appearance/checkboxError.ts +15 -0
- package/src/components/Checkbox/appearance/checkboxRequire.ts +15 -0
- package/src/components/Checkbox/appearance/checkboxShape.ts +12 -0
- package/src/components/Checkbox/appearance/checkboxSize.ts +26 -0
- package/src/components/Checkbox/appearance/checkboxStyle.ts +22 -0
- package/src/components/Checkbox/appearance/checkboxSuccess.ts +15 -0
- package/src/components/Checkbox/index.ts +36 -0
- package/src/components/Checkbox/stories/Checkbox.stories.tsx +31 -0
- package/src/components/Checkbox/stories/CheckboxDisabled.stories.tsx +18 -0
- package/src/components/Checkbox/stories/CheckboxError.stories.tsx +53 -0
- package/src/components/Checkbox/stories/CheckboxLabel.stories.tsx +32 -0
- package/src/components/Checkbox/stories/CheckboxLabelDesc.stories.tsx +33 -0
- package/src/components/Checkbox/stories/CheckboxShape.stories.tsx +29 -0
- package/src/components/Checkbox/stories/CheckboxSize.stories.tsx +40 -0
- package/src/components/Checkbox/stories/CheckboxStories.config.tsx +26 -0
- package/src/components/Checkbox/styles/checkbox.ts +35 -0
- package/src/components/Checkbox/styles/checkboxAlign.ts +23 -0
- package/src/components/Checkbox/styles/checkboxShape.ts +37 -0
- package/src/components/Checkbox/styles/checkboxSize.ts +60 -0
- package/src/components/Checkmark/Checkmark.interface.ts +8 -0
- package/src/components/Checkmark/Checkmark.styles.ts +7 -0
- package/src/components/Checkmark/Checkmark.tsx +38 -0
- package/src/components/Checkmark/index.ts +5 -0
- package/src/components/Checkmark/stories/Checkmark.stories.tsx +22 -0
- package/src/components/Checkmark/styles/checkmark.ts +17 -0
- package/src/components/Chips/Chips.appearance.ts +32 -0
- package/src/components/Chips/Chips.interface.ts +103 -0
- package/src/components/Chips/Chips.styles.ts +11 -0
- package/src/components/Chips/Chips.tsx +187 -0
- package/src/components/Chips/appearance/chipsAccent.ts +24 -0
- package/src/components/Chips/appearance/chipsDanger.ts +20 -0
- package/src/components/Chips/appearance/chipsDisabled.ts +14 -0
- package/src/components/Chips/appearance/chipsError.ts +20 -0
- package/src/components/Chips/appearance/chipsExtra.ts +20 -0
- package/src/components/Chips/appearance/chipsInfo.ts +20 -0
- package/src/components/Chips/appearance/chipsShape.ts +24 -0
- package/src/components/Chips/appearance/chipsSize.ts +48 -0
- package/src/components/Chips/appearance/chipsSpecial.ts +20 -0
- package/src/components/Chips/appearance/chipsStyle.ts +17 -0
- package/src/components/Chips/appearance/chipsSuccess.ts +20 -0
- package/src/components/Chips/appearance/chipsSurface.ts +40 -0
- package/src/components/Chips/appearance/chipsWarning.ts +20 -0
- package/src/components/Chips/index.ts +30 -0
- package/src/components/Chips/stories/ChipsCheckLeft.stories.tsx +38 -0
- package/src/components/Chips/stories/ChipsCheckRight.stories.tsx +38 -0
- package/src/components/Chips/stories/ChipsClear.stories.tsx +38 -0
- package/src/components/Chips/stories/ChipsDefault.stories.tsx +90 -0
- package/src/components/Chips/stories/ChipsShape.stories.tsx +51 -0
- package/src/components/Chips/stories/ChipsSize.stories.tsx +57 -0
- package/src/components/Chips/stories/ChipsStyle.stories.tsx +39 -0
- package/src/components/Chips/styles/chips.ts +15 -0
- package/src/components/Chips/styles/chipsShape.ts +34 -0
- package/src/components/Chips/styles/chipsSize.ts +65 -0
- package/src/components/Choice/Choice.appearance.ts +22 -0
- package/src/components/Choice/Choice.interface.ts +119 -0
- package/src/components/Choice/Choice.styles.ts +13 -0
- package/src/components/Choice/Choice.tsx +258 -0
- package/src/components/Choice/appearance/choiceDefault.ts +34 -0
- package/src/components/Choice/appearance/choiceDisabled.ts +19 -0
- package/src/components/Choice/appearance/choiceError.ts +19 -0
- package/src/components/Choice/appearance/choiceRequire.ts +20 -0
- package/src/components/Choice/appearance/choiceShape.ts +24 -0
- package/src/components/Choice/appearance/choiceSize.ts +21 -0
- package/src/components/Choice/appearance/choiceStyle.ts +17 -0
- package/src/components/Choice/appearance/choiceSuccess.ts +20 -0
- package/src/components/Choice/index.ts +31 -0
- package/src/components/Choice/stories/ChoiceIcon.stories.tsx +50 -0
- package/src/components/Choice/stories/ChoiceLabel.stories.tsx +50 -0
- package/src/components/Choice/stories/ChoiceLabelIcon.stories.tsx +50 -0
- package/src/components/Choice/stories/ChoiceSize.stories.tsx +40 -0
- package/src/components/Choice/stories/ChoiceStories.config.tsx +77 -0
- package/src/components/Choice/stories/ChoiceStyle.stories.tsx +46 -0
- package/src/components/Choice/styles/choice.ts +45 -0
- package/src/components/Choice/styles/choiceShape.ts +34 -0
- package/src/components/Choice/styles/choiceSize.ts +58 -0
- package/src/components/Choice/styles/choiceWrap.ts +19 -0
- package/src/components/Code/Code.appearance.ts +20 -0
- package/src/components/Code/Code.interface.ts +43 -0
- package/src/components/Code/Code.styles.ts +11 -0
- package/src/components/Code/Code.tsx +75 -0
- package/src/components/Code/appearance/codeDefault.ts +11 -0
- package/src/components/Code/appearance/codeDisabled.ts +11 -0
- package/src/components/Code/appearance/codeError.ts +11 -0
- package/src/components/Code/appearance/codeShape.ts +15 -0
- package/src/components/Code/appearance/codeSize.ts +18 -0
- package/src/components/Code/appearance/codeStyle.ts +16 -0
- package/src/components/Code/appearance/codeSuccess.ts +11 -0
- package/src/components/Code/index.ts +22 -0
- package/src/components/Code/stories/Code.stories.tsx +41 -0
- package/src/components/Code/styles/code.ts +16 -0
- package/src/components/Code/styles/codeSize.ts +25 -0
- package/src/components/Code/styles/codeVariant.ts +19 -0
- package/src/components/ColorInput/ColorInput.appearance.ts +22 -0
- package/src/components/ColorInput/ColorInput.helpers.ts +7 -0
- package/src/components/ColorInput/ColorInput.interface.ts +48 -0
- package/src/components/ColorInput/ColorInput.styles.ts +9 -0
- package/src/components/ColorInput/ColorInput.tsx +105 -0
- package/src/components/ColorInput/appearance/colorInputDefault.ts +22 -0
- package/src/components/ColorInput/appearance/colorInputDisabled.ts +21 -0
- package/src/components/ColorInput/appearance/colorInputError.ts +21 -0
- package/src/components/ColorInput/appearance/colorInputRequire.ts +21 -0
- package/src/components/ColorInput/appearance/colorInputShape.ts +15 -0
- package/src/components/ColorInput/appearance/colorInputSize.ts +22 -0
- package/src/components/ColorInput/appearance/colorInputStyle.ts +16 -0
- package/src/components/ColorInput/appearance/colorInputSuccess.ts +21 -0
- package/src/components/ColorInput/index.ts +26 -0
- package/src/components/ColorInput/stories/ColorInput.stories.tsx +36 -0
- package/src/components/ColorInput/styles/colorInput.ts +17 -0
- package/src/components/ColorInput/styles/colorInputSize.ts +58 -0
- package/src/components/DatePicker/DatePicker.appearance.ts +12 -0
- package/src/components/DatePicker/DatePicker.constants.ts +3 -0
- package/src/components/DatePicker/DatePicker.helpers.ts +28 -0
- package/src/components/DatePicker/DatePicker.interface.ts +68 -0
- package/src/components/DatePicker/DatePicker.styles.ts +7 -0
- package/src/components/DatePicker/DatePicker.tsx +189 -0
- package/src/components/DatePicker/appearance/datePickerSize.ts +24 -0
- package/src/components/DatePicker/appearance/datePickerStyle.ts +14 -0
- package/src/components/DatePicker/appearance/datePickerSurface.ts +15 -0
- package/src/components/DatePicker/index.ts +22 -0
- package/src/components/DatePicker/stories/DatePicker.stories.tsx +50 -0
- package/src/components/DatePicker/styles/datePicker.ts +45 -0
- package/src/components/Divider/Divider.appearance.ts +22 -0
- package/src/components/Divider/Divider.interface.ts +40 -0
- package/src/components/Divider/Divider.styles.ts +11 -0
- package/src/components/Divider/Divider.tsx +65 -0
- package/src/components/Divider/appearance/dividerAccent.ts +9 -0
- package/src/components/Divider/appearance/dividerError.ts +9 -0
- package/src/components/Divider/appearance/dividerExtra.ts +9 -0
- package/src/components/Divider/appearance/dividerSize.ts +15 -0
- package/src/components/Divider/appearance/dividerSpecial.ts +9 -0
- package/src/components/Divider/appearance/dividerSuccess.ts +9 -0
- package/src/components/Divider/appearance/dividerSurface.ts +18 -0
- package/src/components/Divider/appearance/dividerWarning.ts +9 -0
- package/src/components/Divider/index.ts +28 -0
- package/src/components/Divider/stories/DividerAppearance.stories.tsx +75 -0
- package/src/components/Divider/stories/DividerDirection.stories.tsx +34 -0
- package/src/components/Divider/stories/DividerSize.stories.tsx +33 -0
- package/src/components/Divider/styles/divider.ts +9 -0
- package/src/components/Divider/styles/dividerDirection.ts +25 -0
- package/src/components/Divider/styles/dividerSize.ts +32 -0
- package/src/components/Dot/Dot.interface.ts +18 -0
- package/src/components/Dot/Dot.styles.ts +11 -0
- package/src/components/Dot/Dot.tsx +33 -0
- package/src/components/Dot/index.ts +9 -0
- package/src/components/Dot/stories/Dot.stories.tsx +23 -0
- package/src/components/Dot/styles/dot.ts +9 -0
- package/src/components/Dot/styles/dotShape.ts +22 -0
- package/src/components/Dot/styles/dotSize.ts +25 -0
- package/src/components/Drawer/Drawer.appearance.ts +10 -0
- package/src/components/Drawer/Drawer.interface.ts +67 -0
- package/src/components/Drawer/Drawer.styles.ts +7 -0
- package/src/components/Drawer/Drawer.tsx +132 -0
- package/src/components/Drawer/appearance/drawerSize.ts +36 -0
- package/src/components/Drawer/appearance/drawerSurface.ts +12 -0
- package/src/components/Drawer/index.ts +22 -0
- package/src/components/Drawer/stories/Drawer.stories.tsx +71 -0
- package/src/components/Drawer/styles/drawer.ts +60 -0
- package/src/components/Dropdown/Dropdown.appearance.ts +16 -0
- package/src/components/Dropdown/Dropdown.interface.ts +152 -0
- package/src/components/Dropdown/Dropdown.styles.ts +9 -0
- package/src/components/Dropdown/Dropdown.tsx +134 -0
- package/src/components/Dropdown/DropdownItem.appearance.ts +16 -0
- package/src/components/Dropdown/DropdownItem.tsx +141 -0
- package/src/components/Dropdown/appearance/dropdownAccent.ts +17 -0
- package/src/components/Dropdown/appearance/dropdownShape.ts +24 -0
- package/src/components/Dropdown/appearance/dropdownSize.ts +21 -0
- package/src/components/Dropdown/appearance/dropdownStyle.ts +17 -0
- package/src/components/Dropdown/appearance/dropdownSurface.ts +25 -0
- package/src/components/Dropdown/index.ts +45 -0
- package/src/components/Dropdown/stories/Dropdown.stories.tsx +62 -0
- package/src/components/Dropdown/styles/dropdown.ts +31 -0
- package/src/components/Dropdown/styles/dropdownSize.ts +36 -0
- package/src/components/Group/Group.appearance.ts +8 -0
- package/src/components/Group/Group.interface.ts +53 -0
- package/src/components/Group/Group.styles.ts +15 -0
- package/src/components/Group/Group.tsx +80 -0
- package/src/components/Group/appearance/groupSurface.ts +10 -0
- package/src/components/Group/index.ts +36 -0
- package/src/components/Group/stories/Group.stories.tsx +39 -0
- package/src/components/Group/styles/group.ts +9 -0
- package/src/components/Group/styles/groupAlign.ts +37 -0
- package/src/components/Group/styles/groupDirection.ts +40 -0
- package/src/components/Group/styles/groupJustify.ts +40 -0
- package/src/components/Group/styles/groupWrap.ts +22 -0
- package/src/components/HeroTitle/HeroTitle.appearance.ts +8 -0
- package/src/components/HeroTitle/HeroTitle.interface.ts +51 -0
- package/src/components/HeroTitle/HeroTitle.styles.ts +7 -0
- package/src/components/HeroTitle/HeroTitle.tsx +78 -0
- package/src/components/HeroTitle/appearance/heroTitleSize.ts +24 -0
- package/src/components/HeroTitle/index.ts +16 -0
- package/src/components/HeroTitle/stories/HeroTitle.stories.tsx +22 -0
- package/src/components/HeroTitle/styles/heroTitle.ts +11 -0
- package/src/components/Icon/Icon.interface.ts +42 -0
- package/src/components/Icon/Icon.styles.ts +11 -0
- package/src/components/Icon/Icon.tsx +96 -0
- package/src/components/Icon/index.ts +9 -0
- package/src/components/Icon/stories/Icon.stories.tsx +45 -0
- package/src/components/Icon/styles/icon.ts +12 -0
- package/src/components/Icon/styles/iconShape.ts +19 -0
- package/src/components/Icon/styles/iconSize.ts +61 -0
- package/src/components/Image/Image.interface.ts +31 -0
- package/src/components/Image/Image.styles.ts +7 -0
- package/src/components/Image/Image.tsx +95 -0
- package/src/components/Image/index.ts +5 -0
- package/src/components/Image/stories/Image.stories.tsx +18 -0
- package/src/components/Image/styles/image.ts +17 -0
- package/src/components/Input/Input.appearance.ts +22 -0
- package/src/components/Input/Input.interface.ts +86 -0
- package/src/components/Input/Input.styles.ts +11 -0
- package/src/components/Input/Input.tsx +159 -0
- package/src/components/Input/appearance/inputDefault.ts +20 -0
- package/src/components/Input/appearance/inputDisabled.ts +17 -0
- package/src/components/Input/appearance/inputError.ts +19 -0
- package/src/components/Input/appearance/inputRequire.ts +19 -0
- package/src/components/Input/appearance/inputShape.ts +24 -0
- package/src/components/Input/appearance/inputSize.ts +22 -0
- package/src/components/Input/appearance/inputStyle.ts +17 -0
- package/src/components/Input/appearance/inputSuccess.ts +19 -0
- package/src/components/Input/index.ts +30 -0
- package/src/components/Input/stories/InputDefault.stories.tsx +31 -0
- package/src/components/Input/stories/InputDisabled.stories.tsx +34 -0
- package/src/components/Input/stories/InputError.stories.tsx +30 -0
- package/src/components/Input/stories/InputReadonly.stories.tsx +21 -0
- package/src/components/Input/stories/InputRequire.stories.tsx +30 -0
- package/src/components/Input/stories/InputShape.stories.tsx +52 -0
- package/src/components/Input/stories/InputSize.stories.tsx +40 -0
- package/src/components/Input/stories/InputStyle.stories.tsx +40 -0
- package/src/components/Input/stories/InputSuccess.stories.tsx +30 -0
- package/src/components/Input/styles/input.ts +26 -0
- package/src/components/Input/styles/inputShape.ts +31 -0
- package/src/components/Input/styles/inputSize.ts +33 -0
- package/src/components/InputNumber/InputNumber.appearance.ts +20 -0
- package/src/components/InputNumber/InputNumber.interface.ts +79 -0
- package/src/components/InputNumber/InputNumber.styles.ts +11 -0
- package/src/components/InputNumber/InputNumber.tsx +224 -0
- package/src/components/InputNumber/appearance/inputNumberDefault.ts +14 -0
- package/src/components/InputNumber/appearance/inputNumberError.ts +14 -0
- package/src/components/InputNumber/appearance/inputNumberRequire.ts +14 -0
- package/src/components/InputNumber/appearance/inputNumberShape.ts +24 -0
- package/src/components/InputNumber/appearance/inputNumberSize.ts +30 -0
- package/src/components/InputNumber/appearance/inputNumberStyle.ts +19 -0
- package/src/components/InputNumber/appearance/inputNumberSuccess.ts +14 -0
- package/src/components/InputNumber/index.ts +34 -0
- package/src/components/InputNumber/stories/InputNumber.stories.tsx +93 -0
- package/src/components/InputNumber/styles/inputNumber.ts +25 -0
- package/src/components/InputNumber/styles/inputNumberShape.ts +34 -0
- package/src/components/InputNumber/styles/inputNumberSize.ts +36 -0
- package/src/components/InputPassword/InputPassword.appearance.ts +22 -0
- package/src/components/InputPassword/InputPassword.interface.ts +90 -0
- package/src/components/InputPassword/InputPassword.styles.ts +11 -0
- package/src/components/InputPassword/InputPassword.tsx +202 -0
- package/src/components/InputPassword/appearance/inputPasswordDefault.ts +22 -0
- package/src/components/InputPassword/appearance/inputPasswordDisabled.ts +19 -0
- package/src/components/InputPassword/appearance/inputPasswordError.ts +19 -0
- package/src/components/InputPassword/appearance/inputPasswordRequire.ts +19 -0
- package/src/components/InputPassword/appearance/inputPasswordShape.ts +24 -0
- package/src/components/InputPassword/appearance/inputPasswordSize.ts +26 -0
- package/src/components/InputPassword/appearance/inputPasswordStyle.ts +19 -0
- package/src/components/InputPassword/appearance/inputPasswordSuccess.ts +19 -0
- package/src/components/InputPassword/index.ts +36 -0
- package/src/components/InputPassword/stories/InputPassword.stories.tsx +67 -0
- package/src/components/InputPassword/styles/inputPassword.ts +22 -0
- package/src/components/InputPassword/styles/inputPasswordShape.ts +34 -0
- package/src/components/InputPassword/styles/inputPasswordSize.ts +36 -0
- package/src/components/Label/Label.appearance.ts +20 -0
- package/src/components/Label/Label.interface.ts +59 -0
- package/src/components/Label/Label.styles.ts +11 -0
- package/src/components/Label/Label.tsx +126 -0
- package/src/components/Label/Label.web.tsx +124 -0
- package/src/components/Label/appearance/labelAccent.ts +10 -0
- package/src/components/Label/appearance/labelDanger.ts +10 -0
- package/src/components/Label/appearance/labelExtra.ts +10 -0
- package/src/components/Label/appearance/labelGradient.ts +10 -0
- package/src/components/Label/appearance/labelShape.ts +9 -0
- package/src/components/Label/appearance/labelSize.ts +13 -0
- package/src/components/Label/appearance/labelSurface.ts +22 -0
- package/src/components/Label/index.ts +24 -0
- package/src/components/Label/stories/LabelShape.stories.tsx +33 -0
- package/src/components/Label/stories/LabelSize.stories.tsx +57 -0
- package/src/components/Label/stories/LabelText.stories.tsx +45 -0
- package/src/components/Label/styles/label.ts +13 -0
- package/src/components/Label/styles/labelShape.ts +23 -0
- package/src/components/Label/styles/labelSize.ts +55 -0
- package/src/components/Link/Link.appearance.ts +16 -0
- package/src/components/Link/Link.interface.ts +54 -0
- package/src/components/Link/Link.styles.ts +7 -0
- package/src/components/Link/Link.tsx +119 -0
- package/src/components/Link/appearance/linkAccent.ts +12 -0
- package/src/components/Link/appearance/linkDanger.ts +9 -0
- package/src/components/Link/appearance/linkExtra.ts +9 -0
- package/src/components/Link/appearance/linkStyle.ts +14 -0
- package/src/components/Link/appearance/linkSurface.ts +12 -0
- package/src/components/Link/index.ts +18 -0
- package/src/components/Link/stories/Link.stories.tsx +23 -0
- package/src/components/Link/styles/link.ts +14 -0
- package/src/components/List/List.appearance.ts +28 -0
- package/src/components/List/List.context.ts +7 -0
- package/src/components/List/List.interface.ts +94 -0
- package/src/components/List/List.styles.ts +9 -0
- package/src/components/List/List.tsx +119 -0
- package/src/components/List/ListItem.tsx +68 -0
- package/src/components/List/appearance/listAccent.ts +10 -0
- package/src/components/List/appearance/listDanger.ts +9 -0
- package/src/components/List/appearance/listError.ts +9 -0
- package/src/components/List/appearance/listExtra.ts +9 -0
- package/src/components/List/appearance/listInfo.ts +14 -0
- package/src/components/List/appearance/listSize.ts +27 -0
- package/src/components/List/appearance/listSpecial.ts +9 -0
- package/src/components/List/appearance/listStyle.ts +19 -0
- package/src/components/List/appearance/listSuccess.ts +9 -0
- package/src/components/List/appearance/listSurface.ts +18 -0
- package/src/components/List/appearance/listWarning.ts +9 -0
- package/src/components/List/index.ts +42 -0
- package/src/components/List/stories/List.stories.tsx +48 -0
- package/src/components/List/styles/list.ts +22 -0
- package/src/components/List/styles/listDirection.ts +40 -0
- package/src/components/List/styles/listSize.ts +6 -0
- package/src/components/Loader/Loader.appearance.ts +30 -0
- package/src/components/Loader/Loader.interface.ts +75 -0
- package/src/components/Loader/Loader.styles.ts +11 -0
- package/src/components/Loader/Loader.tsx +135 -0
- package/src/components/Loader/appearance/loaderAccent.ts +16 -0
- package/src/components/Loader/appearance/loaderDanger.ts +11 -0
- package/src/components/Loader/appearance/loaderError.ts +11 -0
- package/src/components/Loader/appearance/loaderExtra.ts +11 -0
- package/src/components/Loader/appearance/loaderInfo.ts +11 -0
- package/src/components/Loader/appearance/loaderShape.ts +24 -0
- package/src/components/Loader/appearance/loaderSize.ts +18 -0
- package/src/components/Loader/appearance/loaderSpecial.ts +11 -0
- package/src/components/Loader/appearance/loaderStyle.ts +17 -0
- package/src/components/Loader/appearance/loaderSuccess.ts +11 -0
- package/src/components/Loader/appearance/loaderSurface.ts +26 -0
- package/src/components/Loader/appearance/loaderWarning.ts +11 -0
- package/src/components/Loader/index.ts +36 -0
- package/src/components/Loader/stories/LoaderDefault.stories.tsx +69 -0
- package/src/components/Loader/stories/LoaderShape.stories.tsx +51 -0
- package/src/components/Loader/stories/LoaderSize.stories.tsx +33 -0
- package/src/components/Loader/stories/LoaderStyle.stories.tsx +39 -0
- package/src/components/Loader/stories/LoaderText.stories.tsx +30 -0
- package/src/components/Loader/styles/loader.ts +14 -0
- package/src/components/Loader/styles/loaderShape.ts +34 -0
- package/src/components/Loader/styles/loaderSize.ts +28 -0
- package/src/components/Logo/Logo.interface.ts +16 -0
- package/src/components/Logo/Logo.styles.ts +11 -0
- package/src/components/Logo/Logo.tsx +53 -0
- package/src/components/Logo/index.ts +9 -0
- package/src/components/Logo/stories/Logo.stories.tsx +31 -0
- package/src/components/Logo/styles/logo.ts +13 -0
- package/src/components/Logo/styles/logoAlign.ts +28 -0
- package/src/components/Logo/styles/logoSize.ts +34 -0
- package/src/components/MenuItem/MenuItem.appearance.ts +18 -0
- package/src/components/MenuItem/MenuItem.interface.ts +100 -0
- package/src/components/MenuItem/MenuItem.styles.ts +13 -0
- package/src/components/MenuItem/MenuItem.tsx +173 -0
- package/src/components/MenuItem/appearance/menuItemAccent.ts +26 -0
- package/src/components/MenuItem/appearance/menuItemError.ts +19 -0
- package/src/components/MenuItem/appearance/menuItemShape.ts +24 -0
- package/src/components/MenuItem/appearance/menuItemSize.ts +48 -0
- package/src/components/MenuItem/appearance/menuItemStyle.ts +17 -0
- package/src/components/MenuItem/appearance/menuItemSurface.ts +38 -0
- package/src/components/MenuItem/index.ts +36 -0
- package/src/components/MenuItem/stories/MenuItem.stories.tsx +52 -0
- package/src/components/MenuItem/styles/menuItem.ts +25 -0
- package/src/components/MenuItem/styles/menuItemJustify.ts +18 -0
- package/src/components/MenuItem/styles/menuItemShape.ts +37 -0
- package/src/components/MenuItem/styles/menuItemSize.ts +65 -0
- package/src/components/Modal/Modal.interface.ts +35 -0
- package/src/components/Modal/Modal.styles.ts +7 -0
- package/src/components/Modal/Modal.tsx +73 -0
- package/src/components/Modal/index.ts +5 -0
- package/src/components/Modal/stories/Modal.stories.tsx +47 -0
- package/src/components/Modal/styles/modal.ts +36 -0
- package/src/components/Overlay/Overlay.appearance.ts +8 -0
- package/src/components/Overlay/Overlay.interface.ts +34 -0
- package/src/components/Overlay/Overlay.styles.ts +7 -0
- package/src/components/Overlay/Overlay.tsx +46 -0
- package/src/components/Overlay/appearance/overlayDefault.ts +12 -0
- package/src/components/Overlay/index.ts +16 -0
- package/src/components/Overlay/stories/Overlay.stories.tsx +24 -0
- package/src/components/Overlay/styles/overlay.ts +18 -0
- package/src/components/Pagination/Pagination.appearance.ts +12 -0
- package/src/components/Pagination/Pagination.interface.ts +46 -0
- package/src/components/Pagination/Pagination.styles.ts +9 -0
- package/src/components/Pagination/Pagination.tsx +107 -0
- package/src/components/Pagination/appearance/paginationAccent.ts +12 -0
- package/src/components/Pagination/appearance/paginationSize.ts +22 -0
- package/src/components/Pagination/appearance/paginationSurface.ts +12 -0
- package/src/components/Pagination/index.ts +24 -0
- package/src/components/Pagination/stories/Pagination.stories.tsx +37 -0
- package/src/components/Pagination/styles/pagination.ts +14 -0
- package/src/components/Pagination/styles/paginationSize.ts +46 -0
- package/src/components/Radio/Radio.appearance.ts +22 -0
- package/src/components/Radio/Radio.interface.ts +83 -0
- package/src/components/Radio/Radio.styles.ts +11 -0
- package/src/components/Radio/Radio.tsx +159 -0
- package/src/components/Radio/appearance/radioDefault.ts +54 -0
- package/src/components/Radio/appearance/radioDisabled.ts +17 -0
- package/src/components/Radio/appearance/radioError.ts +17 -0
- package/src/components/Radio/appearance/radioRequire.ts +17 -0
- package/src/components/Radio/appearance/radioShape.ts +24 -0
- package/src/components/Radio/appearance/radioSize.ts +21 -0
- package/src/components/Radio/appearance/radioStyle.ts +20 -0
- package/src/components/Radio/appearance/radioSuccess.ts +17 -0
- package/src/components/Radio/index.ts +27 -0
- package/src/components/Radio/stories/RadioDefault.stories.tsx +26 -0
- package/src/components/Radio/stories/RadioDisabled.stories.tsx +27 -0
- package/src/components/Radio/stories/RadioError.stories.tsx +26 -0
- package/src/components/Radio/stories/RadioRequire.stories.tsx +26 -0
- package/src/components/Radio/stories/RadioSize.stories.tsx +36 -0
- package/src/components/Radio/stories/RadioStyle.stories.tsx +41 -0
- package/src/components/Radio/stories/RadioSuccess.stories.tsx +26 -0
- package/src/components/Radio/styles/radio.ts +37 -0
- package/src/components/Radio/styles/radioShape.ts +27 -0
- package/src/components/Radio/styles/radioSize.ts +25 -0
- package/src/components/RangeSlider/RangeSlider.interface.ts +35 -0
- package/src/components/RangeSlider/RangeSlider.styles.ts +7 -0
- package/src/components/RangeSlider/RangeSlider.tsx +212 -0
- package/src/components/RangeSlider/index.ts +9 -0
- package/src/components/RangeSlider/stories/RangeSlider.stories.tsx +55 -0
- package/src/components/RangeSlider/styles/rangeSlider.ts +37 -0
- package/src/components/Response/Response.interface.ts +29 -0
- package/src/components/Response/Response.styles.ts +7 -0
- package/src/components/Response/Response.tsx +68 -0
- package/src/components/Response/index.ts +5 -0
- package/src/components/Response/stories/Response.stories.tsx +22 -0
- package/src/components/Response/styles/response.ts +22 -0
- package/src/components/Scrollbar/Scrollbar.interface.ts +19 -0
- package/src/components/Scrollbar/Scrollbar.styles.ts +7 -0
- package/src/components/Scrollbar/Scrollbar.tsx +38 -0
- package/src/components/Scrollbar/index.ts +5 -0
- package/src/components/Scrollbar/stories/Scrollbar.stories.tsx +61 -0
- package/src/components/Scrollbar/styles/scrollbar.ts +12 -0
- package/src/components/Search/Search.interface.ts +23 -0
- package/src/components/Search/Search.styles.ts +7 -0
- package/src/components/Search/Search.tsx +69 -0
- package/src/components/Search/index.ts +5 -0
- package/src/components/Search/stories/Search.stories.tsx +24 -0
- package/src/components/Search/styles/search.ts +28 -0
- package/src/components/Segmented/Segmented.appearance.ts +22 -0
- package/src/components/Segmented/Segmented.interface.ts +101 -0
- package/src/components/Segmented/Segmented.styles.ts +13 -0
- package/src/components/Segmented/Segmented.tsx +219 -0
- package/src/components/Segmented/appearance/segmentedDefault.ts +26 -0
- package/src/components/Segmented/appearance/segmentedDisabled.ts +15 -0
- package/src/components/Segmented/appearance/segmentedError.ts +15 -0
- package/src/components/Segmented/appearance/segmentedRequire.ts +14 -0
- package/src/components/Segmented/appearance/segmentedShape.ts +24 -0
- package/src/components/Segmented/appearance/segmentedSize.ts +31 -0
- package/src/components/Segmented/appearance/segmentedStyle.ts +19 -0
- package/src/components/Segmented/appearance/segmentedSuccess.ts +15 -0
- package/src/components/Segmented/index.ts +38 -0
- package/src/components/Segmented/stories/SegmentedDisabled.stories.tsx +25 -0
- package/src/components/Segmented/stories/SegmentedIcon.stories.tsx +46 -0
- package/src/components/Segmented/stories/SegmentedLabel.stories.tsx +43 -0
- package/src/components/Segmented/stories/SegmentedLabelIcon.stories.tsx +40 -0
- package/src/components/Segmented/stories/SegmentedShape.stories.tsx +54 -0
- package/src/components/Segmented/stories/SegmentedSize.stories.tsx +56 -0
- package/src/components/Segmented/stories/SegmentedStories.config.tsx +89 -0
- package/src/components/Segmented/stories/SegmentedStyle.stories.tsx +42 -0
- package/src/components/Segmented/styles/segmented.ts +27 -0
- package/src/components/Segmented/styles/segmentedShape.ts +37 -0
- package/src/components/Segmented/styles/segmentedSize.ts +65 -0
- package/src/components/Segmented/styles/segmentedWidth.ts +33 -0
- package/src/components/Select/Select.appearance.ts +22 -0
- package/src/components/Select/Select.interface.ts +80 -0
- package/src/components/Select/Select.styles.ts +9 -0
- package/src/components/Select/Select.tsx +178 -0
- package/src/components/Select/appearance/selectDefault.ts +17 -0
- package/src/components/Select/appearance/selectDisabled.ts +13 -0
- package/src/components/Select/appearance/selectError.ts +17 -0
- package/src/components/Select/appearance/selectRequire.ts +17 -0
- package/src/components/Select/appearance/selectShape.ts +21 -0
- package/src/components/Select/appearance/selectSize.ts +30 -0
- package/src/components/Select/appearance/selectStyle.ts +17 -0
- package/src/components/Select/appearance/selectSuccess.ts +17 -0
- package/src/components/Select/index.ts +29 -0
- package/src/components/Select/stories/Select.stories.tsx +67 -0
- package/src/components/Select/styles/select.ts +30 -0
- package/src/components/Select/styles/selectSize.ts +48 -0
- package/src/components/Switch/Switch.appearance.ts +20 -0
- package/src/components/Switch/Switch.interface.ts +70 -0
- package/src/components/Switch/Switch.styles.ts +11 -0
- package/src/components/Switch/Switch.tsx +143 -0
- package/src/components/Switch/appearance/switchDefault.ts +14 -0
- package/src/components/Switch/appearance/switchDisabled.ts +14 -0
- package/src/components/Switch/appearance/switchError.ts +14 -0
- package/src/components/Switch/appearance/switchRequire.ts +14 -0
- package/src/components/Switch/appearance/switchShape.ts +7 -0
- package/src/components/Switch/appearance/switchSize.ts +21 -0
- package/src/components/Switch/appearance/switchStyle.ts +19 -0
- package/src/components/Switch/appearance/switchSuccess.ts +14 -0
- package/src/components/Switch/index.ts +32 -0
- package/src/components/Switch/stories/SwitchDefault.stories.tsx +46 -0
- package/src/components/Switch/stories/SwitchDisabled.stories.tsx +51 -0
- package/src/components/Switch/stories/SwitchError.stories.tsx +46 -0
- package/src/components/Switch/stories/SwitchRequire.stories.tsx +46 -0
- package/src/components/Switch/stories/SwitchSize.stories.tsx +37 -0
- package/src/components/Switch/stories/SwitchStories.config.tsx +28 -0
- package/src/components/Switch/stories/SwitchSuccess.stories.tsx +46 -0
- package/src/components/Switch/stories/SwitchTitleDescSwitch.stories.tsx +50 -0
- package/src/components/Switch/stories/SwitchTitleSwitch.stories.tsx +49 -0
- package/src/components/Switch/styles/switch.ts +43 -0
- package/src/components/Switch/styles/switchAlign.ts +29 -0
- package/src/components/Switch/styles/switchSize.ts +40 -0
- package/src/components/Tab/Tab.interface.ts +21 -0
- package/src/components/Tab/Tab.styles.ts +9 -0
- package/src/components/Tab/Tab.tsx +44 -0
- package/src/components/Tab/index.ts +7 -0
- package/src/components/Tab/stories/Tab.stories.tsx +67 -0
- package/src/components/Tab/styles/tab.ts +19 -0
- package/src/components/Tab/styles/tabSize.ts +41 -0
- package/src/components/Text/Text.interface.ts +32 -0
- package/src/components/Text/Text.styles.ts +7 -0
- package/src/components/Text/Text.tsx +56 -0
- package/src/components/Text/index.ts +5 -0
- package/src/components/Text/stories/Text.stories.tsx +84 -0
- package/src/components/Text/styles/text.ts +7 -0
- package/src/components/Textarea/Textarea.appearance.ts +22 -0
- package/src/components/Textarea/Textarea.interface.ts +81 -0
- package/src/components/Textarea/Textarea.styles.ts +11 -0
- package/src/components/Textarea/Textarea.tsx +158 -0
- package/src/components/Textarea/appearance/textareaDefault.ts +26 -0
- package/src/components/Textarea/appearance/textareaDisabled.ts +17 -0
- package/src/components/Textarea/appearance/textareaError.ts +17 -0
- package/src/components/Textarea/appearance/textareaRequire.ts +17 -0
- package/src/components/Textarea/appearance/textareaShape.ts +24 -0
- package/src/components/Textarea/appearance/textareaSize.ts +22 -0
- package/src/components/Textarea/appearance/textareaStyle.ts +17 -0
- package/src/components/Textarea/appearance/textareaSuccess.ts +17 -0
- package/src/components/Textarea/index.ts +36 -0
- package/src/components/Textarea/stories/Textarea.stories.tsx +61 -0
- package/src/components/Textarea/styles/textarea.ts +17 -0
- package/src/components/Textarea/styles/textareaShape.ts +34 -0
- package/src/components/Textarea/styles/textareaSize.ts +32 -0
- package/src/components/Tile/Tile.appearance.ts +14 -0
- package/src/components/Tile/Tile.interface.ts +97 -0
- package/src/components/Tile/Tile.styles.ts +11 -0
- package/src/components/Tile/Tile.tsx +174 -0
- package/src/components/Tile/appearance/tileShape.ts +24 -0
- package/src/components/Tile/appearance/tileSize.ts +42 -0
- package/src/components/Tile/appearance/tileStyle.ts +17 -0
- package/src/components/Tile/appearance/tileSurface.ts +34 -0
- package/src/components/Tile/index.ts +30 -0
- package/src/components/Tile/stories/TileBadge.stories.tsx +20 -0
- package/src/components/Tile/stories/TileDefault.stories.tsx +40 -0
- package/src/components/Tile/stories/TileIcon.stories.tsx +23 -0
- package/src/components/Tile/stories/TileShape.stories.tsx +52 -0
- package/src/components/Tile/stories/TileSize.stories.tsx +53 -0
- package/src/components/Tile/stories/TileStyle.stories.tsx +40 -0
- package/src/components/Tile/stories/TileSwap.stories.tsx +60 -0
- package/src/components/Tile/styles/tile.ts +27 -0
- package/src/components/Tile/styles/tileShape.ts +34 -0
- package/src/components/Tile/styles/tileSize.ts +62 -0
- package/src/components/Title/Title.interface.ts +26 -0
- package/src/components/Title/Title.styles.ts +7 -0
- package/src/components/Title/Title.tsx +46 -0
- package/src/components/Title/index.ts +5 -0
- package/src/components/Title/stories/Title.stories.tsx +68 -0
- package/src/components/Title/styles/title.ts +7 -0
- package/src/components/Tooltip/Tooltip.appearance.ts +22 -0
- package/src/components/Tooltip/Tooltip.interface.ts +81 -0
- package/src/components/Tooltip/Tooltip.styles.ts +7 -0
- package/src/components/Tooltip/Tooltip.tsx +116 -0
- package/src/components/Tooltip/appearance/tooltipDefault.ts +12 -0
- package/src/components/Tooltip/appearance/tooltipDisabled.ts +11 -0
- package/src/components/Tooltip/appearance/tooltipError.ts +12 -0
- package/src/components/Tooltip/appearance/tooltipRequire.ts +12 -0
- package/src/components/Tooltip/appearance/tooltipShape.ts +24 -0
- package/src/components/Tooltip/appearance/tooltipSize.ts +21 -0
- package/src/components/Tooltip/appearance/tooltipStyle.ts +17 -0
- package/src/components/Tooltip/appearance/tooltipSuccess.ts +12 -0
- package/src/components/Tooltip/index.ts +26 -0
- package/src/components/Tooltip/stories/Tooltip.stories.tsx +61 -0
- package/src/components/Tooltip/styles/tooltip.ts +36 -0
- package/src/components/Warning/Warning.appearance.ts +22 -0
- package/src/components/Warning/Warning.interface.ts +86 -0
- package/src/components/Warning/Warning.styles.ts +11 -0
- package/src/components/Warning/Warning.tsx +116 -0
- package/src/components/Warning/appearance/warningAccent.ts +28 -0
- package/src/components/Warning/appearance/warningError.ts +28 -0
- package/src/components/Warning/appearance/warningInfo.ts +38 -0
- package/src/components/Warning/appearance/warningShape.ts +24 -0
- package/src/components/Warning/appearance/warningSize.ts +20 -0
- package/src/components/Warning/appearance/warningStyle.ts +17 -0
- package/src/components/Warning/appearance/warningSuccess.ts +18 -0
- package/src/components/Warning/appearance/warningWarning.ts +38 -0
- package/src/components/Warning/index.ts +28 -0
- package/src/components/Warning/stories/WarningDefault.stories.tsx +52 -0
- package/src/components/Warning/stories/WarningMuted.stories.tsx +40 -0
- package/src/components/Warning/stories/WarningShape.stories.tsx +52 -0
- package/src/components/Warning/stories/WarningSize.stories.tsx +28 -0
- package/src/components/Warning/stories/WarningStyle.stories.tsx +40 -0
- package/src/components/Warning/styles/warning.ts +13 -0
- package/src/components/Warning/styles/warningShape.ts +38 -0
- package/src/components/Warning/styles/warningSize.ts +31 -0
- package/src/icons/app_logo.svg +56 -0
- package/src/icons/connection.svg +9 -0
- package/src/icons/reject.svg +4 -0
- package/src/images/manager.png +0 -0
- package/src/index.tsx +957 -0
- package/src/module.d.ts +19 -0
- package/src/styles/borderColor/index.ts +35 -0
- package/src/styles/direction/index.ts +30 -0
- package/src/styles/fill/index.ts +58 -0
- package/src/styles/gap/index.ts +19 -0
- package/src/styles/iconFill/index.ts +46 -0
- package/src/styles/shape/index.ts +29 -0
- package/src/styles/textAlign/index.ts +22 -0
- package/src/styles/textColor/index.ts +18 -0
- package/src/styles/textSize/index.ts +55 -0
- package/src/styles/textWeight/index.ts +28 -0
- package/src/styles/titleSize/index.ts +50 -0
- package/src/styles/tokens.ts +31 -0
- package/src/styles/width/index.ts +29 -0
- package/src/utils/colorTokens/colorTokens.interface.ts +3 -0
- package/src/utils/colorTokens/colorTokens.ts +17 -0
- package/src/utils/colorTokens/index.ts +7 -0
- package/src/utils/getVariantsPropsList/getVariantsPropsList.interface.ts +10 -0
- package/src/utils/getVariantsPropsList/getVariantsPropsList.ts +51 -0
- package/src/utils/getVariantsPropsList/index.ts +5 -0
- package/src/utils/index.ts +15 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputNumberAppearance } from '../InputNumber.interface'
|
|
2
|
+
|
|
3
|
+
const inputNumberAppearanceStyle = {
|
|
4
|
+
solid: {
|
|
5
|
+
borderColor: 'none',
|
|
6
|
+
},
|
|
7
|
+
outlined: {
|
|
8
|
+
fill: 'none',
|
|
9
|
+
},
|
|
10
|
+
full: {
|
|
11
|
+
borderColor: 'none',
|
|
12
|
+
},
|
|
13
|
+
ghost: {
|
|
14
|
+
fill: 'none',
|
|
15
|
+
borderColor: 'none',
|
|
16
|
+
},
|
|
17
|
+
} satisfies InputNumberAppearance
|
|
18
|
+
|
|
19
|
+
export { inputNumberAppearanceStyle }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InputNumberAppearance } from '../InputNumber.interface'
|
|
2
|
+
|
|
3
|
+
const inputNumberAppearanceSuccess = {
|
|
4
|
+
successPrimary: {
|
|
5
|
+
fill: 'successTertiary',
|
|
6
|
+
borderColor: 'successBorderQuaternary',
|
|
7
|
+
buttonFill: 'successTertiary',
|
|
8
|
+
iconFill: 'successTertiary',
|
|
9
|
+
iconFillIcon: 'successItemQuaternary',
|
|
10
|
+
inputNumberTextColor: 'surfaceTextQuaternary',
|
|
11
|
+
},
|
|
12
|
+
} satisfies InputNumberAppearance
|
|
13
|
+
|
|
14
|
+
export { inputNumberAppearanceSuccess }
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InputNumber, inputNumberConfig } from './InputNumber'
|
|
2
|
+
import { inputNumberAppearance } from './InputNumber.appearance'
|
|
3
|
+
import type {
|
|
4
|
+
InputNumberAppearance,
|
|
5
|
+
InputNumberAppearanceKey,
|
|
6
|
+
InputNumberAppearanceProps,
|
|
7
|
+
InputNumberConfig,
|
|
8
|
+
InputNumberProps,
|
|
9
|
+
InputNumberType,
|
|
10
|
+
OnChangeValueParams,
|
|
11
|
+
} from './InputNumber.interface'
|
|
12
|
+
import { inputNumberShapeList } from './styles/inputNumberShape'
|
|
13
|
+
import type { inputNumberShapePropsType } from './styles/inputNumberShape'
|
|
14
|
+
import { inputNumberSizeList } from './styles/inputNumberSize'
|
|
15
|
+
import type { inputNumberSizePropsType } from './styles/inputNumberSize'
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
InputNumber,
|
|
19
|
+
inputNumberAppearance,
|
|
20
|
+
inputNumberConfig,
|
|
21
|
+
inputNumberShapeList,
|
|
22
|
+
inputNumberSizeList,
|
|
23
|
+
}
|
|
24
|
+
export type {
|
|
25
|
+
InputNumberAppearance,
|
|
26
|
+
InputNumberAppearanceKey,
|
|
27
|
+
InputNumberAppearanceProps,
|
|
28
|
+
InputNumberConfig,
|
|
29
|
+
InputNumberProps,
|
|
30
|
+
inputNumberShapePropsType,
|
|
31
|
+
inputNumberSizePropsType,
|
|
32
|
+
InputNumberType,
|
|
33
|
+
OnChangeValueParams,
|
|
34
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
4
|
+
|
|
5
|
+
import { InputNumber } from '../InputNumber'
|
|
6
|
+
import type { InputNumberProps } from '../InputNumber.interface'
|
|
7
|
+
|
|
8
|
+
const InputNumberMeta: Meta<typeof InputNumber> = {
|
|
9
|
+
title: 'Atoms / InputNumber',
|
|
10
|
+
component: InputNumber,
|
|
11
|
+
args: {
|
|
12
|
+
appearance: 'defaultPrimary',
|
|
13
|
+
min: 0,
|
|
14
|
+
max: 10,
|
|
15
|
+
size: 'm',
|
|
16
|
+
appearanceStyle: 'solid',
|
|
17
|
+
shape: 'rounded',
|
|
18
|
+
step: 1,
|
|
19
|
+
value: 1,
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default InputNumberMeta
|
|
24
|
+
|
|
25
|
+
function ControlledInputNumber(props: InputNumberProps) {
|
|
26
|
+
const { value: valueProp, onChange, ...restProps } = props
|
|
27
|
+
const [value, setValue] = useState(valueProp ?? 0)
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<InputNumber
|
|
31
|
+
{...restProps}
|
|
32
|
+
value={value}
|
|
33
|
+
onChange={(nextValue) => {
|
|
34
|
+
setValue(nextValue)
|
|
35
|
+
if (onChange) {
|
|
36
|
+
onChange(nextValue)
|
|
37
|
+
}
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const Default: StoryObj<typeof InputNumber> = {
|
|
44
|
+
render: (args) => {
|
|
45
|
+
return <ControlledInputNumber {...args} />
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const Native: StoryObj<typeof InputNumber> = {
|
|
50
|
+
args: {
|
|
51
|
+
type: 'native',
|
|
52
|
+
},
|
|
53
|
+
render: (args) => {
|
|
54
|
+
return <ControlledInputNumber {...args} />
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const Error: StoryObj<typeof InputNumber> = {
|
|
59
|
+
args: {
|
|
60
|
+
appearance: 'errorPrimary',
|
|
61
|
+
isError: true,
|
|
62
|
+
},
|
|
63
|
+
render: (args) => {
|
|
64
|
+
return <ControlledInputNumber {...args} />
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const Success: StoryObj<typeof InputNumber> = {
|
|
69
|
+
args: {
|
|
70
|
+
appearance: 'successPrimary',
|
|
71
|
+
},
|
|
72
|
+
render: (args) => {
|
|
73
|
+
return <ControlledInputNumber {...args} />
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const SizeS: StoryObj<typeof InputNumber> = {
|
|
78
|
+
args: {
|
|
79
|
+
size: 's',
|
|
80
|
+
},
|
|
81
|
+
render: (args) => {
|
|
82
|
+
return <ControlledInputNumber {...args} />
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const SizeXL: StoryObj<typeof InputNumber> = {
|
|
87
|
+
args: {
|
|
88
|
+
size: 'xl',
|
|
89
|
+
},
|
|
90
|
+
render: (args) => {
|
|
91
|
+
return <ControlledInputNumber {...args} />
|
|
92
|
+
},
|
|
93
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
const inputNumberStyles = StyleSheet.create({
|
|
4
|
+
inputNumber: {
|
|
5
|
+
flexDirection: 'row',
|
|
6
|
+
justifyContent: 'space-between',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
borderColor: 'transparent',
|
|
9
|
+
borderStyle: 'solid',
|
|
10
|
+
borderWidth: 1,
|
|
11
|
+
gap: 4,
|
|
12
|
+
},
|
|
13
|
+
inputNumber__field: {
|
|
14
|
+
maxWidth: 60,
|
|
15
|
+
flexGrow: 0,
|
|
16
|
+
margin: 0,
|
|
17
|
+
padding: 0,
|
|
18
|
+
textAlign: 'center',
|
|
19
|
+
},
|
|
20
|
+
inputNumber__icon: {
|
|
21
|
+
alignSelf: 'center',
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
export { inputNumberStyles }
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import { getVariantsPropsList } from '../../../utils'
|
|
4
|
+
|
|
5
|
+
const inputNumberShapeStyles = StyleSheet.create({
|
|
6
|
+
inputNumber_shape_circular: {
|
|
7
|
+
borderRadius: 100,
|
|
8
|
+
},
|
|
9
|
+
inputNumber_shape_rounded: {
|
|
10
|
+
borderRadius: 8,
|
|
11
|
+
},
|
|
12
|
+
inputNumber_shape_roundedL: {
|
|
13
|
+
borderRadius: 12,
|
|
14
|
+
},
|
|
15
|
+
inputNumber_shape_roundedM: {
|
|
16
|
+
borderRadius: 8,
|
|
17
|
+
},
|
|
18
|
+
inputNumber_shape_roundedS: {
|
|
19
|
+
borderRadius: 4,
|
|
20
|
+
},
|
|
21
|
+
inputNumber_shape_roundedXL: {
|
|
22
|
+
borderRadius: 16,
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const inputNumberShapeList = getVariantsPropsList(
|
|
27
|
+
inputNumberShapeStyles,
|
|
28
|
+
'inputNumber_shape_',
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
type inputNumberShapePropsType = (typeof inputNumberShapeList)[number]
|
|
32
|
+
|
|
33
|
+
export { inputNumberShapeList, inputNumberShapeStyles }
|
|
34
|
+
export type { inputNumberShapePropsType }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import { getVariantsPropsList } from '../../../utils'
|
|
4
|
+
|
|
5
|
+
const inputNumberSizeStyles = StyleSheet.create({
|
|
6
|
+
inputNumber_size_l: {
|
|
7
|
+
minHeight: 48,
|
|
8
|
+
paddingVertical: 12,
|
|
9
|
+
paddingHorizontal: 12,
|
|
10
|
+
},
|
|
11
|
+
inputNumber_size_m: {
|
|
12
|
+
minHeight: 40,
|
|
13
|
+
paddingVertical: 8,
|
|
14
|
+
paddingHorizontal: 12,
|
|
15
|
+
},
|
|
16
|
+
inputNumber_size_s: {
|
|
17
|
+
minHeight: 28,
|
|
18
|
+
paddingVertical: 2,
|
|
19
|
+
paddingHorizontal: 12,
|
|
20
|
+
},
|
|
21
|
+
inputNumber_size_xl: {
|
|
22
|
+
minHeight: 56,
|
|
23
|
+
paddingVertical: 16,
|
|
24
|
+
paddingHorizontal: 12,
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const inputNumberSizeList = getVariantsPropsList(
|
|
29
|
+
inputNumberSizeStyles,
|
|
30
|
+
'inputNumber_size_',
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
type inputNumberSizePropsType = (typeof inputNumberSizeList)[number]
|
|
34
|
+
|
|
35
|
+
export { inputNumberSizeList, inputNumberSizeStyles }
|
|
36
|
+
export type { inputNumberSizePropsType }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { inputPasswordAppearanceDefault } from './appearance/inputPasswordDefault'
|
|
2
|
+
import { inputPasswordAppearanceDisabled } from './appearance/inputPasswordDisabled'
|
|
3
|
+
import { inputPasswordAppearanceError } from './appearance/inputPasswordError'
|
|
4
|
+
import { inputPasswordAppearanceRequire } from './appearance/inputPasswordRequire'
|
|
5
|
+
import { inputPasswordAppearanceShape } from './appearance/inputPasswordShape'
|
|
6
|
+
import { inputPasswordAppearanceSize } from './appearance/inputPasswordSize'
|
|
7
|
+
import { inputPasswordAppearanceStyle } from './appearance/inputPasswordStyle'
|
|
8
|
+
import { inputPasswordAppearanceSuccess } from './appearance/inputPasswordSuccess'
|
|
9
|
+
import type { InputPasswordAppearance } from './InputPassword.interface'
|
|
10
|
+
|
|
11
|
+
const inputPasswordAppearance = {
|
|
12
|
+
...inputPasswordAppearanceSize,
|
|
13
|
+
...inputPasswordAppearanceDisabled,
|
|
14
|
+
...inputPasswordAppearanceRequire,
|
|
15
|
+
...inputPasswordAppearanceStyle,
|
|
16
|
+
...inputPasswordAppearanceError,
|
|
17
|
+
...inputPasswordAppearanceDefault,
|
|
18
|
+
...inputPasswordAppearanceSuccess,
|
|
19
|
+
...inputPasswordAppearanceShape,
|
|
20
|
+
} satisfies InputPasswordAppearance
|
|
21
|
+
|
|
22
|
+
export { inputPasswordAppearance }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { StyleProp, TextInputFocusEvent, ViewStyle } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
AppearanceConfig,
|
|
5
|
+
AppearanceKeysState,
|
|
6
|
+
AppearancePartialRecord,
|
|
7
|
+
AppearanceRecord,
|
|
8
|
+
AppearanceShapeKey,
|
|
9
|
+
AppearanceSizeKey,
|
|
10
|
+
AppearanceStyleKey,
|
|
11
|
+
BorderColorProps,
|
|
12
|
+
FillProps,
|
|
13
|
+
ItemFillActiveProps,
|
|
14
|
+
TextColorProps,
|
|
15
|
+
TextSizeProps,
|
|
16
|
+
TextWeightProps,
|
|
17
|
+
WidthProps,
|
|
18
|
+
} from '@itcase/types-ui'
|
|
19
|
+
|
|
20
|
+
import type { SvgIconComponent } from '../Icon/Icon.interface'
|
|
21
|
+
import type { iconSizePropsType } from '../Icon/styles/iconSize'
|
|
22
|
+
import type { inputPasswordShapePropsType } from './styles/inputPasswordShape'
|
|
23
|
+
import type { inputPasswordSizePropsType } from './styles/inputPasswordSize'
|
|
24
|
+
|
|
25
|
+
interface InputPasswordAppearanceProps {
|
|
26
|
+
borderColor?: BorderColorProps
|
|
27
|
+
caret?: ItemFillActiveProps
|
|
28
|
+
fill?: FillProps
|
|
29
|
+
iconFill?: ItemFillActiveProps
|
|
30
|
+
iconRevealableHide?: SvgIconComponent
|
|
31
|
+
iconRevealableShow?: SvgIconComponent
|
|
32
|
+
iconSize?: iconSizePropsType
|
|
33
|
+
placeholderTextColor?: TextColorProps
|
|
34
|
+
shape?: inputPasswordShapePropsType
|
|
35
|
+
size?: inputPasswordSizePropsType
|
|
36
|
+
textColor?: TextColorProps
|
|
37
|
+
textSize?: TextSizeProps
|
|
38
|
+
textWeight?: TextWeightProps
|
|
39
|
+
width?: WidthProps
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type InputPasswordAppearanceKey = AppearanceKeysState
|
|
43
|
+
type InputPasswordConfig = AppearanceConfig<
|
|
44
|
+
AppearanceKeysState,
|
|
45
|
+
InputPasswordAppearanceProps
|
|
46
|
+
>
|
|
47
|
+
type InputPasswordAppearance = InputPasswordConfig['appearance']
|
|
48
|
+
type InputPasswordAppearanceStyle = AppearanceRecord<
|
|
49
|
+
AppearanceStyleKey,
|
|
50
|
+
InputPasswordAppearanceProps,
|
|
51
|
+
'borderColor' | 'fill'
|
|
52
|
+
>
|
|
53
|
+
type InputPasswordAppearanceShape = Partial<
|
|
54
|
+
Record<
|
|
55
|
+
AppearanceShapeKey,
|
|
56
|
+
Partial<Pick<InputPasswordAppearanceProps, 'shape'>>
|
|
57
|
+
>
|
|
58
|
+
>
|
|
59
|
+
type InputPasswordAppearanceSize = AppearancePartialRecord<
|
|
60
|
+
AppearanceSizeKey,
|
|
61
|
+
InputPasswordAppearanceProps,
|
|
62
|
+
'iconSize' | 'size' | 'textSize'
|
|
63
|
+
>
|
|
64
|
+
|
|
65
|
+
interface InputPasswordProps extends InputPasswordAppearanceProps {
|
|
66
|
+
isDisabled?: boolean
|
|
67
|
+
isError?: boolean
|
|
68
|
+
isReadOnly?: boolean
|
|
69
|
+
isRevealed?: boolean
|
|
70
|
+
onBlur?: (event: TextInputFocusEvent) => void
|
|
71
|
+
onChangeText?: (text: string) => void
|
|
72
|
+
onFocus?: (event: TextInputFocusEvent) => void
|
|
73
|
+
appearance?: InputPasswordAppearanceKey
|
|
74
|
+
appearanceStyle?: AppearanceStyleKey
|
|
75
|
+
maxLength?: number
|
|
76
|
+
placeholder?: string
|
|
77
|
+
style?: StyleProp<ViewStyle>
|
|
78
|
+
value?: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type {
|
|
82
|
+
InputPasswordAppearance,
|
|
83
|
+
InputPasswordAppearanceKey,
|
|
84
|
+
InputPasswordAppearanceProps,
|
|
85
|
+
InputPasswordAppearanceShape,
|
|
86
|
+
InputPasswordAppearanceSize,
|
|
87
|
+
InputPasswordAppearanceStyle,
|
|
88
|
+
InputPasswordConfig,
|
|
89
|
+
InputPasswordProps,
|
|
90
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { inputPasswordStyles as inputPasswordBaseStyles } from './styles/inputPassword'
|
|
2
|
+
import { inputPasswordShapeStyles } from './styles/inputPasswordShape'
|
|
3
|
+
import { inputPasswordSizeStyles } from './styles/inputPasswordSize'
|
|
4
|
+
|
|
5
|
+
const styles = {
|
|
6
|
+
...inputPasswordBaseStyles,
|
|
7
|
+
...inputPasswordShapeStyles,
|
|
8
|
+
...inputPasswordSizeStyles,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { styles }
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from 'react'
|
|
2
|
+
import { Pressable, TextInput, View } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import { icons24 } from '@itcase/icons-default/default/svg'
|
|
5
|
+
|
|
6
|
+
import { tokens } from '../../styles/tokens'
|
|
7
|
+
import { Icon } from '../Icon'
|
|
8
|
+
import { inputPasswordAppearance } from './InputPassword.appearance'
|
|
9
|
+
import type {
|
|
10
|
+
InputPasswordAppearanceProps,
|
|
11
|
+
InputPasswordConfig,
|
|
12
|
+
InputPasswordProps,
|
|
13
|
+
} from './InputPassword.interface'
|
|
14
|
+
import { styles } from './InputPassword.styles'
|
|
15
|
+
|
|
16
|
+
const DEFAULT_INPUT_PASSWORD_APPEARANCE = 'defaultPrimary'
|
|
17
|
+
const DEFAULT_INPUT_PASSWORD_APPEARANCE_STYLE = 'solid'
|
|
18
|
+
const DEFAULT_INPUT_PASSWORD_SIZE = 'm'
|
|
19
|
+
const DEFAULT_INPUT_PASSWORD_ICON_SIZE = '24'
|
|
20
|
+
|
|
21
|
+
const IconRevealableHideDefault = icons24.View.HideValue
|
|
22
|
+
const IconRevealableShowDefault = icons24.View.ShowValue
|
|
23
|
+
|
|
24
|
+
const inputPasswordConfig: InputPasswordConfig = {
|
|
25
|
+
appearance: {},
|
|
26
|
+
setAppearance: (newComponent) => {
|
|
27
|
+
inputPasswordConfig.appearance = newComponent
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
inputPasswordConfig.setAppearance(inputPasswordAppearance)
|
|
32
|
+
|
|
33
|
+
function getTokenTextColor(
|
|
34
|
+
textColorKey?: InputPasswordAppearanceProps['textColor'],
|
|
35
|
+
) {
|
|
36
|
+
if (!textColorKey) {
|
|
37
|
+
return undefined
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const colorStyle = tokens[`text_color_${textColorKey}`]
|
|
41
|
+
|
|
42
|
+
if (colorStyle && 'color' in colorStyle) {
|
|
43
|
+
return colorStyle.color
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return undefined
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function getTokenIconFillColor(
|
|
50
|
+
iconFillKey?: InputPasswordAppearanceProps['caret'],
|
|
51
|
+
) {
|
|
52
|
+
if (!iconFillKey) {
|
|
53
|
+
return undefined
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const iconFillStyle = tokens[`icon_fill_${iconFillKey}`]
|
|
57
|
+
|
|
58
|
+
if (iconFillStyle && 'color' in iconFillStyle) {
|
|
59
|
+
return iconFillStyle.color
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return undefined
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function InputPassword(props: InputPasswordProps) {
|
|
66
|
+
const {
|
|
67
|
+
appearance,
|
|
68
|
+
width,
|
|
69
|
+
maxLength,
|
|
70
|
+
size,
|
|
71
|
+
fill,
|
|
72
|
+
borderColor,
|
|
73
|
+
textColor,
|
|
74
|
+
textSize,
|
|
75
|
+
textWeight,
|
|
76
|
+
appearanceStyle,
|
|
77
|
+
caret,
|
|
78
|
+
iconFill,
|
|
79
|
+
iconRevealableHide,
|
|
80
|
+
iconRevealableShow,
|
|
81
|
+
iconSize,
|
|
82
|
+
placeholder,
|
|
83
|
+
placeholderTextColor,
|
|
84
|
+
shape,
|
|
85
|
+
style,
|
|
86
|
+
value,
|
|
87
|
+
isDisabled,
|
|
88
|
+
isError,
|
|
89
|
+
isReadOnly,
|
|
90
|
+
isRevealed: isRevealedProp,
|
|
91
|
+
onBlur,
|
|
92
|
+
onChangeText,
|
|
93
|
+
onFocus,
|
|
94
|
+
} = props
|
|
95
|
+
|
|
96
|
+
const [isRevealed, setIsRevealed] = useState(Boolean(isRevealedProp))
|
|
97
|
+
|
|
98
|
+
const onPressIconReveal = useCallback(() => {
|
|
99
|
+
setIsRevealed((previousValue) => {
|
|
100
|
+
return !previousValue
|
|
101
|
+
})
|
|
102
|
+
}, [])
|
|
103
|
+
|
|
104
|
+
const appearanceConfig = useMemo(() => {
|
|
105
|
+
const appearanceKeyList = [
|
|
106
|
+
appearance || DEFAULT_INPUT_PASSWORD_APPEARANCE,
|
|
107
|
+
appearanceStyle || DEFAULT_INPUT_PASSWORD_APPEARANCE_STYLE,
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
if (isError) {
|
|
111
|
+
appearanceKeyList.push('errorPrimary')
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (isDisabled) {
|
|
115
|
+
appearanceKeyList.push('disabledPrimary')
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return appearanceKeyList.reduce<InputPasswordAppearanceProps>(
|
|
119
|
+
(resultConfig, appearanceKey) => {
|
|
120
|
+
return Object.assign(
|
|
121
|
+
resultConfig,
|
|
122
|
+
inputPasswordConfig.appearance?.[appearanceKey],
|
|
123
|
+
)
|
|
124
|
+
},
|
|
125
|
+
{},
|
|
126
|
+
)
|
|
127
|
+
}, [appearance, appearanceStyle, isDisabled, isError])
|
|
128
|
+
|
|
129
|
+
const fillKey = fill || appearanceConfig.fill
|
|
130
|
+
const borderColorKey = borderColor || appearanceConfig.borderColor
|
|
131
|
+
const textColorKey = textColor || appearanceConfig.textColor
|
|
132
|
+
const textSizeKey = textSize || appearanceConfig.textSize
|
|
133
|
+
const textWeightKey = textWeight || appearanceConfig.textWeight
|
|
134
|
+
const placeholderTextColorKey =
|
|
135
|
+
placeholderTextColor || appearanceConfig.placeholderTextColor
|
|
136
|
+
const caretKey = caret || appearanceConfig.caret
|
|
137
|
+
const iconFillKey = iconFill || appearanceConfig.iconFill
|
|
138
|
+
const iconSizeKey =
|
|
139
|
+
iconSize || appearanceConfig.iconSize || DEFAULT_INPUT_PASSWORD_ICON_SIZE
|
|
140
|
+
const shapeKey = shape || appearanceConfig.shape
|
|
141
|
+
const sizeKey = size || appearanceConfig.size || DEFAULT_INPUT_PASSWORD_SIZE
|
|
142
|
+
const widthKey = width || appearanceConfig.width
|
|
143
|
+
const IconRevealableHide =
|
|
144
|
+
iconRevealableHide ||
|
|
145
|
+
appearanceConfig.iconRevealableHide ||
|
|
146
|
+
IconRevealableHideDefault
|
|
147
|
+
const IconRevealableShow =
|
|
148
|
+
iconRevealableShow ||
|
|
149
|
+
appearanceConfig.iconRevealableShow ||
|
|
150
|
+
IconRevealableShowDefault
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<View
|
|
154
|
+
style={[
|
|
155
|
+
styles.inputPassword,
|
|
156
|
+
fillKey && tokens[`fill_${fillKey}`],
|
|
157
|
+
borderColorKey && tokens[`border_color_${borderColorKey}`],
|
|
158
|
+
shapeKey && styles[`inputPassword_shape_${shapeKey}`],
|
|
159
|
+
sizeKey && styles[`inputPassword_size_${sizeKey}`],
|
|
160
|
+
widthKey && tokens[`width_${widthKey}`],
|
|
161
|
+
style && style,
|
|
162
|
+
]}
|
|
163
|
+
>
|
|
164
|
+
<TextInput
|
|
165
|
+
maxLength={maxLength}
|
|
166
|
+
autoCapitalize="none"
|
|
167
|
+
autoCorrect={false}
|
|
168
|
+
cursorColor={getTokenIconFillColor(caretKey)}
|
|
169
|
+
editable={!(isDisabled || isReadOnly)}
|
|
170
|
+
placeholder={placeholder}
|
|
171
|
+
placeholderTextColor={getTokenTextColor(placeholderTextColorKey)}
|
|
172
|
+
secureTextEntry={!isRevealed}
|
|
173
|
+
selectionColor={getTokenIconFillColor(caretKey)}
|
|
174
|
+
style={[
|
|
175
|
+
styles.inputPassword__field,
|
|
176
|
+
textColorKey && tokens[`text_color_${textColorKey}`],
|
|
177
|
+
textSizeKey && tokens[`text_size_${textSizeKey}`],
|
|
178
|
+
textWeightKey && tokens[`text_weight_${textWeightKey}`],
|
|
179
|
+
]}
|
|
180
|
+
underlineColorAndroid="transparent"
|
|
181
|
+
value={value}
|
|
182
|
+
onBlur={onBlur}
|
|
183
|
+
onChangeText={onChangeText}
|
|
184
|
+
onFocus={onFocus}
|
|
185
|
+
/>
|
|
186
|
+
<Pressable
|
|
187
|
+
disabled={isDisabled}
|
|
188
|
+
style={styles.inputPassword__icon}
|
|
189
|
+
onPress={onPressIconReveal}
|
|
190
|
+
>
|
|
191
|
+
<Icon
|
|
192
|
+
size={iconSizeKey}
|
|
193
|
+
iconFill={iconFillKey}
|
|
194
|
+
iconSize={iconSizeKey}
|
|
195
|
+
SVGIcon={isRevealed ? IconRevealableHide : IconRevealableShow}
|
|
196
|
+
/>
|
|
197
|
+
</Pressable>
|
|
198
|
+
</View>
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export { InputPassword, inputPasswordConfig }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { InputPasswordAppearance } from '../InputPassword.interface'
|
|
2
|
+
|
|
3
|
+
const inputPasswordAppearanceDefault = {
|
|
4
|
+
defaultPrimary: {
|
|
5
|
+
fill: 'surfaceSecondary',
|
|
6
|
+
borderColor: 'surfaceBorderTertiary',
|
|
7
|
+
textColor: 'surfaceTextPrimary',
|
|
8
|
+
caret: 'extraItemSecondary',
|
|
9
|
+
iconFill: 'surfaceItemQuaternary',
|
|
10
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
11
|
+
},
|
|
12
|
+
defaultSecondary: {
|
|
13
|
+
fill: 'surfacePrimary',
|
|
14
|
+
borderColor: 'surfaceBorderTertiary',
|
|
15
|
+
textColor: 'surfaceTextPrimary',
|
|
16
|
+
caret: 'extraItemSecondary',
|
|
17
|
+
iconFill: 'surfaceItemQuaternary',
|
|
18
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
19
|
+
},
|
|
20
|
+
} satisfies InputPasswordAppearance
|
|
21
|
+
|
|
22
|
+
export { inputPasswordAppearanceDefault }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputPasswordAppearance } from '../InputPassword.interface'
|
|
2
|
+
|
|
3
|
+
const inputPasswordAppearanceDisabled = {
|
|
4
|
+
disabledPrimary: {
|
|
5
|
+
fill: 'surfaceDisabled',
|
|
6
|
+
borderColor: 'errorBorderQuaternary',
|
|
7
|
+
textColor: 'surfaceTextQuaternary',
|
|
8
|
+
iconFill: 'surfaceItemQuaternary',
|
|
9
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
10
|
+
},
|
|
11
|
+
disabledSecondary: {
|
|
12
|
+
fill: 'surfaceSecondary',
|
|
13
|
+
borderColor: 'surfaceBorderTertiary',
|
|
14
|
+
iconFill: 'surfaceItemQuaternary',
|
|
15
|
+
placeholderTextColor: 'surfaceTextSecondary',
|
|
16
|
+
},
|
|
17
|
+
} satisfies InputPasswordAppearance
|
|
18
|
+
|
|
19
|
+
export { inputPasswordAppearanceDisabled }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputPasswordAppearance } from '../InputPassword.interface'
|
|
2
|
+
|
|
3
|
+
const inputPasswordAppearanceError = {
|
|
4
|
+
errorPrimary: {
|
|
5
|
+
fill: 'errorTertiary',
|
|
6
|
+
borderColor: 'errorBorderQuaternary',
|
|
7
|
+
textColor: 'surfaceTextPrimary',
|
|
8
|
+
iconFill: 'errorItemQuaternary',
|
|
9
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
10
|
+
},
|
|
11
|
+
errorSecondary: {
|
|
12
|
+
fill: 'errorSecondary',
|
|
13
|
+
borderColor: 'errorBorderTertiary',
|
|
14
|
+
iconFill: 'errorItemQuaternary',
|
|
15
|
+
placeholderTextColor: 'errorTextSecondary',
|
|
16
|
+
},
|
|
17
|
+
} satisfies InputPasswordAppearance
|
|
18
|
+
|
|
19
|
+
export { inputPasswordAppearanceError }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputPasswordAppearance } from '../InputPassword.interface'
|
|
2
|
+
|
|
3
|
+
const inputPasswordAppearanceRequire = {
|
|
4
|
+
requirePrimary: {
|
|
5
|
+
fill: 'warningTertiary',
|
|
6
|
+
borderColor: 'warningBorderQuaternary',
|
|
7
|
+
textColor: 'surfaceTextPrimary',
|
|
8
|
+
iconFill: 'warningItemSecondary',
|
|
9
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
10
|
+
},
|
|
11
|
+
requireSecondary: {
|
|
12
|
+
fill: 'surfaceSecondary',
|
|
13
|
+
borderColor: 'surfaceBorderTertiary',
|
|
14
|
+
iconFill: 'warningItemSecondary',
|
|
15
|
+
placeholderTextColor: 'surfaceTextSecondary',
|
|
16
|
+
},
|
|
17
|
+
} satisfies InputPasswordAppearance
|
|
18
|
+
|
|
19
|
+
export { inputPasswordAppearanceRequire }
|