@emeraldemperaur/vector-sigma 1.4.2 → 1.4.3
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/index.cjs +202 -172
- package/lib/index.esm.js +202 -172
- package/lib/types/components/avatar/avatar.d.ts +3 -3
- package/lib/types/components/button/button.d.ts +2 -2
- package/lib/types/components/checkbox/checkbox.d.ts +3 -3
- package/lib/types/components/conditional/conditional.d.ts +4 -4
- package/lib/types/components/datepicker/datepicker.d.ts +3 -3
- package/lib/types/components/daterangepicker/daterangepicker.d.ts +2 -2
- package/lib/types/components/datetimepicker/datetimepicker.d.ts +3 -3
- package/lib/types/components/dropdown/dropdown.d.ts +3 -3
- package/lib/types/components/file/file.d.ts +3 -3
- package/lib/types/components/file/filemultiple.d.ts +3 -3
- package/lib/types/components/image/image.d.ts +1 -1
- package/lib/types/components/input/input.d.ts +4 -4
- package/lib/types/components/input/passwordInput.d.ts +1 -1
- package/lib/types/components/input/phoneInput.d.ts +1 -1
- package/lib/types/components/input/uuidInput.d.ts +1 -1
- package/lib/types/components/input/xCreditCardInput.d.ts +1 -1
- package/lib/types/components/inputcurrency/inputcurrency.d.ts +1 -1
- package/lib/types/components/inputcurrency/stockInput.d.ts +1 -1
- package/lib/types/components/radio/radio.d.ts +2 -2
- package/lib/types/components/select/select.d.ts +2 -2
- package/lib/types/components/selectmultiple/selectmultiple.d.ts +2 -2
- package/lib/types/components/slider/range.d.ts +4 -4
- package/lib/types/components/slider/slider.d.ts +2 -2
- package/lib/types/components/toggle/toggle.d.ts +4 -11
- package/lib/types/components/xtitle/xtitle.d.ts +1 -2
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -12094,11 +12094,10 @@ const Column = (_a) => {
|
|
|
12094
12094
|
return "span 12";
|
|
12095
12095
|
return `span ${value}`;
|
|
12096
12096
|
};
|
|
12097
|
-
const
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
initial: baseSize,
|
|
12097
|
+
const spanString = span ? `span ${span}` : (getSpan(xs) || "span 12");
|
|
12098
|
+
const initialGridColumn = newLine ? `1 / ${spanString}` : spanString;
|
|
12099
|
+
return (React__default.createElement(p$8, Object.assign({}, props, { gridColumn: {
|
|
12100
|
+
initial: initialGridColumn,
|
|
12102
12101
|
xs: getSpan(xs),
|
|
12103
12102
|
sm: getSpan(sm),
|
|
12104
12103
|
md: getSpan(md),
|
|
@@ -12148,7 +12147,7 @@ const getStyles$1 = (inputtype, shape, hasError) => {
|
|
|
12148
12147
|
return Object.assign(Object.assign(Object.assign({}, base), { borderRadius }), designStyles);
|
|
12149
12148
|
};
|
|
12150
12149
|
const AvatarInput = (_a) => {
|
|
12151
|
-
var { inputtype = 'avatar-outline', alias,
|
|
12150
|
+
var { inputtype = 'avatar-outline', alias, readonly, width, inputlabel = undefined, placeholder = '', value, shape = 'circle', size = 120, style, accept = 'image/*' } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "inputlabel", "placeholder", "value", "shape", "size", "style", "accept"]);
|
|
12152
12151
|
const [field, meta, helpers] = useField(alias);
|
|
12153
12152
|
const { setTouched } = useFormikContext();
|
|
12154
12153
|
const inputRef = useRef(null);
|
|
@@ -12215,9 +12214,10 @@ const AvatarInput = (_a) => {
|
|
|
12215
12214
|
React__default.createElement(Icon, { name: 'camera', color: "white", width: "16", height: "16" })))) : (React__default.createElement(p$5, { direction: "column", align: "center", justify: "center", height: "100%", width: "100%" },
|
|
12216
12215
|
React__default.createElement(Icon, { name: 'user', width: size * 0.4, height: size * 0.4, color: iconColor, style: { opacity: 0.5 } }),
|
|
12217
12216
|
React__default.createElement(p$d, { size: "1", color: "gray", style: { marginTop: 4, opacity: 0.8 } }, "Upload")))),
|
|
12218
|
-
React__default.createElement("input", { ref: inputRef, id: inputId || alias, name: alias, readOnly:
|
|
12217
|
+
React__default.createElement("input", { ref: inputRef, id: inputId || alias, name: alias, readOnly: readonly, type: "file", accept: accept, onChange: handleFileChange, style: { display: 'none' } }),
|
|
12219
12218
|
React__default.createElement("div", null,
|
|
12220
|
-
|
|
12219
|
+
inputlabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", color: 'gray', highContrast: inputtype !== 'avatar-neumorphic', htmlFor: alias }, inputlabel)),
|
|
12220
|
+
"\u00A0",
|
|
12221
12221
|
props.isHinted ?
|
|
12222
12222
|
React__default.createElement(React__default.Fragment, null,
|
|
12223
12223
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
@@ -12294,7 +12294,7 @@ const formatBytes = (bytes, decimals = 2) => {
|
|
|
12294
12294
|
};
|
|
12295
12295
|
|
|
12296
12296
|
const ButtonInput = (_a) => {
|
|
12297
|
-
var { inputtype = 'button-outline', alias, readOnly, style, width, children } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "style", "width", "children"]);
|
|
12297
|
+
var { inputtype = 'button-outline', type = 'button', inputlabel = undefined, alias, readOnly, style, width, children } = _a, props = __rest$1(_a, ["inputtype", "type", "inputlabel", "alias", "readOnly", "style", "width", "children"]);
|
|
12298
12298
|
const buttonRef = useRef(null);
|
|
12299
12299
|
const [neumorphicVars, setNeumorphicVars] = useState({});
|
|
12300
12300
|
const [bgColor, setBgColor] = useState('#ffffff');
|
|
@@ -12378,9 +12378,10 @@ const ButtonInput = (_a) => {
|
|
|
12378
12378
|
transform: translateY(-2px);
|
|
12379
12379
|
}
|
|
12380
12380
|
` } })),
|
|
12381
|
-
React__default.createElement(o$a, Object.assign({ name: alias, disabled: readOnly, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, ref: buttonRef, onClick: handler }, props, getVariantProps()),
|
|
12381
|
+
React__default.createElement(o$a, Object.assign({ name: alias, disabled: readOnly, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, ref: buttonRef, onClick: handler, type: type }, props, getVariantProps()),
|
|
12382
12382
|
props.icon && (React__default.createElement("span", { style: { display: 'flex', alignItems: 'center' } }, props.icon)),
|
|
12383
12383
|
children),
|
|
12384
|
+
React__default.createElement("br", null),
|
|
12384
12385
|
React__default.createElement("div", null, props.isHinted ?
|
|
12385
12386
|
React__default.createElement(React__default.Fragment, null,
|
|
12386
12387
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
@@ -12389,13 +12390,14 @@ const ButtonInput = (_a) => {
|
|
|
12389
12390
|
};
|
|
12390
12391
|
|
|
12391
12392
|
const CheckboxGroupInput = (_a) => {
|
|
12392
|
-
var { inputtype = 'checkbox-outline', alias,
|
|
12393
|
+
var { inputtype = 'checkbox-outline', alias, readonly, width, placeholder = '', inputlabel = undefined, style, value, inputoptions, direction = 'column', columns, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "placeholder", "inputlabel", "style", "value", "inputoptions", "direction", "columns", "className"]);
|
|
12393
12394
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
12394
12395
|
const [field, meta] = useField(alias);
|
|
12395
12396
|
const currentValues = (Array.isArray(field.value) ? field.value : []);
|
|
12396
12397
|
const hasError = Boolean(meta.touched && meta.error);
|
|
12397
12398
|
const containerRef = useRef(null);
|
|
12398
12399
|
const [neuVars, setNeuVars] = useState({});
|
|
12400
|
+
const errorId = `${alias}-error`;
|
|
12399
12401
|
const handleCheckedChange = (checked, value) => {
|
|
12400
12402
|
let newValues = [...currentValues];
|
|
12401
12403
|
if (checked) {
|
|
@@ -12447,22 +12449,23 @@ const CheckboxGroupInput = (_a) => {
|
|
|
12447
12449
|
gap: '8px',
|
|
12448
12450
|
cursor: 'pointer'
|
|
12449
12451
|
} },
|
|
12450
|
-
React__default.createElement(c$2, { name: alias, id: `${alias}FormInput${inputoption.optionid}`, "aria-describedby": `${alias}InputLabel${inputoption.optionid}`, disabled:
|
|
12452
|
+
React__default.createElement(c$2, { name: alias, id: `${alias}FormInput${inputoption.optionid}`, "aria-describedby": `${alias}InputLabel${inputoption.optionid}`, disabled: readonly, value: inputoption.optionvalue, checked: isChecked, onCheckedChange: (checked) => handleCheckedChange(checked, inputoption.optionvalue), variant: inputtype === 'checkbox-outline' ? 'soft' : 'surface', className: inputtype === 'checkbox-neumorphic' ? 'neu-checkbox' : '', style: Object.assign({}, (inputtype === 'checkbox-outline' ? {
|
|
12451
12453
|
border: isChecked ? '2px solid var(--accent-9)' : '2px solid var(--gray-8)',
|
|
12452
12454
|
backgroundColor: 'transparent'
|
|
12453
12455
|
} : {})) }),
|
|
12454
12456
|
React__default.createElement("span", { style: { userSelect: 'none' } }, inputoption.text)));
|
|
12455
12457
|
})),
|
|
12456
12458
|
React__default.createElement("div", null,
|
|
12457
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
12458
|
-
|
|
12459
|
-
React__default.createElement(React__default.Fragment, null,
|
|
12460
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || "Required field")) : null,
|
|
12459
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
12460
|
+
"\u00A0",
|
|
12461
12461
|
props.isHinted ?
|
|
12462
12462
|
React__default.createElement(React__default.Fragment, null,
|
|
12463
12463
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
12464
12464
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
12465
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
12465
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
12466
|
+
hasError ?
|
|
12467
|
+
React__default.createElement(React__default.Fragment, null,
|
|
12468
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || "Required field")) : null))));
|
|
12466
12469
|
};
|
|
12467
12470
|
|
|
12468
12471
|
const animationStyles = {
|
|
@@ -12493,7 +12496,7 @@ const getDesignStyles = (inputtype, isOpen) => {
|
|
|
12493
12496
|
return Object.assign(Object.assign({}, base), { backgroundColor: 'transparent', border: '1px solid var(--gray-6)', borderLeft: isOpen ? '4px solid var(--accent-9)' : '1px solid var(--gray-6)' });
|
|
12494
12497
|
};
|
|
12495
12498
|
const ConditionalTrigger = (_a) => {
|
|
12496
|
-
var { alias, readOnly, width, placeholder = '', value, inputtype = 'conditionaltoggle-outline', triggerValue = true, inputoptions = [], toggledinputtype = "conditionaltoggle-outline", children, style, className } = _a, props = __rest$1(_a, ["alias", "readOnly", "width", "placeholder", "value", "inputtype", "triggerValue", "inputoptions", "toggledinputtype", "children", "style", "className"]);
|
|
12499
|
+
var { alias, readOnly, width, placeholder = '', value, inputlabel = undefined, inputtype = 'conditionaltoggle-outline', triggerValue = true, inputoptions = [], toggledinputtype = "conditionaltoggle-outline", children, style, className } = _a, props = __rest$1(_a, ["alias", "readOnly", "width", "placeholder", "value", "inputlabel", "inputtype", "triggerValue", "inputoptions", "toggledinputtype", "children", "style", "className"]);
|
|
12497
12500
|
const [field, meta, helpers] = useField(alias);
|
|
12498
12501
|
const { setTouched } = useFormikContext();
|
|
12499
12502
|
const inputId = `${alias}FormInput` || crypto.randomUUID();
|
|
@@ -12510,18 +12513,15 @@ const ConditionalTrigger = (_a) => {
|
|
|
12510
12513
|
switch (true) {
|
|
12511
12514
|
case inputtype.includes('conditionalcheckbox'):
|
|
12512
12515
|
return (React__default.createElement(p$5, { align: "center", gap: "2", style: { cursor: 'pointer' } },
|
|
12513
|
-
React__default.createElement(c$2, { name: alias, disabled: readOnly, checked: field.value === true, onCheckedChange: (checked) => handleChange(!!checked), id: inputId })
|
|
12514
|
-
React__default.createElement(p$d, { as: "label", htmlFor: alias, size: "2", weight: "bold", style: { cursor: 'pointer' } }, props.inputLabel)));
|
|
12516
|
+
React__default.createElement(c$2, { name: alias, disabled: readOnly, checked: field.value === true, onCheckedChange: (checked) => handleChange(!!checked), id: inputId })));
|
|
12515
12517
|
case inputtype.includes('conditionalselect'):
|
|
12516
12518
|
return (React__default.createElement(p$5, { direction: "column", gap: "1", style: { width: '100%' } },
|
|
12517
|
-
React__default.createElement(p$d, { as: "label", size: "2", weight: "bold" }, props.inputLabel),
|
|
12518
12519
|
React__default.createElement(C$1, { name: alias, disabled: readOnly, value: field.value, defaultValue: placeholder || String(value) || "", onValueChange: handleChange },
|
|
12519
12520
|
React__default.createElement(u$1, { id: inputId, variant: isNeumorphic ? 'soft' : 'surface', style: { width: '100%' } }),
|
|
12520
12521
|
React__default.createElement(g, null, inputoptions.map((inputoption) => (React__default.createElement(v, { key: inputoption.optionvalue || crypto.randomUUID(), value: inputoption.optionvalue }, inputoption.text)))))));
|
|
12521
12522
|
case inputtype.includes('conditionaltoggle'):
|
|
12522
12523
|
default:
|
|
12523
12524
|
return (React__default.createElement(p$5, { justify: "between", align: "center", style: { width: '100%' } },
|
|
12524
|
-
React__default.createElement(p$d, { as: "label", size: "2", weight: "bold" }, props.inputLabel),
|
|
12525
12525
|
React__default.createElement(i$1, { id: inputId, name: alias, disabled: readOnly, checked: field.value === true, onCheckedChange: (checked) => handleChange(!!checked), variant: isNeumorphic ? 'soft' : 'surface' })));
|
|
12526
12526
|
}
|
|
12527
12527
|
};
|
|
@@ -12536,16 +12536,17 @@ const ConditionalTrigger = (_a) => {
|
|
|
12536
12536
|
borderTop: isOpen && !isNeumorphic ? '1px dashed var(--gray-6)' : 'none'
|
|
12537
12537
|
} }, children))),
|
|
12538
12538
|
React__default.createElement("div", null,
|
|
12539
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
12540
|
-
|
|
12541
|
-
React__default.createElement(React__default.Fragment, null,
|
|
12542
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, typeof meta.error === 'string' ? React__default.createElement(React__default.Fragment, null, props.errorText || "Required field")
|
|
12543
|
-
: 'Invalid file selection')) : null,
|
|
12539
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias, style: { cursor: 'pointer' } }, inputlabel),
|
|
12540
|
+
"\u00A0",
|
|
12544
12541
|
props.isHinted ?
|
|
12545
12542
|
React__default.createElement(React__default.Fragment, null,
|
|
12546
12543
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
12547
12544
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
12548
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
12545
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
12546
|
+
hasError ?
|
|
12547
|
+
React__default.createElement(React__default.Fragment, null,
|
|
12548
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, typeof meta.error === 'string' ? React__default.createElement(React__default.Fragment, null, props.errorText || "Required field")
|
|
12549
|
+
: 'Invalid file selection')) : null))));
|
|
12549
12550
|
};
|
|
12550
12551
|
|
|
12551
12552
|
/**
|
|
@@ -20824,7 +20825,7 @@ const ensureDate = (date) => {
|
|
|
20824
20825
|
};
|
|
20825
20826
|
|
|
20826
20827
|
const DatePicker = (_a) => {
|
|
20827
|
-
var { inputtype = 'datepicker-outline', alias,
|
|
20828
|
+
var { inputtype = 'datepicker-outline', alias, readonly, width, inputlabel = undefined, placeholder = 'Pick a date', minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "inputlabel", "placeholder", "minvalue", "maxvalue", "className", "style"]);
|
|
20828
20829
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
20829
20830
|
const [field, meta] = useField(alias);
|
|
20830
20831
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -20928,20 +20929,21 @@ const DatePicker = (_a) => {
|
|
|
20928
20929
|
}
|
|
20929
20930
|
} })))),
|
|
20930
20931
|
React__default.createElement("div", null,
|
|
20931
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
20932
|
-
|
|
20933
|
-
React__default.createElement(React__default.Fragment, null,
|
|
20934
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || "Required field")) : null,
|
|
20932
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
20933
|
+
"\u00A0",
|
|
20935
20934
|
props.isHinted ?
|
|
20936
20935
|
React__default.createElement(React__default.Fragment, null,
|
|
20937
20936
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
20938
20937
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
20939
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
20938
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
20939
|
+
hasError ?
|
|
20940
|
+
React__default.createElement(React__default.Fragment, null,
|
|
20941
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || "Required field")) : null))));
|
|
20940
20942
|
};
|
|
20941
20943
|
|
|
20942
20944
|
const DateRangePicker = (_a) => {
|
|
20943
20945
|
var _b, _c;
|
|
20944
|
-
var { inputtype = 'daterangepicker-outline', alias, readOnly, width, placeholder = '', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
20946
|
+
var { inputtype = 'daterangepicker-outline', alias, readOnly, width, inputlabel = undefined, placeholder = '', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputlabel", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
20945
20947
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
20946
20948
|
const [field, meta] = useField(alias);
|
|
20947
20949
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -21034,19 +21036,20 @@ const DateRangePicker = (_a) => {
|
|
|
21034
21036
|
}
|
|
21035
21037
|
} })))),
|
|
21036
21038
|
React__default.createElement("div", null,
|
|
21037
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
21038
|
-
|
|
21039
|
-
React__default.createElement(React__default.Fragment, null,
|
|
21040
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || "Required field")) : null,
|
|
21039
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
21040
|
+
"\u00A0",
|
|
21041
21041
|
props.isHinted ?
|
|
21042
21042
|
React__default.createElement(React__default.Fragment, null,
|
|
21043
21043
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
21044
21044
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
21045
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
21045
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
21046
|
+
hasError ?
|
|
21047
|
+
React__default.createElement(React__default.Fragment, null,
|
|
21048
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || "Required field")) : null))));
|
|
21046
21049
|
};
|
|
21047
21050
|
|
|
21048
21051
|
const DateTimePicker = (_a) => {
|
|
21049
|
-
var { inputtype = 'datetimepicker-outline', alias,
|
|
21052
|
+
var { inputtype = 'datetimepicker-outline', alias, readonly, width, inputlabel = undefined, placeholder = '', value, minvalue, maxvalue, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "inputlabel", "placeholder", "value", "minvalue", "maxvalue", "className", "style"]);
|
|
21050
21053
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
21051
21054
|
const [field, meta] = useField(alias);
|
|
21052
21055
|
const hasError = Boolean(meta.touched && meta.error);
|
|
@@ -21165,24 +21168,26 @@ const DateTimePicker = (_a) => {
|
|
|
21165
21168
|
React__default.createElement("input", { type: "number", className: "time-input", min: "0", max: "59", value: selectedDate ? format$2(selectedDate, 'mm') : '00', onChange: (e) => handleTimeChange('minutes', e.target.value) }),
|
|
21166
21169
|
React__default.createElement(o$a, { size: "1", variant: "soft", onClick: () => setIsOpen(false) }, "Done"))))),
|
|
21167
21170
|
React__default.createElement("div", null,
|
|
21168
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
21169
|
-
|
|
21170
|
-
React__default.createElement(React__default.Fragment, null,
|
|
21171
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || "Required field")) : null,
|
|
21171
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
21172
|
+
"\u00A0",
|
|
21172
21173
|
props.isHinted ?
|
|
21173
21174
|
React__default.createElement(React__default.Fragment, null,
|
|
21174
21175
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
21175
21176
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
21176
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
21177
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
21178
|
+
hasError ?
|
|
21179
|
+
React__default.createElement(React__default.Fragment, null,
|
|
21180
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || "Required field")) : null))));
|
|
21177
21181
|
};
|
|
21178
21182
|
|
|
21179
21183
|
const Dropdown = (_a) => {
|
|
21180
|
-
var { inputtype = 'dropdown-outline', alias,
|
|
21184
|
+
var { inputtype = 'dropdown-outline', alias, readonly, width, inputlabel = undefined, placeholder, value, inputoptions, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "inputlabel", "placeholder", "value", "inputoptions", "style"]);
|
|
21181
21185
|
const triggerRef = useRef(null);
|
|
21182
21186
|
const [neuVars, setNeuVars] = useState({});
|
|
21183
21187
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
21184
21188
|
const [field, meta] = useField(alias);
|
|
21185
21189
|
const hasError = Boolean(meta.touched && meta.error);
|
|
21190
|
+
const errorId = `${alias}-error`;
|
|
21186
21191
|
useEffect(() => {
|
|
21187
21192
|
if (inputtype === 'dropdown-neumorphic' && triggerRef.current) {
|
|
21188
21193
|
const parentBg = getNearestParentBackground(triggerRef.current.parentElement);
|
|
@@ -21196,6 +21201,9 @@ const Dropdown = (_a) => {
|
|
|
21196
21201
|
});
|
|
21197
21202
|
}
|
|
21198
21203
|
}, [inputtype]);
|
|
21204
|
+
const openLink = (inputUrl) => {
|
|
21205
|
+
window.open(inputUrl, '_blank', 'noopener,noreferrer');
|
|
21206
|
+
};
|
|
21199
21207
|
// --- STYLES ---
|
|
21200
21208
|
// MATERIAL
|
|
21201
21209
|
const materialTrigger = {
|
|
@@ -21260,7 +21268,7 @@ const Dropdown = (_a) => {
|
|
|
21260
21268
|
cursor: pointer;
|
|
21261
21269
|
}
|
|
21262
21270
|
` } })),
|
|
21263
|
-
React__default.createElement(C$1, { name: alias, disabled:
|
|
21271
|
+
React__default.createElement(C$1, { name: alias, disabled: readonly, "aria-describedby": `${alias}InputLabel`, defaultValue: props.defaultValue || value, value: field.value, onValueChange: (val) => {
|
|
21264
21272
|
setFieldValue(alias, val);
|
|
21265
21273
|
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
21266
21274
|
}, onOpenChange: (isOpen) => {
|
|
@@ -21271,20 +21279,21 @@ const Dropdown = (_a) => {
|
|
|
21271
21279
|
React__default.createElement(u$1, { id: `${alias}FormInput`, ref: triggerRef, variant: "ghost", placeholder: placeholder, className: `${inputtype === 'dropdown-neumorphic' ? 'neu-select-trigger' : ''} ${props.className || ''}`, style: Object.assign(Object.assign({}, activeTriggerStyle), style) }),
|
|
21272
21280
|
React__default.createElement(g, { position: "popper", sideOffset: 5, style: activeContentStyle }, inputoptions.map((inputoption) => (React__default.createElement(React__default.Fragment, { key: inputoption.optionid || crypto.randomUUID() }, inputoption.optionurl ?
|
|
21273
21281
|
React__default.createElement(v, { id: String(inputoption.optionid) || '', key: inputoption.optionid, value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' },
|
|
21274
|
-
React__default.createElement("a", {
|
|
21282
|
+
React__default.createElement("a", { onClick: () => openLink(inputoption.optionurl || "#"), style: { textDecoration: 'none' } }, inputoption.text))
|
|
21275
21283
|
:
|
|
21276
21284
|
React__default.createElement(React__default.Fragment, null,
|
|
21277
21285
|
React__default.createElement(v, { id: String(inputoption.optionid) || '', key: inputoption.optionid, value: inputoption.optionvalue, className: inputtype === 'dropdown-neumorphic' ? 'neu-select-item' : '' }, inputoption.text))))))),
|
|
21278
21286
|
React__default.createElement("div", null,
|
|
21279
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
21280
|
-
|
|
21281
|
-
React__default.createElement(React__default.Fragment, null,
|
|
21282
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || "Required field")) : null,
|
|
21287
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
21288
|
+
"\u00A0",
|
|
21283
21289
|
props.isHinted ?
|
|
21284
21290
|
React__default.createElement(React__default.Fragment, null,
|
|
21285
21291
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
21286
21292
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
21287
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
21293
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
21294
|
+
hasError ?
|
|
21295
|
+
React__default.createElement(React__default.Fragment, null,
|
|
21296
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || "Required field")) : null)))));
|
|
21288
21297
|
};
|
|
21289
21298
|
|
|
21290
21299
|
const getFileIcon$1 = (type, name) => {
|
|
@@ -21302,7 +21311,7 @@ const getFileIcon$1 = (type, name) => {
|
|
|
21302
21311
|
};
|
|
21303
21312
|
const File$1 = (_a) => {
|
|
21304
21313
|
var _b;
|
|
21305
|
-
var { inputtype = 'fileinput-outline', alias,
|
|
21314
|
+
var { inputtype = 'fileinput-outline', alias, readonly, width, inputlabel = undefined, placeholder = '', preview = false, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "inputlabel", "placeholder", "preview", "className", "style"]);
|
|
21306
21315
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
21307
21316
|
const [field, meta] = useField(alias);
|
|
21308
21317
|
const selectedFile = field.value;
|
|
@@ -21374,7 +21383,7 @@ const File$1 = (_a) => {
|
|
|
21374
21383
|
inputtype === 'fileinput-outline' ? outlineTrigger : materialTrigger;
|
|
21375
21384
|
return (React__default.createElement(Column, { span: width, newLine: props.newRow },
|
|
21376
21385
|
React__default.createElement(p$5, { direction: "column", gap: "2", width: "100%", ref: containerRef, style: style, className: className },
|
|
21377
|
-
React__default.createElement("input", { ref: inputRef, id: inputId, name: alias, readOnly:
|
|
21386
|
+
React__default.createElement("input", { ref: inputRef, id: inputId, name: alias, readOnly: readonly, type: "file", accept: ACCEPTED_FORMATS, onChange: handleFileChange, style: { display: 'none' }, "aria-describedby": hasError ? errorId : undefined }),
|
|
21378
21387
|
React__default.createElement("div", { onClick: () => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, style: activeStyle, onMouseEnter: (e) => {
|
|
21379
21388
|
if (inputtype === 'fileinput-outline')
|
|
21380
21389
|
e.currentTarget.style.borderColor = 'var(--accent-9)';
|
|
@@ -21406,15 +21415,16 @@ const File$1 = (_a) => {
|
|
|
21406
21415
|
React__default.createElement(o$5, { size: "1", variant: "ghost", color: "red", onClick: handleClear, style: { borderRadius: '50%', padding: 4 } },
|
|
21407
21416
|
React__default.createElement(Icon, { name: 'close', width: "16", height: "16" }))))),
|
|
21408
21417
|
React__default.createElement("div", null,
|
|
21409
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
21410
|
-
|
|
21411
|
-
React__default.createElement(React__default.Fragment, null,
|
|
21412
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || "Required field")) : null,
|
|
21418
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
21419
|
+
"\u00A0",
|
|
21413
21420
|
props.isHinted ?
|
|
21414
21421
|
React__default.createElement(React__default.Fragment, null,
|
|
21415
21422
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
21416
21423
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
21417
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
21424
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
21425
|
+
hasError ?
|
|
21426
|
+
React__default.createElement(React__default.Fragment, null,
|
|
21427
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || "Required field")) : null))));
|
|
21418
21428
|
};
|
|
21419
21429
|
|
|
21420
21430
|
const getFileIcon = (fileOrUrl) => {
|
|
@@ -21464,7 +21474,7 @@ const styles = {
|
|
|
21464
21474
|
}
|
|
21465
21475
|
};
|
|
21466
21476
|
const FileMultiple = (_a) => {
|
|
21467
|
-
var { inputtype = 'filemultiple-outline', alias,
|
|
21477
|
+
var { inputtype = 'filemultiple-outline', alias, readonly, width, inputlabel = undefined, placeholder = '', preview = true, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "inputlabel", "placeholder", "preview", "className", "style"]);
|
|
21468
21478
|
const [field, meta] = useField(alias);
|
|
21469
21479
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
21470
21480
|
const inputRef = useRef(null);
|
|
@@ -21529,7 +21539,7 @@ const FileMultiple = (_a) => {
|
|
|
21529
21539
|
? `${currentFiles.length} file${currentFiles.length !== 1 ? 's' : ''} selected`
|
|
21530
21540
|
: "Choose files..."),
|
|
21531
21541
|
React__default.createElement(p$d, { size: "1", color: "gray", style: { opacity: 0.8 } }, "PDF, Images, Office Docs, JSON, ZIP"))),
|
|
21532
|
-
React__default.createElement("input", { id: inputId || alias, ref: inputRef, readOnly:
|
|
21542
|
+
React__default.createElement("input", { id: inputId || alias, ref: inputRef, readOnly: readonly, name: alias, type: "file", multiple: true, accept: ACCEPTED_EXTENSIONS, onChange: handleFileChange, style: { display: 'none' }, "aria-describedby": hasError ? errorId : undefined })),
|
|
21533
21543
|
preview && currentFiles.length > 0 && (React__default.createElement(o$6, { columns: "repeat(auto-fill, minmax(220px, 1fr))", gap: "3", mt: "3" }, currentFiles.map((file, index) => {
|
|
21534
21544
|
// Detect preview URL:
|
|
21535
21545
|
// If string (URL from DB), use urlpath
|
|
@@ -21572,17 +21582,18 @@ const FileMultiple = (_a) => {
|
|
|
21572
21582
|
React__default.createElement(Icon, { name: 'close' })))));
|
|
21573
21583
|
}))),
|
|
21574
21584
|
React__default.createElement("div", null,
|
|
21575
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
21576
|
-
|
|
21577
|
-
React__default.createElement(React__default.Fragment, null,
|
|
21578
|
-
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, typeof meta.error === 'string' ?
|
|
21579
|
-
React__default.createElement(React__default.Fragment, null, props.errorText || "Required field")
|
|
21580
|
-
: 'Invalid file selection')) : null,
|
|
21585
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
21586
|
+
"\u00A0",
|
|
21581
21587
|
props.isHinted ?
|
|
21582
21588
|
React__default.createElement(React__default.Fragment, null,
|
|
21583
21589
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
21584
21590
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
21585
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null
|
|
21591
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null,
|
|
21592
|
+
hasError ?
|
|
21593
|
+
React__default.createElement(React__default.Fragment, null,
|
|
21594
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, typeof meta.error === 'string' ?
|
|
21595
|
+
React__default.createElement(React__default.Fragment, null, props.errorText || "Required field")
|
|
21596
|
+
: 'Invalid file selection')) : null))));
|
|
21586
21597
|
};
|
|
21587
21598
|
|
|
21588
21599
|
var _excluded$6 = ["title"],
|
|
@@ -28876,7 +28887,7 @@ const getStyles = (design, layout) => {
|
|
|
28876
28887
|
}
|
|
28877
28888
|
return Object.assign(Object.assign({ borderRadius }, visualStyles), { position: 'relative', overflow: 'hidden', display: 'block' });
|
|
28878
28889
|
};
|
|
28879
|
-
const
|
|
28890
|
+
const ImageOutput = ({ id, src, alt = "Image", design = 'outline', layout = 'normal', aspectRatio = 16 / 9, height, width = '100%', className, style, onClick, }) => {
|
|
28880
28891
|
const containerStyles = getStyles(design, layout);
|
|
28881
28892
|
const iconColor = design === 'neumorphic' ? '#555' : 'var(--gray-9)';
|
|
28882
28893
|
const content = (React__default.createElement(p$8, { className: className, style: Object.assign(Object.assign(Object.assign({}, containerStyles), { width, height: height || 'auto' }), style), onClick: onClick }, src ? (React__default.createElement("img", { id: String(id), src: src, alt: alt, style: {
|
|
@@ -28901,40 +28912,44 @@ const Image = ({ id, src, alt = "Image", design = 'outline', layout = 'normal',
|
|
|
28901
28912
|
};
|
|
28902
28913
|
|
|
28903
28914
|
const Input$1 = (_a) => {
|
|
28904
|
-
var { alias, inputtype = "text", width,
|
|
28915
|
+
var { alias, inputtype = "text", width, inputlabel = undefined, readonly = false, placeholder = '', className, size = "2", style, inputVariant = 'input-outline' } = _a, props = __rest$1(_a, ["alias", "inputtype", "width", "inputlabel", "readonly", "placeholder", "className", "size", "style", "inputVariant"]);
|
|
28905
28916
|
const [inputField, meta] = useField(alias);
|
|
28906
28917
|
const hasError = Boolean(meta.touched && meta.error);
|
|
28907
28918
|
const variantClass = inputVariant !== 'input-outline' ? `input-${inputVariant}` : '';
|
|
28919
|
+
const errorId = `${alias}-error`;
|
|
28908
28920
|
return (React__default.createElement(Column, { span: width, newLine: props.newRow },
|
|
28909
|
-
React__default.createElement(u, Object.assign({ size: size, type: inputtype, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, readOnly:
|
|
28921
|
+
React__default.createElement(u, Object.assign({ size: size, type: inputtype, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, readOnly: readonly, placeholder: placeholder, color: hasError ? "red" : undefined, className: `${variantClass} ${className || ''}` }, inputField, props, { name: alias })),
|
|
28910
28922
|
React__default.createElement("div", null,
|
|
28911
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
28912
|
-
|
|
28923
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
28924
|
+
"\u00A0",
|
|
28913
28925
|
props.isHinted && (React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
28914
28926
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
28915
|
-
React__default.createElement(QuestionMarkCircledIcon, { height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))
|
|
28927
|
+
React__default.createElement(QuestionMarkCircledIcon, { height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
28928
|
+
hasError && (React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`)))));
|
|
28916
28929
|
};
|
|
28917
28930
|
|
|
28918
28931
|
const PasswordInput = (_a) => {
|
|
28919
|
-
var { alias,
|
|
28932
|
+
var { alias, inputlabel = undefined, width, readonly = false, placeholder = '', inputVariant = 'input-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "inputlabel", "width", "readonly", "placeholder", "inputVariant", "size", "className"]);
|
|
28920
28933
|
const [showPassword, setShowPassword] = useState(false);
|
|
28921
28934
|
const toggleVisibility = () => setShowPassword(!showPassword);
|
|
28922
28935
|
const [field, meta] = useField(alias);
|
|
28923
28936
|
const hasError = Boolean(meta.touched && meta.error);
|
|
28924
28937
|
const variantClass = inputVariant !== 'input-outline' ? `input-${inputVariant}` : '';
|
|
28938
|
+
const errorId = `${alias}-error`;
|
|
28925
28939
|
return (React__default.createElement(Column, { span: width, newLine: props.newRow },
|
|
28926
|
-
React__default.createElement(u, Object.assign({ size: size, type: showPassword ? "text" : "password", id: `${alias}FormInput`, readOnly:
|
|
28940
|
+
React__default.createElement(u, Object.assign({ size: size, type: showPassword ? "text" : "password", id: `${alias}FormInput`, readOnly: readonly, "aria-describedby": `${alias}InputLabel`, placeholder: placeholder, color: hasError ? "red" : undefined, className: `${variantClass} ${className || ''}` }, field, props, { name: alias }),
|
|
28927
28941
|
React__default.createElement(c, null,
|
|
28928
28942
|
React__default.createElement(Icon, { name: "lockclosed", height: "16", width: "16" })),
|
|
28929
28943
|
React__default.createElement(c, null,
|
|
28930
28944
|
React__default.createElement(e, { content: showPassword ? "Hide password" : "Show password" },
|
|
28931
28945
|
React__default.createElement(o$5, { size: "1", variant: "ghost", color: "gray", onClick: toggleVisibility, type: "button", "aria-label": showPassword ? "Hide password" : "Show password" }, showPassword ? (React__default.createElement(Icon, { name: "eyeopen", height: "16", width: "16" })) : (React__default.createElement(Icon, { name: "eyeclosed", height: "16", width: "16" })))))),
|
|
28932
28946
|
React__default.createElement("div", null,
|
|
28933
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
28934
|
-
|
|
28947
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
28948
|
+
"\u00A0",
|
|
28935
28949
|
props.isHinted && (React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
28936
28950
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
28937
|
-
React__default.createElement(QuestionMarkCircledIcon, { height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))
|
|
28951
|
+
React__default.createElement(QuestionMarkCircledIcon, { height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
28952
|
+
hasError && (React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`)))));
|
|
28938
28953
|
};
|
|
28939
28954
|
|
|
28940
28955
|
// This file is a workaround for a bug in web browsers' "native"
|
|
@@ -36476,12 +36491,13 @@ var en = {
|
|
|
36476
36491
|
};
|
|
36477
36492
|
|
|
36478
36493
|
const PhoneInput = (_a) => {
|
|
36479
|
-
var { alias,
|
|
36494
|
+
var { alias, inputlabel = undefined, width, placeholder = "Phone Number", readonly, inputVariant = 'input-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "inputlabel", "width", "placeholder", "readonly", "inputVariant", "size", "className"]);
|
|
36480
36495
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
36481
36496
|
const [field, meta] = useField(alias);
|
|
36482
36497
|
const hasError = Boolean(meta.touched && meta.error);
|
|
36483
36498
|
const [country, setCountry] = useState('US');
|
|
36484
36499
|
const variantClass = inputVariant !== 'input-outline' ? `input-${inputVariant}` : '';
|
|
36500
|
+
const errorId = `${alias}-error`;
|
|
36485
36501
|
return (React__default.createElement(Column, { span: width, newLine: props.newRow },
|
|
36486
36502
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
36487
36503
|
React__default.createElement(u, Object.assign({ size: size, variant: "surface", id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, color: hasError ? "red" : undefined, className: `${variantClass} ${className || ''}` }, props, { name: alias }),
|
|
@@ -36509,7 +36525,7 @@ const PhoneInput = (_a) => {
|
|
|
36509
36525
|
getCountryCallingCode(c),
|
|
36510
36526
|
")"))))))),
|
|
36511
36527
|
React__default.createElement("div", { style: { width: '1px', height: '20px', backgroundColor: 'var(--gray-a4)', alignSelf: 'center' } })),
|
|
36512
|
-
React__default.createElement(PhoneInputInput, { country: country, value: field.value, onChange: (val) => setFieldValue(alias, val), onBlur: () => setFieldTouched(alias, true), placeholder: placeholder, readOnly:
|
|
36528
|
+
React__default.createElement(PhoneInputInput, { country: country, value: field.value, onChange: (val) => setFieldValue(alias, val), onBlur: () => setFieldTouched(alias, true), placeholder: placeholder, readOnly: readonly, style: {
|
|
36513
36529
|
flex: 1,
|
|
36514
36530
|
border: 'none',
|
|
36515
36531
|
outline: 'none',
|
|
@@ -36521,11 +36537,12 @@ const PhoneInput = (_a) => {
|
|
|
36521
36537
|
fontSize: 'var(--font-size-2)'
|
|
36522
36538
|
} })),
|
|
36523
36539
|
React__default.createElement("div", { style: { marginTop: 4, display: 'flex', alignItems: 'center', gap: 6 } },
|
|
36524
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
36525
|
-
|
|
36540
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
36541
|
+
"\u00A0",
|
|
36526
36542
|
props.isHinted && (React__default.createElement(e, { content: props.hintText || "No hint available" },
|
|
36527
36543
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
36528
|
-
React__default.createElement(QuestionMarkCircledIcon, { height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))
|
|
36544
|
+
React__default.createElement(QuestionMarkCircledIcon, { height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
36545
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, props.errorText || `Required field`))))));
|
|
36529
36546
|
};
|
|
36530
36547
|
|
|
36531
36548
|
/** Checks if value is string */
|
|
@@ -40316,7 +40333,7 @@ const parseUuidFormat = (input) => {
|
|
|
40316
40333
|
};
|
|
40317
40334
|
|
|
40318
40335
|
const UUIDInput = (_a) => {
|
|
40319
|
-
var { alias, type, inputLabel, width, delimiter = "-", format = [4, 4, 4, 4], placeholder = '', readOnly = false, inputVariant = 'input-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "type", "inputLabel", "width", "delimiter", "format", "placeholder", "readOnly", "inputVariant", "size", "className"]);
|
|
40336
|
+
var { alias, type, inputLabel = undefined, width, delimiter = "-", format = [4, 4, 4, 4], placeholder = '', readOnly = false, inputVariant = 'input-outline', size = "2", className } = _a, props = __rest$1(_a, ["alias", "type", "inputLabel", "width", "delimiter", "format", "placeholder", "readOnly", "inputVariant", "size", "className"]);
|
|
40320
40337
|
let activeFormat = format;
|
|
40321
40338
|
if (type && type.toLowerCase().startsWith("uuid") && type.length > 4) {
|
|
40322
40339
|
activeFormat = parseUuidFormat(type) || format;
|
|
@@ -40326,6 +40343,7 @@ const UUIDInput = (_a) => {
|
|
|
40326
40343
|
const [field, meta] = useField(alias);
|
|
40327
40344
|
const hasError = Boolean(meta.touched && meta.error);
|
|
40328
40345
|
const [copied, setCopied] = useState(false);
|
|
40346
|
+
const errorId = `${alias}-error`;
|
|
40329
40347
|
const handleCopy = () => {
|
|
40330
40348
|
navigator.clipboard.writeText(field.value || '');
|
|
40331
40349
|
setCopied(true);
|
|
@@ -40335,7 +40353,7 @@ const UUIDInput = (_a) => {
|
|
|
40335
40353
|
return (React__default.createElement(Column, { span: width, newLine: props.newRow },
|
|
40336
40354
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
40337
40355
|
React__default.createElement(u, Object.assign({ size: size, variant: "surface", color: hasError ? 'red' : undefined, className: `${variantClass} ${className || ''}` }, props),
|
|
40338
|
-
React__default.createElement(IMaskInput, { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, readOnly: readOnly, mask: maskPattern, value: field.value
|
|
40356
|
+
React__default.createElement(IMaskInput, { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, readOnly: readOnly, mask: maskPattern, value: field.value, unmask: true, onAccept: (val) => setFieldValue(alias, val), onBlur: () => setFieldTouched(alias, true), placeholder: placeholder, style: {
|
|
40339
40357
|
flex: 1,
|
|
40340
40358
|
border: 'none',
|
|
40341
40359
|
outline: 'none',
|
|
@@ -40353,10 +40371,11 @@ const UUIDInput = (_a) => {
|
|
|
40353
40371
|
React__default.createElement(o$5, { size: "1", variant: "ghost", color: copied ? "green" : "gray", onClick: handleCopy, type: "button", disabled: !field.value }, copied ? React__default.createElement(CheckIcon, null) : React__default.createElement(CopyIcon, null))))),
|
|
40354
40372
|
React__default.createElement("div", null,
|
|
40355
40373
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputLabel),
|
|
40356
|
-
|
|
40374
|
+
"\u00A0",
|
|
40357
40375
|
props.isHinted && (React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
40358
40376
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer" },
|
|
40359
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))
|
|
40377
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
40378
|
+
hasError && (React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`))))));
|
|
40360
40379
|
};
|
|
40361
40380
|
|
|
40362
40381
|
var FaCcVisa = {};
|
|
@@ -41788,13 +41807,14 @@ var cardValidator = /*@__PURE__*/getDefaultExportFromCjs(distExports);
|
|
|
41788
41807
|
|
|
41789
41808
|
const CreditCardInput = (_a) => {
|
|
41790
41809
|
var _b;
|
|
41791
|
-
var { alias,
|
|
41810
|
+
var { alias, inputlabel = undefined, width, placeholder, readonly = false, inputVariant = 'input-outline', className } = _a, props = __rest$1(_a, ["alias", "inputlabel", "width", "placeholder", "readonly", "inputVariant", "className"]);
|
|
41792
41811
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
41793
41812
|
const [field, meta] = useField(alias);
|
|
41794
41813
|
const hasError = Boolean(meta.touched && meta.error);
|
|
41795
|
-
const cardInfo = cardValidator.number(field.value
|
|
41814
|
+
const cardInfo = cardValidator.number(field.value);
|
|
41796
41815
|
const cardType = (_b = cardInfo.card) === null || _b === void 0 ? void 0 : _b.type;
|
|
41797
41816
|
const maskPattern = cardType === 'american-express' ? '0000 000000 00000' : '0000 0000 0000 0000';
|
|
41817
|
+
const errorId = `${alias}-error`;
|
|
41798
41818
|
const getCardIcon = () => {
|
|
41799
41819
|
switch (cardType) {
|
|
41800
41820
|
case 'visa': return React__default.createElement(FaCcVisaExports.FaCcVisa, { color: "#1A1F71", size: "22" });
|
|
@@ -41817,7 +41837,7 @@ const CreditCardInput = (_a) => {
|
|
|
41817
41837
|
paddingRight: '12px',
|
|
41818
41838
|
cursor: 'text'
|
|
41819
41839
|
} },
|
|
41820
|
-
React__default.createElement(IMaskInput, { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, mask: maskPattern, readOnly:
|
|
41840
|
+
React__default.createElement(IMaskInput, { id: `${alias}FormInput`, name: alias, "aria-describedby": `${alias}InputLabel`, mask: maskPattern, readOnly: readonly, value: field.value, unmask: true, onAccept: (val) => setFieldValue(alias, val), onBlur: () => setFieldTouched(alias, true), placeholder: placeholder || '0000 0000 0000 0000', inputMode: "numeric", autoComplete: "cc-number", style: {
|
|
41821
41841
|
flex: 1,
|
|
41822
41842
|
border: 'none',
|
|
41823
41843
|
outline: 'none',
|
|
@@ -41831,11 +41851,12 @@ const CreditCardInput = (_a) => {
|
|
|
41831
41851
|
} }),
|
|
41832
41852
|
React__default.createElement("div", { style: { display: 'flex', alignItems: 'center' } }, getCardIcon())),
|
|
41833
41853
|
React__default.createElement("div", { style: { marginTop: 4, display: 'flex', alignItems: 'center', gap: 6 } },
|
|
41834
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
41835
|
-
|
|
41854
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
41855
|
+
"\u00A0",
|
|
41836
41856
|
props.isHinted && (React__default.createElement(e, { content: props.hintText || "No hint available" },
|
|
41837
41857
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
41838
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))
|
|
41858
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
41859
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, props.errorText || `Required field`))))));
|
|
41839
41860
|
};
|
|
41840
41861
|
|
|
41841
41862
|
const CURRENCIES = {
|
|
@@ -41907,7 +41928,7 @@ const CURRENCIES = {
|
|
|
41907
41928
|
};
|
|
41908
41929
|
|
|
41909
41930
|
const CurrencyInput = (_a) => {
|
|
41910
|
-
var { alias, inputtype = "currency", inputLabel, width, defaultValue, placeholder, readOnly = false, inputVariant = 'input-outline', className } = _a, props = __rest$1(_a, ["alias", "inputtype", "inputLabel", "width", "defaultValue", "placeholder", "readOnly", "inputVariant", "className"]);
|
|
41931
|
+
var { alias, inputtype = "currency", inputLabel = undefined, width, defaultValue, placeholder, readOnly = false, inputVariant = 'input-outline', className } = _a, props = __rest$1(_a, ["alias", "inputtype", "inputLabel", "width", "defaultValue", "placeholder", "readOnly", "inputVariant", "className"]);
|
|
41911
41932
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
41912
41933
|
const [amountField, amountMeta] = useField(alias);
|
|
41913
41934
|
const currencyFieldName = inputtype === "currency" ? "USD" : inputtype;
|
|
@@ -41916,6 +41937,7 @@ const CurrencyInput = (_a) => {
|
|
|
41916
41937
|
const activeCurrency = CURRENCIES[currencyField.value] || CURRENCIES.USD;
|
|
41917
41938
|
const variantClass = inputVariant !== 'input-outline' ? `input-${inputVariant}` : '';
|
|
41918
41939
|
const isOutline = inputVariant === 'input-outline';
|
|
41940
|
+
const errorId = `${alias}-error`;
|
|
41919
41941
|
return (React__default.createElement(Column, { span: width, newLine: props.newRow },
|
|
41920
41942
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
41921
41943
|
React__default.createElement(p$5, { align: "center", className: `rt-TextFieldRoot rt-r-size-2 rt-variant-surface ${variantClass} ${className || ''}`, style: {
|
|
@@ -41965,10 +41987,11 @@ const CurrencyInput = (_a) => {
|
|
|
41965
41987
|
}, inputMode: "decimal", autoComplete: "off" })),
|
|
41966
41988
|
React__default.createElement("div", null,
|
|
41967
41989
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputLabel),
|
|
41968
|
-
|
|
41990
|
+
"\u00A0",
|
|
41969
41991
|
props.isHinted && (React__default.createElement(e, { content: props.hintText || "No hint available" },
|
|
41970
41992
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
41971
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))
|
|
41993
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
41994
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", className: 'core-input-label-error' }, props.errorText || `Required field`))))));
|
|
41972
41995
|
};
|
|
41973
41996
|
|
|
41974
41997
|
var FaChartLine = {};
|
|
@@ -41989,12 +42012,13 @@ function requireFaChartLine () {
|
|
|
41989
42012
|
var FaChartLineExports = /*@__PURE__*/ requireFaChartLine();
|
|
41990
42013
|
|
|
41991
42014
|
const StockInput = (_a) => {
|
|
41992
|
-
var { alias, inputLabel, width, defaultValue, placeholder, readOnly = false, inputVariant = 'input-outline', className } = _a, props = __rest$1(_a, ["alias", "inputLabel", "width", "defaultValue", "placeholder", "readOnly", "inputVariant", "className"]);
|
|
42015
|
+
var { alias, inputLabel = undefined, width, defaultValue, placeholder, readOnly = false, inputVariant = 'input-outline', className } = _a, props = __rest$1(_a, ["alias", "inputLabel", "width", "defaultValue", "placeholder", "readOnly", "inputVariant", "className"]);
|
|
41993
42016
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
41994
42017
|
const [priceField, meta] = useField(alias);
|
|
41995
42018
|
const hasError = Boolean(meta.touched && meta.error);
|
|
41996
42019
|
const variantClass = inputVariant !== 'input-outline' ? `input-${inputVariant}` : '';
|
|
41997
42020
|
const isOutline = inputVariant === 'input-outline';
|
|
42021
|
+
const errorId = `${alias}-error`;
|
|
41998
42022
|
return (React__default.createElement(Column, { span: width, newLine: props.newRow },
|
|
41999
42023
|
React__default.createElement(p$5, { direction: "column", gap: "2", style: { width: '100%' } },
|
|
42000
42024
|
React__default.createElement(p$5, { align: "center", justify: "between", className: `rt-TextFieldRoot rt-r-size-2 rt-variant-surface ${variantClass} ${className || ''}`, style: {
|
|
@@ -42037,19 +42061,21 @@ const StockInput = (_a) => {
|
|
|
42037
42061
|
}, inputMode: "decimal", autoComplete: "off" }))),
|
|
42038
42062
|
React__default.createElement("div", null,
|
|
42039
42063
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputLabel),
|
|
42040
|
-
|
|
42064
|
+
"\u00A0",
|
|
42041
42065
|
props.isHinted && (React__default.createElement(e, { content: props.hintText || "No hint available" },
|
|
42042
42066
|
React__default.createElement("a", { href: props.hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { display: 'flex' } },
|
|
42043
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } }))))
|
|
42067
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
42068
|
+
hasError && (React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`))))));
|
|
42044
42069
|
};
|
|
42045
42070
|
|
|
42046
42071
|
const RadioGroupInput = (_a) => {
|
|
42047
|
-
var { inputtype = 'radio-outline', alias, readOnly, width, placeholder = '', style,
|
|
42072
|
+
var { inputtype = 'radio-outline', alias, readOnly, width, inputLabel = undefined, placeholder = '', style, inputoptions, direction = 'column', columns, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "style", "inputoptions", "direction", "columns", "className"]);
|
|
42048
42073
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
42049
42074
|
const [field, meta] = useField(alias);
|
|
42050
42075
|
const hasError = Boolean(meta.touched && meta.error);
|
|
42051
42076
|
const containerRef = useRef(null);
|
|
42052
42077
|
const [neuVars, setNeuVars] = useState({});
|
|
42078
|
+
const errorId = `${alias}-error`;
|
|
42053
42079
|
useEffect(() => {
|
|
42054
42080
|
if (inputtype === 'radio-neumorphic' && containerRef.current) {
|
|
42055
42081
|
const parentBg = getNearestParentBackground(containerRef.current.parentElement);
|
|
@@ -42112,10 +42138,10 @@ const RadioGroupInput = (_a) => {
|
|
|
42112
42138
|
React__default.createElement("span", { style: { userSelect: 'none' } }, inputoption.text))));
|
|
42113
42139
|
}))),
|
|
42114
42140
|
React__default.createElement("div", null,
|
|
42115
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
42141
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputLabel),
|
|
42116
42142
|
hasError ?
|
|
42117
42143
|
React__default.createElement(React__default.Fragment, null,
|
|
42118
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42144
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42119
42145
|
props.isHinted ?
|
|
42120
42146
|
React__default.createElement(React__default.Fragment, null,
|
|
42121
42147
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
@@ -42124,12 +42150,13 @@ const RadioGroupInput = (_a) => {
|
|
|
42124
42150
|
};
|
|
42125
42151
|
|
|
42126
42152
|
const OptionSelect = (_a) => {
|
|
42127
|
-
var { inputtype = 'select-outline', alias, readOnly, width, placeholder = '', style,
|
|
42153
|
+
var { inputtype = 'select-outline', alias, readOnly, width, inputLabel = undefined, placeholder = '', style, inputoptions, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "style", "inputoptions", "className"]);
|
|
42128
42154
|
const triggerRef = useRef(null);
|
|
42129
42155
|
const [neuVars, setNeuVars] = useState({});
|
|
42130
42156
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
42131
42157
|
const [field, meta] = useField(alias);
|
|
42132
42158
|
const hasError = Boolean(meta.touched && meta.error);
|
|
42159
|
+
const errorId = `${alias}-error`;
|
|
42133
42160
|
useEffect(() => {
|
|
42134
42161
|
if (inputtype === 'select-neumorphic' && triggerRef.current) {
|
|
42135
42162
|
const parentBg = getNearestParentBackground(triggerRef.current.parentElement);
|
|
@@ -42185,7 +42212,7 @@ const OptionSelect = (_a) => {
|
|
|
42185
42212
|
cursor: pointer;
|
|
42186
42213
|
}
|
|
42187
42214
|
` } })),
|
|
42188
|
-
React__default.createElement(C$1, { name: alias, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, defaultValue: props.defaultValue
|
|
42215
|
+
React__default.createElement(C$1, { name: alias, disabled: readOnly, "aria-describedby": `${alias}InputLabel`, defaultValue: props.defaultValue, value: field.value, onValueChange: (val) => {
|
|
42189
42216
|
setFieldValue(alias, val);
|
|
42190
42217
|
setTimeout(() => setFieldTouched(alias, true), 0);
|
|
42191
42218
|
}, onOpenChange: (isOpen) => {
|
|
@@ -42196,10 +42223,10 @@ const OptionSelect = (_a) => {
|
|
|
42196
42223
|
React__default.createElement(u$1, { id: `${alias}FormInput`, ref: triggerRef, variant: "ghost", placeholder: placeholder, className: `${inputtype === 'select-neumorphic' ? 'neu-select-trigger' : ''} ${className || ''}`, style: Object.assign(Object.assign({}, activeTriggerStyle), style) }),
|
|
42197
42224
|
React__default.createElement(g, { position: "popper", sideOffset: 5 }, inputoptions.map((option) => (React__default.createElement(v, { id: String(option.optionid) || '', key: option.optionid, value: option.optionvalue, className: inputtype === 'select-neumorphic' ? 'neu-select-item' : '' }, option.text))))),
|
|
42198
42225
|
React__default.createElement("div", null,
|
|
42199
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
42226
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputLabel),
|
|
42200
42227
|
hasError ?
|
|
42201
42228
|
React__default.createElement(React__default.Fragment, null,
|
|
42202
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42229
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42203
42230
|
props.isHinted ?
|
|
42204
42231
|
React__default.createElement(React__default.Fragment, null,
|
|
42205
42232
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
@@ -42209,7 +42236,7 @@ const OptionSelect = (_a) => {
|
|
|
42209
42236
|
|
|
42210
42237
|
const MultipleSelect = (_a) => {
|
|
42211
42238
|
var _b;
|
|
42212
|
-
var { inputtype = 'multiselect-outline', alias, readOnly, width, placeholder = '', style,
|
|
42239
|
+
var { inputtype = 'multiselect-outline', alias, readOnly, width, inputLabel = undefined, placeholder = '', style, inputoptions, className } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "placeholder", "style", "inputoptions", "className"]);
|
|
42213
42240
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
42214
42241
|
const [field, meta] = useField(alias);
|
|
42215
42242
|
const selectedValues = (Array.isArray(field.value) ? field.value : []);
|
|
@@ -42217,6 +42244,7 @@ const MultipleSelect = (_a) => {
|
|
|
42217
42244
|
const triggerRef = useRef(null);
|
|
42218
42245
|
const [neuVars, setNeuVars] = useState({});
|
|
42219
42246
|
const [isOpen, setIsOpen] = useState(false);
|
|
42247
|
+
const errorId = `${alias}-error`;
|
|
42220
42248
|
const handleToggle = (value) => {
|
|
42221
42249
|
const newValues = selectedValues.includes(value)
|
|
42222
42250
|
? selectedValues.filter((v) => v !== value) // Remove Unselected Values
|
|
@@ -42293,10 +42321,10 @@ const MultipleSelect = (_a) => {
|
|
|
42293
42321
|
React__default.createElement(p$d, { size: "2" }, inputoption.text)));
|
|
42294
42322
|
})))))),
|
|
42295
42323
|
React__default.createElement("div", null,
|
|
42296
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
42324
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputLabel),
|
|
42297
42325
|
hasError ?
|
|
42298
42326
|
React__default.createElement(React__default.Fragment, null,
|
|
42299
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42327
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42300
42328
|
props.isHinted ?
|
|
42301
42329
|
React__default.createElement(React__default.Fragment, null,
|
|
42302
42330
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
@@ -42305,13 +42333,14 @@ const MultipleSelect = (_a) => {
|
|
|
42305
42333
|
};
|
|
42306
42334
|
|
|
42307
42335
|
const SliderInput = (_a) => {
|
|
42308
|
-
var { inputtype = 'slider-outline', alias, readOnly, width, placeholder = '',
|
|
42336
|
+
var { inputtype = 'slider-outline', alias, readOnly, width, placeholder = '', minvalue = 0, maxvalue = 100, stepvalue = 1, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "placeholder", "minvalue", "maxvalue", "stepvalue", "className", "style"]);
|
|
42309
42337
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
42310
42338
|
const [field, meta] = useField(alias);
|
|
42311
42339
|
const fieldValue = Array.isArray(field.value) ? field.value : [field.value || minvalue];
|
|
42312
42340
|
const hasError = Boolean(meta.touched && meta.error);
|
|
42313
42341
|
const containerRef = useRef(null);
|
|
42314
42342
|
const [neuVars, setNeuVars] = useState({});
|
|
42343
|
+
const errorId = `${alias}-error`;
|
|
42315
42344
|
useEffect(() => {
|
|
42316
42345
|
if (inputtype === 'slider-neumorphic' && containerRef.current) {
|
|
42317
42346
|
const parentBg = getNearestParentBackground(containerRef.current.parentElement);
|
|
@@ -42394,7 +42423,7 @@ const SliderInput = (_a) => {
|
|
|
42394
42423
|
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, props.inputLabel),
|
|
42395
42424
|
hasError ?
|
|
42396
42425
|
React__default.createElement(React__default.Fragment, null,
|
|
42397
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42426
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42398
42427
|
props.isHinted ?
|
|
42399
42428
|
React__default.createElement(React__default.Fragment, null,
|
|
42400
42429
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
@@ -42403,7 +42432,7 @@ const SliderInput = (_a) => {
|
|
|
42403
42432
|
};
|
|
42404
42433
|
|
|
42405
42434
|
const RangeSlider = (_a) => {
|
|
42406
|
-
var { inputtype = 'range-outline', alias,
|
|
42435
|
+
var { inputtype = 'range-outline', alias, readonly, width, inputlabel = undefined, placeholder = '', minvalue = 0, maxvalue = 100, stepvalue = 1, minStepsBetweenThumbs = 0, className, style } = _a, props = __rest$1(_a, ["inputtype", "alias", "readonly", "width", "inputlabel", "placeholder", "minvalue", "maxvalue", "stepvalue", "minStepsBetweenThumbs", "className", "style"]);
|
|
42407
42436
|
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
42408
42437
|
const [field, meta] = useField(alias);
|
|
42409
42438
|
// Range Formik Logic
|
|
@@ -42417,6 +42446,7 @@ const RangeSlider = (_a) => {
|
|
|
42417
42446
|
const hasError = Boolean(meta.touched && meta.error);
|
|
42418
42447
|
const containerRef = useRef(null);
|
|
42419
42448
|
const [neuVars, setNeuVars] = useState({});
|
|
42449
|
+
const errorId = `${alias}-error`;
|
|
42420
42450
|
useEffect(() => {
|
|
42421
42451
|
if (inputtype === 'range-neumorphic' && containerRef.current) {
|
|
42422
42452
|
const parentBg = getNearestParentBackground(containerRef.current.parentElement);
|
|
@@ -42462,17 +42492,17 @@ const RangeSlider = (_a) => {
|
|
|
42462
42492
|
background-color: white; border: 2px solid var(--accent-9); box-shadow: none;
|
|
42463
42493
|
}
|
|
42464
42494
|
` } }),
|
|
42465
|
-
React__default.createElement(s, { name: alias, id: `${alias}FormInput`, disabled:
|
|
42495
|
+
React__default.createElement(s, { name: alias, id: `${alias}FormInput`, disabled: readonly, "aria-describedby": `${alias}InputLabel`, min: minvalue, max: maxvalue, step: stepvalue, minStepsBetweenThumbs: minStepsBetweenThumbs, value: fieldValue, onValueChange: (val) => {
|
|
42466
42496
|
// LOGIC SYNOPSIS:
|
|
42467
42497
|
// If Range, set value as array.
|
|
42468
42498
|
// If Slider, set value as first value.
|
|
42469
42499
|
setFieldValue(alias, isRange ? val : val[0]);
|
|
42470
42500
|
}, onValueCommit: () => setFieldTouched(alias, true), className: inputtype === 'range-neumorphic' ? 'neu-slider' : inputtype === 'range-outline' ? 'outline-slider' : '', style: neuVars }),
|
|
42471
42501
|
React__default.createElement("div", null,
|
|
42472
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
42502
|
+
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputlabel),
|
|
42473
42503
|
hasError ?
|
|
42474
42504
|
React__default.createElement(React__default.Fragment, null,
|
|
42475
|
-
React__default.createElement("p", { className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42505
|
+
React__default.createElement("p", { id: errorId, className: 'core-input-label-error' }, props.errorText || `Required field`)) : null,
|
|
42476
42506
|
props.isHinted ?
|
|
42477
42507
|
React__default.createElement(React__default.Fragment, null,
|
|
42478
42508
|
React__default.createElement(e, { content: props.hintText || "No hint available", align: "start", sideOffset: 5, className: "core-input-tooltip" },
|
|
@@ -42481,9 +42511,13 @@ const RangeSlider = (_a) => {
|
|
|
42481
42511
|
};
|
|
42482
42512
|
|
|
42483
42513
|
const Toggle = (_a) => {
|
|
42484
|
-
var { inputtype = 'toggle-outline', alias, readOnly, width,
|
|
42514
|
+
var { inputtype = 'toggle-outline', alias, readOnly, width, inputLabel, style, children, newRow, isHinted, hintText, hintUrl } = _a, props = __rest$1(_a, ["inputtype", "alias", "readOnly", "width", "inputLabel", "style", "children", "newRow", "isHinted", "hintText", "hintUrl"]);
|
|
42515
|
+
const { setFieldValue, setFieldTouched } = useFormikContext();
|
|
42516
|
+
const [field, meta] = useField(alias);
|
|
42517
|
+
const hasError = Boolean(meta.touched && meta.error);
|
|
42485
42518
|
const buttonRef = useRef(null);
|
|
42486
42519
|
const [neumorphicVars, setNeumorphicVars] = useState({});
|
|
42520
|
+
const errorId = `${alias}-error`;
|
|
42487
42521
|
useEffect(() => {
|
|
42488
42522
|
if (inputtype === 'toggle-neumorphic' && buttonRef.current) {
|
|
42489
42523
|
const parentBg = getNearestParentBackground(buttonRef.current.parentElement);
|
|
@@ -42494,12 +42528,11 @@ const Toggle = (_a) => {
|
|
|
42494
42528
|
'--neu-shadow-dark': shadowDark,
|
|
42495
42529
|
'--neu-shadow-light': shadowLight,
|
|
42496
42530
|
'--neu-text': 'var(--gray-12)',
|
|
42497
|
-
'--neu-active-color': 'var(--accent-9)',
|
|
42531
|
+
'--neu-active-color': 'var(--accent-9)',
|
|
42498
42532
|
});
|
|
42499
42533
|
}
|
|
42500
42534
|
}, [inputtype]);
|
|
42501
42535
|
// --- STYLES ---
|
|
42502
|
-
// Material :: Ghost when OFF, Solid Color when ON
|
|
42503
42536
|
const materialStyle = {
|
|
42504
42537
|
textTransform: 'uppercase',
|
|
42505
42538
|
letterSpacing: '0.05em',
|
|
@@ -42507,15 +42540,11 @@ const Toggle = (_a) => {
|
|
|
42507
42540
|
borderRadius: '4px',
|
|
42508
42541
|
transition: 'all 0.2s ease',
|
|
42509
42542
|
};
|
|
42510
|
-
// Outline :: Thin Grey when OFF, Thick Colored Border when ON
|
|
42511
42543
|
const outlineStyle = {
|
|
42512
42544
|
fontWeight: 600,
|
|
42513
42545
|
background: 'transparent',
|
|
42514
42546
|
transition: 'all 0.1s ease',
|
|
42515
42547
|
};
|
|
42516
|
-
// Neumorphic:
|
|
42517
|
-
// OFF = Outset Shadow (Floating)
|
|
42518
|
-
// ON = Inset Shadow (Pressed In)
|
|
42519
42548
|
const neumorphicStyle = {
|
|
42520
42549
|
backgroundColor: 'var(--neu-bg)',
|
|
42521
42550
|
color: 'var(--neu-text)',
|
|
@@ -42524,57 +42553,58 @@ const Toggle = (_a) => {
|
|
|
42524
42553
|
fontWeight: 600,
|
|
42525
42554
|
transition: 'all 0.2s ease-in-out',
|
|
42526
42555
|
};
|
|
42527
|
-
return (React__default.createElement(Column, { span: width, newLine:
|
|
42528
|
-
React__default.createElement(Root$1, { pressed:
|
|
42529
|
-
|
|
42556
|
+
return (React__default.createElement(Column, { span: width, newLine: newRow },
|
|
42557
|
+
React__default.createElement(Root$1, { pressed: field.value, onPressedChange: (val) => {
|
|
42558
|
+
if (!readOnly) {
|
|
42559
|
+
setFieldValue(alias, val);
|
|
42560
|
+
setFieldTouched(alias, true);
|
|
42561
|
+
}
|
|
42562
|
+
}, name: alias, disabled: readOnly, id: `${alias}FormInput`, "aria-describedby": `${alias}InputLabel`, asChild: true },
|
|
42563
|
+
React__default.createElement(o$a, Object.assign({ disabled: readOnly, ref: buttonRef }, props, { className: `design-toggle ${inputtype} ${props.className || ''}`, style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, style), (inputtype === 'toggle' ? materialStyle : {})), (inputtype === 'toggle-material' ? materialStyle : {})), (inputtype === 'toggle-outline' ? outlineStyle : {})), (inputtype === 'toggle-neumorphic' ? Object.assign(Object.assign({}, neumorphicStyle), neumorphicVars) : {})), type: "button" }),
|
|
42530
42564
|
React__default.createElement("style", { dangerouslySetInnerHTML: { __html: `
|
|
42531
|
-
|
|
42532
|
-
|
|
42533
|
-
|
|
42534
|
-
|
|
42535
|
-
|
|
42536
|
-
|
|
42537
|
-
|
|
42538
|
-
|
|
42539
|
-
|
|
42540
|
-
|
|
42565
|
+
/* --- MATERIAL --- */
|
|
42566
|
+
.design-toggle.toggle-material[data-state='on'] {
|
|
42567
|
+
background-color: var(--accent-9);
|
|
42568
|
+
color: white;
|
|
42569
|
+
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
|
42570
|
+
}
|
|
42571
|
+
.design-toggle.toggle-material[data-state='off'] {
|
|
42572
|
+
background-color: var(--gray-3);
|
|
42573
|
+
color: var(--gray-11);
|
|
42574
|
+
}
|
|
42541
42575
|
|
|
42542
|
-
|
|
42543
|
-
|
|
42544
|
-
|
|
42545
|
-
|
|
42546
|
-
|
|
42547
|
-
|
|
42548
|
-
|
|
42549
|
-
|
|
42550
|
-
|
|
42551
|
-
|
|
42576
|
+
/* --- OUTLINE --- */
|
|
42577
|
+
.design-toggle.toggle-outline[data-state='on'] {
|
|
42578
|
+
border: 2px solid var(--accent-9);
|
|
42579
|
+
color: var(--accent-9);
|
|
42580
|
+
background-color: var(--accent-2);
|
|
42581
|
+
}
|
|
42582
|
+
.design-toggle.toggle-outline[data-state='off'] {
|
|
42583
|
+
border: 1px solid var(--gray-7);
|
|
42584
|
+
color: var(--gray-11);
|
|
42585
|
+
}
|
|
42552
42586
|
|
|
42553
|
-
|
|
42554
|
-
|
|
42555
|
-
|
|
42556
|
-
|
|
42557
|
-
|
|
42558
|
-
|
|
42559
|
-
|
|
42560
|
-
|
|
42561
|
-
|
|
42562
|
-
|
|
42563
|
-
|
|
42564
|
-
|
|
42565
|
-
|
|
42566
|
-
|
|
42567
|
-
transform: translateY(-1px);
|
|
42568
|
-
}
|
|
42569
|
-
` } }),
|
|
42587
|
+
/* --- NEUMORPHIC --- */
|
|
42588
|
+
.design-toggle.toggle-neumorphic[data-state='off'] {
|
|
42589
|
+
box-shadow: 6px 6px 12px var(--neu-shadow-dark),
|
|
42590
|
+
-6px -6px 12px var(--neu-shadow-light);
|
|
42591
|
+
}
|
|
42592
|
+
.design-toggle.toggle-neumorphic[data-state='on'] {
|
|
42593
|
+
box-shadow: inset 6px 6px 12px var(--neu-shadow-dark),
|
|
42594
|
+
inset -6px -6px 12px var(--neu-shadow-light);
|
|
42595
|
+
color: var(--neu-active-color);
|
|
42596
|
+
}
|
|
42597
|
+
.design-toggle.toggle-neumorphic:hover {
|
|
42598
|
+
transform: translateY(-1px);
|
|
42599
|
+
}
|
|
42600
|
+
` } }),
|
|
42570
42601
|
children)),
|
|
42571
42602
|
React__default.createElement("div", null,
|
|
42572
|
-
React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias },
|
|
42573
|
-
|
|
42574
|
-
React__default.createElement(
|
|
42575
|
-
React__default.createElement(
|
|
42576
|
-
|
|
42577
|
-
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))) : null)));
|
|
42603
|
+
inputLabel && (React__default.createElement(p$d, { id: `${alias}InputLabel`, as: "label", size: "2", weight: "bold", htmlFor: alias }, inputLabel)),
|
|
42604
|
+
isHinted && (React__default.createElement(e, { content: hintText || "No hint available" },
|
|
42605
|
+
React__default.createElement("a", { href: hintUrl || "", target: "_blank", rel: "noopener noreferrer", style: { marginLeft: 6 } },
|
|
42606
|
+
React__default.createElement(Icon, { name: "questionmarkcircled", height: "16", width: "16", style: { cursor: 'pointer', color: 'gray' } })))),
|
|
42607
|
+
hasError && (React__default.createElement(p$d, { id: errorId, size: "1", color: "red", style: { display: 'block', marginTop: 2 } }, props.errorText || `Required field`)))));
|
|
42578
42608
|
};
|
|
42579
42609
|
|
|
42580
42610
|
const Row = ({ children, className, gap = "4" }) => {
|
|
@@ -47104,4 +47134,4 @@ const xFormSchema = object({
|
|
|
47104
47134
|
model: array(SectionSchema),
|
|
47105
47135
|
});
|
|
47106
47136
|
|
|
47107
|
-
export { AvatarInput, ButtonInput, CURRENCIES, CheckboxGroupInput, Column, ConditionalTrigger, Container, CreditCardInput, CurrencyInput, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File$1 as File, FileMultiple, FlagIcon, Icon,
|
|
47137
|
+
export { AvatarInput, ButtonInput, CURRENCIES, CheckboxGroupInput, Column, ConditionalTrigger, Container, CreditCardInput, CurrencyInput, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File$1 as File, FileMultiple, FlagIcon, Icon, ImageOutput, Input$1 as Input, MultipleSelect, OptionSelect, PasswordInput, PhoneInput, RadioGroupInput, RangeSlider, Row, SectionTitle, SliderInput, StockInput, R as Theme, N as ThemePanel, Toggle, UUIDInput, parseUuidFormat, primeMatrix, vectorSigma, xFormSchema };
|