@semcore/feedback-form 16.1.12 → 16.2.0-prerelease.2

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.
@@ -10,18 +10,18 @@ import { sstyled as _sstyled } from "@semcore/core";
10
10
  import { assignProps as _assignProps3 } from "@semcore/core";
11
11
  import { assignProps as _assignProps2 } from "@semcore/core";
12
12
  import { assignProps as _assignProps } from "@semcore/core";
13
- var _excluded = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"];
13
+ var _excluded = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth", "Illustration", "Notice"];
14
+ import { Box, Flex } from '@semcore/base-components';
14
15
  import { createComponent, Component, sstyled, Root } from '@semcore/core';
15
16
  import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
16
17
  import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
17
- import { Box, Flex } from '@semcore/flex-box';
18
18
  import CheckM from '@semcore/icon/Check/m';
19
19
  import WarnM from '@semcore/icon/Warning/m';
20
20
  import FeedbackIllustration from '@semcore/illustration/Feedback';
21
21
  import Input from '@semcore/input';
22
22
  import Link from '@semcore/link';
23
23
  import Modal from '@semcore/modal';
24
- import Notice from '@semcore/notice';
24
+ import { default as SemcoreNotice } from '@semcore/notice';
25
25
  import { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';
26
26
  import SpinContainer from '@semcore/spin-container';
27
27
  import Textarea from '@semcore/textarea';
@@ -30,10 +30,11 @@ import createFocusDecorator from 'final-form-focus';
30
30
  import React from 'react';
31
31
  import { Field, Form } from 'react-final-form';
32
32
  /*!__reshadow-styles__:"../../style/feedback-rating.shadow.css"*/
33
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SFeedbackRating_fq0ub_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_fq0ub_gg_ li{list-style:none}", /*__inner_css_end__*/"fq0ub_gg_"),
33
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SFeedbackRating_rhp4z_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_rhp4z_gg_ li{list-style:none}.___SFeedbackRating_rhp4z_gg_ .___SHeader_rhp4z_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin:var(--intergalactic-spacing-4x, 16px)0;text-align:center}", /*__inner_css_end__*/"rhp4z_gg_"),
34
34
  /*__reshadow_css_end__*/
35
35
  {
36
- "__SFeedbackRating": "___SFeedbackRating_fq0ub_gg_"
36
+ "__SFeedbackRating": "___SFeedbackRating_rhp4z_gg_",
37
+ "__SHeader": "___SHeader_rhp4z_gg_"
37
38
  });
