@semcore/feedback-form 6.43.0-prerelease.4 → 6.43.0-prerelease.5

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 (60) hide show
  1. package/lib/cjs/FeedbackForm.js +22 -28
  2. package/lib/cjs/FeedbackForm.js.map +1 -1
  3. package/lib/cjs/component/checkbox-button/CheckboxButton.js +34 -22
  4. package/lib/cjs/component/checkbox-button/CheckboxButton.js.map +1 -1
  5. package/lib/cjs/component/feedback-item/FeedbackItem.js +8 -8
  6. package/lib/cjs/component/feedback-item/FeedbackItem.js.map +1 -1
  7. package/lib/cjs/component/feedback-rating/FeedbackRating.js +63 -71
  8. package/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -1
  9. package/lib/cjs/component/feedback-rating/FeedbackRating.type.js.map +1 -1
  10. package/lib/cjs/component/slider-rating/SliderRating.js +37 -47
  11. package/lib/cjs/component/slider-rating/SliderRating.js.map +1 -1
  12. package/lib/cjs/component/submit-button/SubmitButton.js +1 -1
  13. package/lib/cjs/component/submit-button/SubmitButton.js.map +1 -1
  14. package/lib/cjs/index.d.js +1 -1
  15. package/lib/cjs/index.d.js.map +1 -1
  16. package/lib/cjs/index.js +1 -1
  17. package/lib/cjs/index.js.map +1 -1
  18. package/lib/cjs/style/feedback-form.shadow.css +1 -1
  19. package/lib/cjs/style/feedback-rating.shadow.css +8 -0
  20. package/lib/cjs/style/slider-rating.shadow.css +1 -6
  21. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
  22. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  23. package/lib/es6/FeedbackForm.js +19 -22
  24. package/lib/es6/FeedbackForm.js.map +1 -1
  25. package/lib/es6/component/checkbox-button/CheckboxButton.js +31 -16
  26. package/lib/es6/component/checkbox-button/CheckboxButton.js.map +1 -1
  27. package/lib/es6/component/feedback-item/FeedbackItem.js +7 -7
  28. package/lib/es6/component/feedback-item/FeedbackItem.js.map +1 -1
  29. package/lib/es6/component/feedback-rating/FeedbackRating.js +56 -61
  30. package/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -1
  31. package/lib/es6/component/feedback-rating/FeedbackRating.type.js.map +1 -1
  32. package/lib/es6/component/slider-rating/SliderRating.js +33 -40
  33. package/lib/es6/component/slider-rating/SliderRating.js.map +1 -1
  34. package/lib/es6/component/submit-button/SubmitButton.js +1 -1
  35. package/lib/es6/component/submit-button/SubmitButton.js.map +1 -1
  36. package/lib/es6/index.d.js +0 -3
  37. package/lib/es6/index.d.js.map +1 -1
  38. package/lib/es6/index.js.map +1 -1
  39. package/lib/es6/style/feedback-form.shadow.css +1 -1
  40. package/lib/es6/style/feedback-rating.shadow.css +8 -0
  41. package/lib/es6/style/slider-rating.shadow.css +1 -6
  42. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
  43. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  44. package/lib/esm/FeedbackForm.mjs +27 -31
  45. package/lib/esm/component/checkbox-button/CheckboxButton.mjs +34 -22
  46. package/lib/esm/component/feedback-item/FeedbackItem.mjs +6 -6
  47. package/lib/esm/component/feedback-rating/FeedbackRating.mjs +52 -64
  48. package/lib/esm/component/slider-rating/SliderRating.mjs +37 -45
  49. package/lib/esm/style/feedback-form.shadow.css +1 -1
  50. package/lib/esm/style/feedback-rating.shadow.css +8 -0
  51. package/lib/esm/style/slider-rating.shadow.css +1 -6
  52. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
  53. package/lib/types/component/checkbox-button/CheckboxButton.d.ts +1 -3
  54. package/lib/types/component/feedback-item/FeedbackItem.d.ts +3 -3
  55. package/lib/types/component/feedback-rating/FeedbackRating.d.ts +19 -184
  56. package/lib/types/component/feedback-rating/FeedbackRating.type.d.ts +35 -26
  57. package/lib/types/component/slider-rating/SliderRating.d.ts +3 -3
  58. package/lib/types/component/submit-button/SubmitButton.d.ts +1 -1
  59. package/lib/types/index.d.ts +6 -15
  60. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import React from 'react';\nimport { FeedbackFormProps } from '../../index';\nimport { FieldProps } from 'react-final-form';\n\nimport { Intergalactic } from '@semcore/core';\nimport Button from '@semcore/button';\nimport { Text } from '@semcore/typography';\nimport Checkbox, { CheckboxProps } from '@semcore/checkbox';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea' | 'email';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** flag for show/hide notification */\n notificationVisible: boolean;\n /** */\n onNotificationClose: () => void;\n /** text in notification panel */\n notificationText: string;\n /** title in notification panel */\n notificationTitle?: string;\n /** optional link in notification panel */\n learnMoreLink?: string;\n /** rating value */\n rating: number;\n /** visible modal form flag */\n visible: boolean;\n\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** width for modal with form */\n modalWidth?: number | string;\n\n /** header of modal with form */\n header: React.ReactNode;\n /** text for submit button of form */\n submitText?: string;\n /** config for form fields */\n formConfig: FormConfigItem[];\n\n initialValues: Record<string, any> & { rating: number };\n\n errorFeedbackEmail: string;\n\n locale?: string;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<CheckboxProps, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\ndeclare const FeedbackRatingType: Intergalactic.Component<'form', FeedbackRatingProps> & {\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\nexport { FeedbackRatingType };\n"],"mappings":""}
