@rolster/react-components 18.24.10 → 18.25.0

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.
@@ -1433,30 +1433,43 @@
1433
1433
  } /*# sourceMappingURL=LabelSwitch.css.map */
1434
1434
 
1435
1435
  .rls-pagination {
1436
+ --pvt-dimension: var(--rlc-pagination-dimension, var(--rls-sizing-x16));
1437
+ --pvt-description-display: block;
1438
+ --pvt-count-display: none;
1436
1439
  position: relative;
1437
1440
  display: flex;
1438
- justify-content: center;
1439
1441
  width: 100%;
1442
+ column-gap: var(--rlc-pagination-column-gap, var(--rls-sizing-x4));
1443
+ justify-content: center;
1444
+ align-items: center;
1440
1445
  overflow: hidden;
1441
- height: var(--rls-sizing-x20);
1442
- padding: 0rem var(--rls-sizing-x6);
1446
+ height: var(
1447
+ --rlc-pagination-height,
1448
+ calc(var(--pvt-dimension) + var(--rls-sizing-x4))
1449
+ );
1450
+ padding: var(--rlc-pagination-padding, 0rem var(--rls-sizing-x6));
1443
1451
  box-sizing: border-box;
1444
1452
  }
1453
+ .rls-pagination__body {
1454
+ display: flex;
1455
+ width: auto;
1456
+ column-gap: var(--rls-sizing-x8);
1457
+ align-items: center;
1458
+ }
1445
1459
  .rls-pagination__pages {
1446
1460
  display: flex;
1447
- gap: var(--rls-sizing-x4);
1448
1461
  width: auto;
1449
- margin: 0rem var(--rls-sizing-x4);
1462
+ column-gap: var(--rls-sizing-x4);
1463
+ align-items: center;
1450
1464
  }
1451
1465
  .rls-pagination__page {
1452
1466
  background: var(--rls-app-color-200);
1453
1467
  color: var(--rls-app-color-900);
1454
1468
  cursor: default;
1455
- margin: auto 0rem;
1456
1469
  text-align: center;
1457
- width: var(--rls-sizing-x16);
1458
- height: var(--rls-sizing-x16);
1459
- line-height: var(--rls-sizing-x16);
1470
+ width: var(--pvt-dimension);
1471
+ height: var(--pvt-dimension);
1472
+ line-height: var(--pvt-dimension);
1460
1473
  border-radius: var(--rls-sizing-x2);
1461
1474
  font-size: var(--rls-body-font-size);
1462
1475
  letter-spacing: var(--rls-body-letter-spacing);
@@ -1470,26 +1483,31 @@
1470
1483
  color: var(--rls-app-color-050);
1471
1484
  }
1472
1485
  .rls-pagination__description {
1473
- color: var(--rls-app-color-900);
1474
- margin: 0rem var(--rls-sizing-x4);
1486
+ display: var(--pvt-description-display);
1475
1487
  width: auto;
1476
- height: var(--rls-sizing-x20);
1477
- line-height: var(--rls-sizing-x20);
1478
1488
  font-size: var(--rls-body-font-size);
1479
1489
  font-weight: var(--rls-font-weight-bold);
1480
1490
  letter-spacing: var(--rls-body-letter-spacing);
1491
+ color: var(--rls-app-color-900);
1492
+ }
1493
+ .rls-pagination__count {
1494
+ display: var(--pvt-count-display);
1495
+ font-size: var(--rls-body-font-size);
1496
+ font-weight: var(--rls-font-weight-bold);
1497
+ letter-spacing: var(--rls-body-letter-spacing);
1498
+ color: var(--rls-app-color-900);
1481
1499
  }
1482
1500
  .rls-pagination__actions {
1501
+ display: flex;
1483
1502
  width: auto;
1503
+ column-gap: var(--rls-sizing-x2);
1484
1504
  }
1485
1505
  .rls-pagination__action {
1506
+ --rlc-icon-dimension: calc(var(--pvt-dimension) - var(--rls-sizing-x4));
1486
1507
  background: none;
1487
1508
  outline: none;
1488
1509
  color: var(--rls-app-color-600);
1489
- height: var(--rls-sizing-x18);
1490
- width: var(--rls-sizing-x18);
1491
- padding: var(--rls-sizing-x3);
1492
- margin: var(--rls-sizing-x1) 0rem;
1510
+ padding: var(--rls-sizing-x2);
1493
1511
  }
