react-miui 0.34.0 → 0.36.0
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 +2 -1
- package/CHANGELOG.md +17 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +1 -0
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/input/Input.d.ts.map +1 -1
- package/dist/components/form/input/Input.js +9 -5
- package/dist/components/form/input/Input.js.map +1 -1
- package/dist/components/form/timepicker/TimePicker.css.d.ts +99 -0
- package/dist/components/form/timepicker/TimePicker.css.d.ts.map +1 -0
- package/dist/components/form/timepicker/TimePicker.css.js +116 -0
- package/dist/components/form/timepicker/TimePicker.css.js.map +1 -0
- package/dist/components/form/timepicker/TimePicker.d.ts +22 -0
- package/dist/components/form/timepicker/TimePicker.d.ts.map +1 -0
- package/dist/components/form/timepicker/TimePicker.js +141 -0
- package/dist/components/form/timepicker/TimePicker.js.map +1 -0
- package/dist/components/form/timepicker/TimePicker.styled.d.ts +936 -0
- package/dist/components/form/timepicker/TimePicker.styled.d.ts.map +1 -0
- package/dist/components/form/timepicker/TimePicker.styled.js +29 -0
- package/dist/components/form/timepicker/TimePicker.styled.js.map +1 -0
- package/dist/components/form/timepicker/TimePickerModal.d.ts +17 -0
- package/dist/components/form/timepicker/TimePickerModal.d.ts.map +1 -0
- package/dist/components/form/timepicker/TimePickerModal.js +92 -0
- package/dist/components/form/timepicker/TimePickerModal.js.map +1 -0
- package/dist/components/form/timepicker/Wheel.d.ts +12 -0
- package/dist/components/form/timepicker/Wheel.d.ts.map +1 -0
- package/dist/components/form/timepicker/Wheel.js +187 -0
- package/dist/components/form/timepicker/Wheel.js.map +1 -0
- package/dist/components/form/timepicker/utils.d.ts +4 -0
- package/dist/components/form/timepicker/utils.d.ts.map +1 -0
- package/dist/components/form/timepicker/utils.js +62 -0
- package/dist/components/form/timepicker/utils.js.map +1 -0
- package/dist/components/icons/Clock.d.ts +7 -0
- package/dist/components/icons/Clock.d.ts.map +1 -0
- package/dist/components/icons/Clock.js +45 -0
- package/dist/components/icons/Clock.js.map +1 -0
- package/dist/components/icons/Icon.d.ts +2 -1
- package/dist/components/icons/Icon.d.ts.map +1 -1
- package/dist/components/icons/Icon.js +3 -0
- package/dist/components/icons/Icon.js.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.d.ts.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.js +13 -3
- package/dist/components/layout/header/HeaderIconAction.js.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.styled.js +11 -17
- package/dist/components/layout/header/HeaderIconAction.styled.js.map +1 -1
- package/dist/components/layout/list/Item.d.ts.map +1 -1
- package/dist/components/layout/list/Item.js +17 -7
- package/dist/components/layout/list/Item.js.map +1 -1
- package/dist/components/layout/list/Item.styled.d.ts.map +1 -1
- package/dist/components/layout/list/Item.styled.js +2 -1
- package/dist/components/layout/list/Item.styled.js.map +1 -1
- package/dist/components/ui/button/Button.d.ts +94 -1
- package/dist/components/ui/button/Button.d.ts.map +1 -1
- package/dist/components/ui/button/Button.js +59 -2
- package/dist/components/ui/button/Button.js.map +1 -1
- package/dist/components/ui/button/Button.styled.d.ts +2 -2
- package/dist/components/ui/button/Button.styled.d.ts.map +1 -1
- package/dist/components/ui/button/Button.styled.js +4 -3
- package/dist/components/ui/button/Button.styled.js.map +1 -1
- package/dist/components/ui/directionPad/Button.d.ts.map +1 -1
- package/dist/components/ui/directionPad/Button.js +7 -2
- package/dist/components/ui/directionPad/Button.js.map +1 -1
- package/dist/components/ui/directionPad/Button.styled.d.ts.map +1 -1
- package/dist/components/ui/directionPad/Button.styled.js +2 -1
- package/dist/components/ui/directionPad/Button.styled.js.map +1 -1
- package/dist/components/ui/directionPad/Middle.d.ts.map +1 -1
- package/dist/components/ui/directionPad/Middle.js +7 -1
- package/dist/components/ui/directionPad/Middle.js.map +1 -1
- package/dist/components/ui/directionPad/Middle.styled.d.ts.map +1 -1
- package/dist/components/ui/directionPad/Middle.styled.js +2 -1
- package/dist/components/ui/directionPad/Middle.styled.js.map +1 -1
- package/dist/components/ui/modal/Modal.d.ts +1 -2
- package/dist/components/ui/modal/Modal.d.ts.map +1 -1
- package/dist/components/ui/modal/Modal.js +114 -42
- package/dist/components/ui/modal/Modal.js.map +1 -1
- package/dist/components/ui/modal/Modal.styled.d.ts +1 -1
- package/dist/components/ui/modal/Modal.styled.d.ts.map +1 -1
- package/dist/components/ui/modal/Modal.styled.js +40 -25
- package/dist/components/ui/modal/Modal.styled.js.map +1 -1
- package/dist/components/ui/modal/ModalButtons.d.ts +179 -1
- package/dist/components/ui/modal/ModalButtons.d.ts.map +1 -1
- package/dist/components/ui/modal/ModalButtons.js +63 -2
- package/dist/components/ui/modal/ModalButtons.js.map +1 -1
- package/dist/components/ui/modal/ModalButtons.styled.d.ts +90 -91
- package/dist/components/ui/modal/ModalButtons.styled.d.ts.map +1 -1
- package/dist/components/ui/modal/ModalButtons.styled.js +5 -7
- package/dist/components/ui/modal/ModalButtons.styled.js.map +1 -1
- package/dist/components/ui/pop/Pop.styled.d.ts.map +1 -1
- package/dist/components/ui/pop/Pop.styled.js +15 -17
- package/dist/components/ui/pop/Pop.styled.js.map +1 -1
- package/dist/components/ui/pop/PopOption.d.ts.map +1 -1
- package/dist/components/ui/pop/PopOption.js +7 -2
- package/dist/components/ui/pop/PopOption.js.map +1 -1
- package/dist/components/ui/toolButton/ToolButton.d.ts +94 -1
- package/dist/components/ui/toolButton/ToolButton.d.ts.map +1 -1
- package/dist/components/ui/toolButton/ToolButton.js +59 -2
- package/dist/components/ui/toolButton/ToolButton.js.map +1 -1
- package/dist/components/ui/toolButton/ToolButton.styled.d.ts +2 -2
- package/dist/components/ui/toolButton/ToolButton.styled.d.ts.map +1 -1
- package/dist/components/ui/toolButton/ToolButton.styled.js +20 -25
- package/dist/components/ui/toolButton/ToolButton.styled.js.map +1 -1
- package/dist/theme.css-global.d.ts.map +1 -1
- package/dist/theme.css-global.js +0 -1
- package/dist/theme.css-global.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/useNativeValidity.d.ts +11 -0
- package/dist/utils/useNativeValidity.d.ts.map +1 -0
- package/dist/utils/useNativeValidity.js +32 -0
- package/dist/utils/useNativeValidity.js.map +1 -0
- package/dist/utils/useRipple.d.ts +15 -0
- package/dist/utils/useRipple.d.ts.map +1 -0
- package/dist/utils/useRipple.js +120 -0
- package/dist/utils/useRipple.js.map +1 -0
- package/dist/utils/useRipple.styled.d.ts +28 -0
- package/dist/utils/useRipple.styled.d.ts.map +1 -0
- package/dist/utils/useRipple.styled.js +36 -0
- package/dist/utils/useRipple.styled.js.map +1 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/index.Pop.html +7 -7
- package/docs/documents/Test.html +2 -2
- package/docs/enums/index.ICON.html +3 -2
- package/docs/functions/index.Action.html +3 -3
- package/docs/functions/index.Button.html +3 -9
- 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 +3 -3
- 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 +3 -3
- package/docs/functions/index.Icon-1.html +2 -2
- 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 +2 -2
- package/docs/functions/index.Loader.html +3 -3
- package/docs/functions/index.Loading.html +3 -3
- package/docs/functions/index.Message.html +3 -3
- package/docs/functions/index.Modal.html +2 -2
- package/docs/functions/index.ModalButtons.html +3 -3
- package/docs/functions/index.PopLoader.html +3 -3
- package/docs/functions/index.PopOption.html +2 -2
- 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.TimePicker.html +10 -0
- package/docs/functions/index.ToasterProvider.html +3 -3
- package/docs/functions/index.Toggle.html +3 -3
- package/docs/functions/index.ToolButton.html +3 -9
- package/docs/functions/index.Tooltip.html +3 -3
- package/docs/functions/index.TooltipProvider.html +2 -2
- 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.toast.html +2 -2
- 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 +3 -3
- package/docs/interfaces/index.LoaderProps.html +6 -6
- package/docs/interfaces/index.StickyHeaderProps.html +4 -4
- package/docs/interfaces/index.ToasterProviderProps.html +3 -3
- package/docs/interfaces/index.TooltipProps.html +14 -14
- package/docs/interfaces/index.TooltipProviderProps.html +5 -5
- 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.DrawerFrom.html +1 -1
- package/docs/types/index.DrawerProps.html +2 -2
- 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.TimePickerProps.html +1 -0
- package/docs/types/index.ToggleProps.html +2 -2
- package/docs/variables/index.ActionBadgeSelector.html +1 -1
- package/docs/variables/index.ActionCircleSelector.html +1 -1
- 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 -1
- package/docs/variables/index.InputContainerSelector.html +1 -1
- package/docs/variables/index.InputInputSelector.html +1 -1
- package/docs/variables/index.InputLabelSelector.html +1 -1
- package/docs/variables/index.InputPrefixSelector.html +1 -1
- package/docs/variables/index.InputSuffixSelector.html +1 -1
- 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 -1
- package/docs/variables/index.ModalContainerSelector.html +1 -1
- package/docs/variables/index.ModalRemovePaddingSelector.html +1 -1
- package/docs/variables/index.ModalTitleSelector.html +1 -1
- package/docs/variables/index.PopListSelector.html +1 -1
- package/docs/variables/index.PopOptionButtonSelector.html +1 -1
- package/docs/variables/index.PopOptionIconSelector.html +1 -1
- package/docs/variables/index.PopOverlaySelector.html +1 -1
- 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.TextAreaLabelSelector.html +1 -1
- package/docs/variables/index.TextAreaTextAreaSelector.html +1 -1
- package/docs/variables/index.TextAreaWrapperSelector.html +1 -1
- package/docs/variables/index.ToggleStyledToggleSelector.html +1 -1
- package/docs/variables/index.TooltipContentSelector.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/index.d.ts +1 -0
- package/esm/components/form/index.d.ts.map +1 -1
- package/esm/components/form/index.js +1 -0
- package/esm/components/form/index.js.map +1 -1
- package/esm/components/form/input/Input.d.ts.map +1 -1
- package/esm/components/form/input/Input.js +9 -5
- package/esm/components/form/input/Input.js.map +1 -1
- package/esm/components/form/timepicker/TimePicker.css.d.ts +99 -0
- package/esm/components/form/timepicker/TimePicker.css.d.ts.map +1 -0
- package/esm/components/form/timepicker/TimePicker.css.js +102 -0
- package/esm/components/form/timepicker/TimePicker.css.js.map +1 -0
- package/esm/components/form/timepicker/TimePicker.d.ts +22 -0
- package/esm/components/form/timepicker/TimePicker.d.ts.map +1 -0
- package/esm/components/form/timepicker/TimePicker.js +93 -0
- package/esm/components/form/timepicker/TimePicker.js.map +1 -0
- package/esm/components/form/timepicker/TimePicker.styled.d.ts +936 -0
- package/esm/components/form/timepicker/TimePicker.styled.d.ts.map +1 -0
- package/esm/components/form/timepicker/TimePicker.styled.js +20 -0
- package/esm/components/form/timepicker/TimePicker.styled.js.map +1 -0
- package/esm/components/form/timepicker/TimePickerModal.d.ts +17 -0
- package/esm/components/form/timepicker/TimePickerModal.d.ts.map +1 -0
- package/esm/components/form/timepicker/TimePickerModal.js +56 -0
- package/esm/components/form/timepicker/TimePickerModal.js.map +1 -0
- package/esm/components/form/timepicker/Wheel.d.ts +12 -0
- package/esm/components/form/timepicker/Wheel.d.ts.map +1 -0
- package/esm/components/form/timepicker/Wheel.js +151 -0
- package/esm/components/form/timepicker/Wheel.js.map +1 -0
- package/esm/components/form/timepicker/utils.d.ts +4 -0
- package/esm/components/form/timepicker/utils.d.ts.map +1 -0
- package/esm/components/form/timepicker/utils.js +58 -0
- package/esm/components/form/timepicker/utils.js.map +1 -0
- package/esm/components/icons/Clock.d.ts +7 -0
- package/esm/components/icons/Clock.d.ts.map +1 -0
- package/esm/components/icons/Clock.js +9 -0
- package/esm/components/icons/Clock.js.map +1 -0
- package/esm/components/icons/Icon.d.ts +2 -1
- package/esm/components/icons/Icon.d.ts.map +1 -1
- package/esm/components/icons/Icon.js +3 -0
- package/esm/components/icons/Icon.js.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.d.ts.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.js +13 -3
- package/esm/components/layout/header/HeaderIconAction.js.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.styled.d.ts.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.styled.js +11 -17
- package/esm/components/layout/header/HeaderIconAction.styled.js.map +1 -1
- package/esm/components/layout/list/Item.d.ts.map +1 -1
- package/esm/components/layout/list/Item.js +18 -8
- package/esm/components/layout/list/Item.js.map +1 -1
- package/esm/components/layout/list/Item.styled.d.ts.map +1 -1
- package/esm/components/layout/list/Item.styled.js +2 -1
- package/esm/components/layout/list/Item.styled.js.map +1 -1
- package/esm/components/ui/button/Button.d.ts +94 -1
- package/esm/components/ui/button/Button.d.ts.map +1 -1
- package/esm/components/ui/button/Button.js +15 -1
- package/esm/components/ui/button/Button.js.map +1 -1
- package/esm/components/ui/button/Button.styled.d.ts +2 -2
- package/esm/components/ui/button/Button.styled.d.ts.map +1 -1
- package/esm/components/ui/button/Button.styled.js +3 -2
- package/esm/components/ui/button/Button.styled.js.map +1 -1
- package/esm/components/ui/directionPad/Button.d.ts.map +1 -1
- package/esm/components/ui/directionPad/Button.js +7 -2
- package/esm/components/ui/directionPad/Button.js.map +1 -1
- package/esm/components/ui/directionPad/Button.styled.d.ts.map +1 -1
- package/esm/components/ui/directionPad/Button.styled.js +2 -1
- package/esm/components/ui/directionPad/Button.styled.js.map +1 -1
- package/esm/components/ui/directionPad/Middle.d.ts.map +1 -1
- package/esm/components/ui/directionPad/Middle.js +7 -1
- package/esm/components/ui/directionPad/Middle.js.map +1 -1
- package/esm/components/ui/directionPad/Middle.styled.d.ts.map +1 -1
- package/esm/components/ui/directionPad/Middle.styled.js +2 -1
- package/esm/components/ui/directionPad/Middle.styled.js.map +1 -1
- package/esm/components/ui/modal/Modal.d.ts +1 -2
- package/esm/components/ui/modal/Modal.d.ts.map +1 -1
- package/esm/components/ui/modal/Modal.js +103 -43
- package/esm/components/ui/modal/Modal.js.map +1 -1
- package/esm/components/ui/modal/Modal.styled.d.ts +1 -1
- package/esm/components/ui/modal/Modal.styled.d.ts.map +1 -1
- package/esm/components/ui/modal/Modal.styled.js +40 -25
- package/esm/components/ui/modal/Modal.styled.js.map +1 -1
- package/esm/components/ui/modal/ModalButtons.d.ts +179 -1
- package/esm/components/ui/modal/ModalButtons.d.ts.map +1 -1
- package/esm/components/ui/modal/ModalButtons.js +19 -1
- package/esm/components/ui/modal/ModalButtons.js.map +1 -1
- package/esm/components/ui/modal/ModalButtons.styled.d.ts +90 -91
- package/esm/components/ui/modal/ModalButtons.styled.d.ts.map +1 -1
- package/esm/components/ui/modal/ModalButtons.styled.js +3 -6
- package/esm/components/ui/modal/ModalButtons.styled.js.map +1 -1
- package/esm/components/ui/pop/Pop.styled.d.ts.map +1 -1
- package/esm/components/ui/pop/Pop.styled.js +15 -17
- package/esm/components/ui/pop/Pop.styled.js.map +1 -1
- package/esm/components/ui/pop/PopOption.d.ts.map +1 -1
- package/esm/components/ui/pop/PopOption.js +7 -2
- package/esm/components/ui/pop/PopOption.js.map +1 -1
- package/esm/components/ui/toolButton/ToolButton.d.ts +94 -1
- package/esm/components/ui/toolButton/ToolButton.d.ts.map +1 -1
- package/esm/components/ui/toolButton/ToolButton.js +15 -1
- package/esm/components/ui/toolButton/ToolButton.js.map +1 -1
- package/esm/components/ui/toolButton/ToolButton.styled.d.ts +2 -2
- package/esm/components/ui/toolButton/ToolButton.styled.d.ts.map +1 -1
- package/esm/components/ui/toolButton/ToolButton.styled.js +19 -24
- package/esm/components/ui/toolButton/ToolButton.styled.js.map +1 -1
- package/esm/theme.css-global.d.ts.map +1 -1
- package/esm/theme.css-global.js +0 -1
- package/esm/theme.css-global.js.map +1 -1
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js +1 -0
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/useNativeValidity.d.ts +11 -0
- package/esm/utils/useNativeValidity.d.ts.map +1 -0
- package/esm/utils/useNativeValidity.js +29 -0
- package/esm/utils/useNativeValidity.js.map +1 -0
- package/esm/utils/useRipple.d.ts +15 -0
- package/esm/utils/useRipple.d.ts.map +1 -0
- package/esm/utils/useRipple.js +84 -0
- package/esm/utils/useRipple.js.map +1 -0
- package/esm/utils/useRipple.styled.d.ts +28 -0
- package/esm/utils/useRipple.styled.d.ts.map +1 -0
- package/esm/utils/useRipple.styled.js +33 -0
- package/esm/utils/useRipple.styled.js.map +1 -0
- package/package.json +1 -1
- package/src/components/form/index.ts +1 -0
- package/src/components/form/input/Input.stories.tsx +47 -1
- package/src/components/form/input/Input.tsx +11 -5
- package/src/components/form/timepicker/TimePicker.css.ts +132 -0
- package/src/components/form/timepicker/TimePicker.stories.tsx +107 -0
- package/src/components/form/timepicker/TimePicker.styled.ts +52 -0
- package/src/components/form/timepicker/TimePicker.tsx +229 -0
- package/src/components/form/timepicker/TimePickerModal.tsx +131 -0
- package/src/components/form/timepicker/Wheel.tsx +201 -0
- package/src/components/form/timepicker/utils.ts +66 -0
- package/src/components/icons/Clock.tsx +38 -0
- package/src/components/icons/Icon.tsx +3 -0
- package/src/components/layout/header/HeaderIconAction.styled.ts +11 -18
- package/src/components/layout/header/HeaderIconAction.tsx +32 -5
- package/src/components/layout/list/Item.styled.ts +2 -1
- package/src/components/layout/list/Item.tsx +38 -5
- package/src/components/ui/button/Button.styled.ts +3 -2
- package/src/components/ui/button/Button.tsx +33 -1
- package/src/components/ui/directionPad/Button.styled.ts +2 -1
- package/src/components/ui/directionPad/Button.tsx +13 -1
- package/src/components/ui/directionPad/Middle.styled.ts +2 -1
- package/src/components/ui/directionPad/Middle.tsx +13 -1
- package/src/components/ui/modal/Modal.stories.tsx +43 -7
- package/src/components/ui/modal/Modal.styled.ts +46 -25
- package/src/components/ui/modal/Modal.tsx +135 -52
- package/src/components/ui/modal/ModalButtons.styled.ts +4 -7
- package/src/components/ui/modal/ModalButtons.tsx +38 -1
- package/src/components/ui/pop/Pop.styled.ts +15 -18
- package/src/components/ui/pop/PopOption.tsx +15 -1
- package/src/components/ui/toolButton/ToolButton.styled.ts +20 -26
- package/src/components/ui/toolButton/ToolButton.tsx +33 -0
- package/src/theme.css-global.ts +0 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/useNativeValidity.ts +57 -0
- package/src/utils/useRipple.styled.ts +56 -0
- package/src/utils/useRipple.tsx +139 -0
- package/src/components/ui/toolButton/ToolButton.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
1
|
+
import React, { forwardRef, useRef } from "react";
|
|
2
2
|
import { fnWithProps } from "../../../types/fnWithProps.js";
|
|
3
|
+
import { useRipple } from "../../../utils/useRipple.js";
|
|
3
4
|
import { ICON } from "../../icons/Icon.js";
|
|
4
5
|
import { StyledIcon, StyledInnerContainer, StyledItem, StyledNoIcon } from "./Item.styled.js";
|
|
5
6
|
import { Label } from "./Label.js";
|
|
@@ -8,7 +9,9 @@ const icon = React.createElement(StyledIcon, { name: ICON.forward });
|
|
|
8
9
|
const noIcon = React.createElement(StyledNoIcon, null);
|
|
9
10
|
const ListItemInnerContainerClassNameSelector = StyledInnerContainer.toString();
|
|
10
11
|
const ItemBase = forwardRef(({ href, to, onClick, Link, ratio, ...props }, ref) => {
|
|
11
|
-
var _a;
|
|
12
|
+
var _a, _b;
|
|
13
|
+
const innerRef = useRef(null);
|
|
14
|
+
const ripple = useRipple({ ref: innerRef });
|
|
12
15
|
const r = ratio ? ratio.split("/") : [];
|
|
13
16
|
const pre = typeof props.selected === "boolean"
|
|
14
17
|
? React.createElement(Label, null, props.selected ? icon : noIcon)
|
|
@@ -29,27 +32,34 @@ const ItemBase = forwardRef(({ href, to, onClick, Link, ratio, ...props }, ref)
|
|
|
29
32
|
css: { flex },
|
|
30
33
|
});
|
|
31
34
|
})) !== null && _a !== void 0 ? _a : [];
|
|
35
|
+
const interactive = Boolean((_b = onClick !== null && onClick !== void 0 ? onClick : href) !== null && _b !== void 0 ? _b : to);
|
|
36
|
+
const rippleProps = interactive
|
|
37
|
+
? { onPointerDown: ripple.onPointerDown, onKeyDown: ripple.onKeyDown }
|
|
38
|
+
: {};
|
|
32
39
|
if (to) {
|
|
33
40
|
if (!Link) {
|
|
34
41
|
throw new TypeError("`to` prop given without `Link` component");
|
|
35
42
|
}
|
|
36
43
|
return (React.createElement(StyledItem, { ...props, ref: ref },
|
|
37
44
|
React.createElement(Link, { href: to },
|
|
38
|
-
React.createElement(StyledInnerContainer, { as: "a", href: to },
|
|
45
|
+
React.createElement(StyledInnerContainer, { as: "a", href: to, ref: innerRef, ...rippleProps },
|
|
39
46
|
pre,
|
|
40
|
-
ren
|
|
47
|
+
ren,
|
|
48
|
+
ripple.ripples))));
|
|
41
49
|
}
|
|
42
50
|
if (href) {
|
|
43
51
|
return (React.createElement(StyledItem, { ...props, ref: ref },
|
|
44
|
-
React.createElement(StyledInnerContainer, { as: "a", href: href, onClick: onClick },
|
|
52
|
+
React.createElement(StyledInnerContainer, { as: "a", href: href, onClick: onClick, ref: innerRef, ...rippleProps },
|
|
45
53
|
pre,
|
|
46
|
-
ren
|
|
54
|
+
ren,
|
|
55
|
+
ripple.ripples)));
|
|
47
56
|
}
|
|
48
57
|
if (onClick) {
|
|
49
58
|
return (React.createElement(StyledItem, { ...props, ref: ref },
|
|
50
|
-
React.createElement(StyledInnerContainer, { as: "button", onClick: onClick },
|
|
59
|
+
React.createElement(StyledInnerContainer, { as: "button", onClick: onClick, ref: innerRef, ...rippleProps },
|
|
51
60
|
pre,
|
|
52
|
-
ren
|
|
61
|
+
ren,
|
|
62
|
+
ripple.ripples)));
|
|
53
63
|
}
|
|
54
64
|
return React.createElement(StyledItem, { ...props, ref: ref },
|
|
55
65
|
React.createElement(StyledInnerContainer, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.styled.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Item.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.styled.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWxB,CAAC;AAEH,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6Bd,CAAC;AAOH,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA2B,CAAC;AAC5C,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6B,CAAC;AAEhD,OAAO,EACH,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,YAAY,GACf,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css, dimensionsPxToRem, fontPxToRem, pxToRem, styled } from "../../../theme.js";
|
|
2
|
+
import { rippleHostStyles } from "../../../utils/useRipple.styled.js";
|
|
2
3
|
import { Icon } from "../../icons/Icon.js";
|
|
3
|
-
const StyledInnerContainer = styled("div", {
|
|
4
|
+
const StyledInnerContainer = styled("div", rippleHostStyles, {
|
|
4
5
|
display: "flex",
|
|
5
6
|
minHeight: dimensionsPxToRem(174),
|
|
6
7
|
alignItems: "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.styled.js","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,MAAM,oBAAoB,GAAG,MAAM,CAAC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"Item.styled.js","sourceRoot":"","sources":["../../../../src/components/layout/list/Item.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,MAAM,oBAAoB,GAAG,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE;IACzD,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,iBAAiB,CAAC,GAAG,CAAC;IACjC,UAAU,EAAE,QAAQ;IACpB,GAAG,EAAE,MAAM;IACX,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,SAAS;CACtB,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE;IAC5B,eAAe,EAAE,MAAM;IACvB,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,CAAC;IACZ,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC;IAE3B,qBAAqB,EAAE;QACnB,SAAS,EAAE,4BAA4B;KAC1C;IAED,KAAK,EAAE;QACH,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,CAAC;QACV,cAAc,EAAE,MAAM;KACzB;IAED,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE;gBACF,WAAW,EAAE,iBAAiB,CAAC,EAAE,CAAC;gBAClC,YAAY,EAAE,iBAAiB,CAAC,EAAE,CAAC;aACtC;SACJ;QACD,QAAQ,EAAE;YACN,IAAI,EAAE;gBACF,KAAK,EAAE,YAAY;aACtB;SACJ;KACJ;CACJ,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,GAAG,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IACjB,OAAO,EAAE,cAAc;CAC1B,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAC5C,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAEhD,OAAO,EACH,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,YAAY,GACf,CAAC"}
|
|
@@ -1,2 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
+
}, "outline" | "css" | "inline"> & import("../../../../node_modules/@stitches/react/types/styled-component").TransformProps<{
|
|
5
|
+
inline?: boolean | "true";
|
|
6
|
+
outline?: boolean | "true";
|
|
7
|
+
}, {}> & {
|
|
8
|
+
css?: import("../../../../node_modules/@stitches/react/types/css-util").CSS<{}, {
|
|
9
|
+
colors: {
|
|
10
|
+
background: "white";
|
|
11
|
+
mainColor: "#008ad2";
|
|
12
|
+
mainColorAlt: "#006AA9";
|
|
13
|
+
activeBg: "#e7e7e7";
|
|
14
|
+
inactiveBg: "#d3d3de";
|
|
15
|
+
inactiveDarkBg: "#999";
|
|
16
|
+
toggleHandleBg: "#e0e0e0";
|
|
17
|
+
toggleHandleBorder: "#cdcdcd";
|
|
18
|
+
toggleBgDisabled: "#f0f0f0";
|
|
19
|
+
toggleHandleBorderDisabled: "#c29f7d";
|
|
20
|
+
toggleHandleBgDisabled: "#deae84";
|
|
21
|
+
icon: "#636363";
|
|
22
|
+
border: "#d5d5d5";
|
|
23
|
+
buttonBorder: "#bababa";
|
|
24
|
+
headerBorder: "#c8c8c9";
|
|
25
|
+
headerBg: "#efeff0";
|
|
26
|
+
headerText: "#484848";
|
|
27
|
+
text: "#323232";
|
|
28
|
+
text2: "#181818";
|
|
29
|
+
text3: "#000000";
|
|
30
|
+
sub: "#959595";
|
|
31
|
+
popText: "#666";
|
|
32
|
+
toolbarBorder: "#ababab";
|
|
33
|
+
toolbarBg: "#f8f8f8";
|
|
34
|
+
modalBg: "#f7f7f7";
|
|
35
|
+
modalButtonBg: "#f8f8f8";
|
|
36
|
+
modalButtonBorder: "#c2c2c2";
|
|
37
|
+
inputDisabledBg: "#f3f3f3";
|
|
38
|
+
inputDisabledText: "#959595";
|
|
39
|
+
choiceBg: "#ffffff";
|
|
40
|
+
choiceText: "#999999";
|
|
41
|
+
choiceActiveBg: "#f3f3f3";
|
|
42
|
+
choiceActiveText: "#313131";
|
|
43
|
+
choiceBorder: "#cfcfcf";
|
|
44
|
+
selectorText: "#606060";
|
|
45
|
+
selectorActive: "#008ad2";
|
|
46
|
+
blue1: "#038bf4";
|
|
47
|
+
blue2: "#b7d6f5";
|
|
48
|
+
blue3: "#dbe6ff";
|
|
49
|
+
blue4: "#33b4ff";
|
|
50
|
+
blue5: "#30a2e6";
|
|
51
|
+
orange1: "#ff7200";
|
|
52
|
+
orange1Darker: "#cc5b00";
|
|
53
|
+
purple1: "#7357e8";
|
|
54
|
+
green1: "#3ec234";
|
|
55
|
+
green1Darker: "#38af2f";
|
|
56
|
+
pink1: "#ff388f";
|
|
57
|
+
red1: "#ea2700";
|
|
58
|
+
yellow1: "#ffde9d";
|
|
59
|
+
yellow2: "#e4a429";
|
|
60
|
+
yellow3: "#fff5db";
|
|
61
|
+
pinky1: "#f5c0b7";
|
|
62
|
+
pinky2: "#e07b67";
|
|
63
|
+
pinky3: "#ffe1db";
|
|
64
|
+
grey1: "#737373";
|
|
65
|
+
focusColor: "#dcaf00";
|
|
66
|
+
scrollbarsThumb: "#737373";
|
|
67
|
+
scrollbarsBg: "transparent";
|
|
68
|
+
tableStripedBg: "#fafafa";
|
|
69
|
+
toolButtonText: "#666e80";
|
|
70
|
+
};
|
|
71
|
+
}, import("../../../../node_modules/@stitches/react/types/config").DefaultThemeMap, {
|
|
72
|
+
mx: (value: string | number) => {
|
|
73
|
+
marginLeft: string | number;
|
|
74
|
+
marginRight: string | number;
|
|
75
|
+
};
|
|
76
|
+
my: (value: string | number) => {
|
|
77
|
+
marginTop: string | number;
|
|
78
|
+
marginBottom: string | number;
|
|
79
|
+
};
|
|
80
|
+
px: (value: string | number) => {
|
|
81
|
+
paddingLeft: string | number;
|
|
82
|
+
paddingRight: string | number;
|
|
83
|
+
};
|
|
84
|
+
py: (value: string | number) => {
|
|
85
|
+
paddingTop: string | number;
|
|
86
|
+
paddingBottom: string | number;
|
|
87
|
+
};
|
|
88
|
+
size: (value: string | number) => {
|
|
89
|
+
width: string | number;
|
|
90
|
+
height: string | number;
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
93
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
94
|
+
export { Button, };
|
|
2
95
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDAgBV,CAAC;AAKH,OAAO,EACH,MAAM,GACT,CAAC"}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
|
|
3
|
+
import { useRipple } from "../../../utils/useRipple.js";
|
|
4
|
+
import { StyledButton } from "./Button.styled.js";
|
|
5
|
+
const Button = forwardRef((props, ref) => {
|
|
6
|
+
const { children, onPointerDown, onKeyDown, ...rest } = props;
|
|
7
|
+
const innerRef = useForwardedRef(ref);
|
|
8
|
+
const ripple = useRipple({ ref: innerRef, onPointerDown, onKeyDown });
|
|
9
|
+
return (React.createElement(StyledButton, { ref: innerRef, onPointerDown: ripple.onPointerDown, onKeyDown: ripple.onKeyDown, ...rest },
|
|
10
|
+
children,
|
|
11
|
+
ripple.ripples));
|
|
12
|
+
});
|
|
13
|
+
Button.displayName = "Button";
|
|
14
|
+
Button.toString = () => StyledButton.toString();
|
|
15
|
+
export { Button, };
|
|
2
16
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,MAAM,MAAM,GAAG,UAAU,CAA2B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC/D,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC9D,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC;IAEtE,OAAO,CACH,oBAAC,YAAY,IACT,GAAG,EAAE,QAAQ,EACb,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,SAAS,EAAE,MAAM,CAAC,SAAS,KACvB,IAAI;QAEP,QAAQ;QACR,MAAM,CAAC,OAAO,CACJ,CAClB,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAC9B,MAAM,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;AAEhD,OAAO,EACH,MAAM,GACT,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const StyledButton: import("../../../../node_modules/@stitches/react/types/styled-component").StyledComponent<"button", {
|
|
2
2
|
inline?: boolean | "true";
|
|
3
3
|
outline?: boolean | "true";
|
|
4
4
|
}, {}, import("../../../../node_modules/@stitches/react/types/css-util").CSS<{}, {
|
|
@@ -86,5 +86,5 @@ declare const Button: import("../../../../node_modules/@stitches/react/types/sty
|
|
|
86
86
|
height: string | number;
|
|
87
87
|
};
|
|
88
88
|
}>>;
|
|
89
|
-
export {
|
|
89
|
+
export { StyledButton, };
|
|
90
90
|
//# sourceMappingURL=Button.styled.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.styled.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.styled.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiChB,CAAC;AAEH,OAAO,EACH,YAAY,GACf,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { borderPxToRem, dimensionsPxToRem, fontPxToRem, pxToRem, styled } from "../../../theme.js";
|
|
2
|
-
|
|
2
|
+
import { rippleHostStyles } from "../../../utils/useRipple.styled.js";
|
|
3
|
+
const StyledButton = styled("button", rippleHostStyles, {
|
|
3
4
|
"height": dimensionsPxToRem(118),
|
|
4
5
|
"background": "$green1",
|
|
5
6
|
"border": `${borderPxToRem(1)} solid $green1Darker`,
|
|
@@ -31,5 +32,5 @@ const Button = styled("button", {
|
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
});
|
|
34
|
-
export {
|
|
35
|
+
export { StyledButton, };
|
|
35
36
|
//# sourceMappingURL=Button.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styled.js","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.styled.js","sourceRoot":"","sources":["../../../../src/components/ui/button/Button.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,gBAAgB,EAAE;IACpD,QAAQ,EAAE,iBAAiB,CAAC,GAAG,CAAC;IAChC,YAAY,EAAE,SAAS;IACvB,QAAQ,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,sBAAsB;IACnD,OAAO,EAAE,aAAa;IACtB,cAAc,EAAE,QAAQ;IACxB,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,QAAQ;IACtB,gBAAgB,EAAE,QAAQ;IAC1B,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC;IAC3B,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;IAElB,YAAY,EAAE;QACV,OAAO,EAAE,GAAG;KACf;IAED,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE;gBACF,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,aAAa;aACzB;SACJ;QACD,OAAO,EAAE;YACL,IAAI,EAAE;gBACF,UAAU,EAAE,aAAa;gBACzB,WAAW,EAAE,eAAe;gBAC5B,KAAK,EAAE,QAAQ;aAClB;SACJ;KACJ;CACJ,CAAC,CAAC;AAEH,OAAO,EACH,YAAY,GACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,KAAK,cAAc,GAAG;IAClB,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,QAAA,MAAM,SAAS,0FAeb,CAAC;AAKH,QAAA,MAAM,oBAAoB,QAAuB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
|
+
import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
|
|
3
|
+
import { useRipple } from "../../../utils/useRipple.js";
|
|
2
4
|
import { StyledButton, StyledDot } from "./Button.styled.js";
|
|
3
5
|
const PadButton = forwardRef((props, ref) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
const innerRef = useForwardedRef(ref);
|
|
7
|
+
const ripple = useRipple({ ref: innerRef, fromCenter: true });
|
|
8
|
+
return (React.createElement(StyledButton, { ...props, ref: innerRef, onPointerDown: ripple.onPointerDown, onKeyDown: ripple.onKeyDown },
|
|
9
|
+
React.createElement(StyledDot, null),
|
|
10
|
+
ripple.ripples));
|
|
6
11
|
});
|
|
7
12
|
PadButton.displayName = "PadButton";
|
|
8
13
|
PadButton.toString = () => StyledButton.toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM1D,MAAM,SAAS,GAAG,UAAU,CAAoC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC3E,OAAO,CACH,oBAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM1D,MAAM,SAAS,GAAG,UAAU,CAAoC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC3E,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9D,OAAO,CACH,oBAAC,YAAY,OACL,KAAK,EACT,GAAG,EAAE,QAAQ,EACb,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,SAAS,EAAE,MAAM,CAAC,SAAS;QAE3B,oBAAC,SAAS,OAAG;QACZ,MAAM,CAAC,OAAO,CACJ,CAClB,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AACpC,SAAS,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;AAEnD,MAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.styled.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.styled.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQhB,CAAC;AAEH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOb,CAAC;AAEH,OAAO,EACH,YAAY,EACZ,SAAS,GACZ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { styled } from "../../../theme.js";
|
|
2
|
-
|
|
2
|
+
import { rippleHostStyles } from "../../../utils/useRipple.styled.js";
|
|
3
|
+
const StyledButton = styled("button", rippleHostStyles, {
|
|
3
4
|
height: "50px",
|
|
4
5
|
width: "50px",
|
|
5
6
|
margin: "0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styled.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.styled.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Button.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,gBAAgB,EAAE;IACpD,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,GAAG;IACX,YAAY,EAAE,OAAO;IACrB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,MAAM;CACrB,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE;IAC7B,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,OAAO;IACrB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC;AAEH,OAAO,EACH,YAAY,EACZ,SAAS,GACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Middle.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Middle.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,KAAK,cAAc,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,QAAA,MAAM,SAAS,0FAeb,CAAC;AAKH,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
|
+
import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
|
|
3
|
+
import { useRipple } from "../../../utils/useRipple.js";
|
|
2
4
|
import { StyledMiddle } from "./Middle.styled.js";
|
|
3
5
|
const PadMiddle = forwardRef((props, ref) => {
|
|
4
|
-
|
|
6
|
+
const innerRef = useForwardedRef(ref);
|
|
7
|
+
const ripple = useRipple({ ref: innerRef, fromCenter: true });
|
|
8
|
+
return (React.createElement(StyledMiddle, { onClick: props.onClick, ref: innerRef, onPointerDown: ripple.onPointerDown, onKeyDown: ripple.onKeyDown },
|
|
9
|
+
props.label,
|
|
10
|
+
ripple.ripples));
|
|
5
11
|
});
|
|
6
12
|
PadMiddle.displayName = "PadMiddle";
|
|
7
13
|
PadMiddle.toString = () => StyledMiddle.toString();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Middle.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAO/C,MAAM,SAAS,GAAG,UAAU,CAAoC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC3E,OAAO,CACH,oBAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"Middle.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAO/C,MAAM,SAAS,GAAG,UAAU,CAAoC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC3E,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9D,OAAO,CACH,oBAAC,YAAY,IACT,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,GAAG,EAAE,QAAQ,EACb,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,SAAS,EAAE,MAAM,CAAC,SAAS;QAE1B,KAAK,CAAC,KAAK;QACX,MAAM,CAAC,OAAO,CACJ,CAClB,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AACpC,SAAS,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Middle.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.styled.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Middle.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.styled.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYhB,CAAC;AAEH,OAAO,EACH,YAAY,GACf,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { styled } from "../../../theme.js";
|
|
2
|
-
|
|
2
|
+
import { rippleHostStyles } from "../../../utils/useRipple.styled.js";
|
|
3
|
+
const StyledMiddle = styled("button", rippleHostStyles, {
|
|
3
4
|
display: "flex",
|
|
4
5
|
alignItems: "center",
|
|
5
6
|
justifyContent: "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Middle.styled.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Middle.styled.js","sourceRoot":"","sources":["../../../../src/components/ui/directionPad/Middle.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,gBAAgB,EAAE;IACpD,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,gBAAgB;IACxB,SAAS,EAAE,YAAY;IACvB,YAAY,EAAE,OAAO;IACrB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,QAAQ;CACtB,CAAC,CAAC;AAEH,OAAO,EACH,YAAY,GACf,CAAC"}
|
|
@@ -2,13 +2,12 @@ import React from "react";
|
|
|
2
2
|
import { ContainerStyled, OverlayStyled } from "./Modal.styled";
|
|
3
3
|
type OverlayProps = React.ComponentProps<typeof OverlayStyled>;
|
|
4
4
|
type ContainerProps = React.ComponentProps<typeof ContainerStyled>;
|
|
5
|
-
interface Props {
|
|
5
|
+
interface Props extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
6
6
|
onOverlayClick?: (() => void) | "close" | null;
|
|
7
7
|
closeOnEsc?: boolean;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
isOpen: boolean;
|
|
10
10
|
title?: React.ReactNode;
|
|
11
|
-
className?: string;
|
|
12
11
|
portal?: boolean | HTMLElement;
|
|
13
12
|
children: React.ReactNode;
|
|
14
13
|
position?: OverlayProps["position"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAS3F,OAAO,EAAE,eAAe,EAAoB,aAAa,EAA8B,MAAM,gBAAgB,CAAC;AAE9G,KAAK,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;AAC/D,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,CAAC;AAkBnE,UAAU,KAAM,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACvE,cAAc,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACpC,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CACjC;AAoND,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAET,CAAC;AAGH,QAAA,MAAM,sBAAsB,QAA6B,CAAC;AAC1D,QAAA,MAAM,kBAAkB,QAAyB,CAAC;AAClD,QAAA,MAAM,0BAA0B,QAA2B,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -1,49 +1,100 @@
|
|
|
1
|
-
import React, { forwardRef, useCallback, useEffect, useRef, useState } from "react";
|
|
1
|
+
import React, { forwardRef, useCallback, useEffect, useId, useRef, useState } from "react";
|
|
2
2
|
import { createPortal } from "react-dom";
|
|
3
3
|
import { useForwardedRef } from "@bedrock-layout/use-forwarded-ref";
|
|
4
4
|
import { fnWithProps } from "../../../types/fnWithProps.js";
|
|
5
|
+
import { HandleEsc } from "../../utils/HandleEsc.js";
|
|
5
6
|
import { ContainerStyled, NEGATIVE_PADDING, OverlayStyled, RemovePadding, TitleStyled } from "./Modal.styled.js";
|
|
6
|
-
const
|
|
7
|
+
const FOCUSABLE_SELECTOR = [
|
|
8
|
+
"a[href]",
|
|
9
|
+
"button:not([disabled])",
|
|
10
|
+
"input:not([disabled])",
|
|
11
|
+
"select:not([disabled])",
|
|
12
|
+
"textarea:not([disabled])",
|
|
13
|
+
"[tabindex]:not([tabindex=\"-1\"])",
|
|
14
|
+
].join(",");
|
|
15
|
+
const prefersReducedMotion = () => {
|
|
16
|
+
if (typeof window === "undefined") {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
20
|
+
};
|
|
21
|
+
const ModalBase = forwardRef(({ children, onClose, isOpen, title, className, onOverlayClick = "close", closeOnEsc = true, portal = true, position, full, ...rest }, ref) => {
|
|
7
22
|
const [isClosing, setIsClosing] = useState(false);
|
|
8
23
|
const [isRendered, setIsRendered] = useState(false);
|
|
9
24
|
const overlayRef = useRef(null);
|
|
10
25
|
const containerRef = useForwardedRef(ref);
|
|
26
|
+
const previouslyFocusedRef = useRef(null);
|
|
27
|
+
const titleId = useId();
|
|
11
28
|
useEffect(() => {
|
|
12
|
-
if (
|
|
29
|
+
if (isOpen) {
|
|
30
|
+
setIsRendered(true);
|
|
31
|
+
setIsClosing(false);
|
|
13
32
|
return;
|
|
14
33
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
document.addEventListener("keydown", onKeyDown);
|
|
21
|
-
return () => {
|
|
22
|
-
document.removeEventListener("keydown", onKeyDown);
|
|
23
|
-
};
|
|
24
|
-
}, [isOpen, closeOnEsc, onClose]);
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (!isOpen) {
|
|
27
|
-
setIsClosing(true);
|
|
34
|
+
if (prefersReducedMotion()) {
|
|
35
|
+
setIsRendered(false);
|
|
36
|
+
setIsClosing(false);
|
|
28
37
|
return;
|
|
29
38
|
}
|
|
30
|
-
|
|
31
|
-
setIsClosing(false);
|
|
39
|
+
setIsClosing(true);
|
|
32
40
|
}, [isOpen]);
|
|
33
41
|
useEffect(() => {
|
|
34
42
|
if (!isClosing) {
|
|
35
43
|
return;
|
|
36
44
|
}
|
|
37
|
-
|
|
45
|
+
const overlay = overlayRef.current;
|
|
46
|
+
const container = containerRef.current;
|
|
47
|
+
if (!overlay || !container) {
|
|
38
48
|
return;
|
|
39
49
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
overlay.style.animation = "none";
|
|
51
|
+
container.style.animation = "none";
|
|
52
|
+
overlay.offsetHeight;
|
|
53
|
+
overlay.style.removeProperty("animation");
|
|
54
|
+
container.style.removeProperty("animation");
|
|
45
55
|
}, [isClosing, containerRef]);
|
|
46
|
-
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
var _a;
|
|
58
|
+
if (!isOpen || !isRendered) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const container = containerRef.current;
|
|
62
|
+
const overlay = overlayRef.current;
|
|
63
|
+
if (!container || !overlay) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
previouslyFocusedRef.current = document.activeElement instanceof HTMLElement
|
|
67
|
+
? document.activeElement
|
|
68
|
+
: null;
|
|
69
|
+
const focusables = container.querySelectorAll(FOCUSABLE_SELECTOR);
|
|
70
|
+
((_a = focusables[0]) !== null && _a !== void 0 ? _a : container).focus();
|
|
71
|
+
const inerted = [];
|
|
72
|
+
let cursor = overlay;
|
|
73
|
+
while (cursor !== document.body) {
|
|
74
|
+
const parentEl = cursor.parentElement;
|
|
75
|
+
if (!parentEl) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
for (const child of Array.from(parentEl.children)) {
|
|
79
|
+
if (child === cursor || !(child instanceof HTMLElement)) {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (!child.hasAttribute("inert")) {
|
|
83
|
+
child.setAttribute("inert", "");
|
|
84
|
+
inerted.push(child);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
cursor = parentEl;
|
|
88
|
+
}
|
|
89
|
+
return () => {
|
|
90
|
+
var _a;
|
|
91
|
+
inerted.forEach((el) => {
|
|
92
|
+
el.removeAttribute("inert");
|
|
93
|
+
});
|
|
94
|
+
(_a = previouslyFocusedRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
95
|
+
};
|
|
96
|
+
}, [isOpen, isRendered, containerRef]);
|
|
97
|
+
const titleElem = title ? React.createElement(TitleStyled, { id: titleId }, title) : null;
|
|
47
98
|
const handleOverlayClick = useCallback((e) => {
|
|
48
99
|
if (e.target !== e.currentTarget) {
|
|
49
100
|
return;
|
|
@@ -51,11 +102,14 @@ const ModalBase = forwardRef(({ children, onClose, isOpen, title, className, onO
|
|
|
51
102
|
if (onOverlayClick === "close") {
|
|
52
103
|
onClose();
|
|
53
104
|
}
|
|
54
|
-
if (typeof onOverlayClick === "function") {
|
|
105
|
+
else if (typeof onOverlayClick === "function") {
|
|
55
106
|
onOverlayClick();
|
|
56
107
|
}
|
|
57
108
|
}, [onOverlayClick, onClose]);
|
|
58
|
-
const handleAnimationEnd = useCallback(() => {
|
|
109
|
+
const handleAnimationEnd = useCallback((e) => {
|
|
110
|
+
if (e.target !== e.currentTarget) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
59
113
|
if (isOpen) {
|
|
60
114
|
return;
|
|
61
115
|
}
|
|
@@ -65,31 +119,37 @@ const ModalBase = forwardRef(({ children, onClose, isOpen, title, className, onO
|
|
|
65
119
|
return null;
|
|
66
120
|
}
|
|
67
121
|
const overlayVariants = {};
|
|
68
|
-
|
|
69
|
-
|
|
122
|
+
if (isClosing) {
|
|
123
|
+
overlayVariants.isClosing = true;
|
|
124
|
+
}
|
|
125
|
+
if (position != null) {
|
|
126
|
+
overlayVariants.position = position;
|
|
127
|
+
}
|
|
70
128
|
const containerVariants = {};
|
|
71
|
-
|
|
72
|
-
|
|
129
|
+
if (isClosing) {
|
|
130
|
+
containerVariants.isClosing = true;
|
|
131
|
+
}
|
|
132
|
+
if (full != null) {
|
|
133
|
+
containerVariants.full = full;
|
|
134
|
+
}
|
|
73
135
|
const childrenCount = React.Children.count(children);
|
|
74
136
|
const chld = React.Children.map(children, (child, index) => {
|
|
75
137
|
var _a;
|
|
76
|
-
if (React.isValidElement(child)) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
css.marginBottom = NEGATIVE_PADDING;
|
|
84
|
-
}
|
|
85
|
-
return React.cloneElement(child, { css });
|
|
138
|
+
if (React.isValidElement(child) && child.type === RemovePadding) {
|
|
139
|
+
const css = { ...((_a = child.props.css) !== null && _a !== void 0 ? _a : {}) };
|
|
140
|
+
if (index === 0 && titleElem == null) {
|
|
141
|
+
css.marginTop = NEGATIVE_PADDING;
|
|
142
|
+
}
|
|
143
|
+
if (index === childrenCount - 1) {
|
|
144
|
+
css.marginBottom = NEGATIVE_PADDING;
|
|
86
145
|
}
|
|
87
|
-
return child;
|
|
146
|
+
return React.cloneElement(child, { css });
|
|
88
147
|
}
|
|
89
148
|
return child;
|
|
90
149
|
});
|
|
91
150
|
const tree = (React.createElement(OverlayStyled, { ...overlayVariants, onClick: handleOverlayClick, ref: overlayRef, onAnimationEnd: handleAnimationEnd },
|
|
92
|
-
React.createElement(
|
|
151
|
+
closeOnEsc ? React.createElement(HandleEsc, { onPress: onClose }) : null,
|
|
152
|
+
React.createElement(ContainerStyled, { role: "dialog", "aria-modal": true, "aria-labelledby": titleElem ? titleId : undefined, tabIndex: -1, className: className, ...containerVariants, ref: containerRef, ...rest },
|
|
93
153
|
titleElem,
|
|
94
154
|
chld)));
|
|
95
155
|
if (portal) {
|