intergalactic 15.87.0-prerelease.0 → 15.87.0-prerelease.3

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 (362) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/accordion/lib/cjs/Accordion.js +7 -7
  3. package/accordion/lib/es6/Accordion.js +7 -7
  4. package/animation/lib/cjs/Animation.js +11 -11
  5. package/animation/lib/cjs/Collapse.js +28 -28
  6. package/animation/lib/cjs/FadeInOut.js +28 -28
  7. package/animation/lib/cjs/Scale.js +28 -28
  8. package/animation/lib/cjs/Slide.js +28 -28
  9. package/animation/lib/cjs/Transform.js +28 -28
  10. package/animation/lib/es6/Animation.js +11 -11
  11. package/animation/lib/es6/Collapse.js +28 -28
  12. package/animation/lib/es6/FadeInOut.js +28 -28
  13. package/animation/lib/es6/Scale.js +28 -28
  14. package/animation/lib/es6/Slide.js +28 -28
  15. package/animation/lib/es6/Transform.js +28 -28
  16. package/badge/lib/cjs/Badge.js +6 -6
  17. package/badge/lib/es6/Badge.js +6 -6
  18. package/base-trigger/lib/cjs/BaseTrigger.js +18 -18
  19. package/base-trigger/lib/cjs/ButtonTrigger.js +3 -3
  20. package/base-trigger/lib/cjs/FilterTrigger.js +7 -7
  21. package/base-trigger/lib/cjs/LinkTrigger.js +12 -12
  22. package/base-trigger/lib/es6/BaseTrigger.js +18 -18
  23. package/base-trigger/lib/es6/ButtonTrigger.js +3 -3
  24. package/base-trigger/lib/es6/FilterTrigger.js +7 -7
  25. package/base-trigger/lib/es6/LinkTrigger.js +12 -12
  26. package/breadcrumbs/lib/cjs/Breadcrumbs.js +6 -6
  27. package/breadcrumbs/lib/es6/Breadcrumbs.js +6 -6
  28. package/card/lib/cjs/Card.js +8 -8
  29. package/card/lib/es6/Card.js +8 -8
  30. package/carousel/lib/cjs/Carousel.js +19 -19
  31. package/carousel/lib/es6/Carousel.js +19 -19
  32. package/checkbox/lib/cjs/Checkbox.js +18 -18
  33. package/checkbox/lib/es6/Checkbox.js +18 -18
  34. package/color-picker/lib/cjs/ColorPicker.js +23 -23
  35. package/color-picker/lib/cjs/PaletteManager.js +23 -23
  36. package/color-picker/lib/cjs/components/InputColor.js +23 -23
  37. package/color-picker/lib/es6/ColorPicker.js +23 -23
  38. package/color-picker/lib/es6/PaletteManager.js +23 -23
  39. package/color-picker/lib/es6/components/InputColor.js +23 -23
  40. package/components.json +70 -70
  41. package/counter/lib/cjs/Counter.js +10 -10
  42. package/counter/lib/es6/Counter.js +10 -10
  43. package/d3-chart/lib/cjs/Area.js +11 -11
  44. package/d3-chart/lib/cjs/Axis.js +14 -14
  45. package/d3-chart/lib/cjs/Bar.js +10 -10
  46. package/d3-chart/lib/cjs/Bubble.js +12 -12
  47. package/d3-chart/lib/cjs/Donut.js +9 -9
  48. package/d3-chart/lib/cjs/Dots.js +8 -8
  49. package/d3-chart/lib/cjs/HorizontalBar.js +10 -10
  50. package/d3-chart/lib/cjs/Hover.js +3 -3
  51. package/d3-chart/lib/cjs/Line.js +9 -9
  52. package/d3-chart/lib/cjs/Plot.js +3 -3
  53. package/d3-chart/lib/cjs/Radar.js +19 -19
  54. package/d3-chart/lib/cjs/RadialTree.js +11 -11
  55. package/d3-chart/lib/cjs/ReferenceLine.js +9 -9
  56. package/d3-chart/lib/cjs/ScatterPlot.js +9 -9
  57. package/d3-chart/lib/cjs/Tooltip.js +9 -9
  58. package/d3-chart/lib/cjs/Venn.js +9 -9
  59. package/d3-chart/lib/cjs/a11y/PlotA11yModule.js +2 -2
  60. package/d3-chart/lib/cjs/a11y/PlotA11yView.js +2 -2
  61. package/d3-chart/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  62. package/d3-chart/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  63. package/d3-chart/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  64. package/d3-chart/lib/es6/Area.js +11 -11
  65. package/d3-chart/lib/es6/Axis.js +14 -14
  66. package/d3-chart/lib/es6/Bar.js +10 -10
  67. package/d3-chart/lib/es6/Bubble.js +12 -12
  68. package/d3-chart/lib/es6/Donut.js +9 -9
  69. package/d3-chart/lib/es6/Dots.js +8 -8
  70. package/d3-chart/lib/es6/HorizontalBar.js +10 -10
  71. package/d3-chart/lib/es6/Hover.js +3 -3
  72. package/d3-chart/lib/es6/Line.js +9 -9
  73. package/d3-chart/lib/es6/Plot.js +3 -3
  74. package/d3-chart/lib/es6/Radar.js +19 -19
  75. package/d3-chart/lib/es6/RadialTree.js +11 -11
  76. package/d3-chart/lib/es6/ReferenceLine.js +9 -9
  77. package/d3-chart/lib/es6/ScatterPlot.js +9 -9
  78. package/d3-chart/lib/es6/Tooltip.js +9 -9
  79. package/d3-chart/lib/es6/Venn.js +9 -9
  80. package/d3-chart/lib/es6/a11y/PlotA11yModule.js +2 -2
  81. package/d3-chart/lib/es6/a11y/PlotA11yView.js +2 -2
  82. package/d3-chart/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  83. package/d3-chart/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  84. package/d3-chart/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  85. package/data-table/lib/cjs/DataTable.js +37 -37
  86. package/data-table/lib/es6/DataTable.js +37 -37
  87. package/date-picker/lib/cjs/components/Calendar.js +21 -21
  88. package/date-picker/lib/cjs/components/DateRangeComparatorAbstract.js +29 -29
  89. package/date-picker/lib/cjs/components/InputTrigger.js +29 -29
  90. package/date-picker/lib/cjs/components/PickerAbstract.js +29 -29
  91. package/date-picker/lib/cjs/components/RangePickerAbstract.js +29 -29
  92. package/date-picker/lib/es6/components/Calendar.js +21 -21
  93. package/date-picker/lib/es6/components/DateRangeComparatorAbstract.js +29 -29
  94. package/date-picker/lib/es6/components/InputTrigger.js +29 -29
  95. package/date-picker/lib/es6/components/PickerAbstract.js +29 -29
  96. package/date-picker/lib/es6/components/RangePickerAbstract.js +29 -29
  97. package/divider/lib/cjs/Divider.js +9 -9
  98. package/divider/lib/es6/Divider.js +9 -9
  99. package/dot/lib/cjs/Dot.js +10 -10
  100. package/dot/lib/es6/Dot.js +10 -10
  101. package/drag-and-drop/lib/cjs/DragAndDrop.js +16 -16
  102. package/drag-and-drop/lib/es6/DragAndDrop.js +16 -16
  103. package/dropdown/lib/cjs/Dropdown.js +2 -2
  104. package/dropdown/lib/es6/Dropdown.js +2 -2
  105. package/dropdown-menu/lib/cjs/DropdownMenu.js +16 -16
  106. package/dropdown-menu/lib/cjs/styleScrollArea.js +6 -6
  107. package/dropdown-menu/lib/es6/DropdownMenu.js +16 -16
  108. package/dropdown-menu/lib/es6/styleScrollArea.js +6 -6
  109. package/ellipsis/lib/cjs/Ellipsis.js +10 -10
  110. package/ellipsis/lib/es6/Ellipsis.js +10 -10
  111. package/errors/lib/cjs/Error.js +9 -9
  112. package/errors/lib/es6/Error.js +9 -9
  113. package/feature-popover/lib/cjs/FeaturePopover.js +10 -10
  114. package/feature-popover/lib/es6/FeaturePopover.js +10 -10
  115. package/feedback-form/component/checkbox-button/CheckboxButton.d.ts +4 -0
  116. package/feedback-form/component/feedback-item/FeedbackItem.d.ts +7 -0
  117. package/feedback-form/component/feedback-rating/FeedbackRating.d.ts +156 -0
  118. package/feedback-form/component/feedback-rating/FeedbackRating.type.d.ts +55 -0
  119. package/feedback-form/component/slider-rating/SliderRating.d.ts +14 -0
  120. package/feedback-form/component/submit-button/SubmitButton.d.ts +3 -0
  121. package/feedback-form/index.d.ts +4 -0
  122. package/feedback-form/lib/cjs/FeedbackForm.js +28 -86
  123. package/feedback-form/lib/cjs/FeedbackForm.js.map +1 -1
  124. package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js +58 -0
  125. package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js.map +1 -0
  126. package/feedback-form/lib/cjs/component/feedback-item/FeedbackItem.js +63 -0
  127. package/feedback-form/lib/cjs/component/feedback-item/FeedbackItem.js.map +1 -0
  128. package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js +360 -0
  129. package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -0
  130. package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.type.js +2 -0
  131. package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.type.js.map +1 -0
  132. package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js +172 -0
  133. package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js.map +1 -0
  134. package/feedback-form/lib/cjs/component/submit-button/SubmitButton.js +23 -0
  135. package/feedback-form/lib/cjs/component/submit-button/SubmitButton.js.map +1 -0
  136. package/feedback-form/lib/cjs/index.d.js +12 -0
  137. package/feedback-form/lib/cjs/index.d.js.map +1 -1
  138. package/feedback-form/lib/cjs/index.js +7 -0
  139. package/feedback-form/lib/cjs/index.js.map +1 -1
  140. package/feedback-form/lib/cjs/style/checkbox-button.shadow.css +21 -0
  141. package/feedback-form/lib/cjs/style/feedback-rating.shadow.css +9 -0
  142. package/feedback-form/lib/cjs/style/slider-rating.shadow.css +34 -0
  143. package/feedback-form/lib/cjs/translations/__intergalactic-dynamic-locales.js +39 -0
  144. package/feedback-form/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -0
  145. package/feedback-form/lib/cjs/translations/de.json +7 -0
  146. package/feedback-form/lib/cjs/translations/en.json +8 -0
  147. package/feedback-form/lib/cjs/translations/es.json +7 -0
  148. package/feedback-form/lib/cjs/translations/fr.json +7 -0
  149. package/feedback-form/lib/cjs/translations/it.json +7 -0
  150. package/feedback-form/lib/cjs/translations/ja.json +7 -0
  151. package/feedback-form/lib/cjs/translations/ko.json +7 -0
  152. package/feedback-form/lib/cjs/translations/nl.json +7 -0
  153. package/feedback-form/lib/cjs/translations/pl.json +7 -0
  154. package/feedback-form/lib/cjs/translations/pt.json +7 -0
  155. package/feedback-form/lib/cjs/translations/sv.json +7 -0
  156. package/feedback-form/lib/cjs/translations/tr.json +7 -0
  157. package/feedback-form/lib/cjs/translations/vi.json +7 -0
  158. package/feedback-form/lib/cjs/translations/zh.json +7 -0
  159. package/feedback-form/lib/es6/FeedbackForm.js +28 -88
  160. package/feedback-form/lib/es6/FeedbackForm.js.map +1 -1
  161. package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js +50 -0
  162. package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js.map +1 -0
  163. package/feedback-form/lib/es6/component/feedback-item/FeedbackItem.js +56 -0
  164. package/feedback-form/lib/es6/component/feedback-item/FeedbackItem.js.map +1 -0
  165. package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js +354 -0
  166. package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -0
  167. package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.type.js +2 -0
  168. package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.type.js.map +1 -0
  169. package/feedback-form/lib/es6/component/slider-rating/SliderRating.js +165 -0
  170. package/feedback-form/lib/es6/component/slider-rating/SliderRating.js.map +1 -0
  171. package/feedback-form/lib/es6/component/submit-button/SubmitButton.js +17 -0
  172. package/feedback-form/lib/es6/component/submit-button/SubmitButton.js.map +1 -0
  173. package/feedback-form/lib/es6/index.d.js +5 -1
  174. package/feedback-form/lib/es6/index.d.js.map +1 -1
  175. package/feedback-form/lib/es6/index.js +2 -0
  176. package/feedback-form/lib/es6/index.js.map +1 -1
  177. package/feedback-form/lib/es6/style/checkbox-button.shadow.css +21 -0
  178. package/feedback-form/lib/es6/style/feedback-rating.shadow.css +9 -0
  179. package/feedback-form/lib/es6/style/slider-rating.shadow.css +34 -0
  180. package/feedback-form/lib/es6/translations/__intergalactic-dynamic-locales.js +31 -0
  181. package/feedback-form/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -0
  182. package/feedback-form/lib/es6/translations/de.json +7 -0
  183. package/feedback-form/lib/es6/translations/en.json +8 -0
  184. package/feedback-form/lib/es6/translations/es.json +7 -0
  185. package/feedback-form/lib/es6/translations/fr.json +7 -0
  186. package/feedback-form/lib/es6/translations/it.json +7 -0
  187. package/feedback-form/lib/es6/translations/ja.json +7 -0
  188. package/feedback-form/lib/es6/translations/ko.json +7 -0
  189. package/feedback-form/lib/es6/translations/nl.json +7 -0
  190. package/feedback-form/lib/es6/translations/pl.json +7 -0
  191. package/feedback-form/lib/es6/translations/pt.json +7 -0
  192. package/feedback-form/lib/es6/translations/sv.json +7 -0
  193. package/feedback-form/lib/es6/translations/tr.json +7 -0
  194. package/feedback-form/lib/es6/translations/vi.json +7 -0
  195. package/feedback-form/lib/es6/translations/zh.json +7 -0
  196. package/feedback-form/lib/types/component/checkbox-button/CheckboxButton.d.ts +4 -0
  197. package/feedback-form/lib/types/component/feedback-item/FeedbackItem.d.ts +7 -0
  198. package/feedback-form/lib/types/component/feedback-rating/FeedbackRating.d.ts +156 -0
  199. package/feedback-form/lib/types/component/feedback-rating/FeedbackRating.type.d.ts +55 -0
  200. package/feedback-form/lib/types/component/slider-rating/SliderRating.d.ts +14 -0
  201. package/feedback-form/lib/types/component/submit-button/SubmitButton.d.ts +3 -0
  202. package/feedback-form/lib/types/index.d.ts +4 -0
  203. package/feedback-form/lib/types/translations/__intergalactic-dynamic-locales.d.ts +101 -0
  204. package/feedback-form/translations/__intergalactic-dynamic-locales.d.ts +101 -0
  205. package/flex-box/lib/cjs/Box/useBox.js +3 -3
  206. package/flex-box/lib/cjs/Flex/useFlex.js +3 -3
  207. package/flex-box/lib/cjs/invalid-state-box/InvalidStateBox.js +2 -2
  208. package/flex-box/lib/es6/Box/useBox.js +3 -3
  209. package/flex-box/lib/es6/Flex/useFlex.js +3 -3
  210. package/flex-box/lib/es6/invalid-state-box/InvalidStateBox.js +2 -2
  211. package/format-text/lib/cjs/FormatText.js +5 -5
  212. package/format-text/lib/es6/FormatText.js +5 -5
  213. package/fullscreen-modal/lib/cjs/FullscreenModal.js +13 -13
  214. package/fullscreen-modal/lib/es6/FullscreenModal.js +13 -13
  215. package/grid/lib/cjs/Grid.js +114 -114
  216. package/grid/lib/es6/Grid.js +114 -114
  217. package/icon/color/Confluence/l/index.js +4 -4
  218. package/icon/color/Confluence/l/index.mjs +4 -4
  219. package/icon/color/Confluence/m/index.js +4 -4
  220. package/icon/color/Confluence/m/index.mjs +4 -4
  221. package/icon/color/MicrosoftOffice/l/index.js +10 -10
  222. package/icon/color/MicrosoftOffice/l/index.mjs +10 -10
  223. package/icon/color/MicrosoftOffice/m/index.js +10 -10
  224. package/icon/color/MicrosoftOffice/m/index.mjs +10 -10
  225. package/icon/lib/cjs/Icon.js +5 -5
  226. package/icon/lib/es6/Icon.js +5 -5
  227. package/icon/pay/Discover/l/index.js +1 -1
  228. package/icon/pay/Discover/l/index.mjs +1 -1
  229. package/icon/pay/Discover/m/index.js +1 -1
  230. package/icon/pay/Discover/m/index.mjs +1 -1
  231. package/icon/pay/JCB/l/index.js +10 -10
  232. package/icon/pay/JCB/l/index.mjs +10 -10
  233. package/icon/pay/JCB/m/index.js +10 -10
  234. package/icon/pay/JCB/m/index.mjs +10 -10
  235. package/icon/pay/Visa/l/index.js +2 -2
  236. package/icon/pay/Visa/l/index.mjs +2 -2
  237. package/icon/pay/Visa/m/index.js +2 -2
  238. package/icon/pay/Visa/m/index.mjs +2 -2
  239. package/illustration/lib/cjs/index.js +1 -1
  240. package/illustration/lib/es6/index.js +1 -1
  241. package/inline-edit/lib/cjs/InlineEdit.js +4 -4
  242. package/inline-edit/lib/es6/InlineEdit.js +4 -4
  243. package/inline-input/lib/cjs/InlineInput.js +18 -18
  244. package/inline-input/lib/es6/InlineInput.js +18 -18
  245. package/input/lib/cjs/Input.js +17 -17
  246. package/input/lib/es6/Input.js +17 -17
  247. package/input-mask/lib/cjs/InputMask.js +6 -6
  248. package/input-mask/lib/es6/InputMask.js +6 -6
  249. package/input-number/lib/cjs/InputNumber.js +10 -10
  250. package/input-number/lib/cjs/InputNumber.js.map +1 -1
  251. package/input-number/lib/es6/InputNumber.js +10 -10
  252. package/input-number/lib/es6/InputNumber.js.map +1 -1
  253. package/input-tags/lib/cjs/InputTags.js +12 -12
  254. package/input-tags/lib/es6/InputTags.js +12 -12
  255. package/link/lib/cjs/Link.js +12 -12
  256. package/link/lib/es6/Link.js +12 -12
  257. package/mini-chart/lib/cjs/component/score/Donut.js +9 -9
  258. package/mini-chart/lib/cjs/component/score/Line.js +17 -17
  259. package/mini-chart/lib/cjs/component/trend/Bar.js +7 -7
  260. package/mini-chart/lib/cjs/component/trend/Line.js +7 -7
  261. package/mini-chart/lib/es6/component/score/Donut.js +9 -9
  262. package/mini-chart/lib/es6/component/score/Line.js +17 -17
  263. package/mini-chart/lib/es6/component/trend/Bar.js +7 -7
  264. package/mini-chart/lib/es6/component/trend/Line.js +7 -7
  265. package/modal/lib/cjs/Modal.js +9 -9
  266. package/modal/lib/es6/Modal.js +9 -9
  267. package/notice/lib/cjs/Notice.js +13 -13
  268. package/notice/lib/es6/Notice.js +13 -13
  269. package/notice-bubble/lib/cjs/NoticeBubble.js +12 -12
  270. package/notice-bubble/lib/es6/NoticeBubble.js +12 -12
  271. package/notice-global/lib/cjs/NoticeGlobal.js +11 -11
  272. package/notice-global/lib/es6/NoticeGlobal.js +11 -11
  273. package/package.json +2 -2
  274. package/pagination/lib/cjs/Pagination.js +10 -10
  275. package/pagination/lib/es6/Pagination.js +10 -10
  276. package/pills/lib/cjs/Pills.js +13 -13
  277. package/pills/lib/es6/Pills.js +13 -13
  278. package/popper/lib/cjs/Popper.js +6 -6
  279. package/popper/lib/es6/Popper.js +6 -6
  280. package/product-head/lib/cjs/Info.js +4 -4
  281. package/product-head/lib/cjs/ProductHead.js +5 -5
  282. package/product-head/lib/cjs/Title.js +4 -4
  283. package/product-head/lib/es6/Info.js +4 -4
  284. package/product-head/lib/es6/ProductHead.js +5 -5
  285. package/product-head/lib/es6/Title.js +4 -4
  286. package/progress-bar/lib/cjs/ProgressBar.js +15 -15
  287. package/progress-bar/lib/es6/ProgressBar.js +15 -15
  288. package/radio/lib/cjs/Radio.js +16 -16
  289. package/radio/lib/es6/Radio.js +16 -16
  290. package/scroll-area/lib/cjs/ScrollArea.js +21 -21
  291. package/scroll-area/lib/cjs/ScrollBar.js +6 -6
  292. package/scroll-area/lib/es6/ScrollArea.js +21 -21
  293. package/scroll-area/lib/es6/ScrollBar.js +6 -6
  294. package/select/lib/cjs/InputSearch.js +6 -6
  295. package/select/lib/cjs/Select.js +8 -8
  296. package/select/lib/es6/InputSearch.js +6 -6
  297. package/select/lib/es6/Select.js +8 -8
  298. package/side-panel/lib/cjs/SidePanel.js +15 -15
  299. package/side-panel/lib/es6/SidePanel.js +15 -15
  300. package/skeleton/lib/cjs/Charts/Area.js +9 -9
  301. package/skeleton/lib/cjs/Charts/Bar.js +9 -9
  302. package/skeleton/lib/cjs/Charts/Bubble.js +9 -9
  303. package/skeleton/lib/cjs/Charts/Donut.js +9 -9
  304. package/skeleton/lib/cjs/Charts/Histogram.js +9 -9
  305. package/skeleton/lib/cjs/Charts/Line.js +9 -9
  306. package/skeleton/lib/cjs/Charts/RadialTree.js +9 -9
  307. package/skeleton/lib/cjs/Charts/ScatterPlot.js +9 -9
  308. package/skeleton/lib/cjs/Charts/Venn.js +9 -9
  309. package/skeleton/lib/cjs/Skeleton.js +8 -8
  310. package/skeleton/lib/es6/Charts/Area.js +9 -9
  311. package/skeleton/lib/es6/Charts/Bar.js +9 -9
  312. package/skeleton/lib/es6/Charts/Bubble.js +9 -9
  313. package/skeleton/lib/es6/Charts/Donut.js +9 -9
  314. package/skeleton/lib/es6/Charts/Histogram.js +9 -9
  315. package/skeleton/lib/es6/Charts/Line.js +9 -9
  316. package/skeleton/lib/es6/Charts/RadialTree.js +9 -9
  317. package/skeleton/lib/es6/Charts/ScatterPlot.js +9 -9
  318. package/skeleton/lib/es6/Charts/Venn.js +9 -9
  319. package/skeleton/lib/es6/Skeleton.js +8 -8
  320. package/slider/lib/cjs/Slider.js +8 -8
  321. package/slider/lib/es6/Slider.js +8 -8
  322. package/spin/lib/cjs/Spin.js +13 -13
  323. package/spin/lib/es6/Spin.js +13 -13
  324. package/spin-container/lib/cjs/SpinContainer.js +8 -8
  325. package/spin-container/lib/es6/SpinContainer.js +8 -8
  326. package/sticky/lib/cjs/Sticky.js +2 -2
  327. package/sticky/lib/es6/Sticky.js +2 -2
  328. package/switch/lib/cjs/Switch.js +21 -21
  329. package/switch/lib/es6/Switch.js +21 -21
  330. package/tab-line/lib/cjs/TabLine.js +13 -13
  331. package/tab-line/lib/es6/TabLine.js +13 -13
  332. package/tab-panel/lib/cjs/TabPanel.js +8 -8
  333. package/tab-panel/lib/es6/TabPanel.js +8 -8
  334. package/tag/lib/cjs/Tag.js +20 -20
  335. package/tag/lib/es6/Tag.js +20 -20
  336. package/textarea/lib/cjs/Textarea.js +8 -8
  337. package/textarea/lib/es6/Textarea.js +8 -8
  338. package/time-picker/lib/cjs/TimePicker.js +12 -12
  339. package/time-picker/lib/es6/TimePicker.js +12 -12
  340. package/tooltip/lib/cjs/Tooltip.js +9 -9
  341. package/tooltip/lib/es6/Tooltip.js +9 -9
  342. package/typography/lib/cjs/Blockquote.js +4 -4
  343. package/typography/lib/cjs/Hint.js +7 -7
  344. package/typography/lib/cjs/List.js +5 -5
  345. package/typography/lib/cjs/Text.js +34 -34
  346. package/typography/lib/es6/Blockquote.js +4 -4
  347. package/typography/lib/es6/Hint.js +7 -7
  348. package/typography/lib/es6/List.js +5 -5
  349. package/typography/lib/es6/Text.js +34 -34
  350. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.js +2 -2
  351. package/utils/lib/components/invalid-state-pattern/InvalidStatePattern.mjs +2 -2
  352. package/utils/lib/injectStyle.js +1 -1
  353. package/utils/lib/injectStyle.mjs +1 -1
  354. package/utils/lib/themes/auto.css +4 -0
  355. package/utils/lib/themes/default.css +4 -0
  356. package/utils/lib/themes/default.json +2 -0
  357. package/utils/lib/themes/light.css +4 -0
  358. package/utils/lib/themes/light.json +2 -0
  359. package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
  360. package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
  361. package/wizard/lib/cjs/Wizard.js +11 -11
  362. package/wizard/lib/es6/Wizard.js +11 -11
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.SubmitButton = SubmitButton;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
+ var _core = require("intergalactic/core");
10
+ var _button = _interopRequireDefault(require("intergalactic/button"));
11
+ var _react = _interopRequireDefault(require("react"));
12
+ function SubmitButton(props) {
13
+ var _ref = arguments[0],
14
+ _ref2;
15
+ var styles = props.styles;
16
+ var SSubmit = _button["default"];
17
+ return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SSubmit, _ref2.cn("SSubmit", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
18
+ "type": 'submit',
19
+ "use": 'primary',
20
+ "theme": 'success'
21
+ }, _ref))));
22
+ }
23
+ //# sourceMappingURL=SubmitButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubmitButton.js","names":["_core","require","_button","_interopRequireDefault","_react","SubmitButton","props","_ref","arguments[0]","_ref2","styles","SSubmit","Button","sstyled","createElement","cn","_objectSpread2","assignProps"],"sources":["../../../../src/component/submit-button/SubmitButton.tsx"],"sourcesContent":["import Button from '@semcore/button';\nimport React from 'react';\nimport { Root, sstyled, IRootComponentProps } from '@semcore/core';\n\nexport function SubmitButton(props: IRootComponentProps) {\n const { styles } = props;\n const SSubmit = Root;\n return sstyled(styles)(<SSubmit render={Button} type='submit' use='primary' theme='success' />);\n}\n"],"mappings":";;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AAGO,SAASI,YAAYA,CAACC,KAA0B,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACvD,IAAQC,MAAM,GAAKJ,KAAK,CAAhBI,MAAM;EACd,IAAMC,OAAO,GAC2BC,kBAAM;EAA9C,OAAAH,KAAA,GAAO,IAAAI,aAAO,EAACH,MAAM,CAAC,eAACN,MAAA,YAAAU,aAAA,CAACH,OAAO,EAAAF,KAAA,CAAAM,EAAA,gBAAAC,cAAA,qBAAAhB,KAAA,CAAAiB,WAAA;IAAA,QAAsB,QAAQ;IAAA,OAAK,SAAS;IAAA,SAAO;EAAS,GAAAV,IAAA,IAAG;AAChG"}
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "FeedbackRating", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _FeedbackRating["default"];
11
+ }
12
+ });
13
+ var _FeedbackRating = _interopRequireDefault(require("./component/feedback-rating/FeedbackRating"));
2
14
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { FormProps, FieldProps } from 'react-final-form';\n\nimport { Intergalactic } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { NoticeSmart } from '@semcore/notice';\nimport { Box } from '@semcore/flex-box';\n\n/** @deprecated */\nexport type IFeedbackForm = FeedbackFormProps;\nexport type FeedbackFormProps = FormProps & {\n /* The event is called when the form is submitted */\n onSubmit: (values: any, form: any, callback?: (errors?: {}) => void) => {} | Promise<{}> | void;\n /**\n * The property is in charge of the spinner showing\n * */\n loading?: boolean;\n /**\n * Color of container spinner; you can use your own color\n */\n background?: string;\n /** Spinner theme. There are several default themes or you can use your own color\n * @default dark\n **/\n theme?: 'dark' | 'invert' | string;\n};\n\ndeclare const FeedbackForm: Intergalactic.Component<'form', FeedbackFormProps> & {\n Item: Intergalactic.Component<'div', FieldProps<any, any>>;\n Success: typeof Box;\n Submit: typeof Button;\n Cancel: typeof Button;\n Notice: typeof NoticeSmart;\n};\n\nexport default FeedbackForm;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":["_FeedbackRating","_interopRequireDefault","require"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { FormProps, FieldProps } from 'react-final-form';\n\nimport { Intergalactic } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { NoticeSmart } from '@semcore/notice';\nimport { Box } from '@semcore/flex-box';\n\nimport { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';\n\n/** @deprecated */\nexport type IFeedbackForm = FeedbackFormProps;\nexport type FeedbackFormProps = FormProps & {\n /* The event is called when the form is submitted */\n onSubmit: (values: any, form: any, callback?: (errors?: {}) => void) => {} | Promise<{}> | void;\n /**\n * The property is in charge of the spinner showing\n * */\n loading?: boolean;\n /**\n * Color of container spinner; you can use your own color\n */\n background?: string;\n /** Spinner theme. There are several default themes or you can use your own color\n * @default dark\n **/\n theme?: 'dark' | 'invert' | string;\n};\n\ndeclare const FeedbackForm: Intergalactic.Component<'form', FeedbackFormProps> & {\n Item: Intergalactic.Component<'div', FieldProps<any, any>>;\n Success: typeof Box;\n Submit: typeof Button;\n Cancel: typeof Button;\n Notice: typeof NoticeSmart;\n};\n\nexport default FeedbackForm;\n\nexport { FeedbackRating };\n"],"mappings":";;;;;;;;;;;;AAOA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA"}
@@ -4,11 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ Object.defineProperty(exports, "FeedbackRating", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _FeedbackRating["default"];
11
+ }
12
+ });
7
13
  Object.defineProperty(exports, "default", {
8
14
  enumerable: true,
9
15
  get: function get() {
10
16
  return _FeedbackForm["default"];
11
17
  }
12
18
  });
