@salutejs/plasma-new-hope 0.194.0-canary.1560.11837986621.0 → 0.194.0-canary.1562.11845925215.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cjs/components/Combobox/ComboboxOld/Combobox.css +5 -4
  2. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
  3. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
  4. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
  5. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
  6. package/cjs/components/Dropdown/Dropdown.css +5 -4
  7. package/cjs/components/Dropdown/Dropdown.js +8 -4
  8. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  9. package/cjs/components/Dropdown/hooks/useHashMaps.js +4 -1
  10. package/cjs/components/Dropdown/hooks/useHashMaps.js.map +1 -1
  11. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
  12. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -2
  13. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  14. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -1
  15. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  16. package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
  17. package/cjs/components/Switch/Switch.css +2 -2
  18. package/cjs/components/Switch/Switch.tokens.js +1 -7
  19. package/cjs/components/Switch/Switch.tokens.js.map +1 -1
  20. package/cjs/components/Switch/_toggleSize/base.js +1 -1
  21. package/cjs/components/Switch/_toggleSize/base.js.map +1 -1
  22. package/cjs/components/Switch/_toggleSize/base_6i0904.css +1 -0
  23. package/cjs/components/Switch/_view/base.js +1 -1
  24. package/cjs/components/Switch/_view/base.js.map +1 -1
  25. package/cjs/components/Switch/_view/base_yxkf3s.css +1 -0
  26. package/cjs/index.css +7 -6
  27. package/emotion/cjs/components/Dropdown/Dropdown.js +8 -4
  28. package/emotion/cjs/components/Dropdown/hooks/useHashMaps.js +4 -1
  29. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -2
  30. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
  31. package/emotion/cjs/components/Switch/Switch.tokens.js +1 -7
  32. package/emotion/cjs/components/Switch/_toggleSize/base.js +1 -1
  33. package/emotion/cjs/components/Switch/_view/base.js +1 -1
  34. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
  35. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.js +2 -5
  36. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -33
  37. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.config.js +8 -8
  38. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.js +2 -5
  39. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -33
  40. package/emotion/es/components/Dropdown/Dropdown.js +8 -4
  41. package/emotion/es/components/Dropdown/hooks/useHashMaps.js +4 -1
  42. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -3
  43. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +15 -11
  44. package/emotion/es/components/Switch/Switch.tokens.js +1 -7
  45. package/emotion/es/components/Switch/_toggleSize/base.js +1 -1
  46. package/emotion/es/components/Switch/_view/base.js +1 -1
  47. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
  48. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.js +1 -4
  49. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -33
  50. package/emotion/es/examples/plasma_web/components/Switch/Switch.config.js +8 -8
  51. package/emotion/es/examples/plasma_web/components/Switch/Switch.js +1 -4
  52. package/emotion/es/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -33
  53. package/es/components/Combobox/ComboboxOld/Combobox.css +5 -4
  54. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +5 -4
  55. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +5 -4
  56. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +5 -4
  57. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +5 -4
  58. package/es/components/Dropdown/Dropdown.css +5 -4
  59. package/es/components/Dropdown/Dropdown.js +8 -4
  60. package/es/components/Dropdown/Dropdown.js.map +1 -1
  61. package/es/components/Dropdown/hooks/useHashMaps.js +4 -1
  62. package/es/components/Dropdown/hooks/useHashMaps.js.map +1 -1
  63. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +5 -4
  64. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -3
  65. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  66. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +7 -2
  67. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  68. package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_1b439rx.css → DropdownItem.styles_14yih1y.css} +1 -0
  69. package/es/components/Switch/Switch.css +2 -2
  70. package/es/components/Switch/Switch.tokens.js +1 -7
  71. package/es/components/Switch/Switch.tokens.js.map +1 -1
  72. package/es/components/Switch/_toggleSize/base.js +1 -1
  73. package/es/components/Switch/_toggleSize/base.js.map +1 -1
  74. package/es/components/Switch/_toggleSize/base_6i0904.css +1 -0
  75. package/es/components/Switch/_view/base.js +1 -1
  76. package/es/components/Switch/_view/base.js.map +1 -1
  77. package/es/components/Switch/_view/base_yxkf3s.css +1 -0
  78. package/es/index.css +7 -6
  79. package/package.json +3 -2
  80. package/styled-components/cjs/components/Dropdown/Dropdown.js +8 -4
  81. package/styled-components/cjs/components/Dropdown/hooks/useHashMaps.js +4 -1
  82. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -2
  83. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
  84. package/styled-components/cjs/components/Switch/Switch.tokens.js +1 -7
  85. package/styled-components/cjs/components/Switch/_toggleSize/base.js +1 -1
  86. package/styled-components/cjs/components/Switch/_view/base.js +1 -1
  87. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +1 -1
  88. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.js +2 -5
  89. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -33
  90. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.config.js +1 -1
  91. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.js +2 -5
  92. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -33
  93. package/styled-components/es/components/Dropdown/Dropdown.js +8 -4
  94. package/styled-components/es/components/Dropdown/hooks/useHashMaps.js +4 -1
  95. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -3
  96. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +5 -2
  97. package/styled-components/es/components/Switch/Switch.tokens.js +1 -7
  98. package/styled-components/es/components/Switch/_toggleSize/base.js +1 -1
  99. package/styled-components/es/components/Switch/_view/base.js +1 -1
  100. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.config.js +1 -1
  101. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.js +1 -4
  102. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -33
  103. package/styled-components/es/examples/plasma_web/components/Switch/Switch.config.js +1 -1
  104. package/styled-components/es/examples/plasma_web/components/Switch/Switch.js +1 -4
  105. package/styled-components/es/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -33
  106. package/types/components/Dropdown/Dropdown.d.ts +50 -2
  107. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  108. package/types/components/Dropdown/Dropdown.types.d.ts +13 -6
  109. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  110. package/types/components/Dropdown/hooks/useHashMaps.d.ts +2 -1
  111. package/types/components/Dropdown/hooks/useHashMaps.d.ts.map +1 -1
  112. package/types/components/Dropdown/index.d.ts +1 -0
  113. package/types/components/Dropdown/index.d.ts.map +1 -1
  114. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  115. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +1 -0
  116. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  117. package/types/components/Switch/Switch.tokens.d.ts +1 -7
  118. package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
  119. package/types/components/Switch/_toggleSize/base.d.ts.map +1 -1
  120. package/types/components/Switch/_view/base.d.ts.map +1 -1
  121. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +25 -1
  122. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  123. package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts.map +1 -1
  124. package/types/examples/plasma_b2c/components/Switch/Switch.d.ts +0 -20
  125. package/types/examples/plasma_b2c/components/Switch/Switch.d.ts.map +1 -1
  126. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +25 -1
  127. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  128. package/types/examples/plasma_web/components/Switch/Switch.config.d.ts.map +1 -1
  129. package/types/examples/plasma_web/components/Switch/Switch.d.ts +0 -20
  130. package/types/examples/plasma_web/components/Switch/Switch.d.ts.map +1 -1
  131. package/cjs/components/Switch/_toggleSize/base_38anc0.css +0 -1
  132. package/cjs/components/Switch/_view/base_15atbyp.css +0 -1
  133. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +0 -37
  134. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +0 -37
  135. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +0 -31
  136. package/emotion/es/examples/plasma_web/components/Switch/Switch.outline.config.js +0 -31
  137. package/es/components/Switch/_toggleSize/base_38anc0.css +0 -1
  138. package/es/components/Switch/_view/base_15atbyp.css +0 -1
  139. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +0 -37
  140. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +0 -37
  141. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +0 -31
  142. package/styled-components/es/examples/plasma_web/components/Switch/Switch.outline.config.js +0 -31
  143. package/types/examples/plasma_b2c/components/Switch/Switch.outline.config.d.ts +0 -30
  144. package/types/examples/plasma_b2c/components/Switch/Switch.outline.config.d.ts.map +0 -1
  145. package/types/examples/plasma_web/components/Switch/Switch.outline.config.d.ts +0 -30
  146. package/types/examples/plasma_web/components/Switch/Switch.outline.config.d.ts.map +0 -1
