@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":"Button.js","names":["React","useRef","Loader","useForkRef","cnMixFocus","cn","getByMap","forwardRefWithAs","usePropsHandler","buttonPropSize","buttonPropSizeDefault","buttonPropView","buttonPropViewDefault","buttonPropWidth","buttonPropWidthDefault","buttonPropForm","mapStableForm","defaultClear","defaultBrick","brick","brickDefault","brickClear","brickRound","round","roundClear","roundBrick","clearRound","clearDefault","clearBrick","clearClear","buttonPropFormDefault","COMPONENT_NAME","cnButton","sizeMap","xs","s","m","l","sizeMapOnlyIcon","Button","props","ref","buttonRef","size","view","width","form","iconLeft","iconRight","label","className","onClick","disabled","loading","type","tabIndex","as","onlyIcon","iconSizeProp","iconSize","formId","otherProps","IconOnly","IconLeft","IconRight","title","handleClick","e","withIcon","position"],"sources":["../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import './Button.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React, { HTMLProps, useRef } from 'react';\n\nimport { Loader } from '##/components/Loader';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const buttonPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type ButtonPropSize = typeof buttonPropSize[number];\nexport const buttonPropSizeDefault: ButtonPropSize = buttonPropSize[0];\n\nexport const buttonPropView = [\n 'primary',\n 'clear',\n 'ghost',\n 'secondary',\n] as const;\nexport type ButtonPropView = typeof buttonPropView[number];\nexport const buttonPropViewDefault: ButtonPropView = buttonPropView[0];\n\nexport const buttonPropWidth = ['default', 'full'] as const;\nexport type ButtonPropWidth = typeof buttonPropWidth[number];\nexport const buttonPropWidthDefault: ButtonPropWidth = buttonPropWidth[0];\n\nexport const buttonPropForm = [\n 'default',\n 'brick',\n 'round',\n 'brickRound',\n 'roundBrick',\n 'brickDefault',\n 'defaultBrick',\n] as const;\n\nexport type ButtonPropForm = typeof buttonPropForm[number];\n\ntype GlobalForm =\n | 'default'\n | 'brick'\n | 'round'\n | 'brickRound'\n | 'roundBrick'\n | 'brickDefault'\n | 'defaultBrick'\n | 'defaultClear'\n | 'brickClear'\n | 'roundClear'\n | 'clearRound'\n | 'clearDefault'\n | 'clearBrick'\n | 'clearClear';\n\nconst mapStableForm: Record<GlobalForm, ButtonPropForm> = {\n default: 'default',\n defaultClear: 'defaultBrick',\n defaultBrick: 'defaultBrick',\n brick: 'brick',\n brickDefault: 'brickDefault',\n brickClear: 'brick',\n brickRound: 'brickRound',\n round: 'round',\n roundClear: 'roundBrick',\n roundBrick: 'roundBrick',\n clearRound: 'brickRound',\n clearDefault: 'brickDefault',\n clearBrick: 'brick',\n clearClear: 'brick',\n};\n\nexport const buttonPropFormDefault = buttonPropForm[0];\n\nexport type Props = {\n size?: ButtonPropSize;\n view?: ButtonPropView;\n width?: ButtonPropWidth;\n form?: ButtonPropForm;\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n label?: string | number;\n onClick?: React.EventHandler<React.MouseEvent>;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n title?: string;\n children?: never;\n type?: 'button' | 'reset' | 'submit';\n formId?: HTMLProps<HTMLButtonElement>['form'];\n};\n\nexport const COMPONENT_NAME = 'Button' as const;\nexport const cnButton = cn(COMPONENT_NAME);\n\nconst sizeMap = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 'm',\n} as const;\n\nconst sizeMapOnlyIcon = {\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'm',\n} as const;\n\nexport const Button = forwardRefWithAs<Props, 'button'>((props, ref) => {\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const {\n size = buttonPropSizeDefault,\n view = buttonPropViewDefault,\n width = buttonPropWidthDefault,\n form = buttonPropFormDefault,\n iconLeft,\n iconRight,\n label,\n className,\n onClick,\n disabled,\n loading,\n type = 'button',\n tabIndex,\n as = 'button',\n onlyIcon,\n iconSize: iconSizeProp,\n formId,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, buttonRef);\n\n const Tag = as as string;\n const IconOnly = (!label || onlyIcon) && (iconLeft || iconRight);\n const IconLeft = iconLeft;\n const IconRight = iconRight;\n const withIcon = !!iconLeft || !!iconRight;\n const title = props.title || (!!IconOnly && label) || undefined;\n const iconSize = IconOnly\n ? getByMap(sizeMapOnlyIcon, size, iconSizeProp)\n : getByMap(sizeMap, size, iconSizeProp);\n\n const handleClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!disabled && !loading && onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick ? handleClick : undefined}\n form={formId}\n type={type}\n className={cnButton(\n {\n size,\n view,\n width,\n form: mapStableForm[form],\n loading,\n disabled,\n withIcon,\n onlyIcon: !!IconOnly,\n },\n [!(disabled || loading) ? cnMixFocus() : undefined, className],\n )}\n disabled={disabled}\n tabIndex={tabIndex}\n title={title}\n ref={useForkRef([ref, buttonRef])}\n >\n {IconOnly && <IconOnly className={cnButton('Icon')} size={iconSize} />}\n {!IconOnly &&\n ((IconLeft || IconRight) && label ? (\n <>\n {IconLeft && (\n <IconLeft\n className={cnButton('Icon', { position: 'left' })}\n size={iconSize}\n />\n )}\n <span className={cnButton('Label')}>{label}</span>\n {IconRight && (\n <IconRight\n className={cnButton('Icon', { position: 'right' })}\n size={iconSize}\n />\n )}\n </>\n ) : (\n label\n ))}\n {loading && (\n <div className={cnButton('Loader')}>\n <Loader size={sizeMapOnlyIcon[size]} type=\"circle\" />\n </div>\n )}\n </Tag>\n );\n});\n"],"mappings":"kQAAA,qBAGA,MAAOA,MAAP,EAA2BC,MAA3B,KAAyC,OAAzC,CAEA,OAASC,MAAT,iBAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CACA,OAASC,eAAT,2CAEA,MAAO,IAAMC,eAAc,CAAG,CAAC,GAA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S,CAAEqC,QAAQ,CAAE,MAAZ,CAAT,CADrB,CAEE,IAAI,CAAEV,CAFR,EAFJ,CAOE,4BAAM,SAAS,CAAE3B,QAAQ,CAAC,OAAD,CAAzB,EAAqCiB,CAArC,CAPF,CAQGe,CAAS,EACR,oBAAC,CAAD,EACE,SAAS,CAAEhC,QAAQ,CAAC,MAAD,CAAS,CAAEqC,QAAQ,CAAE,OAAZ,CAAT,CADrB,CAEE,IAAI,CAAEV,CAFR,EATJ,CADD,CAiBCV,CAlBH,CAxBH,CA4CGI,CAAO,EACN,2BAAK,SAAS,CAAErB,QAAQ,CAAC,QAAD,CAAxB,EACE,oBAAC,MAAD,EAAQ,IAAI,CAAEM,eAAe,CAACK,CAAD,CAA7B,CAAqC,IAAI,CAAC,QAA1C,EADF,CA7CJ,CAmDH,CA5FqC,CAA/B"}
|
|
1
|
+
{"version":3,"file":"Button.js","names":["React","useRef","Loader","useForkRef","cnMixFocus","cn","getByMap","forwardRefWithAs","usePropsHandler","buttonPropSize","buttonPropSizeDefault","buttonPropView","buttonPropViewDefault","buttonPropWidth","buttonPropWidthDefault","buttonPropForm","mapStableForm","defaultClear","defaultBrick","brick","brickDefault","brickClear","brickRound","round","roundClear","roundBrick","clearRound","clearDefault","clearBrick","clearClear","buttonPropFormDefault","COMPONENT_NAME","cnButton","sizeMap","xs","s","m","l","sizeMapOnlyIcon","Button","props","ref","buttonRef","size","view","width","form","iconLeft","iconRight","label","className","onClick","disabled","loading","type","tabIndex","as","onlyIcon","iconSizeProp","iconSize","formId","otherProps","IconOnly","IconLeft","IconRight","title","handleClick","e","withIcon","position"],"sources":["../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import './Button.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React, { HTMLProps, useRef } from 'react';\n\nimport { Loader } from '##/components/Loader';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const buttonPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type ButtonPropSize = (typeof buttonPropSize)[number];\nexport const buttonPropSizeDefault: ButtonPropSize = buttonPropSize[0];\n\nexport const buttonPropView = [\n 'primary',\n 'clear',\n 'ghost',\n 'secondary',\n] as const;\nexport type ButtonPropView = (typeof buttonPropView)[number];\nexport const buttonPropViewDefault: ButtonPropView = buttonPropView[0];\n\nexport const buttonPropWidth = ['default', 'full'] as const;\nexport type ButtonPropWidth = (typeof buttonPropWidth)[number];\nexport const buttonPropWidthDefault: ButtonPropWidth = buttonPropWidth[0];\n\nexport const buttonPropForm = [\n 'default',\n 'brick',\n 'round',\n 'brickRound',\n 'roundBrick',\n 'brickDefault',\n 'defaultBrick',\n] as const;\n\nexport type ButtonPropForm = (typeof buttonPropForm)[number];\n\ntype GlobalForm =\n | 'default'\n | 'brick'\n | 'round'\n | 'brickRound'\n | 'roundBrick'\n | 'brickDefault'\n | 'defaultBrick'\n | 'defaultClear'\n | 'brickClear'\n | 'roundClear'\n | 'clearRound'\n | 'clearDefault'\n | 'clearBrick'\n | 'clearClear';\n\nconst mapStableForm: Record<GlobalForm, ButtonPropForm> = {\n default: 'default',\n defaultClear: 'defaultBrick',\n defaultBrick: 'defaultBrick',\n brick: 'brick',\n brickDefault: 'brickDefault',\n brickClear: 'brick',\n brickRound: 'brickRound',\n round: 'round',\n roundClear: 'roundBrick',\n roundBrick: 'roundBrick',\n clearRound: 'brickRound',\n clearDefault: 'brickDefault',\n clearBrick: 'brick',\n clearClear: 'brick',\n};\n\nexport const buttonPropFormDefault = buttonPropForm[0];\n\nexport type Props = {\n size?: ButtonPropSize;\n view?: ButtonPropView;\n width?: ButtonPropWidth;\n form?: ButtonPropForm;\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n label?: string | number;\n onClick?: React.EventHandler<React.MouseEvent>;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n title?: string;\n children?: never;\n type?: 'button' | 'reset' | 'submit';\n formId?: HTMLProps<HTMLButtonElement>['form'];\n};\n\nexport const COMPONENT_NAME = 'Button' as const;\nexport const cnButton = cn(COMPONENT_NAME);\n\nconst sizeMap = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 'm',\n} as const;\n\nconst sizeMapOnlyIcon = {\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'm',\n} as const;\n\nexport const Button = forwardRefWithAs<Props, 'button'>((props, ref) => {\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const {\n size = buttonPropSizeDefault,\n view = buttonPropViewDefault,\n width = buttonPropWidthDefault,\n form = buttonPropFormDefault,\n iconLeft,\n iconRight,\n label,\n className,\n onClick,\n disabled,\n loading,\n type = 'button',\n tabIndex,\n as = 'button',\n onlyIcon,\n iconSize: iconSizeProp,\n formId,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, buttonRef);\n\n const Tag = as as string;\n const IconOnly = (!label || onlyIcon) && (iconLeft || iconRight);\n const IconLeft = iconLeft;\n const IconRight = iconRight;\n const withIcon = !!iconLeft || !!iconRight;\n const title = props.title || (!!IconOnly && label) || undefined;\n const iconSize = IconOnly\n ? getByMap(sizeMapOnlyIcon, size, iconSizeProp)\n : getByMap(sizeMap, size, iconSizeProp);\n\n const handleClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!disabled && !loading && onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick ? handleClick : undefined}\n form={formId}\n type={type}\n className={cnButton(\n {\n size,\n view,\n width,\n form: mapStableForm[form],\n loading,\n disabled,\n withIcon,\n onlyIcon: !!IconOnly,\n },\n [!(disabled || loading) ? cnMixFocus() : undefined, className],\n )}\n disabled={disabled}\n tabIndex={tabIndex}\n title={title}\n ref={useForkRef([ref, buttonRef])}\n >\n {IconOnly && <IconOnly className={cnButton('Icon')} size={iconSize} />}\n {!IconOnly &&\n ((IconLeft || IconRight) && label ? (\n <>\n {IconLeft && (\n <IconLeft\n className={cnButton('Icon', { position: 'left' })}\n size={iconSize}\n />\n )}\n <span className={cnButton('Label')}>{label}</span>\n {IconRight && (\n <IconRight\n className={cnButton('Icon', { position: 'right' })}\n size={iconSize}\n />\n )}\n </>\n ) : (\n label\n ))}\n {loading && (\n <div className={cnButton('Loader')}>\n <Loader size={sizeMapOnlyIcon[size]} type=\"circle\" />\n </div>\n )}\n </Tag>\n );\n});\n"],"mappings":"kQAAA,qBAGA,MAAOA,MAAP,EAA2BC,MAA3B,KAAyC,OAAzC,CAEA,OAASC,MAAT,iBAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CACA,OAASC,eAAT,2CAEA,MAAO,IAAMC,eAAc,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAC5B,SAD4B,CAE5B,OAF4B,CAG5B,OAH4B,CAI5B,WAJ4B,CAAvB,CAOP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,SAAD,CAAY,MAAZ,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,eAAc,CAAG,CAC5B,SAD4B,CAE5B,OAF4B,CAG5B,OAH4B,CAI5B,YAJ4B,CAK5B,YAL4B,CAM5B,cAN4B,CAO5B,cAP4B,CAAvB,CA4BP,GAAMC,cAAiD,CAAG,CACxD,QAAS,SAD+C,CAExDC,YAAY,CAAE,cA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ly ["round", "square"];
|
|
3
|
-
export type CardPropForm = typeof cardPropForm[number];
|
|
3
|
+
export type CardPropForm = (typeof cardPropForm)[number];
|
|
4
4
|
export declare const cardPropFormDefault: CardPropForm;
|
|
5
5
|
export declare const cardPropSpace: readonly ["m", "xs", "s", "l", "xl", "2xl", "3xl", "4xl", "5xl"];
|
|
6
|
-
export type CardPropSpace = typeof cardPropSpace[number];
|
|
6
|
+
export type CardPropSpace = (typeof cardPropSpace)[number];
|
|
7
7
|
export declare const cardPropStatus: readonly ["alert", "success", "warning"];
|
|
8
|
-
export type CardPropStatus = typeof cardPropStatus[number] | string;
|
|
8
|
+
export type CardPropStatus = (typeof cardPropStatus)[number] | string;
|
|
9
9
|
export type CardProps = {
|
|
10
10
|
verticalSpace?: CardPropSpace;
|
|
11
11
|
horizontalSpace?: CardPropSpace;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","names":["React","useRef","useForkRef","cnMixCard","cn","forwardRefWithAs","usePropsHandler","cardPropForm","cardPropFormDefault","cardPropSpace","cardPropStatus","COMPONENT_NAME","cnCard","Card","props","ref","cardRef","verticalSpace","horizontalSpace","status","form","shadow","children","tabIndex","border","className","as","otherProps"],"sources":["../../../../../src/components/Card/Card.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixCard } from '../../mixs/MixCard/MixCard';\nimport { cn } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const cardPropForm = ['round', 'square'] as const;\nexport type CardPropForm = typeof cardPropForm[number];\nexport const cardPropFormDefault: CardPropForm = cardPropForm[0];\n\nexport const cardPropSpace = [\n 'm',\n 'xs',\n 's',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n] as const;\nexport type CardPropSpace = typeof cardPropSpace[number];\n\nexport const cardPropStatus = ['alert', 'success', 'warning'] as const;\nexport type CardPropStatus = typeof cardPropStatus[number] | string;\n\nexport type CardProps = {\n verticalSpace?: CardPropSpace;\n horizontalSpace?: CardPropSpace;\n status?: CardPropStatus;\n border?: boolean;\n form?: CardPropForm;\n shadow?: boolean;\n children?: React.ReactNode;\n};\n\nexport type Props = CardProps;\n\nexport const COMPONENT_NAME = 'Card' as const;\n\nexport const cnCard = cn('Card');\n\nexport const Card = forwardRefWithAs<CardProps>((props, ref) => {\n const cardRef = useRef<HTMLDivElement>(null);\n\n const {\n verticalSpace,\n horizontalSpace,\n status,\n form = cardPropFormDefault,\n shadow = true,\n children,\n tabIndex,\n border,\n className,\n as = 'div',\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, cardRef);\n\n const Tag = as as string;\n\n return (\n <Tag\n tabIndex={tabIndex}\n ref={useForkRef([cardRef, ref])}\n className={cnCard(null, [\n cnMixCard({\n verticalSpace,\n horizontalSpace,\n shadow,\n form,\n status,\n border,\n }),\n className,\n ])}\n {...otherProps}\n >\n {children}\n </Tag>\n );\n});\n"],"mappings":"gNAAA,MAAOA,MAAP,EAAgBC,MAAhB,KAA8B,OAA9B,CAEA,OAASC,UAAT,yCACA,OAASC,SAAT,kCACA,OAASC,EAAT,uBACA,OAASC,gBAAT,+CACA,OAASC,eAAT,2CAEA,MAAO,IAAMC,aAAY,CAAG,CAAC,OAAD,CAAU,QAAV,CAArB,CAEP,MAAO,IAAMC,oBAAiC,CAAGD,YAAY,CAAC,CAAD,CAAtD,CAEP,MAAO,IAAME,cAAa,CAAG,CAC3B,GAD2B,CAE3B,IAF2B,CAG3B,GAH2B,CAI3B,GAJ2B,CAK3B,IAL2B,CAM3B,KAN2B,CAO3B,KAP2B,CAQ3B,KAR2B,CAS3B,KAT2B,CAAtB,CAaP,MAAO,IAAMC,eAAc,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,CAAvB,CAeP,MAAO,IAAMC,eAAc,CAAG,MAAvB,CAEP,MAAO,IAAMC,OAAM,CAAGR,EAAE,CAAC,MAAD,CAAjB,CAEP,MAAO,IAAMS,KAAI,CAAGR,gBAAgB,CAAY,SAACS,CAAD,CAAQC,CAAR,CAAgB,IACxDC,EAAO,CAAGf,MAAM,CAAiB,IAAjB,CADwC,GAe1DK,eAAe,CAACK,cAAD,CAAiBG,CAAjB,CAAwBE,CAAxB,CAf2C,CAI5DC,CAJ4D,GAI5DA,aAJ4D,CAK5DC,CAL4D,GAK5DA,eAL4D,CAM5DC,CAN4D,GAM5DA,MAN4D,KAO5DC,IAP4D,CAO5DA,CAP4D,YAOrDZ,mBAPqD,OAQ5Da,MAR4D,CAS5DC,CAT4D,GAS5DA,QAT4D,CAU5DC,CAV4D,GAU5DA,QAV4D,CAW5DC,CAX4D,GAW5DA,MAX4D,CAY5DC,CAZ4D,GAY5DA,SAZ4D,KAa5DC,EAb4D,CAa5DA,CAb4D,YAavD,KAbuD,GAczDC,CAdyD,uCAmB9D,MACE,qBAHUD,CAGV,gBACE,QAAQ,CAAEH,CADZ,CAEE,GAAG,CAAErB,UAAU,CAAC,CAACc,CAAD,CAAUD,CAAV,CAAD,CAFjB,CAGE,SAAS,CAAEH,MAAM,CAAC,IAAD,CAAO,CACtBT,SAAS,CAAC,CACRc,aAAa,CAAbA,CADQ,CAERC,eAAe,CAAfA,CAFQ,CAGRG,MAAM,iBAHE,CAIRD,IAAI,CAAJA,CAJQ,CAKRD,MAAM,CAANA,CALQ,CAMRK,MAAM,CAANA,CANQ,CAAD,CADa,CAStBC,CATsB,CAAP,CAHnB,EAcME,CAdN,EAgBGL,CAhBH,CAmBH,CAvCmC,CAA7B"}
|
|
1
|
+
{"version":3,"file":"Card.js","names":["React","useRef","useForkRef","cnMixCard","cn","forwardRefWithAs","usePropsHandler","cardPropForm","cardPropFormDefault","cardPropSpace","cardPropStatus","COMPONENT_NAME","cnCard","Card","props","ref","cardRef","verticalSpace","horizontalSpace","status","form","shadow","children","tabIndex","border","className","as","otherProps"],"sources":["../../../../../src/components/Card/Card.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixCard } from '../../mixs/MixCard/MixCard';\nimport { cn } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const cardPropForm = ['round', 'square'] as const;\nexport type CardPropForm = (typeof cardPropForm)[number];\nexport const cardPropFormDefault: CardPropForm = cardPropForm[0];\n\nexport const cardPropSpace = [\n 'm',\n 'xs',\n 's',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n] as const;\nexport type CardPropSpace = (typeof cardPropSpace)[number];\n\nexport const cardPropStatus = ['alert', 'success', 'warning'] as const;\nexport type CardPropStatus = (typeof cardPropStatus)[number] | string;\n\nexport type CardProps = {\n verticalSpace?: CardPropSpace;\n horizontalSpace?: CardPropSpace;\n status?: CardPropStatus;\n border?: boolean;\n form?: CardPropForm;\n shadow?: boolean;\n children?: React.ReactNode;\n};\n\nexport type Props = CardProps;\n\nexport const COMPONENT_NAME = 'Card' as const;\n\nexport const cnCard = cn('Card');\n\nexport const Card = forwardRefWithAs<CardProps>((props, ref) => {\n const cardRef = useRef<HTMLDivElement>(null);\n\n const {\n verticalSpace,\n horizontalSpace,\n status,\n form = cardPropFormDefault,\n shadow = true,\n children,\n tabIndex,\n border,\n className,\n as = 'div',\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, cardRef);\n\n const Tag = as as string;\n\n return (\n <Tag\n tabIndex={tabIndex}\n ref={useForkRef([cardRef, ref])}\n className={cnCard(null, [\n cnMixCard({\n verticalSpace,\n horizontalSpace,\n shadow,\n form,\n status,\n border,\n }),\n className,\n ])}\n {...otherProps}\n >\n {children}\n </Tag>\n );\n});\n"],"mappings":"gNAAA,MAAOA,MAAP,EAAgBC,MAAhB,KAA8B,OAA9B,CAEA,OAASC,UAAT,yCACA,OAAS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AAO,CACtBT,SAAS,CAAC,CACRc,aAAa,CAAbA,CADQ,CAERC,eAAe,CAAfA,CAFQ,CAGRG,MAAM,iBAHE,CAIRD,IAAI,CAAJA,CAJQ,CAKRD,MAAM,CAANA,CALQ,CAMRK,MAAM,CAANA,CANQ,CAAD,CADa,CAStBC,CATsB,CAAP,CAHnB,EAcME,CAdN,EAgBGL,CAhBH,CAmBH,CAvCmC,CAA7B"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
.Checkbox{cursor:pointer;display:inline-flex;font-family:var(--font-sans);line-height:var(--line-height-text-s);position:relative}.Checkbox_size_xs{--checkbox-font-size:var(--control-text-size-xs);--checkbox-size:var(--control-box-size-m);--checkbox-offset:var(--space-xs);--checkbox-arrow-width:calc(var(--space-3xs)*3/4);--align-top-margin:0}.Checkbox_size_s{--checkbox-font-size:var(--control-text-size-s);--checkbox-size:var(--control-box-size-m);--checkbox-offset:var(--space-xs);--checkbox-arrow-width:calc(var(--space-3xs)*3/4);--align-top-margin:var(--space-3xs)}.Checkbox_size_m{--checkbox-font-size:var(--control-text-size-m);--checkbox-size:var(--control-box-size-l);--checkbox-offset:var(--space-xs);--checkbox-arrow-width:var(--space-3xs);--align-top-margin:var(--space-3xs)}.Checkbox_size_l{--checkbox-font-size:var(--control-text-size-l);--checkbox-size:var(--control-box-size-l);--checkbox-offset:var(--space-s);--checkbox-arrow-width:var(--space-3xs);--align-top-margin:var(--space-3xs)}.Checkbox_view_primary{--checkbox-checked-border:var(--color-control-bg-primary);--checkbox-checked-background:var(--color-control-bg-primary);--checkbox-checked-check:var(--color-control-typo-primary);--checkbox-checked-border-hover:var(--color-control-bg-primary-hover);--checkbox-checked-background-hover:var(
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
--color-control-bg-primary-hover
|
|
3
|
+
)}.Checkbox_view_ghost{--checkbox-checked-border:var(--color-control-bg-border-default);--checkbox-checked-background:var(--color-control-bg-ghost);--checkbox-checked-check:var(--color-control-typo-ghost);--checkbox-checked-border-hover:var(--color-control-bg-border-default);--checkbox-checked-background-hover:var(--color-control-bg-ghost-hover)}.Checkbox_intermediate .Checkbox-Input,.Checkbox_intermediate .Checkbox-Input:checked,.Checkbox_intermediate:hover .Checkbox-Input,.Checkbox_intermediate:hover .Checkbox-Input:checked{background-color:var(--checkbox-checked-background);border-color:var(--checkbox-checked-border)}.Checkbox_intermediate .Checkbox-Input:before,.Checkbox_intermediate .Checkbox-Input:checked:before,.Checkbox_intermediate:hover .Checkbox-Input:before,.Checkbox_intermediate:hover .Checkbox-Input:checked:before{--checkbox-intermediate-offset:calc(var(--space-3xs) + var(--control-border-width));background-color:var(--checkbox-checked-check);border:none;height:var(--space-3xs);left:var(--space-3xs);opacity:1;top:calc(var(--checkbox-size)/2 - var(--space-3xs)/2);transform:rotate(0) translateY(-50%);transition:opacity .15s,transform .15s,background-color .08s .04s;width:calc(var(--checkbox-size) - var(--checkbox-intermediate-offset)*2)}.Checkbox_disabled{pointer-events:none}.Checkbox_disabled .Checkbox-Input:disabled{background-color:var(--color-control-bg-disable);border-color:transparent}.Checkbox_disabled .Checkbox-Input:disabled:before{border-color:var(--color-control-typo-disable)}.Checkbox_disabled.Checkbox_intermediate .Checkbox-Input:disabled:before{background-color:var(--color-control-typo-disable)}.Checkbox_disabled .Checkbox-Input:disabled~.Checkbox-Label{color:var(--color-control-typo-disable)}.Checkbox_align_center{align-items:center}.Checkbox_align_top{align-items:start}.Checkbox_align_top .Checkbox-Input{margin-top:var(--align-top-margin)}.Checkbox-Label{color:var(--color-control-typo-default);font-size:var(--checkbox-font-size);margin-left:var(--checkbox-offset)}.Checkbox-Input{-webkit-appearance:none;background-color:transparent;border:var(--control-border-width) solid var(--color-control-bg-border-default);border-radius:var(--control-radius);box-sizing:border-box;cursor:pointer;flex-shrink:0;height:var(--checkbox-size);margin:0;max-width:var(--checkbox-size);padding:0;position:relative;transition:border-color .15s,background-color .15s;width:var(--checkbox-size)}.Checkbox-Input:before{background-color:var(--color-control-bg-affect);border-bottom:var(--checkbox-arrow-width) solid var(--checkbox-checked-check);border-left:var(--checkbox-arrow-width) solid var(--checkbox-checked-check);box-sizing:border-box;content:"";height:calc(var(--checkbox-size)*.35);left:calc(var(--checkbox-size)/5 - 1.2px);opacity:0;position:absolute;top:calc(var(--checkbox-size)/2 - .5px);transform:rotate(-50deg) scaleX(0);transform-origin:0 0;transition:opacity .15s,transform .15s,background-color .08s;width:calc(var(--checkbox-size)*.6)}.Checkbox-Input:checked{background-color:var(--checkbox-checked-background);border-color:var(--checkbox-checked-border)}.Checkbox-Input:checked:before{opacity:1;transform:rotate(-50deg) scale(1)}.Checkbox:hover .Checkbox-Input{border-color:var(--color-control-bg-border-default-hover)}.Checkbox:hover .Checkbox-Input:checked{background-color:var(--checkbox-checked-background-hover);border-color:var(--checkbox-checked-border-hover)}
|
|
@@ -2,13 +2,13 @@ import './Checkbox.css';
|
|
|
2
2
|
import React, { ChangeEventHandler } from 'react';
|
|
3
3
|
import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
|
|
4
4
|
export declare const checkboxPropSize: readonly ["m", "xs", "s", "l"];
|
|
5
|
-
export type CheckboxPropSize = typeof checkboxPropSize[number];
|
|
5
|
+
export type CheckboxPropSize = (typeof checkboxPropSize)[number];
|
|
6
6
|
export declare const checkboxPropSizeDefault: CheckboxPropSize;
|
|
7
7
|
export declare const checkboxPropView: readonly ["primary", "ghost"];
|
|
8
|
-
export type CheckboxPropView = typeof checkboxPropView[number];
|
|
8
|
+
export type CheckboxPropView = (typeof checkboxPropView)[number];
|
|
9
9
|
export declare const checkboxPropViewDefault: CheckboxPropView;
|
|
10
10
|
export declare const checkboxPropAlign: readonly ["center", "top"];
|
|
11
|
-
export type CheckboxPropAlign = typeof checkboxPropAlign[number];
|
|
11
|
+
export type CheckboxPropAlign = (typeof checkboxPropAlign)[number];
|
|
12
12
|
export declare const checkboxPropAlignDefault: CheckboxPropAlign;
|
|
13
13
|
export type CheckboxPropOnChange = (checked: boolean, params: {
|
|
14
14
|
e: React.ChangeEvent<HTMLInputElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["React","useForkRef","cnMixFocus","cn","usePropsHandler","checkboxPropSize","checkboxPropSizeDefault","checkboxPropView","checkboxPropViewDefault","checkboxPropAlign","checkboxPropAlignDefault","checkboxPropOnChangeDefault","COMPONENT_NAME","cnCheckbox","Checkbox","forwardRef","props","ref","checkboxRef","useRef","checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps"],"sources":["../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import './Checkbox.css';\n\nimport React, { ChangeEventHandler } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const checkboxPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxPropSize = typeof checkboxPropSize[number];\nexport const checkboxPropSizeDefault: CheckboxPropSize = checkboxPropSize[0];\n\nexport const checkboxPropView = ['primary', 'ghost'] as const;\nexport type CheckboxPropView = typeof checkboxPropView[number];\nexport const checkboxPropViewDefault: CheckboxPropView = checkboxPropView[0];\n\nexport const checkboxPropAlign = ['center', 'top'] as const;\nexport type CheckboxPropAlign = typeof checkboxPropAlign[number];\nexport const checkboxPropAlignDefault: CheckboxPropAlign = checkboxPropAlign[0];\n\nexport type CheckboxPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nconst checkboxPropOnChangeDefault = () => {};\n\ntype Props = {\n checked: boolean | undefined;\n size?: CheckboxPropSize;\n view?: CheckboxPropView;\n align?: CheckboxPropAlign;\n disabled?: boolean;\n intermediate?: boolean;\n label?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type CheckboxProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const COMPONENT_NAME = 'Checkbox' as const;\nexport const cnCheckbox = cn(COMPONENT_NAME);\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const checkboxRef = React.useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = checkboxPropSizeDefault,\n view = checkboxPropViewDefault,\n align = checkboxPropAlignDefault,\n disabled,\n intermediate = false,\n className,\n label,\n onChange = checkboxPropOnChangeDefault,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, checkboxRef);\n\n return (\n <label\n {...otherProps}\n className={cnCheckbox({ size, view, disabled, intermediate, align }, [\n className,\n ])}\n ref={useForkRef([ref, checkboxRef])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnCheckbox('Input', [cnMixFocus()])}\n checked={checked}\n id={inputId}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnCheckbox('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"qRAAA,uBAEA,MAAOA,MAAP,KAA0C,OAA1C,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBAEA,OAASC,eAAT,2CAEA,MAAO,IAAMC,iBAAgB,CAAG,CAAC,GAAD,CAAM,IAAN,CA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AyBd,MACE,8CACMA,CADN,EAEE,SAAS,CAAEzB,UAAU,CAAC,CAAES,IAAI,CAAJA,CAAF,CAAQC,IAAI,CAAJA,CAAR,CAAcE,QAAQ,CAARA,CAAd,CAAwBC,YAAY,cAApC,CAAsCF,KAAK,CAALA,CAAtC,CAAD,CAAgD,CACnEG,CADmE,CAAhD,CAFvB,CAKE,GAAG,CAAE1B,UAAU,CAAC,CAACgB,CAAD,CAAMC,CAAN,CAAD,CALjB,GAOE,6BACE,IAAI,CAAC,UADP,CAEE,IAAI,CAAEG,CAFR,CAGE,SAAS,CAAER,UAAU,CAAC,OAAD,CAAU,CAACX,UAAU,EAAX,CAAV,CAHvB,CAIE,OAAO,cAJT,CAKE,EAAE,CAAEkC,CALN,CAME,QAAQ,CAAEX,CANZ,CAOE,QAAQ,CAAEI,CAPZ,CAQE,OAAO,CAAEC,CARX,CASE,MAAM,CAAEC,CATV,CAUE,QAAQ,CAAEC,CAVZ,CAWE,QAAQ,CAAEC,CAXZ,CAYE,IAAI,CAAEC,CAZR,CAaE,QAAQ,CAAEC,CAbZ,CAcE,GAAG,CAAEE,CAdP,EAPF,CAuBGT,CAAK,EAAI,4BAAM,SAAS,CAAEf,UAAU,CAAC,OAAD,CAA3B,EAAuCe,CAAvC,CAvBZ,CA0BH,CArDqB,CAAjB"}
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["React","useForkRef","cnMixFocus","cn","usePropsHandler","checkboxPropSize","checkboxPropSizeDefault","checkboxPropView","checkboxPropViewDefault","checkboxPropAlign","checkboxPropAlignDefault","checkboxPropOnChangeDefault","COMPONENT_NAME","cnCheckbox","Checkbox","forwardRef","props","ref","checkboxRef","useRef","checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps"],"sources":["../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import './Checkbox.css';\n\nimport React, { ChangeEventHandler } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const checkboxPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxPropSize = (typeof checkboxPropSize)[number];\nexport const checkboxPropSizeDefault: CheckboxPropSize = checkboxPropSize[0];\n\nexport const checkboxPropView = ['primary', 'ghost'] as const;\nexport type CheckboxPropView = (typeof checkboxPropView)[number];\nexport const checkboxPropViewDefault: CheckboxPropView = checkboxPropView[0];\n\nexport const checkboxPropAlign = ['center', 'top'] as const;\nexport type CheckboxPropAlign = (typeof checkboxPropAlign)[number];\nexport const checkboxPropAlignDefault: CheckboxPropAlign = checkboxPropAlign[0];\n\nexport type CheckboxPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nconst checkboxPropOnChangeDefault = () => {};\n\ntype Props = {\n checked: boolean | undefined;\n size?: CheckboxPropSize;\n view?: CheckboxPropView;\n align?: CheckboxPropAlign;\n disabled?: boolean;\n intermediate?: boolean;\n label?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type CheckboxProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const COMPONENT_NAME = 'Checkbox' as const;\nexport const cnCheckbox = cn(COMPONENT_NAME);\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const checkboxRef = React.useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = checkboxPropSizeDefault,\n view = checkboxPropViewDefault,\n align = checkboxPropAlignDefault,\n disabled,\n intermediate = false,\n className,\n label,\n onChange = checkboxPropOnChangeDefault,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, checkboxRef);\n\n return (\n <label\n {...otherProps}\n className={cnCheckbox({ size, view, disabled, intermediate, align }, [\n className,\n ])}\n ref={useForkRef([ref, checkboxRef])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnCheckbox('Input', [cnMixFocus()])}\n checked={checked}\n id={inputId}\n disabled={disabled}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnCheckbox('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"qRAAA,uBAEA,MAAOA,MAAP,KAA0C,OAA1C,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBAEA,OAASC,eAAT,2CAEA,MAAO,IAAMC,iBAAgB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAzB,CAEP,MAAO,IAAMC,wBAAyC,CAAGD,gBAAgB,CAAC,CAAD,CAAlE,CAEP,MAAO,IAAME,iBAAgB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAzB,CAEP,MAAO,IAAMC,wBAAyC,CAAGD,gBAAgB,CAAC,CAAD,CAAlE,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA1B,CAEP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CASP,GAAME,4BAA2B,CAAG,UAAM,CAAE,CAA5C,CA2BA,MAAO,IAAMC,eAAc,CAAG,UAAvB,CACP,MAAO,IAAMC,WAAU,CAAGV,EAAE,YAArB,C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CAAEX,CANZ,CAOE,QAAQ,CAAEI,CAPZ,CAQE,OAAO,CAAEC,CARX,CASE,MAAM,CAAEC,CATV,CAUE,QAAQ,CAAEC,CAVZ,CAWE,QAAQ,CAAEC,CAXZ,CAYE,IAAI,CAAEC,CAZR,CAaE,QAAQ,CAAEC,CAbZ,CAcE,GAAG,CAAEE,CAdP,EAPF,CAuBGT,CAAK,EAAI,4BAAM,SAAS,CAAEf,UAAU,CAAC,OAAD,CAA3B,EAAuCe,CAAvC,CAvBZ,CA0BH,CArDqB,CAAjB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
.deprecated--Checkbox{cursor:pointer;display:inline-flex;font-family:var(--font-sans);position:relative}.deprecated--Checkbox_size_xs{--checkbox-font-size:var(--control-text-size-xs);--checkbox-size:var(--control-box-size-s);--checkbox-offset:var(--space-xs);--checkbox-intermediate-width:calc(var(--space-xs) - var(--space-3xs));--checkbox-arrow-width:calc(var(--space-3xs)*3/4)}.deprecated--Checkbox_size_s{--checkbox-font-size:var(--control-text-size-s);--checkbox-size:calc(var(--control-box-size-s) + var(--space-3xs));--checkbox-offset:var(--space-xs);--checkbox-intermediate-width:var(--space-xs);--checkbox-arrow-width:calc(var(--space-3xs)*3/4)}.deprecated--Checkbox_size_m{--checkbox-font-size:var(--control-text-size-m);--checkbox-size:var(--control-box-size-m);--checkbox-offset:var(--space-xs);--checkbox-intermediate-width:calc(var(--space-s) - var(--space-3xs));--checkbox-arrow-width:var(--space-3xs)}.deprecated--Checkbox_size_l{--checkbox-font-size:var(--control-text-size-l);--checkbox-size:var(--control-box-size-l);--checkbox-offset:var(--space-s);--checkbox-intermediate-width:calc(var(--space-m) - var(--space-3xs));--checkbox-arrow-width:var(--space-3xs)}.deprecated--Checkbox_view_primary{--checkbox-checked-border:var(--color-control-bg-primary);--checkbox-checked-background:var(--color-control-bg-primary);--checkbox-checked-check:var(--color-control-typo-primary);--checkbox-checked-border-hover:var(--color-control-bg-primary-hover);--checkbox-checked-background-hover:var(
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
--color-control-bg-primary-hover
|
|
3
|
+
)}.deprecated--Checkbox_view_ghost{--checkbox-checked-border:var(--color-control-bg-border-default);--checkbox-checked-background:var(--color-control-bg-ghost);--checkbox-checked-check:var(--color-control-typo-ghost);--checkbox-checked-border-hover:var(--color-control-bg-border-default);--checkbox-checked-background-hover:var(--color-control-bg-ghost-hover)}.deprecated--Checkbox_intermediate .Checkbox-Input,.deprecated--Checkbox_intermediate .Checkbox-Input:checked,.deprecated--Checkbox_intermediate:hover .Checkbox-Input,.deprecated--Checkbox_intermediate:hover .Checkbox-Input:checked{background-color:var(--checkbox-checked-background);border-color:var(--checkbox-checked-border)}.deprecated--Checkbox_intermediate .Checkbox-Input:before,.deprecated--Checkbox_intermediate .Checkbox-Input:checked:before,.deprecated--Checkbox_intermediate:hover .Checkbox-Input:before,.deprecated--Checkbox_intermediate:hover .Checkbox-Input:checked:before{background-color:var(--checkbox-checked-check);border:none;height:var(--space-3xs);opacity:1;transform:rotate(0) translateY(-50%);transition:opacity .15s,transform .15s,background-color .08s .04s;width:var(--checkbox-intermediate-width)}.deprecated--Checkbox_disabled{pointer-events:none}.deprecated--Checkbox_disabled .Checkbox-Input:disabled{background-color:var(--color-control-bg-disable);border-color:transparent}.deprecated--Checkbox_disabled .Checkbox-Input:disabled:before{border-color:var(--color-control-typo-disable)}.deprecated--Checkbox_disabled.Checkbox_intermediate .Checkbox-Input:disabled:before{background-color:var(--color-control-typo-disable)}.deprecated--Checkbox_disabled .Checkbox-Input:disabled~.Checkbox-Label{color:var(--color-control-typo-disable)}.deprecated--Checkbox_align_center{align-items:center}.deprecated--Checkbox_align_top{align-items:start}.deprecated--Checkbox_align_top .Checkbox-Input{margin-top:var(--space-3xs)}.deprecated--Checkbox-Label{color:var(--color-control-typo-default);font-size:var(--checkbox-font-size);margin-left:var(--checkbox-offset)}.deprecated--Checkbox-Input{-webkit-appearance:none;background-color:transparent;border:var(--control-border-width) solid var(--color-control-bg-border-default);border-radius:var(--control-radius);box-sizing:border-box;cursor:pointer;flex-shrink:0;height:var(--checkbox-size);margin:0;max-width:var(--checkbox-size);padding:0;position:relative;transition:border-color .15s,background-color .15s;width:var(--checkbox-size)}.deprecated--Checkbox-Input:before{background-color:var(--color-control-bg-affect);border-bottom:var(--checkbox-arrow-width) solid var(--checkbox-checked-check);border-left:var(--checkbox-arrow-width) solid var(--checkbox-checked-check);box-sizing:border-box;content:"";height:calc(var(--checkbox-size)*.35);left:calc(var(--checkbox-size)/5 - 1.2px);opacity:0;position:absolute;top:calc(var(--checkbox-size)/2 - .5px);transform:rotate(-50deg) scaleX(0);transform-origin:0 0;transition:opacity .15s,transform .15s,background-color .08s;width:calc(var(--checkbox-size)*.6)}.deprecated--Checkbox-Input:checked{background-color:var(--checkbox-checked-background);border-color:var(--checkbox-checked-border)}.deprecated--Checkbox-Input:checked:before{opacity:1;transform:rotate(-50deg) scale(1)}.deprecated--Checkbox:hover .deprecated--Checkbox-Input{border-color:var(--color-control-bg-border-default-hover)}.deprecated--Checkbox:hover .deprecated--Checkbox-Input:checked{background-color:var(--checkbox-checked-background-hover);border-color:var(--checkbox-checked-border-hover)}
|
|
@@ -2,13 +2,13 @@ import './Checkbox.css';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
|
|
4
4
|
export declare const checkboxPropSize: readonly ["m", "xs", "s", "l"];
|
|
5
|
-
export type CheckboxPropSize = typeof checkboxPropSize[number];
|
|
5
|
+
export type CheckboxPropSize = (typeof checkboxPropSize)[number];
|
|
6
6
|
export declare const checkboxPropSizeDefault: CheckboxPropSize;
|
|
7
7
|
export declare const checkboxPropView: readonly ["primary", "ghost"];
|
|
8
|
-
export type CheckboxPropView = typeof checkboxPropView[number];
|
|
8
|
+
export type CheckboxPropView = (typeof checkboxPropView)[number];
|
|
9
9
|
export declare const checkboxPropViewDefault: CheckboxPropView;
|
|
10
10
|
export declare const checkboxPropAlign: readonly ["center", "top"];
|
|
11
|
-
export type CheckboxPropAlign = typeof checkboxPropAlign[number];
|
|
11
|
+
export type CheckboxPropAlign = (typeof checkboxPropAlign)[number];
|
|
12
12
|
export declare const checkboxPropAlignDefault: CheckboxPropAlign;
|
|
13
13
|
export type CheckboxPropOnChange = (checked: boolean, params: {
|
|
14
14
|
e: React.ChangeEvent<HTMLInputElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxDeprecated.js","names":["React","useForkRef","cnMixFocus","cnDeprecated","usePropsHandler","checkboxPropSize","checkboxPropSizeDefault","checkboxPropView","checkboxPropViewDefault","checkboxPropAlign","checkboxPropAlignDefault","COMPONENT_NAME","cnCheckbox","Checkbox","forwardRef","props","ref","checkboxRef","useRef","checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps","handleChange","e"],"sources":["../../../../../src/components/CheckboxDeprecated/CheckboxDeprecated.tsx"],"sourcesContent":["import './Checkbox.css';\n\nimport React, { ChangeEventHandler } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cnDeprecated } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const checkboxPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxPropSize = typeof checkboxPropSize[number];\nexport const checkboxPropSizeDefault: CheckboxPropSize = checkboxPropSize[0];\n\nexport const checkboxPropView = ['primary', 'ghost'] as const;\nexport type CheckboxPropView = typeof checkboxPropView[number];\nexport const checkboxPropViewDefault: CheckboxPropView = checkboxPropView[0];\n\nexport const checkboxPropAlign = ['center', 'top'] as const;\nexport type CheckboxPropAlign = typeof checkboxPropAlign[number];\nexport const checkboxPropAlignDefault: CheckboxPropAlign = checkboxPropAlign[0];\n\nexport type CheckboxPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\ntype Props = {\n checked: boolean | undefined;\n size?: CheckboxPropSize;\n view?: CheckboxPropView;\n align?: CheckboxPropAlign;\n disabled?: boolean;\n intermediate?: boolean;\n label?: string;\n onChange?: CheckboxPropOnChange;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type CheckboxProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const COMPONENT_NAME = 'Checkbox' as const;\nexport const cnCheckbox = cnDeprecated(COMPONENT_NAME);\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const checkboxRef = React.useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = checkboxPropSizeDefault,\n view = checkboxPropViewDefault,\n align = checkboxPropAlignDefault,\n disabled,\n intermediate = false,\n className,\n label,\n onChange,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, checkboxRef);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n if (onChange) {\n onChange(!checked, { e });\n }\n };\n\n return (\n <label\n {...otherProps}\n className={cnCheckbox({ size, view, disabled, intermediate, align }, [\n className,\n ])}\n ref={useForkRef([ref, checkboxRef])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnCheckbox('Input', [cnMixFocus()])}\n checked={checked}\n id={inputId}\n disabled={disabled}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\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sHandler","checkboxPropSize","checkboxPropSizeDefault","checkboxPropView","checkboxPropViewDefault","checkboxPropAlign","checkboxPropAlignDefault","COMPONENT_NAME","cnCheckbox","Checkbox","forwardRef","props","ref","checkboxRef","useRef","checked","name","size","view","align","disabled","intermediate","className","label","onChange","onFocus","onBlur","readOnly","required","step","tabIndex","inputId","inputRef","otherProps","handleChange","e"],"sources":["../../../../../src/components/CheckboxDeprecated/CheckboxDeprecated.tsx"],"sourcesContent":["import './Checkbox.css';\n\nimport React, { ChangeEventHandler } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cnDeprecated } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const checkboxPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxPropSize = (typeof checkboxPropSize)[number];\nexport const checkboxPropSizeDefault: CheckboxPropSize = checkboxPropSize[0];\n\nexport const checkboxPropView = ['primary', 'ghost'] as const;\nexport type CheckboxPropView = (typeof checkboxPropView)[number];\nexport const checkboxPropViewDefault: CheckboxPropView = checkboxPropView[0];\n\nexport const checkboxPropAlign = ['center', 'top'] as const;\nexport type CheckboxPropAlign = (typeof checkboxPropAlign)[number];\nexport const checkboxPropAlignDefault: CheckboxPropAlign = checkboxPropAlign[0];\n\nexport type CheckboxPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\ntype Props = {\n checked: boolean | undefined;\n size?: CheckboxPropSize;\n view?: CheckboxPropView;\n align?: CheckboxPropAlign;\n disabled?: boolean;\n intermediate?: boolean;\n label?: string;\n onChange?: CheckboxPropOnChange;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n for?: string;\n inputId?: string;\n};\n\nexport type CheckboxProps = PropsWithHTMLAttributes<Props, HTMLLabelElement>;\n\nexport const COMPONENT_NAME = 'Checkbox' as const;\nexport const cnCheckbox = cnDeprecated(COMPONENT_NAME);\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const checkboxRef = React.useRef<HTMLLabelElement>(null);\n\n const {\n checked = false,\n name,\n size = checkboxPropSizeDefault,\n view = checkboxPropViewDefault,\n align = checkboxPropAlignDefault,\n disabled,\n intermediate = false,\n className,\n label,\n onChange,\n onFocus,\n onBlur,\n readOnly,\n required,\n step,\n tabIndex,\n inputId,\n inputRef,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, checkboxRef);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n if (onChange) {\n onChange(!checked, { e });\n }\n };\n\n return (\n <label\n {...otherProps}\n className={cnCheckbox({ size, view, disabled, intermediate, align }, [\n className,\n ])}\n ref={useForkRef([ref, checkboxRef])}\n >\n <input\n type=\"checkbox\"\n name={name}\n className={cnCheckbox('Input', [cnMixFocus()])}\n checked={checked}\n id={inputId}\n disabled={disabled}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n readOnly={readOnly}\n required={required}\n step={step}\n tabIndex={tabIndex}\n ref={inputRef}\n />\n {label && <span className={cnCheckbox('Label')}>{label}</span>}\n </label>\n );\n },\n);\n"],"mappings":"qRAAA,uBAEA,MAAOA,MAAP,KAA0C,OAA1C,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,YAAT,uBAEA,OAASC,eAAT,2CAEA,MAAO,IAAMC,iBAAgB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAzB,CAEP,MAAO,IAAMC,wBAAyC,CAAGD,gBAAgB,CAAC,CAAD,CAAl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AAY,cAApC,CAAsCF,KAAK,CAALA,CAAtC,CAAD,CAAgD,CACnEG,CADmE,CAAhD,CAFvB,CAKE,GAAG,CAAEzB,UAAU,CAAC,CAACe,CAAD,CAAMC,CAAN,CAAD,CALjB,GAOE,6BACE,IAAI,CAAC,UADP,CAEE,IAAI,CAAEG,CAFR,CAGE,SAAS,CAAER,UAAU,CAAC,OAAD,CAAU,CAACV,UAAU,EAAX,CAAV,CAHvB,CAIE,OAAO,CAAEiB,CAJX,CAKE,EAAE,CAAEgB,CALN,CAME,QAAQ,CAAEX,CANZ,CAOE,QAAQ,CArB6C,QAArDc,aAAqD,CAACC,CAAD,CAAO,CAC5DX,CAD4D,EAE9DA,CAAQ,CAAC,CAACT,CAAF,CAAW,CAAEoB,CAAC,CAADA,CAAF,CAAX,CAEX,CAUG,CAQE,OAAO,CAAEV,CARX,CASE,MAAM,CAAEC,CATV,CAUE,QAAQ,CAAEC,CAVZ,CAWE,QAAQ,CAAEC,CAXZ,CAYE,IAAI,CAAEC,CAZR,CAaE,QAAQ,CAAEC,CAbZ,CAcE,GAAG,CAAEE,CAdP,EAPF,CAuBGT,CAAK,EAAI,4BAAM,SAAS,CAAEf,UAAU,CAAC,OAAD,CAA3B,EAAuCe,CAAvC,CAvBZ,CA0BH,CA3DqB,CAAjB"}
|
|
@@ -9,16 +9,16 @@ export type CheckboxGroupDefaultItem = {
|
|
|
9
9
|
ref?: React.RefObject<HTMLLabelElement>;
|
|
10
10
|
};
|
|
11
11
|
export declare const checkboxGroupPropDirections: readonly ["column", "row"];
|
|
12
|
-
export type CheckboxGroupPropDirection = typeof checkboxGroupPropDirections[number];
|
|
12
|
+
export type CheckboxGroupPropDirection = (typeof checkboxGroupPropDirections)[number];
|
|
13
13
|
export declare const checkboxGroupDefaultDirection: CheckboxGroupPropDirection;
|
|
14
14
|
export declare const checkboxGroupPropSizes: readonly ["m", "xs", "s", "l"];
|
|
15
|
-
export type CheckboxGroupPropSize = typeof checkboxGroupPropSizes[number];
|
|
15
|
+
export type CheckboxGroupPropSize = (typeof checkboxGroupPropSizes)[number];
|
|
16
16
|
export declare const checkboxGroupDefaultSize: CheckboxGroupPropSize;
|
|
17
17
|
export declare const checkboxGroupPropViews: readonly ["primary", "ghost"];
|
|
18
|
-
export type CheckboxGroupPropView = typeof checkboxGroupPropViews[number];
|
|
18
|
+
export type CheckboxGroupPropView = (typeof checkboxGroupPropViews)[number];
|
|
19
19
|
export declare const checkboxGroupDefaultView: CheckboxGroupPropView;
|
|
20
20
|
export declare const checkboxGroupPropAlign: readonly ["center", "top"];
|
|
21
|
-
export type CheckboxGroupPropAlign = typeof checkboxGroupPropAlign[number];
|
|
21
|
+
export type CheckboxGroupPropAlign = (typeof checkboxGroupPropAlign)[number];
|
|
22
22
|
export declare const checkboxGroupDefaultAlign: CheckboxGroupPropAlign;
|
|
23
23
|
export type CheckboxGroupPropGetItemKey<ITEM> = (item: ITEM) => string | number | undefined;
|
|
24
24
|
export type CheckboxGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["checkboxGroupPropDirections","checkboxGroupDefaultDirection","checkboxGroupPropSizes","checkboxGroupDefaultSize","checkboxGroupPropViews","checkboxGroupDefaultView","checkboxGroupPropAlign","checkboxGroupDefaultAlign"],"sources":["../../../../../src/components/CheckboxGroup/types.ts"],"sourcesContent":["import React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\ntype CheckboxGroupPropAttributes = Omit<\n JSX.IntrinsicElements['label'],\n 'ref' | 'onChange' | 'onFocus' | 'children' | 'onBlur'\n>;\n\nexport type CheckboxGroupDefaultItem = {\n key?: string | number;\n label: string;\n disabled?: boolean;\n attributes?: CheckboxGroupPropAttributes;\n ref?: React.RefObject<HTMLLabelElement>;\n};\n\nexport const checkboxGroupPropDirections = ['column', 'row'] as const;\nexport type CheckboxGroupPropDirection =\n typeof checkboxGroupPropDirections[number];\nexport const checkboxGroupDefaultDirection: CheckboxGroupPropDirection =\n checkboxGroupPropDirections[0];\n\nexport const checkboxGroupPropSizes = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxGroupPropSize = typeof checkboxGroupPropSizes[number];\nexport const checkboxGroupDefaultSize: CheckboxGroupPropSize =\n checkboxGroupPropSizes[0];\n\nexport const checkboxGroupPropViews = ['primary', 'ghost'] as const;\nexport type CheckboxGroupPropView = typeof checkboxGroupPropViews[number];\nexport const checkboxGroupDefaultView: CheckboxGroupPropView =\n checkboxGroupPropViews[0];\n\nexport const checkboxGroupPropAlign = ['center', 'top'] as const;\nexport type CheckboxGroupPropAlign = typeof checkboxGroupPropAlign[number];\nexport const checkboxGroupDefaultAlign: CheckboxGroupPropAlign =\n checkboxGroupPropAlign[0];\n\nexport type CheckboxGroupPropGetItemKey<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type CheckboxGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type CheckboxGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type CheckboxGroupPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => CheckboxGroupPropAttributes | undefined;\nexport type CheckboxGroupPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLLabelElement> | undefined;\n\nexport type CheckboxGroupPropOnChange<ITEM> = (\n value: ITEM[] | null,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type CheckboxGroupProps<ITEM = CheckboxGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n value?: ITEM[] | null;\n items: ITEM[];\n getItemKey?: CheckboxGroupPropGetItemKey<ITEM>;\n getItemLabel?: CheckboxGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: CheckboxGroupPropGetItemDisabled<ITEM>;\n getItemAttributes?: CheckboxGroupPropGetItemAttributes<ITEM>;\n getItemRef?: CheckboxGroupPropGetItemRef<ITEM>;\n onChange?: CheckboxGroupPropOnChange<ITEM>;\n name?: string;\n direction?: CheckboxGroupPropDirection;\n align?: CheckboxGroupPropAlign;\n size?: CheckboxGroupPropSize;\n view?: CheckboxGroupPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: CheckboxGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: CheckboxGroupPropGetItemLabel<ITEM>;\n });\n\nexport type CheckboxGroupComponent = <ITEM = CheckboxGroupDefaultItem>(\n props: CheckboxGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAiBA,MAAO,IAAMA,4BAA2B,CAAG,CAAC,QAAD,CAAW,KAAX,CAApC,CAGP,MAAO,IAAMC,8BAAyD,CACpED,2BAA2B,CAAC,CAAD,CADtB,CAGP,MAAO,IAAME,uBAAsB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA/B,CAEP,MAAO,IAAMC,yBAA+C,CAC1DD,sBAAsB,CAAC,CAAD,CADjB,CAGP,MAAO,IAAME,uBAAsB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAA/B,CAEP,MAAO,IAAMC,yBAA+C,CAC1DD,sBAAsB,CAAC,CAAD,CADjB,CAGP,MAAO,IAAME,uBAAsB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA/B,CAEP,MAAO,IAAMC,0BAAiD,CAC5DD,sBAAsB,CAAC,CAAD,CADjB"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["checkboxGroupPropDirections","checkboxGroupDefaultDirection","checkboxGroupPropSizes","checkboxGroupDefaultSize","checkboxGroupPropViews","checkboxGroupDefaultView","checkboxGroupPropAlign","checkboxGroupDefaultAlign"],"sources":["../../../../../src/components/CheckboxGroup/types.ts"],"sourcesContent":["import React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\ntype CheckboxGroupPropAttributes = Omit<\n JSX.IntrinsicElements['label'],\n 'ref' | 'onChange' | 'onFocus' | 'children' | 'onBlur'\n>;\n\nexport type CheckboxGroupDefaultItem = {\n key?: string | number;\n label: string;\n disabled?: boolean;\n attributes?: CheckboxGroupPropAttributes;\n ref?: React.RefObject<HTMLLabelElement>;\n};\n\nexport const checkboxGroupPropDirections = ['column', 'row'] as const;\nexport type CheckboxGroupPropDirection =\n (typeof checkboxGroupPropDirections)[number];\nexport const checkboxGroupDefaultDirection: CheckboxGroupPropDirection =\n checkboxGroupPropDirections[0];\n\nexport const checkboxGroupPropSizes = ['m', 'xs', 's', 'l'] as const;\nexport type CheckboxGroupPropSize = (typeof checkboxGroupPropSizes)[number];\nexport const checkboxGroupDefaultSize: CheckboxGroupPropSize =\n checkboxGroupPropSizes[0];\n\nexport const checkboxGroupPropViews = ['primary', 'ghost'] as const;\nexport type CheckboxGroupPropView = (typeof checkboxGroupPropViews)[number];\nexport const checkboxGroupDefaultView: CheckboxGroupPropView =\n checkboxGroupPropViews[0];\n\nexport const checkboxGroupPropAlign = ['center', 'top'] as const;\nexport type CheckboxGroupPropAlign = (typeof checkboxGroupPropAlign)[number];\nexport const checkboxGroupDefaultAlign: CheckboxGroupPropAlign =\n checkboxGroupPropAlign[0];\n\nexport type CheckboxGroupPropGetItemKey<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type CheckboxGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type CheckboxGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type CheckboxGroupPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => CheckboxGroupPropAttributes | undefined;\nexport type CheckboxGroupPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLLabelElement> | undefined;\n\nexport type CheckboxGroupPropOnChange<ITEM> = (\n value: ITEM[] | null,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type CheckboxGroupProps<ITEM = CheckboxGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n value?: ITEM[] | null;\n items: ITEM[];\n getItemKey?: CheckboxGroupPropGetItemKey<ITEM>;\n getItemLabel?: CheckboxGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: CheckboxGroupPropGetItemDisabled<ITEM>;\n getItemAttributes?: CheckboxGroupPropGetItemAttributes<ITEM>;\n getItemRef?: CheckboxGroupPropGetItemRef<ITEM>;\n onChange?: CheckboxGroupPropOnChange<ITEM>;\n name?: string;\n direction?: CheckboxGroupPropDirection;\n align?: CheckboxGroupPropAlign;\n size?: CheckboxGroupPropSize;\n view?: CheckboxGroupPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: CheckboxGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: CheckboxGroupPropGetItemLabel<ITEM>;\n });\n\nexport type CheckboxGroupComponent = <ITEM = CheckboxGroupDefaultItem>(\n props: CheckboxGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAiBA,MAAO,IAAMA,4BAA2B,CAAG,CAAC,QAAD,CAAW,KAAX,CAApC,CAGP,MAAO,IAAMC,8BAAyD,CACpED,2BAA2B,CAAC,CAAD,CADtB,CAGP,MAAO,IAAME,uBAAsB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA/B,CAEP,MAAO,IAAMC,yBAA+C,CAC1DD,sBAAsB,CAAC,CAAD,CADjB,CAGP,MAAO,IAAME,uBAAsB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAA/B,CAEP,MAAO,IAAMC,yBAA+C,CAC1DD,sBAAsB,CAAC,CAAD,CADjB,CAGP,MAAO,IAAME,uBAAsB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA/B,CAEP,MAAO,IAAMC,0BAAiD,CAC5DD,sBAAsB,CAAC,CAAD,CADjB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
.ChipsItem{--chip-bg-color:var(--color-control-bg-ghost);--chip-bg-color-hover:var(--color-control-bg-ghost-hover);--chip-color:var(--color-control-typo-ghost);--chip-color-hover:var(--color-control-typo-ghost-hover);--chip-border:transparent;--chip-border-hover:transparent;align-items:center;background-color:var(--chip-bg-color);border:var(--control-border-width) solid var(--chip-border);border-radius:99rem;box-sizing:border-box;color:var(--chip-color);display:inline-flex;font-family:inherit;font-size:var(--chip-text-size);gap:calc(var(--chip-space)/2);height:var(--chip-height);justify-content:center;padding:0 var(--chip-space);text-decoration:none;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;white-space:nowrap}.ChipsItem_status{padding:0 var(--chip-space) 0 calc(var(--chip-height)/2 - var(--chip-badge-size)/2)}.ChipsItem_interactive{cursor:pointer}.ChipsItem_interactive:hover{background-color:var(--chip-bg-color-hover);border:var(--control-border-width) solid var(--chip-border-hover);color:var(--chip-color-hover)}.ChipsItem_size_xs{--chip-height:var(--control-height-xs);--chip-text-size:var(--control-text-size-xs);--chip-space:var(--space-xs);--chip-badge-size:10px}.ChipsItem_size_s{--chip-height:var(--control-height-s);--chip-text-size:var(--control-text-size-s);--chip-space:var(--space-s);--chip-badge-size:16px}.ChipsItem_size_m{--chip-height:var(--control-height-m);--chip-text-size:var(--control-text-size-m);--chip-space:var(--space-m);--chip-badge-size:16px}.ChipsItem_size_l{--chip-height:var(--control-height-l);--chip-text-size:var(--control-text-size-l);--chip-space:var(--space-l);--chip-badge-size:24px}.ChipsItem_activeView_primary{--chip-active-bg-color:var(--color-control-bg-primary);--chip-active-bg-color-hover:var(--color-control-bg-primary-hover);--chip-active-color:var(--color-control-typo-primary);--chip-active-color-hover:var(--color-control-typo-primary-hover);--chip-active-border:transparent;--chip-active-border-hover:transparent;--chip-active-disabled-bg-color:var(--color-control-bg-secondary);--chip-active-disabled-color:var(--color-control-typo-disable);--chip-active-disabled-border:var(--color-control-typo-disable)}.ChipsItem_activeView_secondary{--chip-active-bg-color:var(--color-control-bg-secondary);--chip-active-bg-color-hover:var(--color-control-bg-clear);--chip-active-color:var(--color-control-typo-secondary);--chip-active-color-hover:var(--color-control-typo-secondary-hover);--chip-active-border:var(--color-control-bg-border-secondary);--chip-active-border-hover:var(
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
--color-control-bg-border-secondary-hover
|
|
3
|
+
);--chip-active-disabled-bg-color:var(--color-control-bg-secondary);--chip-active-disabled-color:var(--color-control-typo-disable);--chip-active-disabled-border:var(--color-control-typo-disable)}.ChipsItem_disabled{--chip-bg-color:var(--color-control-bg-disable);--chip-bg-color-hover:none;--chip-color:var(--color-control-typo-disable);--chip-color-hover:none;--chip-border:transparent;--chip-border-hover:none}.ChipsItem_active{--chip-bg-color:var(--chip-active-bg-color);--chip-bg-color-hover:var(--chip-active-bg-color-hover);--chip-color:var(--chip-active-color);--chip-color-hover:var(--chip-active-color-hover);--chip-border:var(--chip-active-border);--chip-border-hover:var(--chip-active-border-hover)}.ChipsItem_disabled.ChipsItem_active{--chip-bg-color:var(--chip-active-disabled-bg-color);--chip-bg-color-hover:none;--chip-color:var(--chip-active-disabled-color);--chip-color-hover:none;--chip-border:var(--chip-active-disabled-border);--chip-border-hover:none}.ChipsItem-IconButton{background-color:transparent;border:transparent;border-radius:var(--control-radius);color:inherit;cursor:pointer;padding:0}
|
|
@@ -3,10 +3,10 @@ import { BadgePropStatus } from '../Badge';
|
|
|
3
3
|
import { AsAttributes, AsTags } from '../../utils/types/AsTags';
|
|
4
4
|
import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
|
|
5
5
|
export declare const chipsPropSize: readonly ["xs", "s", "m", "l"];
|
|
6
|
-
export type ChipsPropSize = typeof chipsPropSize[number];
|
|
6
|
+
export type ChipsPropSize = (typeof chipsPropSize)[number];
|
|
7
7
|
export declare const chipsPropSizeDefault: ChipsPropSize;
|
|
8
8
|
export declare const chipsPropActiveView: readonly ["primary", "secondary"];
|
|
9
|
-
export type ChipsPropActiveView = typeof chipsPropActiveView[number];
|
|
9
|
+
export type ChipsPropActiveView = (typeof chipsPropActiveView)[number];
|
|
10
10
|
export declare const chipsPropActiveViewDefault: ChipsPropActiveView;
|
|
11
11
|
export type ChipsPropStatus = BadgePropStatus;
|
|
12
12
|
export type ChipsItemProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["chipsPropSize","chipsPropSizeDefault","chipsPropActiveView","chipsPropActiveViewDefault"],"sources":["../../../../../src/components/Chips/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nimport { BadgePropStatus } from '##/components/Badge';\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const chipsPropSize = ['xs', 's', 'm', 'l'] as const;\nexport type ChipsPropSize = typeof chipsPropSize[number];\nexport const chipsPropSizeDefault: ChipsPropSize = 'm';\n\nexport const chipsPropActiveView = ['primary', 'secondary'] as const;\nexport type ChipsPropActiveView = typeof chipsPropActiveView[number];\nexport const chipsPropActiveViewDefault: ChipsPropActiveView = 'primary';\n\nexport type ChipsPropStatus = BadgePropStatus;\n\nexport type ChipsItemProps = {\n size?: ChipsPropSize;\n activeView?: ChipsPropActiveView;\n interactive?: boolean;\n onRightIconClick?: React.MouseEventHandler<HTMLButtonElement>;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n /**\n * \"error\" deprecated since version 5.13.0 use \"alert\"\n */\n status?: ChipsPropStatus;\n label: string;\n active?: boolean;\n disabled?: boolean;\n};\n\nexport type ChipsDefaultItem = Omit<\n ChipsItemProps,\n 'size' | 'activeView' | 'interactive' | 'onRightIconClick'\n> & {\n attributes?: Omit<AsAttributes, 'children' | 'ref'>;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n};\n\n// export type ChipsPropGetItemKey<ITEM> = (item: ITEM) => ChipsDefaultItem['key'];\nexport type ChipsPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['status'];\nexport type ChipsPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['label'];\nexport type ChipsPropGetItemIconLeft<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['iconLeft'];\nexport type ChipsPropGetItemIconRight<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['iconRight'];\nexport type ChipsPropGetItemRef<ITEM> = (item: ITEM) => ChipsDefaultItem['ref'];\nexport type ChipsPropGetItemAs<ITEM> = (item: ITEM) => ChipsDefaultItem['as'];\nexport type ChipsPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['attributes'];\nexport type ChipsPropGetItemActive<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['active'];\nexport type ChipsPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['disabled'];\nexport type ChipsPropOnItemClick<ITEM> = (\n item: ITEM,\n props: { e: React.MouseEvent },\n) => void;\nexport type ChipsPropItemOnRightIconClick<ITEM> = (\n item: ITEM,\n props: { e: React.MouseEvent },\n) => void;\n\nexport type ChipsProps<ITEM = ChipsDefaultItem> = PropsWithHTMLAttributesAndRef<\n {\n size?: ChipsPropSize;\n activeView?: ChipsPropActiveView;\n items: ITEM[];\n interactive?: boolean;\n disabled?: boolean;\n /**\n * \"error\" deprecated since version 5.13.0 use \"alert\"\n */\n getItemStatus?: ChipsPropGetItemStatus<ITEM>;\n getItemLabel?: ChipsPropGetItemLabel<ITEM>;\n getItemIconLeft?: ChipsPropGetItemIconLeft<ITEM>;\n getItemIconRight?: ChipsPropGetItemIconRight<ITEM>;\n getItemRef?: ChipsPropGetItemRef<ITEM>;\n getItemAs?: ChipsPropGetItemAs<ITEM>;\n getItemAttributes?: ChipsPropGetItemAttributes<ITEM>;\n getItemActive?: ChipsPropGetItemActive<ITEM>;\n getItemDisabled?: ChipsPropGetItemDisabled<ITEM>;\n onItemClick?: ChipsPropOnItemClick<ITEM>;\n onItemRightIconClick?: ChipsPropItemOnRightIconClick<ITEM>;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: string }\n ? {}\n : {\n getItemLabel: ChipsPropGetItemLabel<ITEM>;\n });\n\nexport type ChipsComponent = <ITEM = ChipsDefaultItem>(\n props: ChipsProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAMA,MAAO,IAAMA,cAAa,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAG,GAA5C,CAEP,MAAO,IAAMC,oBAAmB,CAAG,CAAC,SAAD,CAAY,WAAZ,CAA5B,CAEP,MAAO,IAAMC,2BAA+C,CAAG,SAAxD"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["chipsPropSize","chipsPropSizeDefault","chipsPropActiveView","chipsPropActiveViewDefault"],"sources":["../../../../../src/components/Chips/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nimport { BadgePropStatus } from '##/components/Badge';\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const chipsPropSize = ['xs', 's', 'm', 'l'] as const;\nexport type ChipsPropSize = (typeof chipsPropSize)[number];\nexport const chipsPropSizeDefault: ChipsPropSize = 'm';\n\nexport const chipsPropActiveView = ['primary', 'secondary'] as const;\nexport type ChipsPropActiveView = (typeof chipsPropActiveView)[number];\nexport const chipsPropActiveViewDefault: ChipsPropActiveView = 'primary';\n\nexport type ChipsPropStatus = BadgePropStatus;\n\nexport type ChipsItemProps = {\n size?: ChipsPropSize;\n activeView?: ChipsPropActiveView;\n interactive?: boolean;\n onRightIconClick?: React.MouseEventHandler<HTMLButtonElement>;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n /**\n * \"error\" deprecated since version 5.13.0 use \"alert\"\n */\n status?: ChipsPropStatus;\n label: string;\n active?: boolean;\n disabled?: boolean;\n};\n\nexport type ChipsDefaultItem = Omit<\n ChipsItemProps,\n 'size' | 'activeView' | 'interactive' | 'onRightIconClick'\n> & {\n attributes?: Omit<AsAttributes, 'children' | 'ref'>;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n};\n\n// export type ChipsPropGetItemKey<ITEM> = (item: ITEM) => ChipsDefaultItem['key'];\nexport type ChipsPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['status'];\nexport type ChipsPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['label'];\nexport type ChipsPropGetItemIconLeft<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['iconLeft'];\nexport type ChipsPropGetItemIconRight<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['iconRight'];\nexport type ChipsPropGetItemRef<ITEM> = (item: ITEM) => ChipsDefaultItem['ref'];\nexport type ChipsPropGetItemAs<ITEM> = (item: ITEM) => ChipsDefaultItem['as'];\nexport type ChipsPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['attributes'];\nexport type ChipsPropGetItemActive<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['active'];\nexport type ChipsPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => ChipsDefaultItem['disabled'];\nexport type ChipsPropOnItemClick<ITEM> = (\n item: ITEM,\n props: { e: React.MouseEvent },\n) => void;\nexport type ChipsPropItemOnRightIconClick<ITEM> = (\n item: ITEM,\n props: { e: React.MouseEvent },\n) => void;\n\nexport type ChipsProps<ITEM = ChipsDefaultItem> = PropsWithHTMLAttributesAndRef<\n {\n size?: ChipsPropSize;\n activeView?: ChipsPropActiveView;\n items: ITEM[];\n interactive?: boolean;\n disabled?: boolean;\n /**\n * \"error\" deprecated since version 5.13.0 use \"alert\"\n */\n getItemStatus?: ChipsPropGetItemStatus<ITEM>;\n getItemLabel?: ChipsPropGetItemLabel<ITEM>;\n getItemIconLeft?: ChipsPropGetItemIconLeft<ITEM>;\n getItemIconRight?: ChipsPropGetItemIconRight<ITEM>;\n getItemRef?: ChipsPropGetItemRef<ITEM>;\n getItemAs?: ChipsPropGetItemAs<ITEM>;\n getItemAttributes?: ChipsPropGetItemAttributes<ITEM>;\n getItemActive?: ChipsPropGetItemActive<ITEM>;\n getItemDisabled?: ChipsPropGetItemDisabled<ITEM>;\n onItemClick?: ChipsPropOnItemClick<ITEM>;\n onItemRightIconClick?: ChipsPropItemOnRightIconClick<ITEM>;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: string }\n ? {}\n : {\n getItemLabel: ChipsPropGetItemLabel<ITEM>;\n });\n\nexport type ChipsComponent = <ITEM = ChipsDefaultItem>(\n props: ChipsProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAMA,MAAO,IAAMA,cAAa,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAG,GAA5C,CAEP,MAAO,IAAMC,oBAAmB,CAAG,CAAC,SAAD,CAAY,WAAZ,CAA5B,CAEP,MAAO,IAAMC,2BAA+C,CAAG,SAAxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceGroup.js","names":["React","forwardRef","useChoiceGroup","cn","getByMap","withDefaultGetters","ChoiceGroupItem","choiceGroupDefaultForm","choiceGroupDefaultSize","choiceGroupDefaultView","choiceGroupWidthDefault","sizeMap","xs","s","m","l","cnChoiceGroup","ChoiceGroupRender","props","ref","size","form","view","width","onlyIcon","iconSizeProp","iconSize","value","multiple","items","getItemLabel","onChange","getItemIcon","getItemAttributes","getItemRef","getItemDisabled","name","className","disabled","truncate","otherProps","getKey","callBack","getOnChange","getChecked","map","item","index","itemChecked","itemDisabled","attributes","label","toString","checked","ChoiceGroup"],"sources":["../../../../../src/components/ChoiceGroup/ChoiceGroup.tsx"],"sourcesContent":["import './ChoiceGroup.css';\n\nimport { IconPropSize } from '@consta/icons/Icon';\nimport React, { forwardRef } from 'react';\n\nimport { useChoiceGroup } from '##/hooks/useChoiceGroup';\nimport { cn } from '##/utils/bem';\nimport { getByMap } from '##/utils/getByMap';\n\nimport { withDefaultGetters } from './helper';\nimport { ChoiceGroupItem } from './Item/ChoiceGroup-Item';\nimport {\n ChoiceGroupComponent,\n choiceGroupDefaultForm,\n choiceGroupDefaultSize,\n choiceGroupDefaultView,\n ChoiceGroupPropOnChange,\n ChoiceGroupProps,\n ChoiceGroupPropSize,\n choiceGroupWidthDefault,\n} from './types';\n\nconst sizeMap: Record<ChoiceGroupPropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nexport const cnChoiceGroup = cn('ChoiceGroup');\n\nconst ChoiceGroupRender = (\n props: ChoiceGroupProps,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n size = choiceGroupDefaultSize,\n form = choiceGroupDefaultForm,\n view = choiceGroupDefaultView,\n width = choiceGroupWidthDefault,\n onlyIcon,\n iconSize: iconSizeProp,\n value = null,\n multiple = false,\n items,\n getItemLabel,\n onChange,\n getItemIcon,\n getItemAttributes,\n getItemRef,\n getItemDisabled,\n name,\n className,\n disabled = false,\n truncate,\n ...otherProps\n } = withDefaultGetters(props);\n\n type Item = typeof items[number];\n\n const { getOnChange, getChecked } = useChoiceGroup<\n Item,\n React.ChangeEvent<HTMLInputElement>\n >({\n value: value as Item,\n getKey: getItemLabel,\n callBack: onChange as ChoiceGroupPropOnChange<Item, false>,\n multiple: multiple as false,\n // привел к типам из-за того что\n // TS не понимает что параметры для не Multiple и Multiple не могут прийти одновременно\n });\n\n const iconSize = getByMap(sizeMap, size, iconSizeProp);\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnChoiceGroup(\n { size, form, view, width, onlyIcon, disabled, truncate },\n [className],\n )}\n >\n {items.map((item, index) => {\n const itemChecked = getChecked(item);\n const itemDisabled = getItemDisabled?.(item);\n const attributes = getItemAttributes(item) ?? {};\n const label = getItemLabel(item).toString();\n\n return (\n <React.Fragment key={label}>\n {index > 0 && (\n <div\n className={cnChoiceGroup('Divider', {\n checked: itemChecked,\n disabled: itemDisabled,\n })}\n />\n )}\n <ChoiceGroupItem\n onChange={!itemDisabled ? getOnChange(item) : undefined}\n checked={itemChecked}\n label={label}\n icon={getItemIcon && getItemIcon(item)}\n iconSize={iconSize}\n multiple={multiple}\n onlyIcon={onlyIcon}\n ref={getItemRef(item)}\n name={name}\n disabled={disabled || itemDisabled}\n title={onlyIcon || truncate ? label : undefined}\n {...attributes}\n />\n </React.Fragment>\n );\n })}\n </div>\n );\n};\n\nexport const ChoiceGroup = forwardRef(\n ChoiceGroupRender,\n) as ChoiceGroupComponent;\n\nexport * from './types';\n"],"mappings":"uTAAA,0BAGA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,cAAT,kCACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BAEA,OAASC,kBAAT,gBACA,OAASC,eAAT,+BACA,OAEEC,sBAFF,CAGEC,sBAHF,CAIEC,sBAJF,CAQEC,uBARF,eAWA,GAAMC,QAAkD,CAAG,CACzDC,EAAE,CAAE,IADqD,CAEzDC,CAAC,CAAE,IAFsD,CAGzDC,CAAC,CAAE,GAHsD,CAIzDC,CAAC,CAAE,GAJsD,CAA3D,CAOA,MAAO,IAAMC,cAAa,CAAGb,EAAE,CAAC,aAAD,CAAxB,CAEP,GAAMc,kBAAiB,CAAG,SACxBC,CADwB,CAExBC,CAFwB,CAGrB,OAsBCd,kBAAkB,CAACa,CAAD,CAtBnB,KAEDE,IAFC,CAEDA,CAFC,YAEMZ,sBAFN,OAGDa,IAHC,CAGDA,CAHC,YAGMd,sBAHN,OAIDe,IAJC,CAIDA,CAJC,YAIMb,sBAJN,OAKDc,KALC,CAKDA,CALC,YAKOb,uBALP,GAMDc,CANC,GAMDA,QANC,CAOSC,CAPT,GAODC,QAPC,KAQDC,KARC,CAQDA,CARC,YAQO,IARP,OASDC,QATC,CASDA,CATC,eAUDC,CAVC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AAnB,EAJY,CAM1B,MACE,qBAAC,KAAD,CAAO,QAAP,EAAgB,GAAG,CAAED,CAArB,EACW,CAAR,CAAAJ,CAAK,EACJ,2BACE,SAAS,CAAE/B,aAAa,CAAC,SAAD,CAAY,CAClCqC,OAAO,CAAEL,CADyB,CAElCV,QAAQ,CAAEW,CAFwB,CAAZ,CAD1B,EAFJ,CASE,oBAAC,eAAD,gBACE,QAAQ,CAAGA,CAAD,QAAgBN,CAAW,CAACG,CAAD,CADvC,CAEE,OAAO,CAAEE,CAFX,CAGE,KAAK,CAAEG,CAHT,CAIE,IAAI,CAAEnB,CAAW,EAAIA,CAAW,CAACc,CAAD,CAJlC,CAKE,QAAQ,CAAEpB,CALZ,CAME,QAAQ,CAAEE,CANZ,CAOE,QAAQ,CAAEJ,CAPZ,CAQE,GAAG,CAAEU,CAAU,CAACY,CAAD,CARjB,CASE,IAAI,CAAEV,CATR,CAUE,QAAQ,CAAEE,CAAQ,EAAIW,CAVxB,CAWE,KAAK,CAAEzB,CAAQ,EAAIe,CAAZ,CAAuBY,CAAvB,OAXT,EAYMD,CAZN,EATF,CAyBH,CAhCA,CARH,CA2CH,CAvFD,CAyFA,MAAO,IAAMI,YAAW,CAAGrD,UAAU,CACnCgB,iBADmC,CAA9B,CAIP"}
|
|
1
|
+
{"version":3,"file":"ChoiceGroup.js","names":["React","forwardRef","useChoiceGroup","cn","getByMap","withDefaultGetters","ChoiceGroupItem","choiceGroupDefaultForm","choiceGroupDefaultSize","choiceGroupDefaultView","choiceGroupWidthDefault","sizeMap","xs","s","m","l","cnChoiceGroup","ChoiceGroupRender","props","ref","size","form","view","width","onlyIcon","iconSizeProp","iconSize","value","multiple","items","getItemLabel","onChange","getItemIcon","getItemAttributes","getItemRef","getItemDisabled","name","className","disabled","truncate","otherProps","getKey","callBack","getOnChange","getChecked","map","item","index","itemChecked","itemDisabled","attributes","label","toString","checked","ChoiceGroup"],"sources":["../../../../../src/components/ChoiceGroup/ChoiceGroup.tsx"],"sourcesContent":["import './ChoiceGroup.css';\n\nimport { IconPropSize } from '@consta/icons/Icon';\nimport React, { forwardRef } from 'react';\n\nimport { useChoiceGroup } from '##/hooks/useChoiceGroup';\nimport { cn } from '##/utils/bem';\nimport { getByMap } from '##/utils/getByMap';\n\nimport { withDefaultGetters } from './helper';\nimport { ChoiceGroupItem } from './Item/ChoiceGroup-Item';\nimport {\n ChoiceGroupComponent,\n choiceGroupDefaultForm,\n choiceGroupDefaultSize,\n choiceGroupDefaultView,\n ChoiceGroupPropOnChange,\n ChoiceGroupProps,\n ChoiceGroupPropSize,\n choiceGroupWidthDefault,\n} from './types';\n\nconst sizeMap: Record<ChoiceGroupPropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nexport const cnChoiceGroup = cn('ChoiceGroup');\n\nconst ChoiceGroupRender = (\n props: ChoiceGroupProps,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n size = choiceGroupDefaultSize,\n form = choiceGroupDefaultForm,\n view = choiceGroupDefaultView,\n width = choiceGroupWidthDefault,\n onlyIcon,\n iconSize: iconSizeProp,\n value = null,\n multiple = false,\n items,\n getItemLabel,\n onChange,\n getItemIcon,\n getItemAttributes,\n getItemRef,\n getItemDisabled,\n name,\n className,\n disabled = false,\n truncate,\n ...otherProps\n } = withDefaultGetters(props);\n\n type Item = (typeof items)[number];\n\n const { getOnChange, getChecked } = useChoiceGroup<\n Item,\n React.ChangeEvent<HTMLInputElement>\n >({\n value: value as Item,\n getKey: getItemLabel,\n callBack: onChange as ChoiceGroupPropOnChange<Item, false>,\n multiple: multiple as false,\n // привел к типам из-за того что\n // TS не понимает что параметры для не Multiple и Multiple не могут прийти одновременно\n });\n\n const iconSize = getByMap(sizeMap, size, iconSizeProp);\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnChoiceGroup(\n { size, form, view, width, onlyIcon, disabled, truncate },\n [className],\n )}\n >\n {items.map((item, index) => {\n const itemChecked = getChecked(item);\n const itemDisabled = getItemDisabled?.(item);\n const attributes = getItemAttributes(item) ?? {};\n const label = getItemLabel(item).toString();\n\n return (\n <React.Fragment key={label}>\n {index > 0 && (\n <div\n className={cnChoiceGroup('Divider', {\n checked: itemChecked,\n disabled: itemDisabled,\n })}\n />\n )}\n <ChoiceGroupItem\n onChange={!itemDisabled ? getOnChange(item) : undefined}\n checked={itemChecked}\n label={label}\n icon={getItemIcon && getItemIcon(item)}\n iconSize={iconSize}\n multiple={multiple}\n onlyIcon={onlyIcon}\n ref={getItemRef(item)}\n name={name}\n disabled={disabled || itemDisabled}\n title={onlyIcon || truncate ? label : undefined}\n {...attributes}\n />\n </React.Fragment>\n );\n })}\n </div>\n );\n};\n\nexport const ChoiceGroup = forwardRef(\n ChoiceGroupRender,\n) as ChoiceGroupComponent;\n\nexport * from './types';\n"],"mappings":"uTAAA,0BAGA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,cAAT,kCACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BAEA,OAASC,kBAAT,gBACA,OAASC,eAAT,+BACA,OAEEC,sBAFF,CAGEC,sBAHF,CAIEC,sBAJF,CAQEC,uBARF,eAWA,GAAMC,QAAkD,CAAG,CACzDC,EAAE,CAAE,IADqD,CAEzDC,CAAC,CAAE,IAFsD,CAGzDC,CAAC,CAAE,GAHsD,CAIzDC,CAAC,CAAE,GAJsD,CAA3D,CAOA,MAAO,IAAMC,cAAa,CAAGb,EAAE,CAAC,aAAD,CAAxB,CAEP,GAAMc,kBAAiB,CAAG,SACxBC,CADwB,CAExBC,CAFwB,CAGrB,OAsBCd,kBAAkB,CAACa,CAAD,CAtBnB,KAEDE,IAFC,CAEDA,CAFC,YAEMZ,sBAFN,OAGDa,IAHC,CAGDA,CAHC,YAGMd,sBAHN,OAIDe,IAJC,CAIDA,CAJC,YAIMb,sBAJN,OAKDc,KALC,CAKDA,CALC,YAKOb,uBALP,GAMDc,CANC,GAMDA,QANC,CAOSC,CAPT,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CAApB,gBAA8B,EAHpB,CAIpBK,CAAK,CAAGrB,CAAY,CAACgB,CAAD,CAAZ,CAAmBM,QAAnB,EAJY,CAM1B,MACE,qBAAC,KAAD,CAAO,QAAP,EAAgB,GAAG,CAAED,CAArB,EACW,CAAR,CAAAJ,CAAK,EACJ,2BACE,SAAS,CAAE/B,aAAa,CAAC,SAAD,CAAY,CAClCqC,OAAO,CAAEL,CADyB,CAElCV,QAAQ,CAAEW,CAFwB,CAAZ,CAD1B,EAFJ,CASE,oBAAC,eAAD,gBACE,QAAQ,CAAGA,CAAD,QAAgBN,CAAW,CAACG,CAAD,CADvC,CAEE,OAAO,CAAEE,CAFX,CAGE,KAAK,CAAEG,CAHT,CAIE,IAAI,CAAEnB,CAAW,EAAIA,CAAW,CAACc,CAAD,CAJlC,CAKE,QAAQ,CAAEpB,CALZ,CAME,QAAQ,CAAEE,CANZ,CAOE,QAAQ,CAAEJ,CAPZ,CAQE,GAAG,CAAEU,CAAU,CAACY,CAAD,CARjB,CASE,IAAI,CAAEV,CATR,CAUE,QAAQ,CAAEE,CAAQ,EAAIW,CAVxB,CAWE,KAAK,CAAEzB,CAAQ,EAAIe,CAAZ,CAAuBY,CAAvB,OAXT,EAYMD,CAZN,EATF,CAyBH,CAhCA,CARH,CA2CH,CAvFD,CAyFA,MAAO,IAAMI,YAAW,CAAGrD,UAAU,CACnCgB,iBADmC,CAA9B,CAIP"}
|
|
@@ -9,16 +9,16 @@ export type ChoiceGroupDefaultItem = {
|
|
|
9
9
|
ref?: React.RefObject<HTMLLabelElement>;
|
|
10
10
|
};
|
|
11
11
|
export declare const choiceGroupForms: readonly ["default", "brick", "round"];
|
|
12
|
-
export type ChoiceGroupPropForm = typeof choiceGroupForms[number];
|
|
12
|
+
export type ChoiceGroupPropForm = (typeof choiceGroupForms)[number];
|
|
13
13
|
export declare const choiceGroupDefaultForm: ChoiceGroupPropForm;
|
|
14
14
|
export declare const choiceGroupSizes: readonly ["xs", "s", "m", "l"];
|
|
15
|
-
export type ChoiceGroupPropSize = typeof choiceGroupSizes[number];
|
|
15
|
+
export type ChoiceGroupPropSize = (typeof choiceGroupSizes)[number];
|
|
16
16
|
export declare const choiceGroupDefaultSize: ChoiceGroupPropSize;
|
|
17
17
|
export declare const choiceGroupViews: readonly ["primary", "ghost", "secondary"];
|
|
18
|
-
export type ChoiceGroupPropView = typeof choiceGroupViews[number];
|
|
18
|
+
export type ChoiceGroupPropView = (typeof choiceGroupViews)[number];
|
|
19
19
|
export declare const choiceGroupDefaultView: ChoiceGroupPropView;
|
|
20
20
|
export declare const choiceGroupWidth: readonly ["default", "full"];
|
|
21
|
-
export type ChoiceGroupPropWidth = typeof choiceGroupWidth[number];
|
|
21
|
+
export type ChoiceGroupPropWidth = (typeof choiceGroupWidth)[number];
|
|
22
22
|
export declare const choiceGroupWidthDefault: ChoiceGroupPropWidth;
|
|
23
23
|
export type ChoiceGroupPropGetItemLabel<ITEM> = (item: ITEM) => string | number;
|
|
24
24
|
export type ChoiceGroupPropGetItemIcon<ITEM> = (item: ITEM) => IconComponent | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["choiceGroupForms","choiceGroupDefaultForm","choiceGroupSizes","choiceGroupDefaultSize","choiceGroupViews","choiceGroupDefaultView","choiceGroupWidth","choiceGroupWidthDefault"],"sources":["../../../../../src/components/ChoiceGroup/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type ChoiceGroupDefaultItem = {\n label: string;\n icon?: IconComponent;\n disabled?: boolean;\n attributes?: Omit<\n JSX.IntrinsicElements['label'],\n 'ref' | 'onChange' | 'children'\n >;\n ref?: React.RefObject<HTMLLabelElement>;\n};\n\nexport const choiceGroupForms = ['default', 'brick', 'round'] as const;\nexport type ChoiceGroupPropForm = typeof choiceGroupForms[number];\nexport const choiceGroupDefaultForm: ChoiceGroupPropForm = 'default';\n\nexport const choiceGroupSizes = ['xs', 's', 'm', 'l'] as const;\nexport type ChoiceGroupPropSize = typeof choiceGroupSizes[number];\nexport const choiceGroupDefaultSize: ChoiceGroupPropSize = 'm';\n\nexport const choiceGroupViews = ['primary', 'ghost', 'secondary'] as const;\nexport type ChoiceGroupPropView = typeof choiceGroupViews[number];\nexport const choiceGroupDefaultView: ChoiceGroupPropView = 'primary';\n\nexport const choiceGroupWidth = ['default', 'full'] as const;\nexport type ChoiceGroupPropWidth = typeof choiceGroupWidth[number];\nexport const choiceGroupWidthDefault: ChoiceGroupPropWidth =\n choiceGroupWidth[0];\n\nexport type ChoiceGroupPropGetItemLabel<ITEM> = (item: ITEM) => string | number;\nexport type ChoiceGroupPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type ChoiceGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type ChoiceGroupPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) =>\n | Omit<JSX.IntrinsicElements['label'], 'ref' | 'onChange' | 'children'>\n | undefined;\nexport type ChoiceGroupPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLLabelElement> | undefined;\n\nexport type ChoiceGroupPropValue<ITEM, MULTIPLE extends boolean> =\n | (MULTIPLE extends true ? ITEM[] : ITEM)\n | null;\n\nexport type ChoiceGroupPropOnChange<ITEM, MULTIPLE extends boolean> = (\n value: MULTIPLE extends true ? ITEM[] | null : ITEM,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type ChoiceGroupProps<\n ITEM = ChoiceGroupDefaultItem,\n MULTIPLE extends boolean = false,\n> = PropsWithHTMLAttributesAndRef<\n {\n size?: ChoiceGroupPropSize;\n form?: ChoiceGroupPropForm;\n view?: ChoiceGroupPropView;\n width?: ChoiceGroupPropWidth;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n items: ITEM[];\n getItemLabel?: ChoiceGroupPropGetItemLabel<ITEM>;\n getItemIcon?: ChoiceGroupPropGetItemIcon<ITEM>;\n getItemAttributes?: ChoiceGroupPropGetItemAttributes<ITEM>;\n getItemRef?: ChoiceGroupPropGetItemRef<ITEM>;\n name: string;\n disabled?: boolean;\n getItemDisabled?: ChoiceGroupPropGetItemDisabled<ITEM>;\n value?: ChoiceGroupPropValue<ITEM, MULTIPLE>;\n onChange?: ChoiceGroupPropOnChange<ITEM, MULTIPLE>;\n multiple?: MULTIPLE;\n truncate?: boolean;\n children?: never;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: ChoiceGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: ChoiceGroupPropGetItemLabel<ITEM>;\n });\n\nexport type ChoiceGroupItemProps = {\n icon?: IconComponent;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n label: string;\n name: string;\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n checked: boolean;\n multiple: boolean;\n disabled?: boolean;\n};\n\nexport type ChoiceGroupComponent = <ITEM, MULTIPLE extends boolean = false>(\n props: ChoiceGroupProps<ITEM, MULTIPLE>,\n) => React.ReactNode | null;\n"],"mappings":"AAgBA,MAAO,IAAMA,iBAAgB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAAzB,CAEP,MAAO,IAAMC,uBAA2C,CAAG,SAApD,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAzB,CAEP,MAAO,IAAMC,uBAA2C,CAAG,GAApD,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,WAArB,CAAzB,CAEP,MAAO,IAAMC,uBAA2C,CAAG,SAApD,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,SAAD,CAAY,MAAZ,CAAzB,CAEP,MAAO,IAAMC,wBAA6C,CACxDD,gBAAgB,CAAC,CAAD,CADX"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["choiceGroupForms","choiceGroupDefaultForm","choiceGroupSizes","choiceGroupDefaultSize","choiceGroupViews","choiceGroupDefaultView","choiceGroupWidth","choiceGroupWidthDefault"],"sources":["../../../../../src/components/ChoiceGroup/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type ChoiceGroupDefaultItem = {\n label: string;\n icon?: IconComponent;\n disabled?: boolean;\n attributes?: Omit<\n JSX.IntrinsicElements['label'],\n 'ref' | 'onChange' | 'children'\n >;\n ref?: React.RefObject<HTMLLabelElement>;\n};\n\nexport const choiceGroupForms = ['default', 'brick', 'round'] as const;\nexport type ChoiceGroupPropForm = (typeof choiceGroupForms)[number];\nexport const choiceGroupDefaultForm: ChoiceGroupPropForm = 'default';\n\nexport const choiceGroupSizes = ['xs', 's', 'm', 'l'] as const;\nexport type ChoiceGroupPropSize = (typeof choiceGroupSizes)[number];\nexport const choiceGroupDefaultSize: ChoiceGroupPropSize = 'm';\n\nexport const choiceGroupViews = ['primary', 'ghost', 'secondary'] as const;\nexport type ChoiceGroupPropView = (typeof choiceGroupViews)[number];\nexport const choiceGroupDefaultView: ChoiceGroupPropView = 'primary';\n\nexport const choiceGroupWidth = ['default', 'full'] as const;\nexport type ChoiceGroupPropWidth = (typeof choiceGroupWidth)[number];\nexport const choiceGroupWidthDefault: ChoiceGroupPropWidth =\n choiceGroupWidth[0];\n\nexport type ChoiceGroupPropGetItemLabel<ITEM> = (item: ITEM) => string | number;\nexport type ChoiceGroupPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type ChoiceGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type ChoiceGroupPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) =>\n | Omit<JSX.IntrinsicElements['label'], 'ref' | 'onChange' | 'children'>\n | undefined;\nexport type ChoiceGroupPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLLabelElement> | undefined;\n\nexport type ChoiceGroupPropValue<ITEM, MULTIPLE extends boolean> =\n | (MULTIPLE extends true ? ITEM[] : ITEM)\n | null;\n\nexport type ChoiceGroupPropOnChange<ITEM, MULTIPLE extends boolean> = (\n value: MULTIPLE extends true ? ITEM[] | null : ITEM,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type ChoiceGroupProps<\n ITEM = ChoiceGroupDefaultItem,\n MULTIPLE extends boolean = false,\n> = PropsWithHTMLAttributesAndRef<\n {\n size?: ChoiceGroupPropSize;\n form?: ChoiceGroupPropForm;\n view?: ChoiceGroupPropView;\n width?: ChoiceGroupPropWidth;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n items: ITEM[];\n getItemLabel?: ChoiceGroupPropGetItemLabel<ITEM>;\n getItemIcon?: ChoiceGroupPropGetItemIcon<ITEM>;\n getItemAttributes?: ChoiceGroupPropGetItemAttributes<ITEM>;\n getItemRef?: ChoiceGroupPropGetItemRef<ITEM>;\n name: string;\n disabled?: boolean;\n getItemDisabled?: ChoiceGroupPropGetItemDisabled<ITEM>;\n value?: ChoiceGroupPropValue<ITEM, MULTIPLE>;\n onChange?: ChoiceGroupPropOnChange<ITEM, MULTIPLE>;\n multiple?: MULTIPLE;\n truncate?: boolean;\n children?: never;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: ChoiceGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: ChoiceGroupPropGetItemLabel<ITEM>;\n });\n\nexport type ChoiceGroupItemProps = {\n icon?: IconComponent;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n label: string;\n name: string;\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n checked: boolean;\n multiple: boolean;\n disabled?: boolean;\n};\n\nexport type ChoiceGroupComponent = <ITEM, MULTIPLE extends boolean = false>(\n props: ChoiceGroupProps<ITEM, MULTIPLE>,\n) => React.ReactNode | null;\n"],"mappings":"AAgBA,MAAO,IAAMA,iBAAgB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAAzB,CAEP,MAAO,IAAMC,uBAA2C,CAAG,SAApD,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAzB,CAEP,MAAO,IAAMC,uBAA2C,CAAG,GAApD,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,WAArB,CAAzB,CAEP,MAAO,IAAMC,uBAA2C,CAAG,SAApD,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,SAAD,CAAY,MAAZ,CAAzB,CAEP,MAAO,IAAMC,wBAA6C,CACxDD,gBAAgB,CAAC,CAAD,CADX"}
|
|
@@ -2,21 +2,21 @@ import { IconComponent, IconProps } from '@consta/icons/Icon';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PropsWithHTMLAttributes, PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
|
|
4
4
|
export declare const collapsePropSize: readonly ["m", "l", "s", "xs", "2xs"];
|
|
5
|
-
export type CollapsePropSize = typeof collapsePropSize[number];
|
|
5
|
+
export type CollapsePropSize = (typeof collapsePropSize)[number];
|
|
6
6
|
export declare const collapsePropSizeDefault: "m";
|
|
7
7
|
export declare const collapsePropForm: readonly ["brick", "default", "round"];
|
|
8
|
-
export type CollapsePropForm = typeof collapsePropForm[number];
|
|
8
|
+
export type CollapsePropForm = (typeof collapsePropForm)[number];
|
|
9
9
|
export declare const collapsePropFormDefault: "brick";
|
|
10
10
|
export declare const collapsePropView: readonly ["clear", "ghost", "primary", "secondary"];
|
|
11
|
-
export type CollapsePropView = typeof collapsePropView[number];
|
|
11
|
+
export type CollapsePropView = (typeof collapsePropView)[number];
|
|
12
12
|
export declare const collapsePropViewDefault: "clear";
|
|
13
13
|
export declare const collapsePropHorizontalSpace: readonly ["3xs", "6xl", "5xl", "4xl", "3xl", "2xl", "xl", "l", "m", "s", "xs", "2xs"];
|
|
14
|
-
export type CollapsePropHorizontalSpace = typeof collapsePropHorizontalSpace[number];
|
|
14
|
+
export type CollapsePropHorizontalSpace = (typeof collapsePropHorizontalSpace)[number];
|
|
15
15
|
export declare const collapsePropIconPosition: readonly ["left", "right"];
|
|
16
|
-
export type CollapsePropIconPosition = typeof collapsePropIconPosition[number];
|
|
16
|
+
export type CollapsePropIconPosition = (typeof collapsePropIconPosition)[number];
|
|
17
17
|
export declare const collapsePropIconPositionDefault: "left";
|
|
18
18
|
export declare const collapseIconPropDirection: readonly ["up", "right", "down", "left", "upRight", "downRight", "upLeft", "downLeft"];
|
|
19
|
-
export type CollapseIconPropDirection = typeof collapseIconPropDirection[number];
|
|
19
|
+
export type CollapseIconPropDirection = (typeof collapseIconPropDirection)[number];
|
|
20
20
|
export type CollapseIconProps = PropsWithHTMLAttributes<{
|
|
21
21
|
size: 'xs' | 's';
|
|
22
22
|
icon: React.FC<IconProps>;
|
|
@@ -32,7 +32,7 @@ export declare const collapsePropDirectionIconDefault: "up";
|
|
|
32
32
|
export declare const collapsePropCloseDirectionIconDefault: "down";
|
|
33
33
|
export declare const collapsePropIconView: readonly ["clear", "ghost"];
|
|
34
34
|
export declare const collapsePropIconViewDefault: "clear";
|
|
35
|
-
export type CollapsePropIconView = typeof collapsePropIconView[number];
|
|
35
|
+
export type CollapsePropIconView = (typeof collapsePropIconView)[number];
|
|
36
36
|
export type CollapseProps = PropsWithHTMLAttributesAndRef<{
|
|
37
37
|
size?: CollapsePropSize;
|
|
38
38
|
icon?: IconComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["collapsePropSize","collapsePropSizeDefault","collapsePropForm","collapsePropFormDefault","collapsePropView","collapsePropViewDefault","collapsePropHorizontalSpace","collapsePropIconPosition","collapsePropIconPositionDefault","collapseIconPropDirection","collapsePropDirectionIcon","collapsePropDirectionIconDefault","collapsePropCloseDirectionIconDefault","collapsePropIconView","collapsePropIconViewDefault"],"sources":["../../../../../src/components/Collapse/types.ts"],"sourcesContent":["import { IconComponent, IconProps } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport {\n PropsWithHTMLAttributes,\n PropsWithHTMLAttributesAndRef,\n} from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const collapsePropSize = ['m', 'l', 's', 'xs', '2xs'] as const;\nexport type CollapsePropSize = typeof collapsePropSize[number];\nexport const collapsePropSizeDefault = collapsePropSize[0];\n\nexport const collapsePropForm = ['brick', 'default', 'round'] as const;\nexport type CollapsePropForm = typeof collapsePropForm[number];\nexport const collapsePropFormDefault = collapsePropForm[0];\n\nexport const collapsePropView = [\n 'clear',\n 'ghost',\n 'primary',\n 'secondary',\n] as const;\nexport type CollapsePropView = typeof collapsePropView[number];\nexport const collapsePropViewDefault = collapsePropView[0];\n\nexport const collapsePropHorizontalSpace = [\n '3xs',\n '6xl',\n '5xl',\n '4xl',\n '3xl',\n '2xl',\n 'xl',\n 'l',\n 'm',\n 's',\n 'xs',\n '2xs',\n] as const;\nexport type CollapsePropHorizontalSpace =\n typeof collapsePropHorizontalSpace[number];\n\nexport const collapsePropIconPosition = ['left', 'right'] as const;\nexport type CollapsePropIconPosition
|
|
1
|
+
{"version":3,"file":"types.js","names":["collapsePropSize","collapsePropSizeDefault","collapsePropForm","collapsePropFormDefault","collapsePropView","collapsePropViewDefault","collapsePropHorizontalSpace","collapsePropIconPosition","collapsePropIconPositionDefault","collapseIconPropDirection","collapsePropDirectionIcon","collapsePropDirectionIconDefault","collapsePropCloseDirectionIconDefault","collapsePropIconView","collapsePropIconViewDefault"],"sources":["../../../../../src/components/Collapse/types.ts"],"sourcesContent":["import { IconComponent, IconProps } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport {\n PropsWithHTMLAttributes,\n PropsWithHTMLAttributesAndRef,\n} from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const collapsePropSize = ['m', 'l', 's', 'xs', '2xs'] as const;\nexport type CollapsePropSize = (typeof collapsePropSize)[number];\nexport const collapsePropSizeDefault = collapsePropSize[0];\n\nexport const collapsePropForm = ['brick', 'default', 'round'] as const;\nexport type CollapsePropForm = (typeof collapsePropForm)[number];\nexport const collapsePropFormDefault = collapsePropForm[0];\n\nexport const collapsePropView = [\n 'clear',\n 'ghost',\n 'primary',\n 'secondary',\n] as const;\nexport type CollapsePropView = (typeof collapsePropView)[number];\nexport const collapsePropViewDefault = collapsePropView[0];\n\nexport const collapsePropHorizontalSpace = [\n '3xs',\n '6xl',\n '5xl',\n '4xl',\n '3xl',\n '2xl',\n 'xl',\n 'l',\n 'm',\n 's',\n 'xs',\n '2xs',\n] as const;\nexport type CollapsePropHorizontalSpace =\n (typeof collapsePropHorizontalSpace)[number];\n\nexport const collapsePropIconPosition = ['left', 'right'] as const;\nexport type CollapsePropIconPosition =\n (typeof collapsePropIconPosition)[number];\nexport const collapsePropIconPositionDefault = collapsePropIconPosition[0];\n\nexport const collapseIconPropDirection = [\n 'up',\n 'right',\n 'down',\n 'left',\n 'upRight',\n 'downRight',\n 'upLeft',\n 'downLeft',\n] as const;\nexport type CollapseIconPropDirection =\n (typeof collapseIconPropDirection)[number];\n\nexport type CollapseIconProps = PropsWithHTMLAttributes<\n {\n size: 'xs' | 's';\n icon: React.FC<IconProps>;\n view: CollapsePropIconView;\n isOpen?: boolean;\n children?: never;\n closeIcon?: React.FC<IconProps>;\n direction?: CollapseIconPropDirection;\n closeDirection?: CollapseIconPropDirection;\n },\n HTMLSpanElement\n>;\n\nexport const collapsePropDirectionIcon = collapseIconPropDirection;\nexport const collapsePropDirectionIconDefault = collapsePropDirectionIcon[0];\nexport const collapsePropCloseDirectionIconDefault =\n collapsePropDirectionIcon[2];\n\nexport const collapsePropIconView = ['clear', 'ghost'] as const;\nexport const collapsePropIconViewDefault = collapsePropIconView[0];\nexport type CollapsePropIconView = (typeof collapsePropIconView)[number];\n\nexport type CollapseProps = PropsWithHTMLAttributesAndRef<\n {\n size?: CollapsePropSize;\n icon?: IconComponent;\n form?: CollapsePropForm;\n view?: CollapsePropView;\n divider?: boolean;\n label: React.ReactNode;\n maxContentHeight?: string | number;\n horizontalSpace?: CollapsePropHorizontalSpace;\n hoverEffect?: boolean;\n isOpen?: boolean;\n iconView?: CollapsePropIconView;\n rightSide?: React.ReactNode;\n iconPosition?: 'left' | 'right';\n } & (\n | {\n closeIcon?: IconComponent;\n directionIcon?: never;\n closeDirectionIcon?: never;\n }\n | {\n closeIcon?: never;\n directionIcon?: CollapseIconPropDirection;\n closeDirectionIcon?: CollapseIconPropDirection;\n }\n ),\n HTMLDivElement\n>;\n\nexport type CollapseComponent = (\n props: CollapseProps,\n) => React.ReactNode | null;\n"],"mappings":"AAQA,MAAO,IAAMA,iBAAgB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAgB,IAAhB,CAAsB,KAAtB,CAAzB,CAEP,MAAO,IAAMC,wBAAuB,CAAGD,gBAAgB,CAAC,CAAD,CAAhD,CAEP,MAAO,IAAME,iBAAgB,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,OAArB,CAAzB,CAEP,MAAO,IAAMC,wBAAuB,CAAGD,gBAAgB,CAAC,CAAD,CAAhD,CAEP,MAAO,IAAME,iBAAgB,CAAG,CAC9B,OAD8B,CAE9B,OAF8B,CAG9B,SAH8B,CAI9B,WAJ8B,CAAzB,CAOP,MAAO,IAAMC,wBAAuB,CAAGD,gBAAgB,CAAC,CAAD,CAAhD,CAEP,MAAO,IAAME,4BAA2B,CAAG,CACzC,KADyC,CAEzC,KAFyC,CAGzC,KAHyC,CAIzC,KAJyC,CAKzC,KALyC,CAMzC,KANyC,CAOzC,IAPyC,CAQzC,GARyC,CASzC,GATyC,CAUzC,GAVyC,CAWzC,IAXyC,CAYzC,KAZyC,CAApC,CAiBP,MAAO,IAAMC,yBAAwB,CAAG,CAAC,MAAD,CAAS,OAAT,CAAjC,CAGP,MAAO,IAAMC,gCAA+B,CAAGD,wBAAwB,CAAC,CAAD,CAAhE,CAEP,MAAO,IAAME,0BAAyB,CAAG,CACvC,IADuC,CAEvC,OAFuC,CAGvC,MAHuC,CAIvC,MAJuC,CAKvC,SALuC,CAMvC,WANuC,CAOvC,QAPuC,CAQvC,UARuC,CAAlC,CA2BP,MAAO,IAAMC,0BAAyB,CAAGD,yBAAlC,CACP,MAAO,IAAME,iCAAgC,CAAGD,yBAAyB,CAAC,CAAD,CAAlE,CACP,MAAO,IAAME,sCAAqC,CAChDF,yBAAyB,CAAC,CAAD,CADpB,CAGP,MAAO,IAAMG,qBAAoB,CAAG,CAAC,OAAD,CAAU,OAAV,CAA7B,CACP,MAAO,IAAMC,4BAA2B,CAAGD,oBAAoB,CAAC,CAAD,CAAxD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
.ColorControl{--color-control-marker-offset:calc((var(--field-control-layout-height) - var(--color-control-marker-size))/2 - var(--control-border-width))}.ColorControl_size_s,.ColorControl_size_xs{--color-control-marker-size:var(--space-m)}.ColorControl_size_m{--color-control-marker-size:var(--space-xl)}.ColorControl_size_l{--color-control-marker-size:var(--space-2xl)}.ColorControl_view_default{--field-control-layout-padding-left-override:var(
|
|
2
|
+
--color-control-marker-offset
|
|
3
|
+
)}.ColorControl_view_default .ColorControl-Input{--field-control-layout-padding-left-override:var(
|
|
4
|
+
--field-control-layout-space
|
|
5
|
+
)}.ColorControl_view_default.ColorControl_onlyMarker{--field-control-layout-padding-right-override:var(
|
|
6
|
+
--color-control-marker-offset
|
|
7
|
+
)}.ColorControl_onlyMarker.FieldControlLayout{width:var(--field-control-layout-height)}.ColorControl_onlyMarker .ColorControl-Marker.MixFocus{--mix-focus-color-one:transparent;--mix-focus-color-two:transparent}.ColorControl-Input{--field-control-layout-height-override:calc(var(--field-control-layout-height) - var(--control-border-width)*2);--field-control-layout-additional-padding-top:calc(var(--control-border-width)*-1);--field-control-layout-additional-padding-bottom:calc(var(--control-border-width)*-1)}.ColorControl-Marker{--mix-hit-slop-top:var(--color-control-marker-offset);--mix-hit-slop-left:var(--color-control-marker-offset);--mix-hit-slop-right:var(--color-control-marker-offset);--mix-hit-slop-bottom:var(--color-control-marker-offset)}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './ColorControl.css';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AnyColor } from '../types';
|
|
4
|
+
import { ColorControlComponent, ColorControlProps } from './types';
|
|
5
|
+
export declare const ColorControlRender: <T extends AnyColor>({ className, model, value, onChange, size, disabled, format, alpha, id, name, view, form, markerRef, onlyMarker, ...otherProps }: ColorControlProps<T>, ref: React.Ref<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ColorControl: ColorControlComponent;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","model","value","onChange","size","disabled","format","alpha","id","name","view","form","markerRef","onlyMarker"];import"./ColorControl.css";import{classnames}from"@bem-react/classnames";import React,{forwardRef,useCallback,useState}from"react";import{FieldControlLayout}from"../../FieldComponents";import{useDebounce}from"../../../hooks/useDebounce";import{cnMixHitSlop}from"../../../mixs/MixHitSlop";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{ColorMarker}from"../ColorMarker";import{ColorPickerInput}from"../ColorPickerInput";var cnColorControl=cn("ColorControl"),mapSizeMarker={xs:"xs",s:"xs",m:"s",l:"m"},mapFormMarker={default:"default",defaultClear:"default",defaultBrick:"default",brick:"brick",brickDefault:"brick",brickClear:"brick",brickRound:"brick",round:"round",roundClear:"round",roundBrick:"round",clearRound:"default",clearDefault:"default",clearBrick:"default",clear:"default"};export var ColorControlRender=function(a,b){var c=a.className,d=a.model,e=a.value,f=a.onChange,g=a.size,h=void 0===g?"m":g,i=a.disabled,j=a.format,k=a.alpha,l=a.id,m=a.name,n=a.view,o=void 0===n?"default":n,p=a.form,q=void 0===p?"default":p,r=a.markerRef,s=a.onlyMarker,t=_objectWithoutProperties(a,_excluded),u=useState(!1),v=_slicedToArray(u,2),w=v[0],x=v[1],y=useDebounce(x,1),z=useCallback(function(){y(!0)},[]),A=useCallback(function(){y(!1)},[]);return React.createElement(FieldControlLayout,Object.assign({},t,{disabled:i,size:h,ref:b,form:q,view:o,className:classnames(cnColorControl({view:o,size:h,onlyMarker:s},c),"default"===o?cnMixSpace({pH:"xs",pV:"2xs"}):void 0),leftSide:React.createElement(ColorMarker,{className:cnColorControl("Marker",[s?cnMixHitSlop({mode:"before"}):void 0]),as:"button",model:d,value:e,size:mapSizeMarker[h],form:mapFormMarker[q],onFocus:z,onBlur:A,ref:r,disabled:i}),focused:w}),!s&&React.createElement(ColorPickerInput,{className:cnColorControl("Input"),model:d,value:e,onChange:f,size:h,disabled:i,format:j,alpha:k,id:l,name:m,view:"clear",onFocus:z,onBlur:A}))};export var ColorControl=forwardRef(ColorControlRender);
|
|
2
|
+
//# sourceMappingURL=ColorControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorControl.js","names":["classnames","React","forwardRef","useCallback","useState","FieldControlLayout","useDebounce","cnMixHitSlop","cnMixSpace","cn","ColorMarker","ColorPickerInput","cnColorControl","mapSizeMarker","xs","s","m","l","mapFormMarker","defaultClear","defaultBrick","brick","brickDefault","brickClear","brickRound","round","roundClear","roundBrick","clearRound","clearDefault","clearBrick","clear","ColorControlRender","ref","className","model","value","onChange","size","disabled","format","alpha","id","name","view","form","markerRef","onlyMarker","otherProps","focused","setFocused","debouncedSetFocused","setFocusedOn","setFocusedOff","pH","pV","mode","ColorControl"],"sources":["../../../../../../src/components/ColorPicker/ColorControl/ColorControl.tsx"],"sourcesContent":["import './ColorControl.css';\n\nimport { classnames } from '@bem-react/classnames';\nimport React, { forwardRef, useCallback, useState } from 'react';\n\nimport {\n FieldControlLayout,\n FieldPropForm,\n} from '##/components/FieldComponents';\nimport { useDebounce } from '##/hooks/useDebounce';\nimport { cnMixHitSlop } from '##/mixs/MixHitSlop';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\n\nimport { ColorMarker } from '../ColorMarker';\nimport { ColorPickerInput } from '../ColorPickerInput';\nimport { AnyColor } from '../types';\nimport { ColorControlComponent, ColorControlProps } from './types';\n\nconst cnColorControl = cn('ColorControl');\n\nconst mapSizeMarker = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 'm',\n} as const;\n\nconst mapFormMarker: Record<FieldPropForm, 'default' | 'brick' | 'round'> = {\n default: 'default',\n defaultClear: 'default',\n defaultBrick: 'default',\n brick: 'brick',\n brickDefault: 'brick',\n brickClear: 'brick',\n brickRound: 'brick',\n round: 'round',\n roundClear: 'round',\n roundBrick: 'round',\n clearRound: 'default',\n clearDefault: 'default',\n clearBrick: 'default',\n clear: 'default',\n} as const;\n\nexport const ColorControlRender = <T extends AnyColor>(\n {\n className,\n model,\n value,\n onChange,\n size = 'm',\n disabled,\n format,\n alpha,\n id,\n name,\n view = 'default',\n form = 'default',\n markerRef,\n onlyMarker,\n ...otherProps\n }: ColorControlProps<T>,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const [focused, setFocused] = useState(false);\n const debouncedSetFocused = useDebounce(setFocused, 1);\n\n const setFocusedOn = useCallback(() => {\n debouncedSetFocused(true);\n }, []);\n\n const setFocusedOff = useCallback(() => {\n debouncedSetFocused(false);\n }, []);\n\n return (\n <FieldControlLayout\n {...otherProps}\n disabled={disabled}\n size={size}\n ref={ref}\n form={form}\n view={view}\n className={classnames(\n cnColorControl({ view, size, onlyMarker }, className),\n view === 'default' ? cnMixSpace({ pH: 'xs', pV: '2xs' }) : undefined,\n )}\n leftSide={\n <ColorMarker\n className={cnColorControl('Marker', [\n onlyMarker ? cnMixHitSlop({ mode: 'before' }) : undefined,\n ])}\n as=\"button\"\n model={model}\n value={value}\n size={mapSizeMarker[size]}\n form={mapFormMarker[form]}\n onFocus={setFocusedOn}\n onBlur={setFocusedOff}\n ref={markerRef}\n disabled={disabled}\n />\n }\n focused={focused}\n >\n {!onlyMarker && (\n <ColorPickerInput\n className={cnColorControl('Input')}\n model={model}\n value={value}\n onChange={onChange}\n size={size}\n disabled={disabled}\n format={format}\n alpha={alpha}\n id={id}\n name={name}\n view=\"clear\"\n onFocus={setFocusedOn}\n onBlur={setFocusedOff}\n />\n )}\n </FieldControlLayout>\n );\n};\n\nexport const ColorControl = forwardRef(\n ColorControlRender,\n) as ColorControlComponent;\n"],"mappings":"mSAAA,2BAEA,OAASA,UAAT,KAA2B,uBAA3B,CACA,MAAOC,MAAP,EAAgBC,UAAhB,CAA4BC,WAA5B,CAAyCC,QAAzC,KAAyD,OAAzD,CAEA,OACEC,kBADF,6BAIA,OAASC,WAAT,kCACA,OAASC,YAAT,gCACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAEA,OAASC,WAAT,sBACA,OAASC,gBAAT,2B,GAIMC,eAAc,CAAGH,EAAE,CAAC,cAAD,C,CAEnBI,aAAa,CAAG,CACpBC,EAAE,CAAE,IADgB,CAEpBC,CAAC,CAAE,IAFiB,CAGpBC,CAAC,CAAE,GAHiB,CAIpBC,CAAC,CAAE,GAJiB,C,CAOhBC,aAAmE,CAAG,CAC1E,QAAS,SADiE,CAE1EC,YAAY,CAAE,SAF4D,CAG1EC,YAAY,CAAE,SAH4D,CAI1EC,KAAK,CAAE,OAJmE,CAK1EC,YAAY,CAAE,OAL4D,CAM1EC,UAAU,CAAE,OAN8D,CAO1EC,UAAU,CAAE,OAP8D,CAQ1EC,KAAK,CAAE,OARmE,CAS1EC,UAAU,CAAE,OAT8D,CAU1EC,UAAU,CAAE,OAV8D,CAW1EC,UAAU,CAAE,SAX8D,CAY1EC,YAAY,CAAE,SAZ4D,CAa1EC,UAAU,CAAE,SAb8D,CAc1EC,KAAK,CAAE,SAdmE,C,CAiB5E,MAAO,IA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AS,CAAE3C,cAAc,CAAC,QAAD,CAAW,CAClCmC,CAAU,CAAGxC,YAAY,CAAC,CAAEiD,IAAI,CAAE,QAAR,CAAD,CAAf,OADwB,CAAX,CAD3B,CAIE,EAAE,CAAC,QAJL,CAKE,KAAK,CAAErB,CALT,CAME,KAAK,CAAEC,CANT,CAOE,IAAI,CAAEvB,aAAa,CAACyB,CAAD,CAPrB,CAQE,IAAI,CAAEpB,aAAa,CAAC2B,CAAD,CARrB,CASE,OAAO,CAAEO,CATX,CAUE,MAAM,CAAEC,CAVV,CAWE,GAAG,CAAEP,CAXP,CAYE,QAAQ,CAAEP,CAZZ,EAZJ,CA2BE,OAAO,CAAEU,CA3BX,GA6BG,CAACF,CAAD,EACC,oBAAC,gBAAD,EACE,SAAS,CAAEnC,cAAc,CAAC,OAAD,CAD3B,CAEE,KAAK,CAAEuB,CAFT,CAGE,KAAK,CAAEC,CAHT,CAIE,QAAQ,CAAEC,CAJZ,CAKE,IAAI,CAAEC,CALR,CAME,QAAQ,CAAEC,CANZ,CAOE,MAAM,CAAEC,CAPV,CAQE,KAAK,CAAEC,CART,CASE,EAAE,CAAEC,CATN,CAUE,IAAI,CAAEC,CAVR,CAWE,IAAI,CAAC,OAXP,CAYE,OAAO,CAAES,CAZX,CAaE,MAAM,CAAEC,CAbV,EA9BJ,CAgDH,CAhFM,CAkFP,MAAO,IAAMI,aAAY,CAAGvD,UAAU,CACpC8B,kBADoC,CAA/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/ColorPicker/ColorControl/index.ts"],"sourcesContent":["export * from './ColorControl';\nexport * from './types';\n"],"mappings":"AAAA,4BACA"}
|