@tmlmobilidade/ui 20250226.1358.59 → 20250226.1436.26
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 +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/styles.css +6 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -1027,7 +1027,7 @@ function Checkbox(props) {
|
|
1027
1027
|
return jsxRuntimeExports.jsx(core.Checkbox, { classNames: { ...styles$l, ...props.classNames }, ...props });
|
1028
1028
|
}
|
1029
1029
|
|
1030
|
-
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"};
|
1030
|
+
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"};
|
1031
1031
|
|
1032
1032
|
function parseComboboxItem(item) {
|
1033
1033
|
if (typeof item === 'string') {
|
@@ -1142,7 +1142,7 @@ function ComboboxComponent(props) {
|
|
1142
1142
|
const itemData = parseComboboxItem(data.find(dataItem => getValue(dataItem) === item) || '');
|
1143
1143
|
if (!itemData)
|
1144
1144
|
return null;
|
1145
|
-
return (jsxRuntimeExports.jsx(core.Pill, { className: styles$k.pill, onRemove: () => removeValue(item), withRemoveButton: true, children: jsxRuntimeExports.jsxs(
|
1145
|
+
return (jsxRuntimeExports.jsx(core.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));
|
1146
1146
|
});
|
1147
1147
|
}
|
1148
1148
|
return null;
|
@@ -1155,7 +1155,7 @@ function ComboboxComponent(props) {
|
|
1155
1155
|
return (jsxRuntimeExports.jsx(core.Combobox.Option, { value: itemData.value, active: Array.isArray(value)
|
1156
1156
|
&& value.some(v => getValue(v) === itemData.value), children: jsxRuntimeExports.jsxs(core.Group, { gap: "sm", children: [multiple
|
1157
1157
|
&& Array.isArray(value)
|
1158
|
-
&& value.some(v => getValue(v) === itemData.value) && jsxRuntimeExports.jsx(core.CheckIcon, { size: 12 }), jsxRuntimeExports.jsxs(
|
1158
|
+
&& value.some(v => getValue(v) === itemData.value) && jsxRuntimeExports.jsx(core.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));
|
1159
1159
|
} }));
|
1160
1160
|
}
|
1161
1161
|
// Render Input Field
|
@@ -1174,13 +1174,13 @@ function ComboboxComponent(props) {
|
|
1174
1174
|
} }) }), jsxRuntimeExports.jsx("div", { className: styles$k.pillClearButton, children: renderClearButton() })] }) }) }));
|
1175
1175
|
}
|
1176
1176
|
const itemData = parseComboboxItem(data.find(dataItem => getValue(dataItem) === value) || '');
|
1177
|
-
return (jsxRuntimeExports.jsx(core.Combobox.Target, { children: searchable ? (jsxRuntimeExports.jsx(core.InputBase, { className: styles$k.input, onChange: handleSearchChange, onClick: () => combobox.openDropdown(), onFocus: () => combobox.openDropdown(), placeholder: "Search value", rightSection: renderClearButton(), type: "text", value: search, onBlur: () => {
|
1177
|
+
return (jsxRuntimeExports.jsx(core.Combobox.Target, { children: searchable ? (jsxRuntimeExports.jsx(core.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: () => {
|
1178
1178
|
combobox.closeDropdown();
|
1179
1179
|
setSearch(itemData ? itemData.label : '');
|
1180
1180
|
}, rightSectionPointerEvents: value === null ? 'none' : 'all' })) : (jsxRuntimeExports.jsx(core.InputBase, { className: styles$k.input, component: "button", onClick: () => combobox.openDropdown(), onFocus: () => combobox.openDropdown(), rightSection: renderClearButton(), type: "button", onBlur: () => {
|
1181
1181
|
combobox.closeDropdown();
|
1182
1182
|
setSearch(value?.toString() || '');
|
1183
|
-
}, rightSectionPointerEvents: value === null ? 'none' : 'all', pointer: true, children: itemData ? (jsxRuntimeExports.jsxs(
|
1183
|
+
}, 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(core.Input.Placeholder, { className: styles$k.placeholder, children: "Pick value" })) })) }));
|
1184
1184
|
}
|
1185
1185
|
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(core.Combobox, { store: combobox, withinPortal: false, onOptionSubmit: (val) => {
|
1186
1186
|
updateValue(val);
|