19
+ var _FeedbackRating = _interopRequireDefault(require("./component/feedback-rating/FeedbackRating"));
13
20
  var _FeedbackForm = _interopRequireDefault(require("./FeedbackForm"));
14
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_FeedbackForm","_interopRequireDefault","require"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './FeedbackForm';\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA"}
1
+ {"version":3,"file":"index.js","names":["_FeedbackRating","_interopRequireDefault","require","_FeedbackForm"],"sources":["../../src/index.js"],"sourcesContent":["import { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';\n\nexport { default } from './FeedbackForm';\n\nexport { FeedbackRating };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA"}
@@ -0,0 +1,21 @@
1
+ SCheckboxButton {
2
+ margin-top: var(--intergalactic-spacing-2x, 8px);
3
+ border: 1px solid var(--intergalactic-border-primary, #c4c7cf);
4
+ border-radius: var(--intergalactic-rounded-medium, 6px);
5
+
6
+ label {
7
+ width: 100%;
8
+ padding: var(--intergalactic-spacing-3x, 12px);
9
+ box-sizing: border-box;
10
+ }
11
+ }
12
+
13
+ SCheckboxButton:hover, SCheckboxButton[checked] {
14
+ cursor: pointer;
15
+ border-color: var(--intergalactic-border-info-active, #006dca);
16
+ background-color: rgba(0, 143, 248, 0.10);
17
+ }
18
+
19
+ SCheckboxButton[checked]:hover {
20
+ background-color: rgba(0, 143, 248, 0.20);
21
+ }
@@ -0,0 +1,9 @@
1
+ SFeedbackRating {
2
+ ul {
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+ ul, li {
7
+ list-style: none;
8
+ }
9
+ }
@@ -0,0 +1,34 @@
1
+ SSliderRating SStar {
2
+ transition: all calc(var(--intergalactic-duration-control, 200) * 1ms) ease-out;
3
+ }
4
+
5
+ SSliderRating SStar:hover {
6
+ cursor: pointer;
7
+ transform: scale(1.3);
8
+ }
9
+
10
+ SSliderRating[keyboardFocused] {
11
+ outline: none;
12
+ box-shadow: var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));
13
+ }
14
+
15
+ SSliderRating[readonly] SStar:hover {
16
+ cursor: default;
17
+ transform: none;
18
+ transition: none;
19
+ }
20
+
21
+ SStar[filled]:active {
22
+ animation: wobble 0.8s ease-in-out;
23
+ }
24
+
25
+ SStar path {
26
+ fill: transparent;
27
+ stroke: var(--intergalactic-slider-rating-normal, #a9abb6);
28
+ stroke-width: 2;
29
+ }
30
+
31
+ SStar[filled] path {
32
+ stroke-width: 0;
33
+ fill: var(--intergalactic-slider-rating-hover-active, #fdc23c);
34
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.localizedMessages = void 0;
8
+ var _de = _interopRequireDefault(require("./de.json"));
9
+ var _en = _interopRequireDefault(require("./en.json"));
10
+ var _es = _interopRequireDefault(require("./es.json"));
11
+ var _fr = _interopRequireDefault(require("./fr.json"));
12
+ var _it = _interopRequireDefault(require("./it.json"));
13
+ var _ja = _interopRequireDefault(require("./ja.json"));
14
+ var _ko = _interopRequireDefault(require("./ko.json"));
15
+ var _nl = _interopRequireDefault(require("./nl.json"));
16
+ var _pt = _interopRequireDefault(require("./pt.json"));
17
+ var _tr = _interopRequireDefault(require("./tr.json"));
18
+ var _vi = _interopRequireDefault(require("./vi.json"));
19
+ var _zh = _interopRequireDefault(require("./zh.json"));
20
+ var _pl = _interopRequireDefault(require("./pl.json"));
21
+ var _sv = _interopRequireDefault(require("./sv.json"));
22
+ var localizedMessages = {
23
+ de: _de["default"],
24
+ en: _en["default"],
25
+ es: _es["default"],
26
+ fr: _fr["default"],
27
+ it: _it["default"],
28
+ ja: _ja["default"],
29
+ ko: _ko["default"],
30
+ nl: _nl["default"],
31
+ pt: _pt["default"],
32
+ tr: _tr["default"],
33
+ vi: _vi["default"],
34
+ zh: _zh["default"],
35
+ pl: _pl["default"],
36
+ sv: _sv["default"]
37
+ };
38
+ exports.localizedMessages = localizedMessages;
39
+ //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["_de","_interopRequireDefault","require","_en","_es","_fr","_it","_ja","_ko","_nl","_pt","_tr","_vi","_zh","_pl","_sv","localizedMessages","de","en","es","fr","it","ja","ko","nl","pt","tr","vi","zh","pl","sv","exports"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pt from './pt.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\nimport pl from './pl.json';\nimport sv from './sv.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,GAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,GAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,GAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,GAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,GAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,GAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,GAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,GAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,GAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,GAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,GAAA,GAAAd,sBAAA,CAAAC,OAAA;AAEO,IAAMc,iBAAiB,GAAG;EAC/BC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA,cAAE;EACFC,EAAE,EAAFA;AACF,CAAC;AAACC,OAAA,CAAAf,iBAAA,GAAAA,iBAAA"}
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Mehr erfahren",
3
+ "formTitle": "Feedback-Formular",
4
+ "submitButton": "Feedback senden",
5
+ "successMessage": "Vielen Dank für Ihr Feedback!",
6
+ "errorMessage": "Es ist ein Fehler aufgetreten. Versuchen Sie es erneut oder kontaktieren Sie uns unter E-mail."
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "leaveFeedback": "Leave feedback",
3
+ "learnMore": "Learn more",
4
+ "formTitle": "Feedback form",
5
+ "submitButton": "Send feedback",
6
+ "successMessage": "Thank you for your feedback!",
7
+ "errorMessage": "Something went wrong. Please try again or contact us at {email}."
8
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Leer más",
3
+ "formTitle": "Formulario de comentarios",
4
+ "submitButton": "Enviar comentarios",
5
+ "successMessage": "¡Gracias por tu opinión!",
6
+ "errorMessage": "Algo salió mal. Intenta de nuevo o contáctanos en email."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "En savoir plus",
3
+ "formTitle": "Formulaire de commentaires",
4
+ "submitButton": "Envoyer des commentaires",
5
+ "successMessage": "Merci pour vos commentaires !",
6
+ "errorMessage": "Une erreur est survenue. Veuillez réessayer ou nous contacter par e-mail."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Scopri di più",
3
+ "formTitle": "Modulo di feedback",
4
+ "submitButton": "Invia feedback",
5
+ "successMessage": "Grazie per il tuo feedback!",
6
+ "errorMessage": "Si è verificato un errore. Prova di nuovo o contattaci via e-mail."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Learn more",
3
+ "formTitle": "Feedback form",
4
+ "submitButton": "フィードバックを送信",
5
+ "successMessage": "Thank you for your feedback!",
6
+ "errorMessage": "Something went wrong. Please try again or contact us at email."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Learn more",
3
+ "formTitle": "Feedback form",
4
+ "submitButton": "피드백 보내기",
5
+ "successMessage": "Thank you for your feedback!",
6
+ "errorMessage": "Something went wrong. Please try again or contact us at email."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Lees meer",
3
+ "formTitle": "Feedback formulier",
4
+ "submitButton": "Feedback sturen",
5
+ "successMessage": "Bedankt voor je feedback!",
6
+ "errorMessage": "Er is iets fout gegaan. Probeer het opnieuw of neem contact met ons op via e-mail."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Dowiedz się więcej",
3
+ "formTitle": "Formularz opinii",
4
+ "submitButton": "Wyślij opinię",
5
+ "successMessage": "Dziękujemy za opinię!",
6
+ "errorMessage": "Coś poszło nie tak. Spróbuj ponownie lub skontaktuj się z nami pod adresem e-mail."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Saiba mais",
3
+ "formTitle": "Formulário de comentários",
4
+ "submitButton": "Enviar comentário",
5
+ "successMessage": "Agradecemos pelos comentários!",
6
+ "errorMessage": "Algo deu errado. Tente novamente ou entre em contato conosco pelo e-mail."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Läs mer",
3
+ "formTitle": "Feedbackformulär",
4
+ "submitButton": "Skicka feedback",
5
+ "successMessage": "Tack för din feedback!",
6
+ "errorMessage": "Något gick fel. Försök igen eller kontakta oss via e-post."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Learn more",
3
+ "formTitle": "Feedback form",
4
+ "submitButton": "Geri bildirim gönder",
5
+ "successMessage": "Thank you for your feedback!",
6
+ "errorMessage": "Something went wrong. Please try again or contact us at email."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "Tìm hiểu thêm",
3
+ "formTitle": "Biểu mẫu Phản hồi",
4
+ "submitButton": "Gửi góp ý",
5
+ "successMessage": "Cảm ơn góp ý của bạn!",
6
+ "errorMessage": "Đã xảy ra sự cố. Hãy thử lại hoặc liên hệ với chúng tôi qua email."
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "learnMore": "了解更多",
3
+ "formTitle": "Feedback form",
4
+ "submitButton": "发送反馈",
5
+ "successMessage": "感谢您的反馈!",
6
+ "errorMessage": "Something went wrong. Please try again or contact us at email."
7
+ }
@@ -8,33 +8,28 @@ import _inherits from "@babel/runtime/helpers/inherits";
8
8
  import _createSuper from "@babel/runtime/helpers/createSuper";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  import { sstyled as _sstyled } from 'intergalactic/utils/lib/core/index';
11
- import { assignProps as _assignProps5 } from 'intergalactic/core';
12
- import { assignProps as _assignProps4 } from 'intergalactic/core';
13
11
  import { assignProps as _assignProps3 } from 'intergalactic/core';
14
12
  import { assignProps as _assignProps2 } from 'intergalactic/core';
15
13
  import { assignProps as _assignProps } from 'intergalactic/core';
16
- var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"],
17
- _excluded2 = ["Children", "tag", "uid"],
18
- _excluded3 = ["input", "meta"];
14
+ var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"];
19
15
  import React from 'react';
20
16
  import { Field, Form } from 'react-final-form';
21
17
  import createFocusDecorator from 'final-form-focus';
22
18
  import createComponent, { Component, sstyled, Root } from 'intergalactic/core';
23
19
  import Button from 'intergalactic/button';
24
20
  import SpinContainer from 'intergalactic/spin-container';
25
- import Tooltip from 'intergalactic/tooltip';
26
21
  import { NoticeSmart } from 'intergalactic/notice';
27
22
  import { Box } from 'intergalactic/flex-box';
28
- import pick from 'intergalactic/utils/lib/pick';
29
- import uniqueIDEnhancement from 'intergalactic/utils/lib/uniqueID';
23
+ import { FeedbackItem } from './component/feedback-item/FeedbackItem';
24
+ import { SubmitButton } from './component/submit-button/SubmitButton';
30
25
  /*__reshadow-styles__:"./style/feedback-form.shadow.css"*/
31
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SFeedbackForm_1wfx7_gg_{max-width:320px}.___SCancel_1wfx7_gg_,.___SSubmit_1wfx7_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_1wfx7_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);border-width:1px 0 0;border-top-style:solid;border-radius:0 0 var(--intergalactic-surface-rounded, 6px) var(--intergalactic-surface-rounded, 6px)}.___SSuccess_1wfx7_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box}.___SEmail_1wfx7_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));width:80px;height:80px;background-image:url(\"data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345E0A8'/%3E%3Cpath d='M29 45.2852L29.2 45.6352C35.39 42.1852 53.39 31.9652 56.73 35.1052C55.6 32.0052 39.7 35.4352 29 45.2852Z' fill='white'/%3E%3Cpath d='M28.44 31.6343C26.63 37.6343 19.23 56.1043 15 61.9443L18 62.8543L19.58 61.5343C23.8 51.9843 29.58 35.5343 29.89 30.0743C29.39 29.8143 28.93 30.2143 28.44 31.6343Z' fill='white'/%3E%3Cpath d='M15 62.0078C19.23 56.1678 26.63 37.7378 28.44 31.6678C30.25 25.5978 33.49 37.6678 31.67 42.7878' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 45.9424C38.68 35.5824 55.27 31.9424 56.43 35.1024C57.12 36.9924 43 41.3624 38.02 47.4224' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44.45 21.93C41.21 20.77 35.86 19.04 33 18.24C37.12 16.41 70 4.24 72.67 3C71.75 7.11 67.75 21.28 65.96 27.93C61.13 26.25 56.23 24.78 53.03 23.74C51.0298 26.3907 49.2219 29.1812 47.62 32.09C46.44 28.23 45.29 23.77 44.45 21.93Z' fill='white' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M45 22.08L61.74 11' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M53 23.73L72.64 3' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48 32.58L55.86 25' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.23 30.77L51.69 25.13L52.66 24L54.73 24.61L55.16 24.48L51.8 27.91L49.33 30.18L48 31.29L48.23 30.77Z' fill='black'/%3E%3Cpath d='M33.81 22L23 27.12' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M40.89 23L34 27.37' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M62.04 29L58 38.85' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M46.68 41C50.29 43.42 44.81 49.52 43 51.12' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47.17 44C51.31 46.09 48.33 51.76 46 54.6' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.86 49C54.37 53.48 36.31 72.72 35 73.78' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cmask id='mask0_11950_117175' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='4' y='6' width='73' height='73'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345DFA7'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_11950_117175)'%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' fill='black'/%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A\")}" /*__inner_css_end__*/, "1wfx7_gg_") /*__reshadow_css_end__*/, {
32
- "__SFeedbackForm": "___SFeedbackForm_1wfx7_gg_",
33
- "__SSubmit": "___SSubmit_1wfx7_gg_",
34
- "__SCancel": "___SCancel_1wfx7_gg_",
35
- "__SNotice": "___SNotice_1wfx7_gg_",
36
- "__SSuccess": "___SSuccess_1wfx7_gg_",
37
- "__SEmail": "___SEmail_1wfx7_gg_"
26
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SFeedbackForm_1srei_gg_{max-width:320px}.___SCancel_1srei_gg_,.___SSubmit_1srei_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_1srei_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-4x, 16px);border-width:1px 0 0;border-top-style:solid;border-radius:0 0 var(--intergalactic-surface-rounded, 6px) var(--intergalactic-surface-rounded, 6px)}.___SSuccess_1srei_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box}.___SEmail_1srei_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));width:80px;height:80px;background-image:url(\"data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345E0A8'/%3E%3Cpath d='M29 45.2852L29.2 45.6352C35.39 42.1852 53.39 31.9652 56.73 35.1052C55.6 32.0052 39.7 35.4352 29 45.2852Z' fill='white'/%3E%3Cpath d='M28.44 31.6343C26.63 37.6343 19.23 56.1043 15 61.9443L18 62.8543L19.58 61.5343C23.8 51.9843 29.58 35.5343 29.89 30.0743C29.39 29.8143 28.93 30.2143 28.44 31.6343Z' fill='white'/%3E%3Cpath d='M15 62.0078C19.23 56.1678 26.63 37.7378 28.44 31.6678C30.25 25.5978 33.49 37.6678 31.67 42.7878' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 45.9424C38.68 35.5824 55.27 31.9424 56.43 35.1024C57.12 36.9924 43 41.3624 38.02 47.4224' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44.45 21.93C41.21 20.77 35.86 19.04 33 18.24C37.12 16.41 70 4.24 72.67 3C71.75 7.11 67.75 21.28 65.96 27.93C61.13 26.25 56.23 24.78 53.03 23.74C51.0298 26.3907 49.2219 29.1812 47.62 32.09C46.44 28.23 45.29 23.77 44.45 21.93Z' fill='white' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M45 22.08L61.74 11' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M53 23.73L72.64 3' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48 32.58L55.86 25' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.23 30.77L51.69 25.13L52.66 24L54.73 24.61L55.16 24.48L51.8 27.91L49.33 30.18L48 31.29L48.23 30.77Z' fill='black'/%3E%3Cpath d='M33.81 22L23 27.12' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M40.89 23L34 27.37' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M62.04 29L58 38.85' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M46.68 41C50.29 43.42 44.81 49.52 43 51.12' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47.17 44C51.31 46.09 48.33 51.76 46 54.6' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.86 49C54.37 53.48 36.31 72.72 35 73.78' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cmask id='mask0_11950_117175' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='4' y='6' width='73' height='73'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345DFA7'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_11950_117175)'%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' fill='black'/%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A\")}" /*__inner_css_end__*/, "1srei_gg_") /*__reshadow_css_end__*/, {
27
+ "__SFeedbackForm": "___SFeedbackForm_1srei_gg_",
28
+ "__SSubmit": "___SSubmit_1srei_gg_",
29
+ "__SCancel": "___SCancel_1srei_gg_",
30
+ "__SNotice": "___SNotice_1srei_gg_",
31
+ "__SSuccess": "___SSuccess_1srei_gg_",
32
+ "__SEmail": "___SEmail_1srei_gg_"
38
33
  });
