@salutejs/plasma-new-hope 0.174.0-canary.1504.11477432639.0 → 0.174.0-canary.1505.11483510462.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/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/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/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/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/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/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
@@ -78,14 +78,14 @@
|
|
78
78
|
|
79
79
|
.base_7436cm_b17chi2r__254eb615{height:var(--plasma-indicator-size);width:var(--plasma-indicator-size);}
|
80
80
|
|
81
|
-
.
|
82
|
-
.
|
83
|
-
.
|
84
|
-
.
|
85
|
-
.
|
86
|
-
.
|
87
|
-
.
|
88
|
-
.
|
81
|
+
.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);}
|
82
|
+
.Item_styles_baxa65_s1to2lz5__1ba2f282{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-checkbox-fill-color);}
|
83
|
+
.Item_styles_baxa65_s17z4dei__1ba2f282{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
84
|
+
.Item_styles_baxa65_s1nd9idj__1ba2f282{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
85
|
+
.Item_styles_baxa65_dnb2nsj__1ba2f282{line-height:0;color:var(--text-secondary);}.Item_styles_baxa65_dnb2nsj__1ba2f282:hover{color:var(--text-secondary-hover);}
|
86
|
+
.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);}
|
87
|
+
.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);}
|
88
|
+
.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);}
|
89
89
|
|
90
90
|
|
91
91
|
.Button_styles_lxxm4p_sfn0xs0__70a12c1a{--plasma-button-color:var(--plasma-select-target-button-color);--plasma-button-color-hover:var(--plasma-select-target-button-color-hover);--plasma-button-color-active:var(--plasma-select-target-button-color-active);--plasma-button-background-color:var(--plasma-select-target-button-background-color);--plasma-button-background-color-hover:var(--plasma-select-target-button-background-color-hover);--plasma-button-background-color-active:var(--plasma-select-target-button-background-color-active);--plasma-button-right-content-margin:var(--plasma-select-target-button-arrow-margin);--plasma-button-height:var(--sfn0xs0-0);--plasma-button-width:100%;--plasma-button-padding:var(--plasma-select-target-button-padding);--plasma-button-radius:var(--plasma-select-border-radius);--plasma-button-font-family:var(--plasma-select-font-family);--plasma-button-font-size:var(--plasma-select-font-size);--plasma-button-font-style:var(--plasma-select-font-style);--plasma-button-font-weight:600;--plasma-button-letter-spacing:var(--plasma-select-font-letter-spacing);--plasma-button-line-height:var(--plasma-select-font-line-height);--plasma-button-disabled-opacity:0.4;--plasma-button-focus-color:var(--surface-accent);text-align:left;}
|
@@ -132,11 +132,11 @@
|
|
132
132
|
.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);}
|
133
133
|
.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;}
|
134
134
|
|
135
|
-
.
|
136
|
-
.
|
137
|
-
.
|
138
|
-
.
|
139
|
-
.
|
135
|
+
.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%;}
|
136
|
+
.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);}
|
137
|
+
.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverWrapper__beedd761,.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverTarget__beedd761{display:block;}
|
138
|
+
.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);}
|
139
|
+
.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);}
|
140
140
|
|
141
141
|
.PaginationSelectPerPage_styles_187mk6b_s1e57mfu__a3b3456a{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;gap:0.5rem;}
|
142
142
|
.PaginationSelectPerPage_styles_187mk6b_s5dck5y__a3b3456a{--plasma-select-target-button-color:var(--plasma-pagination-button-color);--plasma-select-target-button-color-hover:var(--plasma-pagination-button-color-hover);--plasma-select-target-button-color-active:var(--plasma-pagination-button-color-active);--plasma-select-target-button-background-color:var(--plasma-pagination-button-bg-color);--plasma-select-target-button-background-color-hover:var(--plasma-pagination-button-bg-color-hover);--plasma-select-target-button-background-color-active:var(--plasma-pagination-button-bg-color-active);--plasma-select-target-height:var(--plasma-pagination-button-height);--plasma-select-target-button-padding:var(--plasma-pagination-select-target-padding);--plasma-select-border-radius:var(--plasma-pagination-button-radius);--plasma-select-target-button-arrow-color:var(--plasma-pagination--button-arrow-color);--plasma-select-target-button-arrow-color-hover:var(--plasma-pagination--button-arrow-color-hover);--plasma-select-target-button-arrow-color-active:var(--plasma-pagination--button-arrow-color-active);--plasma-select-target-button-arrow-margin:var(--plasma-pagination--button-arrow-margin);--plasma-select-padding:0.125rem;--plasma-select-focus-offset:0.125rem;--plasma-select-item-padding:var(--plasma-pagination-select-item-padding);--plasma-select-item-border-radius:calc(var(--plasma-pagination-button-radius) - 0.125rem);--plasma-select-item-icon-margin:0 0.375rem 0 0;--plasma-select-item-icon-size:1.5rem;--plasma-select-item-height:var(--plasma-pagination-select-item-height);}
|
@@ -20,14 +20,14 @@
|
|
20
20
|
|
21
21
|
.base_7436cm_b17chi2r__254eb615{height:var(--plasma-indicator-size);width:var(--plasma-indicator-size);}
|
22
22
|
|
23
|
-
.
|
24
|
-
.
|
25
|
-
.
|
26
|
-
.
|
27
|
-
.
|
28
|
-
.
|
29
|
-
.
|
30
|
-
.
|
23
|
+
.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);}
|
24
|
+
.Item_styles_baxa65_s1to2lz5__1ba2f282{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-checkbox-fill-color);}
|
25
|
+
.Item_styles_baxa65_s17z4dei__1ba2f282{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
26
|
+
.Item_styles_baxa65_s1nd9idj__1ba2f282{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
27
|
+
.Item_styles_baxa65_dnb2nsj__1ba2f282{line-height:0;color:var(--text-secondary);}.Item_styles_baxa65_dnb2nsj__1ba2f282:hover{color:var(--text-secondary-hover);}
|
28
|
+
.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);}
|
29
|
+
.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);}
|
30
|
+
.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);}
|
31
31
|
|
32
32
|
|
33
33
|
.base_1x0spnh_b1ty39ru__fb659d61{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_1x0spnh_b1ty39ru__fb659d61.base_1x0spnh_buttonLoading__fb659d61{background-color:var(--plasma-button-loading-background-color);}.base_1x0spnh_b1ty39ru__fb659d61:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_1x0spnh_b1ty39ru__fb659d61:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
|
@@ -100,11 +100,11 @@
|
|
100
100
|
.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);}
|
101
101
|
.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;}
|
102
102
|
|
103
|
-
.
|
104
|
-
.
|
105
|
-
.
|
106
|
-
.
|
107
|
-
.
|
103
|
+
.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%;}
|
104
|
+
.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);}
|
105
|
+
.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverWrapper__beedd761,.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverTarget__beedd761{display:block;}
|
106
|
+
.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);}
|
107
|
+
.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);}
|
108
108
|
|
109
109
|
.PaginationSelectPerPage_styles_187mk6b_s1e57mfu__a3b3456a{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;gap:0.5rem;}
|
110
110
|
.PaginationSelectPerPage_styles_187mk6b_s5dck5y__a3b3456a{--plasma-select-target-button-color:var(--plasma-pagination-button-color);--plasma-select-target-button-color-hover:var(--plasma-pagination-button-color-hover);--plasma-select-target-button-color-active:var(--plasma-pagination-button-color-active);--plasma-select-target-button-background-color:var(--plasma-pagination-button-bg-color);--plasma-select-target-button-background-color-hover:var(--plasma-pagination-button-bg-color-hover);--plasma-select-target-button-background-color-active:var(--plasma-pagination-button-bg-color-active);--plasma-select-target-height:var(--plasma-pagination-button-height);--plasma-select-target-button-padding:var(--plasma-pagination-select-target-padding);--plasma-select-border-radius:var(--plasma-pagination-button-radius);--plasma-select-target-button-arrow-color:var(--plasma-pagination--button-arrow-color);--plasma-select-target-button-arrow-color-hover:var(--plasma-pagination--button-arrow-color-hover);--plasma-select-target-button-arrow-color-active:var(--plasma-pagination--button-arrow-color-active);--plasma-select-target-button-arrow-margin:var(--plasma-pagination--button-arrow-margin);--plasma-select-padding:0.125rem;--plasma-select-focus-offset:0.125rem;--plasma-select-item-padding:var(--plasma-pagination-select-item-padding);--plasma-select-item-border-radius:calc(var(--plasma-pagination-button-radius) - 0.125rem);--plasma-select-item-icon-margin:0 0.375rem 0 0;--plasma-select-item-icon-size:1.5rem;--plasma-select-item-height:var(--plasma-pagination-select-item-height);}
|
@@ -21,8 +21,8 @@ var PaginationSelectPerPage = function PaginationSelectPerPage(_ref) {
|
|
21
21
|
listWidth = _ref.listWidth,
|
22
22
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
23
23
|
var handleSelectChange = function handleSelectChange(newValue) {
|
24
|
-
if (newValue) {
|
25
|
-
onChangeValue
|
24
|
+
if (newValue && !Array.isArray(newValue) && onChangeValue) {
|
25
|
+
onChangeValue(Number(newValue));
|
26
26
|
}
|
27
27
|
};
|
28
28
|
var transformedList = perPageList.map(function (num) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaginationSelectPerPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.tsx"],"sourcesContent":["import React from 'react';\n\nimport { defaultValues } from '../../utils';\nimport { classes } from '../../Pagination.tokens';\n\nimport type { PaginationSelectPerPageProps } from './PaginationSelectPerPage.types';\nimport { SelectPerPageRoot, SelectPerPageTypography, SelectPerPageSelect } from './PaginationSelectPerPage.styles';\n\nexport const PaginationSelectPerPage: React.FC<PaginationSelectPerPageProps> = ({\n perPageValue = defaultValues.perPage,\n perPageList = defaultValues.perPageList,\n textPerPage = defaultValues.textPerPage,\n onChangeValue,\n size,\n listWidth,\n ...rest\n}) => {\n const handleSelectChange = (newValue
|
1
|
+
{"version":3,"file":"PaginationSelectPerPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.tsx"],"sourcesContent":["import React from 'react';\n\nimport { defaultValues } from '../../utils';\nimport { classes } from '../../Pagination.tokens';\n\nimport type { PaginationSelectPerPageProps } from './PaginationSelectPerPage.types';\nimport { SelectPerPageRoot, SelectPerPageTypography, SelectPerPageSelect } from './PaginationSelectPerPage.styles';\n\nexport const PaginationSelectPerPage: React.FC<PaginationSelectPerPageProps> = ({\n perPageValue = defaultValues.perPage,\n perPageList = defaultValues.perPageList,\n textPerPage = defaultValues.textPerPage,\n onChangeValue,\n size,\n listWidth,\n ...rest\n}) => {\n const handleSelectChange = (newValue: string | number | Array<string | number>) => {\n if (newValue && !Array.isArray(newValue) && onChangeValue) {\n onChangeValue(Number(newValue));\n }\n };\n\n const transformedList = perPageList.map((num) => ({ label: num.toString(), value: num.toString() }));\n\n return (\n <SelectPerPageRoot {...rest}>\n <SelectPerPageTypography>{textPerPage}</SelectPerPageTypography>\n\n <SelectPerPageSelect\n className={classes.selectWrapper}\n items={transformedList}\n value={perPageValue.toString()}\n onChange={handleSelectChange}\n target=\"button-like\"\n size={size}\n listWidth={listWidth}\n />\n </SelectPerPageRoot>\n );\n};\n"],"names":["PaginationSelectPerPage","_ref","_ref$perPageValue","perPageValue","defaultValues","perPage","_ref$perPageList","perPageList","_ref$textPerPage","textPerPage","onChangeValue","size","listWidth","rest","_objectWithoutProperties","_excluded","handleSelectChange","newValue","Array","isArray","Number","transformedList","map","num","label","toString","value","React","createElement","SelectPerPageRoot","SelectPerPageTypography","SelectPerPageSelect","className","classes","selectWrapper","items","onChange","target"],"mappings":";;;;;;;;;;;IAQaA,uBAA+D,GAAG,SAAlEA,uBAA+DA,CAAAC,IAAA,EAQtE;AAAA,EAAA,IAAAC,iBAAA,GAAAD,IAAA,CAPFE,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAA,KAAA,CAAA,GAAGE,mBAAa,CAACC,OAAO,GAAAH,iBAAA;IAAAI,gBAAA,GAAAL,IAAA,CACpCM,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAGF,mBAAa,CAACG,WAAW,GAAAD,gBAAA;IAAAE,gBAAA,GAAAP,IAAA,CACvCQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAGJ,mBAAa,CAACK,WAAW,GAAAD,gBAAA;IACvCE,aAAa,GAAAT,IAAA,CAAbS,aAAa;IACbC,IAAI,GAAAV,IAAA,CAAJU,IAAI;IACJC,SAAS,GAAAX,IAAA,CAATW,SAAS;AACNC,IAAAA,IAAI,GAAA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
.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);}
|
24
|
+
.Item_styles_baxa65_s1to2lz5__1ba2f282{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-checkbox-fill-color);}
|
25
|
+
.Item_styles_baxa65_s17z4dei__1ba2f282{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
26
|
+
.Item_styles_baxa65_s1nd9idj__1ba2f282{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
27
|
+
.Item_styles_baxa65_dnb2nsj__1ba2f282{line-height:0;color:var(--text-secondary);}.Item_styles_baxa65_dnb2nsj__1ba2f282:hover{color:var(--text-secondary-hover);}
|
28
|
+
.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);}
|
29
|
+
.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);}
|
30
|
+
.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);}
|
31
31
|
|
32
32
|
|
33
33
|
.base_1x0spnh_b1ty39ru__fb659d61{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_1x0spnh_b1ty39ru__fb659d61.base_1x0spnh_buttonLoading__fb659d61{background-color:var(--plasma-button-loading-background-color);}.base_1x0spnh_b1ty39ru__fb659d61:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_1x0spnh_b1ty39ru__fb659d61:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
|
@@ -100,8 +100,8 @@
|
|
100
100
|
.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);}
|
101
101
|
.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;}
|
102
102
|
|
103
|
-
.
|
104
|
-
.
|
105
|
-
.
|
106
|
-
.
|
107
|
-
.
|
103
|
+
.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%;}
|
104
|
+
.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);}
|
105
|
+
.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverWrapper__beedd761,.Select_styles_1nzals0_bvro45w__beedd761 .Select_styles_1nzals0_popoverTarget__beedd761{display:block;}
|
106
|
+
.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);}
|
107
|
+
.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);}
|
@@ -10,6 +10,7 @@ var Select_styles = require('./Select.styles.js');
|
|
10
10
|
var base = require('./variations/_view/base.js');
|
11
11
|
var base$1 = require('./variations/_size/base.js');
|
12
12
|
var initialItemsTransform = require('./utils/initialItemsTransform.js');
|
13
|
+
var getInitialValue = require('./utils/getInitialValue.js');
|
13
14
|
var pathReducer = require('./reducers/pathReducer.js');
|
14
15
|
var focusedPathReducer = require('./reducers/focusedPathReducer.js');
|
15
16
|
var focusedChipIndexReducer = require('./reducers/focusedChipIndexReducer.js');
|
@@ -62,17 +63,6 @@ var selectRoot = function selectRoot(Root) {
|
|
62
63
|
onItemSelect = props.onItemSelect,
|
63
64
|
outerCloseAfterSelect = props.closeAfterSelect,
|
64
65
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
|
65
|
-
var _useState = React.useState(outerValue || props.multiselect ? [] : ''),
|
66
|
-
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
67
|
-
internalValue = _useState2[0],
|
68
|
-
setInternalValue = _useState2[1];
|
69
|
-
var value = outerValue || internalValue;
|
70
|
-
var onChange = function onChange(e) {
|
71
|
-
if (outerOnChange) {
|
72
|
-
outerOnChange(e);
|
73
|
-
}
|
74
|
-
setInternalValue(e);
|
75
|
-
};
|
76
66
|
var transformedItems = React.useMemo(function () {
|
77
67
|
return initialItemsTransform.initialItemsTransform(items || []);
|
78
68
|
}, [items]);
|
@@ -82,6 +72,12 @@ var selectRoot = function selectRoot(Root) {
|
|
82
72
|
focusedToValueMap = _usePathMaps2[1],
|
83
73
|
valueToCheckedMap = _usePathMaps2[2],
|
84
74
|
valueToItemMap = _usePathMaps2[3];
|
75
|
+
var value = getInitialValue.getInitialValue(outerValue, valueToItemMap);
|
76
|
+
var onChange = function onChange(e) {
|
77
|
+
if (outerOnChange) {
|
78
|
+
outerOnChange(e);
|
79
|
+
}
|
80
|
+
};
|
85
81
|
var _useReducer = React.useReducer(pathReducer.pathReducer, []),
|
86
82
|
_useReducer2 = _rollupPluginBabelHelpers.slicedToArray(_useReducer, 2),
|
87
83
|
path = _useReducer2[0],
|
@@ -94,10 +90,10 @@ var selectRoot = function selectRoot(Root) {
|
|
94
90
|
_useReducer6 = _rollupPluginBabelHelpers.slicedToArray(_useReducer5, 2),
|
95
91
|
focusedChipIndex = _useReducer6[0],
|
96
92
|
dispatchFocusedChipIndex = _useReducer6[1];
|
97
|
-
var
|
98
|
-
|
99
|
-
checked =
|
100
|
-
setChecked =
|
93
|
+
var _useState = React.useState(valueToCheckedMap),
|
94
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
95
|
+
checked = _useState2[0],
|
96
|
+
setChecked = _useState2[1];
|
101
97
|
var closeAfterSelect = outerCloseAfterSelect !== null && outerCloseAfterSelect !== void 0 ? outerCloseAfterSelect : !props.multiselect;
|
102
98
|
var targetRef = useOutsideClick.useOutsideClick(function () {
|
103
99
|
if (focusedChipIndex != null) {
|
@@ -243,7 +239,7 @@ var selectRoot = function selectRoot(Root) {
|
|
243
239
|
}
|
244
240
|
}
|
245
241
|
setChecked(checkedCopy);
|
246
|
-
}, [
|
242
|
+
}, [outerValue]);
|
247
243
|
return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
248
244
|
ref: ref,
|
249
245
|
size: size,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty, getPlacements } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { initialItemsTransform, updateAncestors, updateDescendants, updateSingleAncestors, getView } from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer, focusedChipIndexReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { StyledPopover, Ul, base, OuterLabel, HelperText } from './Select.styles';\nimport type { ItemContext, MergedSelectProps } from './Select.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement = 'outer',\n placeholder,\n helperText,\n disabled = false,\n view,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n\n const [internalValue, setInternalValue] = useState<string | number | Array<string | number>>(\n outerValue || props.multiselect ? [] : '',\n );\n\n const value = outerValue || internalValue;\n\n const onChange = (e: string | number | Array<string | number>) => {\n if (outerOnChange) {\n outerOnChange(e as any);\n }\n\n setInternalValue(e);\n };\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap] = usePathMaps(transformedItems);\n\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [focusedChipIndex, dispatchFocusedChipIndex] = useReducer(focusedChipIndexReducer, null);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n\n const targetRef = useOutsideClick<HTMLDivElement>(() => {\n if (focusedChipIndex != null) {\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n });\n\n const handleToggle = (opened: boolean) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (props.multiselect) {\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n } else {\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n }\n };\n\n const handleChipClick = (currentValue: string) => {\n handleCheckboxChange(valueToItemMap.get(currentValue)!);\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n value,\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleToggle,\n handlePressDown,\n focusedChipIndex,\n dispatchFocusedChipIndex,\n valueToItemMap,\n multiselect: props.multiselect,\n isTargetAmount: props.isTargetAmount,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n // В данном эффекте мы следим за изменениями value и вносим коррективы в дерево чекбоксов.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [value]);\n\n return (\n <Root ref={ref} size={size} view={status ? getView(status) : view} chipView={chipView} {...(rest as any)}>\n {label && labelPlacement === 'outer' && target !== 'button-like' && <OuterLabel>{label}</OuterLabel>}\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n }}\n >\n <StyledPopover\n ref={targetRef}\n opened={isCurrentListOpen}\n placement={getPlacements(placement)}\n usePortal={Boolean(portal)}\n frame={portal}\n onToggle={handleToggle}\n trigger=\"click\"\n target={\n <Target\n opened={isCurrentListOpen}\n value={value}\n valueToItemMap={valueToItemMap}\n focusedPath={focusedPath}\n focusedToValueMap={focusedToValueMap}\n onChipClick={handleChipClick}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n focusedChipIndex={focusedChipIndex}\n labelPlacement={labelPlacement}\n selectProps={props}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n />\n }\n preventOverflow={false}\n closeOnOverlayClick\n listWidth={listWidth}\n >\n {items && (\n <Root size={size} {...(rest as any)}>\n <Ul\n role=\"tree\"\n id=\"tree_level_1\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n >\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n )}\n </StyledPopover>\n </Context.Provider>\n {helperText && target === 'textfield-like' && <HelperText>{helperText}</HelperText>}\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n chipView: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","selectRoot","Root","forwardRef","props","ref","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","_props$labelPlacement","labelPlacement","placeholder","helperText","_props$disabled","disabled","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","_useState","useState","multiselect","_useState2","_slicedToArray","internalValue","setInternalValue","e","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useReducer5","focusedChipIndexReducer","_useReducer6","focusedChipIndex","dispatchFocusedChipIndex","_useState3","_useState4","checked","setChecked","targetRef","useOutsideClick","type","handleToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","isEmpty","stopPropagation","isCurrentChecked","_","updateSingleAncestors","handleChipClick","currentValue","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","isTargetAmount","onKeyDown","isCurrentListOpen","Boolean","useLayoutEffect","Array","isArray","val","React","createElement","_extends","getView","OuterLabel","Provider","StyledPopover","getPlacements","usePortal","frame","onToggle","trigger","Target","onChipClick","selectProps","preventOverflow","closeOnOverlayClick","Ul","role","id","onScroll","map","index","Inner","concat","currentLevel","HelperText","selectConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAiBaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAoE,EAAA;AAAA,EAAA,oBAC3FC,gBAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC7D,IAAA,IACWC,UAAU,GA2BjBF,KAAK,CA3BLG,KAAK,CAAA;MACKC,aAAa,GA0BvBJ,KAAK,CA1BLK,QAAQ,CAAA;MAAAC,aAAA,GA0BRN,KAAK,CAzBLO,MAAM,CAAA;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,aAAA,CAAA;MACzBE,KAAK,GAwBLR,KAAK,CAxBLQ,KAAK,CAAA;MAAAC,gBAAA,GAwBLT,KAAK,CAvBLU,SAAS,CAAA;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,gBAAA,CAAA;MACpBE,KAAK,GAsBLX,KAAK,CAtBLW,KAAK,CAAA;MAAAC,qBAAA,GAsBLZ,KAAK,CArBLa,cAAc,CAAA;AAAdA,MAAAA,cAAc,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,qBAAA,CAAA;MACxBE,WAAW,GAoBXd,KAAK,CApBLc,WAAW,CAAA;MACXC,UAAU,GAmBVf,KAAK,CAnBLe,UAAU,CAAA;MAAAC,eAAA,GAmBVhB,KAAK,CAlBLiB,QA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EAAE;AACFmI,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDnI,IAAAA,IAAI,EAAE;AACFkI,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNtI,IAAAA,IAAI,EAAE,SAAS;AACfO,IAAAA,QAAQ,EAAE,SAAS;AACnBN,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty, getPlacements } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n getView,\n getInitialValue,\n} from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer, focusedChipIndexReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { StyledPopover, Ul, base, OuterLabel, HelperText } from './Select.styles';\nimport type { ItemContext, MergedSelectProps } from './Select.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement = 'outer',\n placeholder,\n helperText,\n disabled = false,\n view,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap] = usePathMaps(transformedItems);\n\n const value = getInitialValue(outerValue, valueToItemMap);\n\n const onChange = (e: string | number | Array<string | number>) => {\n if (outerOnChange) {\n outerOnChange(e as any);\n }\n };\n\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [focusedChipIndex, dispatchFocusedChipIndex] = useReducer(focusedChipIndexReducer, null);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n\n const targetRef = useOutsideClick<HTMLDivElement>(() => {\n if (focusedChipIndex != null) {\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n });\n\n const handleToggle = (opened: boolean) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (props.multiselect) {\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n } else {\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n }\n };\n\n const handleChipClick = (currentValue: string) => {\n handleCheckboxChange(valueToItemMap.get(currentValue)!);\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n value,\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleToggle,\n handlePressDown,\n focusedChipIndex,\n dispatchFocusedChipIndex,\n valueToItemMap,\n multiselect: props.multiselect,\n isTargetAmount: props.isTargetAmount,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n // В данном эффекте мы следим за изменениями value и вносим коррективы в дерево чекбоксов.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [outerValue]);\n\n return (\n <Root ref={ref} size={size} view={status ? getView(status) : view} chipView={chipView} {...(rest as any)}>\n {label && labelPlacement === 'outer' && target !== 'button-like' && <OuterLabel>{label}</OuterLabel>}\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n }}\n >\n <StyledPopover\n ref={targetRef}\n opened={isCurrentListOpen}\n placement={getPlacements(placement)}\n usePortal={Boolean(portal)}\n frame={portal}\n onToggle={handleToggle}\n trigger=\"click\"\n target={\n <Target\n opened={isCurrentListOpen}\n value={value}\n valueToItemMap={valueToItemMap}\n focusedPath={focusedPath}\n focusedToValueMap={focusedToValueMap}\n onChipClick={handleChipClick}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n focusedChipIndex={focusedChipIndex}\n labelPlacement={labelPlacement}\n selectProps={props}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n />\n }\n preventOverflow={false}\n closeOnOverlayClick\n listWidth={listWidth}\n >\n {items && (\n <Root size={size} {...(rest as any)}>\n <Ul\n role=\"tree\"\n id=\"tree_level_1\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n >\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n )}\n </StyledPopover>\n </Context.Provider>\n\n {helperText && target === 'textfield-like' && <HelperText>{helperText}</HelperText>}\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n chipView: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","selectRoot","Root","forwardRef","props","ref","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","_props$labelPlacement","labelPlacement","placeholder","helperText","_props$disabled","disabled","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","_slicedToArray","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","getInitialValue","e","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useReducer5","focusedChipIndexReducer","_useReducer6","focusedChipIndex","dispatchFocusedChipIndex","_useState","useState","_useState2","checked","setChecked","multiselect","targetRef","useOutsideClick","type","handleToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","isEmpty","stopPropagation","isCurrentChecked","_","updateSingleAncestors","handleChipClick","currentValue","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","isTargetAmount","onKeyDown","isCurrentListOpen","Boolean","useLayoutEffect","Array","isArray","val","React","createElement","_extends","getView","OuterLabel","Provider","StyledPopover","getPlacements","usePortal","frame","onToggle","trigger","Target","onChipClick","selectProps","preventOverflow","closeOnOverlayClick","Ul","role","id","onScroll","map","index","Inner","concat","currentLevel","HelperText","selectConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;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AA,IAAI,EAAEA,IAAK;AACX2D,QAAAA,YAAY,EAAE,CAAE;AAChBnF,QAAAA,IAAI,EAAEA,IAAK;AACXC,QAAAA,YAAY,EAAEA,YAAa;AAC3B+E,QAAAA,KAAK,EAAEA,KAAM;AACbjH,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;KACL,CACD,CACF,CAEC,CACD,CAAC,EAElBP,UAAU,IAAIR,MAAM,KAAK,gBAAgB,iBAAI0G,KAAA,CAAAC,aAAA,CAACyB,wBAAU,EAAE5H,IAAAA,EAAAA,UAAuB,CAChF,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM6H,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElJ,UAAU;AAClBmJ,EAAAA,IAAI,EAAJA,kBAAI;AACJC,EAAAA,UAAU,EAAE;AACR/H,IAAAA,IAAI,EAAE;AACFgI,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDhI,IAAAA,IAAI,EAAE;AACF+H,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnI,IAAAA,IAAI,EAAE,SAAS;AACfO,IAAAA,QAAQ,EAAE,SAAS;AACnBN,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.styles.js","sources":["../../../src/components/Select/Select.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { component } from '../../engines';\nimport { popoverClasses, popoverConfig } from '../Popover';\n\nimport { getCorrectHeight } from './utils';\nimport { SelectProps } from './Select.types';\nimport { tokens, constants } from './Select.tokens';\n\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)<{ listWidth?: SelectProps['listWidth'] }>`\n .${String(popoverClasses.root)} {\n width: ${({ listWidth }) => listWidth || '100%'};\n }\n\n .${String(popoverClasses.target)} {\n width: 100%;\n }\n`;\n\nexport const Ul = styled.ul<{\n listOverflow?: SelectProps['listOverflow'];\n listHeight?: SelectProps['listHeight'];\n listWidth?: SelectProps['listWidth'];\n isInnerUl?: boolean;\n}>`\n box-sizing: border-box;\n\n background: var(${constants.background});\n box-shadow: ${constants.boxShadow};\n\n border-radius: var(${tokens.borderRadius});\n width: ${({ listWidth }) => listWidth || '100%'};\n height: ${({ listHeight }) => (listHeight ? getCorrectHeight(listHeight) : 'auto')};\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n border: var(${tokens.popoverBorderWidth}) solid var(${tokens.popoverBorderColor});\n\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0 0 var(${tokens.padding})` : 0)};\n padding: var(${tokens.padding});\n`;\n\nexport const base = css`\n .${popoverClasses.wrapper}, .${popoverClasses.target} {\n display: block;\n }\n`;\n\nexport const OuterLabel = styled.label`\n display: block;\n margin-bottom: var(${tokens.labelOffset});\n color: var(${constants.textfieldOuterLabelColor});\n\n font-family: var(${tokens.
|
1
|
+
{"version":3,"file":"Select.styles.js","sources":["../../../src/components/Select/Select.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { component } from '../../engines';\nimport { popoverClasses, popoverConfig } from '../Popover';\n\nimport { getCorrectHeight } from './utils';\nimport { SelectProps } from './Select.types';\nimport { tokens, constants } from './Select.tokens';\n\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)<{ listWidth?: SelectProps['listWidth'] }>`\n .${String(popoverClasses.root)} {\n width: ${({ listWidth }) => listWidth || '100%'};\n }\n\n .${String(popoverClasses.target)} {\n width: 100%;\n }\n`;\n\nexport const Ul = styled.ul<{\n listOverflow?: SelectProps['listOverflow'];\n listHeight?: SelectProps['listHeight'];\n listWidth?: SelectProps['listWidth'];\n isInnerUl?: boolean;\n}>`\n box-sizing: border-box;\n\n background: var(${constants.background});\n box-shadow: ${constants.boxShadow};\n\n border-radius: var(${tokens.borderRadius});\n width: ${({ listWidth }) => listWidth || '100%'};\n height: ${({ listHeight }) => (listHeight ? getCorrectHeight(listHeight) : 'auto')};\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n border: var(${tokens.popoverBorderWidth}) solid var(${tokens.popoverBorderColor});\n\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0 0 var(${tokens.padding})` : 0)};\n padding: var(${tokens.padding});\n`;\n\nexport const base = css`\n .${popoverClasses.wrapper}, .${popoverClasses.target} {\n display: block;\n }\n`;\n\nexport const OuterLabel = styled.label`\n display: block;\n margin-bottom: var(${tokens.labelOffset});\n color: var(${constants.textfieldOuterLabelColor});\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.fontLetterSpacing});\n line-height: var(${tokens.fontLineHeight});\n`;\n\nexport const HelperText = styled.div`\n margin-top: var(${tokens.helperTextOffset});\n color: var(${tokens.helperTextColor});\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`;\n"],"names":["Popover","component","popoverConfig","_exp","_exp3","_ref","listWidth","StyledPopover","styled","name","class","propsAsIs","vars","_exp8","_ref2","_exp9","_ref3","listHeight","getCorrectHeight","_exp10","_ref4","listOverflow","_exp13","_ref5","isInnerUl","concat","tokens","padding","Ul","base","OuterLabel","HelperText"],"mappings":";;;;;;;;;;AAUA,IAAMA,OAAO,gBAAGC,gBAAS,CAACC,uBAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GATvBA,SASuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;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spxbau6-0);}.spxbau6 .popover-target{width:100%;}
|
2
|
+
.u1yey2x3{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);}
|
3
|
+
.bvro45w .popover-wrapper,.bvro45w .popover-target{display:block;}
|
4
|
+
.ogpldc9{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);}
|
5
|
+
.h2ef052{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);}
|
@@ -24,18 +24,6 @@ var tokens = {
|
|
24
24
|
fontWeight: '--plasma-select-font-weight',
|
25
25
|
fontLetterSpacing: '--plasma-select-font-letter-spacing',
|
26
26
|
fontLineHeight: '--plasma-select-font-line-height',
|
27
|
-
labelFontFamily: '--plasma-select-label-font-family',
|
28
|
-
labelFontSize: '--plasma-select-label-font-size',
|
29
|
-
labelFontStyle: '--plasma-select-label-font-style',
|
30
|
-
labelFontWeight: '--plasma-select-label-font-weight',
|
31
|
-
labelFontLetterSpacing: '--plasma-select-label-font-letter-spacing',
|
32
|
-
labelFontLineHeight: '--plasma-select-label-font-line-height',
|
33
|
-
helperTextFontFamily: '--plasma-select-helper-text-font-family',
|
34
|
-
helperTextFontSize: '--plasma-select-helper-text-font-size',
|
35
|
-
helperTextFontStyle: '--plasma-select-helper-text-font-style',
|
36
|
-
helperTextFontWeight: '--plasma-select-helper-text-font-weight',
|
37
|
-
helperTextFontLetterSpacing: '--plasma-select-helper-text-font-letter-spacing',
|
38
|
-
helperTextFontLineHeight: '--plasma-select-helper-text-font-line-height',
|
39
27
|
itemHeight: '--plasma-select-item-height',
|
40
28
|
itemBorderRadius: '--plasma-select-item-border-radius',
|
41
29
|
itemPadding: '--plasma-select-item-padding',
|
@@ -43,8 +31,6 @@ var tokens = {
|
|
43
31
|
itemIconSize: '--plasma-select-item-icon-size',
|
44
32
|
itemIconSizeTight: '--plasma-select-item-icon-size-tight',
|
45
33
|
itemIconMargin: '--plasma-select-item-icon-margin',
|
46
|
-
itemBackground: '--plasma-select-item-background',
|
47
|
-
itemBackgroundHover: '--plasma-select-item-background-hover',
|
48
34
|
checkboxTriggerSize: '--plasma-select-checkbox-trigger-size',
|
49
35
|
checkboxTriggerSizeTight: '--plasma-select-checkbox-trigger-size-tight',
|
50
36
|
checkboxTriggerBorderRadius: '--plasma-select-checkbox-trigger-border-radius',
|
@@ -96,9 +82,7 @@ var tokens = {
|
|
96
82
|
helperTextColor: '--plasma-select-helper-text-color',
|
97
83
|
helperTextOffset: '--plasma-select-helper-text-offset',
|
98
84
|
spinnerSize: '--plasma-select-spinner-size',
|
99
|
-
spinnerSizeTight: '--plasma-select-spinner-size-tight'
|
100
|
-
disclosureIconColor: '--plasma-select-disclosure-icon-color',
|
101
|
-
disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover'
|
85
|
+
spinnerSizeTight: '--plasma-select-spinner-size-tight'
|
102
86
|
};
|
103
87
|
var constants = {
|
104
88
|
focusColor: '--surface-accent',
|