@salutejs/plasma-new-hope 0.336.0-canary.2205.17466635480.0 → 0.336.0-canary.2208.17465207747.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/cjs/components/Combobox/ComboboxNew/Combobox.js +23 -22
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +3 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +7 -3
- package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +5 -11
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Drawer/hooks/useDrawer.js +12 -0
- package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/cjs/components/Select/Select.js +3 -4
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.styles.js +3 -2
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/hooks/useKeyboardNavigation.js +7 -3
- package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.js +5 -11
- package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -20
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +15 -15
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +7 -3
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +9 -50
- package/emotion/cjs/components/Drawer/hooks/useDrawer.js +11 -0
- package/emotion/cjs/components/Select/Select.js +2 -4
- package/emotion/cjs/components/Select/Select.styles.js +7 -7
- package/emotion/cjs/components/Select/hooks/useKeyboardNavigation.js +7 -3
- package/emotion/cjs/components/Select/ui/Inner/Inner.js +9 -50
- package/emotion/cjs/examples/components/Combobox/Combobox.js +0 -15
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +22 -20
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.styles.js +15 -15
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -1
- package/emotion/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +7 -3
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +6 -11
- package/emotion/es/components/Drawer/hooks/useDrawer.js +11 -0
- package/emotion/es/components/Select/Select.js +2 -4
- package/emotion/es/components/Select/Select.styles.js +7 -7
- package/emotion/es/components/Select/hooks/useKeyboardNavigation.js +7 -3
- package/emotion/es/components/Select/ui/Inner/Inner.js +6 -11
- package/emotion/es/examples/components/Combobox/Combobox.js +0 -7
- package/es/components/Combobox/ComboboxNew/Combobox.js +23 -22
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js +3 -2
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +7 -3
- package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +6 -12
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
- package/es/components/Drawer/hooks/useDrawer.js +12 -0
- package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/es/components/Select/Select.js +3 -4
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.styles.js +3 -2
- package/es/components/Select/Select.styles.js.map +1 -1
- package/es/components/Select/hooks/useKeyboardNavigation.js +7 -3
- package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.js +6 -12
- package/es/components/Select/ui/Inner/Inner.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -20
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +8 -8
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +7 -3
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +9 -50
- package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +11 -0
- package/styled-components/cjs/components/Select/Select.js +2 -4
- package/styled-components/cjs/components/Select/Select.styles.js +4 -4
- package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +7 -3
- package/styled-components/cjs/components/Select/ui/Inner/Inner.js +9 -50
- package/styled-components/cjs/examples/components/Combobox/Combobox.js +0 -15
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +22 -20
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.styles.js +8 -8
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.tokens.js +1 -1
- package/styled-components/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +7 -3
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +6 -11
- package/styled-components/es/components/Drawer/hooks/useDrawer.js +11 -0
- package/styled-components/es/components/Select/Select.js +2 -4
- package/styled-components/es/components/Select/Select.styles.js +4 -4
- package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +7 -3
- package/styled-components/es/components/Select/ui/Inner/Inner.js +6 -11
- package/styled-components/es/examples/components/Combobox/Combobox.js +0 -7
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.styles.d.ts +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.styles.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +6 -6
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/Inner.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/Inner.type.d.ts +1 -2
- package/types/components/Combobox/ComboboxNew/ui/Inner/Inner.type.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.types.d.ts +2 -6
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.types.d.ts.map +1 -1
- package/types/components/Drawer/hooks/useDrawer.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +6 -6
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.styles.d.ts +1 -0
- package/types/components/Select/Select.styles.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +10 -10
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/Inner.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/Inner.type.d.ts +1 -2
- package/types/components/Select/ui/Inner/Inner.type.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts +3 -11
- package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts.map +1 -1
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts +6 -6
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts.map +1 -1
- package/types/examples/components/Combobox/Combobox.d.ts +24 -24
- package/types/examples/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/components/Select/Select.d.ts +6 -6
- package/types/examples/components/Select/Select.d.ts.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.tokens.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n comboboxTargetArrow: 'combobox-target-arrow',\n arrowInverse: 'arrow-inverse',\n textfieldTarget: 'combobox-textfield-target',\n selectChipIsFocused: 'combobox-chip-is-focused',\n selectWithoutBoxShadow: 'combobox-without-box-shadow',\n selectItemCheckbox: 'combobox-item-checkbox',\n selectSpinner: 'combobox-spinner',\n emptyStateWrapper: 'combobox-empty-state-wrapper',\n};\n\nexport const tokens = {\n borderRadius: '--plasma-combobox-border-radius',\n padding: '--plasma-combobox-padding',\n margin: '--plasma-combobox-margin',\n focusOffset: '--plasma-combobox-focus-offset',\n\n fontFamily: '--plasma-combobox-font-family',\n fontSize: '--plasma-combobox-font-size',\n fontStyle: '--plasma-combobox-font-style',\n fontWeight: '--plasma-combobox-font-weight',\n fontLetterSpacing: '--plasma-combobox-font-letter-spacing',\n fontLineHeight: '--plasma-combobox-font-line-height',\n\n dropdownBorderColor: '--plasma-select-dropdown-border-color',\n dropdownBorderWidth: '--plasma-select-dropdown-border-width',\n\n itemHeight: '--plasma-combobox-item-height',\n itemBorderRadius: '--plasma-combobox-item-border-radius',\n itemPadding: '--plasma-combobox-item-padding',\n itemPaddingTight: '--plasma-combobox-item-padding-tight',\n itemIconSize: '--plasma-combobox-item-icon-size',\n itemIconSizeTight: '--plasma-combobox-item-icon-size-tight',\n itemIconMargin: '--plasma-combobox-item-icon-margin',\n itemBackgroundHover: '--plasma-combobox-item-background-hover',\n itemIconColor: '--plasma-combobox-item-icon-color',\n\n cellPadding: '--plasma-combobox-cell-padding',\n cellPaddingLeftContent: '--plasma-combobox-cell-padding-left-content',\n cellPaddingContent: '--plasma-combobox-cell-padding-content',\n cellPaddingRightContent: '--plasma-combobox-cell-padding-right-content',\n cellTextboxGap: '--plasma-combobox-cell-textbox-gap',\n cellGap: '--plasma-combobox-cell-gap',\n cellTitleFontFamily: '--plasma-combobox-cell-title-font-family',\n cellTitleFontSize: '--plasma-combobox-cell-title-font-size',\n cellTitleFontStyle: '--plasma-combobox-cell-title-font-style',\n cellTitleFontWeight: '--plasma-combobox-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-combobox-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-combobox-cell-title-line-height',\n\n checkboxTriggerSize: '--plasma-combobox-checkbox-trigger-size',\n checkboxTriggerSizeTight: '--plasma-combobox-checkbox-trigger-size-tight',\n checkboxTriggerBorderRadius: '--plasma-combobox-checkbox-trigger-border-radius',\n checkboxTriggerBorderRadiusTight: '--plasma-combobox-checkbox-trigger-border-radius-tight',\n checkboxFillColor: '--plasma-combobox-checkbox-fill-color',\n checkboxIconColor: '--plasma-combobox-checkbox-icon-color',\n checkboxTriggerBorderColor: '--plasma-combobox-checkbox-trigger-border-color',\n checkboxTriggerBorderCheckedColor: '--plasma-combobox-checkbox-trigger-border-checked-color',\n checkboxTriggerBorderWidth: '--plasma-combobox-checkbox-trigger-border-width',\n\n indicatorSize: '--plasma-combobox-indicator-size',\n\n // Токены для TextField\n textFieldColor: '--plasma-combobox-new-textfield-color',\n textFieldClearColor: '--plasma-combobox-new-textfield-clear-color',\n\n textFieldBackgroundColor: '--plasma-combobox-new-textfield-background-color',\n textFieldBackgroundColorHover: '--plasma-combobox-new-textfield-background-color-hover',\n textFieldBackgroundColorFocus: '--plasma-combobox-new-textfield-background-color-focus',\n\n textFieldBorderColor: '--plasma-combobox-new-textfield-border-color',\n textFieldBorderColorHover: '--plasma-combobox-new-textfield-border-color-hover',\n textFieldBorderColorFocus: '--plasma-combobox-new-textfield-border-color-focus',\n\n textFieldColorReadOnly: '--plasma-combobox-new-textfield-color-readonly',\n textFieldBackgroundColorReadOnly: '--plasma-combobox-new-textfield-bg-color-readonly',\n textFieldBorderColorReadOnly: '--plasma-combobox-new-textfield-border-color-readonly',\n textFieldPlaceholderColorReadOnly: '--plasma-combobox-new-textfield-placeholder-color-readonly',\n\n textFieldCaretColor: '--plasma-combobox-new-textfield-caret-color',\n textFieldPlaceholderColor: '--plasma-combobox-new-textfield-placeholder-color',\n textFieldPlaceholderColorFocus: '--plasma-combobox-new-textfield-placeholder-color-focus',\n textFieldClearPlaceholderColor: '--plasma-combobox-new-textfield-clear-placeholder-color',\n textFieldClearPlaceholderColorFocus: '--plasma-combobox-new-textfield-clear-placeholder-color-focus',\n textFieldOptionalColor: '--plasma-combobox-new-textfield-optional-color',\n\n textFieldHeight: '--plasma-combobox-new-textfield-height',\n textFieldBorderWidth: '--plasma-combobox-new-textfield-border-width',\n textFieldBorderRadius: '--plasma-combobox-new-textfield-border-radius',\n\n textFieldPadding: '--plasma-combobox-new-textfield-padding',\n textFieldPaddingWithChips: '--plasma-combobox-new-textfield-padding-with-chips',\n\n textFieldLeftContentMargin: '--plasma-combobox-new-textfield-left-content-margin',\n textFieldRightContentMargin: '--plasma-combobox-new-textfield-right-content-margin',\n textFieldRightContentWithHintMargin: '--plasma-combobox-textfield-right-content-with-hint-margin',\n\n textFieldContentRightWrapperGap: '--plasma-combobox-textfield-content-right-wrapper-gap',\n textFieldContentRightWrapperMargin: '--plasma-combobox-textfield-content-right-wrapper-margin',\n\n textFieldFontFamily: '--plasma-combobox-new-textfield-font-family',\n textFieldFontStyle: '--plasma-combobox-new-textfield-font-style',\n textFieldFontSize: '--plasma-combobox-new-textfield-font-size',\n textFieldFontWeight: '--plasma-combobox-new-textfield-font-weight',\n textFieldLetterSpacing: '--plasma-combobox-new-textfield-letter-spacing',\n textFieldLineHeight: '--plasma-combobox-new-textfield-line-height',\n\n textFieldContentSlotColor: '--plasma-combobox-new-textfield-content-slot-color',\n textFieldContentSlotColorHover: '--plasma-combobox-new-textfield-content-slot-color-hover',\n textFieldContentSlotColorActive: '--plasma-combobox-new-textfield-content-slot-color-active',\n\n textFieldContentSlotRightColor: '--plasma-combobox-new-textfield-content-right-slot-color',\n textFieldContentSlotRightColorHover: '--plasma-combobox-new-textfield-content-right-slot-color-hover',\n textFieldContentSlotRightColorActive: '--plasma-combobox-new-textfield-content-right-slot-color-active',\n\n textFieldLabelColor: '--plasma-combobox-new-textfield-label-color',\n textFieldLabelColorReadOnly: '--plasma-combobox-new-textfield-label-color-readonly',\n textFieldLabelOffset: '--plasma-combobox-new-textfield-label-offset',\n textFieldClearLabelOffset: '--plasma-combobox-new-textfield-clear-label-offset',\n\n textFieldLabelFontFamily: '--plasma-combobox-new-textfield-label-font-family',\n textFieldLabelFontStyle: '--plasma-combobox-new-textfield-label-font-style',\n textFieldLabelFontSize: '--plasma-combobox-new-textfield-label-font-size',\n textFieldLabelFontWeight: '--plasma-combobox-new-textfield-label-font-weight',\n textFieldLabelLetterSpacing: '--plasma-combobox-new-textfield-label-letter-spacing',\n textFieldLabelLineHeight: '--plasma-combobox-new-textfield-label-line-height',\n\n textFieldLabelInnerFontFamily: '--plasma-combobox-new-textfield-placement_inner-label-font-family',\n textFieldLabelInnerFontStyle: '--plasma-combobox-new-textfield-placement_inner-label-font-style',\n textFieldLabelInnerFontSize: '--plasma-combobox-new-textfield-placement_inner-label-font-size',\n textFieldLabelInnerFontWeight: '--plasma-combobox-new-textfield-placement_inner-label-font-weight',\n textFieldLabelInnerLetterSpacing: '--plasma-combobox-new-textfield-placement_inner-label-letter-spacing',\n textFieldLabelInnerLineHeight: '--plasma-combobox-new-textfield-placement_inner-label-line-height',\n\n textFieldLabelInnerPadding: '--plasma-combobox-new-textfield-placement_inner-label-padding',\n textFieldContentLabelInnerPadding: '--plasma-combobox-new-textfield-placement_inner-content-padding',\n\n textFieldTitleCaptionColor: '--plasma-combobox-new-textfield-title-caption-color',\n textFieldTitleCaptionColorReadOnly: '--plasma-combobox-new-textfield-title-caption-color-readonly',\n textFieldTitleCaptionInnerLabelOffset: '--plasma-combobox-new-textfield-title-caption-label-inner-offset',\n\n textFieldTitleCaptionFontFamily: '--plasma-combobox-new-textfield-title-caption-font-family',\n textFieldTitleCaptionFontStyle: '--plasma-combobox-new-textfield-title-caption-font-style',\n textFieldTitleCaptionFontSize: '--plasma-combobox-new-textfield-title-caption-font-size',\n textFieldTitleCaptionFontWeight: '--plasma-combobox-new-textfield-title-caption-font-weight',\n textFieldTitleCaptionLetterSpacing: '--plasma-combobox-new-textfield-title-caption-letter-spacing',\n textFieldTitleCaptionLineHeight: '--plasma-combobox-new-textfield-title-caption-line-height',\n\n textFieldLeftHelperColor: '--plasma-combobox-new-textfield-left-helper-color',\n textFieldLeftHelperColorReadOnly: '--plasma-combobox-new-textfield-left-helper-color-readonly',\n textFieldLeftHelperOffset: '--plasma-combobox-new-textfield-left-helper-offset',\n\n textFieldLeftHelperFontFamily: '--plasma-combobox-new-textfield-left-helper-font-family',\n textFieldLeftHelperFontStyle: '--plasma-combobox-new-textfield-left-helper-font-style',\n textFieldLeftHelperFontSize: '--plasma-combobox-new-textfield-left-helper-font-size',\n textFieldLeftHelperFontWeight: '--plasma-combobox-new-textfield-left-helper-font-weight',\n textFieldLeftHelperLetterSpacing: '--plasma-combobox-new-textfield-left-helper-letter-spacing',\n textFieldLeftHelperLineHeight: '--plasma-combobox-new-textfield-left-helper-line-height',\n\n textFieldTextBeforeColor: '--plasma-combobox-new-textfield-before-text-color',\n textFieldTextAfterColor: '--plasma-combobox-new-textfield-after-text-color',\n textFieldTextBeforeMargin: '--plasma-combobox-new-textfield-before-text-margin',\n textFieldTextAfterMargin: '--plasma-combobox-new-textfield-after-text-margin',\n\n textFieldDisabledOpacity: '--plasma-combobox-new-textfield-disabled-opacity',\n\n /** Токены для tooltip */\n textFieldHintCustomIconTargetSize: '--plasma-combobox-textfield__hint-custom-icon-target-size',\n textFieldHintMargin: '--plasma-combobox-textfield__hint-margin',\n textFieldHintTargetSize: '--plasma-combobox-textfield__hint-target-size',\n textFieldHintIconColor: '--plasma-combobox-textfield__hint-icon-color',\n textFieldHintInnerLabelPlacementOffset: '--plasma-combobox-textfield__hint-inner-label-placement-offset',\n textFieldClearHintInnerLabelPlacementOffset: '--plasma-combobox-textfield__clear-hint-inner-label-placement-offset',\n\n textFieldTooltipBackgroundColor: '--plasma-combobox-textfield__tooltip-background-color',\n textFieldTooltipBoxShadow: '--plasma-combobox-textfield__tooltip-box-shadow',\n textFieldTooltipColor: '--plasma-combobox-textfield__tooltip-color',\n\n textFieldTooltipPaddingTop: '--plasma-combobox-textfield__tooltip-padding-top',\n textFieldTooltipPaddingRight: '--plasma-combobox-textfield__tooltip-padding-right',\n textFieldTooltipPaddingBottom: '--plasma-combobox-textfield__tooltip-padding-bottom',\n textFieldTooltipPaddingLeft: '--plasma-combobox-textfield__tooltip-padding-left',\n textFieldTooltipMinHeight: '--plasma-combobox-textfield__tooltip-min-height',\n textFieldTooltipBorderRadius: '--plasma-combobox-textfield__tooltip-border-radius',\n textFieldTooltipTextFontFamily: '--plasma-combobox-textfield__tooltip-text-font-family',\n textFieldTooltipTextFontSize: '--plasma-combobox-textfield__tooltip-text-font-size',\n textFieldTooltipTextFontStyle: '--plasma-combobox-textfield__tooltip-text-font-style',\n textFieldTooltipTextFontWeight: '--plasma-combobox-textfield__tooltip-text-font-weight',\n textFieldTooltipTextFontLetterSpacing: '--plasma-combobox-textfield__tooltip-text-font-letter-spacing',\n textFieldTooltipTextFontLineHeight: '--plasma-combobox-textfield__tooltip-text-font-line-height',\n textFieldTooltipContentLeftMargin: '--plasma-combobox-textfield__tooltip-content-left-margin',\n textFieldTooltipArrowMaskWidth: '--plasma-combobox-textfield__tooltip-arrow-mask-width',\n textFieldTooltipArrowMaskHeight: '--plasma-combobox-textfield__tooltip-arrow-mask-height',\n textFieldTooltipArrowMaskImage: '--plasma-combobox-textfield__tooltip-arrow-mask-image',\n textFieldTooltipArrowHeight: '--plasma-combobox-textfield__tooltip-arrow-height',\n textFieldTooltipArrowEdgeMargin: '--plasma-combobox-textfield__tooltip-arrow-edge-margin',\n textFieldTooltipArrowBackground: '--plasma-combobox-textfield__tooltip-arrow-background',\n\n textFieldChipHeight: '--plasma-combobox-new-textfield-chip-height',\n textFieldChipBorderRadius: '--plasma-combobox-new-textfield-chip-border-radius',\n textFieldChipGap: '--plasma-combobox-new-textfield-chip-gap',\n textFieldChipBackground: '--plasma-combobox-new-textfield--chip-background',\n textFieldChipColor: '--plasma-combobox-new-textfield-chip-color',\n textFieldChipBackgroundHover: '--plasma-combobox-new-textfield-chip-background-hover',\n textFieldChipColorHover: '--plasma-combobox-new-textfield-chip-color-hover',\n textFieldChipBackgroundReadOnly: '--plasma-combobox-new-textfield-chip-background-read-only',\n textFieldChipColorReadOnly: '--plasma-combobox-new-textfield-chip-color-read-only',\n textFieldChipBackgroundReadOnlyHover: '--plasma-combobox-new-textfield-chip-background-read-only-hover',\n textFieldChipColorReadOnlyHover: '--plasma-combobox-new-textfield-chip-color-read-only-hover',\n textFieldChipBackgroundActive: '--plasma-combobox-new-textfield-chip-background-active',\n textFieldChipColorActive: '--plasma-combobox-new-textfield-chip-color-active',\n textFieldChipCloseIconColor: '--plasma-combobox-new-textfield-chip-close-icons-color',\n textFieldChipOutlineSize: '--plasma-combobox-new-textfield-chip-outline-size',\n textFieldChipWidth: '--plasma-combobox-new-textfield-chip-width',\n textFieldChipPadding: '--plasma-combobox-new-textfield-chip-padding',\n textFieldChipCloseIconSize: '--plasma-combobox-new-textfield-chip-close-icon-size',\n textFieldChipFontFamily: '--plasma-combobox-new-textfield-chip-font-family',\n textFieldChipFontSize: '--plasma-combobox-new-textfield-chip-font-size',\n textFieldChipFontStyle: '--plasma-combobox-new-textfield-chip-font-style',\n textFieldChipFontWeight: '--plasma-combobox-new-textfield-chip-font-weight',\n textFieldChipLetterSpacing: '--plasma-combobox-new-textfield-chip-letter-spacing',\n textFieldChipLineHeight: '--plasma-combobox-new-textfield-chip-line-height',\n textFieldChipClearContentMarginLeft: '--plasma-combobox-new-textfield-chip-clear-content-margin-left',\n textFieldChipClearContentMarginRight: '--plasma-combobox-new-textfield-chip-clear-content-margin-right',\n textFieldChipOpacityReadonly: '--plasma-combobox-new-textfield-chip-opacity-readonly',\n\n textFieldFocusColor: '--plasma-combobox-new-textfield-focus-color',\n\n textFieldBoxShadow: '--plasma-select-textfield-box-shadow',\n\n textFieldIndicatorColor: '--plasma-combobox-new-textfield-indicator-color',\n textFieldIndicatorSizeInner: '--plasma-combobox-new-textfield-indicator-size-inner',\n textFieldIndicatorSizeOuter: '--plasma-combobox-new-textfield-indicator-size-outer',\n textFieldIndicatorLabelPlacementInner: '--plasma-combobox-new-textfield-indicator-placement-inner',\n textFieldIndicatorLabelPlacementOuter: '--plasma-combobox-new-textfield-indicator-placement-outer',\n textFieldIndicatorLabelPlacementInnerRight: '--plasma-combobox-new-textfield-indicator-placement-inner-right',\n textFieldIndicatorLabelPlacementOuterRight: '--plasma-combobox-new-textfield-indicator-placement-outer-right',\n textFieldClearIndicatorLabelPlacementInner: '--plasma-combobox-new-textfield-clear-indicator-placement-inner',\n textFieldClearIndicatorLabelPlacementInnerRight:\n '--plasma-combobox-new-textfield-clear-indicator-placement-inner-right',\n textFieldClearIndicatorHintInnerRight: '--plasma-combobox-new-textfield-clear-indicator-hint-placement-inner-right',\n\n // Токены для EmptyState\n emptyStatePadding: '--plasma-combobox-new-empty-state-padding',\n\n labelOffset: '--plasma-combobox-label-offset',\n\n innerLabelGap: '--plasma-combobox-inner-label-gap',\n\n helperTextColor: '--plasma-combobox-helper-text-color',\n helperTextOffset: '--plasma-combobox-helper-text-offset',\n\n spinnerSize: '--plasma-combobox-spinner-size',\n spinnerSizeTight: '--plasma-combobox-spinner-size-tight',\n\n disclosureIconColor: '--plasma-combobox-disclosure-icon-color',\n disclosureIconColorHover: '--plasma-combobox-disclosure-icon-color-hover',\n disclosureIconSize: '--plasma-select-disclosure-icon-size',\n disclosureIconMargin: '--plasma-select-disclosure-icon-margin',\n\n dividerMarginTop: '--plasma-combobox-divider-margin-top',\n dividerMarginTopTight: '--plasma-combobox-divider-margin-top-tight',\n dividerMarginRight: '--plasma-combobox-divider-margin-right',\n dividerMarginBottom: '--plasma-combobox-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-combobox-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-combobox-divider-margin-left',\n dividerColor: '--plasma-combobox-divider-color',\n};\n\nexport const constants = {\n focusColor: '--surface-accent',\n focusSize: '0.0625rem',\n background: '--surface-solid-card',\n boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',\n itemBackground: '--surface-clear',\n textfieldTargetColor: '--text-primary',\n textfieldOuterLabelColor: '--text-primary',\n textfieldInnerLabelColor: '--text-secondary',\n textfieldPlaceholderColor: '--text-secondary',\n textfieldBorderSize: '0.0625rem',\n opacity: '0.4',\n fontFamily: '--plasma-typo-body-xs-font-family',\n fontSize: '--plasma-typo-body-xs-font-size',\n fontStyle: '--plasma-typo-body-xs-font-style',\n fontWeight: '--plasma-typo-body-xs-font-weight',\n fontLetterSpacing: '--plasma-typo-body-xs-letter-spacing',\n fontLineHeight: '--plasma-typo-body-xs-line-height',\n cellTitleColor: '--text-primary',\n cellBackgroundColor: '--surface-clear',\n};\n"],"names":["classes","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","comboboxTargetArrow","arrowInverse","textfieldTarget","selectChipIsFocused","selectWithoutBoxShadow","selectItemCheckbox","selectSpinner","emptyStateWrapper","tokens","borderRadius","padding","margin","focusOffset","fontFamily","fontSize","fontStyle","fontWeight","fontLetterSpacing","fontLineHeight","dropdownBorderColor","dropdownBorderWidth","itemHeight","itemBorderRadius","itemPadding","itemPaddingTight","itemIconSize","itemIconSizeTight","itemIconMargin","itemBackgroundHover","itemIconColor","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","checkboxTriggerSize","checkboxTriggerSizeTight","checkboxTriggerBorderRadius","checkboxTriggerBorderRadiusTight","checkboxFillColor","checkboxIconColor","checkboxTriggerBorderColor","checkboxTriggerBorderCheckedColor","checkboxTriggerBorderWidth","indicatorSize","textFieldColor","textFieldClearColor","textFieldBackgroundColor","textFieldBackgroundColorHover","textFieldBackgroundColorFocus","textFieldBorderColor","textFieldBorderColorHover","textFieldBorderColorFocus","textFieldColorReadOnly","textFieldBackgroundColorReadOnly","textFieldBorderColorReadOnly","textFieldPlaceholderColorReadOnly","textFieldCaretColor","textFieldPlaceholderColor","textFieldPlaceholderColorFocus","textFieldClearPlaceholderColor","textFieldClearPlaceholderColorFocus","textFieldOptionalColor","textFieldHeight","textFieldBorderWidth","textFieldBorderRadius","textFieldPadding","textFieldPaddingWithChips","textFieldLeftContentMargin","textFieldRightContentMargin","textFieldRightContentWithHintMargin","textFieldContentRightWrapperGap","textFieldContentRightWrapperMargin","textFieldFontFamily","textFieldFontStyle","textFieldFontSize","textFieldFontWeight","textFieldLetterSpacing","textFieldLineHeight","textFieldContentSlotColor","textFieldContentSlotColorHover","textFieldContentSlotColorActive","textFieldContentSlotRightColor","textFieldContentSlotRightColorHover","textFieldContentSlotRightColorActive","textFieldLabelColor","textFieldLabelColorReadOnly","textFieldLabelOffset","textFieldClearLabelOffset","textFieldLabelFontFamily","textFieldLabelFontStyle","textFieldLabelFontSize","textFieldLabelFontWeight","textFieldLabelLetterSpacing","textFieldLabelLineHeight","textFieldLabelInnerFontFamily","textFieldLabelInnerFontStyle","textFieldLabelInnerFontSize","textFieldLabelInnerFontWeight","textFieldLabelInnerLetterSpacing","textFieldLabelInnerLineHeight","textFieldLabelInnerPadding","textFieldContentLabelInnerPadding","textFieldTitleCaptionColor","textFieldTitleCaptionColorReadOnly","textFieldTitleCaptionInnerLabelOffset","textFieldTitleCaptionFontFamily","textFieldTitleCaptionFontStyle","textFieldTitleCaptionFontSize","textFieldTitleCaptionFontWeight","textFieldTitleCaptionLetterSpacing","textFieldTitleCaptionLineHeight","textFieldLeftHelperColor","textFieldLeftHelperColorReadOnly","textFieldLeftHelperOffset","textFieldLeftHelperFontFamily","textFieldLeftHelperFontStyle","textFieldLeftHelperFontSize","textFieldLeftHelperFontWeight","textFieldLeftHelperLetterSpacing","textFieldLeftHelperLineHeight","textFieldTextBeforeColor","textFieldTextAfterColor","textFieldTextBeforeMargin","textFieldTextAfterMargin","textFieldDisabledOpacity","textFieldHintCustomIconTargetSize","textFieldHintMargin","textFieldHintTargetSize","textFieldHintIconColor","textFieldHintInnerLabelPlacementOffset","textFieldClearHintInnerLabelPlacementOffset","textFieldTooltipBackgroundColor","textFieldTooltipBoxShadow","textFieldTooltipColor","textFieldTooltipPaddingTop","textFieldTooltipPaddingRight","textFieldTooltipPaddingBottom","textFieldTooltipPaddingLeft","textFieldTooltipMinHeight","textFieldTooltipBorderRadius","textFieldTooltipTextFontFamily","textFieldTooltipTextFontSize","textFieldTooltipTextFontStyle","textFieldTooltipTextFontWeight","textFieldTooltipTextFontLetterSpacing","textFieldTooltipTextFontLineHeight","textFieldTooltipContentLeftMargin","textFieldTooltipArrowMaskWidth","textFieldTooltipArrowMaskHeight","textFieldTooltipArrowMaskImage","textFieldTooltipArrowHeight","textFieldTooltipArrowEdgeMargin","textFieldTooltipArrowBackground","textFieldChipHeight","textFieldChipBorderRadius","textFieldChipGap","textFieldChipBackground","textFieldChipColor","textFieldChipBackgroundHover","textFieldChipColorHover","textFieldChipBackgroundReadOnly","textFieldChipColorReadOnly","textFieldChipBackgroundReadOnlyHover","textFieldChipColorReadOnlyHover","textFieldChipBackgroundActive","textFieldChipColorActive","textFieldChipCloseIconColor","textFieldChipOutlineSize","textFieldChipWidth","textFieldChipPadding","textFieldChipCloseIconSize","textFieldChipFontFamily","textFieldChipFontSize","textFieldChipFontStyle","textFieldChipFontWeight","textFieldChipLetterSpacing","textFieldChipLineHeight","textFieldChipClearContentMarginLeft","textFieldChipClearContentMarginRight","textFieldChipOpacityReadonly","textFieldFocusColor","textFieldBoxShadow","textFieldIndicatorColor","textFieldIndicatorSizeInner","textFieldIndicatorSizeOuter","textFieldIndicatorLabelPlacementInner","textFieldIndicatorLabelPlacementOuter","textFieldIndicatorLabelPlacementInnerRight","textFieldIndicatorLabelPlacementOuterRight","textFieldClearIndicatorLabelPlacementInner","textFieldClearIndicatorLabelPlacementInnerRight","textFieldClearIndicatorHintInnerRight","emptyStatePadding","labelOffset","innerLabelGap","helperTextColor","helperTextOffset","spinnerSize","spinnerSizeTight","disclosureIconColor","disclosureIconColorHover","disclosureIconSize","disclosureIconMargin","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","dividerColor"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,oBAAoB,EAAE,yBAAyB;AAC/CC,EAAAA,mBAAmB,EAAE,uBAAuB;AAC5CC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,eAAe,EAAE,2BAA2B;AAC5CC,EAAAA,mBAAmB,EAAE,0BAA0B;AAC/CC,EAAAA,sBAAsB,EAAE,6BAA6B;AACrDC,EAAAA,kBAAkB,EAAE,wBAAwB;AAC5CC,EAAAA,aAAa,EAAE,kBAAkB;AACjCC,EAAAA,iBAAiB,EAAE,8BAAA;AACvB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,OAAO,EAAE,2BAA2B;AACpCC,EAAAA,MAAM,EAAE,0BAA0B;AAClCC,EAAAA,WAAW,EAAE,gCAAgC;AAE7CC,EAAAA,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,kBAAkB,EAAE,sCAAsC;AAC1DC,EAAAA,oBAAoB,EAAE,wCAAwC;AAE9DC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,wBAAwB,EAAE,+CAA+C;AACzEC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,YAAY,EAAE,iCAAA;AAClB;;;;;"}
|
1
|
+
{"version":3,"file":"Combobox.tokens.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n selectTargetArrow: 'combobox-target-arrow',\n arrowInverse: 'arrow-inverse',\n textfieldTarget: 'combobox-textfield-target',\n selectChipIsFocused: 'combobox-chip-is-focused',\n selectWithoutBoxShadow: 'combobox-without-box-shadow',\n selectItemCheckbox: 'combobox-item-checkbox',\n selectSpinner: 'combobox-spinner',\n emptyStateWrapper: 'combobox-empty-state-wrapper',\n};\n\nexport const tokens = {\n borderRadius: '--plasma-combobox-border-radius',\n padding: '--plasma-combobox-padding',\n margin: '--plasma-combobox-margin',\n focusOffset: '--plasma-combobox-focus-offset',\n\n fontFamily: '--plasma-combobox-font-family',\n fontSize: '--plasma-combobox-font-size',\n fontStyle: '--plasma-combobox-font-style',\n fontWeight: '--plasma-combobox-font-weight',\n fontLetterSpacing: '--plasma-combobox-font-letter-spacing',\n fontLineHeight: '--plasma-combobox-font-line-height',\n\n dropdownBorderColor: '--plasma-select-dropdown-border-color',\n dropdownBorderWidth: '--plasma-select-dropdown-border-width',\n\n itemHeight: '--plasma-combobox-item-height',\n itemBorderRadius: '--plasma-combobox-item-border-radius',\n itemPadding: '--plasma-combobox-item-padding',\n itemPaddingTight: '--plasma-combobox-item-padding-tight',\n itemIconSize: '--plasma-combobox-item-icon-size',\n itemIconSizeTight: '--plasma-combobox-item-icon-size-tight',\n itemIconMargin: '--plasma-combobox-item-icon-margin',\n itemBackgroundHover: '--plasma-combobox-item-background-hover',\n itemIconColor: '--plasma-combobox-item-icon-color',\n\n cellPadding: '--plasma-combobox-cell-padding',\n cellPaddingLeftContent: '--plasma-combobox-cell-padding-left-content',\n cellPaddingContent: '--plasma-combobox-cell-padding-content',\n cellPaddingRightContent: '--plasma-combobox-cell-padding-right-content',\n cellTextboxGap: '--plasma-combobox-cell-textbox-gap',\n cellGap: '--plasma-combobox-cell-gap',\n cellTitleFontFamily: '--plasma-combobox-cell-title-font-family',\n cellTitleFontSize: '--plasma-combobox-cell-title-font-size',\n cellTitleFontStyle: '--plasma-combobox-cell-title-font-style',\n cellTitleFontWeight: '--plasma-combobox-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-combobox-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-combobox-cell-title-line-height',\n\n checkboxTriggerSize: '--plasma-combobox-checkbox-trigger-size',\n checkboxTriggerSizeTight: '--plasma-combobox-checkbox-trigger-size-tight',\n checkboxTriggerBorderRadius: '--plasma-combobox-checkbox-trigger-border-radius',\n checkboxTriggerBorderRadiusTight: '--plasma-combobox-checkbox-trigger-border-radius-tight',\n checkboxFillColor: '--plasma-combobox-checkbox-fill-color',\n checkboxIconColor: '--plasma-combobox-checkbox-icon-color',\n checkboxTriggerBorderColor: '--plasma-combobox-checkbox-trigger-border-color',\n checkboxTriggerBorderCheckedColor: '--plasma-combobox-checkbox-trigger-border-checked-color',\n checkboxTriggerBorderWidth: '--plasma-combobox-checkbox-trigger-border-width',\n\n indicatorSize: '--plasma-combobox-indicator-size',\n\n // Токены для TextField\n textFieldColor: '--plasma-combobox-new-textfield-color',\n textFieldClearColor: '--plasma-combobox-new-textfield-clear-color',\n\n textFieldBackgroundColor: '--plasma-combobox-new-textfield-background-color',\n textFieldBackgroundColorHover: '--plasma-combobox-new-textfield-background-color-hover',\n textFieldBackgroundColorFocus: '--plasma-combobox-new-textfield-background-color-focus',\n\n textFieldBorderColor: '--plasma-combobox-new-textfield-border-color',\n textFieldBorderColorHover: '--plasma-combobox-new-textfield-border-color-hover',\n textFieldBorderColorFocus: '--plasma-combobox-new-textfield-border-color-focus',\n\n textFieldColorReadOnly: '--plasma-combobox-new-textfield-color-readonly',\n textFieldBackgroundColorReadOnly: '--plasma-combobox-new-textfield-bg-color-readonly',\n textFieldBorderColorReadOnly: '--plasma-combobox-new-textfield-border-color-readonly',\n textFieldPlaceholderColorReadOnly: '--plasma-combobox-new-textfield-placeholder-color-readonly',\n\n textFieldCaretColor: '--plasma-combobox-new-textfield-caret-color',\n textFieldPlaceholderColor: '--plasma-combobox-new-textfield-placeholder-color',\n textFieldPlaceholderColorFocus: '--plasma-combobox-new-textfield-placeholder-color-focus',\n textFieldClearPlaceholderColor: '--plasma-combobox-new-textfield-clear-placeholder-color',\n textFieldClearPlaceholderColorFocus: '--plasma-combobox-new-textfield-clear-placeholder-color-focus',\n textFieldOptionalColor: '--plasma-combobox-new-textfield-optional-color',\n\n textFieldHeight: '--plasma-combobox-new-textfield-height',\n textFieldBorderWidth: '--plasma-combobox-new-textfield-border-width',\n textFieldBorderRadius: '--plasma-combobox-new-textfield-border-radius',\n\n textFieldPadding: '--plasma-combobox-new-textfield-padding',\n textFieldPaddingWithChips: '--plasma-combobox-new-textfield-padding-with-chips',\n\n textFieldLeftContentMargin: '--plasma-combobox-new-textfield-left-content-margin',\n textFieldRightContentMargin: '--plasma-combobox-new-textfield-right-content-margin',\n textFieldRightContentWithHintMargin: '--plasma-combobox-textfield-right-content-with-hint-margin',\n\n textFieldContentRightWrapperGap: '--plasma-combobox-textfield-content-right-wrapper-gap',\n textFieldContentRightWrapperMargin: '--plasma-combobox-textfield-content-right-wrapper-margin',\n\n textFieldFontFamily: '--plasma-combobox-new-textfield-font-family',\n textFieldFontStyle: '--plasma-combobox-new-textfield-font-style',\n textFieldFontSize: '--plasma-combobox-new-textfield-font-size',\n textFieldFontWeight: '--plasma-combobox-new-textfield-font-weight',\n textFieldLetterSpacing: '--plasma-combobox-new-textfield-letter-spacing',\n textFieldLineHeight: '--plasma-combobox-new-textfield-line-height',\n\n textFieldContentSlotColor: '--plasma-combobox-new-textfield-content-slot-color',\n textFieldContentSlotColorHover: '--plasma-combobox-new-textfield-content-slot-color-hover',\n textFieldContentSlotColorActive: '--plasma-combobox-new-textfield-content-slot-color-active',\n\n textFieldContentSlotRightColor: '--plasma-combobox-new-textfield-content-right-slot-color',\n textFieldContentSlotRightColorHover: '--plasma-combobox-new-textfield-content-right-slot-color-hover',\n textFieldContentSlotRightColorActive: '--plasma-combobox-new-textfield-content-right-slot-color-active',\n\n textFieldLabelColor: '--plasma-combobox-new-textfield-label-color',\n textFieldLabelColorReadOnly: '--plasma-combobox-new-textfield-label-color-readonly',\n textFieldLabelOffset: '--plasma-combobox-new-textfield-label-offset',\n textFieldClearLabelOffset: '--plasma-combobox-new-textfield-clear-label-offset',\n\n textFieldLabelFontFamily: '--plasma-combobox-new-textfield-label-font-family',\n textFieldLabelFontStyle: '--plasma-combobox-new-textfield-label-font-style',\n textFieldLabelFontSize: '--plasma-combobox-new-textfield-label-font-size',\n textFieldLabelFontWeight: '--plasma-combobox-new-textfield-label-font-weight',\n textFieldLabelLetterSpacing: '--plasma-combobox-new-textfield-label-letter-spacing',\n textFieldLabelLineHeight: '--plasma-combobox-new-textfield-label-line-height',\n\n textFieldLabelInnerFontFamily: '--plasma-combobox-new-textfield-placement_inner-label-font-family',\n textFieldLabelInnerFontStyle: '--plasma-combobox-new-textfield-placement_inner-label-font-style',\n textFieldLabelInnerFontSize: '--plasma-combobox-new-textfield-placement_inner-label-font-size',\n textFieldLabelInnerFontWeight: '--plasma-combobox-new-textfield-placement_inner-label-font-weight',\n textFieldLabelInnerLetterSpacing: '--plasma-combobox-new-textfield-placement_inner-label-letter-spacing',\n textFieldLabelInnerLineHeight: '--plasma-combobox-new-textfield-placement_inner-label-line-height',\n\n textFieldLabelInnerPadding: '--plasma-combobox-new-textfield-placement_inner-label-padding',\n textFieldContentLabelInnerPadding: '--plasma-combobox-new-textfield-placement_inner-content-padding',\n\n textFieldTitleCaptionColor: '--plasma-combobox-new-textfield-title-caption-color',\n textFieldTitleCaptionColorReadOnly: '--plasma-combobox-new-textfield-title-caption-color-readonly',\n textFieldTitleCaptionInnerLabelOffset: '--plasma-combobox-new-textfield-title-caption-label-inner-offset',\n\n textFieldTitleCaptionFontFamily: '--plasma-combobox-new-textfield-title-caption-font-family',\n textFieldTitleCaptionFontStyle: '--plasma-combobox-new-textfield-title-caption-font-style',\n textFieldTitleCaptionFontSize: '--plasma-combobox-new-textfield-title-caption-font-size',\n textFieldTitleCaptionFontWeight: '--plasma-combobox-new-textfield-title-caption-font-weight',\n textFieldTitleCaptionLetterSpacing: '--plasma-combobox-new-textfield-title-caption-letter-spacing',\n textFieldTitleCaptionLineHeight: '--plasma-combobox-new-textfield-title-caption-line-height',\n\n textFieldLeftHelperColor: '--plasma-combobox-new-textfield-left-helper-color',\n textFieldLeftHelperColorReadOnly: '--plasma-combobox-new-textfield-left-helper-color-readonly',\n textFieldLeftHelperOffset: '--plasma-combobox-new-textfield-left-helper-offset',\n\n textFieldLeftHelperFontFamily: '--plasma-combobox-new-textfield-left-helper-font-family',\n textFieldLeftHelperFontStyle: '--plasma-combobox-new-textfield-left-helper-font-style',\n textFieldLeftHelperFontSize: '--plasma-combobox-new-textfield-left-helper-font-size',\n textFieldLeftHelperFontWeight: '--plasma-combobox-new-textfield-left-helper-font-weight',\n textFieldLeftHelperLetterSpacing: '--plasma-combobox-new-textfield-left-helper-letter-spacing',\n textFieldLeftHelperLineHeight: '--plasma-combobox-new-textfield-left-helper-line-height',\n\n textFieldTextBeforeColor: '--plasma-combobox-new-textfield-before-text-color',\n textFieldTextAfterColor: '--plasma-combobox-new-textfield-after-text-color',\n textFieldTextBeforeMargin: '--plasma-combobox-new-textfield-before-text-margin',\n textFieldTextAfterMargin: '--plasma-combobox-new-textfield-after-text-margin',\n\n textFieldDisabledOpacity: '--plasma-combobox-new-textfield-disabled-opacity',\n\n /** Токены для tooltip */\n textFieldHintCustomIconTargetSize: '--plasma-combobox-textfield__hint-custom-icon-target-size',\n textFieldHintMargin: '--plasma-combobox-textfield__hint-margin',\n textFieldHintTargetSize: '--plasma-combobox-textfield__hint-target-size',\n textFieldHintIconColor: '--plasma-combobox-textfield__hint-icon-color',\n textFieldHintInnerLabelPlacementOffset: '--plasma-combobox-textfield__hint-inner-label-placement-offset',\n textFieldClearHintInnerLabelPlacementOffset: '--plasma-combobox-textfield__clear-hint-inner-label-placement-offset',\n\n textFieldTooltipBackgroundColor: '--plasma-combobox-textfield__tooltip-background-color',\n textFieldTooltipBoxShadow: '--plasma-combobox-textfield__tooltip-box-shadow',\n textFieldTooltipColor: '--plasma-combobox-textfield__tooltip-color',\n\n textFieldTooltipPaddingTop: '--plasma-combobox-textfield__tooltip-padding-top',\n textFieldTooltipPaddingRight: '--plasma-combobox-textfield__tooltip-padding-right',\n textFieldTooltipPaddingBottom: '--plasma-combobox-textfield__tooltip-padding-bottom',\n textFieldTooltipPaddingLeft: '--plasma-combobox-textfield__tooltip-padding-left',\n textFieldTooltipMinHeight: '--plasma-combobox-textfield__tooltip-min-height',\n textFieldTooltipBorderRadius: '--plasma-combobox-textfield__tooltip-border-radius',\n textFieldTooltipTextFontFamily: '--plasma-combobox-textfield__tooltip-text-font-family',\n textFieldTooltipTextFontSize: '--plasma-combobox-textfield__tooltip-text-font-size',\n textFieldTooltipTextFontStyle: '--plasma-combobox-textfield__tooltip-text-font-style',\n textFieldTooltipTextFontWeight: '--plasma-combobox-textfield__tooltip-text-font-weight',\n textFieldTooltipTextFontLetterSpacing: '--plasma-combobox-textfield__tooltip-text-font-letter-spacing',\n textFieldTooltipTextFontLineHeight: '--plasma-combobox-textfield__tooltip-text-font-line-height',\n textFieldTooltipContentLeftMargin: '--plasma-combobox-textfield__tooltip-content-left-margin',\n textFieldTooltipArrowMaskWidth: '--plasma-combobox-textfield__tooltip-arrow-mask-width',\n textFieldTooltipArrowMaskHeight: '--plasma-combobox-textfield__tooltip-arrow-mask-height',\n textFieldTooltipArrowMaskImage: '--plasma-combobox-textfield__tooltip-arrow-mask-image',\n textFieldTooltipArrowHeight: '--plasma-combobox-textfield__tooltip-arrow-height',\n textFieldTooltipArrowEdgeMargin: '--plasma-combobox-textfield__tooltip-arrow-edge-margin',\n textFieldTooltipArrowBackground: '--plasma-combobox-textfield__tooltip-arrow-background',\n\n textFieldChipHeight: '--plasma-combobox-new-textfield-chip-height',\n textFieldChipBorderRadius: '--plasma-combobox-new-textfield-chip-border-radius',\n textFieldChipGap: '--plasma-combobox-new-textfield-chip-gap',\n textFieldChipBackground: '--plasma-combobox-new-textfield--chip-background',\n textFieldChipColor: '--plasma-combobox-new-textfield-chip-color',\n textFieldChipBackgroundHover: '--plasma-combobox-new-textfield-chip-background-hover',\n textFieldChipColorHover: '--plasma-combobox-new-textfield-chip-color-hover',\n textFieldChipBackgroundReadOnly: '--plasma-combobox-new-textfield-chip-background-read-only',\n textFieldChipColorReadOnly: '--plasma-combobox-new-textfield-chip-color-read-only',\n textFieldChipBackgroundReadOnlyHover: '--plasma-combobox-new-textfield-chip-background-read-only-hover',\n textFieldChipColorReadOnlyHover: '--plasma-combobox-new-textfield-chip-color-read-only-hover',\n textFieldChipBackgroundActive: '--plasma-combobox-new-textfield-chip-background-active',\n textFieldChipColorActive: '--plasma-combobox-new-textfield-chip-color-active',\n textFieldChipCloseIconColor: '--plasma-combobox-new-textfield-chip-close-icons-color',\n textFieldChipOutlineSize: '--plasma-combobox-new-textfield-chip-outline-size',\n textFieldChipWidth: '--plasma-combobox-new-textfield-chip-width',\n textFieldChipPadding: '--plasma-combobox-new-textfield-chip-padding',\n textFieldChipCloseIconSize: '--plasma-combobox-new-textfield-chip-close-icon-size',\n textFieldChipFontFamily: '--plasma-combobox-new-textfield-chip-font-family',\n textFieldChipFontSize: '--plasma-combobox-new-textfield-chip-font-size',\n textFieldChipFontStyle: '--plasma-combobox-new-textfield-chip-font-style',\n textFieldChipFontWeight: '--plasma-combobox-new-textfield-chip-font-weight',\n textFieldChipLetterSpacing: '--plasma-combobox-new-textfield-chip-letter-spacing',\n textFieldChipLineHeight: '--plasma-combobox-new-textfield-chip-line-height',\n textFieldChipClearContentMarginLeft: '--plasma-combobox-new-textfield-chip-clear-content-margin-left',\n textFieldChipClearContentMarginRight: '--plasma-combobox-new-textfield-chip-clear-content-margin-right',\n textFieldChipOpacityReadonly: '--plasma-combobox-new-textfield-chip-opacity-readonly',\n\n textFieldFocusColor: '--plasma-combobox-new-textfield-focus-color',\n\n textFieldBoxShadow: '--plasma-select-textfield-box-shadow',\n\n textFieldIndicatorColor: '--plasma-combobox-new-textfield-indicator-color',\n textFieldIndicatorSizeInner: '--plasma-combobox-new-textfield-indicator-size-inner',\n textFieldIndicatorSizeOuter: '--plasma-combobox-new-textfield-indicator-size-outer',\n textFieldIndicatorLabelPlacementInner: '--plasma-combobox-new-textfield-indicator-placement-inner',\n textFieldIndicatorLabelPlacementOuter: '--plasma-combobox-new-textfield-indicator-placement-outer',\n textFieldIndicatorLabelPlacementInnerRight: '--plasma-combobox-new-textfield-indicator-placement-inner-right',\n textFieldIndicatorLabelPlacementOuterRight: '--plasma-combobox-new-textfield-indicator-placement-outer-right',\n textFieldClearIndicatorLabelPlacementInner: '--plasma-combobox-new-textfield-clear-indicator-placement-inner',\n textFieldClearIndicatorLabelPlacementInnerRight:\n '--plasma-combobox-new-textfield-clear-indicator-placement-inner-right',\n textFieldClearIndicatorHintInnerRight: '--plasma-combobox-new-textfield-clear-indicator-hint-placement-inner-right',\n\n // Токены для EmptyState\n emptyStatePadding: '--plasma-combobox-new-empty-state-padding',\n\n labelOffset: '--plasma-combobox-label-offset',\n\n innerLabelGap: '--plasma-combobox-inner-label-gap',\n\n helperTextColor: '--plasma-combobox-helper-text-color',\n helperTextOffset: '--plasma-combobox-helper-text-offset',\n\n spinnerSize: '--plasma-combobox-spinner-size',\n spinnerSizeTight: '--plasma-combobox-spinner-size-tight',\n\n disclosureIconColor: '--plasma-combobox-disclosure-icon-color',\n disclosureIconColorHover: '--plasma-combobox-disclosure-icon-color-hover',\n disclosureIconSize: '--plasma-select-disclosure-icon-size',\n disclosureIconMargin: '--plasma-select-disclosure-icon-margin',\n\n dividerMarginTop: '--plasma-combobox-divider-margin-top',\n dividerMarginTopTight: '--plasma-combobox-divider-margin-top-tight',\n dividerMarginRight: '--plasma-combobox-divider-margin-right',\n dividerMarginBottom: '--plasma-combobox-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-combobox-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-combobox-divider-margin-left',\n dividerColor: '--plasma-combobox-divider-color',\n};\n\nexport const constants = {\n focusColor: '--surface-accent',\n focusSize: '0.0625rem',\n background: '--surface-solid-card',\n boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',\n itemBackground: '--surface-clear',\n textfieldTargetColor: '--text-primary',\n textfieldOuterLabelColor: '--text-primary',\n textfieldInnerLabelColor: '--text-secondary',\n textfieldPlaceholderColor: '--text-secondary',\n textfieldBorderSize: '0.0625rem',\n opacity: '0.4',\n fontFamily: '--plasma-typo-body-xs-font-family',\n fontSize: '--plasma-typo-body-xs-font-size',\n fontStyle: '--plasma-typo-body-xs-font-style',\n fontWeight: '--plasma-typo-body-xs-font-weight',\n fontLetterSpacing: '--plasma-typo-body-xs-letter-spacing',\n fontLineHeight: '--plasma-typo-body-xs-line-height',\n cellTitleColor: '--text-primary',\n cellBackgroundColor: '--surface-clear',\n};\n"],"names":["classes","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","selectTargetArrow","arrowInverse","textfieldTarget","selectChipIsFocused","selectWithoutBoxShadow","selectItemCheckbox","selectSpinner","emptyStateWrapper","tokens","borderRadius","padding","margin","focusOffset","fontFamily","fontSize","fontStyle","fontWeight","fontLetterSpacing","fontLineHeight","dropdownBorderColor","dropdownBorderWidth","itemHeight","itemBorderRadius","itemPadding","itemPaddingTight","itemIconSize","itemIconSizeTight","itemIconMargin","itemBackgroundHover","itemIconColor","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","checkboxTriggerSize","checkboxTriggerSizeTight","checkboxTriggerBorderRadius","checkboxTriggerBorderRadiusTight","checkboxFillColor","checkboxIconColor","checkboxTriggerBorderColor","checkboxTriggerBorderCheckedColor","checkboxTriggerBorderWidth","indicatorSize","textFieldColor","textFieldClearColor","textFieldBackgroundColor","textFieldBackgroundColorHover","textFieldBackgroundColorFocus","textFieldBorderColor","textFieldBorderColorHover","textFieldBorderColorFocus","textFieldColorReadOnly","textFieldBackgroundColorReadOnly","textFieldBorderColorReadOnly","textFieldPlaceholderColorReadOnly","textFieldCaretColor","textFieldPlaceholderColor","textFieldPlaceholderColorFocus","textFieldClearPlaceholderColor","textFieldClearPlaceholderColorFocus","textFieldOptionalColor","textFieldHeight","textFieldBorderWidth","textFieldBorderRadius","textFieldPadding","textFieldPaddingWithChips","textFieldLeftContentMargin","textFieldRightContentMargin","textFieldRightContentWithHintMargin","textFieldContentRightWrapperGap","textFieldContentRightWrapperMargin","textFieldFontFamily","textFieldFontStyle","textFieldFontSize","textFieldFontWeight","textFieldLetterSpacing","textFieldLineHeight","textFieldContentSlotColor","textFieldContentSlotColorHover","textFieldContentSlotColorActive","textFieldContentSlotRightColor","textFieldContentSlotRightColorHover","textFieldContentSlotRightColorActive","textFieldLabelColor","textFieldLabelColorReadOnly","textFieldLabelOffset","textFieldClearLabelOffset","textFieldLabelFontFamily","textFieldLabelFontStyle","textFieldLabelFontSize","textFieldLabelFontWeight","textFieldLabelLetterSpacing","textFieldLabelLineHeight","textFieldLabelInnerFontFamily","textFieldLabelInnerFontStyle","textFieldLabelInnerFontSize","textFieldLabelInnerFontWeight","textFieldLabelInnerLetterSpacing","textFieldLabelInnerLineHeight","textFieldLabelInnerPadding","textFieldContentLabelInnerPadding","textFieldTitleCaptionColor","textFieldTitleCaptionColorReadOnly","textFieldTitleCaptionInnerLabelOffset","textFieldTitleCaptionFontFamily","textFieldTitleCaptionFontStyle","textFieldTitleCaptionFontSize","textFieldTitleCaptionFontWeight","textFieldTitleCaptionLetterSpacing","textFieldTitleCaptionLineHeight","textFieldLeftHelperColor","textFieldLeftHelperColorReadOnly","textFieldLeftHelperOffset","textFieldLeftHelperFontFamily","textFieldLeftHelperFontStyle","textFieldLeftHelperFontSize","textFieldLeftHelperFontWeight","textFieldLeftHelperLetterSpacing","textFieldLeftHelperLineHeight","textFieldTextBeforeColor","textFieldTextAfterColor","textFieldTextBeforeMargin","textFieldTextAfterMargin","textFieldDisabledOpacity","textFieldHintCustomIconTargetSize","textFieldHintMargin","textFieldHintTargetSize","textFieldHintIconColor","textFieldHintInnerLabelPlacementOffset","textFieldClearHintInnerLabelPlacementOffset","textFieldTooltipBackgroundColor","textFieldTooltipBoxShadow","textFieldTooltipColor","textFieldTooltipPaddingTop","textFieldTooltipPaddingRight","textFieldTooltipPaddingBottom","textFieldTooltipPaddingLeft","textFieldTooltipMinHeight","textFieldTooltipBorderRadius","textFieldTooltipTextFontFamily","textFieldTooltipTextFontSize","textFieldTooltipTextFontStyle","textFieldTooltipTextFontWeight","textFieldTooltipTextFontLetterSpacing","textFieldTooltipTextFontLineHeight","textFieldTooltipContentLeftMargin","textFieldTooltipArrowMaskWidth","textFieldTooltipArrowMaskHeight","textFieldTooltipArrowMaskImage","textFieldTooltipArrowHeight","textFieldTooltipArrowEdgeMargin","textFieldTooltipArrowBackground","textFieldChipHeight","textFieldChipBorderRadius","textFieldChipGap","textFieldChipBackground","textFieldChipColor","textFieldChipBackgroundHover","textFieldChipColorHover","textFieldChipBackgroundReadOnly","textFieldChipColorReadOnly","textFieldChipBackgroundReadOnlyHover","textFieldChipColorReadOnlyHover","textFieldChipBackgroundActive","textFieldChipColorActive","textFieldChipCloseIconColor","textFieldChipOutlineSize","textFieldChipWidth","textFieldChipPadding","textFieldChipCloseIconSize","textFieldChipFontFamily","textFieldChipFontSize","textFieldChipFontStyle","textFieldChipFontWeight","textFieldChipLetterSpacing","textFieldChipLineHeight","textFieldChipClearContentMarginLeft","textFieldChipClearContentMarginRight","textFieldChipOpacityReadonly","textFieldFocusColor","textFieldBoxShadow","textFieldIndicatorColor","textFieldIndicatorSizeInner","textFieldIndicatorSizeOuter","textFieldIndicatorLabelPlacementInner","textFieldIndicatorLabelPlacementOuter","textFieldIndicatorLabelPlacementInnerRight","textFieldIndicatorLabelPlacementOuterRight","textFieldClearIndicatorLabelPlacementInner","textFieldClearIndicatorLabelPlacementInnerRight","textFieldClearIndicatorHintInnerRight","emptyStatePadding","labelOffset","innerLabelGap","helperTextColor","helperTextOffset","spinnerSize","spinnerSizeTight","disclosureIconColor","disclosureIconColorHover","disclosureIconSize","disclosureIconMargin","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","dividerColor"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,oBAAoB,EAAE,yBAAyB;AAC/CC,EAAAA,iBAAiB,EAAE,uBAAuB;AAC1CC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,eAAe,EAAE,2BAA2B;AAC5CC,EAAAA,mBAAmB,EAAE,0BAA0B;AAC/CC,EAAAA,sBAAsB,EAAE,6BAA6B;AACrDC,EAAAA,kBAAkB,EAAE,wBAAwB;AAC5CC,EAAAA,aAAa,EAAE,kBAAkB;AACjCC,EAAAA,iBAAiB,EAAE,8BAAA;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,EAAAA,gBAAgB,EAAE,sCAAsC;AAExDC,EAAAA,WAAW,EAAE,gCAAgC;AAC7CC,EAAAA,gBAAgB,EAAE,sCAAsC;AAExDC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,wBAAwB,EAAE,+CAA+C;AACzEC,EAAAA,kBAAkB,EAAE,sCAAsC;AAC1DC,EAAAA,oBAAoB,EAAE,wCAAwC;AAE9DC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,wBAAwB,EAAE,+CAA+C;AACzEC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,YAAY,EAAE,iCAAA;AAClB;;;;;"}
|
@@ -176,9 +176,13 @@ var useKeyNavigation = function useKeyNavigation(_ref) {
|
|
176
176
|
case keys.Tab:
|
177
177
|
case keys.Escape:
|
178
178
|
{
|
179
|
-
|
180
|
-
|
181
|
-
}
|
179
|
+
dispatchPath({
|
180
|
+
type: 'reset'
|
181
|
+
});
|
182
|
+
dispatchFocusedPath({
|
183
|
+
type: 'reset'
|
184
|
+
});
|
185
|
+
handleListToggle(false);
|
182
186
|
if (multiple) {
|
183
187
|
setTextValue('');
|
184
188
|
} else if (textValue !== value) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../../src/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import type { KeyboardEvent, Dispatch } from 'react';\nimport React from 'react';\n\nimport { PathAction, PathState, FocusedPathAction, FocusedPathState } from '../reducers';\nimport type { ItemOptionTransformed } from '../ui/Inner/ui/Item/Item.types';\nimport { isEmpty } from '../../../../utils';\n\nimport { PathMapType, FocusedToValueMapType, ValueToItemMapType } from './getPathMaps';\n\nconst JUMP_SIZE = 10;\n\nexport const keys = {\n Enter: 'Enter',\n Space: 'Space',\n Tab: 'Tab',\n Escape: 'Escape',\n Backspace: 'Backspace',\n ArrowLeft: 'ArrowLeft',\n ArrowRight: 'ArrowRight',\n ArrowUp: 'ArrowUp',\n ArrowDown: 'ArrowDown',\n Home: 'Home',\n End: 'End',\n PageUp: 'PageUp',\n PageDown: 'PageDown',\n};\n\nexport const getItemByFocused = (focusedPath: FocusedPathState, focusedToValueMap: FocusedToValueMapType) => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n\n return focusedToValueMap.get(focusedPathAsString);\n};\n\ntype Props = {\n focusedPath: FocusedPathState;\n dispatchFocusedPath: Dispatch<FocusedPathAction>;\n path: PathState;\n dispatchPath: Dispatch<PathAction>;\n pathMap: PathMapType;\n focusedToValueMap: FocusedToValueMapType;\n handleListToggle: (opened: boolean) => void;\n handlePressDown: (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => void;\n setTextValue: React.Dispatch<React.SetStateAction<string>>;\n multiple: boolean | undefined;\n value: string | string[];\n textValue: string;\n valueToItemMap: ValueToItemMapType;\n};\n\ntype ReturnedProps = {\n onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;\n};\n\nexport const useKeyNavigation = ({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n setTextValue,\n multiple,\n value,\n textValue,\n valueToItemMap,\n}: Props): ReturnedProps => {\n const currentIndex: number = focusedPath?.[focusedPath.length - 1] || 0;\n const currentLength: number = pathMap.get(path?.[focusedPath.length - 1]) || 0;\n\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n switch (event.key) {\n case keys.ArrowUp: {\n if (focusedPath.length) {\n if (currentIndex > 0) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n break;\n }\n\n case keys.ArrowDown: {\n if (focusedPath.length) {\n if (currentIndex + 1 < currentLength) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n break;\n }\n\n case keys.ArrowLeft: {\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n\n if (focusedPath.length) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n } else {\n dispatchFocusedPath({ type: 'return_prev_focus' });\n }\n }\n\n if (path.length === 1) {\n handleListToggle(false);\n }\n }\n\n break;\n }\n\n case keys.ArrowRight: {\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!focusedPath.length) {\n break;\n }\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap);\n\n if (currentItem?.disabled) {\n break;\n }\n\n if (currentItem?.items) {\n if (path.length > focusedPath.length) {\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n }\n }\n }\n\n break;\n }\n\n case keys.Enter: {\n event.preventDefault();\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap)!;\n\n if (currentItem?.disabled) {\n break;\n }\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n if (currentItem) {\n handlePressDown(currentItem);\n }\n\n break;\n }\n\n case keys.Tab:\n case keys.Escape: {\n if (path[0]) {\n handleListToggle(false);\n }\n\n if (multiple) {\n setTextValue('');\n } else if (textValue !== value) {\n // Проверяем, отличается ли значение в инпуте от выбранного value после нажатия Tab/Enter.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n\n break;\n }\n\n case keys.Home: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.End: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'change_last_focus', value: (pathMap.get('root') || 0) - 1 });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.PageUp: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - JUMP_SIZE });\n }\n\n break;\n }\n\n case keys.PageDown: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentLength - currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + JUMP_SIZE });\n }\n\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return { onKeyDown };\n};\n"],"names":["JUMP_SIZE","keys","Enter","Space","Tab","Escape","Backspace","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","getItemByFocused","focusedPath","focusedToValueMap","focusedPathAsString","reduce","acc","n","concat","replace","get","useKeyNavigation","_ref","dispatchFocusedPath","path","dispatchPath","pathMap","handleListToggle","handlePressDown","setTextValue","multiple","value","textValue","valueToItemMap","currentIndex","length","currentLength","onKeyDown","event","key","type","stopPropagation","preventDefault","currentItem","disabled","items","toString","isEmpty","_valueToItemMap$get","label"],"mappings":";;;;;;AASA,IAAMA,SAAS,GAAG,EAAE,CAAA;AAEb,IAAMC,IAAI,GAAG;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAEM,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,WAA6B,EAAEC,iBAAwC,EAAK;EACzG,IAAMC,mBAAmB,GAAGF,WAAW,CAACG,MAAM,CAAC,UAACC,GAAG,EAAEC,CAAC,EAAA;AAAA,IAAA,OAAA,EAAA,CAAAC,MAAA,CAAQF,GAAG,EAAAE,GAAAA,CAAAA,CAAAA,MAAA,CAAID,CAAC,CAAA,CAAA;GAAE,EAAE,EAAE,CAAC,CAACE,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;AAElG,EAAA,OAAON,iBAAiB,CAACO,GAAG,CAACN,mBAAmB,CAAC,CAAA;AACrD,EAAC;IAsBYO,g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|
1
|
+
{"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../../src/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import type { KeyboardEvent, Dispatch } from 'react';\nimport React from 'react';\n\nimport { PathAction, PathState, FocusedPathAction, FocusedPathState } from '../reducers';\nimport type { ItemOptionTransformed } from '../ui/Inner/ui/Item/Item.types';\nimport { isEmpty } from '../../../../utils';\n\nimport { PathMapType, FocusedToValueMapType, ValueToItemMapType } from './getPathMaps';\n\nconst JUMP_SIZE = 10;\n\nexport const keys = {\n Enter: 'Enter',\n Space: 'Space',\n Tab: 'Tab',\n Escape: 'Escape',\n Backspace: 'Backspace',\n ArrowLeft: 'ArrowLeft',\n ArrowRight: 'ArrowRight',\n ArrowUp: 'ArrowUp',\n ArrowDown: 'ArrowDown',\n Home: 'Home',\n End: 'End',\n PageUp: 'PageUp',\n PageDown: 'PageDown',\n};\n\nexport const getItemByFocused = (focusedPath: FocusedPathState, focusedToValueMap: FocusedToValueMapType) => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n\n return focusedToValueMap.get(focusedPathAsString);\n};\n\ntype Props = {\n focusedPath: FocusedPathState;\n dispatchFocusedPath: Dispatch<FocusedPathAction>;\n path: PathState;\n dispatchPath: Dispatch<PathAction>;\n pathMap: PathMapType;\n focusedToValueMap: FocusedToValueMapType;\n handleListToggle: (opened: boolean) => void;\n handlePressDown: (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => void;\n setTextValue: React.Dispatch<React.SetStateAction<string>>;\n multiple: boolean | undefined;\n value: string | string[];\n textValue: string;\n valueToItemMap: ValueToItemMapType;\n};\n\ntype ReturnedProps = {\n onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;\n};\n\nexport const useKeyNavigation = ({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n setTextValue,\n multiple,\n value,\n textValue,\n valueToItemMap,\n}: Props): ReturnedProps => {\n const currentIndex: number = focusedPath?.[focusedPath.length - 1] || 0;\n const currentLength: number = pathMap.get(path?.[focusedPath.length - 1]) || 0;\n\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n switch (event.key) {\n case keys.ArrowUp: {\n if (focusedPath.length) {\n if (currentIndex > 0) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n break;\n }\n\n case keys.ArrowDown: {\n if (focusedPath.length) {\n if (currentIndex + 1 < currentLength) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n }\n\n break;\n }\n\n case keys.ArrowLeft: {\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n\n if (focusedPath.length) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n } else {\n dispatchFocusedPath({ type: 'return_prev_focus' });\n }\n }\n\n if (path.length === 1) {\n handleListToggle(false);\n }\n }\n\n break;\n }\n\n case keys.ArrowRight: {\n if (path[0]) {\n event.stopPropagation();\n event.preventDefault();\n\n if (!focusedPath.length) {\n break;\n }\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap);\n\n if (currentItem?.disabled) {\n break;\n }\n\n if (currentItem?.items) {\n if (path.length > focusedPath.length) {\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n }\n }\n }\n\n break;\n }\n\n case keys.Enter: {\n event.preventDefault();\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap)!;\n\n if (currentItem?.disabled) {\n break;\n }\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n if (currentItem) {\n handlePressDown(currentItem);\n }\n\n break;\n }\n\n case keys.Tab:\n case keys.Escape: {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n handleListToggle(false);\n\n if (multiple) {\n setTextValue('');\n } else if (textValue !== value) {\n // Проверяем, отличается ли значение в инпуте от выбранного value после нажатия Tab/Enter.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n\n break;\n }\n\n case keys.Home: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.End: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'change_last_focus', value: (pathMap.get('root') || 0) - 1 });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.PageUp: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - JUMP_SIZE });\n }\n\n break;\n }\n\n case keys.PageDown: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentLength - currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + JUMP_SIZE });\n }\n\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return { onKeyDown };\n};\n"],"names":["JUMP_SIZE","keys","Enter","Space","Tab","Escape","Backspace","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","getItemByFocused","focusedPath","focusedToValueMap","focusedPathAsString","reduce","acc","n","concat","replace","get","useKeyNavigation","_ref","dispatchFocusedPath","path","dispatchPath","pathMap","handleListToggle","handlePressDown","setTextValue","multiple","value","textValue","valueToItemMap","currentIndex","length","currentLength","onKeyDown","event","key","type","stopPropagation","preventDefault","currentItem","disabled","items","toString","isEmpty","_valueToItemMap$get","label"],"mappings":";;;;;;AASA,IAAMA,SAAS,GAAG,EAAE,CAAA;AAEb,IAAMC,IAAI,GAAG;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAEM,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,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AC,CAAA;AAChD,WAAA;AAEA,UAAA,IAAIJ,aAAa,GAAGF,YAAY,IAAItC,SAAS,EAAE;AAC3C2B,YAAAA,mBAAmB,CAAC;AAAEiB,cAAAA,IAAI,EAAE,mBAAmB;cAAET,KAAK,EAAEK,aAAa,GAAG,CAAA;AAAE,aAAC,CAAC,CAAA;AAChF,WAAC,MAAM;AACHb,YAAAA,mBAAmB,CAAC;AAAEiB,cAAAA,IAAI,EAAE,mBAAmB;cAAET,KAAK,EAAEG,YAAY,GAAGtC,SAAAA;AAAU,aAAC,CAAC,CAAA;AACvF,WAAA;AAEA,UAAA,MAAA;AACJ,SAAA;AAKJ,KAAA;GACH,CAAA;EAED,OAAO;AAAEyC,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACxB;;;;;;"}
|
@@ -19,8 +19,7 @@ var Inner = function Inner(_ref) {
|
|
19
19
|
path = _ref.path,
|
20
20
|
dispatchPath = _ref.dispatchPath,
|
21
21
|
index = _ref.index,
|
22
|
-
listWidth = _ref.listWidth
|
23
|
-
portal = _ref.portal;
|
22
|
+
listWidth = _ref.listWidth;
|
24
23
|
var handleToggle = function handleToggle(opened) {
|
25
24
|
if (opened) {
|
26
25
|
dispatchPath({
|
@@ -35,7 +34,6 @@ var Inner = function Inner(_ref) {
|
|
35
34
|
});
|
36
35
|
}
|
37
36
|
};
|
38
|
-
var listWrapperRef = React.useRef(null);
|
39
37
|
var isCurrentListOpen = path[currentLevel + 1] === item.value.toString();
|
40
38
|
var treeId = react.safeUseId();
|
41
39
|
var listId = "".concat(treeId, "_tree_level_").concat(currentLevel + 2);
|
@@ -56,16 +54,13 @@ var Inner = function Inner(_ref) {
|
|
56
54
|
ariaLevel: nextLevel,
|
57
55
|
ariaLabel: item.label
|
58
56
|
}),
|
59
|
-
isInner: true
|
60
|
-
portal: portal
|
57
|
+
isInner: true
|
61
58
|
}, /*#__PURE__*/React__default.default.createElement(Combobox_styles.ListWrapper, {
|
62
|
-
listWidth: listWidth
|
63
|
-
ref: listWrapperRef
|
59
|
+
listWidth: listWidth
|
64
60
|
}, /*#__PURE__*/React__default.default.createElement(Combobox_styles.Ul, {
|
65
61
|
role: "group",
|
66
62
|
id: listId,
|
67
|
-
virtual: false
|
68
|
-
listMaxHeight: item === null || item === void 0 ? void 0 : item.listMaxHeight
|
63
|
+
virtual: false
|
69
64
|
}, (_item$items = item.items) === null || _item$items === void 0 ? void 0 : _item$items.map(function (innerItem, innerIndex) {
|
70
65
|
return /*#__PURE__*/React__default.default.createElement(Inner, {
|
71
66
|
key: "".concat(innerIndex, "/").concat(currentLevel),
|
@@ -74,8 +69,7 @@ var Inner = function Inner(_ref) {
|
|
74
69
|
path: path,
|
75
70
|
dispatchPath: dispatchPath,
|
76
71
|
index: innerIndex,
|
77
|
-
listWidth: listWidth
|
78
|
-
portal: listWrapperRef
|
72
|
+
listWidth: listWidth
|
79
73
|
});
|
80
74
|
}))));
|
81
75
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Inner.js","sources":["../../../../../../src/components/Combobox/ComboboxNew/ui/Inner/Inner.tsx"],"sourcesContent":["import React
|
1
|
+
{"version":3,"file":"Inner.js","sources":["../../../../../../src/components/Combobox/ComboboxNew/ui/Inner/Inner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { safeUseId } from 'src/utils';\n\nimport { FloatingPopover } from '../../FloatingPopover';\nimport { isEmpty } from '../../../../../utils';\nimport { Ul, ListWrapper } from '../../Combobox.styles';\n\nimport type { ItemOptionTransformed } from './ui/Item/Item.types';\nimport { Item } from './ui';\nimport { InnerProps } from './Inner.type';\n\nexport const Inner: FC<InnerProps> = ({ item, currentLevel, path, dispatchPath, index, listWidth }) => {\n const handleToggle = (opened: boolean): void => {\n if (opened) {\n dispatchPath({ type: 'changed_on_level', value: item.value.toString(), level: currentLevel + 1 });\n } else {\n dispatchPath({ type: 'cut_by_level', level: currentLevel + 1 });\n }\n };\n\n const isCurrentListOpen = path[currentLevel + 1] === item.value.toString();\n\n const treeId = safeUseId();\n const listId = `${treeId}_tree_level_${currentLevel + 2}`;\n const nextLevel = currentLevel + 1;\n\n if (!isEmpty(item?.items)) {\n return (\n <FloatingPopover\n placement={item?.placement || 'right-start'}\n opened={isCurrentListOpen}\n onToggle={handleToggle}\n target={\n <Item\n item={item}\n path={path}\n currentLevel={currentLevel}\n index={index}\n ariaControls={listId}\n ariaExpanded={isCurrentListOpen}\n ariaLevel={nextLevel}\n ariaLabel={item.label}\n />\n }\n isInner\n >\n <ListWrapper listWidth={listWidth}>\n <Ul role=\"group\" id={listId} virtual={false}>\n {item.items?.map((innerItem: ItemOptionTransformed, innerIndex: number) => (\n <Inner\n key={`${innerIndex}/${currentLevel}`}\n item={innerItem}\n currentLevel={nextLevel}\n path={path}\n dispatchPath={dispatchPath}\n index={innerIndex}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </ListWrapper>\n </FloatingPopover>\n );\n }\n\n return <Item item={item} path={path} index={index} currentLevel={currentLevel} ariaLevel={nextLevel} />;\n};\n"],"names":["Inner","_ref","item","currentLevel","path","dispatchPath","index","listWidth","handleToggle","opened","type","value","toString","level","isCurrentListOpen","treeId","safeUseId","listId","concat","nextLevel","isEmpty","items","_item$items","React","createElement","FloatingPopover","placement","onToggle","target","Item","ariaControls","ariaExpanded","ariaLevel","ariaLabel","label","isInner","ListWrapper","Ul","role","id","virtual","map","innerItem","innerIndex","key"],"mappings":";;;;;;;;;;;;;;;IAYaA,KAAqB,GAAG,SAAxBA,KAAqBA,CAAAC,IAAA,EAAqE;AAAA,EAAA,IAA/DC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IAAEC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAEC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAEC,KAAK,GAAAL,IAAA,CAALK,KAAK;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS,CAAA;AAC5F,EAA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;AAE1B,GAAA;AAEA,EAAA,oBAAOgB,sBAAA,CAAAC,aAAA,CAACK,SAAI,EAAA;AAAC3B,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,KAAK,EAAEA,KAAM;AAACH,IAAAA,YAAY,EAAEA,YAAa;AAAC6B,IAAAA,SAAS,EAAEb,SAAAA;AAAU,GAAE,CAAC,CAAA;AAC3G;;;;"}
|
@@ -62,6 +62,18 @@ var useDrawer = function useDrawer(_ref) {
|
|
62
62
|
document.body.style.overflow = overflow.current;
|
63
63
|
}
|
64
64
|
}, [isOpen, popupController.items]);
|
65
|
+
|
66
|
+
// При анмаунте компонента нужно обновлять overflow у body.
|
67
|
+
React.useEffect(function () {
|
68
|
+
return function () {
|
69
|
+
if (!canUseDOM.canUseDOM) {
|
70
|
+
return;
|
71
|
+
}
|
72
|
+
if (!DrawerContext.hasDrawers(Array.from(popupController.items.values()))) {
|
73
|
+
document.body.style.overflow = overflow.current;
|
74
|
+
}
|
75
|
+
};
|
76
|
+
}, []);
|
65
77
|
var drawerInfo = _rollupPluginBabelHelpers.objectSpread2({
|
66
78
|
id: id,
|
67
79
|
info: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDrawer.js","sources":["../../../../src/components/Drawer/hooks/useDrawer.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\n\nimport { DrawerInfo, getIdLastDrawer, hasDrawers } from '../DrawerContext';\nimport { DrawerHookArgs } from '../Drawer.types';\nimport { usePopupContext } from '../../Popup';\nimport { canUseDOM } from '../../../utils';\n\nconst ESCAPE_KEYCODE = 27;\n\nexport const useDrawer = ({\n id,\n isOpen,\n popupInfo,\n onEscKeyDown,\n onClose,\n closeOnEsc = true,\n disableScroll = true,\n}: DrawerHookArgs) => {\n const popupController = usePopupContext();\n const overflow = useRef<string>(canUseDOM ? document.body.style.overflow : 'initial');\n\n // При ESC закрывает текущее окно, если это возможно\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n return;\n }\n if (\n event.keyCode === ESCAPE_KEYCODE &&\n getIdLastDrawer(Array.from(popupController.items.values())) === id\n ) {\n if (onEscKeyDown) {\n onEscKeyDown(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n }\n },\n [onClose, onEscKeyDown, popupController.items, closeOnEsc],\n );\n\n useEffect(() => {\n window.addEventListener('keydown', onKeyDown);\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onKeyDown]);\n\n // linaria не поддерживает динамический global\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (isOpen && disableScroll) {\n overflow.current = document.body.style.overflow;\n\n document.body.style.overflow = 'hidden';\n }\n }, [isOpen, disableScroll]);\n\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (!isOpen && !hasDrawers(Array.from(popupController.items.values()))) {\n document.body.style.overflow = overflow.current;\n }\n }, [isOpen, popupController.items]);\n\n const drawerInfo: DrawerInfo = {\n id,\n info: {\n isDrawer: true,\n },\n ...popupInfo,\n };\n\n return { drawerInfo };\n};\n"],"names":["ESCAPE_KEYCODE","useDrawer","_ref","id","isOpen","popupInfo","onEscKeyDown","onClose","_ref$closeOnEsc","closeOnEsc","_ref$disableScroll","disableScroll","popupController","usePopupContext","overflow","useRef","canUseDOM","document","body","style","onKeyDown","useCallback","event","keyCode","getIdLastDrawer","Array","from","items","values","useEffect","window","addEventListener","removeEventListener","current","hasDrawers","drawerInfo","_objectSpread","info","isDrawer"],"mappings":";;;;;;;;;;AAOA,IAAMA,cAAc,GAAG,EAAE,CAAA;IAEZC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQA;AAAA,EAAA,IAPlBC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,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CAAA;AACL,GAAC,EAAE,CAACA,SAAS,CAAC,CAAC,CAAA;;AAEf;AACAS,EAAAA,eAAS,CAAC,YAAM;IACZ,IAAI,CAACb,mBAAS,EAAE;AACZ,MAAA,OAAA;AACJ,KAAA;IAEA,IAAIZ,MAAM,IAAIO,aAAa,EAAE;MACzBG,QAAQ,CAACmB,OAAO,GAAGhB,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACL,QAAQ,CAAA;AAE/CG,MAAAA,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACL,QAAQ,GAAG,QAAQ,CAAA;AAC3C,KAAA;AACJ,GAAC,EAAE,CAACV,MAAM,EAAEO,aAAa,CAAC,CAAC,CAAA;AAE3BkB,EAAAA,eAAS,CAAC,YAAM;IACZ,IAAI,CAACb,mBAAS,EAAE;AACZ,MAAA,OAAA;AACJ,KAAA;AAEA,IAAA,IAAI,CAACZ,MAAM,IAAI,CAAC8B,wBAAU,CAACT,KAAK,CAACC,IAAI,CAACd,eAAe,CAACe,KAAK,CAACC,MAAM,EAAE,CAAC,CAAC,EAAE;MACpEX,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACL,QAAQ,GAAGA,QAAQ,CAACmB,OAAO,CAAA;AACnD,KAAA;GACH,EAAE,CAAC7B,MAAM,EAAEQ,eAAe,CAACe,KAAK,CAAC,CAAC,CAAA;
|
1
|
+
{"version":3,"file":"useDrawer.js","sources":["../../../../src/components/Drawer/hooks/useDrawer.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react';\n\nimport { DrawerInfo, getIdLastDrawer, hasDrawers } from '../DrawerContext';\nimport { DrawerHookArgs } from '../Drawer.types';\nimport { usePopupContext } from '../../Popup';\nimport { canUseDOM } from '../../../utils';\n\nconst ESCAPE_KEYCODE = 27;\n\nexport const useDrawer = ({\n id,\n isOpen,\n popupInfo,\n onEscKeyDown,\n onClose,\n closeOnEsc = true,\n disableScroll = true,\n}: DrawerHookArgs) => {\n const popupController = usePopupContext();\n const overflow = useRef<string>(canUseDOM ? document.body.style.overflow : 'initial');\n\n // При ESC закрывает текущее окно, если это возможно\n const onKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (!closeOnEsc) {\n return;\n }\n if (\n event.keyCode === ESCAPE_KEYCODE &&\n getIdLastDrawer(Array.from(popupController.items.values())) === id\n ) {\n if (onEscKeyDown) {\n onEscKeyDown(event);\n return;\n }\n\n if (onClose) {\n onClose();\n }\n }\n },\n [onClose, onEscKeyDown, popupController.items, closeOnEsc],\n );\n\n useEffect(() => {\n window.addEventListener('keydown', onKeyDown);\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, [onKeyDown]);\n\n // linaria не поддерживает динамический global\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (isOpen && disableScroll) {\n overflow.current = document.body.style.overflow;\n\n document.body.style.overflow = 'hidden';\n }\n }, [isOpen, disableScroll]);\n\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n if (!isOpen && !hasDrawers(Array.from(popupController.items.values()))) {\n document.body.style.overflow = overflow.current;\n }\n }, [isOpen, popupController.items]);\n\n // При анмаунте компонента нужно обновлять overflow у body.\n useEffect(() => {\n return () => {\n if (!canUseDOM) {\n return;\n }\n\n if (!hasDrawers(Array.from(popupController.items.values()))) {\n document.body.style.overflow = overflow.current;\n }\n };\n }, []);\n\n const drawerInfo: DrawerInfo = {\n id,\n info: {\n isDrawer: true,\n },\n ...popupInfo,\n };\n\n return { drawerInfo };\n};\n"],"names":["ESCAPE_KEYCODE","useDrawer","_ref","id","isOpen","popupInfo","onEscKeyDown","onClose","_ref$closeOnEsc","closeOnEsc","_ref$disableScroll","disableScroll","popupController","usePopupContext","overflow","useRef","canUseDOM","document","body","style","onKeyDown","useCallback","event","keyCode","getIdLastDrawer","Array","from","items","values","useEffect","window","addEventListener","removeEventListener","current","hasDrawers","drawerInfo","_objectSpread","info","isDrawer"],"mappings":";;;;;;;;;;AAOA,IAAMA,cAAc,GAAG,EAAE,CAAA;IAE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AI,CAACd,eAAe,CAACe,KAAK,CAACC,MAAM,EAAE,CAAC,CAAC,EAAE;QACzDX,QAAQ,CAACC,IAAI,CAACC,KAAK,CAACL,QAAQ,GAAGA,QAAQ,CAACmB,OAAO,CAAA;AACnD,OAAA;KACH,CAAA;GACJ,EAAE,EAAE,CAAC,CAAA;EAEN,IAAME,UAAsB,GAAAC,uCAAA,CAAA;AACxBjC,IAAAA,EAAE,EAAFA,EAAE;AACFkC,IAAAA,IAAI,EAAE;AACFC,MAAAA,QAAQ,EAAE,IAAA;AACd,KAAA;AAAC,GAAA,EACEjC,SAAS,CACf,CAAA;EAED,OAAO;AAAE8B,IAAAA,UAAU,EAAVA,UAAAA;GAAY,CAAA;AACzB;;;;"}
|
@@ -54,6 +54,7 @@ var selectRoot = function selectRoot(Root) {
|
|
54
54
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
55
55
|
outerView = props.view,
|
56
56
|
size = props.size,
|
57
|
+
listOverflow = props.listOverflow,
|
57
58
|
listHeight = props.listHeight,
|
58
59
|
listMaxHeight = props.listMaxHeight,
|
59
60
|
listWidth = props.listWidth,
|
@@ -129,7 +130,6 @@ var selectRoot = function selectRoot(Root) {
|
|
129
130
|
var activeDescendantItemValue = ((_getItemByFocused = useKeyboardNavigation.getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value.toString()) || '';
|
130
131
|
var closeAfterSelect = outerCloseAfterSelect !== null && outerCloseAfterSelect !== void 0 ? outerCloseAfterSelect : !props.multiselect;
|
131
132
|
var treeId = react.safeUseId();
|
132
|
-
var listWrapperRef = React.useRef(null);
|
133
133
|
var view = target === 'textfield-like' && (disabled || readOnly) ? 'default' : getView.getView(status, outerView);
|
134
134
|
|
135
135
|
// Собираем объект с пропсами для required и прокидываем их напрямую в компонент Textfield.
|
@@ -418,12 +418,12 @@ var selectRoot = function selectRoot(Root) {
|
|
418
418
|
disabled: disabled,
|
419
419
|
readOnly: readOnly
|
420
420
|
}, rest), /*#__PURE__*/React__default.default.createElement(Select_styles.ListWrapper, {
|
421
|
-
ref: listWrapperRef,
|
422
421
|
listWidth: listWidth
|
423
422
|
}, /*#__PURE__*/React__default.default.createElement(Select_styles.Ul, {
|
424
423
|
role: "tree",
|
425
424
|
id: "".concat(treeId, "_tree_level_1"),
|
426
425
|
"aria-multiselectable": Boolean(props.multiselect),
|
426
|
+
listOverflow: listOverflow,
|
427
427
|
listMaxHeight: listMaxHeight || listHeight,
|
428
428
|
onScroll: virtual ? undefined : handleScroll,
|
429
429
|
ref: targetRef,
|
@@ -446,8 +446,7 @@ var selectRoot = function selectRoot(Root) {
|
|
446
446
|
path: path,
|
447
447
|
dispatchPath: dispatchPath,
|
448
448
|
index: index,
|
449
|
-
listWidth: listWidth
|
450
|
-
portal: listWrapperRef
|
449
|
+
listWidth: listWidth
|
451
450
|
});
|
452
451
|
}), afterList))))));
|
453
452
|
});
|