@scaleflex/ui-tw 0.0.107 → 0.0.109
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.
|
@@ -84,7 +84,7 @@ export function InputTags(_ref) {
|
|
|
84
84
|
return label.trim().replace(/\s+/g, ' ');
|
|
85
85
|
};
|
|
86
86
|
var normalizeValue = function normalizeValue(label) {
|
|
87
|
-
return normalizeLabel(label).
|
|
87
|
+
return normalizeLabel(label).replace(/\s+/g, '-');
|
|
88
88
|
};
|
|
89
89
|
var createTag = function createTag(label) {
|
|
90
90
|
return _defineProperty({
|
|
@@ -131,13 +131,11 @@ export function InputTags(_ref) {
|
|
|
131
131
|
}, /*#__PURE__*/React.createElement("button", {
|
|
132
132
|
id: formItemId,
|
|
133
133
|
role: "combobox-tags",
|
|
134
|
+
type: "button",
|
|
134
135
|
"aria-expanded": open,
|
|
135
136
|
"aria-invalid": rest['aria-invalid'],
|
|
136
137
|
disabled: disabled || generateTagsPending,
|
|
137
|
-
className: cn.apply(void 0, ['relative flex w-full', onGenerateTags || value.length > 0 ? 'flex-col' : 'items-center'].concat(_toConsumableArray(getBaseInputClasses()), [selectionHighlightClassNames, focusRingClassNames, readOnly && selectReadOnlyClassNames, className]))
|
|
138
|
-
onClick: function onClick() {
|
|
139
|
-
return !disabled && setOpen(true);
|
|
140
|
-
}
|
|
138
|
+
className: cn.apply(void 0, ['relative flex w-full', onGenerateTags || value.length > 0 ? 'flex-col' : 'items-center'].concat(_toConsumableArray(getBaseInputClasses()), [selectionHighlightClassNames, focusRingClassNames, readOnly && selectReadOnlyClassNames, className]))
|
|
141
139
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
142
140
|
className: cn('flex w-full flex-wrap gap-2 overflow-y-auto', inputTagsVariants({
|
|
143
141
|
size: size
|
|
@@ -150,8 +148,9 @@ export function InputTags(_ref) {
|
|
|
150
148
|
key: tag[valueProp],
|
|
151
149
|
size: size,
|
|
152
150
|
removable: true,
|
|
153
|
-
onRemove: function onRemove() {
|
|
154
|
-
|
|
151
|
+
onRemove: function onRemove(event) {
|
|
152
|
+
event.stopPropagation();
|
|
153
|
+
handleRemoveTag(tag);
|
|
155
154
|
}
|
|
156
155
|
}, tag.label);
|
|
157
156
|
})), onGenerateTags || value.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.109",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@radix-ui/react-slot": "^1.1.2",
|
|
26
26
|
"@radix-ui/react-switch": "^1.0.1",
|
|
27
27
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
28
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
28
|
+
"@scaleflex/icons-tw": "^0.0.109",
|
|
29
29
|
"@tanstack/react-table": "^8.21.3",
|
|
30
30
|
"@types/lodash.merge": "^4.6.9",
|
|
31
31
|
"class-variance-authority": "^0.7.1",
|
package/pill/pill.component.js
CHANGED
|
@@ -47,7 +47,7 @@ function Pill(_ref) {
|
|
|
47
47
|
}, props.children), removable && /*#__PURE__*/React.createElement("button", {
|
|
48
48
|
type: "button",
|
|
49
49
|
onClick: onRemove,
|
|
50
|
-
className: cn('text-muted-foreground shrink-0 cursor-pointer transition-transform duration-150 ease-in-out active:scale-85', removePillVariants({
|
|
50
|
+
className: cn('text-muted-foreground inline-flex shrink-0 cursor-pointer transition-transform duration-150 ease-in-out active:scale-85', removePillVariants({
|
|
51
51
|
size: size,
|
|
52
52
|
variant: variant
|
|
53
53
|
}), focusRingClassNames),
|