39
34
  var FeedbackForm = /*#__PURE__*/function (_Component) {
40
35
  _inherits(FeedbackForm, _Component);
@@ -72,13 +67,13 @@ var FeedbackForm = /*#__PURE__*/function (_Component) {
72
67
  return /*#__PURE__*/React.createElement(Form, _extends({
73
68
  decorators: [this.focusDecorator]
74
69
  }, other), function (api) {
75
- var _ref6;
76
- return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SpinContainer, _ref6.cn("SpinContainer", {
70
+ var _ref4;
71
+ return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(SpinContainer, _ref4.cn("SpinContainer", {
77
72
  "background": background,
78
73
  "theme": theme,
79
74
  "size": 'xl',
80
75
  "loading": loading === undefined ? api.submitting : loading
81
- }), /*#__PURE__*/React.createElement(SFeedbackForm, _ref6.cn("SFeedbackForm", _objectSpread(_objectSpread({
76
+ }), /*#__PURE__*/React.createElement(SFeedbackForm, _ref4.cn("SFeedbackForm", _objectSpread(_objectSpread({
82
77
  "tag": 'form',
83
78
  "noValidate": true,
84
79
  "method": 'POST',
@@ -86,7 +81,7 @@ var FeedbackForm = /*#__PURE__*/function (_Component) {
86
81
  }, other), {}, {
87
82
  "onSubmit": api.handleSubmit,
88
83
  "title": 'This is feedback'
89
- })), typeof Children.origin === 'function' ? Children.origin(api) : /*#__PURE__*/React.createElement(Children, _ref6.cn("Children", {}))));
84
+ })), typeof Children.origin === 'function' ? Children.origin(api) : /*#__PURE__*/React.createElement(Children, _ref4.cn("Children", {}))));
90
85
  });
91
86
  }
92
87
  }]);
