@salutejs/plasma-new-hope 0.174.0-canary.1504.11479867300.0 → 0.174.0-canary.1505.11485998091.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +9 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/utils/getInitialValue.js +27 -0
- package/cjs/components/Combobox/ComboboxNew/utils/getInitialValue.js.map +1 -0
- package/cjs/components/Pagination/Pagination.css +13 -13
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +13 -13
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
- package/cjs/components/Select/Select.css +13 -13
- package/cjs/components/Select/Select.js +12 -16
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.styles.js +1 -1
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/Select.styles_1nzals0.css +5 -0
- package/cjs/components/Select/Select.tokens.js +1 -17
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/hooks/useKeyboardNavigation.js +1 -1
- package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +13 -13
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +13 -13
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +11 -11
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/{Item.styles_1gaxu1y.css → Item.styles_baxa65.css} +2 -2
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/cjs/components/Select/utils/getButtonLabel.js +1 -1
- package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
- package/cjs/components/Select/utils/getInitialValue.js +27 -0
- package/cjs/components/Select/utils/getInitialValue.js.map +1 -0
- package/cjs/components/Select/utils/initialItemsTransform.js +8 -4
- package/cjs/components/Select/utils/initialItemsTransform.js.map +1 -1
- package/cjs/index.css +13 -13
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +8 -2
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getInitialValue.js +26 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
- package/emotion/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/emotion/cjs/components/Select/Select.js +11 -16
- package/emotion/cjs/components/Select/Select.styles.js +5 -5
- package/emotion/cjs/components/Select/Select.tokens.js +1 -17
- package/emotion/cjs/components/Select/hooks/useKeyboardNavigation.js +1 -1
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +10 -10
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +1 -1
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +13 -13
- package/emotion/cjs/components/Select/utils/getButtonLabel.js +1 -1
- package/emotion/cjs/components/Select/utils/getInitialValue.js +26 -0
- package/emotion/cjs/components/Select/utils/index.js +8 -1
- package/emotion/cjs/components/Select/utils/initialItemsTransform.js +18 -4
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +9 -3
- package/emotion/es/components/Combobox/ComboboxNew/utils/getInitialValue.js +20 -0
- package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
- package/emotion/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/emotion/es/components/Select/Select.js +12 -17
- package/emotion/es/components/Select/Select.styles.js +5 -5
- package/emotion/es/components/Select/Select.tokens.js +1 -17
- package/emotion/es/components/Select/hooks/useKeyboardNavigation.js +1 -1
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.styles.js +10 -10
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +1 -1
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +13 -13
- package/emotion/es/components/Select/utils/getButtonLabel.js +1 -1
- package/emotion/es/components/Select/utils/getInitialValue.js +20 -0
- package/emotion/es/components/Select/utils/index.js +2 -1
- package/emotion/es/components/Select/utils/initialItemsTransform.js +18 -4
- package/es/components/Combobox/ComboboxNew/Combobox.js +9 -2
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/utils/getInitialValue.js +23 -0
- package/es/components/Combobox/ComboboxNew/utils/getInitialValue.js.map +1 -0
- package/es/components/Pagination/Pagination.css +13 -13
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +13 -13
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
- package/es/components/Select/Select.css +13 -13
- package/es/components/Select/Select.js +13 -17
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.styles.js +1 -1
- package/es/components/Select/Select.styles.js.map +1 -1
- package/es/components/Select/Select.styles_1nzals0.css +5 -0
- package/es/components/Select/Select.tokens.js +1 -17
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/hooks/useKeyboardNavigation.js +1 -1
- package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +13 -13
- package/es/components/Select/ui/Inner/ui/Item/Item.css +13 -13
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +11 -11
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/{Item.styles_1gaxu1y.css → Item.styles_baxa65.css} +2 -2
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/es/components/Select/utils/getButtonLabel.js +1 -1
- package/es/components/Select/utils/getButtonLabel.js.map +1 -1
- package/es/components/Select/utils/getInitialValue.js +23 -0
- package/es/components/Select/utils/getInitialValue.js.map +1 -0
- package/es/components/Select/utils/initialItemsTransform.js +8 -4
- package/es/components/Select/utils/initialItemsTransform.js.map +1 -1
- package/es/index.css +13 -13
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +8 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getInitialValue.js +26 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +8 -1
- package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/styled-components/cjs/components/Select/Select.js +11 -16
- package/styled-components/cjs/components/Select/Select.styles.js +2 -2
- package/styled-components/cjs/components/Select/Select.tokens.js +1 -17
- package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +1 -1
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +3 -3
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +1 -1
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/cjs/components/Select/utils/getButtonLabel.js +1 -1
- package/styled-components/cjs/components/Select/utils/getInitialValue.js +26 -0
- package/styled-components/cjs/components/Select/utils/index.js +8 -1
- package/styled-components/cjs/components/Select/utils/initialItemsTransform.js +18 -4
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +9 -3
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getInitialValue.js +20 -0
- package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +2 -1
- package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/styled-components/es/components/Select/Select.js +12 -17
- package/styled-components/es/components/Select/Select.styles.js +2 -2
- package/styled-components/es/components/Select/Select.tokens.js +1 -17
- package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +1 -1
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.styles.js +3 -3
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +1 -1
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/es/components/Select/utils/getButtonLabel.js +1 -1
- package/styled-components/es/components/Select/utils/getInitialValue.js +20 -0
- package/styled-components/es/components/Select/utils/index.js +2 -1
- package/styled-components/es/components/Select/utils/initialItemsTransform.js +18 -4
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/getInitialValue.d.ts +4 -0
- package/types/components/Combobox/ComboboxNew/utils/getInitialValue.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts +1 -0
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +8 -8
- package/types/components/Select/Select.d.ts +2 -2
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +0 -16
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +2 -1
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/hooks/useKeyboardNavigation.d.ts +2 -2
- package/types/components/Select/hooks/useKeyboardNavigation.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +2 -2
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +4 -4
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Select/utils/getInitialValue.d.ts +4 -0
- package/types/components/Select/utils/getInitialValue.d.ts.map +1 -0
- package/types/components/Select/utils/index.d.ts +1 -0
- package/types/components/Select/utils/index.d.ts.map +1 -1
- package/types/components/Select/utils/initialItemsTransform.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.d.ts +8 -8
- package/types/examples/plasma_web/components/Select/Select.d.ts +8 -8
- package/cjs/components/Select/Select.styles_ei4ic3.css +0 -5
- package/es/components/Select/Select.styles_ei4ic3.css +0 -5
@@ -3,11 +3,11 @@
|
|
3
3
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::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
4
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
5
5
|
|
6
|
-
.
|
7
|
-
.
|
8
|
-
.
|
9
|
-
.
|
10
|
-
.
|
6
|
+
.Select_styles_1nzals0_spxbau6__beedd761 .Select_styles_1nzals0_popoverRoot__beedd761{width:var(--spxbau6-0);}.Select_styles_1nzals0_spxbau6__beedd761 .Select_styles_1nzals0_popoverTarget__beedd761{width:100%;}
|
7
|
+
.Select_styles_1nzals0_u1yey2x3__beedd761{box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-select-border-radius);width:var(--u1yey2x3-0);height:var(--u1yey2x3-1);overflow:var(--u1yey2x3-2);border:var(--plasma-select-popover-border-width) solid var(--plasma-select-popover-border-color);margin:var(--u1yey2x3-3);padding:var(--plasma-select-padding);}
|
8
|
+
.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverWrapper__beedd761,.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverTarget__beedd761{display:block;}
|
9
|
+
.Select_styles_1nzals0_ogpldc9__beedd761{display:block;margin-bottom:var(--plasma-select-label-offset);color:var(--text-primary);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
10
|
+
.Select_styles_1nzals0_h2ef052__beedd761{margin-top:var(--plasma-select-helper-text-offset);color:var(--plasma-select-helper-text-color);font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);-webkit-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-moz-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-ms-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);}
|
11
11
|
|
12
12
|
.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);}
|
13
13
|
|
@@ -96,12 +96,12 @@
|
|
96
96
|
|
97
97
|
.base_7436cm_b17chi2r__254eb615{height:var(--plasma-indicator-size);width:var(--plasma-indicator-size);}
|
98
98
|
|
99
|
-
.
|
100
|
-
.
|
101
|
-
.
|
102
|
-
.
|
103
|
-
.
|
104
|
-
.
|
105
|
-
.
|
106
|
-
.
|
99
|
+
.Item_styles_baxa65_s1vls8ri__1ba2f282{--plasma-checkbox-trigger-size:var(--plasma-select-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-select-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--plasma-select-checkbox-fill-color);--plasma-checkbox-icon-color:var(--plasma-select-checkbox-icon-color);--plasma-checkbox-trigger-border-color:var(--plasma-select-checkbox-trigger-border-color);}
|
100
|
+
.Item_styles_baxa65_s1to2lz5__1ba2f282{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-checkbox-fill-color);}
|
101
|
+
.Item_styles_baxa65_s17z4dei__1ba2f282{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
102
|
+
.Item_styles_baxa65_s1nd9idj__1ba2f282{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
103
|
+
.Item_styles_baxa65_dnb2nsj__1ba2f282{line-height:0;color:var(--text-secondary);}.Item_styles_baxa65_dnb2nsj__1ba2f282:hover{color:var(--text-secondary-hover);}
|
104
|
+
.Item_styles_baxa65_i581hb1__1ba2f282{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-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:var(--i581hb1-0);height:var(--i581hb1-0);margin:var(--plasma-select-item-icon-margin);line-height:0;color:var(--plasma-select-checkbox-fill-color);}.Item_styles_baxa65_i581hb1__1ba2f282 .Item_styles_baxa65_selectItemCheckbox__1ba2f282{--plasma-checkbox-trigger-size:var(--i581hb1-1);--plasma-checkbox-trigger-border-radius:var(--i581hb1-2);}
|
105
|
+
.Item_styles_baxa65_scgpql7__1ba2f282{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;color:var(--scgpql7-0);}
|
106
|
+
.Item_styles_baxa65_wzzpzvq__1ba2f282{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;min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wzzpzvq-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background:var(--plasma-colors-transparent);color:var(--text-primary);border-radius:var(--plasma-select-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;}.Item_styles_baxa65_wzzpzvq__1ba2f282:hover:not(.Item_styles_baxa65_dropdownItemIsDisabled__1ba2f282){cursor:pointer;background:var(--surface-transparent-secondary);}.Item_styles_baxa65_wzzpzvq__1ba2f282.Item_styles_baxa65_dropdownItemIsActive__1ba2f282{background:var(--surface-transparent-secondary);}.Item_styles_baxa65_wzzpzvq__1ba2f282.Item_styles_baxa65_dropdownItemIsDisabled__1ba2f282{opacity:0.4;cursor:not-allowed;}.Item_styles_baxa65_wzzpzvq__1ba2f282:focus{outline:none;}.Item_styles_baxa65_wzzpzvq__1ba2f282::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-select-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.Item_styles_baxa65_wzzpzvq__1ba2f282.Item_styles_baxa65_dropdownItemIsFocused__1ba2f282:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
107
107
|
|
@@ -70,11 +70,11 @@
|
|
70
70
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::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);}
|
71
71
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{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_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
72
72
|
|
73
|
-
.
|
74
|
-
.
|
75
|
-
.
|
76
|
-
.
|
77
|
-
.
|
73
|
+
.Select_styles_1nzals0_spxbau6__beedd761 .Select_styles_1nzals0_popoverRoot__beedd761{width:var(--spxbau6-0);}.Select_styles_1nzals0_spxbau6__beedd761 .Select_styles_1nzals0_popoverTarget__beedd761{width:100%;}
|
74
|
+
.Select_styles_1nzals0_u1yey2x3__beedd761{box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-select-border-radius);width:var(--u1yey2x3-0);height:var(--u1yey2x3-1);overflow:var(--u1yey2x3-2);border:var(--plasma-select-popover-border-width) solid var(--plasma-select-popover-border-color);margin:var(--u1yey2x3-3);padding:var(--plasma-select-padding);}
|
75
|
+
.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverWrapper__beedd761,.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverTarget__beedd761{display:block;}
|
76
|
+
.Select_styles_1nzals0_ogpldc9__beedd761{display:block;margin-bottom:var(--plasma-select-label-offset);color:var(--text-primary);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);}
|
77
|
+
.Select_styles_1nzals0_h2ef052__beedd761{margin-top:var(--plasma-select-helper-text-offset);color:var(--plasma-select-helper-text-color);font-family:var(--plasma-typo-body-xs-font-family);font-size:var(--plasma-typo-body-xs-font-size);font-style:var(--plasma-typo-body-xs-font-style);font-weight:var(--plasma-typo-body-xs-font-weight);-webkit-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-moz-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);-ms-letter-spacing:var(--plasma-typo-body-xs-letter-spacing);letter-spacing:var(--plasma-typo-body-xs-letter-spacing);line-height:var(--plasma-typo-body-xs-line-height);}
|
78
78
|
|
79
79
|
.base_x252cy_b17hdes8__856a05b7 input[type='checkbox']:indeterminate + .base_x252cy_s1u3nd7e__856a05b7 .base_x252cy_sft3zxv__856a05b7{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}.base_x252cy_b17hdes8__856a05b7 input:checked + .base_x252cy_s1u3nd7e__856a05b7 .base_x252cy_sft3zxv__856a05b7{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}
|
80
80
|
|
@@ -96,12 +96,12 @@
|
|
96
96
|
|
97
97
|
.base_7436cm_b17chi2r__254eb615{height:var(--plasma-indicator-size);width:var(--plasma-indicator-size);}
|
98
98
|
|
99
|
-
.
|
100
|
-
.
|
101
|
-
.
|
102
|
-
.
|
103
|
-
.
|
104
|
-
.
|
105
|
-
.
|
106
|
-
.
|
99
|
+
.Item_styles_baxa65_s1vls8ri__1ba2f282{--plasma-checkbox-trigger-size:var(--plasma-select-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-select-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--plasma-select-checkbox-fill-color);--plasma-checkbox-icon-color:var(--plasma-select-checkbox-icon-color);--plasma-checkbox-trigger-border-color:var(--plasma-select-checkbox-trigger-border-color);}
|
100
|
+
.Item_styles_baxa65_s1to2lz5__1ba2f282{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-checkbox-fill-color);}
|
101
|
+
.Item_styles_baxa65_s17z4dei__1ba2f282{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
102
|
+
.Item_styles_baxa65_s1nd9idj__1ba2f282{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
103
|
+
.Item_styles_baxa65_dnb2nsj__1ba2f282{line-height:0;color:var(--text-secondary);}.Item_styles_baxa65_dnb2nsj__1ba2f282:hover{color:var(--text-secondary-hover);}
|
104
|
+
.Item_styles_baxa65_i581hb1__1ba2f282{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-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:var(--i581hb1-0);height:var(--i581hb1-0);margin:var(--plasma-select-item-icon-margin);line-height:0;color:var(--plasma-select-checkbox-fill-color);}.Item_styles_baxa65_i581hb1__1ba2f282 .Item_styles_baxa65_selectItemCheckbox__1ba2f282{--plasma-checkbox-trigger-size:var(--i581hb1-1);--plasma-checkbox-trigger-border-radius:var(--i581hb1-2);}
|
105
|
+
.Item_styles_baxa65_scgpql7__1ba2f282{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;color:var(--scgpql7-0);}
|
106
|
+
.Item_styles_baxa65_wzzpzvq__1ba2f282{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;min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wzzpzvq-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background:var(--plasma-colors-transparent);color:var(--text-primary);border-radius:var(--plasma-select-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;}.Item_styles_baxa65_wzzpzvq__1ba2f282:hover:not(.Item_styles_baxa65_dropdownItemIsDisabled__1ba2f282){cursor:pointer;background:var(--surface-transparent-secondary);}.Item_styles_baxa65_wzzpzvq__1ba2f282.Item_styles_baxa65_dropdownItemIsActive__1ba2f282{background:var(--surface-transparent-secondary);}.Item_styles_baxa65_wzzpzvq__1ba2f282.Item_styles_baxa65_dropdownItemIsDisabled__1ba2f282{opacity:0.4;cursor:not-allowed;}.Item_styles_baxa65_wzzpzvq__1ba2f282:focus{outline:none;}.Item_styles_baxa65_wzzpzvq__1ba2f282::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-select-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.Item_styles_baxa65_wzzpzvq__1ba2f282.Item_styles_baxa65_dropdownItemIsFocused__1ba2f282:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
107
107
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import './Item.
|
1
|
+
import './Item.styles_baxa65.css';
|
2
2
|
import { styled } from '@linaria/react';
|
3
3
|
import { tokens } from '../../../../Select.tokens.js';
|
4
4
|
import { component, mergeConfig } from '../../../../../../engines/common.js';
|
@@ -40,19 +40,19 @@ var DisclosureIconWrapper = /*#__PURE__*/styled('div')({
|
|
40
40
|
"class": "dnb2nsj",
|
41
41
|
propsAsIs: false
|
42
42
|
});
|
43
|
-
var
|
43
|
+
var _exp20 = function _exp20() {
|
44
44
|
return function (_ref) {
|
45
45
|
var variant = _ref.variant;
|
46
46
|
return "var(".concat(variant === 'tight' ? tokens.itemIconSizeTight : tokens.itemIconSize, ")");
|
47
47
|
};
|
48
48
|
};
|
49
|
-
var
|
49
|
+
var _exp24 = function _exp24() {
|
50
50
|
return function (_ref2) {
|
51
51
|
var variant = _ref2.variant;
|
52
52
|
return "var(".concat(variant === 'tight' ? tokens.checkboxTriggerSizeTight : tokens.checkboxTriggerSize, ")");
|
53
53
|
};
|
54
54
|
};
|
55
|
-
var
|
55
|
+
var _exp25 = function _exp25() {
|
56
56
|
return function (_ref3) {
|
57
57
|
var variant = _ref3.variant;
|
58
58
|
return "var(".concat(variant === 'tight' ? tokens.checkboxTriggerBorderRadiusTight : tokens.checkboxTriggerBorderRadius, ")");
|
@@ -63,12 +63,12 @@ var IconWrapper = /*#__PURE__*/styled('div')({
|
|
63
63
|
"class": "i581hb1",
|
64
64
|
propsAsIs: false,
|
65
65
|
vars: {
|
66
|
-
"i581hb1-0": [/*#__PURE__*/
|
67
|
-
"i581hb1-1": [/*#__PURE__*/
|
68
|
-
"i581hb1-2": [/*#__PURE__*/
|
66
|
+
"i581hb1-0": [/*#__PURE__*/_exp20()],
|
67
|
+
"i581hb1-1": [/*#__PURE__*/_exp24()],
|
68
|
+
"i581hb1-2": [/*#__PURE__*/_exp25()]
|
69
69
|
}
|
70
70
|
});
|
71
|
-
var
|
71
|
+
var _exp27 = function _exp27() {
|
72
72
|
return function (_ref4) {
|
73
73
|
var color = _ref4.color;
|
74
74
|
return color || 'inherit';
|
@@ -79,10 +79,10 @@ var StyledText = /*#__PURE__*/styled('div')({
|
|
79
79
|
"class": "scgpql7",
|
80
80
|
propsAsIs: false,
|
81
81
|
vars: {
|
82
|
-
"scgpql7-0": [/*#__PURE__*/
|
82
|
+
"scgpql7-0": [/*#__PURE__*/_exp27()]
|
83
83
|
}
|
84
84
|
});
|
85
|
-
var
|
85
|
+
var _exp29 = function _exp29() {
|
86
86
|
return function (_ref5) {
|
87
87
|
var variant = _ref5.variant;
|
88
88
|
return "var(".concat(variant === 'tight' ? tokens.itemPaddingTight : tokens.itemPadding, ")");
|
@@ -93,7 +93,7 @@ var Wrapper = /*#__PURE__*/styled('li')({
|
|
93
93
|
"class": "wzzpzvq",
|
94
94
|
propsAsIs: false,
|
95
95
|
vars: {
|
96
|
-
"wzzpzvq-0": [/*#__PURE__*/
|
96
|
+
"wzzpzvq-0": [/*#__PURE__*/_exp29()]
|
97
97
|
}
|
98
98
|
});
|
99
99
|
var StyledCheckboxWrapper = /*#__PURE__*/styled('span')({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.styles.js","sources":["../../../../../../../src/components/Select/ui/Inner/ui/Item/Item.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens, constants } from '../../../../Select.tokens';\nimport { addFocus, applyEllipsis } from '../../../../../../mixins';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { checkboxConfig, checkboxTokens } from '../../../../../Checkbox';\nimport { indicatorConfig, indicatorTokens } from '../../../../../Indicator';\nimport type { SelectProps } from '../../../../Select.types';\n\nconst mergedCheckboxConfig = mergeConfig(checkboxConfig);\nconst Checkbox = component(mergedCheckboxConfig);\n\nexport const StyledCheckbox = styled(Checkbox)`\n ${checkboxTokens.triggerSize}: var(${tokens.checkboxTriggerSize});\n ${checkboxTokens.triggerBorderRadius}: var(${tokens.checkboxTriggerBorderRadius});\n ${checkboxTokens.fillColor}: var(${tokens.checkboxFillColor});\n ${checkboxTokens.iconColor}: var(${tokens.checkboxIconColor});\n ${checkboxTokens.triggerBorderColor}: var(${tokens.checkboxTriggerBorderColor});\n`;\n\nconst mergedIndicatorConfig = mergeConfig(indicatorConfig);\nconst Indicator = component(mergedIndicatorConfig);\n\nexport const StyledIndicator = styled(Indicator)`\n ${indicatorTokens.size}: var(${tokens.indicatorSize});\n ${indicatorTokens.color}: var(${tokens.checkboxFillColor});\n`;\n\nexport const StyledContentLeft = styled.div`\n display: inline-flex;\n`;\n\nexport const StyledContentRight = styled.div`\n margin-left: auto;\n display: inline-flex;\n`;\n\nexport const DisclosureIconWrapper = styled.div`\n line-height: 0;\n color: var(${
|
1
|
+
{"version":3,"file":"Item.styles.js","sources":["../../../../../../../src/components/Select/ui/Inner/ui/Item/Item.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens, constants } from '../../../../Select.tokens';\nimport { addFocus, applyEllipsis } from '../../../../../../mixins';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { checkboxConfig, checkboxTokens } from '../../../../../Checkbox';\nimport { indicatorConfig, indicatorTokens } from '../../../../../Indicator';\nimport type { SelectProps } from '../../../../Select.types';\n\nconst mergedCheckboxConfig = mergeConfig(checkboxConfig);\nconst Checkbox = component(mergedCheckboxConfig);\n\nexport const StyledCheckbox = styled(Checkbox)`\n ${checkboxTokens.triggerSize}: var(${tokens.checkboxTriggerSize});\n ${checkboxTokens.triggerBorderRadius}: var(${tokens.checkboxTriggerBorderRadius});\n ${checkboxTokens.fillColor}: var(${tokens.checkboxFillColor});\n ${checkboxTokens.iconColor}: var(${tokens.checkboxIconColor});\n ${checkboxTokens.triggerBorderColor}: var(${tokens.checkboxTriggerBorderColor});\n`;\n\nconst mergedIndicatorConfig = mergeConfig(indicatorConfig);\nconst Indicator = component(mergedIndicatorConfig);\n\nexport const StyledIndicator = styled(Indicator)`\n ${indicatorTokens.size}: var(${tokens.indicatorSize});\n ${indicatorTokens.color}: var(${tokens.checkboxFillColor});\n`;\n\nexport const StyledContentLeft = styled.div`\n display: inline-flex;\n`;\n\nexport const StyledContentRight = styled.div`\n margin-left: auto;\n display: inline-flex;\n`;\n\nexport const DisclosureIconWrapper = styled.div`\n line-height: 0;\n color: var(${constants.disclosureIconColor});\n\n &:hover {\n color: var(${constants.disclosureIconColorHover});\n }\n`;\n\nexport const IconWrapper = styled.div<{ variant: SelectProps['variant'] }>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${({ variant }) => `var(${variant === 'tight' ? tokens.itemIconSizeTight : tokens.itemIconSize})`};\n height: ${({ variant }) => `var(${variant === 'tight' ? tokens.itemIconSizeTight : tokens.itemIconSize})`};\n margin: var(${tokens.itemIconMargin});\n line-height: 0;\n color: var(${tokens.checkboxFillColor});\n\n & .${classes.selectItemCheckbox} {\n --plasma-checkbox-trigger-size: ${({ variant }) =>\n `var(${variant === 'tight' ? tokens.checkboxTriggerSizeTight : tokens.checkboxTriggerSize})`};\n --plasma-checkbox-trigger-border-radius: ${({ variant }) =>\n `var(${\n variant === 'tight' ? tokens.checkboxTriggerBorderRadiusTight : tokens.checkboxTriggerBorderRadius\n })`};\n }\n`;\n\nexport const StyledText = styled.div<{ color?: string }>`\n ${applyEllipsis()};\n flex: 1;\n color: ${({ color }) => color || 'inherit'};\n`;\n\nexport const Wrapper = styled.li<{ variant: SelectProps['variant'] }>`\n display: flex;\n align-items: center;\n min-height: var(${tokens.itemHeight});\n margin: 0;\n box-sizing: content-box;\n padding: ${({ variant }) => `var(${variant === 'tight' ? tokens.itemPaddingTight : tokens.itemPadding})`};\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n background: var(${constants.itemBackground});\n color: var(--text-primary);\n border-radius: var(${tokens.itemBorderRadius});\n user-select: none;\n\n &:hover:not(.${classes.dropdownItemIsDisabled}) {\n cursor: pointer;\n background: var(${constants.itemBackgroundHover});\n }\n\n &.${classes.dropdownItemIsActive} {\n background: var(${constants.itemBackgroundHover});\n }\n\n &.${classes.dropdownItemIsDisabled} {\n opacity: ${constants.opacity};\n cursor: not-allowed;\n }\n\n :focus {\n outline: none;\n }\n\n ${addFocus({\n outlineSize: '0.0625rem',\n outlineOffset: '0',\n outlineColor: `var(${constants.focusColor})`,\n outlineRadius: `var(${tokens.itemBorderRadius})`,\n hasTransition: false,\n customFocusRules: `\n &.${classes.dropdownItemIsFocused}:before {\n outline: none;\n box-shadow: 0 0 0 0.0625rem var(${constants.focusColor});\n }\n `,\n })};\n`;\n\nexport const StyledCheckboxWrapper = styled.span``;\n"],"names":["mergedCheckboxConfig","mergeConfig","checkboxConfig","Checkbox","component","_exp","StyledCheckbox","styled","name","class","propsAsIs","mergedIndicatorConfig","indicatorConfig","Indicator","_exp12","StyledIndicator","StyledContentLeft","StyledContentRight","DisclosureIconWrapper","_exp20","_ref","variant","tokens","itemIconSizeTight","itemIconSize","_exp24","_ref2","checkboxTriggerSizeTight","checkboxTriggerSize","_exp25","_ref3","checkboxTriggerBorderRadiusTight","checkboxTriggerBorderRadius","IconWrapper","vars","_exp27","_ref4","color","StyledText","_exp29","_ref5","itemPaddingTight","itemPadding","Wrapper","StyledCheckboxWrapper"],"mappings":";;;;;;AASA,IAAMA,oBAAoB,gBAAGC,WAAW,CAACC,cAAc,CAAC,CAAA;AACxD,IAAMC,QAAQ,gBAAGC,SAAS,CAACJ,oBAAoB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAT/BA,SAS+BA,IAAAA,GAAA;AAAA,EAAA,OAEZF,QAAQ,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMG,cAAc,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAMnC,EAAA;AAED,IAAMC,qBAAqB,gBAAGV,WAAW,CAACW,eAAe,CAAC,CAAA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AA,CAAA;AAHvC,IAAMC,UAAU,gBAAG/B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAwB,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAGnBC,MAAiC,EAAA,CAAA;AAAA,GAAA;AAAA,CAC7C,EAAA;AAAC,IAAAI,MAAA,GArEgBA,SAqEhBA,MAAAA,GAAA;AAAA,EAAA,OAQa,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGnB,OAAAA,GAAAA,KAAAA,CAAAA,OAAAA,CAAAA;AAAAA,IAAAA,OAAAA,MAAAA,CAAAA,MAAAA,CAAqBA,OAAO,KAAK,OAAO,GAAGC,MAAM,CAACmB,gBAAgB,GAAGnB,MAAM,CAACoB,WAAY,EAAA,GAAA,CAAA,CAAA;GAAE,CAAA;AAAA,CAAA,CAAA;AANrG,IAAMC,OAAO,gBAAGpC,MAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,SAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAwB,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAMdK,MAA6F,EAAA,CAAA;AAAA,GAAA;AAAA,CA2C3G,EAAA;AAEM,IAAMK,qBAAqB,gBAAGrC,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,uBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAO;;;;"}
|
package/es/components/Select/ui/Inner/ui/Item/{Item.styles_1gaxu1y.css → Item.styles_baxa65.css}
RENAMED
@@ -2,8 +2,8 @@
|
|
2
2
|
.s1to2lz5{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-checkbox-fill-color);}
|
3
3
|
.s17z4dei{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
4
4
|
.s1nd9idj{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
5
|
-
.dnb2nsj{line-height:0;color:var(--
|
5
|
+
.dnb2nsj{line-height:0;color:var(--text-secondary);}.dnb2nsj:hover{color:var(--text-secondary-hover);}
|
6
6
|
.i581hb1{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-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:var(--i581hb1-0);height:var(--i581hb1-0);margin:var(--plasma-select-item-icon-margin);line-height:0;color:var(--plasma-select-checkbox-fill-color);}.i581hb1 .select-item-checkbox{--plasma-checkbox-trigger-size:var(--i581hb1-1);--plasma-checkbox-trigger-border-radius:var(--i581hb1-2);}
|
7
7
|
.scgpql7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;color:var(--scgpql7-0);}
|
8
|
-
.wzzpzvq{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;min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wzzpzvq-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background:var(--plasma-
|
8
|
+
.wzzpzvq{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;min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wzzpzvq-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background:var(--plasma-colors-transparent);color:var(--text-primary);border-radius:var(--plasma-select-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;}.wzzpzvq:hover:not(.dropdown-item-is-disabled){cursor:pointer;background:var(--surface-transparent-secondary);}.wzzpzvq.dropdown-item-is-active{background:var(--surface-transparent-secondary);}.wzzpzvq.dropdown-item-is-disabled{opacity:0.4;cursor:not-allowed;}.wzzpzvq:focus{outline:none;}.wzzpzvq::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-select-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.wzzpzvq.dropdown-item-is-focused:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
9
9
|
|
@@ -36,7 +36,7 @@ var getLabel = function getLabel(_ref) {
|
|
36
36
|
text: renderValue ? renderValue(valueToItemMap.get(currentValue)) : itemLabel,
|
37
37
|
onClick: function onClick(e) {
|
38
38
|
e.stopPropagation();
|
39
|
-
onChipClick(currentValue);
|
39
|
+
onChipClick(currentValue.toString());
|
40
40
|
},
|
41
41
|
focused: focusedChipIndex === index
|
42
42
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Textfield.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.tsx"],"sourcesContent":["import React from 'react';\n\nimport { cx, isEmpty } from '../../../../../../utils';\nimport { classes } from '../../../../Select.tokens';\nimport { sizeToIconSize } from '../../../../utils';\n\nimport { TextfieldProps, GetTextfieldLabelProps } from './Textfield.types';\nimport { Chip } from './ui';\nimport {\n StyledButton,\n StyledArrow,\n Wrapper,\n ChipWrapper,\n TextfieldWrapper,\n IconArrowWrapper,\n Label,\n Placeholder,\n InnerLabel,\n InnerLabelWrapper,\n ContentLeftWrapper,\n Value,\n} from './Textfield.styles';\n\nconst getLabel = ({\n value,\n isTargetAmount,\n valueToItemMap,\n onChipClick,\n label,\n placeholder,\n focusedChipIndex,\n labelPlacement,\n size,\n renderValue,\n}: GetTextfieldLabelProps) => {\n if (isEmpty(value) && typeof value !== 'number') {\n if (!label || labelPlacement === 'outer') {\n return <Placeholder>{placeholder}</Placeholder>;\n }\n\n return <Label>{label}</Label>;\n }\n\n if (Array.isArray(value) && isTargetAmount) {\n return <Chip text={`Выбрано: ${value.length}`} isTargetAmount={isTargetAmount} />;\n }\n\n if (Array.isArray(value)) {\n return value.map((currentValue, index) => {\n const itemLabel = valueToItemMap.get(currentValue)!.label;\n\n return (\n <Chip\n text={renderValue ? renderValue(valueToItemMap.get(currentValue)!) : itemLabel}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n onChipClick(currentValue);\n }}\n focused={focusedChipIndex === index}\n />\n );\n });\n }\n\n const itemLabel = valueToItemMap.get(value)!.label;\n\n if (!label || labelPlacement === 'outer') {\n return <Value>{renderValue ? renderValue(valueToItemMap.get(value)!) : itemLabel}</Value>;\n }\n\n return (\n <InnerLabelWrapper>\n {size !== 'xs' && <InnerLabel>{label}</InnerLabel>}\n <Value>{renderValue ? renderValue(valueToItemMap.get(value)!) : itemLabel}</Value>\n </InnerLabelWrapper>\n );\n};\n\nexport const Textfield: React.FC<TextfieldProps> = ({\n opened,\n value,\n valueToItemMap,\n onChipClick,\n label,\n placeholder,\n onKeyDown,\n focusedChipIndex,\n labelPlacement,\n size,\n contentLeft,\n disabled,\n renderValue,\n focusedPath,\n focusedToValueMap,\n selectProps,\n}) => {\n const withArrowInverse = opened ? classes.arrowInverse : undefined;\n\n const getActiveDescendant = () => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n return focusedToValueMap?.get(focusedPathAsString)?.value.toString();\n };\n\n return (\n <TextfieldWrapper opened={opened} value={value}>\n <StyledButton\n stretching=\"filled\"\n className={cx(\n classes.textfieldTarget,\n opened || focusedChipIndex !== null ? classes.selectWithoutBoxShadow : undefined,\n )}\n onKeyDown={onKeyDown}\n disabled={disabled}\n role=\"combobox\"\n aria-controls=\"tree_level_1\"\n aria-expanded={opened}\n aria-activedescendant={getActiveDescendant()}\n aria-label={label}\n renderTarget={Boolean(selectProps.renderTarget)}\n >\n <Wrapper>\n {selectProps?.renderTarget ? (\n selectProps.renderTarget(\n Array.isArray(value)\n ? value.map((value) => valueToItemMap.get(value)!)\n : valueToItemMap.get(value)!,\n )\n ) : (\n <>\n {contentLeft && (!selectProps.multiselect || isEmpty(value)) && (\n <ContentLeftWrapper>{contentLeft}</ContentLeftWrapper>\n )}\n\n <ChipWrapper multiselect={selectProps.multiselect} value={value}>\n {getLabel({\n value,\n valueToItemMap,\n onChipClick,\n focusedChipIndex,\n label,\n labelPlacement,\n placeholder,\n isTargetAmount: selectProps.isTargetAmount,\n renderValue,\n size,\n })}\n </ChipWrapper>\n </>\n )}\n\n <IconArrowWrapper>\n <StyledArrow\n size={sizeToIconSize(size)}\n color=\"inherit\"\n className={cx(classes.selectTargetArrow, withArrowInverse)}\n />\n </IconArrowWrapper>\n </Wrapper>\n </StyledButton>\n </TextfieldWrapper>\n );\n};\n"],"names":["getLabel","_ref","value","isTargetAmount","valueToItemMap","onChipClick","label","placeholder","focusedChipIndex","labelPlacement","size","renderValue","isEmpty","React","createElement","Placeholder","Label","Array","isArray","Chip","text","concat","length","map","currentValue","index","itemLabel","get","onClick","e","stopPropagation","focused","Value","InnerLabelWrapper","InnerLabel","Textfield","_ref2","opened","onKeyDown","contentLeft","disabled","focusedPath","focusedToValueMap","selectProps","withArrowInverse","classes","arrowInverse","undefined","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","replace","toString","TextfieldWrapper","StyledButton","stretching","className","cx","textfieldTarget","selectWithoutBoxShadow","role","renderTarget","Boolean","Wrapper","Fragment","multiselect","ContentLeftWrapper","ChipWrapper","IconArrowWrapper","StyledArrow","sizeToIconSize","color","selectTargetArrow"],"mappings":";;;;;;;;AAuBA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAWgB;AAAA,EAAA,IAV1BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IACdC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IACdC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IACXC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,cAAc,GAAAR,IAAA,CAAdQ,cAAc;IACdC,IAAI,GAAAT,IAAA,CAAJS,IAAI;IACJC,WAAW,GAAAV,IAAA,CAAXU,WAAW,CAAA;EAEX,IAAIC,OAAO,CAACV,KAAK,CAAC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;AAC7C,IAAA,IAAI,CAACI,KAAK,IAAIG,cAAc,KAAK,OAAO,EAAE;AACtC,MAAA,oBAAOI,KAAA,CAAAC,aAAA,CAACC,WAAW,EAAA,IAAA,EAAER,WAAyB,CAAC,CAAA;AACnD,KAAA;AAEA,IAAA,oBAAOM,KAAA,CAAAC,aAAA,CAACE,KAAK,EAAA,IAAA,EAAEV,KAAa,CAAC,CAAA;AACjC,GAAA;EAEA,IAAIW,KAAK,CAACC,OAAO,CAAChB,KAAK,CAAC,IAAIC,cAAc,EAAE;AACxC,IAAA,oBAAOU,KAAA,CA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SAAS;AACff,IAAAA,SAAS,EAAEC,EAAE,CAACf,OAAO,CAAC8B,iBAAiB,EAAE/B,gBAAgB,CAAA;AAAE,GAC9D,CACa,CACb,CACC,CACA,CAAC,CAAA;AAE3B;;;;"}
|
1
|
+
{"version":3,"file":"Textfield.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.tsx"],"sourcesContent":["import React from 'react';\n\nimport { cx, isEmpty } from '../../../../../../utils';\nimport { classes } from '../../../../Select.tokens';\nimport { sizeToIconSize } from '../../../../utils';\n\nimport { TextfieldProps, GetTextfieldLabelProps } from './Textfield.types';\nimport { Chip } from './ui';\nimport {\n StyledButton,\n StyledArrow,\n Wrapper,\n ChipWrapper,\n TextfieldWrapper,\n IconArrowWrapper,\n Label,\n Placeholder,\n InnerLabel,\n InnerLabelWrapper,\n ContentLeftWrapper,\n Value,\n} from './Textfield.styles';\n\nconst getLabel = ({\n value,\n isTargetAmount,\n valueToItemMap,\n onChipClick,\n label,\n placeholder,\n focusedChipIndex,\n labelPlacement,\n size,\n renderValue,\n}: GetTextfieldLabelProps) => {\n if (isEmpty(value) && typeof value !== 'number') {\n if (!label || labelPlacement === 'outer') {\n return <Placeholder>{placeholder}</Placeholder>;\n }\n\n return <Label>{label}</Label>;\n }\n\n if (Array.isArray(value) && isTargetAmount) {\n return <Chip text={`Выбрано: ${value.length}`} isTargetAmount={isTargetAmount} />;\n }\n\n if (Array.isArray(value)) {\n return value.map((currentValue, index) => {\n const itemLabel = valueToItemMap.get(currentValue)!.label;\n\n return (\n <Chip\n text={renderValue ? renderValue(valueToItemMap.get(currentValue)!) : itemLabel}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n onChipClick(currentValue.toString());\n }}\n focused={focusedChipIndex === index}\n />\n );\n });\n }\n\n const itemLabel = valueToItemMap.get(value)!.label;\n\n if (!label || labelPlacement === 'outer') {\n return <Value>{renderValue ? renderValue(valueToItemMap.get(value)!) : itemLabel}</Value>;\n }\n\n return (\n <InnerLabelWrapper>\n {size !== 'xs' && <InnerLabel>{label}</InnerLabel>}\n <Value>{renderValue ? renderValue(valueToItemMap.get(value)!) : itemLabel}</Value>\n </InnerLabelWrapper>\n );\n};\n\nexport const Textfield: React.FC<TextfieldProps> = ({\n opened,\n value,\n valueToItemMap,\n onChipClick,\n label,\n placeholder,\n onKeyDown,\n focusedChipIndex,\n labelPlacement,\n size,\n contentLeft,\n disabled,\n renderValue,\n focusedPath,\n focusedToValueMap,\n selectProps,\n}) => {\n const withArrowInverse = opened ? classes.arrowInverse : undefined;\n\n const getActiveDescendant = () => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n return focusedToValueMap?.get(focusedPathAsString)?.value.toString();\n };\n\n return (\n <TextfieldWrapper opened={opened} value={value}>\n <StyledButton\n stretching=\"filled\"\n className={cx(\n classes.textfieldTarget,\n opened || focusedChipIndex !== null ? classes.selectWithoutBoxShadow : undefined,\n )}\n onKeyDown={onKeyDown}\n disabled={disabled}\n role=\"combobox\"\n aria-controls=\"tree_level_1\"\n aria-expanded={opened}\n aria-activedescendant={getActiveDescendant()}\n aria-label={label}\n renderTarget={Boolean(selectProps.renderTarget)}\n >\n <Wrapper>\n {selectProps?.renderTarget ? (\n selectProps.renderTarget(\n Array.isArray(value)\n ? value.map((value) => valueToItemMap.get(value)!)\n : valueToItemMap.get(value)!,\n )\n ) : (\n <>\n {contentLeft && (!selectProps.multiselect || isEmpty(value)) && (\n <ContentLeftWrapper>{contentLeft}</ContentLeftWrapper>\n )}\n\n <ChipWrapper multiselect={selectProps.multiselect} value={value}>\n {getLabel({\n value,\n valueToItemMap,\n onChipClick,\n focusedChipIndex,\n label,\n labelPlacement,\n placeholder,\n isTargetAmount: selectProps.isTargetAmount,\n renderValue,\n size,\n })}\n </ChipWrapper>\n </>\n )}\n\n <IconArrowWrapper>\n <StyledArrow\n size={sizeToIconSize(size)}\n color=\"inherit\"\n className={cx(classes.selectTargetArrow, withArrowInverse)}\n />\n </IconArrowWrapper>\n </Wrapper>\n </StyledButton>\n </TextfieldWrapper>\n );\n};\n"],"names":["getLabel","_ref","value","isTargetAmount","valueToItemMap","onChipClick","label","placeholder","focusedChipIndex","labelPlacement","size","renderValue","isEmpty","React","createElement","Placeholder","Label","Array","isArray","Chip","text","concat","length","map","currentValue","index","itemLabel","get","onClick","e","stopPropagation","toString","focused","Value","InnerLabelWrapper","InnerLabel","Textfield","_ref2","opened","onKeyDown","contentLeft","disabled","focusedPath","focusedToValueMap","selectProps","withArrowInverse","classes","arrowInverse","undefined","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","replace","TextfieldWrapper","StyledButton","stretching","className","cx","textfieldTarget","selectWithoutBoxShadow","role","renderTarget","Boolean","Wrapper","Fragment","multiselect","ContentLeftWrapper","ChipWrapper","IconArrowWrapper","StyledArrow","sizeToIconSize","color","selectTargetArrow"],"mappings":";;;;;;;;AAuBA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAWgB;AAAA,EAAA,IAV1BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IACdC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IACdC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IACXC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,cAAc,GAAAR,IAAA,CAAdQ,cAAc;IACdC,IAAI,GAAAT,IAAA,CAAJS,IAAI;IACJC,WAAW,GAAAV,IAAA,CAAXU,WAAW,CAAA;EAEX,IAAIC,OAAO,CAACV,KAAK,CAAC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;AAC7C,IAAA,IAAI,CAACI,KAAK,IAAIG,cAAc,KAAK,OAAO,EAAE;AACtC,MAAA,oBAAOI,KAA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W,CAACzC,cAAc;AAC1CQ,IAAAA,WAAW,EAAXA,WAAW;AACXD,IAAAA,IAAI,EAAJA,IAAAA;AACJ,GAAC,CACQ,CACf,CACL,eAEDG,KAAA,CAAAC,aAAA,CAACyD,gBAAgB,EACb1D,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAAC0D,WAAW,EAAA;AACR9D,IAAAA,IAAI,EAAE+D,cAAc,CAAC/D,IAAI,CAAE;AAC3BgE,IAAAA,KAAK,EAAC,SAAS;AACff,IAAAA,SAAS,EAAEC,EAAE,CAACd,OAAO,CAAC6B,iBAAiB,EAAE9B,gBAAgB,CAAA;AAAE,GAC9D,CACa,CACb,CACC,CACA,CAAC,CAAA;AAE3B;;;;"}
|
@@ -82,7 +82,7 @@ var _exp47 = function _exp47() {
|
|
82
82
|
return function (_ref6) {
|
83
83
|
var multiselect = _ref6.multiselect,
|
84
84
|
value = _ref6.value;
|
85
|
-
return "calc(".concat(constants.focusSize, " + ").concat(multiselect && value && value.length > 0 ? "var(".concat(tokens.focusOffset, ")") : 0, ")");
|
85
|
+
return "calc(".concat(constants.focusSize, " + ").concat(multiselect && value && value.toString().length > 0 ? "var(".concat(tokens.focusOffset, ")") : 0, ")");
|
86
86
|
};
|
87
87
|
};
|
88
88
|
var ChipWrapper = /*#__PURE__*/styled('div')({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Textfield.styles.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { isEmpty } from '../../../../../../utils';\nimport { applyEllipsis, addFocus } from '../../../../../../mixins';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../../../Button';\nimport { tokens, classes, constants } from '../../../../Select.tokens';\nimport type { SelectProps } from '../../../../Select.types';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const TextfieldWrapper = styled.div<{ opened: boolean; value: SelectProps['value'] }>`\n display: inline;\n\n .${classes.textfieldTarget} {\n transition: 100ms;\n background: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBackgroundColorOpened})`\n : `var(${tokens.targetTextfieldBackgroundColor})`};\n padding: ${({ value }) =>\n Array.isArray(value) && !isEmpty(value)\n ? `0 var(${tokens.targetTextfieldChipPadding})`\n : `0 var(${tokens.targetTextfieldPadding})`};\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColor})`};\n }\n\n .${classes.textfieldTarget}:hover {\n transition: 100ms;\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColorHover})`};\n }\n\n .${classes.selectWithoutBoxShadow}::before {\n box-shadow: none !important;\n }\n`;\n\nexport const StyledButton = styled(Button)<{ renderTarget: boolean }>`\n ${buttonTokens.buttonColor}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorHover}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorActive}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonHeight}: ${({ renderTarget }) => (renderTarget ? 'auto' : `var(${tokens.targetHeight})`)};\n ${buttonTokens.buttonWidth}: 100%;\n ${buttonTokens.buttonPadding}: var(${tokens.targetTextfieldPadding});\n ${buttonTokens.buttonRadius}: var(${tokens.borderRadius});\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.fontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n ${buttonTokens.buttonDisabledOpacity}: ${constants.opacity};\n ${buttonTokens.buttonFocusColor}: var(${constants.focusColor});\n box-shadow: inset 0 0 0 ${tokens.targetTextfieldBorderSize} var(${tokens.targetTextfieldBorderColor});\n text-align: left;\n\n ${addFocus({\n outlineOffset: tokens.targetTextfieldBorderSize,\n outlineSize: constants.focusSize,\n outlineRadius: `calc(var(${tokens.borderRadius}) - ${tokens.targetTextfieldBorderSize})`,\n outlineColor: `var(${constants.focusColor})`,\n })}\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n\nexport const IconArrowWrapper = styled.div`\n line-height: 0;\n margin: var(${tokens.targetTextfieldArrowMargin});\n color: var(${tokens.targetTextfieldArrowColor});\n\n &:hover {\n color: var(${tokens.targetTextfieldArrowColorHover});\n }\n\n &:active {\n color: var(${tokens.targetTextfieldArrowColorActive});\n }\n`;\n\nexport const Wrapper = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n`;\n\nexport const ChipWrapper = styled.div<{ multiselect: SelectProps['multiselect']; value: SelectProps['value'] }>`\n width: 100%;\n display: flex;\n min-width: 0;\n padding: ${({ multiselect, value }) =>\n `calc(${constants.focusSize} + ${\n multiselect && value && value.length > 0 ? `var(${tokens.focusOffset})` : 0\n })`};\n gap: 0.25rem;\n overflow-x: scroll;\n border-top-right-radius: var(${tokens.chipBorderRadius});\n border-bottom-right-radius: var(${tokens.chipBorderRadius});\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const Label = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const Placeholder = styled.div`\n color: var(${constants.textfieldPlaceholderColor});\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabelWrapper = styled.div`\n display: flex;\n flex-direction: column;\n align-items: start;\n row-gap: var(${tokens.innerLabelGap});\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabel = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\n font-family: var(${constants.fontFamily});\n font-size: var(${constants.fontSize});\n font-style: var(${constants.fontStyle});\n font-weight: var(${constants.fontWeight});\n letter-spacing: var(${constants.fontLetterSpacing});\n line-height: var(${constants.fontLineHeight});\n text-align: left;\n`;\n\nexport const ContentLeftWrapper = styled.div`\n flex: none;\n margin-left: -0.125rem;\n margin-right: 0.375rem;\n line-height: 0;\n`;\n\nexport const Value = styled.span`\n ${applyEllipsis()}\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp2","_ref","opened","concat","tokens","targetTextfieldBackgroundColorOpened","targetTextfieldBackgroundColor","_exp3","_ref2","value","Array","isArray","isEmpty","targetTextfieldChipPadding","targetTextfieldPadding","_exp4","_ref3","targetTextfieldBorderSize","targetTextfieldBorderOpenedColor","targetTextfieldBorderColor","_exp6","_ref4","targetTextfieldBorderColorHover","TextfieldWrapper","styled","name","class","propsAsIs","vars","_exp8","_exp16","_ref5","renderTarget","targetHeight","StyledButton","_exp41","IconDisclosureDownCentered","StyledArrow","IconArrowWrapper","Wrapper","_exp47","_ref6","multiselect","constants","focusSize","length","focusOffset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AAAA,SAAA,EAAA,KAAA;AAAA,CAWtC,EAAA;AAEM,IAAMwB,UAAU,gBAAG3B,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAS/B,EAAA;AAEM,IAAMyB,kBAAkB,gBAAG5B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKvC,EAAA;AAEM,IAAM0B,KAAK,gBAAG7B,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE1B;;;;"}
|
1
|
+
{"version":3,"file":"Textfield.styles.js","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { isEmpty } from '../../../../../../utils';\nimport { applyEllipsis, addFocus } from '../../../../../../mixins';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../../../Button';\nimport { tokens, classes, constants } from '../../../../Select.tokens';\nimport type { MergedSelectProps } from '../../../../Select.types';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const TextfieldWrapper = styled.div<{ opened: boolean; value: MergedSelectProps['value'] }>`\n display: inline;\n\n .${classes.textfieldTarget} {\n transition: 100ms;\n background: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBackgroundColorOpened})`\n : `var(${tokens.targetTextfieldBackgroundColor})`};\n padding: ${({ value }) =>\n Array.isArray(value) && !isEmpty(value)\n ? `0 var(${tokens.targetTextfieldChipPadding})`\n : `0 var(${tokens.targetTextfieldPadding})`};\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColor})`};\n }\n\n .${classes.textfieldTarget}:hover {\n transition: 100ms;\n border: ${({ opened }) =>\n opened\n ? `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderOpenedColor})`\n : `var(${tokens.targetTextfieldBorderSize}) solid var(${tokens.targetTextfieldBorderColorHover})`};\n }\n\n .${classes.selectWithoutBoxShadow}::before {\n box-shadow: none !important;\n }\n`;\n\nexport const StyledButton = styled(Button)<{ renderTarget: boolean }>`\n ${buttonTokens.buttonColor}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorHover}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonColorActive}: var(${constants.textfieldTargetColor});\n ${buttonTokens.buttonHeight}: ${({ renderTarget }) => (renderTarget ? 'auto' : `var(${tokens.targetHeight})`)};\n ${buttonTokens.buttonWidth}: 100%;\n ${buttonTokens.buttonPadding}: var(${tokens.targetTextfieldPadding});\n ${buttonTokens.buttonRadius}: var(${tokens.borderRadius});\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.fontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n ${buttonTokens.buttonDisabledOpacity}: ${constants.opacity};\n ${buttonTokens.buttonFocusColor}: var(${constants.focusColor});\n box-shadow: inset 0 0 0 ${tokens.targetTextfieldBorderSize} var(${tokens.targetTextfieldBorderColor});\n text-align: left;\n\n ${addFocus({\n outlineOffset: tokens.targetTextfieldBorderSize,\n outlineSize: constants.focusSize,\n outlineRadius: `calc(var(${tokens.borderRadius}) - ${tokens.targetTextfieldBorderSize})`,\n outlineColor: `var(${constants.focusColor})`,\n })}\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n\nexport const IconArrowWrapper = styled.div`\n line-height: 0;\n margin: var(${tokens.targetTextfieldArrowMargin});\n color: var(${tokens.targetTextfieldArrowColor});\n\n &:hover {\n color: var(${tokens.targetTextfieldArrowColorHover});\n }\n\n &:active {\n color: var(${tokens.targetTextfieldArrowColorActive});\n }\n`;\n\nexport const Wrapper = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n`;\n\nexport const ChipWrapper = styled.div<{\n multiselect: MergedSelectProps['multiselect'];\n value: MergedSelectProps['value'];\n}>`\n width: 100%;\n display: flex;\n min-width: 0;\n padding: ${({ multiselect, value }) =>\n `calc(${constants.focusSize} + ${\n multiselect && value && value.toString().length > 0 ? `var(${tokens.focusOffset})` : 0\n })`};\n gap: 0.25rem;\n overflow-x: scroll;\n border-top-right-radius: var(${tokens.chipBorderRadius});\n border-bottom-right-radius: var(${tokens.chipBorderRadius});\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const Label = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const Placeholder = styled.div`\n color: var(${constants.textfieldPlaceholderColor});\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabelWrapper = styled.div`\n display: flex;\n flex-direction: column;\n align-items: start;\n row-gap: var(${tokens.innerLabelGap});\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const InnerLabel = styled.label`\n color: var(${constants.textfieldInnerLabelColor});\n font-family: var(${constants.fontFamily});\n font-size: var(${constants.fontSize});\n font-style: var(${constants.fontStyle});\n font-weight: var(${constants.fontWeight});\n letter-spacing: var(${constants.fontLetterSpacing});\n line-height: var(${constants.fontLineHeight});\n text-align: left;\n`;\n\nexport const ContentLeftWrapper = styled.div`\n flex: none;\n margin-left: -0.125rem;\n margin-right: 0.375rem;\n line-height: 0;\n`;\n\nexport const Value = styled.span`\n ${applyEllipsis()}\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp2","_ref","opened","concat","tokens","targetTextfieldBackgroundColorOpened","targetTextfieldBackgroundColor","_exp3","_ref2","value","Array","isArray","isEmpty","targetTextfieldChipPadding","targetTextfieldPadding","_exp4","_ref3","targetTextfieldBorderSize","targetTextfieldBorderOpenedColor","targetTextfieldBorderColor","_exp6","_ref4","targetTextfieldBorderColorHover","TextfieldWrapper","styled","name","class","propsAsIs","vars","_exp8","_exp16","_ref5","renderTarget","targetHeight","StyledButton","_exp41","IconDisclosureDownCentered","StyledArrow","IconArrowWrapper","Wrapper","_exp47","_ref6","multiselect","constants","focusSize","toString","length","focusOffset","ChipWrapper","Label","Placeholder","InnerLabelWrapper","InnerLabel","ContentLeftWrapper","Value"],"mappings":";;;;;;;AAUA,IAAMA,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,KAAA,GAV3BA,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AA,EAAA,KAAA;AAAA,CAS/B,EAAA;AAEM,IAAM0B,kBAAkB,gBAAG7B,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,oBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKvC,EAAA;AAEM,IAAM2B,KAAK,gBAAG9B,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE1B;;;;"}
|
@@ -18,7 +18,7 @@ var getButtonLabel = function getButtonLabel(_ref3) {
|
|
18
18
|
return label || '';
|
19
19
|
}
|
20
20
|
if (selectProps.multiselect && selectProps.isTargetAmount) {
|
21
|
-
return "\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ".concat(value.length);
|
21
|
+
return "\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ".concat(value.toString().length);
|
22
22
|
}
|
23
23
|
if (selectProps.multiselect && Array.isArray(value)) {
|
24
24
|
return value === null || value === void 0 ? void 0 : value.map(function (itemValue) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getButtonLabel.js","sources":["../../../../src/components/Select/utils/getButtonLabel.ts"],"sourcesContent":["import { GetButtonLabelProps } from '../ui/Target/ui/Button/Button.types';\nimport { isEmpty } from '../../../utils';\n\nconst getLabel = ({\n value,\n valueToItemMap,\n renderValue,\n}: Omit<GetButtonLabelProps, 'label' | 'selectProps' | 'value'> & { value: any }): string => {\n const { label } = valueToItemMap.get(value)!;\n\n return renderValue ? renderValue(valueToItemMap.get(value)!) : label;\n};\n\nexport const getButtonLabel = ({\n value,\n valueToItemMap,\n label,\n renderValue,\n selectProps,\n}: GetButtonLabelProps): string => {\n if (isEmpty(value) && typeof value !== 'number') {\n return label || '';\n }\n\n if (selectProps.multiselect && selectProps.isTargetAmount) {\n return `Выбрано: ${value.length}`;\n }\n\n if (selectProps.multiselect && Array.isArray(value)) {\n return value\n ?.map((itemValue) =>\n getLabel({\n value: itemValue,\n valueToItemMap,\n renderValue,\n }),\n )\n .join(', ');\n }\n\n return getLabel({\n value,\n valueToItemMap,\n renderValue,\n });\n};\n"],"names":["getLabel","_ref","value","valueToItemMap","renderValue","_ref2","get","label","getButtonLabel","_ref3","selectProps","isEmpty","multiselect","isTargetAmount","concat","length","Array","isArray","map","itemValue","join"],"mappings":";;AAGA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAI+E;AAAA,EAAA,IAHzFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IACdC,WAAW,GAAAH,IAAA,CAAXG,WAAW,CAAA;AAEX,EAAA,IAAAC,KAAA,GAAkBF,cAAc,CAACG,GAAG,CAACJ,KAAK,CAAC;IAAnCK,KAAK,GAAAF,KAAA,CAALE,KAAK,CAAA;AAEb,EAAA,OAAOH,WAAW,GAAGA,WAAW,CAACD,cAAc,CAACG,GAAG,CAACJ,KAAK,CAAE,CAAC,GAAGK,KAAK,CAAA;AACxE,CAAC,CAAA;IAEYC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,KAAA,EAMQ;AAAA,EAAA,IAL/BP,KAAK,GAAAO,KAAA,CAALP,KAAK;IACLC,cAAc,GAAAM,KAAA,CAAdN,cAAc;IACdI,KAAK,GAAAE,KAAA,CAALF,KAAK;IACLH,WAAW,GAAAK,KAAA,CAAXL,WAAW;IACXM,WAAW,GAAAD,KAAA,CAAXC,WAAW,CAAA;EAEX,IAAIC,OAAO,CAACT,KAAK,CAAC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7C,OAAOK,KAAK,IAAI,EAAE,CAAA;AACtB,GAAA;AAEA,EAAA,IAAIG,WAAW,CAACE,WAAW,IAAIF,WAAW,CAACG,cAAc,EAAE;
|
1
|
+
{"version":3,"file":"getButtonLabel.js","sources":["../../../../src/components/Select/utils/getButtonLabel.ts"],"sourcesContent":["import { GetButtonLabelProps } from '../ui/Target/ui/Button/Button.types';\nimport { isEmpty } from '../../../utils';\n\nconst getLabel = ({\n value,\n valueToItemMap,\n renderValue,\n}: Omit<GetButtonLabelProps, 'label' | 'selectProps' | 'value'> & { value: any }): string => {\n const { label } = valueToItemMap.get(value)!;\n\n return renderValue ? renderValue(valueToItemMap.get(value)!) : label;\n};\n\nexport const getButtonLabel = ({\n value,\n valueToItemMap,\n label,\n renderValue,\n selectProps,\n}: GetButtonLabelProps): string => {\n if (isEmpty(value) && typeof value !== 'number') {\n return label || '';\n }\n\n if (selectProps.multiselect && selectProps.isTargetAmount) {\n return `Выбрано: ${value.toString().length}`;\n }\n\n if (selectProps.multiselect && Array.isArray(value)) {\n return value\n ?.map((itemValue) =>\n getLabel({\n value: itemValue,\n valueToItemMap,\n renderValue,\n }),\n )\n .join(', ');\n }\n\n return getLabel({\n value,\n valueToItemMap,\n renderValue,\n });\n};\n"],"names":["getLabel","_ref","value","valueToItemMap","renderValue","_ref2","get","label","getButtonLabel","_ref3","selectProps","isEmpty","multiselect","isTargetAmount","concat","toString","length","Array","isArray","map","itemValue","join"],"mappings":";;AAGA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAI+E;AAAA,EAAA,IAHzFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IACdC,WAAW,GAAAH,IAAA,CAAXG,WAAW,CAAA;AAEX,EAAA,IAAAC,KAAA,GAAkBF,cAAc,CAACG,GAAG,CAACJ,KAAK,CAAC;IAAnCK,KAAK,GAAAF,KAAA,CAALE,KAAK,CAAA;AAEb,EAAA,OAAOH,WAAW,GAAGA,WAAW,CAACD,cAAc,CAACG,GAAG,CAACJ,KAAK,CAAE,CAAC,GAAGK,KAAK,CAAA;AACxE,CAAC,CAAA;IAEYC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,KAAA,EAMQ;AAAA,EAAA,IAL/BP,KAAK,GAAAO,KAAA,CAALP,KAAK;IACLC,cAAc,GAAAM,KAAA,CAAdN,cAAc;IACdI,KAAK,GAAAE,KAAA,CAALF,KAAK;IACLH,WAAW,GAAAK,KAAA,CAAXL,WAAW;IACXM,WAAW,GAAAD,KAAA,CAAXC,WAAW,CAAA;EAEX,IAAIC,OAAO,CAACT,KAAK,CAAC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7C,OAAOK,KAAK,IAAI,EAAE,CAAA;AACtB,GAAA;AAEA,EAAA,IAAIG,WAAW,CAACE,WAAW,IAAIF,WAAW,CAACG,cAAc,EAAE;IACvD,OAAAC,8CAAAA,CAAAA,MAAA,CAAmBZ,KAAK,CAACa,QAAQ,EAAE,CAACC,MAAM,CAAA,CAAA;AAC9C,GAAA;EAEA,IAAIN,WAAW,CAACE,WAAW,IAAIK,KAAK,CAACC,OAAO,CAAChB,KAAK,CAAC,EAAE;IACjD,OAAOA,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CACNiB,GAAG,CAAC,UAACC,SAAS,EAAA;AAAA,MAAA,OACZpB,QAAQ,CAAC;AACLE,QAAAA,KAAK,EAAEkB,SAAS;AAChBjB,QAAAA,cAAc,EAAdA,cAAc;AACdC,QAAAA,WAAW,EAAXA,WAAAA;AACJ,OAAC,CAAC,CAAA;AAAA,KACN,CAAC,CACAiB,IAAI,CAAC,IAAI,CAAC,CAAA;AACnB,GAAA;AAEA,EAAA,OAAOrB,QAAQ,CAAC;AACZE,IAAAA,KAAK,EAALA,KAAK;AACLC,IAAAA,cAAc,EAAdA,cAAc;AACdC,IAAAA,WAAW,EAAXA,WAAAA;AACJ,GAAC,CAAC,CAAA;AACN;;;;"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
// Утилита предназначена для фильтрации элементов в value, которые отсутствуют в items.
|
2
|
+
// Эти элементы игнорируются и не участвуют в дальнейшей работе компонента.
|
3
|
+
var getInitialValue = function getInitialValue(outerValue, valueToItemMap) {
|
4
|
+
if (Array.isArray(outerValue)) {
|
5
|
+
if (outerValue.length === 0) {
|
6
|
+
return [];
|
7
|
+
}
|
8
|
+
var updatedValue = [];
|
9
|
+
outerValue.forEach(function (value) {
|
10
|
+
if (valueToItemMap.has(value)) {
|
11
|
+
updatedValue.push(value);
|
12
|
+
}
|
13
|
+
});
|
14
|
+
return updatedValue;
|
15
|
+
}
|
16
|
+
if (valueToItemMap.has(outerValue)) {
|
17
|
+
return outerValue;
|
18
|
+
}
|
19
|
+
return '';
|
20
|
+
};
|
21
|
+
|
22
|
+
export { getInitialValue };
|
23
|
+
//# sourceMappingURL=getInitialValue.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getInitialValue.js","sources":["../../../../src/components/Select/utils/getInitialValue.ts"],"sourcesContent":["import { MergedSelectProps } from '../Select.types';\nimport { ValueToItemMapType } from '../hooks/usePathMaps';\n\n// Утилита предназначена для фильтрации элементов в value, которые отсутствуют в items.\n// Эти элементы игнорируются и не участвуют в дальнейшей работе компонента.\nexport const getInitialValue = (outerValue: MergedSelectProps['value'], valueToItemMap: ValueToItemMapType) => {\n if (Array.isArray(outerValue)) {\n if (outerValue.length === 0) {\n return [];\n }\n\n const updatedValue: Array<string | number> = [];\n\n outerValue.forEach((value) => {\n if (valueToItemMap.has(value)) {\n updatedValue.push(value);\n }\n });\n\n return updatedValue;\n }\n\n if (valueToItemMap.has(outerValue)) {\n return outerValue;\n }\n\n return '';\n};\n"],"names":["getInitialValue","outerValue","valueToItemMap","Array","isArray","length","updatedValue","forEach","value","has","push"],"mappings":"AAGA;AACA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,UAAsC,EAAEC,cAAkC,EAAK;AAC3G,EAAA,IAAIC,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;AAC3B,IAAA,IAAIA,UAAU,CAACI,MAAM,KAAK,CAAC,EAAE;AACzB,MAAA,OAAO,EAAE,CAAA;AACb,KAAA;IAEA,IAAMC,YAAoC,GAAG,EAAE,CAAA;AAE/CL,IAAAA,UAAU,CAACM,OAAO,CAAC,UAACC,KAAK,EAAK;AAC1B,MAAA,IAAIN,cAAc,CAACO,GAAG,CAACD,KAAK,CAAC,EAAE;AAC3BF,QAAAA,YAAY,CAACI,IAAI,CAACF,KAAK,CAAC,CAAA;AAC5B,OAAA;AACJ,KAAC,CAAC,CAAA;AAEF,IAAA,OAAOF,YAAY,CAAA;AACvB,GAAA;AAEA,EAAA,IAAIJ,cAAc,CAACO,GAAG,CAACR,UAAU,CAAC,EAAE;AAChC,IAAA,OAAOA,UAAU,CAAA;AACrB,GAAA;AAEA,EAAA,OAAO,EAAE,CAAA;AACb;;;;"}
|
@@ -1,14 +1,18 @@
|
|
1
|
+
import { toConsumableArray as _toConsumableArray, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
+
|
1
3
|
// Проходимся по массиву items и добавляем в каждый item ключ parent, который ссылается на item родителя.
|
2
4
|
// Дает возможность прохода к корневому элементу (снизу вверх).
|
3
|
-
|
5
|
+
// На выходе получаем глубокую копию исходного массива items.
|
4
6
|
var initialItemsTransform = function initialItemsTransform(items, parent) {
|
5
|
-
|
6
|
-
|
7
|
+
var newItems = _toConsumableArray(items);
|
8
|
+
newItems.forEach(function (item) {
|
9
|
+
var newItem = _objectSpread2({}, item);
|
10
|
+
newItem.parent = parent;
|
7
11
|
if (item.items) {
|
8
12
|
item.items = initialItemsTransform(item.items, item);
|
9
13
|
}
|
10
14
|
});
|
11
|
-
return
|
15
|
+
return newItems;
|
12
16
|
};
|
13
17
|
|
14
18
|
export { initialItemsTransform };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"initialItemsTransform.js","sources":["../../../../src/components/Select/utils/initialItemsTransform.ts"],"sourcesContent":["import { MergedDropdownNodeTransformed } from '../ui/Inner/ui/Item/Item.types';\n\n// Проходимся по массиву items и добавляем в каждый item ключ parent, который ссылается на item родителя.\n// Дает возможность прохода к корневому элементу (снизу вверх).\n
|
1
|
+
{"version":3,"file":"initialItemsTransform.js","sources":["../../../../src/components/Select/utils/initialItemsTransform.ts"],"sourcesContent":["import { MergedDropdownNodeTransformed } from '../ui/Inner/ui/Item/Item.types';\n\n// Проходимся по массиву items и добавляем в каждый item ключ parent, который ссылается на item родителя.\n// Дает возможность прохода к корневому элементу (снизу вверх).\n// На выходе получаем глубокую копию исходного массива items.\nexport const initialItemsTransform = (\n items: Array<MergedDropdownNodeTransformed>,\n parent?: MergedDropdownNodeTransformed,\n): Array<MergedDropdownNodeTransformed> => {\n const newItems = [...items];\n\n newItems.forEach((item) => {\n const newItem = { ...item };\n\n newItem.parent = parent;\n\n if (item.items) {\n item.items = initialItemsTransform(item.items, item);\n }\n });\n\n return newItems;\n};\n"],"names":["initialItemsTransform","items","parent","newItems","_toConsumableArray","forEach","item","newItem","_objectSpread"],"mappings":";;AAEA;AACA;AACA;AACO,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAC9BC,KAA2C,EAC3CC,MAAsC,EACC;AACvC,EAAA,IAAMC,QAAQ,GAAAC,kBAAA,CAAOH,KAAK,CAAC,CAAA;AAE3BE,EAAAA,QAAQ,CAACE,OAAO,CAAC,UAACC,IAAI,EAAK;AACvB,IAAA,IAAMC,OAAO,GAAAC,cAAA,CAAA,EAAA,EAAQF,IAAI,CAAE,CAAA;IAE3BC,OAAO,CAACL,MAAM,GAAGA,MAAM,CAAA;IAEvB,IAAII,IAAI,CAACL,KAAK,EAAE;MACZK,IAAI,CAACL,KAAK,GAAGD,qBAAqB,CAACM,IAAI,CAACL,KAAK,EAAEK,IAAI,CAAC,CAAA;AACxD,KAAA;AACJ,GAAC,CAAC,CAAA;AAEF,EAAA,OAAOH,QAAQ,CAAA;AACnB;;;;"}
|