@rolster/react-components 19.7.0 → 19.7.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/dist/cjs/index.cjs +269 -423
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/es/index.mjs +269 -423
- package/dist/es/index.mjs.map +1 -1
- package/dist/esm/components/atoms/Amount/Amount.js +1 -3
- package/dist/esm/components/atoms/Amount/Amount.js.map +1 -1
- package/dist/esm/components/atoms/AreaText/AreaText.js +6 -14
- package/dist/esm/components/atoms/AreaText/AreaText.js.map +1 -1
- package/dist/esm/components/atoms/Avatar/Avatar.d.ts +2 -1
- package/dist/esm/components/atoms/Avatar/Avatar.js +8 -5
- package/dist/esm/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/atoms/Badge/Badge.js +2 -4
- package/dist/esm/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/esm/components/atoms/Breadcrumb/Breadcrumb.js +3 -5
- package/dist/esm/components/atoms/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.js +2 -4
- package/dist/esm/components/atoms/Button/Button.js.map +1 -1
- package/dist/esm/components/atoms/ButtonAction/ButtonAction.d.ts +2 -1
- package/dist/esm/components/atoms/ButtonAction/ButtonAction.js +4 -6
- package/dist/esm/components/atoms/ButtonAction/ButtonAction.js.map +1 -1
- package/dist/esm/components/atoms/ButtonIcon/ButtonIcon.js +2 -4
- package/dist/esm/components/atoms/ButtonIcon/ButtonIcon.js.map +1 -1
- package/dist/esm/components/atoms/ButtonOption/ButtonOption.js +2 -4
- package/dist/esm/components/atoms/ButtonOption/ButtonOption.js.map +1 -1
- package/dist/esm/components/atoms/CheckBox/CheckBox.js +2 -4
- package/dist/esm/components/atoms/CheckBox/CheckBox.js.map +1 -1
- package/dist/esm/components/atoms/Icon/Icon.js +2 -4
- package/dist/esm/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/esm/components/atoms/Image/Image.js +2 -4
- package/dist/esm/components/atoms/Image/Image.js.map +1 -1
- package/dist/esm/components/atoms/Input/Input.js +5 -7
- package/dist/esm/components/atoms/Input/Input.js.map +1 -1
- package/dist/esm/components/atoms/InputCounter/InputCounter.js +5 -7
- package/dist/esm/components/atoms/InputCounter/InputCounter.js.map +1 -1
- package/dist/esm/components/atoms/InputPassword/InputPassword.js +5 -7
- package/dist/esm/components/atoms/InputPassword/InputPassword.js.map +1 -1
- package/dist/esm/components/atoms/InputSearch/InputSearch.js +2 -4
- package/dist/esm/components/atoms/InputSearch/InputSearch.js.map +1 -1
- package/dist/esm/components/atoms/Poster/Poster.js +2 -4
- package/dist/esm/components/atoms/Poster/Poster.js.map +1 -1
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js +2 -4
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/esm/components/atoms/RadioButton/RadioButton.js +2 -4
- package/dist/esm/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/esm/components/atoms/Switch/Switch.js +6 -4
- package/dist/esm/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/esm/components/atoms/TabularText/TabularText.js +1 -3
- package/dist/esm/components/atoms/TabularText/TabularText.js.map +1 -1
- package/dist/esm/components/molecules/Accordion/Accordion.js +2 -4
- package/dist/esm/components/molecules/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/molecules/Alert/Alert.js +2 -4
- package/dist/esm/components/molecules/Alert/Alert.js.map +1 -1
- package/dist/esm/components/molecules/Ballot/Ballot.js +2 -4
- package/dist/esm/components/molecules/Ballot/Ballot.js.map +1 -1
- package/dist/esm/components/molecules/ButtonProgress/ButtonProgress.js +2 -4
- package/dist/esm/components/molecules/ButtonProgress/ButtonProgress.js.map +1 -1
- package/dist/esm/components/molecules/ButtonToggle/ButtonToggle.js +5 -7
- package/dist/esm/components/molecules/ButtonToggle/ButtonToggle.js.map +1 -1
- package/dist/esm/components/molecules/FieldArea/FieldArea.js +6 -8
- package/dist/esm/components/molecules/FieldArea/FieldArea.js.map +1 -1
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.js +6 -8
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.js.map +1 -1
- package/dist/esm/components/molecules/FieldFile/FieldFile.js +2 -2
- package/dist/esm/components/molecules/FieldFile/FieldFile.js.map +1 -1
- package/dist/esm/components/molecules/FieldListSuggestions/FieldListSuggestions.js +5 -7
- package/dist/esm/components/molecules/FieldListSuggestions/FieldListSuggestions.js.map +1 -1
- package/dist/esm/components/molecules/FieldMoney/FieldMoney.js +6 -8
- package/dist/esm/components/molecules/FieldMoney/FieldMoney.js.map +1 -1
- package/dist/esm/components/molecules/FieldNumber/FieldNumber.js +6 -8
- package/dist/esm/components/molecules/FieldNumber/FieldNumber.js.map +1 -1
- package/dist/esm/components/molecules/FieldPassword/FieldPassword.js +6 -8
- package/dist/esm/components/molecules/FieldPassword/FieldPassword.js.map +1 -1
- package/dist/esm/components/molecules/FieldPercentage/FieldPercentage.js +6 -8
- package/dist/esm/components/molecules/FieldPercentage/FieldPercentage.js.map +1 -1
- package/dist/esm/components/molecules/FieldText/FieldText.js +6 -8
- package/dist/esm/components/molecules/FieldText/FieldText.js.map +1 -1
- package/dist/esm/components/molecules/LabelCheckBox/LabelCheckBox.js +6 -8
- package/dist/esm/components/molecules/LabelCheckBox/LabelCheckBox.js.map +1 -1
- package/dist/esm/components/molecules/LabelRadioButton/LabelRadioButton.js +6 -8
- package/dist/esm/components/molecules/LabelRadioButton/LabelRadioButton.js.map +1 -1
- package/dist/esm/components/molecules/LabelSwitch/LabelSwitch.js +6 -8
- package/dist/esm/components/molecules/LabelSwitch/LabelSwitch.js.map +1 -1
- package/dist/esm/components/molecules/MessageEmpty/MessageEmpty.js +1 -3
- package/dist/esm/components/molecules/MessageEmpty/MessageEmpty.js.map +1 -1
- package/dist/esm/components/molecules/Pagination/Pagination.js +4 -2
- package/dist/esm/components/molecules/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/molecules/PickerDay/PickerDay.js +7 -9
- package/dist/esm/components/molecules/PickerDay/PickerDay.js.map +1 -1
- package/dist/esm/components/molecules/PickerDayRange/PickerDayRange.js +7 -9
- package/dist/esm/components/molecules/PickerDayRange/PickerDayRange.js.map +1 -1
- package/dist/esm/components/molecules/PickerMonth/PickerMonth.js +5 -7
- package/dist/esm/components/molecules/PickerMonth/PickerMonth.js.map +1 -1
- package/dist/esm/components/molecules/PickerYear/PickerYear.js +5 -7
- package/dist/esm/components/molecules/PickerYear/PickerYear.js.map +1 -1
- package/dist/esm/components/molecules/Slider/Slider.js +5 -7
- package/dist/esm/components/molecules/Slider/Slider.js.map +1 -1
- package/dist/esm/components/molecules/Tabs/Tabs.js +5 -7
- package/dist/esm/components/molecules/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/organisms/BottomSheet/BottomSheet.js +2 -4
- package/dist/esm/components/organisms/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/esm/components/organisms/Card/Card.js +2 -4
- package/dist/esm/components/organisms/Card/Card.js.map +1 -1
- package/dist/esm/components/organisms/Confirmation/Confirmation.js +3 -5
- package/dist/esm/components/organisms/Confirmation/Confirmation.js.map +1 -1
- package/dist/esm/components/organisms/Datatable/Datatable.js +12 -28
- package/dist/esm/components/organisms/Datatable/Datatable.js.map +1 -1
- package/dist/esm/components/organisms/Dropdown/Dropdown.js +4 -6
- package/dist/esm/components/organisms/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.js +7 -16
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.js.map +1 -1
- package/dist/esm/components/organisms/FieldClock/FieldClock.js +5 -7
- package/dist/esm/components/organisms/FieldClock/FieldClock.js.map +1 -1
- package/dist/esm/components/organisms/FieldColor/FieldColor.js +5 -7
- package/dist/esm/components/organisms/FieldColor/FieldColor.js.map +1 -1
- package/dist/esm/components/organisms/FieldDate/FieldDate.js +8 -10
- package/dist/esm/components/organisms/FieldDate/FieldDate.js.map +1 -1
- package/dist/esm/components/organisms/FieldDateRange/FieldDateRange.js +5 -7
- package/dist/esm/components/organisms/FieldDateRange/FieldDateRange.js.map +1 -1
- package/dist/esm/components/organisms/FieldList/FieldList.js +6 -14
- package/dist/esm/components/organisms/FieldList/FieldList.js.map +1 -1
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.js +6 -14
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.js.map +1 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.js +2 -4
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.js.map +1 -1
- package/dist/esm/components/organisms/Modal/Modal.js +2 -4
- package/dist/esm/components/organisms/Modal/Modal.js.map +1 -1
- package/dist/esm/components/organisms/ModalSheet/ModalSheet.js +2 -4
- package/dist/esm/components/organisms/ModalSheet/ModalSheet.js.map +1 -1
- package/dist/esm/components/organisms/Notifications/Notifications.js +14 -6
- package/dist/esm/components/organisms/Notifications/Notifications.js.map +1 -1
- package/dist/esm/components/organisms/PickerClock/PickerClock.js +13 -21
- package/dist/esm/components/organisms/PickerClock/PickerClock.js.map +1 -1
- package/dist/esm/components/organisms/PickerColor/PickerColor.js +1 -1
- package/dist/esm/components/organisms/PickerColor/PickerColor.js.map +1 -1
- package/dist/esm/components/organisms/PickerDate/PickerDate.js +6 -8
- package/dist/esm/components/organisms/PickerDate/PickerDate.js.map +1 -1
- package/dist/esm/components/organisms/PickerDateRange/PickerDateRange.js +9 -11
- package/dist/esm/components/organisms/PickerDateRange/PickerDateRange.js.map +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.js +2 -4
- package/dist/esm/components/organisms/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/context.js +5 -7
- package/dist/esm/context.js.map +1 -1
- package/dist/esm/helpers/design-system.js +1 -1
- package/dist/esm/helpers/design-system.js.map +1 -1
- package/dist/esm/types.d.ts +2 -2
- package/package.json +4 -4
package/dist/cjs/index.cjs
CHANGED
|
@@ -454,17 +454,13 @@ function RlsTabularTextComponent({ className, value }) {
|
|
|
454
454
|
const codes = require$$0.useMemo(() => {
|
|
455
455
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: value?.split('').map((char, index) => (jsxRuntimeExports.jsx("span", { className: getCharClass(char), children: char }, index))) }));
|
|
456
456
|
}, [value]);
|
|
457
|
-
const _className =
|
|
458
|
-
return renderClassStatus('rls-tabular-text', {}, className);
|
|
459
|
-
}, [className]);
|
|
457
|
+
const _className = renderClassStatus('rls-tabular-text', {}, className);
|
|
460
458
|
return jsxRuntimeExports.jsx("div", { className: _className, children: codes });
|
|
461
459
|
}
|
|
462
460
|
const RlsTabularText = require$$0.memo(RlsTabularTextComponent);
|
|
463
461
|
|
|
464
462
|
function RlsAmountComponent({ value, className, decimals, rlsTheme, symbol }) {
|
|
465
|
-
const classNameAmount =
|
|
466
|
-
return renderClassStatus('rls-amount', {}, className);
|
|
467
|
-
}, [className]);
|
|
463
|
+
const classNameAmount = renderClassStatus('rls-amount', {}, className);
|
|
468
464
|
const { decimal, integer } = require$$0.useMemo(() => {
|
|
469
465
|
const currency = commons.currencyFormat({ value, decimals });
|
|
470
466
|
if (!currency.includes(',')) {
|
|
@@ -534,45 +530,36 @@ function RlsAreaTextComponent({ autoComplete, disabled, formControl, identifier,
|
|
|
534
530
|
setFocused(() => false);
|
|
535
531
|
onBlur?.();
|
|
536
532
|
}, [formControl, onBlur]);
|
|
537
|
-
const className =
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
});
|
|
543
|
-
}, [
|
|
544
|
-
formControl?.disabled,
|
|
545
|
-
formControl?.focused,
|
|
546
|
-
disabled,
|
|
547
|
-
focused,
|
|
548
|
-
readOnly
|
|
549
|
-
]);
|
|
533
|
+
const className = renderClassStatus('rls-area-text', {
|
|
534
|
+
disabled: formControl?.disabled || disabled,
|
|
535
|
+
focused: formControl?.focused ?? focused,
|
|
536
|
+
readonly: readOnly
|
|
537
|
+
});
|
|
550
538
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, children: [jsxRuntimeExports.jsx("textarea", { ref: areaRef, className: "rls-area-text__component", autoComplete: autoComplete ?? 'off', placeholder: placeholder, disabled: formControl?.disabled || disabled, readOnly: readOnly, rows: rows, style: { resize }, onFocus: onFocusArea, onBlur: onBlurArea, onChange: onChangeArea, onKeyDown: onKeyDownArea, onKeyUp: onKeyUpArea, value: valueArea }), jsxRuntimeExports.jsx("span", { className: "rls-area-text__value", children: valueArea })] }));
|
|
551
539
|
}
|
|
552
540
|
const RlsAreaText = require$$0.memo(RlsAreaTextComponent);
|
|
553
541
|
|
|
554
|
-
function RlsAvatarComponent({ children, contrasted, rounded, skeleton, rlsTheme }) {
|
|
555
|
-
const className =
|
|
556
|
-
|
|
557
|
-
|
|
542
|
+
function RlsAvatarComponent({ children, contrasted, rounded, skeleton, transparent, rlsTheme }) {
|
|
543
|
+
const className = renderClassStatus('rls-avatar', {
|
|
544
|
+
contrasted,
|
|
545
|
+
rounded,
|
|
546
|
+
skeleton,
|
|
547
|
+
transparent
|
|
548
|
+
});
|
|
558
549
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
559
550
|
}
|
|
560
551
|
const RlsAvatar = require$$0.memo(RlsAvatarComponent);
|
|
561
552
|
|
|
562
553
|
function RlsBadgeComponent({ children, contrasted, rlsTheme }) {
|
|
563
|
-
const className =
|
|
564
|
-
return renderClassStatus('rls-badge', { contrasted });
|
|
565
|
-
}, [contrasted]);
|
|
554
|
+
const className = renderClassStatus('rls-badge', { contrasted });
|
|
566
555
|
return (jsxRuntimeExports.jsx("span", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
567
556
|
}
|
|
568
557
|
const RlsBadge = require$$0.memo(RlsBadgeComponent);
|
|
569
558
|
|
|
570
559
|
function RlsBreadcrumbLabel({ label }) {
|
|
571
|
-
const className =
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
});
|
|
575
|
-
}, [label.onClick]);
|
|
560
|
+
const className = renderClassStatus('rls-breadcrumb__label__a', {
|
|
561
|
+
actionable: !!label.onClick
|
|
562
|
+
});
|
|
576
563
|
return (jsxRuntimeExports.jsx("span", { className: "rls-breadcrumb__label", onClick: label.onClick, children: jsxRuntimeExports.jsx("a", { className: className, "rls-theme": label.rlsTheme, children: label.label }) }));
|
|
577
564
|
}
|
|
578
565
|
function RlsBreadcrumbComponent({ labels }) {
|
|
@@ -584,9 +571,7 @@ function RlsBreadcrumbComponent({ labels }) {
|
|
|
584
571
|
const RlsBreadcrumb = require$$0.memo(RlsBreadcrumbComponent);
|
|
585
572
|
|
|
586
573
|
function RlsIconComponent({ value, className, rlsTheme, skeleton }) {
|
|
587
|
-
const classNameIcon =
|
|
588
|
-
return renderClassStatus('rls-icon', { skeleton }, className);
|
|
589
|
-
}, [className, skeleton]);
|
|
574
|
+
const classNameIcon = renderClassStatus('rls-icon', { skeleton }, className);
|
|
590
575
|
return (jsxRuntimeExports.jsx("div", { className: classNameIcon, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("i", { className: `rls-icon-${value}` }) }));
|
|
591
576
|
}
|
|
592
577
|
const RlsIcon = require$$0.memo(RlsIconComponent);
|
|
@@ -597,25 +582,19 @@ function RlsSpinnerComponent() {
|
|
|
597
582
|
const RlsSpinner = require$$0.memo(RlsSpinnerComponent);
|
|
598
583
|
|
|
599
584
|
function RlsButtonComponent({ type, children, disabled, identifier, onClick, prefixIcon, requesting, rlsTheme, suffixIcon }) {
|
|
600
|
-
const className =
|
|
601
|
-
return renderClassStatus('rls-button__content', { type });
|
|
602
|
-
}, [type]);
|
|
585
|
+
const className = renderClassStatus('rls-button__content', { type });
|
|
603
586
|
return (jsxRuntimeExports.jsx("button", { id: identifier, className: "rls-button", onClick: onClick, "rls-theme": rlsTheme, disabled: disabled, children: jsxRuntimeExports.jsxs("div", { className: className, children: [requesting && jsxRuntimeExports.jsx(RlsSpinner, {}), prefixIcon && jsxRuntimeExports.jsx(RlsIcon, { value: prefixIcon }), children && jsxRuntimeExports.jsx("div", { className: "rls-button__description", children: children }), suffixIcon && jsxRuntimeExports.jsx(RlsIcon, { value: suffixIcon })] }) }));
|
|
604
587
|
}
|
|
605
588
|
const RlsButton = require$$0.memo(RlsButtonComponent);
|
|
606
589
|
|
|
607
|
-
function RlsButtonActionComponent({ icon, disabled, identifier, onClick, rlsTheme, tooltip, type }) {
|
|
608
|
-
const className =
|
|
609
|
-
|
|
610
|
-
}, [type]);
|
|
611
|
-
return (jsxRuntimeExports.jsxs("button", { id: identifier, className: className, onClick: onClick, disabled: disabled, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-button-action__content", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) }), tooltip && (jsxRuntimeExports.jsx("div", { className: "rls-button-action__tooltip rls-overline-font-medium", children: jsxRuntimeExports.jsx("span", { children: tooltip }) }))] }));
|
|
590
|
+
function RlsButtonActionComponent({ icon, badge, disabled, identifier, onClick, rlsTheme, tooltip, type }) {
|
|
591
|
+
const className = renderClassStatus('rls-button-action', { type });
|
|
592
|
+
return (jsxRuntimeExports.jsxs("button", { id: identifier, className: className, onClick: onClick, disabled: disabled, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-button-action__content", children: [jsxRuntimeExports.jsx(RlsIcon, { value: icon }), badge && jsxRuntimeExports.jsx("span", { className: "rls-button-action__badge", children: badge })] }), tooltip && (jsxRuntimeExports.jsx("div", { className: "rls-button-action__tooltip rls-overline-font-medium", children: jsxRuntimeExports.jsx("span", { children: tooltip }) }))] }));
|
|
612
593
|
}
|
|
613
594
|
const RlsButtonAction = require$$0.memo(RlsButtonActionComponent);
|
|
614
595
|
|
|
615
596
|
function RlsButtonIconComponent({ icon, className, disabled, onClick, skeleton }) {
|
|
616
|
-
const classNameButton =
|
|
617
|
-
return renderClassStatus('rls-button-icon', { skeleton }, className);
|
|
618
|
-
}, [className, skeleton]);
|
|
597
|
+
const classNameButton = renderClassStatus('rls-button-icon', { skeleton }, className);
|
|
619
598
|
return (jsxRuntimeExports.jsx("button", { className: classNameButton, onClick: onClick, disabled: disabled, children: !skeleton && jsxRuntimeExports.jsx(RlsIcon, { value: icon }) }));
|
|
620
599
|
}
|
|
621
600
|
const RlsButtonIcon = require$$0.memo(RlsButtonIconComponent);
|
|
@@ -641,9 +620,7 @@ function RlsButtonOptionComponent({ icon, children, disabled, formControl, ident
|
|
|
641
620
|
onValue,
|
|
642
621
|
value
|
|
643
622
|
});
|
|
644
|
-
const className =
|
|
645
|
-
return renderClassStatus('rls-button-option', { checked });
|
|
646
|
-
}, [checked]);
|
|
623
|
+
const className = renderClassStatus('rls-button-option', { checked });
|
|
647
624
|
const onAction = require$$0.useCallback(() => {
|
|
648
625
|
onSelect();
|
|
649
626
|
onClick?.();
|
|
@@ -653,9 +630,7 @@ function RlsButtonOptionComponent({ icon, children, disabled, formControl, ident
|
|
|
653
630
|
const RlsButtonOption = require$$0.memo(RlsButtonOptionComponent);
|
|
654
631
|
|
|
655
632
|
function RlsCheckBoxComponent({ checked, disabled, identifier, onClick, rlsTheme }) {
|
|
656
|
-
const className =
|
|
657
|
-
return renderClassStatus('rls-checkbox', { checked, disabled });
|
|
658
|
-
}, [checked, disabled]);
|
|
633
|
+
const className = renderClassStatus('rls-checkbox', { checked, disabled });
|
|
659
634
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, onClick: onClick, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx(RlsIcon, { value: "checkmark" }) }));
|
|
660
635
|
}
|
|
661
636
|
const RlsCheckBox = require$$0.memo(RlsCheckBoxComponent);
|
|
@@ -675,9 +650,7 @@ const RlsSkeleton = require$$0.memo(RlsSkeletonComponent);
|
|
|
675
650
|
function RlsImageComponent({ src, rlsTheme }) {
|
|
676
651
|
const [srcIsComplet, setSrcIsComplet] = require$$0.useState(false);
|
|
677
652
|
const refImage = require$$0.useRef(null);
|
|
678
|
-
const className =
|
|
679
|
-
return renderClassStatus('rls-image', { complet: srcIsComplet });
|
|
680
|
-
}, [srcIsComplet]);
|
|
653
|
+
const className = renderClassStatus('rls-image', { complet: srcIsComplet });
|
|
681
654
|
require$$0.useEffect(() => {
|
|
682
655
|
setSrcIsComplet(!!(src && refImage.current?.complete));
|
|
683
656
|
}, [src]);
|
|
@@ -731,12 +704,10 @@ function RlsInputComponent({ children, decimals, disabled, formControl, identifi
|
|
|
731
704
|
setFocused(() => false);
|
|
732
705
|
onBlur?.();
|
|
733
706
|
}, [formControl, onBlur]);
|
|
734
|
-
const className =
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
});
|
|
739
|
-
}, [formControl?.focused, formControl?.disabled, focused, disabled]);
|
|
707
|
+
const className = renderClassStatus('rls-input', {
|
|
708
|
+
disabled: formControl?.disabled || disabled,
|
|
709
|
+
focused: formControl?.focused ?? focused
|
|
710
|
+
});
|
|
740
711
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, children: [jsxRuntimeExports.jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type ?? 'text', placeholder: placeholder, disabled: formControl?.disabled || disabled, readOnly: readOnly, onFocus: onFocusInput, onBlur: onBlurInput, onChange: onChangeInput, onKeyDown: onKeyDownInput, onKeyUp: onKeyUpInput, value: valueInput }), jsxRuntimeExports.jsx("span", { className: "rls-input__value", children: children })] }));
|
|
741
712
|
}
|
|
742
713
|
const RlsInput = require$$0.memo(RlsInputComponent);
|
|
@@ -746,13 +717,11 @@ function RlsInputCounterComponent({ className, disabled, formControl, identifier
|
|
|
746
717
|
const [value, setValue] = require$$0.useState(formControl?.value ?? valueProp ?? 0);
|
|
747
718
|
const [focused, setFocused] = require$$0.useState(false);
|
|
748
719
|
const _disabled = require$$0.useMemo(() => formControl?.disabled || disabled, [formControl?.disabled, disabled]);
|
|
749
|
-
const classNameCounter =
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
}, className);
|
|
755
|
-
}, [_disabled, formControl?.focused, focused, readOnly, className]);
|
|
720
|
+
const classNameCounter = renderClassStatus('rls-input-counter', {
|
|
721
|
+
disabled: _disabled,
|
|
722
|
+
focused: formControl?.focused ?? focused,
|
|
723
|
+
readonly: readOnly
|
|
724
|
+
}, className);
|
|
756
725
|
require$$0.useEffect(() => {
|
|
757
726
|
if (!changeIsInternal.current && formControl) {
|
|
758
727
|
const counterValue = formControl.value;
|
|
@@ -867,12 +836,10 @@ function RlsInputPasswordComponent({ disabled, formControl, identifier, onEnter,
|
|
|
867
836
|
formControl?.blur();
|
|
868
837
|
setFocused(() => false);
|
|
869
838
|
}, [formControl]);
|
|
870
|
-
const className =
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
});
|
|
875
|
-
}, [formControl?.focused, formControl?.disabled, focused, disabled]);
|
|
839
|
+
const className = renderClassStatus('rls-input-password', {
|
|
840
|
+
disabled: formControl?.disabled || disabled,
|
|
841
|
+
focused: formControl?.focused ?? focused
|
|
842
|
+
});
|
|
876
843
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, children: jsxRuntimeExports.jsx("input", { className: "rls-input-password__component", autoComplete: "off", type: type ?? 'password', placeholder: placeholder, disabled: disabled, readOnly: readOnly, onFocus: _onFocus, onBlur: _onBlur, onChange: _onChange, onKeyDown: _onKeyDown, onKeyUp: _onKeyUp }) }));
|
|
877
844
|
}
|
|
878
845
|
const RlsInputPassword = require$$0.memo(RlsInputPasswordComponent);
|
|
@@ -892,9 +859,7 @@ const RlsInputPercentage = require$$0.memo(RlsInputPercentageComponent);
|
|
|
892
859
|
|
|
893
860
|
function RlsInputSearchComponent({ formControl, disabled, identifier, onEnter, onSearch, placeholder }) {
|
|
894
861
|
const [value, setValue] = require$$0.useState('');
|
|
895
|
-
const className =
|
|
896
|
-
return renderClassStatus('rls-input-search', { disabled });
|
|
897
|
-
}, [disabled]);
|
|
862
|
+
const className = renderClassStatus('rls-input-search', { disabled });
|
|
898
863
|
const onValue = require$$0.useCallback((value) => {
|
|
899
864
|
if (!formControl) {
|
|
900
865
|
setValue(() => value);
|
|
@@ -1265,17 +1230,13 @@ function RlsMessageIconComponent({ icon, children, rlsTheme }) {
|
|
|
1265
1230
|
const RlsMessageIcon = require$$0.memo(RlsMessageIconComponent);
|
|
1266
1231
|
|
|
1267
1232
|
function RlsPosterComponent({ children, contrasted, rlsTheme }) {
|
|
1268
|
-
const className =
|
|
1269
|
-
return renderClassStatus('rls-poster', { contrasted });
|
|
1270
|
-
}, [contrasted]);
|
|
1233
|
+
const className = renderClassStatus('rls-poster', { contrasted });
|
|
1271
1234
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
1272
1235
|
}
|
|
1273
1236
|
const RlsPoster = require$$0.memo(RlsPosterComponent);
|
|
1274
1237
|
|
|
1275
1238
|
function RlsProgressBarComponent({ indeterminate, percentage, rlsTheme }) {
|
|
1276
|
-
const className =
|
|
1277
|
-
return renderClassStatus('rls-progress-bar', { indeterminate });
|
|
1278
|
-
}, [indeterminate]);
|
|
1239
|
+
const className = renderClassStatus('rls-progress-bar', { indeterminate });
|
|
1279
1240
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-progress-bar__component", style: { width: `${percentage ?? 0}%` } }) }));
|
|
1280
1241
|
}
|
|
1281
1242
|
const RlsProgressBar = require$$0.memo(RlsProgressBarComponent);
|
|
@@ -1286,9 +1247,7 @@ function RlsProgressCircularComponent({ rlsTheme }) {
|
|
|
1286
1247
|
const RlsProgressCircular = require$$0.memo(RlsProgressCircularComponent);
|
|
1287
1248
|
|
|
1288
1249
|
function RlsRadioButtonComponent({ checked, disabled, identifier, rlsTheme, onClick }) {
|
|
1289
|
-
const className =
|
|
1290
|
-
return renderClassStatus('rls-radiobutton', { checked, disabled });
|
|
1291
|
-
}, [checked, disabled]);
|
|
1250
|
+
const className = renderClassStatus('rls-radiobutton', { checked, disabled });
|
|
1292
1251
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, onClick: onClick, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-radiobutton__component" }) }));
|
|
1293
1252
|
}
|
|
1294
1253
|
const RlsRadioButton = require$$0.memo(RlsRadioButtonComponent);
|
|
@@ -1299,9 +1258,11 @@ function RlsSkeletonTextComponent({ active, children, rlsTheme }) {
|
|
|
1299
1258
|
const RlsSkeletonText = require$$0.memo(RlsSkeletonTextComponent);
|
|
1300
1259
|
|
|
1301
1260
|
function RlsSwitchComponent({ checked, capsule, disabled, identifier, onClick, rlsTheme }) {
|
|
1302
|
-
const className =
|
|
1303
|
-
|
|
1304
|
-
|
|
1261
|
+
const className = renderClassStatus('rls-switch', {
|
|
1262
|
+
checked,
|
|
1263
|
+
capsule,
|
|
1264
|
+
disabled
|
|
1265
|
+
});
|
|
1305
1266
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, onClick: onClick, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-switch__component", children: jsxRuntimeExports.jsx("div", { className: "rls-switch__component__element" }) }) }));
|
|
1306
1267
|
}
|
|
1307
1268
|
const RlsSwitch = require$$0.memo(RlsSwitchComponent);
|
|
@@ -1318,9 +1279,7 @@ function RlsAccordionComponent({ bordered, children, className, disabled, identi
|
|
|
1318
1279
|
const [animating, setAnimating] = require$$0.useState(false);
|
|
1319
1280
|
const contentRef = require$$0.useRef(null);
|
|
1320
1281
|
const initializedRef = require$$0.useRef(false);
|
|
1321
|
-
const classNameAccordion =
|
|
1322
|
-
return renderClassStatus('rls-accordion', { bordered, disabled, open, animating }, className);
|
|
1323
|
-
}, [animating, bordered, className, disabled, open]);
|
|
1282
|
+
const classNameAccordion = renderClassStatus('rls-accordion', { bordered, disabled, open, animating }, className);
|
|
1324
1283
|
const onClickHeader = require$$0.useCallback(() => {
|
|
1325
1284
|
if (!disabled) {
|
|
1326
1285
|
setOpen((current) => {
|
|
@@ -1369,17 +1328,13 @@ function RlsAccordionComponent({ bordered, children, className, disabled, identi
|
|
|
1369
1328
|
const RlsAccordion = require$$0.memo(RlsAccordionComponent);
|
|
1370
1329
|
|
|
1371
1330
|
function RlsAlertComponent({ bordered, children, icon, identifier, rlsTheme }) {
|
|
1372
|
-
const className =
|
|
1373
|
-
return renderClassStatus('rls-alert', { bordered });
|
|
1374
|
-
}, [bordered]);
|
|
1331
|
+
const className = renderClassStatus('rls-alert', { bordered });
|
|
1375
1332
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [icon && (jsxRuntimeExports.jsx("div", { className: "rls-alert__icon", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) })), jsxRuntimeExports.jsx("div", { className: "rls-alert__content", children: children })] }));
|
|
1376
1333
|
}
|
|
1377
1334
|
const RlsAlert = require$$0.memo(RlsAlertComponent);
|
|
1378
1335
|
|
|
1379
1336
|
function RlsBallotComponent({ bordered, className, children, img, initials, skeleton, subtitle, rlsTheme }) {
|
|
1380
|
-
const classNameBallot =
|
|
1381
|
-
return renderClassStatus('rls-ballot', { bordered, skeleton }, className);
|
|
1382
|
-
}, [bordered, skeleton, className]);
|
|
1337
|
+
const classNameBallot = renderClassStatus('rls-ballot', { bordered, skeleton }, className);
|
|
1383
1338
|
return (jsxRuntimeExports.jsxs("div", { className: classNameBallot, "rls-theme": rlsTheme, children: [(img || initials) && (jsxRuntimeExports.jsxs(RlsAvatar, { skeleton: skeleton, children: [img && jsxRuntimeExports.jsx("img", { src: img }), initials && jsxRuntimeExports.jsx("span", { children: initials })] })), jsxRuntimeExports.jsxs("div", { className: "rls-ballot__component", children: [jsxRuntimeExports.jsx("div", { className: "rls-ballot__title", children: jsxRuntimeExports.jsx(RlsSkeletonText, { active: skeleton, children: children }) }), subtitle && (jsxRuntimeExports.jsx("div", { className: "rls-ballot__subtitle", children: jsxRuntimeExports.jsx(RlsSkeletonText, { active: skeleton, children: subtitle }) }))] })] }));
|
|
1384
1339
|
}
|
|
1385
1340
|
const RlsBallot = require$$0.memo(RlsBallotComponent);
|
|
@@ -1390,9 +1345,7 @@ function RlsBodyComponent({ children, identifier, rlsTheme }) {
|
|
|
1390
1345
|
const RlsBody = require$$0.memo(RlsBodyComponent);
|
|
1391
1346
|
|
|
1392
1347
|
function RlsButtonProgressComponent({ icon, disabled, onClick, progressing, rlsTheme }) {
|
|
1393
|
-
const className =
|
|
1394
|
-
return renderClassStatus('rls-button-progress', { progressing });
|
|
1395
|
-
}, [progressing]);
|
|
1348
|
+
const className = renderClassStatus('rls-button-progress', { progressing });
|
|
1396
1349
|
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [!progressing && (jsxRuntimeExports.jsx(RlsButtonAction, { icon: icon, onClick: onClick, disabled: disabled })), progressing && jsxRuntimeExports.jsx(RlsProgressCircular, {})] }));
|
|
1397
1350
|
}
|
|
1398
1351
|
const RlsButtonProgress = require$$0.memo(RlsButtonProgressComponent);
|
|
@@ -1423,12 +1376,10 @@ function RlsButtonToggleComponent({ onAction, options, type, automatic, disabled
|
|
|
1423
1376
|
document.removeEventListener('click', onCloseMenu);
|
|
1424
1377
|
};
|
|
1425
1378
|
}, []);
|
|
1426
|
-
const classNameList =
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
});
|
|
1431
|
-
}, [visible]);
|
|
1379
|
+
const classNameList = renderClassStatus('rls-button-toggle__list', {
|
|
1380
|
+
hide: !visible,
|
|
1381
|
+
visible
|
|
1382
|
+
});
|
|
1432
1383
|
const onClickMenu = require$$0.useCallback(() => {
|
|
1433
1384
|
setVisible((visible) => !visible);
|
|
1434
1385
|
}, []);
|
|
@@ -1590,14 +1541,12 @@ function RlsFieldAreaComponent(props) {
|
|
|
1590
1541
|
const disabled = require$$0.useMemo(() => {
|
|
1591
1542
|
return formControl?.disabled || props.disabled;
|
|
1592
1543
|
}, [formControl?.disabled, props.disabled]);
|
|
1593
|
-
const className =
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
}, 'rls-field-area');
|
|
1600
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1544
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1545
|
+
disabled,
|
|
1546
|
+
error: formControl?.wrong,
|
|
1547
|
+
focused: formControl?.focused && !disabled,
|
|
1548
|
+
readonly: props.readOnly
|
|
1549
|
+
}, 'rls-field-area');
|
|
1601
1550
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsx("div", { className: "rls-field-box__body", children: jsxRuntimeExports.jsx(RlsAreaText, { ...props }) }) }), !props.msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1602
1551
|
}
|
|
1603
1552
|
const RlsFieldArea = require$$0.memo(RlsFieldAreaComponent);
|
|
@@ -1607,14 +1556,12 @@ function RlsFieldDecimalComponent(props) {
|
|
|
1607
1556
|
const disabled = require$$0.useMemo(() => {
|
|
1608
1557
|
return formControl?.disabled || props.disabled;
|
|
1609
1558
|
}, [formControl?.disabled, props.disabled]);
|
|
1610
|
-
const className =
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
}, 'rls-field-decimal');
|
|
1617
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1559
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1560
|
+
disabled,
|
|
1561
|
+
error: formControl?.wrong,
|
|
1562
|
+
focused: formControl?.focused && !disabled,
|
|
1563
|
+
readonly: props.readOnly
|
|
1564
|
+
}, 'rls-field-decimal');
|
|
1618
1565
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsx("div", { className: "rls-field-box__body", children: jsxRuntimeExports.jsx(RlsInputDecimal, { ...props }) }) }), !props.msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1619
1566
|
}
|
|
1620
1567
|
const RlsFieldDecimal = require$$0.memo(RlsFieldDecimalComponent);
|
|
@@ -1622,12 +1569,12 @@ const RlsFieldDecimal = require$$0.memo(RlsFieldDecimalComponent);
|
|
|
1622
1569
|
function RlsFieldFileComponent({ accept, children, disabled: _disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder, readOnly, rlsTheme, value }) {
|
|
1623
1570
|
const inputRef = require$$0.useRef(null);
|
|
1624
1571
|
const disabled = require$$0.useMemo(() => formControl?.disabled || _disabled, [formControl?.disabled, _disabled]);
|
|
1625
|
-
const className =
|
|
1572
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1626
1573
|
disabled,
|
|
1627
1574
|
error: formControl?.wrong,
|
|
1628
1575
|
focused: formControl?.focused && !disabled,
|
|
1629
1576
|
readonly: readOnly
|
|
1630
|
-
}, 'rls-field-file')
|
|
1577
|
+
}, 'rls-field-file');
|
|
1631
1578
|
const currentFile = require$$0.useMemo(() => formControl?.value ?? value, [formControl?.value, value]);
|
|
1632
1579
|
const displayValue = require$$0.useMemo(() => {
|
|
1633
1580
|
return currentFile?.name ?? '';
|
|
@@ -1708,13 +1655,11 @@ function RlsFieldListSuggestionsComponent({ elements, action, disabled, higher,
|
|
|
1708
1655
|
});
|
|
1709
1656
|
});
|
|
1710
1657
|
}, []);
|
|
1711
|
-
const className =
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
});
|
|
1717
|
-
}, [disabled, higher, visible]);
|
|
1658
|
+
const className = renderClassStatus('rls-field-list__suggestions', {
|
|
1659
|
+
disabled,
|
|
1660
|
+
higher,
|
|
1661
|
+
visible
|
|
1662
|
+
});
|
|
1718
1663
|
const onChangePattern = require$$0.useCallback((event) => {
|
|
1719
1664
|
searchControl?.onChange(event.target.value);
|
|
1720
1665
|
}, [searchControl?.onChange]);
|
|
@@ -1734,14 +1679,12 @@ function RlsFieldMoneyComponent(props) {
|
|
|
1734
1679
|
const disabled = require$$0.useMemo(() => {
|
|
1735
1680
|
return formControl?.disabled || props.disabled;
|
|
1736
1681
|
}, [formControl?.disabled, props.disabled]);
|
|
1737
|
-
const className =
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
}, 'rls-field-money');
|
|
1744
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1682
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1683
|
+
disabled,
|
|
1684
|
+
error: formControl?.wrong,
|
|
1685
|
+
focused: formControl?.focused && !disabled,
|
|
1686
|
+
readonly: props.readOnly
|
|
1687
|
+
}, 'rls-field-money');
|
|
1745
1688
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx(RlsInputMoney, { ...props }), action && (jsxRuntimeExports.jsx(RlsButtonAction, { icon: action.icon, disabled: disabled, onClick: action.onClick }))] }) }), !props.msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1746
1689
|
}
|
|
1747
1690
|
const RlsFieldMoney = require$$0.memo(RlsFieldMoneyComponent);
|
|
@@ -1751,14 +1694,12 @@ function RlsFieldNumberComponent(props) {
|
|
|
1751
1694
|
const disabled = require$$0.useMemo(() => {
|
|
1752
1695
|
return formControl?.disabled || props.disabled;
|
|
1753
1696
|
}, [formControl?.disabled, props.disabled]);
|
|
1754
|
-
const className =
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
}, 'rls-field-number');
|
|
1761
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1697
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1698
|
+
disabled,
|
|
1699
|
+
error: formControl?.wrong,
|
|
1700
|
+
focused: formControl?.focused && !disabled,
|
|
1701
|
+
readonly: props.readOnly
|
|
1702
|
+
}, 'rls-field-number');
|
|
1762
1703
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx(RlsInputNumber, { ...props }), action && (jsxRuntimeExports.jsx(RlsButtonAction, { icon: action.icon, disabled: disabled, onClick: action.onClick }))] }) }), !props.msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1763
1704
|
}
|
|
1764
1705
|
const RlsFieldNumber = require$$0.memo(RlsFieldNumberComponent);
|
|
@@ -1769,14 +1710,12 @@ function RlsFieldPasswordComponent(props) {
|
|
|
1769
1710
|
const disabled = require$$0.useMemo(() => {
|
|
1770
1711
|
return formControl?.disabled || props.disabled;
|
|
1771
1712
|
}, [formControl?.disabled, props.disabled]);
|
|
1772
|
-
const className =
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
}, 'rls-field-password');
|
|
1779
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1713
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1714
|
+
disabled,
|
|
1715
|
+
error: formControl?.wrong,
|
|
1716
|
+
focused: formControl?.focused && !disabled,
|
|
1717
|
+
readonly: props.readOnly
|
|
1718
|
+
}, 'rls-field-password');
|
|
1780
1719
|
const onTogglePassword = require$$0.useCallback(() => {
|
|
1781
1720
|
setPasswordIsActive((password) => !password);
|
|
1782
1721
|
}, []);
|
|
@@ -1789,14 +1728,12 @@ function RlsFieldPercentageComponent(props) {
|
|
|
1789
1728
|
const disabled = require$$0.useMemo(() => {
|
|
1790
1729
|
return formControl?.disabled || props.disabled;
|
|
1791
1730
|
}, [formControl?.disabled, props.disabled]);
|
|
1792
|
-
const className =
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
}, 'rls-field-percentage');
|
|
1799
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1731
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1732
|
+
disabled,
|
|
1733
|
+
error: formControl?.wrong,
|
|
1734
|
+
focused: formControl?.focused && !disabled,
|
|
1735
|
+
readonly: props.readOnly
|
|
1736
|
+
}, 'rls-field-percentage');
|
|
1800
1737
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx(RlsInputPercentage, { ...props }), action && (jsxRuntimeExports.jsx(RlsButtonAction, { icon: action.icon, disabled: disabled, onClick: action.onClick }))] }) }), !props.msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1801
1738
|
}
|
|
1802
1739
|
const RlsFieldPercentage = require$$0.memo(RlsFieldPercentageComponent);
|
|
@@ -1811,14 +1748,12 @@ function RlsFieldTextComponent(props) {
|
|
|
1811
1748
|
const disabled = require$$0.useMemo(() => {
|
|
1812
1749
|
return formControl?.disabled || props.disabled;
|
|
1813
1750
|
}, [formControl?.disabled, props.disabled]);
|
|
1814
|
-
const className =
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
}, 'rls-field-text');
|
|
1821
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1751
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1752
|
+
disabled,
|
|
1753
|
+
error: formControl?.wrong,
|
|
1754
|
+
focused: formControl?.focused && !disabled,
|
|
1755
|
+
readonly: props.readOnly
|
|
1756
|
+
}, 'rls-field-text');
|
|
1822
1757
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx(RlsInputText, { ...props }), action && (jsxRuntimeExports.jsx(RlsButtonAction, { icon: action.icon, disabled: disabled, onClick: action.onClick }))] }) }), !props.msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1823
1758
|
}
|
|
1824
1759
|
const RlsFieldText = require$$0.memo(RlsFieldTextComponent);
|
|
@@ -1848,13 +1783,11 @@ function RlsLabelCheckBoxComponent({ children, disabled, extended, identifier, f
|
|
|
1848
1783
|
disabled,
|
|
1849
1784
|
formControl
|
|
1850
1785
|
});
|
|
1851
|
-
const className =
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
});
|
|
1857
|
-
}, [disabled, extended, reverse]);
|
|
1786
|
+
const className = renderClassStatus('rls-label-checkbox', {
|
|
1787
|
+
disabled,
|
|
1788
|
+
extended,
|
|
1789
|
+
reverse
|
|
1790
|
+
});
|
|
1858
1791
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-label-checkbox__component", onClick: onToggle, children: jsxRuntimeExports.jsx(RlsCheckBox, { checked: checked, disabled: disabled }) }), jsxRuntimeExports.jsx("div", { className: "rls-label-checkbox__text", children: children })] }));
|
|
1859
1792
|
}
|
|
1860
1793
|
const RlsLabelCheckBox = require$$0.memo(RlsLabelCheckBoxComponent);
|
|
@@ -1866,13 +1799,11 @@ function RlsLabelRadioButtonComponent({ children, disabled, extended, identifier
|
|
|
1866
1799
|
onValue,
|
|
1867
1800
|
value
|
|
1868
1801
|
});
|
|
1869
|
-
const className =
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
});
|
|
1875
|
-
}, [disabled, extended, reverse]);
|
|
1802
|
+
const className = renderClassStatus('rls-label-radiobutton', {
|
|
1803
|
+
disabled,
|
|
1804
|
+
extended,
|
|
1805
|
+
reverse
|
|
1806
|
+
});
|
|
1876
1807
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-label-radiobutton__component", onClick: onSelect, children: jsxRuntimeExports.jsx(RlsRadioButton, { checked: checked, disabled: disabled }) }), jsxRuntimeExports.jsx("div", { className: "rls-label-radiobutton__text", children: children })] }));
|
|
1877
1808
|
}
|
|
1878
1809
|
const RlsLabelRadioButton = require$$0.memo(RlsLabelRadioButtonComponent);
|
|
@@ -1882,21 +1813,17 @@ function RlsLabelSwitchComponent({ capsule, children, disabled, extended, identi
|
|
|
1882
1813
|
disabled,
|
|
1883
1814
|
formControl
|
|
1884
1815
|
});
|
|
1885
|
-
const className =
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
});
|
|
1891
|
-
}, [disabled, extended, reverse]);
|
|
1816
|
+
const className = renderClassStatus('rls-label-switch', {
|
|
1817
|
+
disabled,
|
|
1818
|
+
extended,
|
|
1819
|
+
reverse
|
|
1820
|
+
});
|
|
1892
1821
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-label-switch__component", onClick: onToggle, children: jsxRuntimeExports.jsx(RlsSwitch, { checked: checked, capsule: capsule, disabled: disabled }) }), jsxRuntimeExports.jsx("div", { className: "rls-label-switch__text", children: children })] }));
|
|
1893
1822
|
}
|
|
1894
1823
|
const RlsLabelSwitch = require$$0.memo(RlsLabelSwitchComponent);
|
|
1895
1824
|
|
|
1896
1825
|
function RlsMessageEmptyComponent({ children, className, emoji, icon, identifier, image, rlsTheme, title }) {
|
|
1897
|
-
const classNameMessageEmpty =
|
|
1898
|
-
return renderClassStatus('rls-message-empty', {}, className);
|
|
1899
|
-
}, [className]);
|
|
1826
|
+
const classNameMessageEmpty = renderClassStatus('rls-message-empty', {}, className);
|
|
1900
1827
|
const logo = require$$0.useMemo(() => {
|
|
1901
1828
|
if (icon) {
|
|
1902
1829
|
return (jsxRuntimeExports.jsx("div", { className: "rls-message-empty__logo", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) }));
|
|
@@ -1930,7 +1857,9 @@ function RlsNavbarMenuComponent({ options, onOption }) {
|
|
|
1930
1857
|
const RlsNavbarMenu = require$$0.memo(RlsNavbarMenuComponent);
|
|
1931
1858
|
|
|
1932
1859
|
function PageButton({ page, onSelect }) {
|
|
1933
|
-
const className =
|
|
1860
|
+
const className = renderClassStatus('rls-pagination__page', {
|
|
1861
|
+
active: page.active
|
|
1862
|
+
});
|
|
1934
1863
|
const onClick = require$$0.useCallback(() => {
|
|
1935
1864
|
onSelect(page);
|
|
1936
1865
|
}, [page, onSelect]);
|
|
@@ -1984,15 +1913,13 @@ function RlsPickerDayHeaders() {
|
|
|
1984
1913
|
return (jsxRuntimeExports.jsx("div", { className: "rls-picker-day__header", children: dates.DAY_LABELS().map((title, index) => (jsxRuntimeExports.jsx("span", { className: "rls-picker-day__label", children: title }, index))) }));
|
|
1985
1914
|
}
|
|
1986
1915
|
function RlsPickerDayElement({ day, onSelect, disabled }) {
|
|
1987
|
-
const className =
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
});
|
|
1995
|
-
}, [day, disabled]);
|
|
1916
|
+
const className = renderClassStatus('rls-picker-day__element', {
|
|
1917
|
+
disabled: day.disabled || disabled,
|
|
1918
|
+
focused: day.focused,
|
|
1919
|
+
forbidden: day.forbidden,
|
|
1920
|
+
selected: day.selected,
|
|
1921
|
+
today: day.today
|
|
1922
|
+
});
|
|
1996
1923
|
const onClick = require$$0.useCallback(() => {
|
|
1997
1924
|
if (day.value && !day.disabled && !disabled) {
|
|
1998
1925
|
onSelect(day.value);
|
|
@@ -2059,15 +1986,13 @@ function RlsPickerDayRangeHeaders() {
|
|
|
2059
1986
|
return (jsxRuntimeExports.jsx("div", { className: "rls-picker-day__header", children: dates.DAY_LABELS().map((title, index) => (jsxRuntimeExports.jsx("span", { className: "rls-picker-day__label", children: title }, index))) }));
|
|
2060
1987
|
}
|
|
2061
1988
|
function RlsPickerDayRangeElement({ day, onSelect, disabled }) {
|
|
2062
|
-
const className =
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
});
|
|
2070
|
-
}, [day.disabled, day.end, day.forbidden, day.ranged, day.source, disabled]);
|
|
1989
|
+
const className = renderClassStatus('rls-picker-day-range__element', {
|
|
1990
|
+
disabled: day.disabled || disabled,
|
|
1991
|
+
end: day.end,
|
|
1992
|
+
forbidden: day.forbidden,
|
|
1993
|
+
ranged: day.ranged,
|
|
1994
|
+
source: day.source
|
|
1995
|
+
});
|
|
2071
1996
|
const onClick = require$$0.useCallback(() => {
|
|
2072
1997
|
if (day.value && !day.disabled && !disabled) {
|
|
2073
1998
|
onSelect(day.value);
|
|
@@ -2120,13 +2045,11 @@ function RlsPickerMonthElement({ month, onSelect, disabled }) {
|
|
|
2120
2045
|
setLabel(dates.MONTH_NAMES(month.value));
|
|
2121
2046
|
});
|
|
2122
2047
|
}, []);
|
|
2123
|
-
const className =
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
});
|
|
2129
|
-
}, [month.disabled, month.focused, month.selected, disabled]);
|
|
2048
|
+
const className = renderClassStatus('rls-picker-month__component', {
|
|
2049
|
+
disabled: month.disabled || disabled,
|
|
2050
|
+
focused: month.focused,
|
|
2051
|
+
selected: month.selected
|
|
2052
|
+
});
|
|
2130
2053
|
const onClick = require$$0.useCallback(() => {
|
|
2131
2054
|
if (commons.valueIsDefined(month.value) && !month.disabled && !disabled) {
|
|
2132
2055
|
onSelect(month.value);
|
|
@@ -2264,13 +2187,11 @@ function RlsPickerSelectorTitleComponent({ monthControl, type, yearControl, date
|
|
|
2264
2187
|
const RlsPickerSelectorTitle = require$$0.memo(RlsPickerSelectorTitleComponent);
|
|
2265
2188
|
|
|
2266
2189
|
function RlsPickerYearElement({ onSelect, year, disabled }) {
|
|
2267
|
-
const className =
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
});
|
|
2273
|
-
}, [year.disabled, year.focused, year.selected, disabled]);
|
|
2190
|
+
const className = renderClassStatus('rls-picker-year__element', {
|
|
2191
|
+
disabled: year.disabled || disabled,
|
|
2192
|
+
focused: year.focused,
|
|
2193
|
+
selected: year.selected
|
|
2194
|
+
});
|
|
2274
2195
|
const onClick = require$$0.useCallback(() => {
|
|
2275
2196
|
if (year.value && !year.disabled && !disabled) {
|
|
2276
2197
|
onSelect(year.value);
|
|
@@ -2346,13 +2267,11 @@ function RlsSliderComponent({ children, className, disabled, formControl, identi
|
|
|
2346
2267
|
const refTrack = require$$0.useRef(null);
|
|
2347
2268
|
const refTrackOn = require$$0.useRef(null);
|
|
2348
2269
|
const refThumb = require$$0.useRef(null);
|
|
2349
|
-
const classNameSlider =
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
}, className);
|
|
2355
|
-
}, [valueSlider, minValueSlider, maxValueSlider, disabled]);
|
|
2270
|
+
const classNameSlider = renderClassStatus('rls-slider', {
|
|
2271
|
+
complet: valueSlider === maxValueSlider,
|
|
2272
|
+
disabled: disabled,
|
|
2273
|
+
empty: valueSlider === minValueSlider
|
|
2274
|
+
}, className);
|
|
2356
2275
|
require$$0.useEffect(() => {
|
|
2357
2276
|
const valueInitial = formControl?.value ?? value ?? 0;
|
|
2358
2277
|
refThumb.current.style.left = `${rate}%`;
|
|
@@ -2382,12 +2301,10 @@ function RlsSliderComponent({ children, className, disabled, formControl, identi
|
|
|
2382
2301
|
const RlsSlider = require$$0.memo(RlsSliderComponent);
|
|
2383
2302
|
|
|
2384
2303
|
function RlsTab({ onSelect, tab, value }) {
|
|
2385
|
-
const className =
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
});
|
|
2390
|
-
}, [tab, value]);
|
|
2304
|
+
const className = renderClassStatus('rls-tabs__children', {
|
|
2305
|
+
active: tab.value === value,
|
|
2306
|
+
disabled: tab.disabled
|
|
2307
|
+
});
|
|
2391
2308
|
const onClick = require$$0.useCallback(() => {
|
|
2392
2309
|
if (!tab.disabled) {
|
|
2393
2310
|
onSelect(tab.value);
|
|
@@ -2419,9 +2336,7 @@ function RlsToolbarComponent({ actions, children, subtitle }) {
|
|
|
2419
2336
|
const RlsToolbar = require$$0.memo(RlsToolbarComponent);
|
|
2420
2337
|
|
|
2421
2338
|
function RlsBottomSheetComponent({ autoclose, children, className, controller, onBackdrop, visible, rlsTheme }) {
|
|
2422
|
-
const classNameSheet =
|
|
2423
|
-
return renderClassStatus('rls-bottom-sheet', { visible: controller?.visible ?? visible }, className);
|
|
2424
|
-
}, [className, visible, controller?.visible]);
|
|
2339
|
+
const classNameSheet = renderClassStatus('rls-bottom-sheet', { visible: controller?.visible ?? visible }, className);
|
|
2425
2340
|
const onClickBackdrop = require$$0.useCallback(() => {
|
|
2426
2341
|
if (autoclose) {
|
|
2427
2342
|
controller?.close();
|
|
@@ -2433,9 +2348,7 @@ function RlsBottomSheetComponent({ autoclose, children, className, controller, o
|
|
|
2433
2348
|
const RlsBottomSheet = require$$0.memo(RlsBottomSheetComponent);
|
|
2434
2349
|
|
|
2435
2350
|
function RlsCardComponent({ children, className, outline, rlsTheme }) {
|
|
2436
|
-
const classNameCard =
|
|
2437
|
-
return renderClassStatus('rls-card', { outline }, className);
|
|
2438
|
-
}, [outline, className]);
|
|
2351
|
+
const classNameCard = renderClassStatus('rls-card', { outline }, className);
|
|
2439
2352
|
return (jsxRuntimeExports.jsx("div", { className: classNameCard, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-card__content", children: children }) }));
|
|
2440
2353
|
}
|
|
2441
2354
|
const RlsCard = require$$0.memo(RlsCardComponent);
|
|
@@ -2449,9 +2362,7 @@ class ConfirmationResult extends commons.SealedPartial {
|
|
|
2449
2362
|
}
|
|
2450
2363
|
}
|
|
2451
2364
|
function RlsConfirmationComponent({ approved, className, content, reject, rlsTheme, subtitle, title, visible }) {
|
|
2452
|
-
const classConfirmation =
|
|
2453
|
-
return renderClassStatus('rls-confirmation', { visible }, className);
|
|
2454
|
-
}, [visible, className]);
|
|
2365
|
+
const classConfirmation = renderClassStatus('rls-confirmation', { visible }, className);
|
|
2455
2366
|
return (jsxRuntimeExports.jsxs("div", { className: classConfirmation, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__header", children: [title && jsxRuntimeExports.jsx("div", { className: "rls-confirmation__title", children: title }), subtitle && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__subtitle", children: subtitle }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__body", children: content && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__content", children: content })) }), (approved || reject) && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__actions", children: [approved && (jsxRuntimeExports.jsx(RlsButton, { identifier: approved.identifier, type: approved.type, onClick: approved.onClick, disabled: approved.disabled, rlsTheme: approved.rlsTheme, children: approved.label })), reject && (jsxRuntimeExports.jsx(RlsButton, { identifier: reject.identifier, type: reject.type, onClick: reject.onClick, disabled: reject.disabled, rlsTheme: reject.rlsTheme, children: reject.label }))] }) }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__backdrop" })] }));
|
|
2456
2367
|
}
|
|
2457
2368
|
const RlsConfirmation = require$$0.memo(RlsConfirmationComponent);
|
|
@@ -2481,7 +2392,7 @@ function useConfirmation() {
|
|
|
2481
2392
|
setVisible(false);
|
|
2482
2393
|
resolve(ConfirmationResult.reject());
|
|
2483
2394
|
},
|
|
2484
|
-
type: options.reject.type ?? '
|
|
2395
|
+
type: options.reject.type ?? 'flat',
|
|
2485
2396
|
disabled: options.reject.disabled,
|
|
2486
2397
|
identifier: options.reject.identifier,
|
|
2487
2398
|
rlsTheme: options.reject.rlsTheme
|
|
@@ -2522,12 +2433,10 @@ function useDatatable(table) {
|
|
|
2522
2433
|
|
|
2523
2434
|
function RlsDatatableComponent({ children, footer, header, identifier, rlsTheme, resizable, summary, table, toolbar }) {
|
|
2524
2435
|
const datatable = useDatatable(table);
|
|
2525
|
-
const className =
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
});
|
|
2530
|
-
}, [resizable, datatable.scrolleable]);
|
|
2436
|
+
const className = renderClassStatus('rls-datatable', {
|
|
2437
|
+
resizable,
|
|
2438
|
+
scrolleable: resizable && datatable?.scrolleable
|
|
2439
|
+
});
|
|
2531
2440
|
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [toolbar && jsxRuntimeExports.jsx("div", { className: "rls-datatable__toolbar", children: toolbar }), jsxRuntimeExports.jsx("div", { className: "rls-datatable__table", children: jsxRuntimeExports.jsxs("table", { id: identifier, children: [header && jsxRuntimeExports.jsx("thead", { className: "rls-datatable__head", children: header }), jsxRuntimeExports.jsx("tbody", { ref: datatable?.refTable, className: "rls-datatable__body", children: children })] }) }), summary && jsxRuntimeExports.jsx("div", { className: "rls-datatable__summary", children: summary }), footer && jsxRuntimeExports.jsx("div", { className: "rls-datatable__footer", children: footer })] }));
|
|
2532
2441
|
}
|
|
2533
2442
|
const RlsDatatable = require$$0.memo(RlsDatatableComponent);
|
|
@@ -2536,61 +2445,45 @@ function RlsDatatableHeaderComponent({ children, identifier, rlsTheme }) {
|
|
|
2536
2445
|
}
|
|
2537
2446
|
const RlsDatatableHeader = require$$0.memo(RlsDatatableHeaderComponent);
|
|
2538
2447
|
function RlsDatatableTitleComponent({ actions, children, className, control, identifier, rlsTheme, truncated }) {
|
|
2539
|
-
const classNameTitle =
|
|
2540
|
-
return renderClassStatus('rls-datatable__title', { actions, control, truncated }, className);
|
|
2541
|
-
}, [className, truncated, control, actions]);
|
|
2448
|
+
const classNameTitle = renderClassStatus('rls-datatable__title', { actions, control, truncated }, className);
|
|
2542
2449
|
return (jsxRuntimeExports.jsx("th", { id: identifier, className: classNameTitle, "rls-theme": rlsTheme, children: children }));
|
|
2543
2450
|
}
|
|
2544
2451
|
const RlsDatatableTitle = require$$0.memo(RlsDatatableTitleComponent);
|
|
2545
2452
|
function RlsDatatableSubheaderComponent({ children, className, identifier, rlsTheme }) {
|
|
2546
|
-
const classNameSubheader =
|
|
2547
|
-
return renderClassStatus('rls-datatable__subheader', {}, className);
|
|
2548
|
-
}, [className]);
|
|
2453
|
+
const classNameSubheader = renderClassStatus('rls-datatable__subheader', {}, className);
|
|
2549
2454
|
return (jsxRuntimeExports.jsx("tr", { id: identifier, className: classNameSubheader, "rls-theme": rlsTheme, children: children }));
|
|
2550
2455
|
}
|
|
2551
2456
|
const RlsDatatableSubheader = require$$0.memo(RlsDatatableSubheaderComponent);
|
|
2552
2457
|
function RlsDatatableRecordComponent({ children, className, error, identifier, info, rlsTheme, success, truncated, warning }) {
|
|
2553
|
-
const classNameRecord =
|
|
2554
|
-
return renderClassStatus('rls-datatable__record', { error, info, truncated, success, warning }, className);
|
|
2555
|
-
}, [className, truncated, error, info, success, warning]);
|
|
2458
|
+
const classNameRecord = renderClassStatus('rls-datatable__record', { error, info, truncated, success, warning }, className);
|
|
2556
2459
|
return (jsxRuntimeExports.jsx("tr", { id: identifier, className: classNameRecord, "rls-theme": rlsTheme, children: children }));
|
|
2557
2460
|
}
|
|
2558
2461
|
const RlsDatatableRecord = require$$0.memo(RlsDatatableRecordComponent);
|
|
2559
2462
|
function RlsDatatableTotalsComponent({ children, className, error, identifier, info, rlsTheme, success, truncated, warning }) {
|
|
2560
|
-
const classNameTotals =
|
|
2561
|
-
return renderClassStatus('rls-datatable__totals', { error, info, truncated, success, warning }, className);
|
|
2562
|
-
}, [className, truncated, error, info, success, warning]);
|
|
2463
|
+
const classNameTotals = renderClassStatus('rls-datatable__totals', { error, info, truncated, success, warning }, className);
|
|
2563
2464
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: classNameTotals, "rls-theme": rlsTheme, children: children }));
|
|
2564
2465
|
}
|
|
2565
2466
|
const RlsDatatableTotals = require$$0.memo(RlsDatatableTotalsComponent);
|
|
2566
2467
|
function RlsDatatableCellComponent({ actions, children, className, control, identifier, rlsTheme, truncated }) {
|
|
2567
|
-
const classNameCell =
|
|
2568
|
-
return renderClassStatus('rls-datatable__cell', { actions, control, truncated }, className);
|
|
2569
|
-
}, [className, truncated, control, actions]);
|
|
2468
|
+
const classNameCell = renderClassStatus('rls-datatable__cell', { actions, control, truncated }, className);
|
|
2570
2469
|
return (jsxRuntimeExports.jsx("td", { id: identifier, className: classNameCell, "rls-theme": rlsTheme, children: children }));
|
|
2571
2470
|
}
|
|
2572
2471
|
const RlsDatatableCell = require$$0.memo(RlsDatatableCellComponent);
|
|
2573
2472
|
function RlsDatatableDataComponent({ actions, children, className, control, identifier, truncated }) {
|
|
2574
|
-
const classNameData =
|
|
2575
|
-
return renderClassStatus('rls-datatable__data', { actions, control, truncated }, className);
|
|
2576
|
-
}, [className, truncated, control, actions]);
|
|
2473
|
+
const classNameData = renderClassStatus('rls-datatable__data', { actions, control, truncated }, className);
|
|
2577
2474
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: classNameData, children: children }));
|
|
2578
2475
|
}
|
|
2579
2476
|
const RlsDatatableData = require$$0.memo(RlsDatatableDataComponent);
|
|
2580
2477
|
function RlsDatatableFloatingComponent({ children, className, identifier, invested, rlsTheme }) {
|
|
2581
|
-
const classNameFloating =
|
|
2582
|
-
return renderClassStatus('rls-datatable__floating', { invested }, className);
|
|
2583
|
-
}, [className, invested]);
|
|
2478
|
+
const classNameFloating = renderClassStatus('rls-datatable__floating', { invested }, className);
|
|
2584
2479
|
return (jsxRuntimeExports.jsx("td", { id: identifier, className: classNameFloating, "rls-theme": rlsTheme, children: children }));
|
|
2585
2480
|
}
|
|
2586
2481
|
const RlsDatatableFloating = require$$0.memo(RlsDatatableFloatingComponent);
|
|
2587
2482
|
|
|
2588
2483
|
function RlsDropdownComponent({ children, controller, rlsTheme }) {
|
|
2589
|
-
const className =
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
});
|
|
2593
|
-
}, [controller.visible]);
|
|
2484
|
+
const className = renderClassStatus('rls-dropdown', {
|
|
2485
|
+
visible: controller.visible
|
|
2486
|
+
});
|
|
2594
2487
|
require$$0.useEffect(() => {
|
|
2595
2488
|
function onCloseDropdown({ target }) {
|
|
2596
2489
|
if (!controller.component.current.contains(target)) {
|
|
@@ -2928,22 +2821,13 @@ function RlsFieldAutocompleteTemplateComponent(props) {
|
|
|
2928
2821
|
const disabled = require$$0.useMemo(() => {
|
|
2929
2822
|
return formControl?.disabled || props.disabled;
|
|
2930
2823
|
}, [formControl?.disabled, props.disabled]);
|
|
2931
|
-
const className =
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
}, `rls-field-list rls-field-autocomplete ${props.className ?? ''}`);
|
|
2939
|
-
}, [
|
|
2940
|
-
formControl?.wrong,
|
|
2941
|
-
autocomplete.value,
|
|
2942
|
-
autocomplete.focused,
|
|
2943
|
-
props.className,
|
|
2944
|
-
props.readOnly,
|
|
2945
|
-
disabled
|
|
2946
|
-
]);
|
|
2824
|
+
const className = renderClassStatus('rls-field-box', {
|
|
2825
|
+
focused: autocomplete.focused && !disabled,
|
|
2826
|
+
error: formControl?.wrong,
|
|
2827
|
+
disabled,
|
|
2828
|
+
readonly: props.readOnly,
|
|
2829
|
+
selected: !!autocomplete.value
|
|
2830
|
+
}, `rls-field-list rls-field-autocomplete ${props.className ?? ''}`);
|
|
2947
2831
|
const onClickPattern = require$$0.useCallback(() => {
|
|
2948
2832
|
onSearch?.(autocomplete.pattern);
|
|
2949
2833
|
}, [onSearch, autocomplete.pattern]);
|
|
@@ -2985,9 +2869,7 @@ function RlsFieldAutocompleteComponent(props) {
|
|
|
2985
2869
|
const RlsFieldAutocomplete = require$$0.memo(RlsFieldAutocompleteComponent);
|
|
2986
2870
|
|
|
2987
2871
|
function RlsModalComponent({ autoclose, children, className, controller, onBackdrop, visible, rlsTheme }) {
|
|
2988
|
-
const classNameModal =
|
|
2989
|
-
return renderClassStatus('rls-modal', { visible: controller?.visible ?? visible }, className);
|
|
2990
|
-
}, [className, visible, controller?.visible]);
|
|
2872
|
+
const classNameModal = renderClassStatus('rls-modal', { visible: controller?.visible ?? visible }, className);
|
|
2991
2873
|
const onClickBackdrop = require$$0.useCallback(() => {
|
|
2992
2874
|
if (autoclose) {
|
|
2993
2875
|
controller?.close();
|
|
@@ -3058,26 +2940,18 @@ function RlsPickerClockComponent({ formControl, onListener, rlsTheme, time }) {
|
|
|
3058
2940
|
const minuteFormat = require$$0.useMemo(() => {
|
|
3059
2941
|
return formatTime(minute);
|
|
3060
2942
|
}, [minute]);
|
|
3061
|
-
const classNameHour =
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
active: !zoneIsPM
|
|
3074
|
-
});
|
|
3075
|
-
}, [zoneIsPM]);
|
|
3076
|
-
const classNamePM = require$$0.useMemo(() => {
|
|
3077
|
-
return renderClassStatus('rls-picker-clock__zone__value', {
|
|
3078
|
-
active: zoneIsPM
|
|
3079
|
-
});
|
|
3080
|
-
}, [zoneIsPM]);
|
|
2943
|
+
const classNameHour = renderClassStatus('rls-picker-clock__title__value', {
|
|
2944
|
+
active: selectionIsHours
|
|
2945
|
+
});
|
|
2946
|
+
const classNameMinute = renderClassStatus('rls-picker-clock__title__value', {
|
|
2947
|
+
active: !selectionIsHours
|
|
2948
|
+
});
|
|
2949
|
+
const classNameAM = renderClassStatus('rls-picker-clock__zone__value', {
|
|
2950
|
+
active: !zoneIsPM
|
|
2951
|
+
});
|
|
2952
|
+
const classNamePM = renderClassStatus('rls-picker-clock__zone__value', {
|
|
2953
|
+
active: zoneIsPM
|
|
2954
|
+
});
|
|
3081
2955
|
const refreshClockHour = require$$0.useEffectEvent(() => {
|
|
3082
2956
|
refreshClock(hour > 12 ? hour - 12 : hour);
|
|
3083
2957
|
});
|
|
@@ -3215,7 +3089,7 @@ function RlsPickerClockComponent({ formControl, onListener, rlsTheme, time }) {
|
|
|
3215
3089
|
transform: `translate(${DIAL_RADIUS}rem, ${DIAL_RADIUS}rem)`
|
|
3216
3090
|
}, children: [jsxRuntimeExports.jsx("line", { ref: lineElement, className: "rls-picker-clock__canvas__line", x1: "-1", y1: "-1" }), jsxRuntimeExports.jsx("circle", { ref: centerElement, className: "rls-picker-clock__canvas__center", r: "4", cx: "-1", cy: "-1" }), jsxRuntimeExports.jsx("circle", { ref: indicatorElement, className: "rls-picker-clock__canvas__indicator", r: `${TICK_RADIUS}rem` }), jsxRuntimeExports.jsx("circle", { ref: pointElement, className: "rls-picker-clock__canvas__point", r: "3.5" })] }) }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-clock__hours", children: CLOCK_VALUES.map((value) => {
|
|
3217
3091
|
return (jsxRuntimeExports.jsx(RlsPickerClockTick, { value: value, selectionIsHours: selectionIsHours, onValue: onClickValue }, value));
|
|
3218
|
-
}) })] }) }), jsxRuntimeExports.jsxs("div", { className: "rls-picker-clock__footer", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-clock__footer--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.timeActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-clock__footer--today", children: jsxRuntimeExports.jsx(RlsButtonAction, { icon: "timer", onClick: onCurrentTime }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-clock__footer--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "
|
|
3092
|
+
}) })] }) }), jsxRuntimeExports.jsxs("div", { className: "rls-picker-clock__footer", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-clock__footer--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.timeActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-clock__footer--today", children: jsxRuntimeExports.jsx(RlsButtonAction, { icon: "timer", onClick: onCurrentTime }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-clock__footer--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "raised", onClick: onSelect, children: labels.timeActionSelect }) })] })] }));
|
|
3219
3093
|
}
|
|
3220
3094
|
const RlsPickerClock = require$$0.memo(RlsPickerClockComponent);
|
|
3221
3095
|
|
|
@@ -3234,12 +3108,10 @@ function RlsFieldClockComponent({ children, disabled: disabledProps, formControl
|
|
|
3234
3108
|
const disabled = require$$0.useMemo(() => {
|
|
3235
3109
|
return formControl?.disabled || disabledProps;
|
|
3236
3110
|
}, [formControl?.disabled, disabledProps]);
|
|
3237
|
-
const className =
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
});
|
|
3242
|
-
}, [disabled, readOnly]);
|
|
3111
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3112
|
+
disabled,
|
|
3113
|
+
readonly: readOnly
|
|
3114
|
+
});
|
|
3243
3115
|
const timeValue = require$$0.useMemo(() => {
|
|
3244
3116
|
return formControl ? formControl.value : value;
|
|
3245
3117
|
}, [formControl?.value, value]);
|
|
@@ -3275,7 +3147,7 @@ function RlsFieldClockComponent({ children, disabled: disabledProps, formControl
|
|
|
3275
3147
|
formControl?.touch();
|
|
3276
3148
|
setModalIsVisible(false);
|
|
3277
3149
|
}, [formControl, onChange]);
|
|
3278
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-clock", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("input", { className: "rls-field-clock__control", type: "text", value: status.valueInput, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: status.icon, onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModalClock, { visible: modalIsVisible, time: time, disabled: disabled, onClose: onCloseModal, rlsTheme: rlsTheme })] }));
|
|
3150
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-clock", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("input", { className: "rls-field-clock__control", type: "text", value: status.valueInput, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: status.icon, onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModalClock, { visible: modalIsVisible, formControl: formControl, time: time, disabled: disabled, onClose: onCloseModal, rlsTheme: rlsTheme })] }));
|
|
3279
3151
|
}
|
|
3280
3152
|
const RlsFieldClock = require$$0.memo(RlsFieldClockComponent);
|
|
3281
3153
|
|
|
@@ -3487,7 +3359,7 @@ function RlsPickerColorComponent({ color, formControl, onListener, rlsTheme }) {
|
|
|
3487
3359
|
return (jsxRuntimeExports.jsxs("div", { className: "rls-picker-color", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-color__preview", children: jsxRuntimeExports.jsx("div", { ref: canvasRef, className: "rls-picker-color__canvas", style: canvasStyle, "data-slider": "canvas", onMouseDown: onMouseDown, onMouseMove: onMouseMove, onMouseUp: onInactiveSelection, onMouseLeave: onInactiveSelection, onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onInactiveSelection, children: jsxRuntimeExports.jsx("div", { className: "rls-picker-color__indicator", style: {
|
|
3488
3360
|
left: indicatorPosition.left,
|
|
3489
3361
|
top: indicatorPosition.top
|
|
3490
|
-
}, children: jsxRuntimeExports.jsx("div", { className: "rls-picker-color__indicator__circle", style: { backgroundColor: hexColor } }) }) }) }), jsxRuntimeExports.jsxs("div", { className: "rls-picker-color__controls", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider", children: jsxRuntimeExports.jsx("div", { ref: hueRef, className: "rls-picker-color__slider__track", style: hueSliderStyle, "data-slider": "hue", onMouseDown: onMouseDown, onMouseMove: onMouseMove, onMouseUp: onInactiveSelection, onMouseLeave: onInactiveSelection, onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onInactiveSelection, children: jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider__thumb", style: hueIndicatorStyle }) }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider", children: jsxRuntimeExports.jsx("div", { ref: alphaRef, className: "rls-picker-color__slider__track rls-picker-color__slider__track--alpha", style: alphaSliderStyle, "data-slider": "alpha", onMouseDown: onMouseDown, onMouseMove: onMouseMove, onMouseUp: onInactiveSelection, onMouseLeave: onInactiveSelection, onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onInactiveSelection, children: jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider__thumb", style: alphaIndicatorStyle }) }) })] }), jsxRuntimeExports.jsx("div", { className: "rls-picker-color__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-picker-color__hex", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-color__hex__swatch", style: { backgroundColor: hexColor } }), jsxRuntimeExports.jsx("span", { className: "rls-picker-color__hex__prefix", children: "#" }), jsxRuntimeExports.jsx("input", { className: "rls-picker-color__hex__input", type: "text", maxLength: 6, value: hexValue, onChange: onHexInputChange, onFocus: onHexFocus, onBlur: onHexBlur, onKeyDown: onHexKeyDown })] }) }), jsxRuntimeExports.jsxs("div", { className: "rls-picker-color__actions", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-color__actions--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.colorActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-color__actions--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "
|
|
3362
|
+
}, children: jsxRuntimeExports.jsx("div", { className: "rls-picker-color__indicator__circle", style: { backgroundColor: hexColor } }) }) }) }), jsxRuntimeExports.jsxs("div", { className: "rls-picker-color__controls", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider", children: jsxRuntimeExports.jsx("div", { ref: hueRef, className: "rls-picker-color__slider__track", style: hueSliderStyle, "data-slider": "hue", onMouseDown: onMouseDown, onMouseMove: onMouseMove, onMouseUp: onInactiveSelection, onMouseLeave: onInactiveSelection, onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onInactiveSelection, children: jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider__thumb", style: hueIndicatorStyle }) }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider", children: jsxRuntimeExports.jsx("div", { ref: alphaRef, className: "rls-picker-color__slider__track rls-picker-color__slider__track--alpha", style: alphaSliderStyle, "data-slider": "alpha", onMouseDown: onMouseDown, onMouseMove: onMouseMove, onMouseUp: onInactiveSelection, onMouseLeave: onInactiveSelection, onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onInactiveSelection, children: jsxRuntimeExports.jsx("div", { className: "rls-picker-color__slider__thumb", style: alphaIndicatorStyle }) }) })] }), jsxRuntimeExports.jsx("div", { className: "rls-picker-color__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-picker-color__hex", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-color__hex__swatch", style: { backgroundColor: hexColor } }), jsxRuntimeExports.jsx("span", { className: "rls-picker-color__hex__prefix", children: "#" }), jsxRuntimeExports.jsx("input", { className: "rls-picker-color__hex__input", type: "text", maxLength: 6, value: hexValue, onChange: onHexInputChange, onFocus: onHexFocus, onBlur: onHexBlur, onKeyDown: onHexKeyDown })] }) }), jsxRuntimeExports.jsxs("div", { className: "rls-picker-color__actions", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-color__actions--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.colorActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-color__actions--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "raised", onClick: onSelect, children: labels.colorActionSelect }) })] })] }));
|
|
3491
3363
|
}
|
|
3492
3364
|
const RlsPickerColor = require$$0.memo(RlsPickerColorComponent);
|
|
3493
3365
|
|
|
@@ -3500,12 +3372,10 @@ function RlsFieldColorComponent({ children, color, disabled: disabledProps, form
|
|
|
3500
3372
|
const disabled = require$$0.useMemo(() => {
|
|
3501
3373
|
return formControl?.disabled || disabledProps;
|
|
3502
3374
|
}, [formControl?.disabled, disabledProps]);
|
|
3503
|
-
const className =
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
});
|
|
3508
|
-
}, [disabled, readOnly]);
|
|
3375
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3376
|
+
disabled,
|
|
3377
|
+
readonly: readOnly
|
|
3378
|
+
});
|
|
3509
3379
|
const displayHex = require$$0.useMemo(() => {
|
|
3510
3380
|
const hex = colorValue && hexIsValid(colorValue) ? colorValue : '';
|
|
3511
3381
|
return normalizeHex(hex);
|
|
@@ -3536,7 +3406,7 @@ function RlsFieldColorComponent({ children, color, disabled: disabledProps, form
|
|
|
3536
3406
|
formControl?.touch();
|
|
3537
3407
|
setModalIsVisible(false);
|
|
3538
3408
|
}, [formControl, onChange]);
|
|
3539
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-color", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [displayHex && (jsxRuntimeExports.jsx("div", { className: "rls-field-color__swatch", style: { backgroundColor: displayHex } })), jsxRuntimeExports.jsx("input", { className: "rls-field-color__control", type: "text", value: displayHex, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: colorValue ? 'trash-2' : 'color-palette', onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModal, { className: "rls-
|
|
3409
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-color", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [displayHex && (jsxRuntimeExports.jsx("div", { className: "rls-field-color__swatch", style: { backgroundColor: displayHex } })), jsxRuntimeExports.jsx("input", { className: "rls-field-color__control", type: "text", value: displayHex, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: colorValue ? 'trash-2' : 'color-palette', onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModal, { className: "rls-modal-color", visible: modalIsVisible, rlsTheme: rlsTheme, children: jsxRuntimeExports.jsx(RlsPickerColor, { formControl: formControl, color: color, disabled: disabled, onListener: onListener }) })] }));
|
|
3540
3410
|
}
|
|
3541
3411
|
const RlsFieldColor = require$$0.memo(RlsFieldColorComponent);
|
|
3542
3412
|
|
|
@@ -3561,13 +3431,11 @@ function RlsPickerDateComponent({ automatic, date, disabled, formControl, maxDat
|
|
|
3561
3431
|
const value = require$$0.useMemo(() => {
|
|
3562
3432
|
return new Date(yearControl.value, monthControl.value, dayControl.value);
|
|
3563
3433
|
}, [yearControl.value, monthControl.value, dayControl.value]);
|
|
3564
|
-
const classNameComponent =
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
});
|
|
3570
|
-
}, [visibility]);
|
|
3434
|
+
const classNameComponent = renderClassStatus('rls-picker-date__component', {
|
|
3435
|
+
day: visibility === 'DAY',
|
|
3436
|
+
month: visibility === 'MONTH',
|
|
3437
|
+
year: visibility === 'YEAR'
|
|
3438
|
+
});
|
|
3571
3439
|
const title = require$$0.useMemo(() => {
|
|
3572
3440
|
return dates.dateFormatTemplate(value, DATE_FORMAT_TITLE);
|
|
3573
3441
|
}, [value]);
|
|
@@ -3621,7 +3489,7 @@ function RlsPickerDateComponent({ automatic, date, disabled, formControl, maxDat
|
|
|
3621
3489
|
value: value
|
|
3622
3490
|
});
|
|
3623
3491
|
}, [formControl, value, onListener]);
|
|
3624
|
-
return (jsxRuntimeExports.jsxs("div", { className: "rls-picker-date", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-picker-date__header", children: [jsxRuntimeExports.jsx(RlsPickerSelectorTitle, { monthControl: monthControl, yearControl: yearControl, date: value, maxDate: maxDate, minDate: minDate, disabled: visibility === 'YEAR', type: 'month', onClick: onVisibilityTitle }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date__title", children: jsxRuntimeExports.jsx("span", { onClick: onVisibilityDay, children: title }) })] }), jsxRuntimeExports.jsxs("div", { className: classNameComponent, children: [jsxRuntimeExports.jsx(RlsPickerDay, { formControl: dayControl, date: value, month: monthControl.value, year: yearControl.value, maxDate: maxDate, minDate: minDate, disabled: disabled }), jsxRuntimeExports.jsx(RlsPickerMonth, { formControl: monthControl, date: value, year: yearControl.value, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay }), jsxRuntimeExports.jsx(RlsPickerYear, { formControl: yearControl, date: value, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay })] }), !automatic && (jsxRuntimeExports.jsx("div", { className: "rls-picker-date__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-picker-date__actions", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-date__actions--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.dateActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date__actions--today", children: jsxRuntimeExports.jsx(RlsButtonAction, { icon: "calendar", onClick: onToday, disabled: itIsDisabledToday }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date__actions--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "
|
|
3492
|
+
return (jsxRuntimeExports.jsxs("div", { className: "rls-picker-date", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-picker-date__header", children: [jsxRuntimeExports.jsx(RlsPickerSelectorTitle, { monthControl: monthControl, yearControl: yearControl, date: value, maxDate: maxDate, minDate: minDate, disabled: visibility === 'YEAR', type: 'month', onClick: onVisibilityTitle }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date__title", children: jsxRuntimeExports.jsx("span", { onClick: onVisibilityDay, children: title }) })] }), jsxRuntimeExports.jsxs("div", { className: classNameComponent, children: [jsxRuntimeExports.jsx(RlsPickerDay, { formControl: dayControl, date: value, month: monthControl.value, year: yearControl.value, maxDate: maxDate, minDate: minDate, disabled: disabled }), jsxRuntimeExports.jsx(RlsPickerMonth, { formControl: monthControl, date: value, year: yearControl.value, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay }), jsxRuntimeExports.jsx(RlsPickerYear, { formControl: yearControl, date: value, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay })] }), !automatic && (jsxRuntimeExports.jsx("div", { className: "rls-picker-date__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-picker-date__actions", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-date__actions--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.dateActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date__actions--today", children: jsxRuntimeExports.jsx(RlsButtonAction, { icon: "calendar", onClick: onToday, disabled: itIsDisabledToday }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date__actions--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "raised", onClick: onSelect, children: labels.dateActionSelect }) })] }) }))] }));
|
|
3625
3493
|
}
|
|
3626
3494
|
const RlsPickerDate = require$$0.memo(RlsPickerDateComponent);
|
|
3627
3495
|
|
|
@@ -3635,18 +3503,16 @@ function RlsModalDateComponent({ automatic, controller, date, disabled, formCont
|
|
|
3635
3503
|
const RlsModalDate = require$$0.memo(RlsModalDateComponent);
|
|
3636
3504
|
|
|
3637
3505
|
function RlsFieldDateComponent({ children, date, disabled: disabledProps, formControl, format, identifier, maxDate, minDate, msgErrorDisabled, onValue, placeholder, readOnly, rlsTheme, value: valueInitial }) {
|
|
3638
|
-
const today = require$$0.
|
|
3506
|
+
const today = require$$0.useMemo(() => new Date(), []);
|
|
3639
3507
|
const [value, setValue] = require$$0.useState(formControl?.value ?? valueInitial);
|
|
3640
3508
|
const [modalIsVisible, setModalIsVisible] = require$$0.useState(false);
|
|
3641
3509
|
const disabled = require$$0.useMemo(() => {
|
|
3642
3510
|
return formControl?.disabled || disabledProps;
|
|
3643
3511
|
}, [formControl?.disabled, disabledProps]);
|
|
3644
|
-
const className =
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
});
|
|
3649
|
-
}, [disabled, readOnly]);
|
|
3512
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3513
|
+
disabled,
|
|
3514
|
+
readonly: readOnly
|
|
3515
|
+
});
|
|
3650
3516
|
const dateValue = require$$0.useMemo(() => {
|
|
3651
3517
|
return formControl ? formControl.value : value;
|
|
3652
3518
|
}, [formControl?.value, value]);
|
|
@@ -3660,7 +3526,7 @@ function RlsFieldDateComponent({ children, date, disabled: disabledProps, formCo
|
|
|
3660
3526
|
}, [dateValue, format]);
|
|
3661
3527
|
require$$0.useEffect(() => {
|
|
3662
3528
|
const dateSecure = components.verifyDateRange({
|
|
3663
|
-
date: formControl?.value ?? date ?? today
|
|
3529
|
+
date: formControl?.value ?? date ?? today,
|
|
3664
3530
|
minDate,
|
|
3665
3531
|
maxDate
|
|
3666
3532
|
});
|
|
@@ -3693,7 +3559,7 @@ function RlsFieldDateComponent({ children, date, disabled: disabledProps, formCo
|
|
|
3693
3559
|
formControl?.touch();
|
|
3694
3560
|
setModalIsVisible(false);
|
|
3695
3561
|
}, [formControl, onChange]);
|
|
3696
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-date", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("input", { className: "rls-field-date__control", type: "text", value: status.label, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: status.icon, onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModalDate, { visible: modalIsVisible, date: date, disabled: disabled, maxDate: maxDate, minDate: minDate, onClose: onCloseModal, rlsTheme: rlsTheme })] }));
|
|
3562
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-date", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("input", { className: "rls-field-date__control", type: "text", value: status.label, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: status.icon, onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModalDate, { visible: modalIsVisible, formControl: formControl, date: date, disabled: disabled, maxDate: maxDate, minDate: minDate, onClose: onCloseModal, rlsTheme: rlsTheme })] }));
|
|
3697
3563
|
}
|
|
3698
3564
|
const RlsFieldDate = require$$0.memo(RlsFieldDateComponent);
|
|
3699
3565
|
|
|
@@ -3727,16 +3593,14 @@ function RlsPickerDateRangeComponent({ automatic, date: datePicker, disabled, fo
|
|
|
3727
3593
|
}
|
|
3728
3594
|
return value;
|
|
3729
3595
|
}, [_date, yearControl.value, monthControl.value]);
|
|
3730
|
-
const classNameComponent =
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
return renderClassStatus('rls-picker-date-range__footer', { automatic });
|
|
3739
|
-
}, [automatic]);
|
|
3596
|
+
const classNameComponent = renderClassStatus('rls-picker-date-range__component', {
|
|
3597
|
+
day: visibility === 'DAY',
|
|
3598
|
+
month: visibility === 'MONTH',
|
|
3599
|
+
year: visibility === 'YEAR'
|
|
3600
|
+
});
|
|
3601
|
+
const classNameFooter = renderClassStatus('rls-picker-date-range__footer', {
|
|
3602
|
+
automatic
|
|
3603
|
+
});
|
|
3740
3604
|
const title = require$$0.useMemo(() => rangeFormatTemplate(value), [value]);
|
|
3741
3605
|
require$$0.useEffect(() => {
|
|
3742
3606
|
return i18n.i18nSubscribe(() => {
|
|
@@ -3767,7 +3631,7 @@ function RlsPickerDateRangeComponent({ automatic, date: datePicker, disabled, fo
|
|
|
3767
3631
|
formControl?.setValue(value);
|
|
3768
3632
|
onListener?.({ event: components.PickerListenerEvent.Select, value });
|
|
3769
3633
|
}, [formControl, value, onListener]);
|
|
3770
|
-
return (jsxRuntimeExports.jsxs("div", { className: "rls-picker-date-range", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-picker-date-range__header", children: [jsxRuntimeExports.jsx(RlsPickerSelectorTitle, { monthControl: monthControl, yearControl: yearControl, date: date, maxDate: maxDate, minDate: minDate, disabled: visibility === 'YEAR', type: visibility === 'MONTH' ? 'year' : 'month', onClick: onVisibilityTitle }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__title", children: jsxRuntimeExports.jsx("span", { onClick: onVisibilityDay, children: title }) })] }), jsxRuntimeExports.jsxs("div", { className: classNameComponent, children: [jsxRuntimeExports.jsx(RlsPickerDayRange, { formControl: rangeControl, date: date, maxDate: maxDate, minDate: minDate, disabled: disabled }), jsxRuntimeExports.jsx(RlsPickerMonth, { formControl: monthControl, year: yearControl.value, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay }), jsxRuntimeExports.jsx(RlsPickerYear, { formControl: yearControl, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay })] }), jsxRuntimeExports.jsx("div", { className: classNameFooter, children: jsxRuntimeExports.jsxs("div", { className: "rls-picker-date-range__actions", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__actions--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.dateActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__actions--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "
|
|
3634
|
+
return (jsxRuntimeExports.jsxs("div", { className: "rls-picker-date-range", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-picker-date-range__header", children: [jsxRuntimeExports.jsx(RlsPickerSelectorTitle, { monthControl: monthControl, yearControl: yearControl, date: date, maxDate: maxDate, minDate: minDate, disabled: visibility === 'YEAR', type: visibility === 'MONTH' ? 'year' : 'month', onClick: onVisibilityTitle }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__title", children: jsxRuntimeExports.jsx("span", { onClick: onVisibilityDay, children: title }) })] }), jsxRuntimeExports.jsxs("div", { className: classNameComponent, children: [jsxRuntimeExports.jsx(RlsPickerDayRange, { formControl: rangeControl, date: date, maxDate: maxDate, minDate: minDate, disabled: disabled }), jsxRuntimeExports.jsx(RlsPickerMonth, { formControl: monthControl, year: yearControl.value, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay }), jsxRuntimeExports.jsx(RlsPickerYear, { formControl: yearControl, maxDate: maxDate, minDate: minDate, disabled: disabled, onValue: onVisibilityDay })] }), jsxRuntimeExports.jsx("div", { className: classNameFooter, children: jsxRuntimeExports.jsxs("div", { className: "rls-picker-date-range__actions", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__actions--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "flat", onClick: onCancel, children: labels.dateActionCancel }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__actions--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "raised", onClick: onSelect, children: labels.dateActionSelect }) })] }) })] }));
|
|
3771
3635
|
}
|
|
3772
3636
|
const RlsPickerDateRange = require$$0.memo(RlsPickerDateRangeComponent);
|
|
3773
3637
|
|
|
@@ -3787,12 +3651,10 @@ function RlsFieldDateRangeComponent({ children, date, disabled: disabledProps, f
|
|
|
3787
3651
|
const disabled = require$$0.useMemo(() => {
|
|
3788
3652
|
return formControl?.disabled || disabledProps;
|
|
3789
3653
|
}, [formControl?.disabled, disabledProps]);
|
|
3790
|
-
const className =
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
});
|
|
3795
|
-
}, [disabled, readOnly]);
|
|
3654
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3655
|
+
disabled,
|
|
3656
|
+
readonly: readOnly
|
|
3657
|
+
});
|
|
3796
3658
|
const dateRangeValue = require$$0.useMemo(() => {
|
|
3797
3659
|
return formControl ? formControl.value : value;
|
|
3798
3660
|
}, [formControl?.value, value]);
|
|
@@ -3828,7 +3690,7 @@ function RlsFieldDateRangeComponent({ children, date, disabled: disabledProps, f
|
|
|
3828
3690
|
formControl?.touch();
|
|
3829
3691
|
setModalIsVisible(false);
|
|
3830
3692
|
}, [formControl, onChange]);
|
|
3831
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-date-range", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("input", { className: "rls-field-date-range__control", type: "text", value: status.valueInput, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: status.icon, onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModalDateRange, { visible: modalIsVisible, date: currentDate, disabled: disabled, maxDate: maxDate, minDate: minDate, onClose: onCloseModal, rlsTheme: rlsTheme })] }));
|
|
3693
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-date-range", "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("input", { className: "rls-field-date-range__control", type: "text", value: status.valueInput, readOnly: true, placeholder: placeholder, onClick: onClickInput, disabled: disabled }), !readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: status.icon, onClick: onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }), jsxRuntimeExports.jsx(RlsModalDateRange, { visible: modalIsVisible, formControl: formControl, date: currentDate, disabled: disabled, maxDate: maxDate, minDate: minDate, onClose: onCloseModal, rlsTheme: rlsTheme })] }));
|
|
3832
3694
|
}
|
|
3833
3695
|
const RlsFieldDateRange = require$$0.memo(RlsFieldDateRangeComponent);
|
|
3834
3696
|
|
|
@@ -3970,20 +3832,12 @@ function RlsFieldListInner({ render, suggestions, action, children, formControl,
|
|
|
3970
3832
|
const disabled = require$$0.useMemo(() => {
|
|
3971
3833
|
return formControl?.disabled || props.disabled;
|
|
3972
3834
|
}, [formControl?.disabled, props.disabled]);
|
|
3973
|
-
const className =
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
}, `rls-field-list rls-field-list__multi ${props.className ?? ''}`);
|
|
3980
|
-
}, [
|
|
3981
|
-
formControl?.wrong,
|
|
3982
|
-
fieldList.listIsVisible,
|
|
3983
|
-
props.className,
|
|
3984
|
-
props.readOnly,
|
|
3985
|
-
disabled
|
|
3986
|
-
]);
|
|
3835
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3836
|
+
focused: fieldList.listIsVisible && !disabled,
|
|
3837
|
+
error: formControl?.wrong,
|
|
3838
|
+
disabled,
|
|
3839
|
+
readonly: props.readOnly
|
|
3840
|
+
}, `rls-field-list rls-field-list__multi ${props.className ?? ''}`);
|
|
3987
3841
|
const renderWithCheckbox = require$$0.useCallback((element) => (jsxRuntimeExports.jsxs("div", { className: "rls-field-list__multi__element", children: [jsxRuntimeExports.jsx(RlsCheckBox, { checked: fieldList.isSelected(element) }), render(element)] })), [fieldList.isSelected, render]);
|
|
3988
3842
|
return (jsxRuntimeExports.jsxs("div", { id: props.identifier, ref: fieldList.refContent, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("div", { className: "rls-field-list__multi__chips", onClick: disabled ? undefined : fieldList.onClickInput, children: !fieldList.selected.length && placeholder ? (jsxRuntimeExports.jsx("span", { className: "rls-field-list__multi__placeholder", children: placeholder })) : (fieldList.selected.map((item, index) => (jsxRuntimeExports.jsxs("div", { className: "rls-field-list__multi__chip", children: [jsxRuntimeExports.jsx("span", { className: "rls-field-list__multi__chip__description", children: item.description }), !props.readOnly && (jsxRuntimeExports.jsx("button", { className: "rls-field-list__multi__chip__remove", onClick: fieldList.onRemoveElement(item), disabled: disabled, children: jsxRuntimeExports.jsx(RlsIcon, { value: "close" }) }))] }, index)))) }), !props.readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: "arrow-ios-down", onClick: fieldList.onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl })), jsxRuntimeExports.jsx(RlsFieldListSuggestions, { elements: suggestions, visible: fieldList.listIsVisible, action: action, disabled: disabled, higher: fieldList.higher, render: renderWithCheckbox, refList: fieldList.refList, onClickElement: fieldList.onClickElement, onKeydownElement: fieldList.onKeydownElement, onClickBackdrop: fieldList.onClickBackdrop })] }));
|
|
3989
3843
|
}
|
|
@@ -4113,20 +3967,12 @@ function RlsFieldSelectTemplateComponent(props) {
|
|
|
4113
3967
|
const disabled = require$$0.useMemo(() => {
|
|
4114
3968
|
return formControl?.disabled || props.disabled;
|
|
4115
3969
|
}, [formControl?.disabled, props.disabled]);
|
|
4116
|
-
const className =
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
}, `rls-field-list rls-field-select ${props.className ?? ''}`);
|
|
4123
|
-
}, [
|
|
4124
|
-
formControl?.wrong,
|
|
4125
|
-
select.focused,
|
|
4126
|
-
props.className,
|
|
4127
|
-
props.readOnly,
|
|
4128
|
-
disabled
|
|
4129
|
-
]);
|
|
3970
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3971
|
+
focused: select.focused && !disabled,
|
|
3972
|
+
error: formControl?.wrong,
|
|
3973
|
+
disabled: disabled,
|
|
3974
|
+
readonly: props.readOnly
|
|
3975
|
+
}, `rls-field-list rls-field-select ${props.className ?? ''}`);
|
|
4130
3976
|
return (jsxRuntimeExports.jsxs("div", { id: props.identifier, ref: select.refContent, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx("input", { ref: select.refInput, className: "rls-field-list__control", readOnly: true, placeholder: placeholder, value: select.value, onFocus: select.onFocusInput, onBlur: select.onBlurInput, onClick: select.onClickInput, onKeyDown: select.onKeydownInput, disabled: disabled }), !props.readOnly && (jsxRuntimeExports.jsx(RlsButtonIcon, { icon: !unremovable && !!select.value ? 'close' : 'arrow-ios-down', onClick: select.onClickAction, disabled: disabled }))] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl })), jsxRuntimeExports.jsx(RlsFieldListSuggestions, { elements: suggestions, visible: select.listIsVisible, action: action, disabled: disabled, higher: select.higher, render: render, refList: select.refList, onClickElement: select.onClickElement, onKeydownElement: select.onKeydownElement, onClickBackdrop: select.onClickBackdrop })] }));
|
|
4131
3977
|
}
|
|
4132
3978
|
const RlsFieldSelectTemplate = require$$0.memo(RlsFieldSelectTemplateComponent);
|
|
@@ -4137,9 +3983,7 @@ function RlsFieldSelectComponent(props) {
|
|
|
4137
3983
|
const RlsFieldSelect = require$$0.memo(RlsFieldSelectComponent);
|
|
4138
3984
|
|
|
4139
3985
|
function RlsFormNavigationComponent({ children, className, controller, visible, rlsTheme }) {
|
|
4140
|
-
const classNameForm =
|
|
4141
|
-
return renderClassStatus('rls-form-navigation', { visible: controller?.visible ?? visible }, className);
|
|
4142
|
-
}, [className, visible, controller?.visible]);
|
|
3986
|
+
const classNameForm = renderClassStatus('rls-form-navigation', { visible: controller?.visible ?? visible }, className);
|
|
4143
3987
|
return ReactDOM.createPortal(jsxRuntimeExports.jsx("div", { className: classNameForm, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-form-navigation__component", children: children }) }), document.body);
|
|
4144
3988
|
}
|
|
4145
3989
|
const RlsFormNavigation = require$$0.memo(RlsFormNavigationComponent);
|
|
@@ -4587,9 +4431,7 @@ function RlsImageChooserComponent(props) {
|
|
|
4587
4431
|
const RlsImageChooser = require$$0.memo(RlsImageChooserComponent);
|
|
4588
4432
|
|
|
4589
4433
|
function RlsModalSheetComponent({ autoclose, children, className, controller, onAutoClose, visible, rlsTheme }) {
|
|
4590
|
-
const classNameModal =
|
|
4591
|
-
return renderClassStatus('rls-modal-sheet', { visible: controller?.visible ?? visible }, className);
|
|
4592
|
-
}, [className, visible, controller?.visible]);
|
|
4434
|
+
const classNameModal = renderClassStatus('rls-modal-sheet', { visible: controller?.visible ?? visible }, className);
|
|
4593
4435
|
const onClickBackdrop = require$$0.useCallback(() => {
|
|
4594
4436
|
if (autoclose) {
|
|
4595
4437
|
controller?.close();
|
|
@@ -4607,9 +4449,7 @@ function generateId() {
|
|
|
4607
4449
|
return `rls-notification-${++_id}`;
|
|
4608
4450
|
}
|
|
4609
4451
|
function RlsNotification({ content, icon, onClose, rlsTheme, title, visible }) {
|
|
4610
|
-
const className =
|
|
4611
|
-
return renderClassStatus('rls-notification', { visible });
|
|
4612
|
-
}, [visible]);
|
|
4452
|
+
const className = renderClassStatus('rls-notification', { visible });
|
|
4613
4453
|
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [icon && (jsxRuntimeExports.jsx("div", { className: "rls-notification__avatar", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) })), jsxRuntimeExports.jsxs("div", { className: "rls-notification__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-notification__header", children: [jsxRuntimeExports.jsx("div", { className: "rls-notification__title", children: title }), jsxRuntimeExports.jsx("button", { onClick: onClose, children: jsxRuntimeExports.jsx(RlsIcon, { value: "close" }) })] }), jsxRuntimeExports.jsx("div", { className: "rls-notification__content", children: content })] })] }));
|
|
4614
4454
|
}
|
|
4615
4455
|
function useNotifications() {
|
|
@@ -4640,14 +4480,24 @@ function useNotifications() {
|
|
|
4640
4480
|
const duration = config.duration ?? DURATION_DEFAULT;
|
|
4641
4481
|
setNotifications((notifications) => [
|
|
4642
4482
|
...notifications,
|
|
4643
|
-
{ id, config, visible:
|
|
4483
|
+
{ id, config, visible: false }
|
|
4644
4484
|
]);
|
|
4485
|
+
requestAnimationFrame(() => {
|
|
4486
|
+
requestAnimationFrame(() => {
|
|
4487
|
+
setNotifications((notifications) => notifications.map((notification) => notification.id === id
|
|
4488
|
+
? { ...notification, visible: true }
|
|
4489
|
+
: notification));
|
|
4490
|
+
});
|
|
4491
|
+
});
|
|
4645
4492
|
const timer = setTimeout(() => {
|
|
4646
4493
|
remove(id);
|
|
4647
4494
|
}, duration);
|
|
4648
4495
|
timersRef.current.set(id, timer);
|
|
4649
4496
|
}, [remove]);
|
|
4650
|
-
const
|
|
4497
|
+
const className = renderClassStatus('rls-notifications', {
|
|
4498
|
+
visible: notifications.length > 0
|
|
4499
|
+
});
|
|
4500
|
+
const RlsNotifications = ReactDOM.createPortal(jsxRuntimeExports.jsx("div", { className: className, children: notifications.map((notification) => (jsxRuntimeExports.jsx(RlsNotification, { ...notification.config, visible: notification.visible, onClose: () => remove(notification.id) }, notification.id))) }), document.body);
|
|
4651
4501
|
return {
|
|
4652
4502
|
RlsNotifications,
|
|
4653
4503
|
notify
|
|
@@ -4670,9 +4520,7 @@ function calculateDuration({ length }) {
|
|
|
4670
4520
|
return duration + DURATION_RESET;
|
|
4671
4521
|
}
|
|
4672
4522
|
function RlsSnackbarComponent({ content, onClose, icon, rlsTheme, title, visible }) {
|
|
4673
|
-
const className =
|
|
4674
|
-
return renderClassStatus('rls-snackbar', { visible });
|
|
4675
|
-
}, [visible]);
|
|
4523
|
+
const className = renderClassStatus('rls-snackbar', { visible });
|
|
4676
4524
|
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [icon && (jsxRuntimeExports.jsx("div", { className: "rls-snackbar__avatar", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) })), jsxRuntimeExports.jsxs("div", { className: "rls-snackbar__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-snackbar__header", children: [jsxRuntimeExports.jsx("div", { className: "rls-snackbar__title", children: title }), jsxRuntimeExports.jsx("button", { onClick: onClose, children: jsxRuntimeExports.jsx(RlsIcon, { value: "close" }) })] }), jsxRuntimeExports.jsx("div", { className: "rls-snackbar__content", children: content })] })] }));
|
|
4677
4525
|
}
|
|
4678
4526
|
const RlsSnackbar = require$$0.memo(RlsSnackbarComponent);
|
|
@@ -4735,13 +4583,11 @@ function RlsApplication({ children }) {
|
|
|
4735
4583
|
const [navbarInApp, setNavbarInApp] = require$$0.useState(false);
|
|
4736
4584
|
const [navbarIsCondense, setNavbarIsCondense] = require$$0.useState(false);
|
|
4737
4585
|
const [appIsMobile, setIsMobile] = require$$0.useState(false);
|
|
4738
|
-
const className =
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
});
|
|
4744
|
-
}, [appIsMobile, navbarInApp, navbarIsCondense]);
|
|
4586
|
+
const className = renderClassStatus('rls-app__body', {
|
|
4587
|
+
mobile: appIsMobile,
|
|
4588
|
+
'navbar-snackbar': navbarInApp,
|
|
4589
|
+
'navbar-condense': navbarIsCondense
|
|
4590
|
+
});
|
|
4745
4591
|
const state = require$$0.useMemo(() => ({
|
|
4746
4592
|
confirmation,
|
|
4747
4593
|
notify,
|
|
@@ -4756,7 +4602,7 @@ function RlsApplication({ children }) {
|
|
|
4756
4602
|
const DEFAULT_DESIGN_SYSTEM = 'bordered';
|
|
4757
4603
|
|
|
4758
4604
|
const DESIGN_SYSTEM_PREFIX = 'rls-design-system';
|
|
4759
|
-
const DESIGN_SYSTEMS = ['bordered', 'filled'];
|
|
4605
|
+
const DESIGN_SYSTEMS = ['bordered', 'filled', 'gradient'];
|
|
4760
4606
|
function designSystemClass(designSystem) {
|
|
4761
4607
|
return `${DESIGN_SYSTEM_PREFIX}-${designSystem}`;
|
|
4762
4608
|
}
|