@semcore/feedback-form 6.41.0 → 6.42.0-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/FeedbackForm.js +7 -7
- package/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
- package/lib/cjs/component/feedback-rating/FeedbackRating.js +2 -2
- package/lib/cjs/component/slider-rating/SliderRating.js +7 -7
- package/lib/es6/FeedbackForm.js +7 -7
- package/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
- package/lib/es6/component/feedback-rating/FeedbackRating.js +2 -2
- package/lib/es6/component/slider-rating/SliderRating.js +7 -7
- package/lib/esm/FeedbackForm.mjs +51 -51
- package/lib/esm/component/checkbox-button/CheckboxButton.mjs +21 -21
- package/lib/esm/component/feedback-rating/FeedbackRating.mjs +41 -41
- package/lib/esm/component/slider-rating/SliderRating.mjs +75 -75
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [6.42.0] - 2025-04-11
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version minor update due to children dependencies update (`@semcore/icon` [4.60.2 ~> 4.61.0]).
|
|
10
|
+
|
|
5
11
|
## [6.41.0] - 2025-04-01
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/lib/cjs/FeedbackForm.js
CHANGED
|
@@ -28,13 +28,13 @@ var _FeedbackItem = require("./component/feedback-item/FeedbackItem");
|
|
|
28
28
|
var _SubmitButton = require("./component/submit-button/SubmitButton");
|
|
29
29
|
var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"];
|
|
30
30
|
/*__reshadow-styles__:"./style/feedback-form.shadow.css"*/
|
|
31
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
32
|
-
"__SFeedbackForm": "
|
|
33
|
-
"__SSubmit": "
|
|
34
|
-
"__SCancel": "
|
|
35
|
-
"__SNotice": "
|
|
36
|
-
"__SSuccess": "
|
|
37
|
-
"__SEmail": "
|
|
31
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SFeedbackForm_5hg5z_gg_{max-width:320px}.___SCancel_5hg5z_gg_,.___SSubmit_5hg5z_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_5hg5z_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_5hg5z_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_5hg5z_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__*/, "5hg5z_gg_") /*__reshadow_css_end__*/, {
|
|
32
|
+
"__SFeedbackForm": "___SFeedbackForm_5hg5z_gg_",
|
|
33
|
+
"__SSubmit": "___SSubmit_5hg5z_gg_",
|
|
34
|
+
"__SCancel": "___SCancel_5hg5z_gg_",
|
|
35
|
+
"__SNotice": "___SNotice_5hg5z_gg_",
|
|
36
|
+
"__SSuccess": "___SSuccess_5hg5z_gg_",
|
|
37
|
+
"__SEmail": "___SEmail_5hg5z_gg_"
|
|
38
38
|
});
|
|
39
39
|
var FeedbackForm = /*#__PURE__*/function (_Component) {
|
|
40
40
|
(0, _inherits2["default"])(FeedbackForm, _Component);
|
|
@@ -20,9 +20,9 @@ var _flexBox = require("@semcore/flex-box");
|
|
|
20
20
|
var _checkbox = _interopRequireDefault(require("@semcore/checkbox"));
|
|
21
21
|
var _excluded = ["styles", "id", "label", "type", "focused"];
|
|
22
22
|
/*__reshadow-styles__:"../../style/checkbox-button.shadow.css"*/
|
|
23
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
24
|
-
"__SCheckboxButton": "
|
|
25
|
-
"_checked": "
|
|
23
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SCheckboxButton_jto54_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_jto54_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_jto54_gg_.__checked_jto54_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_jto54_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_jto54_gg_.__checked_jto54_gg_:hover{background-color:rgba(0,143,248,.2)}}" /*__inner_css_end__*/, "jto54_gg_") /*__reshadow_css_end__*/, {
|
|
24
|
+
"__SCheckboxButton": "___SCheckboxButton_jto54_gg_",
|
|
25
|
+
"_checked": "__checked_jto54_gg_"
|
|
26
26
|
});
|
|
27
27
|
var CheckboxButtonRoot = /*#__PURE__*/function (_Component) {
|
|
28
28
|
(0, _inherits2["default"])(CheckboxButtonRoot, _Component);
|
|
@@ -41,8 +41,8 @@ var _intergalacticDynamicLocales = require("../../translations/__intergalactic-d
|
|
|
41
41
|
var _noticeBubble = require("@semcore/notice-bubble");
|
|
42
42
|
var _excluded = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"];
|
|
43
43
|
/*__reshadow-styles__:"../../style/feedback-rating.shadow.css"*/
|
|
44
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
45
|
-
"__SFeedbackRating": "
|
|
44
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SFeedbackRating_k4kjq_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_k4kjq_gg_ li{list-style:none}" /*__inner_css_end__*/, "k4kjq_gg_") /*__reshadow_css_end__*/, {
|
|
45
|
+
"__SFeedbackRating": "___SFeedbackRating_k4kjq_gg_"
|
|
46
46
|
});
|
|
47
47
|
var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
48
48
|
(0, _inherits2["default"])(FeedbackRatingRoot, _Component);
|
|
@@ -22,13 +22,13 @@ var _uniqueID = _interopRequireDefault(require("@semcore/utils/lib/uniqueID"));
|
|
|
22
22
|
var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
|
|
23
23
|
var _intergalacticDynamicLocales = require("../../translations/__intergalactic-dynamic-locales");
|
|
24
24
|
/*__reshadow-styles__:"../../style/slider-rating.shadow.css"*/
|
|
25
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
26
|
-
"__SSliderRating": "
|
|
27
|
-
"__SStar": "
|
|
28
|
-
"_keyboardFocused": "
|
|
29
|
-
"_hovered": "
|
|
30
|
-
"_readonly": "
|
|
31
|
-
"_filled": "
|
|
25
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SSliderRating_18sxh_gg_ .___SStar_18sxh_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_18sxh_gg_.__keyboardFocused_18sxh_gg_ .___SStar_18sxh_gg_.__hovered_18sxh_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_18sxh_gg_ .___SStar_18sxh_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_18sxh_gg_.__keyboardFocused_18sxh_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}@media (hover:hover){.___SSliderRating_18sxh_gg_.__readonly_18sxh_gg_ .___SStar_18sxh_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_18sxh_gg_.__filled_18sxh_gg_:active{animation:wobble .8s ease-in-out}.___SStar_18sxh_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_18sxh_gg_.__filled_18sxh_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}" /*__inner_css_end__*/, "18sxh_gg_") /*__reshadow_css_end__*/, {
|
|
26
|
+
"__SSliderRating": "___SSliderRating_18sxh_gg_",
|
|
27
|
+
"__SStar": "___SStar_18sxh_gg_",
|
|
28
|
+
"_keyboardFocused": "__keyboardFocused_18sxh_gg_",
|
|
29
|
+
"_hovered": "__hovered_18sxh_gg_",
|
|
30
|
+
"_readonly": "__readonly_18sxh_gg_",
|
|
31
|
+
"_filled": "__filled_18sxh_gg_"
|
|
32
32
|
});
|
|
33
33
|
var MIN = 1;
|
|
34
34
|
var MAX = 5;
|
package/lib/es6/FeedbackForm.js
CHANGED
|
@@ -23,13 +23,13 @@ import { Box } from '@semcore/flex-box';
|
|
|
23
23
|
import { FeedbackItem } from './component/feedback-item/FeedbackItem';
|
|
24
24
|
import { SubmitButton } from './component/submit-button/SubmitButton';
|
|
25
25
|
/*__reshadow-styles__:"./style/feedback-form.shadow.css"*/
|
|
26
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
27
|
-
"__SFeedbackForm": "
|
|
28
|
-
"__SSubmit": "
|
|
29
|
-
"__SCancel": "
|
|
30
|
-
"__SNotice": "
|
|
31
|
-
"__SSuccess": "
|
|
32
|
-
"__SEmail": "
|
|
26
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SFeedbackForm_5hg5z_gg_{max-width:320px}.___SCancel_5hg5z_gg_,.___SSubmit_5hg5z_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_5hg5z_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_5hg5z_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_5hg5z_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__*/, "5hg5z_gg_") /*__reshadow_css_end__*/, {
|
|
27
|
+
"__SFeedbackForm": "___SFeedbackForm_5hg5z_gg_",
|
|
28
|
+
"__SSubmit": "___SSubmit_5hg5z_gg_",
|
|
29
|
+
"__SCancel": "___SCancel_5hg5z_gg_",
|
|
30
|
+
"__SNotice": "___SNotice_5hg5z_gg_",
|
|
31
|
+
"__SSuccess": "___SSuccess_5hg5z_gg_",
|
|
32
|
+
"__SEmail": "___SEmail_5hg5z_gg_"
|
|
33
33
|
});
|
|
34
34
|
var FeedbackForm = /*#__PURE__*/function (_Component) {
|
|
35
35
|
_inherits(FeedbackForm, _Component);
|
|
@@ -12,9 +12,9 @@ import React from 'react';
|
|
|
12
12
|
import createComponent, { Component, Root, sstyled } from '@semcore/core';
|
|
13
13
|
import { Box } from '@semcore/flex-box';
|
|
14
14
|
/*__reshadow-styles__:"../../style/checkbox-button.shadow.css"*/
|
|
15
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
16
|
-
"__SCheckboxButton": "
|
|
17
|
-
"_checked": "
|
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCheckboxButton_jto54_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_jto54_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_jto54_gg_.__checked_jto54_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_jto54_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_jto54_gg_.__checked_jto54_gg_:hover{background-color:rgba(0,143,248,.2)}}" /*__inner_css_end__*/, "jto54_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SCheckboxButton": "___SCheckboxButton_jto54_gg_",
|
|
17
|
+
"_checked": "__checked_jto54_gg_"
|
|
18
18
|
});
|
|
19
19
|
import Checkbox from '@semcore/checkbox';
|
|
20
20
|
var CheckboxButtonRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -36,8 +36,8 @@ import Input from '@semcore/input';
|
|
|
36
36
|
import { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';
|
|
37
37
|
import { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';
|
|
38
38
|
/*__reshadow-styles__:"../../style/feedback-rating.shadow.css"*/
|
|
39
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
40
|
-
"__SFeedbackRating": "
|
|
39
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SFeedbackRating_k4kjq_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_k4kjq_gg_ li{list-style:none}" /*__inner_css_end__*/, "k4kjq_gg_") /*__reshadow_css_end__*/, {
|
|
40
|
+
"__SFeedbackRating": "___SFeedbackRating_k4kjq_gg_"
|
|
41
41
|
});
|
|
42
42
|
var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
|
|
43
43
|
_inherits(FeedbackRatingRoot, _Component);
|
|
@@ -13,13 +13,13 @@ import React from 'react';
|
|
|
13
13
|
import createComponent, { Component, Root, sstyled } from '@semcore/core';
|
|
14
14
|
import { Flex, Box } from '@semcore/flex-box';
|
|
15
15
|
/*__reshadow-styles__:"../../style/slider-rating.shadow.css"*/
|
|
16
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
17
|
-
"__SSliderRating": "
|
|
18
|
-
"__SStar": "
|
|
19
|
-
"_keyboardFocused": "
|
|
20
|
-
"_hovered": "
|
|
21
|
-
"_readonly": "
|
|
22
|
-
"_filled": "
|
|
16
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SSliderRating_18sxh_gg_ .___SStar_18sxh_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_18sxh_gg_.__keyboardFocused_18sxh_gg_ .___SStar_18sxh_gg_.__hovered_18sxh_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_18sxh_gg_ .___SStar_18sxh_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_18sxh_gg_.__keyboardFocused_18sxh_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}@media (hover:hover){.___SSliderRating_18sxh_gg_.__readonly_18sxh_gg_ .___SStar_18sxh_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_18sxh_gg_.__filled_18sxh_gg_:active{animation:wobble .8s ease-in-out}.___SStar_18sxh_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_18sxh_gg_.__filled_18sxh_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}" /*__inner_css_end__*/, "18sxh_gg_") /*__reshadow_css_end__*/, {
|
|
17
|
+
"__SSliderRating": "___SSliderRating_18sxh_gg_",
|
|
18
|
+
"__SStar": "___SStar_18sxh_gg_",
|
|
19
|
+
"_keyboardFocused": "__keyboardFocused_18sxh_gg_",
|
|
20
|
+
"_hovered": "__hovered_18sxh_gg_",
|
|
21
|
+
"_readonly": "__readonly_18sxh_gg_",
|
|
22
|
+
"_filled": "__filled_18sxh_gg_"
|
|
23
23
|
});
|
|
24
24
|
import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
25
25
|
import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
|
package/lib/esm/FeedbackForm.mjs
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import
|
|
1
|
+
import x from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import d from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
3
|
+
import y from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import F from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import L from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import M from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import j from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import z from "@babel/runtime/helpers/esm/createSuper";
|
|
9
9
|
import l from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
-
import { sstyled as
|
|
11
|
-
import
|
|
10
|
+
import { sstyled as P } from "@semcore/utils/lib/core/index";
|
|
11
|
+
import N, { sstyled as u, Component as B, assignProps as h } from "@semcore/core";
|
|
12
12
|
import s from "react";
|
|
13
|
-
import { Form as f, Field as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { NoticeSmart as
|
|
13
|
+
import { Form as f, Field as I } from "react-final-form";
|
|
14
|
+
import Z from "final-form-focus";
|
|
15
|
+
import $ from "@semcore/button";
|
|
16
|
+
import A from "@semcore/spin-container";
|
|
17
|
+
import { NoticeSmart as D } from "@semcore/notice";
|
|
18
18
|
import { Box as S } from "@semcore/flex-box";
|
|
19
|
-
import { FeedbackItem as
|
|
20
|
-
import { SubmitButton as
|
|
19
|
+
import { FeedbackItem as O } from "./component/feedback-item/FeedbackItem.mjs";
|
|
20
|
+
import { SubmitButton as R } from "./component/submit-button/SubmitButton.mjs";
|
|
21
21
|
var V = ["Children", "styles", "forwardRef", "loading", "background", "theme"], v = (
|
|
22
22
|
/*__reshadow_css_start__*/
|
|
23
|
-
(
|
|
23
|
+
(P.insert(
|
|
24
24
|
/*__inner_css_start__*/
|
|
25
|
-
`.
|
|
26
|
-
"
|
|
25
|
+
`.___SFeedbackForm_5hg5z_gg_{max-width:320px}.___SCancel_5hg5z_gg_,.___SSubmit_5hg5z_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_5hg5z_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_5hg5z_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_5hg5z_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")}`,
|
|
26
|
+
"5hg5z_gg_"
|
|
27
27
|
), {
|
|
28
|
-
__SFeedbackForm: "
|
|
29
|
-
__SSubmit: "
|
|
30
|
-
__SCancel: "
|
|
31
|
-
__SNotice: "
|
|
32
|
-
__SSuccess: "
|
|
33
|
-
__SEmail: "
|
|
28
|
+
__SFeedbackForm: "___SFeedbackForm_5hg5z_gg_",
|
|
29
|
+
__SSubmit: "___SSubmit_5hg5z_gg_",
|
|
30
|
+
__SCancel: "___SCancel_5hg5z_gg_",
|
|
31
|
+
__SNotice: "___SNotice_5hg5z_gg_",
|
|
32
|
+
__SSuccess: "___SSuccess_5hg5z_gg_",
|
|
33
|
+
__SEmail: "___SEmail_5hg5z_gg_"
|
|
34
34
|
})
|
|
35
35
|
), c = /* @__PURE__ */ function(i) {
|
|
36
|
-
|
|
37
|
-
var a =
|
|
36
|
+
j(e, i);
|
|
37
|
+
var a = z(e);
|
|
38
38
|
function e() {
|
|
39
39
|
var r;
|
|
40
|
-
|
|
40
|
+
F(this, e);
|
|
41
41
|
for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
|
|
42
42
|
o[n] = arguments[n];
|
|
43
|
-
return r = a.call.apply(a, [this].concat(o)), l(
|
|
43
|
+
return r = a.call.apply(a, [this].concat(o)), l(M(r), "focusDecorator", Z()), r;
|
|
44
44
|
}
|
|
45
|
-
return
|
|
45
|
+
return L(e, [{
|
|
46
46
|
key: "getItemProps",
|
|
47
47
|
value: function() {
|
|
48
48
|
var t = this.asProps.validateOnBlur;
|
|
@@ -53,32 +53,32 @@ var V = ["Children", "styles", "forwardRef", "loading", "background", "theme"],
|
|
|
53
53
|
}, {
|
|
54
54
|
key: "render",
|
|
55
55
|
value: function() {
|
|
56
|
-
var t = S, o = this.asProps, n = o.Children,
|
|
57
|
-
return /* @__PURE__ */ s.createElement(f,
|
|
56
|
+
var t = S, o = this.asProps, n = o.Children, _ = o.styles, g = o.forwardRef, C = o.loading, E = o.background, w = o.theme, k = y(o, V);
|
|
57
|
+
return /* @__PURE__ */ s.createElement(f, x({
|
|
58
58
|
decorators: [this.focusDecorator]
|
|
59
|
-
}, k), function(
|
|
59
|
+
}, k), function(p) {
|
|
60
60
|
var m;
|
|
61
|
-
return m = u(
|
|
62
|
-
background:
|
|
63
|
-
theme:
|
|
61
|
+
return m = u(_), /* @__PURE__ */ s.createElement(A, m.cn("SpinContainer", {
|
|
62
|
+
background: E,
|
|
63
|
+
theme: w,
|
|
64
64
|
size: "xl",
|
|
65
|
-
loading:
|
|
65
|
+
loading: C === void 0 ? p.submitting : C
|
|
66
66
|
}), /* @__PURE__ */ s.createElement(t, m.cn("SFeedbackForm", d(d({
|
|
67
67
|
tag: "form",
|
|
68
68
|
noValidate: !0,
|
|
69
69
|
method: "POST",
|
|
70
|
-
ref:
|
|
70
|
+
ref: g
|
|
71
71
|
}, k), {}, {
|
|
72
|
-
onSubmit:
|
|
73
|
-
})), typeof n.origin == "function" ? n.origin(
|
|
72
|
+
onSubmit: p.handleSubmit
|
|
73
|
+
})), typeof n.origin == "function" ? n.origin(p) : /* @__PURE__ */ s.createElement(n, m.cn("Children", {}))));
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
}]), e;
|
|
77
|
-
}(
|
|
77
|
+
}(B);
|
|
78
78
|
l(c, "displayName", "FeedbackForm");
|
|
79
79
|
l(c, "style", v);
|
|
80
80
|
l(c, "FinalForm", {
|
|
81
|
-
Field:
|
|
81
|
+
Field: I,
|
|
82
82
|
Form: f
|
|
83
83
|
});
|
|
84
84
|
l(c, "defaultProps", {
|
|
@@ -103,7 +103,7 @@ l(c, "validate", {
|
|
|
103
103
|
});
|
|
104
104
|
function b(i) {
|
|
105
105
|
var a = arguments[0], e, r = i.Children, t = i.styles, o = S, n = "div";
|
|
106
|
-
return e = u(t), /* @__PURE__ */ s.createElement(o, e.cn("SSuccess", d({},
|
|
106
|
+
return e = u(t), /* @__PURE__ */ s.createElement(o, e.cn("SSuccess", d({}, h({
|
|
107
107
|
tabIndex: -1
|
|
108
108
|
}, a))), /* @__PURE__ */ s.createElement(n, e.cn("SEmail", {
|
|
109
109
|
"aria-hidden": !0
|
|
@@ -111,24 +111,24 @@ function b(i) {
|
|
|
111
111
|
}
|
|
112
112
|
b.style = v;
|
|
113
113
|
function H(i) {
|
|
114
|
-
var a = arguments[0], e, r = i.styles, t =
|
|
115
|
-
return e = u(r), /* @__PURE__ */ s.createElement(t, e.cn("SCancel", d({},
|
|
114
|
+
var a = arguments[0], e, r = i.styles, t = $;
|
|
115
|
+
return e = u(r), /* @__PURE__ */ s.createElement(t, e.cn("SCancel", d({}, h({
|
|
116
116
|
type: "reset",
|
|
117
117
|
use: "secondary",
|
|
118
118
|
theme: "muted"
|
|
119
119
|
}, a))));
|
|
120
120
|
}
|
|
121
121
|
function T(i) {
|
|
122
|
-
var a = arguments[0], e, r = i.styles, t = i.theme, o = t === void 0 ? "muted" : t, n = i.use,
|
|
123
|
-
return e = u(r), /* @__PURE__ */ s.createElement(
|
|
122
|
+
var a = arguments[0], e, r = i.styles, t = i.theme, o = t === void 0 ? "muted" : t, n = i.use, _ = n === void 0 ? "secondary" : n, g = D;
|
|
123
|
+
return e = u(r), /* @__PURE__ */ s.createElement(g, e.cn("SNotice", d({}, h({
|
|
124
124
|
"use:theme": o,
|
|
125
|
-
"use:use":
|
|
125
|
+
"use:use": _
|
|
126
126
|
}, a))));
|
|
127
127
|
}
|
|
128
|
-
const me =
|
|
129
|
-
Item:
|
|
128
|
+
const me = N(c, {
|
|
129
|
+
Item: O,
|
|
130
130
|
Success: b,
|
|
131
|
-
Submit:
|
|
131
|
+
Submit: R,
|
|
132
132
|
Cancel: H,
|
|
133
133
|
Notice: T
|
|
134
134
|
});
|
|
@@ -6,43 +6,43 @@ import k from "@babel/runtime/helpers/esm/inherits";
|
|
|
6
6
|
import v from "@babel/runtime/helpers/esm/createSuper";
|
|
7
7
|
import C from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
8
|
import { sstyled as y } from "@semcore/utils/lib/core/index";
|
|
9
|
-
import B, { sstyled as
|
|
10
|
-
import
|
|
11
|
-
import { Box as
|
|
9
|
+
import B, { sstyled as j, assignProps as S, Component as P } from "@semcore/core";
|
|
10
|
+
import r from "react";
|
|
11
|
+
import { Box as E } from "@semcore/flex-box";
|
|
12
12
|
import a from "@semcore/checkbox";
|
|
13
|
-
var
|
|
13
|
+
var R = ["styles", "id", "label", "type", "focused"], $ = (
|
|
14
14
|
/*__reshadow_css_start__*/
|
|
15
15
|
(y.insert(
|
|
16
16
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
18
|
-
"
|
|
17
|
+
".___SCheckboxButton_jto54_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_jto54_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_jto54_gg_.__checked_jto54_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_jto54_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_jto54_gg_.__checked_jto54_gg_:hover{background-color:rgba(0,143,248,.2)}}",
|
|
18
|
+
"jto54_gg_"
|
|
19
19
|
), {
|
|
20
|
-
__SCheckboxButton: "
|
|
21
|
-
_checked: "
|
|
20
|
+
__SCheckboxButton: "___SCheckboxButton_jto54_gg_",
|
|
21
|
+
_checked: "__checked_jto54_gg_"
|
|
22
22
|
})
|
|
23
23
|
), i = /* @__PURE__ */ function(n) {
|
|
24
|
-
k(
|
|
25
|
-
var s = v(
|
|
26
|
-
function
|
|
27
|
-
return x(this,
|
|
24
|
+
k(o, n);
|
|
25
|
+
var s = v(o);
|
|
26
|
+
function o() {
|
|
27
|
+
return x(this, o), s.apply(this, arguments);
|
|
28
28
|
}
|
|
29
|
-
return f(
|
|
29
|
+
return f(o, [{
|
|
30
30
|
key: "render",
|
|
31
31
|
value: function() {
|
|
32
|
-
var
|
|
32
|
+
var l = this.asProps, t, e = this.asProps, d = e.styles, c = e.id, p = e.label;
|
|
33
33
|
e.type;
|
|
34
|
-
var g = e.focused, u = h(e,
|
|
35
|
-
return t =
|
|
34
|
+
var g = e.focused, u = h(e, R), b = g ? 20 : !1, m = E;
|
|
35
|
+
return t = j(d), /* @__PURE__ */ r.createElement(m, t.cn("SCheckboxButton", _({}, S({
|
|
36
36
|
__excludeProps: ["onChange", "id", "type"]
|
|
37
|
-
},
|
|
37
|
+
}, l))), /* @__PURE__ */ r.createElement(a, t.cn("Checkbox", _({}, u)), /* @__PURE__ */ r.createElement(a.Value, {
|
|
38
38
|
autoFocus: b,
|
|
39
39
|
"aria-labelledby": c
|
|
40
|
-
}), /* @__PURE__ */
|
|
40
|
+
}), /* @__PURE__ */ r.createElement(a.Text, {
|
|
41
41
|
id: c
|
|
42
|
-
},
|
|
42
|
+
}, p)));
|
|
43
43
|
}
|
|
44
|
-
}]),
|
|
45
|
-
}(
|
|
44
|
+
}]), o;
|
|
45
|
+
}(P);
|
|
46
46
|
C(i, "style", $);
|
|
47
47
|
var K = B(i);
|
|
48
48
|
export {
|
|
@@ -8,9 +8,9 @@ import ne from "@babel/runtime/helpers/esm/inherits";
|
|
|
8
8
|
import ae from "@babel/runtime/helpers/esm/createSuper";
|
|
9
9
|
import s from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
10
|
import { sstyled as ie } from "@semcore/utils/lib/core/index";
|
|
11
|
-
import oe, { sstyled as B, assignProps as
|
|
11
|
+
import oe, { sstyled as B, assignProps as j, Component as le } from "@semcore/core";
|
|
12
12
|
import e from "react";
|
|
13
|
-
import { Field as
|
|
13
|
+
import { Field as H, Form as se } from "react-final-form";
|
|
14
14
|
import me from "final-form-focus";
|
|
15
15
|
import ce from "@semcore/spin-container";
|
|
16
16
|
import ue from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
@@ -20,14 +20,14 @@ import pe from "@semcore/icon/Check/m";
|
|
|
20
20
|
import fe from "@semcore/icon/Warning/m";
|
|
21
21
|
import { Text as P } from "@semcore/typography";
|
|
22
22
|
import he from "@semcore/illustration/Feedback";
|
|
23
|
-
import
|
|
23
|
+
import W from "@semcore/link";
|
|
24
24
|
import q from "../slider-rating/SliderRating.mjs";
|
|
25
25
|
import ge from "@semcore/modal";
|
|
26
26
|
import be from "@semcore/textarea";
|
|
27
|
-
import { Flex as
|
|
27
|
+
import { Flex as k, Box as N } from "@semcore/flex-box";
|
|
28
28
|
import { FeedbackItem as ve } from "../feedback-item/FeedbackItem.mjs";
|
|
29
|
-
import { SubmitButton as
|
|
30
|
-
import
|
|
29
|
+
import { SubmitButton as ke } from "../submit-button/SubmitButton.mjs";
|
|
30
|
+
import ye from "../checkbox-button/CheckboxButton.mjs";
|
|
31
31
|
import A from "@semcore/input";
|
|
32
32
|
import { localizedMessages as $ } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
33
33
|
import { NoticeBubbleManager as Ce, NoticeBubbleContainer as Ee } from "@semcore/notice-bubble";
|
|
@@ -35,12 +35,12 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
35
35
|
/*__reshadow_css_start__*/
|
|
36
36
|
(ie.insert(
|
|
37
37
|
/*__inner_css_start__*/
|
|
38
|
-
".
|
|
39
|
-
"
|
|
38
|
+
".___SFeedbackRating_k4kjq_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_k4kjq_gg_ li{list-style:none}",
|
|
39
|
+
"k4kjq_gg_"
|
|
40
40
|
), {
|
|
41
|
-
__SFeedbackRating: "
|
|
41
|
+
__SFeedbackRating: "___SFeedbackRating_k4kjq_gg_"
|
|
42
42
|
})
|
|
43
|
-
),
|
|
43
|
+
), y = /* @__PURE__ */ function(b) {
|
|
44
44
|
ne(o, b);
|
|
45
45
|
var p = ae(o);
|
|
46
46
|
function o() {
|
|
@@ -60,7 +60,7 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
60
60
|
};
|
|
61
61
|
}), s(f(n), "renderCheckbox", function(t, r) {
|
|
62
62
|
var m = n.props.initialValues[t.key];
|
|
63
|
-
return /* @__PURE__ */ e.createElement(
|
|
63
|
+
return /* @__PURE__ */ e.createElement(H, {
|
|
64
64
|
name: t.key,
|
|
65
65
|
initialValue: m,
|
|
66
66
|
type: "checkbox",
|
|
@@ -81,9 +81,9 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
81
81
|
mb: 2,
|
|
82
82
|
size: 200
|
|
83
83
|
}, t.label) : t.label, g = ((r = t.description) === null || r === void 0 ? void 0 : r.type) === e.Fragment;
|
|
84
|
-
return /* @__PURE__ */ e.createElement(
|
|
84
|
+
return /* @__PURE__ */ e.createElement(k, {
|
|
85
85
|
direction: "column"
|
|
86
|
-
}, /* @__PURE__ */ e.createElement(
|
|
86
|
+
}, /* @__PURE__ */ e.createElement(k, {
|
|
87
87
|
tag: "label",
|
|
88
88
|
mt: 4,
|
|
89
89
|
htmlFor: t.key,
|
|
@@ -169,39 +169,39 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
169
169
|
value: function() {
|
|
170
170
|
var i = this.asProps, v = this.asProps, a, t = this, r = this.asProps, m = r.header, h = r.submitText, g = r.formConfig, _ = r.notificationText, l = r.notificationTitle, F = r.learnMoreLink;
|
|
171
171
|
r.Children;
|
|
172
|
-
var
|
|
172
|
+
var w = r.styles, O = r.forwardRef, T = r.status, U = r.theme, G = r.background, R = r.rating, J = r.visible;
|
|
173
173
|
r.onVisibleChange;
|
|
174
|
-
var K = r.notificationVisible, Q = r.onNotificationClose, S = r.getI18nText,
|
|
174
|
+
var K = r.notificationVisible, Q = r.onNotificationClose, S = r.getI18nText, L = r.errorFeedbackEmail, M = r.modalWidth, z = ee(r, xe), X = ge, Y = g.filter(function(d) {
|
|
175
175
|
return d.type === "checkbox";
|
|
176
176
|
}), Z = g.filter(function(d) {
|
|
177
177
|
return d.type === "textarea" || d.type === "input" || d.type === "email";
|
|
178
|
-
}),
|
|
179
|
-
return a = B(
|
|
178
|
+
}), D = this.getNoticeTextId();
|
|
179
|
+
return a = B(w), /* @__PURE__ */ e.createElement(N, j({}, v), /* @__PURE__ */ e.createElement(u, a.cn("Notice", {
|
|
180
180
|
visible: K,
|
|
181
181
|
"aria-label": S("leaveFeedback"),
|
|
182
|
-
tag:
|
|
182
|
+
tag: k,
|
|
183
183
|
alignItems: l ? "flex-start" : "center"
|
|
184
184
|
}), /* @__PURE__ */ e.createElement(u.Label, {
|
|
185
185
|
mr: 3,
|
|
186
186
|
"aria-hidden": !0
|
|
187
187
|
}, /* @__PURE__ */ e.createElement(he, a.cn("FeedbackIllustration", {}))), /* @__PURE__ */ e.createElement(u.Content, null, l ? /* @__PURE__ */ e.createElement(u.Title, null, l) : null, /* @__PURE__ */ e.createElement(u.Text, {
|
|
188
|
-
tag:
|
|
188
|
+
tag: k,
|
|
189
189
|
alignItems: l ? "flex-start" : "center"
|
|
190
190
|
}, /* @__PURE__ */ e.createElement(P, a.cn("Text", {
|
|
191
191
|
mr: 3,
|
|
192
|
-
id:
|
|
192
|
+
id: D
|
|
193
193
|
}), _), /* @__PURE__ */ e.createElement(u.Actions, {
|
|
194
194
|
mt: 0
|
|
195
195
|
}, /* @__PURE__ */ e.createElement(q, a.cn("SliderRating", {
|
|
196
196
|
value: R,
|
|
197
197
|
onChange: this.handleChangeRating,
|
|
198
|
-
"aria-labelledby":
|
|
199
|
-
}))), F && /* @__PURE__ */ e.createElement(
|
|
198
|
+
"aria-labelledby": D
|
|
199
|
+
}))), F && /* @__PURE__ */ e.createElement(W, a.cn("Link", {
|
|
200
200
|
ml: 3,
|
|
201
201
|
href: F
|
|
202
202
|
}), S("learnMore")))), /* @__PURE__ */ e.createElement(u.Close, {
|
|
203
203
|
onClick: Q
|
|
204
|
-
})), /* @__PURE__ */ e.createElement(X, a.cn("SFeedbackRating", x({},
|
|
204
|
+
})), /* @__PURE__ */ e.createElement(X, a.cn("SFeedbackRating", x({}, j({
|
|
205
205
|
visible: J,
|
|
206
206
|
onClose: this.handelCloseModal,
|
|
207
207
|
p: 0,
|
|
@@ -209,16 +209,16 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
209
209
|
"aria-labelledby": this.headerId
|
|
210
210
|
}, i))), /* @__PURE__ */ e.createElement(se, a.cn("Form", x({
|
|
211
211
|
decorators: [this.focusDecorator]
|
|
212
|
-
},
|
|
212
|
+
}, z)), function(d) {
|
|
213
213
|
var c;
|
|
214
|
-
return c = B(
|
|
214
|
+
return c = B(w), /* @__PURE__ */ e.createElement(ce, c.cn("SpinContainer", {
|
|
215
215
|
background: G,
|
|
216
216
|
theme: U,
|
|
217
217
|
size: "xl",
|
|
218
218
|
loading: T !== "loading" ? d.submitting : T === "loading",
|
|
219
219
|
p: 1,
|
|
220
220
|
m: 9
|
|
221
|
-
}), /* @__PURE__ */ e.createElement(
|
|
221
|
+
}), /* @__PURE__ */ e.createElement(k, c.cn("Flex", {
|
|
222
222
|
justifyContent: "center"
|
|
223
223
|
}), /* @__PURE__ */ e.createElement(q, c.cn("SliderRating", {
|
|
224
224
|
value: R,
|
|
@@ -228,9 +228,9 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
228
228
|
noValidate: !0,
|
|
229
229
|
method: "POST",
|
|
230
230
|
ref: O
|
|
231
|
-
},
|
|
231
|
+
}, z), {}, {
|
|
232
232
|
onSubmit: d.handleSubmit
|
|
233
|
-
})), /* @__PURE__ */ e.createElement(
|
|
233
|
+
})), /* @__PURE__ */ e.createElement(H, c.cn("Field", {
|
|
234
234
|
name: "rating",
|
|
235
235
|
initialValue: R
|
|
236
236
|
}), function(C) {
|
|
@@ -252,10 +252,10 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
252
252
|
}), /* @__PURE__ */ e.createElement(u.Label, null, /* @__PURE__ */ e.createElement(fe, c.cn("WarnM", {}))), /* @__PURE__ */ e.createElement(u.Content, null, S("errorMessage", {
|
|
253
253
|
// todo: Brauer Ilia - think how to fix type
|
|
254
254
|
// @ts-ignore
|
|
255
|
-
email: /* @__PURE__ */ e.createElement(
|
|
256
|
-
href: "mailto:".concat(
|
|
257
|
-
}),
|
|
258
|
-
}))), /* @__PURE__ */ e.createElement(
|
|
255
|
+
email: /* @__PURE__ */ e.createElement(W, c.cn("Link", {
|
|
256
|
+
href: "mailto:".concat(L)
|
|
257
|
+
}), L)
|
|
258
|
+
}))), /* @__PURE__ */ e.createElement(k, c.cn("Flex", {
|
|
259
259
|
mt: 4,
|
|
260
260
|
justifyContent: "center"
|
|
261
261
|
}), /* @__PURE__ */ e.createElement(E.Submit, {
|
|
@@ -268,16 +268,16 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
|
268
268
|
}
|
|
269
269
|
}]), o;
|
|
270
270
|
}(le);
|
|
271
|
-
s(
|
|
272
|
-
s(
|
|
273
|
-
s(
|
|
274
|
-
s(
|
|
271
|
+
s(y, "displayName", "FeedbackRatingForm");
|
|
272
|
+
s(y, "style", _e);
|
|
273
|
+
s(y, "enhance", [ue($), de()]);
|
|
274
|
+
s(y, "defaultProps", {
|
|
275
275
|
onSubmit: function() {
|
|
276
276
|
},
|
|
277
277
|
i18n: $,
|
|
278
278
|
locale: "en"
|
|
279
279
|
});
|
|
280
|
-
s(
|
|
280
|
+
s(y, "validate", {
|
|
281
281
|
description: function(p) {
|
|
282
282
|
return function() {
|
|
283
283
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", n = o.split(/\s+/), i = n.join(" ");
|
|
@@ -295,7 +295,7 @@ s(k, "validate", {
|
|
|
295
295
|
});
|
|
296
296
|
function Fe(b) {
|
|
297
297
|
var p = arguments[0], o, n = b.styles, i = P;
|
|
298
|
-
return o = B(n), /* @__PURE__ */ e.createElement(i, o.cn("SHeader", x({},
|
|
298
|
+
return o = B(n), /* @__PURE__ */ e.createElement(i, o.cn("SHeader", x({}, j({
|
|
299
299
|
size: 300,
|
|
300
300
|
tag: "h2",
|
|
301
301
|
mb: 4,
|
|
@@ -303,11 +303,11 @@ function Fe(b) {
|
|
|
303
303
|
textAlign: "center"
|
|
304
304
|
}, p))));
|
|
305
305
|
}
|
|
306
|
-
var E = oe(
|
|
306
|
+
var E = oe(y, {
|
|
307
307
|
Header: Fe,
|
|
308
308
|
Item: ve,
|
|
309
|
-
Checkbox:
|
|
310
|
-
Submit:
|
|
309
|
+
Checkbox: ye,
|
|
310
|
+
Submit: ke
|
|
311
311
|
});
|
|
312
312
|
export {
|
|
313
313
|
E as default
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { sstyled as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import I from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import F from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import C from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import c from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
|
+
import T from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import A from "@babel/runtime/helpers/esm/createSuper";
|
|
7
|
+
import s from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import { sstyled as D } from "@semcore/utils/lib/core/index";
|
|
9
|
+
import $, { assignProps as y, sstyled as E, Component as z } from "@semcore/core";
|
|
10
|
+
import _ from "react";
|
|
11
11
|
import { Box as R, Flex as K } from "@semcore/flex-box";
|
|
12
12
|
import N from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
|
|
13
13
|
import Z from "@semcore/utils/lib/uniqueID";
|
|
14
14
|
import B from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
15
|
-
import { localizedMessages as
|
|
15
|
+
import { localizedMessages as P } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
16
16
|
var j = (
|
|
17
17
|
/*__reshadow_css_start__*/
|
|
18
|
-
(
|
|
18
|
+
(D.insert(
|
|
19
19
|
/*__inner_css_start__*/
|
|
20
|
-
".
|
|
21
|
-
"
|
|
20
|
+
".___SSliderRating_18sxh_gg_ .___SStar_18sxh_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_18sxh_gg_.__keyboardFocused_18sxh_gg_ .___SStar_18sxh_gg_.__hovered_18sxh_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_18sxh_gg_ .___SStar_18sxh_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_18sxh_gg_.__keyboardFocused_18sxh_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}@media (hover:hover){.___SSliderRating_18sxh_gg_.__readonly_18sxh_gg_ .___SStar_18sxh_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_18sxh_gg_.__filled_18sxh_gg_:active{animation:wobble .8s ease-in-out}.___SStar_18sxh_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_18sxh_gg_.__filled_18sxh_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}",
|
|
21
|
+
"18sxh_gg_"
|
|
22
22
|
), {
|
|
23
|
-
__SSliderRating: "
|
|
24
|
-
__SStar: "
|
|
25
|
-
_keyboardFocused: "
|
|
26
|
-
_hovered: "
|
|
27
|
-
_readonly: "
|
|
28
|
-
_filled: "
|
|
23
|
+
__SSliderRating: "___SSliderRating_18sxh_gg_",
|
|
24
|
+
__SStar: "___SStar_18sxh_gg_",
|
|
25
|
+
_keyboardFocused: "__keyboardFocused_18sxh_gg_",
|
|
26
|
+
_hovered: "__hovered_18sxh_gg_",
|
|
27
|
+
_readonly: "__readonly_18sxh_gg_",
|
|
28
|
+
_filled: "__filled_18sxh_gg_"
|
|
29
29
|
})
|
|
30
|
-
),
|
|
31
|
-
|
|
32
|
-
var f =
|
|
30
|
+
), p = 1, g = 5, v = /* @__PURE__ */ function(u) {
|
|
31
|
+
T(l, u);
|
|
32
|
+
var f = A(l);
|
|
33
33
|
function l() {
|
|
34
34
|
var e;
|
|
35
|
-
|
|
36
|
-
for (var o = arguments.length,
|
|
37
|
-
t
|
|
38
|
-
return e = f.call.apply(f, [this].concat(
|
|
35
|
+
F(this, l);
|
|
36
|
+
for (var o = arguments.length, r = new Array(o), t = 0; t < o; t++)
|
|
37
|
+
r[t] = arguments[t];
|
|
38
|
+
return e = f.call.apply(f, [this].concat(r)), s(c(e), "state", {
|
|
39
39
|
hoveredIndex: -1,
|
|
40
40
|
clickedIndex: -1
|
|
41
|
-
}),
|
|
41
|
+
}), s(c(e), "handleClick", function(a) {
|
|
42
42
|
return function(n) {
|
|
43
43
|
var i = e.asProps.readonly;
|
|
44
44
|
i || e.setValue(a);
|
|
45
45
|
};
|
|
46
|
-
}),
|
|
46
|
+
}), s(c(e), "handleMouseEnder", function(a) {
|
|
47
47
|
return function() {
|
|
48
48
|
e.setState({
|
|
49
49
|
hoveredIndex: a
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
}),
|
|
52
|
+
}), s(c(e), "handleMouseLeave", function() {
|
|
53
53
|
e.setState({
|
|
54
54
|
hoveredIndex: -1
|
|
55
55
|
});
|
|
56
|
-
}),
|
|
57
|
-
var n = e.asProps, i = n.onChange,
|
|
58
|
-
i && i(a), a <=
|
|
56
|
+
}), s(c(e), "setValue", function(a) {
|
|
57
|
+
var n = e.asProps, i = n.onChange, h = n.value;
|
|
58
|
+
i && i(a), a <= h ? e.setState({
|
|
59
59
|
clickedIndex: a,
|
|
60
60
|
hoveredIndex: -1
|
|
61
61
|
}) : e.setState({
|
|
62
62
|
clickedIndex: -1,
|
|
63
63
|
hoveredIndex: -1
|
|
64
64
|
});
|
|
65
|
-
}),
|
|
65
|
+
}), s(c(e), "handleKeyDown", function(a) {
|
|
66
66
|
if (["ArrowLeft", "ArrowRight", "Enter"].includes(a.key))
|
|
67
67
|
if (a.preventDefault(), a.key === "Enter") {
|
|
68
68
|
var n = e.state.hoveredIndex;
|
|
69
69
|
e.setValue(n + 1);
|
|
70
70
|
} else {
|
|
71
|
-
var i = e.asProps.value,
|
|
72
|
-
d > g && (d = g), d <
|
|
71
|
+
var i = e.asProps.value, h = e.state.hoveredIndex, m = a.key === "ArrowLeft" ? -1 : 1, d = h === -1 ? i + m : h + 1 + m;
|
|
72
|
+
d > g && (d = g), d < p && (d = p), e.setState({
|
|
73
73
|
hoveredIndex: d - 1
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
}), e;
|
|
77
77
|
}
|
|
78
|
-
return
|
|
78
|
+
return C(l, [{
|
|
79
79
|
key: "getStarProps",
|
|
80
|
-
value: function(o,
|
|
81
|
-
var
|
|
80
|
+
value: function(o, r) {
|
|
81
|
+
var t = this.asProps, a = t.value, n = t.readonly, i = this.state.hoveredIndex;
|
|
82
82
|
return {
|
|
83
|
-
filled: a &&
|
|
84
|
-
onClick: this.handleClick(
|
|
85
|
-
onMouseEnter: n ? void 0 : this.handleMouseEnder(
|
|
86
|
-
hovered: i ===
|
|
83
|
+
filled: a && r + 1 <= a || r <= i,
|
|
84
|
+
onClick: this.handleClick(r + 1),
|
|
85
|
+
onMouseEnter: n ? void 0 : this.handleMouseEnder(r),
|
|
86
|
+
hovered: i === r
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
}, {
|
|
90
90
|
key: "getLabelText",
|
|
91
91
|
value: function() {
|
|
92
|
-
var o = this.state.hoveredIndex,
|
|
93
|
-
if (
|
|
92
|
+
var o = this.state.hoveredIndex, r = this.asProps, t = r.readonly, a = r.value, n = r.getI18nText;
|
|
93
|
+
if (t)
|
|
94
94
|
return n("FeedbackRating.SliderRating.aria-valuetext.readonly", {
|
|
95
95
|
selectedRating: a,
|
|
96
96
|
max: g
|
|
@@ -110,49 +110,49 @@ var j = (
|
|
|
110
110
|
}, {
|
|
111
111
|
key: "render",
|
|
112
112
|
value: function() {
|
|
113
|
-
var o = this.asProps,
|
|
113
|
+
var o = this.asProps, r, t = this.asProps, a = t.styles, n = t.readonly, i = t.getI18nText, h = t.value, m = this.state.hoveredIndex, d = K, x = this.getLabelText();
|
|
114
114
|
if (n)
|
|
115
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ _.createElement(d, y({
|
|
116
116
|
gap: 1,
|
|
117
117
|
role: "img",
|
|
118
|
-
"aria-label":
|
|
118
|
+
"aria-label": x,
|
|
119
119
|
"use:tabIndex": -1
|
|
120
|
-
}, o), new Array(g).fill(null).map(function(
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
-
key:
|
|
120
|
+
}, o), new Array(g).fill(null).map(function(M, S) {
|
|
121
|
+
return /* @__PURE__ */ _.createElement(R, {
|
|
122
|
+
key: S,
|
|
123
123
|
position: "relative"
|
|
124
|
-
}, /* @__PURE__ */
|
|
124
|
+
}, /* @__PURE__ */ _.createElement(k.Star, null));
|
|
125
125
|
}));
|
|
126
|
-
var
|
|
127
|
-
return
|
|
126
|
+
var b = m + 1, L = b > 0 || h ? "".concat(x, ". ").concat(i("FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber"), ".") : x;
|
|
127
|
+
return r = E(a), /* @__PURE__ */ _.createElement(d, r.cn("SSliderRating", I({}, y({
|
|
128
128
|
gap: 1,
|
|
129
129
|
onMouseLeave: this.handleMouseLeave,
|
|
130
130
|
onKeyDown: this.handleKeyDown,
|
|
131
131
|
role: "slider",
|
|
132
132
|
"aria-orientation": "horizontal",
|
|
133
|
-
"aria-valuemin":
|
|
133
|
+
"aria-valuemin": p,
|
|
134
134
|
"aria-valuemax": g,
|
|
135
|
-
"aria-valuetext":
|
|
136
|
-
"aria-valuenow":
|
|
137
|
-
}, o))), new Array(g).fill(null).map(function(
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
key:
|
|
135
|
+
"aria-valuetext": L,
|
|
136
|
+
"aria-valuenow": b
|
|
137
|
+
}, o))), new Array(g).fill(null).map(function(M, S) {
|
|
138
|
+
return /* @__PURE__ */ _.createElement(R, {
|
|
139
|
+
key: S,
|
|
140
140
|
position: "relative"
|
|
141
|
-
}, /* @__PURE__ */
|
|
141
|
+
}, /* @__PURE__ */ _.createElement(k.Star, null));
|
|
142
142
|
}));
|
|
143
143
|
}
|
|
144
144
|
}]), l;
|
|
145
|
-
}(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
i18n:
|
|
145
|
+
}(z);
|
|
146
|
+
s(v, "displayName", "SliderRating");
|
|
147
|
+
s(v, "style", j);
|
|
148
|
+
s(v, "enhance", [N(), Z(), B(P)]);
|
|
149
|
+
s(v, "defaultProps", {
|
|
150
|
+
i18n: P,
|
|
151
151
|
locale: "en"
|
|
152
152
|
});
|
|
153
|
-
function
|
|
153
|
+
function w(u) {
|
|
154
154
|
var f = arguments[0], l, e = R;
|
|
155
|
-
return l =
|
|
155
|
+
return l = E(u.styles), /* @__PURE__ */ _.createElement(e, l.cn("SStar", I({}, y({
|
|
156
156
|
tag: "svg",
|
|
157
157
|
role: "none",
|
|
158
158
|
width: "24",
|
|
@@ -160,18 +160,18 @@ function P(h) {
|
|
|
160
160
|
viewBox: "0 0 24 24",
|
|
161
161
|
fill: "none",
|
|
162
162
|
xmlns: "http://www.w3.org/2000/svg"
|
|
163
|
-
}, f))),
|
|
163
|
+
}, f))), u.filled ? /* @__PURE__ */ _.createElement("path", l.cn("path", {
|
|
164
164
|
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"
|
|
165
|
-
})) : /* @__PURE__ */
|
|
165
|
+
})) : /* @__PURE__ */ _.createElement("path", l.cn("path", {
|
|
166
166
|
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",
|
|
167
167
|
fillRule: "evenodd",
|
|
168
168
|
clipRule: "evenodd"
|
|
169
169
|
})));
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
var
|
|
173
|
-
Star:
|
|
171
|
+
w.displayName = "Star";
|
|
172
|
+
var k = $(v, {
|
|
173
|
+
Star: w
|
|
174
174
|
});
|
|
175
175
|
export {
|
|
176
|
-
|
|
176
|
+
k as default
|
|
177
177
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/feedback-form",
|
|
3
3
|
"description": "Semrush Feedback Form Component",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.42.0-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@semcore/checkbox": "7.44.2",
|
|
18
|
-
"@semcore/notice-bubble": "5.
|
|
19
|
-
"@semcore/typography": "5.
|
|
18
|
+
"@semcore/notice-bubble": "5.54.0-prerelease.0",
|
|
19
|
+
"@semcore/typography": "5.53.0-prerelease.0",
|
|
20
20
|
"@semcore/link": "5.44.2",
|
|
21
|
-
"@semcore/modal": "4.
|
|
21
|
+
"@semcore/modal": "4.56.0-prerelease.0",
|
|
22
22
|
"@semcore/illustration": "2.44.0",
|
|
23
|
-
"@semcore/icon": "4.
|
|
23
|
+
"@semcore/icon": "4.61.0-prerelease.0",
|
|
24
24
|
"@semcore/textarea": "5.40.2",
|
|
25
25
|
"@semcore/input": "4.42.2",
|
|
26
26
|
"final-form": "4.20.7",
|
|
27
27
|
"@semcore/button": "5.43.1",
|
|
28
28
|
"@semcore/flex-box": "5.41.2",
|
|
29
|
-
"@semcore/notice": "5.
|
|
29
|
+
"@semcore/notice": "5.47.0-prerelease.0",
|
|
30
30
|
"@semcore/spin-container": "7.41.2",
|
|
31
31
|
"@semcore/tooltip": "6.49.2",
|
|
32
32
|
"@semcore/utils": "4.48.2",
|