@storybook/components 6.5.0-alpha.9 → 6.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (686) hide show
  1. package/dist/cjs/Color-d6b81866.js +2459 -0
  2. package/dist/cjs/GlobalScrollAreaStyles-ff4bd929.js +463 -0
  3. package/dist/cjs/OverlayScrollbars-620184af.js +6620 -0
  4. package/dist/cjs/WithTooltip-5fe41c41.js +3166 -0
  5. package/dist/cjs/formatter-1d8fe7b2.js +128 -0
  6. package/dist/cjs/index-bbe9389b.js +2147 -0
  7. package/dist/cjs/index.js +127 -351
  8. package/dist/cjs/syntaxhighlighter-f8dfc9f1.js +10214 -0
  9. package/dist/esm/Color-2180f69c.js +2575 -0
  10. package/dist/esm/{ScrollArea/GlobalScrollAreaStyles.js → GlobalScrollAreaStyles-8793ce4a.js} +6 -6
  11. package/dist/esm/OverlayScrollbars-5b296433.js +6709 -0
  12. package/dist/esm/WithTooltip-6d43573d.js +3194 -0
  13. package/dist/esm/formatter-a8917567.js +128 -0
  14. package/dist/esm/index-1adc6033.js +2090 -0
  15. package/dist/esm/index.js +6 -50
  16. package/dist/esm/syntaxhighlighter-21db839d.js +10289 -0
  17. package/dist/modern/Color-49d9e8e4.js +2443 -0
  18. package/dist/modern/{ScrollArea/GlobalScrollAreaStyles.js → GlobalScrollAreaStyles-8793ce4a.js} +6 -6
  19. package/dist/modern/OverlayScrollbars-86f35188.js +6603 -0
  20. package/dist/modern/WithTooltip-74be8458.js +3125 -0
  21. package/dist/modern/formatter-e46119c9.js +128 -0
  22. package/dist/modern/index-5c5d9c15.js +2147 -0
  23. package/dist/modern/index.js +6 -45
  24. package/dist/modern/syntaxhighlighter-22b2e172.js +10196 -0
  25. package/dist/ts-tmp/index.d.ts +928 -0
  26. package/dist/ts3.4/_modules/@popperjs-core-index.d.ts +1 -0
  27. package/dist/ts3.4/_modules/@popperjs-core-lib-createPopper.d.ts +9 -0
  28. package/dist/ts3.4/_modules/@popperjs-core-lib-enums.d.ts +34 -0
  29. package/dist/ts3.4/_modules/@popperjs-core-lib-index.d.ts +6 -0
  30. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-applyStyles.d.ts +4 -0
  31. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-arrow.d.ts +13 -0
  32. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-computeStyles.d.ts +38 -0
  33. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-eventListeners.d.ts +8 -0
  34. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-flip.d.ts +16 -0
  35. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-hide.d.ts +4 -0
  36. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-index.d.ts +9 -0
  37. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-offset.d.ts +24 -0
  38. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-popperOffsets.d.ts +4 -0
  39. package/dist/ts3.4/_modules/@popperjs-core-lib-modifiers-preventOverflow.d.ts +30 -0
  40. package/dist/ts3.4/_modules/@popperjs-core-lib-popper-lite.d.ts +5 -0
  41. package/dist/ts3.4/_modules/@popperjs-core-lib-popper.d.ts +7 -0
  42. package/dist/ts3.4/_modules/@popperjs-core-lib-types.d.ts +167 -0
  43. package/dist/ts3.4/_modules/@popperjs-core-lib-utils-detectOverflow.d.ts +11 -0
  44. package/dist/ts3.4/_modules/@types-prettier-index.d.ts +641 -0
  45. package/dist/ts3.4/_modules/react-textarea-autosize-dist-declarations-src-index.d.ts +17 -0
  46. package/dist/ts3.4/_modules/react-textarea-autosize-dist-react-textarea-autosize.cjs.d.ts +2 -0
  47. package/dist/ts3.4/index.d.ts +926 -34
  48. package/dist/ts3.9/_modules/@popperjs-core-index.d.ts +1 -0
  49. package/dist/ts3.9/_modules/@popperjs-core-lib-createPopper.d.ts +9 -0
  50. package/dist/ts3.9/_modules/@popperjs-core-lib-enums.d.ts +34 -0
  51. package/dist/ts3.9/_modules/@popperjs-core-lib-index.d.ts +6 -0
  52. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-applyStyles.d.ts +4 -0
  53. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-arrow.d.ts +13 -0
  54. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-computeStyles.d.ts +38 -0
  55. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-eventListeners.d.ts +8 -0
  56. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-flip.d.ts +16 -0
  57. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-hide.d.ts +4 -0
  58. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-index.d.ts +9 -0
  59. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-offset.d.ts +18 -0
  60. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-popperOffsets.d.ts +4 -0
  61. package/dist/ts3.9/_modules/@popperjs-core-lib-modifiers-preventOverflow.d.ts +30 -0
  62. package/dist/ts3.9/_modules/@popperjs-core-lib-popper-lite.d.ts +5 -0
  63. package/dist/ts3.9/_modules/@popperjs-core-lib-popper.d.ts +7 -0
  64. package/dist/ts3.9/_modules/@popperjs-core-lib-types.d.ts +167 -0
  65. package/dist/ts3.9/_modules/@popperjs-core-lib-utils-detectOverflow.d.ts +11 -0
  66. package/dist/ts3.9/_modules/@types-prettier-index.d.ts +641 -0
  67. package/dist/ts3.9/_modules/react-textarea-autosize-dist-declarations-src-index.d.ts +17 -0
  68. package/dist/ts3.9/_modules/react-textarea-autosize-dist-react-textarea-autosize.cjs.d.ts +2 -0
  69. package/dist/ts3.9/index.d.ts +926 -34
  70. package/html.js +2 -1
  71. package/package.json +20 -16
  72. package/dist/cjs/ActionBar/ActionBar.js +0 -104
  73. package/dist/cjs/ActionBar/ActionBar.stories.js +0 -66
  74. package/dist/cjs/Badge/Badge.js +0 -97
  75. package/dist/cjs/Badge/Badge.stories.js +0 -19
  76. package/dist/cjs/Button/Button.js +0 -279
  77. package/dist/cjs/Button/Button.stories.js +0 -74
  78. package/dist/cjs/Colors/SideBySide.js +0 -25
  79. package/dist/cjs/Colors/colorpalette.stories.mdx +0 -125
  80. package/dist/cjs/Loader/Loader.js +0 -274
  81. package/dist/cjs/Loader/Loader.stories.js +0 -86
  82. package/dist/cjs/ScrollArea/GlobalScrollAreaStyles.js +0 -477
  83. package/dist/cjs/ScrollArea/OverlayScrollbars.js +0 -131
  84. package/dist/cjs/ScrollArea/ScrollArea.js +0 -98
  85. package/dist/cjs/ScrollArea/ScrollArea.stories.js +0 -136
  86. package/dist/cjs/Zoom/Zoom.js +0 -31
  87. package/dist/cjs/Zoom/Zoom.stories.js +0 -185
  88. package/dist/cjs/Zoom/ZoomElement.js +0 -96
  89. package/dist/cjs/Zoom/ZoomIFrame.js +0 -142
  90. package/dist/cjs/Zoom/browserSupportsCssZoom.js +0 -20
  91. package/dist/cjs/addon-panel/addon-panel.js +0 -65
  92. package/dist/cjs/bar/bar.js +0 -150
  93. package/dist/cjs/bar/button.js +0 -160
  94. package/dist/cjs/bar/button.stories.js +0 -90
  95. package/dist/cjs/bar/separator.js +0 -68
  96. package/dist/cjs/blocks/ArgsTable/ArgControl.js +0 -138
  97. package/dist/cjs/blocks/ArgsTable/ArgJsDoc.js +0 -100
  98. package/dist/cjs/blocks/ArgsTable/ArgRow.js +0 -139
  99. package/dist/cjs/blocks/ArgsTable/ArgRow.stories.js +0 -399
  100. package/dist/cjs/blocks/ArgsTable/ArgValue.js +0 -298
  101. package/dist/cjs/blocks/ArgsTable/ArgsTable.js +0 -497
  102. package/dist/cjs/blocks/ArgsTable/ArgsTable.stories.js +0 -217
  103. package/dist/cjs/blocks/ArgsTable/NoControlsWarning.js +0 -37
  104. package/dist/cjs/blocks/ArgsTable/SectionRow.js +0 -195
  105. package/dist/cjs/blocks/ArgsTable/SectionRow.stories.js +0 -59
  106. package/dist/cjs/blocks/ArgsTable/TabbedArgsTable.js +0 -92
  107. package/dist/cjs/blocks/ArgsTable/TabbedArgsTable.stories.js +0 -50
  108. package/dist/cjs/blocks/ArgsTable/index.js +0 -61
  109. package/dist/cjs/blocks/ArgsTable/types.js +0 -1
  110. package/dist/cjs/blocks/BlockBackgroundStyles.js +0 -17
  111. package/dist/cjs/blocks/ColorPalette.js +0 -234
  112. package/dist/cjs/blocks/ColorPalette.stories.js +0 -87
  113. package/dist/cjs/blocks/Description.js +0 -33
  114. package/dist/cjs/blocks/Description.stories.js +0 -48
  115. package/dist/cjs/blocks/DocsPage.js +0 -85
  116. package/dist/cjs/blocks/DocsPage.stories.js +0 -120
  117. package/dist/cjs/blocks/DocsPageExampleCaption.md +0 -92
  118. package/dist/cjs/blocks/DocsPageExampleCaption.mdx +0 -92
  119. package/dist/cjs/blocks/EmptyBlock.js +0 -45
  120. package/dist/cjs/blocks/EmptyBlock.stories.js +0 -25
  121. package/dist/cjs/blocks/IFrame.js +0 -148
  122. package/dist/cjs/blocks/IconGallery.js +0 -99
  123. package/dist/cjs/blocks/IconGallery.stories.js +0 -53
  124. package/dist/cjs/blocks/Preview.js +0 -438
  125. package/dist/cjs/blocks/Preview.stories.js +0 -345
  126. package/dist/cjs/blocks/Source.js +0 -143
  127. package/dist/cjs/blocks/Source.stories.js +0 -76
  128. package/dist/cjs/blocks/Story.js +0 -143
  129. package/dist/cjs/blocks/Story.stories.js +0 -125
  130. package/dist/cjs/blocks/Toolbar.js +0 -133
  131. package/dist/cjs/blocks/Typeset.js +0 -94
  132. package/dist/cjs/blocks/Typeset.stories.js +0 -61
  133. package/dist/cjs/blocks/ZoomContext.js +0 -13
  134. package/dist/cjs/blocks/index.js +0 -139
  135. package/dist/cjs/brand/StorybookIcon.js +0 -44
  136. package/dist/cjs/brand/StorybookIcon.stories.js +0 -13
  137. package/dist/cjs/brand/StorybookLogo.js +0 -61
  138. package/dist/cjs/brand/StorybookLogo.stories.js +0 -27
  139. package/dist/cjs/controls/Boolean.js +0 -154
  140. package/dist/cjs/controls/Boolean.stories.js +0 -91
  141. package/dist/cjs/controls/Color.js +0 -508
  142. package/dist/cjs/controls/Color.stories.js +0 -146
  143. package/dist/cjs/controls/Date.js +0 -193
  144. package/dist/cjs/controls/Date.stories.js +0 -85
  145. package/dist/cjs/controls/Files.js +0 -81
  146. package/dist/cjs/controls/Number.js +0 -152
  147. package/dist/cjs/controls/Number.stories.js +0 -91
  148. package/dist/cjs/controls/Object.js +0 -416
  149. package/dist/cjs/controls/Object.stories.js +0 -124
  150. package/dist/cjs/controls/Range.js +0 -224
  151. package/dist/cjs/controls/Range.stories.js +0 -126
  152. package/dist/cjs/controls/Text.js +0 -106
  153. package/dist/cjs/controls/Text.stories.js +0 -91
  154. package/dist/cjs/controls/helpers.js +0 -35
  155. package/dist/cjs/controls/index.js +0 -182
  156. package/dist/cjs/controls/options/Checkbox.js +0 -167
  157. package/dist/cjs/controls/options/Options.js +0 -92
  158. package/dist/cjs/controls/options/Options.stories.js +0 -214
  159. package/dist/cjs/controls/options/Radio.js +0 -102
  160. package/dist/cjs/controls/options/Select.js +0 -173
  161. package/dist/cjs/controls/options/helpers.js +0 -81
  162. package/dist/cjs/controls/options/index.js +0 -22
  163. package/dist/cjs/controls/react-editable-json-tree/LICENSE.md +0 -14
  164. package/dist/cjs/controls/react-editable-json-tree/components/JsonAddValue.js +0 -228
  165. package/dist/cjs/controls/react-editable-json-tree/components/JsonArray.js +0 -507
  166. package/dist/cjs/controls/react-editable-json-tree/components/JsonFunctionValue.js +0 -321
  167. package/dist/cjs/controls/react-editable-json-tree/components/JsonNode.js +0 -422
  168. package/dist/cjs/controls/react-editable-json-tree/components/JsonObject.js +0 -509
  169. package/dist/cjs/controls/react-editable-json-tree/components/JsonValue.js +0 -312
  170. package/dist/cjs/controls/react-editable-json-tree/index.js +0 -331
  171. package/dist/cjs/controls/react-editable-json-tree/types/dataTypes.js +0 -31
  172. package/dist/cjs/controls/react-editable-json-tree/types/deltaTypes.js +0 -12
  173. package/dist/cjs/controls/react-editable-json-tree/types/inputUsageTypes.js +0 -13
  174. package/dist/cjs/controls/react-editable-json-tree/utils/objectTypes.js +0 -51
  175. package/dist/cjs/controls/react-editable-json-tree/utils/parse.js +0 -29
  176. package/dist/cjs/controls/react-editable-json-tree/utils/styles.js +0 -68
  177. package/dist/cjs/controls/types.js +0 -1
  178. package/dist/cjs/form/field/field.js +0 -62
  179. package/dist/cjs/form/form.stories.js +0 -223
  180. package/dist/cjs/form/index.js +0 -27
  181. package/dist/cjs/form/input/input.js +0 -267
  182. package/dist/cjs/html.js +0 -58
  183. package/dist/cjs/icon/icon.js +0 -74
  184. package/dist/cjs/icon/icon.stories.js +0 -76
  185. package/dist/cjs/icon/icons.js +0 -182
  186. package/dist/cjs/icon/svg.js +0 -24
  187. package/dist/cjs/placeholder/placeholder.js +0 -94
  188. package/dist/cjs/placeholder/placeholder.stories.js +0 -64
  189. package/dist/cjs/shared/animation.js +0 -19
  190. package/dist/cjs/spaced/Spaced.js +0 -101
  191. package/dist/cjs/spaced/Spaced.stories.js +0 -73
  192. package/dist/cjs/syntaxhighlighter/formatter.js +0 -17
  193. package/dist/cjs/syntaxhighlighter/lazy-syntaxhighlighter.js +0 -49
  194. package/dist/cjs/syntaxhighlighter/syntaxhighlighter-types.js +0 -1
  195. package/dist/cjs/syntaxhighlighter/syntaxhighlighter.js +0 -315
  196. package/dist/cjs/syntaxhighlighter/syntaxhighlighter.stories.js +0 -112
  197. package/dist/cjs/tabs/tabs.js +0 -315
  198. package/dist/cjs/tabs/tabs.stories.js +0 -308
  199. package/dist/cjs/tooltip/ListItem.js +0 -224
  200. package/dist/cjs/tooltip/ListItem.stories.js +0 -95
  201. package/dist/cjs/tooltip/Tooltip.js +0 -143
  202. package/dist/cjs/tooltip/Tooltip.stories.js +0 -52
  203. package/dist/cjs/tooltip/TooltipLinkList.js +0 -107
  204. package/dist/cjs/tooltip/TooltipLinkList.stories.js +0 -100
  205. package/dist/cjs/tooltip/TooltipMessage.js +0 -85
  206. package/dist/cjs/tooltip/TooltipMessage.stories.js +0 -54
  207. package/dist/cjs/tooltip/TooltipNote.js +0 -50
  208. package/dist/cjs/tooltip/TooltipNote.stories.js +0 -29
  209. package/dist/cjs/tooltip/WithTooltip.js +0 -229
  210. package/dist/cjs/tooltip/WithTooltip.stories.js +0 -95
  211. package/dist/cjs/tooltip/lazy-WithTooltip.js +0 -72
  212. package/dist/cjs/typings.d.js +0 -1
  213. package/dist/cjs/typography/DocumentFormatting.js +0 -577
  214. package/dist/cjs/typography/DocumentFormattingSample.md +0 -141
  215. package/dist/cjs/typography/DocumentWrapper.js +0 -298
  216. package/dist/cjs/typography/DocumentWrapper.stories.js +0 -89
  217. package/dist/cjs/typography/link/link.js +0 -207
  218. package/dist/cjs/typography/link/link.stories.js +0 -71
  219. package/dist/cjs/typography/shared.js +0 -67
  220. package/dist/cjs/typography/typography.stories.mdx +0 -75
  221. package/dist/esm/ActionBar/ActionBar.js +0 -83
  222. package/dist/esm/ActionBar/ActionBar.stories.js +0 -47
  223. package/dist/esm/Badge/Badge.js +0 -81
  224. package/dist/esm/Badge/Badge.stories.js +0 -12
  225. package/dist/esm/Button/Button.js +0 -239
  226. package/dist/esm/Button/Button.stories.js +0 -65
  227. package/dist/esm/Colors/SideBySide.js +0 -15
  228. package/dist/esm/Colors/colorpalette.stories.mdx +0 -125
  229. package/dist/esm/Loader/Loader.js +0 -223
  230. package/dist/esm/Loader/Loader.stories.js +0 -63
  231. package/dist/esm/ScrollArea/OverlayScrollbars.js +0 -102
  232. package/dist/esm/ScrollArea/ScrollArea.js +0 -58
  233. package/dist/esm/ScrollArea/ScrollArea.stories.js +0 -88
  234. package/dist/esm/Zoom/Zoom.js +0 -15
  235. package/dist/esm/Zoom/Zoom.stories.js +0 -149
  236. package/dist/esm/Zoom/ZoomElement.js +0 -64
  237. package/dist/esm/Zoom/ZoomIFrame.js +0 -121
  238. package/dist/esm/Zoom/browserSupportsCssZoom.js +0 -9
  239. package/dist/esm/addon-panel/addon-panel.js +0 -32
  240. package/dist/esm/bar/bar.js +0 -114
  241. package/dist/esm/bar/button.js +0 -139
  242. package/dist/esm/bar/button.stories.js +0 -56
  243. package/dist/esm/bar/separator.js +0 -30
  244. package/dist/esm/blocks/ArgsTable/ArgControl.js +0 -107
  245. package/dist/esm/blocks/ArgsTable/ArgJsDoc.js +0 -78
  246. package/dist/esm/blocks/ArgsTable/ArgRow.js +0 -110
  247. package/dist/esm/blocks/ArgsTable/ArgRow.stories.js +0 -358
  248. package/dist/esm/blocks/ArgsTable/ArgValue.js +0 -246
  249. package/dist/esm/blocks/ArgsTable/ArgsTable.js +0 -452
  250. package/dist/esm/blocks/ArgsTable/ArgsTable.stories.js +0 -159
  251. package/dist/esm/blocks/ArgsTable/NoControlsWarning.js +0 -22
  252. package/dist/esm/blocks/ArgsTable/SectionRow.js +0 -153
  253. package/dist/esm/blocks/ArgsTable/SectionRow.stories.js +0 -38
  254. package/dist/esm/blocks/ArgsTable/TabbedArgsTable.js +0 -65
  255. package/dist/esm/blocks/ArgsTable/TabbedArgsTable.stories.js +0 -34
  256. package/dist/esm/blocks/ArgsTable/index.js +0 -4
  257. package/dist/esm/blocks/ArgsTable/types.js +0 -0
  258. package/dist/esm/blocks/BlockBackgroundStyles.js +0 -8
  259. package/dist/esm/blocks/ColorPalette.js +0 -196
  260. package/dist/esm/blocks/ColorPalette.stories.js +0 -69
  261. package/dist/esm/blocks/Description.js +0 -19
  262. package/dist/esm/blocks/Description.stories.js +0 -32
  263. package/dist/esm/blocks/DocsPage.js +0 -57
  264. package/dist/esm/blocks/DocsPage.stories.js +0 -60
  265. package/dist/esm/blocks/DocsPageExampleCaption.md +0 -92
  266. package/dist/esm/blocks/DocsPageExampleCaption.mdx +0 -92
  267. package/dist/esm/blocks/EmptyBlock.js +0 -29
  268. package/dist/esm/blocks/EmptyBlock.stories.js +0 -10
  269. package/dist/esm/blocks/IFrame.js +0 -115
  270. package/dist/esm/blocks/IconGallery.js +0 -75
  271. package/dist/esm/blocks/IconGallery.stories.js +0 -37
  272. package/dist/esm/blocks/Preview.js +0 -381
  273. package/dist/esm/blocks/Preview.stories.js +0 -255
  274. package/dist/esm/blocks/Source.js +0 -125
  275. package/dist/esm/blocks/Source.stories.js +0 -49
  276. package/dist/esm/blocks/Story.js +0 -99
  277. package/dist/esm/blocks/Story.stories.js +0 -83
  278. package/dist/esm/blocks/Toolbar.js +0 -93
  279. package/dist/esm/blocks/Typeset.js +0 -71
  280. package/dist/esm/blocks/Typeset.stories.js +0 -37
  281. package/dist/esm/blocks/ZoomContext.js +0 -4
  282. package/dist/esm/blocks/index.js +0 -10
  283. package/dist/esm/brand/StorybookIcon.js +0 -31
  284. package/dist/esm/brand/StorybookIcon.stories.js +0 -6
  285. package/dist/esm/brand/StorybookLogo.js +0 -47
  286. package/dist/esm/brand/StorybookLogo.stories.js +0 -12
  287. package/dist/esm/controls/Boolean.js +0 -114
  288. package/dist/esm/controls/Boolean.stories.js +0 -54
  289. package/dist/esm/controls/Color.js +0 -446
  290. package/dist/esm/controls/Color.stories.js +0 -109
  291. package/dist/esm/controls/Date.js +0 -158
  292. package/dist/esm/controls/Date.stories.js +0 -51
  293. package/dist/esm/controls/Files.js +0 -56
  294. package/dist/esm/controls/Number.js +0 -110
  295. package/dist/esm/controls/Number.stories.js +0 -54
  296. package/dist/esm/controls/Object.js +0 -370
  297. package/dist/esm/controls/Object.stories.js +0 -81
  298. package/dist/esm/controls/Range.js +0 -179
  299. package/dist/esm/controls/Range.stories.js +0 -83
  300. package/dist/esm/controls/Text.js +0 -72
  301. package/dist/esm/controls/Text.stories.js +0 -54
  302. package/dist/esm/controls/helpers.js +0 -22
  303. package/dist/esm/controls/index.js +0 -21
  304. package/dist/esm/controls/options/Checkbox.js +0 -123
  305. package/dist/esm/controls/options/Options.js +0 -70
  306. package/dist/esm/controls/options/Options.stories.js +0 -126
  307. package/dist/esm/controls/options/Radio.js +0 -77
  308. package/dist/esm/controls/options/Select.js +0 -143
  309. package/dist/esm/controls/options/helpers.js +0 -50
  310. package/dist/esm/controls/options/index.js +0 -1
  311. package/dist/esm/controls/react-editable-json-tree/LICENSE.md +0 -14
  312. package/dist/esm/controls/react-editable-json-tree/components/JsonAddValue.js +0 -194
  313. package/dist/esm/controls/react-editable-json-tree/components/JsonArray.js +0 -465
  314. package/dist/esm/controls/react-editable-json-tree/components/JsonFunctionValue.js +0 -282
  315. package/dist/esm/controls/react-editable-json-tree/components/JsonNode.js +0 -387
  316. package/dist/esm/controls/react-editable-json-tree/components/JsonObject.js +0 -467
  317. package/dist/esm/controls/react-editable-json-tree/components/JsonValue.js +0 -272
  318. package/dist/esm/controls/react-editable-json-tree/index.js +0 -267
  319. package/dist/esm/controls/react-editable-json-tree/types/dataTypes.js +0 -24
  320. package/dist/esm/controls/react-editable-json-tree/types/deltaTypes.js +0 -6
  321. package/dist/esm/controls/react-editable-json-tree/types/inputUsageTypes.js +0 -6
  322. package/dist/esm/controls/react-editable-json-tree/utils/objectTypes.js +0 -39
  323. package/dist/esm/controls/react-editable-json-tree/utils/parse.js +0 -21
  324. package/dist/esm/controls/react-editable-json-tree/utils/styles.js +0 -62
  325. package/dist/esm/controls/types.js +0 -0
  326. package/dist/esm/form/field/field.js +0 -44
  327. package/dist/esm/form/form.stories.js +0 -198
  328. package/dist/esm/form/index.js +0 -15
  329. package/dist/esm/form/input/input.js +0 -225
  330. package/dist/esm/html.js +0 -13
  331. package/dist/esm/icon/icon.js +0 -52
  332. package/dist/esm/icon/icon.stories.js +0 -62
  333. package/dist/esm/icon/icons.js +0 -174
  334. package/dist/esm/icon/svg.js +0 -15
  335. package/dist/esm/placeholder/placeholder.js +0 -58
  336. package/dist/esm/placeholder/placeholder.stories.js +0 -23
  337. package/dist/esm/shared/animation.js +0 -9
  338. package/dist/esm/spaced/Spaced.js +0 -84
  339. package/dist/esm/spaced/Spaced.stories.js +0 -63
  340. package/dist/esm/syntaxhighlighter/formatter.js +0 -5
  341. package/dist/esm/syntaxhighlighter/lazy-syntaxhighlighter.js +0 -12
  342. package/dist/esm/syntaxhighlighter/syntaxhighlighter-types.js +0 -0
  343. package/dist/esm/syntaxhighlighter/syntaxhighlighter.js +0 -250
  344. package/dist/esm/syntaxhighlighter/syntaxhighlighter.stories.js +0 -82
  345. package/dist/esm/tabs/tabs.js +0 -269
  346. package/dist/esm/tabs/tabs.stories.js +0 -277
  347. package/dist/esm/tooltip/ListItem.js +0 -201
  348. package/dist/esm/tooltip/ListItem.stories.js +0 -87
  349. package/dist/esm/tooltip/Tooltip.js +0 -119
  350. package/dist/esm/tooltip/Tooltip.stories.js +0 -42
  351. package/dist/esm/tooltip/TooltipLinkList.js +0 -67
  352. package/dist/esm/tooltip/TooltipLinkList.stories.js +0 -60
  353. package/dist/esm/tooltip/TooltipMessage.js +0 -62
  354. package/dist/esm/tooltip/TooltipMessage.stories.js +0 -46
  355. package/dist/esm/tooltip/TooltipNote.js +0 -33
  356. package/dist/esm/tooltip/TooltipNote.stories.js +0 -21
  357. package/dist/esm/tooltip/WithTooltip.js +0 -191
  358. package/dist/esm/tooltip/WithTooltip.stories.js +0 -83
  359. package/dist/esm/tooltip/lazy-WithTooltip.js +0 -29
  360. package/dist/esm/typings.d.js +0 -0
  361. package/dist/esm/typography/DocumentFormatting.js +0 -490
  362. package/dist/esm/typography/DocumentFormattingSample.md +0 -141
  363. package/dist/esm/typography/DocumentWrapper.js +0 -288
  364. package/dist/esm/typography/DocumentWrapper.stories.js +0 -70
  365. package/dist/esm/typography/link/link.js +0 -188
  366. package/dist/esm/typography/link/link.stories.js +0 -62
  367. package/dist/esm/typography/shared.js +0 -50
  368. package/dist/esm/typography/typography.stories.mdx +0 -75
  369. package/dist/modern/ActionBar/ActionBar.js +0 -74
  370. package/dist/modern/ActionBar/ActionBar.stories.js +0 -41
  371. package/dist/modern/Badge/Badge.js +0 -78
  372. package/dist/modern/Badge/Badge.stories.js +0 -10
  373. package/dist/modern/Button/Button.js +0 -231
  374. package/dist/modern/Button/Button.stories.js +0 -65
  375. package/dist/modern/Colors/SideBySide.js +0 -15
  376. package/dist/modern/Colors/colorpalette.stories.mdx +0 -125
  377. package/dist/modern/Loader/Loader.js +0 -185
  378. package/dist/modern/Loader/Loader.stories.js +0 -53
  379. package/dist/modern/ScrollArea/OverlayScrollbars.js +0 -86
  380. package/dist/modern/ScrollArea/ScrollArea.js +0 -43
  381. package/dist/modern/ScrollArea/ScrollArea.stories.js +0 -70
  382. package/dist/modern/Zoom/Zoom.js +0 -17
  383. package/dist/modern/Zoom/Zoom.stories.js +0 -113
  384. package/dist/modern/Zoom/ZoomElement.js +0 -35
  385. package/dist/modern/Zoom/ZoomIFrame.js +0 -71
  386. package/dist/modern/Zoom/browserSupportsCssZoom.js +0 -11
  387. package/dist/modern/addon-panel/addon-panel.js +0 -33
  388. package/dist/modern/bar/bar.js +0 -80
  389. package/dist/modern/bar/button.js +0 -124
  390. package/dist/modern/bar/button.stories.js +0 -42
  391. package/dist/modern/bar/separator.js +0 -25
  392. package/dist/modern/blocks/ArgsTable/ArgControl.js +0 -71
  393. package/dist/modern/blocks/ArgsTable/ArgJsDoc.js +0 -71
  394. package/dist/modern/blocks/ArgsTable/ArgRow.js +0 -105
  395. package/dist/modern/blocks/ArgsTable/ArgRow.stories.js +0 -361
  396. package/dist/modern/blocks/ArgsTable/ArgValue.js +0 -191
  397. package/dist/modern/blocks/ArgsTable/ArgsTable.js +0 -394
  398. package/dist/modern/blocks/ArgsTable/ArgsTable.stories.js +0 -151
  399. package/dist/modern/blocks/ArgsTable/NoControlsWarning.js +0 -19
  400. package/dist/modern/blocks/ArgsTable/SectionRow.js +0 -110
  401. package/dist/modern/blocks/ArgsTable/SectionRow.stories.js +0 -31
  402. package/dist/modern/blocks/ArgsTable/TabbedArgsTable.js +0 -34
  403. package/dist/modern/blocks/ArgsTable/TabbedArgsTable.stories.js +0 -32
  404. package/dist/modern/blocks/ArgsTable/index.js +0 -4
  405. package/dist/modern/blocks/ArgsTable/types.js +0 -0
  406. package/dist/modern/blocks/BlockBackgroundStyles.js +0 -6
  407. package/dist/modern/blocks/ColorPalette.js +0 -175
  408. package/dist/modern/blocks/ColorPalette.stories.js +0 -65
  409. package/dist/modern/blocks/Description.js +0 -18
  410. package/dist/modern/blocks/Description.stories.js +0 -65
  411. package/dist/modern/blocks/DocsPage.js +0 -53
  412. package/dist/modern/blocks/DocsPage.stories.js +0 -46
  413. package/dist/modern/blocks/DocsPageExampleCaption.md +0 -92
  414. package/dist/modern/blocks/DocsPageExampleCaption.mdx +0 -92
  415. package/dist/modern/blocks/EmptyBlock.js +0 -24
  416. package/dist/modern/blocks/EmptyBlock.stories.js +0 -8
  417. package/dist/modern/blocks/IFrame.js +0 -65
  418. package/dist/modern/blocks/IconGallery.js +0 -68
  419. package/dist/modern/blocks/IconGallery.stories.js +0 -35
  420. package/dist/modern/blocks/Preview.js +0 -274
  421. package/dist/modern/blocks/Preview.stories.js +0 -219
  422. package/dist/modern/blocks/Source.js +0 -117
  423. package/dist/modern/blocks/Source.stories.js +0 -55
  424. package/dist/modern/blocks/Story.js +0 -93
  425. package/dist/modern/blocks/Story.stories.js +0 -44
  426. package/dist/modern/blocks/Toolbar.js +0 -85
  427. package/dist/modern/blocks/Typeset.js +0 -63
  428. package/dist/modern/blocks/Typeset.stories.js +0 -29
  429. package/dist/modern/blocks/ZoomContext.js +0 -4
  430. package/dist/modern/blocks/index.js +0 -10
  431. package/dist/modern/brand/StorybookIcon.js +0 -30
  432. package/dist/modern/brand/StorybookIcon.stories.js +0 -4
  433. package/dist/modern/brand/StorybookLogo.js +0 -43
  434. package/dist/modern/brand/StorybookLogo.stories.js +0 -10
  435. package/dist/modern/controls/Boolean.js +0 -104
  436. package/dist/modern/controls/Boolean.stories.js +0 -19
  437. package/dist/modern/controls/Color.js +0 -343
  438. package/dist/modern/controls/Color.stories.js +0 -74
  439. package/dist/modern/controls/Date.js +0 -118
  440. package/dist/modern/controls/Date.stories.js +0 -18
  441. package/dist/modern/controls/Files.js +0 -43
  442. package/dist/modern/controls/Number.js +0 -72
  443. package/dist/modern/controls/Number.stories.js +0 -19
  444. package/dist/modern/controls/Object.js +0 -316
  445. package/dist/modern/controls/Object.stories.js +0 -38
  446. package/dist/modern/controls/Range.js +0 -184
  447. package/dist/modern/controls/Range.stories.js +0 -44
  448. package/dist/modern/controls/Text.js +0 -46
  449. package/dist/modern/controls/Text.stories.js +0 -19
  450. package/dist/modern/controls/helpers.js +0 -15
  451. package/dist/modern/controls/index.js +0 -15
  452. package/dist/modern/controls/options/Checkbox.js +0 -81
  453. package/dist/modern/controls/options/Options.js +0 -67
  454. package/dist/modern/controls/options/Options.stories.js +0 -55
  455. package/dist/modern/controls/options/Radio.js +0 -70
  456. package/dist/modern/controls/options/Select.js +0 -143
  457. package/dist/modern/controls/options/helpers.js +0 -6
  458. package/dist/modern/controls/options/index.js +0 -1
  459. package/dist/modern/controls/react-editable-json-tree/LICENSE.md +0 -14
  460. package/dist/modern/controls/react-editable-json-tree/components/JsonAddValue.js +0 -148
  461. package/dist/modern/controls/react-editable-json-tree/components/JsonArray.js +0 -392
  462. package/dist/modern/controls/react-editable-json-tree/components/JsonFunctionValue.js +0 -215
  463. package/dist/modern/controls/react-editable-json-tree/components/JsonNode.js +0 -339
  464. package/dist/modern/controls/react-editable-json-tree/components/JsonObject.js +0 -394
  465. package/dist/modern/controls/react-editable-json-tree/components/JsonValue.js +0 -202
  466. package/dist/modern/controls/react-editable-json-tree/index.js +0 -192
  467. package/dist/modern/controls/react-editable-json-tree/types/dataTypes.js +0 -24
  468. package/dist/modern/controls/react-editable-json-tree/types/deltaTypes.js +0 -6
  469. package/dist/modern/controls/react-editable-json-tree/types/inputUsageTypes.js +0 -6
  470. package/dist/modern/controls/react-editable-json-tree/utils/objectTypes.js +0 -28
  471. package/dist/modern/controls/react-editable-json-tree/utils/parse.js +0 -21
  472. package/dist/modern/controls/react-editable-json-tree/utils/styles.js +0 -62
  473. package/dist/modern/controls/types.js +0 -0
  474. package/dist/modern/form/field/field.js +0 -39
  475. package/dist/modern/form/form.stories.js +0 -126
  476. package/dist/modern/form/index.js +0 -14
  477. package/dist/modern/form/input/input.js +0 -203
  478. package/dist/modern/html.js +0 -10
  479. package/dist/modern/icon/icon.js +0 -43
  480. package/dist/modern/icon/icon.stories.js +0 -51
  481. package/dist/modern/icon/icons.js +0 -174
  482. package/dist/modern/icon/svg.js +0 -14
  483. package/dist/modern/placeholder/placeholder.js +0 -28
  484. package/dist/modern/placeholder/placeholder.stories.js +0 -19
  485. package/dist/modern/shared/animation.js +0 -9
  486. package/dist/modern/spaced/Spaced.js +0 -76
  487. package/dist/modern/spaced/Spaced.stories.js +0 -51
  488. package/dist/modern/syntaxhighlighter/formatter.js +0 -3
  489. package/dist/modern/syntaxhighlighter/lazy-syntaxhighlighter.js +0 -6
  490. package/dist/modern/syntaxhighlighter/syntaxhighlighter-types.js +0 -0
  491. package/dist/modern/syntaxhighlighter/syntaxhighlighter.js +0 -172
  492. package/dist/modern/syntaxhighlighter/syntaxhighlighter.stories.js +0 -187
  493. package/dist/modern/tabs/tabs.js +0 -214
  494. package/dist/modern/tabs/tabs.stories.js +0 -196
  495. package/dist/modern/tooltip/ListItem.js +0 -183
  496. package/dist/modern/tooltip/ListItem.stories.js +0 -71
  497. package/dist/modern/tooltip/Tooltip.js +0 -110
  498. package/dist/modern/tooltip/Tooltip.stories.js +0 -30
  499. package/dist/modern/tooltip/TooltipLinkList.js +0 -64
  500. package/dist/modern/tooltip/TooltipLinkList.stories.js +0 -54
  501. package/dist/modern/tooltip/TooltipMessage.js +0 -56
  502. package/dist/modern/tooltip/TooltipMessage.stories.js +0 -36
  503. package/dist/modern/tooltip/TooltipNote.js +0 -29
  504. package/dist/modern/tooltip/TooltipNote.stories.js +0 -17
  505. package/dist/modern/tooltip/WithTooltip.js +0 -152
  506. package/dist/modern/tooltip/WithTooltip.stories.js +0 -68
  507. package/dist/modern/tooltip/lazy-WithTooltip.js +0 -15
  508. package/dist/modern/typings.d.js +0 -0
  509. package/dist/modern/typography/DocumentFormatting.js +0 -420
  510. package/dist/modern/typography/DocumentFormattingSample.md +0 -141
  511. package/dist/modern/typography/DocumentWrapper.js +0 -287
  512. package/dist/modern/typography/DocumentWrapper.stories.js +0 -64
  513. package/dist/modern/typography/link/link.js +0 -175
  514. package/dist/modern/typography/link/link.stories.js +0 -52
  515. package/dist/modern/typography/shared.js +0 -47
  516. package/dist/modern/typography/typography.stories.mdx +0 -75
  517. package/dist/ts3.4/ActionBar/ActionBar.d.ts +0 -14
  518. package/dist/ts3.4/Badge/Badge.d.ts +0 -5
  519. package/dist/ts3.4/Button/Button.d.ts +0 -18
  520. package/dist/ts3.4/Colors/SideBySide.d.ts +0 -2
  521. package/dist/ts3.4/Loader/Loader.d.ts +0 -18
  522. package/dist/ts3.4/ScrollArea/GlobalScrollAreaStyles.d.ts +0 -5
  523. package/dist/ts3.4/ScrollArea/OverlayScrollbars.d.ts +0 -15
  524. package/dist/ts3.4/ScrollArea/ScrollArea.d.ts +0 -7
  525. package/dist/ts3.4/Zoom/Zoom.d.ts +0 -7
  526. package/dist/ts3.4/Zoom/ZoomElement.d.ts +0 -7
  527. package/dist/ts3.4/Zoom/ZoomIFrame.d.ts +0 -15
  528. package/dist/ts3.4/Zoom/browserSupportsCssZoom.d.ts +0 -1
  529. package/dist/ts3.4/addon-panel/addon-panel.d.ts +0 -6
  530. package/dist/ts3.4/bar/bar.d.ts +0 -12
  531. package/dist/ts3.4/bar/button.d.ts +0 -27
  532. package/dist/ts3.4/bar/separator.d.ts +0 -6
  533. package/dist/ts3.4/blocks/ArgsTable/ArgControl.d.ts +0 -8
  534. package/dist/ts3.4/blocks/ArgsTable/ArgJsDoc.d.ts +0 -8
  535. package/dist/ts3.4/blocks/ArgsTable/ArgRow.d.ts +0 -12
  536. package/dist/ts3.4/blocks/ArgsTable/ArgValue.d.ts +0 -8
  537. package/dist/ts3.4/blocks/ArgsTable/ArgsTable.d.ts +0 -38
  538. package/dist/ts3.4/blocks/ArgsTable/NoControlsWarning.d.ts +0 -2
  539. package/dist/ts3.4/blocks/ArgsTable/SectionRow.d.ts +0 -10
  540. package/dist/ts3.4/blocks/ArgsTable/TabbedArgsTable.d.ts +0 -7
  541. package/dist/ts3.4/blocks/ArgsTable/index.d.ts +0 -4
  542. package/dist/ts3.4/blocks/ArgsTable/types.d.ts +0 -36
  543. package/dist/ts3.4/blocks/BlockBackgroundStyles.d.ts +0 -2
  544. package/dist/ts3.4/blocks/ColorPalette.d.ts +0 -20
  545. package/dist/ts3.4/blocks/Description.d.ts +0 -9
  546. package/dist/ts3.4/blocks/DocsPage.d.ts +0 -11
  547. package/dist/ts3.4/blocks/EmptyBlock.d.ts +0 -2
  548. package/dist/ts3.4/blocks/IFrame.d.ts +0 -24
  549. package/dist/ts3.4/blocks/IconGallery.d.ts +0 -13
  550. package/dist/ts3.4/blocks/Preview.d.ts +0 -20
  551. package/dist/ts3.4/blocks/Source.d.ts +0 -22
  552. package/dist/ts3.4/blocks/Story.d.ts +0 -26
  553. package/dist/ts3.4/blocks/Toolbar.d.ts +0 -18
  554. package/dist/ts3.4/blocks/Typeset.d.ts +0 -12
  555. package/dist/ts3.4/blocks/ZoomContext.d.ts +0 -4
  556. package/dist/ts3.4/blocks/index.d.ts +0 -10
  557. package/dist/ts3.4/brand/StorybookIcon.d.ts +0 -2
  558. package/dist/ts3.4/brand/StorybookLogo.d.ts +0 -5
  559. package/dist/ts3.4/controls/Boolean.d.ts +0 -4
  560. package/dist/ts3.4/controls/Color.d.ts +0 -5
  561. package/dist/ts3.4/controls/Date.d.ts +0 -4
  562. package/dist/ts3.4/controls/Files.d.ts +0 -6
  563. package/dist/ts3.4/controls/Number.d.ts +0 -7
  564. package/dist/ts3.4/controls/Object.d.ts +0 -6
  565. package/dist/ts3.4/controls/Range.d.ts +0 -5
  566. package/dist/ts3.4/controls/Text.d.ts +0 -4
  567. package/dist/ts3.4/controls/helpers.d.ts +0 -14
  568. package/dist/ts3.4/controls/index.d.ts +0 -13
  569. package/dist/ts3.4/controls/options/Checkbox.d.ts +0 -8
  570. package/dist/ts3.4/controls/options/Options.d.ts +0 -4
  571. package/dist/ts3.4/controls/options/Radio.d.ts +0 -8
  572. package/dist/ts3.4/controls/options/Select.d.ts +0 -8
  573. package/dist/ts3.4/controls/options/helpers.d.ts +0 -4
  574. package/dist/ts3.4/controls/options/index.d.ts +0 -1
  575. package/dist/ts3.4/controls/types.d.ts +0 -56
  576. package/dist/ts3.4/form/field/field.d.ts +0 -5
  577. package/dist/ts3.4/form/index.d.ts +0 -15
  578. package/dist/ts3.4/form/input/input.d.ts +0 -26
  579. package/dist/ts3.4/html.d.ts +0 -2
  580. package/dist/ts3.4/icon/icon.d.ts +0 -12
  581. package/dist/ts3.4/icon/icons.d.ts +0 -174
  582. package/dist/ts3.4/icon/svg.d.ts +0 -6
  583. package/dist/ts3.4/placeholder/placeholder.d.ts +0 -2
  584. package/dist/ts3.4/shared/animation.d.ts +0 -1
  585. package/dist/ts3.4/spaced/Spaced.d.ts +0 -12
  586. package/dist/ts3.4/syntaxhighlighter/formatter.d.ts +0 -1
  587. package/dist/ts3.4/syntaxhighlighter/lazy-syntaxhighlighter.d.ts +0 -4
  588. package/dist/ts3.4/syntaxhighlighter/syntaxhighlighter-types.d.ts +0 -15
  589. package/dist/ts3.4/syntaxhighlighter/syntaxhighlighter.d.ts +0 -18
  590. package/dist/ts3.4/tabs/tabs.d.ts +0 -52
  591. package/dist/ts3.4/tooltip/ListItem.d.ts +0 -34
  592. package/dist/ts3.4/tooltip/Tooltip.d.ts +0 -21
  593. package/dist/ts3.4/tooltip/TooltipLinkList.d.ts +0 -12
  594. package/dist/ts3.4/tooltip/TooltipMessage.d.ts +0 -11
  595. package/dist/ts3.4/tooltip/TooltipNote.d.ts +0 -5
  596. package/dist/ts3.4/tooltip/WithTooltip.d.ts +0 -23
  597. package/dist/ts3.4/tooltip/lazy-WithTooltip.d.ts +0 -8
  598. package/dist/ts3.4/typography/DocumentFormatting.d.ts +0 -56
  599. package/dist/ts3.4/typography/DocumentWrapper.d.ts +0 -2
  600. package/dist/ts3.4/typography/link/link.d.ts +0 -22
  601. package/dist/ts3.4/typography/shared.d.ts +0 -11
  602. package/dist/ts3.9/ActionBar/ActionBar.d.ts +0 -14
  603. package/dist/ts3.9/Badge/Badge.d.ts +0 -5
  604. package/dist/ts3.9/Button/Button.d.ts +0 -18
  605. package/dist/ts3.9/Colors/SideBySide.d.ts +0 -2
  606. package/dist/ts3.9/Loader/Loader.d.ts +0 -18
  607. package/dist/ts3.9/ScrollArea/GlobalScrollAreaStyles.d.ts +0 -5
  608. package/dist/ts3.9/ScrollArea/OverlayScrollbars.d.ts +0 -15
  609. package/dist/ts3.9/ScrollArea/ScrollArea.d.ts +0 -7
  610. package/dist/ts3.9/Zoom/Zoom.d.ts +0 -7
  611. package/dist/ts3.9/Zoom/ZoomElement.d.ts +0 -7
  612. package/dist/ts3.9/Zoom/ZoomIFrame.d.ts +0 -15
  613. package/dist/ts3.9/Zoom/browserSupportsCssZoom.d.ts +0 -1
  614. package/dist/ts3.9/addon-panel/addon-panel.d.ts +0 -6
  615. package/dist/ts3.9/bar/bar.d.ts +0 -12
  616. package/dist/ts3.9/bar/button.d.ts +0 -27
  617. package/dist/ts3.9/bar/separator.d.ts +0 -6
  618. package/dist/ts3.9/blocks/ArgsTable/ArgControl.d.ts +0 -8
  619. package/dist/ts3.9/blocks/ArgsTable/ArgJsDoc.d.ts +0 -8
  620. package/dist/ts3.9/blocks/ArgsTable/ArgRow.d.ts +0 -12
  621. package/dist/ts3.9/blocks/ArgsTable/ArgValue.d.ts +0 -8
  622. package/dist/ts3.9/blocks/ArgsTable/ArgsTable.d.ts +0 -38
  623. package/dist/ts3.9/blocks/ArgsTable/NoControlsWarning.d.ts +0 -2
  624. package/dist/ts3.9/blocks/ArgsTable/SectionRow.d.ts +0 -10
  625. package/dist/ts3.9/blocks/ArgsTable/TabbedArgsTable.d.ts +0 -7
  626. package/dist/ts3.9/blocks/ArgsTable/index.d.ts +0 -4
  627. package/dist/ts3.9/blocks/ArgsTable/types.d.ts +0 -36
  628. package/dist/ts3.9/blocks/BlockBackgroundStyles.d.ts +0 -2
  629. package/dist/ts3.9/blocks/ColorPalette.d.ts +0 -20
  630. package/dist/ts3.9/blocks/Description.d.ts +0 -9
  631. package/dist/ts3.9/blocks/DocsPage.d.ts +0 -11
  632. package/dist/ts3.9/blocks/EmptyBlock.d.ts +0 -2
  633. package/dist/ts3.9/blocks/IFrame.d.ts +0 -24
  634. package/dist/ts3.9/blocks/IconGallery.d.ts +0 -13
  635. package/dist/ts3.9/blocks/Preview.d.ts +0 -20
  636. package/dist/ts3.9/blocks/Source.d.ts +0 -22
  637. package/dist/ts3.9/blocks/Story.d.ts +0 -26
  638. package/dist/ts3.9/blocks/Toolbar.d.ts +0 -18
  639. package/dist/ts3.9/blocks/Typeset.d.ts +0 -12
  640. package/dist/ts3.9/blocks/ZoomContext.d.ts +0 -4
  641. package/dist/ts3.9/blocks/index.d.ts +0 -10
  642. package/dist/ts3.9/brand/StorybookIcon.d.ts +0 -2
  643. package/dist/ts3.9/brand/StorybookLogo.d.ts +0 -5
  644. package/dist/ts3.9/controls/Boolean.d.ts +0 -4
  645. package/dist/ts3.9/controls/Color.d.ts +0 -5
  646. package/dist/ts3.9/controls/Date.d.ts +0 -4
  647. package/dist/ts3.9/controls/Files.d.ts +0 -6
  648. package/dist/ts3.9/controls/Number.d.ts +0 -7
  649. package/dist/ts3.9/controls/Object.d.ts +0 -6
  650. package/dist/ts3.9/controls/Range.d.ts +0 -5
  651. package/dist/ts3.9/controls/Text.d.ts +0 -4
  652. package/dist/ts3.9/controls/helpers.d.ts +0 -14
  653. package/dist/ts3.9/controls/index.d.ts +0 -13
  654. package/dist/ts3.9/controls/options/Checkbox.d.ts +0 -8
  655. package/dist/ts3.9/controls/options/Options.d.ts +0 -4
  656. package/dist/ts3.9/controls/options/Radio.d.ts +0 -8
  657. package/dist/ts3.9/controls/options/Select.d.ts +0 -8
  658. package/dist/ts3.9/controls/options/helpers.d.ts +0 -4
  659. package/dist/ts3.9/controls/options/index.d.ts +0 -1
  660. package/dist/ts3.9/controls/types.d.ts +0 -56
  661. package/dist/ts3.9/form/field/field.d.ts +0 -5
  662. package/dist/ts3.9/form/index.d.ts +0 -15
  663. package/dist/ts3.9/form/input/input.d.ts +0 -26
  664. package/dist/ts3.9/html.d.ts +0 -2
  665. package/dist/ts3.9/icon/icon.d.ts +0 -12
  666. package/dist/ts3.9/icon/icons.d.ts +0 -174
  667. package/dist/ts3.9/icon/svg.d.ts +0 -6
  668. package/dist/ts3.9/placeholder/placeholder.d.ts +0 -2
  669. package/dist/ts3.9/shared/animation.d.ts +0 -1
  670. package/dist/ts3.9/spaced/Spaced.d.ts +0 -12
  671. package/dist/ts3.9/syntaxhighlighter/formatter.d.ts +0 -1
  672. package/dist/ts3.9/syntaxhighlighter/lazy-syntaxhighlighter.d.ts +0 -4
  673. package/dist/ts3.9/syntaxhighlighter/syntaxhighlighter-types.d.ts +0 -15
  674. package/dist/ts3.9/syntaxhighlighter/syntaxhighlighter.d.ts +0 -18
  675. package/dist/ts3.9/tabs/tabs.d.ts +0 -52
  676. package/dist/ts3.9/tooltip/ListItem.d.ts +0 -34
  677. package/dist/ts3.9/tooltip/Tooltip.d.ts +0 -21
  678. package/dist/ts3.9/tooltip/TooltipLinkList.d.ts +0 -12
  679. package/dist/ts3.9/tooltip/TooltipMessage.d.ts +0 -11
  680. package/dist/ts3.9/tooltip/TooltipNote.d.ts +0 -5
  681. package/dist/ts3.9/tooltip/WithTooltip.d.ts +0 -23
  682. package/dist/ts3.9/tooltip/lazy-WithTooltip.d.ts +0 -8
  683. package/dist/ts3.9/typography/DocumentFormatting.d.ts +0 -56
  684. package/dist/ts3.9/typography/DocumentWrapper.d.ts +0 -2
  685. package/dist/ts3.9/typography/link/link.d.ts +0 -22
  686. package/dist/ts3.9/typography/shared.d.ts +0 -11
