@salutejs/plasma-new-hope 0.88.0-canary.1233.9420319803.0 → 0.88.0-canary.1233.9437372350.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. package/cjs/components/Chip/Chip.css +5 -5
  2. package/cjs/components/Chip/Chip.styles.js +1 -1
  3. package/cjs/components/Chip/Chip.styles.js.map +1 -1
  4. package/cjs/components/Chip/{Chip.styles_1l2rsrr.css → Chip.styles_1mwwhiw.css} +1 -1
  5. package/cjs/components/Combobox/Combobox.css +5 -5
  6. package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.css +5 -5
  7. package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +5 -5
  8. package/cjs/components/Pagination/Pagination.css +10 -11
  9. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +10 -11
  10. package/cjs/components/Range/Range.css +5 -5
  11. package/cjs/components/Select/Select.css +10 -11
  12. package/cjs/components/Select/Select.js +10 -6
  13. package/cjs/components/Select/Select.js.map +1 -1
  14. package/cjs/components/Select/Select.styles.js +2 -0
  15. package/cjs/components/Select/Select.styles.js.map +1 -1
  16. package/cjs/components/Select/elements/Inner/Inner.css +10 -11
  17. package/cjs/components/Select/elements/Inner/Inner.js +7 -2
  18. package/cjs/components/Select/elements/Inner/Inner.js.map +1 -1
  19. package/cjs/components/Select/elements/Inner/elements/Item/Item.css +10 -11
  20. package/cjs/components/Select/elements/Inner/elements/Item/Item.js +17 -6
  21. package/cjs/components/Select/elements/Inner/elements/Item/Item.js.map +1 -1
  22. package/cjs/components/Select/elements/Target/Target.css +10 -11
  23. package/cjs/components/Select/elements/Target/Target.js +9 -3
  24. package/cjs/components/Select/elements/Target/Target.js.map +1 -1
  25. package/cjs/components/Select/elements/Target/elements/Button/Button.css +5 -6
  26. package/cjs/components/Select/elements/Target/elements/Button/Button.js +28 -32
  27. package/cjs/components/Select/elements/Target/elements/Button/Button.js.map +1 -1
  28. package/cjs/components/Select/elements/Target/elements/Button/Button.styles.js +2 -8
  29. package/cjs/components/Select/elements/Target/elements/Button/Button.styles.js.map +1 -1
  30. package/cjs/components/Select/elements/Target/elements/Button/{Button.styles_1bweq1y.css → Button.styles_1r519o1.css} +1 -2
  31. package/cjs/components/Select/elements/Target/elements/Textfield/Textfield.css +5 -5
  32. package/cjs/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
  33. package/cjs/components/Select/elements/Target/elements/Textfield/Textfield.js.map +1 -1
  34. package/cjs/components/Select/elements/Target/elements/Textfield/elements/Chip/Chip.css +5 -5
  35. package/cjs/components/Select/hooks/useKeyboardNavigation.js +2 -2
  36. package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  37. package/cjs/components/Select/utils/getButtonLabel.js +47 -0
  38. package/cjs/components/Select/utils/getButtonLabel.js.map +1 -0
  39. package/cjs/components/Slider/Slider.css +5 -5
  40. package/cjs/components/Slider/components/Double/Double.css +5 -5
  41. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +5 -5
  42. package/cjs/index.css +10 -11
  43. package/es/components/Chip/Chip.css +5 -5
  44. package/es/components/Chip/Chip.styles.js +1 -1
  45. package/es/components/Chip/Chip.styles.js.map +1 -1
  46. package/es/components/Chip/{Chip.styles_1l2rsrr.css → Chip.styles_1mwwhiw.css} +1 -1
  47. package/es/components/Combobox/Combobox.css +5 -5
  48. package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.css +5 -5
  49. package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +5 -5
  50. package/es/components/Pagination/Pagination.css +10 -11
  51. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +10 -11
  52. package/es/components/Range/Range.css +5 -5
  53. package/es/components/Select/Select.css +10 -11
  54. package/es/components/Select/Select.js +10 -6
  55. package/es/components/Select/Select.js.map +1 -1
  56. package/es/components/Select/Select.styles.js +2 -0
  57. package/es/components/Select/Select.styles.js.map +1 -1
  58. package/es/components/Select/elements/Inner/Inner.css +10 -11
  59. package/es/components/Select/elements/Inner/Inner.js +7 -2
  60. package/es/components/Select/elements/Inner/Inner.js.map +1 -1
  61. package/es/components/Select/elements/Inner/elements/Item/Item.css +10 -11
  62. package/es/components/Select/elements/Inner/elements/Item/Item.js +17 -6
  63. package/es/components/Select/elements/Inner/elements/Item/Item.js.map +1 -1
  64. package/es/components/Select/elements/Target/Target.css +10 -11
  65. package/es/components/Select/elements/Target/Target.js +9 -3
  66. package/es/components/Select/elements/Target/Target.js.map +1 -1
  67. package/es/components/Select/elements/Target/elements/Button/Button.css +5 -6
  68. package/es/components/Select/elements/Target/elements/Button/Button.js +29 -33
  69. package/es/components/Select/elements/Target/elements/Button/Button.js.map +1 -1
  70. package/es/components/Select/elements/Target/elements/Button/Button.styles.js +3 -8
  71. package/es/components/Select/elements/Target/elements/Button/Button.styles.js.map +1 -1
  72. package/es/components/Select/elements/Target/elements/Button/{Button.styles_1bweq1y.css → Button.styles_1r519o1.css} +1 -2
  73. package/es/components/Select/elements/Target/elements/Textfield/Textfield.css +5 -5
  74. package/es/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
  75. package/es/components/Select/elements/Target/elements/Textfield/Textfield.js.map +1 -1
  76. package/es/components/Select/elements/Target/elements/Textfield/elements/Chip/Chip.css +5 -5
  77. package/es/components/Select/hooks/useKeyboardNavigation.js +2 -2
  78. package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  79. package/es/components/Select/utils/getButtonLabel.js +43 -0
  80. package/es/components/Select/utils/getButtonLabel.js.map +1 -0
  81. package/es/components/Slider/Slider.css +5 -5
  82. package/es/components/Slider/components/Double/Double.css +5 -5
  83. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +5 -5
  84. package/es/index.css +10 -11
  85. package/package.json +2 -2
  86. package/styled-components/cjs/components/Chip/Chip.styles.js +1 -1
  87. package/styled-components/cjs/components/Select/Select.js +20 -16
  88. package/styled-components/cjs/components/Select/elements/Inner/Inner.js +7 -2
  89. package/styled-components/cjs/components/Select/elements/Inner/elements/Item/Item.js +16 -5
  90. package/styled-components/cjs/components/Select/elements/Target/Target.js +9 -3
  91. package/styled-components/cjs/components/Select/elements/Target/elements/Button/Button.js +28 -31
  92. package/styled-components/cjs/components/Select/elements/Target/elements/Button/Button.styles.js +3 -6
  93. package/styled-components/cjs/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
  94. package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +2 -2
  95. package/styled-components/cjs/components/Select/utils/getButtonLabel.js +43 -0
  96. package/styled-components/cjs/components/Select/utils/index.js +8 -1
  97. package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +2 -2
  98. package/styled-components/es/components/Chip/Chip.styles.js +1 -1
  99. package/styled-components/es/components/Select/Select.js +10 -6
  100. package/styled-components/es/components/Select/elements/Inner/Inner.js +7 -2
  101. package/styled-components/es/components/Select/elements/Inner/elements/Item/Item.js +16 -5
  102. package/styled-components/es/components/Select/elements/Target/Target.js +9 -3
  103. package/styled-components/es/components/Select/elements/Target/elements/Button/Button.js +30 -33
  104. package/styled-components/es/components/Select/elements/Target/elements/Button/Button.styles.js +2 -5
  105. package/styled-components/es/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
  106. package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +2 -2
  107. package/styled-components/es/components/Select/utils/getButtonLabel.js +37 -0
  108. package/styled-components/es/components/Select/utils/index.js +2 -1
  109. package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +2 -2
  110. package/types/components/Chip/Chip.styles.d.ts.map +1 -1
  111. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +12 -8
  112. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  113. package/types/components/Select/Select.d.ts.map +1 -1
  114. package/types/components/Select/Select.types.d.ts +20 -8
  115. package/types/components/Select/Select.types.d.ts.map +1 -1
  116. package/types/components/Select/elements/Inner/Inner.d.ts.map +1 -1
  117. package/types/components/Select/elements/Inner/elements/Item/Item.d.ts.map +1 -1
  118. package/types/components/Select/elements/Inner/elements/Item/Item.types.d.ts +37 -1
  119. package/types/components/Select/elements/Inner/elements/Item/Item.types.d.ts.map +1 -1
  120. package/types/components/Select/elements/Target/Target.d.ts.map +1 -1
  121. package/types/components/Select/elements/Target/Target.types.d.ts +5 -3
  122. package/types/components/Select/elements/Target/Target.types.d.ts.map +1 -1
  123. package/types/components/Select/elements/Target/elements/Button/Button.d.ts.map +1 -1
  124. package/types/components/Select/elements/Target/elements/Button/Button.styles.d.ts +0 -1
  125. package/types/components/Select/elements/Target/elements/Button/Button.styles.d.ts.map +1 -1
  126. package/types/components/Select/elements/Target/elements/Button/Button.types.d.ts +1 -1
  127. package/types/components/Select/elements/Target/elements/Button/Button.types.d.ts.map +1 -1
  128. package/types/components/Select/elements/Target/elements/Textfield/Textfield.d.ts.map +1 -1
  129. package/types/components/Select/elements/Target/elements/Textfield/Textfield.types.d.ts +1 -1
  130. package/types/components/Select/elements/Target/elements/Textfield/Textfield.types.d.ts.map +1 -1
  131. package/types/components/Select/utils/getButtonLabel.d.ts +3 -0
  132. package/types/components/Select/utils/getButtonLabel.d.ts.map +1 -0
  133. package/types/components/Select/utils/index.d.ts +1 -0
  134. package/types/components/Select/utils/index.d.ts.map +1 -1
  135. package/types/examples/plasma_b2c/components/Select/Select.d.ts +12 -8
  136. package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
