@arkyn/components 3.0.1-beta.140 → 3.0.1-beta.142

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 (40) hide show
  1. package/dist/bundle.js +1003 -987
  2. package/dist/components/checkbox/index.d.ts +5 -1
  3. package/dist/components/checkbox/index.d.ts.map +1 -1
  4. package/dist/components/checkbox/index.js +6 -6
  5. package/dist/components/currencyInput/index.d.ts +5 -0
  6. package/dist/components/currencyInput/index.d.ts.map +1 -1
  7. package/dist/components/currencyInput/index.js +6 -5
  8. package/dist/components/imageUpload/index.d.ts +4 -0
  9. package/dist/components/imageUpload/index.d.ts.map +1 -1
  10. package/dist/components/imageUpload/index.js +5 -5
  11. package/dist/components/input/index.d.ts +4 -0
  12. package/dist/components/input/index.d.ts.map +1 -1
  13. package/dist/components/input/index.js +5 -5
  14. package/dist/components/multiSelect/index.d.ts +4 -0
  15. package/dist/components/multiSelect/index.d.ts.map +1 -1
  16. package/dist/components/multiSelect/index.js +5 -5
  17. package/dist/components/phoneInput/index.d.ts +48 -0
  18. package/dist/components/phoneInput/index.d.ts.map +1 -1
  19. package/dist/components/phoneInput/index.js +60 -16
  20. package/dist/components/radio/radioGroup/index.d.ts +4 -0
  21. package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
  22. package/dist/components/radio/radioGroup/index.js +5 -5
  23. package/dist/components/richText/index.d.ts +2 -0
  24. package/dist/components/richText/index.d.ts.map +1 -1
  25. package/dist/components/richText/index.js +12 -12
  26. package/dist/components/select/index.d.ts +4 -0
  27. package/dist/components/select/index.d.ts.map +1 -1
  28. package/dist/components/select/index.js +5 -5
  29. package/dist/components/switch/index.d.ts +5 -1
  30. package/dist/components/switch/index.d.ts.map +1 -1
  31. package/dist/components/switch/index.js +6 -6
  32. package/dist/hooks/useAutomation.d.ts +29 -24
  33. package/dist/hooks/useAutomation.d.ts.map +1 -1
  34. package/dist/hooks/useAutomation.js +50 -38
  35. package/dist/services/fieldTemplate.d.ts +14 -0
  36. package/dist/services/fieldTemplate.d.ts.map +1 -0
  37. package/dist/services/fieldTemplate.js +11 -0
  38. package/dist/types/richTextTypes.d.ts +3 -0
  39. package/dist/types/richTextTypes.d.ts.map +1 -1
  40. package/package.json +3 -1
@@ -19,6 +19,8 @@ import "./styles.css";
19
19
  * @param props.onChange - Callback function triggered when editor content changes
20
20
  * @param props.isError - Whether the component should display in error state
21
21
  * @param props.id - Custom ID for the editor element
22
+ * @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
23
+ * @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
22
24
  *
23
25
  * @returns JSX element representing the rich text editor
24
26
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/richText/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAEL,aAAa,EACd,MAAM,2BAA2B,CAAC;AAMnC,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA+LrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/richText/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAEL,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAuMrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -14,11 +14,9 @@ import { MarkButton } from "./markButton";
14
14
  import { Toolbar } from "./toolbar";
15
15
  import { useForm } from "../../hooks/useForm";
16
16
  import { extractTextFromNode } from "../../services/extractTextFromNode";
17
+ import { FieldTemplate } from "../../services/fieldTemplate";
17
18
  import { toggleMark } from "../../services/toggleMark";
18
19
  import { hotKeys, initialValue } from "../../templates/richTextTemplates";
19
- import { FieldError } from "../fieldError";
20
- import { FieldLabel } from "../fieldLabel";
21
- import { FieldWrapper } from "../fieldWrapper";
22
20
  import "./styles.css";
23
21
  /**
24
22
  * RichText component provides a feature-rich text editor with formatting capabilities
@@ -39,6 +37,8 @@ import "./styles.css";
39
37
  * @param props.onChange - Callback function triggered when editor content changes
40
38
  * @param props.isError - Whether the component should display in error state
41
39
  * @param props.id - Custom ID for the editor element
40
+ * @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
41
+ * @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
42
42
  *
43
43
  * @returns JSX element representing the rich text editor
44
44
  *
@@ -82,7 +82,7 @@ import "./styles.css";
82
82
  * converted to HTML using the provided utility functions.
83
83
  */
