@salutejs/plasma-new-hope 0.143.0-canary.1421.10814573412.0 → 0.143.0-canary.1422.10814333858.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.js +8 -5
  2. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  3. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +11 -4
  4. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  5. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -3
  6. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  7. package/cjs/components/Combobox/ComboboxOld/Combobox.js +15 -8
  8. package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  9. package/cjs/components/Slider/Slider.css +5 -6
  10. package/cjs/components/Slider/Slider.js +5 -12
  11. package/cjs/components/Slider/Slider.js.map +1 -1
  12. package/cjs/components/Slider/components/Single/Single.css +5 -6
  13. package/cjs/components/Slider/components/Single/Single.js +7 -34
  14. package/cjs/components/Slider/components/Single/Single.js.map +1 -1
  15. package/cjs/components/Slider/components/Single/Single.styles.js +1 -7
  16. package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
  17. package/cjs/components/Slider/components/Single/{Single.styles_9lxkbx.css → Single.styles_1r9f1e0.css} +0 -1
  18. package/cjs/components/TextArea/TextArea.js +2 -3
  19. package/cjs/components/TextArea/TextArea.js.map +1 -1
  20. package/cjs/index.css +5 -6
  21. package/cjs/index.js +0 -5
  22. package/cjs/index.js.map +1 -1
  23. package/cjs/utils/index.js.map +1 -1
  24. package/emotion/cjs/components/Combobox/Combobox.template-doc.mdx +347 -0
  25. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +8 -5
  26. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +11 -4
  27. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -3
  28. package/emotion/cjs/components/Combobox/ComboboxOld/Combobox.js +15 -8
  29. package/emotion/cjs/components/Slider/Slider.js +6 -15
  30. package/emotion/cjs/components/Slider/components/Single/Single.js +7 -34
  31. package/emotion/cjs/components/Slider/components/Single/Single.styles.js +13 -26
  32. package/emotion/cjs/components/TextArea/TextArea.js +3 -3
  33. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +39 -0
  34. package/emotion/cjs/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
  35. package/emotion/cjs/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.stories.tsx → Combobox.stories.tsx} +5 -3
  36. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +25 -0
  37. package/emotion/{es/examples/plasma_b2c/components/Combobox/ComboboxOld → cjs/examples/plasma_b2c/components/Combobox/Legacy}/Combobox.stories.tsx +18 -16
  38. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +39 -0
  39. package/{styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxNew → emotion/cjs/examples/plasma_web/components/Combobox}/Combobox.js +2 -2
  40. package/emotion/{es/examples/plasma_b2c/components/Combobox/ComboboxNew → cjs/examples/plasma_web/components/Combobox}/Combobox.stories.tsx +5 -3
  41. package/emotion/cjs/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +25 -0
  42. package/emotion/cjs/examples/{plasma_b2c/components/Combobox/ComboboxOld → plasma_web/components/Combobox/Legacy}/Combobox.stories.tsx +18 -16
  43. package/emotion/cjs/hooks/index.js +1 -8
  44. package/emotion/cjs/utils/index.js +0 -15
  45. package/emotion/es/components/Combobox/Combobox.template-doc.mdx +347 -0
  46. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +8 -5
  47. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +11 -4
  48. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -3
  49. package/emotion/es/components/Combobox/ComboboxOld/Combobox.js +15 -8
  50. package/emotion/es/components/Slider/Slider.js +5 -15
  51. package/emotion/es/components/Slider/components/Single/Single.js +8 -35
  52. package/emotion/es/components/Slider/components/Single/Single.styles.js +12 -25
  53. package/emotion/es/components/TextArea/TextArea.js +4 -4
  54. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +33 -0
  55. package/emotion/es/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
  56. package/emotion/{cjs/examples/plasma_web/components/Combobox/ComboboxNew → es/examples/plasma_b2c/components/Combobox}/Combobox.stories.tsx +5 -3
  57. package/emotion/es/examples/plasma_b2c/components/Combobox/Legacy/Combobox.config.js +19 -0
  58. package/emotion/{cjs/examples/plasma_web/components/Combobox/ComboboxOld → es/examples/plasma_b2c/components/Combobox/Legacy}/Combobox.stories.tsx +18 -16
  59. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +33 -0
  60. package/emotion/es/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
  61. package/emotion/es/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.stories.tsx → Combobox.stories.tsx} +5 -3
  62. package/emotion/es/examples/plasma_web/components/Combobox/Legacy/Combobox.config.js +19 -0
  63. package/emotion/es/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.stories.tsx +18 -16
  64. package/emotion/es/hooks/index.js +1 -2
  65. package/emotion/es/utils/index.js +0 -1
  66. package/es/components/Combobox/ComboboxNew/Combobox.js +8 -5
  67. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  68. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +11 -4
  69. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
  70. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -3
  71. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  72. package/es/components/Combobox/ComboboxOld/Combobox.js +15 -8
  73. package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
  74. package/es/components/Slider/Slider.css +5 -6
  75. package/es/components/Slider/Slider.js +6 -13
  76. package/es/components/Slider/Slider.js.map +1 -1
  77. package/es/components/Slider/components/Single/Single.css +5 -6
  78. package/es/components/Slider/components/Single/Single.js +8 -35
  79. package/es/components/Slider/components/Single/Single.js.map +1 -1
  80. package/es/components/Slider/components/Single/Single.styles.js +2 -7
  81. package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
  82. package/es/components/Slider/components/Single/{Single.styles_9lxkbx.css → Single.styles_1r9f1e0.css} +0 -1
  83. package/es/components/TextArea/TextArea.js +2 -3
  84. package/es/components/TextArea/TextArea.js.map +1 -1
  85. package/es/index.css +5 -6
  86. package/es/index.js +0 -2
  87. package/es/index.js.map +1 -1
  88. package/es/utils/index.js.map +1 -1
  89. package/package.json +2 -3
  90. package/styled-components/cjs/components/Combobox/Combobox.template-doc.mdx +347 -0
  91. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +8 -5
  92. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +11 -4
  93. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -3
  94. package/styled-components/cjs/components/Combobox/ComboboxOld/Combobox.js +15 -8
  95. package/styled-components/cjs/components/Slider/Slider.js +6 -15
  96. package/styled-components/cjs/components/Slider/components/Single/Single.js +7 -34
  97. package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +2 -5
  98. package/styled-components/cjs/components/TextArea/TextArea.js +2 -2
  99. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.config.js → Combobox.config.js} +2 -2
  100. package/{emotion/cjs/examples/plasma_web/components/Combobox/ComboboxNew → styled-components/cjs/examples/plasma_b2c/components/Combobox}/Combobox.js +2 -2
  101. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +368 -0
  102. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
  103. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
  104. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +39 -0
  105. package/styled-components/cjs/examples/{plasma_b2c/components/Combobox/ComboboxNew → plasma_web/components/Combobox}/Combobox.js +2 -2
  106. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.stories.tsx +368 -0
  107. package/styled-components/cjs/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
  108. package/styled-components/cjs/examples/plasma_web/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
  109. package/styled-components/cjs/hooks/index.js +1 -8
  110. package/styled-components/cjs/utils/index.js +0 -15
  111. package/styled-components/es/components/Combobox/Combobox.template-doc.mdx +347 -0
  112. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +8 -5
  113. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +11 -4
  114. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -3
  115. package/styled-components/es/components/Combobox/ComboboxOld/Combobox.js +15 -8
  116. package/styled-components/es/components/Slider/Slider.js +5 -15
  117. package/styled-components/es/components/Slider/components/Single/Single.js +8 -35
  118. package/styled-components/es/components/Slider/components/Single/Single.styles.js +1 -4
  119. package/styled-components/es/components/TextArea/TextArea.js +3 -3
  120. package/styled-components/es/examples/{plasma_web/components/Combobox/ComboboxNew → plasma_b2c/components/Combobox}/Combobox.config.js +2 -2
  121. package/styled-components/es/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
  122. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +368 -0
  123. package/styled-components/es/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
  124. package/styled-components/es/examples/plasma_b2c/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
  125. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +33 -0
  126. package/styled-components/es/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.js → Combobox.js} +2 -2
  127. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.stories.tsx +368 -0
  128. package/styled-components/es/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.js +1 -1
  129. package/styled-components/es/examples/plasma_web/components/Combobox/Legacy/Combobox.stories.tsx +256 -0
  130. package/styled-components/es/hooks/index.js +1 -2
  131. package/styled-components/es/utils/index.js +0 -1
  132. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  133. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +5 -1
  134. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  135. package/types/components/Combobox/ComboboxNew/ui/Inner/Inner.d.ts.map +1 -1
  136. package/types/components/Combobox/ComboboxNew/ui/Inner/Inner.type.d.ts +1 -0
  137. package/types/components/Combobox/ComboboxNew/ui/Inner/Inner.type.d.ts.map +1 -1
  138. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  139. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.types.d.ts +1 -0
  140. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.types.d.ts.map +1 -1
  141. package/types/components/Combobox/ComboboxOld/Combobox.d.ts.map +1 -1
  142. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +6 -0
  143. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
  144. package/types/components/Slider/Slider.d.ts.map +1 -1
  145. package/types/components/Slider/components/Double/Double.types.d.ts +0 -2
  146. package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
  147. package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
  148. package/types/components/Slider/components/Single/Single.styles.d.ts +0 -1
  149. package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
  150. package/types/components/Slider/components/Single/Single.types.d.ts +1 -3
  151. package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
  152. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  153. package/types/examples/plasma_b2c/components/Combobox/Combobox.config.d.ts.map +1 -0
  154. package/types/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.d.ts → Combobox.d.ts} +3 -3
  155. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -0
  156. package/types/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts.map +1 -1
  157. package/types/examples/plasma_b2c/components/Combobox/Legacy/Combobox.d.ts.map +1 -0
  158. package/types/examples/plasma_web/components/Combobox/Combobox.config.d.ts.map +1 -0
  159. package/types/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.d.ts → Combobox.d.ts} +3 -3
  160. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -0
  161. package/types/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts.map +1 -1
  162. package/types/examples/plasma_web/components/Combobox/Legacy/Combobox.d.ts.map +1 -0
  163. package/types/hooks/index.d.ts +0 -1
  164. package/types/hooks/index.d.ts.map +1 -1
  165. package/types/utils/index.d.ts +0 -1
  166. package/types/utils/index.d.ts.map +1 -1
  167. package/cjs/hooks/useForm.js +0 -71
  168. package/cjs/hooks/useForm.js.map +0 -1
  169. package/cjs/utils/setRefList.js +0 -28
  170. package/cjs/utils/setRefList.js.map +0 -1
  171. package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.js +0 -39
  172. package/emotion/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.config.js +0 -25
  173. package/emotion/cjs/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -182
  174. package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.js +0 -39
  175. package/emotion/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.config.js +0 -25
  176. package/emotion/cjs/hooks/useForm.js +0 -72
  177. package/emotion/cjs/utils/setRefList.js +0 -27
  178. package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.js +0 -33
  179. package/emotion/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.config.js +0 -19
  180. package/emotion/es/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -182
  181. package/emotion/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.js +0 -33
  182. package/emotion/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.config.js +0 -19
  183. package/emotion/es/hooks/useForm.js +0 -63
  184. package/emotion/es/utils/setRefList.js +0 -20
  185. package/es/hooks/useForm.js +0 -67
  186. package/es/hooks/useForm.js.map +0 -1
  187. package/es/utils/setRefList.js +0 -23
  188. package/es/utils/setRefList.js.map +0 -1
  189. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -366
  190. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -254
  191. package/styled-components/cjs/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -182
  192. package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.js +0 -39
  193. package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -366
  194. package/styled-components/cjs/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -254
  195. package/styled-components/cjs/hooks/useForm.js +0 -72
  196. package/styled-components/cjs/utils/setRefList.js +0 -27
  197. package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.js +0 -33
  198. package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -366
  199. package/styled-components/es/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -254
  200. package/styled-components/es/examples/plasma_b2c/components/Form/Form.stories.tsx +0 -182
  201. package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.stories.tsx +0 -366
  202. package/styled-components/es/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.stories.tsx +0 -254
  203. package/styled-components/es/hooks/useForm.js +0 -63
  204. package/styled-components/es/utils/setRefList.js +0 -20
  205. package/types/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.config.d.ts.map +0 -1
  206. package/types/examples/plasma_b2c/components/Combobox/ComboboxNew/Combobox.d.ts.map +0 -1
  207. package/types/examples/plasma_b2c/components/Combobox/ComboboxOld/Combobox.d.ts.map +0 -1
  208. package/types/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.config.d.ts.map +0 -1
  209. package/types/examples/plasma_web/components/Combobox/ComboboxNew/Combobox.d.ts.map +0 -1
  210. package/types/examples/plasma_web/components/Combobox/ComboboxOld/Combobox.d.ts.map +0 -1
  211. package/types/hooks/useForm.d.ts +0 -10
  212. package/types/hooks/useForm.d.ts.map +0 -1
  213. package/types/utils/setRefList.d.ts +0 -6
  214. package/types/utils/setRefList.d.ts.map +0 -1
  215. /package/emotion/cjs/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  216. /package/emotion/cjs/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  217. /package/emotion/es/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  218. /package/emotion/es/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  219. /package/styled-components/cjs/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  220. /package/styled-components/cjs/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  221. /package/styled-components/es/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  222. /package/styled-components/es/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.js +0 -0
  223. /package/types/examples/plasma_b2c/components/Combobox/{ComboboxNew/Combobox.config.d.ts → Combobox.config.d.ts} +0 -0
  224. /package/types/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts +0 -0
  225. /package/types/examples/plasma_b2c/components/Combobox/{ComboboxOld → Legacy}/Combobox.d.ts +0 -0
  226. /package/types/examples/plasma_web/components/Combobox/{ComboboxNew/Combobox.config.d.ts → Combobox.config.d.ts} +0 -0
  227. /package/types/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.config.d.ts +0 -0
  228. /package/types/examples/plasma_web/components/Combobox/{ComboboxOld → Legacy}/Combobox.d.ts +0 -0
