@storybook/components 6.5.0-alpha.4 → 6.5.0-alpha.40

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