84
84
  function RichText(props) {
85
- const { name, hiddenButtons, imageConfig, videoConfig, defaultValue = "[]", enforceCharacterLimit = false, onChangeCharactersCount, baseErrorMessage, maxLimit = 10000, onChange, isError: baseIsError, label, showAsterisk, id, } = props;
85
+ const { name, hiddenButtons, imageConfig, videoConfig, className: wrapperClassName = "", defaultValue = "[]", enforceCharacterLimit = false, onChangeCharactersCount, baseErrorMessage, maxLimit = 10000, onChange, isError: baseIsError, label, showAsterisk, id, orientation = "horizontal", unShowFieldTemplate = false, } = props;
86
86
  const editor = useMemo(() => withHistory(withReact(createEditor())), []);
87
87
  const { fieldErrors } = useForm();
88
88
  function getDefaultNodes() {
@@ -137,14 +137,14 @@ function RichText(props) {
137
137
  function buttonIsNotHidden(format) {
138
138
  return !hiddenButtons?.includes(format);
139
139
  }
140
- return (_jsxs(FieldWrapper, { children: [label && _jsx(FieldLabel, { showAsterisk: showAsterisk, children: label }), _jsxs(Slate, { editor: editor, initialValue: getDefaultNodes(), onChange: handleChange, onValueChange: handleChange, children: [_jsxs("div", { className: className, children: [_jsxs(Toolbar, { children: [buttonIsNotHidden("headingOne") && (_jsx(BlockButton, { format: "headingOne", icon: Heading1 })), buttonIsNotHidden("headingTwo") && (_jsx(BlockButton, { format: "headingTwo", icon: Heading2 })), buttonIsNotHidden("blockQuote") && (_jsx(BlockButton, { format: "blockQuote", icon: Quote })), buttonIsNotHidden("bold") && (_jsx(MarkButton, { format: "bold", icon: Bold })), buttonIsNotHidden("italic") && (_jsx(MarkButton, { format: "italic", icon: Italic })), buttonIsNotHidden("underline") && (_jsx(MarkButton, { format: "underline", icon: Underline })), buttonIsNotHidden("code") && (_jsx(MarkButton, { format: "code", icon: Code })), buttonIsNotHidden("left") && (_jsx(BlockButton, { format: "left", icon: AlignLeft })), buttonIsNotHidden("right") && (_jsx(BlockButton, { format: "right", icon: AlignRight })), buttonIsNotHidden("center") && (_jsx(BlockButton, { format: "center", icon: AlignCenter })), buttonIsNotHidden("justify") && (_jsx(BlockButton, { format: "justify", icon: AlignJustify })), imageConfig && buttonIsNotHidden("image") && (_jsx(InsertImage, { ...imageConfig })), buttonIsNotHidden("video") && _jsx(InsertVideo, { ...videoConfig })] }), _jsx(Editable, { className: "editorContainer", renderElement: renderElement, renderLeaf: renderLeaf, spellCheck: true, ref: ref, id: inputId, onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onKeyDown: (event) => {
141
- for (const hotkey in hotKeys) {
142
- if (isHotkey(hotkey, event)) {
143
- event.preventDefault();
144
- const mark = hotKeys[hotkey];
145
- toggleMark(editor, mark);
146
- }
140
+ return (_jsx(FieldTemplate, { name: name, label: label, showAsterisk: showAsterisk, className: wrapperClassName, errorMessage: errorMessage, unShowFieldTemplate: unShowFieldTemplate, orientation: orientation, children: _jsxs(Slate, { editor: editor, initialValue: getDefaultNodes(), onChange: handleChange, onValueChange: handleChange, children: [_jsxs("div", { className: className, children: [_jsxs(Toolbar, { children: [buttonIsNotHidden("headingOne") && (_jsx(BlockButton, { format: "headingOne", icon: Heading1 })), buttonIsNotHidden("headingTwo") && (_jsx(BlockButton, { format: "headingTwo", icon: Heading2 })), buttonIsNotHidden("blockQuote") && (_jsx(BlockButton, { format: "blockQuote", icon: Quote })), buttonIsNotHidden("bold") && (_jsx(MarkButton, { format: "bold", icon: Bold })), buttonIsNotHidden("italic") && (_jsx(MarkButton, { format: "italic", icon: Italic })), buttonIsNotHidden("underline") && (_jsx(MarkButton, { format: "underline", icon: Underline })), buttonIsNotHidden("code") && (_jsx(MarkButton, { format: "code", icon: Code })), buttonIsNotHidden("left") && (_jsx(BlockButton, { format: "left", icon: AlignLeft })), buttonIsNotHidden("right") && (_jsx(BlockButton, { format: "right", icon: AlignRight })), buttonIsNotHidden("center") && (_jsx(BlockButton, { format: "center", icon: AlignCenter })), buttonIsNotHidden("justify") && (_jsx(BlockButton, { format: "justify", icon: AlignJustify })), imageConfig && buttonIsNotHidden("image") && (_jsx(InsertImage, { ...imageConfig })), buttonIsNotHidden("video") && _jsx(InsertVideo, { ...videoConfig })] }), _jsx(Editable, { className: "editorContainer", renderElement: renderElement, renderLeaf: renderLeaf, spellCheck: true, ref: ref, id: inputId, onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onKeyDown: (event) => {
141
+ for (const hotkey in hotKeys) {
142
+ if (isHotkey(hotkey, event)) {
143
+ event.preventDefault();
144
+ const mark = hotKeys[hotkey];
145
+ toggleMark(editor, mark);
147
146
  }
148
- } }), restatesCharacters < 0 && (_jsx("div", { className: "restatesCharacters", children: restatesCharacters }))] }), _jsx("input", { type: "hidden", name: name, value: inputValue.slice(0, maxLimit) }), _jsx("input", { type: "hidden", name: `${name}Count`, value: charactersCount })] }), _jsx(FieldError, { children: errorMessage })] }));
147
+ }
148
+ } }), restatesCharacters < 0 && (_jsx("div", { className: "restatesCharacters", children: restatesCharacters }))] }), _jsx("input", { type: "hidden", name: name, value: inputValue.slice(0, maxLimit) }), _jsx("input", { type: "hidden", name: `${name}Count`, value: charactersCount })] }) }));
149
149
  }
150
150
  export { RichText };
@@ -29,6 +29,8 @@ type SelectProps = {
29
29
  prefix?: string | LucideIcon;
30
30
  leftIcon?: LucideIcon;
31
31
  optionMaxHeight?: number;
32
+ unShowFieldTemplate?: boolean;
33
+ orientation?: "horizontal" | "vertical" | "horizontalReverse";
32
34
  };
33
35
  /**
34
36
  * Select component - used for selecting sle options from a dropdown list with support for search, labels, and validation
@@ -59,6 +61,8 @@ type SelectProps = {
59
61
  * @param props.prefix - Text or icon to display at the beginning of the select
60
62
  * @param props.leftIcon - Optional icon to display on the left side
61
63
  * @param props.optionMaxHeight - Maximum height for the options dropdown
64
+ * @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
65
+ * @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
62
66
  *
63
67
  * @returns Select JSX element wrapped in FieldWrapper with optional label and error
64
68
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAA2B,MAAM,OAAO,CAAC;AAgB5D,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAE5C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;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GAAG,mBAAmB,CAAC;CAC/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,2CAuKjC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,10 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId, useRef, useState } from "react";
3
3
  import { useForm } from "../../hooks/useForm";
4
+ import { FieldTemplate } from "../../services/fieldTemplate";
4
5
  import { IconRenderer } from "../../services/iconRenderer";
5
- import { FieldError } from "../fieldError";
6
- import { FieldLabel } from "../fieldLabel";
7
- import { FieldWrapper } from "../fieldWrapper";
8
6
  import { SelectChevron } from "./selectChevron";
9
7
  import { SelectContainer } from "./selectContainer";
10
8
  import { SelectContent } from "./selectContent";
@@ -41,6 +39,8 @@ import { SelectSpinner } from "./selectSpinner";
41
39
  * @param props.prefix - Text or icon to display at the beginning of the select
42
40
  * @param props.leftIcon - Optional icon to display on the left side
43
41
  * @param props.optionMaxHeight - Maximum height for the options dropdown
42
+ * @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
43
+ * @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
44
44
  *
45
45
  * @returns Select JSX element wrapped in FieldWrapper with optional label and error
46
46
  *
@@ -103,7 +103,7 @@ import { SelectSpinner } from "./selectSpinner";
103
103
  * ```
104
104
  */
105
105
  function Select(props) {
106
- const { name, options, className: wrapperClassName = "", placeholder = "Selecione...", closeOnSelect = true, defaultValue = "", errorMessage: baseErrorMessage, isLoading = false, readOnly = false, isSearchable = false, id, label, optionMaxHeight, showAsterisk, leftIcon: LeftIcon, onSearch, onChange, onBlur, notFoundText = "Sem opções disponíveis", onFocus, disabled: baseDisabled = false, prefix, size = "md", value, variant = "solid", } = props;
106
+ const { name, options, className: wrapperClassName = "", placeholder = "Selecione...", closeOnSelect = true, defaultValue = "", errorMessage: baseErrorMessage, isLoading = false, readOnly = false, isSearchable = false, id, label, optionMaxHeight, showAsterisk, leftIcon: LeftIcon, onSearch, onChange, onBlur, notFoundText = "Sem opções disponíveis", onFocus, disabled: baseDisabled = false, prefix, size = "md", value, variant = "solid", orientation = "horizontal", unShowFieldTemplate = false, } = props;
107
107
  const { fieldErrors } = useForm();
108
108
  const selectRef = useRef(null);
109
109
  const selectId = id || useId();
@@ -163,6 +163,6 @@ function Select(props) {
163
163
  return true;
164
164
  return false;
165
165
  });
166
- return (_jsxs(FieldWrapper, { className: wrapperClassName, children: [label && _jsx(FieldLabel, { showAsterisk: showAsterisk, children: label }), _jsxs(SelectContainer, { handleContainerFocus: handleContainerFocus, disabled: disabled, isError: isError, isFocused: isFocused, isLoading: isLoading, readOnly: readOnly, size: size, variant: variant, prefixExists: !!prefix, id: selectId, children: [_jsx("input", { ref: selectRef, name: name, value: forceSelectedOptions, type: "hidden" }), _jsx(IconRenderer, { iconSize: iconSize, icon: prefix, className: "prefix" }), LeftIcon && _jsx(LeftIcon, { size: iconSize, strokeWidth: 2.5 }), _jsxs(SelectContent, { size: size, children: [forceSelectedOptions !== "" && (_jsx("p", { className: "hasValue", children: getOptionLabel(forceSelectedOptions) })), forceSelectedOptions === "" && _jsx("p", { children: placeholder })] }), _jsxs(SelectOptionsContainer, { isFocused: isFocused, isSearchable: isSearchable, search: search, onSearch: handleSearch, children: [mappedOptions.map(({ label, value }) => (_jsx(SelectOption, { label: label, value: value, size: size, handleChangeValue: handleChangeValue, optionHasSelected: optionHasSelected }, value))), mappedOptions.length <= 0 && _jsx("p", { children: notFoundText })] }), _jsx(SelectChevron, { disabled: disabled, isFocused: isFocused, readOnly: readOnly, iconSize: iconSize, isLoading: isLoading }), _jsx(SelectSpinner, { iconSize: iconSize, isLoading: isLoading }), _jsx(SelectOverlay, { handleBlur: handleBlur, isFocused: isFocused })] }), errorMessage && _jsx(FieldError, { children: errorMessage })] }));
166
+ return (_jsx(FieldTemplate, { name: name, label: label, showAsterisk: showAsterisk, className: wrapperClassName, errorMessage: errorMessage, unShowFieldTemplate: unShowFieldTemplate, orientation: orientation, children: _jsxs(SelectContainer, { handleContainerFocus: handleContainerFocus, disabled: disabled, isError: isError, isFocused: isFocused, isLoading: isLoading, readOnly: readOnly, size: size, variant: variant, prefixExists: !!prefix, id: selectId, children: [_jsx("input", { ref: selectRef, name: name, value: forceSelectedOptions, type: "hidden" }), _jsx(IconRenderer, { iconSize: iconSize, icon: prefix, className: "prefix" }), LeftIcon && _jsx(LeftIcon, { size: iconSize, strokeWidth: 2.5 }), _jsxs(SelectContent, { size: size, children: [forceSelectedOptions !== "" && (_jsx("p", { className: "hasValue", children: getOptionLabel(forceSelectedOptions) })), forceSelectedOptions === "" && _jsx("p", { children: placeholder })] }), _jsxs(SelectOptionsContainer, { isFocused: isFocused, isSearchable: isSearchable, search: search, onSearch: handleSearch, children: [mappedOptions.map(({ label, value }) => (_jsx(SelectOption, { label: label, value: value, size: size, handleChangeValue: handleChangeValue, optionHasSelected: optionHasSelected }, value))), mappedOptions.length <= 0 && _jsx("p", { children: notFoundText })] }), _jsx(SelectChevron, { disabled: disabled, isFocused: isFocused, readOnly: readOnly, iconSize: iconSize, isLoading: isLoading }), _jsx(SelectSpinner, { iconSize: iconSize, isLoading: isLoading }), _jsx(SelectOverlay, { handleBlur: handleBlur, isFocused: isFocused })] }) }));
167
167
  }
168
168
  export { Select };
@@ -10,6 +10,9 @@ type SwitchProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "o
10
10
  name: string;
11
11
  onCheck?: (value: string) => void;
12
12
  orientation?: "vertical" | "horizontal" | "horizontalReverse";
13
+ unShowFieldTemplate?: boolean;
14
+ showAsterisk?: boolean;
15
+ errorMessage?: string;
13
16
  };
14
17
  /**
15
18
  * Switch component - used for creating toggle switches with on/off states
@@ -23,7 +26,8 @@ type SwitchProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "o
23
26
  * @param props.value - Value to be used when switch is checked. Default: "checked"
24
27
  * @param props.unCheckedValue - Value to be used when switch is unchecked. Default: ""
25
28
  * @param props.onCheck - Callback function called when switch state changes, receives the current value
26
- * @param props.orientation - Orientation of the switch and label. Default: "horizontalReverse"
29
+ * @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
30
+ * @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
27
31
  *
28
32
  * **...Other valid HTML properties for button element (except children, onChange, defaultValue, onCheck, value)**
29
33
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,cAAc,CAAC;AAItB,KAAK,WAAW,GAAG,IAAI,CACrB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,GAAG,OAAO,CAC/D,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,mBAAmB,CAAC;CAC/D,CAAC;AAEF;;;;;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_jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useId, useRef, useState } from "react";
3
+ import { FieldTemplate } from "../../services/fieldTemplate";
3
4
  import "./styles.css";
4
- import { FieldWrapper } from "../fieldWrapper";
5
- import { FieldLabel } from "../fieldLabel";
6
5
  /**
7
6
  * Switch component - used for creating toggle switches with on/off states
8
7
  *
@@ -15,7 +14,8 @@ import { FieldLabel } from "../fieldLabel";
15
14
  * @param props.value - Value to be used when switch is checked. Default: "checked"
16
15
  * @param props.unCheckedValue - Value to be used when switch is unchecked. Default: ""
17
16
  * @param props.onCheck - Callback function called when switch state changes, receives the current value
18
- * @param props.orientation - Orientation of the switch and label. Default: "horizontalReverse"
17
+ * @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
18
+ * @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
19
19
  *
20
20
  * **...Other valid HTML properties for button element (except children, onChange, defaultValue, onCheck, value)**
21
21
  *
@@ -84,7 +84,7 @@ import { FieldLabel } from "../fieldLabel";
84
84
  * ```
85
85
  */
86
86
  function Switch(props) {
87
- const { label, size = "lg", defaultChecked = false, checked: baseChecked = null, value, unCheckedValue = "", name, className: baseClassName = "", onCheck, id, orientation = "horizontalReverse", ...rest } = props;
87
+ const { label, size = "lg", defaultChecked = false, checked: baseChecked = null, value, unCheckedValue = "", name, className: baseClassName = "", onCheck, id, orientation = "horizontalReverse", className: wrapperClassName = "", showAsterisk, errorMessage, unShowFieldTemplate = false, ...rest } = props;
88
88
  const inputRef = useRef(null);
89
89
  const inputId = id || useId();
90
90
  const [isChecked, setIsChecked] = useState(defaultChecked);
@@ -95,6 +95,6 @@ function Switch(props) {
95
95
  }
96
96
  const checkedClass = currentChecked ? "checkedTrue" : "checkedFalse";
97
97
  const className = `arkynSwitch ${checkedClass} ${size} ${baseClassName}`;
98
- return (_jsxs(FieldWrapper, { orientation: orientation, children: [label && _jsx(FieldLabel, { onClick: handleCheck, children: label }), _jsx("button", { type: "button", onClick: handleCheck, className: className, ...rest, children: _jsx("input", { id: inputId, type: "hidden", name: name, ref: inputRef, onClick: handleCheck, value: currentChecked ? value || "checked" : unCheckedValue }) })] }));
98
+ return (_jsx(FieldTemplate, { name: name, label: label, showAsterisk: showAsterisk, className: wrapperClassName, errorMessage: errorMessage, unShowFieldTemplate: unShowFieldTemplate, orientation: orientation, children: _jsx("button", { type: "button", onClick: handleCheck, className: className, ...rest, children: _jsx("input", { id: inputId, type: "hidden", name: name, ref: inputRef, onClick: handleCheck, value: currentChecked ? value || "checked" : unCheckedValue }) }) }));
99
99
  }
100
100
  export { Switch };
@@ -1,39 +1,44 @@
1
1
  /**
2
- * Hook for automating actions based on form response data.
2
+ * Executes UI automations based on a form response payload.
3
3
  *
4
- * This hook automates the closing of modals and the display of toast notifications
5
- * based on the properties provided in the form response data object.
4
+ * Current behaviors:
5
+ * - Closes all open modals when `closeModal` is `true`.
6
+ * - Scrolls to a target element when `cause.data.scrollTo` is provided.
7
+ * - Shows a toast according to response `name`, `message`, and `cause.fieldErrors`.
6
8
  *
7
- * @param {Object} formResponseData - Object containing form response data for automation
8
- * @param {boolean} [formResponseData.closeModal] - If true, closes all open modals
9
- * @param {string} [formResponseData.message] - Message to be displayed in the toast notification
10
- * @param {string} [formResponseData.name] - Response name used to check against known error responses
11
- * @param {"success" | "danger"} [formResponseData.type] - Type of toast notification to be displayed
9
+ * Toast rules:
10
+ * - Success responses (`successResponses`) show a success toast with `message`.
11
+ * - Bad responses (`badResponses`) show a danger toast.
12
+ * - When `cause.fieldErrors` exists, the first field error message has priority.
13
+ * - The message `"Unprocessable entity"` is intentionally ignored.
12
14
  *
13
- * @example
14
- * ```tsx
15
- * // Complete usage with success notification
16
- * const responseData = {
17
- * closeModal: true,
18
- * message: "Operation completed successfully!",
19
- * type: "success"
20
- * };
21
- *
22
- * useAutomation(responseData);
23
- * ```
15
+ * @param {any} formResponseData Response payload used to trigger automations.
16
+ * @param {boolean} [formResponseData.closeModal] Closes all modals when `true`.
17
+ * @param {string} [formResponseData.message] Message used in toast notifications.
18
+ * @param {string} [formResponseData.name] Response identifier used to classify success/error.
19
+ * @param {Object} [formResponseData.cause] Additional payload metadata.
20
+ * @param {Object} [formResponseData.cause.data] Additional response data.
21
+ * @param {string} [formResponseData.cause.data.scrollTo] Scroll target name for `react-scroll`.
22
+ * @param {Record<string, string>} [formResponseData.cause.fieldErrors] Field-level error messages.
24
23
  *
25
24
  * @example
26
25
  * ```tsx
27
- * // Close modal only
28
- * useAutomation({ closeModal: true });
26
+ * useAutomation({
27
+ * closeModal: true,
28
+ * name: "created",
29
+ * message: "Saved successfully"
30
+ * });
29
31
  * ```
30
32
  *
31
33
  * @example
32
34
  * ```tsx
33
- * // Display error notification
34
35
  * useAutomation({
35
- * message: "Error processing request",
36
- * type: "danger"
36
+ * name: "validation_error",
37
+ * message: "Invalid payload",
38
+ * cause: {
39
+ * data: { scrollTo: "email" },
40
+ * fieldErrors: { email: "E-mail is required" }
41
+ * }
37
42
  * });
38
43
  * ```
39
44
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useAutomation.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutomation.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,iBAAS,aAAa,CAAC,gBAAgB,EAAE,GAAG,QAyB3C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"useAutomation.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutomation.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,iBAAS,aAAa,CAAC,gBAAgB,EAAE,GAAG,QA+B3C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,44 +1,50 @@
1
1
  import { useEffect } from "react";
2
+ import { scroller } from "react-scroll";
2
3
  import { useModal } from "./useModal";
3
4
  import { useToast } from "./useToast";
4
5
  import { badResponses } from "../templates/badResponses";
5
6
  import { successResponses } from "../templates/successResponses";
6
7
  /**
7
- * Hook for automating actions based on form response data.
8
+ * Executes UI automations based on a form response payload.
8
9
  *
9
- * This hook automates the closing of modals and the display of toast notifications
10
- * based on the properties provided in the form response data object.
10
+ * Current behaviors:
11
+ * - Closes all open modals when `closeModal` is `true`.
12
+ * - Scrolls to a target element when `cause.data.scrollTo` is provided.
13
+ * - Shows a toast according to response `name`, `message`, and `cause.fieldErrors`.
11
14
  *
12
- * @param {Object} formResponseData - Object containing form response data for automation
13
- * @param {boolean} [formResponseData.closeModal] - If true, closes all open modals
14
- * @param {string} [formResponseData.message] - Message to be displayed in the toast notification
15
- * @param {string} [formResponseData.name] - Response name used to check against known error responses
16
- * @param {"success" | "danger"} [formResponseData.type] - Type of toast notification to be displayed
15
+ * Toast rules:
16
+ * - Success responses (`successResponses`) show a success toast with `message`.
17
+ * - Bad responses (`badResponses`) show a danger toast.
18
+ * - When `cause.fieldErrors` exists, the first field error message has priority.
19
+ * - The message `"Unprocessable entity"` is intentionally ignored.
17
20
  *
18
- * @example
19
- * ```tsx
20
- * // Complete usage with success notification
21
- * const responseData = {
22
- * closeModal: true,
23
- * message: "Operation completed successfully!",
24
- * type: "success"
25
- * };
26
- *
27
- * useAutomation(responseData);
28
- * ```
21
+ * @param {any} formResponseData Response payload used to trigger automations.
22
+ * @param {boolean} [formResponseData.closeModal] Closes all modals when `true`.
23
+ * @param {string} [formResponseData.message] Message used in toast notifications.
24
+ * @param {string} [formResponseData.name] Response identifier used to classify success/error.
25
+ * @param {Object} [formResponseData.cause] Additional payload metadata.
26
+ * @param {Object} [formResponseData.cause.data] Additional response data.
27
+ * @param {string} [formResponseData.cause.data.scrollTo] Scroll target name for `react-scroll`.
28
+ * @param {Record<string, string>} [formResponseData.cause.fieldErrors] Field-level error messages.
29
29
  *
30
30
  * @example
31
31
  * ```tsx
32
- * // Close modal only
33
- * useAutomation({ closeModal: true });
32
+ * useAutomation({
33
+ * closeModal: true,
34
+ * name: "created",
35
+ * message: "Saved successfully"
36
+ * });
34
37
  * ```
35
38
  *
36
39
  * @example
37
40
  * ```tsx
38
- * // Display error notification
39
41
  * useAutomation({
40
- * message: "Error processing request",
41
- * type: "danger"
42
+ * name: "validation_error",
43
+ * message: "Invalid payload",
44
+ * cause: {
45
+ * data: { scrollTo: "email" },
46
+ * fieldErrors: { email: "E-mail is required" }
47
+ * }
42
48
  * });
43
49
  * ```
44
50
  */
@@ -48,23 +54,29 @@ function useAutomation(formResponseData) {
48
54
  const closeModal = formResponseData?.closeModal;
49
55
  const message = formResponseData?.message;
50
56
  const name = formResponseData?.name;
51
- const type = formResponseData?.type;
57
+ const scrollTo = formResponseData?.cause?.data?.scrollTo;
58
+ const firstErrorField = formResponseData?.cause?.fieldErrors
59
+ ? Object.values(formResponseData?.cause?.fieldErrors)[0]
60
+ : null;
61
+ function fireToast() {
62
+ if (!message && !firstErrorField)
63
+ return;
64
+ if (successResponses.includes(name))
65
+ return showToast({ message, type: "success" });
66
+ if (!badResponses.includes(name))
67
+ return;
68
+ if (!!firstErrorField)
69
+ return showToast({ message: firstErrorField, type: "danger" });
70
+ if (message === "Unprocessable entity")
71
+ return;
72
+ return showToast({ message, type: "danger" });
73
+ }
52
74
  useEffect(() => {
53
75
  if (closeModal)
54
76
  closeAll();
55
- if (message) {
56
- if (type === "success")
57
- showToast({ message, type: "success" });
58
- if (type === "danger")
59
- showToast({ message, type: "danger" });
60
- if (badResponses.includes(name) && !badResponses.includes(message)) {
61
- showToast({ message, type: "danger" });
62
- }
63
- if (successResponses.includes(name) &&
64
- !successResponses.includes(message)) {
65
- showToast({ message, type: "success" });
66
- }
67
- }
77
+ if (scrollTo)
78
+ scroller.scrollTo(scrollTo, { smooth: true, offset: 20 });
79
+ fireToast();
68
80
  }, [formResponseData]);
69
81
  }
70
82
  export { useAutomation };
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from "react";
2
+ type FormRendererProps = {
3
+ name?: string;
4
+ label?: string;
5
+ className?: string;
6
+ showAsterisk?: boolean;
7
+ unShowFieldTemplate?: boolean;
8
+ errorMessage?: string;
9
+ orientation?: "horizontal" | "vertical" | "horizontalReverse";
10
+ children: ReactNode;
11
+ };
12
+ declare function FieldTemplate(props: FormRendererProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
13
+ export { FieldTemplate };
14
+ //# sourceMappingURL=fieldTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldTemplate.d.ts","sourceRoot":"","sources":["../../src/services/fieldTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlC,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;IAC9D,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,iBAAS,aAAa,CAAC,KAAK,EAAE,iBAAiB,2UAqB9C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FieldError } from "../components/fieldError";
3
+ import { FieldLabel } from "../components/fieldLabel";
4
+ import { FieldWrapper } from "../components/fieldWrapper";
5
+ function FieldTemplate(props) {
6
+ const { name, label, showAsterisk, className, unShowFieldTemplate, errorMessage, children, orientation, } = props;
7
+ if (unShowFieldTemplate)
8
+ return children;
9
+ return (_jsxs(FieldWrapper, { id: name, className: className, orientation: orientation, children: [label && _jsx(FieldLabel, { showAsterisk: showAsterisk, children: label }), children, errorMessage && _jsx(FieldError, { children: errorMessage })] }));
10
+ }
11
+ export { FieldTemplate };
@@ -34,6 +34,9 @@ type RichTextCustomText = {
34
34
  type Descendant = RichTextCustomElement | RichTextCustomText;
35
35
  type RichTextProps = {
36
36
  name: string;
37
+ className?: string;
38
+ unShowFieldTemplate?: boolean;
39
+ orientation?: "horizontal" | "vertical" | "horizontalReverse";
37
40
  hiddenButtons?: RichTextHiddenButtonKey[];
38
41
  maxLimit?: number;
39
42
  enforceCharacterLimit?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"richTextTypes.d.ts","sourceRoot":"","sources":["../../src/types/richTextTypes.ts"],"names":[],"mappings":"AAAA,KAAK,uBAAuB,GACxB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,WAAW,GACX,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,CAAC;AAEZ,KAAK,yBAAyB,GAC1B,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,cAAc,GACd,WAAW,GACX,OAAO,GACP,OAAO,CAAC;AAEZ,KAAK,uBAAuB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvE,KAAK,sBAAsB,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;AAEvE,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,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AC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,uBAAuB,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,KAAK,aAAa,GAAG,UAAU,EAAE,CAAC;AAElC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAClC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,YAAY,EACV,UAAU,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,aAAa,EACb,aAAa,GACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "3.0.1-beta.140",
3
+ "version": "3.0.1-beta.142",
4
4
  "main": "./dist/bundle.js",
5
5
  "module": "./dist/bundle.js",
6
6
  "types": "./dist/index.d.ts",
@@ -40,11 +40,13 @@
40
40
  "@arkyn/templates": "^3.0.1-beta.136",
41
41
  "@react-google-maps/api": "^2.20.8",
42
42
  "@react-input/mask": "^2.0.4",
43
+ "@types/react-scroll": "^1.8.10",
43
44
  "@vitejs/plugin-react": "^6.0.1",
44
45
  "framer-motion": "^12.38.0",
45
46
  "html-react-parser": "^6.1.0",
46
47
  "mapbox-gl": "^3.23.1",
47
48
  "react-hot-toast": "^2.6.0",
49
+ "react-scroll": "^1.9.3",
48
50
  "slate": "^0.124.1",
49
51
  "slate-history": "^0.113.1",
50
52
  "slate-react": "^0.124.0"