@@ -0,0 +1,347 @@
1
+ ---
2
+ id: combobox
3
+ title: Combobox
4
+ ---
5
+
6
+ import { PropsTable, Description, StorybookLink } from '@site/src/components';
7
+ import Tabs from '@theme/Tabs';
8
+ import TabItem from '@theme/TabItem';
9
+
10
+ # Combobox
11
+
12
+ <Description name="Combobox" />
13
+ <PropsTable name="Combobox" />
14
+
15
+ ## Использование
16
+ Обязательным параметром является только `items`. Внутри items может быть такой же вложенный массив items. Формат следующий:
17
+
18
+ ```tsx
19
+ type Items = Array<{
20
+ /**
21
+ * Значение у item
22
+ */
23
+ value: string;
24
+ /**
25
+ * Метка-подпись к item
26
+ */
27
+ label: string;
28
+ /**
29
+ * Список дочерних items.
30
+ */
31
+ items?: Array<ItemOption>;
32
+ /**
33
+ * Item не активен
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * Слот для контента слева
38
+ */
39
+ contentLeft?: ReactNode;
40
+ /**
41
+ * Слот для контента справа
42
+ */
43
+ contentRight?: ReactNode;
44
+ }>;
45
+ ```
46
+
47
+ Тип выбора комбобокса - одиночный или множественный зависит от типа `value` и `onChange`. В одиночном value - `string`, в множественном - `Array<string>`.\
48
+
49
+
50
+ ## Примеры
51
+
52
+ <Tabs>
53
+ <TabItem value="single" label="Single" default>
54
+ ```tsx live
55
+ import React from 'react';
56
+ import { Combobox } from '@salutejs/{{ package }}';
57
+
58
+ export function App() {
59
+ const [value, setValue] = useState('');
60
+
61
+ const items = [
62
+ {
63
+ value: 'north_america',
64
+ label: 'Северная Америка',
65
+ },
66
+ {
67
+ value: 'south_america',
68
+ label: 'Южная Америка',
69
+ items: [
70
+ {
71
+ value: 'brazil',
72
+ label: 'Бразилия',
73
+ },
74
+ {
75
+ value: 'argentina',
76
+ label: 'Аргентина',
77
+ },
78
+ ],
79
+ },
80
+ ];
81
+
82
+ return (
83
+ <div style={{ display: "flex", gap: "30px", height: "300px" }}>
84
+ <div style={{ width: "300px" }}>
85
+ <Combobox
86
+ items={items}
87
+ value={value}
88
+ onChange={setValue}
89
+ placeholder="Placeholder"
90
+ label="Label"
91
+ helperText="Helper text"
92
+ />
93
+ </div>
94
+ </div>
95
+ );
96
+ }
97
+ ```
98
+ </TabItem>
99
+ <TabItem value="multiple" label="Multiple">
100
+ ```tsx live
101
+ import React from 'react';
102
+ import { Combobox } from '@salutejs/{{ package }}';
103
+
104
+ export function App() {
105
+ const [value, setValue] = useState([]);
106
+
107
+ const items = [
108
+ {
109
+ value: 'north_america',
110
+ label: 'Северная Америка',
111
+ },
112
+ {
113
+ value: 'south_america',
114
+ label: 'Южная Америка',
115
+ items: [
116
+ {
117
+ value: 'brazil',
118
+ label: 'Бразилия',
119
+ },
120
+ {
121
+ value: 'argentina',
122
+ label: 'Аргентина',
123
+ },
124
+ ],
125
+ },
126
+ ];
127
+
128
+ return (
129
+ <div style={{ display: "flex", gap: "30px", height: "300px" }}>
130
+ <div style={{ width: "300px" }}>
131
+ <Combobox
132
+ multiple
133
+ items={items}
134
+ value={value}
135
+ onChange={setValue}
136
+ placeholder="Placeholder"
137
+ label="Label"
138
+ helperText="Helper text"
139
+ />
140
+ </div>
141
+ </div>
142
+ );
143
+ }
144
+ ```
145
+ </TabItem>
146
+ <TabItem value="predefined" label="Predefined">
147
+ Есть возможность задать значения по дефолту (главное, чтобы они находились в `items`). Также можно управлять состоянием снаружи селекта.
148
+
149
+ ```tsx live
150
+ import React from 'react';
151
+ import { Combobox, Button } from '@salutejs/{{ package }}';
152
+
153
+ export function App() {
154
+ const [multipleValue, setMultipleValue] = useState(['brazil', 'north_america']);
155
+
156
+ const items = [
157
+ {
158
+ value: 'north_america',
159
+ label: 'Северная Америка',
160
+ },
161
+ {
162
+ value: 'south_america',
163
+ label: 'Южная Америка',
164
+ items: [
165
+ {
166
+ value: 'brazil',
167
+ label: 'Бразилия',
168
+ },
169
+ {
170
+ value: 'argentina',
171
+ label: 'Аргентина',
172
+ },
173
+ ],
174
+ },
175
+ ];
176
+
177
+ return (
178
+ <div style={{ display: "flex", gap: "30px", height: "300px" }}>
179
+ <div style={{ width: "300px" }}>
180
+ <Combobox
181
+ multiple
182
+ items={items}
183
+ value={multipleValue}
184
+ onChange={setMultipleValue}
185
+ placeholder="Placeholder"
186
+ label="Label"
187
+ helperText="Helper text"
188
+ />
189
+ </div>
190
+
191
+ <Button onClick={() => setMultipleValue([])}>Очистить</Button>
192
+ </div>
193
+ );
194
+ }
195
+ ```
196
+ </TabItem>
197
+ <TabItem value="portal" label="Portal">
198
+ Иногда возникает необходимость вынесения выпадающего списка на уровни выше в DOM. К примеру, когда у родительского блока имеется скролл, и список будет обрезаться, чего хотелось бы избежать.\
199
+ Для такой реализации имеется пропс `portal`, который принимает либо `ref` либо `id` html-тега.\
200
+ Также нужно прокинуть проп `listWidth`, чтобы явно задать ширину списку. Если этого не сделать, то будет взята ширина 100% от блока, на который ведет ссылка портала.
201
+
202
+ ```tsx live
203
+ import React, { useRef } from 'react';
204
+ import { Combobox } from '@salutejs/{{ package }}';
205
+
206
+ export function App() {
207
+ const [value, setValue] = useState('');
208
+
209
+ const items = [
210
+ {
211
+ value: 'north_america',
212
+ label: 'Северная Америка',
213
+ },
214
+ {
215
+ value: 'south_america',
216
+ label: 'Южная Америка',
217
+ items: [
218
+ {
219
+ value: 'brazil',
220
+ label: 'Бразилия',
221
+ },
222
+ {
223
+ value: 'argentina',
224
+ label: 'Аргентина',
225
+ },
226
+ ],
227
+ },
228
+ ];
229
+
230
+ const ref = useRef(null)
231
+
232
+ return (
233
+ <div style={{ height: "300px" }} ref={ref}>
234
+ <div style={{ width: "300px" }}>
235
+ <Combobox
236
+ items={items}
237
+ value={value}
238
+ onChange={setValue}
239
+ placeholder="Placeholder"
240
+ label="Label"
241
+ helperText="Helper text"
242
+ portal={ref}
243
+ listWidth="300px"
244
+ />
245
+ </div>
246
+ </div>
247
+ );
248
+ }
249
+ ```
250
+ </TabItem>
251
+ <TabItem value="uncontrolled" label="Uncontrolled">
252
+ `value` и `onChange` - опциональные параметры. Если вы хотите `uncontrolled` вариант компонента - их пробрасывать необязательно.
253
+
254
+ ```tsx live
255
+ import React from 'react';
256
+ import { Combobox } from '@salutejs/{{ package }}';
257
+
258
+ export function App() {
259
+ const items = [
260
+ {
261
+ value: 'north_america',
262
+ label: 'Северная Америка',
263
+ },
264
+ {
265
+ value: 'south_america',
266
+ label: 'Южная Америка',
267
+ items: [
268
+ {
269
+ value: 'brazil',
270
+ label: 'Бразилия',
271
+ },
272
+ {
273
+ value: 'argentina',
274
+ label: 'Аргентина',
275
+ },
276
+ ],
277
+ },
278
+ ];
279
+
280
+ return (
281
+ <div style={{ height: "300px" }}>
282
+ <div style={{ width: "300px" }}>
283
+ <Combobox
284
+ items={items}
285
+ placeholder="Placeholder"
286
+ label="Label"
287
+ helperText="Helper text"
288
+ />
289
+ </div>
290
+ </div>
291
+ );
292
+ }
293
+ ```
294
+ </TabItem>
295
+ <TabItem value="alwaysOpened" label="Always opened">
296
+ Свойство alwaysOpened позволяет отображать Combobox всегда открытым. При этом closeAfterSelect игнорируется.
297
+
298
+ ```tsx live
299
+ import React, { useState } from 'react';
300
+ import { Combobox, Button } from '@salutejs/{{ package }}';
301
+
302
+ export function App() {
303
+ const [alwaysOpened, setAlwaysOpened] = useState(false);
304
+
305
+ const items = [
306
+ {
307
+ value: 'north_america',
308
+ label: 'Северная Америка',
309
+ },
310
+ {
311
+ value: 'south_america',
312
+ label: 'Южная Америка',
313
+ items: [
314
+ {
315
+ value: 'brazil',
316
+ label: 'Бразилия',
317
+ },
318
+ {
319
+ value: 'argentina',
320
+ label: 'Аргентина',
321
+ },
322
+ ],
323
+ },
324
+ ];
325
+
326
+ return (
327
+ <div style={{ height: "300px" }}>
328
+ <div style={{width: "300px" }}>
329
+ <Button text={ alwaysOpened ? 'По умолчанию' : 'Всегда открыт' } onClick={() => setAlwaysOpened(!alwaysOpened)} style={{ marginBottom: '1rem' }} />
330
+ <Combobox
331
+ items={items}
332
+ placeholder="Placeholder"
333
+ label="Label"
334
+ helperText="Helper text"
335
+ alwaysOpened={alwaysOpened}
336
+ />
337
+ </div>
338
+ </div>
339
+ );
340
+ }
341
+ ```
342
+ </TabItem>
343
+ </Tabs>
344
+
345
+ ## Клавиатурная навигация
346
+
347
+ Данный компонент соответствует требования W3C: [Combobox](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) и частично [TreeView](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/).
@@ -1,4 +1,4 @@
1
- var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "filter", "closeAfterSelect"];
1
+ var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect"];
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."); }
@@ -58,6 +58,8 @@ export var comboboxRoot = function comboboxRoot(Root) {
58
58
  readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
59
59
  _props$disabled = props.disabled,
60
60
  disabled = _props$disabled === void 0 ? false : _props$disabled,
61
+ _props$alwaysOpened = props.alwaysOpened,
62
+ alwaysOpened = _props$alwaysOpened === void 0 ? false : _props$alwaysOpened,
61
63
  filter = props.filter,
62
64
  outerCloseAfterSelect = props.closeAfterSelect,
63
65
  rest = _objectWithoutProperties(props, _excluded);
@@ -107,7 +109,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
107
109
  _useState6 = _slicedToArray(_useState5, 2),
108
110
  checked = _useState6[0],
109
111
  setChecked = _useState6[1];
110
- var isCurrentListOpen = Boolean(path[0]);
112
+ var isCurrentListOpen = alwaysOpened || Boolean(path[0]);
111
113
  var activeDescendantItemValue = ((_getItemByFocused = getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
112
114
  var withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;
113
115
  var closeAfterSelect = outerCloseAfterSelect !== null && outerCloseAfterSelect !== void 0 ? outerCloseAfterSelect : !multiple;
@@ -217,7 +219,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
217
219
  newValues.push(item.value);
218
220
  }
219
221
  });