package/es/index.css CHANGED
@@ -215,9 +215,9 @@
215
215
 
216
216
  .base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s10fscgc__e2c572a3{font-family:var(--plasma-switch-font-family);font-style:var(--plasma-switch-font-style);font-weight:var(--plasma-switch-font-weight);-webkit-letter-spacing:var(--plasma-switch-letter-spacing);-moz-letter-spacing:var(--plasma-switch-letter-spacing);-ms-letter-spacing:var(--plasma-switch-letter-spacing);letter-spacing:var(--plasma-switch-letter-spacing);line-height:var(--plasma-switch-line-height);font-size:var(--plasma-switch-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_sdjnckq__e2c572a3{font-family:var(--plasma-switch-description-font-family);font-style:var(--plasma-switch-description-font-style);font-weight:var(--plasma-switch-description-font-weight);-webkit-letter-spacing:var(--plasma-switch-description-letter-spacing);-moz-letter-spacing:var(--plasma-switch-description-letter-spacing);-ms-letter-spacing:var(--plasma-switch-description-letter-spacing);letter-spacing:var(--plasma-switch-description-letter-spacing);line-height:var(--plasma-switch-description-line-height);font-size:var(--plasma-switch-description-font-size);}.base_1tcl212_bm1v11h__e2c572a3 .base_1tcl212_s1ilr5eq__e2c572a3{margin:var(--plasma_private-switch__label-offset,0);}
217
217
 
218
- .base_38anc0_b1wld3h3__c7ee3abe .base_38anc0_s2cs3kf__c7ee3abe{--plasma_private-thumbSize:calc(var(--plasma-switch__thumb-size) - (2 * var(--plasma-switch__track-border)));box-sizing:border-box;-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);border-style:solid;border-width:var(--plasma-switch__track-border);border-radius:var(--plasma-switch__track-border-radius);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);}.base_38anc0_b1wld3h3__c7ee3abe .base_38anc0_s2cs3kf__c7ee3abe::after{width:var(--plasma_private-thumbSize);height:var(--plasma_private-thumbSize);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb-offset);}.base_38anc0_b1wld3h3__c7ee3abe:active:not([disabled]) .base_38anc0_s2cs3kf__c7ee3abe::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
218
+ .base_6i0904_b1wld3h3__fa866566 .base_6i0904_s2cs3kf__fa866566{-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);border-radius:var(--plasma-switch__track-border-radius);}.base_6i0904_b1wld3h3__fa866566 .base_6i0904_s2cs3kf__fa866566::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb-offset);}.base_6i0904_b1wld3h3__fa866566:active:not([disabled]) .base_6i0904_s2cs3kf__fa866566::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
219
219
 
