@semcore/feedback-form 16.2.0 → 17.0.0-prerelease.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/FeedbackForm.js +108 -120
  3. package/lib/cjs/FeedbackForm.js.map +1 -1
  4. package/lib/cjs/component/checkbox-button/CheckboxButton.js +48 -45
  5. package/lib/cjs/component/checkbox-button/CheckboxButton.js.map +1 -1
  6. package/lib/cjs/component/feedback-item/FeedbackItem.js +33 -35
  7. package/lib/cjs/component/feedback-item/FeedbackItem.js.map +1 -1
  8. package/lib/cjs/component/feedback-rating/FeedbackRating.js +240 -274
  9. package/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -1
  10. package/lib/cjs/component/feedback-rating/FeedbackRating.type.js.map +1 -1
  11. package/lib/cjs/component/slider-rating/SliderRating.js +146 -147
  12. package/lib/cjs/component/slider-rating/SliderRating.js.map +1 -1
  13. package/lib/cjs/component/submit-button/SubmitButton.js +12 -9
  14. package/lib/cjs/component/submit-button/SubmitButton.js.map +1 -1
  15. package/lib/cjs/index.d.js +3 -3
  16. package/lib/cjs/index.d.js.map +1 -1
  17. package/lib/cjs/index.js +5 -5
  18. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +16 -16
  19. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  20. package/lib/es6/FeedbackForm.js +101 -113
  21. package/lib/es6/FeedbackForm.js.map +1 -1
  22. package/lib/es6/component/checkbox-button/CheckboxButton.js +44 -41
  23. package/lib/es6/component/checkbox-button/CheckboxButton.js.map +1 -1
  24. package/lib/es6/component/feedback-item/FeedbackItem.js +29 -31
  25. package/lib/es6/component/feedback-item/FeedbackItem.js.map +1 -1
  26. package/lib/es6/component/feedback-rating/FeedbackRating.js +220 -254
  27. package/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -1
  28. package/lib/es6/component/feedback-rating/FeedbackRating.type.js.map +1 -1
  29. package/lib/es6/component/slider-rating/SliderRating.js +138 -139
  30. package/lib/es6/component/slider-rating/SliderRating.js.map +1 -1
  31. package/lib/es6/component/submit-button/SubmitButton.js +11 -8
  32. package/lib/es6/component/submit-button/SubmitButton.js.map +1 -1
  33. package/lib/es6/index.d.js +0 -3
  34. package/lib/es6/index.d.js.map +1 -1
  35. package/lib/es6/translations/__intergalactic-dynamic-locales.js +15 -15
  36. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  37. package/lib/esm/FeedbackForm.mjs +101 -101
  38. package/lib/esm/component/checkbox-button/CheckboxButton.mjs +47 -39
  39. package/lib/esm/component/feedback-item/FeedbackItem.mjs +29 -23
  40. package/lib/esm/component/feedback-rating/FeedbackRating.mjs +223 -234
  41. package/lib/esm/component/slider-rating/SliderRating.mjs +139 -129
  42. package/lib/esm/component/submit-button/SubmitButton.mjs +11 -8
  43. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
  44. package/lib/types/component/checkbox-button/CheckboxButton.d.ts +1 -3
  45. package/lib/types/component/feedback-rating/FeedbackRating.d.ts +11 -189
  46. package/lib/types/component/feedback-rating/FeedbackRating.type.d.ts +7 -9
  47. package/lib/types/component/slider-rating/SliderRating.d.ts +1 -1
  48. package/lib/types/index.d.ts +1 -3
  49. package/package.json +17 -16
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitButton.js","names":["Button","Root","sstyled","React","SubmitButton","props","_ref","arguments[0]","_ref2","styles","SSubmit","createElement","cn","_objectSpread","_assignProps"],"sources":["../../../../src/component/submit-button/SubmitButton.tsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { Root, sstyled, type IRootComponentProps } from '@semcore/core';\nimport React from 'react';\n\nexport function SubmitButton(props: IRootComponentProps) {\n const { styles } = props;\n const SSubmit = Root;\n return sstyled(styles)(<SSubmit render={Button} type='submit' use='primary' theme='success' />);\n}\n"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,EAAEC,OAAO,QAAkC,eAAe;AACvE,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAO,SAASC,YAAYA,CAACC,KAA0B,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACvD,IAAQC,MAAM,GAAKJ,KAAK,CAAhBI,MAAM;EACd,IAAMC,OAAO,GAC2BV,MAAM;EAA9C,OAAAQ,KAAA,GAAON,OAAO,CAACO,MAAM,CAAC,eAACN,KAAA,CAAAQ,aAAA,CAACD,OAAO,EAAAF,KAAA,CAAAI,EAAA,YAAAC,aAAA,KAAAC,YAAA;IAAA,QAAsB,QAAQ;IAAA,OAAK,SAAS;IAAA,SAAO;EAAS,GAAAR,IAAA,GAAE,CAAC;AAChG","ignoreList":[]}
1
+ {"version":3,"file":"SubmitButton.js","names":["Button","Root","sstyled","React","SubmitButton","props","_ref","arguments[0]","_ref2","styles","SSubmit","createElement","cn","_assignProps"],"sources":["../../../../src/component/submit-button/SubmitButton.tsx"],"sourcesContent":["import Button from '@semcore/button';\nimport { Root, sstyled, type IRootComponentProps } from '@semcore/core';\nimport React from 'react';\n\nexport function SubmitButton(props: IRootComponentProps) {\n const { styles } = props;\n const SSubmit = Root;\n return sstyled(styles)(<SSubmit render={Button} type='submit' use='primary' theme='success' />);\n}\n"],"mappings":";AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,EAAEC,OAAO,QAAkC,eAAe;AACvE,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAO,SAASC,YAAYA,CAACC,KAA0B,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACvD,MAAM;IAAEC;EAAO,CAAC,GAAGJ,KAAK;EACxB,MAAMK,OAAO,GAC2BV,MAAM;EAA9C,OAAAQ,KAAA,GAAON,OAAO,CAACO,MAAM,CAAC,eAACN,KAAA,CAAAQ,aAAA,CAACD,OAAO,EAAAF,KAAA,CAAAI,EAAA;IAAA,GAAAC,YAAA;MAAA,QAAsB,QAAQ;MAAA,OAAK,SAAS;MAAA,SAAO;IAAS,GAAAP,IAAA;EAAA,EAAE,CAAC;AAChG","ignoreList":[]}
@@ -1,6 +1,3 @@
1
1
  import { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';
2
-
3
- /** @deprecated */
4
-
5
2
  export { FeedbackRating };
6
3
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":["default","FeedbackRating"],"sources":["../../src/index.d.ts"],"sourcesContent":["import type Button from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport type { Box } from '@semcore/flex-box';\nimport type { NoticeSmart } from '@semcore/notice';\nimport type { FormProps, FieldProps, FieldInputProps, FieldMetaState } from 'react-final-form';\n\nimport { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';\n\n/** @deprecated */\nexport type IFeedbackForm = FeedbackFormProps;\nexport type FeedbackFormProps = FormProps & {\n /** The event is called when the form is submitted */\n onSubmit: (values: any, form: any, callback?: (errors?: {}) => void) => {} | Promise<{}> | void;\n /**\n * The property is in charge of the spinner showing\n * */\n loading?: boolean;\n /**\n * Color of container spinner; you can use your own color\n */\n background?: string;\n /** Spinner theme. There are several default themes or you can use your own color\n * @default dark\n **/\n theme?: 'dark' | 'invert' | string;\n};\n\ndeclare const FeedbackForm: Intergalactic.Component<'form', FeedbackFormProps> & {\n Item: Intergalactic.Component<\n 'div',\n FieldProps<any, any>,\n { input: FieldInputProps<any> & { state: 'normal' | 'invalid' }; meta: FieldMetaState<any> }\n >;\n Success: typeof Box;\n Submit: typeof Button;\n Cancel: typeof Button;\n Notice: typeof NoticeSmart;\n};\n\nexport default FeedbackForm;\n\nexport { FeedbackRating };\n"],"mappings":"AAMA,SAASA,OAAO,IAAIC,cAAc,QAAQ,4CAA4C;;AAEtF;;AAiCA,SAASA,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"index.d.js","names":["default","FeedbackRating"],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Box } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { Intergalactic } from '@semcore/core';\nimport type { NoticeSmart } from '@semcore/notice';\nimport type { FormProps, FieldProps, FieldInputProps, FieldMetaState } from 'react-final-form';\n\nimport { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';\n\nexport type FeedbackFormProps = FormProps & {\n /** The event is called when the form is submitted */\n onSubmit: (values: any, form: any, callback?: (errors?: {}) => void) => {} | Promise<{}> | void;\n /**\n * The property is in charge of the spinner showing\n * */\n loading?: boolean;\n /**\n * Color of container spinner; you can use your own color\n */\n background?: string;\n /** Spinner theme. There are several default themes or you can use your own color\n * @default dark\n **/\n theme?: 'dark' | 'invert' | string;\n};\n\ndeclare const FeedbackForm: Intergalactic.Component<'form', FeedbackFormProps> & {\n Item: Intergalactic.Component<\n 'div',\n FieldProps<any, any>,\n { input: FieldInputProps<any> & { state: 'normal' | 'invalid' }; meta: FieldMetaState<any> }\n >;\n Success: typeof Box;\n Submit: typeof Button;\n Cancel: typeof Button;\n Notice: typeof NoticeSmart;\n};\n\nexport default FeedbackForm;\n\nexport { FeedbackRating };\n"],"mappings":"AAMA,SAASA,OAAO,IAAIC,cAAc,QAAQ,4CAA4C;AAiCtF,SAASA,cAAc","ignoreList":[]}
@@ -12,20 +12,20 @@ import sv from './sv.json';
12
12
  import tr from './tr.json';
13
13
  import vi from './vi.json';
14
14
  import zh from './zh.json';
15
- export var localizedMessages = {
16
- de: de,
17
- en: en,
18
- es: es,
19
- fr: fr,
20
- it: it,
21
- ja: ja,
22
- ko: ko,
23
- nl: nl,
24
- pt: pt,
25
- tr: tr,
26
- vi: vi,
27
- zh: zh,
28
- pl: pl,
29
- sv: sv
15
+ export const localizedMessages = {
16
+ de,
17
+ en,
18
+ es,
19
+ fr,
20
+ it,
21
+ ja,
22
+ ko,
23
+ nl,
24
+ pt,
25
+ tr,
26
+ vi,
27
+ zh,
28
+ pl,
29
+ sv
30
30
  };
31
31
  //# sourceMappingURL=__intergalactic-dynamic-locales.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bd,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFL,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,MAAMC,iBAAiB,GAAG;EAC/Bd,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFE,EAAE;EACFE,EAAE;EACFC,EAAE;EACFC,EAAE;EACFL,EAAE;EACFE;AACF,CAAC","ignoreList":[]}
@@ -1,14 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
- import _createClass from "@babel/runtime/helpers/esm/createClass";
6
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
7
- import _inherits from "@babel/runtime/helpers/esm/inherits";
8
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
- import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
3
+ import { createComponent, Component, sstyled, assignProps } from "@semcore/core";
4
+ import { Box } from "@semcore/base-components";
10
5
  import Button from "@semcore/button";
11
- import { Box } from "@semcore/flex-box";
12
6
  import { NoticeSmart } from "@semcore/notice";
13
7
  import SpinContainer from "@semcore/spin-container";
14
8
  import createFocusDecorator from "final-form-focus";
@@ -16,71 +10,68 @@ import React from "react";
16
10
  import { Form, Field } from "react-final-form";
17
11
  import { FeedbackItem } from "./component/feedback-item/FeedbackItem.mjs";
18
12
  import { SubmitButton } from "./component/submit-button/SubmitButton.mjs";
19
- var _excluded = ["Children", "styles", "forwardRef", "loading", "background", "theme"];
20
13
  /*!__reshadow-styles__:"./style/feedback-form.shadow.css"*/
21
- var style = (
14
+ const style = (
22
15
  /*__reshadow_css_start__*/
23
16
  (sstyled.insert(
24
17
  /*__inner_css_start__*/
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")}`,
18
+ `.___SFeedbackForm_kw89n_gg_{max-width:320px}.___SCancel_kw89n_gg_,.___SSubmit_kw89n_gg_{display:inline-flex;margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNotice_kw89n_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_kw89n_gg_{display:flex;align-items:center;flex-direction:column;width:320px;padding:var(--intergalactic-spacing-10x, 40px);box-sizing:border-box;outline:0}.___SEmail_kw89n_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
19
  /*__inner_css_end__*/
27
- "1pj7k_gg_"
20
+ "kw89n_gg_"
28
21
  ), /*__reshadow_css_end__*/
29
22
  {
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_"
23
+ "__SFeedbackForm": "___SFeedbackForm_kw89n_gg_",
24
+ "__SSubmit": "___SSubmit_kw89n_gg_",
25
+ "__SCancel": "___SCancel_kw89n_gg_",
26
+ "__SNotice": "___SNotice_kw89n_gg_",
27
+ "__SSuccess": "___SSuccess_kw89n_gg_",
28
+ "__SEmail": "___SEmail_kw89n_gg_"
36
29
  })
37
30
  );
38
- var FeedbackForm = /* @__PURE__ */ (function(_Component) {
39
- function FeedbackForm2() {
40
- var _this;
41
- _classCallCheck(this, FeedbackForm2);
42
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
43
- args[_key] = arguments[_key];
44
- }
45
- _this = _callSuper(this, FeedbackForm2, [].concat(args));
46
- _defineProperty(_this, "focusDecorator", createFocusDecorator());
47
- return _this;
31
+ class FeedbackForm extends Component {
32
+ constructor(...args) {
33
+ super(...args);
34
+ _defineProperty(this, "focusDecorator", createFocusDecorator());
48
35
  }
49
- _inherits(FeedbackForm2, _Component);
50
- return _createClass(FeedbackForm2, [{
51
- key: "getItemProps",
52
- value: function getItemProps() {
53
- var validateOnBlur = this.asProps.validateOnBlur;
54
- return {
55
- validateOnBlur
56
- };
57
- }
58
- }, {
59
- key: "render",
60
- value: function render() {
61
- var SFeedbackForm = Box;
62
- var _this$asProps = this.asProps, Children = _this$asProps.Children, styles = _this$asProps.styles, forwardRef = _this$asProps.forwardRef, loading = _this$asProps.loading, background = _this$asProps.background, theme = _this$asProps.theme, other = _objectWithoutProperties(_this$asProps, _excluded);
63
- return /* @__PURE__ */ React.createElement(Form, _extends({
64
- decorators: [this.focusDecorator]
65
- }, other), function(api) {
66
- var _ref4;
67
- return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SpinContainer, _ref4.cn("SpinContainer", {
68
- "background": background,
69
- "theme": theme,
70
- "size": "xl",
71
- "loading": loading === void 0 ? api.submitting : loading
72
- }), /* @__PURE__ */ React.createElement(SFeedbackForm, _ref4.cn("SFeedbackForm", _objectSpread(_objectSpread({
73
- "tag": "form",
74
- "noValidate": true,
75
- "method": "POST",
76
- "ref": forwardRef
77
- }, other), {}, {
78
- "onSubmit": api.handleSubmit
79
- })), typeof Children.origin === "function" ? Children.origin(api) : /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {}))));
80
- });
81
- }
82
- }]);
83
- })(Component);
36
+ getItemProps() {
37
+ const {
38
+ validateOnBlur
39
+ } = this.asProps;
40
+ return {
41
+ validateOnBlur
42
+ };
43
+ }
44
+ render() {
45
+ const SFeedbackForm = Box;
46
+ const {
47
+ Children,
48
+ styles,
49
+ forwardRef,
50
+ loading,
51
+ background,
52
+ theme,
53
+ ...other
54
+ } = this.asProps;
55
+ return /* @__PURE__ */ React.createElement(Form, _extends({
56
+ decorators: [this.focusDecorator]
57
+ }, other), (api) => {
58
+ var _ref4;
59
+ return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SpinContainer, _ref4.cn("SpinContainer", {
60
+ "background": background,
61
+ "theme": theme,
62
+ "size": "xl",
63
+ "loading": loading === void 0 ? api.submitting : loading
64
+ }), /* @__PURE__ */ React.createElement(SFeedbackForm, _ref4.cn("SFeedbackForm", {
65
+ "tag": "form",
66
+ "noValidate": true,
67
+ "method": "POST",
68
+ "ref": forwardRef,
69
+ ...other,
70
+ "onSubmit": api.handleSubmit
71
+ }), typeof Children.origin === "function" ? Children.origin(api) : /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {}))));
72
+ });
73
+ }
74
+ }
84
75
  _defineProperty(FeedbackForm, "displayName", "FeedbackForm");
85
76
  _defineProperty(FeedbackForm, "style", style);
86
77
  _defineProperty(FeedbackForm, "FinalForm", {
@@ -88,61 +79,70 @@ _defineProperty(FeedbackForm, "FinalForm", {
88
79
  Form
89
80
  });
90
81
  _defineProperty(FeedbackForm, "defaultProps", {
91
- onSubmit: function onSubmit() {
82
+ onSubmit: () => {
92
83
  }
93
84
  });
94
85
  _defineProperty(FeedbackForm, "validate", {
95
- description: function description(error) {
96
- return function() {
97
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
98
- var words = value.split(/\s+/);
99
- var symbols = words.join(" ");
100
- if (symbols.length < 10 || words.length < 3) {
101
- return error;
102
- }
103
- };
86
+ description: (error) => (value = "") => {
87
+ const words = value.split(/\s+/);
88
+ const symbols = words.join(" ");
89
+ if (symbols.length < 10 || words.length < 3) {
90
+ return error;
91
+ }
104
92
  },
105
- email: function email(error) {
106
- return function() {
107
- var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
108
- if (!/.+@.+\..+/i.test(String(value).toLowerCase())) {
109
- return error;
110
- }
111
- };
93
+ email: (error) => (value = "") => {
94
+ if (!/.+@.+\..+/i.test(String(value).toLowerCase())) {
95
+ return error;
96
+ }
112
97
  }
113
98
  });
114
99
  function Success(props) {
115
100
  var _ref = arguments[0], _ref5;
116
- var Children = props.Children, styles = props.styles;
117
- var SSuccess = Box;
118
- var SEmail = "div";
119
- return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SSuccess, _ref5.cn("SSuccess", _objectSpread({}, assignProps({
120
- "tabIndex": -1
121
- }, _ref))), /* @__PURE__ */ React.createElement(SEmail, _ref5.cn("SEmail", {
101
+ const {
102
+ Children,
103
+ styles
104
+ } = props;
105
+ const SSuccess = Box;
106
+ const SEmail = "div";
107
+ return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SSuccess, _ref5.cn("SSuccess", {
108
+ ...assignProps({
109
+ "tabIndex": -1
110
+ }, _ref)
111
+ }), /* @__PURE__ */ React.createElement(SEmail, _ref5.cn("SEmail", {
122
112
  "aria-hidden": true
123
113
  })), /* @__PURE__ */ React.createElement("span", _ref5.cn("span", {}), /* @__PURE__ */ React.createElement(Children, _ref5.cn("Children", {}))));
124
114
  }
125
115
  Success.style = style;
126
116
  function Cancel(props) {
127
117
  var _ref2 = arguments[0], _ref6;
128
- var styles = props.styles;
129
- var SCancel = Button;
130
- return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SCancel, _ref6.cn("SCancel", _objectSpread({}, assignProps({
131
- "type": "reset",
132
- "use": "secondary",
133
- "theme": "muted"
134
- }, _ref2))));
118
+ const {
119
+ styles
120
+ } = props;
121
+ const SCancel = Button;
122
+ return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SCancel, _ref6.cn("SCancel", {
123
+ ...assignProps({
124
+ "type": "reset",
125
+ "use": "secondary",
126
+ "theme": "muted"
127
+ }, _ref2)
128
+ }));
135
129
  }
136
130
  function Notice(props) {
137
131
  var _ref3 = arguments[0], _ref7;
138
- var styles = props.styles, _props$theme = props.theme, theme = _props$theme === void 0 ? "muted" : _props$theme, _props$use = props.use, use = _props$use === void 0 ? "secondary" : _props$use;
139
- var SNotice = NoticeSmart;
140
- return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SNotice, _ref7.cn("SNotice", _objectSpread({}, assignProps({
141
- "use:theme": theme,
142
- "use:use": use
143
- }, _ref3))));
132
+ const {
133
+ styles,
134
+ theme = "muted",
135
+ use = "secondary"
136
+ } = props;
137
+ const SNotice = NoticeSmart;
138
+ return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SNotice, _ref7.cn("SNotice", {
139
+ ...assignProps({
140
+ "use:theme": theme,
141
+ "use:use": use
142
+ }, _ref3)
143
+ }));
144
144
  }
145
- const FeedbackForm$1 = createComponent(FeedbackForm, {
145
+ const FeedbackForm_default = createComponent(FeedbackForm, {
146
146
  Item: FeedbackItem,
147
147
  Success,
148
148
  Submit: SubmitButton,
@@ -150,5 +150,5 @@ const FeedbackForm$1 = createComponent(FeedbackForm, {
150
150
  Notice
151
151
  });
152
152
  export {
153
- FeedbackForm$1 as default
153
+ FeedbackForm_default as default
154
154
  };
@@ -1,57 +1,65 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/esm/createClass";
5
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
- import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
2
+ import { createComponent, Component, sstyled, assignProps } from "@semcore/core";
3
+ import { Box } from "@semcore/base-components";
9
4
  import Checkbox from "@semcore/checkbox";
10
- import { Box } from "@semcore/flex-box";
11
5
  import React from "react";
12
- var _excluded = ["styles", "id", "label", "type", "focused"];
13
6
  /*!__reshadow-styles__:"../../style/checkbox-button.shadow.css"*/
14
- var style = (
7
+ const style = (
15
8
  /*__reshadow_css_start__*/
16
9
  (sstyled.insert(
17
10
  /*__inner_css_start__*/
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)}}",
11
+ ".___SCheckboxButton_ljd37_gg_{margin-top:var(--intergalactic-spacing-2x, 8px);border:1px solid var(--intergalactic-border-primary, #c4c7cf);border-radius:var(--intergalactic-rounded-medium, 6px)}.___SCheckboxButton_ljd37_gg_ label{width:100%;padding:var(--intergalactic-spacing-3x, 12px);box-sizing:border-box}.___SCheckboxButton_ljd37_gg_.__checked_ljd37_gg_{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}@media (hover:hover){.___SCheckboxButton_ljd37_gg_:hover{cursor:pointer;border-color:var(--intergalactic-border-info-active, #006dca);background-color:rgba(0,143,248,.1)}.___SCheckboxButton_ljd37_gg_.__checked_ljd37_gg_:hover{background-color:rgba(0,143,248,.2)}}",
19
12
  /*__inner_css_end__*/
20
- "198cq_gg_"
13
+ "ljd37_gg_"
21
14
  ), /*__reshadow_css_end__*/
22
15
  {
23
- "__SCheckboxButton": "___SCheckboxButton_198cq_gg_",
24
- "_checked": "__checked_198cq_gg_"
16
+ "__SCheckboxButton": "___SCheckboxButton_ljd37_gg_",
17
+ "_checked": "__checked_ljd37_gg_"
25
18
  })
26
19
  );
27
- var CheckboxButtonRoot = /* @__PURE__ */ (function(_Component) {
28
- function CheckboxButtonRoot2() {
29
- _classCallCheck(this, CheckboxButtonRoot2);
30
- return _callSuper(this, CheckboxButtonRoot2, arguments);
20
+ class CheckboxButtonRoot extends Component {
21
+ constructor(...args) {
22
+ super(...args);
23
+ _defineProperty(this, "checkboxRef", /* @__PURE__ */ React.createRef());
31
24
  }
32
- _inherits(CheckboxButtonRoot2, _Component);
33
- return _createClass(CheckboxButtonRoot2, [{
34
- key: "render",
35
- value: function render() {
36
- var _ref = this.asProps, _ref2;
37
- var _this$asProps = this.asProps, styles = _this$asProps.styles, id = _this$asProps.id, label = _this$asProps.label;
38
- _this$asProps.type;
39
- var focused = _this$asProps.focused, other = _objectWithoutProperties(_this$asProps, _excluded);
40
- var autoFocus = focused ? 20 : false;
41
- var SCheckboxButton = Box;
42
- return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SCheckboxButton, _ref2.cn("SCheckboxButton", _objectSpread({}, assignProps({
43
- "__excludeProps": ["onChange", "id", "type"]
44
- }, _ref))), /* @__PURE__ */ React.createElement(Checkbox, _ref2.cn("Checkbox", _objectSpread({}, other)), /* @__PURE__ */ React.createElement(Checkbox.Value, {
45
- autoFocus,
46
- "aria-labelledby": id
47
- }), /* @__PURE__ */ React.createElement(Checkbox.Text, {
48
- id
49
- }, label)));
25
+ componentDidMount() {
26
+ const {
27
+ focused
28
+ } = this.asProps;
29
+ if (focused) {
30
+ setTimeout(() => {
31
+ var _a;
32
+ (_a = this.checkboxRef.current) == null ? void 0 : _a.focus();
33
+ }, 20);
50
34
  }
51
- }]);
52
- })(Component);
35
+ }
36
+ render() {
37
+ var _ref = this.asProps, _ref2;
38
+ const {
39
+ styles,
40
+ id,
41
+ label,
42
+ type: _type,
43
+ focused,
44
+ ...other
45
+ } = this.asProps;
46
+ const SCheckboxButton = Box;
47
+ return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SCheckboxButton, _ref2.cn("SCheckboxButton", {
48
+ ...assignProps({
49
+ "__excludeProps": ["onChange", "id", "type"]
50
+ }, _ref)
51
+ }), /* @__PURE__ */ React.createElement(Checkbox, _ref2.cn("Checkbox", {
52
+ ...other
53
+ }), /* @__PURE__ */ React.createElement(Checkbox.Value, {
54
+ ref: this.checkboxRef,
55
+ "aria-labelledby": id
56
+ }), /* @__PURE__ */ React.createElement(Checkbox.Text, {
57
+ id
58
+ }, label)));
59
+ }
60
+ }
53
61
  _defineProperty(CheckboxButtonRoot, "style", style);
54
- var CheckboxButton = createComponent(CheckboxButtonRoot);
62
+ const CheckboxButton = createComponent(CheckboxButtonRoot);
55
63
  export {
56
64
  CheckboxButton as default
57
65
  };
@@ -1,6 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
2
  import { assignProps } from "@semcore/core";
5
3
  import pick from "@semcore/core/lib/utils/pick";
6
4
  import propsForElement from "@semcore/core/lib/utils/propsForElement";
@@ -8,26 +6,33 @@ import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
8
6
  import Tooltip from "@semcore/tooltip";
9
7
  import React from "react";
10
8
  import { Field } from "react-final-form";
11
- var _excluded = ["Children", "tag", "uid", "tooltipProps"], _excluded2 = ["input", "meta"];
12
- var deafultTooltipPropsList = ["title", "theme", "strategy", "modifiers", "placement", "interaction", "timeout", "visible", "defaultVisible", "onVisibleChange", "offset", "preventOverflow", "arrow", "flip", "computeStyles", "eventListeners", "onFirstUpdate"];
13
- function FeedbackItem(_ref) {
14
- var Children = _ref.Children, tag = _ref.tag, uid = _ref.uid, _ref$tooltipProps = _ref.tooltipProps, tooltipPropsList = _ref$tooltipProps === void 0 ? deafultTooltipPropsList : _ref$tooltipProps, props = _objectWithoutProperties(_ref, _excluded);
15
- var tooltipProps = pick(props, tooltipPropsList);
16
- var lastErrorRef = React.useRef(void 0);
17
- return /* @__PURE__ */ React.createElement(Field, props, function(_ref2) {
18
- var _meta$error;
19
- var input = _ref2.input, meta = _ref2.meta, other = _objectWithoutProperties(_ref2, _excluded2);
20
- var showError = other.validateOnBlur === false ? meta.submitFailed : true;
21
- var invalid = meta.invalid && meta.touched;
22
- var errorState = showError && invalid;
23
- var popperId = "".concat(uid, "-error-description");
24
- var ariaDescribedBy = props["aria-describedby"];
25
- var inputProps = assignProps(_objectSpread(_objectSpread({}, propsForElement(other)), {}, {
9
+ const deafultTooltipPropsList = ["title", "theme", "strategy", "modifiers", "placement", "interaction", "timeout", "visible", "defaultVisible", "onVisibleChange", "offset", "preventOverflow", "arrow", "flip", "computeStyles", "eventListeners", "onFirstUpdate"];
10
+ function FeedbackItem({
11
+ Children,
12
+ tag,
13
+ uid,
14
+ tooltipProps: tooltipPropsList = deafultTooltipPropsList,
15
+ ...props
16
+ }) {
17
+ const tooltipProps = pick(props, tooltipPropsList);
18
+ const lastErrorRef = React.useRef(void 0);
19
+ return /* @__PURE__ */ React.createElement(Field, props, ({
20
+ input,
21
+ meta,
22
+ ...other
23
+ }) => {
24
+ const showError = other.validateOnBlur === false ? meta.submitFailed : true;
25
+ const invalid = meta.invalid && meta.touched;
26
+ const errorState = showError && invalid;
27
+ const popperId = `${uid}-error-description`;
28
+ const ariaDescribedBy = props["aria-describedby"];
29
+ const inputProps = assignProps({
30
+ ...propsForElement(other),
26
31
  "state": errorState ? "invalid" : "normal",
27
32
  "aria-invalid": errorState ? true : false,
28
33
  "aria-describedby": meta.active ? errorState ? popperId : ariaDescribedBy : void 0
29
- }), input);
30
- if (meta !== null && meta !== void 0 && meta.error) lastErrorRef.current = meta.error;
34
+ }, input);
35
+ if (meta == null ? void 0 : meta.error) lastErrorRef.current = meta.error;
31
36
  return /* @__PURE__ */ React.createElement(Tooltip, _extends({
32
37
  visible: errorState && meta.active,
33
38
  theme: "warning",
@@ -41,13 +46,14 @@ function FeedbackItem(_ref) {
41
46
  tag
42
47
  }, tag ? inputProps : {}, {
43
48
  __excludeProps: ["type", "aria-describedby"]
44
- }), typeof Children.origin === "function" && Children.origin(_objectSpread({
49
+ }), typeof Children.origin === "function" && Children.origin({
45
50
  input: inputProps,
46
- meta
47
- }, other))), /* @__PURE__ */ React.createElement(Tooltip.Popper, {
51
+ meta,
52
+ ...other
53
+ })), /* @__PURE__ */ React.createElement(Tooltip.Popper, {
48
54
  w: "100%",
49
55
  id: popperId
50
- }, (_meta$error = meta.error) !== null && _meta$error !== void 0 ? _meta$error : lastErrorRef.current));
56
+ }, meta.error ?? lastErrorRef.current));
51
57
  });
52
58
  }
53
59
  FeedbackItem.enhance = [uniqueIDEnhancement()];