@@ -121,103 +116,48 @@ _defineProperty(FeedbackForm, "validate", {
121
116
  };
122
117
  }
123
118
  });
124
- var TooltipProps = ['title', 'theme', 'strategy', 'modifiers', 'placement', 'interaction', 'timeout', 'visible', 'defaultVisible', 'onVisibleChange', 'offset', 'preventOverflow', 'arrow', 'flip', 'computeStyles', 'eventListeners', 'onFirstUpdate'];
125
- function Item(_ref11) {
126
- var _ref = arguments[0];
127
- var Children = _ref11.Children,
128
- tag = _ref11.tag,
129
- uid = _ref11.uid,
130
- props = _objectWithoutProperties(_ref11, _excluded2);
131
- var tooltipProps = pick(props, TooltipProps);
132
- var ItemRoot = tag;
133
- var lastErrorRef = React.useRef(undefined);
134
- return /*#__PURE__*/React.createElement(Field, props, function (_ref12) {
135
- var _meta$error;
136
- var input = _ref12.input,
137
- meta = _ref12.meta,
138
- other = _objectWithoutProperties(_ref12, _excluded3);
139
- var showError = other.validateOnBlur === false ? meta.submitFailed : true;
140
- var invalid = meta.invalid && meta.touched;
141
- var errorState = showError && invalid;
142
- var inputProps = _objectSpread(_objectSpread({}, input), {}, {
143
- state: errorState ? 'invalid' : 'normal',
144
- 'aria-invalid': errorState ? true : false,
145
- 'aria-errormessage': uid
146
- });
147
- if (meta !== null && meta !== void 0 && meta.error) lastErrorRef.current = meta.error;
148
- return /*#__PURE__*/React.createElement(Tooltip, _extends({
149
- visible: errorState && meta.active,
150
- theme: "warning",
151
- placement: "left",
152
- flip: {
153
- fallbackPlacements: ['right', 'bottom']
154
- }
155
- }, tooltipProps), /*#__PURE__*/React.createElement(Tooltip.Trigger, {
156
- inline: false,
157
- role: undefined
158
- }, tag && /*#__PURE__*/React.createElement(ItemRoot, _assignProps(_objectSpread({}, inputProps), _ref)), typeof Children.origin === 'function' && Children.origin(_objectSpread({
159
- input: inputProps,
160
- meta: meta
161
- }, other))), /*#__PURE__*/React.createElement(Tooltip.Popper, {
162
- id: uid,
163
- ignorePortalsStacking: true
164
- }, (_meta$error = meta.error) !== null && _meta$error !== void 0 ? _meta$error : lastErrorRef.current));
165
- });
166
- }
167
- Item.enhance = [uniqueIDEnhancement()];
168
119
  function Success(props) {
169
- var _ref2 = arguments[0],
170
- _ref7;
120
+ var _ref = arguments[0],
121
+ _ref5;
171
122
  var Children = props.Children,
172
123
  styles = props.styles;
173
124
  var SSuccess = Box;
174
125
  var SEmail = 'div';
175
- return _ref7 = sstyled(styles), /*#__PURE__*/React.createElement(SSuccess, _ref7.cn("SSuccess", _objectSpread({}, _assignProps2({}, _ref2))), /*#__PURE__*/React.createElement(SEmail, _ref7.cn("SEmail", {
126
+ return _ref5 = sstyled(styles), /*#__PURE__*/React.createElement(SSuccess, _ref5.cn("SSuccess", _objectSpread({}, _assignProps({}, _ref))), /*#__PURE__*/React.createElement(SEmail, _ref5.cn("SEmail", {
176
127
  "aria-hidden": true
177
- })), /*#__PURE__*/React.createElement("span", _ref7.cn("span", {}), /*#__PURE__*/React.createElement(Children, _ref7.cn("Children", {}))));
128
+ })), /*#__PURE__*/React.createElement("span", _ref5.cn("span", {}), /*#__PURE__*/React.createElement(Children, _ref5.cn("Children", {}))));
178
129
  }
