react-miui 0.32.1 → 0.32.3
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/.claude/settings.local.json +8 -0
- package/CHANGELOG.md +23 -0
- package/CLAUDE.md +67 -0
- package/dist/components/form/Checkbox.d.ts.map +1 -1
- package/dist/components/form/Checkbox.js.map +1 -1
- package/dist/components/form/ColorPicker.d.ts.map +1 -1
- package/dist/components/form/ColorPicker.js.map +1 -1
- package/dist/components/form/Suggestions.d.ts +1 -1
- package/dist/components/form/Suggestions.d.ts.map +1 -1
- package/dist/components/form/Toggle.d.ts.map +1 -1
- package/dist/components/form/Toggle.js.map +1 -1
- package/dist/components/form/choice/Choice.d.ts +1 -1
- package/dist/components/form/choice/Choice.d.ts.map +1 -1
- package/dist/components/form/choice/Choice.js +1 -1
- package/dist/components/form/choice/Choice.js.map +1 -1
- package/dist/components/form/choice/ChoiceItem.d.ts.map +1 -1
- package/dist/components/form/choice/ChoiceItem.js +3 -2
- package/dist/components/form/choice/ChoiceItem.js.map +1 -1
- package/dist/components/form/input/Input.d.ts +5 -2
- package/dist/components/form/input/Input.d.ts.map +1 -1
- package/dist/components/form/input/Input.js +18 -9
- package/dist/components/form/input/Input.js.map +1 -1
- package/dist/components/form/input/Input.styled.d.ts.map +1 -1
- package/dist/components/form/input/Input.styled.js.map +1 -1
- package/dist/components/form/textarea/TextArea.styled.d.ts.map +1 -1
- package/dist/components/form/textarea/TextArea.styled.js +1 -1
- package/dist/components/form/textarea/TextArea.styled.js.map +1 -1
- package/dist/components/icons/Back.d.ts +1 -1
- package/dist/components/icons/Back.d.ts.map +1 -1
- package/dist/components/icons/Back.js +38 -7
- package/dist/components/icons/Back.js.map +1 -1
- package/dist/components/icons/Battery.d.ts +1 -1
- package/dist/components/icons/Battery.d.ts.map +1 -1
- package/dist/components/icons/Battery.js +38 -7
- package/dist/components/icons/Battery.js.map +1 -1
- package/dist/components/icons/Checkmark.d.ts +1 -1
- package/dist/components/icons/Checkmark.d.ts.map +1 -1
- package/dist/components/icons/Checkmark.js +38 -7
- package/dist/components/icons/Checkmark.js.map +1 -1
- package/dist/components/icons/Config.d.ts +1 -1
- package/dist/components/icons/Config.d.ts.map +1 -1
- package/dist/components/icons/Config.js +38 -7
- package/dist/components/icons/Config.js.map +1 -1
- package/dist/components/icons/Dots.d.ts +1 -1
- package/dist/components/icons/Dots.d.ts.map +1 -1
- package/dist/components/icons/Dots.js +38 -7
- package/dist/components/icons/Dots.js.map +1 -1
- package/dist/components/icons/Forward.d.ts +1 -1
- package/dist/components/icons/Forward.d.ts.map +1 -1
- package/dist/components/icons/Forward.js +38 -7
- package/dist/components/icons/Forward.js.map +1 -1
- package/dist/components/icons/Heart.d.ts +1 -1
- package/dist/components/icons/Heart.d.ts.map +1 -1
- package/dist/components/icons/Heart.js +38 -7
- package/dist/components/icons/Heart.js.map +1 -1
- package/dist/components/icons/Icon.d.ts +1 -1
- package/dist/components/icons/Icon.d.ts.map +1 -1
- package/dist/components/icons/Icon.js +43 -12
- package/dist/components/icons/Icon.js.map +1 -1
- package/dist/components/icons/Search.d.ts +1 -1
- package/dist/components/icons/Search.d.ts.map +1 -1
- package/dist/components/icons/Search.js +38 -7
- package/dist/components/icons/Search.js.map +1 -1
- package/dist/components/icons/Trash.d.ts +1 -1
- package/dist/components/icons/Trash.d.ts.map +1 -1
- package/dist/components/icons/Trash.js +38 -7
- package/dist/components/icons/Trash.js.map +1 -1
- package/dist/components/layout/header/Header.d.ts.map +1 -1
- package/dist/components/layout/header/Header.js.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.d.ts +3 -2
- package/dist/components/layout/header/HeaderIconAction.d.ts.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.js +45 -11
- package/dist/components/layout/header/HeaderIconAction.js.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.styled.d.ts +87 -2
- package/dist/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.styled.js +4 -3
- package/dist/components/layout/header/HeaderIconAction.styled.js.map +1 -1
- package/dist/components/layout/header/StickyHeader.d.ts.map +1 -1
- package/dist/components/layout/header/StickyHeader.js.map +1 -1
- package/dist/components/layout/list/Header.d.ts +96 -93
- package/dist/components/layout/list/Header.d.ts.map +1 -1
- package/dist/components/layout/list/Header.js +43 -9
- package/dist/components/layout/list/Header.js.map +1 -1
- package/dist/components/layout/list/Item.d.ts +273 -7
- package/dist/components/layout/list/Item.d.ts.map +1 -1
- package/dist/components/layout/list/Item.js +52 -17
- package/dist/components/layout/list/Item.js.map +1 -1
- package/dist/components/layout/list/Item.styled.d.ts +1 -1
- package/dist/components/layout/list/Label.d.ts.map +1 -1
- package/dist/components/layout/list/Label.js.map +1 -1
- package/dist/components/layout/list/List.d.ts +547 -94
- package/dist/components/layout/list/List.d.ts.map +1 -1
- package/dist/components/layout/list/List.js +46 -10
- package/dist/components/layout/list/List.js.map +1 -1
- package/dist/components/layout/section/Section.d.ts.map +1 -1
- package/dist/components/layout/section/Section.js.map +1 -1
- package/dist/components/ui/action/Action.d.ts +5 -3
- package/dist/components/ui/action/Action.d.ts.map +1 -1
- package/dist/components/ui/action/Action.js +46 -10
- package/dist/components/ui/action/Action.js.map +1 -1
- package/dist/components/ui/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer/Drawer.js.map +1 -1
- package/dist/components/ui/keyValue/KeyValue.d.ts +2 -2
- package/dist/components/ui/keyValue/KeyValue.d.ts.map +1 -1
- package/dist/components/ui/keyValue/KeyValue.js +2 -2
- package/dist/components/ui/keyValue/KeyValue.js.map +1 -1
- package/dist/components/ui/loader/CoveringLoader.d.ts.map +1 -1
- package/dist/components/ui/loader/CoveringLoader.js +1 -1
- package/dist/components/ui/loader/CoveringLoader.js.map +1 -1
- package/dist/components/ui/loader/FullLoader.d.ts +1 -1
- package/dist/components/ui/loader/FullLoader.d.ts.map +1 -1
- package/dist/components/ui/loader/FullLoader.js +50 -6
- package/dist/components/ui/loader/FullLoader.js.map +1 -1
- package/dist/components/ui/loader/Loader.d.ts +2 -1
- package/dist/components/ui/loader/Loader.d.ts.map +1 -1
- package/dist/components/ui/loader/Loader.js +41 -9
- package/dist/components/ui/loader/Loader.js.map +1 -1
- package/dist/components/ui/loader/Loading.d.ts.map +1 -1
- package/dist/components/ui/loader/Loading.js +2 -1
- package/dist/components/ui/loader/Loading.js.map +1 -1
- package/dist/components/ui/loader/PopLoader.d.ts +2 -3
- package/dist/components/ui/loader/PopLoader.d.ts.map +1 -1
- package/dist/components/ui/loader/PopLoader.js +40 -8
- package/dist/components/ui/loader/PopLoader.js.map +1 -1
- package/dist/components/ui/message/Message.d.ts.map +1 -1
- package/dist/components/ui/message/Message.js.map +1 -1
- package/dist/components/ui/message/Message.styled.d.ts +1 -1
- package/dist/components/ui/modal/Modal.d.ts +92 -6
- package/dist/components/ui/modal/Modal.d.ts.map +1 -1
- package/dist/components/ui/modal/Modal.js +19 -7
- package/dist/components/ui/modal/Modal.js.map +1 -1
- package/dist/components/ui/modal/Modal.styled.d.ts.map +1 -1
- package/dist/components/ui/modal/Modal.styled.js +1 -0
- package/dist/components/ui/modal/Modal.styled.js.map +1 -1
- package/dist/components/ui/modal/ModalButtons.styled.d.ts.map +1 -1
- package/dist/components/ui/modal/ModalButtons.styled.js.map +1 -1
- package/dist/components/ui/pop/OnButtonClick.d.ts.map +1 -1
- package/dist/components/ui/pop/OnButtonClick.js +3 -2
- package/dist/components/ui/pop/OnButtonClick.js.map +1 -1
- package/dist/components/ui/pop/Pop.d.ts +3 -1
- package/dist/components/ui/pop/Pop.d.ts.map +1 -1
- package/dist/components/ui/pop/Pop.js +7 -2
- package/dist/components/ui/pop/Pop.js.map +1 -1
- package/dist/components/ui/pop/PopOption.d.ts +4 -2
- package/dist/components/ui/pop/PopOption.d.ts.map +1 -1
- package/dist/components/ui/pop/PopOption.js +44 -8
- package/dist/components/ui/pop/PopOption.js.map +1 -1
- package/dist/components/ui/progress/Progress.d.ts.map +1 -1
- package/dist/components/ui/progress/Progress.js.map +1 -1
- package/dist/components/ui/progress/Progress.styled.js +1 -1
- package/dist/components/ui/stats/Stats.d.ts.map +1 -1
- package/dist/components/ui/tabs/Item.d.ts.map +1 -1
- package/dist/components/ui/tabs/Item.js +3 -2
- package/dist/components/ui/tabs/Item.js.map +1 -1
- package/dist/components/ui/tabs/Item.styled.d.ts.map +1 -1
- package/dist/components/ui/tabs/Item.styled.js +2 -0
- package/dist/components/ui/tabs/Item.styled.js.map +1 -1
- package/dist/components/ui/tabs/Selector.d.ts +2 -1
- package/dist/components/ui/tabs/Selector.d.ts.map +1 -1
- package/dist/components/ui/tabs/Selector.js +60 -4
- package/dist/components/ui/tabs/Selector.js.map +1 -1
- package/dist/components/ui/tabs/Selector.styled.d.ts +9 -1
- package/dist/components/ui/tabs/Selector.styled.d.ts.map +1 -1
- package/dist/components/ui/tabs/Selector.styled.js +68 -2
- package/dist/components/ui/tabs/Selector.styled.js.map +1 -1
- package/dist/components/ui/toaster/Notification.d.ts.map +1 -1
- package/dist/components/ui/toaster/Notification.js +4 -2
- package/dist/components/ui/toaster/Notification.js.map +1 -1
- package/dist/components/utils/HandleEsc.d.ts.map +1 -1
- package/dist/components/utils/HandleEsc.js +5 -5
- package/dist/components/utils/HandleEsc.js.map +1 -1
- package/dist/utils/useTailSpin.js +1 -1
- package/dist/utils/useTailSpin.js.map +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/index.Pop.html +7 -7
- package/docs/classes/index.ToasterProvider.html +4 -4
- package/docs/documents/Test.html +2 -2
- package/docs/enums/index.ICON.html +2 -2
- package/docs/functions/index.Action.html +6 -25
- package/docs/functions/index.Button.html +3 -3
- package/docs/functions/index.Card.html +2 -2
- package/docs/functions/index.Checkbox.html +3 -3
- package/docs/functions/index.Choice.html +2 -2
- package/docs/functions/index.ColorPicker.html +3 -3
- package/docs/functions/index.CoveringLoader.html +3 -3
- package/docs/functions/index.DirectionPad.html +2 -2
- package/docs/functions/index.Drawer.html +2 -2
- package/docs/functions/index.EqualActions.html +2 -2
- package/docs/functions/index.FullLoader.html +6 -25
- package/docs/functions/index.Gap.html +2 -2
- package/docs/functions/index.HandleEsc.html +3 -3
- package/docs/functions/index.Header.html +3 -3
- package/docs/functions/index.HeaderIconAction.html +6 -25
- package/docs/functions/index.Icon-1.html +5 -24
- package/docs/functions/index.If.html +3 -3
- package/docs/functions/index.Input.html +1 -1
- package/docs/functions/index.KeyValue.html +2 -2
- package/docs/functions/index.Label.html +2 -2
- package/docs/functions/index.Line.html +3 -3
- package/docs/functions/index.List.html +5 -33
- package/docs/functions/index.Loader.html +6 -25
- package/docs/functions/index.Loading.html +3 -3
- package/docs/functions/index.Message.html +3 -3
- package/docs/functions/index.Modal.html +5 -24
- package/docs/functions/index.ModalButtons.html +3 -3
- package/docs/functions/index.PopLoader.html +6 -25
- package/docs/functions/index.PopOption.html +5 -24
- package/docs/functions/index.Progress.html +2 -2
- package/docs/functions/index.SearchContainer.html +2 -2
- package/docs/functions/index.Section.html +4 -4
- package/docs/functions/index.Select.html +2 -2
- package/docs/functions/index.Selector.html +2 -2
- package/docs/functions/index.Spacer.html +2 -2
- package/docs/functions/index.Stats.html +2 -2
- package/docs/functions/index.StickyHeader.html +4 -4
- package/docs/functions/index.Table.html +2 -2
- package/docs/functions/index.TextArea.html +2 -2
- package/docs/functions/index.Toggle.html +3 -3
- package/docs/functions/index.ToolButton.html +3 -3
- package/docs/functions/index.borderPxToRem.html +1 -1
- package/docs/functions/index.createTheme.html +1 -1
- package/docs/functions/index.css.html +1 -1
- package/docs/functions/index.dimensionsPxToRem.html +1 -1
- package/docs/functions/index.fontPxToRem.html +1 -1
- package/docs/functions/index.getCssText.html +1 -1
- package/docs/functions/index.globalCss.html +2 -2
- package/docs/functions/index.injectGlobalStyles.html +1 -1
- package/docs/functions/index.keyframes.html +1 -1
- package/docs/functions/index.pxToRem.html +1 -1
- package/docs/functions/index.styled.html +1 -1
- package/docs/functions/index.useToaster.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/index.IconProps.html +2 -2
- package/docs/interfaces/index.InputCustomProps.html +2 -2
- package/docs/interfaces/index.LoaderProps.html +7 -6
- package/docs/interfaces/index.StickyHeaderProps.html +4 -4
- package/docs/modules/index.html +1 -1
- package/docs/modules.html +1 -1
- package/docs/types/index.ActionProps.html +1 -1
- package/docs/types/index.CardProps.html +1 -1
- package/docs/types/index.CheckboxProps.html +2 -2
- package/docs/types/index.ChoiceProps.html +1 -1
- package/docs/types/index.ColorPickerProps.html +1 -1
- package/docs/types/index.DirectionPadProps.html +1 -1
- package/docs/types/index.DrawerProps.html +1 -1
- package/docs/types/index.EqualActionsProps.html +1 -1
- package/docs/types/index.HeaderProps.html +1 -1
- package/docs/types/index.InputProps.html +1 -1
- package/docs/types/index.KeyValueProps.html +1 -1
- package/docs/types/index.LabelProps.html +1 -1
- package/docs/types/index.OverwriteProps.html +1 -1
- package/docs/types/index.ProgressProps.html +2 -2
- package/docs/types/index.SelectProps.html +1 -1
- package/docs/types/index.SelectorProps.html +1 -1
- package/docs/types/index.Stat.html +1 -1
- package/docs/types/index.StatsProps.html +1 -1
- package/docs/types/index.TextAreaProps.html +1 -1
- package/docs/types/index.ThemeCSS.html +1 -1
- package/docs/types/index.ToggleProps.html +2 -2
- package/docs/variables/index.ActionBadgeSelector.html +1 -0
- package/docs/variables/index.ActionCircleSelector.html +1 -0
- package/docs/variables/index.CheckboxCheckmarkWrapperSelector.html +1 -1
- package/docs/variables/index.CheckboxTextLabelSelector.html +1 -1
- package/docs/variables/index.ChoiceItemSelector.html +1 -1
- package/docs/variables/index.ColorPickerColorDisplaySelector.html +1 -1
- package/docs/variables/index.DirectionPadButtonDotSelector.html +1 -1
- package/docs/variables/index.DirectionPadButtonSelector.html +1 -1
- package/docs/variables/index.DirectionPadLineSelector.html +1 -1
- package/docs/variables/index.DirectionPadMiddleSelector.html +1 -1
- package/docs/variables/index.DrawerContentSelector.html +1 -1
- package/docs/variables/index.HeaderAfterSelector.html +1 -1
- package/docs/variables/index.HeaderBeforeSelector.html +1 -1
- package/docs/variables/index.HeaderContentsSelector.html +1 -1
- package/docs/variables/index.HeaderIconActionIconSelector.html +1 -0
- package/docs/variables/index.InputInputSelector.html +1 -0
- package/docs/variables/index.InputPrefixSelector.html +1 -0
- package/docs/variables/index.InputSuffixSelector.html +1 -0
- package/docs/variables/index.KeyValueIconSelector.html +1 -1
- package/docs/variables/index.KeyValueItemSelector.html +1 -1
- package/docs/variables/index.KeyValueKeySelector.html +1 -1
- package/docs/variables/index.KeyValuePairSelector.html +1 -1
- package/docs/variables/index.KeyValueValueSelector.html +1 -1
- package/docs/variables/index.LabelTextSelector.html +1 -1
- package/docs/variables/index.ListItemInnerContainerClassNameSelector.html +1 -0
- package/docs/variables/index.ModalContainerSelector.html +1 -0
- package/docs/variables/index.ModalRemovePaddingSelector.html +1 -0
- package/docs/variables/index.ModalTitleSelector.html +1 -0
- package/docs/variables/index.PopListSelector.html +1 -0
- package/docs/variables/index.PopOptionButtonSelector.html +1 -0
- package/docs/variables/index.PopOptionIconSelector.html +1 -0
- package/docs/variables/index.PopOverlaySelector.html +1 -0
- package/docs/variables/index.ProgressBackgroundSelector.html +1 -1
- package/docs/variables/index.ProgressValueSelector.html +1 -1
- package/docs/variables/index.SelectorItemSelector.html +1 -1
- package/docs/variables/index.StatsItemSelector.html +1 -1
- package/docs/variables/index.StatsLabelSelector.html +1 -1
- package/docs/variables/index.StatsSeparatorSelector.html +1 -1
- package/docs/variables/index.StatsValueSelector.html +1 -1
- package/docs/variables/index.ToggleStyledToggleSelector.html +1 -1
- package/docs/variables/index.config.html +1 -1
- package/docs/variables/index.cssReset.html +2 -2
- package/docs/variables/index.darkTheme.html +1 -1
- package/docs/variables/index.miuiScrollbars.html +1 -1
- package/docs/variables/index.theme.html +1 -1
- package/esm/components/form/Checkbox.d.ts.map +1 -1
- package/esm/components/form/Checkbox.js.map +1 -1
- package/esm/components/form/Checkbox.stories.d.ts +1 -1
- package/esm/components/form/Checkbox.stories.d.ts.map +1 -1
- package/esm/components/form/Checkbox.stories.js +1 -1
- package/esm/components/form/Checkbox.stories.js.map +1 -1
- package/esm/components/form/ColorPicker.d.ts.map +1 -1
- package/esm/components/form/ColorPicker.js.map +1 -1
- package/esm/components/form/ColorPicker.stories.d.ts +1 -1
- package/esm/components/form/ColorPicker.stories.d.ts.map +1 -1
- package/esm/components/form/ColorPicker.stories.js.map +1 -1
- package/esm/components/form/Label.stories.d.ts.map +1 -1
- package/esm/components/form/Label.stories.js.map +1 -1
- package/esm/components/form/Label.styled.js +1 -1
- package/esm/components/form/Label.styled.js.map +1 -1
- package/esm/components/form/Select.stories.d.ts +1 -1
- package/esm/components/form/Select.stories.d.ts.map +1 -1
- package/esm/components/form/Suggestions.d.ts +1 -1
- package/esm/components/form/Suggestions.d.ts.map +1 -1
- package/esm/components/form/Toggle.d.ts.map +1 -1
- package/esm/components/form/Toggle.js.map +1 -1
- package/esm/components/form/Toggle.styled.js +1 -1
- package/esm/components/form/Toggle.styled.js.map +1 -1
- package/esm/components/form/choice/Choice.d.ts +1 -1
- package/esm/components/form/choice/Choice.d.ts.map +1 -1
- package/esm/components/form/choice/Choice.js +1 -1
- package/esm/components/form/choice/Choice.js.map +1 -1
- package/esm/components/form/choice/Choice.stories.d.ts +1 -1
- package/esm/components/form/choice/Choice.stories.d.ts.map +1 -1
- package/esm/components/form/choice/Choice.stories.js.map +1 -1
- package/esm/components/form/choice/ChoiceItem.d.ts.map +1 -1
- package/esm/components/form/choice/ChoiceItem.js +3 -2
- package/esm/components/form/choice/ChoiceItem.js.map +1 -1
- package/esm/components/form/input/Input.d.ts +5 -2
- package/esm/components/form/input/Input.d.ts.map +1 -1
- package/esm/components/form/input/Input.js +17 -11
- package/esm/components/form/input/Input.js.map +1 -1
- package/esm/components/form/input/Input.stories.d.ts +1 -1
- package/esm/components/form/input/Input.stories.d.ts.map +1 -1
- package/esm/components/form/input/Input.stories.js +1 -1
- package/esm/components/form/input/Input.stories.js.map +1 -1
- package/esm/components/form/input/Input.styled.d.ts.map +1 -1
- package/esm/components/form/input/Input.styled.js.map +1 -1
- package/esm/components/form/textarea/TextArea.stories.d.ts +1 -1
- package/esm/components/form/textarea/TextArea.stories.d.ts.map +1 -1
- package/esm/components/form/textarea/TextArea.styled.d.ts.map +1 -1
- package/esm/components/form/textarea/TextArea.styled.js +1 -1
- package/esm/components/form/textarea/TextArea.styled.js.map +1 -1
- package/esm/components/icons/Back.d.ts +1 -1
- package/esm/components/icons/Back.d.ts.map +1 -1
- package/esm/components/icons/Back.js +5 -4
- package/esm/components/icons/Back.js.map +1 -1
- package/esm/components/icons/Battery.d.ts +1 -1
- package/esm/components/icons/Battery.d.ts.map +1 -1
- package/esm/components/icons/Battery.js +5 -4
- package/esm/components/icons/Battery.js.map +1 -1
- package/esm/components/icons/Checkmark.d.ts +1 -1
- package/esm/components/icons/Checkmark.d.ts.map +1 -1
- package/esm/components/icons/Checkmark.js +5 -4
- package/esm/components/icons/Checkmark.js.map +1 -1
- package/esm/components/icons/Config.d.ts +1 -1
- package/esm/components/icons/Config.d.ts.map +1 -1
- package/esm/components/icons/Config.js +5 -4
- package/esm/components/icons/Config.js.map +1 -1
- package/esm/components/icons/Dots.d.ts +1 -1
- package/esm/components/icons/Dots.d.ts.map +1 -1
- package/esm/components/icons/Dots.js +5 -4
- package/esm/components/icons/Dots.js.map +1 -1
- package/esm/components/icons/Forward.d.ts +1 -1
- package/esm/components/icons/Forward.d.ts.map +1 -1
- package/esm/components/icons/Forward.js +5 -4
- package/esm/components/icons/Forward.js.map +1 -1
- package/esm/components/icons/Heart.d.ts +1 -1
- package/esm/components/icons/Heart.d.ts.map +1 -1
- package/esm/components/icons/Heart.js +5 -4
- package/esm/components/icons/Heart.js.map +1 -1
- package/esm/components/icons/Icon.d.ts +1 -1
- package/esm/components/icons/Icon.d.ts.map +1 -1
- package/esm/components/icons/Icon.js +10 -9
- package/esm/components/icons/Icon.js.map +1 -1
- package/esm/components/icons/Icon.stories.d.ts.map +1 -1
- package/esm/components/icons/Icon.stories.js +1 -1
- package/esm/components/icons/Icon.stories.js.map +1 -1
- package/esm/components/icons/Search.d.ts +1 -1
- package/esm/components/icons/Search.d.ts.map +1 -1
- package/esm/components/icons/Search.js +5 -4
- package/esm/components/icons/Search.js.map +1 -1
- package/esm/components/icons/Trash.d.ts +1 -1
- package/esm/components/icons/Trash.d.ts.map +1 -1
- package/esm/components/icons/Trash.js +5 -4
- package/esm/components/icons/Trash.js.map +1 -1
- package/esm/components/layout/card/Card.stories.d.ts.map +1 -1
- package/esm/components/layout/card/Card.stories.js.map +1 -1
- package/esm/components/layout/header/Header.d.ts.map +1 -1
- package/esm/components/layout/header/Header.js.map +1 -1
- package/esm/components/layout/header/Header.stories.d.ts +1 -1
- package/esm/components/layout/header/Header.stories.d.ts.map +1 -1
- package/esm/components/layout/header/Header.stories.js.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.d.ts +3 -2
- package/esm/components/layout/header/HeaderIconAction.d.ts.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.js +12 -9
- package/esm/components/layout/header/HeaderIconAction.js.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.stories.d.ts +5 -4
- package/esm/components/layout/header/HeaderIconAction.stories.d.ts.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.stories.js +20 -1
- package/esm/components/layout/header/HeaderIconAction.stories.js.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.styled.d.ts +87 -2
- package/esm/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.styled.js +4 -4
- package/esm/components/layout/header/HeaderIconAction.styled.js.map +1 -1
- package/esm/components/layout/header/StickyHeader.d.ts.map +1 -1
- package/esm/components/layout/header/StickyHeader.js +1 -1
- package/esm/components/layout/header/StickyHeader.js.map +1 -1
- package/esm/components/layout/header/StickyHeader.stories.d.ts +1 -1
- package/esm/components/layout/header/StickyHeader.stories.d.ts.map +1 -1
- package/esm/components/layout/header/StickyHeader.stories.js +1 -1
- package/esm/components/layout/header/StickyHeader.stories.js.map +1 -1
- package/esm/components/layout/list/Header.d.ts +96 -93
- package/esm/components/layout/list/Header.d.ts.map +1 -1
- package/esm/components/layout/list/Header.js +10 -7
- package/esm/components/layout/list/Header.js.map +1 -1
- package/esm/components/layout/list/Header.stories.d.ts +1 -1
- package/esm/components/layout/list/Header.stories.d.ts.map +1 -1
- package/esm/components/layout/list/Item.d.ts +273 -7
- package/esm/components/layout/list/Item.d.ts.map +1 -1
- package/esm/components/layout/list/Item.js +18 -13
- package/esm/components/layout/list/Item.js.map +1 -1
- package/esm/components/layout/list/Item.stories.d.ts +1 -1
- package/esm/components/layout/list/Item.stories.d.ts.map +1 -1
- package/esm/components/layout/list/Item.stories.js +1 -1
- package/esm/components/layout/list/Item.stories.js.map +1 -1
- package/esm/components/layout/list/Item.styled.d.ts +1 -1
- package/esm/components/layout/list/Label.d.ts.map +1 -1
- package/esm/components/layout/list/Label.js.map +1 -1
- package/esm/components/layout/list/Label.stories.d.ts +1 -1
- package/esm/components/layout/list/Label.stories.d.ts.map +1 -1
- package/esm/components/layout/list/Label.stories.js +1 -1
- package/esm/components/layout/list/Label.stories.js.map +1 -1
- package/esm/components/layout/list/List.d.ts +547 -94
- package/esm/components/layout/list/List.d.ts.map +1 -1
- package/esm/components/layout/list/List.js +13 -8
- package/esm/components/layout/list/List.js.map +1 -1
- package/esm/components/layout/list/List.stories.d.ts +1 -1
- package/esm/components/layout/list/List.stories.d.ts.map +1 -1
- package/esm/components/layout/list/List.stories.js +1 -1
- package/esm/components/layout/list/List.stories.js.map +1 -1
- package/esm/components/layout/list/Value.stories.d.ts +1 -1
- package/esm/components/layout/list/Value.stories.d.ts.map +1 -1
- package/esm/components/layout/list/Value.stories.js +2 -2
- package/esm/components/layout/list/Value.stories.js.map +1 -1
- package/esm/components/layout/section/Section.d.ts.map +1 -1
- package/esm/components/layout/section/Section.js.map +1 -1
- package/esm/components/layout/section/Section.stories.d.ts +1 -1
- package/esm/components/layout/section/Section.stories.d.ts.map +1 -1
- package/esm/components/layout/section/Section.stories.js +1 -1
- package/esm/components/layout/section/Section.stories.js.map +1 -1
- package/esm/components/layout/table/Table.stories.d.ts +1 -1
- package/esm/components/layout/table/Table.stories.d.ts.map +1 -1
- package/esm/components/ui/action/Action.d.ts +5 -3
- package/esm/components/ui/action/Action.d.ts.map +1 -1
- package/esm/components/ui/action/Action.js +11 -7
- package/esm/components/ui/action/Action.js.map +1 -1
- package/esm/components/ui/action/Action.stories.d.ts +1 -1
- package/esm/components/ui/action/Action.stories.d.ts.map +1 -1
- package/esm/components/ui/action/EqualActions.stories.d.ts.map +1 -1
- package/esm/components/ui/action/EqualActions.stories.js +1 -1
- package/esm/components/ui/action/EqualActions.stories.js.map +1 -1
- package/esm/components/ui/button/Button.stories.d.ts +1 -1
- package/esm/components/ui/button/Button.stories.d.ts.map +1 -1
- package/esm/components/ui/button/Button.stories.js.map +1 -1
- package/esm/components/ui/directionPad/Pad.js +1 -1
- package/esm/components/ui/directionPad/Pad.js.map +1 -1
- package/esm/components/ui/directionPad/Pad.stories.js +1 -1
- package/esm/components/ui/directionPad/Pad.stories.js.map +1 -1
- package/esm/components/ui/drawer/Drawer.d.ts.map +1 -1
- package/esm/components/ui/drawer/Drawer.js +1 -1
- package/esm/components/ui/drawer/Drawer.js.map +1 -1
- package/esm/components/ui/drawer/Drawer.stories.d.ts.map +1 -1
- package/esm/components/ui/drawer/Drawer.stories.js +3 -2
- package/esm/components/ui/drawer/Drawer.stories.js.map +1 -1
- package/esm/components/ui/keyValue/KeyValue.d.ts +2 -2
- package/esm/components/ui/keyValue/KeyValue.d.ts.map +1 -1
- package/esm/components/ui/keyValue/KeyValue.js +3 -3
- package/esm/components/ui/keyValue/KeyValue.js.map +1 -1
- package/esm/components/ui/keyValue/KeyValue.stories.d.ts.map +1 -1
- package/esm/components/ui/keyValue/KeyValue.stories.js +5 -5
- package/esm/components/ui/keyValue/KeyValue.stories.js.map +1 -1
- package/esm/components/ui/loader/CoveringLoader.d.ts.map +1 -1
- package/esm/components/ui/loader/CoveringLoader.js +1 -1
- package/esm/components/ui/loader/CoveringLoader.js.map +1 -1
- package/esm/components/ui/loader/FullLoader.d.ts +1 -1
- package/esm/components/ui/loader/FullLoader.d.ts.map +1 -1
- package/esm/components/ui/loader/FullLoader.js +6 -4
- package/esm/components/ui/loader/FullLoader.js.map +1 -1
- package/esm/components/ui/loader/FullLoader.stories.d.ts +1 -1
- package/esm/components/ui/loader/FullLoader.stories.d.ts.map +1 -1
- package/esm/components/ui/loader/Loader.d.ts +2 -1
- package/esm/components/ui/loader/Loader.d.ts.map +1 -1
- package/esm/components/ui/loader/Loader.js +7 -5
- package/esm/components/ui/loader/Loader.js.map +1 -1
- package/esm/components/ui/loader/Loading.d.ts.map +1 -1
- package/esm/components/ui/loader/Loading.js +2 -1
- package/esm/components/ui/loader/Loading.js.map +1 -1
- package/esm/components/ui/loader/Loading.stories.d.ts +1 -1
- package/esm/components/ui/loader/Loading.stories.d.ts.map +1 -1
- package/esm/components/ui/loader/Loading.stories.js.map +1 -1
- package/esm/components/ui/loader/PopLoader.d.ts +2 -3
- package/esm/components/ui/loader/PopLoader.d.ts.map +1 -1
- package/esm/components/ui/loader/PopLoader.js +6 -4
- package/esm/components/ui/loader/PopLoader.js.map +1 -1
- package/esm/components/ui/loader/PopLoader.stories.d.ts +1 -1
- package/esm/components/ui/loader/PopLoader.stories.d.ts.map +1 -1
- package/esm/components/ui/loader/PopLoader.stories.js.map +1 -1
- package/esm/components/ui/message/Message.d.ts.map +1 -1
- package/esm/components/ui/message/Message.js.map +1 -1
- package/esm/components/ui/message/Message.stories.d.ts.map +1 -1
- package/esm/components/ui/message/Message.stories.js.map +1 -1
- package/esm/components/ui/message/Message.styled.d.ts +1 -1
- package/esm/components/ui/modal/Modal.d.ts +92 -6
- package/esm/components/ui/modal/Modal.d.ts.map +1 -1
- package/esm/components/ui/modal/Modal.js +17 -8
- package/esm/components/ui/modal/Modal.js.map +1 -1
- package/esm/components/ui/modal/Modal.stories.d.ts +1 -1
- package/esm/components/ui/modal/Modal.stories.d.ts.map +1 -1
- package/esm/components/ui/modal/Modal.stories.js +4 -4
- package/esm/components/ui/modal/Modal.stories.js.map +1 -1
- package/esm/components/ui/modal/Modal.styled.d.ts.map +1 -1
- package/esm/components/ui/modal/Modal.styled.js +1 -0
- package/esm/components/ui/modal/Modal.styled.js.map +1 -1
- package/esm/components/ui/modal/ModalButtons.stories.d.ts +1 -1
- package/esm/components/ui/modal/ModalButtons.stories.d.ts.map +1 -1
- package/esm/components/ui/modal/ModalButtons.stories.js +1 -1
- package/esm/components/ui/modal/ModalButtons.stories.js.map +1 -1
- package/esm/components/ui/modal/ModalButtons.styled.d.ts.map +1 -1
- package/esm/components/ui/modal/ModalButtons.styled.js.map +1 -1
- package/esm/components/ui/pop/OnButtonClick.d.ts.map +1 -1
- package/esm/components/ui/pop/OnButtonClick.js +3 -2
- package/esm/components/ui/pop/OnButtonClick.js.map +1 -1
- package/esm/components/ui/pop/Pop.d.ts +3 -1
- package/esm/components/ui/pop/Pop.d.ts.map +1 -1
- package/esm/components/ui/pop/Pop.js +5 -2
- package/esm/components/ui/pop/Pop.js.map +1 -1
- package/esm/components/ui/pop/Pop.stories.d.ts.map +1 -1
- package/esm/components/ui/pop/Pop.stories.js +2 -2
- package/esm/components/ui/pop/Pop.stories.js.map +1 -1
- package/esm/components/ui/pop/PopOption.d.ts +4 -2
- package/esm/components/ui/pop/PopOption.d.ts.map +1 -1
- package/esm/components/ui/pop/PopOption.js +9 -5
- package/esm/components/ui/pop/PopOption.js.map +1 -1
- package/esm/components/ui/progress/Progress.d.ts.map +1 -1
- package/esm/components/ui/progress/Progress.js.map +1 -1
- package/esm/components/ui/progress/Progress.stories.d.ts.map +1 -1
- package/esm/components/ui/progress/Progress.stories.js.map +1 -1
- package/esm/components/ui/progress/Progress.styled.js +1 -1
- package/esm/components/ui/stats/Stats.d.ts.map +1 -1
- package/esm/components/ui/stats/Stats.js +1 -1
- package/esm/components/ui/stats/Stats.js.map +1 -1
- package/esm/components/ui/stats/Stats.stories.d.ts.map +1 -1
- package/esm/components/ui/stats/Stats.stories.js +1 -1
- package/esm/components/ui/stats/Stats.stories.js.map +1 -1
- package/esm/components/ui/tabs/Item.d.ts.map +1 -1
- package/esm/components/ui/tabs/Item.js +3 -2
- package/esm/components/ui/tabs/Item.js.map +1 -1
- package/esm/components/ui/tabs/Item.styled.d.ts.map +1 -1
- package/esm/components/ui/tabs/Item.styled.js +2 -0
- package/esm/components/ui/tabs/Item.styled.js.map +1 -1
- package/esm/components/ui/tabs/Selector.d.ts +2 -1
- package/esm/components/ui/tabs/Selector.d.ts.map +1 -1
- package/esm/components/ui/tabs/Selector.js +62 -6
- package/esm/components/ui/tabs/Selector.js.map +1 -1
- package/esm/components/ui/tabs/Selector.stories.d.ts +4 -2
- package/esm/components/ui/tabs/Selector.stories.d.ts.map +1 -1
- package/esm/components/ui/tabs/Selector.stories.js +40 -2
- package/esm/components/ui/tabs/Selector.stories.js.map +1 -1
- package/esm/components/ui/tabs/Selector.styled.d.ts +9 -1
- package/esm/components/ui/tabs/Selector.styled.d.ts.map +1 -1
- package/esm/components/ui/tabs/Selector.styled.js +67 -3
- package/esm/components/ui/tabs/Selector.styled.js.map +1 -1
- package/esm/components/ui/toaster/Notification.d.ts.map +1 -1
- package/esm/components/ui/toaster/Notification.js +4 -2
- package/esm/components/ui/toaster/Notification.js.map +1 -1
- package/esm/components/ui/toaster/Toaster.stories.d.ts +1 -1
- package/esm/components/ui/toaster/Toaster.stories.d.ts.map +1 -1
- package/esm/components/ui/toaster/Toaster.stories.js.map +1 -1
- package/esm/components/utils/HandleEsc.d.ts.map +1 -1
- package/esm/components/utils/HandleEsc.js +3 -3
- package/esm/components/utils/HandleEsc.js.map +1 -1
- package/esm/utils/useTailSpin.js +1 -1
- package/esm/utils/useTailSpin.js.map +1 -1
- package/package.json +5 -7
- package/src/components/form/Checkbox.stories.tsx +2 -3
- package/src/components/form/Checkbox.tsx +1 -2
- package/src/components/form/ColorPicker.stories.tsx +1 -2
- package/src/components/form/ColorPicker.tsx +0 -1
- package/src/components/form/Label.stories.tsx +0 -1
- package/src/components/form/Label.styled.ts +1 -1
- package/src/components/form/Select.stories.tsx +1 -1
- package/src/components/form/Suggestions.tsx +1 -1
- package/src/components/form/Toggle.styled.ts +1 -1
- package/src/components/form/Toggle.tsx +2 -1
- package/src/components/form/choice/Choice.stories.tsx +1 -2
- package/src/components/form/choice/Choice.tsx +3 -4
- package/src/components/form/choice/ChoiceItem.tsx +4 -3
- package/src/components/form/input/Input.stories.tsx +2 -3
- package/src/components/form/input/Input.styled.ts +0 -1
- package/src/components/form/input/Input.tsx +23 -15
- package/src/components/form/textarea/TextArea.stories.tsx +1 -1
- package/src/components/form/textarea/TextArea.styled.ts +1 -2
- package/src/components/icons/Back.tsx +6 -3
- package/src/components/icons/Battery.tsx +6 -3
- package/src/components/icons/Checkmark.tsx +6 -3
- package/src/components/icons/Config.tsx +6 -3
- package/src/components/icons/Dots.tsx +6 -3
- package/src/components/icons/Forward.tsx +6 -3
- package/src/components/icons/Heart.tsx +6 -3
- package/src/components/icons/Icon.stories.tsx +1 -2
- package/src/components/icons/Icon.tsx +16 -12
- package/src/components/icons/Search.tsx +6 -3
- package/src/components/icons/Trash.tsx +6 -3
- package/src/components/layout/card/Card.stories.tsx +0 -1
- package/src/components/layout/header/Header.stories.tsx +1 -2
- package/src/components/layout/header/Header.tsx +1 -1
- package/src/components/layout/header/HeaderIconAction.stories.tsx +49 -2
- package/src/components/layout/header/HeaderIconAction.styled.ts +4 -5
- package/src/components/layout/header/HeaderIconAction.tsx +23 -10
- package/src/components/layout/header/StickyHeader.stories.tsx +3 -3
- package/src/components/layout/header/StickyHeader.tsx +2 -4
- package/src/components/layout/list/Header.stories.tsx +1 -1
- package/src/components/layout/list/Header.tsx +12 -8
- package/src/components/layout/list/Item.stories.tsx +2 -2
- package/src/components/layout/list/Item.tsx +33 -26
- package/src/components/layout/list/Label.stories.tsx +2 -2
- package/src/components/layout/list/Label.tsx +1 -0
- package/src/components/layout/list/List.stories.tsx +2 -3
- package/src/components/layout/list/List.tsx +14 -14
- package/src/components/layout/list/Value.stories.tsx +3 -3
- package/src/components/layout/section/Section.stories.tsx +2 -3
- package/src/components/layout/section/Section.tsx +0 -1
- package/src/components/layout/table/Table.stories.tsx +1 -1
- package/src/components/ui/action/Action.stories.tsx +1 -1
- package/src/components/ui/action/Action.tsx +35 -11
- package/src/components/ui/action/EqualActions.stories.tsx +1 -2
- package/src/components/ui/button/Button.stories.tsx +1 -2
- package/src/components/ui/directionPad/Pad.stories.tsx +1 -1
- package/src/components/ui/directionPad/Pad.tsx +1 -1
- package/src/components/ui/drawer/Drawer.stories.tsx +3 -5
- package/src/components/ui/drawer/Drawer.tsx +2 -2
- package/src/components/ui/keyValue/KeyValue.stories.tsx +5 -6
- package/src/components/ui/keyValue/KeyValue.tsx +6 -5
- package/src/components/ui/loader/CoveringLoader.tsx +2 -1
- package/src/components/ui/loader/FullLoader.stories.tsx +1 -1
- package/src/components/ui/loader/FullLoader.tsx +7 -4
- package/src/components/ui/loader/Loader.tsx +15 -6
- package/src/components/ui/loader/Loading.stories.tsx +1 -2
- package/src/components/ui/loader/Loading.tsx +3 -1
- package/src/components/ui/loader/PopLoader.stories.tsx +1 -2
- package/src/components/ui/loader/PopLoader.tsx +9 -6
- package/src/components/ui/message/Message.stories.tsx +0 -1
- package/src/components/ui/message/Message.tsx +1 -2
- package/src/components/ui/modal/Modal.stories.tsx +5 -9
- package/src/components/ui/modal/Modal.styled.ts +1 -0
- package/src/components/ui/modal/Modal.tsx +24 -14
- package/src/components/ui/modal/ModalButtons.stories.tsx +2 -2
- package/src/components/ui/modal/ModalButtons.styled.ts +0 -1
- package/src/components/ui/pop/OnButtonClick.tsx +4 -2
- package/src/components/ui/pop/Pop.stories.tsx +2 -4
- package/src/components/ui/pop/Pop.tsx +7 -3
- package/src/components/ui/pop/PopOption.tsx +11 -5
- package/src/components/ui/progress/Progress.stories.tsx +1 -2
- package/src/components/ui/progress/Progress.styled.ts +1 -1
- package/src/components/ui/progress/Progress.tsx +0 -1
- package/src/components/ui/stats/Stats.stories.tsx +2 -3
- package/src/components/ui/stats/Stats.tsx +1 -1
- package/src/components/ui/tabs/Item.styled.ts +2 -0
- package/src/components/ui/tabs/Item.tsx +4 -2
- package/src/components/ui/tabs/Selector.stories.tsx +63 -3
- package/src/components/ui/tabs/Selector.styled.ts +74 -3
- package/src/components/ui/tabs/Selector.tsx +82 -7
- package/src/components/ui/toaster/Notification.tsx +6 -2
- package/src/components/ui/toaster/Toaster.stories.tsx +1 -2
- package/src/components/utils/HandleEsc.tsx +5 -4
- package/src/utils/useTailSpin.ts +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const Dots
|
|
7
|
+
const Dots = forwardRef<SVGSVGElement, Props>((props, ref) => {
|
|
8
8
|
return (
|
|
9
9
|
<svg
|
|
10
|
+
ref={ref}
|
|
10
11
|
width={"16"}
|
|
11
12
|
height={"16"}
|
|
12
13
|
viewBox={"0 0 16 72"}
|
|
@@ -16,6 +17,8 @@ const Dots: React.FC<Props> = (props) => {
|
|
|
16
17
|
<path fill={"currentColor"} d={"M13.65 13.65Q16 11.3 16 8q0-3.3-2.35-5.65Q11.3 0 8 0 4.7 0 2.35 2.35 0 4.7 0 8q0 3.3 2.35 5.65Q4.7 16 8 16q3.3 0 5.65-2.35M8 44q3.3 0 5.65-2.35Q16 39.3 16 36q0-3.3-2.35-5.65Q11.3 28 8 28q-3.3 0-5.65 2.35Q0 32.7 0 36q0 3.3 2.35 5.65Q4.7 44 8 44M8 72q3.3 0 5.65-2.35Q16 67.3 16 64q0-3.3-2.35-5.65Q11.3 56 8 56q-3.3 0-5.65 2.35Q0 60.7 0 64q0 3.3 2.35 5.65Q4.7 72 8 72"} />
|
|
17
18
|
</svg>
|
|
18
19
|
);
|
|
19
|
-
};
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
Dots.displayName = "Dots";
|
|
20
23
|
|
|
21
24
|
export { Dots };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const Forward
|
|
7
|
+
const Forward = forwardRef<SVGSVGElement, Props>((props, ref) => {
|
|
8
8
|
return (
|
|
9
9
|
<svg
|
|
10
|
+
ref={ref}
|
|
10
11
|
width={"16"}
|
|
11
12
|
height={"16"}
|
|
12
13
|
viewBox={"0 0 9 16"}
|
|
@@ -16,6 +17,8 @@ const Forward: React.FC<Props> = (props) => {
|
|
|
16
17
|
<path fill={"currentColor"} d={"M.95.15Q.8 0 .55 0t-.4.15Q0 .3 0 .55t.15.4L7.35 8l-7.2 7.05Q0 15.2 0 15.4q0 .25.2.4.15.2.4.2.2 0 .35-.15L9 8 1 .2Q1 .15.95.15"} />
|
|
17
18
|
</svg>
|
|
18
19
|
);
|
|
19
|
-
};
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
Forward.displayName = "Forward";
|
|
20
23
|
|
|
21
24
|
export { Forward };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const Heart
|
|
7
|
+
const Heart = forwardRef<SVGSVGElement, Props>((props, ref) => {
|
|
8
8
|
return (
|
|
9
9
|
<svg
|
|
10
|
+
ref={ref}
|
|
10
11
|
width={"16"}
|
|
11
12
|
height={"16"}
|
|
12
13
|
viewBox={"0 0 55 46"}
|
|
@@ -16,6 +17,8 @@ const Heart: React.FC<Props> = (props) => {
|
|
|
16
17
|
<path fill={"currentColor"} d={"M54 8.5q-1.1-2.35-2.15-3.35Q50.9 4.2 49.4 3 47.75 1.65 44.9.75h-.05q-2.7-.85-5.55-.7-.05 0-.1.05-2.9.35-5.3 1.7-.8.35-1.9 1.15l.05-.05q-1.15.7-2.1 1.55-.75.55-1.55 1-.45.2-.9.15-.15-.05-.25-.05-.35-.05-.75-.35-.1-.05-.15-.1-.7-.4-1.35-.95l-.05-.05q-.85-.75-1.75-1.25-2.15-1.6-4.65-2.25Q15.9-.1 13.2.05q-.05 0-.15.05Q9.9.6 7 2.4h-.05q-2.7 1.75-4.5 4.45v.05Q.7 9.6.15 12.85q-.05.05-.05.1-.4 3.3 1.1 6.75v.1q1.25 2.45 3.2 4.6 1.6 2.05 3.55 4l3.8 3.8q0 .05.05.05 1.9 1.8 3.7 3.65v.05q3.9 3.75 6.05 5.8l.05.05q2.25 2.25 3.1 2.75l-.05-.05 1 .75q.85.75 2.05.75.3 0 .55-.1 1-.4 2-1.3.75-.75 2.1-1.85h.05q1.35-1.25 3-2.75h.05q1.6-1.55 3.35-3.2 1.75-1.65 3.7-3.7v.05l4.1-4 .05-.05q2.15-2.2 4-4.55v-.05q1.9-2.55 3.1-5.1h-.05q1.3-2.7 1.3-5.65 0-3-1-5.25m-4.25-1.25q.75.8 1.5 2.5t.75 4q0 2.25-1 4.35v.05q-1.05 2.25-2.7 4.55h-.05Q46.5 24.9 44.5 27l-4.1 4q-1.95 1.9-3.65 3.6-1.75 1.6-3.35 3.2-.05 0-.05.05-1.6 1.45-2.9 2.6-1.45 1.2-2.25 1.95-.35.3-.7.55-.5-.45-1.25-.95-.7-.45-2.6-2.35-2.15-2.1-6.05-5.9-1.8-1.8-3.75-3.7v.05l-3.8-3.8h.05q-1.85-1.9-3.4-3.85-.05-.1-.1-.1-1.65-1.8-2.7-3.9-1.1-2.6-.8-5.1.4-2.65 1.85-4.8 1.5-2.2 3.65-3.65 2.3-1.4 4.8-1.85 2.2-.15 4.35.45h.05q2 .55 3.7 1.8l.1.1q.7.45 1.45 1.05.85.65 1.65 1.15 1.25.95 2.4.95 1.4.25 2.75-.5l-.05.05q1.05-.6 2.1-1.35 0-.05.05-.05.75-.7 1.7-1.25 0-.05.05-.05.85-.6 1.45-.85.05-.05.15-.1 1.95-1.1 4.3-1.4h-.1q2.25-.15 4.45.55 2.3.75 3.6 1.75 1.35 1.05 2.2 1.9"} />
|
|
17
18
|
</svg>
|
|
18
19
|
);
|
|
19
|
-
};
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
Heart.displayName = "Heart";
|
|
20
23
|
|
|
21
24
|
export { Heart };
|
|
@@ -3,8 +3,7 @@ import React from "react";
|
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
4
4
|
|
|
5
5
|
import { List } from "../layout/list/List";
|
|
6
|
-
|
|
7
|
-
import { Icon, ICON } from "./Icon";
|
|
6
|
+
import { ICON, Icon } from "./Icon";
|
|
8
7
|
|
|
9
8
|
const meta: Meta<typeof Icon> = {
|
|
10
9
|
title: "Icons/Icon",
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
|
-
import type { AnyComponent } from "../../types";
|
|
4
|
-
|
|
5
|
-
import { Checkmark } from "./Checkmark";
|
|
6
3
|
import { Back } from "./Back";
|
|
7
|
-
import { Forward } from "./Forward";
|
|
8
|
-
import { Search } from "./Search";
|
|
9
4
|
import { Battery } from "./Battery";
|
|
10
|
-
import {
|
|
11
|
-
import { Trash } from "./Trash";
|
|
5
|
+
import { Checkmark } from "./Checkmark";
|
|
12
6
|
import { Config } from "./Config";
|
|
13
7
|
import { Dots } from "./Dots";
|
|
8
|
+
import { Forward } from "./Forward";
|
|
9
|
+
import { Heart } from "./Heart";
|
|
10
|
+
import { Search } from "./Search";
|
|
11
|
+
import { Trash } from "./Trash";
|
|
14
12
|
|
|
15
13
|
enum ICON {
|
|
16
14
|
checkmark = "checkmark",
|
|
@@ -29,7 +27,9 @@ interface Props {
|
|
|
29
27
|
className?: string;
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
type IconComponent = React.ForwardRefExoticComponent<{ className?: string } & React.RefAttributes<SVGSVGElement>>;
|
|
31
|
+
|
|
32
|
+
const iconsMap = new Map<ICON, IconComponent>([
|
|
33
33
|
[ICON.checkmark, Checkmark],
|
|
34
34
|
[ICON.back, Back],
|
|
35
35
|
[ICON.forward, Forward],
|
|
@@ -41,13 +41,17 @@ const iconsMap = new Map<ICON, AnyComponent<{ className?: string }>>([
|
|
|
41
41
|
[ICON.dots, Dots],
|
|
42
42
|
]);
|
|
43
43
|
|
|
44
|
-
const Icon
|
|
44
|
+
const Icon = forwardRef<SVGSVGElement, Props>(({ name: iconName, ...props }, ref) => {
|
|
45
45
|
const C = iconsMap.get(iconName);
|
|
46
46
|
if (!C) {
|
|
47
47
|
throw new TypeError("Unknown icon: " + iconName);
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
// this is not a new component creation!
|
|
50
|
+
// eslint-disable-next-line react-hooks/static-components
|
|
51
|
+
return <C ref={ref} {...props} />;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
Icon.displayName = "Icon";
|
|
51
55
|
|
|
52
56
|
export { Icon, ICON };
|
|
53
57
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const Search
|
|
7
|
+
const Search = forwardRef<SVGSVGElement, Props>((props, ref) => {
|
|
8
8
|
return (
|
|
9
9
|
<svg
|
|
10
|
+
ref={ref}
|
|
10
11
|
width={"16"}
|
|
11
12
|
height={"16"}
|
|
12
13
|
viewBox={"0 0 16 16"}
|
|
@@ -24,6 +25,8 @@ const Search: React.FC<Props> = (props) => {
|
|
|
24
25
|
</svg>
|
|
25
26
|
|
|
26
27
|
);
|
|
27
|
-
};
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
Search.displayName = "Search";
|
|
28
31
|
|
|
29
32
|
export { Search };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const Trash
|
|
7
|
+
const Trash = forwardRef<SVGSVGElement, Props>((props, ref) => {
|
|
8
8
|
return (
|
|
9
9
|
<svg
|
|
10
|
+
ref={ref}
|
|
10
11
|
width={"16"}
|
|
11
12
|
height={"16"}
|
|
12
13
|
viewBox={"0 0 41 37"}
|
|
@@ -16,6 +17,8 @@ const Trash: React.FC<Props> = (props) => {
|
|
|
16
17
|
<path fill={"currentColor"} d={"M35.7 9.25h3.95q1.4-.4 1.35-1.6-.1-1.2-1.35-1.45H25.6V1.25Q25.6 0 24.4 0h-8.7q-1.1-.05-1.2 1.25V6.2H1.35Q-.1 6.6 0 7.75.1 9 1.35 9.25H5.4v26.5q.15 1.2 1.25 1.25H34.5q1.1-.1 1.2-1.25V9.25M22.6 6.2h-5.05V3.1h5.05v3.1M8.45 33.9V9.25H32.7V33.9H8.45"} />
|
|
17
18
|
</svg>
|
|
18
19
|
);
|
|
19
|
-
};
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
Trash.displayName = "Trash";
|
|
20
23
|
|
|
21
24
|
export { Trash };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
4
4
|
|
|
5
5
|
import { ICON } from "../../icons/Icon";
|
|
6
|
-
|
|
7
6
|
import { Header } from "./Header";
|
|
8
7
|
import { HeaderIconAction } from "./HeaderIconAction";
|
|
9
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
|
+
|
|
2
3
|
import type { ReactNode } from "react";
|
|
3
4
|
|
|
4
5
|
import { Action } from "../../ui/action/Action";
|
|
5
6
|
import { EqualActions } from "../../ui/action/EqualActions";
|
|
6
|
-
|
|
7
7
|
import { After, Before, Contents, StyledHeader } from "./Header.styled";
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
4
4
|
|
|
5
|
+
import { styled } from "../../../theme";
|
|
5
6
|
import { Header } from "./Header";
|
|
6
7
|
import { HeaderIconAction } from "./HeaderIconAction";
|
|
7
8
|
|
|
@@ -18,7 +19,7 @@ const meta: Meta = {
|
|
|
18
19
|
},
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
type Story = StoryObj<typeof
|
|
22
|
+
type Story = StoryObj<typeof HeaderIconAction>;
|
|
22
23
|
|
|
23
24
|
const Primary: Story = {};
|
|
24
25
|
|
|
@@ -39,9 +40,55 @@ const MultipleIcons: Story = {
|
|
|
39
40
|
},
|
|
40
41
|
};
|
|
41
42
|
|
|
43
|
+
const HeaderWithCustomIcon = styled(Header, {
|
|
44
|
+
[`& ${HeaderIconAction.toString()}`]: {
|
|
45
|
+
color: "red",
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const DeepSelector: Story = {
|
|
50
|
+
render: ({ onClick: _onClick, ...args }) => {
|
|
51
|
+
const after = (
|
|
52
|
+
<>
|
|
53
|
+
<div>some text</div>
|
|
54
|
+
<HeaderIconAction
|
|
55
|
+
to={"/"}
|
|
56
|
+
Link={({ children }) => (
|
|
57
|
+
<a
|
|
58
|
+
href={"/"}
|
|
59
|
+
onClick={(e) => {
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
alert("custom link clicked");
|
|
62
|
+
}}
|
|
63
|
+
>{children}
|
|
64
|
+
</a>
|
|
65
|
+
)}
|
|
66
|
+
{...args}
|
|
67
|
+
icon={<>i</>}
|
|
68
|
+
/>
|
|
69
|
+
<HeaderIconAction
|
|
70
|
+
href={"/"}
|
|
71
|
+
{...args}
|
|
72
|
+
icon={<>i</>}
|
|
73
|
+
/>
|
|
74
|
+
<HeaderIconAction
|
|
75
|
+
{...args}
|
|
76
|
+
icon={<>i</>}
|
|
77
|
+
/>
|
|
78
|
+
</>
|
|
79
|
+
);
|
|
80
|
+
return (
|
|
81
|
+
<HeaderWithCustomIcon after={after}>
|
|
82
|
+
On the left you can see the icon
|
|
83
|
+
</HeaderWithCustomIcon>
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
42
88
|
export {
|
|
43
89
|
Primary,
|
|
44
90
|
MultipleIcons,
|
|
91
|
+
DeepSelector,
|
|
45
92
|
};
|
|
46
93
|
|
|
47
94
|
export default meta;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { borderPxToRem, pxToRem, styled } from "../../../theme";
|
|
1
|
+
import { borderPxToRem, css, pxToRem, styled } from "../../../theme";
|
|
4
2
|
import { Icon } from "../../icons/Icon";
|
|
5
3
|
|
|
6
|
-
const sharedStyles
|
|
4
|
+
const sharedStyles = css({
|
|
7
5
|
"width": pxToRem(30),
|
|
8
6
|
"height": pxToRem(30),
|
|
9
7
|
"background": "none",
|
|
@@ -21,7 +19,7 @@ const sharedStyles: ThemeCSS = {
|
|
|
21
19
|
background: "#00000011",
|
|
22
20
|
color: "currentColor",
|
|
23
21
|
},
|
|
24
|
-
};
|
|
22
|
+
});
|
|
25
23
|
|
|
26
24
|
const Btn = styled("button", sharedStyles);
|
|
27
25
|
const A = styled("a", sharedStyles);
|
|
@@ -37,4 +35,5 @@ export {
|
|
|
37
35
|
Btn,
|
|
38
36
|
A,
|
|
39
37
|
StyledIcon,
|
|
38
|
+
sharedStyles,
|
|
40
39
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
3
2
|
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
4
|
import type { ICON } from "../../icons/Icon";
|
|
5
5
|
|
|
6
|
-
import { A, Btn, StyledIcon } from "./HeaderIconAction.styled";
|
|
6
|
+
import { A, Btn, sharedStyles, StyledIcon } from "./HeaderIconAction.styled";
|
|
7
7
|
|
|
8
8
|
interface LinkProps { // @TODO extract? - same on list item
|
|
9
9
|
href: string;
|
|
@@ -41,12 +41,11 @@ interface Props {
|
|
|
41
41
|
* Use this component if you need a clickable icon that stylistically fits the header.
|
|
42
42
|
* It can be a simple link, a button or a custom link component.
|
|
43
43
|
*/
|
|
44
|
-
const HeaderIconAction
|
|
44
|
+
const HeaderIconAction = forwardRef<HTMLAnchorElement | HTMLButtonElement, Props>((props, ref) => {
|
|
45
45
|
const { icon, href, to, Link, className, ...restProps } = props;
|
|
46
46
|
|
|
47
47
|
let content: ReactNode = icon;
|
|
48
48
|
if (typeof icon === "string") {
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
50
49
|
content = <StyledIcon name={icon as ICON} />;
|
|
51
50
|
}
|
|
52
51
|
|
|
@@ -55,18 +54,32 @@ const HeaderIconAction: React.FC<Props> = (props) => {
|
|
|
55
54
|
throw new TypeError("`to` prop given without `Link` component");
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
return
|
|
57
|
+
return (
|
|
58
|
+
<Link href={to} {...restProps}>
|
|
59
|
+
<A ref={ref as React.Ref<HTMLAnchorElement>} className={props.className}>{content}</A>
|
|
60
|
+
</Link>
|
|
61
|
+
);
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
if (href) {
|
|
62
|
-
return
|
|
65
|
+
return (
|
|
66
|
+
<A ref={ref as React.Ref<HTMLAnchorElement>} href={href} className={props.className} {...restProps}>
|
|
67
|
+
{content}
|
|
68
|
+
</A>
|
|
69
|
+
);
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
return (
|
|
66
|
-
|
|
73
|
+
|
|
74
|
+
<Btn ref={ref as React.Ref<HTMLButtonElement>} className={props.className} onClick={props.onClick}>
|
|
67
75
|
{content}
|
|
68
76
|
</Btn>
|
|
69
77
|
);
|
|
70
|
-
};
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
HeaderIconAction.displayName = "HeaderIconAction";
|
|
81
|
+
HeaderIconAction.toString = () => sharedStyles.selector;
|
|
82
|
+
|
|
83
|
+
const HeaderIconActionIconSelector = StyledIcon.toString();
|
|
71
84
|
|
|
72
|
-
export { HeaderIconAction };
|
|
85
|
+
export { HeaderIconAction, HeaderIconActionIconSelector };
|
|
@@ -2,10 +2,10 @@ import React, { useEffect } from "react";
|
|
|
2
2
|
|
|
3
3
|
import { useForceUpdate } from "@ezez/hooks";
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
6
6
|
|
|
7
|
-
import { StickyHeader } from "./StickyHeader";
|
|
8
7
|
import { Header } from "./Header";
|
|
8
|
+
import { StickyHeader } from "./StickyHeader";
|
|
9
9
|
|
|
10
10
|
const meta: Meta = {
|
|
11
11
|
title: "Components/Layout/Header/StickyHeader",
|
|
@@ -59,7 +59,7 @@ const RefsDemo: Story = {
|
|
|
59
59
|
|
|
60
60
|
useEffect(() => {
|
|
61
61
|
handleForceUpdate();
|
|
62
|
-
}, []);
|
|
62
|
+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
63
63
|
|
|
64
64
|
console.info("RefsDemo", {
|
|
65
65
|
ref: ref.current, refContent: refContent.current,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
import { fnWithProps } from "../../../types/fnWithProps";
|
|
4
|
-
|
|
5
4
|
import { Header } from "./Header";
|
|
6
5
|
import { Content, StyledStickyHeader } from "./StickyHeader.styled";
|
|
7
6
|
|
|
@@ -49,9 +48,8 @@ const StickyHeader = fnWithProps(forwardRef<HTMLDivElement, Props>((props, ref)
|
|
|
49
48
|
throw err;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
53
51
|
header = header as never; // @TODO find a better way to silence TS on cloneElement
|
|
54
|
-
|
|
52
|
+
|
|
55
53
|
content = content as never;
|
|
56
54
|
|
|
57
55
|
return (
|
|
@@ -62,7 +60,7 @@ const StickyHeader = fnWithProps(forwardRef<HTMLDivElement, Props>((props, ref)
|
|
|
62
60
|
);
|
|
63
61
|
}), {
|
|
64
62
|
displayName: "StickyHeader",
|
|
65
|
-
Content
|
|
63
|
+
Content, // @TODO remove "position" from this component props
|
|
66
64
|
/**
|
|
67
65
|
* @deprecated use StickyHeader.toString() instead
|
|
68
66
|
*/
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
import type { VariantProps } from "@stitches/react";
|
|
4
4
|
|
|
5
5
|
import { dimensionsPxToRem, fontPxToRem, styled } from "../../../theme";
|
|
6
|
-
|
|
7
|
-
import { Item, ItemInnerContainerClassName } from "./Item";
|
|
6
|
+
import { Item, ListItemInnerContainerClassNameSelector } from "./Item";
|
|
8
7
|
|
|
9
8
|
const StyledContent = styled("div", {
|
|
10
9
|
flex: 1,
|
|
@@ -20,7 +19,7 @@ const StyledHeader = styled(Item, {
|
|
|
20
19
|
color: "$sub",
|
|
21
20
|
textTransform: "uppercase",
|
|
22
21
|
|
|
23
|
-
[`& ${
|
|
22
|
+
[`& ${ListItemInnerContainerClassNameSelector}`]: {
|
|
24
23
|
minHeight: 0,
|
|
25
24
|
},
|
|
26
25
|
|
|
@@ -41,12 +40,17 @@ type Variants = VariantProps<typeof StyledHeader>;
|
|
|
41
40
|
* Use this to render a header within a `List`.
|
|
42
41
|
* Use `as` prop to define which tag to use.
|
|
43
42
|
*/
|
|
44
|
-
const Header
|
|
43
|
+
const Header = forwardRef<HTMLLIElement, StyledHeaderProps & Variants & { as?: string }>(({ as, ...props }, ref) => {
|
|
45
44
|
return (
|
|
46
|
-
<StyledHeader {...props}>
|
|
45
|
+
<StyledHeader {...props} ref={ref}>
|
|
47
46
|
<StyledContent {...(as ? { as } : undefined)}>{props.children}</StyledContent>
|
|
48
47
|
</StyledHeader>
|
|
49
48
|
);
|
|
50
|
-
};
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
Header.displayName = "List.Header";
|
|
52
|
+
Header.toString = () => StyledHeader.toString();
|
|
53
|
+
|
|
54
|
+
const ListHeaderContentSelector = StyledContent.toString();
|
|
51
55
|
|
|
52
|
-
export { Header };
|
|
56
|
+
export { Header, ListHeaderContentSelector };
|
|
@@ -2,11 +2,11 @@ import React from "react";
|
|
|
2
2
|
|
|
3
3
|
import { omit } from "@ezez/utils";
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
6
6
|
|
|
7
7
|
import { Item } from "./Item";
|
|
8
|
-
import { List } from "./List";
|
|
9
8
|
import { Label } from "./Label";
|
|
9
|
+
import { List } from "./List";
|
|
10
10
|
import { Value } from "./Value";
|
|
11
11
|
|
|
12
12
|
const demoControl = {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
|
|
3
|
+
import { fnWithProps } from "../../../types/fnWithProps";
|
|
3
4
|
import { ICON } from "../../icons/Icon";
|
|
4
|
-
|
|
5
|
-
import { Value } from "./Value";
|
|
6
|
-
import { Label } from "./Label";
|
|
7
5
|
import { StyledIcon, StyledInnerContainer, StyledItem, StyledNoIcon } from "./Item.styled";
|
|
6
|
+
import { Label } from "./Label";
|
|
7
|
+
import { Value } from "./Value";
|
|
8
8
|
|
|
9
9
|
interface LinkProps {
|
|
10
10
|
href: string;
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
type Ratio = `${number}` |
|
|
14
|
+
type Ratio = `${number}` | "";
|
|
15
15
|
|
|
16
|
-
type SlashSeparatedNumbers
|
|
17
|
-
| Ratio
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
type SlashSeparatedNumbers
|
|
17
|
+
= | Ratio
|
|
18
|
+
| `${Ratio}/${Ratio}`
|
|
19
|
+
| `${Ratio}/${Ratio}/${Ratio}`
|
|
20
|
+
| `${Ratio}/${Ratio}/${Ratio}/${Ratio}`
|
|
21
|
+
| `${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}`
|
|
22
|
+
| `${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}`
|
|
23
|
+
| `${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}`
|
|
24
|
+
| `${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}`
|
|
25
|
+
| `${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}`
|
|
26
|
+
| `${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}/${Ratio}`;
|
|
27
27
|
|
|
28
28
|
interface Props {
|
|
29
29
|
href?: string;
|
|
@@ -41,7 +41,7 @@ interface SubComponents {
|
|
|
41
41
|
const icon = <StyledIcon name={ICON.forward} />;
|
|
42
42
|
const noIcon = <StyledNoIcon />;
|
|
43
43
|
|
|
44
|
-
const
|
|
44
|
+
const ListItemInnerContainerClassNameSelector = StyledInnerContainer.toString();
|
|
45
45
|
type StyledItemProps = React.ComponentProps<typeof StyledItem>;
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -66,7 +66,9 @@ type StyledItemProps = React.ComponentProps<typeof StyledItem>;
|
|
|
66
66
|
* - `to`: if given it will render an anchor tag wrapped in a link using the given `Link` component
|
|
67
67
|
* - `onClick`: if given it will render a button tag with the given onClick handler (it can be passed with `href` too)
|
|
68
68
|
*/
|
|
69
|
-
const
|
|
69
|
+
const ItemBase = forwardRef<
|
|
70
|
+
HTMLLIElement, StyledItemProps & Props
|
|
71
|
+
>(({ href, to, onClick, Link, ratio, ...props }, ref) => {
|
|
70
72
|
const r = ratio ? ratio.split("/") : [];
|
|
71
73
|
|
|
72
74
|
const pre = typeof props.selected === "boolean"
|
|
@@ -96,7 +98,7 @@ const Item: React.FC<StyledItemProps & Props> & SubComponents = ({ href, to, onC
|
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
return (
|
|
99
|
-
<StyledItem {...props}>
|
|
101
|
+
<StyledItem {...props} ref={ref}>
|
|
100
102
|
<Link href={to}><StyledInnerContainer as={"a"} href={to}>{pre}{ren}</StyledInnerContainer></Link>
|
|
101
103
|
</StyledItem>
|
|
102
104
|
);
|
|
@@ -104,7 +106,7 @@ const Item: React.FC<StyledItemProps & Props> & SubComponents = ({ href, to, onC
|
|
|
104
106
|
|
|
105
107
|
if (href) {
|
|
106
108
|
return (
|
|
107
|
-
<StyledItem {...props}>
|
|
109
|
+
<StyledItem {...props} ref={ref}>
|
|
108
110
|
<StyledInnerContainer as={"a"} href={href} onClick={onClick}>{pre}{ren}</StyledInnerContainer>
|
|
109
111
|
</StyledItem>
|
|
110
112
|
);
|
|
@@ -112,19 +114,24 @@ const Item: React.FC<StyledItemProps & Props> & SubComponents = ({ href, to, onC
|
|
|
112
114
|
|
|
113
115
|
if (onClick) {
|
|
114
116
|
return (
|
|
115
|
-
<StyledItem {...props}>
|
|
117
|
+
<StyledItem {...props} ref={ref}>
|
|
116
118
|
<StyledInnerContainer as={"button"} onClick={onClick}>{pre}{ren}</StyledInnerContainer>
|
|
117
119
|
</StyledItem>
|
|
118
120
|
);
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
return <StyledItem {...props}><StyledInnerContainer>{pre}{ren}</StyledInnerContainer></StyledItem>;
|
|
122
|
-
};
|
|
123
|
+
return <StyledItem {...props} ref={ref}><StyledInnerContainer>{pre}{ren}</StyledInnerContainer></StyledItem>;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
ItemBase.displayName = "List.Item";
|
|
123
127
|
|
|
124
|
-
Item
|
|
125
|
-
|
|
128
|
+
const Item = fnWithProps(ItemBase, {
|
|
129
|
+
Label,
|
|
130
|
+
Value,
|
|
131
|
+
});
|
|
132
|
+
Item.toString = () => StyledItem.toString();
|
|
126
133
|
|
|
127
|
-
export { Item,
|
|
134
|
+
export { Item, ListItemInnerContainerClassNameSelector };
|
|
128
135
|
|
|
129
136
|
export type {
|
|
130
137
|
Props as ItemProps,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
4
4
|
|
|
5
|
+
import { Item } from "./Item";
|
|
5
6
|
import { Label } from "./Label";
|
|
6
7
|
import { List } from "./List";
|
|
7
|
-
import { Item } from "./Item";
|
|
8
8
|
|
|
9
9
|
const meta: Meta = {
|
|
10
10
|
title: "Components/Layout/List/Label",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
import { Icon, ICON } from "../../icons/Icon";
|
|
3
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
6
4
|
|
|
5
|
+
import { ICON, Icon } from "../../icons/Icon";
|
|
7
6
|
import { List } from "./List";
|
|
8
7
|
|
|
9
8
|
const meta: Meta = {
|