1
+ {"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import type { NSCheckbox } from '@semcore/checkbox';\nimport type { Intergalactic } from '@semcore/core';\nimport type { IllustrationProps } from '@semcore/illustration';\nimport type Notice from '@semcore/notice';\nimport type React from 'react';\nimport type { FieldProps } from 'react-final-form';\n\nimport type { FeedbackFormProps } from '../../index';\nimport type { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea' | 'email';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** Status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** Flag for show/hide notification */\n notificationVisible: boolean;\n /** Notification close callback */\n onNotificationClose: () => void;\n /** Text in notification panel */\n notificationText: string;\n /** Title in notification panel */\n notificationTitle?: string;\n /** Optional link in notification panel */\n learnMoreLink?: string;\n /** Rating value */\n rating: number;\n /** Visible modal form flag */\n visible: boolean;\n /** Visibility changes callback */\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** Width for modal with form */\n modalWidth?: number | string;\n\n /** Header of modal with form */\n header: React.ReactNode;\n /** Text for submit button of form */\n submitText?: string;\n /** Config for form fields */\n formConfig: FormConfigItem[];\n\n /** Initial form values including rating */\n initialValues: Record<string, any> & { rating: number };\n /** Email address shown in error messages */\n errorFeedbackEmail: string;\n /** Specifies the locale for i18n support */\n locale?: string;\n /** Illustration element */\n Illustration?: Intergalactic.Component<'svg', IllustrationProps>;\n /** Notice component */\n Notice?: typeof Notice;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<NSCheckbox.Props, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\nexport type FeedbackRatingDefaultProps = {\n onSubmit: () => void;\n i18n: typeof localizedMessages;\n locale: 'en';\n Illustration: Intergalactic.Component<'svg', IllustrationProps>;\n Notice: typeof Notice;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1,69 +1,64 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
+ import _callSuper from "@babel/runtime/helpers/callSuper";
5
5
  import _inherits from "@babel/runtime/helpers/inherits";
6
- import _createSuper from "@babel/runtime/helpers/createSuper";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- import { sstyled as _sstyled } from "@semcore/utils/lib/core/index";
7
+ import { sstyled as _sstyled } from "@semcore/core";
9
8
  import { assignProps as _assignProps3 } from "@semcore/core";
10
9
  import { assignProps as _assignProps2 } from "@semcore/core";
11
10
  import { assignProps as _assignProps } from "@semcore/core";
11
+ import { Flex, Box } from '@semcore/base-components';
12
+ import { createComponent, Component, Root, sstyled } from '@semcore/core';
13
+ import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
14
+ import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
12
15
  import React from 'react';
13
- import createComponent, { Component, Root, sstyled } from '@semcore/core';
14
- import { Flex, Box } from '@semcore/flex-box';
15
16
  /*!__reshadow-styles__:"../../style/slider-rating.shadow.css"*/
16
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SSliderRating_wswwd_gg_ .___SStar_wswwd_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_wswwd_gg_.__keyboardFocused_wswwd_gg_ .___SStar_wswwd_gg_.__hovered_wswwd_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_wswwd_gg_ .___SStar_wswwd_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_wswwd_gg_.__keyboardFocused_wswwd_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 33, 220, 0.469))}@supports (color:color(display-p3 0 0 0)){.___SSliderRating_wswwd_gg_.__keyboardFocused_wswwd_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 33, 220, 0.469))}@media (color-gamut:p3){.___SSliderRating_wswwd_gg_.__keyboardFocused_wswwd_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px color(display-p3 0.03256 0.12227 0.83249 / 0.469))}}}@media (hover:hover){.___SSliderRating_wswwd_gg_.__readonly_wswwd_gg_ .___SStar_wswwd_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_wswwd_gg_.__filled_wswwd_gg_:active{animation:wobble .8s ease-in-out}.___SStar_wswwd_gg_ path{fill:var(--intergalactic-slider-rating-normal, rgb(157, 159, 158))}.___SStar_wswwd_gg_.__filled_wswwd_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, rgb(168, 106, 254))}", /*__inner_css_end__*/"wswwd_gg_"),
17
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SSliderRating_d9wy7_gg_ .___SStar_d9wy7_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_d9wy7_gg_:focus-visible .___SStar_d9wy7_gg_.__hovered_d9wy7_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_d9wy7_gg_ .___SStar_d9wy7_gg_:hover{cursor:pointer;transform:scale(1.3)}.___SSliderRating_d9wy7_gg_.__readonly_d9wy7_gg_ .___SStar_d9wy7_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_d9wy7_gg_.__filled_d9wy7_gg_:active{animation:wobble .8s ease-in-out}.___SStar_d9wy7_gg_ path{fill:var(--intergalactic-slider-rating-normal, rgb(157, 159, 158))}.___SStar_d9wy7_gg_.__filled_d9wy7_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, rgb(168, 106, 254))}", /*__inner_css_end__*/"d9wy7_gg_"),
17
18
  /*__reshadow_css_end__*/
18
19
  {
19
- "__SSliderRating": "___SSliderRating_wswwd_gg_",
20
- "__SStar": "___SStar_wswwd_gg_",
21
- "_keyboardFocused": "__keyboardFocused_wswwd_gg_",
22
- "_hovered": "__hovered_wswwd_gg_",
23
- "_readonly": "__readonly_wswwd_gg_",
24
- "_filled": "__filled_wswwd_gg_"
20
+ "__SSliderRating": "___SSliderRating_d9wy7_gg_",
21
+ "__SStar": "___SStar_d9wy7_gg_",
22
+ "_hovered": "__hovered_d9wy7_gg_",
23
+ "_readonly": "__readonly_d9wy7_gg_",
24
+ "_filled": "__filled_d9wy7_gg_"
25
25
  });