220
- if (closeAfterSelect) {
222
+ if (!alwaysOpened && closeAfterSelect) {
221
223
  dispatchPath({
222
224
  type: 'reset'
223
225
  });
@@ -262,7 +264,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
262
264
  updateSingleAncestors(item, checkedCopy, 'dot');
263
265
  }
264
266
  setTextValue(isCurrentChecked ? '' : item.label);
265
- if (closeAfterSelect) {
267
+ if (!alwaysOpened && closeAfterSelect) {
266
268
  dispatchPath({
267
269
  type: 'reset'
268
270
  });
@@ -422,7 +424,8 @@ export var comboboxRoot = function comboboxRoot(Root) {
422
424
  path: path,
423
425
  dispatchPath: dispatchPath,
424
426
  index: index,
425
- listWidth: listWidth
427
+ listWidth: listWidth,
428
+ disabled: disabled
426
429
  });
427
430
  })))))));
428
431
  });
@@ -10,8 +10,12 @@ export var Inner = function Inner(_ref) {
10
10
  path = _ref.path,
11
11
  dispatchPath = _ref.dispatchPath,
12
12
  index = _ref.index,
13
- listWidth = _ref.listWidth;
13
+ listWidth = _ref.listWidth,
14
+ commonDisabled = _ref.disabled;
14
15
  var handleToggle = function handleToggle(opened) {
16
+ if (commonDisabled) {
17
+ return;
18
+ }
15
19
  if (opened) {
16
20
  dispatchPath({
17
21
  type: 'changed_on_level',
@@ -44,7 +48,8 @@ export var Inner = function Inner(_ref) {
44
48
  ariaControls: listId,
45
49
  ariaExpanded: isCurrentListOpen,
46
50
  ariaLevel: nextLevel,
47
- ariaLabel: item.label
51
+ ariaLabel: item.label,
52
+ disabled: commonDisabled
48
53
  })
49
54
  }, /*#__PURE__*/React.createElement(Ul, {
50
55
  role: "group",
@@ -59,7 +64,8 @@ export var Inner = function Inner(_ref) {
59
64
  path: path,
60
65
  dispatchPath: dispatchPath,
61
66
  index: innerIndex,
62
- listWidth: listWidth
67
+ listWidth: listWidth,
68
+ disabled: commonDisabled
63
69
  });
64
70
  })));
