@salutejs/plasma-new-hope 0.336.0-canary.2219.17638454714.0 → 0.336.0-canary.2220.17648264852.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/Autocomplete/Autocomplete.css +2 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +2 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +60 -56
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +2 -0
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -0
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +2 -0
- package/cjs/components/Pagination/Pagination.css +2 -0
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -0
- package/cjs/components/Range/Range.css +2 -0
- package/cjs/components/Select/Select.css +2 -0
- package/cjs/components/Select/ui/Target/Target.css +2 -0
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -0
- package/cjs/components/Slider/Slider.css +2 -0
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +2 -0
- package/cjs/components/Table/Table.css +2 -0
- package/cjs/components/Table/ui/Cell/Cell.css +2 -0
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +2 -0
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +2 -0
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +2 -0
- package/cjs/components/TextField/TextField.js +14 -3
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +54 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +74 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +25 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_119gtz1.css +1 -0
- package/cjs/index.css +2 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +59 -64
- package/emotion/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
- package/emotion/cjs/components/TextField/TextField.js +16 -4
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +69 -0
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +32 -0
- package/emotion/cjs/components/TextField/ui/index.js +12 -3
- package/emotion/cjs/examples/components/Combobox/Combobox.js +15 -0
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +60 -65
- package/emotion/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
- package/emotion/es/components/TextField/TextField.js +17 -5
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +54 -0
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +18 -0
- package/emotion/es/components/TextField/ui/index.js +1 -0
- package/es/components/Autocomplete/Autocomplete.css +2 -0
- package/es/components/Combobox/ComboboxNew/Combobox.css +2 -0
- package/es/components/Combobox/ComboboxNew/Combobox.js +61 -57
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.css +2 -0
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -0
- package/es/components/DatePicker/SingleDate/SingleDate.css +2 -0
- package/es/components/Pagination/Pagination.css +2 -0
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -0
- package/es/components/Range/Range.css +2 -0
- package/es/components/Select/Select.css +2 -0
- package/es/components/Select/ui/Target/Target.css +2 -0
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -0
- package/es/components/Slider/Slider.css +2 -0
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +2 -0
- package/es/components/Table/Table.css +2 -0
- package/es/components/Table/ui/Cell/Cell.css +2 -0
- package/es/components/Table/ui/EditableCell/EditableCell.css +2 -0
- package/es/components/Table/ui/HeadCell/HeadCell.css +2 -0
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +2 -0
- package/es/components/TextField/TextField.js +14 -3
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +54 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +66 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +21 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_119gtz1.css +1 -0
- package/es/index.css +2 -0
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +59 -64
- package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
- package/styled-components/cjs/components/TextField/TextField.js +15 -3
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +69 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +87 -0
- package/styled-components/cjs/components/TextField/ui/index.js +12 -3
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +60 -65
- package/styled-components/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
- package/styled-components/es/components/TextField/TextField.js +16 -4
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +54 -0
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +73 -0
- package/styled-components/es/components/TextField/ui/index.js +1 -0
- package/styled-components/es/examples/components/Combobox/Combobox.js +7 -0
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts +1 -2
- package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts +0 -1
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts +19 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts +2 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts.map +1 -0
- package/types/components/TextField/ui/index.d.ts +1 -0
- package/types/components/TextField/ui/index.d.ts.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -17
- package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
- package/emotion/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
- package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -13
- package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
- package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts +0 -2
- package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts.map +0 -1
@@ -0,0 +1,54 @@
|
|
1
|
+
.Popover_styles_ji8em4_s1g1xbt5__439b9cc0{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;position:relative;}
|
2
|
+
.Popover_styles_ji8em4_s12xwbyh__439b9cc0{display:inline-block;}.Popover_styles_ji8em4_s12xwbyh__439b9cc0.Popover_styles_ji8em4_popoverTargetAsRef__439b9cc0{position:absolute;top:0;left:0;width:100%;height:100%;}.Popover_styles_ji8em4_s12xwbyh__439b9cc0.Popover_styles_ji8em4_popoverTargetAsRef__439b9cc0 .Popover_styles_ji8em4_s1g1xbt5__439b9cc0{width:100%;height:100%;display:block;}
|
3
|
+
.Popover_styles_ji8em4_s1pd4d8a__439b9cc0{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_ji8em4_s1pd4d8a__439b9cc0::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
4
|
+
.Popover_styles_ji8em4_s16xlixz__439b9cc0{position:absolute;z-index:var(--s16xlixz-0);opacity:0;visibility:hidden;box-shadow:var(--plasma-popover-box-shadow);}.Popover_styles_ji8em4_s16xlixz__439b9cc0.Popover_styles_ji8em4_popoverAnimate__439b9cc0{-webkit-transition:opacity 0.2s ease-in-out,-webkit-transform 0s ease-in-out,visibility 0.2s;-webkit-transition:opacity 0.2s ease-in-out,transform 0s ease-in-out,visibility 0.2s;transition:opacity 0.2s ease-in-out,transform 0s ease-in-out,visibility 0.2s;}.Popover_styles_ji8em4_s16xlixz__439b9cc0.Popover_styles_ji8em4_popoverOpen__439b9cc0{opacity:1;visibility:visible;}.Popover_styles_ji8em4_s16xlixz__439b9cc0:before{content:'';display:block;position:absolute;background:transparent;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='top'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='left'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='left'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='right'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='right'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='top-start'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='top-end'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom-start'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom-start'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom-end'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom-end'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='left-start'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='right-start'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='left-end'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='right-end'] > .Popover_styles_ji8em4_popoverArrow__439b9cc0{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='top']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='top-start']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='top-end']:before{top:unset;left:0;right:0;height:var(--plasma-popover-arrow-height);bottom:calc(-1 * var(--plasma-popover-arrow-height));}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom-start']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='bottom-end']:before{top:calc(-1 * var(--plasma-popover-arrow-height));left:0;right:0;bottom:var(--plasma-popover-arrow-height);height:var(--plasma-popover-arrow-height);}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='left']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='left-start']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='left-end']:before{width:var(--plasma-popover-arrow-height);height:100%;top:0;right:calc(-1 * var(--plasma-popover-arrow-height));bottom:0;}.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='right']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='right-start']:before,.Popover_styles_ji8em4_s16xlixz__439b9cc0[data-popper-placement^='right-end']:before{width:var(--plasma-popover-arrow-height);height:100%;top:0;left:calc(-1 * var(--plasma-popover-arrow-height));bottom:0;}
|
5
|
+
|
6
|
+
.Tooltip_styles_1bh0sd0_teczcv4__e6cc0309{padding:var(--plasma-tooltip-padding-top) var(--plasma-tooltip-padding-right) var(--plasma-tooltip-padding-bottom) var(--plasma-tooltip-padding-left);min-height:var(--plasma-tooltip-min-height);box-sizing:border-box;background-color:var(--plasma-tooltip-background-color);border-radius:var(--plasma-tooltip-border-radius);box-shadow:var(--plasma-tooltip-box-shadow);color:var(--plasma-tooltip-color);font-family:var(--plasma-tooltip-text-font-family);font-size:var(--plasma-tooltip-text-font-size);font-style:var(--plasma-tooltip-text-font-style);font-weight:var(--plasma-tooltip-text-font-weight);-webkit-letter-spacing:var(--plasma-tooltip-text-font-letter-spacing);-moz-letter-spacing:var(--plasma-tooltip-text-font-letter-spacing);-ms-letter-spacing:var(--plasma-tooltip-text-font-letter-spacing);letter-spacing:var(--plasma-tooltip-text-font-letter-spacing);line-height:var(--plasma-tooltip-text-font-line-height);max-width:var(--teczcv4-0);min-width:var(--teczcv4-1);width:-webkit-max-content;width:-moz-max-content;width:max-content;word-break:break-word;pointer-events:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
|
7
|
+
.Tooltip_styles_1bh0sd0_s1j361h1__e6cc0309{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:var(--plasma-tooltip-content-left-margin);height:var(--plasma-tooltip-text-font-line-height);}
|
8
|
+
|
9
|
+
.Tooltip_1qsg6ij_s1cz8cv8__da7f9e0a{--plasma-popover-arrow-mask-width:var(--plasma-tooltip-arrow-mask-width);--plasma-popover-arrow-mask-height:var(--plasma-tooltip-arrow-mask-height);--plasma-popover-arrow-mask-image:var(--plasma-tooltip-arrow-mask-image);--plasma-popover-arrow-background:var(--plasma-tooltip-arrow-background);--plasma-popover-arrow-height:var(--plasma-tooltip-arrow-height);--plasma-popover-arrow-edge-margin:var(--plasma-tooltip-arrow-edge-margin);}
|
10
|
+
|
11
|
+
.TextField_styles_xvs3tf_iq39zt5__6229ab57{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;}
|
12
|
+
.TextField_styles_xvs3tf_i1j28rg8__6229ab57{-webkit-flex:1;-ms-flex:1;flex:1;overflow:scroll;position:relative;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.TextField_styles_xvs3tf_i1j28rg8__6229ab57::-webkit-scrollbar{display:none;}.TextField_styles_xvs3tf_i1j28rg8__6229ab57.TextField_styles_xvs3tf_hasChips__6229ab57{height:var(--plasma-textfield__chip-height);border-radius:var(--plasma-textfield__chip-border-radius);}
|
13
|
+
.TextField_styles_xvs3tf_s13zudoe__6229ab57{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-textfield__chip-gap);margin-right:var(--plasma-textfield__chip-margin-right,var(--plasma-textfield__chip-gap));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
14
|
+
.TextField_styles_xvs3tf_io4bpie__6229ab57{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:100%;z-index:1;}.TextField_styles_xvs3tf_io4bpie__6229ab57.TextField_styles_xvs3tf_textfieldInputTextEllipsis__6229ab57{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.TextField_styles_xvs3tf_io4bpie__6229ab57::-webkit-input-placeholder{opacity:0;}.TextField_styles_xvs3tf_io4bpie__6229ab57::-moz-placeholder{opacity:0;}.TextField_styles_xvs3tf_io4bpie__6229ab57:-ms-input-placeholder{opacity:0;}.TextField_styles_xvs3tf_io4bpie__6229ab57::placeholder{opacity:0;}
|
15
|
+
.TextField_styles_xvs3tf_i13qvwoy__6229ab57{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;min-width:var(--i13qvwoy-0);}.TextField_styles_xvs3tf_i13qvwoy__6229ab57 .TextField_styles_xvs3tf_io4bpie__6229ab57{max-width:var(--i13qvwoy-1);}
|
16
|
+
.TextField_styles_xvs3tf_i19ry60d__6229ab57{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font:inherit;-webkit-letter-spacing:inherit;-moz-letter-spacing:inherit;-ms-letter-spacing:inherit;letter-spacing:inherit;line-height:inherit;color:var(--plasma-textfield__placeholder-color);padding:var(--i19ry60d-0);}
|
17
|
+
.TextField_styles_xvs3tf_obt1ohz__6229ab57{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;white-space:var(--obt1ohz-0);margin-bottom:var(--obt1ohz-1);}
|
18
|
+
.TextField_styles_xvs3tf_tlv9av6__6229ab57{display:inline-block;margin-left:auto;}
|
19
|
+
.TextField_styles_xvs3tf_s600610__6229ab57{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
20
|
+
.TextField_styles_xvs3tf_luk2zst__6229ab57{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
21
|
+
.TextField_styles_xvs3tf_s1gjsnfi__6229ab57{margin:var(--plasma-textfield__left-content-margin);color:var(--s1gjsnfi-0);line-height:0;}
|
22
|
+
.TextField_styles_xvs3tf_ssv2kwg__6229ab57{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
23
|
+
.TextField_styles_xvs3tf_s190z894__6229ab57{line-height:0;margin:var(--plasma-textfield__right-content-margin);color:var(--plasma-textfield-content-right-slot-color,var(--plasma-textfield-content-slot-color));}.TextField_styles_xvs3tf_s190z894__6229ab57:hover{color:var(--plasma-textfield-content-right-slot-color-hover,var(--plasma-textfield-content-slot-color-hover));cursor:pointer;}.TextField_styles_xvs3tf_s190z894__6229ab57:active{color:var(--plasma-textfield-content-right-slot-color-active,var(--plasma-textfield-content-slot-color-active));}
|
24
|
+
|
25
|
+
.TextField_styles_xvs3tf_s7hnwwb__6229ab57{visibility:var(--s7hnwwb-0);}
|
26
|
+
|
27
|
+
.TextField_styles_xvs3tf_s14qvple__6229ab57{color:var(--plasma-textfield__optional-color);}
|
28
|
+
.TextField_styles_xvs3tf_s16itze4__6229ab57{display:inline-block;line-height:0;}.TextField_styles_xvs3tf_s16itze4__6229ab57.TextField_styles_xvs3tf_labelPlacementInner__6229ab57{position:absolute;margin:0;inset:var(--plasma-textfield__hint-inner-label-placement-offset);}
|
29
|
+
.TextField_styles_xvs3tf_h1skqnhr__6229ab57{color:var(--plasma-textfield__hint-icon-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
30
|
+
.TextField_styles_xvs3tf_hgy0im1__6229ab57 .TextField_styles_xvs3tf_h1skqnhr__6229ab57 .TextField_styles_xvs3tf_popoverRoot__6229ab57{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
|
31
|
+
.TextField_styles_xvs3tf_h8yezh4__6229ab57{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
|
32
|
+
.TextField_styles_xvs3tf_szsveq4__6229ab57{position:absolute;border-radius:50%;background-color:var(--plasma-textfield__indicator-color);}.TextField_styles_xvs3tf_szsveq4__6229ab57.TextField_styles_xvs3tf_labelPlacementOuter__6229ab57{width:var(--plasma-textfield__indicator-size-outer);height:var(--plasma-textfield__indicator-size-outer);inset:var(--plasma-textfield__indicator-placement-outer);}.TextField_styles_xvs3tf_szsveq4__6229ab57.TextField_styles_xvs3tf_labelPlacementOuter__6229ab57.TextField_styles_xvs3tf_requiredAlignRight__6229ab57{inset:var(--plasma-textfield__indicator-placement-outer-right);}.TextField_styles_xvs3tf_szsveq4__6229ab57.TextField_styles_xvs3tf_labelPlacementOuter__6229ab57.TextField_styles_xvs3tf_requiredAlignRight__6229ab57.TextField_styles_xvs3tf_textfieldHasHint__6229ab57{right:calc( -1 * var(--plasma-textfield__indicator-size-outer) + var(--plasma-textfield__indicator-hint-placement-outer-right,0px) );}.TextField_styles_xvs3tf_szsveq4__6229ab57.TextField_styles_xvs3tf_labelPlacementInner__6229ab57{width:var(--plasma-textfield__indicator-size-inner);height:var(--plasma-textfield__indicator-size-inner);inset:var(--plasma-textfield__indicator-placement-inner);}.TextField_styles_xvs3tf_szsveq4__6229ab57.TextField_styles_xvs3tf_labelPlacementInner__6229ab57.TextField_styles_xvs3tf_requiredAlignRight__6229ab57{inset:var(--plasma-textfield__indicator-placement-inner-right);}
|
33
|
+
|
34
|
+
.IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
|
35
|
+
|
36
|
+
.base_sp7461_b13tc97x__6c2a9135{color:var(--plasma-chip-color);background-color:var(--plasma-chip-background);}.base_sp7461_b13tc97x__6c2a9135:hover{color:var(--plasma-chip-color-hover);background-color:var(--plasma-chip-background-hover);}.base_sp7461_b13tc97x__6c2a9135:active{color:var(--plasma-chip-color-active);background-color:var(--plasma-chip-background-active);}
|
37
|
+
|
38
|
+
.base_1o8ygxu_b1pde8v1__ca0b05f4{font-family:var(--plasma-chip-font-family);font-size:var(--plasma-chip-font-size);font-style:var(--plasma-chip-font-style);font-weight:var(--plasma-chip-font-weight);-webkit-letter-spacing:var(--plasma-chip-letter-spacing);-moz-letter-spacing:var(--plasma-chip-letter-spacing);-ms-letter-spacing:var(--plasma-chip-letter-spacing);letter-spacing:var(--plasma-chip-letter-spacing);line-height:var(--plasma-chip-lineheight);border-radius:var(--plasma-chip-border-radius);width:var(--plasma-chip-width);height:var(--plasma-chip-height);padding:var(--plasma-chip-padding);}
|
39
|
+
|
40
|
+
.base_rmcs0j_b16ulzzx__f8cae226[disabled]{opacity:var(--plasma-chip-disabled-opacity);cursor:not-allowed;}.base_rmcs0j_b16ulzzx__f8cae226[disabled]:hover,.base_rmcs0j_b16ulzzx__f8cae226[disabled]:active{scale:none;color:var(--plasma-chip-color);background-color:var(--plasma-chip-background);}
|
41
|
+
|
42
|
+
.base_1nfit77_b10y1phq__6aaec899[readonly]{color:var(--plasma-chip-color-readonly);background-color:var(--plasma-chip-background-readonly);}.base_1nfit77_b10y1phq__6aaec899[readonly]:hover,.base_1nfit77_b10y1phq__6aaec899[readonly]:active{scale:none;cursor:default;color:var(--plasma-chip-color-readonly-hover);background-color:var(--plasma-chip-background-readonly-hover);}
|
43
|
+
|
44
|
+
.base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
|
45
|
+
|
46
|
+
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
47
|
+
|
48
|
+
.Chip_styles_fnd4j5_bol5daj__7a13f27c{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
49
|
+
.Chip_styles_fnd4j5_sj20on5__7a13f27c{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);color:var(--plasma-chip-left-content-color);}
|
50
|
+
.Chip_styles_fnd4j5_s1ror4o9__7a13f27c{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
51
|
+
.Chip_styles_fnd4j5_swddmyi__7a13f27c{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-right-content-margin-left);margin-right:var(--swddmyi-0);}
|
52
|
+
.Chip_styles_fnd4j5_s1pcflhj__7a13f27c{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-clear-content-margin-left);margin-right:var(--plasma-chip-clear-content-margin-right);color:var(--plasma-chip-close-icon-color);}
|
53
|
+
|
54
|
+
.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5{--plasma-chip-color:var(--plasma-textfield__chip-color);--plasma-chip-background:var(--plasma-textfield__chip-background);--plasma-chip-color-hover:var(--plasma-textfield__chip-color-hover);--plasma-chip-background-hover:var(--plasma-textfield__chip-background-hover);--plasma-chip-color-active:var(--plasma-textfield__chip-color-active);--plasma-chip-background-active:var(--plasma-textfield__chip-background-active);--plasma-chip-background-readonly:var(--plasma-textfield__chip-background-readonly);--plasma-chip-color-readonly:var(--plasma-textfield__chip-color-readonly);--plasma-chip-background-readonly-hover:var(--plasma-textfield__chip-background-readonly-hover);--plasma-chip-color-readonly-hover:var(--plasma-textfield__chip-color-readonly-hover);--plasma-chip-border-radius:var(--plasma-textfield__chip-border-radius);--plasma-chip-width:var(--plasma-textfield__chip-width);--plasma-chip-height:var(--plasma-textfield__chip-height);--plasma-chip-padding:var(--plasma-textfield__chip-padding);--plasma-chip-font-family:var(--plasma-textfield__chip-font-family);--plasma-chip-font-size:var(--plasma-textfield__chip-font-size);--plasma-chip-font-style:var(--plasma-textfield__chip-font-style);--plasma-chip-font-weight:var(--plasma-textfield__chip-font-weight);--plasma-chip-letter-spacing:var(--plasma-textfield__chip-letter-spacing);--plasma-chip-lineheight:var(--plasma-textfield__chip-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-textfield__chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-textfield__chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-textfield__chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-textfield__chip-close-icon-color);--plasma-chip-focus-color:var(--plasma-textfield-focus-color);--plasma-chip-disabled-opacity:0.4;position:relative;}.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5.TextFieldChipNew_styles_119gtz1_focusVisible__3dfbc3c5:focus::before,.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
var TextField_styles = require('../../TextField.styles.js');
|
7
|
+
var TextField_tokens = require('../../TextField.tokens.js');
|
8
|
+
var TextFieldChipNew_styles = require('./TextFieldChipNew.styles.js');
|
9
|
+
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
11
|
+
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
13
|
+
|
14
|
+
var TextFieldChipNew = function TextFieldChipNew(_ref) {
|
15
|
+
var chips = _ref.chips,
|
16
|
+
onChipClick = _ref.onChipClick,
|
17
|
+
getRef = _ref.getRef,
|
18
|
+
handleChipKeyDown = _ref.handleChipKeyDown,
|
19
|
+
onChipClear = _ref.onChipClear,
|
20
|
+
readOnly = _ref.readOnly,
|
21
|
+
view = _ref.view;
|
22
|
+
return /*#__PURE__*/React__default.default.createElement(TextField_styles.StyledChips, {
|
23
|
+
className: TextField_tokens.classes.chipsWrapper
|
24
|
+
}, chips.map(function (_ref2, index) {
|
25
|
+
var value = _ref2.value,
|
26
|
+
label = _ref2.label,
|
27
|
+
disabled = _ref2.disabled;
|
28
|
+
var chipId = "".concat(index, "_").concat(value);
|
29
|
+
var onKeyDownHandle = function onKeyDownHandle(event) {
|
30
|
+
if (handleChipKeyDown) {
|
31
|
+
handleChipKeyDown(event, chipId, index);
|
32
|
+
}
|
33
|
+
if (event.key === 'Enter' || event.key === 'Backspace') {
|
34
|
+
if (onChipClick) {
|
35
|
+
onChipClick({
|
36
|
+
value: value,
|
37
|
+
label: label,
|
38
|
+
disabled: disabled
|
39
|
+
});
|
40
|
+
}
|
41
|
+
}
|
42
|
+
};
|
43
|
+
var handleClick = function handleClick(event) {
|
44
|
+
event.stopPropagation();
|
45
|
+
if (onChipClick) {
|
46
|
+
onChipClick({
|
47
|
+
value: value,
|
48
|
+
label: label,
|
49
|
+
disabled: disabled
|
50
|
+
});
|
51
|
+
}
|
52
|
+
if (onChipClear) {
|
53
|
+
onChipClear(chipId, index);
|
54
|
+
}
|
55
|
+
};
|
56
|
+
return /*#__PURE__*/React__default.default.createElement(TextFieldChipNew_styles.StyledChip, {
|
57
|
+
key: chipId,
|
58
|
+
ref: function ref(element) {
|
59
|
+
return getRef(element, index);
|
60
|
+
},
|
61
|
+
tabIndex: -1,
|
62
|
+
disabled: disabled,
|
63
|
+
hasClear: !disabled,
|
64
|
+
readOnly: readOnly,
|
65
|
+
onClick: handleClick,
|
66
|
+
onKeyDown: onKeyDownHandle,
|
67
|
+
text: label,
|
68
|
+
view: view
|
69
|
+
});
|
70
|
+
}));
|
71
|
+
};
|
72
|
+
|
73
|
+
exports.TextFieldChipNew = TextFieldChipNew;
|
74
|
+
//# sourceMappingURL=TextFieldChipNew.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextFieldChipNew.js","sources":["../../../../../src/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.tsx"],"sourcesContent":["import React, { FC, KeyboardEvent } from 'react';\n\nimport { StyledChips } from '../../TextField.styles';\nimport { classes } from '../../TextField.tokens';\n\nimport { StyledChip } from './TextFieldChipNew.styles';\n\nexport const TextFieldChipNew: FC<{\n chips: { value: string; label: string; disabled: boolean }[];\n onChipClick: (chip: { value: string; label: string; disabled: boolean }) => void;\n getRef: (...e: any) => void;\n handleChipKeyDown: (event: KeyboardEvent<HTMLButtonElement>, chipId: string, chipIndex: number) => void;\n onChipClear: (clearId: string, index: number) => void;\n readOnly: boolean;\n view?: string;\n}> = ({ chips, onChipClick, getRef, handleChipKeyDown, onChipClear, readOnly, view }) => {\n return (\n <StyledChips className={classes.chipsWrapper}>\n {chips.map(({ value, label, disabled }, index) => {\n const chipId = `${index}_${value}`;\n\n const onKeyDownHandle = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (handleChipKeyDown) {\n handleChipKeyDown(event, chipId, index);\n }\n\n if (event.key === 'Enter' || event.key === 'Backspace') {\n if (onChipClick) {\n onChipClick({ value, label, disabled });\n }\n }\n };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n\n if (onChipClick) {\n onChipClick({ value, label, disabled });\n }\n\n if (onChipClear) {\n onChipClear(chipId, index);\n }\n };\n\n return (\n <StyledChip\n key={chipId}\n ref={(element) => getRef(element, index)}\n tabIndex={-1}\n disabled={disabled}\n hasClear={!disabled}\n readOnly={readOnly}\n onClick={handleClick}\n onKeyDown={onKeyDownHandle}\n text={label}\n view={view}\n />\n );\n })}\n </StyledChips>\n );\n};\n"],"names":["TextFieldChipNew","_ref","chips","onChipClick","getRef","handleChipKeyDown","onChipClear","readOnly","view","React","createElement","StyledChips","className","classes","chipsWrapper","map","_ref2","index","value","label","disabled","chipId","concat","onKeyDownHandle","event","key","handleClick","stopPropagation","StyledChip","ref","element","tabIndex","hasClear","onClick","onKeyDown","text"],"mappings":";;;;;;;;;;;;;IAOaA,gBAQX,GAAG,SARQA,gBAQXA,CAAAC,IAAA,EAAuF;AAAA,EAAA,IAAjFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAEC,MAAM,GAAAH,IAAA,CAANG,MAAM;IAAEC,iBAAiB,GAAAJ,IAAA,CAAjBI,iBAAiB;IAAEC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IAAEC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IAAEC,IAAI,GAAAP,IAAA,CAAJO,IAAI,CAAA;AAC9E,EAAA,oBACIC,sBAAA,CAAAC,aAAA,CAACC,4BAAW,EAAA;IAACC,SAAS,EAAEC,wBAAO,CAACC,YAAAA;GAC3BZ,EAAAA,KAAK,CAACa,GAAG,CAAC,UAAAC,KAAA,EAA6BC,KAAK,EAAK;AAAA,IAAA,IAApCC,KAAK,GAAAF,KAAA,CAALE,KAAK;MAAEC,KAAK,GAAAH,KAAA,CAALG,KAAK;MAAEC,QAAQ,GAAAJ,KAAA,CAARI,QAAQ,CAAA;IAChC,IAAMC,MAAM,MAAAC,MAAA,CAAML,KAAK,EAAAK,GAAAA,CAAAA,CAAAA,MAAA,CAAIJ,KAAK,CAAE,CAAA;AAElC,IAAA,IAAMK,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,KAA6C,EAAK;AACvE,MAAA,IAAInB,iBAAiB,EAAE;AACnBA,QAAAA,iBAAiB,CAACmB,KAAK,EAAEH,MAAM,EAAEJ,KAAK,CAAC,CAAA;AAC3C,OAAA;MAEA,IAAIO,KAAK,CAACC,GAAG,KAAK,OAAO,IAAID,KAAK,CAACC,GAAG,KAAK,WAAW,EAAE;AACpD,QAAA,IAAItB,WAAW,EAAE;AACbA,UAAAA,WAAW,CAAC;AAAEe,YAAAA,KAAK,EAALA,KAAK;AAAEC,YAAAA,KAAK,EAALA,KAAK;AAAEC,YAAAA,QAAQ,EAARA,QAAAA;AAAS,WAAC,CAAC,CAAA;AAC3C,SAAA;AACJ,OAAA;KACH,CAAA;AAED,IAAA,IAAMM,WAAW,GAAG,SAAdA,WAAWA,CAAIF,KAA0C,EAAK;MAChEA,KAAK,CAACG,eAAe,EAAE,CAAA;AAEvB,MAAA,IAAIxB,WAAW,EAAE;AACbA,QAAAA,WAAW,CAAC;AAAEe,UAAAA,KAAK,EAALA,KAAK;AAAEC,UAAAA,KAAK,EAALA,KAAK;AAAEC,UAAAA,QAAQ,EAARA,QAAAA;AAAS,SAAC,CAAC,CAAA;AAC3C,OAAA;AAEA,MAAA,IAAId,WAAW,EAAE;AACbA,QAAAA,WAAW,CAACe,MAAM,EAAEJ,KAAK,CAAC,CAAA;AAC9B,OAAA;KACH,CAAA;AAED,IAAA,oBACIR,sBAAA,CAAAC,aAAA,CAACkB,kCAAU,EAAA;AACPH,MAAAA,GAAG,EAAEJ,MAAO;MACZQ,GAAG,EAAE,SAAAA,GAAAA,CAACC,OAAO,EAAA;AAAA,QAAA,OAAK1B,MAAM,CAAC0B,OAAO,EAAEb,KAAK,CAAC,CAAA;OAAC;MACzCc,QAAQ,EAAE,CAAC,CAAE;AACbX,MAAAA,QAAQ,EAAEA,QAAS;MACnBY,QAAQ,EAAE,CAACZ,QAAS;AACpBb,MAAAA,QAAQ,EAAEA,QAAS;AACnB0B,MAAAA,OAAO,EAAEP,WAAY;AACrBQ,MAAAA,SAAS,EAAEX,eAAgB;AAC3BY,MAAAA,IAAI,EAAEhB,KAAM;AACZX,MAAAA,IAAI,EAAEA,IAAAA;AAAK,KACd,CAAC,CAAA;AAEV,GAAC,CACQ,CAAC,CAAA;AAEtB;;;;"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require('./TextFieldChipNew.styles_119gtz1.css');
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
5
|
+
|
6
|
+
var react = require('@linaria/react');
|
7
|
+
var common = require('../../../../engines/common.js');
|
8
|
+
var Chip$1 = require('../../../Chip/Chip.js');
|
9
|
+
|
10
|
+
// issue #823
|
11
|
+
var mergedConfig = /*#__PURE__*/common.mergeConfig(Chip$1.chipConfig);
|
12
|
+
var Chip = /*#__PURE__*/common.component(mergedConfig);
|
13
|
+
|
14
|
+
// NOTE: Необходимое переопределение токенов из компонента Chip т.к. используются его части
|
15
|
+
var _exp = function _exp() {
|
16
|
+
return Chip;
|
17
|
+
};
|
18
|
+
var StyledChip = /*#__PURE__*/react.styled(_exp())({
|
19
|
+
name: "StyledChip",
|
20
|
+
"class": "s11qqqhl",
|
21
|
+
propsAsIs: true
|
22
|
+
});
|
23
|
+
|
24
|
+
exports.StyledChip = StyledChip;
|
25
|
+
//# sourceMappingURL=TextFieldChipNew.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextFieldChipNew.styles.js","sources":["../../../../../src/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { component, mergeConfig } from 'src/engines';\nimport { addFocus } from 'src/mixins';\nimport { chipConfig, chipTokens } from 'src/components/Chip';\n\nimport { tokens } from '../../TextField.tokens';\n\n// issue #823\nconst mergedConfig = mergeConfig(chipConfig);\nconst Chip = component(mergedConfig);\n\n// NOTE: Необходимое переопределение токенов из компонента Chip т.к. используются его части\nexport const StyledChip = styled(Chip)`\n ${chipTokens.color}: var(${tokens.chipColor});\n ${chipTokens.background}: var(${tokens.chipBackground});\n ${chipTokens.colorHover}: var(${tokens.chipColorHover});\n ${chipTokens.backgroundHover}: var(${tokens.chipBackgroundHover});\n ${chipTokens.colorActive}: var(${tokens.chipColorActive});\n ${chipTokens.backgroundActive}: var(${tokens.chipBackgroundActive});\n ${chipTokens.backgroundReadOnly}: var(${tokens.chipBackgroundReadOnly});\n ${chipTokens.colorReadOnly}: var(${tokens.chipColorReadOnly});\n ${chipTokens.backgroundReadOnlyHover}: var(${tokens.chipBackgroundReadOnlyHover});\n ${chipTokens.colorReadOnlyHover}: var(${tokens.chipColorReadOnlyHover});\n ${chipTokens.borderRadius}: var(${tokens.chipBorderRadius});\n ${chipTokens.width}: var(${tokens.chipWidth});\n ${chipTokens.height}: var(${tokens.chipHeight});\n ${chipTokens.padding}: var(${tokens.chipPadding});\n ${chipTokens.fontFamily}: var(${tokens.chipFontFamily});\n ${chipTokens.fontSize}: var(${tokens.chipFontSize});\n ${chipTokens.fontStyle}: var(${tokens.chipFontStyle});\n ${chipTokens.fontWeight}: var(${tokens.chipFontWeight});\n ${chipTokens.letterSpacing}: var(${tokens.chipLetterSpacing});\n ${chipTokens.lineHeight}: var(${tokens.chipLineHeight});\n ${chipTokens.clearContentMarginLeft}: var(${tokens.chipClearContentMarginLeft});\n ${chipTokens.clearContentMarginRight}: var(${tokens.chipClearContentMarginRight});\n ${chipTokens.closeIconSize}: var(${tokens.chipCloseIconSize});\n ${chipTokens.closeIconColor}: var(${tokens.chipCloseIconColor});\n ${chipTokens.focusColor}: var(${tokens.focusColor});\n ${chipTokens.disabledOpacity}: 0.4;\n\n ${addFocus({\n outlineOffset: '0.0625rem',\n outlineSize: '0.0625rem',\n outlineRadius: `calc(var(${tokens.chipBorderRadius}) - 0.1rem)`,\n outlineColor: `var(${tokens.focusColor})`,\n })}\n\n &[readonly] {\n opacity: var(${tokens.chipOpacityReadonly});\n }\n`;\n"],"names":["mergedConfig","mergeConfig","chipConfig","Chip","component","_exp","StyledChip","styled","name","class","propsAsIs"],"mappings":";;;;;;;;AAOA;AACA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,iBAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;;AAEpC;AAAA,IAAAK,IAAA,GAVkBA,SAUlBA,IAAAA,GAAA;AAAA,EAAA,OACiCF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAsC/B;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.s11qqqhl{--plasma-chip-color:var(--plasma-textfield__chip-color);--plasma-chip-background:var(--plasma-textfield__chip-background);--plasma-chip-color-hover:var(--plasma-textfield__chip-color-hover);--plasma-chip-background-hover:var(--plasma-textfield__chip-background-hover);--plasma-chip-color-active:var(--plasma-textfield__chip-color-active);--plasma-chip-background-active:var(--plasma-textfield__chip-background-active);--plasma-chip-background-readonly:var(--plasma-textfield__chip-background-readonly);--plasma-chip-color-readonly:var(--plasma-textfield__chip-color-readonly);--plasma-chip-background-readonly-hover:var(--plasma-textfield__chip-background-readonly-hover);--plasma-chip-color-readonly-hover:var(--plasma-textfield__chip-color-readonly-hover);--plasma-chip-border-radius:var(--plasma-textfield__chip-border-radius);--plasma-chip-width:var(--plasma-textfield__chip-width);--plasma-chip-height:var(--plasma-textfield__chip-height);--plasma-chip-padding:var(--plasma-textfield__chip-padding);--plasma-chip-font-family:var(--plasma-textfield__chip-font-family);--plasma-chip-font-size:var(--plasma-textfield__chip-font-size);--plasma-chip-font-style:var(--plasma-textfield__chip-font-style);--plasma-chip-font-weight:var(--plasma-textfield__chip-font-weight);--plasma-chip-letter-spacing:var(--plasma-textfield__chip-letter-spacing);--plasma-chip-lineheight:var(--plasma-textfield__chip-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-textfield__chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-textfield__chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-textfield__chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-textfield__chip-close-icon-color);--plasma-chip-focus-color:var(--plasma-textfield-focus-color);--plasma-chip-disabled-opacity:0.4;position:relative;}.s11qqqhl::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.s11qqqhl.focus-visible:focus::before,.s11qqqhl[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.s11qqqhl[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
|
package/cjs/index.css
CHANGED
@@ -222,6 +222,8 @@
|
|
222
222
|
.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd{--plasma-chip-color:var(--plasma-textfield__chip-color);--plasma-chip-background:var(--plasma-textfield__chip-background);--plasma-chip-color-hover:var(--plasma-textfield__chip-color-hover);--plasma-chip-background-hover:var(--plasma-textfield__chip-background-hover);--plasma-chip-color-active:var(--plasma-textfield__chip-color-active);--plasma-chip-background-active:var(--plasma-textfield__chip-background-active);--plasma-chip-background-readonly:var(--plasma-textfield__chip-background-readonly);--plasma-chip-color-readonly:var(--plasma-textfield__chip-color-readonly);--plasma-chip-background-readonly-hover:var(--plasma-textfield__chip-background-readonly-hover);--plasma-chip-color-readonly-hover:var(--plasma-textfield__chip-color-readonly-hover);--plasma-chip-border-radius:var(--plasma-textfield__chip-border-radius);--plasma-chip-width:var(--plasma-textfield__chip-width);--plasma-chip-height:var(--plasma-textfield__chip-height);--plasma-chip-padding:var(--plasma-textfield__chip-padding);--plasma-chip-font-family:var(--plasma-textfield__chip-font-family);--plasma-chip-font-size:var(--plasma-textfield__chip-font-size);--plasma-chip-font-style:var(--plasma-textfield__chip-font-style);--plasma-chip-font-weight:var(--plasma-textfield__chip-font-weight);--plasma-chip-letter-spacing:var(--plasma-textfield__chip-letter-spacing);--plasma-chip-lineheight:var(--plasma-textfield__chip-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-textfield__chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-textfield__chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-textfield__chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-textfield__chip-close-icon-color);--plasma-chip-focus-color:var(--plasma-textfield-focus-color);-webkit-scroll-snap-align:center;-moz-scroll-snap-align:center;-ms-scroll-snap-align:center;scroll-snap-align:center;-webkit-scroll-snap-stop:normal;-moz-scroll-snap-stop:normal;-ms-scroll-snap-stop:normal;scroll-snap-stop:normal;position:relative;}.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd.TextFieldChip_styles_14q069b_focusVisible__9f1b34fd:focus::before,.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChip_styles_14q069b_s32p7ut__9f1b34fd[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
|
223
223
|
.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd{display:block;-webkit-flex:none;-ms-flex:none;flex:none;background:none;border:none;outline:none;padding:0;white-space:nowrap;cursor:pointer;font-family:var(--plasma-textfield-font-family);font-size:var(--plasma-textfield-font-size);font-style:var(--plasma-textfield-font-style);font-weight:var(--plasma-textfield-font-weight);-webkit-letter-spacing:var(--plasma-textfield-letter-spacing);-moz-letter-spacing:var(--plasma-textfield-letter-spacing);-ms-letter-spacing:var(--plasma-textfield-letter-spacing);letter-spacing:var(--plasma-textfield-letter-spacing);line-height:var(--plasma-textfield-line-height);color:var(--plasma-textfield-color);position:relative;}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd.TextFieldChip_styles_14q069b_focusVisible__9f1b34fd:focus::before,.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd:after{content:',';}.TextFieldChip_styles_14q069b_t4nir3h__9f1b34fd:last-child:after{content:'';}
|
224
224
|
|
225
|
+
.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5{--plasma-chip-color:var(--plasma-textfield__chip-color);--plasma-chip-background:var(--plasma-textfield__chip-background);--plasma-chip-color-hover:var(--plasma-textfield__chip-color-hover);--plasma-chip-background-hover:var(--plasma-textfield__chip-background-hover);--plasma-chip-color-active:var(--plasma-textfield__chip-color-active);--plasma-chip-background-active:var(--plasma-textfield__chip-background-active);--plasma-chip-background-readonly:var(--plasma-textfield__chip-background-readonly);--plasma-chip-color-readonly:var(--plasma-textfield__chip-color-readonly);--plasma-chip-background-readonly-hover:var(--plasma-textfield__chip-background-readonly-hover);--plasma-chip-color-readonly-hover:var(--plasma-textfield__chip-color-readonly-hover);--plasma-chip-border-radius:var(--plasma-textfield__chip-border-radius);--plasma-chip-width:var(--plasma-textfield__chip-width);--plasma-chip-height:var(--plasma-textfield__chip-height);--plasma-chip-padding:var(--plasma-textfield__chip-padding);--plasma-chip-font-family:var(--plasma-textfield__chip-font-family);--plasma-chip-font-size:var(--plasma-textfield__chip-font-size);--plasma-chip-font-style:var(--plasma-textfield__chip-font-style);--plasma-chip-font-weight:var(--plasma-textfield__chip-font-weight);--plasma-chip-letter-spacing:var(--plasma-textfield__chip-letter-spacing);--plasma-chip-lineheight:var(--plasma-textfield__chip-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-textfield__chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-textfield__chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-textfield__chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-textfield__chip-close-icon-color);--plasma-chip-focus-color:var(--plasma-textfield-focus-color);--plasma-chip-disabled-opacity:0.4;position:relative;}.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5::before{content:'';position:absolute;top:0.0625rem;left:0.0625rem;right:0.0625rem;bottom:0.0625rem;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:calc(var(--plasma-textfield__chip-border-radius) - 0.1rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5.TextFieldChipNew_styles_119gtz1_focusVisible__3dfbc3c5:focus::before,.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_119gtz1_s11qqqhl__3dfbc3c5[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
|
226
|
+
|
225
227
|
.TextField_1lzb2r1_bpunezx__7d079491{display:block;}
|
226
228
|
|
227
229
|
.base_1rutqnb_boymyss__807e6413.base_1rutqnb_textFieldGroupOverrideStyles__807e6413 .base_1rutqnb_textFieldGroupItem__807e6413{--plasma-textfield-height:var(--plasma-text-field-group-item-height);--plasma-textfield-padding:var(--plasma-text-field-group-item-padding);--plasma-textfield-padding-with-chips:var(--plasma-text-field-group-item-padding-with-chips);--plasma-textfield__left-content-margin:var(--plasma-text-field-group-item__left-content-margin);--plasma-textfield__right-content-margin:var(--plasma-text-field-group-item__right-content-margin);--plasma-textfield__before-text-margin:var(--plasma-text-field-group-item__before-text-margin);--plasma-textfield__after-text-margin:var(--plasma-text-field-group-item__after-text-margin);--plasma-textfield-font-family:var(--plasma-text-field-group-item-font-family);--plasma-textfield-font-size:var(--plasma-text-field-group-item-font-size);--plasma-textfield-font-style:var(--plasma-text-field-group-item-font-style);--plasma-textfield-font-weight:var(--plasma-text-field-group-item-font-weight);--plasma-textfield-letter-spacing:var(--plasma-text-field-group-item-letter-spacing);--plasma-textfield-line-height:var(--plasma-text-field-group-item-line-height);--plasma-textfield__label-offset:var(--plasma-text-field-group-item__label-offset);--plasma-textfield__label-font-family:var(--plasma-text-field-group-item__label-font-family);--plasma-textfield__label-font-size:var(--plasma-text-field-group-item__label-font-size);--plasma-textfield__label-font-style:var(--plasma-text-field-group-item__label-font-style);--plasma-textfield__label-font-weight:var(--plasma-text-field-group-item__label-font-weight);--plasma-textfield__label-letter-spacing:var(--plasma-text-field-group-item__label-letter-spacing);--plasma-textfield__label-line-height:var(--plasma-text-field-group-item__label-line-height);--plasma-textfield__left-helper-offset:var(--plasma-text-field-group-item__left-helper-offset);--plasma-textfield__left-helper-font-family:var(--plasma-text-field-group-item__left-helper-font-family);--plasma-textfield__left-helper-font-size:var(--plasma-text-field-group-item__left-helper-font-size);--plasma-textfield__left-helper-font-style:var(--plasma-text-field-group-item__left-helper-font-style);--plasma-textfield__left-helper-font-weight:var(--plasma-text-field-group-item__left-helper-font-weight);--plasma-textfield__left-helper-letter-spacing:var(--plasma-text-field-group-item__left-helper-letter-spacing);--plasma-textfield__left-helper-line-height:var(--plasma-text-field-group-item__left-helper-line-height);--plasma-textfield-placement_inner__label-padding:var(--plasma-text-field-group-item-placement_inner__label-padding);--plasma-textfield-placement_inner__content-padding:var(--plasma-text-field-group-item-placement_inner__content-padding);--plasma-textfield__chip-gap:var(--plasma-text-field-group-item__chip-gap);--plasma-textfield__chip-border-radius:var(--plasma-text-field-group-item__chip-border-radius);--plasma-textfield__chip-width:var(--plasma-text-field-group-item__chip-width);--plasma-textfield__chip-height:var(--plasma-text-field-group-item__chip-height);--plasma-textfield__chip-padding:var(--plasma-text-field-group-item__chip-padding);--plasma-textfield__chip-clear-content-margin-left:var(--plasma-text-field-group-item__chip-clear-content-margin-left);--plasma-textfield__chip-clear-content-margin-right:var(--plasma-text-field-group-item__chip-clear-content-margin-right);--plasma-textfield__chip-close-icon-size:var(--plasma-text-field-group-item__chip-close-icon-size);--plasma-textfield__chip-font-family:var(--plasma-text-field-group-item__chip-font-family);--plasma-textfield__chip-font-size:var(--plasma-text-field-group-item__chip-font-size);--plasma-textfield__chip-font-style:var(--plasma-text-field-group-item__chip-font-style);--plasma-textfield__chip-font-weight:var(--plasma-text-field-group-item__chip-font-weight);--plasma-textfield__chip-letter-spacing:var(--plasma-text-field-group-item__chip-letter-spacing);--plasma-textfield__chip-line-height:var(--plasma-text-field-group-item__chip-line-height);}
|
@@ -41,9 +41,6 @@ function _array_like_to_array(arr, len) {
|
|
41
41
|
function _array_with_holes(arr) {
|
42
42
|
if (Array.isArray(arr)) return arr;
|
43
43
|
}
|
44
|
-
function _array_without_holes(arr) {
|
45
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
46
|
-
}
|
47
44
|
function _define_property(obj, key, value) {
|
48
45
|
if (key in obj) {
|
49
46
|
Object.defineProperty(obj, key, {
|
@@ -98,9 +95,6 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
98
95
|
}
|
99
96
|
return newObj;
|
100
97
|
}
|
101
|
-
function _iterable_to_array(iter) {
|
102
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
103
|
-
}
|
104
98
|
function _iterable_to_array_limit(arr, i) {
|
105
99
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
106
100
|
if (_i == null) return;
|
@@ -128,9 +122,6 @@ function _iterable_to_array_limit(arr, i) {
|
|
128
122
|
function _non_iterable_rest() {
|
129
123
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
130
124
|
}
|
131
|
-
function _non_iterable_spread() {
|
132
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
133
|
-
}
|
134
125
|
function _object_spread(target) {
|
135
126
|
for(var i = 1; i < arguments.length; i++){
|
136
127
|
var source = arguments[i] != null ? arguments[i] : {};
|
@@ -200,9 +191,6 @@ function _object_without_properties_loose(source, excluded) {
|
|
200
191
|
function _sliced_to_array(arr, i) {
|
201
192
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
202
193
|
}
|
203
|
-
function _to_consumable_array(arr) {
|
204
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
205
|
-
}
|
206
194
|
function _type_of(obj) {
|
207
195
|
"@swc/helpers - typeof";
|
208
196
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
@@ -275,7 +263,7 @@ var comboboxRoot = function(Root) {
|
|
275
263
|
return (0, _getPathMaps.getTreeMaps)(transformedItems);
|
276
264
|
}, [
|
277
265
|
items
|
278
|
-
]),
|
266
|
+
]), 2), valueToCheckedMap = _useMemo[0], valueToItemMap = _useMemo[1];
|
279
267
|
var _useState = _sliced_to_array((0, _react.useState)((0, _utils2.getTextValue)(multiple, outerValue, valueToItemMap, renderValue)), 2), textValue = _useState[0], setTextValue = _useState[1];
|
280
268
|
var _useState1 = _sliced_to_array((0, _react.useState)(multiple ? [] : ''), 2), internalValue = _useState1[0], setInternalValue = _useState1[1];
|
281
269
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
@@ -363,39 +351,18 @@ var comboboxRoot = function(Root) {
|
|
363
351
|
}
|
364
352
|
};
|
365
353
|
// Обработчик чипов
|
366
|
-
var
|
354
|
+
var handleChipClick = function(chip) {
|
367
355
|
if (!Array.isArray(value)) return;
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
var resultValues = _to_consumable_array(value);
|
372
|
-
value.forEach(function(_, index) {
|
356
|
+
if (isTargetAmount) {
|
357
|
+
// При закрытии чипа в режиме isTargetAmount в value оставляем только disabled-элементы
|
358
|
+
onChange(value.filter(function(val) {
|
373
359
|
var _valueToItemMap_get;
|
374
|
-
|
375
|
-
|
376
|
-
var labelAfterRenderValue = renderValue(label ? labelToItemMap.get(label) : {
|
377
|
-
value: stringValue,
|
378
|
-
label: stringValue.toString()
|
379
|
-
});
|
380
|
-
if (!chipLabels.includes(labelAfterRenderValue)) {
|
381
|
-
resultValues.splice(index, 1);
|
382
|
-
}
|
383
|
-
});
|
384
|
-
var removedItemValue = (0, _utils2.getRemovedElement)(value, resultValues, isTargetAmount);
|
385
|
-
onChange(resultValues, removedItemValue ? valueToItemMap.get(removedItemValue) || {
|
386
|
-
value: removedItemValue,
|
387
|
-
label: removedItemValue.toString()
|
388
|
-
} : null);
|
360
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
361
|
+
}));
|
389
362
|
} else {
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
});
|
394
|
-
var removedItemValue1 = (0, _utils2.getRemovedElement)(value, newValues, isTargetAmount);
|
395
|
-
onChange(newValues, removedItemValue1 ? valueToItemMap.get(removedItemValue1) || {
|
396
|
-
value: removedItemValue1,
|
397
|
-
label: removedItemValue1.toString()
|
398
|
-
} : null);
|
363
|
+
onChange(value.filter(function(val) {
|
364
|
+
return val !== chip.value;
|
365
|
+
}), valueToItemMap.get(chip.value) || null);
|
399
366
|
}
|
400
367
|
};
|
401
368
|
// Обработчик открытия/закрытия выпадающего списка
|
@@ -425,14 +392,34 @@ var comboboxRoot = function(Root) {
|
|
425
392
|
return;
|
426
393
|
}
|
427
394
|
var checkedCopy = new Map(checked);
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
395
|
+
switch(checkedCopy.get(item.value)){
|
396
|
+
// Если чекбокс в состоянии indeterminate
|
397
|
+
case 'indeterminate':
|
398
|
+
{
|
399
|
+
// checkedCopy.set(item.value, true); ??
|
400
|
+
(0, _utils2.updateDescendants)(item, checkedCopy, true, valueToItemMap);
|
401
|
+
break;
|
402
|
+
}
|
403
|
+
// Если чекбокс в состоянии checked
|
404
|
+
case true:
|
405
|
+
{
|
406
|
+
(0, _utils2.updateDescendants)(item, checkedCopy, false, valueToItemMap);
|
407
|
+
checkedCopy.set(item.value, false);
|
408
|
+
break;
|
409
|
+
}
|
410
|
+
// Если чекбокс в состоянии unchecked
|
411
|
+
case false:
|
412
|
+
{
|
413
|
+
(0, _utils2.updateDescendants)(item, checkedCopy, true, valueToItemMap);
|
414
|
+
checkedCopy.set(item.value, true);
|
415
|
+
break;
|
416
|
+
}
|
417
|
+
default:
|
418
|
+
{
|
419
|
+
console.log();
|
420
|
+
break;
|
421
|
+
}
|
434
422
|
}
|
435
|
-
(0, _utils2.updateAncestors)(item, checkedCopy);
|
436
423
|
var newValues = [];
|
437
424
|
valueToItemMap.forEach(function(item, key) {
|
438
425
|
if (checkedCopy.get(key)) {
|
@@ -499,20 +486,28 @@ var comboboxRoot = function(Root) {
|
|
499
486
|
if (value.length === 0) return [];
|
500
487
|
if (isTargetAmount) {
|
501
488
|
return [
|
502
|
-
|
489
|
+
{
|
490
|
+
value: '_removeAll',
|
491
|
+
label: "Выбрано ".concat(targetAmount || value.length),
|
492
|
+
disabled: value.every(function(val) {
|
493
|
+
var _valueToItemMap_get;
|
494
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
495
|
+
})
|
496
|
+
}
|
503
497
|
];
|
504
498
|
}
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
499
|
+
return value.map(function(value) {
|
500
|
+
var _valueToItemMap_get, _valueToItemMap_get1;
|
501
|
+
var currentLabel = renderValue ? renderValue(valueToItemMap.get(value) || {
|
502
|
+
value: value,
|
503
|
+
label: value
|
504
|
+
}) : ((_valueToItemMap_get = valueToItemMap.get(value)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.label) || value.toString();
|
505
|
+
return {
|
506
|
+
value: value,
|
507
|
+
label: currentLabel,
|
508
|
+
disabled: ((_valueToItemMap_get1 = valueToItemMap.get(value)) === null || _valueToItemMap_get1 === void 0 ? void 0 : _valueToItemMap_get1.disabled) || false
|
509
|
+
};
|
510
|
+
});
|
516
511
|
}
|
517
512
|
return [];
|
518
513
|
};
|
@@ -669,8 +664,8 @@ var comboboxRoot = function(Root) {
|
|
669
664
|
keepPlaceholder: keepPlaceholder
|
670
665
|
}, multiple ? {
|
671
666
|
enumerationType: 'chip',
|
672
|
-
|
673
|
-
|
667
|
+
_chips: getChips(),
|
668
|
+
_onChipClick: handleChipClick
|
674
669
|
} : {
|
675
670
|
enumerationType: 'plain'
|
676
671
|
}, rest), {
|
@@ -42,16 +42,14 @@ var getPathMap = function(items) {
|
|
42
42
|
var getTreeMaps = function(items) {
|
43
43
|
var valueToCheckedMap = new Map();
|
44
44
|
var valueToItemMap = new Map();
|
45
|
-
var labelToItemMap = new Map();
|
46
45
|
var rec = function(items) {
|
47
46
|
var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
48
47
|
items === null || items === void 0 ? void 0 : items.forEach(function(item, index) {
|
49
|
-
var value = item.value,
|
48
|
+
var value = item.value, innerItems = item.items;
|
50
49
|
var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
|
51
50
|
valueToCheckedMap.set(value, false);
|
52
51
|
if ((0, _utils.isEmpty)(innerItems) || !innerItems) {
|
53
52
|
valueToItemMap.set(value, item);
|
54
|
-
labelToItemMap.set(label, item);
|
55
53
|
} else {
|
56
54
|
rec(innerItems, currIndex);
|
57
55
|
}
|
@@ -60,7 +58,6 @@ var getTreeMaps = function(items) {
|
|
60
58
|
rec(items);
|
61
59
|
return [
|
62
60
|
valueToCheckedMap,
|
63
|
-
valueToItemMap
|
64
|
-
labelToItemMap
|
61
|
+
valueToItemMap
|
65
62
|
];
|
66
63
|
};
|
@@ -15,9 +15,6 @@ _export(exports, {
|
|
15
15
|
get getItemId () {
|
16
16
|
return _getItemId.getItemId;
|
17
17
|
},
|
18
|
-
get getRemovedElement () {
|
19
|
-
return _getRemovedElement.getRemovedElement;
|
20
|
-
},
|
21
18
|
get getTextValue () {
|
22
19
|
return _getTextValue.getTextValue;
|
23
20
|
},
|
@@ -44,5 +41,4 @@ var _updateSingleAncestors = require("./updateSingleAncestors");
|
|
44
41
|
var _sizeToIconSize = require("./sizeToIconSize");
|
45
42
|
var _filterItems = require("./filterItems");
|
46
43
|
var _getItemId = require("./getItemId");
|
47
|
-
var _getRemovedElement = require("./getRemovedElement");
|
48
44
|
var _getTextValue = require("./getTextValue");
|