1494
1512
  .rls-pagination__action:hover {
1495
1513
  color: var(--rls-theme-color-300);
@@ -1498,6 +1516,13 @@
1498
1516
  .rls-pagination__action:disabled {
1499
1517
  pointer-events: none;
1500
1518
  opacity: 0.5;
1519
+ }
1520
+ @media screen and (max-width: 640px) {
1521
+ .rls-pagination {
1522
+ --pvt-description-display: none;
1523
+ --pvt-count-display: block;
1524
+ padding: 0rem;
1525
+ }
1501
1526
  } /*# sourceMappingURL=Pagination.css.map */
1502
1527
 
1503
1528
  .rls-picker-day {
@@ -1938,6 +1963,7 @@
1938
1963
  .rls-bottom-sheet {
1939
1964
  --pvt-component-transform: translateY(100%);
1940
1965
  --pvt-component-height: 0rem;
1966
+ --pvt-component-max-height: 75%;
1941
1967
  --pvt-component-opacity: 0;
1942
1968
  --pvt-component-visibility: hidden;
1943
1969
  --pvt-backdrop-opacity: 0;
@@ -1965,7 +1991,7 @@
1965
1991
  bottom: 0px;
1966
1992
  width: 100%;
1967
1993
  max-width: 240rem;
1968
- max-height: 75%;
1994
+ max-height: var(--pvt-component-max-height);
1969
1995
  flex-direction: column;
1970
1996
  opacity: var(--pvt-component-opacity);
1971
1997
  visibility: var(--pvt-component-visibility);
@@ -1983,7 +2009,7 @@
1983
2009
  width: var(--rls-sizing-x24);
1984
2010
  height: var(--rls-sizing-x2);
1985
2011
  border-radius: var(--rls-sizing-x2);
1986
- background: var(--rls-app-color-600);
2012
+ background: var(--rls-app-color-300);
1987
2013
  margin: var(--rls-sizing-x3) auto;
1988
2014
  }
1989
2015
  .rls-bottom-sheet__backdrop {
@@ -1999,6 +2025,16 @@
1999
2025
  backdrop-filter: blur(2px);
2000
2026
  transition: opacity 120ms 0ms var(--rls-deceleration-curve),
2001
2027
  bottom 120ms 0ms var(--rls-deceleration-curve);
2028
+ }
2029
+ @media screen and (max-height: 960px) {
2030
+ .rls-bottom-sheet {
2031
+ --pvt-component-max-height: calc(100% - 48rem);
2032
+ }
2033
+ }
2034
+ @media screen and (max-height: 720px) {
2035
+ .rls-bottom-sheet {
2036
+ --pvt-component-max-height: calc(100% - 32rem);
2037
+ }
2002
2038
  } /*# sourceMappingURL=BottomSheet.css.map */
2003
2039
 
2004
2040
  .rls-card {
package/dist/cjs/index.js CHANGED
@@ -2021,13 +2021,13 @@ function RlsPagination({ suggestions, count, filter, onPagination }) {
2021
2021
  const goLastPagination = require$$0.useCallback(() => {
2022
2022
  refreshPagination(controller.current?.goLastPage());
2023
2023
  }, []);
2024
- return (jsxRuntimeExports.jsxs("div", { className: "rls-pagination", children: [jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goFirstPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-left" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goPreviousPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-left" }) })] }), jsxRuntimeExports.jsx("div", { className: "rls-pagination__pages", children: template?.pages.map((page, index) => {
2025
- return (jsxRuntimeExports.jsx("div", { className: renderClassStatus('rls-pagination__page', {
2026
- active: page.active
2027
- }), onClick: () => {
2028
- goToPagination(page);
2029
- }, children: page.label }, index));
2030
- }) }), jsxRuntimeExports.jsx("div", { className: "rls-pagination__description", children: template?.description }), jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goNextPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-right" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goLastPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-right" }) })] })] }));
2024
+ return (jsxRuntimeExports.jsxs("div", { className: "rls-pagination", children: [jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goFirstPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-left" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goPreviousPagination, disabled: template?.firstPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-left" }) })] }), jsxRuntimeExports.jsxs("div", { className: "rls-pagination__body", children: [jsxRuntimeExports.jsx("div", { className: "rls-pagination__pages", children: template?.pages.map((page, index) => {
2025
+ return (jsxRuntimeExports.jsx("div", { className: renderClassStatus('rls-pagination__page', {
2026
+ active: page.active
2027
+ }), onClick: () => {
2028
+ goToPagination(page);
2029
+ }, children: page.label }, index));
2030
+ }) }), jsxRuntimeExports.jsx("div", { className: "rls-pagination__description", children: template?.description }), jsxRuntimeExports.jsx("span", { className: "rls-pagination__count", children: suggestions.length })] }), jsxRuntimeExports.jsxs("div", { className: "rls-pagination__actions", children: [jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goNextPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrow-ios-right" }) }), jsxRuntimeExports.jsx("button", { className: "rls-pagination__action", onClick: goLastPagination, disabled: template?.lastPage, children: jsxRuntimeExports.jsx(RlsIcon, { value: "arrowhead-right" }) })] })] }));
2031
2031
  }
2032
2032
 
2033
2033
  function RlsPickerDayHeaders() {
@@ -2181,7 +2181,7 @@ function RlsPickerMonthElement({ month, onSelect, disabled }) {
2181
2181
  });
2182
2182
  }, [month.disabled, month.focused, month.selected, disabled]);
