linear-react-components-ui 1.1.26-beta.21 → 1.1.26-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/styles/datepicker2.css +1 -1
- package/lib/assets/styles/dialog.css +1 -1
- package/lib/assets/styles/drawers.css +1 -1
- package/lib/assets/styles/gridlayout.css +1 -1
- package/lib/assets/styles/selectfield.css +1 -1
- package/lib/assets/styles/textfield.css +1 -1
- package/lib/assets/styles/tooltip.css +1 -1
- package/lib/dialog/base/index.js +53 -55
- package/lib/dialog/base/index.js.map +1 -1
- package/lib/dialog/form/index.js +56 -55
- package/lib/dialog/form/index.js.map +1 -1
- package/lib/drawer/Drawer.js +7 -7
- package/lib/drawer/Drawer.js.map +1 -1
- package/lib/drawer/index.js +1 -1
- package/lib/drawer/index.js.map +1 -1
- package/lib/form2/types.d.ts +9 -4
- package/lib/form2/useForm/index.js +96 -89
- package/lib/form2/useForm/index.js.map +1 -1
- package/lib/icons/helper.d.ts +12 -0
- package/lib/icons/helper.js +12 -0
- package/lib/icons/helper.js.map +1 -1
- package/lib/inputs/date/index.js +59 -61
- package/lib/inputs/date/index.js.map +1 -1
- package/lib/inputs2/checkboxfield/base.d.ts +27 -0
- package/lib/inputs2/checkboxfield/base.js +100 -0
- package/lib/inputs2/checkboxfield/base.js.map +1 -0
- package/lib/inputs2/checkboxfield/index.d.ts +4 -25
- package/lib/inputs2/checkboxfield/index.js +41 -108
- package/lib/inputs2/checkboxfield/index.js.map +1 -1
- package/lib/inputs2/date/datefield/base.d.ts +3 -0
- package/lib/inputs2/date/datefield/base.js +193 -0
- package/lib/inputs2/date/datefield/base.js.map +1 -0
- package/lib/inputs2/date/datefield/index.d.ts +2 -1
- package/lib/inputs2/date/datefield/index.js +42 -312
- package/lib/inputs2/date/datefield/index.js.map +1 -1
- package/lib/inputs2/date/datefield/types.d.ts +6 -4
- package/lib/inputs2/date/dateperiodfield/base.d.ts +3 -0
- package/lib/inputs2/date/dateperiodfield/base.js +511 -0
- package/lib/inputs2/date/dateperiodfield/base.js.map +1 -0
- package/lib/inputs2/date/dateperiodfield/index.d.ts +2 -1
- package/lib/inputs2/date/dateperiodfield/index.js +42 -517
- package/lib/inputs2/date/dateperiodfield/index.js.map +1 -1
- package/lib/inputs2/date/dateperiodfield/types.d.ts +6 -4
- package/lib/inputs2/mask/Cnpj.d.ts +1 -3
- package/lib/inputs2/mask/Cnpj.js +38 -44
- package/lib/inputs2/mask/Cnpj.js.map +1 -1
- package/lib/inputs2/mask/Cpf.d.ts +0 -1
- package/lib/inputs2/mask/Cpf.js +32 -42
- package/lib/inputs2/mask/Cpf.js.map +1 -1
- package/lib/inputs2/numberfield/index.js +85 -68
- package/lib/inputs2/numberfield/index.js.map +1 -1
- package/lib/inputs2/radiofield/base.d.ts +3 -0
- package/lib/inputs2/radiofield/base.js +115 -0
- package/lib/inputs2/radiofield/base.js.map +1 -0
- package/lib/inputs2/radiofield/index.d.ts +2 -1
- package/lib/inputs2/radiofield/index.js +41 -108
- package/lib/inputs2/radiofield/index.js.map +1 -1
- package/lib/inputs2/radiofield/types.d.ts +5 -2
- package/lib/inputs2/selectfield/base.d.ts +3 -0
- package/lib/inputs2/selectfield/base.js +411 -0
- package/lib/inputs2/selectfield/base.js.map +1 -0
- package/lib/inputs2/selectfield/index.d.ts +3 -3
- package/lib/inputs2/selectfield/index.js +49 -404
- package/lib/inputs2/selectfield/index.js.map +1 -1
- package/lib/inputs2/selectfield/listbox.d.ts +0 -1
- package/lib/inputs2/selectfield/listbox.js +33 -34
- package/lib/inputs2/selectfield/listbox.js.map +1 -1
- package/lib/inputs2/selectfield/types.d.ts +8 -7
- package/lib/inputs2/selectfield/types.js.map +1 -1
- package/lib/inputs2/textareafield/base.d.ts +23 -0
- package/lib/inputs2/textareafield/base.js +137 -0
- package/lib/inputs2/textareafield/base.js.map +1 -0
- package/lib/inputs2/textareafield/index.d.ts +4 -22
- package/lib/inputs2/textareafield/index.js +45 -130
- package/lib/inputs2/textareafield/index.js.map +1 -1
- package/lib/inputs2/textfield/base.d.ts +23 -0
- package/lib/inputs2/textfield/base.js +107 -0
- package/lib/inputs2/textfield/base.js.map +1 -0
- package/lib/inputs2/textfield/index.d.ts +4 -22
- package/lib/inputs2/textfield/index.js +45 -103
- package/lib/inputs2/textfield/index.js.map +1 -1
- package/lib/tooltip/types.d.ts +4 -1
- package/lib/tooltip/useTooltip.js +68 -86
- package/lib/tooltip/useTooltip.js.map +1 -1
- package/package.json +1 -1
- package/lib/inputs2/selectfield/simple.d.ts +0 -9
- package/lib/inputs2/selectfield/simple.js +0 -24
- package/lib/inputs2/selectfield/simple.js.map +0 -1
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Search as
|
|
1
|
+
import { jsxs as m, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import p from "../../_virtual/lodash.js";
|
|
3
|
+
import { forwardRef as A, useState as h, useRef as D, useEffect as N } from "react";
|
|
4
|
+
import { Search as O } from "./search.js";
|
|
5
5
|
import { useSelectFieldContext as j } from "./context.js";
|
|
6
|
-
const r = 406, k =
|
|
6
|
+
const r = 406, k = A((w, x) => {
|
|
7
7
|
const {
|
|
8
|
-
children:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} = x, {
|
|
8
|
+
children: v,
|
|
9
|
+
...E
|
|
10
|
+
} = w, {
|
|
12
11
|
listBoxOpen: i,
|
|
13
|
-
valueSelect:
|
|
14
|
-
selectFieldId:
|
|
15
|
-
selectContainerRef:
|
|
16
|
-
notFoundFilterLabel:
|
|
17
|
-
searchOnDropdown:
|
|
18
|
-
isMultipleWithCheckboxes:
|
|
19
|
-
} = j(), [
|
|
12
|
+
valueSelect: b,
|
|
13
|
+
selectFieldId: y,
|
|
14
|
+
selectContainerRef: c,
|
|
15
|
+
notFoundFilterLabel: d,
|
|
16
|
+
searchOnDropdown: S,
|
|
17
|
+
isMultipleWithCheckboxes: B
|
|
18
|
+
} = j(), [L, I] = h({}), [g, F] = h(!1), n = D(null), R = S || B;
|
|
20
19
|
return requestAnimationFrame(() => {
|
|
21
|
-
const e = n.current?.childNodes, s = n.current?.querySelectorAll('li[data-state-filtered="true"]') ?? [], t = !
|
|
22
|
-
|
|
23
|
-
}),
|
|
20
|
+
const e = n.current?.childNodes, s = n.current?.querySelectorAll('li[data-state-filtered="true"]') ?? [], t = !p.isEmpty(e) && p.isEmpty(s);
|
|
21
|
+
F(t);
|
|
22
|
+
}), N(() => {
|
|
24
23
|
const e = () => {
|
|
25
|
-
const s =
|
|
24
|
+
const s = c.current?.getBoundingClientRect();
|
|
26
25
|
if (s) {
|
|
27
26
|
const {
|
|
28
27
|
top: t,
|
|
29
|
-
left:
|
|
30
|
-
width:
|
|
31
|
-
height:
|
|
32
|
-
} = s, l = window.innerHeight - (t +
|
|
33
|
-
left:
|
|
28
|
+
left: C,
|
|
29
|
+
width: H,
|
|
30
|
+
height: a
|
|
31
|
+
} = s, l = window.innerHeight - (t + a), u = t, M = l < r && u > l, o = {
|
|
32
|
+
left: C + window.scrollX,
|
|
34
33
|
position: "absolute",
|
|
35
|
-
minWidth:
|
|
34
|
+
minWidth: H
|
|
36
35
|
};
|
|
37
|
-
|
|
36
|
+
M ? (o.bottom = window.innerHeight - t - window.scrollY, o.maxHeight = Math.min(r, u)) : (o.top = t + a + window.scrollY, o.maxHeight = Math.min(r, l)), I(o);
|
|
38
37
|
}
|
|
39
38
|
};
|
|
40
39
|
return i && (e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0)), () => {
|
|
41
40
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
42
41
|
};
|
|
43
|
-
}, [i,
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
}, [i, b, c]), /* @__PURE__ */ m("div", { ref: x, style: L, "aria-expanded": i, className: "select-field-listbox", "data-testid": "test-select-field-listbox", ...E, children: [
|
|
43
|
+
R && /* @__PURE__ */ f(O, {}),
|
|
44
|
+
/* @__PURE__ */ m("ul", { id: y, role: "listbox", ref: n, children: [
|
|
45
|
+
v,
|
|
46
|
+
g && /* @__PURE__ */ f(
|
|
48
47
|
"li",
|
|
49
48
|
{
|
|
50
49
|
tabIndex: -1,
|
|
51
50
|
"aria-disabled": !0,
|
|
52
|
-
"aria-label":
|
|
51
|
+
"aria-label": d,
|
|
53
52
|
role: "option",
|
|
54
53
|
id: "not-found-values",
|
|
55
54
|
className: "not-found-values",
|
|
@@ -59,7 +58,7 @@ const r = 406, k = D((x, v) => {
|
|
|
59
58
|
onMouseDown: (e) => {
|
|
60
59
|
e.preventDefault();
|
|
61
60
|
},
|
|
62
|
-
children:
|
|
61
|
+
children: d
|
|
63
62
|
},
|
|
64
63
|
"not-found-values"
|
|
65
64
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.js","sources":["../../../src/lib/inputs2/selectfield/listbox.tsx"],"sourcesContent":["import _ from 'lodash';\nimport { ComponentProps, CSSProperties, forwardRef, useEffect, useRef, useState } from 'react';\nimport { Search } from './search';\nimport { useSelectFieldContext } from './context';\n\ninterface SelectFieldListBoxProps extends ComponentProps<'div'> {
|
|
1
|
+
{"version":3,"file":"listbox.js","sources":["../../../src/lib/inputs2/selectfield/listbox.tsx"],"sourcesContent":["import _ from 'lodash';\nimport { ComponentProps, CSSProperties, forwardRef, useEffect, useRef, useState } from 'react';\nimport { Search } from './search';\nimport { useSelectFieldContext } from './context';\n\ninterface SelectFieldListBoxProps extends ComponentProps<'div'> { }\n\nconst MAX_HEIGHT = ((27 * 15) + 1); // 27px de height do list item * 15 itens máximos na exibição + 1px de borda listbox.\nconst ListBox = forwardRef<HTMLDivElement, SelectFieldListBoxProps>((props, ref) => {\n const { children, ...rest } = props;\n const {\n listBoxOpen, valueSelect, selectFieldId, selectContainerRef, notFoundFilterLabel,\n searchOnDropdown, isMultipleWithCheckboxes,\n } = useSelectFieldContext();\n\n const [listBoxStyles, setListBoxStyles] = useState<CSSProperties>({});\n const [filterResultIsEmpty, setFilterResultIsEmpty] = useState(false);\n const listBoxRef = useRef<HTMLUListElement>(null);\n const shouldBeShowSearchInput = searchOnDropdown || isMultipleWithCheckboxes;\n\n requestAnimationFrame(() => {\n const hasChildrenElementsInUL = (listBoxRef.current?.childNodes);\n const liElementsFiltered = (listBoxRef.current?.querySelectorAll(\n 'li[data-state-filtered=\"true\"]',\n ) ?? []) as HTMLLIElement[];\n const filterIsEmpty = !_.isEmpty(hasChildrenElementsInUL) && _.isEmpty(liElementsFiltered);\n setFilterResultIsEmpty(filterIsEmpty);\n });\n\n useEffect(() => {\n const updatePosition = () => {\n const selectPositionOnScreen = selectContainerRef.current?.getBoundingClientRect();\n if (selectPositionOnScreen) {\n const { top, left, width, height } = selectPositionOnScreen;\n const spaceBelow = window.innerHeight - (top + height);\n const spaceAbove = top;\n const shouldOpenUp = spaceBelow < MAX_HEIGHT && spaceAbove > spaceBelow;\n\n const styles: CSSProperties = {\n left: left + window.scrollX,\n position: 'absolute',\n minWidth: width,\n };\n\n if (shouldOpenUp) {\n styles.bottom = window.innerHeight - top - window.scrollY;\n styles.maxHeight = Math.min(MAX_HEIGHT, spaceAbove);\n } else {\n styles.top = top + height + window.scrollY;\n styles.maxHeight = Math.min(MAX_HEIGHT, spaceBelow);\n }\n\n setListBoxStyles(styles);\n }\n };\n\n if (listBoxOpen) {\n updatePosition();\n window.addEventListener('resize', updatePosition);\n window.addEventListener('scroll', updatePosition, true);\n }\n\n return () => {\n window.removeEventListener('resize', updatePosition);\n window.removeEventListener('scroll', updatePosition, true);\n };\n }, [listBoxOpen, valueSelect, selectContainerRef]);\n\n return (\n <div\n ref={ref}\n style={listBoxStyles}\n aria-expanded={listBoxOpen}\n className=\"select-field-listbox\"\n data-testid=\"test-select-field-listbox\"\n {...rest}>\n {shouldBeShowSearchInput && (<Search />)}\n <ul\n id={selectFieldId}\n role=\"listbox\"\n ref={listBoxRef}>\n {children}\n {filterResultIsEmpty && (\n <li\n tabIndex={-1}\n aria-disabled={true}\n aria-label={notFoundFilterLabel}\n key=\"not-found-values\"\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"option\"\n id=\"not-found-values\"\n className=\"not-found-values\"\n onClick={(event) => { event.preventDefault(); }}\n onMouseDown={(event) => { event.preventDefault(); }}>\n {notFoundFilterLabel}\n </li>\n )}\n </ul>\n </div>\n );\n});\n\nListBox.displayName = 'SelectListBox';\nexport { ListBox };\nexport type { SelectFieldListBoxProps };\n"],"names":["MAX_HEIGHT","ListBox","forwardRef","props","ref","children","rest","listBoxOpen","valueSelect","selectFieldId","selectContainerRef","notFoundFilterLabel","searchOnDropdown","isMultipleWithCheckboxes","useSelectFieldContext","listBoxStyles","setListBoxStyles","useState","filterResultIsEmpty","setFilterResultIsEmpty","listBoxRef","useRef","shouldBeShowSearchInput","requestAnimationFrame","hasChildrenElementsInUL","current","childNodes","liElementsFiltered","querySelectorAll","filterIsEmpty","_","isEmpty","useEffect","updatePosition","selectPositionOnScreen","getBoundingClientRect","top","left","width","height","spaceBelow","window","innerHeight","spaceAbove","shouldOpenUp","styles","scrollX","position","minWidth","bottom","scrollY","maxHeight","Math","min","addEventListener","removeEventListener","jsxs","Search","jsx","event","preventDefault","displayName"],"mappings":";;;;;AAOA,MAAMA,IAAe,KACfC,IAAUC,EAAoD,CAACC,GAAOC,MAAQ;AAClF,QAAM;AAAA,IAAEC,UAAAA;AAAAA,IAAU,GAAGC;AAAAA,EAAAA,IAASH,GACxB;AAAA,IACJI,aAAAA;AAAAA,IAAaC,aAAAA;AAAAA,IAAaC,eAAAA;AAAAA,IAAeC,oBAAAA;AAAAA,IAAoBC,qBAAAA;AAAAA,IAC7DC,kBAAAA;AAAAA,IAAkBC,0BAAAA;AAAAA,EAAAA,IAChBC,EAAAA,GAEE,CAACC,GAAeC,CAAgB,IAAIC,EAAwB,CAAA,CAAE,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AAA,IAC3D;AAAA,EACF,GAAG,CAAC1B,GAAaC,GAAaE,CAAkB,CAAC,GAG/C,gBAAA8C,EAAC,OAAA,EACC,KAAApD,GACA,OAAOW,GACP,iBAAeR,GACf,WAAU,wBACV,eAAY,6BACZ,GAAID,GACHgB,UAAAA;AAAAA,IAAAA,uBAA6BmC,GAAA,EAAM;AAAA,sBACnC,MAAA,EACC,IAAIhD,GACJ,MAAK,WACL,KAAKW,GACJf,UAAAA;AAAAA,MAAAA;AAAAA,MACAa,KACC,gBAAAwC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,iBAAe;AAAA,UACf,cAAY/C;AAAAA,UAGZ,MAAK;AAAA,UACL,IAAG;AAAA,UACH,WAAU;AAAA,UACV,SAAUgD,CAAAA,MAAU;AAAEA,YAAAA,EAAMC,eAAAA;AAAAA,UAAkB;AAAA,UAC9C,aAAcD,CAAAA,MAAU;AAAEA,YAAAA,EAAMC,eAAAA;AAAAA,UAAkB;AAAA,UACjDjD,UAAAA;AAAAA,QAAAA;AAAAA,QAPG;AAAA,MAAA;AAAA,IAQN,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ,CAAC;AAEDV,EAAQ4D,cAAc;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent,
|
|
1
|
+
import { ChangeEvent, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { TextAlign } from '../../@types/Align';
|
|
3
3
|
import { ColorTheme } from '../../@types/ColorStyles';
|
|
4
4
|
import { ITooltipCommonProps } from '../../tooltip/types';
|
|
@@ -17,8 +17,13 @@ export declare enum Keys {
|
|
|
17
17
|
delete = "Delete",
|
|
18
18
|
spaceBar = " "
|
|
19
19
|
}
|
|
20
|
-
type InputHTMLProps = Omit<
|
|
21
|
-
export interface SelectFieldInputProps extends
|
|
20
|
+
type InputHTMLProps = Omit<ComponentPropsWithoutRef<'input'>, 'multiple' | 'type'>;
|
|
21
|
+
export interface SelectFieldInputProps extends SelectFieldInputBaseProps {
|
|
22
|
+
gridLayout?: string;
|
|
23
|
+
permissionAttr?: PermissionAttr;
|
|
24
|
+
onDeniedActions?: OnDenied;
|
|
25
|
+
}
|
|
26
|
+
export interface SelectFieldInputBaseProps extends InputHTMLProps, ITooltipCommonProps {
|
|
22
27
|
skeletonize?: boolean;
|
|
23
28
|
undigitable?: boolean;
|
|
24
29
|
externalSearch?: boolean;
|
|
@@ -30,7 +35,6 @@ export interface SelectFieldInputProps extends InputHTMLProps, ITooltipCommonPro
|
|
|
30
35
|
errors?: string[];
|
|
31
36
|
striped?: boolean;
|
|
32
37
|
hint?: string;
|
|
33
|
-
gridLayout?: string;
|
|
34
38
|
notFoundFilterLabel?: string;
|
|
35
39
|
customClass?: string;
|
|
36
40
|
customClassLabel?: string;
|
|
@@ -43,11 +47,8 @@ export interface SelectFieldInputProps extends InputHTMLProps, ITooltipCommonPro
|
|
|
43
47
|
hintPosition?: HintPosition;
|
|
44
48
|
themePopover?: ColorTheme;
|
|
45
49
|
popoverAlign?: Extract<Position, 'left' | 'right'>;
|
|
46
|
-
permissionAttr?: PermissionAttr;
|
|
47
|
-
onDeniedActions?: OnDenied;
|
|
48
50
|
dropdownAlignButton?: Extract<Position, 'left' | 'right'>;
|
|
49
51
|
onSearch?: (event?: ChangeEvent<HTMLInputElement>) => void;
|
|
50
52
|
multiple?: keyof typeof MultipleVariantEnum;
|
|
51
|
-
dropdownMaxWidth?: number;
|
|
52
53
|
}
|
|
53
54
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/lib/inputs2/selectfield/types.ts"],"sourcesContent":["import { ChangeEvent,
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/lib/inputs2/selectfield/types.ts"],"sourcesContent":["import { ChangeEvent, type ComponentPropsWithoutRef } from 'react';\nimport type { TextAlign } from '../../@types/Align';\nimport type { ColorTheme } from '../../@types/ColorStyles';\nimport type { ITooltipCommonProps } from '../../tooltip/types';\nimport type { Position, HintPosition } from '../../@types/Position';\nimport type { OnDenied, PermissionAttr } from '../../@types/PermissionAttr';\n\nexport enum MultipleVariantEnum { default = 'default', checkboxes = 'checkboxes' }\nexport enum Keys {\n escape = 'Escape',\n arrowDown = 'ArrowDown',\n arrowUp = 'ArrowUp',\n enter = 'Enter',\n backspace = 'Backspace',\n delete = 'Delete',\n spaceBar = ' '\n}\ntype InputHTMLProps = Omit<ComponentPropsWithoutRef<'input'>, 'multiple' | 'type'>;\n\nexport interface SelectFieldInputProps extends SelectFieldInputBaseProps {\n gridLayout?: string;\n permissionAttr?: PermissionAttr;\n onDeniedActions?: OnDenied;\n}\n\nexport interface SelectFieldInputBaseProps extends InputHTMLProps, ITooltipCommonProps {\n skeletonize?: boolean;\n undigitable?: boolean;\n externalSearch?: boolean;\n showClearButton?: boolean;\n searchOnDropdown?: boolean;\n openDropdownOnFocus?: boolean;\n value?: any;\n label?: string;\n errors?: string[];\n striped?: boolean;\n hint?: string;\n notFoundFilterLabel?: string;\n customClass?: string;\n customClassLabel?: string;\n customClassWrapper?: string;\n searchInputPlaceholder?: string;\n customClassInputContainer?: string;\n multipleInputLabelEmpty?: string;\n multipleInputLabelManySelection?: string;\n textAlign?: TextAlign;\n hintPosition?: HintPosition;\n themePopover?: ColorTheme;\n popoverAlign?: Extract<Position, 'left' | 'right'>;\n dropdownAlignButton?: Extract<Position, 'left' | 'right'>;\n onSearch?: (event?: ChangeEvent<HTMLInputElement>) => void;\n multiple?: keyof typeof MultipleVariantEnum;\n}\n"],"names":["MultipleVariantEnum","default","checkboxes","Keys","escape","arrowDown","arrowUp","enter","backspace","delete","spaceBar"],"mappings":"AAOO,IAAKA,sBAAAA,OAAsBC,EAAAA,UAAU,WAAWC,EAAAA,aAAa,cAAxDF,IAAAA,KAAAA,CAAAA,CAAAA,GACAG,sBAAAA,OACVC,EAAAA,SAAS,UACTC,EAAAA,YAAY,aACZC,EAAAA,UAAU,WACVC,EAAAA,QAAQ,SACRC,EAAAA,YAAY,aACZC,EAAAA,SAAS,UACTC,EAAAA,WAAW,KAPDP,IAAAA,KAAAA,CAAAA,CAAAA;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITooltipCommonProps } from '../../tooltip/types';
|
|
3
|
+
import { TextAlign } from '../../@types/Align';
|
|
4
|
+
import { ColorTheme } from '../../@types/ColorStyles';
|
|
5
|
+
import { Position, HintPosition } from '../../@types/Position';
|
|
6
|
+
export interface TextAreaFieldInputBaseProps extends React.ComponentPropsWithoutRef<'textarea'>, ITooltipCommonProps {
|
|
7
|
+
hint?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
errors?: string[];
|
|
10
|
+
customClass?: string;
|
|
11
|
+
customClassLabel?: string;
|
|
12
|
+
customClassWrapper?: string;
|
|
13
|
+
customClassInputContainer?: string;
|
|
14
|
+
rounded?: boolean;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
skeletonize?: boolean;
|
|
17
|
+
labelUppercase?: boolean;
|
|
18
|
+
textAlign?: TextAlign;
|
|
19
|
+
hintPosition?: HintPosition;
|
|
20
|
+
themePopover?: ColorTheme;
|
|
21
|
+
popoverAlign?: Extract<Position, 'left' | 'right'>;
|
|
22
|
+
}
|
|
23
|
+
export declare const InputBase: React.ForwardRefExoticComponent<TextAreaFieldInputBaseProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsxs as p, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as kt } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import '../../assets/styles/textfield.css';/* empty css */
|
|
4
|
+
import r from "react";
|
|
5
|
+
import pt from "../../_virtual/lodash.js";
|
|
6
|
+
import Bt from "../../hint/index.js";
|
|
7
|
+
import It from "../../tooltip/index.js";
|
|
8
|
+
import Pt from "../../textContent/index.js";
|
|
9
|
+
import { mergeRefs as zt } from "../../form2/helpers.js";
|
|
10
|
+
import At from "../../popover/index.js";
|
|
11
|
+
import { LeftSlot as qt, RightSlot as wt } from "../slot/index.js";
|
|
12
|
+
import Ft from "../../popover/PopoverText.js";
|
|
13
|
+
const Tt = r.forwardRef((o, P) => {
|
|
14
|
+
const t = kt.c(99);
|
|
15
|
+
let g, l, d, i, m, s, n, f, z, A, q, w, F, T, _, M, O, W, j, b, v, x;
|
|
16
|
+
t[0] !== o ? ({
|
|
17
|
+
name: s,
|
|
18
|
+
label: m,
|
|
19
|
+
errors: d,
|
|
20
|
+
children: g,
|
|
21
|
+
maxLength: z,
|
|
22
|
+
customClass: A,
|
|
23
|
+
customClassLabel: w,
|
|
24
|
+
customClassWrapper: F,
|
|
25
|
+
customClassInputContainer: T,
|
|
26
|
+
textAlign: _,
|
|
27
|
+
labelUppercase: M,
|
|
28
|
+
skeletonize: O,
|
|
29
|
+
hintPosition: W,
|
|
30
|
+
themePopover: j,
|
|
31
|
+
popoverAlign: q,
|
|
32
|
+
tooltip: b,
|
|
33
|
+
tooltipPosition: v,
|
|
34
|
+
tooltipWidth: x,
|
|
35
|
+
hint: i,
|
|
36
|
+
disabled: l,
|
|
37
|
+
readOnly: n,
|
|
38
|
+
...f
|
|
39
|
+
} = o, t[0] = o, t[1] = g, t[2] = l, t[3] = d, t[4] = i, t[5] = m, t[6] = s, t[7] = n, t[8] = f, t[9] = z, t[10] = A, t[11] = q, t[12] = w, t[13] = F, t[14] = T, t[15] = _, t[16] = M, t[17] = O, t[18] = W, t[19] = j, t[20] = b, t[21] = v, t[22] = x) : (g = t[1], l = t[2], d = t[3], i = t[4], m = t[5], s = t[6], n = t[7], f = t[8], z = t[9], A = t[10], q = t[11], w = t[12], F = t[13], T = t[14], _ = t[15], M = t[16], O = t[17], W = t[18], j = t[19], b = t[20], v = t[21], x = t[22]);
|
|
40
|
+
const a = z === void 0 ? void 0 : z, Lt = A === void 0 ? "" : A, Z = w === void 0 ? "" : w, yt = F === void 0 ? "" : F, Nt = T === void 0 ? "" : T, tt = _ === void 0 ? "left" : _, et = M === void 0 ? !1 : M, e = O === void 0 ? !1 : O, H = W === void 0 ? "below" : W, lt = j === void 0 ? "light" : j, ot = q === void 0 ? "left" : q, gt = r.useRef(null), U = r.useRef(null), st = r.useRef(null);
|
|
41
|
+
let V;
|
|
42
|
+
t[23] !== o.label ? (V = pt.isEmpty(o?.label), t[23] = o.label, t[24] = V) : V = t[24];
|
|
43
|
+
const nt = !V, bt = !!o.hint?.length, vt = H === "onLabelRight", c = !!d?.length, C = !!a;
|
|
44
|
+
let D;
|
|
45
|
+
if (t[25] !== g || t[26] !== l) {
|
|
46
|
+
const Y = [], ut = [];
|
|
47
|
+
r.Children.map(g, (h, Et) => {
|
|
48
|
+
if (r.isValidElement(h)) {
|
|
49
|
+
const Rt = r.cloneElement(h, {
|
|
50
|
+
key: h.key ?? `slot-${Et}`,
|
|
51
|
+
disabled: l,
|
|
52
|
+
"aria-disabled": l
|
|
53
|
+
});
|
|
54
|
+
h.type === qt && Y.push(Rt), h.type === wt && ut.push(Rt);
|
|
55
|
+
}
|
|
56
|
+
}), D = {
|
|
57
|
+
leftSlotElements: Y,
|
|
58
|
+
rightSlotElements: ut
|
|
59
|
+
}, t[25] = g, t[26] = l, t[27] = D;
|
|
60
|
+
} else
|
|
61
|
+
D = t[27];
|
|
62
|
+
const {
|
|
63
|
+
leftSlotElements: xt,
|
|
64
|
+
rightSlotElements: Ct
|
|
65
|
+
} = D, St = !!xt?.length, $t = !!Ct?.length;
|
|
66
|
+
let G;
|
|
67
|
+
t[28] !== a ? (G = (Y) => {
|
|
68
|
+
const h = Y.target.value.length;
|
|
69
|
+
U.current && (U.current.textContent = `${h}/${a}`, U.current.style.width = `${pt.toNumber(a?.toString().length) * 7 * 2 + 6}px`);
|
|
70
|
+
}, t[28] = a, t[29] = G) : G = t[29];
|
|
71
|
+
const J = G;
|
|
72
|
+
let K;
|
|
73
|
+
t[30] !== J ? (K = () => (st?.current?.addEventListener("input", J), () => {
|
|
74
|
+
st?.current?.removeEventListener("input", J);
|
|
75
|
+
}), t[30] = J, t[31] = K) : K = t[31];
|
|
76
|
+
let Q;
|
|
77
|
+
t[32] === Symbol.for("react.memo_cache_sentinel") ? (Q = [], t[32] = Q) : Q = t[32], r.useEffect(K, Q);
|
|
78
|
+
const at = `text-field-root ${yt}`;
|
|
79
|
+
let R;
|
|
80
|
+
t[33] !== Z || t[34] !== l || t[35] !== nt || t[36] !== i || t[37] !== H || t[38] !== m || t[39] !== et || t[40] !== s || t[41] !== ot || t[42] !== o.required || t[43] !== n || t[44] !== e || t[45] !== lt ? (R = nt && /* @__PURE__ */ p("span", { className: `root-label ${Z}`, "data-state-skeletonize": e, children: [
|
|
81
|
+
/* @__PURE__ */ u("label", { className: "label", title: m, htmlFor: s, "data-state-disabled": l, "data-state-read-only": n, "data-state-input-required": o.required, "data-state-label-uppercase": et, children: m }),
|
|
82
|
+
i && H === "onLabelRight" && !e && /* @__PURE__ */ u(At, { customClass: "label-popover", theme: lt, align: ot, iconColor: "#03bde2", children: /* @__PURE__ */ u(Ft, { text: i }) })
|
|
83
|
+
] }), t[33] = Z, t[34] = l, t[35] = nt, t[36] = i, t[37] = H, t[38] = m, t[39] = et, t[40] = s, t[41] = ot, t[42] = o.required, t[43] = n, t[44] = e, t[45] = lt, t[46] = R) : R = t[46];
|
|
84
|
+
const it = `container ${Nt}`, rt = St && !e && xt;
|
|
85
|
+
let L;
|
|
86
|
+
t[47] !== P ? (L = zt(P, st), t[47] = P, t[48] = L) : L = t[48];
|
|
87
|
+
const ct = `input ${Lt}`, dt = n ? -1 : 0;
|
|
88
|
+
let y;
|
|
89
|
+
t[49] !== l || t[50] !== c || t[51] !== a || t[52] !== s || t[53] !== n || t[54] !== f || t[55] !== e || t[56] !== L || t[57] !== ct || t[58] !== dt || t[59] !== tt ? (y = /* @__PURE__ */ u("textarea", { ref: L, id: s, readOnly: n, disabled: l, maxLength: a, className: ct, tabIndex: dt, placeholder: f.placeholder, "data-state-error": c, "data-state-read-only": n, "data-state-text-align": tt, "data-state-skeletonize": e, ...f }), t[49] = l, t[50] = c, t[51] = a, t[52] = s, t[53] = n, t[54] = f, t[55] = e, t[56] = L, t[57] = ct, t[58] = dt, t[59] = tt, t[60] = y) : y = t[60];
|
|
90
|
+
const mt = $t && !e && Ct;
|
|
91
|
+
let N;
|
|
92
|
+
t[61] !== e || t[62] !== it || t[63] !== rt || t[64] !== y || t[65] !== mt ? (N = /* @__PURE__ */ p("div", { "data-state-skeletonize": e, className: it, children: [
|
|
93
|
+
rt,
|
|
94
|
+
y,
|
|
95
|
+
mt
|
|
96
|
+
] }), t[61] = e, t[62] = it, t[63] = rt, t[64] = y, t[65] = mt, t[66] = N) : N = t[66];
|
|
97
|
+
const ft = bt && !vt, ht = !vt && bt;
|
|
98
|
+
let S;
|
|
99
|
+
t[67] !== l || t[68] !== i || t[69] !== e || t[70] !== ht ? (S = /* @__PURE__ */ u(Bt, { customClass: "hint", description: i, disabled: l, skeletonize: e, visible: ht }), t[67] = l, t[68] = i, t[69] = e, t[70] = ht, t[71] = S) : S = t[71];
|
|
100
|
+
let $;
|
|
101
|
+
t[72] !== C || t[73] !== a ? ($ = C && /* @__PURE__ */ p(Pt, { ref: U, as: "span", className: "max-length-counter", children: [
|
|
102
|
+
"0/",
|
|
103
|
+
pt.toNumber(a)
|
|
104
|
+
] }), t[72] = C, t[73] = a, t[74] = $) : $ = t[74];
|
|
105
|
+
let E;
|
|
106
|
+
t[75] !== C || t[76] !== ft || t[77] !== S || t[78] !== $ ? (E = /* @__PURE__ */ p("div", { className: "footer", "data-state-has-max-length": C, "data-state-has-hint": ft, children: [
|
|
107
|
+
S,
|
|
108
|
+
$
|
|
109
|
+
] }), t[75] = C, t[76] = ft, t[77] = S, t[78] = $, t[79] = E) : E = t[79];
|
|
110
|
+
let k;
|
|
111
|
+
t[80] !== d || t[81] !== c || t[82] !== s || t[83] !== e ? (k = c && /* @__PURE__ */ u("span", { className: "error", "data-state-skeletonize": e, "aria-describedby": String(s).concat("-errors"), children: d?.map(_t) }), t[80] = d, t[81] = c, t[82] = s, t[83] = e, t[84] = k) : k = t[84];
|
|
112
|
+
let B;
|
|
113
|
+
t[85] !== c || t[86] !== at || t[87] !== R || t[88] !== N || t[89] !== E || t[90] !== k ? (B = /* @__PURE__ */ p("div", { ref: gt, className: at, "data-state-error": c, children: [
|
|
114
|
+
R,
|
|
115
|
+
N,
|
|
116
|
+
E,
|
|
117
|
+
k
|
|
118
|
+
] }), t[85] = c, t[86] = at, t[87] = R, t[88] = N, t[89] = E, t[90] = k, t[91] = B) : B = t[91];
|
|
119
|
+
let I;
|
|
120
|
+
t[92] !== b || t[93] !== v || t[94] !== x ? (I = /* @__PURE__ */ u(It, { targetRef: gt, text: b, width: x, position: v }), t[92] = b, t[93] = v, t[94] = x, t[95] = I) : I = t[95];
|
|
121
|
+
let X;
|
|
122
|
+
return t[96] !== B || t[97] !== I ? (X = /* @__PURE__ */ p(r.Fragment, { children: [
|
|
123
|
+
B,
|
|
124
|
+
I
|
|
125
|
+
] }), t[96] = B, t[97] = I, t[98] = X) : X = t[98], X;
|
|
126
|
+
});
|
|
127
|
+
Tt.displayName = "TextAreaFieldInputBase";
|
|
128
|
+
function _t(o, P) {
|
|
129
|
+
return /* @__PURE__ */ p(r.Fragment, { children: [
|
|
130
|
+
o,
|
|
131
|
+
" "
|
|
132
|
+
] }, `${P + 1}-${o}`);
|
|
133
|
+
}
|
|
134
|
+
export {
|
|
135
|
+
Tt as InputBase
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../src/lib/inputs2/textareafield/base.tsx"],"sourcesContent":["import '../../assets/styles/textfield.scss';\n\nimport React from 'react';\nimport _ from 'lodash';\nimport { ITooltipCommonProps } from '../../tooltip/types';\nimport Hint from '../../hint';\nimport { Tooltip } from '../../tooltip';\nimport TextContent from '../../textContent';\nimport { mergeRefs } from '../../form2/helpers';\nimport Popover, { PopoverText } from '../../popover';\nimport type { TextAlign } from '../../@types/Align';\nimport type { ColorTheme } from '../../@types/ColorStyles';\nimport type { Position, HintPosition } from '../../@types/Position';\nimport { LeftSlot, RightSlot, type SlotProps } from '../slot';\n\nexport interface TextAreaFieldInputBaseProps extends React.ComponentPropsWithoutRef<'textarea'>, ITooltipCommonProps {\n hint?: string;\n label?: string;\n errors?: string[];\n customClass?: string;\n customClassLabel?: string;\n customClassWrapper?: string;\n customClassInputContainer?: string;\n rounded?: boolean;\n readOnly?: boolean;\n skeletonize?: boolean\n labelUppercase?: boolean;\n textAlign?: TextAlign;\n hintPosition?: HintPosition;\n themePopover?: ColorTheme;\n popoverAlign?: Extract<Position, 'left' | 'right'>;\n}\n\nexport const InputBase = \n React.forwardRef<HTMLTextAreaElement, TextAreaFieldInputBaseProps>((props, ref) => {\n const {\n name, label, errors, children, maxLength = undefined, customClass = '', customClassLabel = '', \n customClassWrapper = '', customClassInputContainer = '', textAlign = 'left', labelUppercase = false, \n skeletonize = false, hintPosition = 'below', themePopover = 'light', popoverAlign = 'left',\n tooltip, tooltipPosition, tooltipWidth, hint, disabled, readOnly, ...rest\n } = props;\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n const counterRef = React.useRef<HTMLElement | null>(null);\n const textAreaInternalRef = React.useRef<HTMLTextAreaElement | null>(null);\n\n const hasLabel = !_.isEmpty(props?.label);\n const hasHintMessages = Boolean(props.hint?.length);\n const hintMustBeOnLabel = hintPosition === 'onLabelRight';\n const hasValidationErrors = Boolean(errors?.length);\n const hasMaxLengthCondition = Boolean(maxLength);\n\n const { leftSlotElements, rightSlotElements } = React.useMemo(() => {\n const left: React.ReactNode[] = [];\n const right: React.ReactNode[] = [];\n\n React.Children.map(children, (childElement, index) => {\n if (React.isValidElement<SlotProps>(childElement)) {\n const clonedChild = React.cloneElement(childElement, {\n key: childElement.key ?? `slot-${index}`,\n disabled: disabled,\n 'aria-disabled': disabled,\n });\n if (childElement.type === LeftSlot) left.push(clonedChild);\n if (childElement.type === RightSlot) right.push(clonedChild);\n }\n });\n\n return { leftSlotElements: left, rightSlotElements: right };\n }, [children, disabled]);\n\n const hasLeftSlotElements = Boolean(leftSlotElements?.length);\n const hasRightSlotElements = Boolean(rightSlotElements?.length);\n\n const handleOnInputData = (event: Event) => {\n const target = event.target as HTMLTextAreaElement;\n const currentLength = target.value.length;\n if (counterRef.current) {\n counterRef.current.textContent = `${currentLength}/${maxLength}`;\n /**\n * Cálculo faz referência ao tamanho do espaço ocupado do contador de caracteres.\n * Isso evita quebra de layout da interface.\n */\n counterRef.current.style.width = `${((_.toNumber(maxLength?.toString().length) * 7) * 2) + 6}px`;\n }\n };\n\n React.useEffect(() => {\n textAreaInternalRef?.current?.addEventListener('input', handleOnInputData);\n\n return () => { textAreaInternalRef?.current?.removeEventListener('input', handleOnInputData); };\n }, []);\n\n return (\n <React.Fragment>\n <div\n ref={inputRef}\n className={`text-field-root ${customClassWrapper}`}\n data-state-error={hasValidationErrors}>\n {hasLabel && (\n <span\n className={`root-label ${customClassLabel}`}\n data-state-skeletonize={skeletonize}>\n <label\n className=\"label\"\n title={label}\n htmlFor={name}\n data-state-disabled={disabled}\n data-state-read-only={readOnly}\n data-state-input-required={props.required}\n data-state-label-uppercase={labelUppercase}>\n {label}\n </label>\n {hint && hintPosition === 'onLabelRight' && !skeletonize && (\n <Popover\n customClass=\"label-popover\"\n theme={themePopover}\n align={popoverAlign}\n iconColor=\"#03bde2\">\n <PopoverText text={hint} />\n </Popover>\n )}\n </span>\n )}\n <div\n data-state-skeletonize={skeletonize}\n className={`container ${customClassInputContainer}`}>\n {(hasLeftSlotElements && !skeletonize) && leftSlotElements}\n <textarea\n ref={mergeRefs(ref, textAreaInternalRef)}\n id={name}\n readOnly={readOnly}\n disabled={disabled}\n maxLength={maxLength}\n className={`input ${customClass}`}\n tabIndex={!readOnly ? 0 : -1}\n placeholder={rest.placeholder}\n data-state-error={hasValidationErrors}\n data-state-read-only={readOnly}\n data-state-text-align={textAlign}\n data-state-skeletonize={skeletonize}\n {...rest} />\n {(hasRightSlotElements && !skeletonize) && rightSlotElements}\n </div>\n <div \n className=\"footer\"\n data-state-has-max-length={hasMaxLengthCondition}\n data-state-has-hint={hasHintMessages && !hintMustBeOnLabel}>\n <Hint\n customClass=\"hint\"\n description={hint}\n disabled={disabled}\n skeletonize={skeletonize}\n visible={!hintMustBeOnLabel && hasHintMessages} />\n {hasMaxLengthCondition && (\n <TextContent ref={counterRef} as=\"span\" className=\"max-length-counter\">\n 0/\n {_.toNumber(maxLength)}\n </TextContent>\n )}\n </div>\n {hasValidationErrors && (\n <span\n className=\"error\"\n data-state-skeletonize={skeletonize}\n aria-describedby={String(name).concat('-errors')}>\n {errors?.map((error, index) => (\n <React.Fragment key={`${index + 1}-${error}`}>\n {error}\n {' '}\n </React.Fragment>\n ))}\n </span>\n )}\n </div>\n <Tooltip\n targetRef={inputRef}\n text={tooltip}\n width={tooltipWidth}\n position={tooltipPosition} />\n </React.Fragment>\n );\n });\n\nInputBase.displayName = 'TextAreaFieldInputBase';\n"],"names":["InputBase","React","forwardRef","props","ref","$","_c","children","disabled","errors","hint","label","name","readOnly","rest","t0","t1","t10","t2","t3","t4","t5","t6","t7","t8","t9","tooltip","tooltipPosition","tooltipWidth","maxLength","customClass","customClassLabel","customClassWrapper","customClassInputContainer","textAlign","labelUppercase","skeletonize","hintPosition","themePopover","popoverAlign","undefined","inputRef","useRef","counterRef","textAreaInternalRef","t11","_","isEmpty","hasLabel","hasHintMessages","Boolean","length","hintMustBeOnLabel","hasValidationErrors","hasMaxLengthCondition","t12","left","right","Children","map","childElement","index","isValidElement","clonedChild","cloneElement","key","type","LeftSlot","push","RightSlot","leftSlotElements","rightSlotElements","hasLeftSlotElements","hasRightSlotElements","t13","event","currentLength","target","value","current","textContent","style","width","toNumber","toString","handleOnInputData","t14","addEventListener","removeEventListener","t15","Symbol","for","useEffect","t16","t17","required","jsx","Popover","PopoverText","t18","t19","t20","mergeRefs","t21","t22","t23","placeholder","t24","t25","jsxs","t26","t27","t28","Hint","t29","TextContent","t30","t31","String","concat","_temp","t32","t33","Tooltip","t34","displayName","error","index_0"],"mappings":";;;;;;;;;;;;AAiCO,MAAMA,KACXC,EAAMC,WAA6D,CAAAC,GAAAC,MAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,EAAA;AAAA,MAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC;AAAA,EAAAvB,SAAAF,KACjE;AAAA,IAAAS,MAAAA;AAAAA,IAAAD,OAAAA;AAAAA,IAAAF,QAAAA;AAAAA,IAAAF,UAAAA;AAAAA,IAAAsB,WAAAd;AAAAA,IAAAe,aAAAd;AAAAA,IAAAe,kBAAAb;AAAAA,IAAAc,oBAAAb;AAAAA,IAAAc,2BAAAb;AAAAA,IAAAc,WAAAb;AAAAA,IAAAc,gBAAAb;AAAAA,IAAAc,aAAAb;AAAAA,IAAAc,cAAAb;AAAAA,IAAAc,cAAAb;AAAAA,IAAAc,cAAAtB;AAAAA,IAAAS,SAAAA;AAAAA,IAAAC,iBAAAA;AAAAA,IAAAC,cAAAA;AAAAA,IAAAlB,MAAAA;AAAAA,IAAAF,UAAAA;AAAAA,IAAAK,UAAAA;AAAAA,IAAA,GAAAC;AAAAA,EAAAA,IAKIX,GAAME,OAAAF,GAAAE,OAAAE,GAAAF,OAAAG,GAAAH,OAAAI,GAAAJ,OAAAK,GAAAL,OAAAM,GAAAN,OAAAO,GAAAP,OAAAQ,GAAAR,OAAAS,GAAAT,OAAAU,GAAAV,QAAAW,GAAAX,QAAAY,GAAAZ,QAAAa,GAAAb,QAAAc,GAAAd,QAAAe,GAAAf,QAAAgB,GAAAhB,QAAAiB,GAAAjB,QAAAkB,GAAAlB,QAAAmB,GAAAnB,QAAAoB,GAAApB,QA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AA,IACM,WAAAoD,IACOxC,oBAAAA,GACjByC,UAAAA;AAAAA,IAAAA;AAAAA,IAyBDc;AAAAA,IAoBAQ;AAAAA,IAiBCC;AAAAA,EAAAA,GAaH,GAAMhH,QAAAgD,GAAAhD,QAAAwF,IAAAxF,QAAAyF,GAAAzF,QAAAuG,GAAAvG,QAAA+G,GAAA/G,QAAAgH,GAAAhH,QAAAoH,KAAAA,IAAApH,EAAA,EAAA;AAAA,MAAAqH;AAAA,EAAArH,EAAA,EAAA,MAAAqB,KAAArB,UAAAsB,KAAAtB,EAAA,EAAA,MAAAuB,KACN8F,IAAA,gBAAA1B,EAAC2B,MACYlF,WAAAA,IACLf,MAAAA,GACCE,OAAAA,GACGD,UAAAA,EAAAA,CAAe,GAAItB,QAAAqB,GAAArB,QAAAsB,GAAAtB,QAAAuB,GAAAvB,QAAAqH,KAAAA,IAAArH,EAAA,EAAA;AAAA,MAAAuH;AAAA,SAAAvH,EAAA,EAAA,MAAAoH,KAAApH,UAAAqH,KArFjCE,oCACEH,UAAAA;AAAAA,IAAAA;AAAAA,IAgFAC;AAAAA,EAAAA,GAKF,GAAiBrH,QAAAoH,GAAApH,QAAAqH,GAAArH,QAAAuH,KAAAA,IAAAvH,EAAA,EAAA,GAtFjBuH;AAsFiB,CAEpB;AAEH5H,GAAU6H,cAAc;AArJ6C,SAAAL,GAAAM,GAAAC,GAAA;AAAA,SAoIvD,gBAAAlB,gBACGiB,UAAAA;AAAAA,IAAAA;AAAAA,IACA;AAAA,EAAA,EAAA,GAFkB,GAAGjE,IAAQ,CAAC,IAAIiE,CAAK,EAG1C;AAAiB;"}
|
|
@@ -1,30 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { TextAlign } from '../../@types/Align';
|
|
4
|
-
import { ColorTheme } from '../../@types/ColorStyles';
|
|
5
|
-
import { Position, HintPosition } from '../../@types/Position';
|
|
1
|
+
import { default as React } from 'react';
|
|
6
2
|
import { OnDenied, PermissionAttr } from '../../@types/PermissionAttr';
|
|
7
3
|
import { LeftSlot, RightSlot } from '../slot';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
label?: string;
|
|
11
|
-
errors?: string[];
|
|
4
|
+
import { TextAreaFieldInputBaseProps } from './base';
|
|
5
|
+
interface TextAreaFieldInputProps extends TextAreaFieldInputBaseProps {
|
|
12
6
|
gridLayout?: string;
|
|
13
|
-
customClass?: string;
|
|
14
|
-
customClassLabel?: string;
|
|
15
|
-
customClassWrapper?: string;
|
|
16
|
-
customClassInputContainer?: string;
|
|
17
|
-
rounded?: boolean;
|
|
18
|
-
readOnly?: boolean;
|
|
19
|
-
skeletonize?: boolean;
|
|
20
|
-
labelUppercase?: boolean;
|
|
21
|
-
textAlign?: TextAlign;
|
|
22
|
-
hintPosition?: HintPosition;
|
|
23
|
-
themePopover?: ColorTheme;
|
|
24
|
-
popoverAlign?: Extract<Position, 'left' | 'right'>;
|
|
25
7
|
permissionAttr?: PermissionAttr;
|
|
26
8
|
onDeniedActions?: OnDenied;
|
|
27
9
|
}
|
|
28
|
-
declare const Input:
|
|
10
|
+
declare const Input: React.ForwardRefExoticComponent<TextAreaFieldInputProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
29
11
|
export { Input, LeftSlot, RightSlot };
|
|
30
12
|
export type { TextAreaFieldInputProps };
|
|
@@ -1,136 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import { c as N } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import '../../assets/styles/textfield.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
gridLayout: k,
|
|
36
|
-
themePopover: z,
|
|
37
|
-
popoverAlign: _,
|
|
38
|
-
tooltip: p,
|
|
39
|
-
tooltipPosition: g,
|
|
40
|
-
tooltipWidth: b,
|
|
41
|
-
hint: i,
|
|
42
|
-
...h
|
|
43
|
-
} = l, t[0] = l, t[1] = u, t[2] = d, t[3] = i, t[4] = m, t[5] = o, t[6] = h, t[7] = P, t[8] = B, t[9] = D, t[10] = k, t[11] = z, t[12] = _, t[13] = T, t[14] = q, t[15] = w, t[16] = F, t[17] = M, t[18] = W, t[19] = j, t[20] = H, t[21] = p, t[22] = g, t[23] = b) : (u = t[1], d = t[2], i = t[3], m = t[4], o = t[5], h = t[6], P = t[7], B = t[8], D = t[9], k = t[10], z = t[11], _ = t[12], T = t[13], q = t[14], w = t[15], F = t[16], M = t[17], W = t[18], j = t[19], H = t[20], p = t[21], g = t[22], b = t[23]);
|
|
44
|
-
const s = P === void 0 ? void 0 : P, lt = B === void 0 ? void 0 : B, ot = T === void 0 ? void 0 : T, $t = q === void 0 ? "" : q, nt = w === void 0 ? "" : w, It = F === void 0 ? "" : F, Pt = M === void 0 ? "" : M, st = W === void 0 ? "left" : W, it = j === void 0 ? !1 : j, e = H === void 0 ? !1 : H, U = D === void 0 ? "below" : D, at = k === void 0 ? void 0 : k, rt = z === void 0 ? "light" : z, ct = _ === void 0 ? "left" : _;
|
|
45
|
-
let G;
|
|
46
|
-
t[24] !== lt || t[25] !== ot ? (G = lt || Vt(Qt, ot), t[24] = lt, t[25] = ot, t[26] = G) : G = t[26];
|
|
47
|
-
const dt = G, {
|
|
48
|
-
hideContent: Bt,
|
|
49
|
-
unvisible: Dt
|
|
50
|
-
} = dt, Nt = yt(null), V = yt(null), mt = yt(null);
|
|
51
|
-
let J;
|
|
52
|
-
t[27] !== l.label ? (J = Lt.isEmpty(l?.label), t[27] = l.label, t[28] = J) : J = t[28];
|
|
53
|
-
const ht = !J, r = !!(l.readOnly || dt.readOnly), n = !!(l.disabled || dt.disabled), Et = !!l.hint?.length, Rt = U === "onLabelRight", a = !!d?.length, v = !!s;
|
|
54
|
-
let K;
|
|
55
|
-
t[29] !== u || t[30] !== n ? (K = Jt(u, n), t[29] = u, t[30] = n, t[31] = K) : K = t[31];
|
|
56
|
-
const {
|
|
57
|
-
leftSlotElements: Ot,
|
|
58
|
-
rightSlotElements: St
|
|
59
|
-
} = K, kt = !!Ot?.length, zt = !!St?.length;
|
|
60
|
-
let Q;
|
|
61
|
-
t[32] !== s ? (Q = (_t) => {
|
|
62
|
-
const Tt = _t.target.value.length;
|
|
63
|
-
V.current && (V.current.textContent = `${Tt}/${s}`, V.current.style.width = `${Lt.toNumber(s?.toString().length) * 7 * 2 + 6}px`);
|
|
64
|
-
}, t[32] = s, t[33] = Q) : Q = t[33];
|
|
65
|
-
const X = Q;
|
|
66
|
-
let Y;
|
|
67
|
-
t[34] !== X ? (Y = () => (mt?.current?.addEventListener("input", X), () => {
|
|
68
|
-
mt?.current?.removeEventListener("input", X);
|
|
69
|
-
}), t[34] = X, t[35] = Y) : Y = t[35];
|
|
70
|
-
let Z;
|
|
71
|
-
if (t[36] === Symbol.for("react.memo_cache_sentinel") ? (Z = [], t[36] = Z) : Z = t[36], Ft(Y, Z), Dt || Bt)
|
|
4
|
+
import B from "react";
|
|
5
|
+
import C from "../../gridlayout/GridCol.js";
|
|
6
|
+
import { actionsOnPermissionDenied as E, OPTIONS_ON_DENIED as u } from "../../permissionValidations.js";
|
|
7
|
+
import { LeftSlot as k, RightSlot as q } from "../slot/index.js";
|
|
8
|
+
import { InputBase as I } from "./base.js";
|
|
9
|
+
const P = [u.disabled, u.unvisible, u.readOnly, u.hideContent], S = B.forwardRef((O, o) => {
|
|
10
|
+
const e = N.c(23);
|
|
11
|
+
let d, t, i, p, l, r;
|
|
12
|
+
e[0] !== O ? ({
|
|
13
|
+
readOnly: p,
|
|
14
|
+
disabled: d,
|
|
15
|
+
onDeniedActions: l,
|
|
16
|
+
permissionAttr: r,
|
|
17
|
+
gridLayout: t,
|
|
18
|
+
...i
|
|
19
|
+
} = O, e[0] = O, e[1] = d, e[2] = t, e[3] = i, e[4] = p, e[5] = l, e[6] = r) : (d = e[1], t = e[2], i = e[3], p = e[4], l = e[5], r = e[6]);
|
|
20
|
+
const b = l === void 0 ? void 0 : l, y = r === void 0 ? void 0 : r;
|
|
21
|
+
let a;
|
|
22
|
+
e[7] !== b || e[8] !== y ? (a = b || E(P, y), e[7] = b, e[8] = y, e[9] = a) : a = e[9];
|
|
23
|
+
const D = a, {
|
|
24
|
+
hideContent: R,
|
|
25
|
+
unvisible: h
|
|
26
|
+
} = D, v = !!(p || D.readOnly), x = !!(d || D.disabled);
|
|
27
|
+
let m;
|
|
28
|
+
e[10] !== x || e[11] !== v || e[12] !== i ? (m = {
|
|
29
|
+
readOnly: v,
|
|
30
|
+
disabled: x,
|
|
31
|
+
...i
|
|
32
|
+
}, e[10] = x, e[11] = v, e[12] = i, e[13] = m) : m = e[13];
|
|
33
|
+
const n = m;
|
|
34
|
+
if (h || R)
|
|
72
35
|
return null;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
t[51] !== I ? (C = Ut(I, mt), t[51] = I, t[52] = C) : C = t[52];
|
|
82
|
-
const gt = `input ${$t}`, bt = r ? -1 : 0;
|
|
83
|
-
let L;
|
|
84
|
-
t[53] !== a || t[54] !== n || t[55] !== r || t[56] !== s || t[57] !== o || t[58] !== h || t[59] !== e || t[60] !== C || t[61] !== gt || t[62] !== bt || t[63] !== st ? (L = /* @__PURE__ */ c("textarea", { ref: C, id: o, readOnly: r, disabled: n, maxLength: s, className: gt, tabIndex: bt, placeholder: h.placeholder, "data-state-error": a, "data-state-read-only": r, "data-state-text-align": st, "data-state-skeletonize": e, ...h }), t[53] = a, t[54] = n, t[55] = r, t[56] = s, t[57] = o, t[58] = h, t[59] = e, t[60] = C, t[61] = gt, t[62] = bt, t[63] = st, t[64] = L) : L = t[64];
|
|
85
|
-
const vt = zt && !e && St;
|
|
86
|
-
let y;
|
|
87
|
-
t[65] !== e || t[66] !== ut || t[67] !== pt || t[68] !== L || t[69] !== vt ? (y = /* @__PURE__ */ f("div", { "data-state-skeletonize": e, className: ut, children: [
|
|
88
|
-
pt,
|
|
89
|
-
L,
|
|
90
|
-
vt
|
|
91
|
-
] }), t[65] = e, t[66] = ut, t[67] = pt, t[68] = L, t[69] = vt, t[70] = y) : y = t[70];
|
|
92
|
-
const xt = Et && !Rt, Ct = !Rt && Et;
|
|
93
|
-
let N;
|
|
94
|
-
t[71] !== i || t[72] !== n || t[73] !== e || t[74] !== Ct ? (N = /* @__PURE__ */ c(Wt, { customClass: "hint", description: i, disabled: n, skeletonize: e, visible: Ct }), t[71] = i, t[72] = n, t[73] = e, t[74] = Ct, t[75] = N) : N = t[75];
|
|
95
|
-
let E;
|
|
96
|
-
t[76] !== v || t[77] !== s ? (E = v && /* @__PURE__ */ f(Ht, { ref: V, as: "span", className: "max-length-counter", children: [
|
|
97
|
-
"0/",
|
|
98
|
-
Lt.toNumber(s)
|
|
99
|
-
] }), t[76] = v, t[77] = s, t[78] = E) : E = t[78];
|
|
100
|
-
let R;
|
|
101
|
-
t[79] !== v || t[80] !== xt || t[81] !== N || t[82] !== E ? (R = /* @__PURE__ */ f("div", { className: "footer", "data-state-has-max-length": v, "data-state-has-hint": xt, children: [
|
|
102
|
-
N,
|
|
103
|
-
E
|
|
104
|
-
] }), t[79] = v, t[80] = xt, t[81] = N, t[82] = E, t[83] = R) : R = t[83];
|
|
105
|
-
let O;
|
|
106
|
-
t[84] !== d || t[85] !== a || t[86] !== o || t[87] !== e ? (O = a && /* @__PURE__ */ c("span", { className: "error", "data-state-skeletonize": e, "aria-describedby": String(o).concat("-errors"), children: d?.map(Yt) }), t[84] = d, t[85] = a, t[86] = o, t[87] = e, t[88] = O) : O = t[88];
|
|
107
|
-
let S;
|
|
108
|
-
t[89] !== a || t[90] !== ft || t[91] !== x || t[92] !== y || t[93] !== R || t[94] !== O ? (S = /* @__PURE__ */ f("div", { ref: Nt, className: ft, "data-state-error": a, children: [
|
|
109
|
-
x,
|
|
110
|
-
y,
|
|
111
|
-
R,
|
|
112
|
-
O
|
|
113
|
-
] }), t[89] = a, t[90] = ft, t[91] = x, t[92] = y, t[93] = R, t[94] = O, t[95] = S) : S = t[95];
|
|
114
|
-
let A;
|
|
115
|
-
t[96] !== at || t[97] !== S ? (A = /* @__PURE__ */ c(Mt, { cols: at, children: S }), t[96] = at, t[97] = S, t[98] = A) : A = t[98];
|
|
116
|
-
let $;
|
|
117
|
-
t[99] !== p || t[100] !== g || t[101] !== b ? ($ = /* @__PURE__ */ c(jt, { targetRef: Nt, text: p, width: b, position: g }), t[99] = p, t[100] = g, t[101] = b, t[102] = $) : $ = t[102];
|
|
118
|
-
let tt;
|
|
119
|
-
return t[103] !== A || t[104] !== $ ? (tt = /* @__PURE__ */ f(At, { children: [
|
|
120
|
-
A,
|
|
121
|
-
$
|
|
122
|
-
] }), t[103] = A, t[104] = $, t[105] = tt) : tt = t[105], tt;
|
|
36
|
+
if (t) {
|
|
37
|
+
let s;
|
|
38
|
+
e[14] !== n || e[15] !== o ? (s = /* @__PURE__ */ A(I, { ref: o, ...n }), e[14] = n, e[15] = o, e[16] = s) : s = e[16];
|
|
39
|
+
let f;
|
|
40
|
+
return e[17] !== t || e[18] !== s ? (f = /* @__PURE__ */ A(C, { cols: t, children: s }), e[17] = t, e[18] = s, e[19] = f) : f = e[19], f;
|
|
41
|
+
}
|
|
42
|
+
let c;
|
|
43
|
+
return e[20] !== n || e[21] !== o ? (c = /* @__PURE__ */ A(I, { ref: o, ...n }), e[20] = n, e[21] = o, e[22] = c) : c = e[22], c;
|
|
123
44
|
});
|
|
124
|
-
|
|
125
|
-
function Yt(l, I) {
|
|
126
|
-
return /* @__PURE__ */ f(At, { children: [
|
|
127
|
-
l,
|
|
128
|
-
" "
|
|
129
|
-
] }, `${I + 1}-${l}`);
|
|
130
|
-
}
|
|
45
|
+
S.displayName = "TextAreaFieldInput";
|
|
131
46
|
export {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
47
|
+
S as Input,
|
|
48
|
+
k as LeftSlot,
|
|
49
|
+
q as RightSlot
|
|
135
50
|
};
|
|
136
51
|
//# sourceMappingURL=index.js.map
|