@tmlmobilidade/ui 20250226.1358.59 → 20250227.1959.42

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/esm/index.js CHANGED
@@ -1010,7 +1010,7 @@ function Checkbox(props) {
1010
1010
  return jsxRuntimeExports.jsx(Checkbox$1, { classNames: { ...styles$l, ...props.classNames }, ...props });
1011
1011
  }
1012
1012
 
1013
- var styles$k = {"wrapper":"styles-module_wrapper__7zsRX","input":"styles-module_input__kZP4l","placeholder":"styles-module_placeholder__uazW4","pillInputWrapper":"styles-module_pillInputWrapper__rtJzo","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"};
1013
+ var styles$k = {"wrapper":"styles-module_wrapper__7zsRX","input":"styles-module_input__kZP4l","placeholder":"styles-module_placeholder__uazW4","pillInputWrapper":"styles-module_pillInputWrapper__rtJzo","icon":"styles-module_icon__jXQ8R","pillClearButton":"styles-module_pillClearButton__RYrwJ","pill":"styles-module_pill__eWbVa","label":"styles-module_label__tB0Ce","labelWrapper":"styles-module_labelWrapper__eFj6h","description":"styles-module_description__KHjxV","error":"styles-module_error__fOsRf","dropdownWrapper":"styles-module_dropdownWrapper__guQYa"};
1014
1014
 
1015
1015
  function parseComboboxItem(item) {
1016
1016
  if (typeof item === 'string') {
@@ -1125,7 +1125,7 @@ function ComboboxComponent(props) {
1125
1125
  const itemData = parseComboboxItem(data.find(dataItem => getValue(dataItem) === item) || '');
1126
1126
  if (!itemData)
1127
1127
  return null;
1128
- return (jsxRuntimeExports.jsx(Pill, { className: styles$k.pill, onRemove: () => removeValue(item), withRemoveButton: true, children: jsxRuntimeExports.jsxs(Group, { gap: "sm", children: [itemData.icon && jsxRuntimeExports.jsx("span", { className: styles$k.icon, children: itemData.icon }), jsxRuntimeExports.jsx("span", { children: itemData.label })] }) }, item));
1128
+ return (jsxRuntimeExports.jsx(Pill, { className: styles$k.pill, onRemove: () => removeValue(item), withRemoveButton: true, children: jsxRuntimeExports.jsxs("div", { className: styles$k.labelWrapper, children: [itemData.icon && jsxRuntimeExports.jsx("span", { className: styles$k.icon, children: itemData.icon }), jsxRuntimeExports.jsx("span", { children: itemData.label })] }) }, item));
1129
1129
  });
1130
1130
  }
1131
1131
  return null;
@@ -1138,7 +1138,7 @@ function ComboboxComponent(props) {
1138
1138
  return (jsxRuntimeExports.jsx(Combobox.Option, { value: itemData.value, active: Array.isArray(value)
1139
1139
  && value.some(v => getValue(v) === itemData.value), children: jsxRuntimeExports.jsxs(Group, { gap: "sm", children: [multiple
1140
1140
  && Array.isArray(value)
1141
- && value.some(v => getValue(v) === itemData.value) && jsxRuntimeExports.jsx(CheckIcon, { size: 12 }), jsxRuntimeExports.jsxs(Group, { gap: "sm", children: [itemData.icon && jsxRuntimeExports.jsx("span", { className: styles$k.icon, children: itemData.icon }), jsxRuntimeExports.jsx("span", { children: itemData.label })] })] }) }, itemData.value));
1141
+ && value.some(v => getValue(v) === itemData.value) && jsxRuntimeExports.jsx(CheckIcon, { size: 12 }), jsxRuntimeExports.jsxs("div", { className: styles$k.labelWrapper, children: [itemData.icon && jsxRuntimeExports.jsx("span", { className: styles$k.icon, children: itemData.icon }), jsxRuntimeExports.jsx("span", { children: itemData.label })] })] }) }, itemData.value));
1142
1142
  } }));
1143
1143
  }
1144
1144
  // Render Input Field
@@ -1157,13 +1157,13 @@ function ComboboxComponent(props) {
1157
1157
  } }) }), jsxRuntimeExports.jsx("div", { className: styles$k.pillClearButton, children: renderClearButton() })] }) }) }));
1158
1158
  }
1159
1159
  const itemData = parseComboboxItem(data.find(dataItem => getValue(dataItem) === value) || '');
1160
- return (jsxRuntimeExports.jsx(Combobox.Target, { children: searchable ? (jsxRuntimeExports.jsx(InputBase, { className: styles$k.input, onChange: handleSearchChange, onClick: () => combobox.openDropdown(), onFocus: () => combobox.openDropdown(), placeholder: "Search value", rightSection: renderClearButton(), type: "text", value: search, onBlur: () => {
1160
+ return (jsxRuntimeExports.jsx(Combobox.Target, { children: searchable ? (jsxRuntimeExports.jsx(InputBase, { className: styles$k.input, leftSection: itemData?.icon, onChange: handleSearchChange, onClick: () => combobox.openDropdown(), onFocus: () => combobox.openDropdown(), placeholder: "Search value", rightSection: renderClearButton(), type: "text", value: search, onBlur: () => {
1161
1161
  combobox.closeDropdown();
1162
1162
  setSearch(itemData ? itemData.label : '');
1163
1163
  }, rightSectionPointerEvents: value === null ? 'none' : 'all' })) : (jsxRuntimeExports.jsx(InputBase, { className: styles$k.input, component: "button", onClick: () => combobox.openDropdown(), onFocus: () => combobox.openDropdown(), rightSection: renderClearButton(), type: "button", onBlur: () => {
1164
1164
  combobox.closeDropdown();
1165
1165
  setSearch(value?.toString() || '');
1166
- }, rightSectionPointerEvents: value === null ? 'none' : 'all', pointer: true, children: itemData ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles$k.icon, children: itemData.icon }), itemData.label] })) : (jsxRuntimeExports.jsx(Input.Placeholder, { className: styles$k.placeholder, children: "Pick value" })) })) }));
1166
+ }, rightSectionPointerEvents: value === null ? 'none' : 'all', pointer: true, children: itemData ? (jsxRuntimeExports.jsxs("div", { className: styles$k.labelWrapper, children: [itemData.icon && jsxRuntimeExports.jsx("span", { className: styles$k.icon, children: itemData.icon }), jsxRuntimeExports.jsx("span", { children: itemData.label })] })) : (jsxRuntimeExports.jsx(Input.Placeholder, { className: styles$k.placeholder, children: "Pick value" })) })) }));
1167
1167
  }
1168
1168
  return (jsxRuntimeExports.jsxs("div", { className: cn(styles$k.wrapper, className), style: { width: fullWidth ? '100%' : undefined }, children: [label && jsxRuntimeExports.jsx("label", { className: styles$k.label, children: label }), description && jsxRuntimeExports.jsx("p", { className: styles$k.description, children: description }), error && jsxRuntimeExports.jsx("p", { className: styles$k.error, children: error }), jsxRuntimeExports.jsxs(Combobox, { store: combobox, withinPortal: false, onOptionSubmit: (val) => {
1169
1169
  updateValue(val);