2183
2183
  const onClick = require$$0.useCallback(() => {
2184
- commons.itIsDefined(month.value) &&
2184
+ commons.valueIsDefined(month.value) &&
2185
2185
  !month.disabled &&
2186
2186
  !disabled &&
2187
2187
  onSelect(month.value);
@@ -2212,7 +2212,7 @@ function RlsPickerMonth({ date: _date, disabled, formControl, maxDate, minDate,
2212
2212
  maxDate
2213
2213
  };
2214
2214
  const month = components.verifyMonthPicker(options);
2215
- commons.itIsDefined(month)
2215
+ commons.valueIsDefined(month)
2216
2216
  ? setMonthValue(month)
2217
2217
  : setMonths(components.createMonthPicker(options));
2218
2218
  }, [date, year, value, minDate, maxDate]);
@@ -2224,7 +2224,7 @@ function RlsPickerMonth({ date: _date, disabled, formControl, maxDate, minDate,
2224
2224
  minDate,
2225
2225
  maxDate
2226
2226
  });
2227
- commons.itIsDefined(month)
2227
+ commons.valueIsDefined(month)
2228
2228
  ? formControl?.setValue(month)
2229
2229
  : setValue(formControl?.value ?? date.getMonth());
2230
2230
  }, [formControl?.value]);
@@ -2250,7 +2250,8 @@ function RlsPickerSelectorTitle({ monthControl, type, yearControl, date, disable
2250
2250
  setLabel(dates.MONTH_NAMES(monthControl.value ?? dates.Month.January));
2251
2251
  }, [monthControl.value]);
2252
2252
  const onPreviousMonth = require$$0.useCallback(() => {
2253
- if (commons.itIsDefined(monthControl.value) && commons.itIsDefined(yearControl.value)) {
2253
+ if (commons.valueIsDefined(monthControl.value) &&
2254
+ commons.valueIsDefined(yearControl.value)) {
2254
2255
  if (monthControl.value > dates.Month.January) {
2255
2256
  monthControl.setValue(monthControl.value - 1);
2256
2257
  }
@@ -2261,14 +2262,15 @@ function RlsPickerSelectorTitle({ monthControl, type, yearControl, date, disable
2261
2262
  }
2262
2263
  }, [monthControl.value, yearControl.value]);
2263
2264
  const onPreviousYear = require$$0.useCallback(() => {
2264
- commons.itIsDefined(yearControl.value) &&
2265
+ commons.valueIsDefined(yearControl.value) &&
2265
2266
  yearControl.setValue(yearControl.value - 1);
2266
2267
  }, [yearControl.value]);
2267
2268
  const onPrevious = require$$0.useCallback(() => {
2268
2269
  type === 'month' ? onPreviousMonth() : onPreviousYear();
2269
2270
  }, [type, onPreviousMonth, onPreviousYear]);
2270
2271
  const onNextMonth = require$$0.useCallback(() => {
2271
- if (commons.itIsDefined(monthControl.value) && commons.itIsDefined(yearControl.value)) {
2272
+ if (commons.valueIsDefined(monthControl.value) &&
2273
+ commons.valueIsDefined(yearControl.value)) {
2272
2274
  if (monthControl.value < dates.Month.December) {
2273
2275
  monthControl.setValue(monthControl.value + 1);
2274
2276
  }
@@ -2279,7 +2281,7 @@ function RlsPickerSelectorTitle({ monthControl, type, yearControl, date, disable
2279
2281
  }
2280
2282
  }, [monthControl.value, yearControl.value]);
2281
2283
  const onNextYear = require$$0.useCallback(() => {
2282
- commons.itIsDefined(yearControl.value) &&
2284
+ commons.valueIsDefined(yearControl.value) &&
2283
2285
  yearControl.setValue(yearControl.value + 1);
2284
2286
  }, [yearControl.value]);
2285
2287
  const onNext = require$$0.useCallback(() => {
@@ -2333,7 +2335,7 @@ function RlsPickerYear({ date: _date, disabled, formControl, maxDate, minDate, o
2333
2335
  }, [template.years, onSelect, disabled]);
2334
2336
  require$$0.useEffect(() => {
2335
2337
  const year = components.verifyYearPicker(createPickerOptions());
2336
- commons.itIsDefined(year)
2338
+ commons.valueIsDefined(year)
2337
2339
  ? formControl?.setValue(year)
2338
2340
  : setValue(formControl?.value ?? date.getFullYear());
2339
2341
  }, [formControl?.value]);
@@ -3040,14 +3042,14 @@ function RlsPickerDateRange({ automatic, date: _picker, disabled, formControl, m
3040
3042
  }, []);
3041
3043
  require$$0.useEffect(() => {
3042
3044
  setDate((date) => {
3043
- return commons.itIsDefined(yearControl.value)
3045
+ return commons.valueIsDefined(yearControl.value)
3044
3046
  ? dates.assignYearInDate(date, yearControl.value)
3045
3047
  : date;
3046
3048
  });
3047
3049
  }, [yearControl.value]);
3048
3050
  require$$0.useEffect(() => {
3049
3051
  setDate((date) => {
3050
- return commons.itIsDefined(monthControl.value)
3052
+ return commons.valueIsDefined(monthControl.value)
3051
3053
  ? dates.assignMonthInDate(date, monthControl.value)
3052
3054
  : date;
3053
3055
  });