@rolster/react-components 18.17.0 → 18.17.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/es/index.js CHANGED
@@ -1438,25 +1438,25 @@ function RlsInput({ children, disabled, formControl, identifier, onValue, placeh
1438
1438
  return (jsxRuntimeExports.jsxs("div", { id: identifier, className: renderClassStatus('rls-input', {
1439
1439
  focused: formControl?.focused ?? focused,
1440
1440
  disabled: formControl?.disabled || disabled
1441
- }), children: [jsxRuntimeExports.jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type ?? 'text', placeholder: placeholder, disabled: formControl?.disabled || disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange, value: formControl?.value ?? value ?? '' }), jsxRuntimeExports.jsx("span", { className: "rls-input__value", children: children })] }));
1441
+ }), children: [jsxRuntimeExports.jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type ?? 'text', placeholder: placeholder, disabled: formControl?.disabled || disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange, value: formControl?.value || value || '' }), jsxRuntimeExports.jsx("span", { className: "rls-input__value", children: children })] }));
1442
1442
  }
1443
1443
 
1444
1444
  function RlsInputMoney({ decimals, disabled, formControl, identifier, onValue, placeholder, symbol, value }) {
1445
1445
  const [valueInput, setValueInput] = useState(value || 0);
1446
- function onChange(value) {
1446
+ function onValueInput(value) {
1447
1447
  !formControl && setValueInput(value);
1448
1448
  onValue && onValue(value);
1449
1449
  }
1450
- return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-money", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onChange, children: jsxRuntimeExports.jsx(RlsAmount, { value: formControl?.value ?? value ?? valueInput, symbol: symbol, decimals: decimals }) }) }));
1450
+ return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-money", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: jsxRuntimeExports.jsx(RlsAmount, { value: formControl?.value ?? value ?? valueInput, symbol: symbol, decimals: decimals }) }) }));
1451
1451
  }
1452
1452
 
1453
1453
  function RlsInputNumber({ disabled, formControl, identifier, onValue, placeholder, value }) {
1454
1454
  const [valueInput, setValueInput] = useState(value ?? 0);
1455
- function onChange(value) {
1455
+ function onValueInput(value) {
1456
1456
  !formControl && setValueInput(value);
1457
1457
  onValue && onValue(value);
1458
1458
  }
1459
- return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-number", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onChange, children: formControl?.value ?? value ?? valueInput }) }));
1459
+ return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-number", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: value, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? value ?? valueInput }) }));
1460
1460
  }
1461
1461
 
1462
1462
  function RlsInputPassword({ disabled, formControl, identifier, onValue, placeholder, type }) {
@@ -1485,11 +1485,11 @@ function RlsInputSearch({ formControl, identifier, onSearch, placeholder }) {
1485
1485
 
1486
1486
  function RlsInputText({ disabled, formControl, identifier, onValue, placeholder, value }) {
1487
1487
  const [valueInput, setValueInput] = useState(value ?? '');
1488
- function onChange(value) {
1488
+ function onValueInput(value) {
1489
1489
  !formControl && setValueInput(value);
1490
1490
  onValue && onValue(value);
1491
1491
  }
1492
- return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-text", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "text", value: value, disabled: disabled, placeholder: placeholder, onValue: onChange, children: formControl?.value ?? value ?? valueInput }) }));
1492
+ return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-text", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "text", value: value, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? value ?? valueInput }) }));
1493
1493
  }
1494
1494
 
1495
1495
  function RlsLabel({ children, rlsTheme }) {
@@ -1986,7 +1986,7 @@ class ConfirmationResult extends PartialSealed {
1986
1986
  }
1987
1987
  }
1988
1988
  function RlsConfirmation({ approved, content, reject, rlsTheme, subtitle, title, visible }) {
1989
- return (jsxRuntimeExports.jsxs("div", { className: renderClassStatus('rls-confirmation', { visible }), "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__message", children: content })) }), (approved || reject) && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__actions", children: [approved && (jsxRuntimeExports.jsx(RlsButton, { type: "raised", onClick: approved.onClick, children: approved.label })), reject && (jsxRuntimeExports.jsx(RlsButton, { type: "outline", onClick: reject.onClick, children: reject.label }))] }) }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__backdrop" })] }));
1989
+ return (jsxRuntimeExports.jsxs("div", { className: renderClassStatus('rls-confirmation', { visible }), "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__message", 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: "raised", onClick: approved.onClick, children: approved.label })), reject && (jsxRuntimeExports.jsx(RlsButton, { identifier: reject.identifier, type: "outline", onClick: reject.onClick, children: reject.label }))] }) }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__backdrop" })] }));
1990
1990
  }