26
- import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
27
- import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
28
- import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
29
26
  import { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';
30
27
  var MIN = 1;
31
28
  var MAX = 5;
32
29
  var SliderRatingRoot = /*#__PURE__*/function (_Component) {
33
- _inherits(SliderRatingRoot, _Component);
34
- var _super = _createSuper(SliderRatingRoot);
35
30
  function SliderRatingRoot() {
36
31
  var _this;
37
32
  _classCallCheck(this, SliderRatingRoot);
38
33
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
39
34
  args[_key] = arguments[_key];
40
35
  }
41
- _this = _super.call.apply(_super, [this].concat(args));
42
- _defineProperty(_assertThisInitialized(_this), "state", {
36
+ _this = _callSuper(this, SliderRatingRoot, [].concat(args));
37
+ _defineProperty(_this, "state", {
43
38
  hoveredIndex: -1,
44
39
  clickedIndex: -1
45
40
  });
46
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (newValue) {
47
- return function (e) {
41
+ _defineProperty(_this, "handleClick", function (newValue) {
42
+ return function (_e) {
48
43
  var readonly = _this.asProps.readonly;
49
44
  if (!readonly) {
50
45
  _this.setValue(newValue);
51
46
  }
52
47
  };
53
48
  });
54
- _defineProperty(_assertThisInitialized(_this), "handleMouseEnder", function (index) {
49
+ _defineProperty(_this, "handleMouseEnder", function (index) {
55
50
  return function () {
56
51
  _this.setState({
57
52
  hoveredIndex: index
58
53
  });
59
54
  };
60
55
  });
61
- _defineProperty(_assertThisInitialized(_this), "handleMouseLeave", function () {
56
+ _defineProperty(_this, "handleMouseLeave", function () {
62
57
  _this.setState({
63
58
  hoveredIndex: -1
64
59
  });
65
60
  });
66
- _defineProperty(_assertThisInitialized(_this), "setValue", function (newValue) {
61
+ _defineProperty(_this, "setValue", function (newValue) {
67
62
  var _this$asProps = _this.asProps,
68
63
  onChange = _this$asProps.onChange,
69
64
  value = _this$asProps.value;
@@ -82,17 +77,17 @@ var SliderRatingRoot = /*#__PURE__*/function (_Component) {
82
77
  });
83
78
  }
84
79
  });
85
- _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
80
+ _defineProperty(_this, "handleKeyDown", function (event) {
86
81
  if (!['ArrowLeft', 'ArrowRight', 'Enter'].includes(event.key)) return;
87
82
  event.preventDefault();
88
83
  if (event.key === 'Enter') {
89
84
  var hoveredIndex = _this.state.hoveredIndex;
90
85
  _this.setValue(hoveredIndex + 1);
91
86
  } else {
92
- var _value = _this.asProps.value;
87
+ var value = _this.asProps.value;
93
88
  var _hoveredIndex = _this.state.hoveredIndex;
94
89
  var direction = event.key === 'ArrowLeft' ? -1 : 1;
95
- var newValue = _hoveredIndex === -1 ? _value + direction : _hoveredIndex + 1 + direction;
90
+ var newValue = _hoveredIndex === -1 ? value + direction : _hoveredIndex + 1 + direction;
96
91
  if (newValue > MAX) newValue = MAX;
97
92
  if (newValue < MIN) newValue = MIN;
98
93
  _this.setState({
@@ -102,7 +97,8 @@ var SliderRatingRoot = /*#__PURE__*/function (_Component) {
102
97
  });
103
98
  return _this;
104
99
  }
105
- _createClass(SliderRatingRoot, [{
100
+ _inherits(SliderRatingRoot, _Component);
101
+ return _createClass(SliderRatingRoot, [{
106
102
  key: "getStarProps",
107
103
  value: function getStarProps(_, index) {
108
104
  var _this$asProps2 = this.asProps,
@@ -159,19 +155,18 @@ var SliderRatingRoot = /*#__PURE__*/function (_Component) {
159
155
  return /*#__PURE__*/React.createElement(SSliderRating, _assignProps({
160
156
  "gap": 1,
161
157
  "role": 'img',
162
- "aria-label": label,
163
- "use:tabIndex": -1
158
+ "aria-label": label
164
159
  }, _ref), new Array(MAX).fill(null).map(function (_, index) {
165
- return /*#__PURE__*/React.createElement(Box, {
166
- key: index,
167
- position: 'relative'
168
- }, /*#__PURE__*/React.createElement(SliderRating.Star, null));
160
+ return /*#__PURE__*/React.createElement(SliderRating.Star, {
161
+ key: index
162
+ });
169
163
  }));
170
164
  }
171
165
  var hoverValue = hoveredIndex + 1;
172
166
  var editModeLabel = hoverValue > 0 || value ? "".concat(label, ". ").concat(getI18nText('FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber'), ".") : label;
173
167
  return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SSliderRating, _ref3.cn("SSliderRating", _objectSpread({}, _assignProps2({
174
168
  "gap": 1,
169
+ "tabIndex": 0,
175
170
  "onMouseLeave": this.handleMouseLeave,
176
171
  "onKeyDown": this.handleKeyDown,
177
172
  "role": 'slider',
@@ -181,18 +176,16 @@ var SliderRatingRoot = /*#__PURE__*/function (_Component) {
181
176
  "aria-valuetext": editModeLabel,
182
177
  "aria-valuenow": hoverValue
183
178
  }, _ref))), new Array(MAX).fill(null).map(function (_, index) {
184
- return /*#__PURE__*/React.createElement(Box, {
185
- key: index,
186
- position: 'relative'
187
- }, /*#__PURE__*/React.createElement(SliderRating.Star, null));
179
+ return /*#__PURE__*/React.createElement(SliderRating.Star, {
180
+ key: index
181
+ });
188
182
  }));
189
183
  }
190
184
  }]);
191
- return SliderRatingRoot;
192
185
  }(Component);
193
186
  _defineProperty(SliderRatingRoot, "displayName", 'SliderRating');
194
187
  _defineProperty(SliderRatingRoot, "style", style);
195
- _defineProperty(SliderRatingRoot, "enhance", [keyboardFocusEnhance(), uniqueIDEnhancement(), i18nEnhance(localizedMessages)]);
188
+ _defineProperty(SliderRatingRoot, "enhance", [uniqueIDEnhancement(), i18nEnhance(localizedMessages)]);
196
189
  _defineProperty(SliderRatingRoot, "defaultProps", {
197
190
  i18n: localizedMessages,
198
191
  locale: 'en'
@@ -1 +1 @@
1
- {"version":3,"file":"SliderRating.js","names":["React","createComponent","Component","Root","sstyled","Flex","Box","style","_sstyled","insert","keyboardFocusEnhance","uniqueIDEnhancement","i18nEnhance","localizedMessages","MIN","MAX","SliderRatingRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","hoveredIndex","clickedIndex","newValue","e","readonly","asProps","setValue","index","setState","_this$asProps","onChange","value","event","includes","key","preventDefault","state","direction","_createClass","getStarProps","_","_this$asProps2","filled","onClick","handleClick","onMouseEnter","undefined","handleMouseEnder","hovered","getLabelText","_this$asProps3","getI18nText","selectedRating","max","render","_ref","_ref3","_this$asProps4","styles","SSliderRating","label","createElement","_assignProps","fill","map","position","SliderRating","Star","hoverValue","editModeLabel","cn","_objectSpread","_assignProps2","handleMouseLeave","handleKeyDown","i18n","locale","props","_ref2","arguments[0]","_ref4","SStar","_assignProps3","displayName"],"sources":["../../../../src/component/slider-rating/SliderRating.tsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled, Intergalactic } from '@semcore/core';\nimport { Flex, Box, BoxProps } from '@semcore/flex-box';\nimport style from '../../style/slider-rating.shadow.css';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { ScreenReaderOnly } from '@semcore/flex-box';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\ntype SliderRatingProps = {\n value: number;\n onChange?: (value: number) => void;\n readonly?: boolean;\n};\n\ntype State = {\n hoveredIndex: number;\n clickedIndex: number;\n};\n\ntype StarProps = BoxProps & {\n filled?: boolean;\n};\n\nconst MIN = 1;\nconst MAX = 5;\n\nclass SliderRatingRoot extends Component<\n SliderRatingProps,\n {},\n State,\n typeof SliderRatingRoot.enhance\n> {\n static displayName = 'SliderRating';\n static style = style;\n\n static enhance = [\n keyboardFocusEnhance(),\n uniqueIDEnhancement(),\n i18nEnhance(localizedMessages),\n ] as const;\n\n state: State = {\n hoveredIndex: -1,\n clickedIndex: -1,\n };\n\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n\n handleClick = (newValue: number) => (e: React.SyntheticEvent<SVGElement>) => {\n const { readonly } = this.asProps;\n\n if (!readonly) {\n this.setValue(newValue);\n }\n };\n\n handleMouseEnder = (index: number) => () => {\n this.setState({ hoveredIndex: index });\n };\n\n handleMouseLeave = () => {\n this.setState({ hoveredIndex: -1 });\n };\n\n getStarProps(_: any, index: number) {\n const { value, readonly } = this.asProps;\n const { hoveredIndex } = this.state;\n\n return {\n filled: value ? index + 1 <= value || index <= hoveredIndex : index <= hoveredIndex,\n onClick: this.handleClick(index + 1),\n onMouseEnter: readonly ? undefined : this.handleMouseEnder(index),\n hovered: hoveredIndex === index,\n };\n }\n\n setValue = (newValue: number) => {\n const { onChange, value } = this.asProps;\n\n if (onChange) {\n onChange(newValue);\n }\n\n if (newValue <= value) {\n this.setState({ clickedIndex: newValue, hoveredIndex: -1 });\n } else {\n this.setState({ clickedIndex: -1, hoveredIndex: -1 });\n }\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n if (!['ArrowLeft', 'ArrowRight', 'Enter'].includes(event.key)) return;\n event.preventDefault();\n\n if (event.key === 'Enter') {\n const { hoveredIndex } = this.state;\n\n this.setValue(hoveredIndex + 1);\n } else {\n const { value } = this.asProps;\n const { hoveredIndex } = this.state;\n\n const direction = event.key === 'ArrowLeft' ? -1 : 1;\n let newValue = hoveredIndex === -1 ? value + direction : hoveredIndex + 1 + direction;\n\n if (newValue > MAX) newValue = MAX;\n if (newValue < MIN) newValue = MIN;\n\n this.setState({ hoveredIndex: newValue - 1 });\n }\n };\n\n getLabelText() {\n const { hoveredIndex } = this.state;\n const { readonly, value, getI18nText } = this.asProps;\n\n if (readonly) {\n return getI18nText('FeedbackRating.SliderRating.aria-valuetext.readonly', {\n selectedRating: value,\n max: MAX,\n });\n }\n\n if (value) {\n const selectedRating = hoveredIndex > -1 ? hoveredIndex + 1 : value;\n return getI18nText('FeedbackRating.SliderRating.aria-valuetext', {\n selectedRating: selectedRating,\n max: MAX,\n });\n }\n\n return hoveredIndex === -1\n ? getI18nText('FeedbackRating.SliderRating.aria-valuetext.empty')\n : getI18nText('FeedbackRating.SliderRating.aria-valuetext', {\n selectedRating: hoveredIndex + 1,\n max: MAX,\n });\n }\n\n render() {\n const { styles, readonly, getI18nText, value } = this.asProps;\n const { hoveredIndex } = this.state;\n\n const SSliderRating = Root;\n const label = this.getLabelText();\n\n if (readonly) {\n return (\n <SSliderRating render={Flex} gap={1} role='img' aria-label={label} use:tabIndex={-1}>\n {new Array(MAX).fill(null).map((_, index) => {\n return (\n <Box key={index} position={'relative'}>\n <SliderRating.Star />\n </Box>\n );\n })}\n </SSliderRating>\n );\n }\n\n const hoverValue = hoveredIndex + 1;\n\n const editModeLabel =\n hoverValue > 0 || value\n ? `${label}. ${getI18nText(\n 'FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber',\n )}.`\n : label;\n\n return sstyled(styles)(\n <SSliderRating\n render={Flex}\n gap={1}\n onMouseLeave={this.handleMouseLeave}\n onKeyDown={this.handleKeyDown}\n role={'slider'}\n aria-orientation='horizontal'\n aria-valuemin={MIN}\n aria-valuemax={MAX}\n aria-valuetext={editModeLabel}\n aria-valuenow={hoverValue}\n >\n {new Array(MAX).fill(null).map((_, index) => {\n return (\n <Box key={index} position={'relative'}>\n <SliderRating.Star />\n </Box>\n );\n })}\n </SSliderRating>,\n );\n }\n}\n\nfunction Star(props: StarProps) {\n const SStar = Root;\n return sstyled(props.styles)(\n <SStar\n render={Box}\n tag={'svg'}\n role='none'\n width='24'\n height='24'\n viewBox='0 0 24 24'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n {props.filled ? (\n <path d='M11.646 1.214a.4.4 0 0 1 .708 0l3.314 6.293 7 1.214a.4.4 0 0 1 .219.673l-4.952 5.104 1.012 7.044a.4.4 0 0 1-.573.416L12 18.818l-6.374 3.14a.4.4 0 0 1-.572-.416l1.01-7.044-4.95-5.104a.4.4 0 0 1 .218-.673l7-1.214 3.314-6.293Z' />\n ) : (\n <path\n d='M14.358 9.31 12 4.834 9.642 9.31l-4.985.864 3.526 3.634-.72 5.014L12 16.588l4.537 2.235-.72-5.014 3.526-3.634-4.985-.864Zm8.31-.59a.4.4 0 0 1 .219.674l-4.952 5.104 1.012 7.044a.4.4 0 0 1-.573.416L12 18.818l-6.374 3.14a.4.4 0 0 1-.572-.416l1.01-7.044-4.95-5.104a.4.4 0 0 1 .218-.673l7-1.214 3.314-6.293a.4.4 0 0 1 .708 0l3.314 6.293 7 1.214Z'\n fillRule='evenodd'\n clipRule='evenodd'\n />\n )}\n </SStar>,\n );\n}\nStar.displayName = 'Star';\n\nconst SliderRating = createComponent(SliderRatingRoot, {\n Star,\n}) as Intergalactic.Component<typeof Flex, SliderRatingProps> & {\n Star: Intergalactic.Component<typeof Box, StarProps>;\n};\n\nexport default SliderRating;\n"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAA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AiO,GAAG,gBAE5OpF,KAAA,CAAA2E,aAAA,SAAAmB,KAAA,CAAAV,EAAA;IAAA,KACI,sVAAsV;IAAA,YAC/U,SAAS;IAAA,YACT;EAAS,GAErB,CACK;AAEZ;AACAH,IAAI,CAACgB,WAAW,GAAG,MAAM;AAEzB,IAAMjB,YAAY,GAAG/E,eAAe,CAACe,gBAAgB,EAAE;EACrDiE,IAAI,EAAJA;AACF,CAAC,CAEA;AAED,eAAeD,YAAY"}
1
+ {"version":3,"file":"SliderRating.js","names":["Flex","Box","createComponent","Component","Root","sstyled","i18nEnhance","uniqueIDEnhancement","React","style","_sstyled","insert","localizedMessages","MIN","MAX","SliderRatingRoot","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","hoveredIndex","clickedIndex","newValue","_e","readonly","asProps","setValue","index","setState","_this$asProps","onChange","value","event","includes","key","preventDefault","state","direction","_inherits","_createClass","getStarProps","_","_this$asProps2","filled","onClick","handleClick","onMouseEnter","undefined","handleMouseEnder","hovered","getLabelText","_this$asProps3","getI18nText","selectedRating","max","render","_ref","_ref3","_this$asProps4","styles","SSliderRating","label","createElement","_assignProps","fill","map","SliderRating","Star","hoverValue","editModeLabel","cn","_objectSpread","_assignProps2","handleMouseLeave","handleKeyDown","i18n","locale","props","_ref2","arguments[0]","_ref4","SStar","_assignProps3","displayName"],"sources":["../../../../src/component/slider-rating/SliderRating.tsx"],"sourcesContent":["import { Flex, Box, type BoxProps } from '@semcore/base-components';\nimport { createComponent, Component, Root, sstyled, type Intergalactic } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport React from 'react';\n\nimport style from '../../style/slider-rating.shadow.css';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\ntype SliderRatingProps = {\n value: number;\n onChange?: (value: number) => void;\n readonly?: boolean;\n};\n\ntype State = {\n hoveredIndex: number;\n clickedIndex: number;\n};\n\ntype StarProps = BoxProps & {\n filled?: boolean;\n};\n\nconst MIN = 1;\nconst MAX = 5;\n\nclass SliderRatingRoot extends Component<\n SliderRatingProps,\n typeof SliderRatingRoot.enhance,\n {},\n {},\n State\n> {\n static displayName = 'SliderRating';\n static style = style;\n\n static enhance = [uniqueIDEnhancement(), i18nEnhance(localizedMessages)] as const;\n\n state: State = {\n hoveredIndex: -1,\n clickedIndex: -1,\n };\n\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n\n handleClick = (newValue: number) => (_e: React.SyntheticEvent<SVGElement>) => {\n const { readonly } = this.asProps;\n\n if (!readonly) {\n this.setValue(newValue);\n }\n };\n\n handleMouseEnder = (index: number) => () => {\n this.setState({ hoveredIndex: index });\n };\n\n handleMouseLeave = () => {\n this.setState({ hoveredIndex: -1 });\n };\n\n getStarProps(_: any, index: number) {\n const { value, readonly } = this.asProps;\n const { hoveredIndex } = this.state;\n\n return {\n filled: value ? index + 1 <= value || index <= hoveredIndex : index <= hoveredIndex,\n onClick: this.handleClick(index + 1),\n onMouseEnter: readonly ? undefined : this.handleMouseEnder(index),\n hovered: hoveredIndex === index,\n };\n }\n\n setValue = (newValue: number) => {\n const { onChange, value } = this.asProps;\n\n if (onChange) {\n onChange(newValue);\n }\n\n if (newValue <= value) {\n this.setState({ clickedIndex: newValue, hoveredIndex: -1 });\n } else {\n this.setState({ clickedIndex: -1, hoveredIndex: -1 });\n }\n };\n\n handleKeyDown = (event: React.KeyboardEvent) => {\n if (!['ArrowLeft', 'ArrowRight', 'Enter'].includes(event.key)) return;\n event.preventDefault();\n\n if (event.key === 'Enter') {\n const { hoveredIndex } = this.state;\n\n this.setValue(hoveredIndex + 1);\n } else {\n const { value } = this.asProps;\n const { hoveredIndex } = this.state;\n\n const direction = event.key === 'ArrowLeft' ? -1 : 1;\n let newValue = hoveredIndex === -1 ? value + direction : hoveredIndex + 1 + direction;\n\n if (newValue > MAX) newValue = MAX;\n if (newValue < MIN) newValue = MIN;\n\n this.setState({ hoveredIndex: newValue - 1 });\n }\n };\n\n getLabelText() {\n const { hoveredIndex } = this.state;\n const { readonly, value, getI18nText } = this.asProps;\n\n if (readonly) {\n return getI18nText('FeedbackRating.SliderRating.aria-valuetext.readonly', {\n selectedRating: value,\n max: MAX,\n });\n }\n\n if (value) {\n const selectedRating = hoveredIndex > -1 ? hoveredIndex + 1 : value;\n return getI18nText('FeedbackRating.SliderRating.aria-valuetext', {\n selectedRating: selectedRating,\n max: MAX,\n });\n }\n\n return hoveredIndex === -1\n ? getI18nText('FeedbackRating.SliderRating.aria-valuetext.empty')\n : getI18nText('FeedbackRating.SliderRating.aria-valuetext', {\n selectedRating: hoveredIndex + 1,\n max: MAX,\n });\n }\n\n render() {\n const { styles, readonly, getI18nText, value } = this.asProps;\n const { hoveredIndex } = this.state;\n\n const SSliderRating = Root;\n const label = this.getLabelText();\n\n if (readonly) {\n return (\n <SSliderRating render={Flex} gap={1} role='img' aria-label={label}>\n {new Array(MAX).fill(null).map((_, index) => <SliderRating.Star key={index} />)}\n </SSliderRating>\n );\n }\n\n const hoverValue = hoveredIndex + 1;\n\n const editModeLabel =\n hoverValue > 0 || value\n ? `${label}. ${getI18nText(\n 'FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber',\n )}.`\n : label;\n\n return sstyled(styles)(\n <SSliderRating\n render={Flex}\n gap={1}\n tabIndex={0}\n onMouseLeave={this.handleMouseLeave}\n onKeyDown={this.handleKeyDown}\n role='slider'\n aria-orientation='horizontal'\n aria-valuemin={MIN}\n aria-valuemax={MAX}\n aria-valuetext={editModeLabel}\n aria-valuenow={hoverValue}\n >\n {new Array(MAX).fill(null).map((_, index) => <SliderRating.Star key={index} />)}\n </SSliderRating>,\n );\n }\n}\n\nfunction Star(props: StarProps) {\n const SStar = Root;\n return sstyled(props.styles)(\n <SStar\n render={Box}\n tag='svg'\n role='none'\n width='24'\n height='24'\n viewBox='0 0 24 24'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n {props.filled\n ? (\n <path d='M11.646 1.214a.4.4 0 0 1 .708 0l3.314 6.293 7 1.214a.4.4 0 0 1 .219.673l-4.952 5.104 1.012 7.044a.4.4 0 0 1-.573.416L12 18.818l-6.374 3.14a.4.4 0 0 1-.572-.416l1.01-7.044-4.95-5.104a.4.4 0 0 1 .218-.673l7-1.214 3.314-6.293Z' />\n )\n : (\n <path\n d='M14.358 9.31 12 4.834 9.642 9.31l-4.985.864 3.526 3.634-.72 5.014L12 16.588l4.537 2.235-.72-5.014 3.526-3.634-4.985-.864Zm8.31-.59a.4.4 0 0 1 .219.674l-4.952 5.104 1.012 7.044a.4.4 0 0 1-.573.416L12 18.818l-6.374 3.14a.4.4 0 0 1-.572-.416l1.01-7.044-4.95-5.104a.4.4 0 0 1 .218-.673l7-1.214 3.314-6.293a.4.4 0 0 1 .708 0l3.314 6.293 7 1.214Z'\n fillRule='evenodd'\n clipRule='evenodd'\n />\n )}\n </SStar>,\n );\n}\nStar.displayName = 'Star';\n\nconst SliderRating = createComponent(SliderRatingRoot, {\n Star,\n}) as Intergalactic.Component<typeof Flex, SliderRatingProps> & {\n Star: Intergalactic.Component<typeof Box, StarProps>;\n};\n\nexport default SliderRating;\n"],"mappings":";;;;;;;;;;AAAA,SAASA,IAAI,EAAEC,GAAG,QAAuB,0BAA0B;AACnE,SAASC,eAAe,EAAEC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAA4B,eAAe;AAC7F,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAG1B,SAASC,iBAAiB,QAAQ,oDAAoD;AAiBtF,IAAMC,GAAG,GAAG,CAAC;AACb,IAAMC,GAAG,GAAG,CAAC;AAAC,IAERC,gBAAgB,0BA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AAA;IAAAC,KAAA;EAC9B,IAAMC,KAAK,GAGCxF,GAAG;EAFf,OAAAuF,KAAA,GAAOnF,OAAO,CAACgF,KAAK,CAAClB,MAAM,CAAC,eAC1B3D,KAAA,CAAA8D,aAAA,CAACmB,KAAK,EAAAD,KAAA,CAAAV,EAAA,UAAAC,aAAA,KAAAW,aAAA;IAAA,OAEA,KAAK;IAAA,QACJ,MAAM;IAAA,SACL,IAAI;IAAA,UACH,IAAI;IAAA,WACH,WAAW;IAAA,QACd,MAAM;IAAA,SACL;EAA4B,GAAAJ,KAAA,KAEjCD,KAAK,CAAClC,MAAM,gBAEP3C,KAAA,CAAA8D,aAAA,SAAAkB,KAAA,CAAAV,EAAA;IAAA,KAAQ;EAAiO,EAAE,CAAC,gBAG5OtE,KAAA,CAAA8D,aAAA,SAAAkB,KAAA,CAAAV,EAAA;IAAA,KACI,sVAAsV;IAAA,YAC/U,SAAS;IAAA,YACT;EAAS,EACnB,CAEF,CAAC;AAEZ;AACAH,IAAI,CAACgB,WAAW,GAAG,MAAM;AAEzB,IAAMjB,YAAY,GAAGxE,eAAe,CAACa,gBAAgB,EAAE;EACrD4D,IAAI,EAAJA;AACF,CAAC,CAEA;AAED,eAAeD,YAAY","ignoreList":[]}
@@ -1,8 +1,8 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import { assignProps as _assignProps } from "@semcore/core";
3
3
  import Button from '@semcore/button';
4
- import React from 'react';
5
4
  import { Root, sstyled } from '@semcore/core';
5
+ import React from 'react';
6
6
  export function SubmitButton(props) {
7
7
  var _ref = arguments[0],
8
8
  _ref2;
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitButton.js","names":["Button","React","Root","sstyled","SubmitButton","props","_ref","arguments[0]","_ref2","styles","SSubmit","createElement","cn","_objectSpread","_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":";;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,OAAO,QAA6B,eAAe;AAElE,OAAO,SAASC,YAAYA,CAACC,KAA0B,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACvD,IAAQC,MAAM,GAAKJ,KAAK,CAAhBI,MAAM;EACd,IAAMC,OAAO,GAC2BV,MAAM;EAA9C,OAAAQ,KAAA,GAAOL,OAAO,CAACM,MAAM,CAAC,eAACR,KAAA,CAAAU,aAAA,CAACD,OAAO,EAAAF,KAAA,CAAAI,EAAA,YAAAC,aAAA,KAAAC,YAAA;IAAA,QAAsB,QAAQ;IAAA,OAAK,SAAS;IAAA,SAAO;EAAS,GAAAR,IAAA,IAAG;AAChG"}
1
+ {"version":3,"file":"SubmitButton.js","names":["Button","Root","sstyled","React","SubmitButton","props","_ref","arguments[0]","_ref2","styles","SSubmit","createElement","cn","_objectSpread","_assignProps"],"sources":["../../../../src/component/submit-button/SubmitButton.tsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { Root, sstyled, type IRootComponentProps } from '@semcore/core';\nimport React from 'react';\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":";;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,EAAEC,OAAO,QAAkC,eAAe;AACvE,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAO,SAASC,YAAYA,CAACC,KAA0B,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACvD,IAAQC,MAAM,GAAKJ,KAAK,CAAhBI,MAAM;EACd,IAAMC,OAAO,GAC2BV,MAAM;EAA9C,OAAAQ,KAAA,GAAON,OAAO,CAACO,MAAM,CAAC,eAACN,KAAA,CAAAQ,aAAA,CAACD,OAAO,EAAAF,KAAA,CAAAI,EAAA,YAAAC,aAAA,KAAAC,YAAA;IAAA,QAAsB,QAAQ;IAAA,OAAK,SAAS;IAAA,SAAO;EAAS,GAAAR,IAAA,GAAE,CAAC;AAChG","ignoreList":[]}
@@ -1,6 +1,3 @@
1
1
  import { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';
2
-
3
- /** @deprecated */
4
-
5
2
  export { FeedbackRating };
6
3
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["default","FeedbackRating"],"sources":["../../src/index.d.ts"],"sourcesContent":["import {\n FormProps,\n FieldProps,\n FieldInputProps,\n FieldMetaState,\n FieldRenderProps,\n} 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<\n 'div',\n FieldProps<any, any>,\n { input: FieldInputProps<any> & { state: 'normal' | 'invalid' }; meta: FieldMetaState<any> }\n >;\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":"AAaA,SAASA,OAAO,IAAIC,cAAc,QAAQ,4CAA4C;;AAEtF;;AAiCA,SAASA,cAAc"}
1
+ {"version":3,"file":"index.d.js","names":["default","FeedbackRating"],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport type { NoticeSmart } from '@semcore/notice';\nimport type { FormProps, FieldProps, FieldInputProps, FieldMetaState } from 'react-final-form';\n\nimport { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';\n\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<\n 'div',\n FieldProps<any, any>,\n { input: FieldInputProps<any> & { state: 'normal' | 'invalid' }; meta: FieldMetaState<any> }\n >;\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":"AAMA,SAASA,OAAO,IAAIC,cAAc,QAAQ,4CAA4C;AAiCtF,SAASA,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","FeedbackRating"],"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,SAASA,OAAO,IAAIC,cAAc,QAAQ,4CAA4C;AAEtF,SAASD,OAAO,QAAQ,gBAAgB;AAExC,SAASC,cAAc"}
1
+ {"version":3,"file":"index.js","names":["default","FeedbackRating"],"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,SAASA,OAAO,IAAIC,cAAc,QAAQ,4CAA4C;AAEtF,SAASD,OAAO,QAAQ,gBAAgB;AAExC,SAASC,cAAc","ignoreList":[]}
@@ -28,7 +28,7 @@ SSuccess {
28
28
 
29
29
  SEmail {
30
30
  margin-bottom: calc(
31
- var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px)
31
+ var(--intergalactic-spacing-4x, 16px)
32
32
  );
33
33
  width: 80px;
34
34
  height: 80px;
@@ -6,4 +6,12 @@ SFeedbackRating {
6
6
  ul, li {
7
7
  list-style: none;
8
8
  }
9
+
10
+ SHeader {
11
+ font-size: var(--intergalactic-fs-300, 16px);
12
+ line-height: var(--intergalactic-lh-300, 150%);
13
+ font-weight: var(--intergalactic-bold, 700);
14
+ margin: var(--intergalactic-spacing-4x, 16px) 0;
15
+ text-align: center;
16
+ }
9
17
  }
@@ -2,17 +2,12 @@ SSliderRating SStar {
2
2
  transition: all calc(var(--intergalactic-duration-control, 200) * 1ms) ease-out;
3
3
  }
4
4
 
5
- SSliderRating[keyboardFocused] SStar[hovered],
5
+ SSliderRating:focus-visible SStar[hovered],
6
6
  SSliderRating SStar:hover {
7
7
  cursor: pointer;
8
8
  transform: scale(1.3);
9
9
  }
10
10
 
11
- SSliderRating[keyboardFocused] {
12
- outline: none;
13
- box-shadow: var(--intergalactic-keyboard-focus, 0px 0px 0px 3px oklch(0.424 0.269 264.2 / 0.469));
14
- }
15
-
16
11
  SSliderRating[readonly] SStar:hover {
17
12
  cursor: default;
18
13
  transform: none;
@@ -6,12 +6,12 @@ import it from './it.json';
6
6
  import ja from './ja.json';
7
7
  import ko from './ko.json';
8
8
  import nl from './nl.json';
9
+ import pl from './pl.json';
9
10
  import pt from './pt.json';
11
+ import sv from './sv.json';
10
12
  import tr from './tr.json';
11
13
  import vi from './vi.json';
12
14
  import zh from './zh.json';
13
- import pl from './pl.json';
14
- import sv from './sv.json';
15
15
  export var localizedMessages = {
16
16
  de: de,
17
17
  en: en,
@@ -1 +1 @@
1
- {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pt","tr","vi","zh","pl","sv","localizedMessages"],"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,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bd,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA;AACF,CAAC"}
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"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 pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.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,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bd,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFL,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA;AACF,CAAC","ignoreList":[]}
@@ -3,19 +3,17 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
5
  import _createClass from "@babel/runtime/helpers/esm/createClass";
6
- import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
6
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
7
7
  import _inherits from "@babel/runtime/helpers/esm/inherits";
8
- import _createSuper from "@babel/runtime/helpers/esm/createSuper";
9
8
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
- import { sstyled } from "@semcore/utils/lib/core/index";
11
- import createComponent, { sstyled as sstyled$1, Component, assignProps } from "@semcore/core";
12
- import React from "react";
13
- import { Form, Field } from "react-final-form";
14
- import createFocusDecorator from "final-form-focus";
9
+ import { sstyled, Component, assignProps, createComponent } from "@semcore/core";
10
+ import { Box } from "@semcore/base-components";
15
11
  import Button from "@semcore/button";
16
- import SpinContainer from "@semcore/spin-container";
17
12
  import { NoticeSmart } from "@semcore/notice";
18
- import { Box } from "@semcore/flex-box";
13
+ import SpinContainer from "@semcore/spin-container";
14
+ import createFocusDecorator from "final-form-focus";
15
+ import React from "react";
16
+ import { Form, Field } from "react-final-form";
19
17
  import { FeedbackItem } from "./component/feedback-item/FeedbackItem.mjs";
20
18
  import { SubmitButton } from "./component/submit-button/SubmitButton.mjs";
21
19
  var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"];
@@ -24,33 +22,32 @@ var style = (
24
22
  /*__reshadow_css_start__*/
25
23
  (sstyled.insert(
26
24
  /*__inner_css_start__*/
27
- `.___SFeedbackForm_gmoqj_gg_{max-width:320px}.___SCancel_gmoqj_gg_,.___SSubmit_gmoqj_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_gmoqj_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, calc(6px + 2px)) var(--intergalactic-surface-rounded, calc(6px + 2px))}.___SSuccess_gmoqj_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_gmoqj_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")}`,
25
+ `.___SFeedbackForm_1l8mm_gg_{max-width:320px}.___SCancel_1l8mm_gg_,.___SSubmit_1l8mm_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_1l8mm_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, calc(6px + 2px)) var(--intergalactic-surface-rounded, calc(6px + 2px))}.___SSuccess_1l8mm_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_1l8mm_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px));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")}`,
28
26
  /*__inner_css_end__*/
29
- "gmoqj_gg_"
27
+ "1l8mm_gg_"
30
28
  ), /*__reshadow_css_end__*/
31
29
  {
32
- "__SFeedbackForm": "___SFeedbackForm_gmoqj_gg_",
33
- "__SSubmit": "___SSubmit_gmoqj_gg_",
34
- "__SCancel": "___SCancel_gmoqj_gg_",
35
- "__SNotice": "___SNotice_gmoqj_gg_",
36
- "__SSuccess": "___SSuccess_gmoqj_gg_",
37
- "__SEmail": "___SEmail_gmoqj_gg_"
30
+ "__SFeedbackForm": "___SFeedbackForm_1l8mm_gg_",
31
+ "__SSubmit": "___SSubmit_1l8mm_gg_",
32
+ "__SCancel": "___SCancel_1l8mm_gg_",
33
+ "__SNotice": "___SNotice_1l8mm_gg_",
34
+ "__SSuccess": "___SSuccess_1l8mm_gg_",
35
+ "__SEmail": "___SEmail_1l8mm_gg_"
38
36
  })
39
37
  );
40
- var FeedbackForm = /* @__PURE__ */ function(_Component) {
41
- _inherits(FeedbackForm2, _Component);
42
- var _super = _createSuper(FeedbackForm2);
38
+ var FeedbackForm = /* @__PURE__ */ (function(_Component) {
43
39
  function FeedbackForm2() {
44
40
  var _this;
45
41
  _classCallCheck(this, FeedbackForm2);
46
42
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
47
43
  args[_key] = arguments[_key];
48
44
  }
49
- _this = _super.call.apply(_super, [this].concat(args));
50
- _defineProperty(_assertThisInitialized(_this), "focusDecorator", createFocusDecorator());
45
+ _this = _callSuper(this, FeedbackForm2, [].concat(args));
46
+ _defineProperty(_this, "focusDecorator", createFocusDecorator());
51
47
  return _this;
52
48
  }
53
- _createClass(FeedbackForm2, [{
49
+ _inherits(FeedbackForm2, _Component);
50
+ return _createClass(FeedbackForm2, [{
54
51
  key: "getItemProps",
55
52
  value: function getItemProps() {
56
53
  var validateOnBlur = this.asProps.validateOnBlur;
@@ -67,7 +64,7 @@ var FeedbackForm = /* @__PURE__ */ function(_Component) {
67
64
  decorators: [this.focusDecorator]
68
65
  }, other), function(api) {
69
66
  var _ref4;
70
- return _ref4 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SpinContainer, _ref4.cn("SpinContainer", {
67
+ return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SpinContainer, _ref4.cn("SpinContainer", {
71
68
  "background": background,
72
69
  "theme": theme,
73
70
  "size": "xl",
@@ -83,8 +80,7 @@ var FeedbackForm = /* @__PURE__ */ function(_Component) {
83
80
  });
84
81
  }
85
82
  }]);
86
- return FeedbackForm2;
87
- }(Component);
83
+ })(Component);
88
84
  _defineProperty(FeedbackForm, "displayName", "FeedbackForm");
89
85
  _defineProperty(FeedbackForm, "style", style);
90
86
  _defineProperty(FeedbackForm, "FinalForm", {
@@ -120,7 +116,7 @@ function Success(props) {
120
116
  var Children = props.Children, styles = props.styles;
121
117
  var SSuccess = Box;
122
118
  var SEmail = "div";
123
- return _ref5 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SSuccess, _ref5.cn("SSuccess", _objectSpread({}, assignProps({
119
+ return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SSuccess, _ref5.cn("SSuccess", _objectSpread({}, assignProps({
124
120
  "tabIndex": -1
125
121
  }, _ref))), /* @__PURE__ */ React.createElement(SEmail, _ref5.cn("SEmail", {
126
122
  "aria-hidden": true
@@ -131,7 +127,7 @@ function Cancel(props) {
131
127
  var _ref2 = arguments[0], _ref6;
132
128
  var styles = props.styles;
133
129
  var SCancel = Button;
134
- return _ref6 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SCancel, _ref6.cn("SCancel", _objectSpread({}, assignProps({
130
+ return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SCancel, _ref6.cn("SCancel", _objectSpread({}, assignProps({
135
131
  "type": "reset",
136
132
  "use": "secondary",
137
133
  "theme": "muted"
@@ -141,12 +137,12 @@ function Notice(props) {
141
137
  var _ref3 = arguments[0], _ref7;
142
138
  var styles = props.styles, _props$theme = props.theme, theme = _props$theme === void 0 ? "muted" : _props$theme, _props$use = props.use, use = _props$use === void 0 ? "secondary" : _props$use;
143
139
  var SNotice = NoticeSmart;
144
- return _ref7 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SNotice, _ref7.cn("SNotice", _objectSpread({}, assignProps({
140
+ return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SNotice, _ref7.cn("SNotice", _objectSpread({}, assignProps({
145
141
  "use:theme": theme,
146
142
  "use:use": use
147
143
  }, _ref3))));
148
144
  }
149
- const FeedbackForm$1 = createComponent(FeedbackForm, {
145
+ const FeedbackForm_default = createComponent(FeedbackForm, {
150
146
  Item: FeedbackItem,
151
147
  Success,
152
148
  Submit: SubmitButton,
@@ -154,5 +150,5 @@ const FeedbackForm$1 = createComponent(FeedbackForm, {
154
150
  Notice
155
151
  });
156
152
  export {
157
- FeedbackForm$1 as default
153
+ FeedbackForm_default as default
158
154
  };