@@ -0,0 +1,2459 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-bbe9389b.js');
4
+
5
+ var React = require('react');
6
+
7
+ var theming = require('@storybook/theming');
8
+
9
+ require('@storybook/csf');
10
+
11
+ require('util');
12
+
13
+ require('@storybook/client-logger');
14
+
15
+ function _interopDefaultLegacy(e) {
16
+ return e && typeof e === 'object' && 'default' in e ? e : {
17
+ 'default': e
18
+ };
19
+ }
20
+
21
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
22
+
23
+ function u() {
24
+ return (u = Object.assign || function (e) {
25
+ for (var r = 1; r < arguments.length; r++) {
26
+ var t = arguments[r];
27
+
28
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
29
+ }
30
+
31
+ return e;
32
+ }).apply(this, arguments);
33
+ }
34
+
35
+ function c(e, r) {
36
+ if (null == e) return {};
37
+ var t,
38
+ n,
39
+ o = {},
40
+ a = Object.keys(e);
41
+
42
+ for (n = 0; n < a.length; n++) r.indexOf(t = a[n]) >= 0 || (o[t] = e[t]);
43
+
44
+ return o;
45
+ }
46
+
47
+ function i(e) {
48
+ var t = React.useRef(e),
49
+ n = React.useRef(function (e) {
50
+ t.current && t.current(e);
51
+ });
52
+ return t.current = e, n.current;
53
+ }
54
+
55
+ var s = function (e, r, t) {
56
+ return void 0 === r && (r = 0), void 0 === t && (t = 1), e > t ? t : e < r ? r : e;
57
+ },
58
+ f = function (e) {
59
+ return "touches" in e;
60
+ },
61
+ v = function (e) {
62
+ return e && e.ownerDocument.defaultView || self;
63
+ },
64
+ d = function (e, r, t) {
65
+ var n = e.getBoundingClientRect(),
66
+ o = f(r) ? function (e, r) {
67
+ for (var t = 0; t < e.length; t++) if (e[t].identifier === r) return e[t];
68
+
69
+ return e[0];
70
+ }(r.touches, t) : r;
71
+ return {
72
+ left: s((o.pageX - (n.left + v(e).pageXOffset)) / n.width),
73
+ top: s((o.pageY - (n.top + v(e).pageYOffset)) / n.height)
74
+ };
75
+ },
76
+ h = function (e) {
77
+ !f(e) && e.preventDefault();
78
+ },
79
+ m = React__default["default"].memo(function (o) {
80
+ var a = o.onMove,
81
+ l = o.onKey,
82
+ s = c(o, ["onMove", "onKey"]),
83
+ m = React.useRef(null),
84
+ g = i(a),
85
+ p = i(l),
86
+ b = React.useRef(null),
87
+ _ = React.useRef(!1),
88
+ x = React.useMemo(function () {
89
+ var e = function (e) {
90
+ h(e), (f(e) ? e.touches.length > 0 : e.buttons > 0) && m.current ? g(d(m.current, e, b.current)) : t(!1);
91
+ },
92
+ r = function () {
93
+ return t(!1);
94
+ };
95
+
96
+ function t(t) {
97
+ var n = _.current,
98
+ o = v(m.current),
99
+ a = t ? o.addEventListener : o.removeEventListener;
100
+ a(n ? "touchmove" : "mousemove", e), a(n ? "touchend" : "mouseup", r);
101
+ }
102
+
103
+ return [function (e) {
104
+ var r = e.nativeEvent,
105
+ n = m.current;
106
+
107
+ if (n && (h(r), !function (e, r) {
108
+ return r && !f(e);
109
+ }(r, _.current) && n)) {
110
+ if (f(r)) {
111
+ _.current = !0;
112
+ var o = r.changedTouches || [];
113
+ o.length && (b.current = o[0].identifier);
114
+ }
115
+
116
+ n.focus(), g(d(n, r, b.current)), t(!0);
117
+ }
118
+ }, function (e) {
119
+ var r = e.which || e.keyCode;
120
+ r < 37 || r > 40 || (e.preventDefault(), p({
121
+ left: 39 === r ? .05 : 37 === r ? -.05 : 0,
122
+ top: 40 === r ? .05 : 38 === r ? -.05 : 0
123
+ }));
124
+ }, t];
125
+ }, [p, g]),
126
+ C = x[0],
127
+ E = x[1],
128
+ H = x[2];
129
+
130
+ return React.useEffect(function () {
131
+ return H;
132
+ }, [H]), React__default["default"].createElement("div", u({}, s, {
133
+ onTouchStart: C,
134
+ onMouseDown: C,
135
+ className: "react-colorful__interactive",
136
+ ref: m,
137
+ onKeyDown: E,
138
+ tabIndex: 0,
139
+ role: "slider"
140
+ }));
141
+ }),
142
+ g = function (e) {
143
+ return e.filter(Boolean).join(" ");
144
+ },
145
+ p = function (r) {
146
+ var t = r.color,
147
+ n = r.left,
148
+ o = r.top,
149
+ a = void 0 === o ? .5 : o,
150
+ l = g(["react-colorful__pointer", r.className]);
151
+ return React__default["default"].createElement("div", {
152
+ className: l,
153
+ style: {
154
+ top: 100 * a + "%",
155
+ left: 100 * n + "%"
156
+ }
157
+ }, React__default["default"].createElement("div", {
158
+ className: "react-colorful__pointer-fill",
159
+ style: {
160
+ backgroundColor: t
161
+ }
162
+ }));
163
+ },
164
+ b = function (e, r, t) {
165
+ return void 0 === r && (r = 0), void 0 === t && (t = Math.pow(10, r)), Math.round(t * e) / t;
166
+ },
167
+ _ = {
168
+ grad: .9,
169
+ turn: 360,
170
+ rad: 360 / (2 * Math.PI)
171
+ },
172
+ x = function (e) {
173
+ return "#" === e[0] && (e = e.substr(1)), e.length < 6 ? {
174
+ r: parseInt(e[0] + e[0], 16),
175
+ g: parseInt(e[1] + e[1], 16),
176
+ b: parseInt(e[2] + e[2], 16),
177
+ a: 1
178
+ } : {
179
+ r: parseInt(e.substr(0, 2), 16),
180
+ g: parseInt(e.substr(2, 2), 16),
181
+ b: parseInt(e.substr(4, 2), 16),
182
+ a: 1
183
+ };
184
+ },
185
+ C = function (e, r) {
186
+ return void 0 === r && (r = "deg"), Number(e) * (_[r] || 1);
187
+ },
188
+ E = function (e) {
189
+ var r = /hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);
190
+ return r ? M({
191
+ h: C(r[1], r[2]),
192
+ s: Number(r[3]),
193
+ l: Number(r[4]),
194
+ a: void 0 === r[5] ? 1 : Number(r[5]) / (r[6] ? 100 : 1)
195
+ }) : {
196
+ h: 0,
197
+ s: 0,
198
+ v: 0,
199
+ a: 1
200
+ };
201
+ },
202
+ M = function (e) {
203
+ var r = e.s,
204
+ t = e.l;
205
+ return {
206
+ h: e.h,
207
+ s: (r *= (t < 50 ? t : 100 - t) / 100) > 0 ? 2 * r / (t + r) * 100 : 0,
208
+ v: t + r,
209
+ a: e.a
210
+ };
211
+ },
212
+ N = function (e) {
213
+ var r = e.s,
214
+ t = e.v,
215
+ n = e.a,
216
+ o = (200 - r) * t / 100;
217
+ return {
218
+ h: b(e.h),
219
+ s: b(o > 0 && o < 200 ? r * t / 100 / (o <= 100 ? o : 200 - o) * 100 : 0),
220
+ l: b(o / 2),
221
+ a: b(n, 2)
222
+ };
223
+ },
224
+ w = function (e) {
225
+ var r = N(e);
226
+ return "hsl(" + r.h + ", " + r.s + "%, " + r.l + "%)";
227
+ },
228
+ y = function (e) {
229
+ var r = N(e);
230
+ return "hsla(" + r.h + ", " + r.s + "%, " + r.l + "%, " + r.a + ")";
231
+ },
232
+ q = function (e) {
233
+ var r = e.h,
234
+ t = e.s,
235
+ n = e.v,
236
+ o = e.a;
237
+ r = r / 360 * 6, t /= 100, n /= 100;
238
+ var a = Math.floor(r),
239
+ l = n * (1 - t),
240
+ u = n * (1 - (r - a) * t),
241
+ c = n * (1 - (1 - r + a) * t),
242
+ i = a % 6;
243
+ return {
244
+ r: b(255 * [n, u, l, l, c, n][i]),
245
+ g: b(255 * [c, n, n, u, l, l][i]),
246
+ b: b(255 * [l, l, c, n, n, u][i]),
247
+ a: b(o, 2)
248
+ };
249
+ },
250
+ I = function (e) {
251
+ var r = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);
252
+ return r ? B({
253
+ r: Number(r[1]) / (r[2] ? 100 / 255 : 1),
254
+ g: Number(r[3]) / (r[4] ? 100 / 255 : 1),
255
+ b: Number(r[5]) / (r[6] ? 100 / 255 : 1),
256
+ a: void 0 === r[7] ? 1 : Number(r[7]) / (r[8] ? 100 : 1)
257
+ }) : {
258
+ h: 0,
259
+ s: 0,
260
+ v: 0,
261
+ a: 1
262
+ };
263
+ },
264
+ z = function (e) {
265
+ var r = e.toString(16);
266
+ return r.length < 2 ? "0" + r : r;
267
+ },
268
+ B = function (e) {
269
+ var r = e.r,
270
+ t = e.g,
271
+ n = e.b,
272
+ o = e.a,
273
+ a = Math.max(r, t, n),
274
+ l = a - Math.min(r, t, n),
275
+ u = l ? a === r ? (t - n) / l : a === t ? 2 + (n - r) / l : 4 + (r - t) / l : 0;
276
+ return {
277
+ h: b(60 * (u < 0 ? u + 6 : u)),
278
+ s: b(a ? l / a * 100 : 0),
279
+ v: b(a / 255 * 100),
280
+ a: o
281
+ };
282
+ },
283
+ K = React__default["default"].memo(function (r) {
284
+ var t = r.hue,
285
+ n = r.onChange,
286
+ o = g(["react-colorful__hue", r.className]);
287
+ return React__default["default"].createElement("div", {
288
+ className: o
289
+ }, React__default["default"].createElement(m, {
290
+ onMove: function (e) {
291
+ n({
292
+ h: 360 * e.left
293
+ });
294
+ },
295
+ onKey: function (e) {
296
+ n({
297
+ h: s(t + 360 * e.left, 0, 360)
298
+ });
299
+ },
300
+ "aria-label": "Hue",
301
+ "aria-valuetext": b(t)
302
+ }, React__default["default"].createElement(p, {
303
+ className: "react-colorful__hue-pointer",
304
+ left: t / 360,
305
+ color: w({
306
+ h: t,
307
+ s: 100,
308
+ v: 100,
309
+ a: 1
310
+ })
311
+ })));
312
+ }),
313
+ L = React__default["default"].memo(function (r) {
314
+ var t = r.hsva,
315
+ n = r.onChange,
316
+ o = {
317
+ backgroundColor: w({
318
+ h: t.h,
319
+ s: 100,
320
+ v: 100,
321
+ a: 1
322
+ })
323
+ };
324
+ return React__default["default"].createElement("div", {
325
+ className: "react-colorful__saturation",
326
+ style: o
327
+ }, React__default["default"].createElement(m, {
328
+ onMove: function (e) {
329
+ n({
330
+ s: 100 * e.left,
331
+ v: 100 - 100 * e.top
332
+ });
333
+ },
334
+ onKey: function (e) {
335
+ n({
336
+ s: s(t.s + 100 * e.left, 0, 100),
337
+ v: s(t.v - 100 * e.top, 0, 100)
338
+ });
339
+ },
340
+ "aria-label": "Color",
341
+ "aria-valuetext": "Saturation " + b(t.s) + "%, Brightness " + b(t.v) + "%"
342
+ }, React__default["default"].createElement(p, {
343
+ className: "react-colorful__saturation-pointer",
344
+ top: 1 - t.v / 100,
345
+ left: t.s / 100,
346
+ color: w(t)
347
+ })));
348
+ }),
349
+ A = function (e, r) {
350
+ if (e === r) return !0;
351
+
352
+ for (var t in e) if (e[t] !== r[t]) return !1;
353
+
354
+ return !0;
355
+ },
356
+ S = function (e, r) {
357
+ return e.replace(/\s/g, "") === r.replace(/\s/g, "");
358
+ };
359
+
360
+ function T(e, t, l) {
361
+ var u = i(l),
362
+ c = React.useState(function () {
363
+ return e.toHsva(t);
364
+ }),
365
+ s = c[0],
366
+ f = c[1],
367
+ v = React.useRef({
368
+ color: t,
369
+ hsva: s
370
+ });
371
+ React.useEffect(function () {
372
+ if (!e.equal(t, v.current.color)) {
373
+ var r = e.toHsva(t);
374
+ v.current = {
375
+ hsva: r,
376
+ color: t
377
+ }, f(r);
378
+ }
379
+ }, [t, e]), React.useEffect(function () {
380
+ var r;
381
+ A(s, v.current.hsva) || e.equal(r = e.fromHsva(s), v.current.color) || (v.current = {
382
+ hsva: s,
383
+ color: r
384
+ }, u(r));
385
+ }, [s, e, u]);
386
+ var d = React.useCallback(function (e) {
387
+ f(function (r) {
388
+ return Object.assign({}, r, e);
389
+ });
390
+ }, []);
391
+ return [s, d];
392
+ }
393
+
394
+ var P = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect,
395
+ X = function () {
396
+ return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : void 0;
397
+ },
398
+ R = new Map(),
399
+ V = function (e) {
400
+ P(function () {
401
+ var r = e.current ? e.current.ownerDocument : document;
402
+
403
+ if (void 0 !== r && !R.has(r)) {
404
+ var t = r.createElement("style");
405
+ t.innerHTML = '.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}', R.set(r, t);
406
+ var n = X();
407
+ n && t.setAttribute("nonce", n), r.head.appendChild(t);
408
+ }
409
+ }, []);
410
+ },
411
+ $ = function (t) {
412
+ var n = t.className,
413
+ o = t.colorModel,
414
+ a = t.color,
415
+ l = void 0 === a ? o.defaultColor : a,
416
+ i = t.onChange,
417
+ s = c(t, ["className", "colorModel", "color", "onChange"]),
418
+ f = React.useRef(null);
419
+ V(f);
420
+ var v = T(o, l, i),
421
+ d = v[0],
422
+ h = v[1],
423
+ m = g(["react-colorful", n]);
424
+ return React__default["default"].createElement("div", u({}, s, {
425
+ ref: f,
426
+ className: m
427
+ }), React__default["default"].createElement(L, {
428
+ hsva: d,
429
+ onChange: h
430
+ }), React__default["default"].createElement(K, {
431
+ hue: d.h,
432
+ onChange: h,
433
+ className: "react-colorful__last-control"
434
+ }));
435
+ },
436
+ G = {
437
+ defaultColor: "000",
438
+ toHsva: function (e) {
439
+ return B(x(e));
440
+ },
441
+ fromHsva: function (e) {
442
+ return t = (r = q(e)).g, n = r.b, "#" + z(r.r) + z(t) + z(n);
443
+ var r, t, n;
444
+ },
445
+ equal: function (e, r) {
446
+ return e.toLowerCase() === r.toLowerCase() || A(x(e), x(r));
447
+ }
448
+ },
449
+ J = function (r) {
450
+ return React__default["default"].createElement($, u({}, r, {
451
+ colorModel: G
452
+ }));
453
+ },
454
+ Q = function (r) {
455
+ var t = r.className,
456
+ n = r.hsva,
457
+ o = r.onChange,
458
+ a = {
459
+ backgroundImage: "linear-gradient(90deg, " + y(Object.assign({}, n, {
460
+ a: 0
461
+ })) + ", " + y(Object.assign({}, n, {
462
+ a: 1
463
+ })) + ")"
464
+ },
465
+ l = g(["react-colorful__alpha", t]);
466
+ return React__default["default"].createElement("div", {
467
+ className: l
468
+ }, React__default["default"].createElement("div", {
469
+ className: "react-colorful__alpha-gradient",
470
+ style: a
471
+ }), React__default["default"].createElement(m, {
472
+ onMove: function (e) {
473
+ o({
474
+ a: e.left
475
+ });
476
+ },
477
+ onKey: function (e) {
478
+ o({
479
+ a: s(n.a + e.left)
480
+ });
481
+ },
482
+ "aria-label": "Alpha",
483
+ "aria-valuetext": b(100 * n.a) + "%"
484
+ }, React__default["default"].createElement(p, {
485
+ className: "react-colorful__alpha-pointer",
486
+ left: n.a,
487
+ color: y(n)
488
+ })));
489
+ },
490
+ U = function (t) {
491
+ var n = t.className,
492
+ o = t.colorModel,
493
+ a = t.color,
494
+ l = void 0 === a ? o.defaultColor : a,
495
+ i = t.onChange,
496
+ s = c(t, ["className", "colorModel", "color", "onChange"]),
497
+ f = React.useRef(null);
498
+ V(f);
499
+ var v = T(o, l, i),
500
+ d = v[0],
501
+ h = v[1],
502
+ m = g(["react-colorful", n]);
503
+ return React__default["default"].createElement("div", u({}, s, {
504
+ ref: f,
505
+ className: m
506
+ }), React__default["default"].createElement(L, {
507
+ hsva: d,
508
+ onChange: h
509
+ }), React__default["default"].createElement(K, {
510
+ hue: d.h,
511
+ onChange: h
512
+ }), React__default["default"].createElement(Q, {
513
+ hsva: d,
514
+ onChange: h,
515
+ className: "react-colorful__last-control"
516
+ }));
517
+ },
518
+ ee = {
519
+ defaultColor: "hsla(0, 0%, 0%, 1)",
520
+ toHsva: E,
521
+ fromHsva: y,
522
+ equal: S
523
+ },
524
+ re = function (r) {
525
+ return React__default["default"].createElement(U, u({}, r, {
526
+ colorModel: ee
527
+ }));
528
+ },
529
+ ge = {
530
+ defaultColor: "rgba(0, 0, 0, 1)",
531
+ toHsva: I,
532
+ fromHsva: function (e) {
533
+ var r = q(e);
534
+ return "rgba(" + r.r + ", " + r.g + ", " + r.b + ", " + r.a + ")";
535
+ },
536
+ equal: S
537
+ },
538
+ pe = function (r) {
539
+ return React__default["default"].createElement(U, u({}, r, {
540
+ colorModel: ge
541
+ }));
542
+ };
543
+
544
+ var colorName = {
545
+ "aliceblue": [240, 248, 255],
546
+ "antiquewhite": [250, 235, 215],
547
+ "aqua": [0, 255, 255],
548
+ "aquamarine": [127, 255, 212],
549
+ "azure": [240, 255, 255],
550
+ "beige": [245, 245, 220],
551
+ "bisque": [255, 228, 196],
552
+ "black": [0, 0, 0],
553
+ "blanchedalmond": [255, 235, 205],
554
+ "blue": [0, 0, 255],
555
+ "blueviolet": [138, 43, 226],
556
+ "brown": [165, 42, 42],
557
+ "burlywood": [222, 184, 135],
558
+ "cadetblue": [95, 158, 160],
559
+ "chartreuse": [127, 255, 0],
560
+ "chocolate": [210, 105, 30],
561
+ "coral": [255, 127, 80],
562
+ "cornflowerblue": [100, 149, 237],
563
+ "cornsilk": [255, 248, 220],
564
+ "crimson": [220, 20, 60],
565
+ "cyan": [0, 255, 255],
566
+ "darkblue": [0, 0, 139],
567
+ "darkcyan": [0, 139, 139],
568
+ "darkgoldenrod": [184, 134, 11],
569
+ "darkgray": [169, 169, 169],
570
+ "darkgreen": [0, 100, 0],
571
+ "darkgrey": [169, 169, 169],
572
+ "darkkhaki": [189, 183, 107],
573
+ "darkmagenta": [139, 0, 139],
574
+ "darkolivegreen": [85, 107, 47],
575
+ "darkorange": [255, 140, 0],
576
+ "darkorchid": [153, 50, 204],
577
+ "darkred": [139, 0, 0],
578
+ "darksalmon": [233, 150, 122],
579
+ "darkseagreen": [143, 188, 143],
580
+ "darkslateblue": [72, 61, 139],
581
+ "darkslategray": [47, 79, 79],
582
+ "darkslategrey": [47, 79, 79],
583
+ "darkturquoise": [0, 206, 209],
584
+ "darkviolet": [148, 0, 211],
585
+ "deeppink": [255, 20, 147],
586
+ "deepskyblue": [0, 191, 255],
587
+ "dimgray": [105, 105, 105],
588
+ "dimgrey": [105, 105, 105],
589
+ "dodgerblue": [30, 144, 255],
590
+ "firebrick": [178, 34, 34],
591
+ "floralwhite": [255, 250, 240],
592
+ "forestgreen": [34, 139, 34],
593
+ "fuchsia": [255, 0, 255],
594
+ "gainsboro": [220, 220, 220],
595
+ "ghostwhite": [248, 248, 255],
596
+ "gold": [255, 215, 0],
597
+ "goldenrod": [218, 165, 32],
598
+ "gray": [128, 128, 128],
599
+ "green": [0, 128, 0],
600
+ "greenyellow": [173, 255, 47],
601
+ "grey": [128, 128, 128],
602
+ "honeydew": [240, 255, 240],
603
+ "hotpink": [255, 105, 180],
604
+ "indianred": [205, 92, 92],
605
+ "indigo": [75, 0, 130],
606
+ "ivory": [255, 255, 240],
607
+ "khaki": [240, 230, 140],
608
+ "lavender": [230, 230, 250],
609
+ "lavenderblush": [255, 240, 245],
610
+ "lawngreen": [124, 252, 0],
611
+ "lemonchiffon": [255, 250, 205],
612
+ "lightblue": [173, 216, 230],
613
+ "lightcoral": [240, 128, 128],
614
+ "lightcyan": [224, 255, 255],
615
+ "lightgoldenrodyellow": [250, 250, 210],
616
+ "lightgray": [211, 211, 211],
617
+ "lightgreen": [144, 238, 144],
618
+ "lightgrey": [211, 211, 211],
619
+ "lightpink": [255, 182, 193],
620
+ "lightsalmon": [255, 160, 122],
621
+ "lightseagreen": [32, 178, 170],
622
+ "lightskyblue": [135, 206, 250],
623
+ "lightslategray": [119, 136, 153],
624
+ "lightslategrey": [119, 136, 153],
625
+ "lightsteelblue": [176, 196, 222],
626
+ "lightyellow": [255, 255, 224],
627
+ "lime": [0, 255, 0],
628
+ "limegreen": [50, 205, 50],
629
+ "linen": [250, 240, 230],
630
+ "magenta": [255, 0, 255],
631
+ "maroon": [128, 0, 0],
632
+ "mediumaquamarine": [102, 205, 170],
633
+ "mediumblue": [0, 0, 205],
634
+ "mediumorchid": [186, 85, 211],
635
+ "mediumpurple": [147, 112, 219],
636
+ "mediumseagreen": [60, 179, 113],
637
+ "mediumslateblue": [123, 104, 238],
638
+ "mediumspringgreen": [0, 250, 154],
639
+ "mediumturquoise": [72, 209, 204],
640
+ "mediumvioletred": [199, 21, 133],
641
+ "midnightblue": [25, 25, 112],
642
+ "mintcream": [245, 255, 250],
643
+ "mistyrose": [255, 228, 225],
644
+ "moccasin": [255, 228, 181],
645
+ "navajowhite": [255, 222, 173],
646
+ "navy": [0, 0, 128],
647
+ "oldlace": [253, 245, 230],
648
+ "olive": [128, 128, 0],
649
+ "olivedrab": [107, 142, 35],
650
+ "orange": [255, 165, 0],
651
+ "orangered": [255, 69, 0],
652
+ "orchid": [218, 112, 214],
653
+ "palegoldenrod": [238, 232, 170],
654
+ "palegreen": [152, 251, 152],
655
+ "paleturquoise": [175, 238, 238],
656
+ "palevioletred": [219, 112, 147],
657
+ "papayawhip": [255, 239, 213],
658
+ "peachpuff": [255, 218, 185],
659
+ "peru": [205, 133, 63],
660
+ "pink": [255, 192, 203],
661
+ "plum": [221, 160, 221],
662
+ "powderblue": [176, 224, 230],
663
+ "purple": [128, 0, 128],
664
+ "rebeccapurple": [102, 51, 153],
665
+ "red": [255, 0, 0],
666
+ "rosybrown": [188, 143, 143],
667
+ "royalblue": [65, 105, 225],
668
+ "saddlebrown": [139, 69, 19],
669
+ "salmon": [250, 128, 114],
670
+ "sandybrown": [244, 164, 96],
671
+ "seagreen": [46, 139, 87],
672
+ "seashell": [255, 245, 238],
673
+ "sienna": [160, 82, 45],
674
+ "silver": [192, 192, 192],
675
+ "skyblue": [135, 206, 235],
676
+ "slateblue": [106, 90, 205],
677
+ "slategray": [112, 128, 144],
678
+ "slategrey": [112, 128, 144],
679
+ "snow": [255, 250, 250],
680
+ "springgreen": [0, 255, 127],
681
+ "steelblue": [70, 130, 180],
682
+ "tan": [210, 180, 140],
683
+ "teal": [0, 128, 128],
684
+ "thistle": [216, 191, 216],
685
+ "tomato": [255, 99, 71],
686
+ "turquoise": [64, 224, 208],
687
+ "violet": [238, 130, 238],
688
+ "wheat": [245, 222, 179],
689
+ "white": [255, 255, 255],
690
+ "whitesmoke": [245, 245, 245],
691
+ "yellow": [255, 255, 0],
692
+ "yellowgreen": [154, 205, 50]
693
+ };
694
+ /* MIT license */
695
+
696
+ /* eslint-disable no-mixed-operators */
697
+
698
+ const cssKeywords = colorName; // NOTE: conversions should only return primitive values (i.e. arrays, or
699
+ // values that give correct `typeof` results).
700
+ // do not use box values types (i.e. Number(), String(), etc.)
701
+
702
+ const reverseKeywords = {};
703
+
704
+ for (const key of Object.keys(cssKeywords)) {
705
+ reverseKeywords[cssKeywords[key]] = key;
706
+ }
707
+
708
+ const convert$1 = {
709
+ rgb: {
710
+ channels: 3,
711
+ labels: 'rgb'
712
+ },
713
+ hsl: {
714
+ channels: 3,
715
+ labels: 'hsl'
716
+ },
717
+ hsv: {
718
+ channels: 3,
719
+ labels: 'hsv'
720
+ },
721
+ hwb: {
722
+ channels: 3,
723
+ labels: 'hwb'
724
+ },
725
+ cmyk: {
726
+ channels: 4,
727
+ labels: 'cmyk'
728
+ },
729
+ xyz: {
730
+ channels: 3,
731
+ labels: 'xyz'
732
+ },
733
+ lab: {
734
+ channels: 3,
735
+ labels: 'lab'
736
+ },
737
+ lch: {
738
+ channels: 3,
739
+ labels: 'lch'
740
+ },
741
+ hex: {
742
+ channels: 1,
743
+ labels: ['hex']
744
+ },
745
+ keyword: {
746
+ channels: 1,
747
+ labels: ['keyword']
748
+ },
749
+ ansi16: {
750
+ channels: 1,
751
+ labels: ['ansi16']
752
+ },
753
+ ansi256: {
754
+ channels: 1,
755
+ labels: ['ansi256']
756
+ },
757
+ hcg: {
758
+ channels: 3,
759
+ labels: ['h', 'c', 'g']
760
+ },
761
+ apple: {
762
+ channels: 3,
763
+ labels: ['r16', 'g16', 'b16']
764
+ },
765
+ gray: {
766
+ channels: 1,
767
+ labels: ['gray']
768
+ }
769
+ };
770
+ var conversions$2 = convert$1; // Hide .channels and .labels properties
771
+
772
+ for (const model of Object.keys(convert$1)) {
773
+ if (!('channels' in convert$1[model])) {
774
+ throw new Error('missing channels property: ' + model);
775
+ }
776
+
777
+ if (!('labels' in convert$1[model])) {
778
+ throw new Error('missing channel labels property: ' + model);
779
+ }
780
+
781
+ if (convert$1[model].labels.length !== convert$1[model].channels) {
782
+ throw new Error('channel and label counts mismatch: ' + model);
783
+ }
784
+
785
+ const {
786
+ channels,
787
+ labels
788
+ } = convert$1[model];
789
+ delete convert$1[model].channels;
790
+ delete convert$1[model].labels;
791
+ Object.defineProperty(convert$1[model], 'channels', {
792
+ value: channels
793
+ });
794
+ Object.defineProperty(convert$1[model], 'labels', {
795
+ value: labels
796
+ });
797
+ }
798
+
799
+ convert$1.rgb.hsl = function (rgb) {
800
+ const r = rgb[0] / 255;
801
+ const g = rgb[1] / 255;
802
+ const b = rgb[2] / 255;
803
+ const min = Math.min(r, g, b);
804
+ const max = Math.max(r, g, b);
805
+ const delta = max - min;
806
+ let h;
807
+ let s;
808
+
809
+ if (max === min) {
810
+ h = 0;
811
+ } else if (r === max) {
812
+ h = (g - b) / delta;
813
+ } else if (g === max) {
814
+ h = 2 + (b - r) / delta;
815
+ } else if (b === max) {
816
+ h = 4 + (r - g) / delta;
817
+ }
818
+
819
+ h = Math.min(h * 60, 360);
820
+
821
+ if (h < 0) {
822
+ h += 360;
823
+ }
824
+
825
+ const l = (min + max) / 2;
826
+
827
+ if (max === min) {
828
+ s = 0;
829
+ } else if (l <= 0.5) {
830
+ s = delta / (max + min);
831
+ } else {
832
+ s = delta / (2 - max - min);
833
+ }
834
+
835
+ return [h, s * 100, l * 100];
836
+ };
837
+
838
+ convert$1.rgb.hsv = function (rgb) {
839
+ let rdif;
840
+ let gdif;
841
+ let bdif;
842
+ let h;
843
+ let s;
844
+ const r = rgb[0] / 255;
845
+ const g = rgb[1] / 255;
846
+ const b = rgb[2] / 255;
847
+ const v = Math.max(r, g, b);
848
+ const diff = v - Math.min(r, g, b);
849
+
850
+ const diffc = function (c) {
851
+ return (v - c) / 6 / diff + 1 / 2;
852
+ };
853
+
854
+ if (diff === 0) {
855
+ h = 0;
856
+ s = 0;
857
+ } else {
858
+ s = diff / v;
859
+ rdif = diffc(r);
860
+ gdif = diffc(g);
861
+ bdif = diffc(b);
862
+
863
+ if (r === v) {
864
+ h = bdif - gdif;
865
+ } else if (g === v) {
866
+ h = 1 / 3 + rdif - bdif;
867
+ } else if (b === v) {
868
+ h = 2 / 3 + gdif - rdif;
869
+ }
870
+
871
+ if (h < 0) {
872
+ h += 1;
873
+ } else if (h > 1) {
874
+ h -= 1;
875
+ }
876
+ }
877
+
878
+ return [h * 360, s * 100, v * 100];
879
+ };
880
+
881
+ convert$1.rgb.hwb = function (rgb) {
882
+ const r = rgb[0];
883
+ const g = rgb[1];
884
+ let b = rgb[2];
885
+ const h = convert$1.rgb.hsl(rgb)[0];
886
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
887
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
888
+ return [h, w * 100, b * 100];
889
+ };
890
+
891
+ convert$1.rgb.cmyk = function (rgb) {
892
+ const r = rgb[0] / 255;
893
+ const g = rgb[1] / 255;
894
+ const b = rgb[2] / 255;
895
+ const k = Math.min(1 - r, 1 - g, 1 - b);
896
+ const c = (1 - r - k) / (1 - k) || 0;
897
+ const m = (1 - g - k) / (1 - k) || 0;
898
+ const y = (1 - b - k) / (1 - k) || 0;
899
+ return [c * 100, m * 100, y * 100, k * 100];
900
+ };
901
+
902
+ function comparativeDistance(x, y) {
903
+ /*
904
+ See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
905
+ */
906
+ return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
907
+ }
908
+
909
+ convert$1.rgb.keyword = function (rgb) {
910
+ const reversed = reverseKeywords[rgb];
911
+
912
+ if (reversed) {
913
+ return reversed;
914
+ }
915
+
916
+ let currentClosestDistance = Infinity;
917
+ let currentClosestKeyword;
918
+
919
+ for (const keyword of Object.keys(cssKeywords)) {
920
+ const value = cssKeywords[keyword]; // Compute comparative distance
921
+
922
+ const distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest
923
+
924
+ if (distance < currentClosestDistance) {
925
+ currentClosestDistance = distance;
926
+ currentClosestKeyword = keyword;
927
+ }
928
+ }
929
+
930
+ return currentClosestKeyword;
931
+ };
932
+
933
+ convert$1.keyword.rgb = function (keyword) {
934
+ return cssKeywords[keyword];
935
+ };
936
+
937
+ convert$1.rgb.xyz = function (rgb) {
938
+ let r = rgb[0] / 255;
939
+ let g = rgb[1] / 255;
940
+ let b = rgb[2] / 255; // Assume sRGB
941
+
942
+ r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
943
+ g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
944
+ b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
945
+ const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
946
+ const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
947
+ const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
948
+ return [x * 100, y * 100, z * 100];
949
+ };
950
+
951
+ convert$1.rgb.lab = function (rgb) {
952
+ const xyz = convert$1.rgb.xyz(rgb);
953
+ let x = xyz[0];
954
+ let y = xyz[1];
955
+ let z = xyz[2];
956
+ x /= 95.047;
957
+ y /= 100;
958
+ z /= 108.883;
959
+ x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
960
+ y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
961
+ z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
962
+ const l = 116 * y - 16;
963
+ const a = 500 * (x - y);
964
+ const b = 200 * (y - z);
965
+ return [l, a, b];
966
+ };
967
+
968
+ convert$1.hsl.rgb = function (hsl) {
969
+ const h = hsl[0] / 360;
970
+ const s = hsl[1] / 100;
971
+ const l = hsl[2] / 100;
972
+ let t2;
973
+ let t3;
974
+ let val;
975
+
976
+ if (s === 0) {
977
+ val = l * 255;
978
+ return [val, val, val];
979
+ }
980
+
981
+ if (l < 0.5) {
982
+ t2 = l * (1 + s);
983
+ } else {
984
+ t2 = l + s - l * s;
985
+ }
986
+
987
+ const t1 = 2 * l - t2;
988
+ const rgb = [0, 0, 0];
989
+
990
+ for (let i = 0; i < 3; i++) {
991
+ t3 = h + 1 / 3 * -(i - 1);
992
+
993
+ if (t3 < 0) {
994
+ t3++;
995
+ }
996
+
997
+ if (t3 > 1) {
998
+ t3--;
999
+ }
1000
+
1001
+ if (6 * t3 < 1) {
1002
+ val = t1 + (t2 - t1) * 6 * t3;
1003
+ } else if (2 * t3 < 1) {
1004
+ val = t2;
1005
+ } else if (3 * t3 < 2) {
1006
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1007
+ } else {
1008
+ val = t1;
1009
+ }
1010
+
1011
+ rgb[i] = val * 255;
1012
+ }
1013
+
1014
+ return rgb;
1015
+ };
1016
+
1017
+ convert$1.hsl.hsv = function (hsl) {
1018
+ const h = hsl[0];
1019
+ let s = hsl[1] / 100;
1020
+ let l = hsl[2] / 100;
1021
+ let smin = s;
1022
+ const lmin = Math.max(l, 0.01);
1023
+ l *= 2;
1024
+ s *= l <= 1 ? l : 2 - l;
1025
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
1026
+ const v = (l + s) / 2;
1027
+ const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
1028
+ return [h, sv * 100, v * 100];
1029
+ };
1030
+
1031
+ convert$1.hsv.rgb = function (hsv) {
1032
+ const h = hsv[0] / 60;
1033
+ const s = hsv[1] / 100;
1034
+ let v = hsv[2] / 100;
1035
+ const hi = Math.floor(h) % 6;
1036
+ const f = h - Math.floor(h);
1037
+ const p = 255 * v * (1 - s);
1038
+ const q = 255 * v * (1 - s * f);
1039
+ const t = 255 * v * (1 - s * (1 - f));
1040
+ v *= 255;
1041
+
1042
+ switch (hi) {
1043
+ case 0:
1044
+ return [v, t, p];
1045
+
1046
+ case 1:
1047
+ return [q, v, p];
1048
+
1049
+ case 2:
1050
+ return [p, v, t];
1051
+
1052
+ case 3:
1053
+ return [p, q, v];
1054
+
1055
+ case 4:
1056
+ return [t, p, v];
1057
+
1058
+ case 5:
1059
+ return [v, p, q];
1060
+ }
1061
+ };
1062
+
1063
+ convert$1.hsv.hsl = function (hsv) {
1064
+ const h = hsv[0];
1065
+ const s = hsv[1] / 100;
1066
+ const v = hsv[2] / 100;
1067
+ const vmin = Math.max(v, 0.01);
1068
+ let sl;
1069
+ let l;
1070
+ l = (2 - s) * v;
1071
+ const lmin = (2 - s) * vmin;
1072
+ sl = s * vmin;
1073
+ sl /= lmin <= 1 ? lmin : 2 - lmin;
1074
+ sl = sl || 0;
1075
+ l /= 2;
1076
+ return [h, sl * 100, l * 100];
1077
+ }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
1078
+
1079
+
1080
+ convert$1.hwb.rgb = function (hwb) {
1081
+ const h = hwb[0] / 360;
1082
+ let wh = hwb[1] / 100;
1083
+ let bl = hwb[2] / 100;
1084
+ const ratio = wh + bl;
1085
+ let f; // Wh + bl cant be > 1
1086
+
1087
+ if (ratio > 1) {
1088
+ wh /= ratio;
1089
+ bl /= ratio;
1090
+ }
1091
+
1092
+ const i = Math.floor(6 * h);
1093
+ const v = 1 - bl;
1094
+ f = 6 * h - i;
1095
+
1096
+ if ((i & 0x01) !== 0) {
1097
+ f = 1 - f;
1098
+ }
1099
+
1100
+ const n = wh + f * (v - wh); // Linear interpolation
1101
+
1102
+ let r;
1103
+ let g;
1104
+ let b;
1105
+ /* eslint-disable max-statements-per-line,no-multi-spaces */
1106
+
1107
+ switch (i) {
1108
+ default:
1109
+ case 6:
1110
+ case 0:
1111
+ r = v;
1112
+ g = n;
1113
+ b = wh;
1114
+ break;
1115
+
1116
+ case 1:
1117
+ r = n;
1118
+ g = v;
1119
+ b = wh;
1120
+ break;
1121
+
1122
+ case 2:
1123
+ r = wh;
1124
+ g = v;
1125
+ b = n;
1126
+ break;
1127
+
1128
+ case 3:
1129
+ r = wh;
1130
+ g = n;
1131
+ b = v;
1132
+ break;
1133
+
1134
+ case 4:
1135
+ r = n;
1136
+ g = wh;
1137
+ b = v;
1138
+ break;
1139
+
1140
+ case 5:
1141
+ r = v;
1142
+ g = wh;
1143
+ b = n;
1144
+ break;
1145
+ }
1146
+ /* eslint-enable max-statements-per-line,no-multi-spaces */
1147
+
1148
+
1149
+ return [r * 255, g * 255, b * 255];
1150
+ };
1151
+
1152
+ convert$1.cmyk.rgb = function (cmyk) {
1153
+ const c = cmyk[0] / 100;
1154
+ const m = cmyk[1] / 100;
1155
+ const y = cmyk[2] / 100;
1156
+ const k = cmyk[3] / 100;
1157
+ const r = 1 - Math.min(1, c * (1 - k) + k);
1158
+ const g = 1 - Math.min(1, m * (1 - k) + k);
1159
+ const b = 1 - Math.min(1, y * (1 - k) + k);
1160
+ return [r * 255, g * 255, b * 255];
1161
+ };
1162
+
1163
+ convert$1.xyz.rgb = function (xyz) {
1164
+ const x = xyz[0] / 100;
1165
+ const y = xyz[1] / 100;
1166
+ const z = xyz[2] / 100;
1167
+ let r;
1168
+ let g;
1169
+ let b;
1170
+ r = x * 3.2406 + y * -1.5372 + z * -0.4986;
1171
+ g = x * -0.9689 + y * 1.8758 + z * 0.0415;
1172
+ b = x * 0.0557 + y * -0.2040 + z * 1.0570; // Assume sRGB
1173
+
1174
+ r = r > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : r * 12.92;
1175
+ g = g > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : g * 12.92;
1176
+ b = b > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : b * 12.92;
1177
+ r = Math.min(Math.max(0, r), 1);
1178
+ g = Math.min(Math.max(0, g), 1);
1179
+ b = Math.min(Math.max(0, b), 1);
1180
+ return [r * 255, g * 255, b * 255];
1181
+ };
1182
+
1183
+ convert$1.xyz.lab = function (xyz) {
1184
+ let x = xyz[0];
1185
+ let y = xyz[1];
1186
+ let z = xyz[2];
1187
+ x /= 95.047;
1188
+ y /= 100;
1189
+ z /= 108.883;
1190
+ x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1191
+ y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1192
+ z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1193
+ const l = 116 * y - 16;
1194
+ const a = 500 * (x - y);
1195
+ const b = 200 * (y - z);
1196
+ return [l, a, b];
1197
+ };
1198
+
1199
+ convert$1.lab.xyz = function (lab) {
1200
+ const l = lab[0];
1201
+ const a = lab[1];
1202
+ const b = lab[2];
1203
+ let x;
1204
+ let y;
1205
+ let z;
1206
+ y = (l + 16) / 116;
1207
+ x = a / 500 + y;
1208
+ z = y - b / 200;
1209
+ const y2 = y ** 3;
1210
+ const x2 = x ** 3;
1211
+ const z2 = z ** 3;
1212
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
1213
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
1214
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
1215
+ x *= 95.047;
1216
+ y *= 100;
1217
+ z *= 108.883;
1218
+ return [x, y, z];
1219
+ };
1220
+
1221
+ convert$1.lab.lch = function (lab) {
1222
+ const l = lab[0];
1223
+ const a = lab[1];
1224
+ const b = lab[2];
1225
+ let h;
1226
+ const hr = Math.atan2(b, a);
1227
+ h = hr * 360 / 2 / Math.PI;
1228
+
1229
+ if (h < 0) {
1230
+ h += 360;
1231
+ }
1232
+
1233
+ const c = Math.sqrt(a * a + b * b);
1234
+ return [l, c, h];
1235
+ };
1236
+
1237
+ convert$1.lch.lab = function (lch) {
1238
+ const l = lch[0];
1239
+ const c = lch[1];
1240
+ const h = lch[2];
1241
+ const hr = h / 360 * 2 * Math.PI;
1242
+ const a = c * Math.cos(hr);
1243
+ const b = c * Math.sin(hr);
1244
+ return [l, a, b];
1245
+ };
1246
+
1247
+ convert$1.rgb.ansi16 = function (args, saturation = null) {
1248
+ const [r, g, b] = args;
1249
+ let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
1250
+
1251
+ value = Math.round(value / 50);
1252
+
1253
+ if (value === 0) {
1254
+ return 30;
1255
+ }
1256
+
1257
+ let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1258
+
1259
+ if (value === 2) {
1260
+ ansi += 60;
1261
+ }
1262
+
1263
+ return ansi;
1264
+ };
1265
+
1266
+ convert$1.hsv.ansi16 = function (args) {
1267
+ // Optimization here; we already know the value and don't need to get
1268
+ // it converted for us.
1269
+ return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]);
1270
+ };
1271
+
1272
+ convert$1.rgb.ansi256 = function (args) {
1273
+ const r = args[0];
1274
+ const g = args[1];
1275
+ const b = args[2]; // We use the extended greyscale palette here, with the exception of
1276
+ // black and white. normal palette only has 4 greyscale shades.
1277
+
1278
+ if (r === g && g === b) {
1279
+ if (r < 8) {
1280
+ return 16;
1281
+ }
1282
+
1283
+ if (r > 248) {
1284
+ return 231;
1285
+ }
1286
+
1287
+ return Math.round((r - 8) / 247 * 24) + 232;
1288
+ }
1289
+
1290
+ const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1291
+ return ansi;
1292
+ };
1293
+
1294
+ convert$1.ansi16.rgb = function (args) {
1295
+ let color = args % 10; // Handle greyscale
1296
+
1297
+ if (color === 0 || color === 7) {
1298
+ if (args > 50) {
1299
+ color += 3.5;
1300
+ }
1301
+
1302
+ color = color / 10.5 * 255;
1303
+ return [color, color, color];
1304
+ }
1305
+
1306
+ const mult = (~~(args > 50) + 1) * 0.5;
1307
+ const r = (color & 1) * mult * 255;
1308
+ const g = (color >> 1 & 1) * mult * 255;
1309
+ const b = (color >> 2 & 1) * mult * 255;
1310
+ return [r, g, b];
1311
+ };
1312
+
1313
+ convert$1.ansi256.rgb = function (args) {
1314
+ // Handle greyscale
1315
+ if (args >= 232) {
1316
+ const c = (args - 232) * 10 + 8;
1317
+ return [c, c, c];
1318
+ }
1319
+
1320
+ args -= 16;
1321
+ let rem;
1322
+ const r = Math.floor(args / 36) / 5 * 255;
1323
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1324
+ const b = rem % 6 / 5 * 255;
1325
+ return [r, g, b];
1326
+ };
1327
+
1328
+ convert$1.rgb.hex = function (args) {
1329
+ const integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
1330
+ const string = integer.toString(16).toUpperCase();
1331
+ return '000000'.substring(string.length) + string;
1332
+ };
1333
+
1334
+ convert$1.hex.rgb = function (args) {
1335
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1336
+
1337
+ if (!match) {
1338
+ return [0, 0, 0];
1339
+ }
1340
+
1341
+ let colorString = match[0];
1342
+
1343
+ if (match[0].length === 3) {
1344
+ colorString = colorString.split('').map(char => {
1345
+ return char + char;
1346
+ }).join('');
1347
+ }
1348
+
1349
+ const integer = parseInt(colorString, 16);
1350
+ const r = integer >> 16 & 0xFF;
1351
+ const g = integer >> 8 & 0xFF;
1352
+ const b = integer & 0xFF;
1353
+ return [r, g, b];
1354
+ };
1355
+
1356
+ convert$1.rgb.hcg = function (rgb) {
1357
+ const r = rgb[0] / 255;
1358
+ const g = rgb[1] / 255;
1359
+ const b = rgb[2] / 255;
1360
+ const max = Math.max(Math.max(r, g), b);
1361
+ const min = Math.min(Math.min(r, g), b);
1362
+ const chroma = max - min;
1363
+ let grayscale;
1364
+ let hue;
1365
+
1366
+ if (chroma < 1) {
1367
+ grayscale = min / (1 - chroma);
1368
+ } else {
1369
+ grayscale = 0;
1370
+ }
1371
+
1372
+ if (chroma <= 0) {
1373
+ hue = 0;
1374
+ } else if (max === r) {
1375
+ hue = (g - b) / chroma % 6;
1376
+ } else if (max === g) {
1377
+ hue = 2 + (b - r) / chroma;
1378
+ } else {
1379
+ hue = 4 + (r - g) / chroma;
1380
+ }
1381
+
1382
+ hue /= 6;
1383
+ hue %= 1;
1384
+ return [hue * 360, chroma * 100, grayscale * 100];
1385
+ };
1386
+
1387
+ convert$1.hsl.hcg = function (hsl) {
1388
+ const s = hsl[1] / 100;
1389
+ const l = hsl[2] / 100;
1390
+ const c = l < 0.5 ? 2.0 * s * l : 2.0 * s * (1.0 - l);
1391
+ let f = 0;
1392
+
1393
+ if (c < 1.0) {
1394
+ f = (l - 0.5 * c) / (1.0 - c);
1395
+ }
1396
+
1397
+ return [hsl[0], c * 100, f * 100];
1398
+ };
1399
+
1400
+ convert$1.hsv.hcg = function (hsv) {
1401
+ const s = hsv[1] / 100;
1402
+ const v = hsv[2] / 100;
1403
+ const c = s * v;
1404
+ let f = 0;
1405
+
1406
+ if (c < 1.0) {
1407
+ f = (v - c) / (1 - c);
1408
+ }
1409
+
1410
+ return [hsv[0], c * 100, f * 100];
1411
+ };
1412
+
1413
+ convert$1.hcg.rgb = function (hcg) {
1414
+ const h = hcg[0] / 360;
1415
+ const c = hcg[1] / 100;
1416
+ const g = hcg[2] / 100;
1417
+
1418
+ if (c === 0.0) {
1419
+ return [g * 255, g * 255, g * 255];
1420
+ }
1421
+
1422
+ const pure = [0, 0, 0];
1423
+ const hi = h % 1 * 6;
1424
+ const v = hi % 1;
1425
+ const w = 1 - v;
1426
+ let mg = 0;
1427
+ /* eslint-disable max-statements-per-line */
1428
+
1429
+ switch (Math.floor(hi)) {
1430
+ case 0:
1431
+ pure[0] = 1;
1432
+ pure[1] = v;
1433
+ pure[2] = 0;
1434
+ break;
1435
+
1436
+ case 1:
1437
+ pure[0] = w;
1438
+ pure[1] = 1;
1439
+ pure[2] = 0;
1440
+ break;
1441
+
1442
+ case 2:
1443
+ pure[0] = 0;
1444
+ pure[1] = 1;
1445
+ pure[2] = v;
1446
+ break;
1447
+
1448
+ case 3:
1449
+ pure[0] = 0;
1450
+ pure[1] = w;
1451
+ pure[2] = 1;
1452
+ break;
1453
+
1454
+ case 4:
1455
+ pure[0] = v;
1456
+ pure[1] = 0;
1457
+ pure[2] = 1;
1458
+ break;
1459
+
1460
+ default:
1461
+ pure[0] = 1;
1462
+ pure[1] = 0;
1463
+ pure[2] = w;
1464
+ }
1465
+ /* eslint-enable max-statements-per-line */
1466
+
1467
+
1468
+ mg = (1.0 - c) * g;
1469
+ return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
1470
+ };
1471
+
1472
+ convert$1.hcg.hsv = function (hcg) {
1473
+ const c = hcg[1] / 100;
1474
+ const g = hcg[2] / 100;
1475
+ const v = c + g * (1.0 - c);
1476
+ let f = 0;
1477
+
1478
+ if (v > 0.0) {
1479
+ f = c / v;
1480
+ }
1481
+
1482
+ return [hcg[0], f * 100, v * 100];
1483
+ };
1484
+
1485
+ convert$1.hcg.hsl = function (hcg) {
1486
+ const c = hcg[1] / 100;
1487
+ const g = hcg[2] / 100;
1488
+ const l = g * (1.0 - c) + 0.5 * c;
1489
+ let s = 0;
1490
+
1491
+ if (l > 0.0 && l < 0.5) {
1492
+ s = c / (2 * l);
1493
+ } else if (l >= 0.5 && l < 1.0) {
1494
+ s = c / (2 * (1 - l));
1495
+ }
1496
+
1497
+ return [hcg[0], s * 100, l * 100];
1498
+ };
1499
+
1500
+ convert$1.hcg.hwb = function (hcg) {
1501
+ const c = hcg[1] / 100;
1502
+ const g = hcg[2] / 100;
1503
+ const v = c + g * (1.0 - c);
1504
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
1505
+ };
1506
+
1507
+ convert$1.hwb.hcg = function (hwb) {
1508
+ const w = hwb[1] / 100;
1509
+ const b = hwb[2] / 100;
1510
+ const v = 1 - b;
1511
+ const c = v - w;
1512
+ let g = 0;
1513
+
1514
+ if (c < 1) {
1515
+ g = (v - c) / (1 - c);
1516
+ }
1517
+
1518
+ return [hwb[0], c * 100, g * 100];
1519
+ };
1520
+
1521
+ convert$1.apple.rgb = function (apple) {
1522
+ return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
1523
+ };
1524
+
1525
+ convert$1.rgb.apple = function (rgb) {
1526
+ return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
1527
+ };
1528
+
1529
+ convert$1.gray.rgb = function (args) {
1530
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1531
+ };
1532
+
1533
+ convert$1.gray.hsl = function (args) {
1534
+ return [0, 0, args[0]];
1535
+ };
1536
+
1537
+ convert$1.gray.hsv = convert$1.gray.hsl;
1538
+
1539
+ convert$1.gray.hwb = function (gray) {
1540
+ return [0, 100, gray[0]];
1541
+ };
1542
+
1543
+ convert$1.gray.cmyk = function (gray) {
1544
+ return [0, 0, 0, gray[0]];
1545
+ };
1546
+
1547
+ convert$1.gray.lab = function (gray) {
1548
+ return [gray[0], 0, 0];
1549
+ };
1550
+
1551
+ convert$1.gray.hex = function (gray) {
1552
+ const val = Math.round(gray[0] / 100 * 255) & 0xFF;
1553
+ const integer = (val << 16) + (val << 8) + val;
1554
+ const string = integer.toString(16).toUpperCase();
1555
+ return '000000'.substring(string.length) + string;
1556
+ };
1557
+
1558
+ convert$1.rgb.gray = function (rgb) {
1559
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1560
+ return [val / 255 * 100];
1561
+ };
1562
+
1563
+ const conversions$1 = conversions$2;
1564
+ /*
1565
+ This function routes a model to all other models.
1566
+
1567
+ all functions that are routed have a property `.conversion` attached
1568
+ to the returned synthetic function. This property is an array
1569
+ of strings, each with the steps in between the 'from' and 'to'
1570
+ color models (inclusive).
1571
+
1572
+ conversions that are not possible simply are not included.
1573
+ */
1574
+
1575
+ function buildGraph() {
1576
+ const graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3
1577
+
1578
+ const models = Object.keys(conversions$1);
1579
+
1580
+ for (let len = models.length, i = 0; i < len; i++) {
1581
+ graph[models[i]] = {
1582
+ // http://jsperf.com/1-vs-infinity
1583
+ // micro-opt, but this is simple.
1584
+ distance: -1,
1585
+ parent: null
1586
+ };
1587
+ }
1588
+
1589
+ return graph;
1590
+ } // https://en.wikipedia.org/wiki/Breadth-first_search
1591
+
1592
+
1593
+ function deriveBFS(fromModel) {
1594
+ const graph = buildGraph();
1595
+ const queue = [fromModel]; // Unshift -> queue -> pop
1596
+
1597
+ graph[fromModel].distance = 0;
1598
+
1599
+ while (queue.length) {
1600
+ const current = queue.pop();
1601
+ const adjacents = Object.keys(conversions$1[current]);
1602
+
1603
+ for (let len = adjacents.length, i = 0; i < len; i++) {
1604
+ const adjacent = adjacents[i];
1605
+ const node = graph[adjacent];
1606
+
1607
+ if (node.distance === -1) {
1608
+ node.distance = graph[current].distance + 1;
1609
+ node.parent = current;
1610
+ queue.unshift(adjacent);
1611
+ }
1612
+ }
1613
+ }
1614
+
1615
+ return graph;
1616
+ }
1617
+
1618
+ function link(from, to) {
1619
+ return function (args) {
1620
+ return to(from(args));
1621
+ };
1622
+ }
1623
+
1624
+ function wrapConversion(toModel, graph) {
1625
+ const path = [graph[toModel].parent, toModel];
1626
+ let fn = conversions$1[graph[toModel].parent][toModel];
1627
+ let cur = graph[toModel].parent;
1628
+
1629
+ while (graph[cur].parent) {
1630
+ path.unshift(graph[cur].parent);
1631
+ fn = link(conversions$1[graph[cur].parent][cur], fn);
1632
+ cur = graph[cur].parent;
1633
+ }
1634
+
1635
+ fn.conversion = path;
1636
+ return fn;
1637
+ }
1638
+
1639
+ var route$1 = function (fromModel) {
1640
+ const graph = deriveBFS(fromModel);
1641
+ const conversion = {};
1642
+ const models = Object.keys(graph);
1643
+
1644
+ for (let len = models.length, i = 0; i < len; i++) {
1645
+ const toModel = models[i];
1646
+ const node = graph[toModel];
1647
+
1648
+ if (node.parent === null) {
1649
+ // No possible conversion, or this node is the source model.
1650
+ continue;
1651
+ }
1652
+
1653
+ conversion[toModel] = wrapConversion(toModel, graph);
1654
+ }
1655
+
1656
+ return conversion;
1657
+ };
1658
+
1659
+ const conversions = conversions$2;
1660
+ const route = route$1;
1661
+ const convert = {};
1662
+ const models = Object.keys(conversions);
1663
+
1664
+ function wrapRaw(fn) {
1665
+ const wrappedFn = function (...args) {
1666
+ const arg0 = args[0];
1667
+
1668
+ if (arg0 === undefined || arg0 === null) {
1669
+ return arg0;
1670
+ }
1671
+
1672
+ if (arg0.length > 1) {
1673
+ args = arg0;
1674
+ }
1675
+
1676
+ return fn(args);
1677
+ }; // Preserve .conversion property if there is one
1678
+
1679
+
1680
+ if ('conversion' in fn) {
1681
+ wrappedFn.conversion = fn.conversion;
1682
+ }
1683
+
1684
+ return wrappedFn;
1685
+ }
1686
+
1687
+ function wrapRounded(fn) {
1688
+ const wrappedFn = function (...args) {
1689
+ const arg0 = args[0];
1690
+
1691
+ if (arg0 === undefined || arg0 === null) {
1692
+ return arg0;
1693
+ }
1694
+
1695
+ if (arg0.length > 1) {
1696
+ args = arg0;
1697
+ }
1698
+
1699
+ const result = fn(args); // We're assuming the result is an array here.
1700
+ // see notice in conversions.js; don't use box types
1701
+ // in conversion functions.
1702
+
1703
+ if (typeof result === 'object') {
1704
+ for (let len = result.length, i = 0; i < len; i++) {
1705
+ result[i] = Math.round(result[i]);
1706
+ }
1707
+ }
1708
+
1709
+ return result;
1710
+ }; // Preserve .conversion property if there is one
1711
+
1712
+
1713
+ if ('conversion' in fn) {
1714
+ wrappedFn.conversion = fn.conversion;
1715
+ }
1716
+
1717
+ return wrappedFn;
1718
+ }
1719
+
1720
+ models.forEach(fromModel => {
1721
+ convert[fromModel] = {};
1722
+ Object.defineProperty(convert[fromModel], 'channels', {
1723
+ value: conversions[fromModel].channels
1724
+ });
1725
+ Object.defineProperty(convert[fromModel], 'labels', {
1726
+ value: conversions[fromModel].labels
1727
+ });
1728
+ const routes = route(fromModel);
1729
+ const routeModels = Object.keys(routes);
1730
+ routeModels.forEach(toModel => {
1731
+ const fn = routes[toModel];
1732
+ convert[fromModel][toModel] = wrapRounded(fn);
1733
+ convert[fromModel][toModel].raw = wrapRaw(fn);
1734
+ });
1735
+ });
1736
+ var colorConvert = convert;
1737
+ var root = index._root;
1738
+ /**
1739
+ * Gets the timestamp of the number of milliseconds that have elapsed since
1740
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
1741
+ *
1742
+ * @static
1743
+ * @memberOf _
1744
+ * @since 2.4.0
1745
+ * @category Date
1746
+ * @returns {number} Returns the timestamp.
1747
+ * @example
1748
+ *
1749
+ * _.defer(function(stamp) {
1750
+ * console.log(_.now() - stamp);
1751
+ * }, _.now());
1752
+ * // => Logs the number of milliseconds it took for the deferred invocation.
1753
+ */
1754
+
1755
+ var now$1 = function () {
1756
+ return root.Date.now();
1757
+ };
1758
+
1759
+ var now_1 = now$1;
1760
+ /** Used to match a single whitespace character. */
1761
+
1762
+ var reWhitespace = /\s/;
1763
+ /**
1764
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
1765
+ * character of `string`.
1766
+ *
1767
+ * @private
1768
+ * @param {string} string The string to inspect.
1769
+ * @returns {number} Returns the index of the last non-whitespace character.
1770
+ */
1771
+
1772
+ function trimmedEndIndex$1(string) {
1773
+ var index = string.length;
1774
+
1775
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
1776
+
1777
+ return index;
1778
+ }
1779
+
1780
+ var _trimmedEndIndex = trimmedEndIndex$1;
1781
+ var trimmedEndIndex = _trimmedEndIndex;
1782
+ /** Used to match leading whitespace. */
1783
+
1784
+ var reTrimStart = /^\s+/;
1785
+ /**
1786
+ * The base implementation of `_.trim`.
1787
+ *
1788
+ * @private
1789
+ * @param {string} string The string to trim.
1790
+ * @returns {string} Returns the trimmed string.
1791
+ */
1792
+
1793
+ function baseTrim$1(string) {
1794
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string;
1795
+ }
1796
+
1797
+ var _baseTrim = baseTrim$1;
1798
+ var baseTrim = _baseTrim,
1799
+ isObject$2 = index.isObject_1,
1800
+ isSymbol = index.isSymbol_1;
1801
+ /** Used as references for various `Number` constants. */
1802
+
1803
+ var NAN = 0 / 0;
1804
+ /** Used to detect bad signed hexadecimal string values. */
1805
+
1806
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1807
+ /** Used to detect binary string values. */
1808
+
1809
+ var reIsBinary = /^0b[01]+$/i;
1810
+ /** Used to detect octal string values. */
1811
+
1812
+ var reIsOctal = /^0o[0-7]+$/i;
1813
+ /** Built-in method references without a dependency on `root`. */
1814
+
1815
+ var freeParseInt = parseInt;
1816
+ /**
1817
+ * Converts `value` to a number.
1818
+ *
1819
+ * @static
1820
+ * @memberOf _
1821
+ * @since 4.0.0
1822
+ * @category Lang
1823
+ * @param {*} value The value to process.
1824
+ * @returns {number} Returns the number.
1825
+ * @example
1826
+ *
1827
+ * _.toNumber(3.2);
1828
+ * // => 3.2
1829
+ *
1830
+ * _.toNumber(Number.MIN_VALUE);
1831
+ * // => 5e-324
1832
+ *
1833
+ * _.toNumber(Infinity);
1834
+ * // => Infinity
1835
+ *
1836
+ * _.toNumber('3.2');
1837
+ * // => 3.2
1838
+ */
1839
+
1840
+ function toNumber$1(value) {
1841
+ if (typeof value == 'number') {
1842
+ return value;
1843
+ }
1844
+
1845
+ if (isSymbol(value)) {
1846
+ return NAN;
1847
+ }
1848
+
1849
+ if (isObject$2(value)) {
1850
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
1851
+ value = isObject$2(other) ? other + '' : other;
1852
+ }
1853
+
1854
+ if (typeof value != 'string') {
1855
+ return value === 0 ? value : +value;
1856
+ }
1857
+
1858
+ value = baseTrim(value);
1859
+ var isBinary = reIsBinary.test(value);
1860
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
1861
+ }
1862
+
1863
+ var toNumber_1 = toNumber$1;
1864
+ var isObject$1 = index.isObject_1,
1865
+ now = now_1,
1866
+ toNumber = toNumber_1;
1867
+ /** Error message constants. */
1868
+
1869
+ var FUNC_ERROR_TEXT$1 = 'Expected a function';
1870
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1871
+
1872
+ var nativeMax = Math.max,
1873
+ nativeMin = Math.min;
1874
+ /**
1875
+ * Creates a debounced function that delays invoking `func` until after `wait`
1876
+ * milliseconds have elapsed since the last time the debounced function was
1877
+ * invoked. The debounced function comes with a `cancel` method to cancel
1878
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
1879
+ * Provide `options` to indicate whether `func` should be invoked on the
1880
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
1881
+ * with the last arguments provided to the debounced function. Subsequent
1882
+ * calls to the debounced function return the result of the last `func`
1883
+ * invocation.
1884
+ *
1885
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
1886
+ * invoked on the trailing edge of the timeout only if the debounced function
1887
+ * is invoked more than once during the `wait` timeout.
1888
+ *
1889
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
1890
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
1891
+ *
1892
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
1893
+ * for details over the differences between `_.debounce` and `_.throttle`.
1894
+ *
1895
+ * @static
1896
+ * @memberOf _
1897
+ * @since 0.1.0
1898
+ * @category Function
1899
+ * @param {Function} func The function to debounce.
1900
+ * @param {number} [wait=0] The number of milliseconds to delay.
1901
+ * @param {Object} [options={}] The options object.
1902
+ * @param {boolean} [options.leading=false]
1903
+ * Specify invoking on the leading edge of the timeout.
1904
+ * @param {number} [options.maxWait]
1905
+ * The maximum time `func` is allowed to be delayed before it's invoked.
1906
+ * @param {boolean} [options.trailing=true]
1907
+ * Specify invoking on the trailing edge of the timeout.
1908
+ * @returns {Function} Returns the new debounced function.
1909
+ * @example
1910
+ *
1911
+ * // Avoid costly calculations while the window size is in flux.
1912
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
1913
+ *
1914
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
1915
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
1916
+ * 'leading': true,
1917
+ * 'trailing': false
1918
+ * }));
1919
+ *
1920
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
1921
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
1922
+ * var source = new EventSource('/stream');
1923
+ * jQuery(source).on('message', debounced);
1924
+ *
1925
+ * // Cancel the trailing debounced invocation.
1926
+ * jQuery(window).on('popstate', debounced.cancel);
1927
+ */
1928
+
1929
+ function debounce$1(func, wait, options) {
1930
+ var lastArgs,
1931
+ lastThis,
1932
+ maxWait,
1933
+ result,
1934
+ timerId,
1935
+ lastCallTime,
1936
+ lastInvokeTime = 0,
1937
+ leading = false,
1938
+ maxing = false,
1939
+ trailing = true;
1940
+
1941
+ if (typeof func != 'function') {
1942
+ throw new TypeError(FUNC_ERROR_TEXT$1);
1943
+ }
1944
+
1945
+ wait = toNumber(wait) || 0;
1946
+
1947
+ if (isObject$1(options)) {
1948
+ leading = !!options.leading;
1949
+ maxing = 'maxWait' in options;
1950
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
1951
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
1952
+ }
1953
+
1954
+ function invokeFunc(time) {
1955
+ var args = lastArgs,
1956
+ thisArg = lastThis;
1957
+ lastArgs = lastThis = undefined;
1958
+ lastInvokeTime = time;
1959
+ result = func.apply(thisArg, args);
1960
+ return result;
1961
+ }
1962
+
1963
+ function leadingEdge(time) {
1964
+ // Reset any `maxWait` timer.
1965
+ lastInvokeTime = time; // Start the timer for the trailing edge.
1966
+
1967
+ timerId = setTimeout(timerExpired, wait); // Invoke the leading edge.
1968
+
1969
+ return leading ? invokeFunc(time) : result;
1970
+ }
1971
+
1972
+ function remainingWait(time) {
1973
+ var timeSinceLastCall = time - lastCallTime,
1974
+ timeSinceLastInvoke = time - lastInvokeTime,
1975
+ timeWaiting = wait - timeSinceLastCall;
1976
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
1977
+ }
1978
+
1979
+ function shouldInvoke(time) {
1980
+ var timeSinceLastCall = time - lastCallTime,
1981
+ timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the
1982
+ // trailing edge, the system time has gone backwards and we're treating
1983
+ // it as the trailing edge, or we've hit the `maxWait` limit.
1984
+
1985
+ return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
1986
+ }
1987
+
1988
+ function timerExpired() {
1989
+ var time = now();
1990
+
1991
+ if (shouldInvoke(time)) {
1992
+ return trailingEdge(time);
1993
+ } // Restart the timer.
1994
+
1995
+
1996
+ timerId = setTimeout(timerExpired, remainingWait(time));
1997
+ }
1998
+
1999
+ function trailingEdge(time) {
2000
+ timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been
2001
+ // debounced at least once.
2002
+
2003
+ if (trailing && lastArgs) {
2004
+ return invokeFunc(time);
2005
+ }
2006
+
2007
+ lastArgs = lastThis = undefined;
2008
+ return result;
2009
+ }
2010
+
2011
+ function cancel() {
2012
+ if (timerId !== undefined) {
2013
+ clearTimeout(timerId);
2014
+ }
2015
+
2016
+ lastInvokeTime = 0;
2017
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
2018
+ }
2019
+
2020
+ function flush() {
2021
+ return timerId === undefined ? result : trailingEdge(now());
2022
+ }
2023
+
2024
+ function debounced() {
2025
+ var time = now(),
2026
+ isInvoking = shouldInvoke(time);
2027
+ lastArgs = arguments;
2028
+ lastThis = this;
2029
+ lastCallTime = time;
2030
+
2031
+ if (isInvoking) {
2032
+ if (timerId === undefined) {
2033
+ return leadingEdge(lastCallTime);
2034
+ }
2035
+
2036
+ if (maxing) {
2037
+ // Handle invocations in a tight loop.
2038
+ clearTimeout(timerId);
2039
+ timerId = setTimeout(timerExpired, wait);
2040
+ return invokeFunc(lastCallTime);
2041
+ }
2042
+ }
2043
+
2044
+ if (timerId === undefined) {
2045
+ timerId = setTimeout(timerExpired, wait);
2046
+ }
2047
+
2048
+ return result;
2049
+ }
2050
+
2051
+ debounced.cancel = cancel;
2052
+ debounced.flush = flush;
2053
+ return debounced;
2054
+ }
2055
+
2056
+ var debounce_1 = debounce$1;
2057
+ var debounce = debounce_1,
2058
+ isObject = index.isObject_1;
2059
+ /** Error message constants. */
2060
+
2061
+ var FUNC_ERROR_TEXT = 'Expected a function';
2062
+ /**
2063
+ * Creates a throttled function that only invokes `func` at most once per
2064
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
2065
+ * method to cancel delayed `func` invocations and a `flush` method to
2066
+ * immediately invoke them. Provide `options` to indicate whether `func`
2067
+ * should be invoked on the leading and/or trailing edge of the `wait`
2068
+ * timeout. The `func` is invoked with the last arguments provided to the
2069
+ * throttled function. Subsequent calls to the throttled function return the
2070
+ * result of the last `func` invocation.
2071
+ *
2072
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
2073
+ * invoked on the trailing edge of the timeout only if the throttled function
2074
+ * is invoked more than once during the `wait` timeout.
2075
+ *
2076
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
2077
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
2078
+ *
2079
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
2080
+ * for details over the differences between `_.throttle` and `_.debounce`.
2081
+ *
2082
+ * @static
2083
+ * @memberOf _
2084
+ * @since 0.1.0
2085
+ * @category Function
2086
+ * @param {Function} func The function to throttle.
2087
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
2088
+ * @param {Object} [options={}] The options object.
2089
+ * @param {boolean} [options.leading=true]
2090
+ * Specify invoking on the leading edge of the timeout.
2091
+ * @param {boolean} [options.trailing=true]
2092
+ * Specify invoking on the trailing edge of the timeout.
2093
+ * @returns {Function} Returns the new throttled function.
2094
+ * @example
2095
+ *
2096
+ * // Avoid excessively updating the position while scrolling.
2097
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
2098
+ *
2099
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
2100
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
2101
+ * jQuery(element).on('click', throttled);
2102
+ *
2103
+ * // Cancel the trailing throttled invocation.
2104
+ * jQuery(window).on('popstate', throttled.cancel);
2105
+ */
2106
+
2107
+ function throttle(func, wait, options) {
2108
+ var leading = true,
2109
+ trailing = true;
2110
+
2111
+ if (typeof func != 'function') {
2112
+ throw new TypeError(FUNC_ERROR_TEXT);
2113
+ }
2114
+
2115
+ if (isObject(options)) {
2116
+ leading = 'leading' in options ? !!options.leading : leading;
2117
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
2118
+ }
2119
+
2120
+ return debounce(func, wait, {
2121
+ 'leading': leading,
2122
+ 'maxWait': wait,
2123
+ 'trailing': trailing
2124
+ });
2125
+ }
2126
+
2127
+ var throttle_1 = throttle;
2128
+ const Wrapper = theming.styled.div({
2129
+ position: 'relative',
2130
+ maxWidth: 250
2131
+ });
2132
+ const PickerTooltip = theming.styled(index.WithTooltip)({
2133
+ position: 'absolute',
2134
+ zIndex: 1,
2135
+ top: 4,
2136
+ left: 4
2137
+ });
2138
+ const TooltipContent = theming.styled.div({
2139
+ width: 200,
2140
+ margin: 5,
2141
+ '.react-colorful__saturation': {
2142
+ borderRadius: '4px 4px 0 0'
2143
+ },
2144
+ '.react-colorful__hue': {
2145
+ boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 5%)'
2146
+ },
2147
+ '.react-colorful__last-control': {
2148
+ borderRadius: '0 0 4px 4px'
2149
+ }
2150
+ });
2151
+ const Note = theming.styled(index.TooltipNote)(({
2152
+ theme
2153
+ }) => ({
2154
+ fontFamily: theme.typography.fonts.base
2155
+ }));
2156
+ const Swatches = theming.styled.div({
2157
+ display: 'grid',
2158
+ gridTemplateColumns: 'repeat(9, 16px)',
2159
+ gap: 6,
2160
+ padding: 3,
2161
+ marginTop: 5,
2162
+ width: 200
2163
+ });
2164
+ const SwatchColor = theming.styled.div(({
2165
+ theme,
2166
+ active
2167
+ }) => ({
2168
+ width: 16,
2169
+ height: 16,
2170
+ boxShadow: active ? `${theme.appBorderColor} 0 0 0 1px inset, ${theme.color.mediumdark}50 0 0 0 4px` : `${theme.appBorderColor} 0 0 0 1px inset`,
2171
+ borderRadius: theme.appBorderRadius
2172
+ }));
2173
+ const swatchBackground = `url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`;
2174
+
2175
+ const Swatch = _a => {
2176
+ var {
2177
+ value,
2178
+ active,
2179
+ onClick,
2180
+ style
2181
+ } = _a,
2182
+ props = index.__rest(_a, ["value", "active", "onClick", "style"]);
2183
+
2184
+ const backgroundImage = `linear-gradient(${value}, ${value}), ${swatchBackground}, linear-gradient(#fff, #fff)`;
2185
+ return React__default["default"].createElement(SwatchColor, Object.assign({}, props, {
2186
+ active,
2187
+ onClick
2188
+ }, {
2189
+ style: Object.assign(Object.assign({}, style), {
2190
+ backgroundImage
2191
+ })
2192
+ }));
2193
+ };
2194
+
2195
+ const Input = theming.styled(index.Form.Input)(({
2196
+ theme
2197
+ }) => ({
2198
+ width: '100%',
2199
+ paddingLeft: 30,
2200
+ paddingRight: 30,
2201
+ boxSizing: 'border-box',
2202
+ fontFamily: theme.typography.fonts.base
2203
+ }));
2204
+ const ToggleIcon = theming.styled(index.Icons)(({
2205
+ theme
2206
+ }) => ({
2207
+ position: 'absolute',
2208
+ zIndex: 1,
2209
+ top: 6,
2210
+ right: 7,
2211
+ width: 20,
2212
+ height: 20,
2213
+ padding: 4,
2214
+ boxSizing: 'border-box',
2215
+ cursor: 'pointer',
2216
+ color: theme.input.color
2217
+ }));
2218
+ var ColorSpace;
2219
+
2220
+ (function (ColorSpace) {
2221
+ ColorSpace["RGB"] = "rgb";
2222
+ ColorSpace["HSL"] = "hsl";
2223
+ ColorSpace["HEX"] = "hex";
2224
+ })(ColorSpace || (ColorSpace = {}));
2225
+
2226
+ const COLOR_SPACES = Object.values(ColorSpace);
2227
+ const COLOR_REGEXP = /\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/;
2228
+ const RGB_REGEXP = /^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i;
2229
+ const HSL_REGEXP = /^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i;
2230
+ const HEX_REGEXP = /^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i;
2231
+ const SHORTHEX_REGEXP = /^\s*#?([0-9a-f]{3})\s*$/i;
2232
+ const ColorPicker = {
2233
+ [ColorSpace.HEX]: J,
2234
+ [ColorSpace.RGB]: pe,
2235
+ [ColorSpace.HSL]: re
2236
+ };
2237
+ const fallbackColor = {
2238
+ [ColorSpace.HEX]: 'transparent',
2239
+ [ColorSpace.RGB]: 'rgba(0, 0, 0, 0)',
2240
+ [ColorSpace.HSL]: 'hsla(0, 0%, 0%, 0)'
2241
+ };
2242
+
2243
+ const stringToArgs = value => {
2244
+ const match = value === null || value === void 0 ? void 0 : value.match(COLOR_REGEXP);
2245
+ if (!match) return [0, 0, 0, 1];
2246
+ const [, x, y, z, a = 1] = match;
2247
+ return [x, y, z, a].map(Number);
2248
+ };
2249
+
2250
+ const parseValue = value => {
2251
+ if (!value) return undefined;
2252
+ let valid = true;
2253
+
2254
+ if (RGB_REGEXP.test(value)) {
2255
+ const [r, g, b, a] = stringToArgs(value);
2256
+ const [h, s, l] = colorConvert.rgb.hsl([r, g, b]) || [0, 0, 0];
2257
+ return {
2258
+ valid,
2259
+ value,
2260
+ keyword: colorConvert.rgb.keyword([r, g, b]),
2261
+ colorSpace: ColorSpace.RGB,
2262
+ [ColorSpace.RGB]: value,
2263
+ [ColorSpace.HSL]: `hsla(${h}, ${s}%, ${l}%, ${a})`,
2264
+ [ColorSpace.HEX]: `#${colorConvert.rgb.hex([r, g, b]).toLowerCase()}`
2265
+ };
2266
+ }
2267
+
2268
+ if (HSL_REGEXP.test(value)) {
2269
+ const [h, s, l, a] = stringToArgs(value);
2270
+ const [r, g, b] = colorConvert.hsl.rgb([h, s, l]) || [0, 0, 0];
2271
+ return {
2272
+ valid,
2273
+ value,
2274
+ keyword: colorConvert.hsl.keyword([h, s, l]),
2275
+ colorSpace: ColorSpace.HSL,
2276
+ [ColorSpace.RGB]: `rgba(${r}, ${g}, ${b}, ${a})`,
2277
+ [ColorSpace.HSL]: value,
2278
+ [ColorSpace.HEX]: `#${colorConvert.hsl.hex([h, s, l]).toLowerCase()}`
2279
+ };
2280
+ }
2281
+
2282
+ const plain = value.replace('#', '');
2283
+ const rgb = colorConvert.keyword.rgb(plain) || colorConvert.hex.rgb(plain);
2284
+ const hsl = colorConvert.rgb.hsl(rgb);
2285
+ let mapped = value;
2286
+ if (/[^#a-f0-9]/i.test(value)) mapped = plain;else if (HEX_REGEXP.test(value)) mapped = `#${plain}`;
2287
+
2288
+ if (mapped.startsWith('#')) {
2289
+ valid = HEX_REGEXP.test(mapped);
2290
+ } else {
2291
+ try {
2292
+ colorConvert.keyword.hex(mapped);
2293
+ } catch (e) {
2294
+ valid = false;
2295
+ }
2296
+ }
2297
+
2298
+ return {
2299
+ valid,
2300
+ value: mapped,
2301
+ keyword: colorConvert.rgb.keyword(rgb),
2302
+ colorSpace: ColorSpace.HEX,
2303
+ [ColorSpace.RGB]: `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, 1)`,
2304
+ [ColorSpace.HSL]: `hsla(${hsl[0]}, ${hsl[1]}%, ${hsl[2]}%, 1)`,
2305
+ [ColorSpace.HEX]: mapped
2306
+ };
2307
+ };
2308
+
2309
+ const getRealValue = (value, color, colorSpace) => {
2310
+ if (!value || !(color === null || color === void 0 ? void 0 : color.valid)) return fallbackColor[colorSpace];
2311
+ if (colorSpace !== ColorSpace.HEX) return (color === null || color === void 0 ? void 0 : color[colorSpace]) || fallbackColor[colorSpace];
2312
+
2313
+ if (!color.hex.startsWith('#')) {
2314
+ try {
2315
+ return `#${colorConvert.keyword.hex(color.hex)}`;
2316
+ } catch (e) {
2317
+ return fallbackColor.hex;
2318
+ }
2319
+ }
2320
+
2321
+ const short = color.hex.match(SHORTHEX_REGEXP);
2322
+ if (!short) return HEX_REGEXP.test(color.hex) ? color.hex : fallbackColor.hex;
2323
+ const [r, g, b] = short[1].split('');
2324
+ return `#${r}${r}${g}${g}${b}${b}`;
2325
+ };
2326
+
2327
+ const useColorInput = (initialValue, onChange) => {
2328
+ const [value, setValue] = React.useState(initialValue || '');
2329
+ const [color, setColor] = React.useState(() => parseValue(value));
2330
+ const [colorSpace, setColorSpace] = React.useState((color === null || color === void 0 ? void 0 : color.colorSpace) || ColorSpace.HEX); // Reset state when initialValue becomes undefined (when resetting controls)
2331
+
2332
+ React.useEffect(() => {
2333
+ if (initialValue !== undefined) return;
2334
+ setValue('');
2335
+ setColor(undefined);
2336
+ setColorSpace(ColorSpace.HEX);
2337
+ }, [initialValue]);
2338
+ const realValue = React.useMemo(() => getRealValue(value, color, colorSpace).toLowerCase(), [value, color, colorSpace]);
2339
+ const updateValue = React.useCallback(update => {
2340
+ const parsed = parseValue(update);
2341
+ setValue((parsed === null || parsed === void 0 ? void 0 : parsed.value) || update || '');
2342
+ if (!parsed) return;
2343
+ setColor(parsed);
2344
+ setColorSpace(parsed.colorSpace);
2345
+ onChange(parsed.value);
2346
+ }, [onChange]);
2347
+ const cycleColorSpace = React.useCallback(() => {
2348
+ let next = COLOR_SPACES.indexOf(colorSpace) + 1;
2349
+ if (next >= COLOR_SPACES.length) next = 0;
2350
+ setColorSpace(COLOR_SPACES[next]);
2351
+ const update = (color === null || color === void 0 ? void 0 : color[COLOR_SPACES[next]]) || '';
2352
+ setValue(update);
2353
+ onChange(update);
2354
+ }, [color, colorSpace, onChange]);
2355
+ return {
2356
+ value,
2357
+ realValue,
2358
+ updateValue,
2359
+ color,
2360
+ colorSpace,
2361
+ cycleColorSpace
2362
+ };
2363
+ };
2364
+
2365
+ const id = value => value.replace(/\s*/, '').toLowerCase();
2366
+
2367
+ const usePresets = (presetColors, currentColor, colorSpace) => {
2368
+ const [selectedColors, setSelectedColors] = React.useState((currentColor === null || currentColor === void 0 ? void 0 : currentColor.valid) ? [currentColor] : []); // Reset state when currentColor becomes undefined (when resetting controls)
2369
+
2370
+ React.useEffect(() => {
2371
+ if (currentColor !== undefined) return;
2372
+ setSelectedColors([]);
2373
+ }, [currentColor]);
2374
+ const presets = React.useMemo(() => {
2375
+ const initialPresets = (presetColors || []).map(preset => {
2376
+ if (typeof preset === 'string') return parseValue(preset);
2377
+ if (preset.title) return Object.assign(Object.assign({}, parseValue(preset.color)), {
2378
+ keyword: preset.title
2379
+ });
2380
+ return parseValue(preset.color);
2381
+ });
2382
+ return initialPresets.concat(selectedColors).filter(Boolean).slice(-27);
2383
+ }, [presetColors, selectedColors]);
2384
+ const addPreset = React.useCallback(color => {
2385
+ if (!(color === null || color === void 0 ? void 0 : color.valid)) return;
2386
+ if (presets.some(preset => id(preset[colorSpace]) === id(color[colorSpace]))) return;
2387
+ setSelectedColors(arr => arr.concat(color));
2388
+ }, [colorSpace, presets]);
2389
+ return {
2390
+ presets,
2391
+ addPreset
2392
+ };
2393
+ };
2394
+
2395
+ const ColorControl = ({
2396
+ name,
2397
+ value: initialValue,
2398
+ onChange,
2399
+ onFocus,
2400
+ onBlur,
2401
+ presetColors,
2402
+ startOpen
2403
+ }) => {
2404
+ const {
2405
+ value,
2406
+ realValue,
2407
+ updateValue,
2408
+ color,
2409
+ colorSpace,
2410
+ cycleColorSpace
2411
+ } = useColorInput(initialValue, throttle_1(onChange, 200));
2412
+ const {
2413
+ presets,
2414
+ addPreset
2415
+ } = usePresets(presetColors, color, colorSpace);
2416
+ const Picker = ColorPicker[colorSpace];
2417
+ return React__default["default"].createElement(Wrapper, null, React__default["default"].createElement(PickerTooltip, {
2418
+ trigger: "click",
2419
+ startOpen: startOpen,
2420
+ closeOnClick: true,
2421
+ onVisibilityChange: () => addPreset(color),
2422
+ tooltip: React__default["default"].createElement(TooltipContent, null, React__default["default"].createElement(Picker, Object.assign({
2423
+ color: realValue === 'transparent' ? '#000000' : realValue
2424
+ }, {
2425
+ onChange: updateValue,
2426
+ onFocus,
2427
+ onBlur
2428
+ })), presets.length > 0 && React__default["default"].createElement(Swatches, null, presets.map((preset, index$1) => React__default["default"].createElement(index.WithTooltip // eslint-disable-next-line react/no-array-index-key
2429
+ , {
2430
+ // eslint-disable-next-line react/no-array-index-key
2431
+ key: `${preset.value}-${index$1}`,
2432
+ hasChrome: false,
2433
+ tooltip: React__default["default"].createElement(Note, {
2434
+ note: preset.keyword || preset.value
2435
+ })
2436
+ }, React__default["default"].createElement(Swatch, {
2437
+ value: preset[colorSpace],
2438
+ active: color && id(preset[colorSpace]) === id(color[colorSpace]),
2439
+ onClick: () => updateValue(preset.value)
2440
+ })))))
2441
+ }, React__default["default"].createElement(Swatch, {
2442
+ value: realValue,
2443
+ style: {
2444
+ margin: 4
2445
+ }
2446
+ })), React__default["default"].createElement(Input, {
2447
+ id: index.getControlId(name),
2448
+ value: value,
2449
+ onChange: e => updateValue(e.target.value),
2450
+ onFocus: e => e.target.select(),
2451
+ placeholder: "Choose color..."
2452
+ }), value ? React__default["default"].createElement(ToggleIcon, {
2453
+ icon: "markup",
2454
+ onClick: cycleColorSpace
2455
+ }) : null);
2456
+ };
2457
+
2458
+ exports.ColorControl = ColorControl;
2459
+ exports["default"] = ColorControl;