1991
1991
  function useConfirmationService() {
1992
1992
  const [config, setConfig] = useState({});
@@ -2026,28 +2026,28 @@ function useConfirmationService() {
2026
2026
  };
2027
2027
  }
2028
2028
 
2029
- function RlsDatatableHeader({ children }) {
2030
- return jsxRuntimeExports.jsx("tr", { className: "rls-datatable__header", children: children });
2029
+ function RlsDatatableHeader({ children, identifier }) {
2030
+ return (jsxRuntimeExports.jsx("tr", { id: identifier, className: "rls-datatable__header", children: children }));
2031
2031
  }
2032
- function RlsDatatableTitle({ children, className, control }) {
2033
- return (jsxRuntimeExports.jsx("th", { className: renderClassStatus('rls-datatable__title', { control }, className).trim(), children: children }));
2032
+ function RlsDatatableTitle({ children, className, control, identifier }) {
2033
+ return (jsxRuntimeExports.jsx("th", { id: identifier, className: renderClassStatus('rls-datatable__title', { control }, className).trim(), children: children }));
2034
2034
  }
2035
- function RlsDatatableRecord({ children, className, error, warning }) {
2036
- return (jsxRuntimeExports.jsx("tr", { className: renderClassStatus('rls-datatable__record', { error, warning }, className).trim(), children: children }));
2035
+ function RlsDatatableRecord({ children, className, error, identifier, warning }) {
2036
+ return (jsxRuntimeExports.jsx("tr", { id: identifier, className: renderClassStatus('rls-datatable__record', { error, warning }, className).trim(), children: children }));
2037
2037
  }
2038
- function RlsDatatableTotals({ children, className, error, warning }) {
2039
- return (jsxRuntimeExports.jsx("div", { className: renderClassStatus('rls-datatable__totals', { error, warning }, className).trim(), children: children }));
2038
+ function RlsDatatableTotals({ children, className, error, identifier, warning }) {
2039
+ return (jsxRuntimeExports.jsx("div", { id: identifier, className: renderClassStatus('rls-datatable__totals', { error, warning }, className).trim(), children: children }));
2040
2040
  }
2041
- function RlsDatatableCell({ children, className, control, overflow }) {
2042
- return (jsxRuntimeExports.jsx("th", { className: renderClassStatus('rls-datatable__cell', { control, overflow }, className).trim(), children: children }));
2041
+ function RlsDatatableCell({ children, className, control, identifier, overflow }) {
2042
+ return (jsxRuntimeExports.jsx("th", { id: identifier, className: renderClassStatus('rls-datatable__cell', { control, overflow }, className).trim(), children: children }));
2043
2043
  }
2044
- function RlsDatatableData({ children, className, control, overflow }) {
2045
- return (jsxRuntimeExports.jsx("div", { className: renderClassStatus('rls-datatable__data', { control, overflow }, className).trim(), children: children }));
2044
+ function RlsDatatableData({ children, className, control, identifier, overflow }) {
2045
+ return (jsxRuntimeExports.jsx("div", { id: identifier, className: renderClassStatus('rls-datatable__data', { control, overflow }, className).trim(), children: children }));
2046
2046
  }
2047
- function RlsDatatable({ children, datatable, footer, header, rlsTheme, summary }) {
2047
+ function RlsDatatable({ children, datatable, footer, header, identifier, rlsTheme, summary }) {
2048
2048
  return (jsxRuntimeExports.jsxs("div", { className: renderClassStatus('rls-datatable', {
2049
2049
  scrolleable: datatable?.scrolleable
2050
- }), "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("table", { children: [header && jsxRuntimeExports.jsx("thead", { className: "rls-datatable__thead", children: header }), jsxRuntimeExports.jsx("tbody", { ref: datatable?.tableRef, className: "rls-datatable__tbody", children: children })] }), summary && jsxRuntimeExports.jsx("div", { className: "rls-datatable__tsummary", children: summary }), footer && jsxRuntimeExports.jsx("div", { className: "rls-datatable__tfooter", children: footer })] }));
2050
+ }), "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("table", { id: identifier, children: [header && jsxRuntimeExports.jsx("thead", { className: "rls-datatable__thead", children: header }), jsxRuntimeExports.jsx("tbody", { ref: datatable?.tableRef, className: "rls-datatable__tbody", children: children })] }), summary && jsxRuntimeExports.jsx("div", { className: "rls-datatable__tsummary", children: summary }), footer && jsxRuntimeExports.jsx("div", { className: "rls-datatable__tfooter", children: footer })] }));
2051
2051
  }
2052
2052
 
2053
2053
  function createObserver(options) {