intergalactic 15.127.0 → 15.128.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 +29 -0
- package/add-filter/package.json +1 -1
- package/bulk-textarea/BulkTextarea.d.ts +1 -1
- package/bulk-textarea/BulkTextarea.types.d.ts +23 -21
- package/bulk-textarea/components/InputField/InputField.d.ts +4 -4
- package/bulk-textarea/components/InputField/InputField.types.d.ts +4 -4
- package/bulk-textarea/lib/cjs/BulkTextarea.js +10 -8
- package/bulk-textarea/lib/cjs/BulkTextarea.js.map +1 -1
- package/bulk-textarea/lib/cjs/BulkTextarea.types.js.map +1 -1
- package/bulk-textarea/lib/cjs/components/InputField/InputField.js +39 -26
- package/bulk-textarea/lib/cjs/components/InputField/InputField.js.map +1 -1
- package/bulk-textarea/lib/cjs/components/InputField/InputField.types.js.map +1 -1
- package/bulk-textarea/lib/cjs/components/InputField/inputField.shadow.css +17 -7
- package/bulk-textarea/lib/es6/BulkTextarea.js +10 -8
- package/bulk-textarea/lib/es6/BulkTextarea.js.map +1 -1
- package/bulk-textarea/lib/es6/BulkTextarea.types.js.map +1 -1
- package/bulk-textarea/lib/es6/components/InputField/InputField.js +39 -26
- package/bulk-textarea/lib/es6/components/InputField/InputField.js.map +1 -1
- package/bulk-textarea/lib/es6/components/InputField/InputField.types.js.map +1 -1
- package/bulk-textarea/lib/es6/components/InputField/inputField.shadow.css +17 -7
- package/bulk-textarea/lib/esm/BulkTextarea.mjs +53 -50
- package/bulk-textarea/lib/esm/components/InputField/InputField.mjs +273 -259
- package/bulk-textarea/lib/types/BulkTextarea.d.ts +1 -1
- package/bulk-textarea/lib/types/BulkTextarea.types.d.ts +23 -21
- package/bulk-textarea/lib/types/components/InputField/InputField.d.ts +4 -4
- package/bulk-textarea/lib/types/components/InputField/InputField.types.d.ts +4 -4
- package/bulk-textarea/package.json +1 -1
- package/components.json +14 -14
- package/errors/lib/cjs/Error.js +9 -9
- package/errors/lib/es6/Error.js +9 -9
- package/errors/lib/esm/Error.mjs +40 -40
- package/errors/package.json +1 -1
- package/feedback-form/lib/cjs/FeedbackForm.js +7 -7
- package/feedback-form/lib/cjs/component/checkbox-button/CheckboxButton.js +3 -3
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js +10 -4
- package/feedback-form/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js +18 -14
- package/feedback-form/lib/cjs/component/slider-rating/SliderRating.js.map +1 -1
- package/feedback-form/lib/cjs/style/slider-rating.shadow.css +1 -3
- package/feedback-form/lib/es6/FeedbackForm.js +7 -7
- package/feedback-form/lib/es6/component/checkbox-button/CheckboxButton.js +3 -3
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js +10 -4
- package/feedback-form/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/feedback-form/lib/es6/component/slider-rating/SliderRating.js +18 -14
- package/feedback-form/lib/es6/component/slider-rating/SliderRating.js.map +1 -1
- package/feedback-form/lib/es6/style/slider-rating.shadow.css +1 -3
- package/feedback-form/lib/esm/FeedbackForm.mjs +39 -39
- package/feedback-form/lib/esm/component/checkbox-button/CheckboxButton.mjs +13 -13
- package/feedback-form/lib/esm/component/feedback-rating/FeedbackRating.mjs +85 -81
- package/feedback-form/lib/esm/component/slider-rating/SliderRating.mjs +83 -79
- package/feedback-form/package.json +1 -1
- package/illustration/lib/cjs/index.js +1 -1
- package/illustration/lib/es6/index.js +1 -1
- package/illustration/package.json +1 -1
- package/modal/lib/cjs/Modal.js +8 -8
- package/modal/lib/es6/Modal.js +8 -8
- package/modal/lib/esm/Modal.mjs +73 -73
- package/modal/package.json +1 -1
- package/outside-click/lib/cjs/OutsideClick.js +14 -7
- package/outside-click/lib/cjs/OutsideClick.js.map +1 -1
- package/outside-click/lib/es6/OutsideClick.js +14 -7
- package/outside-click/lib/es6/OutsideClick.js.map +1 -1
- package/outside-click/lib/esm/OutsideClick.mjs +39 -35
- package/outside-click/package.json +1 -1
- package/package.json +1 -1
- package/popper/lib/cjs/Popper.js +6 -6
- package/popper/lib/es6/Popper.js +6 -6
- package/popper/lib/esm/Popper.mjs +25 -25
- package/popper/package.json +1 -1
- package/select/lib/cjs/InputSearch.js +15 -19
- package/select/lib/cjs/InputSearch.js.map +1 -1
- package/select/lib/cjs/Select.js +8 -8
- package/select/lib/es6/InputSearch.js +15 -19
- package/select/lib/es6/InputSearch.js.map +1 -1
- package/select/lib/es6/Select.js +8 -8
- package/select/lib/esm/InputSearch.mjs +63 -65
- package/select/lib/esm/Select.mjs +122 -122
- package/select/package.json +1 -1
- package/side-panel/lib/cjs/SidePanel.js +16 -16
- package/side-panel/lib/es6/SidePanel.js +16 -16
- package/side-panel/lib/esm/SidePanel.mjs +77 -77
- package/side-panel/package.json +1 -1
- package/time-picker/lib/cjs/TimePicker.js +12 -12
- package/time-picker/lib/es6/TimePicker.js +12 -12
- package/time-picker/lib/esm/TimePicker.mjs +38 -38
- package/time-picker/package.json +1 -1
- package/tooltip/lib/cjs/Tooltip.js +9 -9
- package/tooltip/lib/es6/Tooltip.js +9 -9
- package/tooltip/lib/esm/Tooltip.mjs +103 -103
- package/tooltip/package.json +1 -1
- package/widget-empty/lib/cjs/WidgetEmpty.js +5 -5
- package/widget-empty/lib/es6/WidgetEmpty.js +5 -5
- package/widget-empty/lib/esm/WidgetEmpty.mjs +32 -32
- package/widget-empty/package.json +1 -1
- package/wizard/lib/cjs/Wizard.js +12 -12
- package/wizard/lib/es6/Wizard.js +12 -12
- package/wizard/lib/esm/Wizard.mjs +103 -103
- package/wizard/package.json +1 -1
@@ -1,57 +1,57 @@
|
|
1
1
|
import x from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import
|
2
|
+
import ee from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
import I from "@babel/runtime/helpers/esm/extends";
|
4
|
-
import
|
5
|
-
import
|
4
|
+
import te from "@babel/runtime/helpers/esm/classCallCheck";
|
5
|
+
import re from "@babel/runtime/helpers/esm/createClass";
|
6
6
|
import f from "@babel/runtime/helpers/esm/assertThisInitialized";
|
7
|
-
import
|
8
|
-
import
|
7
|
+
import ne from "@babel/runtime/helpers/esm/inherits";
|
8
|
+
import ae from "@babel/runtime/helpers/esm/createSuper";
|
9
9
|
import s from "@babel/runtime/helpers/esm/defineProperty";
|
10
|
-
import { sstyled as
|
11
|
-
import
|
10
|
+
import { sstyled as ie } from 'intergalactic/utils/lib/core/index';
|
11
|
+
import oe, { sstyled as B, assignProps as w, Component as le } from 'intergalactic/core';
|
12
12
|
import e from "react";
|
13
|
-
import { Field as
|
14
|
-
import
|
15
|
-
import
|
16
|
-
import
|
17
|
-
import
|
13
|
+
import { Field as W, Form as se } from "react-final-form";
|
14
|
+
import me from "final-form-focus";
|
15
|
+
import ce from 'intergalactic/spin-container';
|
16
|
+
import ue from 'intergalactic/utils/lib/enhances/i18nEnhance';
|
17
|
+
import de from 'intergalactic/utils/lib/uniqueID';
|
18
18
|
import u from 'intergalactic/notice';
|
19
|
-
import
|
20
|
-
import
|
19
|
+
import pe from 'intergalactic/icon/Check/m';
|
20
|
+
import fe from 'intergalactic/icon/Warning/m';
|
21
21
|
import { Text as P } from 'intergalactic/typography';
|
22
|
-
import
|
23
|
-
import
|
24
|
-
import
|
22
|
+
import he from 'intergalactic/illustration/Feedback';
|
23
|
+
import j from 'intergalactic/link';
|
24
|
+
import q from "../slider-rating/SliderRating.mjs";
|
25
25
|
import ge from 'intergalactic/modal';
|
26
26
|
import be from 'intergalactic/textarea';
|
27
|
-
import { Flex as
|
27
|
+
import { Flex as y, Box as N } from 'intergalactic/flex-box';
|
28
28
|
import { FeedbackItem as ve } from "../feedback-item/FeedbackItem.mjs";
|
29
|
-
import { SubmitButton as
|
30
|
-
import
|
31
|
-
import
|
32
|
-
import { localizedMessages as
|
29
|
+
import { SubmitButton as ye } from "../submit-button/SubmitButton.mjs";
|
30
|
+
import ke from "../checkbox-button/CheckboxButton.mjs";
|
31
|
+
import A from 'intergalactic/input';
|
32
|
+
import { localizedMessages as $ } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
33
33
|
import { NoticeBubbleManager as Ce, NoticeBubbleContainer as Ee } from 'intergalactic/notice-bubble';
|
34
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
35
|
/*__reshadow_css_start__*/
|
36
|
-
(
|
36
|
+
(ie.insert(
|
37
37
|
/*__inner_css_start__*/
|
38
|
-
".
|
39
|
-
"
|
38
|
+
".___SFeedbackRating_1yvyq_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_1yvyq_gg_ li{list-style:none}",
|
39
|
+
"1yvyq_gg_"
|
40
40
|
), {
|
41
|
-
__SFeedbackRating: "
|
41
|
+
__SFeedbackRating: "___SFeedbackRating_1yvyq_gg_"
|
42
42
|
})
|
43
|
-
),
|
44
|
-
|
45
|
-
var p =
|
43
|
+
), k = /* @__PURE__ */ function(b) {
|
44
|
+
ne(o, b);
|
45
|
+
var p = ae(o);
|
46
46
|
function o() {
|
47
47
|
var n;
|
48
|
-
|
48
|
+
te(this, o);
|
49
49
|
for (var i = arguments.length, v = new Array(i), a = 0; a < i; a++)
|
50
50
|
v[a] = arguments[a];
|
51
51
|
return n = p.call.apply(p, [this].concat(v)), s(f(n), "state", {
|
52
52
|
error: !1
|
53
|
-
}), s(f(n), "manager", new Ce()), s(f(n), "focusDecorator",
|
54
|
-
n.asProps.onVisibleChange(!0, t);
|
53
|
+
}), s(f(n), "manager", new Ce()), s(f(n), "focusDecorator", me()), s(f(n), "handleChangeRating", function(t) {
|
54
|
+
t > 0 && n.asProps.onVisibleChange(!0, t);
|
55
55
|
}), s(f(n), "handelCloseModal", function() {
|
56
56
|
n.asProps.onVisibleChange(!1, n.asProps.rating);
|
57
57
|
}), s(f(n), "handleChange", function(t) {
|
@@ -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(W, {
|
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(y, {
|
85
85
|
direction: "column"
|
86
|
-
}, /* @__PURE__ */ e.createElement(
|
86
|
+
}, /* @__PURE__ */ e.createElement(y, {
|
87
87
|
tag: "label",
|
88
88
|
mt: 4,
|
89
89
|
htmlFor: t.key,
|
@@ -103,9 +103,9 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
103
103
|
h: 80,
|
104
104
|
onChange: n.handleChange(l.onChange),
|
105
105
|
id: t.key
|
106
|
-
})) : t.type === "input" || t.type === "email" ? (t.type === "email" && (l.autoComplete = "email", l.type = "email"), /* @__PURE__ */ e.createElement(
|
106
|
+
})) : t.type === "input" || t.type === "email" ? (t.type === "email" && (l.autoComplete = "email", l.type = "email"), /* @__PURE__ */ e.createElement(A, {
|
107
107
|
state: l.state
|
108
|
-
}, /* @__PURE__ */ e.createElement(
|
108
|
+
}, /* @__PURE__ */ e.createElement(A.Value, I({}, l, {
|
109
109
|
onChange: n.handleChange(l.onChange),
|
110
110
|
id: t.key
|
111
111
|
})))) : null;
|
@@ -118,7 +118,7 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
118
118
|
}, t.description) : t.description));
|
119
119
|
}), n;
|
120
120
|
}
|
121
|
-
return
|
121
|
+
return re(o, [{
|
122
122
|
key: "headerId",
|
123
123
|
get: function() {
|
124
124
|
var i = this.asProps.uid;
|
@@ -153,7 +153,7 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
153
153
|
error: !1
|
154
154
|
}), t === "success" ? setTimeout(function() {
|
155
155
|
v.manager.add({
|
156
|
-
icon: /* @__PURE__ */ e.createElement(
|
156
|
+
icon: /* @__PURE__ */ e.createElement(pe, {
|
157
157
|
color: "green-400"
|
158
158
|
}),
|
159
159
|
children: r("successMessage"),
|
@@ -169,68 +169,68 @@ 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 L = 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
|
174
|
+
var K = r.notificationVisible, Q = r.onNotificationClose, S = r.getI18nText, z = r.errorFeedbackEmail, M = r.modalWidth, D = 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(
|
180
|
-
visible:
|
178
|
+
}), H = this.getNoticeTextId();
|
179
|
+
return a = B(L), /* @__PURE__ */ e.createElement(N, w({}, v), /* @__PURE__ */ e.createElement(u, a.cn("Notice", {
|
180
|
+
visible: K,
|
181
181
|
"aria-label": S("leaveFeedback"),
|
182
|
-
tag:
|
182
|
+
tag: y,
|
183
183
|
alignItems: l ? "flex-start" : "center"
|
184
184
|
}), /* @__PURE__ */ e.createElement(u.Label, {
|
185
185
|
mr: 3,
|
186
186
|
"aria-hidden": !0
|
187
|
-
}, /* @__PURE__ */ e.createElement(
|
188
|
-
tag:
|
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: y,
|
189
189
|
alignItems: l ? "flex-start" : "center"
|
190
190
|
}, /* @__PURE__ */ e.createElement(P, a.cn("Text", {
|
191
191
|
mr: 3,
|
192
|
-
id:
|
192
|
+
id: H
|
193
193
|
}), _), /* @__PURE__ */ e.createElement(u.Actions, {
|
194
194
|
mt: 0
|
195
|
-
}, /* @__PURE__ */ e.createElement(
|
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": H
|
199
|
+
}))), F && /* @__PURE__ */ e.createElement(j, a.cn("Link", {
|
200
200
|
ml: 3,
|
201
201
|
href: F
|
202
202
|
}), S("learnMore")))), /* @__PURE__ */ e.createElement(u.Close, {
|
203
|
-
onClick:
|
204
|
-
})), /* @__PURE__ */ e.createElement(
|
205
|
-
visible:
|
203
|
+
onClick: Q
|
204
|
+
})), /* @__PURE__ */ e.createElement(X, a.cn("SFeedbackRating", x({}, w({
|
205
|
+
visible: J,
|
206
206
|
onClose: this.handelCloseModal,
|
207
207
|
p: 0,
|
208
208
|
"use:w": M ?? 440,
|
209
209
|
"aria-labelledby": this.headerId
|
210
|
-
}, i))), /* @__PURE__ */ e.createElement(
|
210
|
+
}, i))), /* @__PURE__ */ e.createElement(se, a.cn("Form", x({
|
211
211
|
decorators: [this.focusDecorator]
|
212
|
-
},
|
212
|
+
}, D)), function(d) {
|
213
213
|
var c;
|
214
|
-
return c = B(
|
215
|
-
background:
|
216
|
-
theme:
|
214
|
+
return c = B(L), /* @__PURE__ */ e.createElement(ce, c.cn("SpinContainer", {
|
215
|
+
background: G,
|
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(y, c.cn("Flex", {
|
222
222
|
justifyContent: "center"
|
223
|
-
}), /* @__PURE__ */ e.createElement(
|
223
|
+
}), /* @__PURE__ */ e.createElement(q, c.cn("SliderRating", {
|
224
224
|
value: R,
|
225
225
|
readonly: !0
|
226
226
|
}))), (m == null ? void 0 : m.type) === E.Header ? m : /* @__PURE__ */ e.createElement(E.Header, null, m), /* @__PURE__ */ e.createElement(N, c.cn("Box", x(x({
|
227
227
|
tag: "form",
|
228
228
|
noValidate: !0,
|
229
229
|
method: "POST",
|
230
|
-
ref:
|
231
|
-
},
|
230
|
+
ref: O
|
231
|
+
}, D), {}, {
|
232
232
|
onSubmit: d.handleSubmit
|
233
|
-
})), /* @__PURE__ */ e.createElement(
|
233
|
+
})), /* @__PURE__ */ e.createElement(W, c.cn("Field", {
|
234
234
|
name: "rating",
|
235
235
|
initialValue: R
|
236
236
|
}), function(C) {
|
@@ -241,17 +241,21 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
241
241
|
}), /* @__PURE__ */ e.createElement("div", c.cn("div", {
|
242
242
|
role: "group",
|
243
243
|
"aria-labelledby": t.headerId
|
244
|
-
}),
|
244
|
+
}), Y.map(function(C, V) {
|
245
245
|
return t.renderCheckbox(C, V);
|
246
|
-
})),
|
246
|
+
})), Z.map(function(C) {
|
247
247
|
return t.renderTextField(C);
|
248
248
|
}), t.state.error && /* @__PURE__ */ e.createElement(u, c.cn("Notice", {
|
249
249
|
theme: "warning",
|
250
250
|
mt: 4,
|
251
251
|
mb: 4
|
252
|
-
}), /* @__PURE__ */ e.createElement(u.Label, null, /* @__PURE__ */ e.createElement(
|
253
|
-
|
254
|
-
|
252
|
+
}), /* @__PURE__ */ e.createElement(u.Label, null, /* @__PURE__ */ e.createElement(fe, c.cn("WarnM", {}))), /* @__PURE__ */ e.createElement(u.Content, null, S("errorMessage", {
|
253
|
+
// todo: Brauer Ilia - think how to fix type
|
254
|
+
// @ts-ignore
|
255
|
+
email: /* @__PURE__ */ e.createElement(j, c.cn("Link", {
|
256
|
+
href: "mailto:".concat(z)
|
257
|
+
}), z)
|
258
|
+
}))), /* @__PURE__ */ e.createElement(y, c.cn("Flex", {
|
255
259
|
mt: 4,
|
256
260
|
justifyContent: "center"
|
257
261
|
}), /* @__PURE__ */ e.createElement(E.Submit, {
|
@@ -263,17 +267,17 @@ var xe = ["header", "submitText", "formConfig", "notificationText", "notificatio
|
|
263
267
|
})));
|
264
268
|
}
|
265
269
|
}]), o;
|
266
|
-
}(
|
267
|
-
s(
|
268
|
-
s(
|
269
|
-
s(
|
270
|
-
s(
|
270
|
+
}(le);
|
271
|
+
s(k, "displayName", "FeedbackRatingForm");
|
272
|
+
s(k, "style", _e);
|
273
|
+
s(k, "enhance", [ue($), de()]);
|
274
|
+
s(k, "defaultProps", {
|
271
275
|
onSubmit: function() {
|
272
276
|
},
|
273
|
-
i18n:
|
277
|
+
i18n: $,
|
274
278
|
locale: "en"
|
275
279
|
});
|
276
|
-
s(
|
280
|
+
s(k, "validate", {
|
277
281
|
description: function(p) {
|
278
282
|
return function() {
|
279
283
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", n = o.split(/\s+/), i = n.join(" ");
|
@@ -291,7 +295,7 @@ s(y, "validate", {
|
|
291
295
|
});
|
292
296
|
function Fe(b) {
|
293
297
|
var p = arguments[0], o, n = b.styles, i = P;
|
294
|
-
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({}, w({
|
295
299
|
size: 300,
|
296
300
|
tag: "h2",
|
297
301
|
mb: 4,
|
@@ -299,11 +303,11 @@ function Fe(b) {
|
|
299
303
|
textAlign: "center"
|
300
304
|
}, p))));
|
301
305
|
}
|
302
|
-
var E =
|
306
|
+
var E = oe(k, {
|
303
307
|
Header: Fe,
|
304
308
|
Item: ve,
|
305
|
-
Checkbox:
|
306
|
-
Submit:
|
309
|
+
Checkbox: ke,
|
310
|
+
Submit: ye
|
307
311
|
});
|
308
312
|
export {
|
309
313
|
E as default
|
@@ -2,71 +2,73 @@ import k from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import M from "@babel/runtime/helpers/esm/classCallCheck";
|
3
3
|
import F from "@babel/runtime/helpers/esm/createClass";
|
4
4
|
import v from "@babel/runtime/helpers/esm/assertThisInitialized";
|
5
|
-
import
|
6
|
-
import
|
5
|
+
import C from "@babel/runtime/helpers/esm/inherits";
|
6
|
+
import T from "@babel/runtime/helpers/esm/createSuper";
|
7
7
|
import _ from "@babel/runtime/helpers/esm/defineProperty";
|
8
|
-
import { sstyled as
|
9
|
-
import
|
8
|
+
import { sstyled as A } from 'intergalactic/utils/lib/core/index';
|
9
|
+
import D, { assignProps as x, sstyled as I, Component as $ } from 'intergalactic/core';
|
10
10
|
import s from "react";
|
11
|
-
import { Box as
|
12
|
-
import
|
13
|
-
import
|
11
|
+
import { Box as R, Flex as K } from 'intergalactic/flex-box';
|
12
|
+
import N from 'intergalactic/utils/lib/enhances/keyboardFocusEnhance';
|
13
|
+
import Z from 'intergalactic/utils/lib/uniqueID';
|
14
14
|
import B from 'intergalactic/utils/lib/enhances/i18nEnhance';
|
15
|
-
import { localizedMessages as
|
15
|
+
import { localizedMessages as E } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
16
16
|
var j = (
|
17
17
|
/*__reshadow_css_start__*/
|
18
|
-
(
|
18
|
+
(A.insert(
|
19
19
|
/*__inner_css_start__*/
|
20
|
-
".
|
21
|
-
"
|
20
|
+
".___SSliderRating_za4t5_gg_ .___SStar_za4t5_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_za4t5_gg_.__keyboardFocused_za4t5_gg_ .___SStar_za4t5_gg_.__hovered_za4t5_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_za4t5_gg_ .___SStar_za4t5_gg_:hover{cursor:pointer;transform:scale(1.3)}}.___SSliderRating_za4t5_gg_.__keyboardFocused_za4t5_gg_{outline:0;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}@media (hover:hover){.___SSliderRating_za4t5_gg_.__readonly_za4t5_gg_ .___SStar_za4t5_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_za4t5_gg_.__filled_za4t5_gg_:active{animation:wobble .8s ease-in-out}.___SStar_za4t5_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_za4t5_gg_.__filled_za4t5_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}",
|
21
|
+
"za4t5_gg_"
|
22
22
|
), {
|
23
|
-
__SSliderRating: "
|
24
|
-
__SStar: "
|
25
|
-
_keyboardFocused: "
|
26
|
-
_hovered: "
|
27
|
-
_readonly: "
|
28
|
-
_filled: "
|
23
|
+
__SSliderRating: "___SSliderRating_za4t5_gg_",
|
24
|
+
__SStar: "___SStar_za4t5_gg_",
|
25
|
+
_keyboardFocused: "__keyboardFocused_za4t5_gg_",
|
26
|
+
_hovered: "__hovered_za4t5_gg_",
|
27
|
+
_readonly: "__readonly_za4t5_gg_",
|
28
|
+
_filled: "__filled_za4t5_gg_"
|
29
29
|
})
|
30
30
|
), y = 1, g = 5, u = /* @__PURE__ */ function(h) {
|
31
|
-
|
32
|
-
var f =
|
31
|
+
C(l, h);
|
32
|
+
var f = T(l);
|
33
33
|
function l() {
|
34
34
|
var e;
|
35
35
|
M(this, l);
|
36
|
-
for (var o = arguments.length,
|
37
|
-
|
38
|
-
return e = f.call.apply(f, [this].concat(
|
36
|
+
for (var o = arguments.length, t = new Array(o), r = 0; r < o; r++)
|
37
|
+
t[r] = arguments[r];
|
38
|
+
return e = f.call.apply(f, [this].concat(t)), _(v(e), "state", {
|
39
39
|
hoveredIndex: -1,
|
40
40
|
clickedIndex: -1
|
41
|
-
}), _(v(e), "handleClick", function(
|
42
|
-
return function(
|
43
|
-
var
|
44
|
-
|
41
|
+
}), _(v(e), "handleClick", function(a) {
|
42
|
+
return function(n) {
|
43
|
+
var i = e.asProps.readonly;
|
44
|
+
i || e.setValue(a);
|
45
45
|
};
|
46
|
-
}), _(v(e), "handleMouseEnder", function(
|
46
|
+
}), _(v(e), "handleMouseEnder", function(a) {
|
47
47
|
return function() {
|
48
48
|
e.setState({
|
49
|
-
hoveredIndex:
|
49
|
+
hoveredIndex: a
|
50
50
|
});
|
51
51
|
};
|
52
52
|
}), _(v(e), "handleMouseLeave", function() {
|
53
53
|
e.setState({
|
54
54
|
hoveredIndex: -1
|
55
55
|
});
|
56
|
-
}), _(v(e), "setValue", function(
|
57
|
-
var
|
58
|
-
|
59
|
-
clickedIndex:
|
56
|
+
}), _(v(e), "setValue", function(a) {
|
57
|
+
var n = e.asProps, i = n.onChange, c = n.value;
|
58
|
+
i && i(a), a <= c ? e.setState({
|
59
|
+
clickedIndex: a,
|
60
|
+
hoveredIndex: -1
|
60
61
|
}) : e.setState({
|
61
|
-
clickedIndex: -1
|
62
|
+
clickedIndex: -1,
|
63
|
+
hoveredIndex: -1
|
62
64
|
});
|
63
|
-
}), _(v(e), "handleKeyDown", function(
|
64
|
-
if (["ArrowLeft", "ArrowRight", "Enter"].includes(
|
65
|
-
if (
|
66
|
-
var
|
67
|
-
e.setValue(
|
65
|
+
}), _(v(e), "handleKeyDown", function(a) {
|
66
|
+
if (["ArrowLeft", "ArrowRight", "Enter"].includes(a.key))
|
67
|
+
if (a.preventDefault(), a.key === "Enter") {
|
68
|
+
var n = e.state.hoveredIndex;
|
69
|
+
e.setValue(n + 1);
|
68
70
|
} else {
|
69
|
-
var
|
71
|
+
var i = e.asProps.value, c = e.state.hoveredIndex, m = a.key === "ArrowLeft" ? -1 : 1, d = c === -1 ? i + m : c + 1 + m;
|
70
72
|
d > g && (d = g), d < y && (d = y), e.setState({
|
71
73
|
hoveredIndex: d - 1
|
72
74
|
});
|
@@ -75,32 +77,32 @@ var j = (
|
|
75
77
|
}
|
76
78
|
return F(l, [{
|
77
79
|
key: "getStarProps",
|
78
|
-
value: function(o,
|
79
|
-
var
|
80
|
+
value: function(o, t) {
|
81
|
+
var r = this.asProps, a = r.value, n = r.readonly, i = this.state.hoveredIndex;
|
80
82
|
return {
|
81
|
-
filled:
|
82
|
-
onClick: this.handleClick(
|
83
|
-
onMouseEnter:
|
84
|
-
hovered:
|
83
|
+
filled: a && t + 1 <= a || t <= i,
|
84
|
+
onClick: this.handleClick(t + 1),
|
85
|
+
onMouseEnter: n ? void 0 : this.handleMouseEnder(t),
|
86
|
+
hovered: i === t
|
85
87
|
};
|
86
88
|
}
|
87
89
|
}, {
|
88
90
|
key: "getLabelText",
|
89
91
|
value: function() {
|
90
|
-
var o = this.state.hoveredIndex,
|
91
|
-
if (
|
92
|
-
return
|
93
|
-
selectedRating:
|
92
|
+
var o = this.state.hoveredIndex, t = this.asProps, r = t.readonly, a = t.value, n = t.getI18nText;
|
93
|
+
if (r)
|
94
|
+
return n("FeedbackRating.SliderRating.aria-valuetext.readonly", {
|
95
|
+
selectedRating: a,
|
94
96
|
max: g
|
95
97
|
});
|
96
|
-
if (
|
97
|
-
var
|
98
|
-
return
|
99
|
-
selectedRating:
|
98
|
+
if (a) {
|
99
|
+
var i = o > -1 ? o + 1 : a;
|
100
|
+
return n("FeedbackRating.SliderRating.aria-valuetext", {
|
101
|
+
selectedRating: i,
|
100
102
|
max: g
|
101
103
|
});
|
102
104
|
}
|
103
|
-
return o === -1 ?
|
105
|
+
return o === -1 ? n("FeedbackRating.SliderRating.aria-valuetext.empty") : n("FeedbackRating.SliderRating.aria-valuetext", {
|
104
106
|
selectedRating: o + 1,
|
105
107
|
max: g
|
106
108
|
});
|
@@ -108,21 +110,21 @@ var j = (
|
|
108
110
|
}, {
|
109
111
|
key: "render",
|
110
112
|
value: function() {
|
111
|
-
var o = this.asProps,
|
112
|
-
if (
|
113
|
-
return /* @__PURE__ */ s.createElement(d,
|
113
|
+
var o = this.asProps, t, r = this.asProps, a = r.styles, n = r.readonly, i = r.getI18nText, c = r.value, m = this.state.hoveredIndex, d = K, S = this.getLabelText();
|
114
|
+
if (n)
|
115
|
+
return /* @__PURE__ */ s.createElement(d, x({
|
114
116
|
gap: 1,
|
115
117
|
role: "img",
|
116
118
|
"aria-label": S,
|
117
119
|
"use:tabIndex": -1
|
118
|
-
}, o), new Array(g).fill(null).map(function(
|
119
|
-
return /* @__PURE__ */ s.createElement(
|
120
|
+
}, o), new Array(g).fill(null).map(function(L, p) {
|
121
|
+
return /* @__PURE__ */ s.createElement(R, {
|
120
122
|
key: p,
|
121
123
|
position: "relative"
|
122
124
|
}, /* @__PURE__ */ s.createElement(b.Star, null));
|
123
125
|
}));
|
124
|
-
var
|
125
|
-
return
|
126
|
+
var z = m + 1, w = z > 0 || c ? "".concat(S, ". ").concat(i("FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber"), ".") : S;
|
127
|
+
return t = I(a), /* @__PURE__ */ s.createElement(d, t.cn("SSliderRating", k({}, x({
|
126
128
|
gap: 1,
|
127
129
|
onMouseLeave: this.handleMouseLeave,
|
128
130
|
onKeyDown: this.handleKeyDown,
|
@@ -130,43 +132,45 @@ var j = (
|
|
130
132
|
"aria-orientation": "horizontal",
|
131
133
|
"aria-valuemin": y,
|
132
134
|
"aria-valuemax": g,
|
133
|
-
"aria-valuetext":
|
134
|
-
"aria-valuenow":
|
135
|
-
}, o))), new Array(g).fill(null).map(function(
|
136
|
-
return /* @__PURE__ */ s.createElement(
|
135
|
+
"aria-valuetext": w,
|
136
|
+
"aria-valuenow": z
|
137
|
+
}, o))), new Array(g).fill(null).map(function(L, p) {
|
138
|
+
return /* @__PURE__ */ s.createElement(R, {
|
137
139
|
key: p,
|
138
140
|
position: "relative"
|
139
141
|
}, /* @__PURE__ */ s.createElement(b.Star, null));
|
140
142
|
}));
|
141
143
|
}
|
142
144
|
}]), l;
|
143
|
-
}(
|
145
|
+
}($);
|
144
146
|
_(u, "displayName", "SliderRating");
|
145
147
|
_(u, "style", j);
|
146
|
-
_(u, "enhance", [
|
148
|
+
_(u, "enhance", [N(), Z(), B(E)]);
|
147
149
|
_(u, "defaultProps", {
|
148
|
-
i18n:
|
150
|
+
i18n: E,
|
149
151
|
locale: "en"
|
150
152
|
});
|
151
|
-
function
|
152
|
-
var f = arguments[0], l, e =
|
153
|
-
return l = I(h.styles), /* @__PURE__ */ s.createElement(e, l.cn("SStar", k({},
|
153
|
+
function P(h) {
|
154
|
+
var f = arguments[0], l, e = R;
|
155
|
+
return l = I(h.styles), /* @__PURE__ */ s.createElement(e, l.cn("SStar", k({}, x({
|
154
156
|
tag: "svg",
|
155
157
|
role: "none",
|
156
|
-
width: "
|
157
|
-
height: "
|
158
|
-
viewBox: "0 0
|
158
|
+
width: "24",
|
159
|
+
height: "24",
|
160
|
+
viewBox: "0 0 24 24",
|
159
161
|
fill: "none",
|
160
162
|
xmlns: "http://www.w3.org/2000/svg"
|
161
163
|
}, f))), h.filled ? /* @__PURE__ */ s.createElement("path", l.cn("path", {
|
162
|
-
d: "
|
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"
|
163
165
|
})) : /* @__PURE__ */ s.createElement("path", l.cn("path", {
|
164
|
-
d: "
|
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
|
+
fillRule: "evenodd",
|
168
|
+
clipRule: "evenodd"
|
165
169
|
})));
|
166
170
|
}
|
167
|
-
|
168
|
-
var b =
|
169
|
-
Star:
|
171
|
+
P.displayName = "Star";
|
172
|
+
var b = D(u, {
|
173
|
+
Star: P
|
170
174
|
});
|
171
175
|
export {
|
172
176
|
b as default
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"intergalactic/feedback-form","description":"Semrush Feedback Form Component","version":"6.
|
1
|
+
{"name":"intergalactic/feedback-form","description":"Semrush Feedback Form Component","version":"6.41.0-prerelease.0","main":"lib/cjs/index.js","module":"lib/es6/index.js","typings":"lib/types/index.d.ts","sideEffects":false,"author":"UI-kit team <ui-kit-team@semrush.com>","license":"MIT","scripts":{"build":"pnpm semcore-builder --source=js,ts && pnpm vite build"},"exports":{"require":"./lib/cjs/index.js","import":"./lib/esm/index.mjs","types":"./lib/types/index.d.ts"},"dependencies":{"@semcore/checkbox":"7.44.1","@semcore/notice-bubble":"5.53.0","@semcore/typography":"5.52.1","@semcore/link":"5.44.1","@semcore/modal":"4.56.0-prerelease.0","@semcore/illustration":"2.44.0-prerelease.0","@semcore/icon":"4.60.1","@semcore/textarea":"5.40.1","@semcore/input":"4.42.1","final-form":"4.20.7","@semcore/button":"5.43.0","@semcore/flex-box":"5.41.1","@semcore/notice":"5.46.0","@semcore/spin-container":"7.41.1","@semcore/tooltip":"6.50.0-prerelease.0","@semcore/utils":"4.48.1","final-form-focus":"1.1.2","react-final-form":"6.5.9"},"peerDependencies":{"@semcore/core":"^2.17.5","react":"16.8 - 18","react-dom":"16.8 - 18"},"repository":{"type":"git","url":"https://github.com/semrush/intergalactic.git","directory":"semcore/feedback-form"},"devDependencies":{"@types/react":"18.0.21","@types/final-form-focus":"1.1.7","@semcore/testing-utils":"1.0.0"},"overrides":{"final-form":{"@babel/runtime":"7.17.9"},"react-final-form":{"@babel/runtime":"7.17.9"}}}
|