@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
package/src/module.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
3
|
+
declare module '*.svg' {
|
|
4
|
+
import type { SvgProps } from 'react-native-svg'
|
|
5
|
+
|
|
6
|
+
const content: React.FunctionComponent<SvgProps>
|
|
7
|
+
// SVG transformer exposes a default export
|
|
8
|
+
// eslint-disable-next-line import/no-default-export -- module ambient default
|
|
9
|
+
export default content
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.png' {
|
|
13
|
+
import type { ImageSourcePropType } from 'react-native'
|
|
14
|
+
|
|
15
|
+
const content: ImageSourcePropType
|
|
16
|
+
// Image assets expose a default export
|
|
17
|
+
// eslint-disable-next-line import/no-default-export -- module ambient default
|
|
18
|
+
export default content
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { BorderColorProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
import { colorTheme, getColorTokenKeyList } from '../../utils'
|
|
6
|
+
|
|
7
|
+
const NONE_BORDER_COLOR_KEY = 'none' satisfies BorderColorProps
|
|
8
|
+
|
|
9
|
+
function getBorderColorValue(tokenKey: string) {
|
|
10
|
+
if (tokenKey === NONE_BORDER_COLOR_KEY) {
|
|
11
|
+
return 'transparent'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return colorTheme[tokenKey]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const borderColorList = [
|
|
18
|
+
...getColorTokenKeyList('Border'),
|
|
19
|
+
NONE_BORDER_COLOR_KEY,
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
const borderColor = StyleSheet.create({
|
|
23
|
+
...Object.fromEntries(
|
|
24
|
+
borderColorList.map((tokenKey) => [
|
|
25
|
+
`border_color_${tokenKey}`,
|
|
26
|
+
{
|
|
27
|
+
borderColor: getBorderColorValue(tokenKey),
|
|
28
|
+
borderStyle: 'solid' as const,
|
|
29
|
+
borderWidth: 1,
|
|
30
|
+
},
|
|
31
|
+
]),
|
|
32
|
+
),
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export { borderColor, borderColorList }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { DirectionHVProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
const directionList = [
|
|
6
|
+
'horizontal',
|
|
7
|
+
'vertical',
|
|
8
|
+
] as const satisfies readonly DirectionHVProps[]
|
|
9
|
+
|
|
10
|
+
const directionByVariant = {
|
|
11
|
+
horizontal: {
|
|
12
|
+
width: '100%',
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
justifyContent: 'space-between',
|
|
15
|
+
},
|
|
16
|
+
vertical: {
|
|
17
|
+
flexDirection: 'column',
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const direction = StyleSheet.create({
|
|
22
|
+
...Object.fromEntries(
|
|
23
|
+
directionList.map((value) => [
|
|
24
|
+
`direction_${value}`,
|
|
25
|
+
directionByVariant[value],
|
|
26
|
+
]),
|
|
27
|
+
),
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export { direction, directionList }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { FillProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
import { colorTheme, getColorTokenKeyList, stripTokenInfix } from '../../utils'
|
|
6
|
+
|
|
7
|
+
const NONE_FILL_KEY = 'none' satisfies FillProps
|
|
8
|
+
|
|
9
|
+
const FILL_TIER_SUFFIXES = [
|
|
10
|
+
'Disabled',
|
|
11
|
+
'Primary',
|
|
12
|
+
'Quaternary',
|
|
13
|
+
'Secondary',
|
|
14
|
+
'Tertiary',
|
|
15
|
+
] as const
|
|
16
|
+
|
|
17
|
+
function getFillStyleKey(strippedTokenKey: string) {
|
|
18
|
+
if (strippedTokenKey === NONE_FILL_KEY) {
|
|
19
|
+
return strippedTokenKey
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const hasTierSuffix = FILL_TIER_SUFFIXES.some((suffix) => {
|
|
23
|
+
return strippedTokenKey.endsWith(suffix)
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
if (hasTierSuffix) {
|
|
27
|
+
return strippedTokenKey
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return `${strippedTokenKey}Primary`
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function getFillBackgroundColor(tokenKey: string) {
|
|
34
|
+
if (tokenKey === NONE_FILL_KEY) {
|
|
35
|
+
return 'transparent'
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return colorTheme[tokenKey]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const fillList = [...getColorTokenKeyList('Fill'), NONE_FILL_KEY]
|
|
42
|
+
|
|
43
|
+
const fill = StyleSheet.create({
|
|
44
|
+
...Object.fromEntries(
|
|
45
|
+
fillList.map((tokenKey) => {
|
|
46
|
+
const styleKey = getFillStyleKey(stripTokenInfix(tokenKey, 'Fill'))
|
|
47
|
+
|
|
48
|
+
return [
|
|
49
|
+
`fill_${styleKey}`,
|
|
50
|
+
{
|
|
51
|
+
backgroundColor: getFillBackgroundColor(tokenKey),
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
),
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
export { fill, fillList }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
const gapList = [4, 6, 8, 10, 12, 16, 20, 24, 40] as const
|
|
4
|
+
|
|
5
|
+
const gap = StyleSheet.create({
|
|
6
|
+
...Object.fromEntries(
|
|
7
|
+
gapList.map((value) => [
|
|
8
|
+
`gap_${value}`,
|
|
9
|
+
{
|
|
10
|
+
gap: value,
|
|
11
|
+
},
|
|
12
|
+
]),
|
|
13
|
+
),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
type GapProps = (typeof gapList)[number]
|
|
17
|
+
|
|
18
|
+
export { gap, gapList }
|
|
19
|
+
export type { GapProps }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { ItemFillProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
import { colorTheme, getColorTokenKeyList } from '../../utils'
|
|
6
|
+
|
|
7
|
+
const NONE_ITEM_FILL_KEY = 'none' satisfies ItemFillProps
|
|
8
|
+
|
|
9
|
+
const ITEM_FILL_TIER_SUFFIXES = [
|
|
10
|
+
'Disabled',
|
|
11
|
+
'Primary',
|
|
12
|
+
'Quaternary',
|
|
13
|
+
'Secondary',
|
|
14
|
+
'Tertiary',
|
|
15
|
+
] as const
|
|
16
|
+
|
|
17
|
+
function getIconFillStyleKey(tokenKey: string) {
|
|
18
|
+
if (tokenKey === NONE_ITEM_FILL_KEY) {
|
|
19
|
+
return tokenKey
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const hasTierSuffix = ITEM_FILL_TIER_SUFFIXES.some((suffix) => {
|
|
23
|
+
return tokenKey.endsWith(suffix)
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
if (hasTierSuffix) {
|
|
27
|
+
return tokenKey
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return `${tokenKey}Primary`
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const iconFillList = getColorTokenKeyList('Item')
|
|
34
|
+
|
|
35
|
+
const iconFill = StyleSheet.create({
|
|
36
|
+
...Object.fromEntries(
|
|
37
|
+
iconFillList.map((tokenKey) => [
|
|
38
|
+
`icon_fill_${getIconFillStyleKey(tokenKey)}`,
|
|
39
|
+
{
|
|
40
|
+
color: colorTheme[tokenKey],
|
|
41
|
+
},
|
|
42
|
+
]),
|
|
43
|
+
),
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
export { iconFill, iconFillList }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { ShapeProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
const shapeList = [
|
|
6
|
+
'circular',
|
|
7
|
+
'geometric',
|
|
8
|
+
'rounded',
|
|
9
|
+
] as const satisfies readonly ShapeProps[]
|
|
10
|
+
|
|
11
|
+
const shapeByVariant = {
|
|
12
|
+
circular: {
|
|
13
|
+
borderRadius: 100,
|
|
14
|
+
},
|
|
15
|
+
rounded: {
|
|
16
|
+
borderRadius: 8,
|
|
17
|
+
},
|
|
18
|
+
geometric: {
|
|
19
|
+
borderRadius: 0,
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const shape = StyleSheet.create({
|
|
24
|
+
...Object.fromEntries(
|
|
25
|
+
shapeList.map((value) => [`shape_${value}`, shapeByVariant[value]]),
|
|
26
|
+
),
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
export { shape, shapeList }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { TextAlignProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
const textAlignList = [
|
|
6
|
+
'left',
|
|
7
|
+
'center',
|
|
8
|
+
'right',
|
|
9
|
+
] as const satisfies readonly TextAlignProps[]
|
|
10
|
+
|
|
11
|
+
const textAlign = StyleSheet.create({
|
|
12
|
+
...Object.fromEntries(
|
|
13
|
+
textAlignList.map((value) => [
|
|
14
|
+
`text_align_${value}`,
|
|
15
|
+
{
|
|
16
|
+
textAlign: value,
|
|
17
|
+
},
|
|
18
|
+
]),
|
|
19
|
+
),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export { textAlign, textAlignList }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import { colorTheme, getColorTokenKeyList } from '../../utils'
|
|
4
|
+
|
|
5
|
+
const textColorList = getColorTokenKeyList('Text')
|
|
6
|
+
|
|
7
|
+
const textColor = StyleSheet.create({
|
|
8
|
+
...Object.fromEntries(
|
|
9
|
+
textColorList.map((tokenKey) => [
|
|
10
|
+
`text_color_${tokenKey}`,
|
|
11
|
+
{
|
|
12
|
+
color: colorTheme[tokenKey],
|
|
13
|
+
},
|
|
14
|
+
]),
|
|
15
|
+
),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export { textColor, textColorList }
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { TextSizeProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
const textSizeList = [
|
|
6
|
+
'xxs',
|
|
7
|
+
'xs',
|
|
8
|
+
's',
|
|
9
|
+
'm',
|
|
10
|
+
'l',
|
|
11
|
+
'xl',
|
|
12
|
+
'xxl',
|
|
13
|
+
] as const satisfies readonly TextSizeProps[]
|
|
14
|
+
|
|
15
|
+
const textSizeByVariant = {
|
|
16
|
+
xxl: {
|
|
17
|
+
fontSize: 24,
|
|
18
|
+
lineHeight: 28,
|
|
19
|
+
},
|
|
20
|
+
xl: {
|
|
21
|
+
fontSize: 20,
|
|
22
|
+
lineHeight: 24,
|
|
23
|
+
},
|
|
24
|
+
l: {
|
|
25
|
+
fontSize: 18,
|
|
26
|
+
lineHeight: 22,
|
|
27
|
+
},
|
|
28
|
+
m: {
|
|
29
|
+
fontSize: 16,
|
|
30
|
+
lineHeight: 20,
|
|
31
|
+
},
|
|
32
|
+
s: {
|
|
33
|
+
fontSize: 14,
|
|
34
|
+
lineHeight: 18,
|
|
35
|
+
},
|
|
36
|
+
xs: {
|
|
37
|
+
fontSize: 12,
|
|
38
|
+
lineHeight: 16,
|
|
39
|
+
},
|
|
40
|
+
xxs: {
|
|
41
|
+
fontSize: 10,
|
|
42
|
+
lineHeight: 14,
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const textSize = StyleSheet.create({
|
|
47
|
+
...Object.fromEntries(
|
|
48
|
+
textSizeList.map((value) => [
|
|
49
|
+
`text_size_${value}`,
|
|
50
|
+
textSizeByVariant[value],
|
|
51
|
+
]),
|
|
52
|
+
),
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
export { textSize, textSizeList }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { TextWeightProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
const textWeightList = [
|
|
6
|
+
'100',
|
|
7
|
+
'200',
|
|
8
|
+
'300',
|
|
9
|
+
'400',
|
|
10
|
+
'500',
|
|
11
|
+
'600',
|
|
12
|
+
'700',
|
|
13
|
+
'800',
|
|
14
|
+
'900',
|
|
15
|
+
] as const satisfies readonly TextWeightProps[]
|
|
16
|
+
|
|
17
|
+
const textWeight = StyleSheet.create({
|
|
18
|
+
...Object.fromEntries(
|
|
19
|
+
textWeightList.map((value) => [
|
|
20
|
+
`text_weight_${value}`,
|
|
21
|
+
{
|
|
22
|
+
fontWeight: value,
|
|
23
|
+
},
|
|
24
|
+
]),
|
|
25
|
+
),
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
export { textWeight, textWeightList }
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { TitleSizeProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
const titleSizeList = [
|
|
6
|
+
'h1',
|
|
7
|
+
'h2',
|
|
8
|
+
'h3',
|
|
9
|
+
'h4',
|
|
10
|
+
'h5',
|
|
11
|
+
'h6',
|
|
12
|
+
] as const satisfies readonly TitleSizeProps[]
|
|
13
|
+
|
|
14
|
+
const titleSizeByVariant = {
|
|
15
|
+
h1: {
|
|
16
|
+
fontSize: 64,
|
|
17
|
+
lineHeight: 80,
|
|
18
|
+
},
|
|
19
|
+
h2: {
|
|
20
|
+
fontSize: 48,
|
|
21
|
+
lineHeight: 56,
|
|
22
|
+
},
|
|
23
|
+
h3: {
|
|
24
|
+
fontSize: 32,
|
|
25
|
+
lineHeight: 40,
|
|
26
|
+
},
|
|
27
|
+
h4: {
|
|
28
|
+
fontSize: 24,
|
|
29
|
+
lineHeight: 30,
|
|
30
|
+
},
|
|
31
|
+
h5: {
|
|
32
|
+
fontSize: 18,
|
|
33
|
+
lineHeight: 24,
|
|
34
|
+
},
|
|
35
|
+
h6: {
|
|
36
|
+
fontSize: 16,
|
|
37
|
+
lineHeight: 20,
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const titleSize = StyleSheet.create({
|
|
42
|
+
...Object.fromEntries(
|
|
43
|
+
titleSizeList.map((value) => [
|
|
44
|
+
`title_size_${value}`,
|
|
45
|
+
titleSizeByVariant[value],
|
|
46
|
+
]),
|
|
47
|
+
),
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
export { titleSize, titleSizeList }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ImageStyle, TextStyle, ViewStyle } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import { borderColor } from './borderColor'
|
|
4
|
+
import { direction } from './direction'
|
|
5
|
+
import { fill } from './fill'
|
|
6
|
+
import { gap } from './gap'
|
|
7
|
+
import { iconFill } from './iconFill'
|
|
8
|
+
import { shape } from './shape'
|
|
9
|
+
import { textAlign } from './textAlign'
|
|
10
|
+
import { textColor } from './textColor'
|
|
11
|
+
import { textSize } from './textSize'
|
|
12
|
+
import { textWeight } from './textWeight'
|
|
13
|
+
import { titleSize } from './titleSize'
|
|
14
|
+
import { width } from './width'
|
|
15
|
+
|
|
16
|
+
const tokens: Record<string, ImageStyle | TextStyle | ViewStyle> = {
|
|
17
|
+
...borderColor,
|
|
18
|
+
...direction,
|
|
19
|
+
...fill,
|
|
20
|
+
...gap,
|
|
21
|
+
...iconFill,
|
|
22
|
+
...shape,
|
|
23
|
+
...textAlign,
|
|
24
|
+
...textColor,
|
|
25
|
+
...textSize,
|
|
26
|
+
...textWeight,
|
|
27
|
+
...titleSize,
|
|
28
|
+
...width,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { tokens }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import type { WidthProps } from '@itcase/types-ui'
|
|
4
|
+
|
|
5
|
+
const widthList = [
|
|
6
|
+
'auto',
|
|
7
|
+
'fill',
|
|
8
|
+
'hug',
|
|
9
|
+
] as const satisfies readonly WidthProps[]
|
|
10
|
+
|
|
11
|
+
const widthByVariant = {
|
|
12
|
+
fill: {
|
|
13
|
+
width: '100%',
|
|
14
|
+
},
|
|
15
|
+
auto: {
|
|
16
|
+
width: 'auto',
|
|
17
|
+
},
|
|
18
|
+
hug: {
|
|
19
|
+
alignSelf: 'flex-start',
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const width = StyleSheet.create({
|
|
24
|
+
...Object.fromEntries(
|
|
25
|
+
widthList.map((value) => [`width_${value}`, widthByVariant[value]]),
|
|
26
|
+
),
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
export { width, widthList }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Color } from '@itcase/tokens-am/dist/js/colors.js'
|
|
2
|
+
|
|
3
|
+
import type { ColorTokenInfix } from './colorTokens.interface'
|
|
4
|
+
|
|
5
|
+
const colorTheme: Record<string, string> = Color.Light
|
|
6
|
+
|
|
7
|
+
function getColorTokenKeyList(infix: ColorTokenInfix) {
|
|
8
|
+
return Object.keys(colorTheme).filter((tokenKey) => {
|
|
9
|
+
return tokenKey.includes(infix)
|
|
10
|
+
})
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function stripTokenInfix(tokenKey: string, infix: ColorTokenInfix) {
|
|
14
|
+
return tokenKey.replace(infix, '')
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { colorTheme, getColorTokenKeyList, stripTokenInfix }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// type ExtractLastSuffixProps<T, Prefix extends string> =
|
|
2
|
+
// Extract<keyof T, `${Prefix}${string}`> extends `${Prefix}${infer S}` ? S : never
|
|
3
|
+
|
|
4
|
+
type ExtractLastSuffixProps<T, Prefix extends string> = keyof T extends infer K
|
|
5
|
+
? K extends `${Prefix}${infer Suffix}`
|
|
6
|
+
? Suffix
|
|
7
|
+
: never
|
|
8
|
+
: never
|
|
9
|
+
|
|
10
|
+
export type { ExtractLastSuffixProps }
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ExtractLastSuffixProps } from './getVariantsPropsList.interface'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves key suffixes from the styles object that begin with the given prefix.
|
|
5
|
+
*
|
|
6
|
+
* Извлекает суффиксы ключей из объекта стилей, которые начинаются с заданного префикса.
|
|
7
|
+
*
|
|
8
|
+
* @template T - Style object type / Тип объекта стилей.
|
|
9
|
+
* @template Prefix - Prefix type / Тип префикса.
|
|
10
|
+
*
|
|
11
|
+
* @param {T} styles - Object containing styles / Объект, содержащий стили.
|
|
12
|
+
* @param {Prefix} prefix - Prefix with which keys must begin / Префикс, с которого должны начинаться ключи.
|
|
13
|
+
*
|
|
14
|
+
* @returns {ExtractLastSuffixProps<T, Prefix>[]} - An array of key suffixes starting with the given prefix / Массив суффиксов ключей, начинающихся с заданного префикса.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* const badgeStyles = StyleSheet.create({
|
|
19
|
+
* badge_shape_circular: {
|
|
20
|
+
* borderRadius: 50,
|
|
21
|
+
* },
|
|
22
|
+
* badge_shape_square: {
|
|
23
|
+
* borderRadius: 25,
|
|
24
|
+
* },
|
|
25
|
+
* badge_size_s: {
|
|
26
|
+
* paddingVertical: 2,
|
|
27
|
+
* paddingHorizontal: 6,
|
|
28
|
+
* },
|
|
29
|
+
* badge_size_m: {
|
|
30
|
+
* paddingVertical: 4,
|
|
31
|
+
* paddingHorizontal: 12,
|
|
32
|
+
* }
|
|
33
|
+
* })
|
|
34
|
+
*
|
|
35
|
+
* const badgeShapeList = getVariantsPropsList(badgeStyles, 'badge_shape_')
|
|
36
|
+
* return ["circular", "square"]
|
|
37
|
+
*/
|
|
38
|
+
function getVariantsPropsList<T extends object, Prefix extends string>(
|
|
39
|
+
styles: T,
|
|
40
|
+
prefix: Prefix,
|
|
41
|
+
): ExtractLastSuffixProps<T, Prefix>[] {
|
|
42
|
+
return Object.keys(styles)
|
|
43
|
+
.filter((key) => {
|
|
44
|
+
return key.startsWith(prefix)
|
|
45
|
+
})
|
|
46
|
+
.map((key) => {
|
|
47
|
+
return key.slice(prefix.length) as ExtractLastSuffixProps<T, Prefix>
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { getVariantsPropsList }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorTheme,
|
|
3
|
+
getColorTokenKeyList,
|
|
4
|
+
stripTokenInfix,
|
|
5
|
+
} from './colorTokens'
|
|
6
|
+
import { getVariantsPropsList } from './getVariantsPropsList'
|
|
7
|
+
import type { ExtractLastSuffixProps } from './getVariantsPropsList'
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
colorTheme,
|
|
11
|
+
getColorTokenKeyList,
|
|
12
|
+
getVariantsPropsList,
|
|
13
|
+
stripTokenInfix,
|
|
14
|
+
}
|
|
15
|
+
export type { ExtractLastSuffixProps }
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@react-native/typescript-config",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"maxNodeModuleJsDepth": 1
|
|
5
|
+
},
|
|
6
|
+
"include": [
|
|
7
|
+
"src/**/*.ts",
|
|
8
|
+
"src/**/*.tsx",
|
|
9
|
+
"src/**/*.d.ts",
|
|
10
|
+
".storybook-react-native-web/**/*.ts",
|
|
11
|
+
".storybook-react-native-web/**/*.tsx"
|
|
12
|
+
],
|
|
13
|
+
"exclude": ["**/node_modules", "**/Pods", "demoApp"]
|
|
14
|
+
}
|