220
- .base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_false-bg-color);border-color:var(--plasma-switch__track-checked_false-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));border-color:var(--plasma-switch__track-checked_false_hovered_true-border-color,var(--plasma-switch__track-checked_false-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499{background-color:var(--plasma-switch__track_checked_true-bg-color);border-color:var(--plasma-switch__track-checked_true-border-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked:not([disabled]) ~ .base_15atbyp_s2cs3kf__64acd499:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));border-color:var(--plasma-switch__track-checked_true_hovered_true-border-color,var(--plasma-switch__track-checked_true-border-color));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb-checked_false-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_ssthlx1__64acd499:checked ~ .base_15atbyp_s2cs3kf__64acd499::after{background-color:var(--plasma-switch__thumb_checked_true-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_s1ilr5eq__64acd499{color:var(--plasma-switch__label-color);}.base_15atbyp_b1g0jmh3__64acd499 .base_15atbyp_sdjnckq__64acd499{color:var(--plasma-switch__description-color);}
220
+ .base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_s2cs3kf__d59e59a0{background-color:var(--plasma-switch__track_checked_false-bg-color);}.base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_ssthlx1__d59e59a0:not([disabled]) ~ .base_yxkf3s_s2cs3kf__d59e59a0:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));}.base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_ssthlx1__d59e59a0:checked ~ .base_yxkf3s_s2cs3kf__d59e59a0{background-color:var(--plasma-switch__track_checked_true-bg-color);}.base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_ssthlx1__d59e59a0:checked:not([disabled]) ~ .base_yxkf3s_s2cs3kf__d59e59a0:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));}.base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_s2cs3kf__d59e59a0::after{background-color:var(--plasma-switch__thumb-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_ssthlx1__d59e59a0:checked ~ .base_yxkf3s_s2cs3kf__d59e59a0::after{box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_s1ilr5eq__d59e59a0{color:var(--plasma-switch__label-color);}.base_yxkf3s_b1g0jmh3__d59e59a0 .base_yxkf3s_sdjnckq__d59e59a0{color:var(--plasma-switch__description-color);}
221
221
 
222
222
  .base_sz3n0x_bvwxj2r__a36bed54 .base_sz3n0x_s2cs3kf__a36bed54::before{content:'';position:absolute;inset:-0.125rem;display:block;box-sizing:content-box;border-radius:calc(0.125rem + var(--plasma-switch__track-border-radius));border:0.125rem solid transparent;pointer-events:none;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;}.base_sz3n0x_bvwxj2r__a36bed54 .base_sz3n0x_ssthlx1__a36bed54.base_sz3n0x_focusVisible__a36bed54 ~ .base_sz3n0x_s2cs3kf__a36bed54::before{box-shadow:0 0 0 0.125rem var(--plasma-switch__track-focus-color);}
223
223
 
@@ -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
- .DropdownItem_styles_1b439rx_c1gkzlls__ed711128{--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%;}
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
- .DropdownItem_styles_1b439rx_d1m97l2m__ed711128{line-height:0;color:var(--text-secondary);}
398
- .DropdownItem_styles_1b439rx_doib72h__ed711128{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_1b439rx_w6l2f0g__ed711128{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_1b439rx_w6l2f0g__ed711128:hover:not(.DropdownItem_styles_1b439rx_dropdownItemIsDisabled__ed711128){cursor:pointer;background-color:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1b439rx_w6l2f0g__ed711128.DropdownItem_styles_1b439rx_dropdownItemIsActive__ed711128{background-color:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1b439rx_w6l2f0g__ed711128.DropdownItem_styles_1b439rx_dropdownItemIsDisabled__ed711128{opacity:0.4;cursor:not-allowed;}.DropdownItem_styles_1b439rx_w6l2f0g__ed711128:focus{outline:none;}.DropdownItem_styles_1b439rx_w6l2f0g__ed711128::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_1b439rx_w6l2f0g__ed711128.DropdownItem_styles_1b439rx_dropdownItemIsFocused__ed711128:before{outline:none;box-shadow:0 0 0 0.0625rem var(--surface-accent);}
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);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.194.0-canary.1560.11837986621.0",
3
+ "version": "0.194.0-canary.1562.11845925215.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -98,6 +98,7 @@
98
98
  "babel-loader": "8.2.2",
99
99
  "babel-plugin-annotate-pure-calls": "0.4.0",
100
100
  "babel-plugin-styled-components": "1.13.2",
101
+ "csstype": "3.1.3",
101
102
  "default-browser-id": "2.0.0",
102
103
  "react": "18.2.0",
103
104
  "react-dom": "18.2.0",
@@ -128,5 +129,5 @@
128
129
  "sideEffects": [
129
130
  "*.css"
130
131
  ],
131
- "gitHead": "06a688c2510015bca6554225ad48326d9fa85a5d"
132
+ "gitHead": "b2cfda8851a0c6010e737734d377621b50d25b7d"
132
133
  }
@@ -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),
@@ -79,9 +80,10 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
79
80
  focusedPath = _useReducer4[0],
80
81
  dispatchFocusedPath = _useReducer4[1];
81
82
  var _useHashMaps = (0, _useHashMaps3.useHashMaps)(items),
82
- _useHashMaps2 = _slicedToArray(_useHashMaps, 2),
83
+ _useHashMaps2 = _slicedToArray(_useHashMaps, 3),
83
84
  pathMap = _useHashMaps2[0],
84
- focusedToValueMap = _useHashMaps2[1];
85
+ focusedToValueMap = _useHashMaps2[1],
86
+ valueToItemMap = _useHashMaps2[2];
85
87
  var activeDescendantItemValue = ((_getItemByFocused = (0, _utils2.getItemByFocused)(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
86
88
  var floatingPopoverRef = (0, _react.useRef)(null);
87
89
  var treeId = (0, _plasmaCore.safeUseId)();
@@ -144,7 +146,9 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
144
146
  onItemClick: onItemClick,
145
147
  onItemSelect: onItemSelect,
146
148
  hasArrow: hasArrow,
147
- treeId: treeId
149
+ treeId: treeId,
150
+ renderItem: renderItem,
151
+ valueToItemMap: valueToItemMap
148
152
  }
149
153
  }, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
150
154
  ref: floatingPopoverRef,
@@ -12,6 +12,7 @@ var useHashMaps = exports.useHashMaps = function useHashMaps(items) {
12
12
  return (0, _react.useMemo)(function () {
13
13
  var pathMap = new Map();
14
14
  var focusedToValueMap = new Map();
15
+ var valueToItemMap = new Map();
15
16
  pathMap.set('root', items.length);
16
17
  var rec = function rec(items) {
17
18
  var prevIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
@@ -23,10 +24,12 @@ var useHashMaps = exports.useHashMaps = function useHashMaps(items) {
23
24
  if (innerItems) {
24
25
  pathMap.set(value, innerItems.length);
25
26
  rec(innerItems, currIndex);
27
+ } else {
28
+ valueToItemMap.set(value, item);
26
29
  }
27
30
  });
28
31
  };
29
32
  rec(items);
30
- return [pathMap, focusedToValueMap];
33
+ return [pathMap, focusedToValueMap, valueToItemMap];
31
34
  }, [items]);
32
35
  };
@@ -43,7 +43,9 @@ 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,
48
+ valueToItemMap = _useContext.valueToItemMap;
47
49
  var hasDescendants = Boolean(item.items);
48
50
  var disclosureIconSize = size === 'xs' ? 'xs' : 's';
49
51
  var isDisabledClassName = disabled || isDisabled ? _Dropdown.classes.dropdownItemIsDisabled : undefined;
@@ -94,7 +96,7 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
94
96
  "aria-expanded": ariaExpanded,
95
97
  "aria-level": ariaLevel,
96
98
  "aria-label": ariaLabel
97
- }, /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
99
+ }, renderItem ? /*#__PURE__*/_react["default"].createElement(_DropdownItem.RenderItemWrapper, null, renderItem(valueToItemMap.get(value))) : /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
98
100
  contentLeft: contentLeft,
99
101
  contentRight: contentRight,
100
102
  alignContentLeft: "center",
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Wrapper = exports.StyledCell = exports.Divider = exports.DisclosureIconWrapper = exports.CellWrapper = void 0;
6
+ exports.Wrapper = exports.StyledCell = exports.RenderItemWrapper = exports.Divider = exports.DisclosureIconWrapper = exports.CellWrapper = void 0;
7
7
  var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
8
  var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
9
9
  var _mixins = /*#__PURE__*/require("../../../../mixins");
@@ -42,4 +42,7 @@ var Wrapper = exports.Wrapper = /*#__PURE__*/_styledComponents["default"].li.wit
42
42
  outlineRadius: /*#__PURE__*/"var(".concat(_Dropdown.tokens.itemBorderRadius, ")"),
43
43
  hasTransition: false,
44
44
  customFocusRules: /*#__PURE__*/"\n &.".concat(_Dropdown.classes.dropdownItemIsFocused, ":before {\n outline: none;\n box-shadow: 0 0 0 0.0625rem var(").concat(_Dropdown.constants.focusColor, ");\n }\n ")
45
- }));
45
+ }));
46
+ var RenderItemWrapper = exports.RenderItemWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
47
+ componentId: "plasma-new-hope__sc-hs0ek1-5"
48
+ })(["", ";flex:1;"], /*#__PURE__*/(0, _mixins.applyEllipsis)());
@@ -29,11 +29,6 @@ var tokens = exports.tokens = {
29
29
  verticalGap: '--plasma-switch-vertical-gap',
30
30
  trackWidth: '--plasma-switch__track-width',
31
31
  trackHeight: '--plasma-switch__track-height',
32
- trackBorderWidth: '--plasma-switch__track-border',
33
- trackBorderColorOn: '--plasma-switch__track-checked_true-border-color',
34
- trackBorderColorOnHover: '--plasma-switch__track-checked_true_hovered_true-border-color',
35
- trackBorderColorOff: '--plasma-switch__track-checked_false-border-color',
36
- trackBorderColorOffHover: '--plasma-switch__track-checked_false_hovered_true-border-color',
37
32
  trackBorderRadius: '--plasma-switch__track-border-radius',
38
33
  // NOTE: could be intersection with checked
39
34
  trackBackgroundColorOn: '--plasma-switch__track_checked_true-bg-color',
@@ -45,8 +40,7 @@ var tokens = exports.tokens = {
45
40
  thumbOffset: '--plasma-switch__thumb-offset',
46
41
  thumbBorderRadius: '--plasma-switch__thumb-border-radius',
47
42
  thumbPressScale: '--plasma-switch__thumb-scale',
48
- thumbBackgroundColorOn: '--plasma-switch__thumb_checked_true-bg-color',
49
- thumbBackgroundColorOff: '--plasma-switch__thumb-checked_false-bg-color',
43
+ thumbBackgroundColor: '--plasma-switch__thumb-bg-color',
50
44
  thumbBoxShadow: '--plasma-switch__thumb-box-shadow',
51
45
  thumbBoxShadowOn: '--plasma-switch__thumb-box-shadow_checked_true',
52
46
  labelOffsetPrivate: '--plasma_private-switch__label-offset'
@@ -7,4 +7,4 @@ exports.base = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
8
  var _Switch = /*#__PURE__*/require("../Switch.tokens");
9
9
  var _Switch2 = /*#__PURE__*/require("../Switch.styles");
10
- var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{--plasma_private-thumbSize:calc(var(", ") - (2 * var(", ")));box-sizing:border-box;flex:0 0 var(", ");border-style:solid;border-width:var(", ");border-radius:var(", ");width:var(", ");height:var(", ");&::after{width:var(--plasma_private-thumbSize);height:var(--plasma_private-thumbSize);border-radius:var(", ");margin:auto var(", ");}}:active:not([disabled]) ", "::after{width:calc(var(", ") * var(", ",1));}"], _Switch2.StyledTrigger, _Switch.tokens.thumbSize, _Switch.tokens.trackBorderWidth, _Switch.tokens.trackWidth, _Switch.tokens.trackBorderWidth, _Switch.tokens.trackBorderRadius, _Switch.tokens.trackWidth, _Switch.tokens.trackHeight, _Switch.tokens.thumbBorderRadius, _Switch.tokens.thumbOffset, _Switch2.StyledTrigger, _Switch.tokens.thumbSize, _Switch.tokens.thumbPressScale);
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{flex:0 0 var(", ");width:var(", ");height:var(", ");border-radius:var(", ");&::after{width:var(", ");height:var(", ");border-radius:var(", ");margin:auto var(", ");}}:active:not([disabled]) ", "::after{width:calc(var(", ") * var(", ",1));}"], _Switch2.StyledTrigger, _Switch.tokens.trackWidth, _Switch.tokens.trackWidth, _Switch.tokens.trackHeight, _Switch.tokens.trackBorderRadius, _Switch.tokens.thumbSize, _Switch.tokens.thumbSize, _Switch.tokens.thumbBorderRadius, _Switch.tokens.thumbOffset, _Switch2.StyledTrigger, _Switch.tokens.thumbSize, _Switch.tokens.thumbPressScale);
@@ -7,4 +7,4 @@ exports.base = void 0;
7
7
  var _styledComponents = /*#__PURE__*/require("styled-components");
8
8
  var _Switch = /*#__PURE__*/require("../Switch.tokens");
9
9
  var _Switch2 = /*#__PURE__*/require("../Switch.styles");
10
- var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{background-color:var(", ");border-color:var(", ");}", ":not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));border-color:var(", ",var(", "));}", ":checked ~ ", "{background-color:var(", ");border-color:var(", ");}", ":checked:not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));border-color:var(", ",var(", "));}", "::after{background-color:var(", ");box-shadow:var(", ");}", ":checked ~ ", "::after{background-color:var(", ");box-shadow:var(", ",var(", "));}", "{color:var(", ");}", "{color:var(", ");}"], _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOff, _Switch.tokens.trackBorderColorOff, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOffHover, _Switch.tokens.trackBackgroundColorOff, _Switch.tokens.trackBorderColorOffHover, _Switch.tokens.trackBorderColorOff, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOn, _Switch.tokens.trackBorderColorOn, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOnHover, _Switch.tokens.trackBackgroundColorOn, _Switch.tokens.trackBorderColorOnHover, _Switch.tokens.trackBorderColorOn, _Switch2.StyledTrigger, _Switch.tokens.thumbBackgroundColorOff, _Switch.tokens.thumbBoxShadow, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.thumbBackgroundColorOn, _Switch.tokens.thumbBoxShadowOn, _Switch.tokens.thumbBoxShadow, _Switch2.StyledLabel, _Switch.tokens.labelColor, _Switch2.StyledDescription, _Switch.tokens.descriptionColor);
10
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["", "{background-color:var(", ");}", ":not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", ":checked ~ ", "{background-color:var(", ");}", ":checked:not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", "::after{background-color:var(", ");box-shadow:var(", ");}", ":checked ~ ", "::after{box-shadow:var(", ",var(", "));}", "{color:var(", ");}", "{color:var(", ");}"], _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOff, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOffHover, _Switch.tokens.trackBackgroundColorOff, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOn, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.trackBackgroundColorOnHover, _Switch.tokens.trackBackgroundColorOn, _Switch2.StyledTrigger, _Switch.tokens.thumbBackgroundColor, _Switch.tokens.thumbBoxShadow, _Switch2.StyledInput, _Switch2.StyledTrigger, _Switch.tokens.thumbBoxShadowOn, _Switch.tokens.thumbBoxShadow, _Switch2.StyledLabel, _Switch.tokens.labelColor, _Switch2.StyledDescription, _Switch.tokens.descriptionColor);
@@ -25,7 +25,7 @@ var config = exports.config = {
25
25
  s: /*#__PURE__*/(0, _styledComponents.css)(["", ":2rem;", ":1.25rem;", ":calc(var(", ") / 2);", ":1rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], _Switch.switchTokens.trackWidth, _Switch.switchTokens.trackHeight, _Switch.switchTokens.trackBorderRadius, _Switch.switchTokens.trackHeight, _Switch.switchTokens.thumbSize, _Switch.switchTokens.thumbBorderRadius, _Switch.switchTokens.thumbSize, _Switch.switchTokens.thumbOffset, _Switch.switchTokens.thumbPressScale)
26
26
  },
27
27
  view: {
28
- "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":0rem;", ":transparent;", ":transparent;", ":transparent;", ":transparent;", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], _Switch.switchTokens.labelColor, _Switch.switchTokens.descriptionColor, _Switch.switchTokens.trackBackgroundColorOn, _Switch.switchTokens.trackBackgroundColorOnHover, _Switch.switchTokens.trackBackgroundColorOff, _Switch.switchTokens.trackBackgroundColorOffHover, _Switch.switchTokens.trackBorderWidth, _Switch.switchTokens.trackBorderColorOff, _Switch.switchTokens.trackBorderColorOffHover, _Switch.switchTokens.trackBorderColorOn, _Switch.switchTokens.trackBorderColorOnHover, _Switch.switchTokens.thumbBackgroundColorOff, _Switch.switchTokens.thumbBackgroundColorOn, _Switch.switchTokens.thumbBoxShadow)
28
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], _Switch.switchTokens.labelColor, _Switch.switchTokens.descriptionColor, _Switch.switchTokens.trackBackgroundColorOn, _Switch.switchTokens.trackBackgroundColorOnHover, _Switch.switchTokens.trackBackgroundColorOff, _Switch.switchTokens.trackBackgroundColorOffHover, _Switch.switchTokens.thumbBackgroundColor, _Switch.switchTokens.thumbBoxShadow)
29
29
  },
