period-ui 0.1.65 → 0.1.68
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/dist/components/atoms/tool-tip/tool-tip-type.d.ts +2 -1
- package/dist/components/atoms/tool-tip/tool-tip-type.d.ts.map +1 -1
- package/dist/components/atoms/tool-tip/tool-tip-type.js +1 -0
- package/dist/components/atoms/tool-tip/tool-tip-type.js.map +1 -1
- package/dist/components/atoms/tool-tip/tool-tip.d.ts +5 -3
- package/dist/components/atoms/tool-tip/tool-tip.d.ts.map +1 -1
- package/dist/components/atoms/tool-tip/tool-tip.js +7 -5
- package/dist/components/atoms/tool-tip/tool-tip.js.map +1 -1
- package/dist/components/atoms/tool-tip/use-tool-tip.d.ts +12 -1
- package/dist/components/atoms/tool-tip/use-tool-tip.d.ts.map +1 -1
- package/dist/components/atoms/tool-tip/use-tool-tip.js +18 -1
- package/dist/components/atoms/tool-tip/use-tool-tip.js.map +1 -1
- package/dist/components/molecules/form/form-text-field/form-text-field.d.ts.map +1 -1
- package/dist/components/molecules/form/form-text-field/form-text-field.js +1 -1
- package/dist/components/molecules/form/form-text-field/form-text-field.js.map +1 -1
- package/dist/components/molecules/text-field/text-field.d.ts +1 -1
- package/dist/components/molecules/text-field/text-field.d.ts.map +1 -1
- package/dist/components/molecules/text-field/text-field.js +2 -2
- package/dist/components/molecules/text-field/text-field.js.map +1 -1
- package/dist/containers/form-control/components/form-label.d.ts +3 -1
- package/dist/containers/form-control/components/form-label.d.ts.map +1 -1
- package/dist/containers/form-control/components/form-label.js +4 -2
- package/dist/containers/form-control/components/form-label.js.map +1 -1
- package/dist/containers/form-control/form-control-types.d.ts +2 -1
- package/dist/containers/form-control/form-control-types.d.ts.map +1 -1
- package/dist/containers/form-control/form-control-types.js +2 -0
- package/dist/containers/form-control/form-control-types.js.map +1 -1
- package/dist/containers/form-control/form-control.d.ts +3 -2
- package/dist/containers/form-control/form-control.d.ts.map +1 -1
- package/dist/containers/form-control/form-control.js +2 -2
- package/dist/containers/form-control/form-control.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-tip-type.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip-type.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"tool-tip-type.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip-type.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-tip-type.js","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"tool-tip-type.js","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;AACjB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { IconColor, IconSize, IconSymbol, PopOverPosition, ToolTipType } from '../../../components';
|
|
3
|
-
type Props = {
|
|
3
|
+
export type Props = {
|
|
4
4
|
text?: string;
|
|
5
5
|
children?: ReactElement;
|
|
6
6
|
toolTipType?: ToolTipType;
|
|
@@ -14,10 +14,12 @@ type Props = {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
};
|
|
16
16
|
textClassName?: string;
|
|
17
|
+
understoodLabel?: string;
|
|
18
|
+
modalTooltipTitle?: string;
|
|
17
19
|
containerClassName?: string;
|
|
18
20
|
arrowClassName?: string;
|
|
19
21
|
onClick?: () => void;
|
|
20
22
|
};
|
|
21
|
-
export declare function Tooltip({ text, children, iconProps, textClassName, arrowClassName, containerClassName, isMessageShowed, toolTipType, position, onClick, }: Props): JSX.Element;
|
|
22
|
-
export {};
|
|
23
|
+
export declare function Tooltip({ text, children, iconProps, textClassName, arrowClassName, understoodLabel, modalTooltipTitle, containerClassName, isMessageShowed, toolTipType, position, onClick, }: Props): JSX.Element;
|
|
24
|
+
export type { Props as ToolTipProps };
|
|
23
25
|
//# sourceMappingURL=tool-tip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-tip.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,MAAM,OAAO,CAAC;AAC7C,OAAO,EAIL,SAAS,EACT,QAAQ,EACR,UAAU,
|
|
1
|
+
{"version":3,"file":"tool-tip.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,MAAM,OAAO,CAAC;AAC7C,OAAO,EAIL,SAAS,EACT,QAAQ,EACR,UAAU,EAIV,eAAe,EAGf,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAI7B,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,UAAU,CAAC;QAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;QAChB,KAAK,CAAC,EAAE,SAAS,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,eAAsB,EACtB,WAAiC,EACjC,QAAoC,EACpC,OAAkB,GACnB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAwFrB;AAED,YAAY,EAAE,KAAK,IAAI,YAAY,EAAE,CAAC"}
|
|
@@ -5,12 +5,14 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const components_1 = require("../../../components");
|
|
7
7
|
const tailwind_utils_1 = require("../../../utils/tailwind-utils");
|
|
8
|
-
const window_dimensions_utils_1 = require("../../../utils/window-dimensions-utils");
|
|
9
8
|
const use_tool_tip_1 = require("./use-tool-tip");
|
|
10
|
-
function Tooltip({ text, children, iconProps, textClassName, arrowClassName, containerClassName, isMessageShowed = true, toolTipType = components_1.ToolTipType.DEFAULT, position = components_1.PopOverPosition.TOP_RIGHT, onClick = () => { }, }) {
|
|
11
|
-
const { isMessageVisible, openTooltip, closeTooltip } = (0, use_tool_tip_1.useTooltip)();
|
|
12
|
-
const { isMobile } = (0, window_dimensions_utils_1.useWindowDimensions)();
|
|
9
|
+
function Tooltip({ text, children, iconProps, textClassName, arrowClassName, understoodLabel, modalTooltipTitle, containerClassName, isMessageShowed = true, toolTipType = components_1.ToolTipType.DEFAULT, position = components_1.PopOverPosition.TOP_RIGHT, onClick = () => { }, }) {
|
|
13
10
|
const buttonRef = (0, react_1.useRef)(null);
|
|
14
|
-
|
|
11
|
+
const { isMobile, isModalTooltip, isFilledTooltip, isMessageVisible, pointerActionEnabled, openTooltip, closeTooltip, handleOnClick, } = (0, use_tool_tip_1.useTooltip)({
|
|
12
|
+
modalTooltipTitle,
|
|
13
|
+
toolTipType,
|
|
14
|
+
onClick,
|
|
15
|
+
});
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative inline-block", children: [isFilledTooltip ? ((0, jsx_runtime_1.jsx)(components_1.IconButton, { ref: buttonRef, isFocusable: false, isClickable: false, onClick: handleOnClick, onFocus: !isModalTooltip ? openTooltip : undefined, onBlur: !isModalTooltip ? closeTooltip : undefined, variant: components_1.IconButtonVariant.FILLED, onPointerEnter: pointerActionEnabled ? openTooltip : undefined, onPointerLeave: pointerActionEnabled ? closeTooltip : undefined, size: isMobile ? components_1.IconSize.LG : components_1.IconSize.XL, icon: components_1.IconSymbol.ICON_X, ...iconProps, className: (0, tailwind_utils_1.tailwind)('self-center outline-none focus-visible:none m-1', iconProps?.className) })) : ((0, jsx_runtime_1.jsx)("button", { ref: buttonRef, onFocus: !isModalTooltip ? openTooltip : undefined, onBlur: !isModalTooltip ? closeTooltip : undefined, onClick: handleOnClick, onPointerEnter: pointerActionEnabled ? openTooltip : undefined, onPointerLeave: pointerActionEnabled ? closeTooltip : undefined, className: (0, tailwind_utils_1.tailwind)('w-[24px] h-[24px] outline-none inline-flex items-center justify-center'), children: (0, jsx_runtime_1.jsx)(components_1.BilloIcon, { icon: components_1.IconSymbol.INFO_FILLED, color: components_1.IconColor.BLUE_01, size: isMobile ? components_1.IconSize.LG : components_1.IconSize.XL, ...iconProps }) })), isModalTooltip && modalTooltipTitle ? ((0, jsx_runtime_1.jsxs)(components_1.Modal, { title: modalTooltipTitle, variant: components_1.ModalVariant.INFO, isOpen: isMessageVisible && isMessageShowed, onClose: closeTooltip, children: [(0, jsx_runtime_1.jsx)(components_1.Modal.Content, { children: (0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, children: text ?? children }) }), (0, jsx_runtime_1.jsx)(components_1.Modal.Footer, { primaryLabel: understoodLabel, onPrimaryClick: closeTooltip })] })) : ((0, jsx_runtime_1.jsx)(components_1.PopOver, { text: text, position: position, arrowClassName: arrowClassName, textClassName: textClassName, containerClassName: containerClassName, isVisible: isMessageVisible && isMessageShowed, onPointerEnter: !isMobile ? openTooltip : undefined, onPointerLeave: !isMobile ? closeTooltip : undefined, children: children }))] }));
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=tool-tip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-tip.js","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"tool-tip.js","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/tool-tip.tsx"],"names":[],"mappings":";;AAwCA,0BAqGC;;AA7ID,iCAA6C;AAC7C,oDAc6B;AAC7B,kEAAyD;AACzD,iDAA4C;AAuB5C,SAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,GAAG,IAAI,EACtB,WAAW,GAAG,wBAAW,CAAC,OAAO,EACjC,QAAQ,GAAG,4BAAe,CAAC,SAAS,EACpC,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GACZ;IACN,MAAM,SAAS,GAAG,IAAA,cAAM,EAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,EACJ,QAAQ,EACR,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,GACd,GAAG,IAAA,yBAAU,EAAC;QACb,iBAAiB;QACjB,WAAW;QACX,OAAO;KACR,CAAC,CAAC;IAEH,OAAO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
|
isMessageVisible: boolean;
|
|
3
8
|
openTooltip: () => void;
|
|
4
9
|
closeTooltip: () => void;
|
|
10
|
+
handleOnClick: () => void;
|
|
5
11
|
};
|
|
6
|
-
|
|
12
|
+
type Props = {
|
|
13
|
+
toolTipType: ToolTipType;
|
|
14
|
+
modalTooltipTitle?: string;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
};
|
|
17
|
+
export declare function useTooltip({ modalTooltipTitle, toolTipType, onClick }: Props): UseTooltipHook;
|
|
7
18
|
export {};
|
|
8
19
|
//# sourceMappingURL=use-tool-tip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tool-tip.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/use-tool-tip.tsx"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"use-tool-tip.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/use-tool-tip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,KAAK,GAAG,cAAc,CAkC7F"}
|
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTooltip = useTooltip;
|
|
4
|
+
const window_dimensions_utils_1 = require("../../../utils/window-dimensions-utils");
|
|
4
5
|
const react_1 = require("react");
|
|
5
|
-
|
|
6
|
+
const tool_tip_type_1 = require("./tool-tip-type");
|
|
7
|
+
function useTooltip({ modalTooltipTitle, toolTipType, onClick }) {
|
|
8
|
+
const { isMobile } = (0, window_dimensions_utils_1.useWindowDimensions)();
|
|
6
9
|
const [isMessageVisible, setIsMessageVisible] = (0, react_1.useState)(false);
|
|
10
|
+
const isModalTooltip = toolTipType === tool_tip_type_1.ToolTipType.MODAL && !!modalTooltipTitle;
|
|
11
|
+
const isFilledTooltip = toolTipType === tool_tip_type_1.ToolTipType.FILLED;
|
|
12
|
+
const pointerActionEnabled = !isMobile && !isModalTooltip;
|
|
7
13
|
const openTooltip = () => {
|
|
8
14
|
setIsMessageVisible(true);
|
|
9
15
|
};
|
|
10
16
|
const closeTooltip = () => {
|
|
11
17
|
setIsMessageVisible(false);
|
|
12
18
|
};
|
|
19
|
+
function handleOnClick() {
|
|
20
|
+
if (isModalTooltip) {
|
|
21
|
+
openTooltip();
|
|
22
|
+
}
|
|
23
|
+
onClick?.();
|
|
24
|
+
}
|
|
13
25
|
return {
|
|
26
|
+
isMobile,
|
|
27
|
+
isModalTooltip,
|
|
28
|
+
isFilledTooltip,
|
|
29
|
+
pointerActionEnabled,
|
|
14
30
|
isMessageVisible,
|
|
15
31
|
openTooltip,
|
|
16
32
|
closeTooltip,
|
|
33
|
+
handleOnClick,
|
|
17
34
|
};
|
|
18
35
|
}
|
|
19
36
|
//# sourceMappingURL=use-tool-tip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tool-tip.js","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/use-tool-tip.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"use-tool-tip.js","sourceRoot":"","sources":["../../../../src/components/atoms/tool-tip/use-tool-tip.tsx"],"names":[],"mappings":";;AAqBA,gCAkCC;AAvDD,6EAAsE;AACtE,iCAAiC;AACjC,mDAA8C;AAmB9C,SAAgB,UAAU,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAS;IAC3E,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAE3C,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEhE,MAAM,cAAc,GAAG,WAAW,KAAK,2BAAW,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,CAAC;IAChF,MAAM,eAAe,GAAG,WAAW,KAAK,2BAAW,CAAC,MAAM,CAAC;IAC3D,MAAM,oBAAoB,GAAG,CAAC,QAAQ,IAAI,CAAC,cAAc,CAAC;IAE1D,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,SAAS,aAAa;QACpB,IAAI,cAAc,EAAE,CAAC;YACnB,WAAW,EAAE,CAAC;QAChB,CAAC;QACD,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,OAAO;QACL,QAAQ;QACR,cAAc;QACd,eAAe;QACf,oBAAoB;QACpB,gBAAgB;QAChB,WAAW;QACX,YAAY;QACZ,aAAa;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-text-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-text-field/form-text-field.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAe,gBAAgB,
|
|
1
|
+
{"version":3,"file":"form-text-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-text-field/form-text-field.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAe,gBAAgB,EAAkB,MAAM,wBAAwB,CAAC;AAEvF,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAC/C,cAAc,GAAG;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEJ,wBAAgB,aAAa,CAAC,EAAE,oBAAoB,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAkCnF"}
|
|
@@ -15,6 +15,6 @@ function FormTextField({ formControlClassName, ...props }) {
|
|
|
15
15
|
formProps?.setTouched({ ...formProps?.touched, [formName ?? '']: true });
|
|
16
16
|
onBlur?.();
|
|
17
17
|
}
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(containers_1.FormControl, { ...props, errorText: props.errorText || props?.formProps?.errors[props.formName], className: formControlClassName, children: () => ((0, jsx_runtime_1.jsx)(components_1.TextField, { ...props, value: props.value ?? props.formProps?.values[props.formName], onBlur: handleOnBlur, onChange: handleChange })) }));
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(containers_1.FormControl, { ...props, errorText: props.errorText || props?.formProps?.errors[props.formName], className: formControlClassName, inputWidth: props.width ?? props.inputWidth, children: () => ((0, jsx_runtime_1.jsx)(components_1.TextField, { ...props, value: props.value ?? props.formProps?.values[props.formName], onBlur: handleOnBlur, onChange: handleChange })) }));
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=form-text-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-text-field.js","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-text-field/form-text-field.tsx"],"names":[],"mappings":";;AASA,
|
|
1
|
+
{"version":3,"file":"form-text-field.js","sourceRoot":"","sources":["../../../../../src/components/molecules/form/form-text-field/form-text-field.tsx"],"names":[],"mappings":";;AASA,sCAkCC;;AA1CD,uDAAmE;AACnE,uDAAuF;AAOvF,SAAgB,aAAa,CAAC,EAAE,oBAAoB,EAAE,GAAG,KAAK,EAAsB;IAClF,KAAK,UAAU,YAAY,CAAC,KAAoC;QAC9D,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;QAEhD,MAAM,SAAS,EAAE,aAAa,CAAC,QAAS,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QACpE,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED,KAAK,UAAU,YAAY;QACzB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;QAE9C,SAAS,EAAE,UAAU,CAAC,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QACzE,MAAM,EAAE,EAAE,CAAC;IACb,CAAC;IAED,OAAO,CACL,uBAAC,wBAAW,OACN,KAAK,EACT,SAAS,EACP,KAAK,CAAC,SAAS,IAAK,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,QAAS,CAAwB,EAEtF,SAAS,EAAE,oBAAoB,EAC/B,UAAU,EAAG,KAAK,CAAC,KAAwB,IAAI,KAAK,CAAC,UAAU,YAE9D,GAAG,EAAE,CAAC,CACL,uBAAC,sBAAS,OACJ,KAAK,EACT,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,QAAS,CAAC,EAC9D,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,YAAY,GACtB,CACH,GACW,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -13,6 +13,6 @@ export type TextFieldProps = IntrinsicInputFieldProps & {
|
|
|
13
13
|
ref?: RefObject<any>;
|
|
14
14
|
inputForwardedRef?: RefObject<any>;
|
|
15
15
|
};
|
|
16
|
-
export declare function TextField({ isRequired, isDisabled, type, name, value, placeholder, onBlur, onChange, className, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function TextField({ width, isRequired, isDisabled, type, name, value, placeholder, onBlur, onChange, className, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
18
18
|
//# sourceMappingURL=text-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,KAAK,eAAe,GAAG;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,wBAAwB,GAAG,eAAe,GAAG,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEjF,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG;IACtD,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACrB,iBAAiB,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;CACpC,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,UAAU,EACV,UAAU,EACV,IAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,KAAK,eAAe,GAAG;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,wBAAwB,GAAG,eAAe,GAAG,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEjF,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG;IACtD,GAAG,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACrB,iBAAiB,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;CACpC,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,UAAU,EACV,UAAU,EACV,IAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,2CAwBhB"}
|
|
@@ -4,7 +4,7 @@ exports.TextField = TextField;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const tailwind_utils_1 = require("../../../utils/tailwind-utils");
|
|
6
6
|
const components_1 = require("../../../components");
|
|
7
|
-
function TextField({ isRequired, isDisabled, type = 'text', name, value, placeholder, onBlur, onChange, className, }) {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center w-full", children: (0, jsx_runtime_1.jsx)("input", { type: type, required: isRequired, disabled: isDisabled, name: name, value: value, placeholder: placeholder, onBlur: onBlur, onChange: onChange, className: (0, tailwind_utils_1.tailwind)('p-4', 'border border-gray-04', 'rounded-lg bg-white', 'hover:border-blue-02 focus-within:border-blue-01 focus-within:hover:border-blue-01', `${components_1.TextVariant.BODY}`, className) }) }));
|
|
7
|
+
function TextField({ width, isRequired, isDisabled, type = 'text', name, value, placeholder, onBlur, onChange, className, }) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "flex items-center w-full", children: (0, jsx_runtime_1.jsx)("input", { type: type, width: width, required: isRequired, disabled: isDisabled, name: name, value: value, placeholder: placeholder, onBlur: onBlur, onChange: onChange, className: (0, tailwind_utils_1.tailwind)('p-4', 'border border-gray-04', 'rounded-lg bg-white', 'hover:border-blue-02 focus-within:border-blue-01 focus-within:hover:border-blue-01 w-full', `${components_1.TextVariant.BODY}`, className) }) }));
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=text-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":";;AAsBA,
|
|
1
|
+
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../../src/components/molecules/text-field/text-field.tsx"],"names":[],"mappings":";;AAsBA,8BAmCC;;AAvDD,kEAAyD;AACzD,oDAAkD;AAmBlD,SAAgB,SAAS,CAAC,EACxB,KAAK,EACL,UAAU,EACV,UAAU,EACV,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,EACN,QAAQ,EACR,SAAS,GACM;IACf,OAAO,CACL,gCAAK,SAAS,EAAC,0BAA0B,YACvC,kCACE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,IAAA,yBAAQ,EACjB,KAAK,EACL,uBAAuB,EACvB,qBAAqB,EACrB,2FAA2F,EAC3F,GAAG,wBAAW,CAAC,IAAI,EAAE,EACrB,SAAS,CACV,GACD,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { ToolTipProps } from '../../../components';
|
|
1
2
|
type Props = {
|
|
2
3
|
isRequired?: boolean;
|
|
3
4
|
hideRequiredMark?: boolean;
|
|
4
5
|
label: string;
|
|
5
6
|
optionalLabel?: string;
|
|
6
7
|
className?: string;
|
|
8
|
+
toolTipProps?: ToolTipProps;
|
|
7
9
|
};
|
|
8
|
-
export declare function FormLabel({ isRequired, hideRequiredMark, label, className, optionalLabel, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function FormLabel({ isRequired, hideRequiredMark, label, className, optionalLabel, toolTipProps, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export {};
|
|
10
12
|
//# sourceMappingURL=form-label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-label.d.ts","sourceRoot":"","sources":["../../../../src/containers/form-control/components/form-label.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-label.d.ts","sourceRoot":"","sources":["../../../../src/containers/form-control/components/form-label.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,YAAY,EAEb,MAAM,qBAAqB,CAAC;AAG7B,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,UAAiB,EACjB,gBAAwB,EACxB,KAAK,EACL,SAAS,EACT,aAAa,EACb,YAAY,GACb,EAAE,KAAK,2CAiCP"}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FormLabel = FormLabel;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const window_dimensions_utils_1 = require("../../../utils/window-dimensions-utils");
|
|
5
6
|
const components_1 = require("../../../components");
|
|
6
7
|
const tailwind_utils_1 = require("../../../utils/tailwind-utils");
|
|
7
|
-
function FormLabel({ isRequired = true, hideRequiredMark = false, label, className, optionalLabel, }) {
|
|
8
|
-
|
|
8
|
+
function FormLabel({ isRequired = true, hideRequiredMark = false, label, className, optionalLabel, toolTipProps, }) {
|
|
9
|
+
const { isMobile } = (0, window_dimensions_utils_1.useWindowDimensions)();
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(components_1.Text, { className: (0, tailwind_utils_1.tailwind)('flex flex-row items-center', className), children: [!hideRequiredMark && isRequired && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, color: components_1.TextColors.PURPLE, className: "mr-1 inline", children: '*' })), (0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: "inline", children: label }), !hideRequiredMark && !isRequired && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, color: components_1.TextColors.BLACK_02, className: "ml-1 inline", children: optionalLabel })), toolTipProps && ((0, jsx_runtime_1.jsx)("div", { className: "ml-2", children: (0, jsx_runtime_1.jsx)(components_1.Tooltip, { ...toolTipProps, position: toolTipProps.position ?? components_1.PopOverPosition.RIGHT, toolTipType: isMobile ? components_1.ToolTipType.MODAL : toolTipProps.toolTipType }) }))] }));
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=form-label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-label.js","sourceRoot":"","sources":["../../../../src/containers/form-control/components/form-label.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"form-label.js","sourceRoot":"","sources":["../../../../src/containers/form-control/components/form-label.tsx"],"names":[],"mappings":";;AAqBA,8BAwCC;;AA7DD,6EAAsE;AACtE,oDAQ6B;AAC7B,kEAAyD;AAWzD,SAAgB,SAAS,CAAC,EACxB,UAAU,GAAG,IAAI,EACjB,gBAAgB,GAAG,KAAK,EACxB,KAAK,EACL,SAAS,EACT,aAAa,EACb,YAAY,GACN;IACN,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAC3C,OAAO,CACL,wBAAC,iBAAI,IAAC,SAAS,EAAE,IAAA,yBAAQ,EAAC,4BAA4B,EAAE,SAAS,CAAC,aAE/D,CAAC,gBAAgB,IAAI,UAAU,IAAI,CAClC,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,IAAI,EAAE,KAAK,EAAE,uBAAU,CAAC,MAAM,EAAE,SAAS,EAAC,aAAa,YAC/E,GAAG,GACC,CACR,EAGD,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,IAAI,EAAE,SAAS,EAAC,QAAQ,YAChD,KAAK,GACD,EAGN,CAAC,gBAAgB,IAAI,CAAC,UAAU,IAAI,CACnC,uBAAC,iBAAI,IAAC,OAAO,EAAE,wBAAW,CAAC,IAAI,EAAE,KAAK,EAAE,uBAAU,CAAC,QAAQ,EAAE,SAAS,EAAC,aAAa,YACjF,aAAa,GACT,CACR,EACA,YAAY,IAAI,CACf,gCAAK,SAAS,EAAC,MAAM,YACnB,uBAAC,oBAAO,OACF,YAAY,EAChB,QAAQ,EAAE,YAAY,CAAC,QAAQ,IAAI,4BAAe,CAAC,KAAK,EACxD,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,wBAAW,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,GACpE,GACE,CACP,IACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,8 @@ export declare enum FormInputWidth {
|
|
|
3
3
|
TWO_COLUMN = "TWO_COLUMN",
|
|
4
4
|
THREE_COLUMN = "THREE_COLUMN",
|
|
5
5
|
FOUR_COLUMN = "FOUR_COLUMN",
|
|
6
|
-
FIVE_COLUMN = "FIVE_COLUMN"
|
|
6
|
+
FIVE_COLUMN = "FIVE_COLUMN",
|
|
7
|
+
SIX_COLUMN = "SIX_COLUMN"
|
|
7
8
|
}
|
|
8
9
|
export declare const FormInputWidthClassNames: {
|
|
9
10
|
[type in FormInputWidth]: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control-types.d.ts","sourceRoot":"","sources":["../../../src/containers/form-control/form-control-types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;
|
|
1
|
+
{"version":3,"file":"form-control-types.d.ts","sourceRoot":"","sources":["../../../src/containers/form-control/form-control-types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAED,eAAO,MAAM,wBAAwB,EAAE;KACpC,IAAI,IAAI,cAAc,GAAG,MAAM;CAQjC,CAAC"}
|
|
@@ -8,6 +8,7 @@ var FormInputWidth;
|
|
|
8
8
|
FormInputWidth["THREE_COLUMN"] = "THREE_COLUMN";
|
|
9
9
|
FormInputWidth["FOUR_COLUMN"] = "FOUR_COLUMN";
|
|
10
10
|
FormInputWidth["FIVE_COLUMN"] = "FIVE_COLUMN";
|
|
11
|
+
FormInputWidth["SIX_COLUMN"] = "SIX_COLUMN";
|
|
11
12
|
})(FormInputWidth || (exports.FormInputWidth = FormInputWidth = {}));
|
|
12
13
|
exports.FormInputWidthClassNames = {
|
|
13
14
|
[FormInputWidth.ONE_COLUMN]: 'w-24 max-w-24 md:max-w-24',
|
|
@@ -15,5 +16,6 @@ exports.FormInputWidthClassNames = {
|
|
|
15
16
|
[FormInputWidth.THREE_COLUMN]: 'w-[272px] md:w-[320px] max-w-[272px] md:max-w-[320px]',
|
|
16
17
|
[FormInputWidth.FOUR_COLUMN]: 'w-[320px] md:w-[424px] max-w-[320px] md:max-w-[424px]',
|
|
17
18
|
[FormInputWidth.FIVE_COLUMN]: 'w-[320px] md:w-[580px] max-w-[320px] md:max-w-[580px]',
|
|
19
|
+
[FormInputWidth.SIX_COLUMN]: 'w-[320px] md:w-[643px] max-w-[320px] md:max-w-[643px]',
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=form-control-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control-types.js","sourceRoot":"","sources":["../../../src/containers/form-control/form-control-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"form-control-types.js","sourceRoot":"","sources":["../../../src/containers/form-control/form-control-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,2CAAyB,CAAA;IACzB,2CAAyB,CAAA;IACzB,+CAA6B,CAAA;IAC7B,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAC3B,2CAAyB,CAAA;AAC3B,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAEY,QAAA,wBAAwB,GAEjC;IACF,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,2BAA2B;IACxD,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,0CAA0C;IACvE,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,uDAAuD;IACtF,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,uDAAuD;IACrF,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,uDAAuD;IACrF,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,uDAAuD;CACrF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormRenderProps } from '../../';
|
|
2
|
+
import { FormRenderProps, ToolTipProps } from '../../';
|
|
3
3
|
import { FormInputWidth } from './form-control-types';
|
|
4
4
|
type ChildrenRenderProps = {
|
|
5
5
|
isErrorVisible: boolean;
|
|
@@ -17,8 +17,9 @@ type Props = {
|
|
|
17
17
|
inputWidth?: FormInputWidth;
|
|
18
18
|
containerClassName?: string;
|
|
19
19
|
formProps?: FormRenderProps<any>;
|
|
20
|
+
toolTipProps?: ToolTipProps;
|
|
20
21
|
children?: (renderProps: ChildrenRenderProps) => React.ReactElement;
|
|
21
22
|
};
|
|
22
|
-
export declare function FormControl({ isDisabled, isRequired, formName, label, formProps, className, errorText, helperText, optionalLabel, hideRequiredMark, containerClassName, inputWidth, children, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function FormControl({ isDisabled, isRequired, formName, label, formProps, className, errorText, helperText, optionalLabel, toolTipProps, hideRequiredMark, containerClassName, inputWidth, children, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export type { Props as FormControlProps };
|
|
24
25
|
//# sourceMappingURL=form-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../../src/containers/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAc,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../../src/containers/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAc,YAAY,EAAE,MAAM,QAAQ,CAAC;AAKnE,OAAO,EAAE,cAAc,EAA4B,MAAM,sBAAsB,CAAC;AAEhF,KAAK,mBAAmB,GAAG;IACzB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,mBAAmB,KAAK,KAAK,CAAC,YAAY,CAAC;CACrE,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,UAAU,EACV,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,UAAuC,EACvC,QAAQ,GACT,EAAE,KAAK,2CAsCP;AAED,YAAY,EAAE,KAAK,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -8,11 +8,11 @@ const form_error_1 = require("./components/form-error");
|
|
|
8
8
|
const form_helper_1 = require("./components/form-helper");
|
|
9
9
|
const form_label_1 = require("./components/form-label");
|
|
10
10
|
const form_control_types_1 = require("./form-control-types");
|
|
11
|
-
function FormControl({ isDisabled, isRequired, formName, label, formProps, className, errorText, helperText, optionalLabel, hideRequiredMark, containerClassName, inputWidth = form_control_types_1.FormInputWidth.FOUR_COLUMN, children, }) {
|
|
11
|
+
function FormControl({ isDisabled, isRequired, formName, label, formProps, className, errorText, helperText, optionalLabel, toolTipProps, hideRequiredMark, containerClassName, inputWidth = form_control_types_1.FormInputWidth.FOUR_COLUMN, children, }) {
|
|
12
12
|
const widthClassName = form_control_types_1.FormInputWidthClassNames[inputWidth];
|
|
13
13
|
const isTouched = (!formName && !formProps) || formProps?.touched[formName ?? ''];
|
|
14
14
|
const isErrorVisible = errorText && isTouched;
|
|
15
15
|
const isHelperVisible = !isErrorVisible && helperText;
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex flex-col space-y-2 w-full', containerClassName), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex flex-col space-y-2', widthClassName, className), children: [label && ((0, jsx_runtime_1.jsx)(form_label_1.FormLabel, { hideRequiredMark: hideRequiredMark, isRequired: isRequired, label: label, optionalLabel: optionalLabel })), (0, jsx_runtime_1.jsx)("div", { className: (0, tailwind_utils_1.tailwind)(widthClassName), children: children ? children({ isErrorVisible: !!isErrorVisible }) : null })] }), (0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)({ hidden: !isHelperVisible && !isErrorVisible }), children: [isHelperVisible && ((0, jsx_runtime_1.jsx)(form_helper_1.FormHelper, { helperText: helperText, color: isDisabled ? __1.TextColors.BLACK_03 : __1.TextColors.BLACK_02 })), isErrorVisible && (0, jsx_runtime_1.jsx)(form_error_1.FormError, { className: "w-full", errorText: errorText })] })] }));
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex flex-col space-y-2 w-full', containerClassName), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex flex-col space-y-2', widthClassName, className), children: [label && ((0, jsx_runtime_1.jsx)(form_label_1.FormLabel, { toolTipProps: toolTipProps, hideRequiredMark: hideRequiredMark, isRequired: isRequired, label: label, optionalLabel: optionalLabel })), (0, jsx_runtime_1.jsx)("div", { className: (0, tailwind_utils_1.tailwind)(widthClassName), children: children ? children({ isErrorVisible: !!isErrorVisible }) : null })] }), (0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)({ hidden: !isHelperVisible && !isErrorVisible }), children: [isHelperVisible && ((0, jsx_runtime_1.jsx)(form_helper_1.FormHelper, { helperText: helperText, color: isDisabled ? __1.TextColors.BLACK_03 : __1.TextColors.BLACK_02 })), isErrorVisible && (0, jsx_runtime_1.jsx)(form_error_1.FormError, { className: "w-full", errorText: errorText })] })] }));
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=form-control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/containers/form-control/form-control.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/containers/form-control/form-control.tsx"],"names":[],"mappings":";;AA6BA,kCAqDC;;AAjFD,8BAAmE;AACnE,+DAAsD;AACtD,wDAAoD;AACpD,0DAAsD;AACtD,wDAAoD;AACpD,6DAAgF;AAuBhF,SAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,UAAU,EACV,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,GAAG,mCAAc,CAAC,WAAW,EACvC,QAAQ,GACF;IACN,MAAM,cAAc,GAAG,6CAAwB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,6 @@ export { BilloIcon, IconColor, IconSymbol, IconSize, Button, ButtonVariant, Chec
|
|
|
3
3
|
export { Form, Modal, ModalVariant, Select, TextField, FormSelect, FilterModal, FormCheckBox, FormTextField, FormRadioButton, } from './components';
|
|
4
4
|
export { FormControl, FormInputWidth } from './containers';
|
|
5
5
|
export type { FormControlProps } from './containers';
|
|
6
|
-
export type { ButtonProps, ChipProps, CheckboxProps, CheckboxMultiOptions, CheckBoxFilterOptions, DropDownMenuOptionProps, RadioButtonFilterOptions, ModalProps, FilterVariant, FiltersOptions, FilterModalProps, FooterContentProps, ExtendableContentProps, FormErrors, FormConfig, FormHelpers, FormNames, FormRenderProps, FormSchema, TextFieldProps, FormSelectProps, FormTextFieldProps, } from './components';
|
|
6
|
+
export type { ButtonProps, ToolTipProps, ChipProps, CheckboxProps, CheckboxMultiOptions, CheckBoxFilterOptions, DropDownMenuOptionProps, RadioButtonFilterOptions, ModalProps, FilterVariant, FiltersOptions, FilterModalProps, FooterContentProps, ExtendableContentProps, FormErrors, FormConfig, FormHelpers, FormNames, FormRenderProps, FormSchema, TextFieldProps, FormSelectProps, FormTextFieldProps, } from './components';
|
|
7
7
|
export type { MultiOptions } from './types/general';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAGrC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,WAAW,EACX,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACd,aAAa,EACb,SAAS,EACT,OAAO,EACP,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,YAAY,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EAQxB,UAAU,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EAGtB,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,UAAU,EAGV,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAGrC,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,WAAW,EACX,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,OAAO,EACP,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACd,aAAa,EACb,SAAS,EACT,OAAO,EACP,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,YAAY,EACV,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EAQxB,UAAU,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EAGtB,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,eAAe,EACf,UAAU,EAGV,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|