@semcore/feedback-form 6.39.0-prerelease.4 → 6.39.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 +3 -3
- package/lib/esm/FeedbackForm.mjs +137 -0
- package/lib/esm/component/checkbox-button/CheckboxButton.mjs +50 -0
- package/lib/esm/component/feedback-item/FeedbackItem.mjs +45 -0
- package/lib/esm/component/feedback-rating/FeedbackRating.mjs +310 -0
- package/lib/esm/component/slider-rating/SliderRating.mjs +173 -0
- package/lib/esm/component/submit-button/SubmitButton.mjs +15 -0
- package/lib/esm/index.mjs +6 -0
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +33 -0
- package/lib/esm/translations/de.json.mjs +21 -0
- package/lib/esm/translations/en.json.mjs +21 -0
- package/lib/esm/translations/es.json.mjs +21 -0
- package/lib/esm/translations/fr.json.mjs +21 -0
- package/lib/esm/translations/it.json.mjs +21 -0
- package/lib/esm/translations/ja.json.mjs +21 -0
- package/lib/esm/translations/ko.json.mjs +21 -0
- package/lib/esm/translations/nl.json.mjs +21 -0
- package/lib/esm/translations/pl.json.mjs +21 -0
- package/lib/esm/translations/pt.json.mjs +21 -0
- package/lib/esm/translations/sv.json.mjs +21 -0
- package/lib/esm/translations/tr.json.mjs +21 -0
- package/lib/esm/translations/vi.json.mjs +21 -0
- package/lib/esm/translations/zh.json.mjs +21 -0
- package/package.json +23 -18
- package/vite.config.ts +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [6.39.0] - 2025-
|
|
5
|
+
## [6.39.0] - 2025-03-14
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Added
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- Build for ESM.
|
|
10
10
|
|
|
11
11
|
## [6.38.5] - 2025-02-05
|
|
12
12
|
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import E from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import d from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import x 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 P from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import l from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
+
import { sstyled as N } from "@semcore/utils/lib/core/index";
|
|
11
|
+
import B, { sstyled as u, Component as I, assignProps as g } from "@semcore/core";
|
|
12
|
+
import s from "react";
|
|
13
|
+
import { Form as f, Field as Z } from "react-final-form";
|
|
14
|
+
import $ from "final-form-focus";
|
|
15
|
+
import A from "@semcore/button";
|
|
16
|
+
import D from "@semcore/spin-container";
|
|
17
|
+
import { NoticeSmart as O } from "@semcore/notice";
|
|
18
|
+
import { Box as S } from "@semcore/flex-box";
|
|
19
|
+
import { FeedbackItem as R } from "./component/feedback-item/FeedbackItem.mjs";
|
|
20
|
+
import { SubmitButton as z } from "./component/submit-button/SubmitButton.mjs";
|
|
21
|
+
var V = ["Children", "styles", "forwardRef", "loading", "background", "theme"], v = (
|
|
22
|
+
/*__reshadow_css_start__*/
|
|
23
|
+
(N.insert(
|
|
24
|
+
/*__inner_css_start__*/
|
|
25
|
+
`.___SFeedbackForm_5lwey_gg_{max-width:320px}.___SCancel_5lwey_gg_,.___SSubmit_5lwey_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_5lwey_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_5lwey_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_5lwey_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
|
+
"5lwey_gg_"
|
|
27
|
+
), {
|
|
28
|
+
__SFeedbackForm: "___SFeedbackForm_5lwey_gg_",
|
|
29
|
+
__SSubmit: "___SSubmit_5lwey_gg_",
|
|
30
|
+
__SCancel: "___SCancel_5lwey_gg_",
|
|
31
|
+
__SNotice: "___SNotice_5lwey_gg_",
|
|
32
|
+
__SSuccess: "___SSuccess_5lwey_gg_",
|
|
33
|
+
__SEmail: "___SEmail_5lwey_gg_"
|
|
34
|
+
})
|
|
35
|
+
), c = /* @__PURE__ */ function(i) {
|
|
36
|
+
j(e, i);
|
|
37
|
+
var a = P(e);
|
|
38
|
+
function e() {
|
|
39
|
+
var r;
|
|
40
|
+
F(this, e);
|
|
41
|
+
for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
|
|
42
|
+
o[n] = arguments[n];
|
|
43
|
+
return r = a.call.apply(a, [this].concat(o)), l(M(r), "focusDecorator", $()), r;
|
|
44
|
+
}
|
|
45
|
+
return L(e, [{
|
|
46
|
+
key: "getItemProps",
|
|
47
|
+
value: function() {
|
|
48
|
+
var t = this.asProps.validateOnBlur;
|
|
49
|
+
return {
|
|
50
|
+
validateOnBlur: t
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
key: "render",
|
|
55
|
+
value: function() {
|
|
56
|
+
var t = S, o = this.asProps, n = o.Children, _ = o.styles, p = o.forwardRef, h = o.loading, b = o.background, y = o.theme, k = x(o, V);
|
|
57
|
+
return /* @__PURE__ */ s.createElement(f, E({
|
|
58
|
+
decorators: [this.focusDecorator]
|
|
59
|
+
}, k), function(C) {
|
|
60
|
+
var m;
|
|
61
|
+
return m = u(_), /* @__PURE__ */ s.createElement(D, m.cn("SpinContainer", {
|
|
62
|
+
background: b,
|
|
63
|
+
theme: y,
|
|
64
|
+
size: "xl",
|
|
65
|
+
loading: h === void 0 ? C.submitting : h
|
|
66
|
+
}), /* @__PURE__ */ s.createElement(t, m.cn("SFeedbackForm", d(d({
|
|
67
|
+
tag: "form",
|
|
68
|
+
noValidate: !0,
|
|
69
|
+
method: "POST",
|
|
70
|
+
ref: p
|
|
71
|
+
}, k), {}, {
|
|
72
|
+
onSubmit: C.handleSubmit
|
|
73
|
+
})), typeof n.origin == "function" ? n.origin(C) : /* @__PURE__ */ s.createElement(n, m.cn("Children", {}))));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}]), e;
|
|
77
|
+
}(I);
|
|
78
|
+
l(c, "displayName", "FeedbackForm");
|
|
79
|
+
l(c, "style", v);
|
|
80
|
+
l(c, "FinalForm", {
|
|
81
|
+
Field: Z,
|
|
82
|
+
Form: f
|
|
83
|
+
});
|
|
84
|
+
l(c, "defaultProps", {
|
|
85
|
+
onSubmit: function() {
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
l(c, "validate", {
|
|
89
|
+
description: function(a) {
|
|
90
|
+
return function() {
|
|
91
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", r = e.split(/\s+/), t = r.join(" ");
|
|
92
|
+
if (t.length < 10 || r.length < 3)
|
|
93
|
+
return a;
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
email: function(a) {
|
|
97
|
+
return function() {
|
|
98
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
99
|
+
if (!/.+@.+\..+/i.test(String(e).toLowerCase()))
|
|
100
|
+
return a;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function w(i) {
|
|
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({}, g({
|
|
107
|
+
tabIndex: -1
|
|
108
|
+
}, a))), /* @__PURE__ */ s.createElement(n, e.cn("SEmail", {
|
|
109
|
+
"aria-hidden": !0
|
|
110
|
+
})), /* @__PURE__ */ s.createElement("span", e.cn("span", {}), /* @__PURE__ */ s.createElement(r, e.cn("Children", {}))));
|
|
111
|
+
}
|
|
112
|
+
w.style = v;
|
|
113
|
+
function H(i) {
|
|
114
|
+
var a = arguments[0], e, r = i.styles, t = A;
|
|
115
|
+
return e = u(r), /* @__PURE__ */ s.createElement(t, e.cn("SCancel", d({}, g({
|
|
116
|
+
type: "reset",
|
|
117
|
+
use: "secondary",
|
|
118
|
+
theme: "muted"
|
|
119
|
+
}, a))));
|
|
120
|
+
}
|
|
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, _ = n === void 0 ? "secondary" : n, p = O;
|
|
123
|
+
return e = u(r), /* @__PURE__ */ s.createElement(p, e.cn("SNotice", d({}, g({
|
|
124
|
+
"use:theme": o,
|
|
125
|
+
"use:use": _
|
|
126
|
+
}, a))));
|
|
127
|
+
}
|
|
128
|
+
const me = B(c, {
|
|
129
|
+
Item: R,
|
|
130
|
+
Success: w,
|
|
131
|
+
Submit: z,
|
|
132
|
+
Cancel: H,
|
|
133
|
+
Notice: T
|
|
134
|
+
});
|
|
135
|
+
export {
|
|
136
|
+
me as default
|
|
137
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _ from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import m from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import x from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import f from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import k from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import v from "@babel/runtime/helpers/esm/createSuper";
|
|
7
|
+
import C from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import { sstyled as y } from "@semcore/utils/lib/core/index";
|
|
9
|
+
import B, { sstyled as w, assignProps as S, Component as P } from "@semcore/core";
|
|
10
|
+
import r from "react";
|
|
11
|
+
import { Box as E } from "@semcore/flex-box";
|
|
12
|
+
import a from "@semcore/checkbox";
|
|
13
|
+
var R = ["styles", "id", "label", "type", "focused"], j = (
|
|
14
|
+
/*__reshadow_css_start__*/
|
|
15
|
+
(y.insert(
|
|
16
|
+
/*__inner_css_start__*/
|
|
17
|
+
".___SCheckboxButton_1owh2_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_1owh2_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_1owh2_gg_.__checked_1owh2_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_1owh2_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_1owh2_gg_.__checked_1owh2_gg_:hover{background-color:rgba(0,143,248,.2)}}",
|
|
18
|
+
"1owh2_gg_"
|
|
19
|
+
), {
|
|
20
|
+
__SCheckboxButton: "___SCheckboxButton_1owh2_gg_",
|
|
21
|
+
_checked: "__checked_1owh2_gg_"
|
|
22
|
+
})
|
|
23
|
+
), i = /* @__PURE__ */ function(n) {
|
|
24
|
+
k(o, n);
|
|
25
|
+
var s = v(o);
|
|
26
|
+
function o() {
|
|
27
|
+
return x(this, o), s.apply(this, arguments);
|
|
28
|
+
}
|
|
29
|
+
return f(o, [{
|
|
30
|
+
key: "render",
|
|
31
|
+
value: function() {
|
|
32
|
+
var l = this.asProps, t, e = this.asProps, d = e.styles, c = e.id, h = e.label;
|
|
33
|
+
e.type;
|
|
34
|
+
var p = e.focused, g = m(e, R), u = p ? 20 : !1, b = E;
|
|
35
|
+
return t = w(d), /* @__PURE__ */ r.createElement(b, t.cn("SCheckboxButton", _({}, S({
|
|
36
|
+
__excludeProps: ["onChange", "id", "type"]
|
|
37
|
+
}, l))), /* @__PURE__ */ r.createElement(a, t.cn("Checkbox", _({}, g)), /* @__PURE__ */ r.createElement(a.Value, {
|
|
38
|
+
autoFocus: u,
|
|
39
|
+
"aria-labelledby": c
|
|
40
|
+
}), /* @__PURE__ */ r.createElement(a.Text, {
|
|
41
|
+
id: c
|
|
42
|
+
}, h)));
|
|
43
|
+
}
|
|
44
|
+
}]), o;
|
|
45
|
+
}(P);
|
|
46
|
+
C(i, "style", j);
|
|
47
|
+
var K = B(i);
|
|
48
|
+
export {
|
|
49
|
+
K as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import b from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import p from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import h from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import t from "react";
|
|
5
|
+
import { Field as C } from "react-final-form";
|
|
6
|
+
import d from "@semcore/tooltip";
|
|
7
|
+
import k from "@semcore/utils/lib/pick";
|
|
8
|
+
import I from "@semcore/utils/lib/uniqueID";
|
|
9
|
+
import { assignProps as L } from "@semcore/utils/lib/core";
|
|
10
|
+
import R from "@semcore/utils/lib/propsForElement";
|
|
11
|
+
var S = ["Children", "tag", "uid", "tooltipProps"], T = ["input", "meta"], _ = ["title", "theme", "strategy", "modifiers", "placement", "interaction", "timeout", "visible", "defaultVisible", "onVisibleChange", "offset", "preventOverflow", "arrow", "flip", "computeStyles", "eventListeners", "onFirstUpdate"];
|
|
12
|
+
function j(r) {
|
|
13
|
+
var m = r.Children, s = r.tag, g = r.uid, c = r.tooltipProps, P = c === void 0 ? _ : c, o = h(r, S), y = k(o, P), u = t.useRef(void 0);
|
|
14
|
+
return /* @__PURE__ */ t.createElement(C, o, function(a) {
|
|
15
|
+
var n, E = a.input, e = a.meta, l = h(a, T), w = l.validateOnBlur === !1 ? e.submitFailed : !0, x = e.invalid && e.touched, i = w && x, v = "".concat(g, "-error-description"), F = o["aria-describedby"], f = L(p(p({}, R(l)), {}, {
|
|
16
|
+
state: i ? "invalid" : "normal",
|
|
17
|
+
"aria-invalid": !!i,
|
|
18
|
+
"aria-describedby": e.active ? i ? v : F : void 0
|
|
19
|
+
}), E);
|
|
20
|
+
return e != null && e.error && (u.current = e.error), /* @__PURE__ */ t.createElement(d, b({
|
|
21
|
+
visible: i && e.active,
|
|
22
|
+
theme: "warning",
|
|
23
|
+
placement: "left",
|
|
24
|
+
flip: {
|
|
25
|
+
fallbackPlacements: ["right", "bottom"]
|
|
26
|
+
}
|
|
27
|
+
}, y), /* @__PURE__ */ t.createElement(d.Trigger, b({
|
|
28
|
+
inline: !1,
|
|
29
|
+
role: void 0,
|
|
30
|
+
tag: s
|
|
31
|
+
}, s ? f : {}, {
|
|
32
|
+
__excludeProps: ["type", "aria-describedby"]
|
|
33
|
+
}), typeof m.origin == "function" && m.origin(p({
|
|
34
|
+
input: f,
|
|
35
|
+
meta: e
|
|
36
|
+
}, l))), /* @__PURE__ */ t.createElement(d.Popper, {
|
|
37
|
+
w: "100%",
|
|
38
|
+
id: v
|
|
39
|
+
}, (n = e.error) !== null && n !== void 0 ? n : u.current));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
j.enhance = [I()];
|
|
43
|
+
export {
|
|
44
|
+
j as FeedbackItem
|
|
45
|
+
};
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import x from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import Z from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import I from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import ee from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import te from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import f from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import re from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import ne from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import s from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
+
import { sstyled as ae } from "@semcore/utils/lib/core/index";
|
|
11
|
+
import ie, { sstyled as N, assignProps as B, Component as oe } from "@semcore/core";
|
|
12
|
+
import e from "react";
|
|
13
|
+
import { Field as D, Form as le } from "react-final-form";
|
|
14
|
+
import se from "final-form-focus";
|
|
15
|
+
import me from "@semcore/spin-container";
|
|
16
|
+
import ce from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
17
|
+
import de from "@semcore/utils/lib/uniqueID";
|
|
18
|
+
import d from "@semcore/notice";
|
|
19
|
+
import ue from "@semcore/icon/Check/m";
|
|
20
|
+
import pe from "@semcore/icon/Warning/m";
|
|
21
|
+
import { Text as P } from "@semcore/typography";
|
|
22
|
+
import fe from "@semcore/illustration/Feedback";
|
|
23
|
+
import he from "@semcore/link";
|
|
24
|
+
import H from "../slider-rating/SliderRating.mjs";
|
|
25
|
+
import ge from "@semcore/modal";
|
|
26
|
+
import be from "@semcore/textarea";
|
|
27
|
+
import { Flex as k, Box as w } from "@semcore/flex-box";
|
|
28
|
+
import { FeedbackItem as ve } from "../feedback-item/FeedbackItem.mjs";
|
|
29
|
+
import { SubmitButton as ke } from "../submit-button/SubmitButton.mjs";
|
|
30
|
+
import ye from "../checkbox-button/CheckboxButton.mjs";
|
|
31
|
+
import W from "@semcore/input";
|
|
32
|
+
import { localizedMessages as A } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
33
|
+
import { NoticeBubbleManager as Ce, NoticeBubbleContainer as Ee } from "@semcore/notice-bubble";
|
|
34
|
+
var xe = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"], _e = (
|
|
35
|
+
/*__reshadow_css_start__*/
|
|
36
|
+
(ae.insert(
|
|
37
|
+
/*__inner_css_start__*/
|
|
38
|
+
".___SFeedbackRating_javwd_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_javwd_gg_ li{list-style:none}",
|
|
39
|
+
"javwd_gg_"
|
|
40
|
+
), {
|
|
41
|
+
__SFeedbackRating: "___SFeedbackRating_javwd_gg_"
|
|
42
|
+
})
|
|
43
|
+
), y = /* @__PURE__ */ function(b) {
|
|
44
|
+
re(o, b);
|
|
45
|
+
var p = ne(o);
|
|
46
|
+
function o() {
|
|
47
|
+
var n;
|
|
48
|
+
ee(this, o);
|
|
49
|
+
for (var i = arguments.length, v = new Array(i), a = 0; a < i; a++)
|
|
50
|
+
v[a] = arguments[a];
|
|
51
|
+
return n = p.call.apply(p, [this].concat(v)), s(f(n), "state", {
|
|
52
|
+
error: !1
|
|
53
|
+
}), s(f(n), "manager", new Ce()), s(f(n), "focusDecorator", se()), s(f(n), "handleChangeRating", function(t) {
|
|
54
|
+
n.asProps.onVisibleChange(!0, t);
|
|
55
|
+
}), s(f(n), "handelCloseModal", function() {
|
|
56
|
+
n.asProps.onVisibleChange(!1, n.asProps.rating);
|
|
57
|
+
}), s(f(n), "handleChange", function(t) {
|
|
58
|
+
return function(r, m) {
|
|
59
|
+
t(m);
|
|
60
|
+
};
|
|
61
|
+
}), s(f(n), "renderCheckbox", function(t, r) {
|
|
62
|
+
var m = n.props.initialValues[t.key];
|
|
63
|
+
return /* @__PURE__ */ e.createElement(D, {
|
|
64
|
+
name: t.key,
|
|
65
|
+
initialValue: m,
|
|
66
|
+
type: "checkbox",
|
|
67
|
+
key: t.key
|
|
68
|
+
}, function(h) {
|
|
69
|
+
var g = h.input;
|
|
70
|
+
return /* @__PURE__ */ e.createElement(E.Checkbox, I({}, g, {
|
|
71
|
+
id: t.key,
|
|
72
|
+
label: t.label,
|
|
73
|
+
onChange: function(l, F) {
|
|
74
|
+
return g.onChange(F);
|
|
75
|
+
},
|
|
76
|
+
focused: r === 0
|
|
77
|
+
}));
|
|
78
|
+
});
|
|
79
|
+
}), s(f(n), "renderTextField", function(t) {
|
|
80
|
+
var r, m = n.props.initialValues[t.key], h = typeof t.label == "string" ? /* @__PURE__ */ e.createElement(P, {
|
|
81
|
+
mb: 2,
|
|
82
|
+
size: 200
|
|
83
|
+
}, t.label) : t.label, g = ((r = t.description) === null || r === void 0 ? void 0 : r.type) === e.Fragment;
|
|
84
|
+
return /* @__PURE__ */ e.createElement(k, {
|
|
85
|
+
direction: "column"
|
|
86
|
+
}, /* @__PURE__ */ e.createElement(k, {
|
|
87
|
+
tag: "label",
|
|
88
|
+
mt: 4,
|
|
89
|
+
htmlFor: t.key,
|
|
90
|
+
key: t.key
|
|
91
|
+
}, h), /* @__PURE__ */ e.createElement(E.Item, {
|
|
92
|
+
name: t.key,
|
|
93
|
+
validate: t.validate,
|
|
94
|
+
initialValue: m,
|
|
95
|
+
placement: "left-start",
|
|
96
|
+
flip: {
|
|
97
|
+
fallbackPlacements: ["right-start", "bottom"]
|
|
98
|
+
},
|
|
99
|
+
"aria-describedby": t.description ? t.key + "-description" : void 0
|
|
100
|
+
}, function(_) {
|
|
101
|
+
var l = _.input;
|
|
102
|
+
return t.type === "textarea" ? /* @__PURE__ */ e.createElement(be, I({}, l, {
|
|
103
|
+
h: 80,
|
|
104
|
+
onChange: n.handleChange(l.onChange),
|
|
105
|
+
id: t.key
|
|
106
|
+
})) : t.type === "input" || t.type === "email" ? (t.type === "email" && (l.autoComplete = "email", l.type = "email"), /* @__PURE__ */ e.createElement(W, {
|
|
107
|
+
state: l.state
|
|
108
|
+
}, /* @__PURE__ */ e.createElement(W.Value, I({}, l, {
|
|
109
|
+
onChange: n.handleChange(l.onChange),
|
|
110
|
+
id: t.key
|
|
111
|
+
})))) : null;
|
|
112
|
+
}), t.description && /* @__PURE__ */ e.createElement(w, {
|
|
113
|
+
mt: 2
|
|
114
|
+
}, typeof t.description == "string" || g ? /* @__PURE__ */ e.createElement(P, {
|
|
115
|
+
size: 200,
|
|
116
|
+
color: "text-secondary",
|
|
117
|
+
id: t.key + "-description"
|
|
118
|
+
}, t.description) : t.description));
|
|
119
|
+
}), n;
|
|
120
|
+
}
|
|
121
|
+
return te(o, [{
|
|
122
|
+
key: "headerId",
|
|
123
|
+
get: function() {
|
|
124
|
+
var i = this.asProps.uid;
|
|
125
|
+
return "".concat(i, "-feedback-rating-header");
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "getHeaderProps",
|
|
129
|
+
value: function() {
|
|
130
|
+
return {
|
|
131
|
+
id: this.headerId
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}, {
|
|
135
|
+
key: "getItemProps",
|
|
136
|
+
value: function() {
|
|
137
|
+
var i = this.asProps.validateOnBlur;
|
|
138
|
+
return {
|
|
139
|
+
validateOnBlur: i
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
key: "getNoticeTextId",
|
|
144
|
+
value: function() {
|
|
145
|
+
var i = this.asProps.uid;
|
|
146
|
+
return "".concat(i, "-feedback-rating-notice");
|
|
147
|
+
}
|
|
148
|
+
}, {
|
|
149
|
+
key: "componentDidUpdate",
|
|
150
|
+
value: function(i) {
|
|
151
|
+
var v = this, a = this.asProps, t = a.status, r = a.getI18nText;
|
|
152
|
+
i.status !== t && (this.setState({
|
|
153
|
+
error: !1
|
|
154
|
+
}), t === "success" ? setTimeout(function() {
|
|
155
|
+
v.manager.add({
|
|
156
|
+
icon: /* @__PURE__ */ e.createElement(ue, {
|
|
157
|
+
color: "green-400"
|
|
158
|
+
}),
|
|
159
|
+
children: r("successMessage"),
|
|
160
|
+
initialAnimation: !0,
|
|
161
|
+
duration: 5e3
|
|
162
|
+
});
|
|
163
|
+
}, 300) : t === "error" && this.setState({
|
|
164
|
+
error: !0
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
}, {
|
|
168
|
+
key: "render",
|
|
169
|
+
value: function() {
|
|
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
|
+
r.Children;
|
|
172
|
+
var j = r.styles, $ = r.forwardRef, T = r.status, O = r.theme, U = r.background, R = r.rating, q = r.visible;
|
|
173
|
+
r.onVisibleChange;
|
|
174
|
+
var G = r.notificationVisible, J = r.onNotificationClose, S = r.getI18nText, K = r.errorFeedbackEmail, M = r.modalWidth, L = Z(r, xe), Q = ge, X = g.filter(function(u) {
|
|
175
|
+
return u.type === "checkbox";
|
|
176
|
+
}), Y = g.filter(function(u) {
|
|
177
|
+
return u.type === "textarea" || u.type === "input" || u.type === "email";
|
|
178
|
+
}), z = this.getNoticeTextId();
|
|
179
|
+
return a = N(j), /* @__PURE__ */ e.createElement(w, B({}, v), /* @__PURE__ */ e.createElement(d, a.cn("Notice", {
|
|
180
|
+
visible: G,
|
|
181
|
+
"aria-label": S("leaveFeedback"),
|
|
182
|
+
tag: k,
|
|
183
|
+
alignItems: l ? "flex-start" : "center"
|
|
184
|
+
}), /* @__PURE__ */ e.createElement(d.Label, {
|
|
185
|
+
mr: 3,
|
|
186
|
+
"aria-hidden": !0
|
|
187
|
+
}, /* @__PURE__ */ e.createElement(fe, a.cn("FeedbackIllustration", {}))), /* @__PURE__ */ e.createElement(d.Content, null, l ? /* @__PURE__ */ e.createElement(d.Title, null, l) : null, /* @__PURE__ */ e.createElement(d.Text, {
|
|
188
|
+
tag: k,
|
|
189
|
+
alignItems: l ? "flex-start" : "center"
|
|
190
|
+
}, /* @__PURE__ */ e.createElement(P, a.cn("Text", {
|
|
191
|
+
mr: 3,
|
|
192
|
+
id: z
|
|
193
|
+
}), _), /* @__PURE__ */ e.createElement(d.Actions, {
|
|
194
|
+
mt: 0
|
|
195
|
+
}, /* @__PURE__ */ e.createElement(H, a.cn("SliderRating", {
|
|
196
|
+
value: R,
|
|
197
|
+
onChange: this.handleChangeRating,
|
|
198
|
+
"aria-labelledby": z
|
|
199
|
+
}))), F && /* @__PURE__ */ e.createElement(he, a.cn("Link", {
|
|
200
|
+
ml: 3,
|
|
201
|
+
href: F
|
|
202
|
+
}), S("learnMore")))), /* @__PURE__ */ e.createElement(d.Close, {
|
|
203
|
+
onClick: J
|
|
204
|
+
})), /* @__PURE__ */ e.createElement(Q, a.cn("SFeedbackRating", x({}, B({
|
|
205
|
+
visible: q,
|
|
206
|
+
onClose: this.handelCloseModal,
|
|
207
|
+
p: 0,
|
|
208
|
+
"use:w": M ?? 440,
|
|
209
|
+
"aria-labelledby": this.headerId
|
|
210
|
+
}, i))), /* @__PURE__ */ e.createElement(le, a.cn("Form", x({
|
|
211
|
+
decorators: [this.focusDecorator]
|
|
212
|
+
}, L)), function(u) {
|
|
213
|
+
var c;
|
|
214
|
+
return c = N(j), /* @__PURE__ */ e.createElement(me, c.cn("SpinContainer", {
|
|
215
|
+
background: U,
|
|
216
|
+
theme: O,
|
|
217
|
+
size: "xl",
|
|
218
|
+
loading: T !== "loading" ? u.submitting : T === "loading",
|
|
219
|
+
p: 1,
|
|
220
|
+
m: 9
|
|
221
|
+
}), /* @__PURE__ */ e.createElement(k, c.cn("Flex", {
|
|
222
|
+
justifyContent: "center"
|
|
223
|
+
}), /* @__PURE__ */ e.createElement(H, c.cn("SliderRating", {
|
|
224
|
+
value: R,
|
|
225
|
+
readonly: !0
|
|
226
|
+
}))), (m == null ? void 0 : m.type) === E.Header ? m : /* @__PURE__ */ e.createElement(E.Header, null, m), /* @__PURE__ */ e.createElement(w, c.cn("Box", x(x({
|
|
227
|
+
tag: "form",
|
|
228
|
+
noValidate: !0,
|
|
229
|
+
method: "POST",
|
|
230
|
+
ref: $
|
|
231
|
+
}, L), {}, {
|
|
232
|
+
onSubmit: u.handleSubmit
|
|
233
|
+
})), /* @__PURE__ */ e.createElement(D, c.cn("Field", {
|
|
234
|
+
name: "rating",
|
|
235
|
+
initialValue: R
|
|
236
|
+
}), function(C) {
|
|
237
|
+
var V = C.input;
|
|
238
|
+
return /* @__PURE__ */ e.createElement("input", I({}, V, {
|
|
239
|
+
type: "hidden"
|
|
240
|
+
}));
|
|
241
|
+
}), /* @__PURE__ */ e.createElement("div", c.cn("div", {
|
|
242
|
+
role: "group",
|
|
243
|
+
"aria-labelledby": t.headerId
|
|
244
|
+
}), X.map(function(C, V) {
|
|
245
|
+
return t.renderCheckbox(C, V);
|
|
246
|
+
})), Y.map(function(C) {
|
|
247
|
+
return t.renderTextField(C);
|
|
248
|
+
}), t.state.error && /* @__PURE__ */ e.createElement(d, c.cn("Notice", {
|
|
249
|
+
theme: "warning",
|
|
250
|
+
mt: 4,
|
|
251
|
+
mb: 4
|
|
252
|
+
}), /* @__PURE__ */ e.createElement(d.Label, null, /* @__PURE__ */ e.createElement(pe, c.cn("WarnM", {}))), /* @__PURE__ */ e.createElement(d.Content, null, S("errorMessage", {
|
|
253
|
+
email: K
|
|
254
|
+
}))), /* @__PURE__ */ e.createElement(k, c.cn("Flex", {
|
|
255
|
+
mt: 4,
|
|
256
|
+
justifyContent: "center"
|
|
257
|
+
}), /* @__PURE__ */ e.createElement(E.Submit, {
|
|
258
|
+
loading: T !== "loading" ? u.submitting : T === "loading",
|
|
259
|
+
size: "l"
|
|
260
|
+
}, h ?? S("submitButton")))));
|
|
261
|
+
})), /* @__PURE__ */ e.createElement(Ee, a.cn("NoticeBubbleContainer", {
|
|
262
|
+
manager: this.manager
|
|
263
|
+
})));
|
|
264
|
+
}
|
|
265
|
+
}]), o;
|
|
266
|
+
}(oe);
|
|
267
|
+
s(y, "displayName", "FeedbackRatingForm");
|
|
268
|
+
s(y, "style", _e);
|
|
269
|
+
s(y, "enhance", [ce(A), de()]);
|
|
270
|
+
s(y, "defaultProps", {
|
|
271
|
+
onSubmit: function() {
|
|
272
|
+
},
|
|
273
|
+
i18n: A,
|
|
274
|
+
locale: "en"
|
|
275
|
+
});
|
|
276
|
+
s(y, "validate", {
|
|
277
|
+
description: function(p) {
|
|
278
|
+
return function() {
|
|
279
|
+
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", n = o.split(/\s+/), i = n.join(" ");
|
|
280
|
+
if (o && (i.length < 10 || n.length < 3))
|
|
281
|
+
return p;
|
|
282
|
+
};
|
|
283
|
+
},
|
|
284
|
+
email: function(p) {
|
|
285
|
+
return function() {
|
|
286
|
+
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
287
|
+
if (o && !/.+@.+\..+/i.test(String(o).toLowerCase()))
|
|
288
|
+
return p;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
function Fe(b) {
|
|
293
|
+
var p = arguments[0], o, n = b.styles, i = P;
|
|
294
|
+
return o = N(n), /* @__PURE__ */ e.createElement(i, o.cn("SHeader", x({}, B({
|
|
295
|
+
size: 300,
|
|
296
|
+
tag: "h2",
|
|
297
|
+
mb: 4,
|
|
298
|
+
mt: 4,
|
|
299
|
+
textAlign: "center"
|
|
300
|
+
}, p))));
|
|
301
|
+
}
|
|
302
|
+
var E = ie(y, {
|
|
303
|
+
Header: Fe,
|
|
304
|
+
Item: ve,
|
|
305
|
+
Checkbox: ye,
|
|
306
|
+
Submit: ke
|
|
307
|
+
});
|
|
308
|
+
export {
|
|
309
|
+
E as default
|
|
310
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import k from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import M from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import F from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import v 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 _ from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import { sstyled as D } from "@semcore/utils/lib/core/index";
|
|
9
|
+
import $, { assignProps as y, sstyled as I, Component as Z } from "@semcore/core";
|
|
10
|
+
import s from "react";
|
|
11
|
+
import { Box as L, Flex as z } from "@semcore/flex-box";
|
|
12
|
+
import K from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
|
|
13
|
+
import N from "@semcore/utils/lib/uniqueID";
|
|
14
|
+
import B from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
15
|
+
import { localizedMessages as C } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
16
|
+
var j = (
|
|
17
|
+
/*__reshadow_css_start__*/
|
|
18
|
+
(D.insert(
|
|
19
|
+
/*__inner_css_start__*/
|
|
20
|
+
".___SSliderRating_itt5b_gg_ .___SStar_itt5b_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_itt5b_gg_.__keyboardFocused_itt5b_gg_ .___SStar_itt5b_gg_.__hovered_itt5b_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_itt5b_gg_ .___SStar_itt5b_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_itt5b_gg_.__keyboardFocused_itt5b_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}@media (hover:hover){.___SSliderRating_itt5b_gg_.__readonly_itt5b_gg_ .___SStar_itt5b_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_itt5b_gg_.__filled_itt5b_gg_:active{animation:wobble .8s ease-in-out}.___SStar_itt5b_gg_ path{fill:transparent;stroke:var(--intergalactic-slider-rating-normal, #a9abb6);stroke-width:2}.___SStar_itt5b_gg_.__filled_itt5b_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}",
|
|
21
|
+
"itt5b_gg_"
|
|
22
|
+
), {
|
|
23
|
+
__SSliderRating: "___SSliderRating_itt5b_gg_",
|
|
24
|
+
__SStar: "___SStar_itt5b_gg_",
|
|
25
|
+
_keyboardFocused: "__keyboardFocused_itt5b_gg_",
|
|
26
|
+
_hovered: "__hovered_itt5b_gg_",
|
|
27
|
+
_readonly: "__readonly_itt5b_gg_",
|
|
28
|
+
_filled: "__filled_itt5b_gg_"
|
|
29
|
+
})
|
|
30
|
+
), b = 1, g = 5, u = /* @__PURE__ */ function(h) {
|
|
31
|
+
T(l, h);
|
|
32
|
+
var f = A(l);
|
|
33
|
+
function l() {
|
|
34
|
+
var e;
|
|
35
|
+
M(this, l);
|
|
36
|
+
for (var o = arguments.length, r = new Array(o), a = 0; a < o; a++)
|
|
37
|
+
r[a] = arguments[a];
|
|
38
|
+
return e = f.call.apply(f, [this].concat(r)), _(v(e), "state", {
|
|
39
|
+
hoveredIndex: -1,
|
|
40
|
+
clickedIndex: -1
|
|
41
|
+
}), _(v(e), "handleClick", function(t) {
|
|
42
|
+
return function(i) {
|
|
43
|
+
var n = e.asProps.readonly;
|
|
44
|
+
n || e.setValue(t);
|
|
45
|
+
};
|
|
46
|
+
}), _(v(e), "handleMouseEnder", function(t) {
|
|
47
|
+
return function() {
|
|
48
|
+
e.setState({
|
|
49
|
+
hoveredIndex: t
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
}), _(v(e), "handleMouseLeave", function() {
|
|
53
|
+
e.setState({
|
|
54
|
+
hoveredIndex: -1
|
|
55
|
+
});
|
|
56
|
+
}), _(v(e), "setValue", function(t) {
|
|
57
|
+
var i = e.asProps, n = i.onChange, c = i.value;
|
|
58
|
+
n && n(t), t <= c ? e.setState({
|
|
59
|
+
clickedIndex: t
|
|
60
|
+
}) : e.setState({
|
|
61
|
+
clickedIndex: -1
|
|
62
|
+
});
|
|
63
|
+
}), _(v(e), "handleKeyDown", function(t) {
|
|
64
|
+
if (["ArrowLeft", "ArrowRight", "Enter"].includes(t.key))
|
|
65
|
+
if (t.preventDefault(), t.key === "Enter") {
|
|
66
|
+
var i = e.state.hoveredIndex;
|
|
67
|
+
e.setValue(i + 1);
|
|
68
|
+
} else {
|
|
69
|
+
var n = e.asProps.value, c = e.state.hoveredIndex, m = t.key === "ArrowLeft" ? -1 : 1, d = c === -1 ? n + m : c + 1 + m;
|
|
70
|
+
d > g && (d = g), d < b && (d = b), e.setState({
|
|
71
|
+
hoveredIndex: d - 1
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}), e;
|
|
75
|
+
}
|
|
76
|
+
return F(l, [{
|
|
77
|
+
key: "getStarProps",
|
|
78
|
+
value: function(o, r) {
|
|
79
|
+
var a = this.asProps, t = a.value, i = a.readonly, n = this.state.hoveredIndex;
|
|
80
|
+
return {
|
|
81
|
+
filled: t && r + 1 <= t || r <= n,
|
|
82
|
+
onClick: this.handleClick(r + 1),
|
|
83
|
+
onMouseEnter: i ? void 0 : this.handleMouseEnder(r),
|
|
84
|
+
hovered: n === r
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "getLabelText",
|
|
89
|
+
value: function() {
|
|
90
|
+
var o = this.state.hoveredIndex, r = this.asProps, a = r.readonly, t = r.value, i = r.getI18nText;
|
|
91
|
+
if (a)
|
|
92
|
+
return i("FeedbackRating.SliderRating.aria-valuetext.readonly", {
|
|
93
|
+
selectedRating: t,
|
|
94
|
+
max: g
|
|
95
|
+
});
|
|
96
|
+
if (t) {
|
|
97
|
+
var n = o > -1 ? o + 1 : t;
|
|
98
|
+
return i("FeedbackRating.SliderRating.aria-valuetext", {
|
|
99
|
+
selectedRating: n,
|
|
100
|
+
max: g
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return o === -1 ? i("FeedbackRating.SliderRating.aria-valuetext.empty") : i("FeedbackRating.SliderRating.aria-valuetext", {
|
|
104
|
+
selectedRating: o + 1,
|
|
105
|
+
max: g
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
key: "render",
|
|
110
|
+
value: function() {
|
|
111
|
+
var o = this.asProps, r, a = this.asProps, t = a.styles, i = a.readonly, n = a.getI18nText, c = a.value, m = this.state.hoveredIndex, d = z, S = this.getLabelText();
|
|
112
|
+
if (i)
|
|
113
|
+
return /* @__PURE__ */ s.createElement(d, y({
|
|
114
|
+
gap: 1,
|
|
115
|
+
role: "img",
|
|
116
|
+
"aria-label": S,
|
|
117
|
+
"use:tabIndex": -1
|
|
118
|
+
}, o), new Array(g).fill(null).map(function(w, p) {
|
|
119
|
+
return /* @__PURE__ */ s.createElement(L, {
|
|
120
|
+
key: p,
|
|
121
|
+
position: "relative"
|
|
122
|
+
}, /* @__PURE__ */ s.createElement(R.Star, null));
|
|
123
|
+
}));
|
|
124
|
+
var x = m + 1, P = x > 0 || c ? "".concat(S, ". ").concat(n("FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber"), ".") : S;
|
|
125
|
+
return r = I(t), /* @__PURE__ */ s.createElement(d, r.cn("SSliderRating", k({}, y({
|
|
126
|
+
gap: 1,
|
|
127
|
+
onMouseLeave: this.handleMouseLeave,
|
|
128
|
+
onKeyDown: this.handleKeyDown,
|
|
129
|
+
role: "slider",
|
|
130
|
+
"aria-orientation": "horizontal",
|
|
131
|
+
"aria-valuemin": b,
|
|
132
|
+
"aria-valuemax": g,
|
|
133
|
+
"aria-valuetext": P,
|
|
134
|
+
"aria-valuenow": x
|
|
135
|
+
}, o))), new Array(g).fill(null).map(function(w, p) {
|
|
136
|
+
return /* @__PURE__ */ s.createElement(L, {
|
|
137
|
+
key: p,
|
|
138
|
+
position: "relative"
|
|
139
|
+
}, /* @__PURE__ */ s.createElement(R.Star, null));
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
}]), l;
|
|
143
|
+
}(Z);
|
|
144
|
+
_(u, "displayName", "SliderRating");
|
|
145
|
+
_(u, "style", j);
|
|
146
|
+
_(u, "enhance", [K(), N(), B(C)]);
|
|
147
|
+
_(u, "defaultProps", {
|
|
148
|
+
i18n: C,
|
|
149
|
+
locale: "en"
|
|
150
|
+
});
|
|
151
|
+
function E(h) {
|
|
152
|
+
var f = arguments[0], l, e = L;
|
|
153
|
+
return l = I(h.styles), /* @__PURE__ */ s.createElement(e, l.cn("SStar", k({}, y({
|
|
154
|
+
tag: "svg",
|
|
155
|
+
role: "none",
|
|
156
|
+
width: "22",
|
|
157
|
+
height: "21",
|
|
158
|
+
viewBox: "0 0 22 21",
|
|
159
|
+
fill: "none",
|
|
160
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
161
|
+
}, f))), h.filled ? /* @__PURE__ */ s.createElement("path", l.cn("path", {
|
|
162
|
+
d: "M10.6463 0.213566C10.7963 -0.0711885 11.2037 -0.071189 11.3537 0.213566L14.6682 6.50744L21.668 7.72084C21.9847 7.77572 22.1105 8.16305 21.8867 8.39378L16.9353 13.4978L17.9465 20.5422C17.9922 20.8607 17.6626 21.1002 17.3741 20.9581L11 17.8181L4.62585 20.9581C4.33738 21.1002 4.00781 20.8607 4.05353 20.5422L5.0647 13.4978L0.113338 8.39378C-0.110493 8.16305 0.0153421 7.77572 0.331965 7.72084L7.33178 6.50744L10.6463 0.213566Z"
|
|
163
|
+
})) : /* @__PURE__ */ s.createElement("path", l.cn("path", {
|
|
164
|
+
d: "M13.7834 6.9734L14.0127 7.40871L14.4974 7.49274L20.3785 8.51222L16.2175 12.8015L15.8757 13.1539L15.9454 13.6399L16.7949 19.558L11.4419 16.921L11 16.7033L10.5581 16.921L5.20505 19.558L6.05456 13.6399L6.12432 13.1539L5.78246 12.8015L1.62146 8.51222L7.50258 7.49274L7.98734 7.40871L8.21659 6.9734L11 1.68803L13.7834 6.9734ZM21.4972 8.70614C21.4969 8.70608 21.4965 8.70602 21.4961 8.70595L21.4972 8.70614ZM0.502765 8.70614L0.503758 8.70597C0.503427 8.70603 0.503095 8.70609 0.502764 8.70614L0.400352 8.11535L0.502765 8.70614Z"
|
|
165
|
+
})));
|
|
166
|
+
}
|
|
167
|
+
E.displayName = "Star";
|
|
168
|
+
var R = $(u, {
|
|
169
|
+
Star: E
|
|
170
|
+
});
|
|
171
|
+
export {
|
|
172
|
+
R as default
|
|
173
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import o from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import { sstyled as i, assignProps as u } from "@semcore/core";
|
|
3
|
+
import a from "@semcore/button";
|
|
4
|
+
import n from "react";
|
|
5
|
+
function b(r) {
|
|
6
|
+
var e = arguments[0], t, m = r.styles, s = a;
|
|
7
|
+
return t = i(m), /* @__PURE__ */ n.createElement(s, t.cn("SSubmit", o({}, u({
|
|
8
|
+
type: "submit",
|
|
9
|
+
use: "primary",
|
|
10
|
+
theme: "success"
|
|
11
|
+
}, e))));
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
b as SubmitButton
|
|
15
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import r from "./de.json.mjs";
|
|
2
|
+
import o from "./en.json.mjs";
|
|
3
|
+
import m from "./es.json.mjs";
|
|
4
|
+
import t from "./fr.json.mjs";
|
|
5
|
+
import i from "./it.json.mjs";
|
|
6
|
+
import p from "./ja.json.mjs";
|
|
7
|
+
import f from "./ko.json.mjs";
|
|
8
|
+
import e from "./nl.json.mjs";
|
|
9
|
+
import s from "./pt.json.mjs";
|
|
10
|
+
import a from "./tr.json.mjs";
|
|
11
|
+
import l from "./vi.json.mjs";
|
|
12
|
+
import v from "./zh.json.mjs";
|
|
13
|
+
import d from "./pl.json.mjs";
|
|
14
|
+
import n from "./sv.json.mjs";
|
|
15
|
+
var B = {
|
|
16
|
+
de: r,
|
|
17
|
+
en: o,
|
|
18
|
+
es: m,
|
|
19
|
+
fr: t,
|
|
20
|
+
it: i,
|
|
21
|
+
ja: p,
|
|
22
|
+
ko: f,
|
|
23
|
+
nl: e,
|
|
24
|
+
pt: s,
|
|
25
|
+
tr: a,
|
|
26
|
+
vi: l,
|
|
27
|
+
zh: v,
|
|
28
|
+
pl: d,
|
|
29
|
+
sv: n
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
B as localizedMessages
|
|
33
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Feedback geben", a = "Mehr erfahren", t = "Feedback-Formular", n = "Feedback senden", r = "Vielen Dank für Ihr Feedback!", s = "Es ist ein Fehler aufgetreten. Versuchen Sie es erneut oder kontaktieren Sie uns unter {email}.", i = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: n,
|
|
6
|
+
successMessage: r,
|
|
7
|
+
errorMessage: s,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Drücken Sie auf Enter, um die Bewertung auszuwählen",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Ihre Bewertung: {selectedRating} von {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Nicht festgelegt",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} von {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as default,
|
|
15
|
+
s as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
n as submitButton,
|
|
20
|
+
r as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Leave feedback", a = "Learn more", t = "Feedback form", r = "Send feedback", n = "Thank you for your feedback!", s = "Something went wrong. Please try again or contact us at {email}.", o = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: r,
|
|
6
|
+
successMessage: n,
|
|
7
|
+
errorMessage: s,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Press Enter to select the rating",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Your rating: {selectedRating} out of {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Not set",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} out of {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
o as default,
|
|
15
|
+
s as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
r as submitButton,
|
|
20
|
+
n as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Dejar comentarios", a = "Leer más", t = "Formulario de comentarios", n = "Enviar comentarios", r = "¡Gracias por tu opinión!", i = "Ha habido un error. Vuelve a intentarlo o contacta con nosotros en {email}.", o = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: n,
|
|
6
|
+
successMessage: r,
|
|
7
|
+
errorMessage: i,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Pulsa Intro para seleccionar la puntuación",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Tu puntuación: {selectedRating} de {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Sin definir",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} de {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
o as default,
|
|
15
|
+
i as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
n as submitButton,
|
|
20
|
+
r as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Envoyer des commentaires", r = "En savoir plus", a = "Formulaire de commentaires", s = "Envoyer des commentaires", t = "Merci pour vos commentaires !", n = "Une erreur est survenue. Veuillez réessayer ou nous contacter à l’adresse {email}.", o = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: r,
|
|
4
|
+
formTitle: a,
|
|
5
|
+
submitButton: s,
|
|
6
|
+
successMessage: t,
|
|
7
|
+
errorMessage: n,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Appuyez sur Entrée pour sélectionner la note",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Votre \uFEFFnote : {selectedRating} sur {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Non défini",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} sur {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
o as default,
|
|
15
|
+
n as errorMessage,
|
|
16
|
+
a as formTitle,
|
|
17
|
+
r as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
s as submitButton,
|
|
20
|
+
t as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Lascia un feedback", a = "Scopri di più", i = "Modulo di feedback", t = "Invia feedback", r = "Grazie per il tuo feedback!", o = "Si è verificato un errore. Prova di nuovo o contattaci all'indirizzo {email}.", n = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: i,
|
|
5
|
+
submitButton: t,
|
|
6
|
+
successMessage: r,
|
|
7
|
+
errorMessage: o,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Premi Invio per selezionare la valutazione",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "La tua valutazione: {selectedRating} su {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Non impostato",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} su {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
n as default,
|
|
15
|
+
o as errorMessage,
|
|
16
|
+
i as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
t as submitButton,
|
|
20
|
+
r as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "フィードバックを送る", a = "詳細情報", t = "フィードバックのフォーム", s = "フィードバックを送信", r = "フィードバックをお送りいただき、ありがとうございます!", n = "エラーが発生しました。もう一度お試しいただくか、{email}までお問い合わせください。", i = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: s,
|
|
6
|
+
successMessage: r,
|
|
7
|
+
errorMessage: n,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "レーティングを選択するにはEnterキーを押します",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "あなたのレーティング:{selectedRating}/{max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "未設定",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating}/{max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as default,
|
|
15
|
+
n as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
s as submitButton,
|
|
20
|
+
r as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "피드백 남기기", a = "더 알아보기", t = "피드백 양식", s = "피드백 보내기", r = "피드백을 주셔서 감사합니다!", n = "오류가 발생했습니다. 다시 시도하거나 {email}으로 문의해 주세요.", i = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: s,
|
|
6
|
+
successMessage: r,
|
|
7
|
+
errorMessage: n,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Enter 키로 별점을 선택하세요",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "내 평점: {selectedRating}/{max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "평가하지 않음",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating}/{max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as default,
|
|
15
|
+
n as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
s as submitButton,
|
|
20
|
+
r as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Feedback geven", t = "Lees meer", a = "Feedback formulier", r = "Feedback sturen", n = "Bedankt voor je feedback!", i = "Er is iets fout gegaan. Probeer het opnieuw of neem contact met ons op via {email}.", s = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: t,
|
|
4
|
+
formTitle: a,
|
|
5
|
+
submitButton: r,
|
|
6
|
+
successMessage: n,
|
|
7
|
+
errorMessage: i,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Druk op Enter om de beoordeling te selecteren",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Jouw beoordeling: {selectedRating} uit {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Niet ingesteld",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} uit {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
s as default,
|
|
15
|
+
i as errorMessage,
|
|
16
|
+
a as formTitle,
|
|
17
|
+
t as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
r as submitButton,
|
|
20
|
+
n as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Wyślij opinię", a = "Dowiedz się więcej", i = "Formularz opinii", t = "Wyślij opinię", n = "Dziękujemy za opinię!", o = "Coś poszło nie tak. Spróbuj ponownie lub skontaktuj się z nami pod adresem {email}.", s = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: i,
|
|
5
|
+
submitButton: t,
|
|
6
|
+
successMessage: n,
|
|
7
|
+
errorMessage: o,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Naciśnij Enter, aby wybrać ocenę",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Twoja ocena: {selectedRating} z {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Nie ustawiono",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} z {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
s as default,
|
|
15
|
+
o as errorMessage,
|
|
16
|
+
i as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
t as submitButton,
|
|
20
|
+
n as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Deixar feedback", a = "Saiba mais", t = "Formulário de comentários", o = "Enviar comentário", i = "Agradecemos pelos comentários!", r = "Algo deu errado. Tente novamente ou entre em contato conosco pelo e-mail {email}.", s = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: o,
|
|
6
|
+
successMessage: i,
|
|
7
|
+
errorMessage: r,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Pressione Enter para selecionar a classificação",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Sua classificação: {selectedRating} de {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Não definida",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} de {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
s as default,
|
|
15
|
+
r as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
o as submitButton,
|
|
20
|
+
i as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Ge feedback", a = "Läs mer", t = "Feedbackformulär", r = "Skicka feedback", s = "Tack för din feedback!", i = "Något gick fel. Försök igen eller kontakta oss via {email}.", c = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: r,
|
|
6
|
+
successMessage: s,
|
|
7
|
+
errorMessage: i,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Tryck på Enter för att välja betyg",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Ditt betyg: {selectedRating} av {max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Inget valt",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} av {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as default,
|
|
15
|
+
i as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
r as submitButton,
|
|
20
|
+
s as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Geri bildirim ver", i = "Daha fazla öğren", a = "Geri bildirim formu", r = "Geri bildirim gönder", n = "Geri bildiriminiz için teşekkür ederiz!", t = "Bir şeyler yanlış gitti. Lütfen tekrar deneyin veya {email} adresinden bizimle iletişime geçin.", l = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: i,
|
|
4
|
+
formTitle: a,
|
|
5
|
+
submitButton: r,
|
|
6
|
+
successMessage: n,
|
|
7
|
+
errorMessage: t,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Derecelendirmeyi seçmek için Enter tuşuna basın",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Puanınız: {max} üzerinden {selectedRating}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Ayarlanmadı",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{max} üzerinden {selectedRating}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
l as default,
|
|
15
|
+
t as errorMessage,
|
|
16
|
+
a as formTitle,
|
|
17
|
+
i as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
r as submitButton,
|
|
20
|
+
n as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "Gửi góp ý", a = "Tìm hiểu thêm", t = "Biểu mẫu Phản hồi", i = "Gửi góp ý", n = "Cảm ơn góp ý của bạn!", s = "Đã xảy ra sự cố. Hãy thử lại hoặc liên hệ với chúng tôi qua {email}.", c = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: i,
|
|
6
|
+
successMessage: n,
|
|
7
|
+
errorMessage: s,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "Nhấn Enter để chọn đánh giá",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "Đánh giá của bạn: {selectedRating}/{max}",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "Chưa chọn",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating}/{max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
c as default,
|
|
15
|
+
s as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
i as submitButton,
|
|
20
|
+
n as successMessage
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = "留言反馈", a = "了解更多", t = "反馈表格", s = "发送反馈", r = "感谢您的反馈!", n = "出错了。请重试或通过 {email} 联系我们。", i = {
|
|
2
|
+
leaveFeedback: e,
|
|
3
|
+
learnMore: a,
|
|
4
|
+
formTitle: t,
|
|
5
|
+
submitButton: s,
|
|
6
|
+
successMessage: r,
|
|
7
|
+
errorMessage: n,
|
|
8
|
+
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": "按 Enter 选择评级",
|
|
9
|
+
"FeedbackRating.SliderRating.aria-valuetext.readonly": "您的评级:{selectedRating} / {max",
|
|
10
|
+
"FeedbackRating.SliderRating.aria-valuetext.empty": "未设置",
|
|
11
|
+
"FeedbackRating.SliderRating.aria-valuetext": "{selectedRating} / {max}"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as default,
|
|
15
|
+
n as errorMessage,
|
|
16
|
+
t as formTitle,
|
|
17
|
+
a as learnMore,
|
|
18
|
+
e as leaveFeedback,
|
|
19
|
+
s as submitButton,
|
|
20
|
+
r as successMessage
|
|
21
|
+
};
|
package/package.json
CHANGED
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/feedback-form",
|
|
3
3
|
"description": "Semrush Feedback Form Component",
|
|
4
|
-
"version": "6.39.0
|
|
4
|
+
"version": "6.39.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
|
+
"exports": {
|
|
12
|
+
"require": "./lib/cjs/index.js",
|
|
13
|
+
"import": "./lib/esm/index.mjs",
|
|
14
|
+
"types": "./lib/types/index.d.ts"
|
|
15
|
+
},
|
|
11
16
|
"dependencies": {
|
|
12
|
-
"@semcore/checkbox": "7.44.0
|
|
13
|
-
"@semcore/notice-bubble": "5.52.0
|
|
14
|
-
"@semcore/typography": "5.52.0
|
|
15
|
-
"@semcore/link": "5.44.0
|
|
16
|
-
"@semcore/modal": "4.54.0
|
|
17
|
-
"@semcore/illustration": "2.43.0
|
|
18
|
-
"@semcore/icon": "4.
|
|
19
|
-
"@semcore/textarea": "5.40.0
|
|
20
|
-
"@semcore/input": "4.42.0
|
|
17
|
+
"@semcore/checkbox": "7.44.0",
|
|
18
|
+
"@semcore/notice-bubble": "5.52.0",
|
|
19
|
+
"@semcore/typography": "5.52.0",
|
|
20
|
+
"@semcore/link": "5.44.0",
|
|
21
|
+
"@semcore/modal": "4.54.0",
|
|
22
|
+
"@semcore/illustration": "2.43.0",
|
|
23
|
+
"@semcore/icon": "4.60.0",
|
|
24
|
+
"@semcore/textarea": "5.40.0",
|
|
25
|
+
"@semcore/input": "4.42.0",
|
|
21
26
|
"final-form": "4.20.7",
|
|
22
|
-
"@semcore/button": "5.42.0
|
|
23
|
-
"@semcore/flex-box": "5.41.0
|
|
24
|
-
"@semcore/notice": "5.45.0
|
|
25
|
-
"@semcore/spin-container": "7.41.0
|
|
26
|
-
"@semcore/tooltip": "6.
|
|
27
|
-
"@semcore/utils": "4.
|
|
27
|
+
"@semcore/button": "5.42.0",
|
|
28
|
+
"@semcore/flex-box": "5.41.0",
|
|
29
|
+
"@semcore/notice": "5.45.0",
|
|
30
|
+
"@semcore/spin-container": "7.41.0",
|
|
31
|
+
"@semcore/tooltip": "6.49.0",
|
|
32
|
+
"@semcore/utils": "4.48.0",
|
|
28
33
|
"final-form-focus": "1.1.2",
|
|
29
34
|
"react-final-form": "6.5.9"
|
|
30
35
|
},
|
|
31
36
|
"peerDependencies": {
|
|
32
|
-
"@semcore/core": "^2.
|
|
37
|
+
"@semcore/core": "^2.17.5",
|
|
33
38
|
"react": "16.8 - 18",
|
|
34
39
|
"react-dom": "16.8 - 18"
|
|
35
40
|
},
|
|
@@ -52,6 +57,6 @@
|
|
|
52
57
|
}
|
|
53
58
|
},
|
|
54
59
|
"scripts": {
|
|
55
|
-
"build": "pnpm semcore-builder --source=js,ts"
|
|
60
|
+
"build": "pnpm semcore-builder --source=js,ts && pnpm vite build"
|
|
56
61
|
}
|
|
57
62
|
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineConfig, mergeConfig } from 'vite';
|
|
2
|
+
|
|
3
|
+
import viteConfig from '../../commonVite.config';
|
|
4
|
+
|
|
5
|
+
export default mergeConfig(
|
|
6
|
+
viteConfig,
|
|
7
|
+
defineConfig({
|
|
8
|
+
build: {
|
|
9
|
+
lib: {
|
|
10
|
+
entry: './src/index.js',
|
|
11
|
+
},
|
|
12
|
+
rollupOptions: {
|
|
13
|
+
external: [
|
|
14
|
+
'react',
|
|
15
|
+
'react-dom',
|
|
16
|
+
'react/jsx-runtime',
|
|
17
|
+
/@babel\/runtime\/*/,
|
|
18
|
+
/@semcore\/*/,
|
|
19
|
+
'final-form',
|
|
20
|
+
'final-form-focus',
|
|
21
|
+
'react-final-form',
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
);
|