@@ -31,12 +31,11 @@
31
31
  .SelectNotFoundContent_styles_r1sne_c17jtu5__04f00d06{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;box-sizing:border-box;padding:var(--plasma-select-not-found-content-padding);}
32
32
  .SelectNotFoundContent_styles_r1sne_d1dcslek__04f00d06{margin-top:var(--plasma-select-not-found-content-gap);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);}
33
33
 
34
- .Button_styles_1bweq1y_s1n7gats__7958f749{--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(--plasma-select-target-height);--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);}
35
- .Button_styles_1bweq1y_isdqa5a__7958f749{line-height:0;color:var(--plasma-select-target-button-arrow-color);}.Button_styles_1bweq1y_isdqa5a__7958f749:hover{color:var(--plasma-select-target-button-arrow-color-hover);}.Button_styles_1bweq1y_isdqa5a__7958f749:active{color:var(--plasma-select-target-button-arrow-color-active);}
36
- .Button_styles_1bweq1y_s1yfglds__7958f749{-webkit-transition:color 0.3s ease-in,-webkit-transform 0.15s ease-in;-webkit-transition:color 0.3s ease-in,transform 0.15s ease-in;transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
37
- .Button_styles_1bweq1y_brzvbcx__7958f749{display:inline;}.Button_styles_1bweq1y_brzvbcx__7958f749 .Button_styles_1bweq1y_selectWithoutBoxShadow__7958f749::before{box-shadow:none !important;}
38
- .Button_styles_1bweq1y_iogt3wm__7958f749{width:100%;height:100%;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:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.Button_styles_1bweq1y_iogt3wm__7958f749 .Button_styles_1bweq1y_arrowInverse__7958f749{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
39
- .Button_styles_1bweq1y_l1gczdbd__7958f749{width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
34
+ .Button_styles_1r519o1_s1n7gats__2349e77a{--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(--plasma-select-target-height);--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);}
35
+ .Button_styles_1r519o1_isdqa5a__2349e77a{line-height:0;color:var(--plasma-select-target-button-arrow-color);}.Button_styles_1r519o1_isdqa5a__2349e77a:hover{color:var(--plasma-select-target-button-arrow-color-hover);}.Button_styles_1r519o1_isdqa5a__2349e77a:active{color:var(--plasma-select-target-button-arrow-color-active);}
36
+ .Button_styles_1r519o1_s1yfglds__2349e77a{-webkit-transition:color 0.3s ease-in,-webkit-transform 0.15s ease-in;-webkit-transition:color 0.3s ease-in,transform 0.15s ease-in;transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
37
+ .Button_styles_1r519o1_brzvbcx__2349e77a{display:inline;}.Button_styles_1r519o1_brzvbcx__2349e77a .Button_styles_1r519o1_selectWithoutBoxShadow__2349e77a::before{box-shadow:none !important;}
38
+ .Button_styles_1r519o1_logt3wm__2349e77a{display:inline;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_1r519o1_logt3wm__2349e77a .Button_styles_1r519o1_arrowInverse__2349e77a{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
40
39
 
41
40
  .base_1lwlv7t_b13tc97x__334a4e59{color:var(--plasma-chip-color);background-color:var(--plasma-chip-background);}.base_1lwlv7t_b13tc97x__334a4e59:hover{color:var(--plasma-chip-color-hover);background-color:var(--plasma-chip-background-hover);scale:var(--plasma-chip-scale-hover);}.base_1lwlv7t_b13tc97x__334a4e59:active{color:var(--plasma-chip-color-active);background-color:var(--plasma-chip-background-active);scale:var(--plasma-chip-scale-active);}
42
41
 
@@ -50,11 +49,11 @@
50
49
 
51
50
  .base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
52
51
 
53
- .Chip_styles_1l2rsrr_bol5daj__32750637{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
54
- .Chip_styles_1l2rsrr_sj20on5__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
55
- .Chip_styles_1l2rsrr_s1ror4o9__32750637{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
56
- .Chip_styles_1l2rsrr_swddmyi__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-right-content-margin-left);margin-right:var(--plasma-chip-right-content-margin-right);}
57
- .Chip_styles_1l2rsrr_s1pcflhj__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-clear-content-margin-left);margin-right:var(--plasma-chip-clear-content-margin-right);color:var(--plasma-chip-close-icon-color);}.Chip_styles_1l2rsrr_s1pcflhj__32750637:hover{color:red;}
52
+ .Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
53
+ .Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
54
+ .Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
55
+ .Chip_styles_1mwwhiw_swddmyi__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-right-content-margin-left);margin-right:var(--plasma-chip-right-content-margin-right);}
56
+ .Chip_styles_1mwwhiw_s1pcflhj__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-clear-content-margin-left);margin-right:var(--plasma-chip-clear-content-margin-right);color:var(--plasma-chip-close-icon-color);}
58
57
 
59
58
  .Chip_styles_k6znfr_s19m2v6c__1d0542ff{--plasma-chip-color:var(--plasma-select-chip-color);--plasma-chip-color-hover:var(--plasma-select-chip-color);--plasma-chip-color-active:var(--plasma-select-chip-color);--plasma-chip-background:var(--plasma-select-chip-background);--plasma-chip-background-hover:var(--plasma-select-chip-background-hover);--plasma-chip-background-active:var(--plasma-select-chip-background-active);--plasma-chip-border-radius:var(--plasma-select-chip-border-radius);--plasma-chip-height:var(--plasma-select-chip-height);--plasma-chip-padding-right:var(--plasma-select-chip-padding-right);--plasma-chip-padding-left:var(--plasma-select-chip-padding-left);--plasma-chip-font-family:var(--plasma-select-font-family);--plasma-chip-font-size:var(--plasma-select-font-size);--plasma-chip-font-style:var(--plasma-select-font-style);--plasma-chip-font-weight:var(--plasma-select-font-weight);--plasma-chip-letter-spacing:var(--plasma-select-font-letter-spacing);--plasma-chip-lineheight:var(--plasma-select-font-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-select-chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-select-chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-select-chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-select-chip-color);--plasma-chip-focus-color:var(--surface-accent);position:relative;}.Chip_styles_k6znfr_s19m2v6c__1d0542ff::before{content:'';position:absolute;top:calc(var(--plasma-select-focus-offset) * -1);left:calc(var(--plasma-select-focus-offset) * -1);right:calc(var(--plasma-select-focus-offset) * -1);bottom:calc(var(--plasma-select-focus-offset) * -1);z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:calc(var(--plasma-select-chip-border-radius) + var(--plasma-select-focus-offset));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Chip_styles_k6znfr_s19m2v6c__1d0542ff.Chip_styles_k6znfr_selectChipIsFocused__1d0542ff:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
60
59
 
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useContext, useEffect } from 'react';
2
2
  import { sizeToIconSize } from '../../../../utils/sizeToIconSize.js';
3
- import { classes } from '../../../../Select.tokens.js';
4
3
  import { cx } from '../../../../../../utils/index.js';
4
+ import { classes } from '../../../../Select.tokens.js';
5
5
  import '@linaria/react';
6
6
  import { IconDone } from '../../../../../_Icon/Icons/IconDone.js';
7
7
  import { IconDisclosureRightCentered } from '../../../../../_Icon/Icons/IconDisclosureRightCentered.js';
