@rolster/react-components 19.7.0 → 19.7.2
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 +265 -420
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/es/index.mjs +265 -420
- 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.js +6 -4
- 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.js +2 -4
- 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,35 @@ 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
542
|
function RlsAvatarComponent({ children, contrasted, rounded, skeleton, rlsTheme }) {
|
|
555
|
-
const className =
|
|
556
|
-
|
|
557
|
-
|
|
543
|
+
const className = renderClassStatus('rls-avatar', {
|
|
544
|
+
contrasted,
|
|
545
|
+
rounded,
|
|
546
|
+
skeleton
|
|
547
|
+
});
|
|
558
548
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
559
549
|
}
|
|
560
550
|
const RlsAvatar = require$$0.memo(RlsAvatarComponent);
|
|
561
551
|
|
|
562
552
|
function RlsBadgeComponent({ children, contrasted, rlsTheme }) {
|
|
563
|
-
const className =
|
|
564
|
-
return renderClassStatus('rls-badge', { contrasted });
|
|
565
|
-
}, [contrasted]);
|
|
553
|
+
const className = renderClassStatus('rls-badge', { contrasted });
|
|
566
554
|
return (jsxRuntimeExports.jsx("span", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
567
555
|
}
|
|
568
556
|
const RlsBadge = require$$0.memo(RlsBadgeComponent);
|
|
569
557
|
|
|
570
558
|
function RlsBreadcrumbLabel({ label }) {
|
|
571
|
-
const className =
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
});
|
|
575
|
-
}, [label.onClick]);
|
|
559
|
+
const className = renderClassStatus('rls-breadcrumb__label__a', {
|
|
560
|
+
actionable: !!label.onClick
|
|
561
|
+
});
|
|
576
562
|
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
563
|
}
|
|
578
564
|
function RlsBreadcrumbComponent({ labels }) {
|
|
@@ -584,9 +570,7 @@ function RlsBreadcrumbComponent({ labels }) {
|
|
|
584
570
|
const RlsBreadcrumb = require$$0.memo(RlsBreadcrumbComponent);
|
|
585
571
|
|
|
586
572
|
function RlsIconComponent({ value, className, rlsTheme, skeleton }) {
|
|
587
|
-
const classNameIcon =
|
|
588
|
-
return renderClassStatus('rls-icon', { skeleton }, className);
|
|
589
|
-
}, [className, skeleton]);
|
|
573
|
+
const classNameIcon = renderClassStatus('rls-icon', { skeleton }, className);
|
|
590
574
|
return (jsxRuntimeExports.jsx("div", { className: classNameIcon, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("i", { className: `rls-icon-${value}` }) }));
|
|
591
575
|
}
|
|
592
576
|
const RlsIcon = require$$0.memo(RlsIconComponent);
|
|
@@ -597,25 +581,19 @@ function RlsSpinnerComponent() {
|
|
|
597
581
|
const RlsSpinner = require$$0.memo(RlsSpinnerComponent);
|
|
598
582
|
|
|
599
583
|
function RlsButtonComponent({ type, children, disabled, identifier, onClick, prefixIcon, requesting, rlsTheme, suffixIcon }) {
|
|
600
|
-
const className =
|
|
601
|
-
return renderClassStatus('rls-button__content', { type });
|
|
602
|
-
}, [type]);
|
|
584
|
+
const className = renderClassStatus('rls-button__content', { type });
|
|
603
585
|
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
586
|
}
|
|
605
587
|
const RlsButton = require$$0.memo(RlsButtonComponent);
|
|
606
588
|
|
|
607
589
|
function RlsButtonActionComponent({ icon, disabled, identifier, onClick, rlsTheme, tooltip, type }) {
|
|
608
|
-
const className =
|
|
609
|
-
return renderClassStatus('rls-button-action', { type });
|
|
610
|
-
}, [type]);
|
|
590
|
+
const className = renderClassStatus('rls-button-action', { type });
|
|
611
591
|
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 }) }))] }));
|
|
612
592
|
}
|
|
613
593
|
const RlsButtonAction = require$$0.memo(RlsButtonActionComponent);
|
|
614
594
|
|
|
615
595
|
function RlsButtonIconComponent({ icon, className, disabled, onClick, skeleton }) {
|
|
616
|
-
const classNameButton =
|
|
617
|
-
return renderClassStatus('rls-button-icon', { skeleton }, className);
|
|
618
|
-
}, [className, skeleton]);
|
|
596
|
+
const classNameButton = renderClassStatus('rls-button-icon', { skeleton }, className);
|
|
619
597
|
return (jsxRuntimeExports.jsx("button", { className: classNameButton, onClick: onClick, disabled: disabled, children: !skeleton && jsxRuntimeExports.jsx(RlsIcon, { value: icon }) }));
|
|
620
598
|
}
|
|
621
599
|
const RlsButtonIcon = require$$0.memo(RlsButtonIconComponent);
|
|
@@ -641,9 +619,7 @@ function RlsButtonOptionComponent({ icon, children, disabled, formControl, ident
|
|
|
641
619
|
onValue,
|
|
642
620
|
value
|
|
643
621
|
});
|
|
644
|
-
const className =
|
|
645
|
-
return renderClassStatus('rls-button-option', { checked });
|
|
646
|
-
}, [checked]);
|
|
622
|
+
const className = renderClassStatus('rls-button-option', { checked });
|
|
647
623
|
const onAction = require$$0.useCallback(() => {
|
|
648
624
|
onSelect();
|
|
649
625
|
onClick?.();
|
|
@@ -653,9 +629,7 @@ function RlsButtonOptionComponent({ icon, children, disabled, formControl, ident
|
|
|
653
629
|
const RlsButtonOption = require$$0.memo(RlsButtonOptionComponent);
|
|
654
630
|
|
|
655
631
|
function RlsCheckBoxComponent({ checked, disabled, identifier, onClick, rlsTheme }) {
|
|
656
|
-
const className =
|
|
657
|
-
return renderClassStatus('rls-checkbox', { checked, disabled });
|
|
658
|
-
}, [checked, disabled]);
|
|
632
|
+
const className = renderClassStatus('rls-checkbox', { checked, disabled });
|
|
659
633
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, onClick: onClick, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx(RlsIcon, { value: "checkmark" }) }));
|
|
660
634
|
}
|
|
661
635
|
const RlsCheckBox = require$$0.memo(RlsCheckBoxComponent);
|
|
@@ -675,9 +649,7 @@ const RlsSkeleton = require$$0.memo(RlsSkeletonComponent);
|
|
|
675
649
|
function RlsImageComponent({ src, rlsTheme }) {
|
|
676
650
|
const [srcIsComplet, setSrcIsComplet] = require$$0.useState(false);
|
|
677
651
|
const refImage = require$$0.useRef(null);
|
|
678
|
-
const className =
|
|
679
|
-
return renderClassStatus('rls-image', { complet: srcIsComplet });
|
|
680
|
-
}, [srcIsComplet]);
|
|
652
|
+
const className = renderClassStatus('rls-image', { complet: srcIsComplet });
|
|
681
653
|
require$$0.useEffect(() => {
|
|
682
654
|
setSrcIsComplet(!!(src && refImage.current?.complete));
|
|
683
655
|
}, [src]);
|
|
@@ -731,12 +703,10 @@ function RlsInputComponent({ children, decimals, disabled, formControl, identifi
|
|
|
731
703
|
setFocused(() => false);
|
|
732
704
|
onBlur?.();
|
|
733
705
|
}, [formControl, onBlur]);
|
|
734
|
-
const className =
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
});
|
|
739
|
-
}, [formControl?.focused, formControl?.disabled, focused, disabled]);
|
|
706
|
+
const className = renderClassStatus('rls-input', {
|
|
707
|
+
disabled: formControl?.disabled || disabled,
|
|
708
|
+
focused: formControl?.focused ?? focused
|
|
709
|
+
});
|
|
740
710
|
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
711
|
}
|
|
742
712
|
const RlsInput = require$$0.memo(RlsInputComponent);
|
|
@@ -746,13 +716,11 @@ function RlsInputCounterComponent({ className, disabled, formControl, identifier
|
|
|
746
716
|
const [value, setValue] = require$$0.useState(formControl?.value ?? valueProp ?? 0);
|
|
747
717
|
const [focused, setFocused] = require$$0.useState(false);
|
|
748
718
|
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]);
|
|
719
|
+
const classNameCounter = renderClassStatus('rls-input-counter', {
|
|
720
|
+
disabled: _disabled,
|
|
721
|
+
focused: formControl?.focused ?? focused,
|
|
722
|
+
readonly: readOnly
|
|
723
|
+
}, className);
|
|
756
724
|
require$$0.useEffect(() => {
|
|
757
725
|
if (!changeIsInternal.current && formControl) {
|
|
758
726
|
const counterValue = formControl.value;
|
|
@@ -867,12 +835,10 @@ function RlsInputPasswordComponent({ disabled, formControl, identifier, onEnter,
|
|
|
867
835
|
formControl?.blur();
|
|
868
836
|
setFocused(() => false);
|
|
869
837
|
}, [formControl]);
|
|
870
|
-
const className =
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
});
|
|
875
|
-
}, [formControl?.focused, formControl?.disabled, focused, disabled]);
|
|
838
|
+
const className = renderClassStatus('rls-input-password', {
|
|
839
|
+
disabled: formControl?.disabled || disabled,
|
|
840
|
+
focused: formControl?.focused ?? focused
|
|
841
|
+
});
|
|
876
842
|
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
843
|
}
|
|
878
844
|
const RlsInputPassword = require$$0.memo(RlsInputPasswordComponent);
|
|
@@ -892,9 +858,7 @@ const RlsInputPercentage = require$$0.memo(RlsInputPercentageComponent);
|
|
|
892
858
|
|
|
893
859
|
function RlsInputSearchComponent({ formControl, disabled, identifier, onEnter, onSearch, placeholder }) {
|
|
894
860
|
const [value, setValue] = require$$0.useState('');
|
|
895
|
-
const className =
|
|
896
|
-
return renderClassStatus('rls-input-search', { disabled });
|
|
897
|
-
}, [disabled]);
|
|
861
|
+
const className = renderClassStatus('rls-input-search', { disabled });
|
|
898
862
|
const onValue = require$$0.useCallback((value) => {
|
|
899
863
|
if (!formControl) {
|
|
900
864
|
setValue(() => value);
|
|
@@ -1265,17 +1229,13 @@ function RlsMessageIconComponent({ icon, children, rlsTheme }) {
|
|
|
1265
1229
|
const RlsMessageIcon = require$$0.memo(RlsMessageIconComponent);
|
|
1266
1230
|
|
|
1267
1231
|
function RlsPosterComponent({ children, contrasted, rlsTheme }) {
|
|
1268
|
-
const className =
|
|
1269
|
-
return renderClassStatus('rls-poster', { contrasted });
|
|
1270
|
-
}, [contrasted]);
|
|
1232
|
+
const className = renderClassStatus('rls-poster', { contrasted });
|
|
1271
1233
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
1272
1234
|
}
|
|
1273
1235
|
const RlsPoster = require$$0.memo(RlsPosterComponent);
|
|
1274
1236
|
|
|
1275
1237
|
function RlsProgressBarComponent({ indeterminate, percentage, rlsTheme }) {
|
|
1276
|
-
const className =
|
|
1277
|
-
return renderClassStatus('rls-progress-bar', { indeterminate });
|
|
1278
|
-
}, [indeterminate]);
|
|
1238
|
+
const className = renderClassStatus('rls-progress-bar', { indeterminate });
|
|
1279
1239
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-progress-bar__component", style: { width: `${percentage ?? 0}%` } }) }));
|
|
1280
1240
|
}
|
|
1281
1241
|
const RlsProgressBar = require$$0.memo(RlsProgressBarComponent);
|
|
@@ -1286,9 +1246,7 @@ function RlsProgressCircularComponent({ rlsTheme }) {
|
|
|
1286
1246
|
const RlsProgressCircular = require$$0.memo(RlsProgressCircularComponent);
|
|
1287
1247
|
|
|
1288
1248
|
function RlsRadioButtonComponent({ checked, disabled, identifier, rlsTheme, onClick }) {
|
|
1289
|
-
const className =
|
|
1290
|
-
return renderClassStatus('rls-radiobutton', { checked, disabled });
|
|
1291
|
-
}, [checked, disabled]);
|
|
1249
|
+
const className = renderClassStatus('rls-radiobutton', { checked, disabled });
|
|
1292
1250
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, onClick: onClick, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-radiobutton__component" }) }));
|
|
1293
1251
|
}
|
|
1294
1252
|
const RlsRadioButton = require$$0.memo(RlsRadioButtonComponent);
|
|
@@ -1299,9 +1257,11 @@ function RlsSkeletonTextComponent({ active, children, rlsTheme }) {
|
|
|
1299
1257
|
const RlsSkeletonText = require$$0.memo(RlsSkeletonTextComponent);
|
|
1300
1258
|
|
|
1301
1259
|
function RlsSwitchComponent({ checked, capsule, disabled, identifier, onClick, rlsTheme }) {
|
|
1302
|
-
const className =
|
|
1303
|
-
|
|
1304
|
-
|
|
1260
|
+
const className = renderClassStatus('rls-switch', {
|
|
1261
|
+
checked,
|
|
1262
|
+
capsule,
|
|
1263
|
+
disabled
|
|
1264
|
+
});
|
|
1305
1265
|
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
1266
|
}
|
|
1307
1267
|
const RlsSwitch = require$$0.memo(RlsSwitchComponent);
|
|
@@ -1318,9 +1278,7 @@ function RlsAccordionComponent({ bordered, children, className, disabled, identi
|
|
|
1318
1278
|
const [animating, setAnimating] = require$$0.useState(false);
|
|
1319
1279
|
const contentRef = require$$0.useRef(null);
|
|
1320
1280
|
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]);
|
|
1281
|
+
const classNameAccordion = renderClassStatus('rls-accordion', { bordered, disabled, open, animating }, className);
|
|
1324
1282
|
const onClickHeader = require$$0.useCallback(() => {
|
|
1325
1283
|
if (!disabled) {
|
|
1326
1284
|
setOpen((current) => {
|
|
@@ -1369,17 +1327,13 @@ function RlsAccordionComponent({ bordered, children, className, disabled, identi
|
|
|
1369
1327
|
const RlsAccordion = require$$0.memo(RlsAccordionComponent);
|
|
1370
1328
|
|
|
1371
1329
|
function RlsAlertComponent({ bordered, children, icon, identifier, rlsTheme }) {
|
|
1372
|
-
const className =
|
|
1373
|
-
return renderClassStatus('rls-alert', { bordered });
|
|
1374
|
-
}, [bordered]);
|
|
1330
|
+
const className = renderClassStatus('rls-alert', { bordered });
|
|
1375
1331
|
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
1332
|
}
|
|
1377
1333
|
const RlsAlert = require$$0.memo(RlsAlertComponent);
|
|
1378
1334
|
|
|
1379
1335
|
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]);
|
|
1336
|
+
const classNameBallot = renderClassStatus('rls-ballot', { bordered, skeleton }, className);
|
|
1383
1337
|
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
1338
|
}
|
|
1385
1339
|
const RlsBallot = require$$0.memo(RlsBallotComponent);
|
|
@@ -1390,9 +1344,7 @@ function RlsBodyComponent({ children, identifier, rlsTheme }) {
|
|
|
1390
1344
|
const RlsBody = require$$0.memo(RlsBodyComponent);
|
|
1391
1345
|
|
|
1392
1346
|
function RlsButtonProgressComponent({ icon, disabled, onClick, progressing, rlsTheme }) {
|
|
1393
|
-
const className =
|
|
1394
|
-
return renderClassStatus('rls-button-progress', { progressing });
|
|
1395
|
-
}, [progressing]);
|
|
1347
|
+
const className = renderClassStatus('rls-button-progress', { progressing });
|
|
1396
1348
|
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
1349
|
}
|
|
1398
1350
|
const RlsButtonProgress = require$$0.memo(RlsButtonProgressComponent);
|
|
@@ -1423,12 +1375,10 @@ function RlsButtonToggleComponent({ onAction, options, type, automatic, disabled
|
|
|
1423
1375
|
document.removeEventListener('click', onCloseMenu);
|
|
1424
1376
|
};
|
|
1425
1377
|
}, []);
|
|
1426
|
-
const classNameList =
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
});
|
|
1431
|
-
}, [visible]);
|
|
1378
|
+
const classNameList = renderClassStatus('rls-button-toggle__list', {
|
|
1379
|
+
hide: !visible,
|
|
1380
|
+
visible
|
|
1381
|
+
});
|
|
1432
1382
|
const onClickMenu = require$$0.useCallback(() => {
|
|
1433
1383
|
setVisible((visible) => !visible);
|
|
1434
1384
|
}, []);
|
|
@@ -1590,14 +1540,12 @@ function RlsFieldAreaComponent(props) {
|
|
|
1590
1540
|
const disabled = require$$0.useMemo(() => {
|
|
1591
1541
|
return formControl?.disabled || props.disabled;
|
|
1592
1542
|
}, [formControl?.disabled, props.disabled]);
|
|
1593
|
-
const className =
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
}, 'rls-field-area');
|
|
1600
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1543
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1544
|
+
disabled,
|
|
1545
|
+
error: formControl?.wrong,
|
|
1546
|
+
focused: formControl?.focused && !disabled,
|
|
1547
|
+
readonly: props.readOnly
|
|
1548
|
+
}, 'rls-field-area');
|
|
1601
1549
|
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
1550
|
}
|
|
1603
1551
|
const RlsFieldArea = require$$0.memo(RlsFieldAreaComponent);
|
|
@@ -1607,14 +1555,12 @@ function RlsFieldDecimalComponent(props) {
|
|
|
1607
1555
|
const disabled = require$$0.useMemo(() => {
|
|
1608
1556
|
return formControl?.disabled || props.disabled;
|
|
1609
1557
|
}, [formControl?.disabled, props.disabled]);
|
|
1610
|
-
const className =
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
}, 'rls-field-decimal');
|
|
1617
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1558
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1559
|
+
disabled,
|
|
1560
|
+
error: formControl?.wrong,
|
|
1561
|
+
focused: formControl?.focused && !disabled,
|
|
1562
|
+
readonly: props.readOnly
|
|
1563
|
+
}, 'rls-field-decimal');
|
|
1618
1564
|
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
1565
|
}
|
|
1620
1566
|
const RlsFieldDecimal = require$$0.memo(RlsFieldDecimalComponent);
|
|
@@ -1622,12 +1568,12 @@ const RlsFieldDecimal = require$$0.memo(RlsFieldDecimalComponent);
|
|
|
1622
1568
|
function RlsFieldFileComponent({ accept, children, disabled: _disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder, readOnly, rlsTheme, value }) {
|
|
1623
1569
|
const inputRef = require$$0.useRef(null);
|
|
1624
1570
|
const disabled = require$$0.useMemo(() => formControl?.disabled || _disabled, [formControl?.disabled, _disabled]);
|
|
1625
|
-
const className =
|
|
1571
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1626
1572
|
disabled,
|
|
1627
1573
|
error: formControl?.wrong,
|
|
1628
1574
|
focused: formControl?.focused && !disabled,
|
|
1629
1575
|
readonly: readOnly
|
|
1630
|
-
}, 'rls-field-file')
|
|
1576
|
+
}, 'rls-field-file');
|
|
1631
1577
|
const currentFile = require$$0.useMemo(() => formControl?.value ?? value, [formControl?.value, value]);
|
|
1632
1578
|
const displayValue = require$$0.useMemo(() => {
|
|
1633
1579
|
return currentFile?.name ?? '';
|
|
@@ -1708,13 +1654,11 @@ function RlsFieldListSuggestionsComponent({ elements, action, disabled, higher,
|
|
|
1708
1654
|
});
|
|
1709
1655
|
});
|
|
1710
1656
|
}, []);
|
|
1711
|
-
const className =
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
});
|
|
1717
|
-
}, [disabled, higher, visible]);
|
|
1657
|
+
const className = renderClassStatus('rls-field-list__suggestions', {
|
|
1658
|
+
disabled,
|
|
1659
|
+
higher,
|
|
1660
|
+
visible
|
|
1661
|
+
});
|
|
1718
1662
|
const onChangePattern = require$$0.useCallback((event) => {
|
|
1719
1663
|
searchControl?.onChange(event.target.value);
|
|
1720
1664
|
}, [searchControl?.onChange]);
|
|
@@ -1734,14 +1678,12 @@ function RlsFieldMoneyComponent(props) {
|
|
|
1734
1678
|
const disabled = require$$0.useMemo(() => {
|
|
1735
1679
|
return formControl?.disabled || props.disabled;
|
|
1736
1680
|
}, [formControl?.disabled, props.disabled]);
|
|
1737
|
-
const className =
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
}, 'rls-field-money');
|
|
1744
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1681
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1682
|
+
disabled,
|
|
1683
|
+
error: formControl?.wrong,
|
|
1684
|
+
focused: formControl?.focused && !disabled,
|
|
1685
|
+
readonly: props.readOnly
|
|
1686
|
+
}, 'rls-field-money');
|
|
1745
1687
|
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
1688
|
}
|
|
1747
1689
|
const RlsFieldMoney = require$$0.memo(RlsFieldMoneyComponent);
|
|
@@ -1751,14 +1693,12 @@ function RlsFieldNumberComponent(props) {
|
|
|
1751
1693
|
const disabled = require$$0.useMemo(() => {
|
|
1752
1694
|
return formControl?.disabled || props.disabled;
|
|
1753
1695
|
}, [formControl?.disabled, props.disabled]);
|
|
1754
|
-
const className =
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
}, 'rls-field-number');
|
|
1761
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1696
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1697
|
+
disabled,
|
|
1698
|
+
error: formControl?.wrong,
|
|
1699
|
+
focused: formControl?.focused && !disabled,
|
|
1700
|
+
readonly: props.readOnly
|
|
1701
|
+
}, 'rls-field-number');
|
|
1762
1702
|
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
1703
|
}
|
|
1764
1704
|
const RlsFieldNumber = require$$0.memo(RlsFieldNumberComponent);
|
|
@@ -1769,14 +1709,12 @@ function RlsFieldPasswordComponent(props) {
|
|
|
1769
1709
|
const disabled = require$$0.useMemo(() => {
|
|
1770
1710
|
return formControl?.disabled || props.disabled;
|
|
1771
1711
|
}, [formControl?.disabled, props.disabled]);
|
|
1772
|
-
const className =
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
}, 'rls-field-password');
|
|
1779
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1712
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1713
|
+
disabled,
|
|
1714
|
+
error: formControl?.wrong,
|
|
1715
|
+
focused: formControl?.focused && !disabled,
|
|
1716
|
+
readonly: props.readOnly
|
|
1717
|
+
}, 'rls-field-password');
|
|
1780
1718
|
const onTogglePassword = require$$0.useCallback(() => {
|
|
1781
1719
|
setPasswordIsActive((password) => !password);
|
|
1782
1720
|
}, []);
|
|
@@ -1789,14 +1727,12 @@ function RlsFieldPercentageComponent(props) {
|
|
|
1789
1727
|
const disabled = require$$0.useMemo(() => {
|
|
1790
1728
|
return formControl?.disabled || props.disabled;
|
|
1791
1729
|
}, [formControl?.disabled, props.disabled]);
|
|
1792
|
-
const className =
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
}, 'rls-field-percentage');
|
|
1799
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1730
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1731
|
+
disabled,
|
|
1732
|
+
error: formControl?.wrong,
|
|
1733
|
+
focused: formControl?.focused && !disabled,
|
|
1734
|
+
readonly: props.readOnly
|
|
1735
|
+
}, 'rls-field-percentage');
|
|
1800
1736
|
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
1737
|
}
|
|
1802
1738
|
const RlsFieldPercentage = require$$0.memo(RlsFieldPercentageComponent);
|
|
@@ -1811,14 +1747,12 @@ function RlsFieldTextComponent(props) {
|
|
|
1811
1747
|
const disabled = require$$0.useMemo(() => {
|
|
1812
1748
|
return formControl?.disabled || props.disabled;
|
|
1813
1749
|
}, [formControl?.disabled, props.disabled]);
|
|
1814
|
-
const className =
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
}, 'rls-field-text');
|
|
1821
|
-
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1750
|
+
const className = renderClassStatus('rls-field-box', {
|
|
1751
|
+
disabled,
|
|
1752
|
+
error: formControl?.wrong,
|
|
1753
|
+
focused: formControl?.focused && !disabled,
|
|
1754
|
+
readonly: props.readOnly
|
|
1755
|
+
}, 'rls-field-text');
|
|
1822
1756
|
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
1757
|
}
|
|
1824
1758
|
const RlsFieldText = require$$0.memo(RlsFieldTextComponent);
|
|
@@ -1848,13 +1782,11 @@ function RlsLabelCheckBoxComponent({ children, disabled, extended, identifier, f
|
|
|
1848
1782
|
disabled,
|
|
1849
1783
|
formControl
|
|
1850
1784
|
});
|
|
1851
|
-
const className =
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
});
|
|
1857
|
-
}, [disabled, extended, reverse]);
|
|
1785
|
+
const className = renderClassStatus('rls-label-checkbox', {
|
|
1786
|
+
disabled,
|
|
1787
|
+
extended,
|
|
1788
|
+
reverse
|
|
1789
|
+
});
|
|
1858
1790
|
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
1791
|
}
|
|
1860
1792
|
const RlsLabelCheckBox = require$$0.memo(RlsLabelCheckBoxComponent);
|
|
@@ -1866,13 +1798,11 @@ function RlsLabelRadioButtonComponent({ children, disabled, extended, identifier
|
|
|
1866
1798
|
onValue,
|
|
1867
1799
|
value
|
|
1868
1800
|
});
|
|
1869
|
-
const className =
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
});
|
|
1875
|
-
}, [disabled, extended, reverse]);
|
|
1801
|
+
const className = renderClassStatus('rls-label-radiobutton', {
|
|
1802
|
+
disabled,
|
|
1803
|
+
extended,
|
|
1804
|
+
reverse
|
|
1805
|
+
});
|
|
1876
1806
|
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
1807
|
}
|
|
1878
1808
|
const RlsLabelRadioButton = require$$0.memo(RlsLabelRadioButtonComponent);
|
|
@@ -1882,21 +1812,17 @@ function RlsLabelSwitchComponent({ capsule, children, disabled, extended, identi
|
|
|
1882
1812
|
disabled,
|
|
1883
1813
|
formControl
|
|
1884
1814
|
});
|
|
1885
|
-
const className =
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
});
|
|
1891
|
-
}, [disabled, extended, reverse]);
|
|
1815
|
+
const className = renderClassStatus('rls-label-switch', {
|
|
1816
|
+
disabled,
|
|
1817
|
+
extended,
|
|
1818
|
+
reverse
|
|
1819
|
+
});
|
|
1892
1820
|
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
1821
|
}
|
|
1894
1822
|
const RlsLabelSwitch = require$$0.memo(RlsLabelSwitchComponent);
|
|
1895
1823
|
|
|
1896
1824
|
function RlsMessageEmptyComponent({ children, className, emoji, icon, identifier, image, rlsTheme, title }) {
|
|
1897
|
-
const classNameMessageEmpty =
|
|
1898
|
-
return renderClassStatus('rls-message-empty', {}, className);
|
|
1899
|
-
}, [className]);
|
|
1825
|
+
const classNameMessageEmpty = renderClassStatus('rls-message-empty', {}, className);
|
|
1900
1826
|
const logo = require$$0.useMemo(() => {
|
|
1901
1827
|
if (icon) {
|
|
1902
1828
|
return (jsxRuntimeExports.jsx("div", { className: "rls-message-empty__logo", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) }));
|
|
@@ -1930,7 +1856,9 @@ function RlsNavbarMenuComponent({ options, onOption }) {
|
|
|
1930
1856
|
const RlsNavbarMenu = require$$0.memo(RlsNavbarMenuComponent);
|
|
1931
1857
|
|
|
1932
1858
|
function PageButton({ page, onSelect }) {
|
|
1933
|
-
const className =
|
|
1859
|
+
const className = renderClassStatus('rls-pagination__page', {
|
|
1860
|
+
active: page.active
|
|
1861
|
+
});
|
|
1934
1862
|
const onClick = require$$0.useCallback(() => {
|
|
1935
1863
|
onSelect(page);
|
|
1936
1864
|
}, [page, onSelect]);
|
|
@@ -1984,15 +1912,13 @@ function RlsPickerDayHeaders() {
|
|
|
1984
1912
|
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
1913
|
}
|
|
1986
1914
|
function RlsPickerDayElement({ day, onSelect, disabled }) {
|
|
1987
|
-
const className =
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
});
|
|
1995
|
-
}, [day, disabled]);
|
|
1915
|
+
const className = renderClassStatus('rls-picker-day__element', {
|
|
1916
|
+
disabled: day.disabled || disabled,
|
|
1917
|
+
focused: day.focused,
|
|
1918
|
+
forbidden: day.forbidden,
|
|
1919
|
+
selected: day.selected,
|
|
1920
|
+
today: day.today
|
|
1921
|
+
});
|
|
1996
1922
|
const onClick = require$$0.useCallback(() => {
|
|
1997
1923
|
if (day.value && !day.disabled && !disabled) {
|
|
1998
1924
|
onSelect(day.value);
|
|
@@ -2059,15 +1985,13 @@ function RlsPickerDayRangeHeaders() {
|
|
|
2059
1985
|
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
1986
|
}
|
|
2061
1987
|
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]);
|
|
1988
|
+
const className = renderClassStatus('rls-picker-day-range__element', {
|
|
1989
|
+
disabled: day.disabled || disabled,
|
|
1990
|
+
end: day.end,
|
|
1991
|
+
forbidden: day.forbidden,
|
|
1992
|
+
ranged: day.ranged,
|
|
1993
|
+
source: day.source
|
|
1994
|
+
});
|
|
2071
1995
|
const onClick = require$$0.useCallback(() => {
|
|
2072
1996
|
if (day.value && !day.disabled && !disabled) {
|
|
2073
1997
|
onSelect(day.value);
|
|
@@ -2120,13 +2044,11 @@ function RlsPickerMonthElement({ month, onSelect, disabled }) {
|
|
|
2120
2044
|
setLabel(dates.MONTH_NAMES(month.value));
|
|
2121
2045
|
});
|
|
2122
2046
|
}, []);
|
|
2123
|
-
const className =
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
});
|
|
2129
|
-
}, [month.disabled, month.focused, month.selected, disabled]);
|
|
2047
|
+
const className = renderClassStatus('rls-picker-month__component', {
|
|
2048
|
+
disabled: month.disabled || disabled,
|
|
2049
|
+
focused: month.focused,
|
|
2050
|
+
selected: month.selected
|
|
2051
|
+
});
|
|
2130
2052
|
const onClick = require$$0.useCallback(() => {
|
|
2131
2053
|
if (commons.valueIsDefined(month.value) && !month.disabled && !disabled) {
|
|
2132
2054
|
onSelect(month.value);
|
|
@@ -2264,13 +2186,11 @@ function RlsPickerSelectorTitleComponent({ monthControl, type, yearControl, date
|
|
|
2264
2186
|
const RlsPickerSelectorTitle = require$$0.memo(RlsPickerSelectorTitleComponent);
|
|
2265
2187
|
|
|
2266
2188
|
function RlsPickerYearElement({ onSelect, year, disabled }) {
|
|
2267
|
-
const className =
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
});
|
|
2273
|
-
}, [year.disabled, year.focused, year.selected, disabled]);
|
|
2189
|
+
const className = renderClassStatus('rls-picker-year__element', {
|
|
2190
|
+
disabled: year.disabled || disabled,
|
|
2191
|
+
focused: year.focused,
|
|
2192
|
+
selected: year.selected
|
|
2193
|
+
});
|
|
2274
2194
|
const onClick = require$$0.useCallback(() => {
|
|
2275
2195
|
if (year.value && !year.disabled && !disabled) {
|
|
2276
2196
|
onSelect(year.value);
|
|
@@ -2346,13 +2266,11 @@ function RlsSliderComponent({ children, className, disabled, formControl, identi
|
|
|
2346
2266
|
const refTrack = require$$0.useRef(null);
|
|
2347
2267
|
const refTrackOn = require$$0.useRef(null);
|
|
2348
2268
|
const refThumb = require$$0.useRef(null);
|
|
2349
|
-
const classNameSlider =
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
}, className);
|
|
2355
|
-
}, [valueSlider, minValueSlider, maxValueSlider, disabled]);
|
|
2269
|
+
const classNameSlider = renderClassStatus('rls-slider', {
|
|
2270
|
+
complet: valueSlider === maxValueSlider,
|
|
2271
|
+
disabled: disabled,
|
|
2272
|
+
empty: valueSlider === minValueSlider
|
|
2273
|
+
}, className);
|
|
2356
2274
|
require$$0.useEffect(() => {
|
|
2357
2275
|
const valueInitial = formControl?.value ?? value ?? 0;
|
|
2358
2276
|
refThumb.current.style.left = `${rate}%`;
|
|
@@ -2382,12 +2300,10 @@ function RlsSliderComponent({ children, className, disabled, formControl, identi
|
|
|
2382
2300
|
const RlsSlider = require$$0.memo(RlsSliderComponent);
|
|
2383
2301
|
|
|
2384
2302
|
function RlsTab({ onSelect, tab, value }) {
|
|
2385
|
-
const className =
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
});
|
|
2390
|
-
}, [tab, value]);
|
|
2303
|
+
const className = renderClassStatus('rls-tabs__children', {
|
|
2304
|
+
active: tab.value === value,
|
|
2305
|
+
disabled: tab.disabled
|
|
2306
|
+
});
|
|
2391
2307
|
const onClick = require$$0.useCallback(() => {
|
|
2392
2308
|
if (!tab.disabled) {
|
|
2393
2309
|
onSelect(tab.value);
|
|
@@ -2419,9 +2335,7 @@ function RlsToolbarComponent({ actions, children, subtitle }) {
|
|
|
2419
2335
|
const RlsToolbar = require$$0.memo(RlsToolbarComponent);
|
|
2420
2336
|
|
|
2421
2337
|
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]);
|
|
2338
|
+
const classNameSheet = renderClassStatus('rls-bottom-sheet', { visible: controller?.visible ?? visible }, className);
|
|
2425
2339
|
const onClickBackdrop = require$$0.useCallback(() => {
|
|
2426
2340
|
if (autoclose) {
|
|
2427
2341
|
controller?.close();
|
|
@@ -2433,9 +2347,7 @@ function RlsBottomSheetComponent({ autoclose, children, className, controller, o
|
|
|
2433
2347
|
const RlsBottomSheet = require$$0.memo(RlsBottomSheetComponent);
|
|
2434
2348
|
|
|
2435
2349
|
function RlsCardComponent({ children, className, outline, rlsTheme }) {
|
|
2436
|
-
const classNameCard =
|
|
2437
|
-
return renderClassStatus('rls-card', { outline }, className);
|
|
2438
|
-
}, [outline, className]);
|
|
2350
|
+
const classNameCard = renderClassStatus('rls-card', { outline }, className);
|
|
2439
2351
|
return (jsxRuntimeExports.jsx("div", { className: classNameCard, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-card__content", children: children }) }));
|
|
2440
2352
|
}
|
|
2441
2353
|
const RlsCard = require$$0.memo(RlsCardComponent);
|
|
@@ -2449,9 +2361,7 @@ class ConfirmationResult extends commons.SealedPartial {
|
|
|
2449
2361
|
}
|
|
2450
2362
|
}
|
|
2451
2363
|
function RlsConfirmationComponent({ approved, className, content, reject, rlsTheme, subtitle, title, visible }) {
|
|
2452
|
-
const classConfirmation =
|
|
2453
|
-
return renderClassStatus('rls-confirmation', { visible }, className);
|
|
2454
|
-
}, [visible, className]);
|
|
2364
|
+
const classConfirmation = renderClassStatus('rls-confirmation', { visible }, className);
|
|
2455
2365
|
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
2366
|
}
|
|
2457
2367
|
const RlsConfirmation = require$$0.memo(RlsConfirmationComponent);
|
|
@@ -2481,7 +2391,7 @@ function useConfirmation() {
|
|
|
2481
2391
|
setVisible(false);
|
|
2482
2392
|
resolve(ConfirmationResult.reject());
|
|
2483
2393
|
},
|
|
2484
|
-
type: options.reject.type ?? '
|
|
2394
|
+
type: options.reject.type ?? 'flat',
|
|
2485
2395
|
disabled: options.reject.disabled,
|
|
2486
2396
|
identifier: options.reject.identifier,
|
|
2487
2397
|
rlsTheme: options.reject.rlsTheme
|
|
@@ -2522,12 +2432,10 @@ function useDatatable(table) {
|
|
|
2522
2432
|
|
|
2523
2433
|
function RlsDatatableComponent({ children, footer, header, identifier, rlsTheme, resizable, summary, table, toolbar }) {
|
|
2524
2434
|
const datatable = useDatatable(table);
|
|
2525
|
-
const className =
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
});
|
|
2530
|
-
}, [resizable, datatable.scrolleable]);
|
|
2435
|
+
const className = renderClassStatus('rls-datatable', {
|
|
2436
|
+
resizable,
|
|
2437
|
+
scrolleable: resizable && datatable?.scrolleable
|
|
2438
|
+
});
|
|
2531
2439
|
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
2440
|
}
|
|
2533
2441
|
const RlsDatatable = require$$0.memo(RlsDatatableComponent);
|
|
@@ -2536,61 +2444,45 @@ function RlsDatatableHeaderComponent({ children, identifier, rlsTheme }) {
|
|
|
2536
2444
|
}
|
|
2537
2445
|
const RlsDatatableHeader = require$$0.memo(RlsDatatableHeaderComponent);
|
|
2538
2446
|
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]);
|
|
2447
|
+
const classNameTitle = renderClassStatus('rls-datatable__title', { actions, control, truncated }, className);
|
|
2542
2448
|
return (jsxRuntimeExports.jsx("th", { id: identifier, className: classNameTitle, "rls-theme": rlsTheme, children: children }));
|
|
2543
2449
|
}
|
|
2544
2450
|
const RlsDatatableTitle = require$$0.memo(RlsDatatableTitleComponent);
|
|
2545
2451
|
function RlsDatatableSubheaderComponent({ children, className, identifier, rlsTheme }) {
|
|
2546
|
-
const classNameSubheader =
|
|
2547
|
-
return renderClassStatus('rls-datatable__subheader', {}, className);
|
|
2548
|
-
}, [className]);
|
|
2452
|
+
const classNameSubheader = renderClassStatus('rls-datatable__subheader', {}, className);
|
|
2549
2453
|
return (jsxRuntimeExports.jsx("tr", { id: identifier, className: classNameSubheader, "rls-theme": rlsTheme, children: children }));
|
|
2550
2454
|
}
|
|
2551
2455
|
const RlsDatatableSubheader = require$$0.memo(RlsDatatableSubheaderComponent);
|
|
2552
2456
|
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]);
|
|
2457
|
+
const classNameRecord = renderClassStatus('rls-datatable__record', { error, info, truncated, success, warning }, className);
|
|
2556
2458
|
return (jsxRuntimeExports.jsx("tr", { id: identifier, className: classNameRecord, "rls-theme": rlsTheme, children: children }));
|
|
2557
2459
|
}
|
|
2558
2460
|
const RlsDatatableRecord = require$$0.memo(RlsDatatableRecordComponent);
|
|
2559
2461
|
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]);
|
|
2462
|
+
const classNameTotals = renderClassStatus('rls-datatable__totals', { error, info, truncated, success, warning }, className);
|
|
2563
2463
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: classNameTotals, "rls-theme": rlsTheme, children: children }));
|
|
2564
2464
|
}
|
|
2565
2465
|
const RlsDatatableTotals = require$$0.memo(RlsDatatableTotalsComponent);
|
|
2566
2466
|
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]);
|
|
2467
|
+
const classNameCell = renderClassStatus('rls-datatable__cell', { actions, control, truncated }, className);
|
|
2570
2468
|
return (jsxRuntimeExports.jsx("td", { id: identifier, className: classNameCell, "rls-theme": rlsTheme, children: children }));
|
|
2571
2469
|
}
|
|
2572
2470
|
const RlsDatatableCell = require$$0.memo(RlsDatatableCellComponent);
|
|
2573
2471
|
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]);
|
|
2472
|
+
const classNameData = renderClassStatus('rls-datatable__data', { actions, control, truncated }, className);
|
|
2577
2473
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: classNameData, children: children }));
|
|
2578
2474
|
}
|
|
2579
2475
|
const RlsDatatableData = require$$0.memo(RlsDatatableDataComponent);
|
|
2580
2476
|
function RlsDatatableFloatingComponent({ children, className, identifier, invested, rlsTheme }) {
|
|
2581
|
-
const classNameFloating =
|
|
2582
|
-
return renderClassStatus('rls-datatable__floating', { invested }, className);
|
|
2583
|
-
}, [className, invested]);
|
|
2477
|
+
const classNameFloating = renderClassStatus('rls-datatable__floating', { invested }, className);
|
|
2584
2478
|
return (jsxRuntimeExports.jsx("td", { id: identifier, className: classNameFloating, "rls-theme": rlsTheme, children: children }));
|
|
2585
2479
|
}
|
|
2586
2480
|
const RlsDatatableFloating = require$$0.memo(RlsDatatableFloatingComponent);
|
|
2587
2481
|
|
|
2588
2482
|
function RlsDropdownComponent({ children, controller, rlsTheme }) {
|
|
2589
|
-
const className =
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
});
|
|
2593
|
-
}, [controller.visible]);
|
|
2483
|
+
const className = renderClassStatus('rls-dropdown', {
|
|
2484
|
+
visible: controller.visible
|
|
2485
|
+
});
|
|
2594
2486
|
require$$0.useEffect(() => {
|
|
2595
2487
|
function onCloseDropdown({ target }) {
|
|
2596
2488
|
if (!controller.component.current.contains(target)) {
|
|
@@ -2928,22 +2820,13 @@ function RlsFieldAutocompleteTemplateComponent(props) {
|
|
|
2928
2820
|
const disabled = require$$0.useMemo(() => {
|
|
2929
2821
|
return formControl?.disabled || props.disabled;
|
|
2930
2822
|
}, [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
|
-
]);
|
|
2823
|
+
const className = renderClassStatus('rls-field-box', {
|
|
2824
|
+
focused: autocomplete.focused && !disabled,
|
|
2825
|
+
error: formControl?.wrong,
|
|
2826
|
+
disabled,
|
|
2827
|
+
readonly: props.readOnly,
|
|
2828
|
+
selected: !!autocomplete.value
|
|
2829
|
+
}, `rls-field-list rls-field-autocomplete ${props.className ?? ''}`);
|
|
2947
2830
|
const onClickPattern = require$$0.useCallback(() => {
|
|
2948
2831
|
onSearch?.(autocomplete.pattern);
|
|
2949
2832
|
}, [onSearch, autocomplete.pattern]);
|
|
@@ -2985,9 +2868,7 @@ function RlsFieldAutocompleteComponent(props) {
|
|
|
2985
2868
|
const RlsFieldAutocomplete = require$$0.memo(RlsFieldAutocompleteComponent);
|
|
2986
2869
|
|
|
2987
2870
|
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]);
|
|
2871
|
+
const classNameModal = renderClassStatus('rls-modal', { visible: controller?.visible ?? visible }, className);
|
|
2991
2872
|
const onClickBackdrop = require$$0.useCallback(() => {
|
|
2992
2873
|
if (autoclose) {
|
|
2993
2874
|
controller?.close();
|
|
@@ -3058,26 +2939,18 @@ function RlsPickerClockComponent({ formControl, onListener, rlsTheme, time }) {
|
|
|
3058
2939
|
const minuteFormat = require$$0.useMemo(() => {
|
|
3059
2940
|
return formatTime(minute);
|
|
3060
2941
|
}, [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]);
|
|
2942
|
+
const classNameHour = renderClassStatus('rls-picker-clock__title__value', {
|
|
2943
|
+
active: selectionIsHours
|
|
2944
|
+
});
|
|
2945
|
+
const classNameMinute = renderClassStatus('rls-picker-clock__title__value', {
|
|
2946
|
+
active: !selectionIsHours
|
|
2947
|
+
});
|
|
2948
|
+
const classNameAM = renderClassStatus('rls-picker-clock__zone__value', {
|
|
2949
|
+
active: !zoneIsPM
|
|
2950
|
+
});
|
|
2951
|
+
const classNamePM = renderClassStatus('rls-picker-clock__zone__value', {
|
|
2952
|
+
active: zoneIsPM
|
|
2953
|
+
});
|
|
3081
2954
|
const refreshClockHour = require$$0.useEffectEvent(() => {
|
|
3082
2955
|
refreshClock(hour > 12 ? hour - 12 : hour);
|
|
3083
2956
|
});
|
|
@@ -3215,7 +3088,7 @@ function RlsPickerClockComponent({ formControl, onListener, rlsTheme, time }) {
|
|
|
3215
3088
|
transform: `translate(${DIAL_RADIUS}rem, ${DIAL_RADIUS}rem)`
|
|
3216
3089
|
}, 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
3090
|
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: "
|
|
3091
|
+
}) })] }) }), 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
3092
|
}
|
|
3220
3093
|
const RlsPickerClock = require$$0.memo(RlsPickerClockComponent);
|
|
3221
3094
|
|
|
@@ -3234,12 +3107,10 @@ function RlsFieldClockComponent({ children, disabled: disabledProps, formControl
|
|
|
3234
3107
|
const disabled = require$$0.useMemo(() => {
|
|
3235
3108
|
return formControl?.disabled || disabledProps;
|
|
3236
3109
|
}, [formControl?.disabled, disabledProps]);
|
|
3237
|
-
const className =
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
});
|
|
3242
|
-
}, [disabled, readOnly]);
|
|
3110
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3111
|
+
disabled,
|
|
3112
|
+
readonly: readOnly
|
|
3113
|
+
});
|
|
3243
3114
|
const timeValue = require$$0.useMemo(() => {
|
|
3244
3115
|
return formControl ? formControl.value : value;
|
|
3245
3116
|
}, [formControl?.value, value]);
|
|
@@ -3275,7 +3146,7 @@ function RlsFieldClockComponent({ children, disabled: disabledProps, formControl
|
|
|
3275
3146
|
formControl?.touch();
|
|
3276
3147
|
setModalIsVisible(false);
|
|
3277
3148
|
}, [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 })] }));
|
|
3149
|
+
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
3150
|
}
|
|
3280
3151
|
const RlsFieldClock = require$$0.memo(RlsFieldClockComponent);
|
|
3281
3152
|
|
|
@@ -3487,7 +3358,7 @@ function RlsPickerColorComponent({ color, formControl, onListener, rlsTheme }) {
|
|
|
3487
3358
|
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
3359
|
left: indicatorPosition.left,
|
|
3489
3360
|
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: "
|
|
3361
|
+
}, 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
3362
|
}
|
|
3492
3363
|
const RlsPickerColor = require$$0.memo(RlsPickerColorComponent);
|
|
3493
3364
|
|
|
@@ -3500,12 +3371,10 @@ function RlsFieldColorComponent({ children, color, disabled: disabledProps, form
|
|
|
3500
3371
|
const disabled = require$$0.useMemo(() => {
|
|
3501
3372
|
return formControl?.disabled || disabledProps;
|
|
3502
3373
|
}, [formControl?.disabled, disabledProps]);
|
|
3503
|
-
const className =
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
});
|
|
3508
|
-
}, [disabled, readOnly]);
|
|
3374
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3375
|
+
disabled,
|
|
3376
|
+
readonly: readOnly
|
|
3377
|
+
});
|
|
3509
3378
|
const displayHex = require$$0.useMemo(() => {
|
|
3510
3379
|
const hex = colorValue && hexIsValid(colorValue) ? colorValue : '';
|
|
3511
3380
|
return normalizeHex(hex);
|
|
@@ -3536,7 +3405,7 @@ function RlsFieldColorComponent({ children, color, disabled: disabledProps, form
|
|
|
3536
3405
|
formControl?.touch();
|
|
3537
3406
|
setModalIsVisible(false);
|
|
3538
3407
|
}, [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-
|
|
3408
|
+
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
3409
|
}
|
|
3541
3410
|
const RlsFieldColor = require$$0.memo(RlsFieldColorComponent);
|
|
3542
3411
|
|
|
@@ -3561,13 +3430,11 @@ function RlsPickerDateComponent({ automatic, date, disabled, formControl, maxDat
|
|
|
3561
3430
|
const value = require$$0.useMemo(() => {
|
|
3562
3431
|
return new Date(yearControl.value, monthControl.value, dayControl.value);
|
|
3563
3432
|
}, [yearControl.value, monthControl.value, dayControl.value]);
|
|
3564
|
-
const classNameComponent =
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
});
|
|
3570
|
-
}, [visibility]);
|
|
3433
|
+
const classNameComponent = renderClassStatus('rls-picker-date__component', {
|
|
3434
|
+
day: visibility === 'DAY',
|
|
3435
|
+
month: visibility === 'MONTH',
|
|
3436
|
+
year: visibility === 'YEAR'
|
|
3437
|
+
});
|
|
3571
3438
|
const title = require$$0.useMemo(() => {
|
|
3572
3439
|
return dates.dateFormatTemplate(value, DATE_FORMAT_TITLE);
|
|
3573
3440
|
}, [value]);
|
|
@@ -3621,7 +3488,7 @@ function RlsPickerDateComponent({ automatic, date, disabled, formControl, maxDat
|
|
|
3621
3488
|
value: value
|
|
3622
3489
|
});
|
|
3623
3490
|
}, [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: "
|
|
3491
|
+
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
3492
|
}
|
|
3626
3493
|
const RlsPickerDate = require$$0.memo(RlsPickerDateComponent);
|
|
3627
3494
|
|
|
@@ -3635,18 +3502,16 @@ function RlsModalDateComponent({ automatic, controller, date, disabled, formCont
|
|
|
3635
3502
|
const RlsModalDate = require$$0.memo(RlsModalDateComponent);
|
|
3636
3503
|
|
|
3637
3504
|
function RlsFieldDateComponent({ children, date, disabled: disabledProps, formControl, format, identifier, maxDate, minDate, msgErrorDisabled, onValue, placeholder, readOnly, rlsTheme, value: valueInitial }) {
|
|
3638
|
-
const today = require$$0.
|
|
3505
|
+
const today = require$$0.useMemo(() => new Date(), []);
|
|
3639
3506
|
const [value, setValue] = require$$0.useState(formControl?.value ?? valueInitial);
|
|
3640
3507
|
const [modalIsVisible, setModalIsVisible] = require$$0.useState(false);
|
|
3641
3508
|
const disabled = require$$0.useMemo(() => {
|
|
3642
3509
|
return formControl?.disabled || disabledProps;
|
|
3643
3510
|
}, [formControl?.disabled, disabledProps]);
|
|
3644
|
-
const className =
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
});
|
|
3649
|
-
}, [disabled, readOnly]);
|
|
3511
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3512
|
+
disabled,
|
|
3513
|
+
readonly: readOnly
|
|
3514
|
+
});
|
|
3650
3515
|
const dateValue = require$$0.useMemo(() => {
|
|
3651
3516
|
return formControl ? formControl.value : value;
|
|
3652
3517
|
}, [formControl?.value, value]);
|
|
@@ -3660,7 +3525,7 @@ function RlsFieldDateComponent({ children, date, disabled: disabledProps, formCo
|
|
|
3660
3525
|
}, [dateValue, format]);
|
|
3661
3526
|
require$$0.useEffect(() => {
|
|
3662
3527
|
const dateSecure = components.verifyDateRange({
|
|
3663
|
-
date: formControl?.value ?? date ?? today
|
|
3528
|
+
date: formControl?.value ?? date ?? today,
|
|
3664
3529
|
minDate,
|
|
3665
3530
|
maxDate
|
|
3666
3531
|
});
|
|
@@ -3693,7 +3558,7 @@ function RlsFieldDateComponent({ children, date, disabled: disabledProps, formCo
|
|
|
3693
3558
|
formControl?.touch();
|
|
3694
3559
|
setModalIsVisible(false);
|
|
3695
3560
|
}, [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 })] }));
|
|
3561
|
+
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
3562
|
}
|
|
3698
3563
|
const RlsFieldDate = require$$0.memo(RlsFieldDateComponent);
|
|
3699
3564
|
|
|
@@ -3727,16 +3592,14 @@ function RlsPickerDateRangeComponent({ automatic, date: datePicker, disabled, fo
|
|
|
3727
3592
|
}
|
|
3728
3593
|
return value;
|
|
3729
3594
|
}, [_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]);
|
|
3595
|
+
const classNameComponent = renderClassStatus('rls-picker-date-range__component', {
|
|
3596
|
+
day: visibility === 'DAY',
|
|
3597
|
+
month: visibility === 'MONTH',
|
|
3598
|
+
year: visibility === 'YEAR'
|
|
3599
|
+
});
|
|
3600
|
+
const classNameFooter = renderClassStatus('rls-picker-date-range__footer', {
|
|
3601
|
+
automatic
|
|
3602
|
+
});
|
|
3740
3603
|
const title = require$$0.useMemo(() => rangeFormatTemplate(value), [value]);
|
|
3741
3604
|
require$$0.useEffect(() => {
|
|
3742
3605
|
return i18n.i18nSubscribe(() => {
|
|
@@ -3767,7 +3630,7 @@ function RlsPickerDateRangeComponent({ automatic, date: datePicker, disabled, fo
|
|
|
3767
3630
|
formControl?.setValue(value);
|
|
3768
3631
|
onListener?.({ event: components.PickerListenerEvent.Select, value });
|
|
3769
3632
|
}, [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: "
|
|
3633
|
+
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
3634
|
}
|
|
3772
3635
|
const RlsPickerDateRange = require$$0.memo(RlsPickerDateRangeComponent);
|
|
3773
3636
|
|
|
@@ -3787,12 +3650,10 @@ function RlsFieldDateRangeComponent({ children, date, disabled: disabledProps, f
|
|
|
3787
3650
|
const disabled = require$$0.useMemo(() => {
|
|
3788
3651
|
return formControl?.disabled || disabledProps;
|
|
3789
3652
|
}, [formControl?.disabled, disabledProps]);
|
|
3790
|
-
const className =
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
});
|
|
3795
|
-
}, [disabled, readOnly]);
|
|
3653
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3654
|
+
disabled,
|
|
3655
|
+
readonly: readOnly
|
|
3656
|
+
});
|
|
3796
3657
|
const dateRangeValue = require$$0.useMemo(() => {
|
|
3797
3658
|
return formControl ? formControl.value : value;
|
|
3798
3659
|
}, [formControl?.value, value]);
|
|
@@ -3828,7 +3689,7 @@ function RlsFieldDateRangeComponent({ children, date, disabled: disabledProps, f
|
|
|
3828
3689
|
formControl?.touch();
|
|
3829
3690
|
setModalIsVisible(false);
|
|
3830
3691
|
}, [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 })] }));
|
|
3692
|
+
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
3693
|
}
|
|
3833
3694
|
const RlsFieldDateRange = require$$0.memo(RlsFieldDateRangeComponent);
|
|
3834
3695
|
|
|
@@ -3970,20 +3831,12 @@ function RlsFieldListInner({ render, suggestions, action, children, formControl,
|
|
|
3970
3831
|
const disabled = require$$0.useMemo(() => {
|
|
3971
3832
|
return formControl?.disabled || props.disabled;
|
|
3972
3833
|
}, [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
|
-
]);
|
|
3834
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3835
|
+
focused: fieldList.listIsVisible && !disabled,
|
|
3836
|
+
error: formControl?.wrong,
|
|
3837
|
+
disabled,
|
|
3838
|
+
readonly: props.readOnly
|
|
3839
|
+
}, `rls-field-list rls-field-list__multi ${props.className ?? ''}`);
|
|
3987
3840
|
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
3841
|
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
3842
|
}
|
|
@@ -4113,20 +3966,12 @@ function RlsFieldSelectTemplateComponent(props) {
|
|
|
4113
3966
|
const disabled = require$$0.useMemo(() => {
|
|
4114
3967
|
return formControl?.disabled || props.disabled;
|
|
4115
3968
|
}, [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
|
-
]);
|
|
3969
|
+
const className = renderClassStatus('rls-field-box', {
|
|
3970
|
+
focused: select.focused && !disabled,
|
|
3971
|
+
error: formControl?.wrong,
|
|
3972
|
+
disabled: disabled,
|
|
3973
|
+
readonly: props.readOnly
|
|
3974
|
+
}, `rls-field-list rls-field-select ${props.className ?? ''}`);
|
|
4130
3975
|
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
3976
|
}
|
|
4132
3977
|
const RlsFieldSelectTemplate = require$$0.memo(RlsFieldSelectTemplateComponent);
|
|
@@ -4137,9 +3982,7 @@ function RlsFieldSelectComponent(props) {
|
|
|
4137
3982
|
const RlsFieldSelect = require$$0.memo(RlsFieldSelectComponent);
|
|
4138
3983
|
|
|
4139
3984
|
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]);
|
|
3985
|
+
const classNameForm = renderClassStatus('rls-form-navigation', { visible: controller?.visible ?? visible }, className);
|
|
4143
3986
|
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
3987
|
}
|
|
4145
3988
|
const RlsFormNavigation = require$$0.memo(RlsFormNavigationComponent);
|
|
@@ -4587,9 +4430,7 @@ function RlsImageChooserComponent(props) {
|
|
|
4587
4430
|
const RlsImageChooser = require$$0.memo(RlsImageChooserComponent);
|
|
4588
4431
|
|
|
4589
4432
|
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]);
|
|
4433
|
+
const classNameModal = renderClassStatus('rls-modal-sheet', { visible: controller?.visible ?? visible }, className);
|
|
4593
4434
|
const onClickBackdrop = require$$0.useCallback(() => {
|
|
4594
4435
|
if (autoclose) {
|
|
4595
4436
|
controller?.close();
|
|
@@ -4607,9 +4448,7 @@ function generateId() {
|
|
|
4607
4448
|
return `rls-notification-${++_id}`;
|
|
4608
4449
|
}
|
|
4609
4450
|
function RlsNotification({ content, icon, onClose, rlsTheme, title, visible }) {
|
|
4610
|
-
const className =
|
|
4611
|
-
return renderClassStatus('rls-notification', { visible });
|
|
4612
|
-
}, [visible]);
|
|
4451
|
+
const className = renderClassStatus('rls-notification', { visible });
|
|
4613
4452
|
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
4453
|
}
|
|
4615
4454
|
function useNotifications() {
|
|
@@ -4640,14 +4479,24 @@ function useNotifications() {
|
|
|
4640
4479
|
const duration = config.duration ?? DURATION_DEFAULT;
|
|
4641
4480
|
setNotifications((notifications) => [
|
|
4642
4481
|
...notifications,
|
|
4643
|
-
{ id, config, visible:
|
|
4482
|
+
{ id, config, visible: false }
|
|
4644
4483
|
]);
|
|
4484
|
+
requestAnimationFrame(() => {
|
|
4485
|
+
requestAnimationFrame(() => {
|
|
4486
|
+
setNotifications((notifications) => notifications.map((notification) => notification.id === id
|
|
4487
|
+
? { ...notification, visible: true }
|
|
4488
|
+
: notification));
|
|
4489
|
+
});
|
|
4490
|
+
});
|
|
4645
4491
|
const timer = setTimeout(() => {
|
|
4646
4492
|
remove(id);
|
|
4647
4493
|
}, duration);
|
|
4648
4494
|
timersRef.current.set(id, timer);
|
|
4649
4495
|
}, [remove]);
|
|
4650
|
-
const
|
|
4496
|
+
const className = renderClassStatus('rls-notifications', {
|
|
4497
|
+
visible: notifications.length > 0
|
|
4498
|
+
});
|
|
4499
|
+
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
4500
|
return {
|
|
4652
4501
|
RlsNotifications,
|
|
4653
4502
|
notify
|
|
@@ -4670,9 +4519,7 @@ function calculateDuration({ length }) {
|
|
|
4670
4519
|
return duration + DURATION_RESET;
|
|
4671
4520
|
}
|
|
4672
4521
|
function RlsSnackbarComponent({ content, onClose, icon, rlsTheme, title, visible }) {
|
|
4673
|
-
const className =
|
|
4674
|
-
return renderClassStatus('rls-snackbar', { visible });
|
|
4675
|
-
}, [visible]);
|
|
4522
|
+
const className = renderClassStatus('rls-snackbar', { visible });
|
|
4676
4523
|
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
4524
|
}
|
|
4678
4525
|
const RlsSnackbar = require$$0.memo(RlsSnackbarComponent);
|
|
@@ -4735,13 +4582,11 @@ function RlsApplication({ children }) {
|
|
|
4735
4582
|
const [navbarInApp, setNavbarInApp] = require$$0.useState(false);
|
|
4736
4583
|
const [navbarIsCondense, setNavbarIsCondense] = require$$0.useState(false);
|
|
4737
4584
|
const [appIsMobile, setIsMobile] = require$$0.useState(false);
|
|
4738
|
-
const className =
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
});
|
|
4744
|
-
}, [appIsMobile, navbarInApp, navbarIsCondense]);
|
|
4585
|
+
const className = renderClassStatus('rls-app__body', {
|
|
4586
|
+
mobile: appIsMobile,
|
|
4587
|
+
'navbar-snackbar': navbarInApp,
|
|
4588
|
+
'navbar-condense': navbarIsCondense
|
|
4589
|
+
});
|
|
4745
4590
|
const state = require$$0.useMemo(() => ({
|
|
4746
4591
|
confirmation,
|
|
4747
4592
|
notify,
|
|
@@ -4756,7 +4601,7 @@ function RlsApplication({ children }) {
|
|
|
4756
4601
|
const DEFAULT_DESIGN_SYSTEM = 'bordered';
|
|
4757
4602
|
|
|
4758
4603
|
const DESIGN_SYSTEM_PREFIX = 'rls-design-system';
|
|
4759
|
-
const DESIGN_SYSTEMS = ['bordered', 'filled'];
|
|
4604
|
+
const DESIGN_SYSTEMS = ['bordered', 'filled', 'gradient'];
|
|
4760
4605
|
function designSystemClass(designSystem) {
|
|
4761
4606
|
return `${DESIGN_SYSTEM_PREFIX}-${designSystem}`;
|
|
4762
4607
|
}
|