65
71
  }
@@ -68,6 +74,7 @@ export var Inner = function Inner(_ref) {
68
74
  path: path,
69
75
  index: index,
70
76
  currentLevel: currentLevel,
71
- ariaLevel: nextLevel
77
+ ariaLevel: nextLevel,
78
+ disabled: commonDisabled
72
79
  });
73
80
  };
@@ -12,6 +12,7 @@ export var Item = function Item(_ref) {
12
12
  path = _ref.path,
13
13
  currentLevel = _ref.currentLevel,
14
14
  index = _ref.index,
15
+ outerDisabled = _ref.disabled,
15
16
  ariaControls = _ref.ariaControls,
16
17
  ariaExpanded = _ref.ariaExpanded,
17
18
  ariaLevel = _ref.ariaLevel,
@@ -21,6 +22,7 @@ export var Item = function Item(_ref) {
21
22
  disabled = item.disabled,
22
23
  contentLeft = item.contentLeft,
23
24
  contentRight = item.contentRight;
25
+ var commonDisabled = outerDisabled || disabled;
24
26
  var ref = useRef(null);
25
27
  var _useContext = useContext(Context),
26
28
  focusedPath = _useContext.focusedPath,
@@ -33,7 +35,7 @@ export var Item = function Item(_ref) {
33
35
  renderItem = _useContext.renderItem,
34
36
  valueToItemMap = _useContext.valueToItemMap,
35
37
  treeId = _useContext.treeId;
36
- var disabledClassName = disabled ? classes.dropdownItemIsDisabled : undefined;
38
+ var disabledClassName = commonDisabled ? classes.dropdownItemIsDisabled : undefined;
37
39
  var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? classes.dropdownItemIsFocused : undefined;
38
40
  var activeClass = value === (path === null || path === void 0 ? void 0 : path[currentLevel + 1]) ? classes.dropdownItemIsActive : undefined;
39
41
  useDidMountEffect(function () {
@@ -46,12 +48,12 @@ export var Item = function Item(_ref) {
46
48
  }
47
49
  }, [focusedClass]);
48
50
  var handleChange = function handleChange(e) {
49
- if (disabled) return;
51
+ if (commonDisabled) return;
50
52
  e.stopPropagation();
51
53
  handleCheckboxChange(item);
52
54
  };
53
55
  var handleClick = function handleClick(e) {
54
- if (disabled) {
56
+ if (commonDisabled) {
55
57
  e.stopPropagation();
56
58
  return;
57
59
  }
@@ -1,4 +1,4 @@
1
- var _excluded = ["name", "form", "readOnly", "disabled", "label", "placeholder", "id", "children", "role", "view", "size", "frame", "usePortal", "negativeResultContent", "enumerationType", "opened", "placement", "onToggle", "onKeyDown", "filterFunction"];
1
+ var _excluded = ["name", "form", "readOnly", "disabled", "label", "placeholder", "id", "children", "role", "view", "size", "frame", "usePortal", "negativeResultContent", "enumerationType", "opened", "alwaysOpened", "placement", "onToggle", "onKeyDown", "filterFunction"];
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."); }
@@ -43,6 +43,8 @@ export var comboboxRoot = function comboboxRoot(Root) {
43
43
  enumerationType = _ref$enumerationType === void 0 ? 'comma' : _ref$enumerationType,
44
44
  _ref$opened = _ref.opened,
45
45
  opened = _ref$opened === void 0 ? false : _ref$opened,
46
+ _ref$alwaysOpened = _ref.alwaysOpened,
47
+ alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
46
48
  _ref$placement = _ref.placement,
47
49
  placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
48
50
  onToggle = _ref.onToggle,
@@ -73,7 +75,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
73
75
  itemsRefs: itemsRefs,
74
76
  inputRef: inputRef
75
77
  };
76
- var _useState3 = useState(opened),
78
+ var _useState3 = useState(alwaysOpened || opened),
77
79
  _useState4 = _slicedToArray(_useState3, 2),
78
80
  isVisible = _useState4[0],
79
81
  setIsVisible = _useState4[1];
@@ -99,11 +101,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
99
101
  if (disabled || readOnly) {
100
102
  return;
101
103
  }
102
- setIsVisible(opened);
103
- }, [opened, disabled, readOnly]);
104
+ setIsVisible(alwaysOpened || opened);
105
+ }, [opened, alwaysOpened, disabled, readOnly]);
104
106
  useEffect(function () {
105
107
  // INFO: Для кейсов, когда значение выбрано и нужно вывести весь список
106
- if (opened) {
108
+ if (alwaysOpened || opened) {
107
109
  setFilterValue('');
108
110
  }
109
111
  }, []);
@@ -117,10 +119,10 @@ export var comboboxRoot = function comboboxRoot(Root) {
117
119
  setFilterValue('');
118
120
  }
119
121
  if (onToggle) {
120
- onToggle(openValue, event);
122
+ onToggle(alwaysOpened || openValue, event);
121
123
  return;
122
124
  }
123
- setIsVisible(openValue);
125
+ setIsVisible(alwaysOpened || openValue);
124
126
  };
125
127
  var closedWithoutChanges = useRef(true);
126
128
  var updateValue = function updateValue(item, event) {
@@ -134,7 +136,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
134
136
  }
135
137
  var newSelected = getNewSelected(rest.value, newValue, 'single');
136
138
  (_rest$onChangeValue2 = rest.onChangeValue) === null || _rest$onChangeValue2 === void 0 || _rest$onChangeValue2.call(rest, newSelected);
137
- onInnerToggle === null || onInnerToggle === void 0 || onInnerToggle(false, event);
139
+ onInnerToggle === null || onInnerToggle === void 0 || onInnerToggle(alwaysOpened || false, event);
138
140
  closedWithoutChanges.current = false;
139
141
  };
