@scaleflex/ui-tw 0.0.78 → 0.0.80
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/combobox/combobox.types.d.ts +1 -0
- package/command/command.component.d.ts +1 -1
- package/command/command.component.js +3 -2
- package/date-picker/date-picker.component.d.ts +1 -1
- package/date-picker/date-picker.component.js +3 -2
- package/date-picker/date-picker.types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -63,6 +63,7 @@ export interface CommandItemProps extends ComponentProps<typeof CommandPrimitive
|
|
|
63
63
|
shortcut?: ReactElement | string;
|
|
64
64
|
selectedValue?: string | string[];
|
|
65
65
|
multiple?: boolean;
|
|
66
|
+
iconClassName?: string;
|
|
66
67
|
}
|
|
67
68
|
interface ComboboxCommonProps {
|
|
68
69
|
options: SelectOption[];
|
|
@@ -13,7 +13,7 @@ declare function CommandList({ className, ...props }: ComponentProps<typeof Comm
|
|
|
13
13
|
declare function CommandEmpty({ className, ...rest }: ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
|
|
14
14
|
declare function CommandGroup({ className, size, ...props }: CommandGroupProps): React.JSX.Element;
|
|
15
15
|
declare function CommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
|
|
16
|
-
declare function CommandItem({ className, size, isGroup, icon, tooltip, children, selectedValue, multiple, value, shortcut, disabledTooltip, disabled, ...props }: CommandItemProps): React.JSX.Element;
|
|
16
|
+
declare function CommandItem({ className, size, isGroup, icon, tooltip, children, selectedValue, multiple, value, shortcut, disabledTooltip, disabled, iconClassName, ...props }: CommandItemProps): React.JSX.Element;
|
|
17
17
|
declare function CommandCheckboxItem({ className, size, isGroup, children, selectedValue, value, icon, disabled, tooltip, disabledTooltip, ...props }: CommandItemProps): React.JSX.Element;
|
|
18
18
|
declare function CommandShortcut({ className, ...props }: ComponentProps<'span'>): React.JSX.Element;
|
|
19
19
|
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandCheckboxItem, CommandShortcut, CommandSeparator, };
|
|
@@ -7,7 +7,7 @@ var _excluded = ["className"],
|
|
|
7
7
|
_excluded5 = ["className"],
|
|
8
8
|
_excluded6 = ["className", "size"],
|
|
9
9
|
_excluded7 = ["className"],
|
|
10
|
-
_excluded8 = ["className", "size", "isGroup", "icon", "tooltip", "children", "selectedValue", "multiple", "value", "shortcut", "disabledTooltip", "disabled"],
|
|
10
|
+
_excluded8 = ["className", "size", "isGroup", "icon", "tooltip", "children", "selectedValue", "multiple", "value", "shortcut", "disabledTooltip", "disabled", "iconClassName"],
|
|
11
11
|
_excluded9 = ["className", "size", "isGroup", "children", "selectedValue", "value", "icon", "disabled", "tooltip", "disabledTooltip"],
|
|
12
12
|
_excluded10 = ["className"];
|
|
13
13
|
import { Checkbox } from '@scaleflex/ui-tw/checkbox';
|
|
@@ -121,6 +121,7 @@ function CommandItem(_ref8) {
|
|
|
121
121
|
shortcut = _ref8.shortcut,
|
|
122
122
|
disabledTooltip = _ref8.disabledTooltip,
|
|
123
123
|
disabled = _ref8.disabled,
|
|
124
|
+
iconClassName = _ref8.iconClassName,
|
|
124
125
|
props = _objectWithoutProperties(_ref8, _excluded8);
|
|
125
126
|
var selected = value && (multiple ? selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.includes(value) : value === selectedValue);
|
|
126
127
|
return /*#__PURE__*/React.createElement(CommandPrimitive.Item, _extends({
|
|
@@ -135,7 +136,7 @@ function CommandItem(_ref8) {
|
|
|
135
136
|
}, icon && /*#__PURE__*/React.createElement(SelectIcon, {
|
|
136
137
|
size: size,
|
|
137
138
|
icon: icon,
|
|
138
|
-
className: cn('text-muted-foreground hover:text-primary shrink-0', selected && 'text-primary', disabled && 'opacity-50')
|
|
139
|
+
className: cn('text-muted-foreground hover:text-primary shrink-0', selected && 'text-primary', disabled && 'opacity-50', iconClassName)
|
|
139
140
|
}), /*#__PURE__*/React.createElement("div", {
|
|
140
141
|
className: "flex items-center gap-1 overflow-hidden"
|
|
141
142
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DatePickerProps } from './date-picker.types';
|
|
3
|
-
declare function DatePicker({ minDate, maxDate, readOnly, defaultDate, size, invalidDateText, disabled, onChange, popoverClassName, defaultOpen, popoverContentProps, onKeyDown, onBlur, placeholder, format: dateFormat, locale, calendarProps, ...rest }: DatePickerProps): React.JSX.Element;
|
|
3
|
+
declare function DatePicker({ minDate, maxDate, readOnly, defaultDate, size, invalidDateText, disabled, onChange, popoverClassName, defaultOpen, popoverContentProps, onKeyDown, onBlur, placeholder, format: dateFormat, locale, calendarProps, className, ...rest }: DatePickerProps): React.JSX.Element;
|
|
4
4
|
export { DatePicker };
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["minDate", "maxDate", "readOnly", "defaultDate", "size", "invalidDateText", "disabled", "onChange", "popoverClassName", "defaultOpen", "popoverContentProps", "onKeyDown", "onBlur", "placeholder", "format", "locale", "calendarProps"];
|
|
5
|
+
var _excluded = ["minDate", "maxDate", "readOnly", "defaultDate", "size", "invalidDateText", "disabled", "onChange", "popoverClassName", "defaultOpen", "popoverContentProps", "onKeyDown", "onBlur", "placeholder", "format", "locale", "calendarProps", "className"];
|
|
6
6
|
import { Button } from '@scaleflex/ui-tw/button';
|
|
7
7
|
import { Calendar } from '@scaleflex/ui-tw/calendar';
|
|
8
8
|
import { Input } from '@scaleflex/ui-tw/input';
|
|
@@ -40,6 +40,7 @@ function DatePicker(_ref) {
|
|
|
40
40
|
_ref$locale = _ref.locale,
|
|
41
41
|
locale = _ref$locale === void 0 ? enGB : _ref$locale,
|
|
42
42
|
calendarProps = _ref.calendarProps,
|
|
43
|
+
className = _ref.className,
|
|
43
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
44
45
|
var inputRef = useRef(null);
|
|
45
46
|
var isEscapeBlur = useRef(false);
|
|
@@ -128,7 +129,7 @@ function DatePicker(_ref) {
|
|
|
128
129
|
disabled: disabled,
|
|
129
130
|
className: cn.apply(void 0, _toConsumableArray(getBaseSelectClassNames()).concat(_toConsumableArray(getBaseInputClasses()), ['hover:border-secondary-foreground/50', selectTriggerVariants({
|
|
130
131
|
size: size
|
|
131
|
-
}), readOnly && selectReadOnlyClassNames, !isInputValid && 'border-destructive'])),
|
|
132
|
+
}), readOnly && selectReadOnlyClassNames, !isInputValid && 'border-destructive', className])),
|
|
132
133
|
onChange: handleInputChange,
|
|
133
134
|
onKeyDown: handleKeyDown,
|
|
134
135
|
onBlur: handleBlur
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.80",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@radix-ui/react-slot": "^1.1.2",
|
|
24
24
|
"@radix-ui/react-switch": "^1.0.1",
|
|
25
25
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
26
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
26
|
+
"@scaleflex/icons-tw": "^0.0.80",
|
|
27
27
|
"@tanstack/react-table": "^8.21.3",
|
|
28
28
|
"@types/lodash.merge": "^4.6.9",
|
|
29
29
|
"class-variance-authority": "^0.7.1",
|