@consta/uikit 5.31.0 → 5.32.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/ColorPicker/index.d.ts +1 -0
- package/ColorPicker/index.js +1 -0
- package/__internal__/src/components/Attachment/Attachment.css +1 -1
- package/__internal__/src/components/Attachment/types.d.ts +1 -1
- package/__internal__/src/components/Attachment/types.js.map +1 -1
- package/__internal__/src/components/AttachmentDeprecated/Attachment.css +1 -1
- package/__internal__/src/components/AttachmentDeprecated/AttachmentDeprecated.js.map +1 -1
- package/__internal__/src/components/AttachmentDeprecated/types.d.ts +1 -1
- package/__internal__/src/components/AttachmentDeprecated/types.js.map +1 -1
- package/__internal__/src/components/Avatar/Avatar.d.ts +2 -2
- package/__internal__/src/components/Avatar/Avatar.js.map +1 -1
- package/__internal__/src/components/AvatarGroup/types.d.ts +2 -2
- package/__internal__/src/components/AvatarGroup/types.js.map +1 -1
- package/__internal__/src/components/Badge/Badge.css +2 -2
- package/__internal__/src/components/Badge/maps.js.map +1 -1
- package/__internal__/src/components/Badge/types.d.ts +4 -4
- package/__internal__/src/components/Badge/types.js.map +1 -1
- package/__internal__/src/components/Banner/Banner.d.ts +4 -4
- package/__internal__/src/components/Banner/Banner.js.map +1 -1
- package/__internal__/src/components/BookmarkTabs/BookmarkTabs.js.map +1 -1
- package/__internal__/src/components/BookmarkTabs/types.d.ts +3 -3
- package/__internal__/src/components/BookmarkTabs/types.js.map +1 -1
- package/__internal__/src/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/__internal__/src/components/Breadcrumbs/types.d.ts +2 -2
- package/__internal__/src/components/Breadcrumbs/types.js.map +1 -1
- package/__internal__/src/components/Button/Button.d.ts +4 -4
- package/__internal__/src/components/Button/Button.js.map +1 -1
- package/__internal__/src/components/Card/Card.d.ts +3 -3
- package/__internal__/src/components/Card/Card.js.map +1 -1
- package/__internal__/src/components/Checkbox/Checkbox.css +2 -2
- package/__internal__/src/components/Checkbox/Checkbox.d.ts +3 -3
- package/__internal__/src/components/Checkbox/Checkbox.js.map +1 -1
- package/__internal__/src/components/CheckboxDeprecated/Checkbox.css +2 -2
- package/__internal__/src/components/CheckboxDeprecated/CheckboxDeprecated.d.ts +3 -3
- package/__internal__/src/components/CheckboxDeprecated/CheckboxDeprecated.js.map +1 -1
- package/__internal__/src/components/CheckboxGroup/types.d.ts +4 -4
- package/__internal__/src/components/CheckboxGroup/types.js.map +1 -1
- package/__internal__/src/components/Chips/ChipsItem/ChipsItem.css +2 -2
- package/__internal__/src/components/Chips/types.d.ts +2 -2
- package/__internal__/src/components/Chips/types.js.map +1 -1
- package/__internal__/src/components/ChoiceGroup/ChoiceGroup.js.map +1 -1
- package/__internal__/src/components/ChoiceGroup/types.d.ts +4 -4
- package/__internal__/src/components/ChoiceGroup/types.js.map +1 -1
- package/__internal__/src/components/Collapse/types.d.ts +7 -7
- package/__internal__/src/components/Collapse/types.js.map +1 -1
- package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.css +7 -0
- package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.d.ts +6 -0
- package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorControl/index.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/ColorControl/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorControl/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorControl/types.d.ts +6 -0
- package/__internal__/src/components/ColorPicker/ColorControl/types.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorControl/types.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.d.ts +4 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.d.ts +6 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.d.ts +16 -0
- package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorMarker/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorMarker/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorMarker/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.d.ts +13 -0
- package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPalette/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPalette/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPalette/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.d.ts +3 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/index.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/types.d.ts +25 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/types.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPicker/types.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.d.ts +12 -0
- package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.d.ts +12 -0
- package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerBase/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerBase/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerBase/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.d.ts +12 -0
- package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerHue/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerHue/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerHue/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.css +3 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.d.ts +5 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.d.ts +12 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/index.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/types.d.ts +25 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/types.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInput/types.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.d.ts +15 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.d.ts +8 -0
- package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.d.ts +16 -0
- package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.css +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.d.ts +13 -0
- package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.js.map +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.js +2 -0
- package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.js +2 -0
- package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.js.map +1 -0
- package/__internal__/src/components/ColorPicker/hooks/useEventCallback.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/hooks/useEventCallback.js +2 -0
- package/__internal__/src/components/ColorPicker/hooks/useEventCallback.js.map +1 -0
- package/__internal__/src/components/ColorPicker/index.d.ts +10 -0
- package/__internal__/src/components/ColorPicker/index.js +2 -0
- package/__internal__/src/components/ColorPicker/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hexAlphaModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hexAlphaModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hexAlphaModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hexModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hexModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hexModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hslModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hslModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hslModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hslStringModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hslStringModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hslStringModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hslaModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hslaModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hslaModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hslaStringModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hslaStringModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hslaStringModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hsvModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hsvStringModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvStringModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvStringModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hsvaModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvaModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvaModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/hsvaStringModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvaStringModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/hsvaStringModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/index.d.ts +14 -0
- package/__internal__/src/components/ColorPicker/models/index.js +2 -0
- package/__internal__/src/components/ColorPicker/models/index.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/rgbModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/rgbStringModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbStringModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbStringModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/rgbaModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbaModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbaModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/models/rgbaStringModel.d.ts +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbaStringModel.js +2 -0
- package/__internal__/src/components/ColorPicker/models/rgbaStringModel.js.map +1 -0
- package/__internal__/src/components/ColorPicker/types.d.ts +33 -0
- package/__internal__/src/components/ColorPicker/types.js +2 -0
- package/__internal__/src/components/ColorPicker/types.js.map +1 -0
- package/__internal__/src/components/ColorPicker/utils/clamp.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/utils/clamp.js +2 -0
- package/__internal__/src/components/ColorPicker/utils/clamp.js.map +1 -0
- package/__internal__/src/components/ColorPicker/utils/compare.d.ts +4 -0
- package/__internal__/src/components/ColorPicker/utils/compare.js +2 -0
- package/__internal__/src/components/ColorPicker/utils/compare.js.map +1 -0
- package/__internal__/src/components/ColorPicker/utils/convert.d.ts +32 -0
- package/__internal__/src/components/ColorPicker/utils/convert.js +2 -0
- package/__internal__/src/components/ColorPicker/utils/convert.js.map +1 -0
- package/__internal__/src/components/ColorPicker/utils/format.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/utils/format.js +2 -0
- package/__internal__/src/components/ColorPicker/utils/format.js.map +1 -0
- package/__internal__/src/components/ColorPicker/utils/round.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/utils/round.js +2 -0
- package/__internal__/src/components/ColorPicker/utils/round.js.map +1 -0
- package/__internal__/src/components/ColorPicker/utils/validate.d.ts +1 -0
- package/__internal__/src/components/ColorPicker/utils/validate.js +2 -0
- package/__internal__/src/components/ColorPicker/utils/validate.js.map +1 -0
- package/__internal__/src/components/ContextMenu/ContextMenuLevel/ContextMenuLevel.js.map +1 -1
- package/__internal__/src/components/ContextMenu/ContextMenuLevels/ContextMenuLevels.js.map +1 -1
- package/__internal__/src/components/ContextMenu/types.d.ts +3 -3
- package/__internal__/src/components/ContextMenu/types.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.d.ts +1 -0
- package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDate/DatePickerTypeDate.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDate/DatePickerTypeDate.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeMonth/DatePickerTypeMonth.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeMonth/DatePickerTypeMonth.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/getChangeFnRange.js +1 -1
- package/__internal__/src/components/DatePicker/getChangeFnRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/helpers.js.map +1 -1
- package/__internal__/src/components/DatePicker/types.d.ts +6 -6
- package/__internal__/src/components/DatePicker/types.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTime100YearSlider/DateTime100YearSlider.js +1 -1
- package/__internal__/src/components/DateTime/DateTime100YearSlider/DateTime100YearSlider.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTime10YearSlider/DateTime10YearSlider.js +1 -1
- package/__internal__/src/components/DateTime/DateTime10YearSlider/DateTime10YearSlider.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.d.ts +1 -1
- package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTimeGrid/DateTimeGrid.css +1 -1
- package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js +1 -1
- package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js +1 -1
- package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js +1 -1
- package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js.map +1 -1
- package/__internal__/src/components/DateTime/DateTimeYearSlider/DateTimeYearSlider.js +1 -1
- package/__internal__/src/components/DateTime/DateTimeYearSlider/DateTimeYearSlider.js.map +1 -1
- package/__internal__/src/components/DateTime/helpers/index.js +1 -1
- package/__internal__/src/components/DateTime/helpers/index.js.map +1 -1
- package/__internal__/src/components/DateTime/helpers/types.d.ts +4 -3
- package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
- package/__internal__/src/components/DragNDropField/DragNDropFieldTooltip/DragNDropFieldTooltip.css +1 -1
- package/__internal__/src/components/DragNDropFieldCanary/types.d.ts +1 -1
- package/__internal__/src/components/DragNDropFieldCanary/types.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.css +4 -2
- package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.d.ts +5 -2
- package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js.map +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.d.ts +1 -0
- package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.js +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.js.map +1 -1
- package/__internal__/src/components/FieldGroup/getForm.js +1 -1
- package/__internal__/src/components/FieldGroup/getForm.js.map +1 -1
- package/__internal__/src/components/FileCanary/types.d.ts +1 -1
- package/__internal__/src/components/FileCanary/types.js.map +1 -1
- package/__internal__/src/components/FlatSelect/FlatSelect.css +8 -8
- package/__internal__/src/components/FlatSelect/FlatSelectList/FlatSelectList.d.ts +1 -1
- package/__internal__/src/components/FlatSelect/FlatSelectList/FlatSelectList.js.map +1 -1
- package/__internal__/src/components/Grid/types.d.ts +4 -4
- package/__internal__/src/components/Grid/types.js.map +1 -1
- package/__internal__/src/components/GridDeprecated/Grid.css +1 -1
- package/__internal__/src/components/GridDeprecated/GridDeprecated.d.ts +4 -4
- package/__internal__/src/components/GridDeprecated/GridDeprecated.js.map +1 -1
- package/__internal__/src/components/Informer/Informer.d.ts +3 -3
- package/__internal__/src/components/Informer/Informer.js.map +1 -1
- package/__internal__/src/components/Layout/Layout.d.ts +3 -3
- package/__internal__/src/components/Layout/Layout.js.map +1 -1
- package/__internal__/src/components/Layout/useFixed.d.ts +2 -2
- package/__internal__/src/components/Layout/useFixed.js.map +1 -1
- package/__internal__/src/components/ListCanary/ListCanary.js.map +1 -1
- package/__internal__/src/components/ListCanary/ListItemGrid/ListItemGrid.css +1 -1
- package/__internal__/src/components/ListCanary/types.d.ts +4 -4
- package/__internal__/src/components/ListCanary/types.js.map +1 -1
- package/__internal__/src/components/LoaderDeprecated/Loader.css +2 -2
- package/__internal__/src/components/LoaderDeprecated/LoaderDeprecated.d.ts +1 -1
- package/__internal__/src/components/LoaderDeprecated/LoaderDeprecated.js.map +1 -1
- package/__internal__/src/components/Modal/ModalLayout/ModalLayout.css +4 -4
- package/__internal__/src/components/ModalDeprecated/ModalDeprecated.d.ts +2 -2
- package/__internal__/src/components/ModalDeprecated/ModalDeprecated.js.map +1 -1
- package/__internal__/src/components/Notification/helpers/defaultDateFormat.js +1 -1
- package/__internal__/src/components/Notification/helpers/defaultDateFormat.js.map +1 -1
- package/__internal__/src/components/Pagination/types.d.ts +3 -3
- package/__internal__/src/components/Pagination/types.js.map +1 -1
- package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.d.ts +4 -4
- package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.js.map +1 -1
- package/__internal__/src/components/Popover/Popover.d.ts +2 -2
- package/__internal__/src/components/Popover/Popover.js.map +1 -1
- package/__internal__/src/components/ProgressLine/ProgressLine.css +1 -1
- package/__internal__/src/components/ProgressLine/types.d.ts +1 -1
- package/__internal__/src/components/ProgressLine/types.js.map +1 -1
- package/__internal__/src/components/ProgressSpin/ProgressSpin.d.ts +1 -1
- package/__internal__/src/components/ProgressSpin/ProgressSpin.js.map +1 -1
- package/__internal__/src/components/ProgressStepBar/ProgressStepBarItem/ProgressStepBarItem.css +8 -8
- package/__internal__/src/components/ProgressStepBar/helpers.d.ts +5 -5
- package/__internal__/src/components/ProgressStepBar/helpers.js.map +1 -1
- package/__internal__/src/components/Radio/Radio.css +1 -1
- package/__internal__/src/components/Radio/Radio.d.ts +3 -3
- package/__internal__/src/components/Radio/Radio.js.map +1 -1
- package/__internal__/src/components/RadioGroup/types.d.ts +4 -4
- package/__internal__/src/components/RadioGroup/types.js.map +1 -1
- package/__internal__/src/components/Responses/Responses.d.ts +1 -1
- package/__internal__/src/components/Responses/Responses.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectCanary/SelectMultiple/SelectMultiple.css +2 -2
- package/__internal__/src/components/SelectCanary/SelectPopover/SelectPopover.d.ts +1 -1
- package/__internal__/src/components/SelectCanary/SelectPopover/SelectPopover.js.map +1 -1
- package/__internal__/src/components/SelectCanary/helpers.d.ts +1 -1
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectComponents/SelectValueTag/SelectValueTag.css +1 -1
- package/__internal__/src/components/SelectComponents/types.d.ts +4 -4
- package/__internal__/src/components/SelectComponents/types.js.map +1 -1
- package/__internal__/src/components/SelectComponents/useSelect/useSelect.js +1 -1
- package/__internal__/src/components/SelectComponents/useSelect/useSelect.js.map +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectValueTag/SelectValueTag.css +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/types.d.ts +4 -4
- package/__internal__/src/components/SelectComponentsDeprecated/types.js.map +1 -1
- package/__internal__/src/components/Sidebar/types.d.ts +2 -2
- package/__internal__/src/components/Sidebar/types.js.map +1 -1
- package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.d.ts +2 -2
- package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.js.map +1 -1
- package/__internal__/src/components/Skeleton/Skeleton.css +1 -1
- package/__internal__/src/components/Slider/helper.d.ts +2 -2
- package/__internal__/src/components/Slider/helper.js.map +1 -1
- package/__internal__/src/components/SnackBar/types.d.ts +4 -4
- package/__internal__/src/components/SnackBar/types.js.map +1 -1
- package/__internal__/src/components/Spoiler/types.d.ts +2 -2
- package/__internal__/src/components/Spoiler/types.js.map +1 -1
- package/__internal__/src/components/Steps/StepsStep/StepsStep.css +1 -1
- package/__internal__/src/components/Steps/types.d.ts +1 -1
- package/__internal__/src/components/Steps/types.js.map +1 -1
- package/__internal__/src/components/Switch/Switch.css +1 -1
- package/__internal__/src/components/Switch/types.d.ts +3 -3
- package/__internal__/src/components/Switch/types.js.map +1 -1
- package/__internal__/src/components/SwitchGroup/types.d.ts +1 -1
- package/__internal__/src/components/SwitchGroup/types.js.map +1 -1
- package/__internal__/src/components/Table/Cell/TableCell.css +1 -1
- package/__internal__/src/components/Table/Cell/TableCell.d.ts +2 -2
- package/__internal__/src/components/Table/Cell/TableCell.js.map +1 -1
- package/__internal__/src/components/Table/Header/TableHeader.d.ts +1 -1
- package/__internal__/src/components/Table/Header/TableHeader.js.map +1 -1
- package/__internal__/src/components/Table/Table.d.ts +3 -3
- package/__internal__/src/components/Table/Table.js.map +1 -1
- package/__internal__/src/components/Table/__mock__/data.mock.d.ts +10 -10
- package/__internal__/src/components/Table/__mock__/data.mock.js.map +1 -1
- package/__internal__/src/components/Table/helpers.d.ts +1 -1
- package/__internal__/src/components/Table/helpers.js.map +1 -1
- package/__internal__/src/components/Tabs/Tabs.js.map +1 -1
- package/__internal__/src/components/Tabs/types.d.ts +4 -4
- package/__internal__/src/components/Tabs/types.js.map +1 -1
- package/__internal__/src/components/Tag/Tag.d.ts +1 -1
- package/__internal__/src/components/Tag/Tag.js.map +1 -1
- package/__internal__/src/components/TagBase/TagBase.d.ts +3 -3
- package/__internal__/src/components/TagBase/TagBase.js.map +1 -1
- package/__internal__/src/components/Text/Text.d.ts +13 -13
- package/__internal__/src/components/Text/Text.js.map +1 -1
- package/__internal__/src/components/TextAreaAutoSize/TextAreaAutoSize.css +1 -1
- package/__internal__/src/components/TextDeprecated/TextDeprecated.d.ts +13 -13
- package/__internal__/src/components/TextDeprecated/TextDeprecated.js.map +1 -1
- package/__internal__/src/components/TextField/types.d.ts +4 -4
- package/__internal__/src/components/TextField/types.js.map +1 -1
- package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js +1 -1
- package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js.map +1 -1
- package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArea/TextFieldTypeTextArea.css +2 -2
- package/__internal__/src/components/TextFieldCanary/useTextField.js.map +1 -1
- package/__internal__/src/components/ThemeToggler/ThemeToggler.js.map +1 -1
- package/__internal__/src/components/ThemeToggler/types.d.ts +1 -1
- package/__internal__/src/components/ThemeToggler/types.js.map +1 -1
- package/__internal__/src/components/Timer/Timer.d.ts +1 -1
- package/__internal__/src/components/Timer/Timer.js.map +1 -1
- package/__internal__/src/components/Tooltip/types.d.ts +2 -2
- package/__internal__/src/components/Tooltip/types.js.map +1 -1
- package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +2 -2
- package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.js.map +1 -1
- package/__internal__/src/components/User/User.css +1 -1
- package/__internal__/src/components/User/User.d.ts +4 -4
- package/__internal__/src/components/User/User.js.map +1 -1
- package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.css +1 -1
- package/__internal__/src/fileIcons/FileIcon/FileIcon.d.ts +1 -1
- package/__internal__/src/fileIcons/FileIcon/FileIcon.js.map +1 -1
- package/__internal__/src/hocs/withTooltip/withTooltip.d.ts +1 -1
- package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
- package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.d.ts +1 -1
- package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.js.map +1 -1
- package/__internal__/src/hooks/useRefs/useRefs.js.map +1 -1
- package/__internal__/src/hooks/useStyleProps/types.js.map +1 -1
- package/__internal__/src/mixs/MixCard/MixCard.d.ts +2 -2
- package/__internal__/src/mixs/MixCard/MixCard.js.map +1 -1
- package/__internal__/src/mixs/MixFlex/MixFlex.d.ts +5 -5
- package/__internal__/src/mixs/MixFlex/MixFlex.js.map +1 -1
- package/__internal__/src/mixs/MixScrollBar/MixScrollBar.d.ts +2 -2
- package/__internal__/src/mixs/MixScrollBar/MixScrollBar.js.map +1 -1
- package/__internal__/src/mixs/MixVisuallyHidden/MixVisuallyHidden.css +1 -1
- package/__internal__/src/utils/array.js.map +1 -1
- package/__internal__/src/utils/date/index.js +1 -1
- package/__internal__/src/utils/date/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["themeTogglerPropSize","themeTogglerPropSizeDefault"],"sources":["../../../../../src/components/ThemeToggler/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nimport { ButtonPropView } from '##/components/Button';\nimport { Direction } from '##/components/Popover';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const themeTogglerPropSize = ['m', 'l', 's', 'xs'] as const;\nexport type ThemeTogglerPropSize = typeof themeTogglerPropSize[number];\nexport const themeTogglerPropSizeDefault: ThemeTogglerPropSize =\n themeTogglerPropSize[0];\n\nexport type ThemeTogglerPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\nexport type ThemeTogglerPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type ThemeTogglerPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type ThemeTogglerPropGetItemIcon<ITEM> = (item: ITEM) => IconComponent;\n\nexport type ThemeTogglerItemDefault = {\n key: string;\n label: string;\n icon: IconComponent;\n};\n\nexport type ThemeTogglerProps<ITEM = ThemeTogglerItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n size?: ThemeTogglerPropSize;\n className?: string;\n items: ITEM[];\n value: ITEM;\n onChange: ThemeTogglerPropOnChange<ITEM>;\n getItemKey?: ThemeTogglerPropGetItemKey<ITEM>;\n getItemLabel?: ThemeTogglerPropGetItemLabel<ITEM>;\n getItemIcon?: ThemeTogglerPropGetItemIcon<ITEM>;\n direction?: Direction;\n possibleDirections?: Direction[];\n children?: never;\n view?: ButtonPropView;\n },\n HTMLButtonElement\n > &\n (ITEM extends { key: ThemeTogglerItemDefault['key'] }\n ? {}\n : { getItemKey: ThemeTogglerPropGetItemLabel<ITEM> }) &\n (ITEM extends { label: ThemeTogglerItemDefault['label'] }\n ? {}\n : { getItemLabel: ThemeTogglerPropGetItemLabel<ITEM> }) &\n (ITEM extends { icon: ThemeTogglerItemDefault['icon'] }\n ? {}\n : { getItemIcon: ThemeTogglerPropGetItemIcon<ITEM> });\n\nexport type ThemeTogglerComponent = <ITEM>(\n props: ThemeTogglerProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAMA,MAAO,IAAMA,qBAAoB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAgB,IAAhB,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["themeTogglerPropSize","themeTogglerPropSizeDefault"],"sources":["../../../../../src/components/ThemeToggler/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nimport { ButtonPropView } from '##/components/Button';\nimport { Direction } from '##/components/Popover';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const themeTogglerPropSize = ['m', 'l', 's', 'xs'] as const;\nexport type ThemeTogglerPropSize = (typeof themeTogglerPropSize)[number];\nexport const themeTogglerPropSizeDefault: ThemeTogglerPropSize =\n themeTogglerPropSize[0];\n\nexport type ThemeTogglerPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\nexport type ThemeTogglerPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type ThemeTogglerPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type ThemeTogglerPropGetItemIcon<ITEM> = (item: ITEM) => IconComponent;\n\nexport type ThemeTogglerItemDefault = {\n key: string;\n label: string;\n icon: IconComponent;\n};\n\nexport type ThemeTogglerProps<ITEM = ThemeTogglerItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n size?: ThemeTogglerPropSize;\n className?: string;\n items: ITEM[];\n value: ITEM;\n onChange: ThemeTogglerPropOnChange<ITEM>;\n getItemKey?: ThemeTogglerPropGetItemKey<ITEM>;\n getItemLabel?: ThemeTogglerPropGetItemLabel<ITEM>;\n getItemIcon?: ThemeTogglerPropGetItemIcon<ITEM>;\n direction?: Direction;\n possibleDirections?: Direction[];\n children?: never;\n view?: ButtonPropView;\n },\n HTMLButtonElement\n > &\n (ITEM extends { key: ThemeTogglerItemDefault['key'] }\n ? {}\n : { getItemKey: ThemeTogglerPropGetItemLabel<ITEM> }) &\n (ITEM extends { label: ThemeTogglerItemDefault['label'] }\n ? {}\n : { getItemLabel: ThemeTogglerPropGetItemLabel<ITEM> }) &\n (ITEM extends { icon: ThemeTogglerItemDefault['icon'] }\n ? {}\n : { getItemIcon: ThemeTogglerPropGetItemIcon<ITEM> });\n\nexport type ThemeTogglerComponent = <ITEM>(\n props: ThemeTogglerProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAMA,MAAO,IAAMA,qBAAoB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAgB,IAAhB,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf"}
|
|
@@ -2,7 +2,7 @@ import './Timer.css';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';
|
|
4
4
|
export declare const timerPropsSize: readonly ["m", "s", "l", "xl", "2xl"];
|
|
5
|
-
export type TimerPropsSize = typeof timerPropsSize[number];
|
|
5
|
+
export type TimerPropsSize = (typeof timerPropsSize)[number];
|
|
6
6
|
export declare const timerPropsSizeDefault: TimerPropsSize;
|
|
7
7
|
export type TimerProps = PropsWithJsxAttributes<{
|
|
8
8
|
size?: TimerPropsSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timer.js","names":["React","cn","ProgressSpin","timerPropsSize","timerPropsSizeDefault","cnTimer","Timer","forwardRef","props","ref","seconds","progress","size","className","animation","otherProps"],"sources":["../../../../../src/components/Timer/Timer.tsx"],"sourcesContent":["import './Timer.css';\n\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';\nimport { ProgressSpin } from '../ProgressSpin/ProgressSpin';\n\nexport const timerPropsSize = ['m', 's', 'l', 'xl', '2xl'] as const;\nexport type TimerPropsSize = typeof timerPropsSize[number];\nexport const timerPropsSizeDefault: TimerPropsSize = timerPropsSize[0];\n\nexport type TimerProps = PropsWithJsxAttributes<{\n size?: TimerPropsSize;\n seconds?: number;\n progress?: number;\n animation?: boolean;\n children?: never;\n}>;\n\nexport const cnTimer = cn('Timer');\n\nexport const Timer = React.forwardRef<HTMLDivElement, TimerProps>(\n (props, ref) => {\n const {\n seconds = 0,\n progress = 0,\n size = timerPropsSizeDefault,\n className,\n animation,\n ...otherProps\n } = props;\n\n return (\n <div {...otherProps} className={cnTimer({ size }, [className])} ref={ref}>\n <ProgressSpin\n className={cnTimer('Progress')}\n size={size}\n progress={progress}\n animation={animation}\n />\n {size !== 's' && <div className={cnTimer('Counter')}>{seconds}</div>}\n </div>\n );\n },\n);\n"],"mappings":"yJAAA,oBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBAEA,OAASC,YAAT,oCAEA,MAAO,IAAMC,eAAc,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAgB,IAAhB,CAAsB,KAAtB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAUP,MAAO,IAAME,QAAO,CAAGJ,EAAE,CAAC,OAAD,CAAlB,CAEP,MAAO,IAAMK,MAAK,CAAGN,KAAK,CAACO,UAAN,CACnB,SAACC,CAAD,CAAQC,CAAR,CAAgB,CACd,MAOID,CAPJ,CACEE,OADF,CACEA,CADF,YACY,CADZ,KAOIF,CAPJ,CAEEG,QAFF,CAEEA,CAFF,YAEa,CAFb,KAOIH,CAPJ,CAGEI,IAHF,CAGEA,CAHF,YAGSR,qBAHT,GAIES,CAJF,CAOIL,CAPJ,CAIEK,SAJF,CAKEC,CALF,CAOIN,CAPJ,CAKEM,SALF,CAMKC,CANL,0BAOIP,CAPJ,YASA,MACE,4CAASO,CAAT,EAAqB,SAAS,CAAEV,OAAO,CAAC,CAAEO,IAAI,CAAJA,CAAF,CAAD,CAAW,CAACC,CAAD,CAAX,CAAvC,CAAgE,GAAG,CAAEJ,CAArE,GACE,oBAAC,YAAD,EACE,SAAS,CAAEJ,OAAO,CAAC,UAAD,CADpB,CAEE,IAAI,CAAEO,CAFR,CAGE,QAAQ,CAAED,CAHZ,CAIE,SAAS,CAAEG,CAJb,EADF,CAOY,GAAT,GAAAF,CAAI,EAAY,2BAAK,SAAS,CAAEP,OAAO,CAAC,SAAD,CAAvB,EAAqCK,CAArC,CAPnB,CAUH,CAtBkB,CAAd"}
|
|
1
|
+
{"version":3,"file":"Timer.js","names":["React","cn","ProgressSpin","timerPropsSize","timerPropsSizeDefault","cnTimer","Timer","forwardRef","props","ref","seconds","progress","size","className","animation","otherProps"],"sources":["../../../../../src/components/Timer/Timer.tsx"],"sourcesContent":["import './Timer.css';\n\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';\nimport { ProgressSpin } from '../ProgressSpin/ProgressSpin';\n\nexport const timerPropsSize = ['m', 's', 'l', 'xl', '2xl'] as const;\nexport type TimerPropsSize = (typeof timerPropsSize)[number];\nexport const timerPropsSizeDefault: TimerPropsSize = timerPropsSize[0];\n\nexport type TimerProps = PropsWithJsxAttributes<{\n size?: TimerPropsSize;\n seconds?: number;\n progress?: number;\n animation?: boolean;\n children?: never;\n}>;\n\nexport const cnTimer = cn('Timer');\n\nexport const Timer = React.forwardRef<HTMLDivElement, TimerProps>(\n (props, ref) => {\n const {\n seconds = 0,\n progress = 0,\n size = timerPropsSizeDefault,\n className,\n animation,\n ...otherProps\n } = props;\n\n return (\n <div {...otherProps} className={cnTimer({ size }, [className])} ref={ref}>\n <ProgressSpin\n className={cnTimer('Progress')}\n size={size}\n progress={progress}\n animation={animation}\n />\n {size !== 's' && <div className={cnTimer('Counter')}>{seconds}</div>}\n </div>\n );\n },\n);\n"],"mappings":"yJAAA,oBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBAEA,OAASC,YAAT,oCAEA,MAAO,IAAMC,eAAc,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAgB,IAAhB,CAAsB,KAAtB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAUP,MAAO,IAAME,QAAO,CAAGJ,EAAE,CAAC,OAAD,CAAlB,CAEP,MAAO,IAAMK,MAAK,CAAGN,KAAK,CAACO,UAAN,CACnB,SAACC,CAAD,CAAQC,CAAR,CAAgB,CACd,MAOID,CAPJ,CACEE,OADF,CACEA,CADF,YACY,CADZ,KAOIF,CAPJ,CAEEG,QAFF,CAEEA,CAFF,YAEa,CAFb,KAOIH,CAPJ,CAGEI,IAHF,CAGEA,CAHF,YAGSR,qBAHT,GAIES,CAJF,CAOIL,CAPJ,CAIEK,SAJF,CAKEC,CALF,CAOIN,CAPJ,CAKEM,SALF,CAMKC,CANL,0BAOIP,CAPJ,YASA,MACE,4CAASO,CAAT,EAAqB,SAAS,CAAEV,OAAO,CAAC,CAAEO,IAAI,CAAJA,CAAF,CAAD,CAAW,CAACC,CAAD,CAAX,CAAvC,CAAgE,GAAG,CAAEJ,CAArE,GACE,oBAAC,YAAD,EACE,SAAS,CAAEJ,OAAO,CAAC,UAAD,CADpB,CAEE,IAAI,CAAEO,CAFR,CAGE,QAAQ,CAAED,CAHZ,CAIE,SAAS,CAAEG,CAJb,EADF,CAOY,GAAT,GAAAF,CAAI,EAAY,2BAAK,SAAS,CAAEP,OAAO,CAAC,SAAD,CAAvB,EAAqCK,CAArC,CAPnB,CAUH,CAtBkB,CAAd"}
|
|
@@ -2,10 +2,10 @@ import { ClickOutsideHandler } from '../../hooks/useClickOutside/useClickOutside
|
|
|
2
2
|
import { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';
|
|
3
3
|
import { Direction, PositioningProps } from '../Popover/Popover';
|
|
4
4
|
export declare const tooltipPropSizes: readonly ["m", "s", "l"];
|
|
5
|
-
export type TooltipPropSize = typeof tooltipPropSizes[number];
|
|
5
|
+
export type TooltipPropSize = (typeof tooltipPropSizes)[number];
|
|
6
6
|
export declare const tooltipPropSizesDefault: TooltipPropSize;
|
|
7
7
|
export declare const tooltipPropStatus: readonly ["normal", "alert", "success", "warning"];
|
|
8
|
-
export type TooltipPropStatus = typeof tooltipPropStatus[number];
|
|
8
|
+
export type TooltipPropStatus = (typeof tooltipPropStatus)[number];
|
|
9
9
|
export type TooltipProps = PropsWithJsxAttributes<{
|
|
10
10
|
isOpen?: boolean;
|
|
11
11
|
size?: TooltipPropSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["tooltipPropSizes","tooltipPropSizesDefault","tooltipPropStatus"],"sources":["../../../../../src/components/Tooltip/types.ts"],"sourcesContent":["import { ClickOutsideHandler } from '##/hooks/useClickOutside/useClickOutside';\nimport { PropsWithJsxAttributes } from '##/utils/types/PropsWithJsxAttributes';\n\nimport { Direction, PositioningProps } from '../Popover/Popover';\n\nexport const tooltipPropSizes = ['m', 's', 'l'] as const;\nexport type TooltipPropSize = typeof tooltipPropSizes[number];\nexport const tooltipPropSizesDefault: TooltipPropSize = tooltipPropSizes[0];\n\nexport const tooltipPropStatus = [\n 'normal',\n 'alert',\n 'success',\n 'warning',\n] as const;\nexport type TooltipPropStatus = typeof tooltipPropStatus[number];\n\nexport type TooltipProps = PropsWithJsxAttributes<\n {\n isOpen?: boolean;\n size?: TooltipPropSize;\n status?: TooltipPropStatus;\n direction?: Direction;\n spareDirection?: Direction;\n possibleDirections?: Direction[];\n isInteractive?: boolean;\n children: React.ReactNode;\n onClickOutside?: ClickOutsideHandler;\n className?: string;\n offset?: number;\n onSetDirection?: (direction: Direction) => void;\n viewportRef?: React.RefObject<HTMLElement>;\n container?: Element;\n } & PositioningProps\n>;\n"],"mappings":"AAKA,MAAO,IAAMA,iBAAgB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAzB,CAEP,MAAO,IAAMC,wBAAwC,CAAGD,gBAAgB,CAAC,CAAD,CAAjE,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAC/B,QAD+B,CAE/B,OAF+B,CAG/B,SAH+B,CAI/B,SAJ+B,CAA1B"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["tooltipPropSizes","tooltipPropSizesDefault","tooltipPropStatus"],"sources":["../../../../../src/components/Tooltip/types.ts"],"sourcesContent":["import { ClickOutsideHandler } from '##/hooks/useClickOutside/useClickOutside';\nimport { PropsWithJsxAttributes } from '##/utils/types/PropsWithJsxAttributes';\n\nimport { Direction, PositioningProps } from '../Popover/Popover';\n\nexport const tooltipPropSizes = ['m', 's', 'l'] as const;\nexport type TooltipPropSize = (typeof tooltipPropSizes)[number];\nexport const tooltipPropSizesDefault: TooltipPropSize = tooltipPropSizes[0];\n\nexport const tooltipPropStatus = [\n 'normal',\n 'alert',\n 'success',\n 'warning',\n] as const;\nexport type TooltipPropStatus = (typeof tooltipPropStatus)[number];\n\nexport type TooltipProps = PropsWithJsxAttributes<\n {\n isOpen?: boolean;\n size?: TooltipPropSize;\n status?: TooltipPropStatus;\n direction?: Direction;\n spareDirection?: Direction;\n possibleDirections?: Direction[];\n isInteractive?: boolean;\n children: React.ReactNode;\n onClickOutside?: ClickOutsideHandler;\n className?: string;\n offset?: number;\n onSetDirection?: (direction: Direction) => void;\n viewportRef?: React.RefObject<HTMLElement>;\n container?: Element;\n } & PositioningProps\n>;\n"],"mappings":"AAKA,MAAO,IAAMA,iBAAgB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAzB,CAEP,MAAO,IAAMC,wBAAwC,CAAGD,gBAAgB,CAAC,CAAD,CAAjE,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAC/B,QAD+B,CAE/B,OAF+B,CAG/B,SAH+B,CAI/B,SAJ+B,CAA1B"}
|
|
@@ -5,9 +5,9 @@ import { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes
|
|
|
5
5
|
import { Direction, PositioningProps } from '../Popover/Popover';
|
|
6
6
|
export declare const tooltipPropSizes: readonly ["m", "s", "l"];
|
|
7
7
|
export declare const tooltipPropSizesDefault: "m";
|
|
8
|
-
export type TooltipPropSize = typeof tooltipPropSizes[number];
|
|
8
|
+
export type TooltipPropSize = (typeof tooltipPropSizes)[number];
|
|
9
9
|
export declare const tooltipPropStatus: readonly ["normal", "alert", "success", "warning"];
|
|
10
|
-
export type TooltipPropStatus = typeof tooltipPropStatus[number];
|
|
10
|
+
export type TooltipPropStatus = (typeof tooltipPropStatus)[number];
|
|
11
11
|
export type TooltipProps = PropsWithJsxAttributes<{
|
|
12
12
|
size?: TooltipPropSize;
|
|
13
13
|
status?: TooltipPropStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipDeprecated.js","names":["React","useMemo","useState","cnMixPopoverArrow","cnDeprecated","Popover","Text","generateDeps","generateThemeClassNames","ThemeContext","useTheme","ARROW_SIZE","ARROW_OFFSET","cnTooltip","tooltipPropSizes","tooltipPropSizesDefault","tooltipPropStatus","renderChildren","children","Tooltip","forwardRef","props","ref","size","className","status","onSetDirectionProp","onSetDirection","style","offset","rest","theme","direction","setDirection","value","tooltipTheme","color","primary","accent","invert","themeClassNames"],"sources":["../../../../../src/components/TooltipDeprecated/TooltipDeprecated.tsx"],"sourcesContent":["import './Tooltip.css';\n\nimport React, { useMemo, useState } from 'react';\n\nimport { ClickOutsideHandler } from '../../hooks/useClickOutside/useClickOutside';\nimport { cnMixPopoverArrow } from '../../mixs/MixPopoverArrow/MixPopoverArrow';\nimport { cnDeprecated } from '../../utils/bem';\nimport { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';\nimport { Direction, Popover, PositioningProps } from '../Popover/Popover';\nimport { Text } from '../Text/Text';\nimport {\n generateDeps,\n generateThemeClassNames,\n ThemeContext,\n useTheme,\n} from '../Theme/Theme';\n\nconst ARROW_SIZE = 6;\nconst ARROW_OFFSET = 8;\n\nconst cnTooltip = cnDeprecated('Tooltip');\n\nexport const tooltipPropSizes = ['m', 's', 'l'] as const;\nexport const tooltipPropSizesDefault = tooltipPropSizes[0];\nexport type TooltipPropSize = typeof tooltipPropSizes[number];\n\nexport const tooltipPropStatus = [\n 'normal',\n 'alert',\n 'success',\n 'warning',\n] as const;\nexport type TooltipPropStatus = typeof tooltipPropStatus[number];\n\nexport type TooltipProps = PropsWithJsxAttributes<\n {\n size?: TooltipPropSize;\n status?: TooltipPropStatus;\n direction?: Direction;\n spareDirection?: Direction;\n possibleDirections?: Direction[];\n isInteractive?: boolean;\n children: React.ReactNode;\n onClickOutside?: ClickOutsideHandler;\n className?: string;\n offset?: number;\n onSetDirection?: (direction: Direction) => void;\n } & PositioningProps\n>;\n\nfunction renderChildren(children: React.ReactNode): React.ReactNode {\n return typeof children === 'string' || typeof children === 'number' ? (\n <Text size=\"xs\" view=\"primary\" lineHeight=\"m\">\n {children}\n </Text>\n ) : (\n children\n );\n}\n\nexport const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(\n (props, ref) => {\n const {\n children,\n size = tooltipPropSizesDefault,\n className,\n status,\n onSetDirection: onSetDirectionProp,\n style,\n offset = 0,\n ...rest\n } = props;\n const { theme } = useTheme();\n const [direction, setDirection] = useState<Direction | undefined>();\n\n const onSetDirection = (direction: Direction) => {\n onSetDirectionProp && onSetDirectionProp(direction);\n setDirection(direction);\n };\n\n const value = useMemo(() => {\n const tooltipTheme = status\n ? {\n ...theme,\n color: {\n primary: theme.color.accent,\n accent: theme.color.accent,\n invert: theme.color.primary,\n },\n }\n : {\n ...theme,\n color: {\n primary: theme.color.invert,\n accent: theme.color.accent,\n invert: theme.color.primary,\n },\n };\n\n return {\n theme: tooltipTheme,\n themeClassNames: generateThemeClassNames(tooltipTheme),\n };\n }, [generateDeps(theme), status]);\n\n return (\n <ThemeContext.Provider value={value}>\n <Popover\n {...rest}\n arrowOffset={ARROW_OFFSET + ARROW_SIZE}\n offset={ARROW_SIZE + 4 + offset}\n onSetDirection={onSetDirection}\n ref={ref}\n className={cnTooltip({ status }, [className])}\n style={{\n ['--popover-arrow-size' as string]: `${ARROW_SIZE}px`,\n ['--popover-arrow-offset' as string]: `${ARROW_OFFSET}px`,\n ...style,\n }}\n >\n <div className={cnTooltip('Background')} />\n <div\n className={cnTooltip('Arrow', [cnMixPopoverArrow({ direction })])}\n />\n <div className={cnTooltip('Content', { size })}>\n {renderChildren(children)}\n </div>\n </Popover>\n </ThemeContext.Provider>\n );\n },\n);\n"],"mappings":"o5BAAA,sBAEA,MAAOA,MAAP,EAAgBC,OAAhB,CAAyBC,QAAzB,KAAyC,OAAzC,CAGA,OAASC,iBAAT,kDACA,OAASC,YAAT,uBAEA,OAAoBC,OAApB,0BACA,OAASC,IAAT,oBACA,OACEC,YADF,CAEEC,uBAFF,CAGEC,YAHF,CAIEC,QAJF,sB,GAOMC,WAAU,CAAG,C,CACbC,YAAY,CAAG,C,CAEfC,SAAS,CAAGT,YAAY,CAAC,SAAD,C,CAE9B,MAAO,IAAMU,iBAAgB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAzB,CACP,MAAO,IAAMC,wBAAuB,CAAGD,gBAAgB,CAAC,CAAD,CAAhD,CAGP,MAAO,IAAME,kBAAiB,CAAG,CAC/B,QAD+B,CAE/B,OAF+B,CAG/B,SAH+B,CAI/B,SAJ+B,CAA1B,CAwBP,QAASC,eAAT,CAAwBC,CAAxB,CAAoE,CAClE,MAA2B,QAApB,QAAOA,EAAP,EAAoD,QAApB,QAAOA,EAAvC,CACL,oBAAC,IAAD,EAAM,IAAI,CAAC,IAAX,CAAgB,IAAI,CAAC,SAArB,CAA+B,UAAU,CAAC,GAA1C,EACGA,CADH,CADK,CAKLA,CAEH,CAED,MAAO,IAAMC,QAAO,CAAGnB,KAAK,CAACoB,UAAN,CACrB,SAACC,CAAD,CAAQC,CAAR,CAAgB,OAEZJ,CAFY,CAUVG,CAVU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c,CApCG,QAAjBF,eAAiB,CAACK,CAAD,CAA0B,CAC/CN,CAAkB,EAAIA,CAAkB,CAACM,CAAD,CADO,CAE/CC,CAAY,CAACD,CAAD,CACb,CA6BG,CAKE,GAAG,CAAEV,CALP,CAME,SAAS,CAAET,SAAS,CAAC,CAAEY,MAAM,CAANA,CAAF,CAAD,CAAa,CAACD,CAAD,CAAb,CANtB,CAOE,KAAK,uCACF,sBADE,WACoCb,UADpC,0BAEF,wBAFE,WAEsCC,YAFtC,WAGAgB,CAHA,CAPP,GAaE,2BAAK,SAAS,CAAEf,SAAS,CAAC,YAAD,CAAzB,EAbF,CAcE,2BACE,SAAS,CAAEA,SAAS,CAAC,OAAD,CAAU,CAACV,iBAAiB,CAAC,CAAE6B,SAAS,CAATA,CAAF,CAAD,CAAlB,CAAV,CADtB,EAdF,CAiBE,2BAAK,SAAS,CAAEnB,SAAS,CAAC,SAAD,CAAY,CAAEU,IAAI,CAAJA,CAAF,CAAZ,CAAzB,EACGN,cAAc,CAACC,CAAD,CADjB,CAjBF,CADF,CAwBH,CAtEoB,CAAhB"}
|
|
1
|
+
{"version":3,"file":"TooltipDeprecated.js","names":["React","useMemo","useState","cnMixPopoverArrow","cnDeprecated","Popover","Text","generateDeps","generateThemeClassNames","ThemeContext","useTheme","ARROW_SIZE","ARROW_OFFSET","cnTooltip","tooltipPropSizes","tooltipPropSizesDefault","tooltipPropStatus","renderChildren","children","Tooltip","forwardRef","props","ref","size","className","status","onSetDirectionProp","onSetDirection","style","offset","rest","theme","direction","setDirection","value","tooltipTheme","color","primary","accent","invert","themeClassNames"],"sources":["../../../../../src/components/TooltipDeprecated/TooltipDeprecated.tsx"],"sourcesContent":["import './Tooltip.css';\n\nimport React, { useMemo, useState } from 'react';\n\nimport { ClickOutsideHandler } from '../../hooks/useClickOutside/useClickOutside';\nimport { cnMixPopoverArrow } from '../../mixs/MixPopoverArrow/MixPopoverArrow';\nimport { cnDeprecated } from '../../utils/bem';\nimport { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';\nimport { Direction, Popover, PositioningProps } from '../Popover/Popover';\nimport { Text } from '../Text/Text';\nimport {\n generateDeps,\n generateThemeClassNames,\n ThemeContext,\n useTheme,\n} from '../Theme/Theme';\n\nconst ARROW_SIZE = 6;\nconst ARROW_OFFSET = 8;\n\nconst cnTooltip = cnDeprecated('Tooltip');\n\nexport const tooltipPropSizes = ['m', 's', 'l'] as const;\nexport const tooltipPropSizesDefault = tooltipPropSizes[0];\nexport type TooltipPropSize = (typeof tooltipPropSizes)[number];\n\nexport const tooltipPropStatus = [\n 'normal',\n 'alert',\n 'success',\n 'warning',\n] as const;\nexport type TooltipPropStatus = (typeof tooltipPropStatus)[number];\n\nexport type TooltipProps = PropsWithJsxAttributes<\n {\n size?: TooltipPropSize;\n status?: TooltipPropStatus;\n direction?: Direction;\n spareDirection?: Direction;\n possibleDirections?: Direction[];\n isInteractive?: boolean;\n children: React.ReactNode;\n onClickOutside?: ClickOutsideHandler;\n className?: string;\n offset?: number;\n onSetDirection?: (direction: Direction) => void;\n } & PositioningProps\n>;\n\nfunction renderChildren(children: React.ReactNode): React.ReactNode {\n return typeof children === 'string' || typeof children === 'number' ? (\n <Text size=\"xs\" view=\"primary\" lineHeight=\"m\">\n {children}\n </Text>\n ) : (\n children\n );\n}\n\nexport const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(\n (props, ref) => {\n const {\n children,\n size = tooltipPropSizesDefault,\n className,\n status,\n onSetDirection: onSetDirectionProp,\n style,\n offset = 0,\n ...rest\n } = props;\n const { theme } = useTheme();\n const [direction, setDirection] = useState<Direction | undefined>();\n\n const onSetDirection = (direction: Direction) => {\n onSetDirectionProp && onSetDirectionProp(direction);\n setDirection(direction);\n };\n\n const value = useMemo(() => {\n const tooltipTheme = status\n ? {\n ...theme,\n color: {\n primary: theme.color.accent,\n accent: theme.color.accent,\n invert: theme.color.primary,\n },\n }\n : {\n ...theme,\n color: {\n primary: theme.color.invert,\n accent: theme.color.accent,\n invert: theme.color.primary,\n },\n };\n\n return {\n theme: tooltipTheme,\n themeClassNames: generateThemeClassNames(tooltipTheme),\n };\n }, [generateDeps(theme), status]);\n\n return (\n <ThemeContext.Provider value={value}>\n <Popover\n {...rest}\n arrowOffset={ARROW_OFFSET + ARROW_SIZE}\n offset={ARROW_SIZE + 4 + offset}\n onSetDirection={onSetDirection}\n ref={ref}\n className={cnTooltip({ status }, [className])}\n style={{\n ['--popover-arrow-size' as string]: `${ARROW_SIZE}px`,\n ['--popover-arrow-offset' as string]: `${ARROW_OFFSET}px`,\n ...style,\n }}\n >\n <div className={cnTooltip('Background')} />\n <div\n className={cnTooltip('Arrow', [cnMixPopoverArrow({ direction })])}\n />\n <div className={cnTooltip('Content', { size })}>\n {renderChildren(children)}\n </div>\n </Popover>\n </ThemeContext.Provider>\n );\n },\n);\n"],"mappings":"o5BAAA,sBAEA,MAAOA,MAAP,EAAgBC,OAAhB,CAAyBC,QAAzB,KAAyC,OAAzC,CAGA,OAASC,iBAAT,kDACA,OAASC,YAAT,uBAEA,OAAoBC,OAApB,0BACA,OAASC,IAAT,oBACA,OACEC,YADF,CAEEC,uBAFF,CAGEC,YAHF,CAIEC,QAJF,sB,GAOMC,WAAU,CAAG,C,CACbC,YAAY,CAAG,C,CAEfC,SAAS,CAAGT,YAAY,CAAC,SAAD,C,CAE9B,MAAO,IAAMU,iBAAgB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAzB,CACP,MAAO,IAAMC,wBAAuB,CAAGD,gBAAgB,CAAC,CAAD,CAAhD,CAGP,MAAO,IAAME,kBAAiB,CAAG,CAC/B,QAD+B,CAE/B,OAF+B,CAG/B,SAH+B,CAI/B,SAJ+B,CAA1B,CAwBP,QAASC,eAAT,CAAwBC,CAAxB,CAAoE,CAClE,MAA2B,QAApB,QAAOA,EAAP,EAAoD,QAApB,QAAOA,EAAvC,CACL,oBAAC,IAAD,EAAM,IAAI,CAAC,IAAX,CAAgB,IAAI,CAAC,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4Cd,MACE,qBAAC,YAAD,CAAc,QAAd,EAAuB,KAAK,CAAES,CAA9B,EACE,oBAAC,OAAD,kBACMJ,CADN,EAEE,WAAW,CAAElB,YAAY,CAAGD,UAF9B,CAGE,MAAM,CAAE,GAAiBkB,CAH3B,CAIE,cAAc,CApCG,QAAjBF,eAAiB,CAACK,CAAD,CAA0B,CAC/CN,CAAkB,EAAIA,CAAkB,CAACM,CAAD,CADO,CAE/CC,CAAY,CAACD,CAAD,CACb,CA6BG,CAKE,GAAG,CAAEV,CALP,CAME,SAAS,CAAET,SAAS,CAAC,CAAEY,MAAM,CAANA,CAAF,CAAD,CAAa,CAACD,CAAD,CAAb,CANtB,CAOE,KAAK,uCACF,sBADE,WACoCb,UADpC,0BAEF,wBAFE,WAEsCC,YAFtC,WAGAgB,CAHA,CAPP,GAaE,2BAAK,SAAS,CAAEf,SAAS,CAAC,YAAD,CAAzB,EAbF,CAcE,2BACE,SAAS,CAAEA,SAAS,CAAC,OAAD,CAAU,CAACV,iBAAiB,CAAC,CAAE6B,SAAS,CAATA,CAAF,CAAD,CAAlB,CAAV,CADtB,EAdF,CAiBE,2BAAK,SAAS,CAAEnB,SAAS,CAAC,SAAD,CAAY,CAAEU,IAAI,CAAJA,CAAF,CAAZ,CAAzB,EACGN,cAAc,CAACC,CAAD,CADjB,CAjBF,CADF,CAwBH,CAtEoB,CAAhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.User{align-items:center;border:0;border-radius:99em;display:inline-flex;text-align:left;text-decoration:none;transition:background-color .25s ease}.User-Block{flex:1}.User-Icon{color:var(--color-control-typo-clear);flex:none}.User-IconRightButton{--indent-r:var(--space-xs);margin-left:var(--space-2xs)}.User-AvatarWrapper{border-radius:50%;box-sizing:content-box;flex:none;margin-right:var(--indent);padding:var(--avatar-space)}.User-AvatarWrapper_status_available{box-shadow:inset 0 0 0 var(--space-3xs) var(--color-bg-success)}.User-AvatarWrapper_status_remote{box-shadow:inset 0 0 0 var(--space-3xs) var(--color-bg-warning)}.User-AvatarWrapper_status_out{box-shadow:inset 0 0 0 var(--space-3xs) var(--color-bg-alert)}.User-AvatarWrapper:last-child{margin-right:0}.User_view_clear{background-color:var(--color-control-bg-clear)}.User_view_clear:hover{background-color:var(--color-control-bg-clear-hover)}.User_view_ghost{background-color:var(--color-control-bg-ghost)}.User_view_ghost:hover{background-color:var(--color-control-bg-ghost-hover)}.User-Info,.User-Name{
|
|
1
|
+
.User{align-items:center;border:0;border-radius:99em;display:inline-flex;text-align:left;text-decoration:none;transition:background-color .25s ease}.User-Block{flex:1}.User-Icon{color:var(--color-control-typo-clear);flex:none}.User-IconRightButton{--indent-r:var(--space-xs);margin-left:var(--space-2xs)}.User-AvatarWrapper{border-radius:50%;box-sizing:content-box;flex:none;margin-right:var(--indent);padding:var(--avatar-space)}.User-AvatarWrapper_status_available{box-shadow:inset 0 0 0 var(--space-3xs) var(--color-bg-success)}.User-AvatarWrapper_status_remote{box-shadow:inset 0 0 0 var(--space-3xs) var(--color-bg-warning)}.User-AvatarWrapper_status_out{box-shadow:inset 0 0 0 var(--space-3xs) var(--color-bg-alert)}.User-AvatarWrapper:last-child{margin-right:0}.User_view_clear{background-color:var(--color-control-bg-clear)}.User_view_clear:hover{background-color:var(--color-control-bg-clear-hover)}.User_view_ghost{background-color:var(--color-control-bg-ghost)}.User_view_ghost:hover{background-color:var(--color-control-bg-ghost-hover)}.User-Info,.User-Name{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;overflow-wrap:break-word}.User-Name{max-width:20ch}.User-Info{max-width:28ch}.User_size_s{--avatar-space:var(--space-3xs);--indent-r:var(--space-xs);--indent:var(--space-xs);--icon-indent:var(--space-s)}.User_size_m{--avatar-space:var(--space-2xs);--indent-r:var(--space-s);--indent:var(--space-xs);--icon-indent:var(--space-m)}.User_size_l{--avatar-space:var(--space-2xs);--indent-r:var(--space-m);--indent:var(--space-s);--icon-indent:var(--space-l)}.User:not(.user_minified).User_width_full{width:100%}.User:not(.user_minified).User_width_full .User-Info,.User:not(.user_minified).User_width_full .User-Name{max-width:none}.User:not(.User_minified) .User-Icon{margin-left:var(--icon-indent)}.User>:last-child:not(:first-child){margin-right:var(--indent-r)}
|
|
@@ -2,16 +2,16 @@ import './User.css';
|
|
|
2
2
|
import { IconComponent } from '@consta/icons/Icon';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export declare const userPropSize: readonly ["m", "s", "l"];
|
|
5
|
-
export type UserPropSize = typeof userPropSize[number];
|
|
5
|
+
export type UserPropSize = (typeof userPropSize)[number];
|
|
6
6
|
export declare const userPropSizeDefault: UserPropSize;
|
|
7
7
|
export declare const userPropView: readonly ["clear", "ghost"];
|
|
8
|
-
export type UserPropView = typeof userPropView[number];
|
|
8
|
+
export type UserPropView = (typeof userPropView)[number];
|
|
9
9
|
export declare const userPropViewDefault: UserPropView;
|
|
10
10
|
export declare const userPropWidth: readonly ["default", "full"];
|
|
11
|
-
export type UserPropWidth = typeof userPropWidth[number];
|
|
11
|
+
export type UserPropWidth = (typeof userPropWidth)[number];
|
|
12
12
|
export declare const userPropWidthDefault: UserPropWidth;
|
|
13
13
|
export declare const userPropStatus: readonly ["available", "remote", "out"];
|
|
14
|
-
export type UserPropStatus = typeof userPropStatus[number];
|
|
14
|
+
export type UserPropStatus = (typeof userPropStatus)[number];
|
|
15
15
|
type Props = {
|
|
16
16
|
avatarUrl?: string;
|
|
17
17
|
name?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","names":["IconSelect","React","cnMixSpace","cn","getByMap","forwardRefWithAs","Avatar","Button","Text","userPropSize","userPropSizeDefault","userPropView","userPropViewDefault","userPropWidth","userPropWidthDefault","userPropStatus","cnUser","infoSizeMap","s","m","l","iconSizeMap","avatarSizeMap","buttonSizeMap","nameSizeMap","nameOffsetMap","User","props","ref","as","className","size","avatarUrl","name","view","width","propOnlyAvatar","onlyAvatar","withArrow","iconRight","onIconRightClick","info","status","otherProps","IconRight","minified","mB"],"sources":["../../../../../src/components/User/User.tsx"],"sourcesContent":["import './User.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport { IconSelect } from '@consta/icons/IconSelect';\nimport React from 'react';\n\nimport { cnMixSpace, Space } from '##/mixs/MixSpace';\n\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { Avatar } from '../Avatar/Avatar';\nimport { Button, ButtonPropSize } from '../Button/Button';\nimport { Text, TextPropSize } from '../Text/Text';\n\nexport const userPropSize = ['m', 's', 'l'] as const;\nexport type UserPropSize = typeof userPropSize[number];\nexport const userPropSizeDefault: UserPropSize = userPropSize[0];\n\nexport const userPropView = ['clear', 'ghost'] as const;\nexport type UserPropView = typeof userPropView[number];\nexport const userPropViewDefault: UserPropView = userPropView[0];\n\nexport const userPropWidth = ['default', 'full'] as const;\nexport type UserPropWidth = typeof userPropWidth[number];\nexport const userPropWidthDefault: UserPropWidth = userPropWidth[0];\n\nexport const userPropStatus = ['available', 'remote', 'out'] as const;\nexport type UserPropStatus = typeof userPropStatus[number];\n\ntype Props = {\n avatarUrl?: string;\n name?: string;\n size?: UserPropSize;\n view?: UserPropView;\n width?: UserPropWidth;\n status?: UserPropStatus;\n onlyAvatar?: boolean;\n info?: string;\n children?: never;\n} & (\n | {\n withArrow?: boolean;\n iconRight?: never;\n onIconRightClick?: never;\n }\n | {\n withArrow?: never;\n iconRight?: IconComponent;\n onIconRightClick?: (e: React.SyntheticEvent) => void;\n }\n);\n\nexport const cnUser = cn('User');\n\nconst infoSizeMap: Record<UserPropSize, TextPropSize> = {\n s: '2xs',\n m: '2xs',\n l: 'xs',\n};\n\nconst iconSizeMap: Record<UserPropSize, IconPropSize> = {\n s: 'xs',\n m: 'xs',\n l: 's',\n};\n\nconst avatarSizeMap: Record<UserPropSize, IconPropSize> = {\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nconst buttonSizeMap: Record<UserPropSize, ButtonPropSize> = {\n s: 'xs',\n m: 'xs',\n l: 's',\n};\n\nconst nameSizeMap: Record<UserPropSize, TextPropSize> = {\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nconst nameOffsetMap: Record<UserPropSize, Space> = {\n s: 0,\n m: '3xs',\n l: '2xs',\n};\n\nexport const User = forwardRefWithAs<Props>((props, ref) => {\n const {\n as = 'div',\n className,\n size = userPropSizeDefault,\n avatarUrl,\n name,\n view = userPropViewDefault,\n width = userPropWidthDefault,\n onlyAvatar: propOnlyAvatar,\n withArrow,\n iconRight,\n onIconRightClick,\n info,\n status,\n ...otherProps\n } = props;\n const Tag = as as string;\n const onlyAvatar = propOnlyAvatar || (!name && !info);\n const IconRight = iconRight;\n\n return (\n <Tag\n {...otherProps}\n className={cnUser(\n { size, view, width, withArrow, minified: onlyAvatar },\n [className],\n )}\n ref={ref}\n >\n <div className={cnUser('AvatarWrapper', { status })}>\n <Avatar\n size={getByMap(avatarSizeMap, size)}\n url={avatarUrl}\n name={name}\n />\n </div>\n {!onlyAvatar && (name || info) && (\n <div className={cnUser('Block')}>\n {name && (\n <Text\n className={cnUser('Name', [\n cnMixSpace({ mB: nameOffsetMap[size] }),\n ])}\n size={nameSizeMap[size]}\n view=\"primary\"\n lineHeight=\"2xs\"\n >\n {name}\n </Text>\n )}\n {info && size !== 's' && (\n <Text\n className={cnUser('Info')}\n size={getByMap(infoSizeMap, size)}\n view=\"secondary\"\n lineHeight=\"2xs\"\n >\n {info}\n </Text>\n )}\n </div>\n )}\n {withArrow && (\n <IconSelect\n className={cnUser('Icon')}\n size={getByMap(iconSizeMap, size)}\n view=\"secondary\"\n />\n )}\n {IconRight && !onIconRightClick && (\n <IconRight\n className={cnUser('Icon')}\n size={getByMap(iconSizeMap, size)}\n view=\"secondary\"\n />\n )}\n {IconRight && onIconRightClick && (\n <Button\n className={cnUser('IconRightButton')}\n onClick={onIconRightClick}\n iconRight={IconRight}\n onlyIcon\n type=\"button\"\n view=\"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AAC,MAAD,CADnB,CAEE,IAAI,CAAEZ,QAAQ,CAACiB,WAAD,CAAcU,CAAd,CAFhB,CAGE,IAAI,CAAC,WAHP,EAjDJ,CAuDGa,CAAS,EAAIJ,CAAb,EACC,oBAAC,MAAD,EACE,SAAS,CAAExB,MAAM,CAAC,iBAAD,CADnB,CAEE,OAAO,CAAEwB,CAFX,CAGE,SAAS,CAAEI,CAHb,CAIE,QAAQ,GAJV,CAKE,IAAI,CAAC,QALP,CAME,IAAI,CAAC,OANP,CAOE,IAAI,CAAExC,QAAQ,CAACmB,aAAD,CAAgBQ,CAAhB,CAPhB,CAQE,IAAI,CAAC,OARP,EAxDJ,CAqEH,CA3FmC,CAA7B"}
|
|
1
|
+
{"version":3,"file":"User.js","names":["IconSelect","React","cnMixSpace","cn","getByMap","forwardRefWithAs","Avatar","Button","Text","userPropSize","userPropSizeDefault","userPropView","userPropViewDefault","userPropWidth","userPropWidthDefault","userPropStatus","cnUser","infoSizeMap","s","m","l","iconSizeMap","avatarSizeMap","buttonSizeMap","nameSizeMap","nameOffsetMap","User","props","ref","as","className","size","avatarUrl","name","view","width","propOnlyAvatar","onlyAvatar","withArrow","iconRight","onIconRightClick","info","status","otherProps","IconRight","minified","mB"],"sources":["../../../../../src/components/User/User.tsx"],"sourcesContent":["import './User.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport { IconSelect } from '@consta/icons/IconSelect';\nimport React from 'react';\n\nimport { cnMixSpace, Space } from '##/mixs/MixSpace';\n\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { Avatar } from '../Avatar/Avatar';\nimport { Button, ButtonPropSize } from '../Button/Button';\nimport { Text, TextPropSize } from '../Text/Text';\n\nexport const userPropSize = ['m', 's', 'l'] as const;\nexport type UserPropSize = (typeof userPropSize)[number];\nexport const userPropSizeDefault: UserPropSize = userPropSize[0];\n\nexport const userPropView = ['clear', 'ghost'] as const;\nexport type UserPropView = (typeof userPropView)[number];\nexport const userPropViewDefault: UserPropView = userPropView[0];\n\nexport const userPropWidth = ['default', 'full'] as const;\nexport type UserPropWidth = (typeof userPropWidth)[number];\nexport const userPropWidthDefault: UserPropWidth = userPropWidth[0];\n\nexport const userPropStatus = ['available', 'remote', 'out'] as const;\nexport type UserPropStatus = (typeof userPropStatus)[number];\n\ntype Props = {\n avatarUrl?: string;\n name?: string;\n size?: UserPropSize;\n view?: UserPropView;\n width?: UserPropWidth;\n status?: UserPropStatus;\n onlyAvatar?: boolean;\n info?: string;\n children?: never;\n} & (\n | {\n withArrow?: boolean;\n iconRight?: never;\n onIconRightClick?: never;\n }\n | {\n withArrow?: never;\n iconRight?: IconComponent;\n onIconRightClick?: (e: React.SyntheticEvent) => void;\n }\n);\n\nexport const cnUser = cn('User');\n\nconst infoSizeMap: Record<UserPropSize, TextPropSize> = {\n s: '2xs',\n m: '2xs',\n l: 'xs',\n};\n\nconst iconSizeMap: Record<UserPropSize, IconPropSize> = {\n s: 'xs',\n m: 'xs',\n l: 's',\n};\n\nconst avatarSizeMap: Record<UserPropSize, IconPropSize> = {\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nconst buttonSizeMap: Record<UserPropSize, ButtonPropSize> = {\n s: 'xs',\n m: 'xs',\n l: 's',\n};\n\nconst nameSizeMap: Record<UserPropSize, TextPropSize> = {\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nconst nameOffsetMap: Record<UserPropSize, Space> = {\n s: 0,\n m: '3xs',\n l: '2xs',\n};\n\nexport const User = forwardRefWithAs<Props>((props, ref) => {\n const {\n as = 'div',\n className,\n size = userPropSizeDefault,\n avatarUrl,\n name,\n view = userPropViewDefault,\n width = userPropWidthDefault,\n onlyAvatar: propOnlyAvatar,\n withArrow,\n iconRight,\n onIconRightClick,\n info,\n status,\n ...otherProps\n } = props;\n const Tag = as as string;\n const onlyAvatar = propOnlyAvatar || (!name && !info);\n const IconRight = iconRight;\n\n return (\n <Tag\n {...otherProps}\n className={cnUser(\n { size, view, width, withArrow, minified: onlyAvatar },\n [className],\n )}\n ref={ref}\n >\n <div className={cnUser('AvatarWrapper', { status })}>\n <Avatar\n size={getByMap(avatarSizeMap, size)}\n url={avatarUrl}\n name={name}\n />\n </div>\n {!onlyAvatar && (name || info) && (\n <div className={cnUser('Block')}>\n {name && (\n <Text\n className={cnUser('Name', [\n cnMixSpace({ mB: nameOffsetMap[size] }),\n ])}\n size={nameSizeMap[size]}\n view=\"primary\"\n lineHeight=\"2xs\"\n >\n {name}\n </Text>\n )}\n {info && size !== 's' && (\n <Text\n className={cnUser('Info')}\n size={getByMap(infoSizeMap, size)}\n view=\"secondary\"\n lineHeight=\"2xs\"\n >\n {info}\n </Text>\n )}\n </div>\n )}\n {withArrow && (\n <IconSelect\n className={cnUser('Icon')}\n size={getByMap(iconSizeMap, size)}\n view=\"secondary\"\n />\n )}\n {IconRight && !onIconRightClick && (\n <IconRight\n className={cnUser('Icon')}\n size={getByMap(iconSizeMap, size)}\n view=\"secondary\"\n />\n )}\n {IconRight && onIconRightClick && (\n <Button\n className={cnUser('IconRightButton')}\n onClick={onIconRightClick}\n iconRight={IconRight}\n onlyIcon\n type=\"button\"\n view=\"clear\"\n size={getByMap(buttonSizeMap, size)}\n form=\"round\"\n />\n )}\n </Tag>\n );\n});\n"],"mappings":"uOAAA,mBAGA,OAASA,UAAT,KAA2B,0BAA3B,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,UAAT,2BAEA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CACA,OAASC,MAAT,wBACA,OAASC,MAAT,wBACA,OAASC,IAAT,oBAEA,MAAO,IAAMC,aAAY,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAArB,CAEP,MAAO,IAAMC,oBAAiC,CAAGD,YAAY,CAAC,CAAD,CAAtD,CAEP,MAAO,IAAME,aAAY,CAAG,CAAC,OAAD,CAAU,OA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|
-
.UserSelectItem{align-items:center;background-color:var(--color-control-bg-clear);color:var(--color-control-typo-default);cursor:pointer;display:flex;font-size:var(--font-size);position:relative}.UserSelectItem_size_s{--font-size:var(--control-text-size-s);--sub-info-space:var(--space-xs);--sub-label-font-size:var(--size-text-2xs)}.UserSelectItem_size_m{--font-size:var(--control-text-size-m);--sub-info-space:var(--space-s);--sub-label-font-size:var(--size-text-xs)}.UserSelectItem_size_l{--font-size:var(--control-text-size-l);--sub-info-space:var(--space-s);--sub-label-font-size:var(--size-text-s)}.UserSelectItem_hovered{background-color:var(--color-control-bg-clear-hover)}.UserSelectItem_disable{color:var(--color-control-typo-disable);cursor:auto}.UserSelectItem_active,.UserSelectItem_active .UserSelectItem-Label,.UserSelectItem_active .UserSelectItem-SubLabel{color:var(--color-control-typo-secondary)}.UserSelectItem_indent_increased{padding-left:calc(var(--horizontal-space)*2.6)}.UserSelectItem-AvatarContainer{position:relative}.UserSelectItem-CheckIcon{background-color:var(--color-control-bg-primary);border:1px solid var(--color-control-bg-default);border-radius:50%;bottom:calc(var(--space-2xs)*-1);color:var(--color-control-bg-default);height:var(--graphics-size-xs);padding:0;position:absolute;right:calc(var(--space-2xs)*-1);width:var(--graphics-size-xs)}.UserSelectItem-CheckIcon_animate_entered,.UserSelectItem-CheckIcon_animate_entering,.UserSelectItem-CheckIcon_animate_exited,.UserSelectItem-CheckIcon_animate_exiting{transition:.2s ease;transition-property:opacity,transform}.UserSelectItem-CheckIcon_animate_entered,.UserSelectItem-CheckIcon_animate_entering{opacity:1;transform:scale(1)}.UserSelectItem-CheckIcon_animate_exiting{opacity:0;transform:scale(.25)}.UserSelectItem-CheckIcon_animate_exited{opacity:0;transform:scale(0)}.UserSelectItem-Info{flex:1;padding-left:var(--sub-info-space)}.UserSelectItem-Label,.UserSelectItem-SubLabel{
|
|
1
|
+
.UserSelectItem{align-items:center;background-color:var(--color-control-bg-clear);color:var(--color-control-typo-default);cursor:pointer;display:flex;font-size:var(--font-size);position:relative}.UserSelectItem_size_s{--font-size:var(--control-text-size-s);--sub-info-space:var(--space-xs);--sub-label-font-size:var(--size-text-2xs)}.UserSelectItem_size_m{--font-size:var(--control-text-size-m);--sub-info-space:var(--space-s);--sub-label-font-size:var(--size-text-xs)}.UserSelectItem_size_l{--font-size:var(--control-text-size-l);--sub-info-space:var(--space-s);--sub-label-font-size:var(--size-text-s)}.UserSelectItem_hovered{background-color:var(--color-control-bg-clear-hover)}.UserSelectItem_disable{color:var(--color-control-typo-disable);cursor:auto}.UserSelectItem_active,.UserSelectItem_active .UserSelectItem-Label,.UserSelectItem_active .UserSelectItem-SubLabel{color:var(--color-control-typo-secondary)}.UserSelectItem_indent_increased{padding-left:calc(var(--horizontal-space)*2.6)}.UserSelectItem-AvatarContainer{position:relative}.UserSelectItem-CheckIcon{background-color:var(--color-control-bg-primary);border:1px solid var(--color-control-bg-default);border-radius:50%;bottom:calc(var(--space-2xs)*-1);color:var(--color-control-bg-default);height:var(--graphics-size-xs);padding:0;position:absolute;right:calc(var(--space-2xs)*-1);width:var(--graphics-size-xs)}.UserSelectItem-CheckIcon_animate_entered,.UserSelectItem-CheckIcon_animate_entering,.UserSelectItem-CheckIcon_animate_exited,.UserSelectItem-CheckIcon_animate_exiting{transition:.2s ease;transition-property:opacity,transform}.UserSelectItem-CheckIcon_animate_entered,.UserSelectItem-CheckIcon_animate_entering{opacity:1;transform:scale(1)}.UserSelectItem-CheckIcon_animate_exiting{opacity:0;transform:scale(.25)}.UserSelectItem-CheckIcon_animate_exited{opacity:0;transform:scale(0)}.UserSelectItem-Info{flex:1;padding-left:var(--sub-info-space)}.UserSelectItem-Label,.UserSelectItem-SubLabel{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;line-height:var(--line-height-text-m);overflow:hidden;overflow-wrap:break-word}.UserSelectItem-Label{max-width:20ch}.UserSelectItem-SubLabel{font-size:var(--sub-label-font-size);max-width:28ch;opacity:.7}.UserSelectItem-SubLabel_disable{opacity:1}
|
|
@@ -2,7 +2,7 @@ import './FileIcon.css';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
|
|
4
4
|
export declare const fileIconPropSize: readonly ["m", "s"];
|
|
5
|
-
export type FileIconPropSize = typeof fileIconPropSize[number];
|
|
5
|
+
export type FileIconPropSize = (typeof fileIconPropSize)[number];
|
|
6
6
|
export declare const fileIconPropSizeDefault: "m";
|
|
7
7
|
type Props = {
|
|
8
8
|
size?: FileIconPropSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileIcon.js","names":["React","cn","fileIconPropSize","fileIconPropSizeDefault","cnIconFile","FileIcon","forwardRef","props","ref","children","className","size","otherProps"],"sources":["../../../../../src/fileIcons/FileIcon/FileIcon.tsx"],"sourcesContent":["import './FileIcon.css';\n\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const fileIconPropSize = ['m', 's'] as const;\nexport type FileIconPropSize = typeof fileIconPropSize[number];\nexport const fileIconPropSizeDefault = fileIconPropSize[0];\n\ntype Props = {\n size?: FileIconPropSize;\n};\n\nexport type FileIconProps = PropsWithHTMLAttributes<Props, HTMLDivElement>;\n\nexport const cnIconFile = cn('FileIcon');\n\nexport const FileIcon = React.forwardRef<HTMLDivElement, FileIconProps>(\n (props, ref) => {\n const {\n children,\n className,\n size = fileIconPropSizeDefault,\n ...otherProps\n } = props;\n return (\n <div\n {...otherProps}\n className={cnIconFile({ size }, [className])}\n ref={ref}\n >\n {children}\n </div>\n );\n },\n);\n"],"mappings":"mIAAA,uBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBAGA,MAAO,IAAMC,iBAAgB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAzB,CAEP,MAAO,IAAMC,wBAAuB,CAAGD,gBAAgB,CAAC,CAAD,CAAhD,CAQP,MAAO,IAAME,WAAU,CAAGH,EAAE,CAAC,UAAD,CAArB,CAEP,MAAO,IAAMI,SAAQ,CAAGL,KAAK,CAACM,UAAN,CACtB,SAACC,CAAD,CAAQC,CAAR,CAAgB,CACd,GACEC,EADF,CAKIF,CALJ,CACEE,QADF,CAEEC,CAFF,CAKIH,CALJ,CAEEG,SAFF,GAKIH,CALJ,CAGEI,IAHF,CAGEA,CAHF,YAGSR,uBAHT,GAIKS,CAJL,0BAKIL,CALJ,YAMA,MACE,4CACMK,CADN,EAEE,SAAS,CAAER,UAAU,CAAC,CAAEO,IAAI,CAAJA,CAAF,CAAD,CAAW,CAACD,CAAD,CAAX,CAFvB,CAGE,GAAG,CAAEF,CAHP,GAKGC,CALH,CAQH,CAjBqB,CAAjB"}
|
|
1
|
+
{"version":3,"file":"FileIcon.js","names":["React","cn","fileIconPropSize","fileIconPropSizeDefault","cnIconFile","FileIcon","forwardRef","props","ref","children","className","size","otherProps"],"sources":["../../../../../src/fileIcons/FileIcon/FileIcon.tsx"],"sourcesContent":["import './FileIcon.css';\n\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const fileIconPropSize = ['m', 's'] as const;\nexport type FileIconPropSize = (typeof fileIconPropSize)[number];\nexport const fileIconPropSizeDefault = fileIconPropSize[0];\n\ntype Props = {\n size?: FileIconPropSize;\n};\n\nexport type FileIconProps = PropsWithHTMLAttributes<Props, HTMLDivElement>;\n\nexport const cnIconFile = cn('FileIcon');\n\nexport const FileIcon = React.forwardRef<HTMLDivElement, FileIconProps>(\n (props, ref) => {\n const {\n children,\n className,\n size = fileIconPropSizeDefault,\n ...otherProps\n } = props;\n return (\n <div\n {...otherProps}\n className={cnIconFile({ size }, [className])}\n ref={ref}\n >\n {children}\n </div>\n );\n },\n);\n"],"mappings":"mIAAA,uBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBAGA,MAAO,IAAMC,iBAAgB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAzB,CAEP,MAAO,IAAMC,wBAAuB,CAAGD,gBAAgB,CAAC,CAAD,CAAhD,CAQP,MAAO,IAAME,WAAU,CAAGH,EAAE,CAAC,UAAD,CAArB,CAEP,MAAO,IAAMI,SAAQ,CAAGL,KAAK,CAACM,UAAN,CACtB,SAACC,CAAD,CAAQC,CAAR,CAAgB,CACd,GACEC,EADF,CAKIF,CALJ,CACEE,QADF,CAEEC,CAFF,CAKIH,CALJ,CAEEG,SAFF,GAKIH,CALJ,CAGEI,IAHF,CAGEA,CAHF,YAGSR,uBAHT,GAIKS,CAJL,0BAKIL,CALJ,YAMA,MACE,4CACMK,CADN,EAEE,SAAS,CAAER,UAAU,CAAC,CAAEO,IAAI,CAAJA,CAAF,CAAD,CAAW,CAACD,CAAD,CAAX,CAFvB,CAGE,GAAG,CAAEF,CAHP,GAKGC,CALH,CAQH,CAjBqB,CAAjB"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { TooltipProps as TooltipComponentProps } from '../../components/Tooltip';
|
|
3
3
|
export declare const withTooltipPropMode: readonly ["mouseover", "click"];
|
|
4
4
|
export declare const withTooltipPropModeDefault: "mouseover";
|
|
5
|
-
type WithTooltipPropMode = typeof withTooltipPropMode[number];
|
|
5
|
+
type WithTooltipPropMode = (typeof withTooltipPropMode)[number];
|
|
6
6
|
export declare const appearTimeoutDefault = 400;
|
|
7
7
|
export declare const exitTimeoutDefault = 200;
|
|
8
8
|
type ComponentProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTooltip.js","names":["React","useCallback","useRef","Tooltip","useDebounce","useFlag","useForkRef","useMutableRef","withTooltipPropMode","withTooltipPropModeDefault","appearTimeoutDefault","exitTimeoutDefault","withTooltip","hocProps","Component","forwardRef","props","ref","tooltipProps","componentProps","mode","tooltipContent","content","closeOnClickOutside","appearTimeout","exitTimeout","otherTooltipProps","resultContent","visible","setVisible","anchorRef","hoverStateRef","tooltip","anchor","mutablePropsRef","onMouseEnter","onMouseLeave","onClick","mouseEnterController","current","on","mouseLeaveController","off","anchorOnMouseEnter","e","anchorOnMouseLeave","tooltipOnMouseEnter","tooltipOnMouseLeave","tooltipOnClickOutside","anchorOnClick","toggle","className"],"sources":["../../../../../src/hocs/withTooltip/withTooltip.tsx"],"sourcesContent":["import React, { useCallback, useRef } from 'react';\n\nimport {\n Tooltip,\n TooltipProps as TooltipComponentProps,\n} from '##/components/Tooltip';\nimport { useDebounce } from '##/hooks/useDebounce';\nimport { useFlag } from '##/hooks/useFlag';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useMutableRef } from '##/hooks/useMutableRef';\n\nexport const withTooltipPropMode = ['mouseover', 'click'] as const;\nexport const withTooltipPropModeDefault = withTooltipPropMode[0];\ntype WithTooltipPropMode = typeof withTooltipPropMode[number];\n\nexport const appearTimeoutDefault = 400;\nexport const exitTimeoutDefault = 200;\n\ntype ComponentProps = {\n onClick?: React.MouseEventHandler;\n onMouseEnter?: React.MouseEventHandler;\n onMouseLeave?: React.MouseEventHandler;\n};\n\nexport type TooltipProps = Omit<TooltipComponentProps, 'children' | 'ref'> & {\n tooltipContent?: React.ReactNode;\n /** @deprecated use tooltipContent */\n content?: React.ReactNode;\n mode?: WithTooltipPropMode;\n closeOnClickOutside?: boolean;\n appearTimeout?: number;\n exitTimeout?: number;\n};\n\nexport type WithTooltipProps<Props> = Props & {\n tooltipProps?: TooltipProps;\n};\n\ntype HoverState = {\n tooltip: boolean;\n anchor: boolean;\n};\n\nexport function withTooltip(hocProps?: TooltipProps) {\n return function <COMPONENT_TYPE, COMPONENT_PROPS extends ComponentProps>(\n Component: COMPONENT_TYPE,\n ) {\n return React.forwardRef<HTMLElement, WithTooltipProps<COMPONENT_PROPS>>(\n (props, ref) => {\n const { tooltipProps = {}, ...componentProps } = props;\n\n const {\n mode = 'mouseover',\n tooltipContent,\n content,\n closeOnClickOutside = true,\n appearTimeout = appearTimeoutDefault,\n exitTimeout = exitTimeoutDefault,\n ...otherTooltipProps\n } = {\n ...hocProps,\n ...tooltipProps,\n };\n\n const resultContent = tooltipContent ?? content;\n\n const [visible, setVisible] = useFlag();\n const anchorRef = useRef<HTMLElement>(null);\n\n const hoverStateRef = useRef<HoverState>({\n tooltip: false,\n anchor: false,\n });\n\n const mutablePropsRef = useMutableRef([\n componentProps.onMouseEnter,\n componentProps.onMouseLeave,\n otherTooltipProps.onMouseEnter,\n otherTooltipProps.onMouseLeave,\n componentProps.onClick,\n mode,\n closeOnClickOutside,\n ] as const);\n\n const mouseEnterController = useDebounce(\n useCallback(() => {\n mutablePropsRef.current[5] === 'mouseover' &&\n (hoverStateRef.current.anchor || hoverStateRef.current.tooltip) &&\n setVisible.on();\n }, []),\n appearTimeout,\n );\n\n const mouseLeaveController = useDebounce(\n useCallback(() => {\n mutablePropsRef.current[5] === 'mouseover' &&\n !hoverStateRef.current.anchor &&\n !hoverStateRef.current.tooltip &&\n setVisible.off();\n }, []),\n exitTimeout,\n );\n\n const anchorOnMouseEnter: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.anchor = true;\n mouseEnterController();\n mutablePropsRef.current[0]?.(e);\n }, []);\n\n const anchorOnMouseLeave: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.anchor = false;\n mouseLeaveController();\n mutablePropsRef.current[1]?.(e);\n }, []);\n\n const tooltipOnMouseEnter: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.tooltip = true;\n mouseEnterController();\n mutablePropsRef.current[2]?.(e);\n }, []);\n\n const tooltipOnMouseLeave: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.tooltip = false;\n mouseLeaveController();\n mutablePropsRef.current[3]?.(e);\n }, []);\n\n const tooltipOnClickOutside = useCallback(() => {\n mutablePropsRef.current[5] === 'click' &&\n mutablePropsRef.current[6] &&\n setVisible.off();\n }, [mode, closeOnClickOutside]);\n\n const anchorOnClick: React.MouseEventHandler = useCallback((e) => {\n mutablePropsRef.current[5] === 'click' && setVisible.toggle();\n mutablePropsRef.current[4]?.(e);\n }, []);\n\n const Anchor =\n Component as unknown as React.ComponentType<COMPONENT_PROPS>;\n\n return (\n <>\n <Anchor\n {...(componentProps as unknown as COMPONENT_PROPS)}\n onClick={anchorOnClick}\n onMouseEnter={anchorOnMouseEnter}\n onMouseLeave={anchorOnMouseLeave}\n ref={useForkRef([anchorRef, ref])}\n />\n <Tooltip\n {...otherTooltipProps}\n isOpen={visible && !!resultContent}\n className={otherTooltipProps.className}\n anchorRef={anchorRef}\n onClickOutside={tooltipOnClickOutside}\n onMouseEnter={tooltipOnMouseEnter}\n onMouseLeave={tooltipOnMouseLeave}\n >\n {resultContent}\n </Tooltip>\n </>\n );\n // привел к типам, так как прокинутый компонент может иметь дженерики и они потеряются за HOC\n },\n ) as unknown as\n | COMPONENT_TYPE\n | React.ComponentType<{\n tooltipProps?: TooltipProps;\n }>;\n };\n}\n"],"mappings":"67BAAA,MAAOA,MAAP,EAAgBC,WAAhB,CAA6BC,MAA7B,KAA2C,OAA3C,CAEA,OACEC,OADF,gCAIA,OAASC,WAAT,+BACA,OAASC,OAAT,2BACA,OAASC,UAAT,8BACA,OAASC,aAAT,iCAEA,MAAO,IAAMC,oBAAmB,CAAG,CAAC,WAAD,CAAc,OAAd,CAA5B,CACP,MAAO,IAAMC,2BAA0B,CAAGD,mBAAmB,CAAC,CAAD,CAAtD,CAGP,MAAO,IAAME,qBAAoB,CAAG,GAA7B,CACP,MAAO,IAAMC,mBAAkB,CAAG,GAA3B,CA2BP,MAAO,SAASC,YAAT,CAAqBC,CAArB,CAA8C,CACnD,MAAO,UACLC,CADK,CAEL,CACA,MAAOd,MAAK,CAACe,UAAN,CACL,SAACC,CAAD,CAAQC,CAAR,CAAgB,OACmCD,CADnC,CACNE,YADM,CACNA,CADM,YACS,EADT,GACgBC,CADhB,0BACmCH,CADn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AGhD,WAAW,CAAC,SAAC2C,CAAD,CAAO,SACjC,OAA/B,GAAAV,CAAe,CAACK,OAAhB,CAAwB,CAAxB,GAA0CV,CAAU,CAACqB,MAAX,EADsB,WAEhE,GAAAhB,CAAe,CAACK,OAAhB,EAAwB,CAAxB,CAFgE,qBAEhE,SAA6BK,CAA7B,CACD,CAHyD,CAGvD,EAHuD,CAzF5C,CAiGd,MACE,yCACE,oBAJF9B,CAIE,kBACOK,CADP,EAEE,OAAO,CAAE8B,CAFX,CAGE,YAAY,CAAEN,CAHhB,CAIE,YAAY,CAAEE,CAJhB,CAKE,GAAG,CAAEvC,UAAU,CAAC,CAACwB,CAAD,CAAYb,CAAZ,CAAD,CALjB,GADF,CAQE,oBAAC,OAAD,kBACMS,CADN,EAEE,MAAM,CAAEE,CAAO,EAAI,CAAC,CAACD,CAFvB,CAGE,SAAS,CAAED,CAAiB,CAACyB,SAH/B,CAIE,SAAS,CAAErB,CAJb,CAKE,cAAc,CAAEkB,CALlB,CAME,YAAY,CAAEF,CANhB,CAOE,YAAY,CAAEC,CAPhB,GASGpB,CATH,CARF,CAsBH,CAzHI,CA+HR,CACF"}
|
|
1
|
+
{"version":3,"file":"withTooltip.js","names":["React","useCallback","useRef","Tooltip","useDebounce","useFlag","useForkRef","useMutableRef","withTooltipPropMode","withTooltipPropModeDefault","appearTimeoutDefault","exitTimeoutDefault","withTooltip","hocProps","Component","forwardRef","props","ref","tooltipProps","componentProps","mode","tooltipContent","content","closeOnClickOutside","appearTimeout","exitTimeout","otherTooltipProps","resultContent","visible","setVisible","anchorRef","hoverStateRef","tooltip","anchor","mutablePropsRef","onMouseEnter","onMouseLeave","onClick","mouseEnterController","current","on","mouseLeaveController","off","anchorOnMouseEnter","e","anchorOnMouseLeave","tooltipOnMouseEnter","tooltipOnMouseLeave","tooltipOnClickOutside","anchorOnClick","toggle","className"],"sources":["../../../../../src/hocs/withTooltip/withTooltip.tsx"],"sourcesContent":["import React, { useCallback, useRef } from 'react';\n\nimport {\n Tooltip,\n TooltipProps as TooltipComponentProps,\n} from '##/components/Tooltip';\nimport { useDebounce } from '##/hooks/useDebounce';\nimport { useFlag } from '##/hooks/useFlag';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useMutableRef } from '##/hooks/useMutableRef';\n\nexport const withTooltipPropMode = ['mouseover', 'click'] as const;\nexport const withTooltipPropModeDefault = withTooltipPropMode[0];\ntype WithTooltipPropMode = (typeof withTooltipPropMode)[number];\n\nexport const appearTimeoutDefault = 400;\nexport const exitTimeoutDefault = 200;\n\ntype ComponentProps = {\n onClick?: React.MouseEventHandler;\n onMouseEnter?: React.MouseEventHandler;\n onMouseLeave?: React.MouseEventHandler;\n};\n\nexport type TooltipProps = Omit<TooltipComponentProps, 'children' | 'ref'> & {\n tooltipContent?: React.ReactNode;\n /** @deprecated use tooltipContent */\n content?: React.ReactNode;\n mode?: WithTooltipPropMode;\n closeOnClickOutside?: boolean;\n appearTimeout?: number;\n exitTimeout?: number;\n};\n\nexport type WithTooltipProps<Props> = Props & {\n tooltipProps?: TooltipProps;\n};\n\ntype HoverState = {\n tooltip: boolean;\n anchor: boolean;\n};\n\nexport function withTooltip(hocProps?: TooltipProps) {\n return function <COMPONENT_TYPE, COMPONENT_PROPS extends ComponentProps>(\n Component: COMPONENT_TYPE,\n ) {\n return React.forwardRef<HTMLElement, WithTooltipProps<COMPONENT_PROPS>>(\n (props, ref) => {\n const { tooltipProps = {}, ...componentProps } = props;\n\n const {\n mode = 'mouseover',\n tooltipContent,\n content,\n closeOnClickOutside = true,\n appearTimeout = appearTimeoutDefault,\n exitTimeout = exitTimeoutDefault,\n ...otherTooltipProps\n } = {\n ...hocProps,\n ...tooltipProps,\n };\n\n const resultContent = tooltipContent ?? content;\n\n const [visible, setVisible] = useFlag();\n const anchorRef = useRef<HTMLElement>(null);\n\n const hoverStateRef = useRef<HoverState>({\n tooltip: false,\n anchor: false,\n });\n\n const mutablePropsRef = useMutableRef([\n componentProps.onMouseEnter,\n componentProps.onMouseLeave,\n otherTooltipProps.onMouseEnter,\n otherTooltipProps.onMouseLeave,\n componentProps.onClick,\n mode,\n closeOnClickOutside,\n ] as const);\n\n const mouseEnterController = useDebounce(\n useCallback(() => {\n mutablePropsRef.current[5] === 'mouseover' &&\n (hoverStateRef.current.anchor || hoverStateRef.current.tooltip) &&\n setVisible.on();\n }, []),\n appearTimeout,\n );\n\n const mouseLeaveController = useDebounce(\n useCallback(() => {\n mutablePropsRef.current[5] === 'mouseover' &&\n !hoverStateRef.current.anchor &&\n !hoverStateRef.current.tooltip &&\n setVisible.off();\n }, []),\n exitTimeout,\n );\n\n const anchorOnMouseEnter: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.anchor = true;\n mouseEnterController();\n mutablePropsRef.current[0]?.(e);\n }, []);\n\n const anchorOnMouseLeave: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.anchor = false;\n mouseLeaveController();\n mutablePropsRef.current[1]?.(e);\n }, []);\n\n const tooltipOnMouseEnter: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.tooltip = true;\n mouseEnterController();\n mutablePropsRef.current[2]?.(e);\n }, []);\n\n const tooltipOnMouseLeave: React.MouseEventHandler<HTMLDivElement> =\n useCallback((e) => {\n hoverStateRef.current.tooltip = false;\n mouseLeaveController();\n mutablePropsRef.current[3]?.(e);\n }, []);\n\n const tooltipOnClickOutside = useCallback(() => {\n mutablePropsRef.current[5] === 'click' &&\n mutablePropsRef.current[6] &&\n setVisible.off();\n }, [mode, closeOnClickOutside]);\n\n const anchorOnClick: React.MouseEventHandler = useCallback((e) => {\n mutablePropsRef.current[5] === 'click' && setVisible.toggle();\n mutablePropsRef.current[4]?.(e);\n }, []);\n\n const Anchor =\n Component as unknown as React.ComponentType<COMPONENT_PROPS>;\n\n return (\n <>\n <Anchor\n {...(componentProps as unknown as COMPONENT_PROPS)}\n onClick={anchorOnClick}\n onMouseEnter={anchorOnMouseEnter}\n onMouseLeave={anchorOnMouseLeave}\n ref={useForkRef([anchorRef, ref])}\n />\n <Tooltip\n {...otherTooltipProps}\n isOpen={visible && !!resultContent}\n className={otherTooltipProps.className}\n anchorRef={anchorRef}\n onClickOutside={tooltipOnClickOutside}\n onMouseEnter={tooltipOnMouseEnter}\n onMouseLeave={tooltipOnMouseLeave}\n >\n {resultContent}\n </Tooltip>\n </>\n );\n // привел к типам, так как прокинутый компонент может иметь дженерики и они потеряются за HOC\n },\n ) as unknown as\n | COMPONENT_TYPE\n | React.ComponentType<{\n tooltipProps?: TooltipProps;\n }>;\n };\n}\n"],"mappings":"67BAAA,MAAOA,MAAP,EAAgBC,WAAhB,CAA6BC,MAA7B,KAA2C,OAA3C,CAEA,OACEC,OADF,gCAIA,OAASC,WAAT,+BACA,OAASC,OAAT,2BACA,OAASC,UAAT,8BACA,OAASC,aAAT,iCAEA,MAAO,IAAMC,oBAAmB,CAAG,CAAC,WAAD,CAAc,OAAd,CAA5B,CACP,MAAO,IAAMC,2BAA0B,CAAGD,mBAAmB,CAAC,CAAD,CAAtD,CAGP,MAAO,IAAME,qBAAoB,CAAG,GAA7B,CACP,MAAO,IAAMC,mBAAkB,CAAG,GAA3B,CA2BP,MAAO,SAASC,YAAT,CAAqBC,CAArB,CAA8C,CACnD,MAAO,UACLC,CADK,CAEL,CACA,MAAOd,MAAK,CAACe,UAAN,CACL,SAACC,CAAD,CAAQC,CAAR,CAAgB,OACmCD,CADnC,CACNE,YADM,CACNA,CADM,YACS,EADT,GACgBC,CADhB,0BACmCH,CADnC,6CAYTH,CAZS,EAaTK,CAbS,MAIZE,IAJY,CAIZA,CAJY,YAIL,WAJK,GAKZC,CALY,GAKZA,cALY,CAMZC,CANY,GAMZA,OANY,KAOZC,mBAPY,CAOZA,CAPY,sBAQZC,aARY,CAQZA,CARY,YAQId,oBARJ,OASZe,WATY,CASZA,CATY,YASEd,kBATF,GAUTe,CAVS,wCAgBRC,CAAa,QAAGN,CAAH,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,oBAJF9B,CAIE,kBACOK,CADP,EAEE,OAAO,CAAE8B,CAFX,CAGE,YAAY,CAAEN,CAHhB,CAIE,YAAY,CAAEE,CAJhB,CAKE,GAAG,CAAEvC,UAAU,CAAC,CAACwB,CAAD,CAAYb,CAAZ,CAAD,CALjB,GADF,CAQE,oBAAC,OAAD,kBACMS,CADN,EAEE,MAAM,CAAEE,CAAO,EAAI,CAAC,CAACD,CAFvB,CAGE,SAAS,CAAED,CAAiB,CAACyB,SAH/B,CAIE,SAAS,CAAErB,CAJb,CAKE,cAAc,CAAEkB,CALlB,CAME,YAAY,CAAEF,CANhB,CAOE,YAAY,CAAEC,CAPhB,GASGpB,CATH,CARF,CAsBH,CAzHI,CA+HR,CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Map, Returned } from './types';
|
|
2
2
|
declare const defaultPoints: readonly ["5xs", "4xs", "3xs", "2xs", "xs", "s", "m", "l", "xl", "2xl", "3xl", "4xl", "5xl"];
|
|
3
|
-
type DefaultPoints = typeof defaultPoints[number];
|
|
3
|
+
type DefaultPoints = (typeof defaultPoints)[number];
|
|
4
4
|
export declare const useBreakpoints: <POINTS extends string = DefaultPoints>(map?: Map<POINTS>) => Returned<POINTS>;
|
|
5
5
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpointsDeprecated.js","names":["useLayoutEffect","useState","isEq","mapping","defaultPoints","defaultMap","useBreakpoints","map","pointsMap","window","innerWidth","points","setPoints","subscribe","newPoints","state","addEventListener","removeEventListener"],"sources":["../../../../../src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.ts"],"sourcesContent":["import { useLayoutEffect, useState } from 'react';\n\nimport { isEq } from '##/utils/object';\n\nimport { mapping } from './mapping';\nimport { Map, Returned } from './types';\n\nconst defaultPoints = [\n '5xs',\n '4xs',\n '3xs',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n] as const;\n\ntype DefaultPoints = typeof defaultPoints[number];\n\nconst defaultMap: Map<DefaultPoints> = {\n '5xs': 320,\n '4xs': 360,\n '3xs': 480,\n '2xs': 720,\n 'xs': 960,\n 's': 1020,\n 'm': 1200,\n 'l': 1400,\n 'xl': 1600,\n '2xl': 1800,\n '3xl': 2000,\n '4xl': 2200,\n '5xl': 2400,\n};\n\nexport const useBreakpoints = <POINTS extends string = DefaultPoints>(\n map?: Map<POINTS>,\n) => {\n const pointsMap = map || (defaultMap as Map<POINTS>);\n\n const [points, setPoints] = useState<Returned<POINTS>>(() =>\n mapping(window.innerWidth, pointsMap),\n );\n\n useLayoutEffect(() => {\n const subscribe = () => {\n const newPoints = mapping(window.innerWidth, pointsMap);\n\n setPoints((state) => (isEq(state, newPoints) ? state : newPoints));\n };\n\n window.addEventListener('resize', subscribe);\n\n return () => window.removeEventListener('resize', subscribe);\n }, []);\n\n return points;\n};\n"],"mappings":"iEAAA,OAASA,eAAT,CAA0BC,QAA1B,KAA0C,OAA1C,CAEA,OAASC,IAAT,0BAEA,OAASC,OAAT,iB,GAGMC,cAAa,CAAG,CACpB,KADoB,CAEpB,KAFoB,CAGpB,KAHoB,CAIpB,KAJoB,CAKpB,IALoB,CAMpB,GANoB,CAOpB,GAPoB,CAQpB,GARoB,CASpB,IAToB,CAUpB,KAVoB,CAWpB,KAXoB,CAYpB,KAZoB,CAapB,KAboB,C,CAkBhBC,UAA8B,CAAG,CACrC,MAAO,GAD8B,CAErC,MAAO,GAF8B,CAGrC,MAAO,GAH8B,CAIrC,MAAO,GAJ8B,CAKrC,GAAM,GAL+B,CAMrC,EAAK,IANgC,CAOrC,EAAK,IAPgC,CAQrC,EAAK,IARgC,CASrC,GAAM,IAT+B,CAUrC,MAAO,IAV8B,CAWrC,MAAO,GAX8B,CAYrC,MAAO,IAZ8B,CAarC,MAAO,IAb8B,C,CAgBvC,MAAO,IAAMC,eAAc,CAAG,SAC5BC,CAD4B,CAEzB,IACGC,EAAS,CAAGD,CAAG,EAAKF,UADvB,GAGyBJ,QAAQ,CAAmB,iBACrDE,QAAO,CAACM,MAAM,CAACC,UAAR,CAAoBF,CAApB,CAD8C,CAAnB,CAHjC,uBAGIG,CAHJ,MAGYC,CAHZ,MAmBH,MAZAZ,gBAAe,CAAC,UAAM,CACpB,GAAMa,EAAS,CAAG,UAAM,CACtB,GAAMC,EAAS,CAAGX,OAAO,CAACM,MAAM,CAACC,UAAR,CAAoBF,CAApB,CAAzB,CAEAI,CAAS,CAAC,SAACG,CAAD,QAAYb,KAAI,CAACa,CAAD,CAAQD,CAAR,CAAJ,CAAyBC,CAAzB,CAAiCD,CAA7C,CAAD,CACV,CAJD,CAQA,MAFAL,OAAM,CAACO,gBAAP,CAAwB,QAAxB,CAAkCH,CAAlC,CAEA,CAAO,iBAAMJ,OAAM,CAACQ,mBAAP,CAA2B,QAA3B,CAAqCJ,CAArC,CAAN,CACR,CAVc,CAUZ,EAVY,CAYf,CAAOF,CACR,CAtBM"}
|
|
1
|
+
{"version":3,"file":"useBreakpointsDeprecated.js","names":["useLayoutEffect","useState","isEq","mapping","defaultPoints","defaultMap","useBreakpoints","map","pointsMap","window","innerWidth","points","setPoints","subscribe","newPoints","state","addEventListener","removeEventListener"],"sources":["../../../../../src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.ts"],"sourcesContent":["import { useLayoutEffect, useState } from 'react';\n\nimport { isEq } from '##/utils/object';\n\nimport { mapping } from './mapping';\nimport { Map, Returned } from './types';\n\nconst defaultPoints = [\n '5xs',\n '4xs',\n '3xs',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n] as const;\n\ntype DefaultPoints = (typeof defaultPoints)[number];\n\nconst defaultMap: Map<DefaultPoints> = {\n '5xs': 320,\n '4xs': 360,\n '3xs': 480,\n '2xs': 720,\n 'xs': 960,\n 's': 1020,\n 'm': 1200,\n 'l': 1400,\n 'xl': 1600,\n '2xl': 1800,\n '3xl': 2000,\n '4xl': 2200,\n '5xl': 2400,\n};\n\nexport const useBreakpoints = <POINTS extends string = DefaultPoints>(\n map?: Map<POINTS>,\n) => {\n const pointsMap = map || (defaultMap as Map<POINTS>);\n\n const [points, setPoints] = useState<Returned<POINTS>>(() =>\n mapping(window.innerWidth, pointsMap),\n );\n\n useLayoutEffect(() => {\n const subscribe = () => {\n const newPoints = mapping(window.innerWidth, pointsMap);\n\n setPoints((state) => (isEq(state, newPoints) ? state : newPoints));\n };\n\n window.addEventListener('resize', subscribe);\n\n return () => window.removeEventListener('resize', subscribe);\n }, []);\n\n return points;\n};\n"],"mappings":"iEAAA,OAASA,eAAT,CAA0BC,QAA1B,KAA0C,OAA1C,CAEA,OAASC,IAAT,0BAEA,OAASC,OAAT,iB,GAGMC,cAAa,CAAG,CACpB,KADoB,CAEpB,KAFoB,CAGpB,KAHoB,CAIpB,KAJoB,CAKpB,IALoB,CAMpB,GANoB,CAOpB,GAPoB,CAQpB,GARoB,CASpB,IAToB,CAUpB,KAVoB,CAWpB,KAXoB,CAYpB,KAZoB,CAapB,KAboB,C,CAkBhBC,UAA8B,CAAG,CACrC,MAAO,GAD8B,CAErC,MAAO,GAF8B,CAGrC,MAAO,GAH8B,CAIrC,MAAO,GAJ8B,CAKrC,GAAM,GAL+B,CAMrC,EAAK,IANgC,CAOrC,EAAK,IAPgC,CAQrC,EAAK,IARgC,CASrC,GAAM,IAT+B,CAUrC,MAAO,IAV8B,CAWrC,MAAO,GAX8B,CAYrC,MAAO,IAZ8B,CAarC,MAAO,IAb8B,C,CAgBvC,MAAO,IAAMC,eAAc,CAAG,SAC5BC,CAD4B,CAEzB,IACGC,EAAS,CAAGD,CAAG,EAAKF,UADvB,GAGyBJ,QAAQ,CAAmB,iBACrDE,QAAO,CAACM,MAAM,CAACC,UAAR,CAAoBF,CAApB,CAD8C,CAAnB,CAHjC,uBAGIG,CAHJ,MAGYC,CAHZ,MAmBH,MAZAZ,gBAAe,CAAC,UAAM,CACpB,GAAMa,EAAS,CAAG,UAAM,CACtB,GAAMC,EAAS,CAAGX,OAAO,CAACM,MAAM,CAACC,UAAR,CAAoBF,CAApB,CAAzB,CAEAI,CAAS,CAAC,SAACG,CAAD,QAAYb,KAAI,CAACa,CAAD,CAAQD,CAAR,CAAJ,CAAyBC,CAAzB,CAAiCD,CAA7C,CAAD,CACV,CAJD,CAQA,MAFAL,OAAM,CAACO,gBAAP,CAAwB,QAAxB,CAAkCH,CAAlC,CAEA,CAAO,iBAAMJ,OAAM,CAACQ,mBAAP,CAA2B,QAA3B,CAAqCJ,CAArC,CAAN,CACR,CAVc,CAUZ,EAVY,CAYf,CAAOF,CACR,CAtBM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRefs.js","names":["createRef","useMemo","isNotNumber","value","useRefs","elements","deps","obj","index","length","Array","fill","map","join"],"sources":["../../../../../src/hooks/useRefs/useRefs.ts"],"sourcesContent":["import { createRef, useMemo } from 'react';\n\nconst isNotNumber = <T>(value: T): value is Exclude<T, number> =>\n typeof value !== 'number';\n\ntype Return<\n T,\n E extends number | string[] | readonly string[],\n> = E extends string[]\n ? Record<E[number], React.RefObject<T>>\n : E extends readonly string[]\n
|
|
1
|
+
{"version":3,"file":"useRefs.js","names":["createRef","useMemo","isNotNumber","value","useRefs","elements","deps","obj","index","length","Array","fill","map","join"],"sources":["../../../../../src/hooks/useRefs/useRefs.ts"],"sourcesContent":["import { createRef, useMemo } from 'react';\n\nconst isNotNumber = <T>(value: T): value is Exclude<T, number> =>\n typeof value !== 'number';\n\ntype Return<\n T,\n E extends number | string[] | readonly string[],\n> = E extends string[]\n ? Record<E[number], React.RefObject<T>>\n : E extends readonly string[]\n ? Record<E[number], React.RefObject<T>>\n : Array<React.RefObject<T>>;\n\nexport const useRefs = <\n T,\n E extends number | string[] | readonly string[] = number,\n>(\n elements: E,\n deps: unknown[] = [],\n): Return<T, E> =>\n useMemo(() => {\n if (isNotNumber(elements)) {\n const obj: Record<string, React.RefObject<T>> = {};\n for (let index = 0; index < elements.length; index++) {\n obj[elements[index]] = createRef<T>();\n }\n\n return obj as Return<T, E>;\n }\n\n return new Array(elements as number)\n .fill(null)\n .map(() => createRef<T>()) as unknown as Return<T, E>;\n }, [typeof elements === 'number' ? elements : elements.join('-'), ...deps]);\n"],"mappings":"yEAAA,OAASA,SAAT,CAAoBC,OAApB,KAAmC,OAAnC,CAEA,GAAMC,YAAW,CAAG,SAAIC,CAAJ,QACD,QAAjB,QAAOA,EADW,CAApB,CAYA,MAAO,IAAMC,QAAO,CAAG,SAIrBC,CAJqB,KAKrBC,EALqB,wDAKH,EALG,OAOrBL,QAAO,CAAC,UAAM,CACZ,GAAIC,WAAW,CAACG,CAAD,CAAf,CAA2B,CAEzB,OADME,EAAuC,CAAG,EAChD,CAASC,CAAK,CAAG,CAAjB,CAAoBA,CAAK,CAAGH,CAAQ,CAACI,MAArC,CAA6CD,CAAK,EAAlD,CACED,CAAG,CAACF,CAAQ,CAACG,CAAD,CAAT,CAAH,CAAuBR,SAAS,EAAhC,CAGF,MAAOO,EACR,CAED,MAAWG,MAAJ,CAAUL,CAAV,EACJM,IADI,CACC,IADD,EAEJC,GAFI,CAEA,iBAAMZ,UAAS,EAAf,CAFA,CAGR,CAbM,EAaiB,QAApB,QAAOK,EAAP,CAA+BA,CAA/B,CAA0CA,CAAQ,CAACQ,IAAT,CAAc,GAAd,CAbvC,4BAa8DP,CAb9D,GAPc,CAAhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/hooks/useStyleProps/types.ts"],"sourcesContent":["export type Value<V extends string | string[] | readonly string[]> =\n V extends string[]\n ? Record<V[number], string>\n : V extends readonly string[]\n
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/hooks/useStyleProps/types.ts"],"sourcesContent":["export type Value<V extends string | string[] | readonly string[]> =\n V extends string[]\n ? Record<V[number], string>\n : V extends readonly string[]\n ? Record<V[number], string>\n : string;\n"],"mappings":""}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './MixCard.css';
|
|
2
2
|
type Size = 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
|
|
3
3
|
declare const formMap: readonly ["round", "square"];
|
|
4
|
-
type FormMap = typeof formMap[number];
|
|
4
|
+
type FormMap = (typeof formMap)[number];
|
|
5
5
|
declare const cardStatus: readonly ["alert", "success", "warning"];
|
|
6
|
-
type CardStatus = typeof cardStatus[number] | string;
|
|
6
|
+
type CardStatus = (typeof cardStatus)[number] | string;
|
|
7
7
|
type Props = {
|
|
8
8
|
shadow?: boolean;
|
|
9
9
|
border?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MixCard.js","names":["cn","cnMixSpace","formMap","cardStatus","cnCard","cnMixCard","props","classNames","verticalSpace","horizontalSpace","otherProps","pV","pH"],"sources":["../../../../../src/mixs/MixCard/MixCard.tsx"],"sourcesContent":["import './MixCard.css';\n\nimport { cn } from '../../utils/bem';\nimport { cnMixSpace } from '../MixSpace/MixSpace';\n\ntype Size = 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';\n\nconst formMap = ['round', 'square'] as const;\ntype FormMap = typeof formMap[number];\n\nconst cardStatus = ['alert', 'success', 'warning'] as const;\ntype CardStatus = typeof cardStatus[number] | string;\n\ntype Props = {\n shadow?: boolean;\n border?: boolean;\n verticalSpace?: Size;\n horizontalSpace?: Size;\n form?: FormMap;\n status?: CardStatus;\n};\n\ntype CnCard = (props: Props, classNames?: Array<string | undefined>) => string;\n\nconst cnCard = cn('MixCard');\n\nexport const cnMixCard: CnCard = (props, classNames = []) => {\n const { verticalSpace, horizontalSpace, ...otherProps } = props;\n return cnCard({ ...otherProps }, [\n cnMixSpace({ pV: verticalSpace, pH: horizontalSpace }),\n ...classNames,\n ]);\n};\n"],"mappings":"q3BAAA,sBAEA,OAASA,EAAT,uBACA,OAASC,UAAT,4B,GAIMC,QAAO,CAAG,CAAC,OAAD,CAAU,QAAV,C,CAGVC,UAAU,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,C,CAcbC,MAAM,CAAGJ,EAAE,CAAC,SAAD,C,CAEjB,MAAO,IAAMK,UAAiB,CAAG,SAACC,CAAD,CAA4B,IAApBC,EAAoB,wDAAP,EAAO,CACnDC,CADmD,CACDF,CADC,CACnDE,aADmD,CACpCC,CADoC,CACDH,CADC,CACpCG,eADoC,CAChBC,CADgB,0BACDJ,CADC,YAE3D,MAAOF,OAAM,kBAAMM,CAAN,GACXT,UAAU,CAAC,CAAEU,EAAE,CAAEH,CAAN,CAAqBI,EAAE,CAAEH,CAAzB,CAAD,CADC,4BAERF,CAFQ,GAId,CANM"}
|
|
1
|
+
{"version":3,"file":"MixCard.js","names":["cn","cnMixSpace","formMap","cardStatus","cnCard","cnMixCard","props","classNames","verticalSpace","horizontalSpace","otherProps","pV","pH"],"sources":["../../../../../src/mixs/MixCard/MixCard.tsx"],"sourcesContent":["import './MixCard.css';\n\nimport { cn } from '../../utils/bem';\nimport { cnMixSpace } from '../MixSpace/MixSpace';\n\ntype Size = 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';\n\nconst formMap = ['round', 'square'] as const;\ntype FormMap = (typeof formMap)[number];\n\nconst cardStatus = ['alert', 'success', 'warning'] as const;\ntype CardStatus = (typeof cardStatus)[number] | string;\n\ntype Props = {\n shadow?: boolean;\n border?: boolean;\n verticalSpace?: Size;\n horizontalSpace?: Size;\n form?: FormMap;\n status?: CardStatus;\n};\n\ntype CnCard = (props: Props, classNames?: Array<string | undefined>) => string;\n\nconst cnCard = cn('MixCard');\n\nexport const cnMixCard: CnCard = (props, classNames = []) => {\n const { verticalSpace, horizontalSpace, ...otherProps } = props;\n return cnCard({ ...otherProps }, [\n cnMixSpace({ pV: verticalSpace, pH: horizontalSpace }),\n ...classNames,\n ]);\n};\n"],"mappings":"q3BAAA,sBAEA,OAASA,EAAT,uBACA,OAASC,UAAT,4B,GAIMC,QAAO,CAAG,CAAC,OAAD,CAAU,QAAV,C,CAGVC,UAAU,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,C,CAcbC,MAAM,CAAGJ,EAAE,CAAC,SAAD,C,CAEjB,MAAO,IAAMK,UAAiB,CAAG,SAACC,CAAD,CAA4B,IAApBC,EAAoB,wDAAP,EAAO,CACnDC,CADmD,CACDF,CADC,CACnDE,aADmD,CACpCC,CADoC,CACDH,CADC,CACpCG,eADoC,CAChBC,CADgB,0BACDJ,CADC,YAE3D,MAAOF,OAAM,kBAAMM,CAAN,GACXT,UAAU,CAAC,CAAEU,EAAE,CAAEH,CAAN,CAAqBI,EAAE,CAAEH,CAAzB,CAAD,CADC,4BAERF,CAFQ,GAId,CANM"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import './MixFlex.css';
|
|
2
2
|
import { Space } from '../MixSpace';
|
|
3
3
|
export declare const mixFlexPropAlign: readonly ["flex-start", "flex-end", "center", "baseline", "stretch"];
|
|
4
|
-
export type MixFlexPropAlign = typeof mixFlexPropAlign[number];
|
|
4
|
+
export type MixFlexPropAlign = (typeof mixFlexPropAlign)[number];
|
|
5
5
|
export declare const mixFlexPropJustify: readonly ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"];
|
|
6
|
-
export type MixFlexPropJustify = typeof mixFlexPropJustify[number];
|
|
6
|
+
export type MixFlexPropJustify = (typeof mixFlexPropJustify)[number];
|
|
7
7
|
export declare const mixFlexPropFlex: readonly ["flex", "inline-flex"];
|
|
8
|
-
export type MixFlexPropFlex = typeof mixFlexPropFlex[number];
|
|
8
|
+
export type MixFlexPropFlex = (typeof mixFlexPropFlex)[number];
|
|
9
9
|
export declare const mixFlexPropWrap: readonly ["nowrap", "wrap", "wrap-reverse"];
|
|
10
|
-
export type MixFlexPropWrap = typeof mixFlexPropWrap[number];
|
|
10
|
+
export type MixFlexPropWrap = (typeof mixFlexPropWrap)[number];
|
|
11
11
|
export declare const mixFlexPropDirection: readonly ["row", "row-reverse", "column", "column-reverse"];
|
|
12
|
-
export type MixFlexPropDirection = typeof mixFlexPropDirection[number];
|
|
12
|
+
export type MixFlexPropDirection = (typeof mixFlexPropDirection)[number];
|
|
13
13
|
export type CnMixFlexProps = {
|
|
14
14
|
align?: MixFlexPropAlign;
|
|
15
15
|
justify?: MixFlexPropJustify;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MixFlex.js","names":["cn","mixFlexPropAlign","mixFlexPropJustify","mixFlexPropFlex","mixFlexPropWrap","mixFlexPropDirection","cnFlex","cnMixFlex","props","classNames"],"sources":["../../../../../src/mixs/MixFlex/MixFlex.ts"],"sourcesContent":["import './MixFlex.css';\n\nimport { cn } from '##/utils/bem';\n\nimport { Space } from '../MixSpace';\n\nexport const mixFlexPropAlign = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'stretch',\n] as const;\nexport type MixFlexPropAlign = typeof mixFlexPropAlign[number];\n\nexport const mixFlexPropJustify = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n] as const;\nexport type MixFlexPropJustify = typeof mixFlexPropJustify[number];\n\nexport const mixFlexPropFlex = ['flex', 'inline-flex'] as const;\nexport type MixFlexPropFlex = typeof mixFlexPropFlex[number];\n\nexport const mixFlexPropWrap = ['nowrap', 'wrap', 'wrap-reverse'] as const;\nexport type MixFlexPropWrap = typeof mixFlexPropWrap[number];\n\nexport const mixFlexPropDirection = [\n 'row',\n 'row-reverse',\n 'column',\n 'column-reverse',\n] as const;\nexport type MixFlexPropDirection = typeof mixFlexPropDirection[number];\n\nexport type CnMixFlexProps = {\n align?: MixFlexPropAlign;\n justify?: MixFlexPropJustify;\n flex?: MixFlexPropFlex;\n wrap?: MixFlexPropWrap;\n direction?: MixFlexPropDirection;\n gap?: Space;\n order?: -1 | 0 | 1;\n};\n\ntype CnMixFlex = (\n props: CnMixFlexProps,\n classNames?: Array<string | undefined>,\n) => string;\n\nconst cnFlex = cn('MixFlex');\n\nexport const cnMixFlex: CnMixFlex = (props, classNames = []) =>\n cnFlex(props, classNames);\n"],"mappings":"AAAA,sBAEA,OAASA,EAAT,uBAIA,MAAO,IAAMC,iBAAgB,CAAG,CAC9B,YAD8B,CAE9B,UAF8B,CAG9B,QAH8B,CAI9B,UAJ8B,CAK9B,SAL8B,CAAzB,CASP,MAAO,IAAMC,mBAAkB,CAAG,CAChC,YADgC,CAEhC,UAFgC,CAGhC,QAHgC,CAIhC,eAJgC,CAKhC,cALgC,CAMhC,cANgC,CAA3B,CAUP,MAAO,IAAMC,gBAAe,CAAG,CAAC,MAAD,CAAS,aAAT,CAAxB,CAGP,MAAO,IAAMC,gBAAe,CAAG,CAAC,QAAD,CAAW,MAAX,CAAmB,cAAnB,CAAxB,CAGP,MAAO,IAAMC,qBAAoB,CAAG,CAClC,KADkC,CAElC,aAFkC,CAGlC,QAHkC,CAIlC,gBAJkC,CAA7B,CAuBP,GAAMC,OAAM,CAAGN,EAAE,CAAC,SAAD,CAAjB,CAEA,MAAO,IAAMO,UAAoB,CAAG,SAACC,CAAD,KAAQC,EAAR,wDAAqB,EAArB,OAClCH,OAAM,CAACE,CAAD,CAAQC,CAAR,CAD4B,CAA7B"}
|
|
1
|
+
{"version":3,"file":"MixFlex.js","names":["cn","mixFlexPropAlign","mixFlexPropJustify","mixFlexPropFlex","mixFlexPropWrap","mixFlexPropDirection","cnFlex","cnMixFlex","props","classNames"],"sources":["../../../../../src/mixs/MixFlex/MixFlex.ts"],"sourcesContent":["import './MixFlex.css';\n\nimport { cn } from '##/utils/bem';\n\nimport { Space } from '../MixSpace';\n\nexport const mixFlexPropAlign = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'stretch',\n] as const;\nexport type MixFlexPropAlign = (typeof mixFlexPropAlign)[number];\n\nexport const mixFlexPropJustify = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n] as const;\nexport type MixFlexPropJustify = (typeof mixFlexPropJustify)[number];\n\nexport const mixFlexPropFlex = ['flex', 'inline-flex'] as const;\nexport type MixFlexPropFlex = (typeof mixFlexPropFlex)[number];\n\nexport const mixFlexPropWrap = ['nowrap', 'wrap', 'wrap-reverse'] as const;\nexport type MixFlexPropWrap = (typeof mixFlexPropWrap)[number];\n\nexport const mixFlexPropDirection = [\n 'row',\n 'row-reverse',\n 'column',\n 'column-reverse',\n] as const;\nexport type MixFlexPropDirection = (typeof mixFlexPropDirection)[number];\n\nexport type CnMixFlexProps = {\n align?: MixFlexPropAlign;\n justify?: MixFlexPropJustify;\n flex?: MixFlexPropFlex;\n wrap?: MixFlexPropWrap;\n direction?: MixFlexPropDirection;\n gap?: Space;\n order?: -1 | 0 | 1;\n};\n\ntype CnMixFlex = (\n props: CnMixFlexProps,\n classNames?: Array<string | undefined>,\n) => string;\n\nconst cnFlex = cn('MixFlex');\n\nexport const cnMixFlex: CnMixFlex = (props, classNames = []) =>\n cnFlex(props, classNames);\n"],"mappings":"AAAA,sBAEA,OAASA,EAAT,uBAIA,MAAO,IAAMC,iBAAgB,CAAG,CAC9B,YAD8B,CAE9B,UAF8B,CAG9B,QAH8B,CAI9B,UAJ8B,CAK9B,SAL8B,CAAzB,CASP,MAAO,IAAMC,mBAAkB,CAAG,CAChC,YADgC,CAEhC,UAFgC,CAGhC,QAHgC,CAIhC,eAJgC,CAKhC,cALgC,CAMhC,cANgC,CAA3B,CAUP,MAAO,IAAMC,gBAAe,CAAG,CAAC,MAAD,CAAS,aAAT,CAAxB,CAGP,MAAO,IAAMC,gBAAe,CAAG,CAAC,QAAD,CAAW,MAAX,CAAmB,cAAnB,CAAxB,CAGP,MAAO,IAAMC,qBAAoB,CAAG,CAClC,KADkC,CAElC,aAFkC,CAGlC,QAHkC,CAIlC,gBAJkC,CAA7B,CAuBP,GAAMC,OAAM,CAAGN,EAAE,CAAC,SAAD,CAAjB,CAEA,MAAO,IAAMO,UAAoB,CAAG,SAACC,CAAD,KAAQC,EAAR,wDAAqB,EAArB,OAClCH,OAAM,CAACE,CAAD,CAAQC,CAAR,CAD4B,CAA7B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './MixScrollBar.css';
|
|
2
2
|
export declare const mixScrollBarPropSize: readonly ["m", "xs", "s"];
|
|
3
|
-
export type MixScrollBarPropSize = typeof mixScrollBarPropSize[number];
|
|
3
|
+
export type MixScrollBarPropSize = (typeof mixScrollBarPropSize)[number];
|
|
4
4
|
export declare const mixScrollBarPropSizeDefault: MixScrollBarPropSize;
|
|
5
5
|
export declare const mixScrollBarPropTrackSize: readonly ["auto", "native"];
|
|
6
|
-
export type MixScrollBarPropTrackSize = typeof mixScrollBarPropTrackSize[number];
|
|
6
|
+
export type MixScrollBarPropTrackSize = (typeof mixScrollBarPropTrackSize)[number];
|
|
7
7
|
export declare const mixScrollBarPropTrackSizeDefault: MixScrollBarPropTrackSize;
|
|
8
8
|
type MixScrollBarProps = {
|
|
9
9
|
size?: MixScrollBarPropSize;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MixScrollBar.js","names":["cn","cnScrollBar","mixScrollBarPropSize","mixScrollBarPropSizeDefault","mixScrollBarPropTrackSize","mixScrollBarPropTrackSizeDefault","cnMixScrollBar","props","size","invisible","trackSize"],"sources":["../../../../../src/mixs/MixScrollBar/MixScrollBar.ts"],"sourcesContent":["import './MixScrollBar.css';\n\nimport { cn } from '##/utils/bem';\n\nconst cnScrollBar = cn('MixScrollBar');\n\nexport const mixScrollBarPropSize = ['m', 'xs', 's'] as const;\nexport type MixScrollBarPropSize = typeof mixScrollBarPropSize[number];\nexport const mixScrollBarPropSizeDefault: MixScrollBarPropSize =\n mixScrollBarPropSize[0];\n\nexport const mixScrollBarPropTrackSize = ['auto', 'native'] as const;\nexport type MixScrollBarPropTrackSize =\n typeof mixScrollBarPropTrackSize[number];\nexport const mixScrollBarPropTrackSizeDefault: MixScrollBarPropTrackSize =\n mixScrollBarPropTrackSize[0];\n\ntype MixScrollBarProps = {\n size?: MixScrollBarPropSize;\n invisible?: boolean;\n trackSize?: MixScrollBarPropTrackSize;\n};\n\ntype CnMixScrollBar = (props?: MixScrollBarProps) => string;\n\nexport const cnMixScrollBar: CnMixScrollBar = (props) => {\n const {\n size = mixScrollBarPropSizeDefault,\n invisible,\n trackSize = mixScrollBarPropTrackSizeDefault,\n } = props ?? {};\n return cnScrollBar({ size, invisible, trackSize });\n};\n"],"mappings":"AAAA,2BAEA,OAASA,EAAT,uBAEA,GAAMC,YAAW,CAAGD,EAAE,CAAC,cAAD,CAAtB,CAEA,MAAO,IAAME,qBAAoB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf,CAGP,MAAO,IAAME,0BAAyB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAlC,CAGP,MAAO,IAAMC,iCAA2D,CACtED,yBAAyB,CAAC,CAAD,CADpB,CAWP,MAAO,IAAME,eAA8B,CAAG,SAACC,CAAD,CAAW,CACvD,aAIIA,CAJJ,WAIIA,CAJJ,CAIIA,CAJJ,CAIa,EAJb,KACEC,IADF,CACEA,CADF,YACSL,2BADT,GAEEM,CAFF,GAEEA,SAFF,KAGEC,SAHF,CAGEA,CAHF,YAGcL,gCAHd,GAKA,MAAOJ,YAAW,CAAC,CAAEO,IAAI,CAAJA,CAAF,CAAQC,SAAS,CAATA,CAAR,CAAmBC,SAAS,CAATA,CAAnB,CAAD,CACnB,CAPM"}
|
|
1
|
+
{"version":3,"file":"MixScrollBar.js","names":["cn","cnScrollBar","mixScrollBarPropSize","mixScrollBarPropSizeDefault","mixScrollBarPropTrackSize","mixScrollBarPropTrackSizeDefault","cnMixScrollBar","props","size","invisible","trackSize"],"sources":["../../../../../src/mixs/MixScrollBar/MixScrollBar.ts"],"sourcesContent":["import './MixScrollBar.css';\n\nimport { cn } from '##/utils/bem';\n\nconst cnScrollBar = cn('MixScrollBar');\n\nexport const mixScrollBarPropSize = ['m', 'xs', 's'] as const;\nexport type MixScrollBarPropSize = (typeof mixScrollBarPropSize)[number];\nexport const mixScrollBarPropSizeDefault: MixScrollBarPropSize =\n mixScrollBarPropSize[0];\n\nexport const mixScrollBarPropTrackSize = ['auto', 'native'] as const;\nexport type MixScrollBarPropTrackSize =\n (typeof mixScrollBarPropTrackSize)[number];\nexport const mixScrollBarPropTrackSizeDefault: MixScrollBarPropTrackSize =\n mixScrollBarPropTrackSize[0];\n\ntype MixScrollBarProps = {\n size?: MixScrollBarPropSize;\n invisible?: boolean;\n trackSize?: MixScrollBarPropTrackSize;\n};\n\ntype CnMixScrollBar = (props?: MixScrollBarProps) => string;\n\nexport const cnMixScrollBar: CnMixScrollBar = (props) => {\n const {\n size = mixScrollBarPropSizeDefault,\n invisible,\n trackSize = mixScrollBarPropTrackSizeDefault,\n } = props ?? {};\n return cnScrollBar({ size, invisible, trackSize });\n};\n"],"mappings":"AAAA,2BAEA,OAASA,EAAT,uBAEA,GAAMC,YAAW,CAAGD,EAAE,CAAC,cAAD,CAAtB,CAEA,MAAO,IAAME,qBAAoB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf,CAGP,MAAO,IAAME,0BAAyB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAlC,CAGP,MAAO,IAAMC,iCAA2D,CACtED,yBAAyB,CAAC,CAAD,CADpB,CAWP,MAAO,IAAME,eAA8B,CAAG,SAACC,CAAD,CAAW,CACvD,aAIIA,CAJJ,WAIIA,CAJJ,CAIIA,CAJJ,CAIa,EAJb,KACEC,IADF,CACEA,CADF,YACSL,2BADT,GAEEM,CAFF,GAEEA,SAFF,KAGEC,SAHF,CAGEA,CAHF,YAGcL,gCAHd,GAKA,MAAOJ,YAAW,CAAC,CAAEO,IAAI,CAAJA,CAAF,CAAQC,SAAS,CAATA,CAAR,CAAmBC,SAAS,CAATA,CAAnB,CAAD,CACnB,CAPM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.MixVisuallyHidden{clip:rect(0 0 0 0);
|
|
1
|
+
.MixVisuallyHidden{border:0;clip-path:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","names":["sortBy","array","param","order","sortFn","a","b","sort","compareFn","updateAt","index","newItem","isExpand","fixedIndex","length","slice","putBefore","range","n","Array","keys","chunk","size","resIndex","result","groupBy","iteratee","reduce","value","key"],"sources":["../../../../src/utils/array.ts"],"sourcesContent":["export const sortBy = <T extends {}>(\n array: T[],\n param: keyof T,\n order: 'asc' | 'desc' = 'asc',\n sortFn = (a: T[keyof T], b: T[keyof T]): number => (a < b ? -1 : 1),\n): T[] => {\n const compareFn = (a: T, b: T): number =>\n (order === 'desc' ? -1 : 1) * sortFn(a[param], b[param]);\n\n return [...array].sort(compareFn);\n};\n\nexport const updateAt = <T>(\n array: T[],\n index: number,\n newItem: T,\n isExpand = false,\n): T[] => {\n const fixedIndex = index < 0 ? 0 : index;\n if (fixedIndex >= array.length) {\n return isExpand ? [...array, newItem] : array;\n }\n return [\n ...array.slice(0, fixedIndex),\n newItem,\n ...array.slice(fixedIndex + (isExpand ? 0 : 1), array.length),\n ];\n};\n\nexport const putBefore = <T>(array: T[], index: number, newItem: T): T[] =>\n updateAt(array, index, newItem, true);\n\nexport const range = (n: number): number[] => [...Array(n).keys()];\n\nexport const chunk = <T>(array: T[], size: number): T[][] => {\n let index = 0;\n let resIndex = 0;\n\n const result: T[][] = [];\n\n while (index < array.length) {\n result[resIndex++] = array.slice(index, (index += size));\n }\n\n return result;\n};\n\nexport const groupBy = <T, K extends keyof any>(\n array: T[],\n iteratee: (elem: T) => K,\n) =>\n array.reduce((result, value) => {\n
|
|
1
|
+
{"version":3,"file":"array.js","names":["sortBy","array","param","order","sortFn","a","b","sort","compareFn","updateAt","index","newItem","isExpand","fixedIndex","length","slice","putBefore","range","n","Array","keys","chunk","size","resIndex","result","groupBy","iteratee","reduce","value","key"],"sources":["../../../../src/utils/array.ts"],"sourcesContent":["export const sortBy = <T extends {}>(\n array: T[],\n param: keyof T,\n order: 'asc' | 'desc' = 'asc',\n sortFn = (a: T[keyof T], b: T[keyof T]): number => (a < b ? -1 : 1),\n): T[] => {\n const compareFn = (a: T, b: T): number =>\n (order === 'desc' ? -1 : 1) * sortFn(a[param], b[param]);\n\n return [...array].sort(compareFn);\n};\n\nexport const updateAt = <T>(\n array: T[],\n index: number,\n newItem: T,\n isExpand = false,\n): T[] => {\n const fixedIndex = index < 0 ? 0 : index;\n if (fixedIndex >= array.length) {\n return isExpand ? [...array, newItem] : array;\n }\n return [\n ...array.slice(0, fixedIndex),\n newItem,\n ...array.slice(fixedIndex + (isExpand ? 0 : 1), array.length),\n ];\n};\n\nexport const putBefore = <T>(array: T[], index: number, newItem: T): T[] =>\n updateAt(array, index, newItem, true);\n\nexport const range = (n: number): number[] => [...Array(n).keys()];\n\nexport const chunk = <T>(array: T[], size: number): T[][] => {\n let index = 0;\n let resIndex = 0;\n\n const result: T[][] = [];\n\n while (index < array.length) {\n result[resIndex++] = array.slice(index, (index += size));\n }\n\n return result;\n};\n\nexport const groupBy = <T, K extends keyof any>(\n array: T[],\n iteratee: (elem: T) => K,\n) =>\n array.reduce(\n (result, value) => {\n const key = iteratee(value);\n\n return {\n ...result,\n [key]: result[key] ? [...result[key], value] : [value],\n };\n },\n {} as Record<K, T[]>,\n );\n"],"mappings":"8uBAAA,MAAO,IAAMA,OAAM,CAAG,SACpBC,CADoB,CAEpBC,CAFoB,CAKZ,IAFRC,EAEQ,wDAFgB,KAEhB,CADRC,CACQ,wDADC,SAACC,CAAD,CAAgBC,CAAhB,QAA2CD,EAAC,CAAGC,CAAJ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tB,CAAK,CAACc,KAAN,CAAYL,CAAZ,CAAoBA,CAAK,EAAIY,CAA7B,CAArB,CAGF,MAAOE,EACR,CAXM,CAaP,MAAO,IAAMC,QAAO,CAAG,SACrBxB,CADqB,CAErByB,CAFqB,QAIrBzB,EAAK,CAAC0B,MAAN,CACE,SAACH,CAAD,CAASI,CAAT,CAAmB,CACjB,GAAMC,EAAG,CAAGH,CAAQ,CAACE,CAAD,CAApB,CAEA,sCACKJ,CADL,wBAEGK,CAFH,CAESL,CAAM,CAACK,CAAD,CAAN,8BAAkBL,CAAM,CAACK,CAAD,CAAxB,GAA+BD,CAA/B,GAAwC,CAACA,CAAD,CAFjD,EAID,CARH,CASE,EATF,CAJqB,CAAhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{setYear}from"date-fns";export var leapYear=2020;export var dateComparer=function(c,a){var b,d;return(null!==(b=null===c||void 0===c?void 0:c.getTime())&&void 0!==b?b:0)-(null!==(d=null===a||void 0===a?void 0:a.getTime())&&void 0!==d?d:0)};export var getStartAndEndDate=function(a,b){return[a,b].sort(dateComparer)};export var minDateDefault=setYear(new Date(1970,0,1,0,0,0,0),1);export var maxDateDefault=new Date(9999,11,31,23,59,59);export*from"./isInMinMaxDate";export*from"./isDateRange";export*from"./isOnlyOneDateInRange";export*from"./getCentury";export*from"./startOfCentury";export*from"./endOfCentury";export*from"./isEqualDate";export*from"./isDisableDate";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["setYear","leapYear","dateComparer","a","b","getTime","getStartAndEndDate","date1","date2","sort","minDateDefault","Date","maxDateDefault"],"sources":["../../../../../src/utils/date/index.ts"],"sourcesContent":["import setYear from 'date-fns
|
|
1
|
+
{"version":3,"file":"index.js","names":["setYear","leapYear","dateComparer","a","b","getTime","getStartAndEndDate","date1","date2","sort","minDateDefault","Date","maxDateDefault"],"sources":["../../../../../src/utils/date/index.ts"],"sourcesContent":["import { setYear } from 'date-fns';\n\nexport const leapYear = 2020;\n\nexport const dateComparer = (a?: Date, b?: Date): number =>\n (a?.getTime() ?? 0) - (b?.getTime() ?? 0);\n\nexport const getStartAndEndDate = (date1: Date, date2: Date): Date[] =>\n [date1, date2].sort(dateComparer);\n\nexport const minDateDefault = setYear(new Date(1970, 0, 1, 0, 0, 0, 0), 1);\nexport const maxDateDefault = new Date(9999, 11, 31, 23, 59, 59);\n\nexport * from './isInMinMaxDate';\nexport * from './isDateRange';\nexport * from './isOnlyOneDateInRange';\nexport * from './getCentury';\nexport * from './startOfCentury';\nexport * from './endOfCentury';\nexport * from './isEqualDate';\nexport * from './isDisableDate';\n"],"mappings":"AAAA,OAASA,OAAT,KAAwB,UAAxB,CAEA,MAAO,IAAMC,SAAQ,CAAG,IAAjB,CAEP,MAAO,IAAMC,aAAY,CAAG,SAACC,CAAD,CAAWC,CAAX,gBAC1B,kBAACD,CAAD,WAACA,CAAD,QAACA,CAAC,CAAEE,OAAH,EAAD,gBAAiB,CAAjB,oBAAuBD,CAAvB,WAAuBA,CAAvB,QAAuBA,CAAC,CAAEC,OAAH,EAAvB,gBAAuC,CAAvC,CAD0B,CAArB,CAGP,MAAO,IAAMC,mBAAkB,CAAG,SAACC,CAAD,CAAcC,CAAd,QAChC,CAACD,CAAD,CAAQC,CAAR,EAAeC,IAAf,CAAoBP,YAApB,CADgC,CAA3B,CAGP,MAAO,IAAMQ,eAAc,CAAGV,OAAO,CAAC,GAAIW,KAAJ,CAAS,IAAT,CAAe,CAAf,CAAkB,CAAlB,CAAqB,CAArB,CAAwB,CAAxB,CAA2B,CAA3B,CAA8B,CAA9B,CAAD,CAAmC,CAAnC,CAA9B,CACP,MAAO,IAAMC,eAAc,CAAG,GAAID,KAAJ,CAAS,IAAT,CAAe,EAAf,CAAmB,EAAnB,CAAuB,EAAvB,CAA2B,EAA3B,CAA+B,EAA/B,CAAvB,CAEP,8BACA,2BACA,oCACA,0BACA,8BACA,4BACA,2BACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consta/uikit",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.32.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"ui-kit",
|
|
6
6
|
"design-system",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@reatom/core": "^3.10.1",
|
|
22
22
|
"@reatom/npm-react": "^3.10.6",
|
|
23
23
|
"compute-scroll-into-view": "^3.1.1",
|
|
24
|
-
"date-fns": "^
|
|
24
|
+
"date-fns": "^4.1.0",
|
|
25
25
|
"react": ">= 16.8.0",
|
|
26
26
|
"react-dom": ">= 16.8.0",
|
|
27
27
|
"react-dropzone": "^14.2.3",
|