@tmlmobilidade/ui 20250128.1631.30 → 20250128.1719.49

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.js CHANGED
@@ -11,6 +11,7 @@ var dates = require('@mantine/dates');
11
11
  var modals = require('@mantine/modals');
12
12
  var notifications = require('@mantine/notifications');
13
13
  var hooks = require('@mantine/hooks');
14
+ var form = require('@mantine/form');
14
15
 
15
16
  function _interopNamespaceDefault(e) {
16
17
  var n = Object.create(null);
@@ -857,10 +858,10 @@ function Component({ classNames, ...props }) {
857
858
  return jsxRuntimeExports.jsx(core.Textarea, { classNames: classNames, ...props });
858
859
  }
859
860
 
860
- var styles$i = {"wrapper":"styles-module_wrapper__7zsRX","input":"styles-module_input__kZP4l","placeholder":"styles-module_placeholder__uazW4","pillInputWrapper":"styles-module_pillInputWrapper__rtJzo","pillInputField":"styles-module_pillInputField__LYXhi","icon":"styles-module_icon__jXQ8R","pillClearButton":"styles-module_pillClearButton__RYrwJ","pill":"styles-module_pill__eWbVa","label":"styles-module_label__tB0Ce","description":"styles-module_description__KHjxV","dropdownWrapper":"styles-module_dropdownWrapper__guQYa"};
861
+ var styles$i = {"wrapper":"styles-module_wrapper__7zsRX","input":"styles-module_input__kZP4l","placeholder":"styles-module_placeholder__uazW4","pillInputWrapper":"styles-module_pillInputWrapper__rtJzo","pillInputField":"styles-module_pillInputField__LYXhi","icon":"styles-module_icon__jXQ8R","pillClearButton":"styles-module_pillClearButton__RYrwJ","pill":"styles-module_pill__eWbVa","label":"styles-module_label__tB0Ce","description":"styles-module_description__KHjxV","error":"styles-module_error__fOsRf","dropdownWrapper":"styles-module_dropdownWrapper__guQYa"};
861
862
 
862
863
  function ComboboxComponent(props) {
863
- const { multiple = false, searchable = false, autoComplete = false, onChange, data = [], clearable = false, label, description, fullWidth = false, maxHeight = 200, className, ...rest } = props;
864
+ const { multiple = false, searchable = false, autoComplete = false, onChange, data = [], clearable = false, label, description, fullWidth = false, maxHeight = 200, className, error, ...rest } = props;
864
865
  // Setup Combobox store
865
866
  const combobox = core.useCombobox({
866
867
  onDropdownClose: () => combobox.resetSelectedOption(),
@@ -991,7 +992,7 @@ function ComboboxComponent(props) {
991
992
  setSearch(value?.toString() || '');
992
993
  }, rightSection: renderClearButton(), rightSectionPointerEvents: value === null ? 'none' : 'all', children: Array.isArray(value) ? (value.map((item) => getLabel(item)).join(', ')) : typeof value === 'string' ? (getLabel(value)) : (jsxRuntimeExports.jsx(core.Input.Placeholder, { className: styles$i.placeholder, children: "Pick value" })) })) }));
993
994
  }
994
- return (jsxRuntimeExports.jsxs("div", { className: cn(styles$i.wrapper, className), style: { width: fullWidth ? '100%' : undefined }, children: [label && jsxRuntimeExports.jsx("label", { className: styles$i.label, children: label }), description && jsxRuntimeExports.jsx("p", { className: styles$i.description, children: description }), jsxRuntimeExports.jsxs(core.Combobox, { store: combobox, onOptionSubmit: (val) => {
995
+ return (jsxRuntimeExports.jsxs("div", { className: cn(styles$i.wrapper, className), style: { width: fullWidth ? '100%' : undefined }, children: [label && jsxRuntimeExports.jsx("label", { className: styles$i.label, children: label }), description && jsxRuntimeExports.jsx("p", { className: styles$i.description, children: description }), error && jsxRuntimeExports.jsx("p", { className: styles$i.error, children: error }), jsxRuntimeExports.jsxs(core.Combobox, { store: combobox, onOptionSubmit: (val) => {
995
996
  const selectedItem = data.find((item) => getValue(item) === val) || val;
996
997
  updateValue(selectedItem);
997
998
  }, withinPortal: false, ...rest, children: [renderInput(), jsxRuntimeExports.jsx(core.Combobox.Dropdown, { className: styles$i.dropdownWrapper, children: jsxRuntimeExports.jsx(core.Combobox.Options, { style: { overflowY: 'scroll', maxHeight }, children: filterData().length > 0 ? (renderOptions()) : (jsxRuntimeExports.jsx(core.Combobox.Empty, { children: "Nothing found..." })) }) })] })] }));
@@ -1710,4 +1711,10 @@ Object.keys(hooks).forEach(function (k) {
1710
1711
  get: function () { return hooks[k]; }
1711
1712
  });
1712
1713
  });
1714
+ Object.keys(form).forEach(function (k) {
1715
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
1716
+ enumerable: true,
1717
+ get: function () { return form[k]; }
1718
+ });
1719
+ });
1713
1720
  //# sourceMappingURL=index.js.map