30
30
  disabled: {
31
31
  "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Switch.switchTokens.disabledOpacity)
@@ -3,12 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SwitchOutline = exports.Switch = void 0;
6
+ exports.Switch = void 0;
7
7
  var _Switch = /*#__PURE__*/require("../../../../components/Switch");
8
8
  var _engines = /*#__PURE__*/require("../../../../engines");
9
9
  var _Switch2 = /*#__PURE__*/require("./Switch.config");
10
- var _SwitchOutline = /*#__PURE__*/require("./Switch.outline.config");
11
10
  var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Switch.switchConfig, _Switch2.config);
12
- var Switch = exports.Switch = /*#__PURE__*/(0, _engines.component)(mergedConfig);
13
- var mergedOutlineConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Switch.switchConfig, _SwitchOutline.config);
14
- var SwitchOutline = exports.SwitchOutline = /*#__PURE__*/(0, _engines.component)(mergedOutlineConfig);
11
+ var Switch = exports.Switch = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -9,7 +9,7 @@ import { mergeConfig } from '../../../../engines';
9
9
  import { WithTheme, argTypesFromConfig } from '../../../_helpers';
10
10
 
11
11
  import { config } from './Switch.config';
12
- import { Switch, SwitchOutline } from './Switch';
12
+ import { Switch } from './Switch';
13
13
 