@@ -14,9 +14,15 @@ var Item = function Item(_ref) {
14
14
  var item = _ref.item,
15
15
  path = _ref.path,
16
16
  currentLevel = _ref.currentLevel,
17
- index = _ref.index;
17
+ index = _ref.index,
18
+ ariaControls = _ref.ariaControls,
19
+ ariaExpanded = _ref.ariaExpanded,
20
+ ariaLevel = _ref.ariaLevel,
21
+ ariaLabel = _ref.ariaLabel,
22
+ itemRole = _ref.itemRole;
18
23
  var value = item.value,
19
24
  label = item.label,
25
+ disabled = item.disabled,
20
26
  isDisabled = item.isDisabled,
21
27
  contentLeft = item.contentLeft,
22
28
  contentRight = item.contentRight;
@@ -29,7 +35,7 @@ var Item = function Item(_ref) {
29
35
  handleCheckboxChange = _useContext.handleCheckboxChange,
30
36
  handleItemClick = _useContext.handleItemClick,
31
37
  variant = _useContext.variant;
32
- var isDisabledClassName = isDisabled ? classes.dropdownItemIsDisabled : undefined;
38
+ var isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;
33
39
  var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? classes.dropdownItemIsFocused : undefined;
34
40
  var activeClass = value === (path === null || path === void 0 ? void 0 : path[currentLevel + 1]) ? classes.dropdownItemIsActive : undefined;
35
41
  useEffect(function () {
@@ -42,12 +48,12 @@ var Item = function Item(_ref) {
42
48
  }
43
49
  }, [focusedClass]);
44
50
  var handleChange = function handleChange(e) {
45
- if (isDisabled) return;
51
+ if (disabled || isDisabled) return;
46
52
  e.stopPropagation();
47
53
  handleCheckboxChange(item);
48
54
  };
49
55
  var handleClick = function handleClick(e) {
50
- if (isDisabled) return;
56
+ if (disabled || isDisabled) return;
51
57
  handleItemClick(item, e);
52
58
  };
53
59
  return /*#__PURE__*/React.createElement(Wrapper, {
@@ -55,7 +61,12 @@ var Item = function Item(_ref) {
55
61
  id: value.toString(),
56
62
  ref: ref,
57
63
  onClick: handleClick,
58
- variant: variant
64
+ variant: variant,
65
+ "aria-controls": ariaControls,
66
+ "aria-expanded": ariaExpanded,
67
+ "aria-level": ariaLevel,
68
+ "aria-label": ariaLabel,
69
+ role: itemRole
59
70
  }, /*#__PURE__*/React.createElement(IconWrapper, {
60
71
  variant: variant
61
72
  }, multiselect && /*#__PURE__*/React.createElement("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"Item.js","sources":["../../../../../../../src/components/Select/elements/Inner/elements/Item/Item.tsx"],"sourcesContent":["import React, { useEffect, useRef, FC, useContext } from 'react';\n\nimport { sizeToIconSize } from '../../../../utils';\nimport { classes } from '../../../../Select.tokens';\nimport { cx, isEmpty } from '../../../../../../utils';\nimport { IconDisclosureRightCentered, IconDone } from '../../../../../_Icon';\nimport { Context } from '../../../../Select';\n\nimport { ItemProps } from './Item.types';\nimport {\n StyledContentLeft,\n StyledContentRight,\n StyledText,\n Wrapper,\n DisclosureIconWrapper,\n StyledCheckbox,\n IconWrapper,\n StyledIndicator,\n} from './Item.styles';\n\nexport const Item: FC<ItemProps> = ({ item, path, currentLevel, index }) => {\n const { value, label, isDisabled, contentLeft, contentRight } = item;\n const ref = useRef<HTMLLIElement | null>(null);\n\n const { focusedPath, checked, multiselect, size, handleCheckboxChange, handleItemClick, variant } = useContext(\n Context,\n );\n\n const isDisabledClassName = isDisabled ? classes.dropdownItemIsDisabled : undefined;\n const focusedClass =\n currentLevel === focusedPath.length - 1 && index === focusedPath?.[currentLevel]\n ? classes.dropdownItemIsFocused\n : undefined;\n const activeClass = value === path?.[currentLevel + 1] ? classes.dropdownItemIsActive : undefined;\n\n useEffect(() => {\n if (focusedClass && ref?.current) {\n ref.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n }\n }, [focusedClass]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isDisabled) return;\n\n e.stopPropagation();\n\n handleCheckboxChange(item);\n };\n\n const handleClick = (e: React.MouseEvent<HTMLElement>) => {\n if (isDisabled) return;\n\n handleItemClick(item, e);\n };\n\n return (\n <Wrapper\n className={cx(isDisabledClassName, focusedClass, activeClass)}\n id={value.toString()}\n ref={ref}\n onClick={handleClick}\n variant={variant}\n >\n <IconWrapper variant={variant}>\n {multiselect && (\n <span onClick={(e) => e.stopPropagation()}>\n <StyledCheckbox\n checked={Boolean(checked.get(item.value))}\n indeterminate={checked.get(item.value) === 'indeterminate'}\n onChange={handleChange}\n className={classes.selectItemCheckbox}\n />\n </span>\n )}\n\n {!multiselect && checked.get(item.value) === 'dot' && <StyledIndicator size=\"s\" view=\"default\" />}\n\n {!multiselect && checked.get(item.value) === 'done' && (\n <IconDone size={sizeToIconSize(size, variant)} color=\"inherit\" />\n )}\n </IconWrapper>\n\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n\n <StyledText>{label}</StyledText>\n\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n\n {!isEmpty(item.items) && (\n <DisclosureIconWrapper>\n <IconDisclosureRightCentered size={sizeToIconSize(size, variant)} color=\"inherit\" />\n </DisclosureIconWrapper>\n )}\n </Wrapper>\n );\n};\n"],"names":["Item","_ref","item","path","currentLevel","index","value","label","isDisabled","contentLeft","contentRight","ref","useRef","_useContext","useContext","Context","focusedPath","checked","multiselect","size","handleCheckboxChange","handleItemClick","variant","isDisabledClassName","classes","dropdownItemIsDisabled","undefined","focusedClass","length","dropdownItemIsFocused","activeClass","dropdownItemIsActive","useEffect","current","scrollIntoView","behavior","block","inline","handleChange","e","stopPropagation","handleClick","React","createElement","Wrapper","className","cx","id","toString","onClick","IconWrapper","StyledCheckbox","Boolean","get","indeterminate","onChange","selectItemCheckbox","_StyledIndicator","StyledIndicator","view","IconDone","sizeToIconSize","color","StyledContentLeft","StyledText","StyledContentRight","isEmpty","items","DisclosureIconWrapper","IconDisclosureRightCentered"],"mappings":";;;;;;;;;;;;IAoBaA,IAAmB,GAAG,SAAtBA,IAAmBA,CAAAC,IAAA,EAA4C;AAAA,EAAA,IAAtCC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IAAEC,KAAK,GAAAJ,IAAA,CAALI,KAAK,CAAA;AACjE,EAAA,IAAQC,KAAK,GAAmDJ,IAAI,CAA5DI,KAAK;IAAEC,KAAK,GAA4CL,IAAI,CAArDK,KAAK;IAAEC,UAAU,GAAgCN,IAAI,CAA9CM,UAAU;IAAEC,WAAW,GAAmBP,IAAI,CAAlCO,WAAW;IAAEC,YAAY,GAAKR,IAAI,CAArBQ,YAAY,CAAA;AAC3D,EAAA,IAAMC,GAAG,GAAGC,MAAM,CAAuB,IAAI,CAAC,CAAA;AAE9C,EAAA,IAAAC,WAAA,GAAoGC,UAAU,CAC1GC,OACJ,CAAC;IAFOC,WAAW,GAAAH,WAAA,CAAXG,WAAW;IAAEC,OAAO,GAAAJ,WAAA,CAAPI,OAAO;IAAEC,WAAW,GAAAL,WAAA,CAAXK,WAAW;IAAEC,IAAI,GAAAN,WAAA,CAAJM,IAAI;IAAEC,oBAAoB,GAAAP,WAAA,CAApBO,oBAAoB;IAAEC,eAAe,GAAAR,WAAA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vC,IAAAA,IAAI,EAAC,GAAG;AAACwC,IAAAA,IAAI,EAAC,SAAA;GAAW,CAAC,IAEhG,CAACzC,WAAW,IAAID,OAAO,CAACoC,GAAG,CAACnD,IAAI,CAACI,KAAK,CAAC,KAAK,MAAM,iBAC/CoC,KAAA,CAAAC,aAAA,CAACiB,QAAQ,EAAA;AAACzC,IAAAA,IAAI,EAAE0C,cAAc,CAAC1C,IAAI,EAAEG,OAAO,CAAE;AAACwC,IAAAA,KAAK,EAAC,SAAA;GAAW,CAE3D,CAAC,EAEbrD,WAAW,iBAAIiC,KAAA,CAAAC,aAAA,CAACoB,iBAAiB,EAAEtD,IAAAA,EAAAA,WAA+B,CAAC,eAEpEiC,KAAA,CAAAC,aAAA,CAACqB,UAAU,QAAEzD,KAAkB,CAAC,EAE/BG,YAAY,iBAAIgC,KAAA,CAAAC,aAAA,CAACsB,kBAAkB,EAAA,IAAA,EAAEvD,YAAiC,CAAC,EAEvE,CAACwD,OAAO,CAAChE,IAAI,CAACiE,KAAK,CAAC,iBACjBzB,KAAA,CAAAC,aAAA,CAACyB,qBAAqB,qBAClB1B,KAAA,CAAAC,aAAA,CAAC0B,2BAA2B,EAAA;AAAClD,IAAAA,IAAI,EAAE0C,cAAc,CAAC1C,IAAI,EAAEG,OAAO,CAAE;AAACwC,IAAAA,KAAK,EAAC,SAAA;GAAW,CAChE,CAEtB,CAAC,CAAA;AAElB;;;;"}
1
+ {"version":3,"file":"Item.js","sources":["../../../../../../../src/components/Select/elements/Inner/elements/Item/Item.tsx"],"sourcesContent":["import React, { useEffect, useRef, FC, useContext } from 'react';\n\nimport { sizeToIconSize } from '../../../../utils';\nimport { classes } from '../../../../Select.tokens';\nimport { cx, isEmpty } from '../../../../../../utils';\nimport { IconDisclosureRightCentered, IconDone } from '../../../../../_Icon';\nimport { Context } from '../../../../Select';\n\nimport { ItemProps } from './Item.types';\nimport {\n StyledContentLeft,\n StyledContentRight,\n StyledText,\n Wrapper,\n DisclosureIconWrapper,\n StyledCheckbox,\n IconWrapper,\n StyledIndicator,\n} from './Item.styles';\n\nexport const Item: FC<ItemProps> = ({\n item,\n path,\n currentLevel,\n index,\n ariaControls,\n ariaExpanded,\n ariaLevel,\n ariaLabel,\n itemRole,\n}) => {\n const { value, label, disabled, isDisabled, contentLeft, contentRight } = item;\n const ref = useRef<HTMLLIElement | null>(null);\n\n const { focusedPath, checked, multiselect, size, handleCheckboxChange, handleItemClick, variant } = useContext(\n Context,\n );\n\n const isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;\n const focusedClass =\n currentLevel === focusedPath.length - 1 && index === focusedPath?.[currentLevel]\n ? classes.dropdownItemIsFocused\n : undefined;\n const activeClass = value === path?.[currentLevel + 1] ? classes.dropdownItemIsActive : undefined;\n\n useEffect(() => {\n if (focusedClass && ref?.current) {\n ref.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n }\n }, [focusedClass]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (disabled || isDisabled) return;\n\n e.stopPropagation();\n\n handleCheckboxChange(item);\n };\n\n const handleClick = (e: React.MouseEvent<HTMLElement>) => {\n if (disabled || isDisabled) return;\n\n handleItemClick(item, e);\n };\n\n return (\n <Wrapper\n className={cx(isDisabledClassName, focusedClass, activeClass)}\n id={value.toString()}\n ref={ref}\n onClick={handleClick}\n variant={variant}\n aria-controls={ariaControls}\n aria-expanded={ariaExpanded}\n aria-level={ariaLevel}\n aria-label={ariaLabel}\n role={itemRole}\n >\n <IconWrapper variant={variant}>\n {multiselect && (\n <span onClick={(e) => e.stopPropagation()}>\n <StyledCheckbox\n checked={Boolean(checked.get(item.value))}\n indeterminate={checked.get(item.value) === 'indeterminate'}\n onChange={handleChange}\n className={classes.selectItemCheckbox}\n />\n </span>\n )}\n\n {!multiselect && checked.get(item.value) === 'dot' && <StyledIndicator size=\"s\" view=\"default\" />}\n\n {!multiselect && checked.get(item.value) === 'done' && (\n <IconDone size={sizeToIconSize(size, variant)} color=\"inherit\" />\n )}\n </IconWrapper>\n\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n\n <StyledText>{label}</StyledText>\n\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n\n {!isEmpty(item.items) && (\n <DisclosureIconWrapper>\n <IconDisclosureRightCentered size={sizeToIconSize(size, variant)} color=\"inherit\" />\n </DisclosureIconWrapper>\n )}\n </Wrapper>\n );\n};\n"],"names":["Item","_ref","item","path","currentLevel","index","ariaControls","ariaExpanded","ariaLevel","ariaLabel","itemRole","value","label","disabled","isDisabled","contentLeft","contentRight","ref","useRef","_useContext","useContext","Context","focusedPath","checked","multiselect","size","handleCheckboxChange","handleItemClick","variant","isDisabledClassName","classes","dropdownItemIsDisabled","undefined","focusedClass","length","dropdownItemIsFocused","activeClass","dropdownItemIsActive","useEffect","current","scrollIntoView","behavior","block","inline","handleChange","e","stopPropagation","handleClick","React","createElement","Wrapper","className","cx","id","toString","onClick","role","IconWrapper","StyledCheckbox","Boolean","get","indeterminate","onChange","selectItemCheckbox","_StyledIndicator","StyledIndicator","view","IconDone","sizeToIconSize","color","StyledContentLeft","StyledText","StyledContentRight","isEmpty","items","DisclosureIconWrapper","IconDisclosureRightCentered"],"mappings":";;;;;;;;;;;;IAoBaA,IAAmB,GAAG,SAAtBA,IAAmBA,CAAAC,IAAA,EAU1B;AAAA,EAAA,IATFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,SAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,SAAS,GAAAR,IAAA,CAATQ,SAAS;IACTC,QAAQ,GAAAT,IAAA,CAARS,QAAQ,CAAA;AAER,EAA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,EAAAA,WAA+B,CAAC,eAEpEiC,KAAA,CAAAC,aAAA,CAACsB,UAAU,QAAE3D,KAAkB,CAAC,EAE/BI,YAAY,iBAAIgC,KAAA,CAAAC,aAAA,CAACuB,kBAAkB,EAAA,IAAA,EAAExD,YAAiC,CAAC,EAEvE,CAACyD,OAAO,CAACvE,IAAI,CAACwE,KAAK,CAAC,iBACjB1B,KAAA,CAAAC,aAAA,CAAC0B,qBAAqB,qBAClB3B,KAAA,CAAAC,aAAA,CAAC2B,2BAA2B,EAAA;AAACnD,IAAAA,IAAI,EAAE2C,cAAc,CAAC3C,IAAI,EAAEG,OAAO,CAAE;AAACyC,IAAAA,KAAK,EAAC,SAAA;GAAW,CAChE,CAEtB,CAAC,CAAA;AAElB;;;;"}
@@ -26,12 +26,11 @@
26
26
  .Button_styles_1oz1dew_s1rjh7ra__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);}
27
27
  .Button_styles_1oz1dew_b9ga1dj__a16b28b2{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1oz1dew_b9ga1dj__a16b28b2{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_buttonSquare__a16b28b2{width:var(--plasma-button-height);padding:0;}
28
28
 
29
- .Button_styles_1bweq1y_s1n7gats__7958f749{--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(--plasma-select-target-height);--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);}
30
- .Button_styles_1bweq1y_isdqa5a__7958f749{line-height:0;color:var(--plasma-select-target-button-arrow-color);}.Button_styles_1bweq1y_isdqa5a__7958f749:hover{color:var(--plasma-select-target-button-arrow-color-hover);}.Button_styles_1bweq1y_isdqa5a__7958f749:active{color:var(--plasma-select-target-button-arrow-color-active);}
31
- .Button_styles_1bweq1y_s1yfglds__7958f749{-webkit-transition:color 0.3s ease-in,-webkit-transform 0.15s ease-in;-webkit-transition:color 0.3s ease-in,transform 0.15s ease-in;transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
32
- .Button_styles_1bweq1y_brzvbcx__7958f749{display:inline;}.Button_styles_1bweq1y_brzvbcx__7958f749 .Button_styles_1bweq1y_selectWithoutBoxShadow__7958f749::before{box-shadow:none !important;}
33
- .Button_styles_1bweq1y_iogt3wm__7958f749{width:100%;height:100%;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:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.Button_styles_1bweq1y_iogt3wm__7958f749 .Button_styles_1bweq1y_arrowInverse__7958f749{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
34
- .Button_styles_1bweq1y_l1gczdbd__7958f749{width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
29
+ .Button_styles_1r519o1_s1n7gats__2349e77a{--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(--plasma-select-target-height);--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);}
30
+ .Button_styles_1r519o1_isdqa5a__2349e77a{line-height:0;color:var(--plasma-select-target-button-arrow-color);}.Button_styles_1r519o1_isdqa5a__2349e77a:hover{color:var(--plasma-select-target-button-arrow-color-hover);}.Button_styles_1r519o1_isdqa5a__2349e77a:active{color:var(--plasma-select-target-button-arrow-color-active);}
31
+ .Button_styles_1r519o1_s1yfglds__2349e77a{-webkit-transition:color 0.3s ease-in,-webkit-transform 0.15s ease-in;-webkit-transition:color 0.3s ease-in,transform 0.15s ease-in;transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
32
+ .Button_styles_1r519o1_brzvbcx__2349e77a{display:inline;}.Button_styles_1r519o1_brzvbcx__2349e77a .Button_styles_1r519o1_selectWithoutBoxShadow__2349e77a::before{box-shadow:none !important;}
33
+ .Button_styles_1r519o1_logt3wm__2349e77a{display:inline;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_1r519o1_logt3wm__2349e77a .Button_styles_1r519o1_arrowInverse__2349e77a{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
35
34
 
36
35
  .base_1lwlv7t_b13tc97x__334a4e59{color:var(--plasma-chip-color);background-color:var(--plasma-chip-background);}.base_1lwlv7t_b13tc97x__334a4e59:hover{color:var(--plasma-chip-color-hover);background-color:var(--plasma-chip-background-hover);scale:var(--plasma-chip-scale-hover);}.base_1lwlv7t_b13tc97x__334a4e59:active{color:var(--plasma-chip-color-active);background-color:var(--plasma-chip-background-active);scale:var(--plasma-chip-scale-active);}
37
36
 
@@ -45,11 +44,11 @@
45
44
 
46
45
  .base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
47
46
 
48
- .Chip_styles_1l2rsrr_bol5daj__32750637{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
49
- .Chip_styles_1l2rsrr_sj20on5__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
50
- .Chip_styles_1l2rsrr_s1ror4o9__32750637{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
51
- .Chip_styles_1l2rsrr_swddmyi__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-right-content-margin-left);margin-right:var(--plasma-chip-right-content-margin-right);}
52
- .Chip_styles_1l2rsrr_s1pcflhj__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-clear-content-margin-left);margin-right:var(--plasma-chip-clear-content-margin-right);color:var(--plasma-chip-close-icon-color);}.Chip_styles_1l2rsrr_s1pcflhj__32750637:hover{color:red;}
47
+ .Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
48
+ .Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
49
+ .Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
50
+ .Chip_styles_1mwwhiw_swddmyi__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-right-content-margin-left);margin-right:var(--plasma-chip-right-content-margin-right);}
51
+ .Chip_styles_1mwwhiw_s1pcflhj__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-clear-content-margin-left);margin-right:var(--plasma-chip-clear-content-margin-right);color:var(--plasma-chip-close-icon-color);}
53
52
 
54
53
  .Chip_styles_k6znfr_s19m2v6c__1d0542ff{--plasma-chip-color:var(--plasma-select-chip-color);--plasma-chip-color-hover:var(--plasma-select-chip-color);--plasma-chip-color-active:var(--plasma-select-chip-color);--plasma-chip-background:var(--plasma-select-chip-background);--plasma-chip-background-hover:var(--plasma-select-chip-background-hover);--plasma-chip-background-active:var(--plasma-select-chip-background-active);--plasma-chip-border-radius:var(--plasma-select-chip-border-radius);--plasma-chip-height:var(--plasma-select-chip-height);--plasma-chip-padding-right:var(--plasma-select-chip-padding-right);--plasma-chip-padding-left:var(--plasma-select-chip-padding-left);--plasma-chip-font-family:var(--plasma-select-font-family);--plasma-chip-font-size:var(--plasma-select-font-size);--plasma-chip-font-style:var(--plasma-select-font-style);--plasma-chip-font-weight:var(--plasma-select-font-weight);--plasma-chip-letter-spacing:var(--plasma-select-font-letter-spacing);--plasma-chip-lineheight:var(--plasma-select-font-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-select-chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-select-chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-select-chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-select-chip-color);--plasma-chip-focus-color:var(--surface-accent);position:relative;}.Chip_styles_k6znfr_s19m2v6c__1d0542ff::before{content:'';position:absolute;top:calc(var(--plasma-select-focus-offset) * -1);left:calc(var(--plasma-select-focus-offset) * -1);right:calc(var(--plasma-select-focus-offset) * -1);bottom:calc(var(--plasma-select-focus-offset) * -1);z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:calc(var(--plasma-select-chip-border-radius) + var(--plasma-select-focus-offset));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Chip_styles_k6znfr_s19m2v6c__1d0542ff.Chip_styles_k6znfr_selectChipIsFocused__1d0542ff:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
55
54
 
@@ -18,7 +18,9 @@ var Target = function Target(_ref) {
18
18
  size = _ref.size,
19
19
  contentLeft = _ref.contentLeft,
20
20
  disabled = _ref.disabled,
21
- renderTargetLabel = _ref.renderTargetLabel;
21
+ renderValue = _ref.renderValue,
22
+ focusedPath = _ref.focusedPath,
23
+ focusedToValueMap = _ref.focusedToValueMap;
22
24
  return target === 'button' ? /*#__PURE__*/React.createElement(Button, {
23
25
  opened: opened,
24
26
  value: value,
@@ -29,7 +31,9 @@ var Target = function Target(_ref) {
29
31
  label: label,
30
32
  size: size,
31
33
  disabled: disabled,
32
- renderTargetLabel: renderTargetLabel
34
+ renderValue: renderValue,
35
+ focusedPath: focusedPath,
36
+ focusedToValueMap: focusedToValueMap
33
37
  }) : /*#__PURE__*/React.createElement(Textfield, {
34
38
  opened: opened,
35
39
  value: value,
@@ -45,7 +49,9 @@ var Target = function Target(_ref) {
45
49
  size: size,
46
50
  contentLeft: contentLeft,
47
51
  disabled: disabled,
48
- renderTargetLabel: renderTargetLabel
52
+ renderValue: renderValue,
53
+ focusedPath: focusedPath,
54
+ focusedToValueMap: focusedToValueMap
49
55
  });
50
56
  };
51
57
 
@@ -1 +1 @@
1
- {"version":3,"file":"Target.js","sources":["../../../../../src/components/Select/elements/Target/Target.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { TargetProps } from './Target.types';\nimport { Button } from './elements/Button/Button';\nimport { Textfield } from './elements/Textfield/Textfield';\n\nexport const Target: React.FC<TargetProps> = ({\n value,\n multiselect,\n isTargetAmount,\n target,\n opened,\n valueToItemMap,\n onChipClick,\n label,\n placeholder,\n onKeyDown,\n focusedChipIndex,\n labelPlacement,\n size,\n contentLeft,\n disabled,\n renderTargetLabel,\n}) => {\n return target === 'button' ? (\n <Button\n opened={opened}\n value={value}\n isTargetAmount={isTargetAmount}\n multiselect={multiselect}\n valueToItemMap={valueToItemMap}\n onKeyDown={onKeyDown}\n label={label}\n size={size}\n disabled={disabled}\n renderTargetLabel={renderTargetLabel}\n />\n ) : (\n <Textfield\n opened={opened}\n value={value}\n isTargetAmount={isTargetAmount}\n multiselect={multiselect}\n valueToItemMap={valueToItemMap}\n onChipClick={onChipClick}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n focusedChipIndex={focusedChipIndex}\n labelPlacement={labelPlacement}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderTargetLabel={renderTargetLabel}\n />\n );\n};\n"],"names":["Target","_ref","value","multiselect","isTargetAmount","target","opened","valueToItemMap","onChipClick","label","placeholder","onKeyDown","focusedChipIndex","labelPlacement","size","contentLeft","disabled","renderTargetLabel","React","createElement","Button","Textfield"],"mappings":";;;;IAMaA,MAA6B,GAAG,SAAhCA,MAA6BA,CAAAC,IAAA,EAiBpC;AAAA,EAAA,IAhBFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IACdC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,MAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,cAAc,GAAAN,IAAA,CAAdM,cAAc;IACdC,WAAW,GAAAP,IAAA,CAAXO,WAAW;IACXC,KAAK,GAAAR,IAAA,CAALQ,KAAK;IACLC,WAAW,GAAAT,IAAA,CAAXS,WAAW;IACXC,SAAS,GAAAV,IAAA,CAATU,SAAS;IACTC,gBAAgB,GAAAX,IAAA,CAAhBW,gBAAgB;IAChBC,cAAc,GAAAZ,IAAA,CAAdY,cAAc;IACdC,IAAI,GAAAb,IAAA,CAAJa,IAAI;IACJC,WAAW,GAAAd,IAAA,CAAXc,WAAW;IACXC,QAAQ,GAAAf,IAAA,CAARe,QAAQ;IACRC,iBAAiB,GAAAhB,IAAA,CAAjBgB,iBAAiB,CAAA;EAEjB,OAAOZ,MAAM,KAAK,QAAQ,gBACtBa,KAAA,CAAAC,aAAA,CAACC,MAAM,EAAA;AACHd,IAAAA,MAAM,EAAEA,MAAO;AACfJ,IAAAA,KAAK,EAAEA,KAAM;AACbE,IAAAA,cAAc,EAAEA,cAAe;AAC/BD,IAAAA,WAAW,EAAEA,WAAY;AACzBI,IAAAA,cAAc,EAAEA,cAAe;AAC/BI,IAAAA,SAAS,EAAEA,SAAU;AACrBF,IAAAA,KAAK,EAAEA,KAAM;AACbK,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,iBAAiB,EAAEA,iBAAAA;AAAkB,GACxC,CAAC,gBAEFC,KAAA,CAAAC,aAAA,CAACE,SAAS,EAAA;AACNf,IAAAA,MAAM,EAAEA,MAAO;AACfJ,IAAAA,KAAK,EAAEA,KAAM;AACbE,IAAAA,cAAc,EAAEA,cAAe;AAC/BD,IAAAA,WAAW,EAAEA,WAAY;AACzBI,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,WAAW,EAAEA,WAAY;AACzBC,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,WAAW,EAAEA,WAAY;AACzBC,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,gBAAgB,EAAEA,gBAAiB;AACnCC,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,WAAW,EAAEA,WAAY;AACzBC,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,iBAAiB,EAAEA,iBAAAA;AAAkB,GACxC,CACJ,CAAA;AACL;;;;"}
1
+ {"version":3,"file":"Target.js","sources":["../../../../../src/components/Select/elements/Target/Target.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { TargetProps } from './Target.types';\nimport { Button } from './elements/Button/Button';\nimport { Textfield } from './elements/Textfield/Textfield';\n\nexport const Target: React.FC<TargetProps> = ({\n value,\n multiselect,\n isTargetAmount,\n target,\n opened,\n valueToItemMap,\n onChipClick,\n label,\n placeholder,\n onKeyDown,\n focusedChipIndex,\n labelPlacement,\n size,\n contentLeft,\n disabled,\n renderValue,\n focusedPath,\n focusedToValueMap,\n}) => {\n return target === 'button' ? (\n <Button\n opened={opened}\n value={value}\n isTargetAmount={isTargetAmount}\n multiselect={multiselect}\n valueToItemMap={valueToItemMap}\n onKeyDown={onKeyDown}\n label={label}\n size={size}\n disabled={disabled}\n renderValue={renderValue}\n focusedPath={focusedPath}\n focusedToValueMap={focusedToValueMap}\n />\n ) : (\n <Textfield\n opened={opened}\n value={value}\n isTargetAmount={isTargetAmount}\n multiselect={multiselect}\n valueToItemMap={valueToItemMap}\n onChipClick={onChipClick}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n focusedChipIndex={focusedChipIndex}\n labelPlacement={labelPlacement}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n focusedPath={focusedPath}\n focusedToValueMap={focusedToValueMap}\n />\n );\n};\n"],"names":["Target","_ref","value","multiselect","isTargetAmount","target","opened","valueToItemMap","onChipClick","label","placeholder","onKeyDown","focusedChipIndex","labelPlacement","size","contentLeft","disabled","renderValue","focusedPath","focusedToValueMap","React","createElement","Button","Textfield"],"mappings":";;;;IAMaA,MAA6B,GAAG,SAAhCA,MAA6BA,CAAAC,IAAA,EAmBpC;AAAA,EAAA,IAlBFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IACdC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,MAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,cAAc,GAAAN,IAAA,CAAdM,cAAc;IACdC,WAAW,GAAAP,IAAA,CAAXO,WAAW;IACXC,KAAK,GAAAR,IAAA,CAALQ,KAAK;IACLC,WAAW,GAAAT,IAAA,CAAXS,WAAW;IACXC,SAAS,GAAAV,IAAA,CAATU,SAAS;IACTC,gBAAgB,GAAAX,IAAA,CAAhBW,gBAAgB;IAChBC,cAAc,GAAAZ,IAAA,CAAdY,cAAc;IACdC,IAAI,GAAAb,IAAA,CAAJa,IAAI;IACJC,WAAW,GAAAd,IAAA,CAAXc,WAAW;IACXC,QAAQ,GAAAf,IAAA,CAARe,QAAQ;IACRC,WAAW,GAAAhB,IAAA,CAAX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iBAAAA;AAAkB,GACxC,CACJ,CAAA;AACL;;;;"}
@@ -26,9 +26,8 @@
26
26
  .Button_styles_1oz1dew_s1rjh7ra__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);}
27
27
  .Button_styles_1oz1dew_b9ga1dj__a16b28b2{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1oz1dew_b9ga1dj__a16b28b2{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_buttonSquare__a16b28b2{width:var(--plasma-button-height);padding:0;}
28
28
 
29
- .Button_styles_1bweq1y_s1n7gats__7958f749{--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(--plasma-select-target-height);--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);}
30
- .Button_styles_1bweq1y_isdqa5a__7958f749{line-height:0;color:var(--plasma-select-target-button-arrow-color);}.Button_styles_1bweq1y_isdqa5a__7958f749:hover{color:var(--plasma-select-target-button-arrow-color-hover);}.Button_styles_1bweq1y_isdqa5a__7958f749:active{color:var(--plasma-select-target-button-arrow-color-active);}
31
- .Button_styles_1bweq1y_s1yfglds__7958f749{-webkit-transition:color 0.3s ease-in,-webkit-transform 0.15s ease-in;-webkit-transition:color 0.3s ease-in,transform 0.15s ease-in;transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
32
- .Button_styles_1bweq1y_brzvbcx__7958f749{display:inline;}.Button_styles_1bweq1y_brzvbcx__7958f749 .Button_styles_1bweq1y_selectWithoutBoxShadow__7958f749::before{box-shadow:none !important;}
33
- .Button_styles_1bweq1y_iogt3wm__7958f749{width:100%;height:100%;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:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.Button_styles_1bweq1y_iogt3wm__7958f749 .Button_styles_1bweq1y_arrowInverse__7958f749{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
34
- .Button_styles_1bweq1y_l1gczdbd__7958f749{width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
29
+ .Button_styles_1r519o1_s1n7gats__2349e77a{--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(--plasma-select-target-height);--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);}
30
+ .Button_styles_1r519o1_isdqa5a__2349e77a{line-height:0;color:var(--plasma-select-target-button-arrow-color);}.Button_styles_1r519o1_isdqa5a__2349e77a:hover{color:var(--plasma-select-target-button-arrow-color-hover);}.Button_styles_1r519o1_isdqa5a__2349e77a:active{color:var(--plasma-select-target-button-arrow-color-active);}
31
+ .Button_styles_1r519o1_s1yfglds__2349e77a{-webkit-transition:color 0.3s ease-in,-webkit-transform 0.15s ease-in;-webkit-transition:color 0.3s ease-in,transform 0.15s ease-in;transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
32
+ .Button_styles_1r519o1_brzvbcx__2349e77a{display:inline;}.Button_styles_1r519o1_brzvbcx__2349e77a .Button_styles_1r519o1_selectWithoutBoxShadow__2349e77a::before{box-shadow:none !important;}
33
+ .Button_styles_1r519o1_logt3wm__2349e77a{display:inline;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_1r519o1_logt3wm__2349e77a .Button_styles_1r519o1_arrowInverse__2349e77a{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
@@ -1,40 +1,31 @@
1
1
  import React from 'react';
2
2
  import { cx } from '../../../../../../utils/index.js';
3
3
  import { classes } from '../../../../Select.tokens.js';
4
- import { ButtonWrapper, StyledButton, IconArrowWrapper, StyledArrow, InnerWrapper, Label } from './Button.styles.js';
5
- import { isEmpty } from '../../../../../../utils/isEmpty.js';
4
+ import { getButtonLabel } from '../../../../utils/getButtonLabel.js';
5
+ import { ButtonWrapper, StyledButton, IconArrowWrapper, StyledArrow, Label } from './Button.styles.js';
6
6
 
7
- var getLabel = function getLabel(_ref) {
8
- var value = _ref.value,
9
- label = _ref.label,
7
+ var Button = function Button(_ref) {
8
+ var opened = _ref.opened,
9
+ value = _ref.value,
10
10
  isTargetAmount = _ref.isTargetAmount,
11
11
  multiselect = _ref.multiselect,
12
- valueToItemMap = _ref.valueToItemMap;
13
- if (isEmpty(value)) {
14
- return label;
15
- }
16
- if (multiselect && isTargetAmount) {
17
- return "\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ".concat(value.length);
18
- }
19
- if (multiselect && Array.isArray(value)) {
20
- return value.map(function (value) {
21
- return valueToItemMap.get(value).label;
22
- }).join(', ');
23
- }
24
- return valueToItemMap.get(value.toString()).label;
25
- };
26
- var Button = function Button(_ref2) {
27
- var opened = _ref2.opened,
28
- value = _ref2.value,
29
- isTargetAmount = _ref2.isTargetAmount,
30
- multiselect = _ref2.multiselect,
31
- valueToItemMap = _ref2.valueToItemMap,
32
- onKeyDown = _ref2.onKeyDown,
33
- label = _ref2.label,
34
- size = _ref2.size,
35
- disabled = _ref2.disabled;
12
+ valueToItemMap = _ref.valueToItemMap,
13
+ onKeyDown = _ref.onKeyDown,
14
+ label = _ref.label,
15
+ size = _ref.size,
16
+ disabled = _ref.disabled,
17
+ renderValue = _ref.renderValue,
18
+ focusedPath = _ref.focusedPath,
19
+ focusedToValueMap = _ref.focusedToValueMap;
36
20
  var withArrowInverse = opened ? classes.arrowInverse : undefined;
37
21
  var iconSize = size === 'xs' ? 'xs' : 's';
22
+ var getActiveDescendant = function getActiveDescendant() {
23
+ var _focusedToValueMap$ge;
24
+ var focusedPathAsString = focusedPath.reduce(function (acc, n) {
25
+ return "".concat(acc, "/").concat(n);
26
+ }, '').replace(/^(\/)/, '');
27
+ return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
28
+ };
38
29
  return /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(StyledButton, {
39
30
  stretching: "filled",
40
31
  onKeyDown: onKeyDown,
@@ -44,14 +35,19 @@ var Button = function Button(_ref2) {
44
35
  size: iconSize,
45
36
  color: "inherit",
46
37
  className: cx(classes.selectTargetArrow, withArrowInverse)
47
- }))
48
- }, /*#__PURE__*/React.createElement(InnerWrapper, null, /*#__PURE__*/React.createElement(Label, null, getLabel({
38
+ })),
39
+ role: "combobox",
40
+ "aria-controls": "tree_level_1",
41
+ "aria-expanded": opened,
42
+ "aria-activedescendant": getActiveDescendant()
43
+ }, /*#__PURE__*/React.createElement(Label, null, getButtonLabel({
49
44
  value: value,
50
45
  isTargetAmount: isTargetAmount,
51
46
  multiselect: multiselect,
52
47
  valueToItemMap: valueToItemMap,
53
- label: label
54
- })))));
48
+ label: label,
49
+ renderValue: renderValue
50
+ }))));
55
51
  };
56
52
 
57
53
  export { Button };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.tsx"],"sourcesContent":["import React from 'react';\n\nimport { cx, isEmpty } from '../../../../../../utils';\nimport { classes } from '../../../../Select.tokens';\n\nimport { ButtonProps, GetLabelProps } from './Button.types';\nimport { StyledButton, StyledArrow, InnerWrapper, Label, ButtonWrapper, IconArrowWrapper } from './Button.styles';\n\nconst getLabel = ({ value, label, isTargetAmount, multiselect, valueToItemMap }: GetLabelProps) => {\n if (isEmpty(value)) {\n return label;\n }\n\n if (multiselect && isTargetAmount) {\n return `Выбрано: ${value.length}`;\n }\n\n if (multiselect && Array.isArray(value)) {\n return value.map((value) => valueToItemMap.get(value)!.label).join(', ');\n }\n\n return valueToItemMap.get(value.toString())!.label;\n};\n\nexport const Button: React.FC<ButtonProps> = ({\n opened,\n value,\n isTargetAmount,\n multiselect,\n valueToItemMap,\n onKeyDown,\n label,\n size,\n disabled,\n}) => {\n const withArrowInverse = opened ? classes.arrowInverse : undefined;\n\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n return (\n <ButtonWrapper>\n <StyledButton\n stretching=\"filled\"\n onKeyDown={onKeyDown}\n className={opened ? classes.selectWithoutBoxShadow : undefined}\n disabled={disabled}\n contentRight={\n <IconArrowWrapper>\n <StyledArrow\n size={iconSize}\n color=\"inherit\"\n className={cx(classes.selectTargetArrow, withArrowInverse)}\n />\n </IconArrowWrapper>\n }\n >\n <InnerWrapper>\n <Label>\n {getLabel({\n value,\n isTargetAmount,\n multiselect,\n valueToItemMap,\n label,\n })}\n </Label>\n </InnerWrapper>\n </StyledButton>\n </ButtonWrapper>\n );\n};\n"],"names":["getLabel","_ref","value","label","isTargetAmount","multiselect","valueToItemMap","isEmpty","concat","length","Array","isArray","map","get","join","toString","Button","_ref2","opened","onKeyDown","size","disabled","withArrowInverse","classes","arrowInverse","undefined","iconSize","React","createElement","ButtonWrapper","StyledButton","stretching","className","selectWithoutBoxShadow","contentRight","IconArrowWrapper","StyledArrow","color","cx","selectTargetArrow","InnerWrapper","Label"],"mappings":";;;;;;AAQA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAqF;AAAA,EAAA,IAA/EC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IAAEC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IAAEC,cAAc,GAAAL,IAAA,CAAdK,cAAc,CAAA;AACzE,EAAA,IAAIC,OAAO,CAACL,KAAK,CAAC,EAAE;AAChB,IAAA,OAAOC,KAAK,CAAA;AACh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SAAS,EAAEA,SAAU;AACrBa,IAAAA,SAAS,EAAEd,MAAM,GAAGK,OAAO,CAACU,sBAAsB,GAAGR,SAAU;AAC/DJ,IAAAA,QAAQ,EAAEA,QAAS;IACnBa,YAAY,eACRP,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA,IAAA,eACbR,KAAA,CAAAC,aAAA,CAACQ,WAAW,EAAA;AACRhB,MAAAA,IAAI,EAAEM,QAAS;AACfW,MAAAA,KAAK,EAAC,SAAS;AACfL,MAAAA,SAAS,EAAEM,EAAE,CAACf,OAAO,CAACgB,iBAAiB,EAAEjB,gBAAgB,CAAA;AAAE,KAC9D,CACa,CAAA;AACrB,GAAA,eAEDK,KAAA,CAAAC,aAAA,CAACY,YAAY,EAAA,IAAA,eACTb,KAAA,CAAAC,aAAA,CAACa,KAAK,EAAA,IAAA,EACDzC,QAAQ,CAAC;AACNE,IAAAA,KAAK,EAALA,KAAK;AACLE,IAAAA,cAAc,EAAdA,cAAc;AACdC,IAAAA,WAAW,EAAXA,WAAW;AACXC,IAAAA,cAAc,EAAdA,cAAc;AACdH,IAAAA,KAAK,EAALA,KAAAA;AACJ,GAAC,CACE,CACG,CACJ,CACH,CAAC,CAAA;AAExB;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.tsx"],"sourcesContent":["import React from 'react';\n\nimport { cx } from '../../../../../../utils';\nimport { classes } from '../../../../Select.tokens';\nimport { getButtonLabel } from '../../../../utils';\n\nimport { ButtonProps } from './Button.types';\nimport { StyledButton, StyledArrow, Label, ButtonWrapper, IconArrowWrapper } from './Button.styles';\n\nexport const Button: React.FC<ButtonProps> = ({\n opened,\n value,\n isTargetAmount,\n multiselect,\n valueToItemMap,\n onKeyDown,\n label,\n size,\n disabled,\n renderValue,\n focusedPath,\n focusedToValueMap,\n}) => {\n const withArrowInverse = opened ? classes.arrowInverse : undefined;\n\n const iconSize = size === 'xs' ? 'xs' : 's';\n\n const getActiveDescendant = () => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n return focusedToValueMap?.get(focusedPathAsString)?.value.toString();\n };\n\n return (\n <ButtonWrapper>\n <StyledButton\n stretching=\"filled\"\n onKeyDown={onKeyDown}\n className={opened ? classes.selectWithoutBoxShadow : undefined}\n disabled={disabled}\n contentRight={\n <IconArrowWrapper>\n <StyledArrow\n size={iconSize}\n color=\"inherit\"\n className={cx(classes.selectTargetArrow, withArrowInverse)}\n />\n </IconArrowWrapper>\n }\n role=\"combobox\"\n aria-controls=\"tree_level_1\"\n aria-expanded={opened}\n aria-activedescendant={getActiveDescendant()}\n >\n <Label>\n {getButtonLabel({\n value,\n isTargetAmount,\n multiselect,\n valueToItemMap,\n label,\n renderValue,\n })}\n </Label>\n </StyledButton>\n </ButtonWrapper>\n );\n};\n"],"names":["Button","_ref","opened","value","isTargetAmount","multiselect","valueToItemMap","onKeyDown","label","size","disabled","renderValue","focusedPath","focusedToValueMap","withArrowInverse","classes","arrowInverse","undefined","iconSize","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","concat","replace","get","toString","React","createElement","ButtonWrapper","StyledButton","stretching","className","selectWithoutBoxShadow","contentRight","IconArrowWrapper","StyledArrow","color","cx","selectTargetArrow","role","Label","getButtonLabel"],"mappings":";;;;;;IASaA,MAA6B,GAAG,SAAhCA,MAA6BA,CAAAC,IAAA,EAapC;AAAA,EAAA,IAZFC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IACdC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,cAAc,GAAAL,IAAA,CAAdK,cAAc;IACdC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,KAAK,GAAAP,IAAA,CAALO,KAAK;IACLC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IACJC,QAAQ,GA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,CAAAC,aAAA,CAACO,gBAAgB,EAAA,IAAA,eACbR,KAAA,CAAAC,aAAA,CAACQ,WAAW,EAAA;AACR7B,MAAAA,IAAI,EAAES,QAAS;AACfqB,MAAAA,KAAK,EAAC,SAAS;AACfL,MAAAA,SAAS,EAAEM,EAAE,CAACzB,OAAO,CAAC0B,iBAAiB,EAAE3B,gBAAgB,CAAA;AAAE,KAC9D,CACa,CACrB;AACD4B,IAAAA,IAAI,EAAC,UAAU;AACf,IAAA,eAAA,EAAc,cAAc;AAC5B,IAAA,eAAA,EAAexC,MAAO;AACtB,IAAA,uBAAA,EAAuBiB,mBAAmB,EAAC;AAAE,GAAA,eAE7CU,KAAA,CAAAC,aAAA,CAACa,KAAK,EAAA,IAAA,EACDC,cAAc,CAAC;AACZzC,IAAAA,KAAK,EAALA,KAAK;AACLC,IAAAA,cAAc,EAAdA,cAAc;AACdC,IAAAA,WAAW,EAAXA,WAAW;AACXC,IAAAA,cAAc,EAAdA,cAAc;AACdE,IAAAA,KAAK,EAALA,KAAK;AACLG,IAAAA,WAAW,EAAXA,WAAAA;GACH,CACE,CACG,CACH,CAAC,CAAA;AAExB;;;;"}
@@ -1,4 +1,4 @@
1
- import './Button.styles_1bweq1y.css';
1
+ import './Button.styles_1r519o1.css';
2
2
  import { styled } from '@linaria/react';
3
3
  import 'react';
4
4
  import { IconDisclosureDownCentered } from '../../../../../_Icon/Icons/IconDisclosureDownCentered.js';
@@ -34,16 +34,11 @@ var ButtonWrapper = /*#__PURE__*/styled('div')({
34
34
  "class": "brzvbcx",
35
35
  propsAsIs: false
36
36
  });
37
- var InnerWrapper = /*#__PURE__*/styled('div')({
38
- name: "InnerWrapper",
39
- "class": "iogt3wm",
40
- propsAsIs: false
41
- });
42
37
  var Label = /*#__PURE__*/styled('div')({
43
38
  name: "Label",
44
- "class": "l1gczdbd",
39
+ "class": "logt3wm",
45
40
  propsAsIs: false
46
41
  });
47
42
 
48
- export { ButtonWrapper, IconArrowWrapper, InnerWrapper, Label, StyledArrow, StyledButton };
43
+ export { ButtonWrapper, IconArrowWrapper, Label, StyledArrow, StyledButton };
49
44
  //# sourceMappingURL=Button.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.js","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { applyEllipsis } from '../../../../../../mixins';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../../../Button';\nimport { tokens, classes, constants } from '../../../../Select.tokens';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(${tokens.targetButtonColor});\n ${buttonTokens.buttonColorHover}: var(${tokens.targetButtonColorHover});\n ${buttonTokens.buttonColorActive}: var(${tokens.targetButtonColorActive});\n ${buttonTokens.buttonBackgroundColor}: var(${tokens.targetButtonBackgroundColor});\n ${buttonTokens.buttonBackgroundColorHover}: var(${tokens.targetButtonBackgroundColorHover});\n ${buttonTokens.buttonBackgroundColorActive}: var(${tokens.targetButtonBackgroundColorActive});\n ${buttonTokens.buttonRightContentMargin}: var(${tokens.targetButtonArrowMargin});\n ${buttonTokens.buttonHeight}: var(${tokens.targetHeight});\n ${buttonTokens.buttonWidth}: 100%;\n ${buttonTokens.buttonPadding}: var(${tokens.targetButtonPadding});\n ${buttonTokens.buttonRadius}: var(${tokens.borderRadius});\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}: 600;\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n ${buttonTokens.buttonDisabledOpacity}: 0.4;\n ${buttonTokens.buttonFocusColor}: var(${constants.focusColor});\n`;\n\nexport const IconArrowWrapper = styled.div`\n line-height: 0;\n color: var(${tokens.targetButtonArrowColor});\n\n &:hover {\n color: var(${tokens.targetButtonArrowColorHover});\n }\n\n &:active {\n color: var(${tokens.targetButtonArrowColorActive});\n }\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)`\n transition: color 0.3s ease-in, transform 0.15s ease-in;\n pointer-events: none;\n user-select: none;\n`;\n\nexport const ButtonWrapper = styled.div`\n display: inline;\n\n .${classes.selectWithoutBoxShadow}::before {\n box-shadow: none !important;\n }\n`;\n\nexport const InnerWrapper = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n`;\n\nexport const Label = styled.div`\n width: 100%;\n text-align: left;\n\n ${applyEllipsis()}\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp","StyledButton","styled","name","class","propsAsIs","IconArrowWrapper","_exp40","IconDisclosureDownCentered","StyledArrow","ButtonWrapper","InnerWrapper","Label"],"mappings":";;;;;;;AAQA,IAAMA,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAR3BA,SAQ2BA,IAAAA,GAAA;AAAA,EAAA,OAEVF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMG,YAAY,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAoBjC,EAAA;AAEM,IAAMC,gBAAgB,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAWrC,EAAA;AAAC,IAAAE,MAAA,GA3CgBA,SA2ChBA,MAAAA,GAAA;AAAA,EAAA,OAEgCC,0BAA0B,CAAA;AAAA,CAAA,CAAA;AAArD,IAAMC,WAAW,gBAAGP,MAAM,CAAAK,MAAA,EAAA,CAAA,CAAA;AAAAJ,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIhC,EAAA;AAEM,IAAMK,aAAa,gBAAGR,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMlC,EAAA;AAEM,IAAMM,YAAY,gBAAGT,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAUjC,EAAA;AAEM,IAAMO,KAAK,gBAAGV,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK1B;;;;"}
1
+ {"version":3,"file":"Button.styles.js","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.styles.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { applyEllipsis } from '../../../../../../mixins';\nimport { IconDisclosureDownCentered } from '../../../../../_Icon';\nimport { component, mergeConfig } from '../../../../../../engines';\nimport { buttonConfig, buttonTokens } from '../../../../../Button';\nimport { tokens, classes, constants } from '../../../../Select.tokens';\n\nconst mergedButtonConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedButtonConfig);\n\nexport const StyledButton = styled(Button)`\n ${buttonTokens.buttonColor}: var(${tokens.targetButtonColor});\n ${buttonTokens.buttonColorHover}: var(${tokens.targetButtonColorHover});\n ${buttonTokens.buttonColorActive}: var(${tokens.targetButtonColorActive});\n ${buttonTokens.buttonBackgroundColor}: var(${tokens.targetButtonBackgroundColor});\n ${buttonTokens.buttonBackgroundColorHover}: var(${tokens.targetButtonBackgroundColorHover});\n ${buttonTokens.buttonBackgroundColorActive}: var(${tokens.targetButtonBackgroundColorActive});\n ${buttonTokens.buttonRightContentMargin}: var(${tokens.targetButtonArrowMargin});\n ${buttonTokens.buttonHeight}: var(${tokens.targetHeight});\n ${buttonTokens.buttonWidth}: 100%;\n ${buttonTokens.buttonPadding}: var(${tokens.targetButtonPadding});\n ${buttonTokens.buttonRadius}: var(${tokens.borderRadius});\n ${buttonTokens.buttonFontFamily}: var(${tokens.fontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.fontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.fontStyle});\n ${buttonTokens.buttonFontWeight}: 600;\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.fontLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.fontLineHeight});\n ${buttonTokens.buttonDisabledOpacity}: 0.4;\n ${buttonTokens.buttonFocusColor}: var(${constants.focusColor});\n`;\n\nexport const IconArrowWrapper = styled.div`\n line-height: 0;\n color: var(${tokens.targetButtonArrowColor});\n\n &:hover {\n color: var(${tokens.targetButtonArrowColorHover});\n }\n\n &:active {\n color: var(${tokens.targetButtonArrowColorActive});\n }\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)`\n transition: color 0.3s ease-in, transform 0.15s ease-in;\n pointer-events: none;\n user-select: none;\n`;\n\nexport const ButtonWrapper = styled.div`\n display: inline;\n\n .${classes.selectWithoutBoxShadow}::before {\n box-shadow: none !important;\n }\n`;\n\nexport const Label = styled.div`\n display: inline;\n width: 100%;\n text-align: left;\n\n ${applyEllipsis()}\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n`;\n"],"names":["mergedButtonConfig","mergeConfig","buttonConfig","Button","component","_exp","StyledButton","styled","name","class","propsAsIs","IconArrowWrapper","_exp40","IconDisclosureDownCentered","StyledArrow","ButtonWrapper","Label"],"mappings":";;;;;;;AAQA,IAAMA,kBAAkB,gBAAGC,WAAW,CAACC,YAAY,CAAC,CAAA;AACpD,IAAMC,MAAM,gBAAGC,SAAS,CAACJ,kBAAkB,CAAC,CAAA;AAAC,IAAAK,IAAA,GAR3BA,SAQ2BA,IAAAA,GAAA;AAAA,EAAA,OAEVF,MAAM,CAAA;AAAA,CAAA,CAAA;AAAlC,IAAMG,YAAY,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAoBjC,EAAA;AAEM,IAAMC,gBAAgB,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAWrC,EAAA;AAAC,IAAAE,MAAA,GA3CgBA,SA2ChBA,MAAAA,GAAA;AAAA,EAAA,OAEgCC,0BAA0B,CAAA;AAAA,CAAA,CAAA;AAArD,IAAMC,WAAW,gBAAGP,MAAM,CAAAK,MAAA,EAAA,CAAA,CAAA;AAAAJ,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIhC,EAAA;AAEM,IAAMK,aAAa,gBAAGR,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMlC,EAAA;AAEM,IAAMM,KAAK,gBAAGT,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAU1B;;;;"}
@@ -2,5 +2,4 @@
2
2
  .isdqa5a{line-height:0;color:var(--plasma-select-target-button-arrow-color);}.isdqa5a:hover{color:var(--plasma-select-target-button-arrow-color-hover);}.isdqa5a:active{color:var(--plasma-select-target-button-arrow-color-active);}
3
3
  .s1yfglds{-webkit-transition:color 0.3s ease-in,-webkit-transform 0.15s ease-in;-webkit-transition:color 0.3s ease-in,transform 0.15s ease-in;transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
4
4
  .brzvbcx{display:inline;}.brzvbcx .select-without-box-shadow::before{box-shadow:none !important;}
5
- .iogt3wm{width:100%;height:100%;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:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.iogt3wm .arrow-inverse{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
6
- .l1gczdbd{width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
5
+ .logt3wm{display:inline;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.logt3wm .arrow-inverse{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg);}
@@ -10,11 +10,11 @@
10
10
 
11
11
  .base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
12
12
 
13
- .Chip_styles_1l2rsrr_bol5daj__32750637{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
14
- .Chip_styles_1l2rsrr_sj20on5__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
15
- .Chip_styles_1l2rsrr_s1ror4o9__32750637{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
16
- .Chip_styles_1l2rsrr_swddmyi__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-right-content-margin-left);margin-right:var(--plasma-chip-right-content-margin-right);}
17
- .Chip_styles_1l2rsrr_s1pcflhj__32750637{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-clear-content-margin-left);margin-right:var(--plasma-chip-clear-content-margin-right);color:var(--plasma-chip-close-icon-color);}.Chip_styles_1l2rsrr_s1pcflhj__32750637:hover{color:red;}
13
+ .Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
14
+ .Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
15
+ .Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
16
+ .Chip_styles_1mwwhiw_swddmyi__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-right-content-margin-left);margin-right:var(--plasma-chip-right-content-margin-right);}
17
+ .Chip_styles_1mwwhiw_s1pcflhj__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-clear-content-margin-left);margin-right:var(--plasma-chip-clear-content-margin-right);color:var(--plasma-chip-close-icon-color);}
18
18
 
19
19
  .Chip_styles_k6znfr_s19m2v6c__1d0542ff{--plasma-chip-color:var(--plasma-select-chip-color);--plasma-chip-color-hover:var(--plasma-select-chip-color);--plasma-chip-color-active:var(--plasma-select-chip-color);--plasma-chip-background:var(--plasma-select-chip-background);--plasma-chip-background-hover:var(--plasma-select-chip-background-hover);--plasma-chip-background-active:var(--plasma-select-chip-background-active);--plasma-chip-border-radius:var(--plasma-select-chip-border-radius);--plasma-chip-height:var(--plasma-select-chip-height);--plasma-chip-padding-right:var(--plasma-select-chip-padding-right);--plasma-chip-padding-left:var(--plasma-select-chip-padding-left);--plasma-chip-font-family:var(--plasma-select-font-family);--plasma-chip-font-size:var(--plasma-select-font-size);--plasma-chip-font-style:var(--plasma-select-font-style);--plasma-chip-font-weight:var(--plasma-select-font-weight);--plasma-chip-letter-spacing:var(--plasma-select-font-letter-spacing);--plasma-chip-lineheight:var(--plasma-select-font-line-height);--plasma-chip-clear-content-margin-left:var(--plasma-select-chip-clear-content-margin-left);--plasma-chip-clear-content-margin-right:var(--plasma-select-chip-clear-content-margin-right);--plasma-chip-close-icon-size:var(--plasma-select-chip-close-icon-size);--plasma-chip-close-icon-color:var(--plasma-select-chip-color);--plasma-chip-focus-color:var(--surface-accent);position:relative;}.Chip_styles_k6znfr_s19m2v6c__1d0542ff::before{content:'';position:absolute;top:calc(var(--plasma-select-focus-offset) * -1);left:calc(var(--plasma-select-focus-offset) * -1);right:calc(var(--plasma-select-focus-offset) * -1);bottom:calc(var(--plasma-select-focus-offset) * -1);z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:calc(var(--plasma-select-chip-border-radius) + var(--plasma-select-focus-offset));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Chip_styles_k6znfr_s19m2v6c__1d0542ff.Chip_styles_k6znfr_selectChipIsFocused__1d0542ff:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
20
20
 
@@ -14,7 +14,8 @@ var getLabel = function getLabel(_ref) {
14
14
  placeholder = _ref.placeholder,
15
15
  focusedChipIndex = _ref.focusedChipIndex,
16
16
  labelPlacement = _ref.labelPlacement,
17
- size = _ref.size;
17
+ size = _ref.size,
18
+ renderValue = _ref.renderValue;
18
19
  if (isEmpty(value)) {
19
20
  if (!label || labelPlacement === 'outer') {
20
21
  return /*#__PURE__*/React.createElement(Placeholder, null, placeholder);
@@ -29,8 +30,9 @@ var getLabel = function getLabel(_ref) {
29
30
  }
30
31
  if (Array.isArray(value)) {
31
32
  return value.map(function (currentValue, index) {
33
+ var itemLabel = valueToItemMap.get(currentValue).label;
32
34
  return /*#__PURE__*/React.createElement(Chip, {
33
- text: valueToItemMap.get(currentValue).label,
35
+ text: renderValue ? renderValue(currentValue, itemLabel) : itemLabel,
34
36
  onClick: function onClick(e) {
35
37
  e.stopPropagation();
36
38
  onChipClick(currentValue);
@@ -39,10 +41,11 @@ var getLabel = function getLabel(_ref) {
39
41
  });
40
42
  });
41
43
  }
44
+ var itemLabel = valueToItemMap.get(value).label;
42
45
  if (!label || labelPlacement === 'outer') {
43
- return /*#__PURE__*/React.createElement(Value, null, valueToItemMap.get(value).label);
46
+ return /*#__PURE__*/React.createElement(Value, null, renderValue ? renderValue(value, itemLabel) : itemLabel);
44
47
  }
45
- return /*#__PURE__*/React.createElement(InnerLabelWrapper, null, size !== 'xs' && /*#__PURE__*/React.createElement(InnerLabel, null, label), /*#__PURE__*/React.createElement(Value, null, valueToItemMap.get(value).label));
48
+ return /*#__PURE__*/React.createElement(InnerLabelWrapper, null, size !== 'xs' && /*#__PURE__*/React.createElement(InnerLabel, null, label), /*#__PURE__*/React.createElement(Value, null, renderValue ? renderValue(value, itemLabel) : itemLabel));
46
49
  };
47
50
  var Textfield = function Textfield(_ref2) {
48
51
  var opened = _ref2.opened,
@@ -58,9 +61,19 @@ var Textfield = function Textfield(_ref2) {
58
61
  labelPlacement = _ref2.labelPlacement,
59
62
  size = _ref2.size,
60
63
  contentLeft = _ref2.contentLeft,
61
- disabled = _ref2.disabled;
64
+ disabled = _ref2.disabled,
65
+ renderValue = _ref2.renderValue,
66
+ focusedPath = _ref2.focusedPath,
67
+ focusedToValueMap = _ref2.focusedToValueMap;
62
68
  var withArrowInverse = opened ? classes.arrowInverse : undefined;
63
69
  var iconSize = size === 'xs' ? 'xs' : 's';
70
+ var getActiveDescendant = function getActiveDescendant() {
71
+ var _focusedToValueMap$ge;
72
+ var focusedPathAsString = focusedPath.reduce(function (acc, n) {
73
+ return "".concat(acc, "/").concat(n);
74
+ }, '').replace(/^(\/)/, '');
75
+ return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
76
+ };
64
77
  return /*#__PURE__*/React.createElement(TextfieldWrapper, {
65
78
  opened: opened,
66
79
  value: value
@@ -68,7 +81,11 @@ var Textfield = function Textfield(_ref2) {
68
81
  stretching: "filled",
69
82
  className: cx(classes.textfieldTarget, opened || focusedChipIndex !== null ? classes.selectWithoutBoxShadow : undefined),
70
83
  onKeyDown: onKeyDown,
71
- disabled: disabled
84
+ disabled: disabled,
85
+ role: "combobox",
86
+ "aria-controls": "tree_level_1",
87
+ "aria-expanded": opened,
88
+ "aria-activedescendant": getActiveDescendant()
72
89
  }, /*#__PURE__*/React.createElement(Wrapper, null, contentLeft && (!multiselect || isEmpty(value)) && /*#__PURE__*/React.createElement(ContentLeftWrapper, null, contentLeft), /*#__PURE__*/React.createElement(ChipWrapper, null, getLabel({
73
90
  value: value,
74
91
  isTargetAmount: isTargetAmount,
@@ -78,7 +95,8 @@ var Textfield = function Textfield(_ref2) {
78
95
  placeholder: placeholder,
79
96
  focusedChipIndex: focusedChipIndex,
80
97
  labelPlacement: labelPlacement,
81
- size: size
98
+ size: size,
99
+ renderValue: renderValue
82
100
  })), /*#__PURE__*/React.createElement(IconArrowWrapper, null, /*#__PURE__*/React.createElement(StyledArrow, {
83
101
  size: iconSize,
84
102
  color: "inherit",