@salutejs/plasma-new-hope 0.336.0-canary.2220.17591054284.0 → 0.336.0-canary.2220.17654170001.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 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +2 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +39 -12
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +2 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +2 -1
- package/cjs/components/Pagination/Pagination.css +2 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -1
- package/cjs/components/Range/Range.css +2 -1
- package/cjs/components/Select/Select.css +2 -1
- package/cjs/components/Select/Select.js +24 -11
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/hooks/usePathMaps.js +1 -4
- package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
- package/cjs/components/Select/ui/Target/Target.css +2 -1
- package/cjs/components/Select/ui/Target/Target.js +0 -2
- package/cjs/components/Select/ui/Target/Target.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -49
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Slider/Slider.css +2 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +2 -1
- package/cjs/components/Table/Table.css +2 -1
- package/cjs/components/Table/ui/Cell/Cell.css +2 -1
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +2 -1
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +2 -1
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +2 -1
- package/cjs/components/TextField/TextField.js +7 -2
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +25 -21
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +15 -3
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -1
- package/{es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_119gtz1.css → cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css} +1 -0
- package/cjs/engines/common.js +11 -1
- package/cjs/engines/common.js.map +1 -1
- package/cjs/index.css +2 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +36 -9
- package/emotion/cjs/components/Select/Select.js +27 -9
- package/emotion/cjs/components/Select/hooks/usePathMaps.js +2 -5
- package/emotion/cjs/components/Select/ui/Target/Target.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
- package/emotion/cjs/components/Select/utils/index.js +0 -4
- package/emotion/cjs/components/TextField/TextField.js +7 -3
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +13 -4
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +22 -5
- package/emotion/cjs/engines/common.js +14 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +36 -9
- package/emotion/es/components/Select/Select.js +27 -9
- package/emotion/es/components/Select/hooks/usePathMaps.js +2 -5
- package/emotion/es/components/Select/ui/Target/Target.js +1 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
- package/emotion/es/components/Select/utils/index.js +0 -1
- package/emotion/es/components/TextField/TextField.js +7 -3
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +13 -4
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +11 -2
- package/emotion/es/engines/common.js +14 -1
- package/es/components/Autocomplete/Autocomplete.css +2 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +2 -1
- package/es/components/Combobox/ComboboxNew/Combobox.js +39 -12
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.css +2 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -1
- package/es/components/DatePicker/SingleDate/SingleDate.css +2 -1
- package/es/components/Pagination/Pagination.css +2 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -1
- package/es/components/Range/Range.css +2 -1
- package/es/components/Select/Select.css +2 -1
- package/es/components/Select/Select.js +24 -11
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/hooks/usePathMaps.js +1 -4
- package/es/components/Select/hooks/usePathMaps.js.map +1 -1
- package/es/components/Select/ui/Target/Target.css +2 -1
- package/es/components/Select/ui/Target/Target.js +0 -2
- package/es/components/Select/ui/Target/Target.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +2 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -50
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Slider/Slider.css +2 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +2 -1
- package/es/components/Table/Table.css +2 -1
- package/es/components/Table/ui/Cell/Cell.css +2 -1
- package/es/components/Table/ui/EditableCell/EditableCell.css +2 -1
- package/es/components/Table/ui/HeadCell/HeadCell.css +2 -1
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +2 -1
- package/es/components/TextField/TextField.js +7 -2
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +25 -21
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +15 -3
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -1
- package/{cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_119gtz1.css → es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css} +1 -0
- package/es/engines/common.js +12 -2
- package/es/engines/common.js.map +1 -1
- package/es/index.css +2 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +36 -9
- package/styled-components/cjs/components/Select/Select.js +27 -9
- package/styled-components/cjs/components/Select/hooks/usePathMaps.js +2 -5
- package/styled-components/cjs/components/Select/ui/Target/Target.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
- package/styled-components/cjs/components/Select/utils/index.js +0 -4
- package/styled-components/cjs/components/TextField/TextField.js +6 -2
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +13 -4
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +31 -4
- package/styled-components/cjs/engines/common.js +14 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +36 -9
- package/styled-components/es/components/Select/Select.js +27 -9
- package/styled-components/es/components/Select/hooks/usePathMaps.js +2 -5
- package/styled-components/es/components/Select/ui/Target/Target.js +1 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
- package/styled-components/es/components/Select/utils/index.js +0 -1
- package/styled-components/es/components/TextField/TextField.js +6 -2
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +13 -4
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +20 -1
- package/styled-components/es/engines/common.js +14 -1
- 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/NumberFormat/NumberFormat.d.ts.map +1 -1
- package/types/components/NumberFormat/NumberFormat.types.d.ts +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/hooks/usePathMaps.d.ts +1 -2
- package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +0 -1
- package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +1 -2
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Select/utils/index.d.ts +0 -1
- package/types/components/Select/utils/index.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +2 -2
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts +2 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts +1 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts.map +1 -1
- package/types/engines/common.d.ts.map +1 -1
- package/types/examples/components/NumberFormat/NumberFormat.d.ts.map +1 -1
- package/cjs/components/Select/utils/getRemovedElement.js +0 -17
- package/cjs/components/Select/utils/getRemovedElement.js.map +0 -1
- package/emotion/cjs/components/Select/utils/getRemovedElement.js +0 -20
- package/emotion/es/components/Select/utils/getRemovedElement.js +0 -10
- package/es/components/Select/utils/getRemovedElement.js +0 -13
- package/es/components/Select/utils/getRemovedElement.js.map +0 -1
- package/styled-components/cjs/components/Select/utils/getRemovedElement.js +0 -20
- package/styled-components/es/components/Select/utils/getRemovedElement.js +0 -10
- package/types/components/Select/utils/getRemovedElement.d.ts +0 -2
- package/types/components/Select/utils/getRemovedElement.d.ts.map +0 -1
@@ -1,3 +1,26 @@
|
|
1
|
+
.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);}
|
2
|
+
|
3
|
+
.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);}
|
4
|
+
|
5
|
+
.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);}
|
6
|
+
|
7
|
+
.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);}
|
8
|
+
|
9
|
+
.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);}
|
10
|
+
|
11
|
+
.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);}
|
12
|
+
|
13
|
+
.base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
|
14
|
+
|
15
|
+
.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);}
|
16
|
+
.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);}
|
17
|
+
.Chip_styles_fnd4j5_s1ror4o9__7a13f27c{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
18
|
+
.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);}
|
19
|
+
.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);}
|
20
|
+
|
21
|
+
.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);}
|
22
|
+
.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:'';}
|
23
|
+
|
1
24
|
.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
25
|
.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
26
|
.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);}
|
@@ -31,24 +54,5 @@
|
|
31
54
|
.TextField_styles_xvs3tf_h8yezh4__6229ab57{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
|
32
55
|
.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
56
|
|
34
|
-
.
|
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);}
|
57
|
+
.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7{--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_y9tozi_s11qqqhl__d1734be7::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_y9tozi_s11qqqhl__d1734be7.TextFieldChipNew_styles_y9tozi_focusVisible__d1734be7:focus::before,.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
|
58
|
+
.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7{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;}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7::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_y9tozi_t10z5awc__d1734be7.TextFieldChipNew_styles_y9tozi_focusVisible__d1734be7:focus::before,.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7:after{content:',';}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7:last-child:after{content:'';}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { TextChip } from '../TextFieldChip/TextFieldChip.styles.js';
|
2
3
|
import { StyledChips } from '../../TextField.styles.js';
|
3
4
|
import { classes } from '../../TextField.tokens.js';
|
4
5
|
import { StyledChip } from './TextFieldChipNew.styles.js';
|
@@ -10,7 +11,9 @@ var TextFieldChipNew = function TextFieldChipNew(_ref) {
|
|
10
11
|
handleChipKeyDown = _ref.handleChipKeyDown,
|
11
12
|
onChipClear = _ref.onChipClear,
|
12
13
|
readOnly = _ref.readOnly,
|
13
|
-
|
14
|
+
chipType = _ref.chipType,
|
15
|
+
view = _ref.view,
|
16
|
+
_forceChipManipulationWithReadonly = _ref._forceChipManipulationWithReadonly;
|
14
17
|
return /*#__PURE__*/React.createElement(StyledChips, {
|
15
18
|
className: classes.chipsWrapper
|
16
19
|
}, chips.map(function (_ref2, index) {
|
@@ -45,7 +48,7 @@ var TextFieldChipNew = function TextFieldChipNew(_ref) {
|
|
45
48
|
onChipClear(chipId, index);
|
46
49
|
}
|
47
50
|
};
|
48
|
-
return /*#__PURE__*/React.createElement(StyledChip, {
|
51
|
+
return chipType === 'default' ? /*#__PURE__*/React.createElement(StyledChip, {
|
49
52
|
key: chipId,
|
50
53
|
ref: function ref(element) {
|
51
54
|
return getRef(element, index);
|
@@ -58,7 +61,16 @@ var TextFieldChipNew = function TextFieldChipNew(_ref) {
|
|
58
61
|
onKeyDown: onKeyDownHandle,
|
59
62
|
text: label,
|
60
63
|
view: view
|
61
|
-
|
64
|
+
// TODO: #1547
|
65
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
66
|
+
// @ts-ignore
|
67
|
+
,
|
68
|
+
_forceChipManipulationWithReadonly: _forceChipManipulationWithReadonly
|
69
|
+
}) : /*#__PURE__*/React.createElement(TextChip, {
|
70
|
+
tabIndex: -1,
|
71
|
+
onClick: handleClick,
|
72
|
+
onKeyDown: onKeyDownHandle
|
73
|
+
}, label);
|
62
74
|
}));
|
63
75
|
};
|
64
76
|
|
@@ -1 +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}> = ({
|
1
|
+
{"version":3,"file":"TextFieldChipNew.js","sources":["../../../../../src/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.tsx"],"sourcesContent":["import React, { FC, KeyboardEvent } from 'react';\nimport { TextChip } from 'src/components/TextField/ui/TextFieldChip/TextFieldChip.styles';\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 chipType?: string;\n view?: string;\n _forceChipManipulationWithReadonly?: any;\n}> = ({\n chips,\n onChipClick,\n getRef,\n handleChipKeyDown,\n onChipClear,\n readOnly,\n chipType,\n view,\n _forceChipManipulationWithReadonly,\n}) => {\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 chipType === 'default' ? (\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 // TODO: #1547\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _forceChipManipulationWithReadonly={_forceChipManipulationWithReadonly}\n />\n ) : (\n <TextChip tabIndex={-1} onClick={handleClick} onKeyDown={onKeyDownHandle}>\n {label}\n </TextChip>\n );\n })}\n </StyledChips>\n );\n};\n"],"names":["TextFieldChipNew","_ref","chips","onChipClick","getRef","handleChipKeyDown","onChipClear","readOnly","chipType","view","_forceChipManipulationWithReadonly","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","TextChip"],"mappings":"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"}
|
@@ -1 +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,WAAW,CAACC,UAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;;AAEpC;AAAA,IAAAK,IAAA,GAVkBA,SAUlBA,IAAAA,GAAA;AAAA,EAAA,OACiCF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAsC/B;;;;"}
|
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\nexport const TextChip = styled.button`\n display: block;\n flex: none;\n background: none;\n border: none;\n outline: none;\n padding: 0;\n white-space: nowrap;\n cursor: pointer;\n\n font-family: var(${tokens.fontFamily});\n font-size: var(${tokens.fontSize});\n font-style: var(${tokens.fontStyle});\n font-weight: var(${tokens.fontWeight});\n letter-spacing: var(${tokens.letterSpacing});\n line-height: var(${tokens.lineHeight});\n color: var(${tokens.color});\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 &:after {\n content: ',';\n }\n\n &:last-child {\n &:after {\n content: '';\n }\n }\n`;\n"],"names":["mergedConfig","mergeConfig","chipConfig","Chip","component","_exp","StyledChip","styled","name","class","propsAsIs"],"mappings":";;;;AAOA;AACA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,UAAU,CAAC,CAAA;AAC5C,IAAMC,IAAI,gBAAGC,SAAS,CAACJ,YAAY,CAAC,CAAA;;AAEpC;AAAA,IAAAK,IAAA,GAVkBA,SAUlBA,IAAAA,GAAA;AAAA,EAAA,OACiCF,IAAI,CAAA;AAAA,CAAA,CAAA;AAA9B,IAAMG,UAAU,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAsC/B;;;;"}
|
@@ -1 +1,2 @@
|
|
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);}
|
2
|
+
.t10z5awc{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;}.t10z5awc::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;}.t10z5awc.focus-visible:focus::before,.t10z5awc[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.t10z5awc:after{content:',';}.t10z5awc:last-child:after{content:'';}
|
package/es/engines/common.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { objectSpread2 as _objectSpread2, extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
1
|
+
import { objectSpread2 as _objectSpread2, extends as _extends, defineProperty as _defineProperty } from '../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import React from 'react';
|
3
3
|
import { _component } from './linaria.js';
|
4
4
|
|
@@ -29,10 +29,20 @@ var mergeConfig = function mergeConfig(baseConfig, userConfig) {
|
|
29
29
|
}
|
30
30
|
return res;
|
31
31
|
};
|
32
|
+
|
33
|
+
// INFO: Метод, который проводит слияние двух объектов
|
34
|
+
// INFO: если значение явно указанно как undefined/null/пустая строка, то будет взято значение указанное в default
|
35
|
+
function mergeWithoutNullable(defaults, componentProps) {
|
36
|
+
var props = Object.keys(defaults).reduce(function (acc, key) {
|
37
|
+
return _objectSpread2(_objectSpread2({}, acc), {}, _defineProperty({}, key, [null, undefined, ''].includes(componentProps[key]) ? defaults[key] : componentProps[key]));
|
38
|
+
}, {});
|
39
|
+
return _objectSpread2(_objectSpread2({}, componentProps), props);
|
40
|
+
}
|
32
41
|
function component(config) {
|
33
42
|
var Comp = config.layout(_component(config));
|
34
43
|
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
35
|
-
|
44
|
+
var mergedProps = mergeWithoutNullable(config === null || config === void 0 ? void 0 : config.defaults, props);
|
45
|
+
return /*#__PURE__*/React.createElement(Comp, _extends({}, mergedProps, {
|
36
46
|
ref: ref
|
37
47
|
}));
|
38
48
|
});
|
package/es/engines/common.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {\n ComponentConfig,\n HTMLTagList,\n PropsType,\n Variants,\n HTMLAttributesWithoutOnChange,\n HTMLAttributesWithoutOnChangeAndDefaultValue,\n} from './types';\n\nexport const mergeConfig = <\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutPropsBase extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>,\n LayoutPropsUser extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n | undefined = undefined\n>(\n baseConfig: ComponentConfig<Tag, Variants, PropsType & LayoutPropsBase, LayoutPropsBase>,\n userConfig?: Partial<ComponentConfig<Tag, VariantList, VariantsProps, LayoutPropsUser>>,\n) => {\n const res = { ...baseConfig, ...userConfig };\n\n if (res.variations) {\n // copy variations base css\n // eslint-disable-next-line guard-for-in\n for (const key in res.variations) {\n const variant = baseConfig.variations[key];\n\n res.variations[key].css = variant?.css;\n /* start of bad decision */\n if (!res.variations[key].true && variant?.true) {\n res.variations[key].true = variant.true;\n }\n /* end of bad decision */\n if (variant?.attrs) {\n res.variations[key].attrs = variant.attrs;\n }\n }\n }\n\n // eslint-disable-next-line guard-for-in\n for (const key in baseConfig.defaults || {}) {\n if (!(key in res.defaults)) {\n res.defaults[key] = baseConfig.defaults[key];\n }\n }\n\n return res as ComponentConfig<\n Tag,\n VariantList,\n PropsType<VariantList>,\n LayoutPropsUser extends undefined ? LayoutPropsBase : LayoutPropsUser\n >;\n};\n\nexport function component<\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutProps extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n>(\n config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>,\n): React.FunctionComponent<VariantsProps & LayoutProps> {\n const Comp = config.layout(_component((config as unknown) as ComponentConfig));\n\n return React.forwardRef<VariantsProps & LayoutProps, any>((props, ref) =>
|
1
|
+
{"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {\n ComponentConfig,\n HTMLTagList,\n PropsType,\n Variants,\n HTMLAttributesWithoutOnChange,\n HTMLAttributesWithoutOnChangeAndDefaultValue,\n} from './types';\n\nexport const mergeConfig = <\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutPropsBase extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>,\n LayoutPropsUser extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n | undefined = undefined\n>(\n baseConfig: ComponentConfig<Tag, Variants, PropsType & LayoutPropsBase, LayoutPropsBase>,\n userConfig?: Partial<ComponentConfig<Tag, VariantList, VariantsProps, LayoutPropsUser>>,\n) => {\n const res = { ...baseConfig, ...userConfig };\n\n if (res.variations) {\n // copy variations base css\n // eslint-disable-next-line guard-for-in\n for (const key in res.variations) {\n const variant = baseConfig.variations[key];\n\n res.variations[key].css = variant?.css;\n /* start of bad decision */\n if (!res.variations[key].true && variant?.true) {\n res.variations[key].true = variant.true;\n }\n /* end of bad decision */\n if (variant?.attrs) {\n res.variations[key].attrs = variant.attrs;\n }\n }\n }\n\n // eslint-disable-next-line guard-for-in\n for (const key in baseConfig.defaults || {}) {\n if (!(key in res.defaults)) {\n res.defaults[key] = baseConfig.defaults[key];\n }\n }\n\n return res as ComponentConfig<\n Tag,\n VariantList,\n PropsType<VariantList>,\n LayoutPropsUser extends undefined ? LayoutPropsBase : LayoutPropsUser\n >;\n};\n\n// INFO: Метод, который проводит слияние двух объектов\n// INFO: если значение явно указанно как undefined/null/пустая строка, то будет взято значение указанное в default\nfunction mergeWithoutNullable(defaults: any, componentProps: any) {\n const props = Object.keys(defaults).reduce((acc, key) => {\n return {\n ...acc,\n [key]: [null, undefined, ''].includes(componentProps[key]) ? defaults[key] : componentProps[key],\n };\n }, {});\n\n return { ...componentProps, ...props };\n}\n\nexport function component<\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutProps extends\n | React.HTMLAttributes<HTMLElement>\n | HTMLAttributesWithoutOnChange<HTMLElement>\n | HTMLAttributesWithoutOnChangeAndDefaultValue<HTMLElement>\n>(\n config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>,\n): React.FunctionComponent<VariantsProps & LayoutProps> {\n const Comp = config.layout(_component((config as unknown) as ComponentConfig));\n\n return React.forwardRef<VariantsProps & LayoutProps, any>((props, ref) => {\n const mergedProps = mergeWithoutNullable(config?.defaults, props);\n\n return <Comp {...mergedProps} ref={ref} />;\n });\n}\n"],"names":["mergeConfig","baseConfig","userConfig","res","_objectSpread","variations","key","variant","css","attrs","defaults","mergeWithoutNullable","componentProps","props","Object","keys","reduce","acc","_defineProperty","undefined","includes","component","config","Comp","layout","_component","React","forwardRef","ref","mergedProps","createElement","_extends"],"mappings":"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"}
|
package/es/index.css
CHANGED
@@ -222,7 +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
|
-
.
|
225
|
+
.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7{--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_y9tozi_s11qqqhl__d1734be7::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_y9tozi_s11qqqhl__d1734be7.TextFieldChipNew_styles_y9tozi_focusVisible__d1734be7:focus::before,.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_y9tozi_s11qqqhl__d1734be7[readonly]{opacity:var(--plasma-textfield__chip-opacity-readonly);}
|
226
|
+
.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7{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;}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7::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_y9tozi_t10z5awc__d1734be7.TextFieldChipNew_styles_y9tozi_focusVisible__d1734be7:focus::before,.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-textfield-focus-color);}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7:after{content:',';}.TextFieldChipNew_styles_y9tozi_t10z5awc__d1734be7:last-child:after{content:'';}
|
226
227
|
|
227
228
|
.TextField_1lzb2r1_bpunezx__7d079491{display:block;}
|
228
229
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.336.0-canary.2220.
|
3
|
+
"version": "0.336.0-canary.2220.17654170001.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -137,5 +137,5 @@
|
|
137
137
|
"sideEffects": [
|
138
138
|
"*.css"
|
139
139
|
],
|
140
|
-
"gitHead": "
|
140
|
+
"gitHead": "9bb2fc78f0bc046c79be9b01ed7c012e4a723358"
|
141
141
|
}
|
@@ -354,7 +354,11 @@ var comboboxRoot = function(Root) {
|
|
354
354
|
var handleChipClick = function(chip) {
|
355
355
|
if (!Array.isArray(value)) return;
|
356
356
|
if (isTargetAmount) {
|
357
|
-
|
357
|
+
// При закрытии чипа в режиме isTargetAmount в value оставляем только disabled-элементы
|
358
|
+
onChange(value.filter(function(val) {
|
359
|
+
var _valueToItemMap_get;
|
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
|
+
}));
|
358
362
|
} else {
|
359
363
|
onChange(value.filter(function(val) {
|
360
364
|
return val !== chip.value;
|
@@ -388,14 +392,34 @@ var comboboxRoot = function(Root) {
|
|
388
392
|
return;
|
389
393
|
}
|
390
394
|
var checkedCopy = new Map(checked);
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
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
|
+
}
|
397
422
|
}
|
398
|
-
(0, _utils2.updateAncestors)(item, checkedCopy);
|
399
423
|
var newValues = [];
|
400
424
|
valueToItemMap.forEach(function(item, key) {
|
401
425
|
if (checkedCopy.get(key)) {
|
@@ -465,7 +489,10 @@ var comboboxRoot = function(Root) {
|
|
465
489
|
{
|
466
490
|
value: '_removeAll',
|
467
491
|
label: "Выбрано ".concat(targetAmount || value.length),
|
468
|
-
disabled:
|
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
|
+
})
|
469
496
|
}
|
470
497
|
];
|
471
498
|
}
|
@@ -256,7 +256,7 @@ var selectRoot = function(Root) {
|
|
256
256
|
items
|
257
257
|
]);
|
258
258
|
// Создаем структуры для быстрой работы с деревом
|
259
|
-
var _usePathMaps1 = _sliced_to_array((0, _usePathMaps.usePathMaps)(transformedItems),
|
259
|
+
var _usePathMaps1 = _sliced_to_array((0, _usePathMaps.usePathMaps)(transformedItems), 4), pathMap = _usePathMaps1[0], focusedToValueMap = _usePathMaps1[1], valueToCheckedMap = _usePathMaps1[2], valueToItemMap = _usePathMaps1[3];
|
260
260
|
var _useState = _sliced_to_array((0, _react.useState)(props.multiselect ? [] : ''), 2), internalValue = _useState[0], setInternalValue = _useState[1];
|
261
261
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
262
262
|
var floatingPopoverRef = (0, _react.useRef)(null);
|
@@ -344,14 +344,33 @@ var selectRoot = function(Root) {
|
|
344
344
|
return;
|
345
345
|
}
|
346
346
|
var checkedCopy = new Map(checked);
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
347
|
+
switch(checkedCopy.get(item.value)){
|
348
|
+
// Если чекбокс в состоянии indeterminate
|
349
|
+
case 'indeterminate':
|
350
|
+
{
|
351
|
+
// checkedCopy.set(item.value, true); ??
|
352
|
+
(0, _utils1.updateDescendants)(item, checkedCopy, true, valueToItemMap);
|
353
|
+
break;
|
354
|
+
}
|
355
|
+
// Если чекбокс в состоянии checked
|
356
|
+
case true:
|
357
|
+
{
|
358
|
+
(0, _utils1.updateDescendants)(item, checkedCopy, false, valueToItemMap);
|
359
|
+
checkedCopy.set(item.value, false);
|
360
|
+
break;
|
361
|
+
}
|
362
|
+
// Если чекбокс в состоянии unchecked
|
363
|
+
case false:
|
364
|
+
{
|
365
|
+
(0, _utils1.updateDescendants)(item, checkedCopy, true, valueToItemMap);
|
366
|
+
checkedCopy.set(item.value, true);
|
367
|
+
break;
|
368
|
+
}
|
369
|
+
default:
|
370
|
+
{
|
371
|
+
break;
|
372
|
+
}
|
353
373
|
}
|
354
|
-
(0, _utils1.updateAncestors)(item, checkedCopy);
|
355
374
|
var newValues = [];
|
356
375
|
valueToItemMap.forEach(function(item, key) {
|
357
376
|
if (checkedCopy.get(key)) {
|
@@ -542,7 +561,6 @@ var selectRoot = function(Root) {
|
|
542
561
|
activeDescendantItemValue: activeDescendantItemValue,
|
543
562
|
isTargetAmount: isTargetAmount,
|
544
563
|
onChange: onChange,
|
545
|
-
labelToItemMap: labelToItemMap,
|
546
564
|
chipView: chipView,
|
547
565
|
separator: separator,
|
548
566
|
requiredProps: requiredProps,
|
@@ -14,18 +14,16 @@ var usePathMaps = function(items) {
|
|
14
14
|
var focusedToValueMap = new Map();
|
15
15
|
var valueToCheckedMap = new Map();
|
16
16
|
var valueToItemMap = new Map();
|
17
|
-
var labelToItemMap = new Map();
|
18
17
|
pathMap.set('root', (items === null || items === void 0 ? void 0 : items.length) || 0);
|
19
18
|
var rec = function(items) {
|
20
19
|
var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
21
20
|
items === null || items === void 0 ? void 0 : items.forEach(function(item, index) {
|
22
|
-
var value = item.value,
|
21
|
+
var value = item.value, innerItems = item.items;
|
23
22
|
var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
|
24
23
|
focusedToValueMap.set(currIndex, item);
|
25
24
|
valueToCheckedMap.set(value, false);
|
26
25
|
if ((0, _utils.isEmpty)(innerItems) || !innerItems) {
|
27
26
|
valueToItemMap.set(value, item);
|
28
|
-
labelToItemMap.set(label, item);
|
29
27
|
} else {
|
30
28
|
pathMap.set(value, innerItems.length);
|
31
29
|
rec(innerItems, currIndex);
|
@@ -37,7 +35,6 @@ var usePathMaps = function(items) {
|
|
37
35
|
pathMap,
|
38
36
|
focusedToValueMap,
|
39
37
|
valueToCheckedMap,
|
40
|
-
valueToItemMap
|
41
|
-
labelToItemMap
|
38
|
+
valueToItemMap
|
42
39
|
];
|
43
40
|
};
|
@@ -53,7 +53,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
53
53
|
return newObj;
|
54
54
|
}
|
55
55
|
var Target = /*#__PURE__*/ (0, _react.forwardRef)(function(param, ref) {
|
56
|
-
var value = param.value, opened = param.opened, valueToItemMap = param.valueToItemMap, label = param.label, placeholder = param.placeholder, onKeyDown = param.onKeyDown, labelPlacement = param.labelPlacement, size = param.size, contentLeft = param.contentLeft, disabled = param.disabled, readOnly = param.readOnly, renderValue = param.renderValue, selectProps = param.selectProps, inputWrapperRef = param.inputWrapperRef, multiselect = param.multiselect, view = param.view, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, isTargetAmount = param.isTargetAmount, onChange = param.onChange,
|
56
|
+
var value = param.value, opened = param.opened, valueToItemMap = param.valueToItemMap, label = param.label, placeholder = param.placeholder, onKeyDown = param.onKeyDown, labelPlacement = param.labelPlacement, size = param.size, contentLeft = param.contentLeft, disabled = param.disabled, readOnly = param.readOnly, renderValue = param.renderValue, selectProps = param.selectProps, inputWrapperRef = param.inputWrapperRef, multiselect = param.multiselect, view = param.view, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, isTargetAmount = param.isTargetAmount, onChange = param.onChange, chipView = param.chipView, separator = param.separator, requiredProps = param.requiredProps, hintProps = param.hintProps;
|
57
57
|
var buttonRef = (0, _plasmacore.useForkRef)(ref, inputWrapperRef);
|
58
58
|
if (selectProps.renderTarget) {
|
59
59
|
return /*#__PURE__*/ _react.default.createElement("div", {
|
@@ -98,7 +98,6 @@ var Target = /*#__PURE__*/ (0, _react.forwardRef)(function(param, ref) {
|
|
98
98
|
valueToItemMap: valueToItemMap,
|
99
99
|
renderValue: renderValue,
|
100
100
|
onChange: onChange,
|
101
|
-
labelToItemMap: labelToItemMap,
|
102
101
|
chipView: chipView,
|
103
102
|
requiredProps: requiredProps,
|
104
103
|
hintProps: hintProps,
|