14
14
  type SwitchProps = ComponentProps<typeof Switch>;
15
15
 
@@ -72,35 +72,3 @@ export const Default: StoryObj<SwitchProps> = {
72
72
  },
73
73
  render: (args) => <StoryDefault {...args} />,
74
74
  };
75
-
76
- const StoryOutline = (args: SwitchProps) => {
77
- const value = 'yes';
78
- const name = 'agree';
79
- const [checked, setChecked] = useState(true);
80
-
81
- return (
82
- <StyledWrapper>
83
- <SwitchOutline
84
- value={value}
85
- name={name}
86
- checked={checked}
87
- onChange={(event) => {
88
- setChecked(event.target.checked);
89
- onChange(event);
90
- }}
91
- onFocus={onFocus}
92
- onBlur={onBlur}
93
- {...args}
94
- />
95
- </StyledWrapper>
96
- );
97
- };
98
-
99
- export const Outline: StoryObj<SwitchProps> = {
100
- args: {
101
- size: 'm',
102
- toggleSize: 'l',
103
- disabled: false,
104
- },
105
- render: (args) => <StoryOutline {...args} />,
106
- };
@@ -25,7 +25,7 @@ var config = exports.config = {
25
25
  s: /*#__PURE__*/(0, _styledComponents.css)(["", ":2rem;", ":1.25rem;", ":calc(var(", ") / 2);", ":1rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], _Switch.switchTokens.trackWidth, _Switch.switchTokens.trackHeight, _Switch.switchTokens.trackBorderRadius, _Switch.switchTokens.trackHeight, _Switch.switchTokens.thumbSize, _Switch.switchTokens.thumbBorderRadius, _Switch.switchTokens.thumbSize, _Switch.switchTokens.thumbOffset, _Switch.switchTokens.thumbPressScale)
26
26
  },
27
27
  view: {
28
- "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":0rem;", ":transparent;", ":transparent;", ":transparent;", ":transparent;", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], _Switch.switchTokens.labelColor, _Switch.switchTokens.descriptionColor, _Switch.switchTokens.trackBackgroundColorOn, _Switch.switchTokens.trackBackgroundColorOnHover, _Switch.switchTokens.trackBackgroundColorOff, _Switch.switchTokens.trackBackgroundColorOffHover, _Switch.switchTokens.trackBorderWidth, _Switch.switchTokens.trackBorderColorOff, _Switch.switchTokens.trackBorderColorOffHover, _Switch.switchTokens.trackBorderColorOn, _Switch.switchTokens.trackBorderColorOnHover, _Switch.switchTokens.thumbBackgroundColorOff, _Switch.switchTokens.thumbBackgroundColorOn, _Switch.switchTokens.thumbBoxShadow)
28
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], _Switch.switchTokens.labelColor, _Switch.switchTokens.descriptionColor, _Switch.switchTokens.trackBackgroundColorOn, _Switch.switchTokens.trackBackgroundColorOnHover, _Switch.switchTokens.trackBackgroundColorOff, _Switch.switchTokens.trackBackgroundColorOffHover, _Switch.switchTokens.thumbBackgroundColor, _Switch.switchTokens.thumbBoxShadow)
29
29
  },
