@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,200 @@
|
|
|
1
|
+
/* eslint-disable perfectionist/sort-objects */
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
|
|
4
|
+
import { Avatar } from '../Avatar'
|
|
5
|
+
import type { AvatarGalleryStory } from '../Avatar.interface'
|
|
6
|
+
import { avatarGallery, avatarStoryImage } from './AvatarStories.config'
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Molecules / Avatar',
|
|
10
|
+
args: {
|
|
11
|
+
appearance: 'surface',
|
|
12
|
+
tier: 'Primary',
|
|
13
|
+
style: 'solid',
|
|
14
|
+
shape: 'circular',
|
|
15
|
+
count: '5',
|
|
16
|
+
badgeValue: '3',
|
|
17
|
+
firstName: 'John',
|
|
18
|
+
secondName: 'Doe',
|
|
19
|
+
badge: false,
|
|
20
|
+
imageSrc: avatarStoryImage,
|
|
21
|
+
isSkeleton: false,
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
design: {
|
|
25
|
+
type: 'figma',
|
|
26
|
+
url: 'https://www.figma.com/design/FcCWZlLa17BPr0zh3Wq9DO/ITCase---Molecules?node-id=3-2',
|
|
27
|
+
},
|
|
28
|
+
layout: 'padded',
|
|
29
|
+
controls: {
|
|
30
|
+
include: ['appearance', 'firstName', 'secondName'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
argTypes: {
|
|
34
|
+
appearance: avatarGallery.argTypes.appearance,
|
|
35
|
+
tier: avatarGallery.argTypes.tier,
|
|
36
|
+
style: avatarGallery.argTypes.style,
|
|
37
|
+
shape: avatarGallery.argTypes.shape,
|
|
38
|
+
},
|
|
39
|
+
} satisfies Meta<AvatarGalleryStory>
|
|
40
|
+
|
|
41
|
+
export default meta
|
|
42
|
+
|
|
43
|
+
type Story = StoryObj<AvatarGalleryStory>
|
|
44
|
+
|
|
45
|
+
const renderAvatarGallery = (
|
|
46
|
+
args: AvatarGalleryStory,
|
|
47
|
+
options: {
|
|
48
|
+
badge?: AvatarGalleryStory['badge']
|
|
49
|
+
badgeValue?: AvatarGalleryStory['badgeValue']
|
|
50
|
+
count?: AvatarGalleryStory['count']
|
|
51
|
+
firstName?: AvatarGalleryStory['firstName']
|
|
52
|
+
imageSrc?: AvatarGalleryStory['imageSrc']
|
|
53
|
+
secondName?: AvatarGalleryStory['secondName']
|
|
54
|
+
} = {},
|
|
55
|
+
) =>
|
|
56
|
+
avatarGallery.render(args, ({ appearance, args: storyArgs }) => (
|
|
57
|
+
<Avatar
|
|
58
|
+
appearance={appearance}
|
|
59
|
+
firstName={
|
|
60
|
+
options.firstName !== undefined
|
|
61
|
+
? options.firstName
|
|
62
|
+
: storyArgs.firstName
|
|
63
|
+
}
|
|
64
|
+
secondName={
|
|
65
|
+
options.secondName !== undefined
|
|
66
|
+
? options.secondName
|
|
67
|
+
: storyArgs.secondName
|
|
68
|
+
}
|
|
69
|
+
badge={options.badge !== undefined ? options.badge : storyArgs.badge}
|
|
70
|
+
badgeValue={
|
|
71
|
+
options.badgeValue !== undefined
|
|
72
|
+
? options.badgeValue
|
|
73
|
+
: storyArgs.badgeValue
|
|
74
|
+
}
|
|
75
|
+
count={options.count !== undefined ? options.count : storyArgs.count}
|
|
76
|
+
imageSrc={
|
|
77
|
+
options.imageSrc !== undefined ? options.imageSrc : storyArgs.imageSrc
|
|
78
|
+
}
|
|
79
|
+
isSkeleton={storyArgs.isSkeleton}
|
|
80
|
+
/>
|
|
81
|
+
))
|
|
82
|
+
|
|
83
|
+
export const Letters: Story = {
|
|
84
|
+
name: 'Letters',
|
|
85
|
+
args: {
|
|
86
|
+
imageSrc: undefined,
|
|
87
|
+
count: undefined,
|
|
88
|
+
badge: false,
|
|
89
|
+
},
|
|
90
|
+
render: (args) =>
|
|
91
|
+
renderAvatarGallery(args, {
|
|
92
|
+
imageSrc: undefined,
|
|
93
|
+
count: undefined,
|
|
94
|
+
firstName: args.firstName,
|
|
95
|
+
secondName: args.secondName,
|
|
96
|
+
badge: false,
|
|
97
|
+
badgeValue: undefined,
|
|
98
|
+
}),
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const LettersBadge: Story = {
|
|
102
|
+
name: 'Letters + Badge',
|
|
103
|
+
args: {
|
|
104
|
+
imageSrc: undefined,
|
|
105
|
+
count: undefined,
|
|
106
|
+
badge: true,
|
|
107
|
+
badgeValue: '3',
|
|
108
|
+
},
|
|
109
|
+
render: (args) =>
|
|
110
|
+
renderAvatarGallery(args, {
|
|
111
|
+
imageSrc: undefined,
|
|
112
|
+
count: undefined,
|
|
113
|
+
firstName: args.firstName,
|
|
114
|
+
secondName: args.secondName,
|
|
115
|
+
badge: true,
|
|
116
|
+
badgeValue: args.badgeValue,
|
|
117
|
+
}),
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const Image: Story = {
|
|
121
|
+
name: 'Image',
|
|
122
|
+
args: {
|
|
123
|
+
imageSrc: avatarStoryImage,
|
|
124
|
+
firstName: undefined,
|
|
125
|
+
secondName: undefined,
|
|
126
|
+
count: undefined,
|
|
127
|
+
badge: false,
|
|
128
|
+
},
|
|
129
|
+
render: (args) =>
|
|
130
|
+
renderAvatarGallery(args, {
|
|
131
|
+
imageSrc: args.imageSrc,
|
|
132
|
+
firstName: undefined,
|
|
133
|
+
secondName: undefined,
|
|
134
|
+
count: undefined,
|
|
135
|
+
badge: false,
|
|
136
|
+
badgeValue: undefined,
|
|
137
|
+
}),
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export const ImageBadge: Story = {
|
|
141
|
+
name: 'Image + Badge',
|
|
142
|
+
args: {
|
|
143
|
+
imageSrc: avatarStoryImage,
|
|
144
|
+
firstName: undefined,
|
|
145
|
+
secondName: undefined,
|
|
146
|
+
count: undefined,
|
|
147
|
+
badge: true,
|
|
148
|
+
badgeValue: '3',
|
|
149
|
+
},
|
|
150
|
+
render: (args) =>
|
|
151
|
+
renderAvatarGallery(args, {
|
|
152
|
+
imageSrc: args.imageSrc,
|
|
153
|
+
firstName: undefined,
|
|
154
|
+
secondName: undefined,
|
|
155
|
+
count: undefined,
|
|
156
|
+
badge: true,
|
|
157
|
+
badgeValue: args.badgeValue,
|
|
158
|
+
}),
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export const Count: Story = {
|
|
162
|
+
name: 'Count',
|
|
163
|
+
args: {
|
|
164
|
+
imageSrc: undefined,
|
|
165
|
+
firstName: undefined,
|
|
166
|
+
secondName: undefined,
|
|
167
|
+
count: '5',
|
|
168
|
+
badge: false,
|
|
169
|
+
},
|
|
170
|
+
render: (args) =>
|
|
171
|
+
renderAvatarGallery(args, {
|
|
172
|
+
imageSrc: undefined,
|
|
173
|
+
firstName: undefined,
|
|
174
|
+
secondName: undefined,
|
|
175
|
+
count: args.count,
|
|
176
|
+
badge: false,
|
|
177
|
+
badgeValue: undefined,
|
|
178
|
+
}),
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export const CountBadge: Story = {
|
|
182
|
+
name: 'Count + Badge',
|
|
183
|
+
args: {
|
|
184
|
+
imageSrc: undefined,
|
|
185
|
+
firstName: undefined,
|
|
186
|
+
secondName: undefined,
|
|
187
|
+
count: '5',
|
|
188
|
+
badge: true,
|
|
189
|
+
badgeValue: '3',
|
|
190
|
+
},
|
|
191
|
+
render: (args) =>
|
|
192
|
+
renderAvatarGallery(args, {
|
|
193
|
+
imageSrc: undefined,
|
|
194
|
+
firstName: undefined,
|
|
195
|
+
secondName: undefined,
|
|
196
|
+
count: args.count,
|
|
197
|
+
badge: true,
|
|
198
|
+
badgeValue: args.badgeValue,
|
|
199
|
+
}),
|
|
200
|
+
}
|
|
@@ -2,30 +2,36 @@ import type { Meta, StoryObj } from '@storybook/react'
|
|
|
2
2
|
|
|
3
3
|
import { icons24 } from '@itcase/icons-default'
|
|
4
4
|
|
|
5
|
-
import image from '../../../images/manager.png'
|
|
6
5
|
import { Avatar } from '../Avatar'
|
|
7
|
-
import {
|
|
6
|
+
import type { AvatarProps } from '../Avatar.interface'
|
|
7
|
+
import { avatarStoryImage, avatarStoryParameters } from './AvatarStories.config'
|
|
8
8
|
|
|
9
9
|
const meta = {
|
|
10
10
|
title: 'Molecules / Avatar / Image',
|
|
11
11
|
component: Avatar,
|
|
12
12
|
args: {
|
|
13
13
|
appearance: 'surfacePrimary size96 full circular',
|
|
14
|
-
imageSrc:
|
|
14
|
+
imageSrc: avatarStoryImage,
|
|
15
15
|
},
|
|
16
16
|
parameters: avatarStoryParameters,
|
|
17
17
|
} satisfies Meta<typeof Avatar>
|
|
18
|
-
|
|
19
18
|
export default meta
|
|
20
19
|
|
|
21
|
-
type Story = StoryObj<typeof
|
|
20
|
+
type Story = StoryObj<typeof meta>
|
|
22
21
|
|
|
23
|
-
export const Image: Story = {
|
|
22
|
+
export const Image: Story = {
|
|
23
|
+
render: (args: AvatarProps) => {
|
|
24
|
+
return <Avatar {...args} />
|
|
25
|
+
},
|
|
26
|
+
}
|
|
24
27
|
|
|
25
28
|
export const ImageWithIcon: Story = {
|
|
26
29
|
args: {
|
|
27
30
|
icon: icons24.Placeholder.Default,
|
|
28
31
|
},
|
|
32
|
+
render: (args: AvatarProps) => {
|
|
33
|
+
return <Avatar {...args} />
|
|
34
|
+
},
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
export const ImageWithBadge: Story = {
|
|
@@ -33,4 +39,7 @@ export const ImageWithBadge: Story = {
|
|
|
33
39
|
badge: true,
|
|
34
40
|
badgeValue: '5',
|
|
35
41
|
},
|
|
42
|
+
render: (args: AvatarProps) => {
|
|
43
|
+
return <Avatar {...args} />
|
|
44
|
+
},
|
|
36
45
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
|
|
3
3
|
import { Avatar } from '../Avatar'
|
|
4
|
+
import type { AvatarProps } from '../Avatar.interface'
|
|
4
5
|
import { avatarStoryParameters } from './AvatarStories.config'
|
|
5
6
|
|
|
6
7
|
const meta = {
|
|
@@ -16,10 +17,13 @@ const meta = {
|
|
|
16
17
|
|
|
17
18
|
export default meta
|
|
18
19
|
|
|
19
|
-
type Story = StoryObj<typeof
|
|
20
|
+
type Story = StoryObj<typeof meta>
|
|
20
21
|
|
|
21
22
|
export const onClick: Story = {
|
|
22
23
|
args: {
|
|
23
24
|
onPress: () => undefined,
|
|
24
25
|
},
|
|
26
|
+
render: (args: AvatarProps) => {
|
|
27
|
+
return <Avatar {...args} />
|
|
28
|
+
},
|
|
25
29
|
}
|
|
@@ -3,6 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react'
|
|
|
3
3
|
import { icons24 } from '@itcase/icons-default'
|
|
4
4
|
|
|
5
5
|
import { Avatar } from '../Avatar'
|
|
6
|
+
import type { AvatarProps } from '../Avatar.interface'
|
|
6
7
|
import { avatarStoryParameters } from './AvatarStories.config'
|
|
7
8
|
|
|
8
9
|
const meta = {
|
|
@@ -15,17 +16,23 @@ const meta = {
|
|
|
15
16
|
},
|
|
16
17
|
parameters: avatarStoryParameters,
|
|
17
18
|
} satisfies Meta<typeof Avatar>
|
|
18
|
-
|
|
19
19
|
export default meta
|
|
20
20
|
|
|
21
|
-
type Story = StoryObj<typeof
|
|
21
|
+
type Story = StoryObj<typeof meta>
|
|
22
22
|
|
|
23
|
-
export const Letters: Story = {
|
|
23
|
+
export const Letters: Story = {
|
|
24
|
+
render: (args: AvatarProps) => {
|
|
25
|
+
return <Avatar {...args} />
|
|
26
|
+
},
|
|
27
|
+
}
|
|
24
28
|
|
|
25
29
|
export const LettersWithIcon: Story = {
|
|
26
30
|
args: {
|
|
27
31
|
icon: icons24.Placeholder.Default,
|
|
28
32
|
},
|
|
33
|
+
render: (args: AvatarProps) => {
|
|
34
|
+
return <Avatar {...args} />
|
|
35
|
+
},
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
export const LettersWithBadge: Story = {
|
|
@@ -33,4 +40,7 @@ export const LettersWithBadge: Story = {
|
|
|
33
40
|
badge: true,
|
|
34
41
|
badgeValue: '5',
|
|
35
42
|
},
|
|
43
|
+
render: (args: AvatarProps) => {
|
|
44
|
+
return <Avatar {...args} />
|
|
45
|
+
},
|
|
36
46
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
|
|
3
3
|
import { Avatar } from '../Avatar'
|
|
4
|
+
import type { AvatarProps } from '../Avatar.interface'
|
|
4
5
|
import { avatarStoryParameters } from './AvatarStories.config'
|
|
5
6
|
|
|
6
7
|
const meta = {
|
|
@@ -12,43 +13,60 @@ const meta = {
|
|
|
12
13
|
},
|
|
13
14
|
parameters: avatarStoryParameters,
|
|
14
15
|
} satisfies Meta<typeof Avatar>
|
|
15
|
-
|
|
16
16
|
export default meta
|
|
17
17
|
|
|
18
|
-
type Story = StoryObj<typeof
|
|
18
|
+
type Story = StoryObj<typeof meta>
|
|
19
19
|
|
|
20
20
|
export const Circular: Story = {
|
|
21
21
|
args: {
|
|
22
22
|
appearance: 'surfacePrimary size96 solid circular',
|
|
23
23
|
},
|
|
24
|
+
render: (args: AvatarProps) => {
|
|
25
|
+
return <Avatar {...args} />
|
|
26
|
+
},
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export const Rounded: Story = {
|
|
27
30
|
args: {
|
|
28
31
|
appearance: 'surfacePrimary size96 solid rounded',
|
|
29
32
|
},
|
|
33
|
+
render: (args: AvatarProps) => {
|
|
34
|
+
return <Avatar {...args} />
|
|
35
|
+
},
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
export const RoundedXL: Story = {
|
|
33
39
|
args: {
|
|
34
40
|
appearance: 'surfacePrimary size96 solid roundedXL',
|
|
35
41
|
},
|
|
42
|
+
render: (args: AvatarProps) => {
|
|
43
|
+
return <Avatar {...args} />
|
|
44
|
+
},
|
|
36
45
|
}
|
|
37
46
|
|
|
38
47
|
export const RoundedL: Story = {
|
|
39
48
|
args: {
|
|
40
49
|
appearance: 'surfacePrimary size96 solid roundedL',
|
|
41
50
|
},
|
|
51
|
+
render: (args: AvatarProps) => {
|
|
52
|
+
return <Avatar {...args} />
|
|
53
|
+
},
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
export const RoundedM: Story = {
|
|
45
57
|
args: {
|
|
46
58
|
appearance: 'surfacePrimary size96 solid roundedM',
|
|
47
59
|
},
|
|
60
|
+
render: (args: AvatarProps) => {
|
|
61
|
+
return <Avatar {...args} />
|
|
62
|
+
},
|
|
48
63
|
}
|
|
49
64
|
|
|
50
65
|
export const RoundedS: Story = {
|
|
51
66
|
args: {
|
|
52
67
|
appearance: 'surfacePrimary size96 solid roundedS',
|
|
53
68
|
},
|
|
69
|
+
render: (args: AvatarProps) => {
|
|
70
|
+
return <Avatar {...args} />
|
|
71
|
+
},
|
|
54
72
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
|
|
3
3
|
import { Avatar } from '../Avatar'
|
|
4
|
+
import type { AvatarProps } from '../Avatar.interface'
|
|
4
5
|
import { avatarStoryParameters } from './AvatarStories.config'
|
|
5
6
|
|
|
6
7
|
const meta = {
|
|
@@ -12,67 +13,96 @@ const meta = {
|
|
|
12
13
|
},
|
|
13
14
|
parameters: avatarStoryParameters,
|
|
14
15
|
} satisfies Meta<typeof Avatar>
|
|
15
|
-
|
|
16
16
|
export default meta
|
|
17
17
|
|
|
18
|
-
type Story = StoryObj<typeof
|
|
18
|
+
type Story = StoryObj<typeof meta>
|
|
19
19
|
|
|
20
20
|
export const Size16: Story = {
|
|
21
21
|
args: {
|
|
22
22
|
appearance: 'surfacePrimary size16 solid circular',
|
|
23
23
|
},
|
|
24
|
+
render: (args: AvatarProps) => {
|
|
25
|
+
return <Avatar {...args} />
|
|
26
|
+
},
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
export const Size20: Story = {
|
|
27
30
|
args: {
|
|
28
31
|
appearance: 'surfacePrimary size20 solid circular',
|
|
29
32
|
},
|
|
33
|
+
render: (args: AvatarProps) => {
|
|
34
|
+
return <Avatar {...args} />
|
|
35
|
+
},
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
export const Size24: Story = {
|
|
33
39
|
args: {
|
|
34
40
|
appearance: 'surfacePrimary size24 solid circular',
|
|
35
41
|
},
|
|
42
|
+
render: (args: AvatarProps) => {
|
|
43
|
+
return <Avatar {...args} />
|
|
44
|
+
},
|
|
36
45
|
}
|
|
37
46
|
|
|
38
47
|
export const Size32: Story = {
|
|
39
48
|
args: {
|
|
40
49
|
appearance: 'surfacePrimary size32 solid circular',
|
|
41
50
|
},
|
|
51
|
+
render: (args: AvatarProps) => {
|
|
52
|
+
return <Avatar {...args} />
|
|
53
|
+
},
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
export const Size40: Story = {
|
|
45
57
|
args: {
|
|
46
58
|
appearance: 'surfacePrimary size40 solid circular',
|
|
47
59
|
},
|
|
60
|
+
render: (args: AvatarProps) => {
|
|
61
|
+
return <Avatar {...args} />
|
|
62
|
+
},
|
|
48
63
|
}
|
|
49
64
|
|
|
50
65
|
export const Size48: Story = {
|
|
51
66
|
args: {
|
|
52
67
|
appearance: 'surfacePrimary size48 solid circular',
|
|
53
68
|
},
|
|
69
|
+
render: (args: AvatarProps) => {
|
|
70
|
+
return <Avatar {...args} />
|
|
71
|
+
},
|
|
54
72
|
}
|
|
55
73
|
|
|
56
74
|
export const Size56: Story = {
|
|
57
75
|
args: {
|
|
58
76
|
appearance: 'surfacePrimary size56 solid circular',
|
|
59
77
|
},
|
|
78
|
+
render: (args: AvatarProps) => {
|
|
79
|
+
return <Avatar {...args} />
|
|
80
|
+
},
|
|
60
81
|
}
|
|
61
82
|
|
|
62
83
|
export const Size96: Story = {
|
|
63
84
|
args: {
|
|
64
85
|
appearance: 'surfacePrimary size96 solid circular',
|
|
65
86
|
},
|
|
87
|
+
render: (args: AvatarProps) => {
|
|
88
|
+
return <Avatar {...args} />
|
|
89
|
+
},
|
|
66
90
|
}
|
|
67
91
|
|
|
68
92
|
export const Size144: Story = {
|
|
69
93
|
args: {
|
|
70
94
|
appearance: 'surfacePrimary size144 solid circular',
|
|
71
95
|
},
|
|
96
|
+
render: (args: AvatarProps) => {
|
|
97
|
+
return <Avatar {...args} />
|
|
98
|
+
},
|
|
72
99
|
}
|
|
73
100
|
|
|
74
101
|
export const Size240: Story = {
|
|
75
102
|
args: {
|
|
76
103
|
appearance: 'surfacePrimary size240 solid circular',
|
|
77
104
|
},
|
|
105
|
+
render: (args: AvatarProps) => {
|
|
106
|
+
return <Avatar {...args} />
|
|
107
|
+
},
|
|
78
108
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { Group } from '../../Group'
|
|
4
|
+
import { Text } from '../../Text'
|
|
5
|
+
import { Avatar } from '../Avatar'
|
|
6
|
+
import type { AvatarProps } from '../Avatar.interface'
|
|
7
|
+
import {
|
|
8
|
+
avatarSizeKeys,
|
|
9
|
+
avatarStoryParameters,
|
|
10
|
+
avatarTypeOptions,
|
|
11
|
+
getAvatarTypeProps,
|
|
12
|
+
} from './AvatarStories.config'
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: 'Molecules / Avatar / Skeleton',
|
|
16
|
+
parameters: {
|
|
17
|
+
...avatarStoryParameters,
|
|
18
|
+
controls: {
|
|
19
|
+
include: [],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
} satisfies Meta
|
|
23
|
+
|
|
24
|
+
export default meta
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj
|
|
27
|
+
|
|
28
|
+
export const Skeleton: Story = {
|
|
29
|
+
render: () => (
|
|
30
|
+
<Group width="fill" direction="vertical" gap={24}>
|
|
31
|
+
{avatarTypeOptions.map((type) => (
|
|
32
|
+
<Group key={type} direction="vertical" gap={16}>
|
|
33
|
+
<Text size="l" textColor="surfaceTextQuaternary" weight="bold">
|
|
34
|
+
{type}
|
|
35
|
+
</Text>
|
|
36
|
+
<Group direction="horizontal" gap={16} wrap="wrap">
|
|
37
|
+
{avatarSizeKeys.map((sizeKey) => {
|
|
38
|
+
const appearance =
|
|
39
|
+
`surfacePrimary ${sizeKey} solid circular` as AvatarProps['appearance']
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Group
|
|
43
|
+
key={sizeKey}
|
|
44
|
+
direction="vertical"
|
|
45
|
+
alignItems="center"
|
|
46
|
+
gap={8}
|
|
47
|
+
>
|
|
48
|
+
<Text
|
|
49
|
+
size="xs"
|
|
50
|
+
textColor="surfaceTextQuaternary"
|
|
51
|
+
weight="bold"
|
|
52
|
+
>
|
|
53
|
+
{sizeKey.replace(/^size/, '')}
|
|
54
|
+
</Text>
|
|
55
|
+
<Avatar
|
|
56
|
+
{...getAvatarTypeProps(type)}
|
|
57
|
+
appearance={appearance}
|
|
58
|
+
isSkeleton={true}
|
|
59
|
+
/>
|
|
60
|
+
</Group>
|
|
61
|
+
)
|
|
62
|
+
})}
|
|
63
|
+
</Group>
|
|
64
|
+
</Group>
|
|
65
|
+
))}
|
|
66
|
+
</Group>
|
|
67
|
+
),
|
|
68
|
+
}
|
|
@@ -1,3 +1,100 @@
|
|
|
1
|
+
import avatarStoryImage from '../../../images/manager.png'
|
|
2
|
+
import { createComponentGallery } from '../../../storybook'
|
|
3
|
+
import { avatarAppearanceShape } from '../appearance/avatarShape'
|
|
4
|
+
import { avatarAppearanceSize } from '../appearance/avatarSize'
|
|
5
|
+
import { avatarAppearanceStyle } from '../appearance/avatarStyle'
|
|
6
|
+
import { avatarAppearanceSurface } from '../appearance/avatarSurface'
|
|
7
|
+
import type { AvatarAppearanceKey, AvatarProps } from '../Avatar.interface'
|
|
8
|
+
|
|
9
|
+
type AvatarSizeKey = keyof typeof avatarAppearanceSize
|
|
10
|
+
|
|
11
|
+
const isAvatarSizeKey = (value: string): value is AvatarSizeKey =>
|
|
12
|
+
value in avatarAppearanceSize
|
|
13
|
+
|
|
14
|
+
const avatarSizeKeys = Object.keys(avatarAppearanceSize).filter(isAvatarSizeKey)
|
|
15
|
+
|
|
16
|
+
const avatarTypeOptions = [
|
|
17
|
+
'letters',
|
|
18
|
+
'letters-badge',
|
|
19
|
+
'image',
|
|
20
|
+
'image-badge',
|
|
21
|
+
'count',
|
|
22
|
+
'count-badge',
|
|
23
|
+
] as const
|
|
24
|
+
|
|
25
|
+
const getAvatarTypeProps = (
|
|
26
|
+
type: (typeof avatarTypeOptions)[number],
|
|
27
|
+
): Pick<
|
|
28
|
+
AvatarProps,
|
|
29
|
+
'badge' | 'badgeValue' | 'count' | 'firstName' | 'imageSrc' | 'secondName'
|
|
30
|
+
> => {
|
|
31
|
+
switch (type) {
|
|
32
|
+
case 'letters':
|
|
33
|
+
return {
|
|
34
|
+
firstName: 'John',
|
|
35
|
+
secondName: 'Doe',
|
|
36
|
+
badge: false,
|
|
37
|
+
badgeValue: undefined,
|
|
38
|
+
count: undefined,
|
|
39
|
+
imageSrc: undefined,
|
|
40
|
+
}
|
|
41
|
+
case 'letters-badge':
|
|
42
|
+
return {
|
|
43
|
+
firstName: 'John',
|
|
44
|
+
secondName: 'Doe',
|
|
45
|
+
badge: true,
|
|
46
|
+
badgeValue: '3',
|
|
47
|
+
count: undefined,
|
|
48
|
+
imageSrc: undefined,
|
|
49
|
+
}
|
|
50
|
+
case 'image':
|
|
51
|
+
return {
|
|
52
|
+
firstName: undefined,
|
|
53
|
+
secondName: undefined,
|
|
54
|
+
badge: false,
|
|
55
|
+
badgeValue: undefined,
|
|
56
|
+
count: undefined,
|
|
57
|
+
imageSrc: avatarStoryImage,
|
|
58
|
+
}
|
|
59
|
+
case 'image-badge':
|
|
60
|
+
return {
|
|
61
|
+
firstName: undefined,
|
|
62
|
+
secondName: undefined,
|
|
63
|
+
badge: true,
|
|
64
|
+
badgeValue: '3',
|
|
65
|
+
count: undefined,
|
|
66
|
+
imageSrc: avatarStoryImage,
|
|
67
|
+
}
|
|
68
|
+
case 'count':
|
|
69
|
+
return {
|
|
70
|
+
firstName: undefined,
|
|
71
|
+
secondName: undefined,
|
|
72
|
+
badge: false,
|
|
73
|
+
badgeValue: undefined,
|
|
74
|
+
count: '5',
|
|
75
|
+
imageSrc: undefined,
|
|
76
|
+
}
|
|
77
|
+
case 'count-badge':
|
|
78
|
+
return {
|
|
79
|
+
firstName: undefined,
|
|
80
|
+
secondName: undefined,
|
|
81
|
+
badge: true,
|
|
82
|
+
badgeValue: '3',
|
|
83
|
+
count: '5',
|
|
84
|
+
imageSrc: undefined,
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const avatarGallery = createComponentGallery<AvatarAppearanceKey>({
|
|
90
|
+
size: avatarAppearanceSize,
|
|
91
|
+
appearanceGroups: {
|
|
92
|
+
surface: avatarAppearanceSurface,
|
|
93
|
+
},
|
|
94
|
+
shape: avatarAppearanceShape,
|
|
95
|
+
style: avatarAppearanceStyle,
|
|
96
|
+
})
|
|
97
|
+
|
|
1
98
|
const AVATAR_FIGMA_URL =
|
|
2
99
|
'https://www.figma.com/design/FcCWZlLa17BPr0zh3Wq9DO/ITCase---Molecules?node-id=3-2'
|
|
3
100
|
|
|
@@ -9,4 +106,13 @@ const avatarStoryParameters = {
|
|
|
9
106
|
},
|
|
10
107
|
}
|
|
11
108
|
|
|
12
|
-
export {
|
|
109
|
+
export {
|
|
110
|
+
AVATAR_FIGMA_URL,
|
|
111
|
+
avatarGallery,
|
|
112
|
+
avatarSizeKeys,
|
|
113
|
+
avatarStoryImage,
|
|
114
|
+
avatarStoryParameters,
|
|
115
|
+
avatarTypeOptions,
|
|
116
|
+
getAvatarTypeProps,
|
|
117
|
+
}
|
|
118
|
+
export type { AvatarSizeKey }
|