38
39
  import { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';
39
40
  import CheckboxButton from '../checkbox-button/CheckboxButton';
@@ -227,6 +228,8 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
227
228
  getI18nText = _this$asProps2.getI18nText,
228
229
  errorFeedbackEmail = _this$asProps2.errorFeedbackEmail,
229
230
  modalWidth = _this$asProps2.modalWidth,
231
+ Illustration = _this$asProps2.Illustration,
232
+ NoticeComponent = _this$asProps2.Notice,
230
233
  other = _objectWithoutProperties(_this$asProps2, _excluded);
231
234
  var SFeedbackRating = Modal;
232
235
  var checkboxFields = formConfig.filter(function (item) {
@@ -236,30 +239,29 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
236
239
  return item.type === 'textarea' || item.type === 'input' || item.type === 'email';
237
240
  });
238
241
  var notificationId = this.getNoticeTextId();
239
- return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(Box, _assignProps2({}, _ref2), /*#__PURE__*/React.createElement(Notice, _ref4.cn("Notice", {
242
+ return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(Box, _assignProps2({}, _ref2), /*#__PURE__*/React.createElement(NoticeComponent, _ref4.cn("NoticeComponent", {
240
243
  "visible": notificationVisible,
241
244
  "aria-label": getI18nText('leaveFeedback'),
242
245
  "tag": Flex,
243
246
  "alignItems": notificationTitle ? 'flex-start' : 'center'
244
- }), /*#__PURE__*/React.createElement(Notice.Label, {
247
+ }), /*#__PURE__*/React.createElement(NoticeComponent.Label, {
245
248
  mr: 3,
246
249
  "aria-hidden": true
247
- }, /*#__PURE__*/React.createElement(FeedbackIllustration, _ref4.cn("FeedbackIllustration", {}))), /*#__PURE__*/React.createElement(Notice.Content, null, notificationTitle ? /*#__PURE__*/React.createElement(Notice.Title, null, notificationTitle) : null, /*#__PURE__*/React.createElement(Notice.Text, {
250
+ }, /*#__PURE__*/React.createElement(Illustration, _ref4.cn("Illustration", {}))), /*#__PURE__*/React.createElement(NoticeComponent.Content, null, notificationTitle ? /*#__PURE__*/React.createElement(NoticeComponent.Title, null, notificationTitle) : null, /*#__PURE__*/React.createElement(NoticeComponent.Text, {
251
+ gap: 3,
248
252
  tag: Flex,
249
253
  alignItems: notificationTitle ? 'flex-start' : 'center'
250
254
  }, /*#__PURE__*/React.createElement(Text, _ref4.cn("Text", {
251
- "mr": 3,
252
255
  "id": notificationId
253
- }), notificationText), /*#__PURE__*/React.createElement(Notice.Actions, {
256
+ }), notificationText), /*#__PURE__*/React.createElement(NoticeComponent.Actions, {
254
257
  mt: 0
255
258
  }, /*#__PURE__*/React.createElement(SliderRating, _ref4.cn("SliderRating", {
256
259
  "value": rating,
257
260
  "onChange": this.handleChangeRating,
258
261
  "aria-labelledby": notificationId
259
262
  }))), learnMoreLink && /*#__PURE__*/React.createElement(Link, _ref4.cn("Link", {
260
- "ml": 3,
261
263
  "href": learnMoreLink
262
- }), getI18nText('learnMore')))), /*#__PURE__*/React.createElement(Notice.Close, {
264
+ }), getI18nText('learnMore')))), /*#__PURE__*/React.createElement(NoticeComponent.Close, {
263
265
  onClick: onNotificationClose
264
266
  })), /*#__PURE__*/React.createElement(SFeedbackRating, _ref4.cn("SFeedbackRating", _objectSpread({}, _assignProps({
265
267
  "visible": visible,
@@ -305,11 +307,11 @@ var FeedbackRatingRoot = /*#__PURE__*/function (_Component) {
305
307
  return _this3.renderCheckbox(formConfigItem, index);
306
308
  })), textFields.map(function (formConfigItem) {
307
309
  return _this3.renderTextField(formConfigItem);
308
- }), _this3.state.error && /*#__PURE__*/React.createElement(Notice, _ref5.cn("Notice", {
310
+ }), _this3.state.error && /*#__PURE__*/React.createElement(SemcoreNotice, _ref5.cn("SemcoreNotice", {
309
311
  "theme": 'warning',
310
312
  "mt": 4,
311
313
  "mb": 4
312
- }), /*#__PURE__*/React.createElement(Notice.Label, null, /*#__PURE__*/React.createElement(WarnM, _ref5.cn("WarnM", {}))), /*#__PURE__*/React.createElement(Notice.Content, null, getI18nText('errorMessage', {
314
+ }), /*#__PURE__*/React.createElement(SemcoreNotice.Label, null, /*#__PURE__*/React.createElement(WarnM, _ref5.cn("WarnM", {}))), /*#__PURE__*/React.createElement(SemcoreNotice.Content, null, getI18nText('errorMessage', {
313
315
  // todo: Brauer Ilia - think how to fix type
314
316
  // @ts-ignore
315
317
  email: /*#__PURE__*/React.createElement(Link, _ref5.cn("Link", {
@@ -334,7 +336,9 @@ _defineProperty(FeedbackRatingRoot, "enhance", [i18nEnhance(localizedMessages),
334
336
  _defineProperty(FeedbackRatingRoot, "defaultProps", {
335
337
  onSubmit: function onSubmit() {},
336
338
  i18n: localizedMessages,
337
- locale: 'en'
339
+ locale: 'en',
340
+ Illustration: FeedbackIllustration,
341
+ Notice: SemcoreNotice
338
342
  });
339
343
  _defineProperty(FeedbackRatingRoot, "validate", {
340
344
  description: function description(error) {
@@ -360,14 +364,8 @@ function Header(props) {
360
364
  var _ref3 = arguments[0],
361
365
  _ref6;
362
366
  var styles = props.styles;
363
- var SHeader = Text;
364
- return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SHeader, _ref6.cn("SHeader", _objectSpread({}, _assignProps3({
365
- "size": 300,
366
- "tag": 'h2',
367
- "mb": 4,
368
- "mt": 4,
369
- "textAlign": 'center'
370
- }, _ref3))));
367
+ var SHeader = Modal.Title;
368
+ return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SHeader, _ref6.cn("SHeader", _objectSpread({}, _assignProps3({}, _ref3))));
371
369
  }
372
370
  var FeedbackRating = createComponent(FeedbackRatingRoot, {
373
371
  Header: Header,
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackRating.js","names":["createComponent","Component","sstyled","Root","i18nEnhance","uniqueIDEnhancement","Box","Flex","CheckM","WarnM","FeedbackIllustration","Input","Link","Modal","Notice","NoticeBubbleContainer","NoticeBubbleManager","SpinContainer","Textarea","Text","createFocusDecorator","React","Field","Form","style","_sstyled","insert","localizedMessages","CheckboxButton","FeedbackItem","SliderRating","SubmitButton","FeedbackRatingRoot","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","error","rating","asProps","onVisibleChange","fn","_value","e","config","index","initialValue","props","initialValues","key","createElement","name","type","_ref7","input","FeedbackRating","Checkbox","_extends","id","label","onChange","_checked","focused","_config$description","mb","size","isDescriptionReactFragment","description","Fragment","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","_ref8","h","handleChange","autoComplete","state","Value","color","_inherits","_createClass","get","uid","value","getHeaderProps","headerId","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","_this2","_this$asProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","_this3","_this$asProps2","header","submitText","formConfig","notificationText","notificationTitle","learnMoreLink","_Children","Children","styles","forwardRef","theme","background","visible","_onVisibleChange","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","other","_objectWithoutProperties","_excluded","SFeedbackRating","checkboxFields","filter","item","textFields","notificationId","_assignProps2","cn","Label","mr","Content","Title","alignItems","Actions","handleChangeRating","Close","onClick","_objectSpread","_assignProps","handelCloseModal","focusDecorator","api","_ref5","submitting","Header","handleSubmit","_ref9","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","onSubmit","i18n","locale","words","split","symbols","join","Boolean","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","_assignProps3"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport { Box, Flex } from '@semcore/flex-box';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Input from '@semcore/input';\nimport Link from '@semcore/link';\nimport Modal from '@semcore/modal';\nimport Notice from '@semcore/notice';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport SpinContainer from '@semcore/spin-container';\nimport Textarea from '@semcore/textarea';\nimport { Text } from '@semcore/typography';\nimport createFocusDecorator from 'final-form-focus';\nimport React, { type ReactElement } from 'react';\nimport { Field, Form } from 'react-final-form';\n\nimport type { FeedbackRatingProps, FeedbackRatingType, FormConfigItem } from './FeedbackRating.type';\nimport style from '../../style/feedback-rating.shadow.css';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport SliderRating from '../slider-rating/SliderRating';\nimport { SubmitButton } from '../submit-button/SubmitButton';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n {},\n State,\n typeof FeedbackRatingRoot.enhance\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n };\n\n static validate = {\n description: (error: Error | string) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (Boolean(value) && (symbols.length < 10 || words.length < 3)) {\n return error;\n }\n },\n email: (error: Error | string) => (value = '') => {\n if (Boolean(value) && !/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n state: State = {\n error: false,\n };\n\n manager = new NoticeBubbleManager();\n\n private focusDecorator = createFocusDecorator<Record<string, any>>();\n\n get headerId() {\n const { uid } = this.asProps;\n\n return `${uid}-feedback-rating-header`;\n }\n\n getHeaderProps() {\n return {\n id: this.headerId,\n };\n }\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n getNoticeTextId() {\n const { uid } = this.asProps;\n return `${uid}-feedback-rating-notice`;\n }\n\n handleChangeRating = (rating: number) => {\n if (rating > 0) {\n this.asProps.onVisibleChange(true, rating);\n }\n };\n\n handelCloseModal = () => {\n this.asProps.onVisibleChange(false, this.asProps.rating);\n };\n\n handleChange =\n (fn: (e: React.SyntheticEvent) => void) => (_value: any, e: React.SyntheticEvent) => {\n fn(e);\n };\n\n componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>) {\n const { status, getI18nText } = this.asProps;\n\n if (prevProps.status !== status) {\n this.setState({ error: false });\n\n if (status === 'success') {\n // showing notice with delay for SR, less than 100ms is not enough\n setTimeout(() => {\n this.manager.add({\n icon: <CheckM color='green-400' />,\n children: getI18nText('successMessage'),\n initialAnimation: true,\n duration: 5000,\n });\n }, 300);\n } else if (status === 'error') {\n this.setState({ error: true });\n }\n }\n }\n\n renderCheckbox = (config: FormConfigItem, index: number) => {\n const initialValue = this.props.initialValues[config.key];\n\n return (\n <Field name={config.key} initialValue={initialValue} type='checkbox' key={config.key}>\n {({ input }) => (\n <FeedbackRating.Checkbox\n {...input}\n id={config.key}\n label={config.label}\n onChange={(_checked, e) => input.onChange(e)}\n focused={index === 0}\n />\n )}\n </Field>\n );\n };\n\n renderTextField = (config: FormConfigItem) => {\n const initialValue = this.props.initialValues[config.key];\n\n const label =\n typeof config.label === 'string'\n ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n )\n : (\n (config.label as unknown as JSX.Element)\n );\n\n const isDescriptionReactFragment =\n (config.description as ReactElement)?.type === React.Fragment;\n\n return (\n <Flex direction='column'>\n <Flex tag='label' mt={4} htmlFor={config.key} key={config.key}>\n {label}\n </Flex>\n\n <FeedbackRating.Item\n name={config.key}\n validate={config.validate}\n initialValue={initialValue}\n placement='left-start'\n flip={{\n fallbackPlacements: ['right-start', 'bottom'],\n }}\n aria-describedby={config.description ? config.key + '-description' : undefined}\n >\n {/* @ts-ignore */}\n {({ input }) => {\n if (config.type === 'textarea') {\n return (\n <Textarea\n {...input}\n h={80}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n );\n }\n if (config.type === 'input' || config.type === 'email') {\n if (config.type === 'email') {\n input.autoComplete = 'email';\n input.type = 'email';\n }\n\n return (\n <Input state={input.state}>\n <Input.Value\n {...input}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n </Input>\n );\n }\n return null;\n }}\n </FeedbackRating.Item>\n {config.description && (\n <Box mt={2}>\n {typeof config.description === 'string' || isDescriptionReactFragment\n ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n )\n : (\n config.description\n )}\n </Box>\n )}\n </Flex>\n );\n };\n\n render() {\n const {\n header,\n submitText,\n formConfig,\n notificationText,\n notificationTitle,\n learnMoreLink,\n Children: _Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange: _onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n ...other\n } = this.asProps;\n\n const SFeedbackRating = Root;\n const checkboxFields = formConfig.filter((item) => item.type === 'checkbox');\n const textFields = formConfig.filter(\n (item) => item.type === 'textarea' || item.type === 'input' || item.type === 'email',\n );\n const notificationId = this.getNoticeTextId();\n\n return sstyled(styles)(\n <Root render={Box}>\n <Notice\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={notificationTitle ? 'flex-start' : 'center'}\n >\n <Notice.Label mr={3} aria-hidden={true}>\n <FeedbackIllustration />\n </Notice.Label>\n <Notice.Content>\n {notificationTitle ? <Notice.Title>{notificationTitle}</Notice.Title> : null}\n <Notice.Text tag={Flex} alignItems={notificationTitle ? 'flex-start' : 'center'}>\n <Text mr={3} id={notificationId}>\n {notificationText}\n </Text>\n <Notice.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </Notice.Actions>\n {learnMoreLink && (\n <Link ml={3} href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </Notice.Text>\n </Notice.Content>\n <Notice.Close onClick={onNotificationClose} />\n </Notice>\n\n <SFeedbackRating\n render={Modal}\n visible={visible}\n onClose={this.handelCloseModal}\n p={0}\n use:w={modalWidth ?? 440}\n aria-labelledby={this.headerId}\n >\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n p={1}\n m={9}\n >\n <Flex justifyContent='center'>\n <SliderRating value={rating} readonly={true} />\n </Flex>\n\n {(header as ReactElement)?.type === FeedbackRating.Header\n ? (\n header\n )\n : (\n <FeedbackRating.Header>{header}</FeedbackRating.Header>\n )}\n\n <Box\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n >\n <Field name='rating' initialValue={rating}>\n {({ input }) => <input {...input} type='hidden' />}\n </Field>\n\n <div role='group' aria-labelledby={this.headerId}>\n {checkboxFields.map((formConfigItem, index) =>\n this.renderCheckbox(formConfigItem, index),\n )}\n </div>\n\n {textFields.map((formConfigItem) => this.renderTextField(formConfigItem))}\n\n {this.state.error && (\n <Notice theme='warning' mt={4} mb={4}>\n <Notice.Label>\n <WarnM />\n </Notice.Label>\n <Notice.Content>\n {getI18nText('errorMessage', {\n // todo: Brauer Ilia - think how to fix type\n // @ts-ignore\n email: (\n <Link href={`mailto:${errorFeedbackEmail}`}>\n {errorFeedbackEmail}\n </Link>\n ),\n })}\n </Notice.Content>\n </Notice>\n )}\n\n <Flex mt={4} justifyContent='center'>\n <FeedbackRating.Submit\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n size='l'\n >\n {submitText ?? getI18nText('submitButton')}\n </FeedbackRating.Submit>\n </Flex>\n </Box>\n </SpinContainer>,\n )}\n </Form>\n </SFeedbackRating>\n\n <NoticeBubbleContainer manager={this.manager} />\n </Root>,\n );\n }\n}\n\nfunction Header(props: any) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(\n <SHeader render={Text} size={300} tag='h2' mb={4} mt={4} textAlign='center' />,\n );\n}\n\nconst FeedbackRating: typeof FeedbackRatingType & { validate: typeof FeedbackRatingRoot.validate } =\n createComponent(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n });\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAC7C,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,yBAAyB;AAC3C,OAAOC,oBAAoB,M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CAAC;EAAA;EACDmI,KAAK,EAAE,SAAPA,KAAKA,CAAGnI,KAAqB;IAAA,OAAK,YAAgB;MAAA,IAAfqD,KAAK,GAAA7D,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAiD,SAAA,GAAAjD,SAAA,MAAG,EAAE;MAC3C,IAAIqJ,OAAO,CAACxF,KAAK,CAAC,IAAI,CAAC,YAAY,CAACyF,IAAI,CAACC,MAAM,CAAC1F,KAAK,CAAC,CAAC2F,WAAW,CAAC,CAAC,CAAC,EAAE;QACrE,OAAOhJ,KAAK;MACd;IACF,CAAC;EAAA;AACH,CAAC;AAuUH,SAAS4H,MAAMA,CAAClH,KAAU,EAAE;EAAA,IAAAuI,KAAA,GAAAC,YAAA;IAAAC,KAAA;EAC1B,IAAQ5D,MAAM,GAAK7E,KAAK,CAAhB6E,MAAM;EACd,IAAM6D,OAAO,GAEM9K,IAAI;EADvB,OAAA6K,KAAA,GAAO9L,OAAO,CAACkI,MAAM,CAAC,eACpB/G,KAAA,CAAAqC,aAAA,CAACuI,OAAO,EAAAD,KAAA,CAAAxC,EAAA,YAAAU,aAAA,KAAAgC,aAAA;IAAA,QAAqB,GAAG;IAAA,OAAM,IAAI;IAAA,MAAK,CAAC;IAAA,MAAM,CAAC;IAAA,aAAY;EAAQ,GAAAJ,KAAA,GAAE,CAAC;AAElF;AAEA,IAAM/H,cAA4F,GAChG/D,eAAe,CAACgC,kBAAkB,EAAE;EAClCyI,MAAM,EAANA,MAAM;EACNxF,IAAI,EAAEpD,YAAY;EAClBmC,QAAQ,EAAEpC,cAAc;EACxBqJ,MAAM,EAAElJ;AACV,CAAC,CAAC;AAEJ,eAAegC,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"FeedbackRating.js","names":["Box","Flex","createComponent","Component","sstyled","Root","i18nEnhance","uniqueIDEnhancement","CheckM","WarnM","FeedbackIllustration","Input","Link","Modal","default","SemcoreNotice","NoticeBubbleContainer","NoticeBubbleManager","SpinContainer","Textarea","Text","createFocusDecorator","React","Field","Form","style","_sstyled","insert","localizedMessages","CheckboxButton","FeedbackItem","SliderRating","SubmitButton","FeedbackRatingRoot","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","error","rating","asProps","onVisibleChange","fn","_value","e","config","index","initialValue","props","initialValues","key","createElement","name","type","_ref7","input","FeedbackRating","Checkbox","_extends","id","label","onChange","_checked","focused","_config$description","mb","size","isDescriptionReactFragment","description","Fragment","direction","tag","mt","htmlFor","Item","validate","placement","flip","fallbackPlacements","undefined","_ref8","h","handleChange","autoComplete","state","Value","color","_inherits","_createClass","get","uid","value","getHeaderProps","headerId","getItemProps","validateOnBlur","getNoticeTextId","componentDidUpdate","prevProps","_this2","_this$asProps","status","getI18nText","setState","setTimeout","manager","add","icon","children","initialAnimation","duration","render","_ref","_ref2","_ref4","_this3","_this$asProps2","header","submitText","formConfig","notificationText","notificationTitle","learnMoreLink","_Children","Children","styles","forwardRef","theme","background","visible","_onVisibleChange","notificationVisible","onNotificationClose","errorFeedbackEmail","modalWidth","Illustration","NoticeComponent","Notice","other","_objectWithoutProperties","_excluded","SFeedbackRating","checkboxFields","filter","item","textFields","notificationId","_assignProps2","cn","Label","mr","Content","Title","gap","alignItems","Actions","handleChangeRating","Close","onClick","_objectSpread","_assignProps","handelCloseModal","focusDecorator","api","_ref5","submitting","Header","handleSubmit","_ref9","map","formConfigItem","renderCheckbox","renderTextField","email","Submit","loading","onSubmit","i18n","locale","words","split","symbols","join","Boolean","test","String","toLowerCase","_ref3","arguments[0]","_ref6","SHeader","_assignProps3"],"sources":["../../../../src/component/feedback-rating/FeedbackRating.tsx"],"sourcesContent":["import { Box, Flex } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport CheckM from '@semcore/icon/Check/m';\nimport WarnM from '@semcore/icon/Warning/m';\nimport FeedbackIllustration from '@semcore/illustration/Feedback';\nimport Input from '@semcore/input';\nimport Link from '@semcore/link';\nimport Modal from '@semcore/modal';\nimport { default as SemcoreNotice } from '@semcore/notice';\nimport { NoticeBubbleContainer, NoticeBubbleManager } from '@semcore/notice-bubble';\nimport SpinContainer from '@semcore/spin-container';\nimport Textarea from '@semcore/textarea';\nimport { Text } from '@semcore/typography';\nimport createFocusDecorator from 'final-form-focus';\nimport React, { type ReactElement } from 'react';\nimport { Field, Form } from 'react-final-form';\n\nimport type { FeedbackRatingProps, FeedbackRatingType, FormConfigItem } from './FeedbackRating.type';\nimport style from '../../style/feedback-rating.shadow.css';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport CheckboxButton from '../checkbox-button/CheckboxButton';\nimport { FeedbackItem } from '../feedback-item/FeedbackItem';\nimport SliderRating from '../slider-rating/SliderRating';\nimport { SubmitButton } from '../submit-button/SubmitButton';\n\ntype State = {\n error: boolean;\n};\n\nclass FeedbackRatingRoot extends Component<\n FeedbackRatingProps,\n {},\n State,\n typeof FeedbackRatingRoot.enhance,\n typeof FeedbackRatingRoot.defaultProps\n> {\n static displayName = 'FeedbackRatingForm';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()] as const;\n\n static defaultProps = {\n onSubmit: () => {},\n i18n: localizedMessages,\n locale: 'en',\n Illustration: FeedbackIllustration,\n Notice: SemcoreNotice,\n };\n\n static validate = {\n description: (error: Error | string) => (value = '') => {\n const words = value.split(/\\s+/);\n const symbols = words.join(' ');\n if (Boolean(value) && (symbols.length < 10 || words.length < 3)) {\n return error;\n }\n },\n email: (error: Error | string) => (value = '') => {\n if (Boolean(value) && !/.+@.+\\..+/i.test(String(value).toLowerCase())) {\n return error;\n }\n },\n };\n\n state: State = {\n error: false,\n };\n\n manager = new NoticeBubbleManager();\n\n private focusDecorator = createFocusDecorator<Record<string, any>>();\n\n get headerId() {\n const { uid } = this.asProps;\n\n return `${uid}-feedback-rating-header`;\n }\n\n getHeaderProps() {\n return {\n id: this.headerId,\n };\n }\n\n getItemProps() {\n const { validateOnBlur } = this.asProps;\n\n return {\n validateOnBlur,\n };\n }\n\n getNoticeTextId() {\n const { uid } = this.asProps;\n return `${uid}-feedback-rating-notice`;\n }\n\n handleChangeRating = (rating: number) => {\n if (rating > 0) {\n this.asProps.onVisibleChange(true, rating);\n }\n };\n\n handelCloseModal = () => {\n this.asProps.onVisibleChange(false, this.asProps.rating);\n };\n\n handleChange =\n (fn: (e: React.SyntheticEvent) => void) => (_value: any, e: React.SyntheticEvent) => {\n fn(e);\n };\n\n componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>) {\n const { status, getI18nText } = this.asProps;\n\n if (prevProps.status !== status) {\n this.setState({ error: false });\n\n if (status === 'success') {\n // showing notice with delay for SR, less than 100ms is not enough\n setTimeout(() => {\n this.manager.add({\n icon: <CheckM color='green-400' />,\n children: getI18nText('successMessage'),\n initialAnimation: true,\n duration: 5000,\n });\n }, 300);\n } else if (status === 'error') {\n this.setState({ error: true });\n }\n }\n }\n\n renderCheckbox = (config: FormConfigItem, index: number) => {\n const initialValue = this.props.initialValues[config.key];\n\n return (\n <Field name={config.key} initialValue={initialValue} type='checkbox' key={config.key}>\n {({ input }) => (\n <FeedbackRating.Checkbox\n {...input}\n id={config.key}\n label={config.label}\n onChange={(_checked, e) => input.onChange(e)}\n focused={index === 0}\n />\n )}\n </Field>\n );\n };\n\n renderTextField = (config: FormConfigItem) => {\n const initialValue = this.props.initialValues[config.key];\n\n const label =\n typeof config.label === 'string'\n ? (\n <Text mb={2} size={200}>\n {config.label}\n </Text>\n )\n : (\n (config.label as unknown as JSX.Element)\n );\n\n const isDescriptionReactFragment =\n (config.description as ReactElement)?.type === React.Fragment;\n\n return (\n <Flex direction='column'>\n <Flex tag='label' mt={4} htmlFor={config.key} key={config.key}>\n {label}\n </Flex>\n\n <FeedbackRating.Item\n name={config.key}\n validate={config.validate}\n initialValue={initialValue}\n placement='left-start'\n flip={{\n fallbackPlacements: ['right-start', 'bottom'],\n }}\n aria-describedby={config.description ? config.key + '-description' : undefined}\n >\n {/* @ts-ignore */}\n {({ input }) => {\n if (config.type === 'textarea') {\n return (\n <Textarea\n {...input}\n h={80}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n );\n }\n if (config.type === 'input' || config.type === 'email') {\n if (config.type === 'email') {\n input.autoComplete = 'email';\n input.type = 'email';\n }\n\n return (\n <Input state={input.state}>\n <Input.Value\n {...input}\n onChange={this.handleChange(input.onChange)}\n id={config.key}\n />\n </Input>\n );\n }\n return null;\n }}\n </FeedbackRating.Item>\n {config.description && (\n <Box mt={2}>\n {typeof config.description === 'string' || isDescriptionReactFragment\n ? (\n <Text size={200} color='text-secondary' id={config.key + '-description'}>\n {config.description}\n </Text>\n )\n : (\n config.description\n )}\n </Box>\n )}\n </Flex>\n );\n };\n\n render() {\n const {\n header,\n submitText,\n formConfig,\n notificationText,\n notificationTitle,\n learnMoreLink,\n Children: _Children,\n styles,\n forwardRef,\n status,\n theme,\n background,\n rating,\n visible,\n onVisibleChange: _onVisibleChange,\n notificationVisible,\n onNotificationClose,\n getI18nText,\n errorFeedbackEmail,\n modalWidth,\n Illustration,\n Notice: NoticeComponent,\n ...other\n } = this.asProps;\n\n const SFeedbackRating = Root;\n const checkboxFields = formConfig.filter((item) => item.type === 'checkbox');\n const textFields = formConfig.filter(\n (item) => item.type === 'textarea' || item.type === 'input' || item.type === 'email',\n );\n const notificationId = this.getNoticeTextId();\n\n return sstyled(styles)(\n <Root render={Box}>\n <NoticeComponent\n visible={notificationVisible}\n aria-label={getI18nText('leaveFeedback')}\n tag={Flex}\n alignItems={notificationTitle ? 'flex-start' : 'center'}\n >\n <NoticeComponent.Label mr={3} aria-hidden={true}>\n <Illustration />\n </NoticeComponent.Label>\n <NoticeComponent.Content>\n {notificationTitle ? <NoticeComponent.Title>{notificationTitle}</NoticeComponent.Title> : null}\n <NoticeComponent.Text gap={3} tag={Flex} alignItems={notificationTitle ? 'flex-start' : 'center'}>\n <Text id={notificationId}>\n {notificationText}\n </Text>\n <NoticeComponent.Actions mt={0}>\n <SliderRating\n value={rating}\n onChange={this.handleChangeRating}\n aria-labelledby={notificationId}\n />\n </NoticeComponent.Actions>\n {learnMoreLink && (\n <Link href={learnMoreLink}>\n {getI18nText('learnMore')}\n </Link>\n )}\n </NoticeComponent.Text>\n </NoticeComponent.Content>\n <NoticeComponent.Close onClick={onNotificationClose} />\n </NoticeComponent>\n\n <SFeedbackRating\n render={Modal}\n visible={visible}\n onClose={this.handelCloseModal}\n p={0}\n use:w={modalWidth ?? 440}\n aria-labelledby={this.headerId}\n >\n <Form decorators={[this.focusDecorator]} {...other}>\n {(api) =>\n sstyled(styles)(\n <SpinContainer\n background={background}\n theme={theme}\n size='xl'\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n p={1}\n m={9}\n >\n <Flex justifyContent='center'>\n <SliderRating value={rating} readonly={true} />\n </Flex>\n\n {(header as ReactElement)?.type === FeedbackRating.Header\n ? (\n header\n )\n : (\n <FeedbackRating.Header>{header}</FeedbackRating.Header>\n )}\n\n <Box\n tag='form'\n noValidate\n method='POST'\n ref={forwardRef}\n {...other}\n onSubmit={api.handleSubmit}\n >\n <Field name='rating' initialValue={rating}>\n {({ input }) => <input {...input} type='hidden' />}\n </Field>\n\n <div role='group' aria-labelledby={this.headerId}>\n {checkboxFields.map((formConfigItem, index) =>\n this.renderCheckbox(formConfigItem, index),\n )}\n </div>\n\n {textFields.map((formConfigItem) => this.renderTextField(formConfigItem))}\n\n {this.state.error && (\n <SemcoreNotice theme='warning' mt={4} mb={4}>\n <SemcoreNotice.Label>\n <WarnM />\n </SemcoreNotice.Label>\n <SemcoreNotice.Content>\n {getI18nText('errorMessage', {\n // todo: Brauer Ilia - think how to fix type\n // @ts-ignore\n email: (\n <Link href={`mailto:${errorFeedbackEmail}`}>\n {errorFeedbackEmail}\n </Link>\n ),\n })}\n </SemcoreNotice.Content>\n </SemcoreNotice>\n )}\n\n <Flex mt={4} justifyContent='center'>\n <FeedbackRating.Submit\n loading={status !== 'loading' ? api.submitting : status === 'loading'}\n size='l'\n >\n {submitText ?? getI18nText('submitButton')}\n </FeedbackRating.Submit>\n </Flex>\n </Box>\n </SpinContainer>,\n )}\n </Form>\n </SFeedbackRating>\n\n <NoticeBubbleContainer manager={this.manager} />\n </Root>,\n );\n }\n}\n\nfunction Header(props: any) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(\n <SHeader render={Modal.Title} />,\n );\n}\n\nconst FeedbackRating: typeof FeedbackRatingType & { validate: typeof FeedbackRatingRoot.validate } =\n createComponent(FeedbackRatingRoot, {\n Header,\n Item: FeedbackItem,\n Checkbox: CheckboxButton,\n Submit: SubmitButton,\n });\n\nexport default FeedbackRating;\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AAEpD,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,KAAK,MAAM,yBAAyB;AAC3C,OAAOC,oBAAoB,MAAM,gCAAgC;AACjE,OAAOC,KAAK,MAAM,gBAAgB;AAClC,OAAOC,IAAI,MAAM,eAAe;AAChC,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,OAAO,IAAIC,aAAa,QAAQ,iBAAiB;AAC1D,SAASC,qBAAqB,EAAEC,mBAAmB,QAAQ,wBAAwB;AACnF,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,oBAAoB,MAAM,kBAAkB;AACnD,OAAOC,KAAK,MAA6B,OAAO;AAChD,SAASC,KAAK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AC,YAAY,CAAC6F,IAAI,CAACC,MAAM,CAAC9F,KAAK,CAAC,CAAC+F,WAAW,CAAC,CAAC,CAAC,EAAE;QACrE,OAAOpJ,KAAK;MACd;IACF,CAAC;EAAA;AACH,CAAC;AAyUH,SAASgI,MAAMA,CAACtH,KAAU,EAAE;EAAA,IAAA2I,KAAA,GAAAC,YAAA;IAAAC,KAAA;EAC1B,IAAQhE,MAAM,GAAK7E,KAAK,CAAhB6E,MAAM;EACd,IAAMiE,OAAO,GAEMzL,KAAK,CAACmJ,KAAK;EAD9B,OAAAqC,KAAA,GAAOjM,OAAO,CAACiI,MAAM,CAAC,eACpB/G,KAAA,CAAAqC,aAAA,CAAC2I,OAAO,EAAAD,KAAA,CAAAzC,EAAA,YAAAW,aAAA,KAAAgC,aAAA,KAAAJ,KAAA,GAAuB,CAAC;AAEpC;AAEA,IAAMnI,cAA4F,GAChG9D,eAAe,CAAC+B,kBAAkB,EAAE;EAClC6I,MAAM,EAANA,MAAM;EACN5F,IAAI,EAAEpD,YAAY;EAClBmC,QAAQ,EAAEpC,cAAc;EACxByJ,MAAM,EAAEtJ;AACV,CAAC,CAAC;AAEJ,eAAegC,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import type Button from '@semcore/button';\nimport type Checkbox from '@semcore/checkbox';\nimport type { CheckboxProps } from '@semcore/checkbox';\nimport type { Intergalactic } from '@semcore/core';\nimport type { Text } from '@semcore/typography';\nimport type React from 'react';\nimport type { FieldProps } from 'react-final-form';\n\nimport type { FeedbackFormProps } from '../../index';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea' | 'email';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** Status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** Flag for show/hide notification */\n notificationVisible: boolean;\n /** Notification close callback */\n onNotificationClose: () => void;\n /** Text in notification panel */\n notificationText: string;\n /** Title in notification panel */\n notificationTitle?: string;\n /** Optional link in notification panel */\n learnMoreLink?: string;\n /** Rating value */\n rating: number;\n /** Visible modal form flag */\n visible: boolean;\n /** Visibility changes callback */\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** Width for modal with form */\n modalWidth?: number | string;\n\n /** Header of modal with form */\n header: React.ReactNode;\n /** Text for submit button of form */\n submitText?: string;\n /** Config for form fields */\n formConfig: FormConfigItem[];\n\n /** Initial form values including rating */\n initialValues: Record<string, any> & { rating: number };\n /** Email address shown in error messages */\n errorFeedbackEmail: string;\n /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<CheckboxProps, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\ndeclare const FeedbackRatingType: Intergalactic.Component<'form', FeedbackRatingProps> & {\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\nexport { FeedbackRatingType };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FeedbackRating.type.js","names":[],"sources":["../../../../src/component/feedback-rating/FeedbackRating.type.ts"],"sourcesContent":["import type Button from '@semcore/button';\nimport type Checkbox from '@semcore/checkbox';\nimport type { CheckboxProps } from '@semcore/checkbox';\nimport type { Intergalactic } from '@semcore/core';\nimport type { IllustrationProps } from '@semcore/illustration';\nimport type Notice from '@semcore/notice';\nimport type { Text } from '@semcore/typography';\nimport type React from 'react';\nimport type { FieldProps } from 'react-final-form';\n\nimport type { FeedbackFormProps } from '../../index';\n\nexport type FormConfigItem = {\n key: string;\n label: React.ReactNode;\n type: 'input' | 'checkbox' | 'textarea' | 'email';\n description?: React.ReactNode;\n validate?: (value: any) => Error | string | undefined;\n};\n\nexport type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<\n FeedbackFormProps,\n 'initialValues' | 'loading'\n> & {\n /** Status of form */\n status: 'default' | 'success' | 'error' | 'loading';\n\n /** Flag for show/hide notification */\n notificationVisible: boolean;\n /** Notification close callback */\n onNotificationClose: () => void;\n /** Text in notification panel */\n notificationText: string;\n /** Title in notification panel */\n notificationTitle?: string;\n /** Optional link in notification panel */\n learnMoreLink?: string;\n /** Rating value */\n rating: number;\n /** Visible modal form flag */\n visible: boolean;\n /** Visibility changes callback */\n onVisibleChange: (visible: boolean, rating: number) => void;\n\n /** Width for modal with form */\n modalWidth?: number | string;\n\n /** Header of modal with form */\n header: React.ReactNode;\n /** Text for submit button of form */\n submitText?: string;\n /** Config for form fields */\n formConfig: FormConfigItem[];\n\n /** Initial form values including rating */\n initialValues: Record<string, any> & { rating: number };\n /** Email address shown in error messages */\n errorFeedbackEmail: string;\n /** Specifies the locale for i18n support */\n locale?: string;\n /** Illustration element */\n Illustration?: Intergalactic.Component<'svg', IllustrationProps>;\n /** Notice component */\n Notice?: typeof Notice;\n};\n\nexport type FeedbackRatingItemProps = FieldProps<any, any> & {\n /**\n * Allows to override which passed props will be passed to the Tooltip component.\n */\n tooltipProps?: string[];\n};\n\nexport type FeedbackRatingCheckboxProps = Omit<CheckboxProps, 'label'> & {\n focused: boolean;\n label: React.ReactNode;\n};\n\ndeclare const FeedbackRatingType: Intergalactic.Component<'form', FeedbackRatingProps> & {\n Item: Intergalactic.Component<'div', FeedbackRatingItemProps>;\n Submit: typeof Button;\n Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;\n Header: typeof Text;\n};\n\nexport { FeedbackRatingType };\n"],"mappings":"","ignoreList":[]}
@@ -14,14 +14,14 @@ import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
14
14
  import { Flex, Box } from '@semcore/flex-box';
15
15
  import React from 'react';
16
16
  /*!__reshadow-styles__:"../../style/slider-rating.shadow.css"*/
17
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SSliderRating_1t9bb_gg_ .___SStar_1t9bb_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_1t9bb_gg_:focus-visible .___SStar_1t9bb_gg_.__hovered_1t9bb_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_1t9bb_gg_ .___SStar_1t9bb_gg_:hover{cursor:pointer;transform:scale(1.3)}.___SSliderRating_1t9bb_gg_.__readonly_1t9bb_gg_ .___SStar_1t9bb_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_1t9bb_gg_.__filled_1t9bb_gg_:active{animation:wobble .8s ease-in-out}.___SStar_1t9bb_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_1t9bb_gg_.__filled_1t9bb_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}", /*__inner_css_end__*/"1t9bb_gg_"),
17
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SSliderRating_10obr_gg_ .___SStar_10obr_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_10obr_gg_:focus-visible .___SStar_10obr_gg_.__hovered_10obr_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_10obr_gg_ .___SStar_10obr_gg_:hover{cursor:pointer;transform:scale(1.3)}.___SSliderRating_10obr_gg_.__readonly_10obr_gg_ .___SStar_10obr_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_10obr_gg_.__filled_10obr_gg_:active{animation:wobble .8s ease-in-out}.___SStar_10obr_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_10obr_gg_.__filled_10obr_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}", /*__inner_css_end__*/"10obr_gg_"),
18
18
  /*__reshadow_css_end__*/
19
19
  {
20
- "__SSliderRating": "___SSliderRating_1t9bb_gg_",
21
- "__SStar": "___SStar_1t9bb_gg_",
22
- "_hovered": "__hovered_1t9bb_gg_",
23
- "_readonly": "__readonly_1t9bb_gg_",
24
- "_filled": "__filled_1t9bb_gg_"
20
+ "__SSliderRating": "___SSliderRating_10obr_gg_",
21
+ "__SStar": "___SStar_10obr_gg_",
22
+ "_hovered": "__hovered_10obr_gg_",
23
+ "_readonly": "__readonly_10obr_gg_",
24
+ "_filled": "__filled_10obr_gg_"
25
25
  });
26
26
  import { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';
27
27
  var MIN = 1;
@@ -6,4 +6,12 @@ SFeedbackRating {
6
6
  ul, li {
7
7
  list-style: none;
8
8
  }
9
+
10
+ SHeader {
11
+ font-size: var(--intergalactic-fs-300, 16px);
12
+ line-height: var(--intergalactic-lh-300, 150%);
13
+ font-weight: var(--intergalactic-bold, 700);
14
+ margin: var(--intergalactic-spacing-4x, 16px) 0;
15
+ text-align: center;
16
+ }
9
17
  }
@@ -22,17 +22,17 @@ var style = (
22
22
  /*__reshadow_css_start__*/
23
23
  (sstyled.insert(
24
24
  /*__inner_css_start__*/
25
- `.___SFeedbackForm_1ibpf_gg_{max-width:320px}.___SCancel_1ibpf_gg_,.___SSubmit_1ibpf_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_1ibpf_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_1ibpf_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_1ibpf_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px));width:80px;height:80px;background-image:url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345E0A8'/%3E%3Cpath d='M29 45.2852L29.2 45.6352C35.39 42.1852 53.39 31.9652 56.73 35.1052C55.6 32.0052 39.7 35.4352 29 45.2852Z' fill='white'/%3E%3Cpath d='M28.44 31.6343C26.63 37.6343 19.23 56.1043 15 61.9443L18 62.8543L19.58 61.5343C23.8 51.9843 29.58 35.5343 29.89 30.0743C29.39 29.8143 28.93 30.2143 28.44 31.6343Z' fill='white'/%3E%3Cpath d='M15 62.0078C19.23 56.1678 26.63 37.7378 28.44 31.6678C30.25 25.5978 33.49 37.6678 31.67 42.7878' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 45.9424C38.68 35.5824 55.27 31.9424 56.43 35.1024C57.12 36.9924 43 41.3624 38.02 47.4224' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44.45 21.93C41.21 20.77 35.86 19.04 33 18.24C37.12 16.41 70 4.24 72.67 3C71.75 7.11 67.75 21.28 65.96 27.93C61.13 26.25 56.23 24.78 53.03 23.74C51.0298 26.3907 49.2219 29.1812 47.62 32.09C46.44 28.23 45.29 23.77 44.45 21.93Z' fill='white' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M45 22.08L61.74 11' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M53 23.73L72.64 3' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48 32.58L55.86 25' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.23 30.77L51.69 25.13L52.66 24L54.73 24.61L55.16 24.48L51.8 27.91L49.33 30.18L48 31.29L48.23 30.77Z' fill='black'/%3E%3Cpath d='M33.81 22L23 27.12' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M40.89 23L34 27.37' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M62.04 29L58 38.85' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M46.68 41C50.29 43.42 44.81 49.52 43 51.12' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47.17 44C51.31 46.09 48.33 51.76 46 54.6' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.86 49C54.37 53.48 36.31 72.72 35 73.78' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cmask id='mask0_11950_117175' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='4' y='6' width='73' height='73'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345DFA7'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_11950_117175)'%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' fill='black'/%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A")}`,
25
+ `.___SFeedbackForm_1pj7k_gg_{max-width:320px}.___SCancel_1pj7k_gg_,.___SSubmit_1pj7k_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_1pj7k_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_1pj7k_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_1pj7k_gg_{margin-bottom:calc(var(--intergalactic-spacing-4x, 16px));width:80px;height:80px;background-image:url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345E0A8'/%3E%3Cpath d='M29 45.2852L29.2 45.6352C35.39 42.1852 53.39 31.9652 56.73 35.1052C55.6 32.0052 39.7 35.4352 29 45.2852Z' fill='white'/%3E%3Cpath d='M28.44 31.6343C26.63 37.6343 19.23 56.1043 15 61.9443L18 62.8543L19.58 61.5343C23.8 51.9843 29.58 35.5343 29.89 30.0743C29.39 29.8143 28.93 30.2143 28.44 31.6343Z' fill='white'/%3E%3Cpath d='M15 62.0078C19.23 56.1678 26.63 37.7378 28.44 31.6678C30.25 25.5978 33.49 37.6678 31.67 42.7878' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M28 45.9424C38.68 35.5824 55.27 31.9424 56.43 35.1024C57.12 36.9924 43 41.3624 38.02 47.4224' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44.45 21.93C41.21 20.77 35.86 19.04 33 18.24C37.12 16.41 70 4.24 72.67 3C71.75 7.11 67.75 21.28 65.96 27.93C61.13 26.25 56.23 24.78 53.03 23.74C51.0298 26.3907 49.2219 29.1812 47.62 32.09C46.44 28.23 45.29 23.77 44.45 21.93Z' fill='white' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M45 22.08L61.74 11' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M53 23.73L72.64 3' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48 32.58L55.86 25' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.23 30.77L51.69 25.13L52.66 24L54.73 24.61L55.16 24.48L51.8 27.91L49.33 30.18L48 31.29L48.23 30.77Z' fill='black'/%3E%3Cpath d='M33.81 22L23 27.12' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M40.89 23L34 27.37' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M62.04 29L58 38.85' stroke='white' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M46.68 41C50.29 43.42 44.81 49.52 43 51.12' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47.17 44C51.31 46.09 48.33 51.76 46 54.6' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M48.86 49C54.37 53.48 36.31 72.72 35 73.78' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cmask id='mask0_11950_117175' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='4' y='6' width='73' height='73'%3E%3Cpath d='M28.1632 6.00003C27.9554 5.99875 27.7493 6.03875 27.5571 6.11772C27.3648 6.19668 27.1902 6.31304 27.0432 6.46003L14.1332 19.38C7.645 25.8687 4 34.669 4 43.845C4 53.0211 7.645 61.8213 14.1332 68.31C17.3463 71.5242 21.1611 74.0738 25.3597 75.8134C29.5583 77.5529 34.0585 78.4482 38.6032 78.4482C43.1479 78.4482 47.6481 77.5529 51.8467 75.8134C56.0454 74.0738 59.8602 71.5242 63.0732 68.31L75.9832 55.4C76.1316 55.2536 76.2495 55.0792 76.3301 54.887C76.4108 54.6948 76.4526 54.4885 76.4532 54.28V6.89003C76.4506 6.65307 76.3546 6.42671 76.1861 6.26009C76.0176 6.09346 75.7902 6.00002 75.5532 6.00003H28.1632Z' fill='%2345DFA7'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_11950_117175)'%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' fill='black'/%3E%3Cpath d='M5 74.6871C7.49 72.3471 13.24 63.6871 14.52 61.2471C28.18 59.1271 34.71 71.2471 34.98 74.7671C32.7234 79.651 30.1305 84.3723 27.22 88.8971' stroke='black' stroke-width='0.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A")}`,
26
26
  /*__inner_css_end__*/
27
- "1ibpf_gg_"
27
+ "1pj7k_gg_"
28
28
  ), /*__reshadow_css_end__*/
29
29
  {
30
- "__SFeedbackForm": "___SFeedbackForm_1ibpf_gg_",
31
- "__SSubmit": "___SSubmit_1ibpf_gg_",
32
- "__SCancel": "___SCancel_1ibpf_gg_",
33
- "__SNotice": "___SNotice_1ibpf_gg_",
34
- "__SSuccess": "___SSuccess_1ibpf_gg_",
35
- "__SEmail": "___SEmail_1ibpf_gg_"
30
+ "__SFeedbackForm": "___SFeedbackForm_1pj7k_gg_",
31
+ "__SSubmit": "___SSubmit_1pj7k_gg_",
32
+ "__SCancel": "___SCancel_1pj7k_gg_",
33
+ "__SNotice": "___SNotice_1pj7k_gg_",
34
+ "__SSuccess": "___SSuccess_1pj7k_gg_",
35
+ "__SEmail": "___SEmail_1pj7k_gg_"
36
36
  })
37
37
  );
38
38
  var FeedbackForm = /* @__PURE__ */ (function(_Component) {
@@ -15,13 +15,13 @@ var style = (
15
15
  /*__reshadow_css_start__*/
16
16
  (sstyled.insert(
17
17
  /*__inner_css_start__*/
18
- ".___SCheckboxButton_cy1c8_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_cy1c8_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_cy1c8_gg_.__checked_cy1c8_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_cy1c8_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_cy1c8_gg_.__checked_cy1c8_gg_:hover{background-color:rgba(0,143,248,.2)}}",
18
+ ".___SCheckboxButton_198cq_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_198cq_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_198cq_gg_.__checked_198cq_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_198cq_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_198cq_gg_.__checked_198cq_gg_:hover{background-color:rgba(0,143,248,.2)}}",
19
19
  /*__inner_css_end__*/
20
- "cy1c8_gg_"
20
+ "198cq_gg_"
21
21
  ), /*__reshadow_css_end__*/
22
22
  {
23
- "__SCheckboxButton": "___SCheckboxButton_cy1c8_gg_",
24
- "_checked": "__checked_cy1c8_gg_"
23
+ "__SCheckboxButton": "___SCheckboxButton_198cq_gg_",
24
+ "_checked": "__checked_198cq_gg_"
25
25
  })
26
26
  );
27
27
  var CheckboxButtonRoot = /* @__PURE__ */ (function(_Component) {
@@ -7,16 +7,16 @@ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
7
7
  import _inherits from "@babel/runtime/helpers/esm/inherits";
8
8
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
9
  import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
10
+ import { Box, Flex } from "@semcore/base-components";
10
11
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
11
12
  import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
12
- import { Box, Flex } from "@semcore/flex-box";
13
13
  import CheckM from "@semcore/icon/Check/m";
14
14
  import WarnM from "@semcore/icon/Warning/m";
15
15
  import FeedbackIllustration from "@semcore/illustration/Feedback";
16
16
  import Input from "@semcore/input";
17
17
  import Link from "@semcore/link";
18
18
  import Modal from "@semcore/modal";
19
- import Notice from "@semcore/notice";
19
+ import SemcoreNotice from "@semcore/notice";
20
20
  import { NoticeBubbleContainer, NoticeBubbleManager } from "@semcore/notice-bubble";
21
21
  import SpinContainer from "@semcore/spin-container";
22
22
  import Textarea from "@semcore/textarea";
@@ -29,18 +29,19 @@ import CheckboxButton from "../checkbox-button/CheckboxButton.mjs";
29
29
  import { FeedbackItem } from "../feedback-item/FeedbackItem.mjs";
30
30
  import SliderRating from "../slider-rating/SliderRating.mjs";
31
31
  import { SubmitButton } from "../submit-button/SubmitButton.mjs";
32
- var _excluded = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth"];
32
+ var _excluded = ["header", "submitText", "formConfig", "notificationText", "notificationTitle", "learnMoreLink", "Children", "styles", "forwardRef", "status", "theme", "background", "rating", "visible", "onVisibleChange", "notificationVisible", "onNotificationClose", "getI18nText", "errorFeedbackEmail", "modalWidth", "Illustration", "Notice"];
33
33
  /*!__reshadow-styles__:"../../style/feedback-rating.shadow.css"*/
34
34
  var style = (
35
35
  /*__reshadow_css_start__*/
36
36
  (sstyled.insert(
37
37
  /*__inner_css_start__*/
38
- ".___SFeedbackRating_fq0ub_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_fq0ub_gg_ li{list-style:none}",
38
+ ".___SFeedbackRating_rhp4z_gg_ ul{margin:0;padding:0;list-style:none}.___SFeedbackRating_rhp4z_gg_ li{list-style:none}.___SFeedbackRating_rhp4z_gg_ .___SHeader_rhp4z_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700);margin:var(--intergalactic-spacing-4x, 16px)0;text-align:center}",
39
39
  /*__inner_css_end__*/
40
- "fq0ub_gg_"
40
+ "rhp4z_gg_"
41
41
  ), /*__reshadow_css_end__*/
42
42
  {
43
- "__SFeedbackRating": "___SFeedbackRating_fq0ub_gg_"
43
+ "__SFeedbackRating": "___SFeedbackRating_rhp4z_gg_",
44
+ "__SHeader": "___SHeader_rhp4z_gg_"
44
45
  })
45
46
  );
46
47
  var FeedbackRatingRoot = /* @__PURE__ */ (function(_Component) {
@@ -207,7 +208,7 @@ var FeedbackRatingRoot = /* @__PURE__ */ (function(_Component) {
207
208
  _this$asProps2.Children;
208
209
  var styles = _this$asProps2.styles, forwardRef = _this$asProps2.forwardRef, status = _this$asProps2.status, theme = _this$asProps2.theme, background = _this$asProps2.background, rating = _this$asProps2.rating, visible = _this$asProps2.visible;
209
210
  _this$asProps2.onVisibleChange;
210
- var notificationVisible = _this$asProps2.notificationVisible, onNotificationClose = _this$asProps2.onNotificationClose, getI18nText = _this$asProps2.getI18nText, errorFeedbackEmail = _this$asProps2.errorFeedbackEmail, modalWidth = _this$asProps2.modalWidth, other = _objectWithoutProperties(_this$asProps2, _excluded);
211
+ var notificationVisible = _this$asProps2.notificationVisible, onNotificationClose = _this$asProps2.onNotificationClose, getI18nText = _this$asProps2.getI18nText, errorFeedbackEmail = _this$asProps2.errorFeedbackEmail, modalWidth = _this$asProps2.modalWidth, Illustration = _this$asProps2.Illustration, NoticeComponent = _this$asProps2.Notice, other = _objectWithoutProperties(_this$asProps2, _excluded);
211
212
  var SFeedbackRating = Modal;
212
213
  var checkboxFields = formConfig.filter(function(item) {
213
214
  return item.type === "checkbox";
@@ -216,30 +217,29 @@ var FeedbackRatingRoot = /* @__PURE__ */ (function(_Component) {
216
217
  return item.type === "textarea" || item.type === "input" || item.type === "email";
217
218
  });
218
219
  var notificationId = this.getNoticeTextId();
219
- return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(Box, assignProps({}, _ref2), /* @__PURE__ */ React.createElement(Notice, _ref4.cn("Notice", {
220
+ return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(Box, assignProps({}, _ref2), /* @__PURE__ */ React.createElement(NoticeComponent, _ref4.cn("NoticeComponent", {
220
221
  "visible": notificationVisible,
221
222
  "aria-label": getI18nText("leaveFeedback"),
222
223
  "tag": Flex,
223
224
  "alignItems": notificationTitle ? "flex-start" : "center"
224
- }), /* @__PURE__ */ React.createElement(Notice.Label, {
225
+ }), /* @__PURE__ */ React.createElement(NoticeComponent.Label, {
225
226
  mr: 3,
226
227
  "aria-hidden": true
227
- }, /* @__PURE__ */ React.createElement(FeedbackIllustration, _ref4.cn("FeedbackIllustration", {}))), /* @__PURE__ */ React.createElement(Notice.Content, null, notificationTitle ? /* @__PURE__ */ React.createElement(Notice.Title, null, notificationTitle) : null, /* @__PURE__ */ React.createElement(Notice.Text, {
228
+ }, /* @__PURE__ */ React.createElement(Illustration, _ref4.cn("Illustration", {}))), /* @__PURE__ */ React.createElement(NoticeComponent.Content, null, notificationTitle ? /* @__PURE__ */ React.createElement(NoticeComponent.Title, null, notificationTitle) : null, /* @__PURE__ */ React.createElement(NoticeComponent.Text, {
229
+ gap: 3,
228
230
  tag: Flex,
229
231
  alignItems: notificationTitle ? "flex-start" : "center"
230
232
  }, /* @__PURE__ */ React.createElement(Text, _ref4.cn("Text", {
231
- "mr": 3,
232
233
  "id": notificationId
233
- }), notificationText), /* @__PURE__ */ React.createElement(Notice.Actions, {
234
+ }), notificationText), /* @__PURE__ */ React.createElement(NoticeComponent.Actions, {
234
235
  mt: 0
235
236
  }, /* @__PURE__ */ React.createElement(SliderRating, _ref4.cn("SliderRating", {
236
237
  "value": rating,
237
238
  "onChange": this.handleChangeRating,
238
239
  "aria-labelledby": notificationId
239
240
  }))), learnMoreLink && /* @__PURE__ */ React.createElement(Link, _ref4.cn("Link", {
240
- "ml": 3,
241
241
  "href": learnMoreLink
242
- }), getI18nText("learnMore")))), /* @__PURE__ */ React.createElement(Notice.Close, {
242
+ }), getI18nText("learnMore")))), /* @__PURE__ */ React.createElement(NoticeComponent.Close, {
243
243
  onClick: onNotificationClose
244
244
  })), /* @__PURE__ */ React.createElement(SFeedbackRating, _ref4.cn("SFeedbackRating", _objectSpread({}, assignProps({
245
245
  "visible": visible,
@@ -285,11 +285,11 @@ var FeedbackRatingRoot = /* @__PURE__ */ (function(_Component) {
285
285
  return _this3.renderCheckbox(formConfigItem, index);
286
286
  })), textFields.map(function(formConfigItem) {
287
287
  return _this3.renderTextField(formConfigItem);
288
- }), _this3.state.error && /* @__PURE__ */ React.createElement(Notice, _ref5.cn("Notice", {
288
+ }), _this3.state.error && /* @__PURE__ */ React.createElement(SemcoreNotice, _ref5.cn("SemcoreNotice", {
289
289
  "theme": "warning",
290
290
  "mt": 4,
291
291
  "mb": 4
292
- }), /* @__PURE__ */ React.createElement(Notice.Label, null, /* @__PURE__ */ React.createElement(WarnM, _ref5.cn("WarnM", {}))), /* @__PURE__ */ React.createElement(Notice.Content, null, getI18nText("errorMessage", {
292
+ }), /* @__PURE__ */ React.createElement(SemcoreNotice.Label, null, /* @__PURE__ */ React.createElement(WarnM, _ref5.cn("WarnM", {}))), /* @__PURE__ */ React.createElement(SemcoreNotice.Content, null, getI18nText("errorMessage", {
293
293
  // todo: Brauer Ilia - think how to fix type
294
294
  // @ts-ignore
295
295
  email: /* @__PURE__ */ React.createElement(Link, _ref5.cn("Link", {
@@ -315,7 +315,9 @@ _defineProperty(FeedbackRatingRoot, "defaultProps", {
315
315
  onSubmit: function onSubmit() {
316
316
  },
317
317
  i18n: localizedMessages,
318
- locale: "en"
318
+ locale: "en",
319
+ Illustration: FeedbackIllustration,
320
+ Notice: SemcoreNotice
319
321
  });
320
322
  _defineProperty(FeedbackRatingRoot, "validate", {
321
323
  description: function description(error) {
@@ -340,14 +342,8 @@ _defineProperty(FeedbackRatingRoot, "validate", {
340
342
  function Header(props) {
341
343
  var _ref3 = arguments[0], _ref6;
342
344
  var styles = props.styles;
343
- var SHeader = Text;
344
- return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SHeader, _ref6.cn("SHeader", _objectSpread({}, assignProps({
345
- "size": 300,
346
- "tag": "h2",
347
- "mb": 4,
348
- "mt": 4,
349
- "textAlign": "center"
350
- }, _ref3))));
345
+ var SHeader = Modal.Title;
346
+ return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SHeader, _ref6.cn("SHeader", _objectSpread({}, assignProps({}, _ref3))));
351
347
  }
352
348
  var FeedbackRating = createComponent(FeedbackRatingRoot, {
353
349
  Header,
@@ -15,16 +15,16 @@ var style = (
15
15
  /*__reshadow_css_start__*/
16
16
  (sstyled.insert(
17
17
  /*__inner_css_start__*/
18
- ".___SSliderRating_1t9bb_gg_ .___SStar_1t9bb_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_1t9bb_gg_:focus-visible .___SStar_1t9bb_gg_.__hovered_1t9bb_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_1t9bb_gg_ .___SStar_1t9bb_gg_:hover{cursor:pointer;transform:scale(1.3)}.___SSliderRating_1t9bb_gg_.__readonly_1t9bb_gg_ .___SStar_1t9bb_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_1t9bb_gg_.__filled_1t9bb_gg_:active{animation:wobble .8s ease-in-out}.___SStar_1t9bb_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_1t9bb_gg_.__filled_1t9bb_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}",
18
+ ".___SSliderRating_10obr_gg_ .___SStar_10obr_gg_{transition:all calc(var(--intergalactic-duration-control, 200)*1ms) ease-out}.___SSliderRating_10obr_gg_:focus-visible .___SStar_10obr_gg_.__hovered_10obr_gg_{cursor:pointer;transform:scale(1.3)}@media (hover:hover){.___SSliderRating_10obr_gg_ .___SStar_10obr_gg_:hover{cursor:pointer;transform:scale(1.3)}.___SSliderRating_10obr_gg_.__readonly_10obr_gg_ .___SStar_10obr_gg_:hover{cursor:default;transform:none;transition:none}}.___SStar_10obr_gg_.__filled_10obr_gg_:active{animation:wobble .8s ease-in-out}.___SStar_10obr_gg_ path{fill:var(--intergalactic-slider-rating-normal, #a9abb6)}.___SStar_10obr_gg_.__filled_10obr_gg_ path{stroke-width:0;fill:var(--intergalactic-slider-rating-hover-active, #fdc23c)}",
19
19
  /*__inner_css_end__*/
20
- "1t9bb_gg_"
20
+ "10obr_gg_"
21
21
  ), /*__reshadow_css_end__*/
22
22
  {
23
- "__SSliderRating": "___SSliderRating_1t9bb_gg_",
24
- "__SStar": "___SStar_1t9bb_gg_",
25
- "_hovered": "__hovered_1t9bb_gg_",
26
- "_readonly": "__readonly_1t9bb_gg_",
27
- "_filled": "__filled_1t9bb_gg_"
23
+ "__SSliderRating": "___SSliderRating_10obr_gg_",
24
+ "__SStar": "___SStar_10obr_gg_",
25
+ "_hovered": "__hovered_10obr_gg_",
26
+ "_readonly": "__readonly_10obr_gg_",
27
+ "_filled": "__filled_10obr_gg_"
28
28
  })
29
29
  );
30
30
  var MIN = 1;
@@ -6,4 +6,12 @@ SFeedbackRating {
6
6
  ul, li {
7
7
  list-style: none;
8
8
  }
9
+
10
+ SHeader {
11
+ font-size: var(--intergalactic-fs-300, 16px);
12
+ line-height: var(--intergalactic-lh-300, 150%);
13
+ font-weight: var(--intergalactic-bold, 700);
14
+ margin: var(--intergalactic-spacing-4x, 16px) 0;
15
+ text-align: center;
16
+ }
9
17
  }