30
30
  disabled: {
31
31
  "true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Switch.switchTokens.disabledOpacity)
@@ -3,12 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SwitchOutline = exports.Switch = void 0;
6
+ exports.Switch = void 0;
7
7
  var _Switch = /*#__PURE__*/require("../../../../components/Switch");
8
8
  var _engines = /*#__PURE__*/require("../../../../engines");
9
9
  var _Switch2 = /*#__PURE__*/require("./Switch.config");
10
- var _SwitchOutline = /*#__PURE__*/require("./Switch.outline.config");
11
10
  var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Switch.switchConfig, _Switch2.config);
12
- var Switch = exports.Switch = /*#__PURE__*/(0, _engines.component)(mergedConfig);
13
- var mergedOutlineConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Switch.switchConfig, _SwitchOutline.config);
14
- var SwitchOutline = exports.SwitchOutline = /*#__PURE__*/(0, _engines.component)(mergedOutlineConfig);
11
+ var Switch = exports.Switch = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -9,7 +9,7 @@ import { mergeConfig } from '../../../../engines';
9
9
  import { WithTheme, argTypesFromConfig } from '../../../_helpers';
10
10
 
11
11
  import { config } from './Switch.config';
12
- import { Switch, SwitchOutline } from './Switch';
12
+ import { Switch } from './Switch';
13
13
 
14
14
  type SwitchProps = ComponentProps<typeof Switch>;
15
15
 
@@ -72,35 +72,3 @@ export const Default: StoryObj<SwitchProps> = {
72
72
  },
73
73
  render: (args) => <StoryDefault {...args} />,
74
74
  };
75
-
76
- const StoryOutline = (args: SwitchProps) => {
77
- const value = 'yes';
78
- const name = 'agree';
79
- const [checked, setChecked] = useState(true);
80
-
81
- return (
82
- <StyledWrapper>
83
- <SwitchOutline
84
- value={value}
85
- name={name}
86
- checked={checked}
87
- onChange={(event) => {
88
- setChecked(event.target.checked);
89
- onChange(event);
90
- }}
91
- onFocus={onFocus}
92
- onBlur={onBlur}
93
- {...args}
94
- />
95
- </StyledWrapper>
96
- );
97
- };
98
-
99
- export const Outline: StoryObj<SwitchProps> = {
100
- args: {
101
- size: 'm',
102
- toggleSize: 'l',
103
- disabled: false,
104
- },
105
- render: (args) => <StoryOutline {...args} />,
106
- };
@@ -1,4 +1,4 @@
1
- var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
1
+ 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"];
2
2
  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); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  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."); }
@@ -60,6 +60,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
60
60
  _ref$alwaysOpened = _ref.alwaysOpened,
61
61
  alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
62
62
  portal = _ref.portal,
63
+ renderItem = _ref.renderItem,
63
64
  rest = _objectWithoutProperties(_ref, _excluded);
64
65
  var _useReducer = useReducer(pathReducer, []),
65
66
  _useReducer2 = _slicedToArray(_useReducer, 2),
