@rolster/react-components 18.12.8 → 18.12.10
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/assets/{index-7UzJ6VgT.css → index-VcI5p9dK.css} +54 -3
- package/dist/cjs/index.js +70 -37
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-7UzJ6VgT.css → index-VcI5p9dK.css} +54 -3
- package/dist/es/index.js +68 -39
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/ButtonAction/ButtonAction.d.ts +1 -1
- package/dist/esm/components/atoms/Input/Input.css +0 -2
- package/dist/esm/components/atoms/ProgressCircular/ProgressCircular.css +44 -0
- package/dist/esm/components/atoms/ProgressCircular/ProgressCircular.d.ts +7 -0
- package/dist/esm/components/atoms/ProgressCircular/ProgressCircular.js +6 -0
- package/dist/esm/components/atoms/ProgressCircular/ProgressCircular.js.map +1 -0
- package/dist/esm/components/atoms/index.d.ts +1 -0
- package/dist/esm/components/atoms/index.js +1 -0
- package/dist/esm/components/atoms/index.js.map +1 -1
- package/dist/esm/components/molecules/ButtonProgress/ButtonProgress.css +7 -0
- package/dist/esm/components/molecules/ButtonProgress/ButtonProgress.d.ts +12 -0
- package/dist/esm/components/molecules/ButtonProgress/ButtonProgress.js +8 -0
- package/dist/esm/components/molecules/ButtonProgress/ButtonProgress.js.map +1 -0
- package/dist/esm/components/molecules/DayRangePicker/DayRangePicker.js +4 -4
- package/dist/esm/components/molecules/DayRangePicker/DayRangePicker.js.map +1 -1
- package/dist/esm/components/molecules/index.d.ts +1 -0
- package/dist/esm/components/molecules/index.js +1 -0
- package/dist/esm/components/molecules/index.js.map +1 -1
- package/dist/esm/components/organisms/Datatable/Datatable.d.ts +4 -1
- package/dist/esm/components/organisms/Datatable/Datatable.js +8 -2
- package/dist/esm/components/organisms/Datatable/Datatable.js.map +1 -1
- package/dist/esm/components/organisms/DateField/DateField.js +4 -3
- package/dist/esm/components/organisms/DateField/DateField.js.map +1 -1
- package/dist/esm/components/organisms/DatePicker/DatePicker.js +6 -6
- package/dist/esm/components/organisms/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/organisms/DateRangeField/DateRangeField.css +1 -1
- package/dist/esm/components/organisms/DateRangeField/DateRangeField.js +2 -2
- package/dist/esm/components/organisms/DateRangeField/DateRangeField.js.map +1 -1
- package/dist/esm/components/organisms/DateRangePicker/DateRangePicker.js +5 -5
- package/dist/esm/components/organisms/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/esm/helpers/date-picker.d.ts +1 -1
- package/dist/esm/helpers/date-picker.js +7 -3
- package/dist/esm/helpers/date-picker.js.map +1 -1
- package/dist/esm/helpers/date-range-picker.d.ts +1 -1
- package/dist/esm/helpers/date-range-picker.js +10 -8
- package/dist/esm/helpers/date-range-picker.js.map +1 -1
- package/dist/esm/helpers/day-picker.js +6 -4
- package/dist/esm/helpers/day-picker.js.map +1 -1
- package/dist/esm/hooks/DatatableHook.js +11 -4
- package/dist/esm/hooks/DatatableHook.js.map +1 -1
- package/package.json +6 -6
|
@@ -423,7 +423,6 @@
|
|
|
423
423
|
--pvt-value-opacity: 1;
|
|
424
424
|
--pvt-component-font-color: transparent;
|
|
425
425
|
position: relative;
|
|
426
|
-
float: left;
|
|
427
426
|
width: 100%;
|
|
428
427
|
}
|
|
429
428
|
.rls-input--focused {
|
|
@@ -435,7 +434,6 @@
|
|
|
435
434
|
}
|
|
436
435
|
.rls-input__component {
|
|
437
436
|
position: relative;
|
|
438
|
-
float: left;
|
|
439
437
|
width: 100%;
|
|
440
438
|
height: var(--rls-input-height);
|
|
441
439
|
line-height: var(--rls-input-height);
|
|
@@ -640,6 +638,51 @@
|
|
|
640
638
|
}
|
|
641
639
|
}
|
|
642
640
|
|
|
641
|
+
.rls-progress-circular {
|
|
642
|
+
position: relative;
|
|
643
|
+
width: var(--rls-progress-circular-dimension);
|
|
644
|
+
height: var(--rls-progress-circular-dimension);
|
|
645
|
+
padding: var(--sizing-x2);
|
|
646
|
+
box-sizing: border-box;
|
|
647
|
+
stroke: var(--color-rolster-500);
|
|
648
|
+
}
|
|
649
|
+
.rls-progress-circular__svg {
|
|
650
|
+
height: 100%;
|
|
651
|
+
width: 100%;
|
|
652
|
+
transform: rotate(990deg);
|
|
653
|
+
animation: progress-circular-svg 3500ms linear infinite;
|
|
654
|
+
}
|
|
655
|
+
.rls-progress-circular__circle {
|
|
656
|
+
fill: none;
|
|
657
|
+
stroke-width: 4px;
|
|
658
|
+
stroke: inherit;
|
|
659
|
+
stroke-dasharray: 65;
|
|
660
|
+
stroke-dashoffset: 65;
|
|
661
|
+
opacity: 1;
|
|
662
|
+
animation: progress-circular-circle 1750ms var(--standard-curve) infinite;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
@keyframes progress-circular-svg {
|
|
666
|
+
0% {
|
|
667
|
+
transform: rotate(0deg);
|
|
668
|
+
}
|
|
669
|
+
50% {
|
|
670
|
+
transform: rotate(180deg);
|
|
671
|
+
}
|
|
672
|
+
100% {
|
|
673
|
+
transform: rotate(360deg);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
@keyframes progress-circular-circle {
|
|
678
|
+
50% {
|
|
679
|
+
stroke-dashoffset: 0;
|
|
680
|
+
}
|
|
681
|
+
100% {
|
|
682
|
+
stroke-dashoffset: -65;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
643
686
|
.rls-radiobutton {
|
|
644
687
|
--pvt-component-transform: scale(0);
|
|
645
688
|
position: relative;
|
|
@@ -897,6 +940,14 @@
|
|
|
897
940
|
white-space: var(--rls-ballot-subtitle-white-space);
|
|
898
941
|
}
|
|
899
942
|
|
|
943
|
+
.rls-button-progress {
|
|
944
|
+
--rls-progress-circular-dimension: var(--sizing-x16);
|
|
945
|
+
position: relative;
|
|
946
|
+
display: flex;
|
|
947
|
+
justify-content: center;
|
|
948
|
+
align-items: center;
|
|
949
|
+
}
|
|
950
|
+
|
|
900
951
|
.rls-button-toggle {
|
|
901
952
|
width: auto;
|
|
902
953
|
}
|
|
@@ -2040,7 +2091,7 @@
|
|
|
2040
2091
|
cursor: default;
|
|
2041
2092
|
border: none;
|
|
2042
2093
|
outline: none;
|
|
2043
|
-
color: var(--
|
|
2094
|
+
color: var(--rls-input-font-color);
|
|
2044
2095
|
background: transparent;
|
|
2045
2096
|
font-size: var(--input-font-size);
|
|
2046
2097
|
font-weight: var(--font-weight-medium);
|
package/dist/cjs/index.js
CHANGED
|
@@ -187,6 +187,10 @@ function RlsProgressBar({ indeterminate, percentage, rlsTheme }) {
|
|
|
187
187
|
return (jsxRuntime.jsx("div", { className: renderClassStatus('rls-progress-bar', { indeterminate }), "rls-theme": rlsTheme, children: jsxRuntime.jsx("div", { className: "rls-progress-bar__component", style: { width: `${percentage || 0}%` } }) }));
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
function RlsProgressCircular({ rlsTheme }) {
|
|
191
|
+
return (jsxRuntime.jsx("div", { className: "rls-progress-circular", "rls-theme": rlsTheme, children: jsxRuntime.jsx("svg", { className: "rls-progress-circular__svg", viewBox: "0 0 36 36", children: jsxRuntime.jsx("circle", { className: "rls-progress-circular__circle", cx: "18", cy: "18", r: "12" }) }) }));
|
|
192
|
+
}
|
|
193
|
+
|
|
190
194
|
function RlsRadioButton({ checked, disabled, rlsTheme, onClick }) {
|
|
191
195
|
return (jsxRuntime.jsx("div", { className: renderClassStatus('rls-radiobutton', { checked, disabled }), onClick: onClick, "rls-theme": rlsTheme, children: jsxRuntime.jsx("div", { className: "rls-radiobutton__component" }) }));
|
|
192
196
|
}
|
|
@@ -216,6 +220,10 @@ function RlsBallot({ bordered, children, img, initials, skeleton, subtitle, rlsT
|
|
|
216
220
|
return (jsxRuntime.jsxs("div", { className: renderClassStatus('rls-ballot', { bordered, skeleton }), "rls-theme": rlsTheme, children: [(img || initials) && (jsxRuntime.jsxs(RlsAvatar, { skeleton: skeleton, children: [img && jsxRuntime.jsx("img", { src: img }), initials && jsxRuntime.jsx("span", { children: initials })] })), jsxRuntime.jsxs("div", { className: "rls-ballot__component", children: [jsxRuntime.jsx("label", { className: "rls-ballot__title", children: jsxRuntime.jsx(RlsSkeletonText, { active: skeleton, children: children }) }), subtitle && (jsxRuntime.jsx("label", { className: "rls-ballot__subtitle", children: jsxRuntime.jsx(RlsSkeletonText, { active: skeleton, children: subtitle }) }))] })] }));
|
|
217
221
|
}
|
|
218
222
|
|
|
223
|
+
function RlsButtonProgress({ icon, disabled, onClick, progressing, rlsTheme }) {
|
|
224
|
+
return (jsxRuntime.jsxs("div", { className: renderClassStatus('rls-button-progress', { progressing }), "rls-theme": rlsTheme, children: [!progressing && (jsxRuntime.jsx(RlsButtonAction, { icon: icon, onClick: onClick, disabled: disabled })), progressing && jsxRuntime.jsx(RlsProgressCircular, {})] }));
|
|
225
|
+
}
|
|
226
|
+
|
|
219
227
|
function RlsButtonToggle({ onAction, options, type, automatic, disabled, rlsTheme }) {
|
|
220
228
|
const componentRef = react.useRef(null);
|
|
221
229
|
const [firstAction] = options;
|
|
@@ -298,7 +306,7 @@ class DayPickerFactory {
|
|
|
298
306
|
createRightWeeks() {
|
|
299
307
|
const dayStart = this.date.getDay();
|
|
300
308
|
const rightWeeks = [];
|
|
301
|
-
const dayCount = helpersDate.
|
|
309
|
+
const dayCount = helpersDate.getDaysOfMonth(this.date.getFullYear(), this.date.getMonth());
|
|
302
310
|
let days = [];
|
|
303
311
|
let countDaysWeek = 1;
|
|
304
312
|
let day = 8 - dayStart;
|
|
@@ -337,12 +345,14 @@ class DayPickerFactory {
|
|
|
337
345
|
}
|
|
338
346
|
minOverflowDay(day) {
|
|
339
347
|
return this.minDate
|
|
340
|
-
? helpersDate.
|
|
348
|
+
? helpersDate.getDateWeight(helpersDate.assignDayInDate(this.date, day)) <
|
|
349
|
+
helpersDate.getDateWeight(this.minDate)
|
|
341
350
|
: false;
|
|
342
351
|
}
|
|
343
352
|
maxOverflowDay(day) {
|
|
344
353
|
return this.maxDate
|
|
345
|
-
? helpersDate.
|
|
354
|
+
? helpersDate.getDateWeight(helpersDate.assignDayInDate(this.date, day)) >
|
|
355
|
+
helpersDate.getDateWeight(this.maxDate)
|
|
346
356
|
: false;
|
|
347
357
|
}
|
|
348
358
|
}
|
|
@@ -419,7 +429,7 @@ class DateRangePickerFactory {
|
|
|
419
429
|
createRightWeeks() {
|
|
420
430
|
const rightWeeks = [];
|
|
421
431
|
const dayStart = this.date.getDay();
|
|
422
|
-
const dayCount = helpersDate.
|
|
432
|
+
const dayCount = helpersDate.getDaysOfMonth(this.date.getFullYear(), this.date.getMonth());
|
|
423
433
|
let days = [];
|
|
424
434
|
let countDaysWeek = 1;
|
|
425
435
|
let day = 8 - dayStart;
|
|
@@ -458,19 +468,21 @@ class DateRangePickerFactory {
|
|
|
458
468
|
day === date.getDate());
|
|
459
469
|
}
|
|
460
470
|
isRangedFromDate(day) {
|
|
461
|
-
return helpersDate.
|
|
471
|
+
return helpersDate.dateIsBetween(this.range.minDate, this.range.maxDate, helpersDate.assignDayInDate(this.date, day));
|
|
462
472
|
}
|
|
463
473
|
overflowDay(day) {
|
|
464
474
|
return this.minOverflowDay(day) || this.maxOverflowDay(day);
|
|
465
475
|
}
|
|
466
476
|
minOverflowDay(day) {
|
|
467
477
|
return this.minDate
|
|
468
|
-
? helpersDate.
|
|
478
|
+
? helpersDate.getDateWeight(helpersDate.assignDayInDate(this.date, day)) <
|
|
479
|
+
helpersDate.getDateWeight(this.minDate)
|
|
469
480
|
: false;
|
|
470
481
|
}
|
|
471
482
|
maxOverflowDay(day) {
|
|
472
483
|
return this.maxDate
|
|
473
|
-
? helpersDate.
|
|
484
|
+
? helpersDate.getDateWeight(helpersDate.assignDayInDate(this.date, day)) >
|
|
485
|
+
helpersDate.getDateWeight(this.maxDate)
|
|
474
486
|
: false;
|
|
475
487
|
}
|
|
476
488
|
createDayRangeState(day) {
|
|
@@ -484,9 +496,9 @@ class DateRangePickerFactory {
|
|
|
484
496
|
};
|
|
485
497
|
}
|
|
486
498
|
}
|
|
487
|
-
function
|
|
488
|
-
const minFormat = helpersDate.
|
|
489
|
-
const maxFormat = helpersDate.
|
|
499
|
+
function rangeFormatTemplate(range) {
|
|
500
|
+
const minFormat = helpersDate.dateFormatTemplate(range.minDate, DATE_RANGE_FORMAT);
|
|
501
|
+
const maxFormat = helpersDate.dateFormatTemplate(range.maxDate, DATE_RANGE_FORMAT);
|
|
490
502
|
return `${minFormat} - ${maxFormat}`;
|
|
491
503
|
}
|
|
492
504
|
function createRangePicker(props) {
|
|
@@ -509,15 +521,15 @@ function RlsDayRangePicker({ date, disabled: disabledPicker, formControl, maxDat
|
|
|
509
521
|
}));
|
|
510
522
|
}, [range, date, minDate, maxDate]);
|
|
511
523
|
function onChange(value) {
|
|
512
|
-
const newDate = helpersDate.
|
|
513
|
-
const newRange = helpersDate.
|
|
524
|
+
const newDate = helpersDate.assignDayInDate(initialDate, value);
|
|
525
|
+
const newRange = helpersDate.dateIsBefore(newDate, sourceDate.current)
|
|
514
526
|
? new helpersDate.DateRange(sourceDate.current, newDate)
|
|
515
527
|
: new helpersDate.DateRange(newDate, sourceDate.current);
|
|
516
528
|
sourceDate.current = newDate;
|
|
517
529
|
setRange(newRange);
|
|
518
530
|
formControl?.setState(newRange);
|
|
519
531
|
}
|
|
520
|
-
return (jsxRuntime.jsxs("div", { className: "rls-day-range-picker", "rls-theme": rlsTheme, children: [jsxRuntime.jsx("div", { className: "rls-day-range-picker__title", children: helpersDate.
|
|
532
|
+
return (jsxRuntime.jsxs("div", { className: "rls-day-range-picker", "rls-theme": rlsTheme, children: [jsxRuntime.jsx("div", { className: "rls-day-range-picker__title", children: helpersDate.dateFormatTemplate(sourceDate.current, DATE_RANGE_FORMAT) }), jsxRuntime.jsx("div", { className: "rls-day-range-picker__header", children: helpersDate.DAY_LABELS().map((title, index) => (jsxRuntime.jsx("label", { className: "rls-day-range-picker__label", children: title }, index))) }), jsxRuntime.jsx("div", { className: "rls-day-range-picker__component", children: weeks.map(({ days }, index) => (jsxRuntime.jsx("div", { className: "rls-day-range-picker__week", children: days.map(({ disabled, end, forbidden, source, ranged, value }, index) => (jsxRuntime.jsx("div", { className: renderClassStatus('rls-day-range-picker__day', {
|
|
521
533
|
disabled: disabled || disabledPicker,
|
|
522
534
|
end,
|
|
523
535
|
forbidden,
|
|
@@ -1118,10 +1130,17 @@ function useDatatable() {
|
|
|
1118
1130
|
const [scrolleable, setScrolleable] = react.useState(false);
|
|
1119
1131
|
const bodyRef = react.useRef(null);
|
|
1120
1132
|
react.useEffect(() => {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1133
|
+
let observer;
|
|
1134
|
+
if (bodyRef?.current) {
|
|
1135
|
+
observer = new ResizeObserver(() => {
|
|
1136
|
+
const scrollHeight = bodyRef?.current?.scrollHeight || 0;
|
|
1137
|
+
const clientHeight = bodyRef?.current?.clientHeight || 0;
|
|
1138
|
+
setScrolleable(scrollHeight > clientHeight);
|
|
1139
|
+
});
|
|
1140
|
+
observer.observe(bodyRef?.current);
|
|
1141
|
+
}
|
|
1142
|
+
return () => observer?.disconnect();
|
|
1143
|
+
}, []);
|
|
1125
1144
|
return { bodyRef, scrolleable };
|
|
1126
1145
|
}
|
|
1127
1146
|
|
|
@@ -1547,12 +1566,25 @@ function RlsDatatableData({ children, className, error }) {
|
|
|
1547
1566
|
function RlsDatatableCell({ children, className, control, overflow }) {
|
|
1548
1567
|
return (jsxRuntime.jsx("th", { className: renderClassStatus('rls-datatable__cell', { control, overflow }, className).trim(), children: children }));
|
|
1549
1568
|
}
|
|
1550
|
-
function
|
|
1569
|
+
function RlsDatatableTotals({ children, className, error }) {
|
|
1570
|
+
return (jsxRuntime.jsx("div", { className: renderClassStatus('rls-datatable__totals', { error }, className).trim(), children: children }));
|
|
1571
|
+
}
|
|
1572
|
+
function RlsDatatableInfo({ children, className, control, overflow }) {
|
|
1573
|
+
return (jsxRuntime.jsx("div", { className: renderClassStatus('rls-datatable__info', { control, overflow }, className).trim(), children: children }));
|
|
1574
|
+
}
|
|
1575
|
+
function RlsDatatable({ children, datatable, footer, header, rlsTheme, summary }) {
|
|
1551
1576
|
return (jsxRuntime.jsxs("div", { className: renderClassStatus('rls-datatable', {
|
|
1552
1577
|
scrolleable: datatable?.scrolleable
|
|
1553
|
-
}), "rls-theme": rlsTheme, children: [jsxRuntime.jsxs("table", { children: [header && jsxRuntime.jsx("thead", { className: "rls-datatable__thead", children: header }), jsxRuntime.jsx("tbody", { ref: datatable?.bodyRef, className: "rls-datatable__tbody", children: children })] }), footer && jsxRuntime.jsx("div", { className: "rls-datatable__tfooter", children: footer })] }));
|
|
1578
|
+
}), "rls-theme": rlsTheme, children: [jsxRuntime.jsxs("table", { children: [header && jsxRuntime.jsx("thead", { className: "rls-datatable__thead", children: header }), jsxRuntime.jsx("tbody", { ref: datatable?.bodyRef, className: "rls-datatable__tbody", children: children })] }), summary && jsxRuntime.jsx("div", { className: "rls-datatable__tsummary", children: summary }), footer && jsxRuntime.jsx("div", { className: "rls-datatable__tfooter", children: footer })] }));
|
|
1554
1579
|
}
|
|
1555
1580
|
|
|
1581
|
+
var PickerListenerType;
|
|
1582
|
+
(function (PickerListenerType) {
|
|
1583
|
+
PickerListenerType["Select"] = "PickerSelect";
|
|
1584
|
+
PickerListenerType["Now"] = "PickerNow";
|
|
1585
|
+
PickerListenerType["Cancel"] = "PickerCancel";
|
|
1586
|
+
})(PickerListenerType || (PickerListenerType = {}));
|
|
1587
|
+
|
|
1556
1588
|
const controlIsValid = (props) => {
|
|
1557
1589
|
const { state, validators } = props;
|
|
1558
1590
|
return validators.reduce((errors, validator) => {
|
|
@@ -1649,15 +1681,12 @@ function useReactControl(controlProps, controlValidators) {
|
|
|
1649
1681
|
return useControl(controlProps, controlValidators);
|
|
1650
1682
|
}
|
|
1651
1683
|
|
|
1652
|
-
|
|
1653
|
-
(
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
function verifyDateRange(date, min, max) {
|
|
1660
|
-
return min && helpersDate.before(min, date) ? min : max && helpersDate.after(max, date) ? max : date;
|
|
1684
|
+
function dateIsRange(date, min, max) {
|
|
1685
|
+
return min && helpersDate.dateIsBefore(min, date)
|
|
1686
|
+
? min
|
|
1687
|
+
: max && helpersDate.dateIsAfter(max, date)
|
|
1688
|
+
? max
|
|
1689
|
+
: date;
|
|
1661
1690
|
}
|
|
1662
1691
|
|
|
1663
1692
|
const FORMAT_DESCRIPTION = '{dw}, {mx} {dd} de {aa}';
|
|
@@ -1687,25 +1716,25 @@ function RlsDatePicker({ automatic, date, formControl, disabled, maxDate, minDat
|
|
|
1687
1716
|
const monthControl = useReactControl(dateInitial.getMonth());
|
|
1688
1717
|
const [value, setValue] = react.useState(dateInitial);
|
|
1689
1718
|
const [{ day, month, year }, setVisibility] = react.useState(VISIBILITY$1.DAY);
|
|
1690
|
-
const title = helpersDate.
|
|
1719
|
+
const title = helpersDate.dateFormatTemplate(value, FORMAT_DESCRIPTION);
|
|
1691
1720
|
react.useEffect(() => {
|
|
1692
1721
|
setValue((prevValue) => {
|
|
1693
1722
|
return typeof yearControl.state === 'number'
|
|
1694
|
-
?
|
|
1723
|
+
? dateIsRange(helpersDate.assignYearInDate(prevValue, yearControl.state), minDate, maxDate)
|
|
1695
1724
|
: prevValue;
|
|
1696
1725
|
});
|
|
1697
1726
|
}, [yearControl.state]);
|
|
1698
1727
|
react.useEffect(() => {
|
|
1699
1728
|
setValue((prevValue) => {
|
|
1700
1729
|
return typeof monthControl.state === 'number'
|
|
1701
|
-
?
|
|
1730
|
+
? dateIsRange(helpersDate.assignMonthInDate(prevValue, monthControl.state), minDate, maxDate)
|
|
1702
1731
|
: prevValue;
|
|
1703
1732
|
});
|
|
1704
1733
|
}, [monthControl.state]);
|
|
1705
1734
|
react.useEffect(() => {
|
|
1706
1735
|
setValue((prevValue) => {
|
|
1707
1736
|
return typeof dayControl.state === 'number'
|
|
1708
|
-
?
|
|
1737
|
+
? dateIsRange(helpersDate.assignDayInDate(prevValue, dayControl.state), minDate, maxDate)
|
|
1709
1738
|
: prevValue;
|
|
1710
1739
|
});
|
|
1711
1740
|
}, [dayControl.state]);
|
|
@@ -1757,7 +1786,7 @@ function RlsDateField({ children, date, disabled, formControl, maxDate, minDate,
|
|
|
1757
1786
|
const [show, setShow] = react.useState(false);
|
|
1758
1787
|
const [description, setDescription] = react.useState('');
|
|
1759
1788
|
react.useEffect(() => {
|
|
1760
|
-
setDescription(value ? helpersDate.
|
|
1789
|
+
setDescription(value ? helpersDate.dateFormatTemplate(value, DATE_RANGE_FORMAT) : '');
|
|
1761
1790
|
}, [value]);
|
|
1762
1791
|
function onClickInput() {
|
|
1763
1792
|
setShow(true);
|
|
@@ -1824,14 +1853,14 @@ function RlsDateRangePicker({ automatic, date: datePicker, disabled, formControl
|
|
|
1824
1853
|
react.useEffect(() => {
|
|
1825
1854
|
setDate((prevValue) => {
|
|
1826
1855
|
return typeof yearControl.state === 'number'
|
|
1827
|
-
? helpersDate.
|
|
1856
|
+
? helpersDate.assignYearInDate(prevValue, yearControl.state)
|
|
1828
1857
|
: prevValue;
|
|
1829
1858
|
});
|
|
1830
1859
|
}, [yearControl.state]);
|
|
1831
1860
|
react.useEffect(() => {
|
|
1832
1861
|
setDate((prevValue) => {
|
|
1833
1862
|
return typeof monthControl.state === 'number'
|
|
1834
|
-
? helpersDate.
|
|
1863
|
+
? helpersDate.assignMonthInDate(prevValue, monthControl.state)
|
|
1835
1864
|
: prevValue;
|
|
1836
1865
|
});
|
|
1837
1866
|
}, [monthControl.state]);
|
|
@@ -1861,7 +1890,7 @@ function RlsDateRangePicker({ automatic, date: datePicker, disabled, formControl
|
|
|
1861
1890
|
onListener({ type: PickerListenerType.Select, value });
|
|
1862
1891
|
}
|
|
1863
1892
|
}
|
|
1864
|
-
return (jsxRuntime.jsxs("div", { className: "rls-date-range-picker", "rls-theme": rlsTheme, children: [jsxRuntime.jsxs("div", { className: "rls-date-range-picker__header", children: [jsxRuntime.jsx("div", { className: "rls-date-range-picker__title rls-date-range-picker__title--description", children: jsxRuntime.jsx("span", { onClick: onVisibilityDay, children:
|
|
1893
|
+
return (jsxRuntime.jsxs("div", { className: "rls-date-range-picker", "rls-theme": rlsTheme, children: [jsxRuntime.jsxs("div", { className: "rls-date-range-picker__header", children: [jsxRuntime.jsx("div", { className: "rls-date-range-picker__title rls-date-range-picker__title--description", children: jsxRuntime.jsx("span", { onClick: onVisibilityDay, children: rangeFormatTemplate(value) }) }), jsxRuntime.jsx("div", { className: "rls-date-range-picker__title rls-date-range-picker__title--year", children: jsxRuntime.jsx("span", { onClick: onVisibilityYear, children: yearControl.state }) }), jsxRuntime.jsx(RlsMonthTitlePicker, { monthControl: monthControl, yearControl: yearControl, date: date, maxDate: maxDate, minDate: minDate, disabled: year, type: month ? 'year' : 'month', onClick: onVisibilityMonth })] }), jsxRuntime.jsxs("div", { className: renderClassStatus('rls-date-range-picker__component', {
|
|
1865
1894
|
year,
|
|
1866
1895
|
day,
|
|
1867
1896
|
month
|
|
@@ -1878,7 +1907,7 @@ function RlsDateRangeField({ children, date: datePicker, disabled, formControl,
|
|
|
1878
1907
|
const [show, setShow] = react.useState(false);
|
|
1879
1908
|
const [description, setDescription] = react.useState('');
|
|
1880
1909
|
react.useEffect(() => {
|
|
1881
|
-
setDescription(value ?
|
|
1910
|
+
setDescription(value ? rangeFormatTemplate(value) : '');
|
|
1882
1911
|
}, [value]);
|
|
1883
1912
|
function onClickInput() {
|
|
1884
1913
|
setShow(true);
|
|
@@ -2110,6 +2139,7 @@ exports.RlsBallot = RlsBallot;
|
|
|
2110
2139
|
exports.RlsBreadcrumb = RlsBreadcrumb;
|
|
2111
2140
|
exports.RlsButton = RlsButton;
|
|
2112
2141
|
exports.RlsButtonAction = RlsButtonAction;
|
|
2142
|
+
exports.RlsButtonProgress = RlsButtonProgress;
|
|
2113
2143
|
exports.RlsButtonToggle = RlsButtonToggle;
|
|
2114
2144
|
exports.RlsCard = RlsCard;
|
|
2115
2145
|
exports.RlsCheckBox = RlsCheckBox;
|
|
@@ -2121,7 +2151,9 @@ exports.RlsDatatable = RlsDatatable;
|
|
|
2121
2151
|
exports.RlsDatatableCell = RlsDatatableCell;
|
|
2122
2152
|
exports.RlsDatatableData = RlsDatatableData;
|
|
2123
2153
|
exports.RlsDatatableHeader = RlsDatatableHeader;
|
|
2154
|
+
exports.RlsDatatableInfo = RlsDatatableInfo;
|
|
2124
2155
|
exports.RlsDatatableTitle = RlsDatatableTitle;
|
|
2156
|
+
exports.RlsDatatableTotals = RlsDatatableTotals;
|
|
2125
2157
|
exports.RlsDateField = RlsDateField;
|
|
2126
2158
|
exports.RlsDatePicker = RlsDatePicker;
|
|
2127
2159
|
exports.RlsDateRangeField = RlsDateRangeField;
|
|
@@ -2146,6 +2178,7 @@ exports.RlsPagination = RlsPagination;
|
|
|
2146
2178
|
exports.RlsPasswordField = RlsPasswordField;
|
|
2147
2179
|
exports.RlsPoster = RlsPoster;
|
|
2148
2180
|
exports.RlsProgressBar = RlsProgressBar;
|
|
2181
|
+
exports.RlsProgressCircular = RlsProgressCircular;
|
|
2149
2182
|
exports.RlsRadioButton = RlsRadioButton;
|
|
2150
2183
|
exports.RlsRadioButtonLabel = RlsRadioButtonLabel;
|
|
2151
2184
|
exports.RlsSearchInput = RlsSearchInput;
|