179
130
  // because it is used without a wrapper
180
131
  Success.style = style;
181
- function Submit(props) {
182
- var _ref3 = arguments[0],
183
- _ref8;
184
- var styles = props.styles;
185
- var SSubmit = Button;
186
- return _ref8 = sstyled(styles), /*#__PURE__*/React.createElement(SSubmit, _ref8.cn("SSubmit", _objectSpread({}, _assignProps3({
187
- "type": 'submit',
188
- "use": 'primary',
189
- "theme": 'success'
190
- }, _ref3))));
191
- }
192
132
  function Cancel(props) {
193
- var _ref4 = arguments[0],
194
- _ref9;
133
+ var _ref2 = arguments[0],
134
+ _ref6;
195
135
  var styles = props.styles;
196
136
  var SCancel = Button;
197
- return _ref9 = sstyled(styles), /*#__PURE__*/React.createElement(SCancel, _ref9.cn("SCancel", _objectSpread({}, _assignProps4({
137
+ return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SCancel, _ref6.cn("SCancel", _objectSpread({}, _assignProps2({
198
138
  "type": 'reset',
199
139
  "use": 'secondary',
200
140
  "theme": 'muted'
201
- }, _ref4))));
141
+ }, _ref2))));
202
142
  }
203
143
  function Notice(props) {
204
- var _ref5 = arguments[0],
205
- _ref10;
144
+ var _ref3 = arguments[0],
145
+ _ref7;
206
146
  var styles = props.styles,
207
147
  _props$theme = props.theme,
208
148
  theme = _props$theme === void 0 ? 'bg-secondary-neutral' : _props$theme,
209
149
  _props$use = props.use,
210
150
  use = _props$use === void 0 ? 'secondary' : _props$use;
211
151
  var SNotice = NoticeSmart;
212
- return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SNotice, _ref10.cn("SNotice", _objectSpread({}, _assignProps5({
152
+ return _ref7 = sstyled(styles), /*#__PURE__*/React.createElement(SNotice, _ref7.cn("SNotice", _objectSpread({}, _assignProps3({
213
153
  "theme": theme,
214
154
  "use": use
215
- }, _ref5))));
155
+ }, _ref3))));
216
156
  }
