@salutejs/plasma-new-hope 0.195.0-canary.1572.11914481185.0 → 0.195.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Badge/Badge.css +4 -4
- package/cjs/components/Badge/Badge.js +17 -7
- package/cjs/components/Badge/Badge.js.map +1 -1
- package/cjs/components/Badge/Badge.tokens.js +10 -5
- package/cjs/components/Badge/Badge.tokens.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base_wiboj8.css +1 -0
- package/cjs/components/Badge/variations/_size/base.js +1 -1
- package/cjs/components/Badge/variations/_size/base.js.map +1 -1
- package/{es/components/Badge/variations/_size/base_to0y5x.css → cjs/components/Badge/variations/_size/base_bu5opk.css} +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
- package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
- package/cjs/components/Badge/variations/_view/base.js +1 -1
- package/cjs/components/Badge/variations/_view/base.js.map +1 -1
- package/cjs/components/Badge/variations/_view/base_j3xzf3.css +1 -0
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/cjs/components/Calendar/store/reducer.js +2 -2
- package/cjs/components/Calendar/store/reducer.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +18 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
- package/cjs/components/Dropdown/Dropdown.css +5 -4
- package/cjs/components/Dropdown/Dropdown.js +4 -2
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
- package/cjs/components/Select/Select.js +0 -1
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +18 -3
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/index.css +9 -8
- package/emotion/cjs/components/Badge/Badge.js +17 -7
- package/emotion/cjs/components/Badge/Badge.template-doc.mdx +40 -16
- package/emotion/cjs/components/Badge/Badge.tokens.js +10 -6
- package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_size/base.js +2 -1
- package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/emotion/cjs/components/Calendar/store/reducer.js +2 -2
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/cjs/components/Dropdown/Dropdown.js +4 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
- package/emotion/cjs/components/Select/Select.js +0 -1
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
- package/emotion/es/components/Badge/Badge.js +18 -8
- package/emotion/es/components/Badge/Badge.template-doc.mdx +40 -16
- package/emotion/es/components/Badge/Badge.tokens.js +9 -5
- package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
- package/emotion/es/components/Badge/variations/_size/base.js +3 -2
- package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
- package/emotion/es/components/Badge/variations/_view/base.js +2 -2
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/emotion/es/components/Calendar/store/reducer.js +2 -2
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/es/components/Dropdown/Dropdown.js +4 -2
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
- package/emotion/es/components/Select/Select.js +0 -1
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
- package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
- package/es/components/Badge/Badge.css +4 -4
- package/es/components/Badge/Badge.js +20 -10
- package/es/components/Badge/Badge.js.map +1 -1
- package/es/components/Badge/Badge.tokens.js +10 -6
- package/es/components/Badge/Badge.tokens.js.map +1 -1
- package/es/components/Badge/variations/_clear/base.js +1 -1
- package/es/components/Badge/variations/_clear/base.js.map +1 -1
- package/es/components/Badge/variations/_clear/base_wiboj8.css +1 -0
- package/es/components/Badge/variations/_size/base.js +1 -1
- package/es/components/Badge/variations/_size/base.js.map +1 -1
- package/{cjs/components/Badge/variations/_size/base_to0y5x.css → es/components/Badge/variations/_size/base_bu5opk.css} +1 -1
- package/es/components/Badge/variations/_transparent/base.js +1 -1
- package/es/components/Badge/variations/_transparent/base.js.map +1 -1
- package/es/components/Badge/variations/_transparent/base_aapqhz.css +1 -0
- package/es/components/Badge/variations/_view/base.js +1 -1
- package/es/components/Badge/variations/_view/base.js.map +1 -1
- package/es/components/Badge/variations/_view/base_j3xzf3.css +1 -0
- package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/es/components/Calendar/store/reducer.js +2 -2
- package/es/components/Calendar/store/reducer.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.js +19 -5
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
- package/es/components/Dropdown/Dropdown.css +5 -4
- package/es/components/Dropdown/Dropdown.js +4 -2
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -2
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
- package/es/components/Select/Select.js +0 -1
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +19 -4
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/index.css +9 -8
- package/package.json +3 -2
- package/styled-components/cjs/components/Badge/Badge.js +17 -7
- package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +40 -16
- package/styled-components/cjs/components/Badge/Badge.tokens.js +10 -6
- package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_size/base.js +2 -1
- package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/styled-components/cjs/components/Calendar/store/reducer.js +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/cjs/components/Dropdown/Dropdown.js +4 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -2
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
- package/styled-components/cjs/components/Select/Select.js +0 -1
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
- package/styled-components/es/components/Badge/Badge.js +18 -8
- package/styled-components/es/components/Badge/Badge.template-doc.mdx +40 -16
- package/styled-components/es/components/Badge/Badge.tokens.js +9 -5
- package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_size/base.js +3 -2
- package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/styled-components/es/components/Calendar/store/reducer.js +2 -2
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +22 -4
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/es/components/Dropdown/Dropdown.js +4 -2
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -3
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
- package/styled-components/es/components/Select/Select.js +0 -1
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +24 -3
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +23 -6
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +27 -6
- package/types/components/Badge/Badge.d.ts.map +1 -1
- package/types/components/Badge/Badge.tokens.d.ts +8 -4
- package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
- package/types/components/Badge/Badge.types.d.ts +18 -5
- package/types/components/Badge/Badge.types.d.ts.map +1 -1
- package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
- package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
- package/types/components/Calendar/store/reducer.d.ts +1 -1
- package/types/components/Calendar/store/reducer.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -2
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts +50 -2
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +11 -6
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/index.d.ts +1 -0
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +1 -0
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +1 -2
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +61 -4
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +25 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.d.ts +61 -4
- package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +25 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/cjs/components/Badge/variations/_clear/base_oopyb7.css +0 -1
- package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
- package/cjs/components/Badge/variations/_view/base_qlxank.css +0 -1
- package/es/components/Badge/variations/_clear/base_oopyb7.css +0 -1
- package/es/components/Badge/variations/_transparent/base_1l6036y.css +0 -1
- package/es/components/Badge/variations/_view/base_qlxank.css +0 -1
package/cjs/index.css
CHANGED
@@ -392,11 +392,12 @@
|
|
392
392
|
|
393
393
|
.DropdownHeader_styles_196gwgm_s133b1g2__3510806e{background:var(--plasma-dropdown-header-background);font-family:var(--plasma-dropdown-header-font-family);font-size:var(--plasma-dropdown-header-font-size);font-style:var(--plasma-dropdown-header-font-style);font-weight:var(--plasma-dropdown-header-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-header-line-height);-moz-letter-spacing:var(--plasma-dropdown-header-line-height);-ms-letter-spacing:var(--plasma-dropdown-header-line-height);letter-spacing:var(--plasma-dropdown-header-line-height);line-height:var(--plasma-dropdown-header-font-weight);width:var(--plasma-dropdown-header-width);height:var(--plasma-dropdown-header-height);padding:var(--plasma-dropdown-header-padding-top) var(--plasma-dropdown-header-padding-right) var(--plasma-dropdown-header-padding-bottom) var(--plasma-dropdown-header-padding-left);margin:var(--plasma-dropdown-header-margin-top) var(--plasma-dropdown-header-margin-right) var(--plasma-dropdown-header-margin-bottom) var(--plasma-dropdown-header-margin-left);}
|
394
394
|
|
395
|
-
.
|
395
|
+
.DropdownItem_styles_14yih1y_c1gkzlls__bf539568{--plasma-cell-title-color:var(--text-primary);--plasma-cell-background-color:var(--plasma-colors-transparent);--plasma-cell-padding:var(--plasma-dropdown-cell-padding);--plasma-cell-padding-left-content:var(--plasma-dropdown-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-dropdown-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-dropdown-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-dropdown-cell-textbox-gap);--plasma-cell-gap:var(--plasma-dropdown-cell-gap);--plasma-cell-title-font-family:var(--plasma-dropdown-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-dropdown-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-dropdown-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-dropdown-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-dropdown-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-dropdown-cell-title-line-height);width:100%;}
|
396
396
|
|
397
|
-
.
|
398
|
-
.
|
399
|
-
.
|
397
|
+
.DropdownItem_styles_14yih1y_d1m97l2m__bf539568{line-height:0;color:var(--text-secondary);}
|
398
|
+
.DropdownItem_styles_14yih1y_doib72h__bf539568{height:1px;margin-top:var(--doib72h-0);margin-right:var(--plasma-dropdown-divider-margin-right);margin-bottom:var(--doib72h-1);margin-left:var(--plasma-dropdown-divider-margin-left);background:var(--plasma-dropdown-divider-color);}
|
399
|
+
.DropdownItem_styles_14yih1y_w6l2f0g__bf539568{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-dropdown-item-height);margin:0;box-sizing:content-box;padding:var(--w6l2f0g-0);font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background-color:var(--plasma-colors-transparent);border-radius:var(--plasma-dropdown-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-right:0.125rem solid transparent;border-left:0.125rem solid transparent;background-clip:padding-box;position:relative;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568:hover:not(.DropdownItem_styles_14yih1y_dropdownItemIsDisabled__bf539568){cursor:pointer;background-color:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568.DropdownItem_styles_14yih1y_dropdownItemIsActive__bf539568{background-color:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568.DropdownItem_styles_14yih1y_dropdownItemIsDisabled__bf539568{opacity:0.4;cursor:not-allowed;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568:focus{outline:none;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568::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-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_14yih1y_w6l2f0g__bf539568.DropdownItem_styles_14yih1y_dropdownItemIsFocused__bf539568:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
|
400
|
+
.DropdownItem_styles_14yih1y_r1jav4ek__bf539568{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
|
400
401
|
|
401
402
|
.DropdownItem_styles_1lyg81y_s1iqs5in__b17ea060{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-left-width);color:var(--plasma-dropdown-item-content-left-color);}
|
402
403
|
.DropdownItem_styles_1lyg81y_sfg3dyd__b17ea060{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-width:var(--plasma-dropdown-item-content-right-width);color:var(--plasma-dropdown-item-content-right-color);}
|
@@ -462,15 +463,15 @@
|
|
462
463
|
.Image_styles_12ttxgz_s2ny8jg__83bd03eb{width:100%;height:100%;object-fit:cover;position:absolute;}
|
463
464
|
.Image_styles_12ttxgz_s1e232qk__83bd03eb{width:100%;height:100%;position:absolute;background-position:center;background-size:cover;}
|
464
465
|
|
465
|
-
.
|
466
|
+
.base_j3xzf3_b5zny0e__f0386786{color:var(--plasma-badge-custom-color,var(--plasma-badge-color));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background));}
|
466
467
|
|
467
|
-
.
|
468
|
+
.base_bu5opk_bb8jvo5__18c67c14{font-family:var(--plasma-badge-font-family);font-size:var(--plasma-badge-font-size);font-style:var(--plasma-badge-font-style);font-weight:var(--plasma-badge-font-weight);-webkit-letter-spacing:var(--plasma-badge-letter-spacing);-moz-letter-spacing:var(--plasma-badge-letter-spacing);-ms-letter-spacing:var(--plasma-badge-letter-spacing);letter-spacing:var(--plasma-badge-letter-spacing);line-height:var(--plasma-badge-lineheight);border-radius:var(--plasma-badge-border-radius);height:var(--plasma-badge-height);padding:var(--plasma-badge-padding);}.base_bu5opk_bb8jvo5__18c67c14.base_bu5opk_badgeIconOnly__18c67c14{padding:var(--plasma-badge-padding-icon-only);}.base_bu5opk_bb8jvo5__18c67c14.base_bu5opk_badgeIconOnly__18c67c14 .base_bu5opk_s1t43xoe__18c67c14{margin:0;}
|
468
469
|
|
469
470
|
.base_zpvffd_b3w4z61__f9738ae7.base_zpvffd_badgePilled__f9738ae7{border-radius:var(--plasma-badge-pilled-border-radius);}
|
470
471
|
|
471
|
-
.
|
472
|
+
.base_aapqhz_binquhc__81eb1c83.base_aapqhz_badgeTransparent__81eb1c83{color:var(--plasma-badge-custom-color,var(--plasma-badge-color-transparent));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background-transparent));}
|
472
473
|
|
473
|
-
.
|
474
|
+
.base_wiboj8_b1e1wuvi__44d619d2.base_wiboj8_badgeClear__44d619d2{color:var(--plasma-badge-custom-color,var(--plasma-badge-color-clear));background-color:var(--plasma-badge-custom-background,var(--plasma-badge-background-clear));}
|
474
475
|
|
475
476
|
.Badge_styles_hhbwyi_s1t43xoe__47a1842a{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-badge-left-content-margin-left);margin-right:var(--plasma-badge-left-content-margin-right);}
|
476
477
|
|
@@ -14,7 +14,7 @@ var _base4 = /*#__PURE__*/require("./variations/_transparent/base");
|
|
14
14
|
var _base5 = /*#__PURE__*/require("./variations/_clear/base");
|
15
15
|
var _Badge = /*#__PURE__*/require("./Badge.styles");
|
16
16
|
var _Badge2 = /*#__PURE__*/require("./Badge.tokens");
|
17
|
-
var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear", "maxWidth"];
|
17
|
+
var _excluded = ["children", "className", "style", "text", "contentLeft", "contentRight", "size", "view", "customColor", "customBackgroundColor", "pilled", "transparent", "clear", "maxWidth"];
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
20
20
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -27,13 +27,17 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
27
27
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
28
28
|
var badgeRoot = exports.badgeRoot = function badgeRoot(Root) {
|
29
29
|
return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
30
|
+
var _StyledContentLeft, _StyledContentMain, _StyledContentMain2, _StyledContentRight;
|
30
31
|
var children = props.children,
|
31
32
|
className = props.className,
|
33
|
+
style = props.style,
|
32
34
|
text = props.text,
|
33
35
|
contentLeft = props.contentLeft,
|
34
36
|
contentRight = props.contentRight,
|
35
37
|
size = props.size,
|
36
38
|
view = props.view,
|
39
|
+
customColor = props.customColor,
|
40
|
+
customBackgroundColor = props.customBackgroundColor,
|
37
41
|
_props$pilled = props.pilled,
|
38
42
|
pilled = _props$pilled === void 0 ? false : _props$pilled,
|
39
43
|
_props$transparent = props.transparent,
|
@@ -48,19 +52,25 @@ var badgeRoot = exports.badgeRoot = function badgeRoot(Root) {
|
|
48
52
|
var clearClass = clear ? _Badge2.classes.badgeClear : undefined;
|
49
53
|
var truncateClass = maxWidth !== 'auto' ? _Badge2.classes.badgeTruncate : undefined;
|
50
54
|
var txt = !text && typeof children === 'string' ? children : text;
|
55
|
+
var iconOnlyClass = !txt && contentLeft ? _Badge2.classes.iconOnly : undefined;
|
56
|
+
var BadgeContent = function BadgeContent() {
|
57
|
+
if (contentLeft) {
|
58
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _StyledContentLeft || (_StyledContentLeft = /*#__PURE__*/_react["default"].createElement(_Badge.StyledContentLeft, null, contentLeft)), txt ? _StyledContentMain || (_StyledContentMain = /*#__PURE__*/_react["default"].createElement(_Badge.StyledContentMain, null, txt)) : children);
|
59
|
+
}
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, txt ? _StyledContentMain2 || (_StyledContentMain2 = /*#__PURE__*/_react["default"].createElement(_Badge.StyledContentMain, null, txt)) : children, contentRight && (_StyledContentRight || (_StyledContentRight = /*#__PURE__*/_react["default"].createElement(_Badge.StyledContentRight, null, contentRight))));
|
61
|
+
};
|
51
62
|
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
52
63
|
ref: ref,
|
53
|
-
className: (0, _utils.cx)(pilledClass, transparentClass, clearClass, truncateClass, className),
|
64
|
+
className: (0, _utils.cx)(pilledClass, transparentClass, clearClass, truncateClass, iconOnlyClass, className),
|
54
65
|
view: view,
|
55
66
|
size: size,
|
56
67
|
pilled: pilled,
|
57
68
|
transparent: transparent,
|
58
|
-
clear: clear
|
59
|
-
|
60
|
-
style: _objectSpread(_objectSpread({}, rest.style), {}, {
|
69
|
+
clear: clear,
|
70
|
+
style: _objectSpread(_objectSpread({}, style), {}, _defineProperty(_defineProperty({
|
61
71
|
maxWidth: maxWidth
|
62
|
-
})
|
63
|
-
}
|
72
|
+
}, _Badge2.privateTokens.customBackground, customBackgroundColor), _Badge2.privateTokens.customColor, customColor))
|
73
|
+
}, rest), /*#__PURE__*/_react["default"].createElement(BadgeContent, null));
|
64
74
|
});
|
65
75
|
};
|
66
76
|
var badgeConfig = exports.badgeConfig = {
|
@@ -52,16 +52,7 @@ export function App() {
|
|
52
52
|
```
|
53
53
|
|
54
54
|
### Вид badge
|
55
|
-
Вид `badge` задается с помощью свойства `view`.
|
56
|
-
|
57
|
-
+ `"primary"` – основной badge;
|
58
|
-
+ `"accent"` – бейдж акцентного цвета;
|
59
|
-
+ `"positive"` – успешное завершение;
|
60
|
-
+ `"warning"` – предупреждение;
|
61
|
-
+ `"negative"` – ошибка;
|
62
|
-
+ `"dark"` – темный badge;
|
63
|
-
+ `"light"` – светлый badge.
|
64
|
-
|
55
|
+
Вид `badge` задается с помощью свойства `view`.
|
65
56
|
Так же на вид badge влияет свойства `transparent` и `clear`.
|
66
57
|
|
67
58
|
```tsx live
|
@@ -72,7 +63,7 @@ export function App() {
|
|
72
63
|
const Badges = ({transparent, clear}) => {
|
73
64
|
return (
|
74
65
|
<div style=\{{ display: 'flex', gap: '0.5rem' }}>
|
75
|
-
<Badge text="Бейдж" size="l" view="
|
66
|
+
<Badge text="Бейдж" size="l" view="default" transparent={transparent} clear={clear} />
|
76
67
|
<Badge text="Бейдж" size="l" view="accent" transparent={transparent} clear={clear} />
|
77
68
|
<Badge text="Бейдж" size="l" view="positive" transparent={transparent} clear={clear} />
|
78
69
|
<Badge text="Бейдж" size="l" view="warning" transparent={transparent} clear={clear} />
|
@@ -94,7 +85,8 @@ export function App() {
|
|
94
85
|
```
|
95
86
|
|
96
87
|
### Иконка слева / справа
|
97
|
-
В левой
|
88
|
+
В левой или правой части badge можно отобразить иконку.
|
89
|
+
Если же нужен Badge с иконкой без текста, нужно использовать `contentLeft`.
|
98
90
|
|
99
91
|
```tsx live
|
100
92
|
import React from 'react';
|
@@ -107,17 +99,49 @@ export function App() {
|
|
107
99
|
<Badge
|
108
100
|
text="Бейдж"
|
109
101
|
size="l"
|
110
|
-
view="
|
102
|
+
view="default"
|
111
103
|
contentLeft={
|
112
104
|
<IconEye color="inherit" size="xs" />
|
113
|
-
}
|
105
|
+
}
|
106
|
+
/>
|
114
107
|
<Badge
|
115
108
|
text="Бейдж"
|
116
109
|
size="l"
|
117
|
-
view="
|
110
|
+
view="default"
|
118
111
|
contentRight={
|
119
112
|
<IconEye color="inherit" size="xs" />
|
120
|
-
}
|
113
|
+
}
|
114
|
+
/>
|
115
|
+
<Badge
|
116
|
+
size="l"
|
117
|
+
view="default"
|
118
|
+
contentLeft={
|
119
|
+
<IconEye color="inherit" size="xs" />
|
120
|
+
}
|
121
|
+
/>
|
122
|
+
</div>
|
123
|
+
);
|
124
|
+
}
|
125
|
+
```
|
126
|
+
|
127
|
+
### Задание цвета текста и фона
|
128
|
+
Цвет текста и фона можно задать с помощью свойств
|
129
|
+
`customColor` и `customBackgroundColor` соответственно.
|
130
|
+
|
131
|
+
```tsx live
|
132
|
+
import React from 'react';
|
133
|
+
import { Badge } from '@salutejs/{{ package }}';
|
134
|
+
|
135
|
+
export function App() {
|
136
|
+
return (
|
137
|
+
<div>
|
138
|
+
<Badge
|
139
|
+
text="Бейдж"
|
140
|
+
size="l"
|
141
|
+
view="default"
|
142
|
+
customColor="antiquewhite"
|
143
|
+
customBackgroundColor="darkolivegreen"
|
144
|
+
/>
|
121
145
|
</div>
|
122
146
|
);
|
123
147
|
}
|
@@ -3,12 +3,17 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.tokens = exports.classes = void 0;
|
6
|
+
exports.tokens = exports.privateTokens = exports.classes = void 0;
|
7
7
|
var classes = exports.classes = {
|
8
8
|
badgePilled: 'badge-pilled',
|
9
9
|
badgeTransparent: 'badge-transparent',
|
10
10
|
badgeClear: 'badge-clear',
|
11
|
-
badgeTruncate: 'badge-truncate'
|
11
|
+
badgeTruncate: 'badge-truncate',
|
12
|
+
iconOnly: 'badge-icon-only'
|
13
|
+
};
|
14
|
+
var privateTokens = exports.privateTokens = {
|
15
|
+
customBackground: '--plasma-badge-custom-background',
|
16
|
+
customColor: '--plasma-badge-custom-color'
|
12
17
|
};
|
13
18
|
var tokens = exports.tokens = {
|
14
19
|
background: '--plasma-badge-background',
|
@@ -16,13 +21,12 @@ var tokens = exports.tokens = {
|
|
16
21
|
backgroundTransparent: '--plasma-badge-background-transparent',
|
17
22
|
colorTransparent: '--plasma-badge-color-transparent',
|
18
23
|
colorClear: '--plasma-badge-color-clear',
|
24
|
+
backgroundClear: '--plasma-badge-background-clear',
|
19
25
|
borderRadius: '--plasma-badge-border-radius',
|
20
26
|
pilledBorderRadius: '--plasma-badge-pilled-border-radius',
|
21
27
|
height: '--plasma-badge-height',
|
22
|
-
|
23
|
-
|
24
|
-
paddingBottom: '--plasma-badge-padding-bottom',
|
25
|
-
paddingLeft: '--plasma-badge-padding-left',
|
28
|
+
padding: '--plasma-badge-padding',
|
29
|
+
paddingIconOnly: '--plasma-badge-padding-icon-only',
|
26
30
|
fontFamily: '--plasma-badge-font-family',
|
27
31
|
fontSize: '--plasma-badge-font-size',
|
28
32
|
fontStyle: '--plasma-badge-font-style',
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.base = void 0;
|
7
7
|
var _react = /*#__PURE__*/require("@emotion/react");
|
8
8
|
var _Badge = /*#__PURE__*/require("../../Badge.tokens");
|
9
|
-
var base = exports.base = /*#__PURE__*/(0, _react.css)("&.", _Badge.classes.badgeClear, "{color:var(", _Badge.tokens.colorClear, ");background-color:
|
9
|
+
var base = exports.base = /*#__PURE__*/(0, _react.css)("&.", _Badge.classes.badgeClear, "{color:var(", _Badge.privateTokens.customColor, ", var(", _Badge.tokens.colorClear, "));background-color:var(", _Badge.privateTokens.customBackground, ", var(", _Badge.tokens.backgroundClear, "));};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fY2xlYXIvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL19jbGVhci9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCBwcml2YXRlVG9rZW5zLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZUNsZWFyfSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHtwcml2YXRlVG9rZW5zLmN1c3RvbUNvbG9yfSwgdmFyKCR7dG9rZW5zLmNvbG9yQ2xlYXJ9KSk7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3ByaXZhdGVUb2tlbnMuY3VzdG9tQmFja2dyb3VuZH0sIHZhcigke3Rva2Vucy5iYWNrZ3JvdW5kQ2xlYXJ9KSk7XG4gICAgfVxuYDtcbiJdfQ== */"));
|
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.base = void 0;
|
7
7
|
var _react = /*#__PURE__*/require("@emotion/react");
|
8
8
|
var _Badge = /*#__PURE__*/require("../../Badge.tokens");
|
9
|
-
var
|
9
|
+
var _Badge2 = /*#__PURE__*/require("../../Badge.styles");
|
10
|
+
var base = exports.base = /*#__PURE__*/(0, _react.css)("font-family:var(", _Badge.tokens.fontFamily, ");font-size:var(", _Badge.tokens.fontSize, ");font-style:var(", _Badge.tokens.fontStyle, ");font-weight:var(", _Badge.tokens.fontWeight, ");letter-spacing:var(", _Badge.tokens.letterSpacing, ");line-height:var(", _Badge.tokens.lineHeight, ");border-radius:var(", _Badge.tokens.borderRadius, ");height:var(", _Badge.tokens.height, ");padding:var(", _Badge.tokens.padding, ");&.", _Badge.classes.iconOnly, "{padding:var(", _Badge.tokens.paddingIconOnly, ");", _Badge2.StyledContentLeft, "{margin:0;}};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fc2l6ZS9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUt1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3NpemUvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgY2xhc3NlcywgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcbmltcG9ydCB7IFN0eWxlZENvbnRlbnRMZWZ0IH0gZnJvbSAnLi4vLi4vQmFkZ2Uuc3R5bGVzJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgZm9udC1mYW1pbHk6IHZhcigke3Rva2Vucy5mb250RmFtaWx5fSk7XG4gICAgZm9udC1zaXplOiB2YXIoJHt0b2tlbnMuZm9udFNpemV9KTtcbiAgICBmb250LXN0eWxlOiB2YXIoJHt0b2tlbnMuZm9udFN0eWxlfSk7XG4gICAgZm9udC13ZWlnaHQ6IHZhcigke3Rva2Vucy5mb250V2VpZ2h0fSk7XG4gICAgbGV0dGVyLXNwYWNpbmc6IHZhcigke3Rva2Vucy5sZXR0ZXJTcGFjaW5nfSk7XG4gICAgbGluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy5saW5lSGVpZ2h0fSk7XG5cbiAgICBib3JkZXItcmFkaXVzOiB2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSk7XG5cbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5oZWlnaHR9KTtcblxuICAgIHBhZGRpbmc6IHZhcigke3Rva2Vucy5wYWRkaW5nfSk7XG5cbiAgICAmLiR7Y2xhc3Nlcy5pY29uT25seX0ge1xuICAgICAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMucGFkZGluZ0ljb25Pbmx5fSk7XG5cbiAgICAgICAgJHtTdHlsZWRDb250ZW50TGVmdH0ge1xuICAgICAgICAgICAgbWFyZ2luOiAwO1xuICAgICAgICB9XG4gICAgfVxuYDtcbiJdfQ== */"));
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.base = void 0;
|
7
7
|
var _react = /*#__PURE__*/require("@emotion/react");
|
8
8
|
var _Badge = /*#__PURE__*/require("../../Badge.tokens");
|
9
|
-
var base = exports.base = /*#__PURE__*/(0, _react.css)("&.", _Badge.classes.badgeTransparent, "{color:var(", _Badge.tokens.colorTransparent, ");background-color:var(", _Badge.tokens.backgroundTransparent, ");};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
9
|
+
var base = exports.base = /*#__PURE__*/(0, _react.css)("&.", _Badge.classes.badgeTransparent, "{color:var(", _Badge.privateTokens.customColor, ", var(", _Badge.tokens.colorTransparent, "));background-color:var(", _Badge.privateTokens.customBackground, ", var(", _Badge.tokens.backgroundTransparent, "));};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdHJhbnNwYXJlbnQvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL190cmFuc3BhcmVudC9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCBwcml2YXRlVG9rZW5zLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZVRyYW5zcGFyZW50fSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHtwcml2YXRlVG9rZW5zLmN1c3RvbUNvbG9yfSwgdmFyKCR7dG9rZW5zLmNvbG9yVHJhbnNwYXJlbnR9KSk7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3ByaXZhdGVUb2tlbnMuY3VzdG9tQmFja2dyb3VuZH0sIHZhcigke3Rva2Vucy5iYWNrZ3JvdW5kVHJhbnNwYXJlbnR9KSk7XG4gICAgfVxuYDtcbiJdfQ== */"));
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.base = void 0;
|
7
7
|
var _react = /*#__PURE__*/require("@emotion/react");
|
8
8
|
var _Badge = /*#__PURE__*/require("../../Badge.tokens");
|
9
|
-
var base = exports.base = /*#__PURE__*/(0, _react.css)("color:var(", _Badge.tokens.color, ");background-color:var(", _Badge.tokens.background, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
9
|
+
var base = exports.base = /*#__PURE__*/(0, _react.css)("color:var(", _Badge.privateTokens.customColor, ", var(", _Badge.tokens.color, "));background-color:var(", _Badge.privateTokens.customBackground, ", var(", _Badge.tokens.background, "));;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdmlldy9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgcHJpdmF0ZVRva2VucywgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgY29sb3I6IHZhcigke3ByaXZhdGVUb2tlbnMuY3VzdG9tQ29sb3J9LCB2YXIoJHt0b2tlbnMuY29sb3J9KSk7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKCR7cHJpdmF0ZVRva2Vucy5jdXN0b21CYWNrZ3JvdW5kfSwgdmFyKCR7dG9rZW5zLmJhY2tncm91bmR9KSk7XG5gO1xuIl19 */"));
|
@@ -72,7 +72,7 @@ var calendarBaseRoot = exports.calendarBaseRoot = function calendarBaseRoot(Root
|
|
72
72
|
_useState8 = _slicedToArray(_useState7, 2),
|
73
73
|
outOfRangeKey = _useState8[0],
|
74
74
|
setOutOfRangeKey = _useState8[1];
|
75
|
-
var _useReducer = (0, _react.useReducer)(_reducer.reducer, (0, _reducer.getInitialState)(value,
|
75
|
+
var _useReducer = (0, _react.useReducer)(_reducer.reducer, (0, _reducer.getInitialState)(value, type)),
|
76
76
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
77
77
|
state = _useReducer2[0],
|
78
78
|
dispatch = _useReducer2[1];
|
@@ -73,7 +73,7 @@ var calendarDoubleRoot = exports.calendarDoubleRoot = function calendarDoubleRoo
|
|
73
73
|
_useState8 = _slicedToArray(_useState7, 2),
|
74
74
|
outOfRangeKey = _useState8[0],
|
75
75
|
setOutOfRangeKey = _useState8[1];
|
76
|
-
var _useReducer = (0, _react.useReducer)(_reducer.reducer, (0, _reducer.getInitialState)(value,
|
76
|
+
var _useReducer = (0, _react.useReducer)(_reducer.reducer, (0, _reducer.getInitialState)(value, type, true)),
|
77
77
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
78
78
|
state = _useReducer2[0],
|
79
79
|
dispatch = _useReducer2[1];
|
@@ -36,8 +36,8 @@ var sizeMap = exports.sizeMap = {
|
|
36
36
|
"double": [3, 1]
|
37
37
|
}
|
38
38
|
};
|
39
|
-
var getInitialState = exports.getInitialState = function getInitialState(value,
|
40
|
-
var initDate = value ||
|
39
|
+
var getInitialState = exports.getInitialState = function getInitialState(value, calendarState, isDouble) {
|
40
|
+
var initDate = value || new Date();
|
41
41
|
var date = (0, _utils.getDateFromValue)(initDate);
|
42
42
|
var resSize = isDouble ? sizeMap[calendarState]["double"] : sizeMap[calendarState].single;
|
43
43
|
return {
|
@@ -24,6 +24,10 @@ var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmoun
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
26
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
27
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
28
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
29
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
30
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
27
31
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
28
32
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
29
33
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -186,9 +190,24 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
186
190
|
|
187
191
|
// Обработчик чипов
|
188
192
|
var handleChipsChange = function handleChipsChange(chipLabels) {
|
189
|
-
|
190
|
-
|
191
|
-
|
193
|
+
if (!Array.isArray(value)) return;
|
194
|
+
|
195
|
+
// TODO: #1564
|
196
|
+
// Из лейблов чипов получаем value у item и далее прокидываем его в onChange.
|
197
|
+
if (renderValue && !isTargetAmount) {
|
198
|
+
var resultValues = _toConsumableArray(value);
|
199
|
+
value.forEach(function (_, index) {
|
200
|
+
var labelAfterRenderValue = renderValue(labelToItemMap.get(valueToItemMap.get(value[index]).label));
|
201
|
+
if (!chipLabels.includes(labelAfterRenderValue)) {
|
202
|
+
resultValues.splice(index, 1);
|
203
|
+
}
|
204
|
+
});
|
205
|
+
onChange(resultValues);
|
206
|
+
} else {
|
207
|
+
onChange(chipLabels.map(function (chipLabel) {
|
208
|
+
return labelToItemMap.get(chipLabel).value;
|
209
|
+
}));
|
210
|
+
}
|
192
211
|
};
|
193
212
|
|
194
213
|
// Обработчик открытия/закрытия выпадающего списка
|
@@ -357,7 +376,6 @@ var comboboxRoot = exports.comboboxRoot = function comboboxRoot(Root) {
|
|
357
376
|
handleItemClick: handleItemClick,
|
358
377
|
variant: variant,
|
359
378
|
renderItem: renderItem,
|
360
|
-
valueToItemMap: valueToItemMap,
|
361
379
|
treeId: treeId
|
362
380
|
}
|
363
381
|
}, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
|
@@ -40,7 +40,6 @@ var Item = exports.Item = function Item(_ref) {
|
|
40
40
|
handleItemClick = _useContext.handleItemClick,
|
41
41
|
variant = _useContext.variant,
|
42
42
|
renderItem = _useContext.renderItem,
|
43
|
-
valueToItemMap = _useContext.valueToItemMap,
|
44
43
|
treeId = _useContext.treeId;
|
45
44
|
var disabledClassName = disabled ? _Combobox.classes.dropdownItemIsDisabled : undefined;
|
46
45
|
var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? _Combobox.classes.dropdownItemIsFocused : undefined;
|
@@ -94,7 +93,7 @@ var Item = exports.Item = function Item(_ref) {
|
|
94
93
|
}))), !multiple && checked.get(item.value) === 'done' && /*#__PURE__*/_react["default"].createElement(_Icon.IconDone, {
|
95
94
|
size: (0, _utils.sizeToIconSize)(size, variant),
|
96
95
|
color: "inherit"
|
97
|
-
})), renderItem ? /*#__PURE__*/_react["default"].createElement(_Item.StyledText, null, renderItem(
|
96
|
+
})), renderItem ? /*#__PURE__*/_react["default"].createElement(_Item.StyledText, null, renderItem(item)) : /*#__PURE__*/_react["default"].createElement(_Item.StyledWrapper, null, /*#__PURE__*/_react["default"].createElement(_Item.StyledCell, {
|
98
97
|
view: "default",
|
99
98
|
size: "l",
|
100
99
|
contentLeft: contentLeft,
|
@@ -20,7 +20,7 @@ var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
|
|
20
20
|
var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
|
21
21
|
var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
|
22
22
|
var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
|
23
|
-
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
|
23
|
+
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal", "renderItem"];
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
26
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -69,6 +69,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
69
69
|
_ref$alwaysOpened = _ref.alwaysOpened,
|
70
70
|
alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
|
71
71
|
portal = _ref.portal,
|
72
|
+
renderItem = _ref.renderItem,
|
72
73
|
rest = _objectWithoutProperties(_ref, _excluded);
|
73
74
|
var _useReducer = (0, _react.useReducer)(_pathReducer.pathReducer, []),
|
74
75
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
@@ -144,7 +145,8 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
144
145
|
onItemClick: onItemClick,
|
145
146
|
onItemSelect: onItemSelect,
|
146
147
|
hasArrow: hasArrow,
|
147
|
-
treeId: treeId
|
148
|
+
treeId: treeId,
|
149
|
+
renderItem: renderItem
|
148
150
|
}
|
149
151
|
}, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
|
150
152
|
ref: floatingPopoverRef,
|
@@ -43,7 +43,8 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
|
43
43
|
onItemSelect = _useContext.onItemSelect,
|
44
44
|
onItemClick = _useContext.onItemClick,
|
45
45
|
hasArrow = _useContext.hasArrow,
|
46
|
-
treeId = _useContext.treeId
|
46
|
+
treeId = _useContext.treeId,
|
47
|
+
renderItem = _useContext.renderItem;
|
47
48
|
var hasDescendants = Boolean(item.items);
|
48
49
|
var disclosureIconSize = size === 'xs' ? 'xs' : 's';
|
49
50
|
var isDisabledClassName = disabled || isDisabled ? _Dropdown.classes.dropdownItemIsDisabled : undefined;
|
@@ -94,7 +95,7 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
|
94
95
|
"aria-expanded": ariaExpanded,
|
95
96
|
"aria-level": ariaLevel,
|
96
97
|
"aria-label": ariaLabel
|
97
|
-
}, /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
|
98
|
+
}, renderItem ? /*#__PURE__*/_react["default"].createElement(_DropdownItem.RenderItemWrapper, null, renderItem(item)) : /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
|
98
99
|
contentLeft: contentLeft,
|
99
100
|
contentRight: contentRight,
|
100
101
|
alignContentLeft: "center",
|