@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,143 @@
|
|
|
1
|
+
import { useMemo } from 'react'
|
|
2
|
+
import { Pressable, View } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import { tokens } from '../../styles/tokens'
|
|
5
|
+
import { Text } from '../Text'
|
|
6
|
+
import { switchAppearance } from './Switch.appearance'
|
|
7
|
+
import type {
|
|
8
|
+
SwitchAppearanceProps,
|
|
9
|
+
SwitchConfig,
|
|
10
|
+
SwitchProps,
|
|
11
|
+
} from './Switch.interface'
|
|
12
|
+
import { styles } from './Switch.styles'
|
|
13
|
+
|
|
14
|
+
const DEFAULT_SWITCH_APPEARANCE = 'defaultPrimary'
|
|
15
|
+
const DEFAULT_SWITCH_APPEARANCE_STYLE = 'solid'
|
|
16
|
+
const DEFAULT_SWITCH_SIZE = 'l'
|
|
17
|
+
|
|
18
|
+
const switchConfig: SwitchConfig = {
|
|
19
|
+
appearance: {},
|
|
20
|
+
setAppearance: (newComponent) => {
|
|
21
|
+
switchConfig.appearance = newComponent
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
switchConfig.setAppearance(switchAppearance)
|
|
26
|
+
|
|
27
|
+
function Switch(props: SwitchProps) {
|
|
28
|
+
const {
|
|
29
|
+
appearance,
|
|
30
|
+
width,
|
|
31
|
+
align = 'left',
|
|
32
|
+
size,
|
|
33
|
+
fill,
|
|
34
|
+
fillToggle,
|
|
35
|
+
title,
|
|
36
|
+
titleTextColor,
|
|
37
|
+
titleTextSize,
|
|
38
|
+
desc,
|
|
39
|
+
descTextColor,
|
|
40
|
+
descTextSize,
|
|
41
|
+
borderColor,
|
|
42
|
+
appearanceStyle,
|
|
43
|
+
style,
|
|
44
|
+
isActive,
|
|
45
|
+
isDisabled,
|
|
46
|
+
onPress,
|
|
47
|
+
} = props
|
|
48
|
+
|
|
49
|
+
const appearanceConfig = useMemo(() => {
|
|
50
|
+
const appearanceTokens = (appearance || DEFAULT_SWITCH_APPEARANCE).split(
|
|
51
|
+
' ',
|
|
52
|
+
)
|
|
53
|
+
const isCompositeAppearance = appearanceTokens.length > 1
|
|
54
|
+
const sizeKey = size && `size${size.toUpperCase()}`
|
|
55
|
+
const appearanceKeys = isCompositeAppearance
|
|
56
|
+
? appearanceTokens
|
|
57
|
+
: [
|
|
58
|
+
...appearanceTokens,
|
|
59
|
+
appearanceStyle || DEFAULT_SWITCH_APPEARANCE_STYLE,
|
|
60
|
+
sizeKey,
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
return appearanceKeys.reduce<SwitchAppearanceProps>(
|
|
64
|
+
(resultConfig, appearanceKey) => {
|
|
65
|
+
return Object.assign(
|
|
66
|
+
resultConfig,
|
|
67
|
+
appearanceKey &&
|
|
68
|
+
switchConfig.appearance?.[
|
|
69
|
+
appearanceKey as keyof NonNullable<typeof switchConfig.appearance>
|
|
70
|
+
],
|
|
71
|
+
)
|
|
72
|
+
},
|
|
73
|
+
{},
|
|
74
|
+
)
|
|
75
|
+
}, [appearance, appearanceStyle, size])
|
|
76
|
+
|
|
77
|
+
const sizeKey = size || appearanceConfig.size || DEFAULT_SWITCH_SIZE
|
|
78
|
+
const trackFillKey = isDisabled
|
|
79
|
+
? 'surfaceDisabled'
|
|
80
|
+
: isActive
|
|
81
|
+
? appearanceConfig.fillActive || appearanceConfig.fill
|
|
82
|
+
: fill || appearanceConfig.fill || 'surfaceTertiary'
|
|
83
|
+
const toggleFillKey = isActive
|
|
84
|
+
? appearanceConfig.fillToggleActive ||
|
|
85
|
+
appearanceConfig.fillToggle ||
|
|
86
|
+
'surfacePrimary'
|
|
87
|
+
: fillToggle || appearanceConfig.fillToggle || 'surfacePrimary'
|
|
88
|
+
const borderColorKey = borderColor || appearanceConfig.borderColor
|
|
89
|
+
const widthKey = width
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<Pressable
|
|
93
|
+
disabled={isDisabled}
|
|
94
|
+
style={[
|
|
95
|
+
styles.switch,
|
|
96
|
+
align && styles[`switch_align_${align}`],
|
|
97
|
+
widthKey && tokens[`width_${widthKey}`],
|
|
98
|
+
style && style,
|
|
99
|
+
]}
|
|
100
|
+
onPress={onPress}
|
|
101
|
+
>
|
|
102
|
+
<View style={styles.switch__wrapper}>
|
|
103
|
+
{title && (
|
|
104
|
+
<Text
|
|
105
|
+
size={titleTextSize || appearanceConfig.titleTextSize}
|
|
106
|
+
textColor={titleTextColor || appearanceConfig.titleTextColor}
|
|
107
|
+
style={align && styles[`switch__text_align_${align}`]}
|
|
108
|
+
>
|
|
109
|
+
{title}
|
|
110
|
+
</Text>
|
|
111
|
+
)}
|
|
112
|
+
{desc && (
|
|
113
|
+
<Text
|
|
114
|
+
size={descTextSize || appearanceConfig.descTextSize}
|
|
115
|
+
textColor={descTextColor || appearanceConfig.descTextColor}
|
|
116
|
+
style={align && styles[`switch__text_align_${align}`]}
|
|
117
|
+
>
|
|
118
|
+
{desc}
|
|
119
|
+
</Text>
|
|
120
|
+
)}
|
|
121
|
+
</View>
|
|
122
|
+
<View
|
|
123
|
+
style={[
|
|
124
|
+
styles.switch__item,
|
|
125
|
+
sizeKey && styles[`switch__item_size_${sizeKey}`],
|
|
126
|
+
trackFillKey && tokens[`fill_${trackFillKey}`],
|
|
127
|
+
borderColorKey && tokens[`border_color_${borderColorKey}`],
|
|
128
|
+
isActive ? styles.switch__item_active : styles.switch__item_inactive,
|
|
129
|
+
]}
|
|
130
|
+
>
|
|
131
|
+
<View
|
|
132
|
+
style={[
|
|
133
|
+
styles.switch__toggle,
|
|
134
|
+
sizeKey && styles[`switch__toggle_size_${sizeKey}`],
|
|
135
|
+
toggleFillKey && tokens[`fill_${toggleFillKey}`],
|
|
136
|
+
]}
|
|
137
|
+
/>
|
|
138
|
+
</View>
|
|
139
|
+
</Pressable>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export { Switch, switchConfig }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SwitchAppearance } from '../Switch.interface'
|
|
2
|
+
|
|
3
|
+
const switchAppearanceDefault = {
|
|
4
|
+
defaultPrimary: {
|
|
5
|
+
fill: 'surfaceTertiary',
|
|
6
|
+
fillActive: 'surfaceTertiary',
|
|
7
|
+
fillToggle: 'surfacePrimary',
|
|
8
|
+
fillToggleActive: 'surfacePrimary',
|
|
9
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
10
|
+
descTextColor: 'surfaceTextPrimary',
|
|
11
|
+
},
|
|
12
|
+
} satisfies SwitchAppearance
|
|
13
|
+
|
|
14
|
+
export { switchAppearanceDefault }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SwitchAppearance } from '../Switch.interface'
|
|
2
|
+
|
|
3
|
+
const switchAppearanceDisabled = {
|
|
4
|
+
disabledPrimary: {
|
|
5
|
+
fill: 'surfaceDisabled',
|
|
6
|
+
fillActive: 'surfaceDisabled',
|
|
7
|
+
fillToggle: 'surfaceSecondary',
|
|
8
|
+
fillToggleActive: 'surfaceActiveSecondary',
|
|
9
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
10
|
+
descTextColor: 'surfaceTextPrimary',
|
|
11
|
+
},
|
|
12
|
+
} satisfies SwitchAppearance
|
|
13
|
+
|
|
14
|
+
export { switchAppearanceDisabled }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SwitchAppearance } from '../Switch.interface'
|
|
2
|
+
|
|
3
|
+
const switchAppearanceError = {
|
|
4
|
+
errorPrimary: {
|
|
5
|
+
fill: 'surfaceTertiary',
|
|
6
|
+
fillActive: 'errorSecondary',
|
|
7
|
+
fillToggle: 'surfacePrimary',
|
|
8
|
+
fillToggleActive: 'surfacePrimary',
|
|
9
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
10
|
+
descTextColor: 'surfaceTextPrimary',
|
|
11
|
+
},
|
|
12
|
+
} satisfies SwitchAppearance
|
|
13
|
+
|
|
14
|
+
export { switchAppearanceError }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SwitchAppearance } from '../Switch.interface'
|
|
2
|
+
|
|
3
|
+
const switchAppearanceRequire = {
|
|
4
|
+
requirePrimary: {
|
|
5
|
+
fill: 'surfaceTertiary',
|
|
6
|
+
fillActive: 'warningSecondary',
|
|
7
|
+
fillToggle: 'surfacePrimary',
|
|
8
|
+
fillToggleActive: 'surfacePrimary',
|
|
9
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
10
|
+
descTextColor: 'surfaceTextPrimary',
|
|
11
|
+
},
|
|
12
|
+
} satisfies SwitchAppearance
|
|
13
|
+
|
|
14
|
+
export { switchAppearanceRequire }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SwitchAppearanceSize } from '../Switch.interface'
|
|
2
|
+
|
|
3
|
+
const switchAppearanceSize = {
|
|
4
|
+
sizeL: {
|
|
5
|
+
size: 'l',
|
|
6
|
+
titleTextSize: 'l',
|
|
7
|
+
descTextSize: 'xs',
|
|
8
|
+
},
|
|
9
|
+
sizeM: {
|
|
10
|
+
size: 'm',
|
|
11
|
+
titleTextSize: 'm',
|
|
12
|
+
descTextSize: 'xs',
|
|
13
|
+
},
|
|
14
|
+
sizeS: {
|
|
15
|
+
size: 's',
|
|
16
|
+
titleTextSize: 's',
|
|
17
|
+
descTextSize: 'xs',
|
|
18
|
+
},
|
|
19
|
+
} satisfies SwitchAppearanceSize
|
|
20
|
+
|
|
21
|
+
export { switchAppearanceSize }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SwitchAppearanceStyle } from '../Switch.interface'
|
|
2
|
+
|
|
3
|
+
const switchAppearanceStyle = {
|
|
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 SwitchAppearanceStyle
|
|
18
|
+
|
|
19
|
+
export { switchAppearanceStyle }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SwitchAppearance } from '../Switch.interface'
|
|
2
|
+
|
|
3
|
+
const switchAppearanceSuccess = {
|
|
4
|
+
successPrimary: {
|
|
5
|
+
fill: 'surfaceTertiary',
|
|
6
|
+
fillActive: 'successPrimary',
|
|
7
|
+
fillToggle: 'surfacePrimary',
|
|
8
|
+
fillToggleActive: 'surfacePrimary',
|
|
9
|
+
titleTextColor: 'surfaceTextPrimary',
|
|
10
|
+
descTextColor: 'surfaceTextPrimary',
|
|
11
|
+
},
|
|
12
|
+
} satisfies SwitchAppearance
|
|
13
|
+
|
|
14
|
+
export { switchAppearanceSuccess }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { switchAlignList } from './styles/switchAlign'
|
|
2
|
+
import type { switchAlignPropsType } from './styles/switchAlign'
|
|
3
|
+
import { switchSizeList } from './styles/switchSize'
|
|
4
|
+
import type { switchSizePropsType } from './styles/switchSize'
|
|
5
|
+
import { Switch, switchConfig } from './Switch'
|
|
6
|
+
import { switchAppearance } from './Switch.appearance'
|
|
7
|
+
import type {
|
|
8
|
+
SwitchAppearance,
|
|
9
|
+
SwitchAppearanceKey,
|
|
10
|
+
SwitchAppearanceSize,
|
|
11
|
+
SwitchAppearanceStyle,
|
|
12
|
+
SwitchConfig,
|
|
13
|
+
SwitchProps,
|
|
14
|
+
} from './Switch.interface'
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
Switch,
|
|
18
|
+
switchAlignList,
|
|
19
|
+
switchAppearance,
|
|
20
|
+
switchConfig,
|
|
21
|
+
switchSizeList,
|
|
22
|
+
}
|
|
23
|
+
export type {
|
|
24
|
+
switchAlignPropsType,
|
|
25
|
+
SwitchAppearance,
|
|
26
|
+
SwitchAppearanceKey,
|
|
27
|
+
SwitchAppearanceSize,
|
|
28
|
+
SwitchAppearanceStyle,
|
|
29
|
+
SwitchConfig,
|
|
30
|
+
SwitchProps,
|
|
31
|
+
switchSizePropsType,
|
|
32
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
import { SwitchStateful } from './SwitchStories.config'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Atoms / Switch / Default',
|
|
8
|
+
component: Switch,
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Switch',
|
|
11
|
+
desc: 'Description',
|
|
12
|
+
},
|
|
13
|
+
render: (args) => <SwitchStateful {...args} />,
|
|
14
|
+
} satisfies Meta<typeof Switch>
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof Switch>
|
|
19
|
+
|
|
20
|
+
export const Left: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
appearance: 'defaultPrimary sizeL solid rounded',
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Right: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
appearance: 'defaultPrimary sizeL solid rounded',
|
|
29
|
+
align: 'right',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const LeftChecked: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
appearance: 'defaultPrimary sizeL solid rounded',
|
|
36
|
+
isActive: true,
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const RightChecked: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
appearance: 'defaultPrimary sizeL solid rounded',
|
|
43
|
+
align: 'right',
|
|
44
|
+
isActive: true,
|
|
45
|
+
},
|
|
46
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Atoms / Switch / Disabled',
|
|
7
|
+
component: Switch,
|
|
8
|
+
args: {
|
|
9
|
+
title: 'Switch',
|
|
10
|
+
desc: 'Description',
|
|
11
|
+
isDisabled: true,
|
|
12
|
+
},
|
|
13
|
+
} satisfies Meta<typeof Switch>
|
|
14
|
+
|
|
15
|
+
export default meta
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<typeof Switch>
|
|
18
|
+
|
|
19
|
+
export const Disabled: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
appearance: 'disabledPrimary sizeL solid rounded',
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const Left: Story = {
|
|
26
|
+
args: {
|
|
27
|
+
appearance: 'disabledPrimary sizeL solid rounded',
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Right: Story = {
|
|
32
|
+
args: {
|
|
33
|
+
appearance: 'disabledPrimary sizeL solid rounded',
|
|
34
|
+
align: 'right',
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const LeftChecked: Story = {
|
|
39
|
+
args: {
|
|
40
|
+
appearance: 'disabledPrimary sizeL solid rounded',
|
|
41
|
+
isActive: true,
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const RightChecked: Story = {
|
|
46
|
+
args: {
|
|
47
|
+
appearance: 'disabledPrimary sizeL solid rounded',
|
|
48
|
+
align: 'right',
|
|
49
|
+
isActive: true,
|
|
50
|
+
},
|
|
51
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
import { SwitchStateful } from './SwitchStories.config'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Atoms / Switch / Error',
|
|
8
|
+
component: Switch,
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Switch',
|
|
11
|
+
desc: 'Description',
|
|
12
|
+
},
|
|
13
|
+
render: (args) => <SwitchStateful {...args} />,
|
|
14
|
+
} satisfies Meta<typeof Switch>
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof Switch>
|
|
19
|
+
|
|
20
|
+
export const Left: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
appearance: 'errorPrimary sizeL solid rounded',
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Right: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
appearance: 'errorPrimary sizeL solid rounded',
|
|
29
|
+
align: 'right',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const LeftChecked: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
appearance: 'errorPrimary sizeL solid rounded',
|
|
36
|
+
isActive: true,
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const RightChecked: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
appearance: 'errorPrimary sizeL solid rounded',
|
|
43
|
+
align: 'right',
|
|
44
|
+
isActive: true,
|
|
45
|
+
},
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
import { SwitchStateful } from './SwitchStories.config'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Atoms / Switch / Require',
|
|
8
|
+
component: Switch,
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Switch',
|
|
11
|
+
desc: 'Description',
|
|
12
|
+
},
|
|
13
|
+
render: (args) => <SwitchStateful {...args} />,
|
|
14
|
+
} satisfies Meta<typeof Switch>
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof Switch>
|
|
19
|
+
|
|
20
|
+
export const Left: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
appearance: 'requirePrimary sizeL solid rounded',
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Right: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
appearance: 'requirePrimary sizeL solid rounded',
|
|
29
|
+
align: 'right',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const LeftChecked: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
appearance: 'requirePrimary sizeL solid rounded',
|
|
36
|
+
isActive: true,
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const RightChecked: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
appearance: 'requirePrimary sizeL solid rounded',
|
|
43
|
+
align: 'right',
|
|
44
|
+
isActive: true,
|
|
45
|
+
},
|
|
46
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
import { SwitchStateful } from './SwitchStories.config'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Atoms / Switch / Size',
|
|
8
|
+
component: Switch,
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Switch',
|
|
11
|
+
desc: 'Description',
|
|
12
|
+
isActive: true,
|
|
13
|
+
},
|
|
14
|
+
render: (args) => <SwitchStateful {...args} />,
|
|
15
|
+
} satisfies Meta<typeof Switch>
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
|
|
19
|
+
type Story = StoryObj<typeof Switch>
|
|
20
|
+
|
|
21
|
+
export const L: Story = {
|
|
22
|
+
args: {
|
|
23
|
+
appearance: 'defaultPrimary sizeL solid rounded',
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const M: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
appearance: 'defaultPrimary sizeM solid rounded',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const S: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
appearance: 'defaultPrimary sizeS solid rounded',
|
|
36
|
+
},
|
|
37
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
import type { SwitchProps } from '../Switch.interface'
|
|
5
|
+
|
|
6
|
+
function SwitchStateful(props: SwitchProps) {
|
|
7
|
+
const [isActive, setActive] = useState(Boolean(props.isActive))
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Switch
|
|
11
|
+
{...props}
|
|
12
|
+
isActive={isActive}
|
|
13
|
+
onPress={(event) => {
|
|
14
|
+
if (props.isDisabled) {
|
|
15
|
+
return
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
setActive((prev) => !prev)
|
|
19
|
+
|
|
20
|
+
if (props.onPress) {
|
|
21
|
+
props.onPress(event)
|
|
22
|
+
}
|
|
23
|
+
}}
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { SwitchStateful }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
import { SwitchStateful } from './SwitchStories.config'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Atoms / Switch / Success',
|
|
8
|
+
component: Switch,
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Switch',
|
|
11
|
+
desc: 'Description',
|
|
12
|
+
},
|
|
13
|
+
render: (args) => <SwitchStateful {...args} />,
|
|
14
|
+
} satisfies Meta<typeof Switch>
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof Switch>
|
|
19
|
+
|
|
20
|
+
export const Left: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
appearance: 'successPrimary sizeL solid rounded',
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Right: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
appearance: 'successPrimary sizeL solid rounded',
|
|
29
|
+
align: 'right',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const LeftChecked: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
appearance: 'successPrimary sizeL solid rounded',
|
|
36
|
+
isActive: true,
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const RightChecked: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
appearance: 'successPrimary sizeL solid rounded',
|
|
43
|
+
align: 'right',
|
|
44
|
+
isActive: true,
|
|
45
|
+
},
|
|
46
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Switch } from '../Switch'
|
|
4
|
+
import { SwitchStateful } from './SwitchStories.config'
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Atoms / Switch / Title + Desc + Switch',
|
|
8
|
+
component: Switch,
|
|
9
|
+
args: {
|
|
10
|
+
title: 'Switch title',
|
|
11
|
+
desc: 'Switch description',
|
|
12
|
+
isActive: true,
|
|
13
|
+
},
|
|
14
|
+
render: (args) => <SwitchStateful {...args} />,
|
|
15
|
+
} satisfies Meta<typeof Switch>
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
|
|
19
|
+
type Story = StoryObj<typeof Switch>
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
args: {
|
|
23
|
+
appearance: 'defaultPrimary sizeL solid rounded',
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const Error: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
appearance: 'errorPrimary sizeL solid rounded',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const Success: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
appearance: 'successPrimary sizeL solid rounded',
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Require: Story = {
|
|
40
|
+
args: {
|
|
41
|
+
appearance: 'requirePrimary sizeL solid rounded',
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const Disable: Story = {
|
|
46
|
+
args: {
|
|
47
|
+
appearance: 'disabledPrimary sizeL solid rounded',
|
|
48
|
+
isDisabled: true,
|
|
49
|
+
},
|
|
50
|
+
}
|