217
157
  export default createComponent(FeedbackForm, {
218
- Item: Item,
158
+ Item: FeedbackItem,
219
159
  Success: Success,
220
- Submit: Submit,
160
+ Submit: SubmitButton,
221
161
  Cancel: Cancel,
222
162
  Notice: Notice
223
163
  });
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackForm.js","names":["React","Field","Form","createFocusDecorator","createComponent","Component","sstyled","Root","Button","SpinContainer","Tooltip","NoticeSmart","Box","pick","uniqueIDEnhancement","style","_sstyled","insert","FeedbackForm","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","value","getItemProps","validateOnBlur","asProps","render","SFeedbackForm","_this$asProps","Children","styles","forwardRef","loading","background","theme","other","_objectWithoutProperties","_excluded","createElement","_extends","decorators","focusDecorator","api","_ref6","cn","undefined","submitting","_objectSpread","handleSubmit","origin","onSubmit","description","error","words","split","symbols","join","email","test","String","toLowerCase","TooltipProps","Item","_ref11","_ref","arguments[0]","tag","uid","props","_excluded2","tooltipProps","ItemRoot","lastErrorRef","useRef","_ref12","_meta$error","input","meta","_excluded3","showError","submitFailed","invalid","touched","errorState","inputProps","state","current","visible","active","placement","flip","fallbackPlacements","Trigger","inline","role","_assignProps","Popper","id","ignorePortalsStacking","enhance","Success","_ref2","_ref7","SSuccess","SEmail","_assignProps2","Submit","_ref3","_ref8","SSubmit","_assignProps3","Cancel","_ref4","_ref9","SCancel","_assignProps4","Notice","_ref5","_ref10","_props$theme","_props$use","use","SNotice","_assignProps5"],"sources":["../../src/FeedbackForm.jsx"],"sourcesContent":["import React from 'react';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\n\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Button from '@semcore/button';\nimport SpinContainer from '@semcore/spin-container';\nimport Tooltip from '@semcore/tooltip';\nimport { NoticeSmart } from '@semcore/notice';\nimport { Box } from '@semcore/flex-box';\nimport pick from '@semcore/utils/lib/pick';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\n\nimport style from './style/feedback-form.shadow.css';\n\nclass FeedbackForm extends Component {\n static displayName = 'FeedbackForm';\n static style = style;\n static FinalForm = {\n Field,\n Form,\n };\n\n static defaultProps = {\n onSubmit: () => {},\n };\n\n static validate = {\n description: (error) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (symbols.length < 10 || words.length < 3) {\n return error;\n }\n },\n email: (error) => (value = '') => {\n if (!/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n focusDecorator = createFocusDecorator();\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n render() {\n const SFeedbackForm = Box;\n const { Children, styles, forwardRef, loading, background, theme, ...other } = this.asProps;\n\n return (\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={loading === undefined ? api.submitting : loading}\n >\n <SFeedbackForm\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n title='This is feedback'\n >\n {typeof Children.origin === 'function' ? Children.origin(api) : <Children />}\n </SFeedbackForm>\n </SpinContainer>,\n )\n }\n </Form>\n );\n }\n}\n\nconst TooltipProps = [\n 'title',\n 'theme',\n 'strategy',\n 'modifiers',\n 'placement',\n 'interaction',\n 'timeout',\n 'visible',\n 'defaultVisible',\n 'onVisibleChange',\n 'offset',\n 'preventOverflow',\n 'arrow',\n 'flip',\n 'computeStyles',\n 'eventListeners',\n 'onFirstUpdate',\n];\n\nfunction Item({ Children, tag, uid, ...props }) {\n const tooltipProps = pick(props, TooltipProps);\n const ItemRoot = Root;\n\n const lastErrorRef = React.useRef(undefined);\n\n return (\n <Field {...props}>\n {({ input, meta, ...other }) => {\n const showError = other.validateOnBlur === false ? meta.submitFailed : true;\n const invalid = meta.invalid && meta.touched;\n const errorState = showError && invalid;\n const inputProps = {\n ...input,\n state: errorState ? 'invalid' : 'normal',\n 'aria-invalid': errorState ? true : false,\n 'aria-errormessage': uid,\n };\n if (meta?.error) lastErrorRef.current = meta.error;\n\n return (\n <Tooltip\n visible={errorState && meta.active}\n theme='warning'\n placement='left'\n flip={{\n fallbackPlacements: ['right', 'bottom'],\n }}\n {...tooltipProps}\n >\n <Tooltip.Trigger inline={false} role={undefined}>\n {tag && <ItemRoot render={tag} {...inputProps} />}\n {typeof Children.origin === 'function' &&\n Children.origin({\n input: inputProps,\n meta,\n ...other,\n })}\n </Tooltip.Trigger>\n <Tooltip.Popper id={uid} ignorePortalsStacking>\n {meta.error ?? lastErrorRef.current}\n </Tooltip.Popper>\n </Tooltip>\n );\n }}\n </Field>\n );\n}\nItem.enhance = [uniqueIDEnhancement()];\n\nfunction Success(props) {\n const { Children, styles } = props;\n const SSuccess = Root;\n const SEmail = 'div';\n\n return sstyled(styles)(\n <SSuccess render={Box}>\n <SEmail aria-hidden={true} />\n <span>\n <Children />\n </span>\n </SSuccess>,\n );\n}\n// because it is used without a wrapper\nSuccess.style = style;\n\nfunction Submit(props) {\n const { styles } = props;\n const SSubmit = Root;\n return sstyled(styles)(<SSubmit render={Button} type='submit' use='primary' theme='success' />);\n}\n\nfunction Cancel(props) {\n const { styles } = props;\n const SCancel = Root;\n return sstyled(styles)(<SCancel render={Button} type='reset' use='secondary' theme='muted' />);\n}\n\nfunction Notice(props) {\n const { styles, theme = 'bg-secondary-neutral', use = 'secondary' } = props;\n const SNotice = Root;\n return sstyled(styles)(<SNotice render={NoticeSmart} theme={theme} use={use} />);\n}\n\nexport default createComponent(FeedbackForm, {\n Item,\n Success,\n Submit,\n Cancel,\n Notice,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB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A,KAAAoE,aAAA;IAAA,QAAsB,OAAO;IAAA,OAAK,WAAW;IAAA,SAAO;EAAO,GAAAH,KAAA,IAAG;AAC/F;AAEA,SAASI,MAAMA,CAAChD,KAAK,EAAE;EAAA,IAAAiD,KAAA,GAAApD,YAAA;IAAAqD,MAAA;EACrB,IAAQxF,MAAM,GAAwDsC,KAAK,CAAnEtC,MAAM;IAAAyF,YAAA,GAAwDnD,KAAK,CAA3DlC,KAAK;IAALA,KAAK,GAAAqF,YAAA,cAAG,sBAAsB,GAAAA,YAAA;IAAAC,UAAA,GAAwBpD,KAAK,CAA3BqD,GAAG;IAAHA,GAAG,GAAAD,UAAA,cAAG,WAAW,GAAAA,UAAA;EACjE,IAAME,OAAO,GAC2B/H,WAAW;EAAnD,OAAA2H,MAAA,GAAOhI,OAAO,CAACwC,MAAM,CAAC,eAAC9C,KAAA,CAAAsD,aAAA,CAACoF,OAAO,EAAAJ,MAAA,CAAA1E,EAAA,YAAAG,aAAA,KAAA4E,aAAA;IAAA,SAA6BzF,KAAK;IAAA,OAAOuF;EAAG,GAAAJ,KAAA,IAAI;AACjF;AAEA,eAAejI,eAAe,CAACc,YAAY,EAAE;EAC3C4D,IAAI,EAAJA,IAAI;EACJsC,OAAO,EAAPA,OAAO;EACPM,MAAM,EAANA,MAAM;EACNK,MAAM,EAANA,MAAM;EACNK,MAAM,EAANA;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"FeedbackForm.js","names":["React","Field","Form","createFocusDecorator","createComponent","Component","sstyled","Root","Button","SpinContainer","NoticeSmart","Box","FeedbackItem","SubmitButton","style","_sstyled","insert","FeedbackForm","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","value","getItemProps","validateOnBlur","asProps","render","SFeedbackForm","_this$asProps","Children","styles","forwardRef","loading","background","theme","other","_objectWithoutProperties","_excluded","createElement","_extends","decorators","focusDecorator","api","_ref4","cn","undefined","submitting","_objectSpread","handleSubmit","origin","onSubmit","description","error","words","split","symbols","join","email","test","String","toLowerCase","Success","props","_ref","arguments[0]","_ref5","SSuccess","SEmail","_assignProps","Cancel","_ref2","_ref6","SCancel","_assignProps2","Notice","_ref3","_ref7","_props$theme","_props$use","use","SNotice","_assignProps3","Item","Submit"],"sources":["../../src/FeedbackForm.jsx"],"sourcesContent":["import React from 'react';\nimport { Field, Form } from 'react-final-form';\nimport createFocusDecorator from 'final-form-focus';\n\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Button from '@semcore/button';\nimport SpinContainer from '@semcore/spin-container';\nimport { NoticeSmart } from '@semcore/notice';\nimport { Box } from '@semcore/flex-box';\n\nimport { FeedbackItem } from './component/feedback-item/FeedbackItem';\nimport { SubmitButton } from './component/submit-button/SubmitButton';\n\nimport style from './style/feedback-form.shadow.css';\n\nclass FeedbackForm extends Component {\n static displayName = 'FeedbackForm';\n static style = style;\n static FinalForm = {\n Field,\n Form,\n };\n\n static defaultProps = {\n onSubmit: () => {},\n };\n\n static validate = {\n description: (error) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (symbols.length < 10 || words.length < 3) {\n return error;\n }\n },\n email: (error) => (value = '') => {\n if (!/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n focusDecorator = createFocusDecorator();\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n render() {\n const SFeedbackForm = Box;\n const { Children, styles, forwardRef, loading, background, theme, ...other } = this.asProps;\n\n return (\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={loading === undefined ? api.submitting : loading}\n >\n <SFeedbackForm\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n title='This is feedback'\n >\n {typeof Children.origin === 'function' ? Children.origin(api) : <Children />}\n </SFeedbackForm>\n </SpinContainer>,\n )\n }\n </Form>\n );\n }\n}\n\nfunction Success(props) {\n const { Children, styles } = props;\n const SSuccess = Root;\n const SEmail = 'div';\n\n return sstyled(styles)(\n <SSuccess render={Box}>\n <SEmail aria-hidden={true} />\n <span>\n <Children />\n </span>\n </SSuccess>,\n );\n}\n// because it is used without a wrapper\nSuccess.style = style;\n\nfunction Cancel(props) {\n const { styles } = props;\n const SCancel = Root;\n return sstyled(styles)(<SCancel render={Button} type='reset' use='secondary' theme='muted' />);\n}\n\nfunction Notice(props) {\n const { styles, theme = 'bg-secondary-neutral', use = 'secondary' } = props;\n const SNotice = Root;\n return sstyled(styles)(<SNotice render={NoticeSmart} theme={theme} use={use} />);\n}\n\nexport default createComponent(FeedbackForm, {\n Item: FeedbackItem,\n Success,\n Submit: SubmitButton,\n Cancel,\n Notice,\n});\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,IAAI,QAAQ,kBAAkB;AAC9C,OAAOC,oBAAoB,MAAM,kBAAkB;AAEnD,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,GAAG,QAAQ,mBAAmB;AAEvC,SAASC,YAAY,QAAQ,wCAAwC;AACrE,SAASC,YAAY,QAAQ,wCAAwC;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIhEC,YAAY,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,YAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,YAAA;EAAA,SAAAA,aAAA;IAAA,IAAAK,KAAA;IAAAC,eAAA,OAAA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