140
142
  var onClickChildrenItem = function onClickChildrenItem(event) {
@@ -178,6 +180,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
178
180
  onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
179
181
  onKeyDownTarget(event);
180
182
  };
183
+ useEffect(function () {
184
+ if (alwaysOpened && rest.valueType === 'single') {
185
+ setSearch(String(value));
186
+ }
187
+ }, [value, alwaysOpened]);
181
188
  return /*#__PURE__*/React.createElement(StyledRoot, {
182
189
  ref: comboboxRef
183
190
  }, /*#__PURE__*/React.createElement(StyledNativeSelect, {
@@ -1,27 +1,17 @@
1
- var _excluded = ["type"];
2
1
  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
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
6
2
  import React, { forwardRef } from 'react';
7
3
  import { base as viewCSS } from './variations/_view/base';
8
4
  import { base as sizeCSS } from './variations/_size/base';
9
5
  import { base as disabledCSS } from './variations/_disabled/base';
10
6
  import { SingleSlider, DoubleSlider } from './components';
11
- var isSingleValueProps = function isSingleValueProps(props, type) {
12
- return typeof props.value === 'number' || type === 'single' && _typeof(props.value) !== 'object';
13
- };
14
- var isDoubleValueProps = function isDoubleValueProps(props, type) {
15
- return _typeof(props.value) === 'object' || type === 'double';
7
+ var isSingleValueProps = function isSingleValueProps(props) {
8
+ return typeof props.value === 'number';
16
9
  };
17
10
  export var sliderRoot = function sliderRoot(Root) {
18
- return /*#__PURE__*/forwardRef(function (_ref, ref) {
19
- var _ref$type = _ref.type,
20
- type = _ref$type === void 0 ? 'single' : _ref$type,
21
- props = _objectWithoutProperties(_ref, _excluded);
22
- return /*#__PURE__*/React.createElement(Root, _extends({}, props, {
11
+ return /*#__PURE__*/forwardRef(function (props, ref) {
12
+ return /*#__PURE__*/React.createElement(Root, _extends({
23
13
  ref: ref
24
- }), isSingleValueProps(props, type) && /*#__PURE__*/React.createElement(SingleSlider, props), isDoubleValueProps(props, type) && /*#__PURE__*/React.createElement(DoubleSlider, props));
14
+ }, props), isSingleValueProps(props) && /*#__PURE__*/React.createElement(SingleSlider, props), !isSingleValueProps(props) && /*#__PURE__*/React.createElement(DoubleSlider, props));
25
15
  });
26
16
  };
27
17
  export var sliderConfig = {