@itcase/ui-react-native 1.10.85 → 1.10.86
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-web/main.ts +25 -3
- package/.storybook-react-native-web/preview.tsx +8 -0
- package/package.json +10 -4
- package/src/components/Avatar/Avatar.interface.ts +31 -1
- package/src/components/Avatar/Avatar.tsx +63 -86
- package/src/components/Avatar/appearance/avatarSize.ts +20 -20
- package/src/components/Avatar/appearance/avatarSurface.ts +8 -4
- package/src/components/Avatar/stories/AvatarCount.stories.tsx +13 -3
- package/src/components/Avatar/stories/AvatarDemo.stories.tsx +76 -0
- package/src/components/Avatar/stories/AvatarGallery.stories.tsx +200 -0
- package/src/components/Avatar/stories/AvatarImage.stories.tsx +15 -6
- package/src/components/Avatar/stories/AvatarInteraction.stories.tsx +5 -1
- package/src/components/Avatar/stories/AvatarLetters.stories.tsx +13 -3
- package/src/components/Avatar/stories/AvatarShape.stories.tsx +20 -2
- package/src/components/Avatar/stories/AvatarSize.stories.tsx +32 -2
- package/src/components/Avatar/stories/AvatarSkeleton.stories.tsx +68 -0
- package/src/components/Avatar/stories/AvatarStories.config.ts +107 -1
- package/src/components/Avatar/stories/AvatarStyle.stories.tsx +14 -2
- package/src/components/Avatar/styles/avatar.ts +3 -0
- package/src/components/AvatarStack/AvatarStack.interface.ts +37 -5
- package/src/components/AvatarStack/AvatarStack.styles.ts +3 -1
- package/src/components/AvatarStack/AvatarStack.tsx +31 -28
- package/src/components/AvatarStack/index.ts +13 -2
- package/src/components/AvatarStack/stories/AvatarStackDemo.stories.tsx +89 -0
- package/src/components/AvatarStack/stories/AvatarStackDirection.stories.tsx +35 -0
- package/src/components/AvatarStack/stories/AvatarStackGallery.stories.tsx +126 -0
- package/src/components/AvatarStack/stories/AvatarStackLength.stories.tsx +55 -0
- package/src/components/AvatarStack/stories/AvatarStackSize.stories.tsx +50 -0
- package/src/components/AvatarStack/stories/AvatarStackStories.config.ts +74 -0
- package/src/components/AvatarStack/stories/__mock__/index.ts +29 -0
- package/src/components/AvatarStack/styles/avatarStack.ts +4 -2
- package/src/components/AvatarStack/styles/avatarStackSize.ts +32 -73
- package/src/components/Badge/Badge.appearance.ts +17 -1
- package/src/components/Badge/Badge.interface.ts +45 -1
- package/src/components/Badge/Badge.tsx +65 -49
- package/src/components/Badge/appearance/badgeAccent.ts +12 -0
- package/src/components/Badge/appearance/badgeDanger.ts +4 -0
- package/src/components/Badge/appearance/badgeDisabled.ts +13 -0
- package/src/components/Badge/appearance/badgeExtra.ts +5 -1
- package/src/components/Badge/appearance/badgeInfo.ts +14 -0
- package/src/components/Badge/appearance/badgeSize.ts +41 -0
- package/src/components/Badge/appearance/badgeSpecial.ts +14 -0
- package/src/components/Badge/appearance/badgeStyle.ts +17 -0
- package/src/components/Badge/appearance/badgeSuccess.ts +14 -0
- package/src/components/Badge/appearance/badgeSurface.ts +30 -0
- package/src/components/Badge/appearance/badgeWarning.ts +14 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/Badge/stories/BadgeCounter.stories.tsx +39 -0
- package/src/components/Badge/stories/BadgeDemo.stories.tsx +93 -0
- package/src/components/Badge/stories/BadgeDot.stories.tsx +39 -0
- package/src/components/Badge/stories/BadgeDotIconCounter.stories.tsx +48 -0
- package/src/components/Badge/stories/BadgeFill.stories.tsx +37 -0
- package/src/components/Badge/stories/BadgeGallery.stories.tsx +109 -0
- package/src/components/Badge/stories/BadgeIcon.stories.tsx +45 -0
- package/src/components/Badge/stories/BadgeIconCounter.stories.tsx +46 -0
- package/src/components/Badge/stories/BadgeShape.stories.tsx +38 -15
- package/src/components/Badge/stories/BadgeSize.stories.tsx +58 -11
- package/src/components/Badge/stories/BadgeStories.config.ts +125 -0
- package/src/components/Badge/stories/BadgeStyle.stories.tsx +57 -0
- package/src/components/Badge/styles/badge.ts +3 -0
- package/src/components/Badge/styles/badgeShape.ts +1 -0
- package/src/components/Badge/styles/badgeSize.ts +73 -0
- package/src/components/Badge/styles/badgeType.ts +12 -2
- package/src/components/Breadcrumbs/Breadcrumbs.interface.ts +2 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +15 -23
- package/src/components/Breadcrumbs/stories/BreadcrumbsAppearance.stories.tsx +68 -0
- package/src/components/Breadcrumbs/stories/BreadcrumbsDefault.stories.tsx +32 -0
- package/src/components/Breadcrumbs/stories/BreadcrumbsShape.stories.tsx +77 -0
- package/src/components/Breadcrumbs/stories/BreadcrumbsSize.stories.tsx +86 -0
- package/src/components/Breadcrumbs/stories/BreadcrumbsStyle.stories.tsx +59 -0
- package/src/components/Breadcrumbs/stories/__mock__/index.ts +19 -0
- package/src/components/Button/Button.appearance.ts +14 -0
- package/src/components/Button/Button.interface.ts +44 -3
- package/src/components/Button/Button.styles.ts +2 -0
- package/src/components/Button/Button.tsx +64 -68
- package/src/components/Button/appearance/buttonAccent.ts +9 -0
- package/src/components/Button/appearance/buttonDanger.ts +8 -0
- package/src/components/Button/appearance/buttonError.ts +22 -0
- package/src/components/Button/appearance/buttonExtra.ts +8 -0
- package/src/components/Button/appearance/buttonInfo.ts +30 -0
- package/src/components/Button/appearance/buttonShape.ts +27 -0
- package/src/components/Button/appearance/buttonSize.ts +34 -0
- package/src/components/Button/appearance/buttonSpecial.ts +22 -0
- package/src/components/Button/appearance/buttonSuccess.ts +22 -0
- package/src/components/Button/appearance/buttonWarning.ts +22 -0
- package/src/components/Button/stories/ButtonDefault.stories.tsx +36 -58
- package/src/components/Button/stories/ButtonDemo.stories.tsx +77 -0
- package/src/components/Button/stories/ButtonDisabled.stories.tsx +5 -4
- package/src/components/Button/stories/ButtonGallery.stories.tsx +111 -0
- package/src/components/Button/stories/ButtonIcon.stories.tsx +49 -0
- package/src/components/Button/stories/ButtonLabel.stories.tsx +50 -0
- package/src/components/Button/stories/ButtonLoading.stories.tsx +41 -0
- package/src/components/Button/stories/ButtonShape.stories.tsx +71 -0
- package/src/components/Button/stories/ButtonSize.stories.tsx +29 -12
- package/src/components/Button/stories/ButtonStories.config.ts +129 -16
- package/src/components/Button/stories/ButtonStyle.stories.tsx +9 -10
- package/src/components/Button/styles/button.ts +1 -4
- package/src/components/Button/styles/buttonShape.ts +35 -0
- package/src/components/Cell/stories/CellDirection.stories.tsx +38 -0
- package/src/components/Cell/stories/CellSizeHorizontal.stories.tsx +38 -0
- package/src/components/Cell/stories/CellSizeVertical.stories.tsx +38 -0
- package/src/components/Cell/stories/CellStories.config.ts +12 -0
- package/src/components/Cell/stories/__mock__/index.ts +6 -0
- package/src/components/Checkbox/Checkbox.helpers.ts +63 -0
- package/src/components/Checkbox/Checkbox.interface.ts +22 -3
- package/src/components/Checkbox/Checkbox.tsx +88 -110
- package/src/components/Checkbox/appearance/checkboxDefault.ts +4 -0
- package/src/components/Checkbox/stories/Checkbox.stories.tsx +52 -5
- package/src/components/Checkbox/stories/CheckboxDisabled.stories.tsx +1 -1
- package/src/components/Checkbox/stories/CheckboxError.stories.tsx +1 -1
- package/src/components/Checkbox/stories/CheckboxGallery.stories.tsx +138 -0
- package/src/components/Checkbox/stories/CheckboxLabel.stories.tsx +1 -1
- package/src/components/Checkbox/stories/CheckboxLabelDesc.stories.tsx +1 -1
- package/src/components/Checkbox/stories/CheckboxShape.stories.tsx +1 -1
- package/src/components/Checkbox/stories/CheckboxSize.stories.tsx +1 -1
- package/src/components/Checkbox/stories/CheckboxStories.config.tsx +55 -2
- package/src/components/Checkbox/styles/checkbox.ts +20 -5
- package/src/components/Checkbox/styles/checkboxSize.ts +16 -0
- package/src/components/Checkmark/Checkmark.appearance.ts +20 -0
- package/src/components/Checkmark/Checkmark.constants.ts +8 -0
- package/src/components/Checkmark/Checkmark.helpers.ts +47 -0
- package/src/components/Checkmark/Checkmark.interface.ts +102 -5
- package/src/components/Checkmark/Checkmark.styles.ts +2 -0
- package/src/components/Checkmark/Checkmark.tsx +104 -23
- package/src/components/Checkmark/appearance/checkmarkAccent.ts +13 -0
- package/src/components/Checkmark/appearance/checkmarkDisabled.ts +13 -0
- package/src/components/Checkmark/appearance/checkmarkError.ts +13 -0
- package/src/components/Checkmark/appearance/checkmarkShape.ts +9 -0
- package/src/components/Checkmark/appearance/checkmarkSize.ts +56 -0
- package/src/components/Checkmark/appearance/checkmarkStyle.ts +17 -0
- package/src/components/Checkmark/appearance/checkmarkSurface.ts +24 -0
- package/src/components/Checkmark/index.ts +26 -4
- package/src/components/Checkmark/stories/CheckmarkChecked.stories.tsx +39 -0
- package/src/components/Checkmark/stories/CheckmarkDefault.stories.tsx +39 -0
- package/src/components/Checkmark/stories/CheckmarkDemo.stories.tsx +85 -0
- package/src/components/Checkmark/stories/CheckmarkGallery.stories.tsx +138 -0
- package/src/components/Checkmark/stories/CheckmarkNegative.stories.tsx +44 -0
- package/src/components/Checkmark/stories/CheckmarkSize.stories.tsx +85 -0
- package/src/components/Checkmark/stories/CheckmarkStories.config.ts +67 -0
- package/src/components/Checkmark/stories/CheckmarkStoryItem.tsx +34 -0
- package/src/components/Checkmark/stories/CheckmarkStyle.stories.tsx +64 -0
- package/src/components/Checkmark/styles/checkmark.ts +7 -2
- package/src/components/Checkmark/styles/checkmarkSize.ts +58 -0
- package/src/components/Chips/Chips.interface.ts +25 -0
- package/src/components/Chips/Chips.tsx +67 -85
- package/src/components/Chips/appearance/chipsAccent.ts +6 -0
- package/src/components/Chips/appearance/chipsDanger.ts +4 -0
- package/src/components/Chips/appearance/chipsDisabled.ts +2 -0
- package/src/components/Chips/appearance/chipsError.ts +4 -0
- package/src/components/Chips/appearance/chipsExtra.ts +4 -0
- package/src/components/Chips/appearance/chipsInfo.ts +4 -0
- package/src/components/Chips/appearance/chipsSpecial.ts +4 -0
- package/src/components/Chips/appearance/chipsSuccess.ts +4 -0
- package/src/components/Chips/appearance/chipsSurface.ts +18 -0
- package/src/components/Chips/appearance/chipsWarning.ts +4 -0
- package/src/components/Chips/stories/ChipsCheckLeft.stories.tsx +28 -22
- package/src/components/Chips/stories/ChipsCheckRight.stories.tsx +28 -22
- package/src/components/Chips/stories/ChipsClear.stories.tsx +28 -22
- package/src/components/Chips/stories/ChipsDefault.stories.tsx +37 -61
- package/src/components/Chips/stories/ChipsDemo.stories.tsx +78 -0
- package/src/components/Chips/stories/ChipsGallery.stories.tsx +113 -0
- package/src/components/Chips/stories/ChipsShape.stories.tsx +22 -2
- package/src/components/Chips/stories/ChipsSize.stories.tsx +26 -2
- package/src/components/Chips/stories/ChipsStories.config.ts +120 -0
- package/src/components/Chips/stories/ChipsStyle.stories.tsx +17 -2
- package/src/components/Choice/Choice.helpers.ts +35 -0
- package/src/components/Choice/Choice.interface.ts +22 -2
- package/src/components/Choice/Choice.tsx +104 -116
- package/src/components/Choice/appearance/choiceDefault.ts +12 -0
- package/src/components/Choice/appearance/choiceDisabled.ts +6 -0
- package/src/components/Choice/appearance/choiceError.ts +6 -0
- package/src/components/Choice/appearance/choiceRequire.ts +6 -0
- package/src/components/Choice/appearance/choiceSuccess.ts +6 -0
- package/src/components/Choice/stories/ChoiceDemo.stories.tsx +82 -0
- package/src/components/Choice/stories/ChoiceGallery.stories.tsx +90 -0
- package/src/components/Choice/stories/ChoiceIcon.stories.tsx +39 -36
- package/src/components/Choice/stories/ChoiceLabel.stories.tsx +45 -36
- package/src/components/Choice/stories/ChoiceLabelIcon.stories.tsx +39 -36
- package/src/components/Choice/stories/ChoiceSize.stories.tsx +17 -10
- package/src/components/Choice/stories/ChoiceStories.config.tsx +92 -43
- package/src/components/Choice/stories/ChoiceStyle.stories.tsx +21 -10
- package/src/components/Choice/stories/__mock__/index.ts +49 -0
- package/src/components/Choice/styles/choice.ts +8 -6
- package/src/components/Code/Code.appearance.ts +2 -0
- package/src/components/Code/Code.helpers.ts +213 -0
- package/src/components/Code/Code.interface.ts +73 -10
- package/src/components/Code/Code.styles.ts +8 -4
- package/src/components/Code/Code.tsx +110 -43
- package/src/components/Code/appearance/codeDefault.ts +5 -3
- package/src/components/Code/appearance/codeDisabled.ts +5 -3
- package/src/components/Code/appearance/codeError.ts +5 -3
- package/src/components/Code/appearance/codeRequire.ts +13 -0
- package/src/components/Code/appearance/codeShape.ts +14 -2
- package/src/components/Code/appearance/codeSize.ts +8 -5
- package/src/components/Code/appearance/codeStyle.ts +9 -6
- package/src/components/Code/appearance/codeSuccess.ts +5 -3
- package/src/components/Code/stories/CodeDefault.stories.tsx +58 -0
- package/src/components/Code/stories/CodeDemo.stories.tsx +80 -0
- package/src/components/Code/stories/CodeDisabled.stories.tsx +53 -0
- package/src/components/Code/stories/CodeError.stories.tsx +52 -0
- package/src/components/Code/stories/CodeGallery.stories.tsx +88 -0
- package/src/components/Code/stories/CodeRequire.stories.tsx +52 -0
- package/src/components/Code/stories/CodeShape.stories.tsx +71 -0
- package/src/components/Code/stories/CodeSize.stories.tsx +35 -0
- package/src/components/Code/stories/CodeStories.config.ts +42 -0
- package/src/components/Code/stories/CodeStyle.stories.tsx +53 -0
- package/src/components/Code/stories/CodeSuccess.stories.tsx +52 -0
- package/src/components/Code/styles/code.ts +9 -8
- package/src/components/Code/styles/codeInputShape.ts +27 -0
- package/src/components/Code/styles/codeSize.ts +17 -12
- package/src/components/ColorInput/ColorInput.interface.ts +16 -1
- package/src/components/ColorInput/ColorInput.tsx +31 -35
- package/src/components/ColorInput/stories/ColorInputDefault.stories.tsx +38 -0
- package/src/components/ColorInput/stories/ColorInputDemo.stories.tsx +85 -0
- package/src/components/ColorInput/stories/ColorInputDisabled.stories.tsx +43 -0
- package/src/components/ColorInput/stories/ColorInputError.stories.tsx +38 -0
- package/src/components/ColorInput/stories/ColorInputGallery.stories.tsx +81 -0
- package/src/components/ColorInput/stories/ColorInputRequire.stories.tsx +38 -0
- package/src/components/ColorInput/stories/ColorInputShape.stories.tsx +65 -0
- package/src/components/ColorInput/stories/ColorInputSize.stories.tsx +50 -0
- package/src/components/ColorInput/stories/ColorInputStories.config.tsx +75 -0
- package/src/components/ColorInput/stories/ColorInputStyle.stories.tsx +50 -0
- package/src/components/ColorInput/stories/ColorInputSuccess.stories.tsx +38 -0
- package/src/components/DatePicker/DatePicker.interface.ts +3 -1
- package/src/components/DatePicker/DatePicker.tsx +38 -32
- package/src/components/DatePicker/appearance/datePickerSurface.ts +1 -0
- package/src/components/DatePicker/stories/DatePicker.stories.tsx +24 -24
- package/src/components/DatePicker/stories/DatePickerSize.stories.tsx +50 -0
- package/src/components/DatePicker/stories/DatePickerStyle.stories.tsx +59 -0
- package/src/components/Divider/Divider.tsx +39 -28
- package/src/components/Divider/stories/DividerAppearance.stories.tsx +20 -2
- package/src/components/Divider/stories/DividerDirection.stories.tsx +19 -7
- package/src/components/Divider/stories/DividerSize.stories.tsx +13 -2
- package/src/components/Divider/stories/DividerStories.config.tsx +16 -0
- package/src/components/Divider/styles/divider.ts +10 -0
- package/src/components/Divider/styles/dividerDirection.ts +1 -3
- package/src/components/Dot/stories/Dot.stories.tsx +32 -5
- package/src/components/Drawer/Drawer.interface.ts +5 -2
- package/src/components/Drawer/Drawer.tsx +29 -33
- package/src/components/Drawer/appearance/drawerSurface.ts +3 -0
- package/src/components/Drawer/stories/Drawer.stories.tsx +45 -38
- package/src/components/Drawer/stories/DrawerSize.stories.tsx +77 -0
- package/src/components/Drawer/stories/DrawerSwap.stories.tsx +38 -0
- package/src/components/Drawer/stories/__mock__/index.ts +8 -0
- package/src/components/Dropdown/Dropdown.interface.ts +54 -6
- package/src/components/Dropdown/Dropdown.styles.ts +0 -2
- package/src/components/Dropdown/Dropdown.tsx +17 -21
- package/src/components/Dropdown/DropdownItem.styles.ts +9 -0
- package/src/components/Dropdown/DropdownItem.tsx +114 -86
- package/src/components/Dropdown/appearance/dropdownAccent.ts +18 -0
- package/src/components/Dropdown/appearance/dropdownShape.ts +4 -4
- package/src/components/Dropdown/appearance/dropdownSize.ts +26 -2
- package/src/components/Dropdown/appearance/dropdownSurface.ts +34 -0
- package/src/components/Dropdown/index.ts +6 -4
- package/src/components/Dropdown/stories/DropdownBadge.stories.tsx +44 -0
- package/src/components/Dropdown/stories/DropdownDefault.stories.tsx +44 -0
- package/src/components/Dropdown/stories/DropdownMessage.stories.tsx +44 -0
- package/src/components/Dropdown/stories/DropdownSize.stories.tsx +53 -0
- package/src/components/Dropdown/stories/DropdownSwap.stories.tsx +44 -0
- package/src/components/Dropdown/stories/__mock__/index.tsx +138 -0
- package/src/components/Dropdown/styles/dropdown.ts +0 -5
- package/src/components/Dropdown/styles/dropdownItem.ts +39 -0
- package/src/components/Dropdown/styles/{dropdownSize.ts → dropdownItemSize.ts} +6 -6
- package/src/components/Group/Group.tsx +27 -14
- package/src/components/Group/stories/Group.stories.tsx +23 -16
- package/src/components/Group/stories/GroupAlignItems.stories.tsx +86 -0
- package/src/components/Group/stories/GroupDirection.stories.tsx +90 -0
- package/src/components/Group/stories/GroupJustifyContent.stories.tsx +92 -0
- package/src/components/Group/stories/GroupWrap.stories.tsx +74 -0
- package/src/components/HeroTitle/HeroTitle.interface.ts +2 -0
- package/src/components/HeroTitle/HeroTitle.tsx +30 -20
- package/src/components/HeroTitle/appearance/heroTitleSize.ts +12 -0
- package/src/components/HeroTitle/stories/HeroTitle.stories.tsx +19 -11
- package/src/components/HeroTitle/stories/HeroTitleIcon.stories.tsx +42 -0
- package/src/components/HeroTitle/stories/HeroTitleSize.stories.tsx +77 -0
- package/src/components/Icon/Icon.appearance.ts +32 -0
- package/src/components/Icon/Icon.interface.ts +98 -10
- package/src/components/Icon/Icon.styles.ts +10 -3
- package/src/components/Icon/Icon.tsx +176 -54
- package/src/components/Icon/appearance/iconAccent.ts +19 -0
- package/src/components/Icon/appearance/iconDanger.ts +13 -0
- package/src/components/Icon/appearance/iconDisabled.ts +12 -0
- package/src/components/Icon/appearance/iconError.ts +13 -0
- package/src/components/Icon/appearance/iconExtra.ts +13 -0
- package/src/components/Icon/appearance/iconInfo.ts +18 -0
- package/src/components/Icon/appearance/iconShape.ts +24 -0
- package/src/components/Icon/appearance/iconSize.ts +180 -0
- package/src/components/Icon/appearance/iconSpecial.ts +13 -0
- package/src/components/Icon/appearance/iconStyle.ts +17 -0
- package/src/components/Icon/appearance/iconSuccess.ts +13 -0
- package/src/components/Icon/appearance/iconSurface.ts +31 -0
- package/src/components/Icon/appearance/iconWarning.ts +13 -0
- package/src/components/Icon/index.ts +20 -4
- package/src/components/Icon/stories/IconDefault.stories.tsx +84 -0
- package/src/components/Icon/stories/IconDemo.stories.tsx +78 -0
- package/src/components/Icon/stories/IconDisabled.stories.tsx +36 -0
- package/src/components/Icon/stories/IconGallery.stories.tsx +77 -0
- package/src/components/Icon/stories/IconShape.stories.tsx +92 -0
- package/src/components/Icon/stories/IconSize12.stories.tsx +42 -0
- package/src/components/Icon/stories/IconSize14.stories.tsx +53 -0
- package/src/components/Icon/stories/IconSize16.stories.tsx +64 -0
- package/src/components/Icon/stories/IconSize20.stories.tsx +75 -0
- package/src/components/Icon/stories/IconSize24.stories.tsx +92 -0
- package/src/components/Icon/stories/IconSize32.stories.tsx +104 -0
- package/src/components/Icon/stories/IconSize40.stories.tsx +116 -0
- package/src/components/Icon/stories/IconSkeleton.stories.tsx +87 -0
- package/src/components/Icon/stories/IconStories.config.ts +124 -0
- package/src/components/Icon/stories/IconStyle.stories.tsx +75 -0
- package/src/components/Icon/stories/IconWithBadge.stories.tsx +114 -0
- package/src/components/Icon/styles/icon.ts +17 -3
- package/src/components/Icon/styles/iconBadge.ts +27 -0
- package/src/components/Icon/styles/iconShape.ts +13 -1
- package/src/components/Icon/styles/iconSize.ts +54 -57
- package/src/components/Image/stories/Image.stories.tsx +32 -7
- package/src/components/Input/Input.interface.ts +15 -2
- package/src/components/Input/Input.tsx +51 -89
- package/src/components/Input/stories/InputDefault.stories.tsx +14 -5
- package/src/components/Input/stories/InputDemo.stories.tsx +79 -0
- package/src/components/Input/stories/InputDisabled.stories.tsx +17 -6
- package/src/components/Input/stories/InputError.stories.tsx +19 -4
- package/src/components/Input/stories/InputGallery.stories.tsx +80 -0
- package/src/components/Input/stories/InputReadonly.stories.tsx +7 -3
- package/src/components/Input/stories/InputRequire.stories.tsx +19 -5
- package/src/components/Input/stories/InputShape.stories.tsx +22 -3
- package/src/components/Input/stories/InputSize.stories.tsx +20 -3
- package/src/components/Input/stories/InputStories.config.tsx +66 -0
- package/src/components/Input/stories/InputStyle.stories.tsx +20 -3
- package/src/components/Input/stories/InputSuccess.stories.tsx +19 -4
- package/src/components/InputNumber/InputNumber.interface.ts +17 -1
- package/src/components/InputNumber/InputNumber.tsx +65 -74
- package/src/components/InputNumber/appearance/inputNumberDefault.ts +1 -0
- package/src/components/InputNumber/appearance/inputNumberError.ts +1 -0
- package/src/components/InputNumber/appearance/inputNumberRequire.ts +1 -0
- package/src/components/InputNumber/appearance/inputNumberSuccess.ts +1 -0
- package/src/components/InputNumber/stories/InputNumberDemo.stories.tsx +90 -0
- package/src/components/InputNumber/stories/InputNumberGallery.stories.tsx +72 -0
- package/src/components/InputNumber/stories/InputNumberShape.stories.tsx +78 -0
- package/src/components/InputNumber/stories/InputNumberSize.stories.tsx +60 -0
- package/src/components/InputNumber/stories/InputNumberStories.config.tsx +61 -0
- package/src/components/InputNumber/stories/InputNumberValues.stories.tsx +29 -0
- package/src/components/InputPassword/InputPassword.interface.ts +20 -1
- package/src/components/InputPassword/InputPassword.tsx +71 -109
- package/src/components/InputPassword/appearance/inputPasswordDefault.ts +2 -0
- package/src/components/InputPassword/appearance/inputPasswordDisabled.ts +2 -0
- package/src/components/InputPassword/appearance/inputPasswordError.ts +2 -0
- package/src/components/InputPassword/appearance/inputPasswordRequire.ts +2 -0
- package/src/components/InputPassword/appearance/inputPasswordSuccess.ts +2 -0
- package/src/components/InputPassword/stories/InpputPasswordRequire.stories.tsx +45 -0
- package/src/components/InputPassword/stories/InputPassword.stories.tsx +22 -45
- package/src/components/InputPassword/stories/InputPasswordDefault.stories.tsx +50 -0
- package/src/components/InputPassword/stories/InputPasswordDemo.stories.tsx +89 -0
- package/src/components/InputPassword/stories/InputPasswordDisabled.stories.tsx +50 -0
- package/src/components/InputPassword/stories/InputPasswordError.stories.tsx +45 -0
- package/src/components/InputPassword/stories/InputPasswordGallery.stories.tsx +109 -0
- package/src/components/InputPassword/stories/InputPasswordShape.stories.tsx +71 -0
- package/src/components/InputPassword/stories/InputPasswordSize.stories.tsx +57 -0
- package/src/components/InputPassword/stories/InputPasswordStories.config.tsx +65 -0
- package/src/components/InputPassword/stories/InputPasswordStyle.stories.tsx +57 -0
- package/src/components/InputPassword/stories/InputPasswordSuccess.stories.tsx +45 -0
- package/src/components/InputPassword/stories/InputPasswordType.stories.tsx +26 -0
- package/src/components/InputPassword/stories/InputPasswordValue.stories.tsx +38 -0
- package/src/components/Label/Label.appearance.ts +14 -0
- package/src/components/Label/Label.constants.ts +7 -0
- package/src/components/Label/Label.interface.ts +54 -2
- package/src/components/Label/Label.tsx +100 -71
- package/src/components/Label/appearance/labelAccent.ts +21 -0
- package/src/components/Label/appearance/labelDanger.ts +10 -0
- package/src/components/Label/appearance/labelDisabled.ts +13 -0
- package/src/components/Label/appearance/labelError.ts +20 -0
- package/src/components/Label/appearance/labelExtra.ts +12 -2
- package/src/components/Label/appearance/labelGradient.ts +5 -1
- package/src/components/Label/appearance/labelInfo.ts +20 -0
- package/src/components/Label/appearance/labelSize.ts +56 -7
- package/src/components/Label/appearance/labelSpecial.ts +20 -0
- package/src/components/Label/appearance/labelStyle.ts +17 -0
- package/src/components/Label/appearance/labelSuccess.ts +20 -0
- package/src/components/Label/appearance/labelSurface.ts +11 -1
- package/src/components/Label/appearance/labelWarning.ts +20 -0
- package/src/components/Label/stories/LabelDemo.stories.tsx +76 -0
- package/src/components/Label/stories/LabelGallery.stories.tsx +113 -0
- package/src/components/Label/stories/LabelIconAfter.stories.tsx +75 -0
- package/src/components/Label/stories/LabelIconBefore.stories.tsx +75 -0
- package/src/components/Label/stories/LabelIcons.stories.tsx +81 -0
- package/src/components/Label/stories/LabelShape.stories.tsx +68 -6
- package/src/components/Label/stories/LabelSize.stories.tsx +50 -2
- package/src/components/Label/stories/LabelSkeleton.stories.tsx +90 -0
- package/src/components/Label/stories/LabelStories.config.ts +123 -0
- package/src/components/Label/stories/LabelStyle.stories.tsx +78 -0
- package/src/components/Label/stories/LabelText.stories.tsx +46 -27
- package/src/components/Label/styles/label.ts +6 -0
- package/src/components/Link/Link.interface.ts +6 -0
- package/src/components/Link/Link.tsx +26 -41
- package/src/components/Link/stories/Link.stories.tsx +7 -5
- package/src/components/Link/stories/LinkDefault.stories.tsx +34 -0
- package/src/components/Link/stories/LinkDemo.stories.tsx +51 -0
- package/src/components/Link/stories/LinkGallery.stories.tsx +40 -0
- package/src/components/Link/stories/LinkStories.config.ts +36 -0
- package/src/components/List/List.tsx +17 -48
- package/src/components/List/__mock__/index.ts +18 -0
- package/src/components/List/stories/List.stories.tsx +19 -32
- package/src/components/List/stories/ListItem.stories.tsx +30 -0
- package/src/components/List/stories/ListSize.stories.tsx +39 -0
- package/src/components/Loader/Loader.interface.ts +13 -0
- package/src/components/Loader/Loader.tsx +38 -55
- package/src/components/Loader/stories/LoaderCircular.stories.tsx +39 -0
- package/src/components/Loader/stories/LoaderDemo.stories.tsx +74 -0
- package/src/components/Loader/stories/LoaderDot.stories.tsx +39 -0
- package/src/components/Loader/stories/LoaderGallery.stories.tsx +74 -0
- package/src/components/Loader/stories/LoaderSize.stories.tsx +19 -6
- package/src/components/Loader/stories/LoaderStories.config.ts +83 -0
- package/src/components/Loader/stories/LoaderStyle.stories.tsx +19 -3
- package/src/components/Loader/stories/LoaderText.stories.tsx +26 -14
- package/src/components/Logo/stories/Logo.stories.tsx +8 -16
- package/src/components/Logo/stories/LogoSize.stories.tsx +43 -0
- package/src/components/MenuItem/MenuItem.interface.ts +2 -0
- package/src/components/MenuItem/MenuItem.tsx +56 -79
- package/src/components/MenuItem/appearance/menuItemAccent.ts +6 -0
- package/src/components/MenuItem/appearance/menuItemError.ts +4 -0
- package/src/components/MenuItem/appearance/menuItemSurface.ts +6 -0
- package/src/components/MenuItem/stories/MenuItemDefault.stories.tsx +53 -0
- package/src/components/MenuItem/stories/MenuItemIcon.stories.tsx +54 -0
- package/src/components/MenuItem/stories/MenuItemIconMuted.stories.tsx +51 -0
- package/src/components/MenuItem/stories/MenuItemMuted.stories.tsx +53 -0
- package/src/components/MenuItem/stories/MenuItemSize.stories.tsx +87 -0
- package/src/components/MenuItem/stories/MenuItemStyle.stories.tsx +62 -0
- package/src/components/Modal/stories/ModalDemo.stories.tsx +30 -0
- package/src/components/Overlay/Overlay.tsx +12 -13
- package/src/components/Overlay/stories/Overlay.stories.tsx +28 -12
- package/src/components/Pagination/Pagination.interface.ts +2 -1
- package/src/components/Pagination/Pagination.tsx +22 -33
- package/src/components/Pagination/stories/PaginationDefault.stories.tsx +41 -0
- package/src/components/Pagination/stories/PaginationDot.stories.tsx +41 -0
- package/src/components/Pagination/stories/PaginationNumber.stories.tsx +32 -0
- package/src/components/Pagination/stories/PaginationSize.stories.tsx +59 -0
- package/src/components/Pressable/Pressable.appearance.ts +30 -0
- package/src/components/Pressable/Pressable.interface.ts +75 -0
- package/src/components/Pressable/Pressable.styles.ts +7 -0
- package/src/components/Pressable/Pressable.tsx +110 -0
- package/src/components/Pressable/appearance/pressableAccent.ts +18 -0
- package/src/components/Pressable/appearance/pressableDanger.ts +12 -0
- package/src/components/Pressable/appearance/pressableDisabled.ts +12 -0
- package/src/components/Pressable/appearance/pressableError.ts +12 -0
- package/src/components/Pressable/appearance/pressableExtra.ts +12 -0
- package/src/components/Pressable/appearance/pressableInfo.ts +11 -0
- package/src/components/Pressable/appearance/pressableShape.ts +24 -0
- package/src/components/Pressable/appearance/pressableSpecial.ts +12 -0
- package/src/components/Pressable/appearance/pressableStyle.ts +17 -0
- package/src/components/Pressable/appearance/pressableSuccess.ts +12 -0
- package/src/components/Pressable/appearance/pressableSurface.ts +27 -0
- package/src/components/Pressable/appearance/pressableWarning.ts +12 -0
- package/src/components/Pressable/index.ts +22 -0
- package/src/components/Pressable/stories/PressableDefault.stories.tsx +45 -0
- package/src/components/Pressable/stories/PressableDemo.stories.tsx +66 -0
- package/src/components/Pressable/stories/PressableGallery.stories.tsx +68 -0
- package/src/components/Pressable/stories/PressableShape.stories.tsx +57 -0
- package/src/components/Pressable/stories/PressableStories.config.ts +62 -0
- package/src/components/Pressable/stories/PressableStyle.stories.tsx +74 -0
- package/src/components/Pressable/styles/pressable.ts +9 -0
- package/src/components/Radio/Radio.interface.ts +15 -2
- package/src/components/Radio/Radio.tsx +42 -78
- package/src/components/Radio/stories/RadioDefault.stories.tsx +13 -4
- package/src/components/Radio/stories/RadioDemo.stories.tsx +76 -0
- package/src/components/Radio/stories/RadioDisabled.stories.tsx +1 -1
- package/src/components/Radio/stories/RadioError.stories.tsx +1 -1
- package/src/components/Radio/stories/RadioGallery.stories.tsx +116 -0
- package/src/components/Radio/stories/RadioRequire.stories.tsx +1 -1
- package/src/components/Radio/stories/RadioSize.stories.tsx +1 -1
- package/src/components/Radio/stories/RadioState.stories.tsx +35 -0
- package/src/components/Radio/stories/RadioStories.config.ts +45 -0
- package/src/components/Radio/stories/RadioStyle.stories.tsx +1 -1
- package/src/components/Radio/stories/RadioSuccess.stories.tsx +1 -1
- package/src/components/RangeSlider/RangeSlider.helpers.ts +37 -0
- package/src/components/RangeSlider/RangeSlider.tsx +27 -163
- package/src/components/RangeSlider/RangeSlider.web.tsx +3 -0
- package/src/components/RangeSlider/RangeSliderCustom.tsx +199 -0
- package/src/components/RangeSlider/stories/RangeSliderDisabled.stories.tsx +32 -0
- package/src/components/RangeSlider/styles/rangeSlider.ts +4 -0
- package/src/components/Response/stories/ResponseConfirm.stories.tsx +75 -0
- package/src/components/Response/stories/ResponseError.stories.tsx +75 -0
- package/src/components/Response/stories/ResponseFail.stories.tsx +75 -0
- package/src/components/Response/stories/ResponseNothingFound.stories.tsx +75 -0
- package/src/components/Response/stories/ResponseRefresh.stories.tsx +75 -0
- package/src/components/Response/stories/ResponseSuccess.stories.tsx +75 -0
- package/src/components/Response/stories/ResponseUnableLoadData.stories.tsx +75 -0
- package/src/components/Response/stories/ResponseWarning.stories.tsx +85 -0
- package/src/components/Scrollbar/stories/Scrollbar.stories.tsx +22 -24
- package/src/components/Search/Search.appearance.ts +22 -0
- package/src/components/Search/Search.interface.ts +96 -6
- package/src/components/Search/Search.styles.ts +7 -1
- package/src/components/Search/Search.tsx +118 -34
- package/src/components/Search/appearance/searchDefault.ts +22 -0
- package/src/components/Search/appearance/searchDisabled.ts +14 -0
- package/src/components/Search/appearance/searchError.ts +14 -0
- package/src/components/Search/appearance/searchRequire.ts +14 -0
- package/src/components/Search/appearance/searchShape.ts +24 -0
- package/src/components/Search/appearance/searchSize.ts +62 -0
- package/src/components/Search/appearance/searchStyle.ts +17 -0
- package/src/components/Search/appearance/searchSuccess.ts +13 -0
- package/src/components/Search/index.ts +17 -4
- package/src/components/Search/stories/SearchInputClear.stories.tsx +36 -0
- package/src/components/Search/stories/SearchInputDefault.stories.tsx +67 -0
- package/src/components/Search/stories/SearchInputDemo.stories.tsx +126 -0
- package/src/components/Search/stories/SearchInputDisabled.stories.tsx +73 -0
- package/src/components/Search/stories/SearchInputError.stories.tsx +65 -0
- package/src/components/Search/stories/SearchInputGallery.stories.tsx +101 -0
- package/src/components/Search/stories/SearchInputRequire.stories.tsx +65 -0
- package/src/components/Search/stories/SearchInputShape.stories.tsx +72 -0
- package/src/components/Search/stories/SearchInputSize.stories.tsx +71 -0
- package/src/components/Search/stories/SearchInputStyle.stories.tsx +53 -0
- package/src/components/Search/stories/SearchInputSuccess.stories.tsx +65 -0
- package/src/components/Search/stories/SearchStories.config.ts +50 -0
- package/src/components/Search/styles/search.ts +28 -12
- package/src/components/Search/styles/searchShape.ts +34 -0
- package/src/components/Search/styles/searchSize.ts +48 -0
- package/src/components/Segmented/Segmented.interface.ts +10 -0
- package/src/components/Segmented/Segmented.tsx +9 -4
- package/src/components/Segmented/appearance/segmentedDefault.ts +4 -0
- package/src/components/Segmented/appearance/segmentedDisabled.ts +2 -0
- package/src/components/Segmented/appearance/segmentedError.ts +2 -0
- package/src/components/Segmented/appearance/segmentedRequire.ts +1 -0
- package/src/components/Segmented/appearance/segmentedSuccess.ts +1 -0
- package/src/components/Segmented/stories/SegmenetedIcon.stories.tsx +45 -0
- package/src/components/Segmented/stories/SegmentedDemo.stories.tsx +81 -0
- package/src/components/Segmented/stories/SegmentedDisabled.stories.tsx +1 -1
- package/src/components/Segmented/stories/SegmentedGallery.stories.tsx +89 -0
- package/src/components/Segmented/stories/SegmentedLabel.stories.tsx +1 -1
- package/src/components/Segmented/stories/SegmentedLabelIcon.stories.tsx +1 -1
- package/src/components/Segmented/stories/SegmentedShape.stories.tsx +1 -1
- package/src/components/Segmented/stories/SegmentedSize.stories.tsx +1 -1
- package/src/components/Segmented/stories/SegmentedStories.config.tsx +49 -1
- package/src/components/Segmented/stories/SegmentedStyle.stories.tsx +1 -1
- package/src/components/Select/Select.interface.ts +21 -1
- package/src/components/Select/Select.tsx +91 -63
- package/src/components/Select/appearance/selectDefault.ts +2 -0
- package/src/components/Select/appearance/selectDisabled.ts +3 -0
- package/src/components/Select/appearance/selectError.ts +2 -0
- package/src/components/Select/appearance/selectRequire.ts +2 -0
- package/src/components/Select/appearance/selectShape.ts +4 -4
- package/src/components/Select/appearance/selectSuccess.ts +2 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/Select/stories/SelectDefault.stories.tsx +110 -0
- package/src/components/Select/stories/SelectDemo.stories.tsx +81 -0
- package/src/components/Select/stories/SelectDisabled.stories.tsx +71 -0
- package/src/components/Select/stories/SelectError.stories.tsx +70 -0
- package/src/components/Select/stories/SelectGallery.stories.tsx +97 -0
- package/src/components/Select/stories/SelectRequire.stories.tsx +70 -0
- package/src/components/Select/stories/SelectShape.stories.tsx +69 -0
- package/src/components/Select/stories/SelectSize.stories.tsx +61 -0
- package/src/components/Select/stories/SelectStories.config.ts +88 -0
- package/src/components/Select/stories/SelectStyle.stories.tsx +60 -0
- package/src/components/Select/stories/SelectSuccess.stories.tsx +70 -0
- package/src/components/Select/stories/__mock__/index.ts +52 -0
- package/src/components/Select/styles/select.ts +21 -0
- package/src/components/Switch/Switch.constants.ts +4 -0
- package/src/components/Switch/Switch.helpers.ts +102 -0
- package/src/components/Switch/Switch.interface.ts +18 -2
- package/src/components/Switch/Switch.tsx +110 -67
- package/src/components/{Segmented/stories/SegmentedIcon.stories.tsx → Switch/stories/Switch.stories.tsx} +18 -12
- package/src/components/Switch/stories/SwitchDefault.stories.tsx +6 -5
- package/src/components/Switch/stories/SwitchDemo.stories.tsx +81 -0
- package/src/components/Switch/stories/SwitchDisabled.stories.tsx +10 -1
- package/src/components/Switch/stories/SwitchError.stories.tsx +5 -5
- package/src/components/Switch/stories/SwitchGallery.stories.tsx +102 -0
- package/src/components/Switch/stories/SwitchRequire.stories.tsx +5 -5
- package/src/components/Switch/stories/SwitchSize.stories.tsx +5 -4
- package/src/components/Switch/stories/SwitchStories.config.tsx +59 -21
- package/src/components/Switch/stories/SwitchSuccess.stories.tsx +5 -5
- package/src/components/Switch/stories/SwitchTitleDescSwitch.stories.tsx +7 -5
- package/src/components/Switch/stories/SwitchTitleSwitch.stories.tsx +7 -5
- package/src/components/Switch/styles/switch.ts +2 -6
- package/src/components/Tab/stories/TabDefault.stories.tsx +34 -0
- package/src/components/Tab/stories/TabDemo.stories.tsx +27 -0
- package/src/components/Tab/stories/TabSize.stories.tsx +80 -0
- package/src/components/Tab/stories/TabStories.config.ts +12 -0
- package/src/components/Text/stories/TextDemo.stories.tsx +30 -0
- package/src/components/Text/stories/TextSize.stories.tsx +88 -0
- package/src/components/Textarea/Textarea.interface.ts +3 -1
- package/src/components/Textarea/Textarea.tsx +54 -89
- package/src/components/Textarea/stories/Textarea.stories.tsx +14 -46
- package/src/components/Textarea/stories/TextareaDefault.stories.tsx +73 -0
- package/src/components/Textarea/stories/TextareaDisabled.stories.tsx +73 -0
- package/src/components/Textarea/stories/TextareaError.stories.tsx +72 -0
- package/src/components/Textarea/stories/TextareaRequire.stories.tsx +72 -0
- package/src/components/Textarea/stories/TextareaShape.stories.tsx +76 -0
- package/src/components/Textarea/stories/TextareaSize.stories.tsx +57 -0
- package/src/components/Textarea/stories/TextareaStyle.stories.tsx +57 -0
- package/src/components/Textarea/stories/TextareaSuccess.stories.tsx +72 -0
- package/src/components/Textarea/stories/TextareaValue.stories.tsx +43 -0
- package/src/components/Tile/Tile.interface.ts +16 -0
- package/src/components/Tile/Tile.tsx +46 -82
- package/src/components/Tile/appearance/tileSurface.ts +8 -4
- package/src/components/Tile/stories/TileBadge.stories.tsx +1 -1
- package/src/components/Tile/stories/TileDemo.stories.tsx +77 -0
- package/src/components/Tile/stories/TileGallery.stories.tsx +108 -0
- package/src/components/Tile/stories/TileIcon.stories.tsx +1 -1
- package/src/components/Tile/stories/TileShape.stories.tsx +1 -1
- package/src/components/Tile/stories/TileSize.stories.tsx +1 -1
- package/src/components/Tile/stories/TileStories.config.ts +30 -0
- package/src/components/Tile/stories/TileStyle.stories.tsx +20 -6
- package/src/components/Tile/stories/TileSwap.stories.tsx +2 -2
- package/src/components/Title/stories/TitleSize.stories.tsx +77 -0
- package/src/components/Tooltip/Tooltip.interface.ts +17 -1
- package/src/components/Tooltip/Tooltip.tsx +26 -29
- package/src/components/Tooltip/appearance/tooltipShape.ts +4 -4
- package/src/components/Tooltip/stories/TooltipAppearance.stories.tsx +64 -0
- package/src/components/Tooltip/stories/TooltipCustom.stories.tsx +31 -0
- package/src/components/Tooltip/stories/TooltipDemo.stories.tsx +77 -0
- package/src/components/Tooltip/stories/TooltipGallery.stories.tsx +85 -0
- package/src/components/Tooltip/stories/TooltipShape.stories.tsx +73 -0
- package/src/components/Tooltip/stories/TooltipSize.stories.tsx +46 -0
- package/src/components/Tooltip/stories/TooltipStories.config.ts +37 -0
- package/src/components/Tooltip/stories/TooltipStyle.stories.tsx +55 -0
- package/src/components/Warning/Warning.constants.ts +11 -0
- package/src/components/Warning/Warning.helpers.ts +62 -0
- package/src/components/Warning/Warning.interface.ts +12 -0
- package/src/components/Warning/Warning.tsx +16 -5
- package/src/components/Warning/WarningSkeleton.tsx +32 -0
- package/src/components/Warning/WarningSkeleton.web.tsx +56 -0
- package/src/components/Warning/appearance/warningAccent.ts +4 -0
- package/src/components/Warning/appearance/warningError.ts +4 -0
- package/src/components/Warning/appearance/warningInfo.ts +6 -0
- package/src/components/Warning/appearance/warningSuccess.ts +2 -0
- package/src/components/Warning/appearance/warningWarning.ts +6 -0
- package/src/components/Warning/stories/WarningDefault.stories.tsx +24 -7
- package/src/components/Warning/stories/WarningMuted.stories.tsx +22 -2
- package/src/components/Warning/stories/WarningShape.stories.tsx +36 -2
- package/src/components/Warning/stories/WarningSize.stories.tsx +12 -7
- package/src/components/Warning/stories/WarningSkeleton.stories.tsx +30 -0
- package/src/components/Warning/stories/WarningStyle.stories.tsx +22 -2
- package/src/components/Warning/styles/warning.ts +15 -0
- package/src/index.tsx +51 -5
- package/src/storybook/createAppearanceTierStories/createAppearanceTierStories.interface.ts +21 -0
- package/src/storybook/createAppearanceTierStories/createAppearanceTierStories.ts +63 -0
- package/src/storybook/createAppearanceTierStories/index.ts +2 -0
- package/src/storybook/createComponentGallery/createComponentGallery.interface.ts +23 -0
- package/src/storybook/createComponentGallery/createComponentGallery.tsx +134 -0
- package/src/storybook/createComponentGallery/index.ts +25 -0
- package/src/storybook/index.ts +46 -0
- package/src/storybook/renderAppearanceTierRow/index.ts +6 -0
- package/src/storybook/renderAppearanceTierRow/renderAppearanceTierRow.interface.ts +34 -0
- package/src/storybook/renderAppearanceTierRow/renderAppearanceTierRow.tsx +90 -0
- package/src/styles/direction/index.ts +11 -4
- package/src/styles/width/index.ts +6 -2
- package/tsconfig.json +3 -1
- package/src/components/AvatarStack/stories/AvatarStack.stories.tsx +0 -56
- package/src/components/Badge/stories/BadgeDefault.stories.tsx +0 -39
- package/src/components/Badge/stories/BadgeStatus.stories.tsx +0 -23
- package/src/components/Breadcrumbs/stories/Breadcrumbs.stories.tsx +0 -35
- package/src/components/Cell/stories/Cell.stories.tsx +0 -35
- package/src/components/Checkmark/stories/Checkmark.stories.tsx +0 -22
- package/src/components/Code/stories/Code.stories.tsx +0 -41
- package/src/components/ColorInput/stories/ColorInput.stories.tsx +0 -36
- package/src/components/Dropdown/stories/Dropdown.stories.tsx +0 -62
- package/src/components/Icon/stories/Icon.stories.tsx +0 -45
- package/src/components/InputNumber/stories/InputNumber.stories.tsx +0 -93
- package/src/components/Label/Label.web.tsx +0 -124
- package/src/components/Loader/stories/LoaderDefault.stories.tsx +0 -69
- package/src/components/Loader/stories/LoaderShape.stories.tsx +0 -51
- package/src/components/MenuItem/stories/MenuItem.stories.tsx +0 -52
- package/src/components/Modal/stories/Modal.stories.tsx +0 -47
- package/src/components/Pagination/stories/Pagination.stories.tsx +0 -37
- package/src/components/RangeSlider/stories/RangeSlider.stories.tsx +0 -55
- package/src/components/Response/stories/Response.stories.tsx +0 -22
- package/src/components/Search/stories/Search.stories.tsx +0 -24
- package/src/components/Select/stories/Select.stories.tsx +0 -67
- package/src/components/Tab/stories/Tab.stories.tsx +0 -67
- package/src/components/Text/stories/Text.stories.tsx +0 -84
- package/src/components/Tile/stories/TileDefault.stories.tsx +0 -40
- package/src/components/Title/stories/Title.stories.tsx +0 -68
- package/src/components/Tooltip/stories/Tooltip.stories.tsx +0 -61
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { createAppearanceOptions } from '../../../storybook'
|
|
4
|
+
import { checkmarkAppearanceShape } from '../appearance/checkmarkShape'
|
|
5
|
+
import { checkmarkAppearanceSize } from '../appearance/checkmarkSize'
|
|
6
|
+
import { checkmarkAppearanceStyle } from '../appearance/checkmarkStyle'
|
|
7
|
+
import { Checkmark } from '../Checkmark'
|
|
8
|
+
import { checkmarkAppearance } from '../Checkmark.appearance'
|
|
9
|
+
import type { CheckmarkProps, CheckmarkStoryArgs } from '../Checkmark.interface'
|
|
10
|
+
|
|
11
|
+
const { getAppearanceOptions } = createAppearanceOptions(checkmarkAppearance, {
|
|
12
|
+
appearanceShape: checkmarkAppearanceShape,
|
|
13
|
+
appearanceSize: checkmarkAppearanceSize,
|
|
14
|
+
appearanceStyle: checkmarkAppearanceStyle,
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const meta = {
|
|
18
|
+
title: 'Atoms / Checkmark',
|
|
19
|
+
component: Checkmark,
|
|
20
|
+
args: {
|
|
21
|
+
appearanceShape: 'rounded',
|
|
22
|
+
appearanceSize: 'sizeXXL',
|
|
23
|
+
appearanceStyle: 'solid',
|
|
24
|
+
appearanceType: 'accentPrimary',
|
|
25
|
+
isChecked: false,
|
|
26
|
+
},
|
|
27
|
+
parameters: {
|
|
28
|
+
layout: 'centered',
|
|
29
|
+
design: {
|
|
30
|
+
type: 'figma',
|
|
31
|
+
url: 'https://www.figma.com/design/HmHn0BShJPXHU8SmuIP71M/ITCase---Atoms?node-id=31-192880',
|
|
32
|
+
},
|
|
33
|
+
controls: {
|
|
34
|
+
include: [
|
|
35
|
+
'appearanceType',
|
|
36
|
+
'appearanceShape',
|
|
37
|
+
'appearanceSize',
|
|
38
|
+
'appearanceStyle',
|
|
39
|
+
'isChecked',
|
|
40
|
+
'isNegative',
|
|
41
|
+
'isDisabled',
|
|
42
|
+
'isSkeleton',
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
argTypes: {
|
|
47
|
+
appearanceShape: {
|
|
48
|
+
control: 'radio',
|
|
49
|
+
options: getAppearanceOptions('appearanceShape'),
|
|
50
|
+
},
|
|
51
|
+
appearanceSize: {
|
|
52
|
+
control: 'radio',
|
|
53
|
+
options: getAppearanceOptions('appearanceSize'),
|
|
54
|
+
},
|
|
55
|
+
appearanceStyle: {
|
|
56
|
+
control: 'radio',
|
|
57
|
+
options: getAppearanceOptions('appearanceStyle'),
|
|
58
|
+
},
|
|
59
|
+
appearanceType: {
|
|
60
|
+
control: 'select',
|
|
61
|
+
options: getAppearanceOptions('appearance'),
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
} satisfies Meta<CheckmarkStoryArgs>
|
|
65
|
+
|
|
66
|
+
export default meta
|
|
67
|
+
|
|
68
|
+
type Story = StoryObj<typeof meta>
|
|
69
|
+
|
|
70
|
+
export const Demo: StoryObj<CheckmarkStoryArgs> = {
|
|
71
|
+
render: ({
|
|
72
|
+
appearanceShape,
|
|
73
|
+
appearanceSize,
|
|
74
|
+
appearanceStyle,
|
|
75
|
+
appearanceType,
|
|
76
|
+
...rest
|
|
77
|
+
}) => (
|
|
78
|
+
<Checkmark
|
|
79
|
+
{...rest}
|
|
80
|
+
appearance={
|
|
81
|
+
`${appearanceType} ${appearanceSize} ${appearanceStyle} ${appearanceShape}` as CheckmarkProps['appearance']
|
|
82
|
+
}
|
|
83
|
+
/>
|
|
84
|
+
),
|
|
85
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
4
|
+
|
|
5
|
+
import { Checkmark } from '../Checkmark'
|
|
6
|
+
import type {
|
|
7
|
+
CheckmarkGalleryStory,
|
|
8
|
+
CheckmarkProps,
|
|
9
|
+
} from '../Checkmark.interface'
|
|
10
|
+
import {
|
|
11
|
+
checkmarkGallery,
|
|
12
|
+
checkmarkStoryParameters,
|
|
13
|
+
} from './CheckmarkStories.config'
|
|
14
|
+
|
|
15
|
+
const meta = {
|
|
16
|
+
title: 'Atoms / Checkmark',
|
|
17
|
+
args: {
|
|
18
|
+
appearance: 'surface',
|
|
19
|
+
shape: 'rounded',
|
|
20
|
+
style: 'solid',
|
|
21
|
+
tier: 'Primary',
|
|
22
|
+
isChecked: true,
|
|
23
|
+
isDisabled: false,
|
|
24
|
+
isSkeleton: false,
|
|
25
|
+
isNegative: false,
|
|
26
|
+
},
|
|
27
|
+
parameters: checkmarkStoryParameters,
|
|
28
|
+
argTypes: {
|
|
29
|
+
appearance: checkmarkGallery.argTypes.appearance,
|
|
30
|
+
shape: checkmarkGallery.argTypes.shape,
|
|
31
|
+
style: checkmarkGallery.argTypes.style,
|
|
32
|
+
tier: checkmarkGallery.argTypes.tier,
|
|
33
|
+
},
|
|
34
|
+
} satisfies Meta<CheckmarkGalleryStory>
|
|
35
|
+
|
|
36
|
+
export default meta
|
|
37
|
+
|
|
38
|
+
type Story = StoryObj<CheckmarkGalleryStory>
|
|
39
|
+
|
|
40
|
+
interface CheckmarkGalleryItemProps {
|
|
41
|
+
isChecked?: CheckmarkGalleryStory['isChecked']
|
|
42
|
+
isDisabled?: CheckmarkGalleryStory['isDisabled']
|
|
43
|
+
isNegative?: CheckmarkGalleryStory['isNegative']
|
|
44
|
+
isSkeleton?: CheckmarkGalleryStory['isSkeleton']
|
|
45
|
+
appearance: CheckmarkProps['appearance']
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function CheckmarkGalleryItem(props: CheckmarkGalleryItemProps) {
|
|
49
|
+
const {
|
|
50
|
+
appearance,
|
|
51
|
+
isChecked: checked = false,
|
|
52
|
+
isDisabled,
|
|
53
|
+
isSkeleton,
|
|
54
|
+
isNegative,
|
|
55
|
+
} = props
|
|
56
|
+
const [isChecked, setChecked] = useState(checked)
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<Checkmark
|
|
60
|
+
appearance={appearance}
|
|
61
|
+
isChecked={isChecked}
|
|
62
|
+
isDisabled={isDisabled}
|
|
63
|
+
isSkeleton={isSkeleton}
|
|
64
|
+
isNegative={isNegative}
|
|
65
|
+
onPress={() => {
|
|
66
|
+
if (isDisabled) {
|
|
67
|
+
return
|
|
68
|
+
}
|
|
69
|
+
setChecked((prev) => !prev)
|
|
70
|
+
}}
|
|
71
|
+
/>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const renderCheckmarkGallery = (
|
|
76
|
+
args: CheckmarkGalleryStory,
|
|
77
|
+
options: {
|
|
78
|
+
isChecked?: CheckmarkGalleryStory['isChecked']
|
|
79
|
+
isNegative?: CheckmarkGalleryStory['isNegative']
|
|
80
|
+
} = {},
|
|
81
|
+
) =>
|
|
82
|
+
checkmarkGallery.render(args, ({ appearance, args: storyArgs, sizeKey }) => (
|
|
83
|
+
<CheckmarkGalleryItem
|
|
84
|
+
appearance={appearance}
|
|
85
|
+
key={`${sizeKey}-${storyArgs.isChecked}-${storyArgs.isNegative}`}
|
|
86
|
+
isChecked={
|
|
87
|
+
options.isChecked !== undefined
|
|
88
|
+
? options.isChecked
|
|
89
|
+
: storyArgs.isChecked
|
|
90
|
+
}
|
|
91
|
+
isDisabled={storyArgs.isDisabled}
|
|
92
|
+
isSkeleton={storyArgs.isSkeleton}
|
|
93
|
+
isNegative={
|
|
94
|
+
options.isNegative !== undefined
|
|
95
|
+
? options.isNegative
|
|
96
|
+
: storyArgs.isNegative
|
|
97
|
+
}
|
|
98
|
+
/>
|
|
99
|
+
))
|
|
100
|
+
|
|
101
|
+
export const Default: Story = {
|
|
102
|
+
name: 'Checkmark',
|
|
103
|
+
args: {
|
|
104
|
+
isChecked: false,
|
|
105
|
+
isNegative: false,
|
|
106
|
+
},
|
|
107
|
+
render: (args) =>
|
|
108
|
+
renderCheckmarkGallery(args, {
|
|
109
|
+
isChecked: false,
|
|
110
|
+
isNegative: false,
|
|
111
|
+
}),
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const Checked: Story = {
|
|
115
|
+
name: 'Checked',
|
|
116
|
+
args: {
|
|
117
|
+
isChecked: true,
|
|
118
|
+
isNegative: false,
|
|
119
|
+
},
|
|
120
|
+
render: (args) =>
|
|
121
|
+
renderCheckmarkGallery(args, {
|
|
122
|
+
isChecked: true,
|
|
123
|
+
isNegative: false,
|
|
124
|
+
}),
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const Negative: Story = {
|
|
128
|
+
name: 'Negative',
|
|
129
|
+
args: {
|
|
130
|
+
isChecked: false,
|
|
131
|
+
isNegative: true,
|
|
132
|
+
},
|
|
133
|
+
render: (args) =>
|
|
134
|
+
renderCheckmarkGallery(args, {
|
|
135
|
+
isChecked: false,
|
|
136
|
+
isNegative: true,
|
|
137
|
+
}),
|
|
138
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { createAppearanceTierStories } from '../../../storybook'
|
|
4
|
+
import { Checkmark } from '../Checkmark'
|
|
5
|
+
import type { CheckmarkProps } from '../Checkmark.interface'
|
|
6
|
+
import {
|
|
7
|
+
CHECKMARK_APPEARANCE_GROUPS,
|
|
8
|
+
checkmarkGallery,
|
|
9
|
+
checkmarkStoryParameters,
|
|
10
|
+
} from './CheckmarkStories.config'
|
|
11
|
+
import { CheckmarkStoryItem } from './CheckmarkStoryItem'
|
|
12
|
+
|
|
13
|
+
const meta = {
|
|
14
|
+
title: 'Atoms / Checkmark / Negative',
|
|
15
|
+
component: Checkmark,
|
|
16
|
+
args: {
|
|
17
|
+
isChecked: false,
|
|
18
|
+
isNegative: true,
|
|
19
|
+
},
|
|
20
|
+
parameters: checkmarkStoryParameters,
|
|
21
|
+
} satisfies Meta<typeof Checkmark>
|
|
22
|
+
|
|
23
|
+
export default meta
|
|
24
|
+
|
|
25
|
+
const stories = createAppearanceTierStories({
|
|
26
|
+
renderItem: ({ appearance, args }) => (
|
|
27
|
+
<CheckmarkStoryItem
|
|
28
|
+
appearance={appearance as CheckmarkProps['appearance']}
|
|
29
|
+
args={{
|
|
30
|
+
...(args as CheckmarkProps),
|
|
31
|
+
isChecked: false,
|
|
32
|
+
isNegative: true,
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
),
|
|
36
|
+
appearanceGroups: CHECKMARK_APPEARANCE_GROUPS,
|
|
37
|
+
appearanceSize: 'sizeXXL',
|
|
38
|
+
tiersByAppearance: checkmarkGallery.tiersByAppearance,
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
export const Accent = stories.Accent
|
|
42
|
+
export const Surface = stories.Surface
|
|
43
|
+
export const Error = stories.Error
|
|
44
|
+
export const Disabled = stories.Disabled
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
import { Checkmark } from '../Checkmark'
|
|
7
|
+
import type { CheckmarkProps } from '../Checkmark.interface'
|
|
8
|
+
import { checkmarkStoryParameters } from './CheckmarkStories.config'
|
|
9
|
+
|
|
10
|
+
const meta = {
|
|
11
|
+
title: 'Atoms / Checkmark / Size',
|
|
12
|
+
component: Checkmark,
|
|
13
|
+
args: {
|
|
14
|
+
isChecked: true,
|
|
15
|
+
isNegative: false,
|
|
16
|
+
},
|
|
17
|
+
parameters: checkmarkStoryParameters,
|
|
18
|
+
} satisfies Meta<typeof Checkmark>
|
|
19
|
+
|
|
20
|
+
export default meta
|
|
21
|
+
|
|
22
|
+
type Story = StoryObj<typeof meta>
|
|
23
|
+
|
|
24
|
+
const renderCheckmarkSizeStory = (args: CheckmarkProps) => {
|
|
25
|
+
const [isChecked, setChecked] = useState(Boolean(args.isChecked))
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Checkmark
|
|
29
|
+
{...args}
|
|
30
|
+
isChecked={isChecked}
|
|
31
|
+
onPress={() => {
|
|
32
|
+
setChecked((prev) => !prev)
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const SizeXXL: Story = {
|
|
39
|
+
args: {
|
|
40
|
+
appearance: 'surfacePrimary sizeXXL solid rounded',
|
|
41
|
+
},
|
|
42
|
+
render: renderCheckmarkSizeStory,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const SizeXL: Story = {
|
|
46
|
+
args: {
|
|
47
|
+
appearance: 'surfacePrimary sizeXL solid rounded',
|
|
48
|
+
},
|
|
49
|
+
render: renderCheckmarkSizeStory,
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const SizeL: Story = {
|
|
53
|
+
args: {
|
|
54
|
+
appearance: 'surfacePrimary sizeL solid rounded',
|
|
55
|
+
},
|
|
56
|
+
render: renderCheckmarkSizeStory,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const SizeM: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
appearance: 'surfacePrimary sizeM solid rounded',
|
|
62
|
+
},
|
|
63
|
+
render: renderCheckmarkSizeStory,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const SizeS: Story = {
|
|
67
|
+
args: {
|
|
68
|
+
appearance: 'surfacePrimary sizeS solid rounded',
|
|
69
|
+
},
|
|
70
|
+
render: renderCheckmarkSizeStory,
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const SizeXS: Story = {
|
|
74
|
+
args: {
|
|
75
|
+
appearance: 'surfacePrimary sizeXS solid rounded',
|
|
76
|
+
},
|
|
77
|
+
render: renderCheckmarkSizeStory,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const SizeXXS: Story = {
|
|
81
|
+
args: {
|
|
82
|
+
appearance: 'surfacePrimary sizeXXS solid rounded',
|
|
83
|
+
},
|
|
84
|
+
render: renderCheckmarkSizeStory,
|
|
85
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createComponentGallery } from '../../../storybook'
|
|
2
|
+
import { checkmarkAppearanceAccent } from '../appearance/checkmarkAccent'
|
|
3
|
+
import { checkmarkAppearanceDisabled } from '../appearance/checkmarkDisabled'
|
|
4
|
+
import { checkmarkAppearanceError } from '../appearance/checkmarkError'
|
|
5
|
+
import { checkmarkAppearanceShape } from '../appearance/checkmarkShape'
|
|
6
|
+
import { checkmarkAppearanceSize } from '../appearance/checkmarkSize'
|
|
7
|
+
import { checkmarkAppearanceStyle } from '../appearance/checkmarkStyle'
|
|
8
|
+
import { checkmarkAppearanceSurface } from '../appearance/checkmarkSurface'
|
|
9
|
+
import type { CheckmarkAppearanceKey } from '../Checkmark.interface'
|
|
10
|
+
|
|
11
|
+
const CHECKMARK_FIGMA_URL =
|
|
12
|
+
'https://www.figma.com/design/HmHn0BShJPXHU8SmuIP71M/ITCase---Atoms?node-id=31-192880'
|
|
13
|
+
|
|
14
|
+
const CHECKMARK_APPEARANCE_GROUPS = [
|
|
15
|
+
'accent',
|
|
16
|
+
'surface',
|
|
17
|
+
'error',
|
|
18
|
+
'disabled',
|
|
19
|
+
] as const
|
|
20
|
+
|
|
21
|
+
const checkmarkStoryParameters = {
|
|
22
|
+
layout: 'centered' as const,
|
|
23
|
+
design: {
|
|
24
|
+
type: 'figma' as const,
|
|
25
|
+
url: CHECKMARK_FIGMA_URL,
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const checkmarkSizeKeys = Object.keys(checkmarkAppearanceSize).filter(
|
|
30
|
+
(value): value is keyof typeof checkmarkAppearanceSize =>
|
|
31
|
+
value in checkmarkAppearanceSize,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
const checkmarkTypeOptions = ['default', 'checked', 'negative'] as const
|
|
35
|
+
|
|
36
|
+
const getCheckmarkTypeProps = (type: (typeof checkmarkTypeOptions)[number]) => {
|
|
37
|
+
switch (type) {
|
|
38
|
+
case 'default':
|
|
39
|
+
return { isChecked: false, isNegative: false }
|
|
40
|
+
case 'checked':
|
|
41
|
+
return { isChecked: true, isNegative: false }
|
|
42
|
+
case 'negative':
|
|
43
|
+
return { isChecked: false, isNegative: true }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const checkmarkGallery = createComponentGallery<CheckmarkAppearanceKey>({
|
|
48
|
+
size: checkmarkAppearanceSize,
|
|
49
|
+
appearanceGroups: {
|
|
50
|
+
error: checkmarkAppearanceError,
|
|
51
|
+
accent: checkmarkAppearanceAccent,
|
|
52
|
+
disabled: checkmarkAppearanceDisabled,
|
|
53
|
+
surface: checkmarkAppearanceSurface,
|
|
54
|
+
},
|
|
55
|
+
shape: checkmarkAppearanceShape,
|
|
56
|
+
style: checkmarkAppearanceStyle,
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
CHECKMARK_APPEARANCE_GROUPS,
|
|
61
|
+
CHECKMARK_FIGMA_URL,
|
|
62
|
+
checkmarkGallery,
|
|
63
|
+
checkmarkSizeKeys,
|
|
64
|
+
checkmarkStoryParameters,
|
|
65
|
+
checkmarkTypeOptions,
|
|
66
|
+
getCheckmarkTypeProps,
|
|
67
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import { Checkmark } from '../Checkmark'
|
|
4
|
+
import type { CheckmarkProps } from '../Checkmark.interface'
|
|
5
|
+
|
|
6
|
+
interface CheckmarkStoryItemProps {
|
|
7
|
+
appearance: CheckmarkProps['appearance']
|
|
8
|
+
args: CheckmarkProps
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function CheckmarkStoryItem(props: CheckmarkStoryItemProps) {
|
|
12
|
+
const { appearance, args } = props
|
|
13
|
+
const [isChecked, setChecked] = useState(Boolean(args.isChecked))
|
|
14
|
+
const isDisabledAppearance = String(appearance).startsWith('disabled')
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Checkmark
|
|
18
|
+
{...args}
|
|
19
|
+
appearance={appearance}
|
|
20
|
+
isChecked={isChecked}
|
|
21
|
+
isDisabled={isDisabledAppearance || args.isDisabled}
|
|
22
|
+
onPress={
|
|
23
|
+
isDisabledAppearance
|
|
24
|
+
? undefined
|
|
25
|
+
: (event) => {
|
|
26
|
+
setChecked((prev) => !prev)
|
|
27
|
+
args.onPress?.(event)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { CheckmarkStoryItem }
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
5
|
+
|
|
6
|
+
import { Checkmark } from '../Checkmark'
|
|
7
|
+
import type { CheckmarkProps } from '../Checkmark.interface'
|
|
8
|
+
import { checkmarkStoryParameters } from './CheckmarkStories.config'
|
|
9
|
+
|
|
10
|
+
const meta = {
|
|
11
|
+
title: 'Atoms / Checkmark / Style',
|
|
12
|
+
component: Checkmark,
|
|
13
|
+
args: {
|
|
14
|
+
isChecked: true,
|
|
15
|
+
isNegative: false,
|
|
16
|
+
},
|
|
17
|
+
parameters: checkmarkStoryParameters,
|
|
18
|
+
} satisfies Meta<typeof Checkmark>
|
|
19
|
+
|
|
20
|
+
export default meta
|
|
21
|
+
|
|
22
|
+
type Story = StoryObj<typeof meta>
|
|
23
|
+
|
|
24
|
+
const renderCheckmarkStyleStory = (args: CheckmarkProps) => {
|
|
25
|
+
const [isChecked, setChecked] = useState(Boolean(args.isChecked))
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Checkmark
|
|
29
|
+
{...args}
|
|
30
|
+
isChecked={isChecked}
|
|
31
|
+
onPress={() => {
|
|
32
|
+
setChecked((prev) => !prev)
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const Solid: Story = {
|
|
39
|
+
args: {
|
|
40
|
+
appearance: 'surfacePrimary sizeXXL solid rounded',
|
|
41
|
+
},
|
|
42
|
+
render: renderCheckmarkStyleStory,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const Outlined: Story = {
|
|
46
|
+
args: {
|
|
47
|
+
appearance: 'surfacePrimary sizeXXL outlined rounded',
|
|
48
|
+
},
|
|
49
|
+
render: renderCheckmarkStyleStory,
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const Ghost: Story = {
|
|
53
|
+
args: {
|
|
54
|
+
appearance: 'surfacePrimary sizeXXL ghost rounded',
|
|
55
|
+
},
|
|
56
|
+
render: renderCheckmarkStyleStory,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const Full: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
appearance: 'surfacePrimary sizeXXL full rounded',
|
|
62
|
+
},
|
|
63
|
+
render: renderCheckmarkStyleStory,
|
|
64
|
+
}
|
|
@@ -6,12 +6,17 @@ const checkmarkStyles = StyleSheet.create({
|
|
|
6
6
|
alignItems: 'center',
|
|
7
7
|
},
|
|
8
8
|
checkmark__icon: {
|
|
9
|
-
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
alignItems: 'center',
|
|
10
11
|
},
|
|
11
12
|
checkmark__wrapper: {
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
12
15
|
borderRadius: 100,
|
|
13
16
|
},
|
|
14
|
-
|
|
17
|
+
checkmark_state_disabled: {
|
|
18
|
+
opacity: 0.5,
|
|
19
|
+
},
|
|
15
20
|
})
|
|
16
21
|
|
|
17
22
|
export { checkmarkStyles }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native'
|
|
2
|
+
|
|
3
|
+
import { getVariantsPropsList } from '../../../utils'
|
|
4
|
+
|
|
5
|
+
const checkmarkSizeStyles = StyleSheet.create({
|
|
6
|
+
checkmark_size_l: {
|
|
7
|
+
width: 48,
|
|
8
|
+
height: 48,
|
|
9
|
+
minWidth: 48,
|
|
10
|
+
minHeight: 48,
|
|
11
|
+
},
|
|
12
|
+
checkmark_size_m: {
|
|
13
|
+
width: 40,
|
|
14
|
+
height: 40,
|
|
15
|
+
minWidth: 40,
|
|
16
|
+
minHeight: 40,
|
|
17
|
+
},
|
|
18
|
+
checkmark_size_s: {
|
|
19
|
+
width: 32,
|
|
20
|
+
height: 32,
|
|
21
|
+
minWidth: 32,
|
|
22
|
+
minHeight: 32,
|
|
23
|
+
},
|
|
24
|
+
checkmark_size_xl: {
|
|
25
|
+
width: 56,
|
|
26
|
+
height: 56,
|
|
27
|
+
minWidth: 56,
|
|
28
|
+
minHeight: 56,
|
|
29
|
+
},
|
|
30
|
+
checkmark_size_xs: {
|
|
31
|
+
width: 24,
|
|
32
|
+
height: 24,
|
|
33
|
+
minWidth: 24,
|
|
34
|
+
minHeight: 24,
|
|
35
|
+
},
|
|
36
|
+
checkmark_size_xxl: {
|
|
37
|
+
width: 64,
|
|
38
|
+
height: 64,
|
|
39
|
+
minWidth: 64,
|
|
40
|
+
minHeight: 64,
|
|
41
|
+
},
|
|
42
|
+
checkmark_size_xxs: {
|
|
43
|
+
width: 16,
|
|
44
|
+
height: 16,
|
|
45
|
+
minWidth: 16,
|
|
46
|
+
minHeight: 16,
|
|
47
|
+
},
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const checkmarkSizeList = getVariantsPropsList(
|
|
51
|
+
checkmarkSizeStyles,
|
|
52
|
+
'checkmark_size_',
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
type checkmarkSizePropsType = (typeof checkmarkSizeList)[number]
|
|
56
|
+
|
|
57
|
+
export { checkmarkSizeList, checkmarkSizeStyles }
|
|
58
|
+
export type { checkmarkSizePropsType }
|
|
@@ -37,6 +37,8 @@ interface ChipsAppearanceProps {
|
|
|
37
37
|
fillActive?: FillActiveProps
|
|
38
38
|
iconAfter?: SvgIconComponent
|
|
39
39
|
iconAfterActive?: SvgIconComponent
|
|
40
|
+
iconAfterAppearance?: string
|
|
41
|
+
iconAfterAppearanceActive?: string
|
|
40
42
|
iconAfterFill?: IconProps['fill']
|
|
41
43
|
iconAfterFillActiveIcon?: IconProps['iconFill']
|
|
42
44
|
iconAfterFillIcon?: IconProps['iconFill']
|
|
@@ -44,6 +46,8 @@ interface ChipsAppearanceProps {
|
|
|
44
46
|
iconAfterSize?: IconProps['size']
|
|
45
47
|
iconBefore?: SvgIconComponent
|
|
46
48
|
iconBeforeActive?: SvgIconComponent
|
|
49
|
+
iconBeforeAppearance?: string
|
|
50
|
+
iconBeforeAppearanceActive?: string
|
|
47
51
|
iconBeforeFill?: IconProps['fill']
|
|
48
52
|
iconBeforeFillActiveIcon?: IconProps['iconFill']
|
|
49
53
|
iconBeforeFillIcon?: IconProps['iconFill']
|
|
@@ -91,6 +95,25 @@ interface ChipsProps extends ChipsAppearanceProps {
|
|
|
91
95
|
style?: StyleProp<ViewStyle>
|
|
92
96
|
}
|
|
93
97
|
|
|
98
|
+
type ChipsGalleryStory = {
|
|
99
|
+
appearance: string
|
|
100
|
+
iconAfter?: boolean
|
|
101
|
+
iconBefore?: boolean
|
|
102
|
+
isActive?: boolean
|
|
103
|
+
isDisabled?: boolean
|
|
104
|
+
label?: string
|
|
105
|
+
shape: string
|
|
106
|
+
style: string
|
|
107
|
+
tier: string
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
type ChipsStoryArgs = Omit<ChipsProps, 'appearance'> & {
|
|
111
|
+
appearanceShape: string
|
|
112
|
+
appearanceSize: string
|
|
113
|
+
appearanceStyle: string
|
|
114
|
+
appearanceType: string
|
|
115
|
+
}
|
|
116
|
+
|
|
94
117
|
export type {
|
|
95
118
|
ChipsAppearance,
|
|
96
119
|
ChipsAppearanceKey,
|
|
@@ -99,5 +122,7 @@ export type {
|
|
|
99
122
|
ChipsAppearanceSize,
|
|
100
123
|
ChipsAppearanceStyle,
|
|
101
124
|
ChipsConfig,
|
|
125
|
+
ChipsGalleryStory,
|
|
102
126
|
ChipsProps,
|
|
127
|
+
ChipsStoryArgs,
|
|
103
128
|
}
|