@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
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import { Space } from '../../mixs/MixSpace';
|
|
4
4
|
import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
|
|
5
5
|
export declare const spoilerPropSize: readonly ["xs", "s", "m", "l"];
|
|
6
|
-
export type SpoilerPropSize = typeof spoilerPropSize[number];
|
|
6
|
+
export type SpoilerPropSize = (typeof spoilerPropSize)[number];
|
|
7
7
|
export declare const defaultSpoilerPropSize = "m";
|
|
8
8
|
export declare const spoilerPropButtonAlign: readonly ["left", "center", "right"];
|
|
9
|
-
export type SpoilerPropButtonAlign = typeof spoilerPropButtonAlign[number];
|
|
9
|
+
export type SpoilerPropButtonAlign = (typeof spoilerPropButtonAlign)[number];
|
|
10
10
|
export declare const defaultSpoilerPropButtonAlign: "left";
|
|
11
11
|
export type SpoilerModeProp = 'dots' | 'blur';
|
|
12
12
|
export type SpoilerButtonProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["spoilerPropSize","defaultSpoilerPropSize","spoilerPropButtonAlign","defaultSpoilerPropButtonAlign"],"sources":["../../../../../src/components/Spoiler/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { Space } from '##/mixs/MixSpace';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const spoilerPropSize = ['xs', 's', 'm', 'l'] as const;\nexport type SpoilerPropSize = typeof spoilerPropSize[number];\nexport const defaultSpoilerPropSize = 'm';\n\nexport const spoilerPropButtonAlign = ['left', 'center', 'right'] as const;\nexport type SpoilerPropButtonAlign = typeof spoilerPropButtonAlign[number];\nexport const defaultSpoilerPropButtonAlign = spoilerPropButtonAlign[0];\n\nexport type SpoilerModeProp = 'dots' | 'blur';\n\nexport type SpoilerButtonProps = {\n size?: SpoilerPropSize;\n lessLabel?: string;\n lessIcon?: IconComponent;\n moreLabel?: string;\n moreIcon?: IconComponent;\n open?: boolean;\n};\n\nexport type SpoilerProps = Omit<\n PropsWithHTMLAttributes<\n {\n size?: SpoilerPropSize;\n lessLabel?: string;\n lessIcon?: IconComponent;\n moreLabel?: string;\n moreIcon?: IconComponent;\n buttonIndent?: Space;\n buttonAlign?: SpoilerPropButtonAlign;\n opened?: boolean;\n onOpenButtonClick?: (open: boolean, event: React.MouseEvent) => void;\n },\n HTMLDivElement\n >,\n 'children'\n> &\n (\n | {\n preview: React.ReactNode;\n content: React.ReactNode;\n maxHeight?: never;\n children?: never;\n lineClamp?: never;\n }\n | {\n preview?: never;\n content?: never;\n children: React.ReactNode;\n maxHeight: number;\n lineClamp?: never;\n }\n | {\n preview?: never;\n content?: never;\n children: React.ReactNode;\n maxHeight?: never;\n lineClamp: number;\n }\n );\n\nexport type SpoilerMode = 'lineClamp' | 'blur' | 'toggle';\n"],"mappings":"AAMA,MAAO,IAAMA,gBAAe,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAxB,CAEP,MAAO,IAAMC,uBAAsB,CAAG,GAA/B,CAEP,MAAO,IAAMC,uBAAsB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAA/B,CAEP,MAAO,IAAMC,8BAA6B,CAAGD,sBAAsB,CAAC,CAAD,CAA5D"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["spoilerPropSize","defaultSpoilerPropSize","spoilerPropButtonAlign","defaultSpoilerPropButtonAlign"],"sources":["../../../../../src/components/Spoiler/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { Space } from '##/mixs/MixSpace';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const spoilerPropSize = ['xs', 's', 'm', 'l'] as const;\nexport type SpoilerPropSize = (typeof spoilerPropSize)[number];\nexport const defaultSpoilerPropSize = 'm';\n\nexport const spoilerPropButtonAlign = ['left', 'center', 'right'] as const;\nexport type SpoilerPropButtonAlign = (typeof spoilerPropButtonAlign)[number];\nexport const defaultSpoilerPropButtonAlign = spoilerPropButtonAlign[0];\n\nexport type SpoilerModeProp = 'dots' | 'blur';\n\nexport type SpoilerButtonProps = {\n size?: SpoilerPropSize;\n lessLabel?: string;\n lessIcon?: IconComponent;\n moreLabel?: string;\n moreIcon?: IconComponent;\n open?: boolean;\n};\n\nexport type SpoilerProps = Omit<\n PropsWithHTMLAttributes<\n {\n size?: SpoilerPropSize;\n lessLabel?: string;\n lessIcon?: IconComponent;\n moreLabel?: string;\n moreIcon?: IconComponent;\n buttonIndent?: Space;\n buttonAlign?: SpoilerPropButtonAlign;\n opened?: boolean;\n onOpenButtonClick?: (open: boolean, event: React.MouseEvent) => void;\n },\n HTMLDivElement\n >,\n 'children'\n> &\n (\n | {\n preview: React.ReactNode;\n content: React.ReactNode;\n maxHeight?: never;\n children?: never;\n lineClamp?: never;\n }\n | {\n preview?: never;\n content?: never;\n children: React.ReactNode;\n maxHeight: number;\n lineClamp?: never;\n }\n | {\n preview?: never;\n content?: never;\n children: React.ReactNode;\n maxHeight?: never;\n lineClamp: number;\n }\n );\n\nexport type SpoilerMode = 'lineClamp' | 'blur' | 'toggle';\n"],"mappings":"AAMA,MAAO,IAAMA,gBAAe,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAxB,CAEP,MAAO,IAAMC,uBAAsB,CAAG,GAA/B,CAEP,MAAO,IAAMC,uBAAsB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAA/B,CAEP,MAAO,IAAMC,8BAA6B,CAAGD,sBAAsB,CAAC,CAAD,CAA5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.StepsStep{align-items:center;background-color:transparent;border:none;color:var(--color-control-typo-ghost);cursor:pointer;display:inline-flex;flex:1;font-family:var(--font);font-size:var(--step-text-size);gap:var(--space-2xs);line-height:var(--
|
|
1
|
+
.StepsStep{align-items:center;background-color:transparent;border:none;color:var(--color-control-typo-ghost);cursor:pointer;display:inline-flex;flex:1;font-family:var(--font);font-size:var(--step-text-size);gap:var(--space-2xs);line-height:var(--step-text-line-height);padding:var(--space-xs) var(--step-text-padding-right) var(--space-xs) 0;position:relative;text-align:left;transition:color .2s,font-weight .2s;white-space:nowrap}.StepsStep:after{background-color:var(--color-control-bg-ghost);border-radius:var(--control-radius);bottom:-2px;content:"";height:2px;position:absolute;transition:background-color .2s,opacity .2s;width:100%}.StepsStep:hover{color:var(--color-control-typo-ghost-hover)}.StepsStep:hover:after{background-color:var(--color-control-bg-ghost-hover)}.StepsStep:focus{outline:none}.StepsStep_size_s{--step-text-size:var(--size-text-s);--step-text-padding-right:var(--space-xs);--step-text-line-height:var(--line-height-text-xs)}.StepsStep_size_m{--step-text-padding-right:var(--space-s);--step-text-size:var(--size-text-m);--step-text-line-height:var(--line-height-text-s)}.StepsStep_size_l{--step-text-padding-right:var(--space-s);--step-text-size:var(--size-text-l);--step-text-line-height:var(--line-height-text-s)}.StepsStep_active,.StepsStep_completed,.StepsStep_skipped{color:var(--color-control-typo-secondary)}.StepsStep_active:after,.StepsStep_completed:after,.StepsStep_skipped:after{background-color:var(--color-control-bg-border-secondary);opacity:.5}.StepsStep_active:hover,.StepsStep_completed:hover,.StepsStep_skipped:hover{color:var(--color-control-typo-secondary-hover)}.StepsStep_active:hover:after,.StepsStep_completed:hover:after,.StepsStep_skipped:hover:after{background-color:var(--color-control-bg-border-secondary-hover);opacity:.5}.StepsStep_active{font-weight:var(--font-weight-text-semibold)}.StepsStep_active:after{opacity:1}.StepsStep_active:hover:after{opacity:1}.StepsStep_disabled{color:var(--color-control-typo-disable);cursor:unset}.StepsStep_disabled:after{background-color:var(--color-control-bg-disable)}.StepsStep_disabled:hover{color:var(--color-control-typo-disable)}.StepsStep_disabled:hover:after{background-color:var(--color-control-bg-disable)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
|
|
2
2
|
export declare const stepsSizes: readonly ["m", "s", "l"];
|
|
3
|
-
export type StepsPropSize = typeof stepsSizes[number];
|
|
3
|
+
export type StepsPropSize = (typeof stepsSizes)[number];
|
|
4
4
|
export declare const stepsDefaultSize: StepsPropSize;
|
|
5
5
|
export type StepsPropOnChange<ITEM> = (value: ITEM, props: {
|
|
6
6
|
e: React.MouseEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["stepsSizes","stepsDefaultSize"],"sources":["../../../../../src/components/Steps/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const stepsSizes = ['m', 's', 'l'] as const;\nexport type StepsPropSize = typeof stepsSizes[number];\nexport const stepsDefaultSize: StepsPropSize = stepsSizes[0];\n\nexport type StepsPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type StepsPropGetLabel<ITEM> = (item: ITEM) => string;\nexport type StepsPropGetDisabled<ITEM> = (item: ITEM) => boolean | undefined;\nexport type StepsPropGetSkipped<ITEM> = (item: ITEM) => boolean | undefined;\nexport type StepsPropGetCompleted<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type StepsItemDefault = {\n label: string;\n disabled?: boolean;\n skipped?: boolean;\n completed?: boolean;\n};\n\nexport type StepsProps<ITEM = StepsItemDefault> = PropsWithHTMLAttributesAndRef<\n {\n size?: StepsPropSize;\n items: ITEM[];\n value: ITEM;\n getItemLabel?: StepsPropGetLabel<ITEM>;\n getItemDisabled?: StepsPropGetDisabled<ITEM>;\n getItemCompleted?: StepsPropGetCompleted<ITEM>;\n getItemSkipped?: StepsPropGetSkipped<ITEM>;\n onChange: StepsPropOnChange<ITEM>;\n className?: string;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: StepsItemDefault['label'] }\n ? {}\n : {\n getItemLabel: StepsPropGetLabel<ITEM>;\n });\n\nexport type StepsComponent = <ITEM>(\n props: StepsProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAEA,MAAO,IAAMA,WAAU,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAnB,CAEP,MAAO,IAAMC,iBAA+B,CAAGD,UAAU,CAAC,CAAD,CAAlD"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["stepsSizes","stepsDefaultSize"],"sources":["../../../../../src/components/Steps/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const stepsSizes = ['m', 's', 'l'] as const;\nexport type StepsPropSize = (typeof stepsSizes)[number];\nexport const stepsDefaultSize: StepsPropSize = stepsSizes[0];\n\nexport type StepsPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type StepsPropGetLabel<ITEM> = (item: ITEM) => string;\nexport type StepsPropGetDisabled<ITEM> = (item: ITEM) => boolean | undefined;\nexport type StepsPropGetSkipped<ITEM> = (item: ITEM) => boolean | undefined;\nexport type StepsPropGetCompleted<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type StepsItemDefault = {\n label: string;\n disabled?: boolean;\n skipped?: boolean;\n completed?: boolean;\n};\n\nexport type StepsProps<ITEM = StepsItemDefault> = PropsWithHTMLAttributesAndRef<\n {\n size?: StepsPropSize;\n items: ITEM[];\n value: ITEM;\n getItemLabel?: StepsPropGetLabel<ITEM>;\n getItemDisabled?: StepsPropGetDisabled<ITEM>;\n getItemCompleted?: StepsPropGetCompleted<ITEM>;\n getItemSkipped?: StepsPropGetSkipped<ITEM>;\n onChange: StepsPropOnChange<ITEM>;\n className?: string;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: StepsItemDefault['label'] }\n ? {}\n : {\n getItemLabel: StepsPropGetLabel<ITEM>;\n });\n\nexport type StepsComponent = <ITEM>(\n props: StepsProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAEA,MAAO,IAAMA,WAAU,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,GAAX,CAAnB,CAEP,MAAO,IAAMC,iBAA+B,CAAGD,UAAU,CAAC,CAAD,CAAlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Switch{--switch-border-gap:calc(var(--control-border-width)*4);--switch-circle-size:calc(var(--box-height) - var(--switch-border-gap));cursor:pointer;display:inline-flex;font-family:var(--font-primary);line-height:var(--line-height-text-s);position:relative}.Switch_size_xs{--box-height:var(--control-box-size-m);--switch-font-size:var(--control-text-size-xs);--offset:var(--space-xs);--align-top-margin:0}.Switch_size_s{--box-height:var(--control-box-size-m);--switch-font-size:var(--control-text-size-s);--offset:var(--space-xs);--align-top-margin:var(--space-3xs)}.Switch_size_m{--box-height:var(--control-box-size-l);--switch-font-size:var(--control-text-size-m);--offset:var(--space-xs);--align-top-margin:0}.Switch_size_l{--box-height:var(--space-xl);--switch-font-size:var(--control-text-size-l);--offset:var(--space-s);--align-top-margin:var(--space-3xs)}.Switch_view_primary:hover .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default-hover);--background-color:transparent;--content-color:var(--color-control-bg-border-default-hover)}.Switch_view_primary .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default);--background-color:transparent;--content-color:var(--color-control-bg-border-default)}.Switch_view_primary:hover .Switch-Input:checked{--border-color:var(--color-control-bg-primary-hover);--background-color:var(--color-control-bg-primary-hover);--content-color:var(--color-control-typo-primary-hover)}.Switch_view_primary .Switch-Input:checked{--border-color:var(--color-control-bg-primary);--background-color:var(--color-control-bg-primary);--content-color:var(--color-control-typo-primary)}.Switch_view_ghost:hover .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default-hover);--background-color:transparent;--content-color:var(--color-control-bg-border-default-hover)}.Switch_view_ghost .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default);--background-color:transparent;--content-color:var(--color-control-bg-border-default)}.Switch_view_ghost:hover .Switch-Input:checked{--border-color:var(--color-control-bg-border-default-hover);--background-color:var(--color-control-bg-ghost-hover);--content-color:var(--color-control-typo-ghost-hover)}.Switch_view_ghost .Switch-Input:checked{--border-color:var(--color-control-bg-border-default);--background-color:var(--color-control-bg-ghost);--content-color:var(--color-control-typo-ghost)}.Switch-Input{align-items:center;-webkit-appearance:none;background-color:var(--background-color);border:var(--control-border-width) solid var(--border-color);border-radius:99rem;box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:var(--box-height);margin:0;position:relative;transition:background-color .15s,border-color .15s;width:calc(var(--box-height)*2 - var(--switch-border-gap))}.Switch-Input:before{background-color:var(--content-color);border-radius:999rem;box-sizing:border-box;content:"";height:var(--switch-circle-size);position:absolute;right:1px;transform:translateX(calc((var(--box-height) - var(--switch-border-gap))*-1));transition:transform .15s,background-color .15s;width:var(--switch-circle-size)}.Switch-Input:checked{background-color:var(--background-color)}.Switch-Input:checked:before{transform:translateX(0)}.Switch-Label{color:var(--color-control-typo-default);font-size:var(--switch-font-size);margin-left:var(--offset)}.Switch_disabled{pointer-events:none}.Switch_disabled .Switch-Input:disabled{--border-color:transparent;--background-color:var(--color-control-bg-disable);--content-color:var(--color-control-typo-disable)}.Switch_disabled .Switch-Input:disabled~.Switch-Label{color:var(--color-control-typo-disable)}.Switch_align_center{align-items:center}.Switch_align_top{align-items:
|
|
1
|
+
.Switch{--switch-border-gap:calc(var(--control-border-width)*4);--switch-circle-size:calc(var(--box-height) - var(--switch-border-gap));cursor:pointer;display:inline-flex;font-family:var(--font-primary);line-height:var(--line-height-text-s);position:relative}.Switch_size_xs{--box-height:var(--control-box-size-m);--switch-font-size:var(--control-text-size-xs);--offset:var(--space-xs);--align-top-margin:0}.Switch_size_s{--box-height:var(--control-box-size-m);--switch-font-size:var(--control-text-size-s);--offset:var(--space-xs);--align-top-margin:var(--space-3xs)}.Switch_size_m{--box-height:var(--control-box-size-l);--switch-font-size:var(--control-text-size-m);--offset:var(--space-xs);--align-top-margin:0}.Switch_size_l{--box-height:var(--space-xl);--switch-font-size:var(--control-text-size-l);--offset:var(--space-s);--align-top-margin:var(--space-3xs)}.Switch_view_primary:hover .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default-hover);--background-color:transparent;--content-color:var(--color-control-bg-border-default-hover)}.Switch_view_primary .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default);--background-color:transparent;--content-color:var(--color-control-bg-border-default)}.Switch_view_primary:hover .Switch-Input:checked{--border-color:var(--color-control-bg-primary-hover);--background-color:var(--color-control-bg-primary-hover);--content-color:var(--color-control-typo-primary-hover)}.Switch_view_primary .Switch-Input:checked{--border-color:var(--color-control-bg-primary);--background-color:var(--color-control-bg-primary);--content-color:var(--color-control-typo-primary)}.Switch_view_ghost:hover .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default-hover);--background-color:transparent;--content-color:var(--color-control-bg-border-default-hover)}.Switch_view_ghost .Switch-Input:not(:checked){--border-color:var(--color-control-bg-border-default);--background-color:transparent;--content-color:var(--color-control-bg-border-default)}.Switch_view_ghost:hover .Switch-Input:checked{--border-color:var(--color-control-bg-border-default-hover);--background-color:var(--color-control-bg-ghost-hover);--content-color:var(--color-control-typo-ghost-hover)}.Switch_view_ghost .Switch-Input:checked{--border-color:var(--color-control-bg-border-default);--background-color:var(--color-control-bg-ghost);--content-color:var(--color-control-typo-ghost)}.Switch-Input{align-items:center;-webkit-appearance:none;background-color:var(--background-color);border:var(--control-border-width) solid var(--border-color);border-radius:99rem;box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:var(--box-height);margin:0;position:relative;transition:background-color .15s,border-color .15s;width:calc(var(--box-height)*2 - var(--switch-border-gap))}.Switch-Input:before{background-color:var(--content-color);border-radius:999rem;box-sizing:border-box;content:"";height:var(--switch-circle-size);position:absolute;right:1px;transform:translateX(calc((var(--box-height) - var(--switch-border-gap))*-1));transition:transform .15s,background-color .15s;width:var(--switch-circle-size)}.Switch-Input:checked{background-color:var(--background-color)}.Switch-Input:checked:before{transform:translateX(0)}.Switch-Label{color:var(--color-control-typo-default);font-size:var(--switch-font-size);margin-left:var(--offset)}.Switch_disabled{pointer-events:none}.Switch_disabled .Switch-Input:disabled{--border-color:transparent;--background-color:var(--color-control-bg-disable);--content-color:var(--color-control-typo-disable)}.Switch_disabled .Switch-Input:disabled~.Switch-Label{color:var(--color-control-typo-disable)}.Switch_align_center{align-items:center}.Switch_align_top{align-items:start}.Switch_align_top .Switch-Input{margin-top:var(--align-top-margin)}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
|
|
2
2
|
export declare const switchPropSize: readonly ["m", "xs", "s", "l"];
|
|
3
|
-
export type SwitchPropSize = typeof switchPropSize[number];
|
|
3
|
+
export type SwitchPropSize = (typeof switchPropSize)[number];
|
|
4
4
|
export declare const switchPropSizeDefault: SwitchPropSize;
|
|
5
5
|
export declare const switchPropView: readonly ["primary", "ghost"];
|
|
6
|
-
export type SwitchPropView = typeof switchPropView[number];
|
|
6
|
+
export type SwitchPropView = (typeof switchPropView)[number];
|
|
7
7
|
export declare const switchPropViewDefault: SwitchPropView;
|
|
8
8
|
export declare const switchPropAlign: readonly ["center", "top"];
|
|
9
|
-
export type SwitchPropAlign = typeof switchPropAlign[number];
|
|
9
|
+
export type SwitchPropAlign = (typeof switchPropAlign)[number];
|
|
10
10
|
export declare const switchPropAlignDefault: SwitchPropAlign;
|
|
11
11
|
export declare const switchPropOnChangeDefault: () => void;
|
|
12
12
|
export type SwitchPropOnChange = (checked: boolean, params: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["switchPropSize","switchPropSizeDefault","switchPropView","switchPropViewDefault","switchPropAlign","switchPropAlignDefault","switchPropOnChangeDefault"],"sources":["../../../../../src/components/Switch/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const switchPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type SwitchPropSize = typeof switchPropSize[number];\nexport const switchPropSizeDefault: SwitchPropSize = switchPropSize[0];\n\nexport const switchPropView = ['primary', 'ghost'] as const;\nexport type SwitchPropView = typeof switchPropView[number];\nexport const switchPropViewDefault: SwitchPropView = switchPropView[0];\n\nexport const switchPropAlign = ['center', 'top'] as const;\nexport type SwitchPropAlign = typeof switchPropAlign[number];\nexport const switchPropAlignDefault: SwitchPropAlign = switchPropAlign[0];\n\nexport const switchPropOnChangeDefault = () => {};\n\nexport type SwitchPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchProps = PropsWithHTMLAttributes<\n {\n checked: boolean | undefined;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n align?: SwitchPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: React.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 inputId?: string;\n },\n HTMLLabelElement\n>;\n"],"mappings":"AAEA,MAAO,IAAMA,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,CAAC,SAAD,CAAY,OAAZ,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,QAAD,CAAW,KAAX,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,0BAAyB,CAAG,UAAM,CAAE,CAA1C"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["switchPropSize","switchPropSizeDefault","switchPropView","switchPropViewDefault","switchPropAlign","switchPropAlignDefault","switchPropOnChangeDefault"],"sources":["../../../../../src/components/Switch/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const switchPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type SwitchPropSize = (typeof switchPropSize)[number];\nexport const switchPropSizeDefault: SwitchPropSize = switchPropSize[0];\n\nexport const switchPropView = ['primary', 'ghost'] as const;\nexport type SwitchPropView = (typeof switchPropView)[number];\nexport const switchPropViewDefault: SwitchPropView = switchPropView[0];\n\nexport const switchPropAlign = ['center', 'top'] as const;\nexport type SwitchPropAlign = (typeof switchPropAlign)[number];\nexport const switchPropAlignDefault: SwitchPropAlign = switchPropAlign[0];\n\nexport const switchPropOnChangeDefault = () => {};\n\nexport type SwitchPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchProps = PropsWithHTMLAttributes<\n {\n checked: boolean | undefined;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n align?: SwitchPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: React.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 inputId?: string;\n },\n HTMLLabelElement\n>;\n"],"mappings":"AAEA,MAAO,IAAMA,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,CAAC,SAAD,CAAY,OAAZ,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,QAAD,CAAW,KAAX,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,0BAAyB,CAAG,UAAM,CAAE,CAA1C"}
|
|
@@ -5,7 +5,7 @@ export type SwitchGroupDefaultItem = {
|
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare const switchGroupDirections: readonly ["column", "row"];
|
|
8
|
-
export type SwitchGroupDirection = typeof switchGroupDirections[number];
|
|
8
|
+
export type SwitchGroupDirection = (typeof switchGroupDirections)[number];
|
|
9
9
|
export declare const switchGroupDefaultDirection: SwitchGroupDirection;
|
|
10
10
|
export type SwitchGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;
|
|
11
11
|
export type SwitchGroupPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["switchGroupDirections","switchGroupDefaultDirection"],"sources":["../../../../../src/components/SwitchGroup/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport { SwitchPropSize, SwitchPropView } from '../Switch/types';\n\nexport type SwitchGroupDefaultItem = {\n label: string;\n disabled?: boolean;\n};\n\nexport const switchGroupDirections = ['column', 'row'] as const;\nexport type SwitchGroupDirection = typeof switchGroupDirections[number];\nexport const switchGroupDefaultDirection: SwitchGroupDirection =\n switchGroupDirections[0];\n\nexport type SwitchGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type SwitchGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type SwitchGroupPropOnChange<ITEM> = (\n value: ITEM[] | null,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchGroupProps<ITEM = SwitchGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n value?: ITEM[] | null;\n items: ITEM[];\n getItemLabel?: SwitchGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: SwitchGroupPropGetItemDisabled<ITEM>;\n onChange?: SwitchGroupPropOnChange<ITEM>;\n name: string;\n direction?: SwitchGroupDirection;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: SwitchGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: SwitchGroupPropGetItemLabel<ITEM>;\n });\n\nexport type SwitchGroupComponent = <ITEM>(\n props: SwitchGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAQA,MAAO,IAAMA,sBAAqB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA9B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,qBAAqB,CAAC,CAAD,CADhB"}
|
|
1
|
+
{"version":3,"file":"types.js","names":["switchGroupDirections","switchGroupDefaultDirection"],"sources":["../../../../../src/components/SwitchGroup/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport { SwitchPropSize, SwitchPropView } from '../Switch/types';\n\nexport type SwitchGroupDefaultItem = {\n label: string;\n disabled?: boolean;\n};\n\nexport const switchGroupDirections = ['column', 'row'] as const;\nexport type SwitchGroupDirection = (typeof switchGroupDirections)[number];\nexport const switchGroupDefaultDirection: SwitchGroupDirection =\n switchGroupDirections[0];\n\nexport type SwitchGroupPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type SwitchGroupPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type SwitchGroupPropOnChange<ITEM> = (\n value: ITEM[] | null,\n props: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchGroupProps<ITEM = SwitchGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n value?: ITEM[] | null;\n items: ITEM[];\n getItemLabel?: SwitchGroupPropGetItemLabel<ITEM>;\n getItemDisabled?: SwitchGroupPropGetItemDisabled<ITEM>;\n onChange?: SwitchGroupPropOnChange<ITEM>;\n name: string;\n direction?: SwitchGroupDirection;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n disabled?: boolean;\n className?: string;\n },\n HTMLDivElement\n > &\n (ITEM extends { label: SwitchGroupDefaultItem['label'] }\n ? {}\n : {\n getItemLabel: SwitchGroupPropGetItemLabel<ITEM>;\n });\n\nexport type SwitchGroupComponent = <ITEM>(\n props: SwitchGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAQA,MAAO,IAAMA,sBAAqB,CAAG,CAAC,QAAD,CAAW,KAAX,CAA9B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,qBAAqB,CAAC,CAAD,CADhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.TableCell{--buttons-wrapper-size:0px;background-color:var(--color-bg-default);box-sizing:border-box;color:var(--color-typo-primary);grid-column-end:var(--table-cell-col-end);grid-column-start:var(--table-cell-col-start);grid-row-end:var(--row-span);z-index:var(--table-z)}.TableCell_withoutBorder{border:none}.TableCell_isHeader{border-bottom:1px solid var(--color-bg-border);font-size:var(--size-text-xs);font-weight:var(--font-weight-text-bold);letter-spacing:.05em;line-height:var(--line-height-text-s);position:relative;text-transform:uppercase}.TableCell:not(.TableCell_isHeader){font-size:var(--size-text-s);line-height:var(--line-height-text-s)}.TableCell_isResized{
|
|
1
|
+
.TableCell{--buttons-wrapper-size:0px;background-color:var(--color-bg-default);box-sizing:border-box;color:var(--color-typo-primary);grid-column-end:var(--table-cell-col-end);grid-column-start:var(--table-cell-col-start);grid-row-end:var(--row-span);z-index:var(--table-z)}.TableCell_withoutBorder{border:none}.TableCell_isHeader{border-bottom:1px solid var(--color-bg-border);font-size:var(--size-text-xs);font-weight:var(--font-weight-text-bold);letter-spacing:.05em;line-height:var(--line-height-text-s);position:relative;text-transform:uppercase}.TableCell:not(.TableCell_isHeader){font-size:var(--size-text-s);line-height:var(--line-height-text-s)}.TableCell_isResized{overflow-wrap:break-word}.TableCell_isClickable{cursor:pointer}.TableCell_isControl,.TableCell_isFilterable,.TableCell_isSortable{--buttons-wrapper-size:var(--space-xl)}.TableCell_isFilterable.TableCell_isControl,.TableCell_isSortable.TableCell_isControl,.TableCell_isSortable.TableCell_isFilterable{--buttons-wrapper-size:var(--space-4xl)}.TableCell_isSortable.TableCell_isFilterable.TableCell_isControl{--buttons-wrapper-size:var(--space-5xl)}.TableCell_stickyOnLeft,.TableCell_stickyOnTop{position:sticky}.TableCell_stickyOnLeft.TableCell_isResizer,.TableCell_stickyOnTop.TableCell_isResizer{z-index:calc(var(--sticky-top-and-left-z) + 1)}.TableCell_stickyOnTop{top:0;z-index:var(--sticky-top-z)}.TableCell_stickyOnLeft{left:0;z-index:var(--sticky-left-z)}.TableCell_stickyOnLeft.TableCell_isHeader{z-index:var(--sticky-top-and-left-z)}.TableCell_isBorderTop{border-top:var(--table-border)}.TableCell_isBorderLeft{border-left:var(--table-border)}.TableCell-Wrapper{box-sizing:border-box;display:flex;height:100%;padding:var(--cell-padding-vertical) var(--cell-padding-horizontal);padding-right:calc(var(--cell-padding-horizontal) + var(--resizer-width) + var(--buttons-wrapper-size));position:relative}.TableCell-Wrapper_wrap_truncate{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TableCell-Wrapper_wrap_break{max-width:100%;overflow-wrap:break-word;white-space:pre-wrap}.TableCell-Wrapper_withoutPadding{padding:0}.TableCell-Wrapper_verticalAlign_top{align-items:flex-start}.TableCell-Wrapper_verticalAlign_center{align-items:center}.TableCell-Wrapper_verticalAlign_bottom{align-items:flex-end}.TableCell-Wrapper_horizontalAlign_left{justify-content:flex-start}.TableCell-Wrapper_horizontalAlign_center{justify-content:center;text-align:center}.TableCell-Wrapper_horizontalAlign_right{justify-content:flex-end;text-align:right}.TableCell_stickyOnLeft .TableCell-Wrapper:after{background:linear-gradient(90deg,var(--shadow-color),transparent);bottom:0;content:"";opacity:0;pointer-events:none;position:absolute;right:0;top:0;transform:translateX(100%);transition:opacity var(--fast-transition);width:var(--space-s)}.TableCell_stickyOnLeft.TableCell_showVerticalShadow .TableCell-Wrapper:after{opacity:1}.TableCell_isHeader:hover .TableCell-Wrapper{background:var(--color-bg-stripe)}
|
|
@@ -2,9 +2,9 @@ import './TableCell.css';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TableColumn, TableRow } from '../Table';
|
|
4
4
|
export declare const verticalAligns: readonly ["top", "center", "bottom"];
|
|
5
|
-
export type VerticalAlign = typeof verticalAligns[number];
|
|
5
|
+
export type VerticalAlign = (typeof verticalAligns)[number];
|
|
6
6
|
export declare const horizontalAligns: readonly ["left", "center", "right"];
|
|
7
|
-
export type HorizontalAlign = typeof horizontalAligns[number];
|
|
7
|
+
export type HorizontalAlign = (typeof horizontalAligns)[number];
|
|
8
8
|
type Props<T extends TableRow> = {
|
|
9
9
|
column: TableColumn<T> & {
|
|
10
10
|
isSticky?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.js","names":["React","cn","cnTableCell","verticalAligns","horizontalAligns","getCellClasses","props","column","showVerticalShadow","className","isSticky","isResized","type","isSortable","sortable","isHeader","isResizer","stickyOnTop","stickyOnLeft","isFilterable","filterable","isControl","control","withoutBorder","isClickable","isBorderTop","isBorderLeft","getWrapperClasses","wrapperClassName","withoutPadding","verticalAlign","horizontalAlign","align","wrap","TableCell","forwardRef","ref","style","onClick","onContextMenu","children","propsWithRole","role"],"sources":["../../../../../../src/components/Table/Cell/TableCell.tsx"],"sourcesContent":["import './TableCell.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { TableColumn, TableRow } from '../Table';\n\nconst cnTableCell = cn('TableCell');\n\nexport const verticalAligns = ['top', 'center', 'bottom'] as const;\nexport type VerticalAlign = typeof verticalAligns[number];\nexport const horizontalAligns = ['left', 'center', 'right'] as const;\nexport type HorizontalAlign = typeof horizontalAligns[number];\n\ntype Props<T extends TableRow> = {\n column: TableColumn<T> & {\n isSticky?: boolean;\n isResized?: boolean;\n filterable?: boolean;\n };\n onClick?: (e: React.SyntheticEvent) => void;\n onContextMenu?: (e: React.SyntheticEvent) => void;\n style?: React.CSSProperties;\n className?: string;\n wrapperClassName?: string;\n children: React.ReactNode;\n wrap?: 'truncate' | 'break';\n showVerticalShadow?: boolean;\n verticalAlign?: VerticalAlign;\n} & (\n | {\n type: 'header';\n isSticky?: boolean;\n isResized?: boolean;\n }\n | {\n type: 'content';\n isClickable?: boolean;\n isBorderTop?: boolean;\n isBorderLeft?: boolean;\n }\n | {\n type: 'resizer';\n }\n) &\n React.RefAttributes<HTMLDivElement>;\n\ntype TableCell = <T extends TableRow>(\n props: Props<T>,\n) => React.ReactNode | null;\n\nconst getCellClasses = <T extends TableRow>(props: Props<T>): string => {\n const { column, showVerticalShadow, className } = props;\n\n return cnTableCell(\n {\n showVerticalShadow,\n isSticky: column.isSticky,\n isResized: props.type === 'header' ? props.isResized : column.isResized,\n isSortable: column.sortable,\n isHeader: props.type === 'header',\n isResizer: props.type === 'resizer',\n stickyOnTop:\n (props.type === 'header' && props.isSticky) || props.type === 'resizer',\n stickyOnLeft: column.isSticky,\n isFilterable: column.filterable,\n isControl: Boolean(column.control),\n withoutBorder: props.type === 'resizer',\n isClickable: 'isClickable' in props && props.isClickable,\n isBorderTop: 'isBorderTop' in props && props.isBorderTop,\n isBorderLeft: 'isBorderLeft' in props && props.isBorderLeft,\n },\n [className],\n );\n};\n\nconst getWrapperClasses = <T extends TableRow>(props: Props<T>): string => {\n const { column, wrapperClassName } = props;\n\n return cnTableCell(\n 'Wrapper',\n {\n withoutPadding: column.withoutPadding || props.type === 'resizer',\n verticalAlign: props.verticalAlign,\n horizontalAlign: column.align,\n isHeader: props.type === 'header',\n wrap: props.wrap,\n },\n [wrapperClassName],\n );\n};\n\nexport const TableCell: TableCell = React.forwardRef((props, ref) => {\n const { style, onClick, onContextMenu, children } = props;\n\n const propsWithRole = onClick\n ? {\n role: 'button',\n onClick,\n }\n : {\n role: 'cell',\n };\n\n return (\n <div\n {...propsWithRole}\n onContextMenu={onContextMenu}\n ref={ref}\n className={getCellClasses(props)}\n style={style}\n >\n <div className={getWrapperClasses(props)}>{children}</div>\n </div>\n );\n});\n"],"mappings":"AAAA,wBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,0BAGA,GAAMC,YAAW,CAAGD,EAAE,CAAC,WAAD,CAAtB,CAEA,MAAO,IAAME,eAAc,CAAG,CAAC,KAAD,CAAQ,QAAR,CAAkB,QAAlB,CAAvB,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAAzB,C,GAwCDC,eAAc,CAAG,SAAqBC,CAArB,CAAiD,CACtE,GAAQC,EAAR,CAAkDD,CAAlD,CAAQC,MAAR,CAAgBC,CAAhB,CAAkDF,CAAlD,CAAgBE,kBAAhB,CAAoCC,CAApC,CAAkDH,CAAlD,CAAoCG,SAApC,CAEA,MAAOP,YAAW,CAChB,CACEM,kBAAkB,CAAlBA,CADF,CAEEE,QAAQ,CAAEH,CAAM,CAACG,QAFnB,CAGEC,SAAS,CAAiB,QAAf,GAAAL,CAAK,CAACM,IAAN,CAA0BN,CAAK,CAACK,SAAhC,CAA4CJ,CAAM,CAACI,SAHhE,CAIEE,UAAU,CAAEN,CAAM,CAACO,QAJrB,CAKEC,QAAQ,CAAiB,QAAf,GAAAT,CAAK,CAACM,IALlB,CAMEI,SAAS,CAAiB,SAAf,GAAAV,CAAK,CAACM,IANnB,CAOEK,WAAW,CACO,QAAf,GAAAX,CAAK,CAACM,IAAN,EAA2BN,CAAK,CAACI,QAAlC,EAA8D,SAAf,GAAAJ,CAAK,CAACM,IARzD,CASEM,YAAY,CAAEX,CAAM,CAACG,QATvB,CAUES,YAAY,CAAEZ,CAAM,CAACa,UAVvB,CAWEC,SAAS,GAAUd,CAAM,CAACe,OAX5B,CAYEC,aAAa,CAAiB,SAAf,GAAAjB,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CAAE/B,cAAc,CAACC,CAAD,CAJ3B,CAKE,KAAK,CAAE+B,CALT,GAOE,2BAAK,SAAS,CAAEV,iBAAiB,CAACrB,CAAD,CAAjC,EAA2CkC,CAA3C,CAPF,CAUH,CAvBmC,CAA7B"}
|
|
1
|
+
{"version":3,"file":"TableCell.js","names":["React","cn","cnTableCell","verticalAligns","horizontalAligns","getCellClasses","props","column","showVerticalShadow","className","isSticky","isResized","type","isSortable","sortable","isHeader","isResizer","stickyOnTop","stickyOnLeft","isFilterable","filterable","isControl","control","withoutBorder","isClickable","isBorderTop","isBorderLeft","getWrapperClasses","wrapperClassName","withoutPadding","verticalAlign","horizontalAlign","align","wrap","TableCell","forwardRef","ref","style","onClick","onContextMenu","children","propsWithRole","role"],"sources":["../../../../../../src/components/Table/Cell/TableCell.tsx"],"sourcesContent":["import './TableCell.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { TableColumn, TableRow } from '../Table';\n\nconst cnTableCell = cn('TableCell');\n\nexport const verticalAligns = ['top', 'center', 'bottom'] as const;\nexport type VerticalAlign = (typeof verticalAligns)[number];\nexport const horizontalAligns = ['left', 'center', 'right'] as const;\nexport type HorizontalAlign = (typeof horizontalAligns)[number];\n\ntype Props<T extends TableRow> = {\n column: TableColumn<T> & {\n isSticky?: boolean;\n isResized?: boolean;\n filterable?: boolean;\n };\n onClick?: (e: React.SyntheticEvent) => void;\n onContextMenu?: (e: React.SyntheticEvent) => void;\n style?: React.CSSProperties;\n className?: string;\n wrapperClassName?: string;\n children: React.ReactNode;\n wrap?: 'truncate' | 'break';\n showVerticalShadow?: boolean;\n verticalAlign?: VerticalAlign;\n} & (\n | {\n type: 'header';\n isSticky?: boolean;\n isResized?: boolean;\n }\n | {\n type: 'content';\n isClickable?: boolean;\n isBorderTop?: boolean;\n isBorderLeft?: boolean;\n }\n | {\n type: 'resizer';\n }\n) &\n React.RefAttributes<HTMLDivElement>;\n\ntype TableCell = <T extends TableRow>(\n props: Props<T>,\n) => React.ReactNode | null;\n\nconst getCellClasses = <T extends TableRow>(props: Props<T>): string => {\n const { column, showVerticalShadow, className } = props;\n\n return cnTableCell(\n {\n showVerticalShadow,\n isSticky: column.isSticky,\n isResized: props.type === 'header' ? props.isResized : column.isResized,\n isSortable: column.sortable,\n isHeader: props.type === 'header',\n isResizer: props.type === 'resizer',\n stickyOnTop:\n (props.type === 'header' && props.isSticky) || props.type === 'resizer',\n stickyOnLeft: column.isSticky,\n isFilterable: column.filterable,\n isControl: Boolean(column.control),\n withoutBorder: props.type === 'resizer',\n isClickable: 'isClickable' in props && props.isClickable,\n isBorderTop: 'isBorderTop' in props && props.isBorderTop,\n isBorderLeft: 'isBorderLeft' in props && props.isBorderLeft,\n },\n [className],\n );\n};\n\nconst getWrapperClasses = <T extends TableRow>(props: Props<T>): string => {\n const { column, wrapperClassName } = props;\n\n return cnTableCell(\n 'Wrapper',\n {\n withoutPadding: column.withoutPadding || props.type === 'resizer',\n verticalAlign: props.verticalAlign,\n horizontalAlign: column.align,\n isHeader: props.type === 'header',\n wrap: props.wrap,\n },\n [wrapperClassName],\n );\n};\n\nexport const TableCell: TableCell = React.forwardRef((props, ref) => {\n const { style, onClick, onContextMenu, children } = props;\n\n const propsWithRole = onClick\n ? {\n role: 'button',\n onClick,\n }\n : {\n role: 'cell',\n };\n\n return (\n <div\n {...propsWithRole}\n onContextMenu={onContextMenu}\n ref={ref}\n className={getCellClasses(props)}\n style={style}\n >\n <div className={getWrapperClasses(props)}>{children}</div>\n </div>\n );\n});\n"],"mappings":"AAAA,wBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,0BAGA,GAAMC,YAAW,CAAGD,EAAE,CAAC,WAAD,CAAtB,CAEA,MAAO,IAAME,eAAc,CAAG,CAAC,KAAD,CAAQ,QAAR,CAAkB,QAAlB,CAAvB,CAEP,MAAO,IAAMC,iBAAgB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAAzB,C,GAwCDC,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B,CACE2B,cAAc,CAAEtB,CAAM,CAACsB,cAAP,EAAwC,SAAf,GAAAvB,CAAK,CAACM,IADjD,CAEEkB,aAAa,CAAExB,CAAK,CAACwB,aAFvB,CAGEC,eAAe,CAAExB,CAAM,CAACyB,KAH1B,CAIEjB,QAAQ,CAAiB,QAAf,GAAAT,CAAK,CAACM,IAJlB,CAKEqB,IAAI,CAAE3B,CAAK,CAAC2B,IALd,CAFgB,CAShB,CAACL,CAAD,CATgB,CAWnB,C,CAED,MAAO,IAAMM,UAAoB,CAAGlC,KAAK,CAACmC,UAAN,CAAiB,SAAC7B,CAAD,CAAQ8B,CAAR,CAAgB,IAC3DC,EAD2D,CACf/B,CADe,CAC3D+B,KAD2D,CACpDC,CADoD,CACfhC,CADe,CACpDgC,OADoD,CAC3CC,CAD2C,CACfjC,CADe,CAC3CiC,aAD2C,CAC5BC,CAD4B,CACflC,CADe,CAC5BkC,QAD4B,CAG7DC,CAAa,CAAGH,CAAO,CACzB,CACEI,IAAI,CAAE,QADR,CAEEJ,OAAO,CAAPA,CAFF,CADyB,CAKzB,CACEI,IAAI,CAAE,MADR,CAR+D,CAYnE,MACE,4CACMD,CADN,EAEE,aAAa,CAAEF,CAFjB,CAGE,GAAG,CAAEH,CAHP,CAIE,SAAS,CAAE/B,cAAc,CAACC,CAAD,CAJ3B,CAKE,KAAK,CAAE+B,CALT,GAOE,2BAAK,SAAS,CAAEV,iBAAiB,CAACrB,CAAD,CAAjC,EAA2CkC,CAA3C,CAPF,CAUH,CAvBmC,CAA7B"}
|
|
@@ -4,7 +4,7 @@ import { FieldSelectedValues, Filters, SelectedFilters } from '../filtering';
|
|
|
4
4
|
import { Header } from '../helpers';
|
|
5
5
|
import { ColumnMetaData, HeaderVerticalAlign, onCellClick, TableColumn, TableRow } from '../Table';
|
|
6
6
|
export declare const levelTypes: readonly ["high", "low", "default"];
|
|
7
|
-
export type LevelType = typeof levelTypes[number];
|
|
7
|
+
export type LevelType = (typeof levelTypes)[number];
|
|
8
8
|
type Props<T extends TableRow> = {
|
|
9
9
|
isStickyHeader: boolean;
|
|
10
10
|
headersWithMetaData: Array<Header<T> & ColumnMetaData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.js","names":["React","cn","Button","TableCell","getOptionsForFilters","TableFilterTooltip","cnTableHeader","levelTypes","TableHeader","isStickyHeader","headersWithMetaData","headerRowsHeights","headerRowsRefs","getStickyLeftOffset","stickyColumnsGrid","showVerticalCellShadow","headerVerticalAlign","getSortIcon","handleSortClick","handleFilterTogglerClick","handleCellClick","handleTooltipSave","filters","visibleFilter","selectedFilters","showHorizontalCellShadow","borderBetweenColumns","tableHeaderHeight","reduce","a","b","tableHeaderStyle","getLevelType","column","position","colSpan","smallTextSize","isColumnResized","headers","build","header","columns","forEach","col","find","head","title","push","some","isResized","getFilterPopover","accessor","curFilter","field","FilterComponent","component","name","filterComponentProps","props","onToggle","filterId","id","filterable","selected","type","handleFilterSave","filterValue","value","control","withVerticalBorder","map","columnIdx","style","gridColumnEnd","rowSpan","gridRowEnd","top","slice","level","ref","current","left","gridIndex","topHeaderGridIndex","e","isFirstColumn","isFirst","isFirstRow","isLastInColumn","isSortingActive","isFilterActive","verticalAlign","sortable","show"],"sources":["../../../../../../src/components/Table/Header/TableHeader.tsx"],"sourcesContent":["import './TableHeader.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { Button } from '../../Button/Button';\nimport { TableCell } from '../Cell/TableCell';\nimport {\n FieldSelectedValues,\n Filters,\n getOptionsForFilters,\n SelectedFilters,\n} from '../filtering';\nimport { TableFilterTooltip } from '../FilterTooltip/TableFilterTooltip';\nimport { Header } from '../helpers';\nimport {\n ColumnMetaData,\n HeaderVerticalAlign,\n onCellClick,\n TableColumn,\n TableRow,\n} from '../Table';\n\nconst cnTableHeader = cn('TableHeader');\n\ntype TableCSSCustomProperty = {\n '--table-header-height': string;\n};\n\nexport const levelTypes = ['high', 'low', 'default'] as const;\nexport type LevelType = typeof levelTypes[number];\n\ntype Props<T extends TableRow> = {\n isStickyHeader: boolean;\n headersWithMetaData: Array<Header<T> & ColumnMetaData>;\n headerRowsHeights: Array<number>;\n headerRowsRefs: React.MutableRefObject<Record<number, HTMLDivElement | null>>;\n getStickyLeftOffset: (\n columnIndex: number,\n topHeaderGridIndex: number,\n ) => number | undefined;\n stickyColumnsGrid: number;\n showVerticalCellShadow: boolean;\n headerVerticalAlign: HeaderVerticalAlign;\n getSortIcon: (column: Header<T>) => React.FC;\n handleSortClick: (column: TableColumn<T>) => void;\n handleFilterTogglerClick: (id: string) => () => void;\n handleCellClick: onCellClick;\n handleTooltipSave: (\n field: string,\n tooltipSelectedFilters: FieldSelectedValues,\n value?: unknown,\n ) => void;\n filters: Filters<T> | undefined;\n visibleFilter: string | null;\n selectedFilters: SelectedFilters;\n showHorizontalCellShadow: boolean;\n borderBetweenColumns: boolean;\n};\n\nexport const TableHeader = <T extends TableRow>({\n isStickyHeader,\n headersWithMetaData,\n headerRowsHeights,\n headerRowsRefs,\n getStickyLeftOffset,\n stickyColumnsGrid,\n showVerticalCellShadow,\n headerVerticalAlign,\n getSortIcon,\n handleSortClick,\n handleFilterTogglerClick,\n handleCellClick,\n handleTooltipSave,\n filters,\n visibleFilter,\n selectedFilters,\n showHorizontalCellShadow,\n borderBetweenColumns,\n}: Props<T>): React.ReactNode => {\n const tableHeaderHeight = headerRowsHeights.reduce(\n (a: number, b: number) => a + b,\n 0,\n );\n const tableHeaderStyle: React.CSSProperties & TableCSSCustomProperty = {\n '--table-header-height': `${tableHeaderHeight}px`,\n };\n const getLevelType = (column: Header<T> & ColumnMetaData): LevelType => {\n if (Number(column.position!.colSpan) >= 1) return 'high';\n if (column.position?.smallTextSize) return 'low';\n return 'default';\n };\n const isColumnResized = (column: Header<T> & ColumnMetaData): boolean => {\n const headers: Array<Header<T> & ColumnMetaData> = [];\n const build = (header: Header<T> & ColumnMetaData) => {\n if (!header.columns) {\n headers.push(header);\n } else {\n header.columns.forEach((col) =>\n build(\n headersWithMetaData.find(\n (head) => head.title === col.title,\n ) as Header<T> & ColumnMetaData,\n ),\n );\n }\n };\n build(column);\n return headers.some((header) => header.isResized);\n };\n\n const getFilterPopover = (\n column: Header<T> & ColumnMetaData,\n ): React.ReactNode => {\n if (!filters || !column.accessor) {\n return null;\n }\n const curFilter = filters.find(({ field }) => field === column.accessor);\n const FilterComponent = curFilter?.component?.name;\n const filterComponentProps = curFilter?.component?.props ?? {};\n const onToggle = handleFilterTogglerClick(column.accessor);\n const filterId = curFilter?.id;\n const handleFilterSave = (filterValue?: unknown) => {\n if (filterId) {\n handleTooltipSave(column.accessor!, [filterId], filterValue);\n }\n onToggle();\n };\n\n return column.filterable ? (\n <TableFilterTooltip\n field={column.accessor}\n isOpened={visibleFilter === column.accessor}\n options={getOptionsForFilters(filters, column.accessor)}\n values={selectedFilters[column.accessor].selected || []}\n onChange={handleTooltipSave}\n onToggle={handleFilterTogglerClick(column.accessor)}\n className={cnTableHeader('Icon', { type: 'filter' })}\n >\n {FilterComponent && (\n <FilterComponent\n {...filterComponentProps}\n onConfirm={handleFilterSave}\n filterValue={selectedFilters[column.accessor]?.value}\n onCancel={handleFilterTogglerClick(column.accessor)}\n />\n )}\n </TableFilterTooltip>\n ) : null;\n };\n\n const control = (column: Header<T> & ColumnMetaData): React.ReactNode => {\n if (column.control) {\n return (\n <div className={cnTableHeader('Control')}>\n {column.control({ column })}\n </div>\n );\n }\n\n return null;\n };\n\n return (\n <>\n <div\n className={cnTableHeader('Row', {\n withVerticalBorder: borderBetweenColumns,\n })}\n >\n {headersWithMetaData.map(\n (column: Header<T> & ColumnMetaData, columnIdx: number) => {\n const style: React.CSSProperties = {};\n if (column.position!.colSpan) {\n style.gridColumnEnd = `span ${column.position!.colSpan}`;\n }\n if (column.position!.rowSpan) {\n style.gridRowEnd = `span ${column.position!.rowSpan}`;\n }\n if (isStickyHeader) {\n style.top = headerRowsHeights\n .slice(0, column.position!.level)\n .reduce((a: number, b: number) => a + b, 0);\n }\n return (\n <TableCell\n type=\"header\"\n key={columnIdx}\n ref={(ref: HTMLDivElement | null): void => {\n /* eslint-disable-next-line no-param-reassign */\n headerRowsRefs.current[columnIdx] = ref;\n }}\n style={{\n ...style,\n left: getStickyLeftOffset(\n column.position!.gridIndex,\n column.position!.topHeaderGridIndex,\n ),\n }}\n isSticky={isStickyHeader}\n isResized={isColumnResized(column)}\n column={column}\n verticalAlign={headerVerticalAlign}\n onContextMenu={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'contextMenu',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n onClick={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'click',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n className={cnTableHeader('Cell', {\n isFirstColumn: column.position?.isFirst,\n isFirstRow: column.position!.level === 0,\n isLastInColumn:\n column.position?.topHeaderGridIndex !==\n headersWithMetaData[columnIdx + 1]?.position\n ?.topHeaderGridIndex,\n level: getLevelType(column),\n })}\n showVerticalShadow={\n showVerticalCellShadow &&\n column.position!.gridIndex! +\n (column?.position!.colSpan || 1) ===\n stickyColumnsGrid\n }\n >\n {column.title}\n\n <div\n className={cnTableHeader('Buttons', {\n isSortingActive: column.isSortingActive,\n isFilterActive: column.isFilterActive,\n verticalAlign: headerVerticalAlign,\n })}\n >\n {column.sortable && (\n <Button\n type=\"button\"\n size=\"xs\"\n iconSize=\"s\"\n view=\"clear\"\n onlyIcon\n onClick={(): void => handleSortClick(column)}\n iconLeft={getSortIcon(column)}\n className={cnTableHeader('Icon', { type: 'sort' })}\n />\n )}\n\n {getFilterPopover(column)}\n\n {control(column)}\n </div>\n </TableCell>\n );\n },\n )}\n </div>\n {/*\n Рендерим тень заголовка отдельно чтобы избежать возможных наложений\n теней для ячеек заголовка и ячеек прикрепленных слева.\n */}\n <div className={cnTableHeader('ShadowWrapper')} style={tableHeaderStyle}>\n <div\n className={cnTableHeader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CAOE,QAAQ,CAAEhB,CAAW,CAACgB,CAAD,CAPvB,CAQE,SAAS,CAAE3B,aAAa,CAAC,MAAD,CAAS,CAAE0D,IAAI,CAAE,MAAR,CAAT,CAR1B,EARJ,CAoBGd,CAAgB,CAACjB,CAAD,CApBnB,CAsBGmC,CAAO,CAACnC,CAAD,CAtBV,CApDF,CA8EH,CA7FF,CALH,CADF,CA0GE,2BAAK,SAAS,CAAE3B,aAAa,CAAC,eAAD,CAA7B,CAAgD,KAAK,CAAEyB,CAAvD,EACE,2BACE,SAAS,CAAEzB,aAAa,CAAC,QAAD,CAAW,CACjCuF,IAAI,CAAEpE,CAAwB,EAAIhB,CADD,CAAX,CAD1B,EADF,CA1GF,CAmHH,CA3NM"}
|
|
1
|
+
{"version":3,"file":"TableHeader.js","names":["React","cn","Button","TableCell","getOptionsForFilters","TableFilterTooltip","cnTableHeader","levelTypes","TableHeader","isStickyHeader","headersWithMetaData","headerRowsHeights","headerRowsRefs","getStickyLeftOffset","stickyColumnsGrid","showVerticalCellShadow","headerVerticalAlign","getSortIcon","handleSortClick","handleFilterTogglerClick","handleCellClick","handleTooltipSave","filters","visibleFilter","selectedFilters","showHorizontalCellShadow","borderBetweenColumns","tableHeaderHeight","reduce","a","b","tableHeaderStyle","getLevelType","column","position","colSpan","smallTextSize","isColumnResized","headers","build","header","columns","forEach","col","find","head","title","push","some","isResized","getFilterPopover","accessor","curFilter","field","FilterComponent","component","name","filterComponentProps","props","onToggle","filterId","id","filterable","selected","type","handleFilterSave","filterValue","value","control","withVerticalBorder","map","columnIdx","style","gridColumnEnd","rowSpan","gridRowEnd","top","slice","level","ref","current","left","gridIndex","topHeaderGridIndex","e","isFirstColumn","isFirst","isFirstRow","isLastInColumn","isSortingActive","isFilterActive","verticalAlign","sortable","show"],"sources":["../../../../../../src/components/Table/Header/TableHeader.tsx"],"sourcesContent":["import './TableHeader.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\nimport { Button } from '../../Button/Button';\nimport { TableCell } from '../Cell/TableCell';\nimport {\n FieldSelectedValues,\n Filters,\n getOptionsForFilters,\n SelectedFilters,\n} from '../filtering';\nimport { TableFilterTooltip } from '../FilterTooltip/TableFilterTooltip';\nimport { Header } from '../helpers';\nimport {\n ColumnMetaData,\n HeaderVerticalAlign,\n onCellClick,\n TableColumn,\n TableRow,\n} from '../Table';\n\nconst cnTableHeader = cn('TableHeader');\n\ntype TableCSSCustomProperty = {\n '--table-header-height': string;\n};\n\nexport const levelTypes = ['high', 'low', 'default'] as const;\nexport type LevelType = (typeof levelTypes)[number];\n\ntype Props<T extends TableRow> = {\n isStickyHeader: boolean;\n headersWithMetaData: Array<Header<T> & ColumnMetaData>;\n headerRowsHeights: Array<number>;\n headerRowsRefs: React.MutableRefObject<Record<number, HTMLDivElement | null>>;\n getStickyLeftOffset: (\n columnIndex: number,\n topHeaderGridIndex: number,\n ) => number | undefined;\n stickyColumnsGrid: number;\n showVerticalCellShadow: boolean;\n headerVerticalAlign: HeaderVerticalAlign;\n getSortIcon: (column: Header<T>) => React.FC;\n handleSortClick: (column: TableColumn<T>) => void;\n handleFilterTogglerClick: (id: string) => () => void;\n handleCellClick: onCellClick;\n handleTooltipSave: (\n field: string,\n tooltipSelectedFilters: FieldSelectedValues,\n value?: unknown,\n ) => void;\n filters: Filters<T> | undefined;\n visibleFilter: string | null;\n selectedFilters: SelectedFilters;\n showHorizontalCellShadow: boolean;\n borderBetweenColumns: boolean;\n};\n\nexport const TableHeader = <T extends TableRow>({\n isStickyHeader,\n headersWithMetaData,\n headerRowsHeights,\n headerRowsRefs,\n getStickyLeftOffset,\n stickyColumnsGrid,\n showVerticalCellShadow,\n headerVerticalAlign,\n getSortIcon,\n handleSortClick,\n handleFilterTogglerClick,\n handleCellClick,\n handleTooltipSave,\n filters,\n visibleFilter,\n selectedFilters,\n showHorizontalCellShadow,\n borderBetweenColumns,\n}: Props<T>): React.ReactNode => {\n const tableHeaderHeight = headerRowsHeights.reduce(\n (a: number, b: number) => a + b,\n 0,\n );\n const tableHeaderStyle: React.CSSProperties & TableCSSCustomProperty = {\n '--table-header-height': `${tableHeaderHeight}px`,\n };\n const getLevelType = (column: Header<T> & ColumnMetaData): LevelType => {\n if (Number(column.position!.colSpan) >= 1) return 'high';\n if (column.position?.smallTextSize) return 'low';\n return 'default';\n };\n const isColumnResized = (column: Header<T> & ColumnMetaData): boolean => {\n const headers: Array<Header<T> & ColumnMetaData> = [];\n const build = (header: Header<T> & ColumnMetaData) => {\n if (!header.columns) {\n headers.push(header);\n } else {\n header.columns.forEach((col) =>\n build(\n headersWithMetaData.find(\n (head) => head.title === col.title,\n ) as Header<T> & ColumnMetaData,\n ),\n );\n }\n };\n build(column);\n return headers.some((header) => header.isResized);\n };\n\n const getFilterPopover = (\n column: Header<T> & ColumnMetaData,\n ): React.ReactNode => {\n if (!filters || !column.accessor) {\n return null;\n }\n const curFilter = filters.find(({ field }) => field === column.accessor);\n const FilterComponent = curFilter?.component?.name;\n const filterComponentProps = curFilter?.component?.props ?? {};\n const onToggle = handleFilterTogglerClick(column.accessor);\n const filterId = curFilter?.id;\n const handleFilterSave = (filterValue?: unknown) => {\n if (filterId) {\n handleTooltipSave(column.accessor!, [filterId], filterValue);\n }\n onToggle();\n };\n\n return column.filterable ? (\n <TableFilterTooltip\n field={column.accessor}\n isOpened={visibleFilter === column.accessor}\n options={getOptionsForFilters(filters, column.accessor)}\n values={selectedFilters[column.accessor].selected || []}\n onChange={handleTooltipSave}\n onToggle={handleFilterTogglerClick(column.accessor)}\n className={cnTableHeader('Icon', { type: 'filter' })}\n >\n {FilterComponent && (\n <FilterComponent\n {...filterComponentProps}\n onConfirm={handleFilterSave}\n filterValue={selectedFilters[column.accessor]?.value}\n onCancel={handleFilterTogglerClick(column.accessor)}\n />\n )}\n </TableFilterTooltip>\n ) : null;\n };\n\n const control = (column: Header<T> & ColumnMetaData): React.ReactNode => {\n if (column.control) {\n return (\n <div className={cnTableHeader('Control')}>\n {column.control({ column })}\n </div>\n );\n }\n\n return null;\n };\n\n return (\n <>\n <div\n className={cnTableHeader('Row', {\n withVerticalBorder: borderBetweenColumns,\n })}\n >\n {headersWithMetaData.map(\n (column: Header<T> & ColumnMetaData, columnIdx: number) => {\n const style: React.CSSProperties = {};\n if (column.position!.colSpan) {\n style.gridColumnEnd = `span ${column.position!.colSpan}`;\n }\n if (column.position!.rowSpan) {\n style.gridRowEnd = `span ${column.position!.rowSpan}`;\n }\n if (isStickyHeader) {\n style.top = headerRowsHeights\n .slice(0, column.position!.level)\n .reduce((a: number, b: number) => a + b, 0);\n }\n return (\n <TableCell\n type=\"header\"\n key={columnIdx}\n ref={(ref: HTMLDivElement | null): void => {\n /* eslint-disable-next-line no-param-reassign */\n headerRowsRefs.current[columnIdx] = ref;\n }}\n style={{\n ...style,\n left: getStickyLeftOffset(\n column.position!.gridIndex,\n column.position!.topHeaderGridIndex,\n ),\n }}\n isSticky={isStickyHeader}\n isResized={isColumnResized(column)}\n column={column}\n verticalAlign={headerVerticalAlign}\n onContextMenu={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'contextMenu',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n onClick={(e: React.SyntheticEvent) =>\n handleCellClick({\n e,\n type: 'click',\n columnIdx,\n ref: { current: headerRowsRefs.current[columnIdx] },\n })\n }\n className={cnTableHeader('Cell', {\n isFirstColumn: column.position?.isFirst,\n isFirstRow: column.position!.level === 0,\n isLastInColumn:\n column.position?.topHeaderGridIndex !==\n headersWithMetaData[columnIdx + 1]?.position\n ?.topHeaderGridIndex,\n level: getLevelType(column),\n })}\n showVerticalShadow={\n showVerticalCellShadow &&\n column.position!.gridIndex! +\n (column?.position!.colSpan || 1) ===\n stickyColumnsGrid\n }\n >\n {column.title}\n\n <div\n className={cnTableHeader('Buttons', {\n isSortingActive: column.isSortingActive,\n isFilterActive: column.isFilterActive,\n verticalAlign: headerVerticalAlign,\n })}\n >\n {column.sortable && (\n <Button\n type=\"button\"\n size=\"xs\"\n iconSize=\"s\"\n view=\"clear\"\n onlyIcon\n onClick={(): void => handleSortClick(column)}\n iconLeft={getSortIcon(column)}\n className={cnTableHeader('Icon', { type: 'sort' })}\n />\n )}\n\n {getFilterPopover(column)}\n\n {control(column)}\n </div>\n </TableCell>\n );\n },\n )}\n </div>\n {/*\n Рендерим тень заголовка отдельно чтобы избежать возможных наложений\n теней для ячеек заголовка и ячеек прикрепленных слева.\n */}\n <div className={cnTableHeader('ShadowWrapper')} style={tableHeaderStyle}>\n <div\n className={cnTableHeader('Shadow', {\n show: showHorizontalCellShadow && isStickyHeader,\n })}\n />\n </div>\n </>\n );\n};\n"],"mappings":"qqBAAA,0BAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,0BACA,OAASC,MAAT,2BACA,OAASC,SAAT,yBACA,OAGEC,oBAHF,oBAMA,OAASC,kBAAT,2CAUA,GAAMC,cAAa,CAAGL,EAAE,CAAC,aAAD,CAAxB,CAMA,MAAO,IAAMM,WAAU,CAAG,CAAC,MAAD,CAAS,KAAT,CAAgB,SAAhB,CAAnB,CA+BP,MAAO,IAAMC,YAAW,CAAG,WAmBM,IAlB/BC,EAkB+B,GAlB/BA,cAkB+B,CAjB/BC,CAiB+B,GAjB/BA,mBAiB+B,CAhB/BC,CAgB+B,GAhB/BA,iBAgB+B,CAf/BC,CAe+B,GAf/BA,cAe+B,CAd/BC,CAc+B,GAd/BA,mBAc+B,CAb/BC,CAa+B,GAb/BA,iBAa+B,CAZ/BC,CAY+B,GAZ/BA,sBAY+B,CAX/BC,CAW+B,GAX/BA,mBAW+B,CAV/BC,CAU+B,GAV/BA,WAU+B,CAT/BC,CAS+B,GAT/BA,eAS+B,CAR/BC,CAQ+B,GAR/BA,wBAQ+B,CAP/BC,CAO+B,GAP/BA,eAO+B,CAN/BC,CAM+B,GAN/BA,iBAM+B,CAL/BC,CAK+B,GAL/BA,OAK+B,CAJ/BC,CAI+B,GAJ/BA,aAI+B,CAH/BC,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ClCmF,eAAe,CAAExD,CAAM,CAACwD,eADU,CAElCC,cAAc,CAAEzD,CAAM,CAACyD,cAFW,CAGlCC,aAAa,CAAE3E,CAHmB,CAAZ,CAD1B,EAOGiB,CAAM,CAAC2D,QAAP,EACC,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,IAAI,CAAC,IAFP,CAGE,QAAQ,CAAC,GAHX,CAIE,IAAI,CAAC,OAJP,CAKE,QAAQ,GALV,CAME,OAAO,CAAE,yBAAY1E,EAAe,CAACe,CAAD,CAA3B,CANX,CAOE,QAAQ,CAAEhB,CAAW,CAACgB,CAAD,CAPvB,CAQE,SAAS,CAAE3B,aAAa,CAAC,MAAD,CAAS,CAAE0D,IAAI,CAAE,MAAR,CAAT,CAR1B,EARJ,CAoBGd,CAAgB,CAACjB,CAAD,CApBnB,CAsBGmC,CAAO,CAACnC,CAAD,CAtBV,CApDF,CA8EH,CA7FF,CALH,CADF,CA0GE,2BAAK,SAAS,CAAE3B,aAAa,CAAC,eAAD,CAA7B,CAAgD,KAAK,CAAEyB,CAAvD,EACE,2BACE,SAAS,CAAEzB,aAAa,CAAC,QAAD,CAAW,CACjCuF,IAAI,CAAEpE,CAAwB,EAAIhB,CADD,CAAX,CAD1B,EADF,CA1GF,CAmHH,CA3NM"}
|
|
@@ -9,11 +9,11 @@ export { TableFilterContainer } from './FilterContainer/TableFilterContainer';
|
|
|
9
9
|
export { TableNumberFilter } from './NumberFilter/TableNumberFilter';
|
|
10
10
|
export { TableChoiceGroupFilter } from './ChoiceGroupFilter/TableChoiceGroupFilter';
|
|
11
11
|
export declare const sizes: readonly ["s", "m", "l"];
|
|
12
|
-
type Size = typeof sizes[number];
|
|
12
|
+
type Size = (typeof sizes)[number];
|
|
13
13
|
export declare const zebraStriped: readonly ["odd", "even"];
|
|
14
|
-
type ZebraStriped = typeof zebraStriped[number];
|
|
14
|
+
type ZebraStriped = (typeof zebraStriped)[number];
|
|
15
15
|
export declare const headerVerticalAligns: readonly ["center", "bottom"];
|
|
16
|
-
export type HeaderVerticalAlign = typeof headerVerticalAligns[number];
|
|
16
|
+
export type HeaderVerticalAlign = (typeof headerVerticalAligns)[number];
|
|
17
17
|
export type LazyLoad = {
|
|
18
18
|
maxVisibleRows?: number;
|
|
19
19
|
scrollableEl?: HTMLDivElement | Window;
|