@@ -70,9 +71,10 @@ export var dropdownRoot = function dropdownRoot(Root) {
70
71
  focusedPath = _useReducer4[0],
71
72
  dispatchFocusedPath = _useReducer4[1];
72
73
  var _useHashMaps = useHashMaps(items),
73
- _useHashMaps2 = _slicedToArray(_useHashMaps, 2),
74
+ _useHashMaps2 = _slicedToArray(_useHashMaps, 3),
74
75
  pathMap = _useHashMaps2[0],
75
- focusedToValueMap = _useHashMaps2[1];
76
+ focusedToValueMap = _useHashMaps2[1],
77
+ valueToItemMap = _useHashMaps2[2];
76
78
  var activeDescendantItemValue = ((_getItemByFocused = getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
77
79
  var floatingPopoverRef = useRef(null);
78
80
  var treeId = safeUseId();
@@ -135,7 +137,9 @@ export var dropdownRoot = function dropdownRoot(Root) {
135
137
  onItemClick: onItemClick,
136
138
  onItemSelect: onItemSelect,
137
139
  hasArrow: hasArrow,
138
- treeId: treeId
140
+ treeId: treeId,
141
+ renderItem: renderItem,
142
+ valueToItemMap: valueToItemMap
139
143
  }
140
144
  }, /*#__PURE__*/React.createElement(FloatingPopover, {
141
145
  ref: floatingPopoverRef,
@@ -6,6 +6,7 @@ export var useHashMaps = function useHashMaps(items) {
6
6
  return useMemo(function () {
7
7
  var pathMap = new Map();
8
8
  var focusedToValueMap = new Map();
9
+ var valueToItemMap = new Map();
9
10
  pathMap.set('root', items.length);
10
11
  var rec = function rec(items) {
11
12
  var prevIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
@@ -17,10 +18,12 @@ export var useHashMaps = function useHashMaps(items) {
17
18
  if (innerItems) {
18
19
  pathMap.set(value, innerItems.length);
19
20
  rec(innerItems, currIndex);
21
+ } else {
22
+ valueToItemMap.set(value, item);
20
23
  }
21
24
  });
22
25
  };
23
26
  rec(items);
24
- return [pathMap, focusedToValueMap];
27
+ return [pathMap, focusedToValueMap, valueToItemMap];
25
28
  }, [items]);
26
29
  };
@@ -4,7 +4,7 @@ import { cx } from '../../../../utils';
4
4
  import { IconDisclosureRight } from '../../../_Icon';
5
5
  import { Context } from '../../Dropdown';
6
6
  import { getItemId } from '../../utils';
7
- import { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell } from './DropdownItem.styles';
7
+ import { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell, RenderItemWrapper } from './DropdownItem.styles';
8
8
  export var DropdownItem = function DropdownItem(_ref) {
9
9
  var item = _ref.item,
10
10
  path = _ref.path,
@@ -34,7 +34,9 @@ export var DropdownItem = function DropdownItem(_ref) {
34
34
  onItemSelect = _useContext.onItemSelect,
35
35
  onItemClick = _useContext.onItemClick,
36
36
  hasArrow = _useContext.hasArrow,
37
- treeId = _useContext.treeId;
37
+ treeId = _useContext.treeId,
38
+ renderItem = _useContext.renderItem,
39
+ valueToItemMap = _useContext.valueToItemMap;
38
40
  var hasDescendants = Boolean(item.items);
39
41
  var disclosureIconSize = size === 'xs' ? 'xs' : 's';
40
42
  var isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;
@@ -85,7 +87,7 @@ export var DropdownItem = function DropdownItem(_ref) {
85
87
  "aria-expanded": ariaExpanded,
86
88
  "aria-level": ariaLevel,
87
89
  "aria-label": ariaLabel
88
- }, /*#__PURE__*/React.createElement(CellWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
90
+ }, renderItem ? /*#__PURE__*/React.createElement(RenderItemWrapper, null, renderItem(valueToItemMap.get(value))) : /*#__PURE__*/React.createElement(CellWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
89
91
  contentLeft: contentLeft,
90
92
  contentRight: contentRight,
91
93
  alignContentLeft: "center",
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  import { classes, tokens, constants } from '../../Dropdown.tokens';
3
- import { addFocus } from '../../../../mixins';
3
+ import { addFocus, applyEllipsis } from '../../../../mixins';
4
4
  import { cellConfig, cellTokens } from '../../../Cell';
5
5
  import { component, mergeConfig } from '../../../../engines';
6
6
  var mergedCellConfig = /*#__PURE__*/mergeConfig(cellConfig);
@@ -35,4 +35,7 @@ export var Wrapper = /*#__PURE__*/styled.li.withConfig({
35
35
  outlineRadius: /*#__PURE__*/"var(".concat(tokens.itemBorderRadius, ")"),
36
36
  hasTransition: false,
37
37
  customFocusRules: /*#__PURE__*/"\n &.".concat(classes.dropdownItemIsFocused, ":before {\n outline: none;\n box-shadow: 0 0 0 0.0625rem var(").concat(constants.focusColor, ");\n }\n ")
38
- }));
38
+ }));
39
+ export var RenderItemWrapper = /*#__PURE__*/styled.div.withConfig({
40
+ componentId: "plasma-new-hope__sc-hs0ek1-5"
41
+ })(["", ";flex:1;"], /*#__PURE__*/applyEllipsis());
@@ -23,11 +23,6 @@ export var tokens = {
23
23
  verticalGap: '--plasma-switch-vertical-gap',
24
24
  trackWidth: '--plasma-switch__track-width',
25
25
  trackHeight: '--plasma-switch__track-height',
26
- trackBorderWidth: '--plasma-switch__track-border',
27
- trackBorderColorOn: '--plasma-switch__track-checked_true-border-color',
28
- trackBorderColorOnHover: '--plasma-switch__track-checked_true_hovered_true-border-color',
29
- trackBorderColorOff: '--plasma-switch__track-checked_false-border-color',
30
- trackBorderColorOffHover: '--plasma-switch__track-checked_false_hovered_true-border-color',
31
26
  trackBorderRadius: '--plasma-switch__track-border-radius',
32
27
  // NOTE: could be intersection with checked
33
28
  trackBackgroundColorOn: '--plasma-switch__track_checked_true-bg-color',
@@ -39,8 +34,7 @@ export var tokens = {
39
34
  thumbOffset: '--plasma-switch__thumb-offset',
40
35
  thumbBorderRadius: '--plasma-switch__thumb-border-radius',
41
36
  thumbPressScale: '--plasma-switch__thumb-scale',
42
- thumbBackgroundColorOn: '--plasma-switch__thumb_checked_true-bg-color',
43
- thumbBackgroundColorOff: '--plasma-switch__thumb-checked_false-bg-color',
37
+ thumbBackgroundColor: '--plasma-switch__thumb-bg-color',
44
38
  thumbBoxShadow: '--plasma-switch__thumb-box-shadow',
45
39
  thumbBoxShadowOn: '--plasma-switch__thumb-box-shadow_checked_true',
46
40
  labelOffsetPrivate: '--plasma_private-switch__label-offset'
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { tokens } from '../Switch.tokens';
3
3
  import { StyledTrigger } from '../Switch.styles';
4
- export var base = /*#__PURE__*/css(["", "{--plasma_private-thumbSize:calc(var(", ") - (2 * var(", ")));box-sizing:border-box;flex:0 0 var(", ");border-style:solid;border-width:var(", ");border-radius:var(", ");width:var(", ");height:var(", ");&::after{width:var(--plasma_private-thumbSize);height:var(--plasma_private-thumbSize);border-radius:var(", ");margin:auto var(", ");}}:active:not([disabled]) ", "::after{width:calc(var(", ") * var(", ",1));}"], StyledTrigger, tokens.thumbSize, tokens.trackBorderWidth, tokens.trackWidth, tokens.trackBorderWidth, tokens.trackBorderRadius, tokens.trackWidth, tokens.trackHeight, tokens.thumbBorderRadius, tokens.thumbOffset, StyledTrigger, tokens.thumbSize, tokens.thumbPressScale);
4
+ export var base = /*#__PURE__*/css(["", "{flex:0 0 var(", ");width:var(", ");height:var(", ");border-radius:var(", ");&::after{width:var(", ");height:var(", ");border-radius:var(", ");margin:auto var(", ");}}:active:not([disabled]) ", "::after{width:calc(var(", ") * var(", ",1));}"], StyledTrigger, tokens.trackWidth, tokens.trackWidth, tokens.trackHeight, tokens.trackBorderRadius, tokens.thumbSize, tokens.thumbSize, tokens.thumbBorderRadius, tokens.thumbOffset, StyledTrigger, tokens.thumbSize, tokens.thumbPressScale);
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { tokens } from '../Switch.tokens';
3
3
  import { StyledTrigger, StyledInput, StyledLabel, StyledDescription } from '../Switch.styles';
4
- export var base = /*#__PURE__*/css(["", "{background-color:var(", ");border-color:var(", ");}", ":not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));border-color:var(", ",var(", "));}", ":checked ~ ", "{background-color:var(", ");border-color:var(", ");}", ":checked:not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));border-color:var(", ",var(", "));}", "::after{background-color:var(", ");box-shadow:var(", ");}", ":checked ~ ", "::after{background-color:var(", ");box-shadow:var(", ",var(", "));}", "{color:var(", ");}", "{color:var(", ");}"], StyledTrigger, tokens.trackBackgroundColorOff, tokens.trackBorderColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOffHover, tokens.trackBackgroundColorOff, tokens.trackBorderColorOffHover, tokens.trackBorderColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOn, tokens.trackBorderColorOn, StyledInput, StyledTrigger, tokens.trackBackgroundColorOnHover, tokens.trackBackgroundColorOn, tokens.trackBorderColorOnHover, tokens.trackBorderColorOn, StyledTrigger, tokens.thumbBackgroundColorOff, tokens.thumbBoxShadow, StyledInput, StyledTrigger, tokens.thumbBackgroundColorOn, tokens.thumbBoxShadowOn, tokens.thumbBoxShadow, StyledLabel, tokens.labelColor, StyledDescription, tokens.descriptionColor);
4
+ export var base = /*#__PURE__*/css(["", "{background-color:var(", ");}", ":not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", ":checked ~ ", "{background-color:var(", ");}", ":checked:not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", "::after{background-color:var(", ");box-shadow:var(", ");}", ":checked ~ ", "::after{box-shadow:var(", ",var(", "));}", "{color:var(", ");}", "{color:var(", ");}"], StyledTrigger, tokens.trackBackgroundColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOffHover, tokens.trackBackgroundColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOn, StyledInput, StyledTrigger, tokens.trackBackgroundColorOnHover, tokens.trackBackgroundColorOn, StyledTrigger, tokens.thumbBackgroundColor, tokens.thumbBoxShadow, StyledInput, StyledTrigger, tokens.thumbBoxShadowOn, tokens.thumbBoxShadow, StyledLabel, tokens.labelColor, StyledDescription, tokens.descriptionColor);
@@ -19,7 +19,7 @@ export var config = {
19
19
  s: /*#__PURE__*/css(["", ":2rem;", ":1.25rem;", ":calc(var(", ") / 2);", ":1rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], switchTokens.trackWidth, switchTokens.trackHeight, switchTokens.trackBorderRadius, switchTokens.trackHeight, switchTokens.thumbSize, switchTokens.thumbBorderRadius, switchTokens.thumbSize, switchTokens.thumbOffset, switchTokens.thumbPressScale)
20
20
  },
21
21
  view: {
22
- "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":0rem;", ":transparent;", ":transparent;", ":transparent;", ":transparent;", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], switchTokens.labelColor, switchTokens.descriptionColor, switchTokens.trackBackgroundColorOn, switchTokens.trackBackgroundColorOnHover, switchTokens.trackBackgroundColorOff, switchTokens.trackBackgroundColorOffHover, switchTokens.trackBorderWidth, switchTokens.trackBorderColorOff, switchTokens.trackBorderColorOffHover, switchTokens.trackBorderColorOn, switchTokens.trackBorderColorOnHover, switchTokens.thumbBackgroundColorOff, switchTokens.thumbBackgroundColorOn, switchTokens.thumbBoxShadow)
22
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], switchTokens.labelColor, switchTokens.descriptionColor, switchTokens.trackBackgroundColorOn, switchTokens.trackBackgroundColorOnHover, switchTokens.trackBackgroundColorOff, switchTokens.trackBackgroundColorOffHover, switchTokens.thumbBackgroundColor, switchTokens.thumbBoxShadow)
23
23
  },
24
24
  disabled: {
25
25
  "true": /*#__PURE__*/css(["", ":0.4;"], switchTokens.disabledOpacity)
@@ -1,8 +1,5 @@
1
1
  import { switchConfig } from '../../../../components/Switch';
2
2
  import { component, mergeConfig } from '../../../../engines';
3
3
  import { config } from './Switch.config';
4
- import { config as outlineConfig } from './Switch.outline.config';
5
4
  var mergedConfig = /*#__PURE__*/mergeConfig(switchConfig, config);
6
- export var Switch = /*#__PURE__*/component(mergedConfig);
7
- var mergedOutlineConfig = /*#__PURE__*/mergeConfig(switchConfig, outlineConfig);
8
- export var SwitchOutline = /*#__PURE__*/component(mergedOutlineConfig);
5
+ export var Switch = /*#__PURE__*/component(mergedConfig);
@@ -9,7 +9,7 @@ import { mergeConfig } from '../../../../engines';
9
9
  import { WithTheme, argTypesFromConfig } from '../../../_helpers';
10
10
 
11
11
  import { config } from './Switch.config';
12
- import { Switch, SwitchOutline } from './Switch';
12
+ import { Switch } from './Switch';
13
13
 
14
14
  type SwitchProps = ComponentProps<typeof Switch>;
15
15
 
@@ -72,35 +72,3 @@ export const Default: StoryObj<SwitchProps> = {
72
72
  },
73
73
  render: (args) => <StoryDefault {...args} />,
74
74
  };
75
-
76
- const StoryOutline = (args: SwitchProps) => {
77
- const value = 'yes';
78
- const name = 'agree';
79
- const [checked, setChecked] = useState(true);
80
-
81
- return (
82
- <StyledWrapper>
83
- <SwitchOutline
84
- value={value}
85
- name={name}
86
- checked={checked}
87
- onChange={(event) => {
88
- setChecked(event.target.checked);
89
- onChange(event);
90
- }}
91
- onFocus={onFocus}
92
- onBlur={onBlur}
93
- {...args}
94
- />
95
- </StyledWrapper>
96
- );
97
- };
98
-
99
- export const Outline: StoryObj<SwitchProps> = {
100
- args: {
101
- size: 'm',
102
- toggleSize: 'l',
103
- disabled: false,
104
- },
105
- render: (args) => <StoryOutline {...args} />,
106
- };