@scaleflex/ui-tw 0.0.32 → 0.0.34
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/button/button.component.d.ts +1 -1
- package/button/button.types.d.ts +1 -1
- package/button/button.utils.d.ts +1 -1
- package/button/components/copy-to-clipboard-button.d.ts +1 -1
- package/button/components/end-icon.d.ts +1 -1
- package/button/components/start-icon.d.ts +1 -1
- package/card/card.component.d.ts +1 -1
- package/combobox/combobox-multi-inline/combobox-multi-inline.component.d.ts +2 -2
- package/combobox/combobox-multi-inline/combobox-multi-inline.component.js +15 -5
- package/combobox/combobox-multi-tag/combobox-multi-tag.component.d.ts +2 -2
- package/combobox/combobox-multi-tag/combobox-multi-tag.component.js +24 -11
- package/combobox/combobox-single/combobox-single.component.d.ts +2 -2
- package/combobox/combobox-single/combobox-single.component.js +21 -9
- package/combobox/combobox.component.d.ts +1 -1
- package/combobox/combobox.types.d.ts +7 -2
- package/command/command.component.d.ts +2 -2
- package/dialog/dialog.component.d.ts +1 -1
- package/form/components/form-combobox-field.component.d.ts +1 -1
- package/form/components/form-field-group.component.d.ts +1 -1
- package/form/components/form-input-field.component.d.ts +1 -1
- package/form/components/form-password-field.component.d.ts +1 -1
- package/form/components/form-select-field.component.d.ts +1 -1
- package/form/components/form-switch-field.component.d.ts +1 -1
- package/form/components/form-textarea-field.component.d.ts +1 -1
- package/form/form.component.d.ts +3 -3
- package/form/form.types.d.ts +7 -7
- package/form/index.d.ts +1 -1
- package/form/index.js +0 -1
- package/input/components/password-input.component.d.ts +1 -1
- package/input/input.component.d.ts +1 -1
- package/input/input.types.d.ts +1 -1
- package/label/components/info-outline-icon.d.ts +1 -1
- package/label/components/label-icon.d.ts +1 -1
- package/label/label.component.d.ts +1 -1
- package/label/label.types.d.ts +1 -1
- package/package.json +2 -2
- package/pill/pill.component.d.ts +1 -1
- package/pill/pill.types.d.ts +1 -1
- package/popover/popover.component.d.ts +1 -1
- package/select/components/select-icon.d.ts +1 -1
- package/select/components/selector.d.ts +2 -2
- package/select/components/selector.js +5 -2
- package/select/select.component.d.ts +2 -2
- package/select/select.types.d.ts +2 -1
- package/separator/separator.component.d.ts +1 -1
- package/switch/switch.component.d.ts +1 -1
- package/switch/switch.types.d.ts +1 -1
- package/textarea/components/left-toolbar-buttons.d.ts +1 -1
- package/textarea/components/right-toolbar-buttons.d.ts +1 -1
- package/textarea/components/textarea-with-actions.d.ts +1 -1
- package/textarea/textarea.component.d.ts +1 -1
- package/textarea/textarea.types.d.ts +1 -1
- package/toaster/toaster.component.d.ts +1 -1
- package/toaster/toaster.types.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +2 -2
- package/tooltip/tooltip.types.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { ButtonProps } from './button.types';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "primary" | "secondary" | "outline" | "ghost-primary" | "ghost-secondary" | "error-primary" | "warning-primary" | null | undefined;
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
package/button/button.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buttonVariants } from '@scaleflex/ui-tw/button/button.component';
|
|
2
2
|
import { ButtonSize, ButtonVariant } from '@scaleflex/ui-tw/button/button.constants';
|
|
3
3
|
import type { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
4
|
+
import type { ComponentProps, ReactElement } from 'react';
|
|
5
5
|
export type ButtonSizeType = (typeof ButtonSize)[keyof typeof ButtonSize];
|
|
6
6
|
export type ButtonVariantType = (typeof ButtonVariant)[keyof typeof ButtonVariant];
|
|
7
7
|
export interface ButtonProps extends ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
package/button/button.utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconSize } from '@scaleflex/ui-tw/button/button.constants';
|
|
2
|
-
import { ButtonSizeType } from '@scaleflex/ui-tw/button/button.types';
|
|
2
|
+
import type { ButtonSizeType } from '@scaleflex/ui-tw/button/button.types';
|
|
3
3
|
import type { MouseEvent } from 'react';
|
|
4
4
|
export declare const getIconSizeInRem: (sizeName?: ButtonSizeType | null) => string;
|
|
5
5
|
export declare const createRipple: (event: MouseEvent, container: HTMLElement) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EndIconProps } from '@scaleflex/ui-tw/button/button.types';
|
|
1
|
+
import type { EndIconProps } from '@scaleflex/ui-tw/button/button.types';
|
|
2
2
|
declare const EndIcon: (props: EndIconProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
3
3
|
export { EndIcon };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StartIconProps } from '@scaleflex/ui-tw/button/button.types';
|
|
1
|
+
import type { StartIconProps } from '@scaleflex/ui-tw/button/button.types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const startIconVariants: (props?: ({
|
|
4
4
|
variant?: "primary" | "secondary" | "outline" | "ghost-primary" | "ghost-secondary" | "error-primary" | "warning-primary" | null | undefined;
|
package/card/card.component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
3
|
declare function Card({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
4
4
|
declare function CardHeader({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
5
5
|
declare function CardTitle({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ComboboxMultiInlineProps } from '../combobox.types';
|
|
3
|
-
export declare function ComboboxMultiInline({ options, value, onChange, placeholder, className, disabled, size, readOnly, showClear, popoverClassName, ...rest }: ComboboxMultiInlineProps): React.JSX.Element;
|
|
2
|
+
import type { ComboboxMultiInlineProps } from '../combobox.types';
|
|
3
|
+
export declare function ComboboxMultiInline({ options, value, onChange, placeholder, className, disabled, size, readOnly, showClear, popoverClassName, onBlur, ...rest }: ComboboxMultiInlineProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "size", "readOnly", "showClear", "popoverClassName"];
|
|
4
|
+
var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "size", "readOnly", "showClear", "popoverClassName", "onBlur"];
|
|
5
5
|
import { Popover } from '@scaleflex/ui-tw/popover';
|
|
6
6
|
import { FormSize } from '@scaleflex/ui-tw/types/form-size';
|
|
7
7
|
import React from 'react';
|
|
@@ -24,6 +24,7 @@ export function ComboboxMultiInline(_ref) {
|
|
|
24
24
|
_ref$showClear = _ref.showClear,
|
|
25
25
|
showClear = _ref$showClear === void 0 ? true : _ref$showClear,
|
|
26
26
|
popoverClassName = _ref.popoverClassName,
|
|
27
|
+
onBlur = _ref.onBlur,
|
|
27
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
var _useState = useState(false),
|
|
29
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -46,9 +47,20 @@ export function ComboboxMultiInline(_ref) {
|
|
|
46
47
|
onChange([].concat(_toConsumableArray(value), [v]));
|
|
47
48
|
}
|
|
48
49
|
};
|
|
50
|
+
var onOpenChange = function onOpenChange(isOpen) {
|
|
51
|
+
if (!isOpen) {
|
|
52
|
+
onBlur === null || onBlur === void 0 || onBlur(value);
|
|
53
|
+
}
|
|
54
|
+
setOpen(isOpen);
|
|
55
|
+
};
|
|
56
|
+
var onClearAll = function onClearAll() {
|
|
57
|
+
onChange([]);
|
|
58
|
+
onBlur === null || onBlur === void 0 || onBlur([]);
|
|
59
|
+
setOpen(false);
|
|
60
|
+
};
|
|
49
61
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
50
62
|
open: open,
|
|
51
|
-
onOpenChange:
|
|
63
|
+
onOpenChange: onOpenChange
|
|
52
64
|
}, /*#__PURE__*/React.createElement(ComboboxTrigger, {
|
|
53
65
|
open: open,
|
|
54
66
|
disabled: disabled,
|
|
@@ -57,9 +69,7 @@ export function ComboboxMultiInline(_ref) {
|
|
|
57
69
|
readOnly: readOnly,
|
|
58
70
|
showClear: showClear,
|
|
59
71
|
selected: selectedLabels.length > 0,
|
|
60
|
-
onClearAll:
|
|
61
|
-
return onChange([]);
|
|
62
|
-
},
|
|
72
|
+
onClearAll: onClearAll,
|
|
63
73
|
"aria-invalid": rest['aria-invalid']
|
|
64
74
|
}, displayValue), /*#__PURE__*/React.createElement(ComboboxContent, {
|
|
65
75
|
className: popoverClassName,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ComboboxMultiTagProps } from '../combobox.types';
|
|
3
|
-
export declare function ComboboxMultiTag({ options, value, onChange, placeholder, className, disabled, size, readOnly, popoverClassName, ...rest }: ComboboxMultiTagProps): React.JSX.Element;
|
|
2
|
+
import type { ComboboxMultiTagProps } from '../combobox.types';
|
|
3
|
+
export declare function ComboboxMultiTag({ options, value, onChange, placeholder, className, disabled, size, readOnly, popoverClassName, onBlur, ...rest }: ComboboxMultiTagProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "size", "readOnly", "popoverClassName"];
|
|
4
|
+
var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "size", "readOnly", "popoverClassName", "onBlur"];
|
|
5
5
|
import { ButtonVariant, buttonVariants } from '@scaleflex/ui-tw/button';
|
|
6
6
|
import { buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
|
|
7
7
|
import { createClearHandlers } from '@scaleflex/ui-tw/combobox/combobox.utils';
|
|
@@ -31,6 +31,7 @@ export function ComboboxMultiTag(_ref) {
|
|
|
31
31
|
_ref$readOnly = _ref.readOnly,
|
|
32
32
|
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
33
33
|
popoverClassName = _ref.popoverClassName,
|
|
34
|
+
onBlur = _ref.onBlur,
|
|
34
35
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
36
|
var _getToolbarSizes = getToolbarSizes(size),
|
|
36
37
|
buttonSize = _getToolbarSizes.buttonSize;
|
|
@@ -43,16 +44,26 @@ export function ComboboxMultiTag(_ref) {
|
|
|
43
44
|
});
|
|
44
45
|
var isSelected = selectedOptions.length > 0;
|
|
45
46
|
var toggleValue = function toggleValue(v) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
48
|
+
_ref2$isTriggerOnBlur = _ref2.isTriggerOnBlur,
|
|
49
|
+
isTriggerOnBlur = _ref2$isTriggerOnBlur === void 0 ? false : _ref2$isTriggerOnBlur;
|
|
50
|
+
var nextValue = value.includes(v) ? value.filter(function (val) {
|
|
51
|
+
return val !== v;
|
|
52
|
+
}) : [].concat(_toConsumableArray(value), [v]);
|
|
53
|
+
onChange(nextValue);
|
|
54
|
+
if (isTriggerOnBlur) {
|
|
55
|
+
onBlur === null || onBlur === void 0 || onBlur(nextValue);
|
|
52
56
|
}
|
|
53
57
|
};
|
|
58
|
+
var onOpenChange = function onOpenChange(isOpen) {
|
|
59
|
+
if (!isOpen) {
|
|
60
|
+
onBlur === null || onBlur === void 0 || onBlur(value);
|
|
61
|
+
}
|
|
62
|
+
setOpen(isOpen);
|
|
63
|
+
};
|
|
54
64
|
var onClearAll = function onClearAll() {
|
|
55
65
|
onChange([]);
|
|
66
|
+
onBlur === null || onBlur === void 0 || onBlur([]);
|
|
56
67
|
setOpen(false);
|
|
57
68
|
};
|
|
58
69
|
var _createClearHandlers = createClearHandlers(onClearAll),
|
|
@@ -60,7 +71,7 @@ export function ComboboxMultiTag(_ref) {
|
|
|
60
71
|
handleOnTriggerKeyDown = _createClearHandlers.onKeyDown;
|
|
61
72
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
62
73
|
open: open,
|
|
63
|
-
onOpenChange:
|
|
74
|
+
onOpenChange: onOpenChange
|
|
64
75
|
}, /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
65
76
|
asChild: true
|
|
66
77
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -76,7 +87,7 @@ export function ComboboxMultiTag(_ref) {
|
|
|
76
87
|
}, !isSelected ? /*#__PURE__*/React.createElement("span", {
|
|
77
88
|
className: "text-muted-foreground"
|
|
78
89
|
}, placeholder) : /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className: cn('flex w-full flex-wrap justify-start gap-2', textareaVariants({
|
|
90
|
+
className: cn('flex w-full flex-wrap justify-start gap-2 overflow-y-auto', textareaVariants({
|
|
80
91
|
size: size
|
|
81
92
|
}), 'min-h-auto')
|
|
82
93
|
}, selectedOptions.map(function (option) {
|
|
@@ -88,11 +99,13 @@ export function ComboboxMultiTag(_ref) {
|
|
|
88
99
|
onRemove: function onRemove(event) {
|
|
89
100
|
event.preventDefault();
|
|
90
101
|
event.stopPropagation();
|
|
91
|
-
toggleValue(option.value
|
|
102
|
+
toggleValue(option.value, {
|
|
103
|
+
isTriggerOnBlur: true
|
|
104
|
+
});
|
|
92
105
|
}
|
|
93
106
|
}, option.label);
|
|
94
107
|
})), isSelected ? /*#__PURE__*/React.createElement("div", {
|
|
95
|
-
className: "flex w-full items-center justify-between
|
|
108
|
+
className: "flex w-full items-center justify-between p-1.5"
|
|
96
109
|
}, /*#__PURE__*/React.createElement("div", {
|
|
97
110
|
role: "button",
|
|
98
111
|
tabIndex: 0,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ComboboxSingleProps } from '../combobox.types';
|
|
3
|
-
export declare function ComboboxSingle({ options, value, onChange, placeholder, className, disabled, popoverClassName, size, readOnly, showClear, formItemId, ...rest }: ComboboxSingleProps): React.JSX.Element;
|
|
2
|
+
import type { ComboboxSingleProps } from '../combobox.types';
|
|
3
|
+
export declare function ComboboxSingle({ options, value, onChange, placeholder, className, disabled, popoverClassName, size, readOnly, showClear, formItemId, onBlur, ...rest }: ComboboxSingleProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "popoverClassName", "size", "readOnly", "showClear", "formItemId"];
|
|
3
|
+
var _excluded = ["options", "value", "onChange", "placeholder", "className", "disabled", "popoverClassName", "size", "readOnly", "showClear", "formItemId", "onBlur"];
|
|
4
4
|
import { Popover } from '@scaleflex/ui-tw/popover';
|
|
5
5
|
import { FormSize } from '@scaleflex/ui-tw/types/form-size';
|
|
6
6
|
import * as React from 'react';
|
|
@@ -26,6 +26,7 @@ export function ComboboxSingle(_ref) {
|
|
|
26
26
|
_ref$showClear = _ref.showClear,
|
|
27
27
|
showClear = _ref$showClear === void 0 ? true : _ref$showClear,
|
|
28
28
|
formItemId = _ref.formItemId,
|
|
29
|
+
onBlur = _ref.onBlur,
|
|
29
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
var _useState = useState(false),
|
|
31
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -34,18 +35,32 @@ export function ComboboxSingle(_ref) {
|
|
|
34
35
|
var selectedLabel = (_flattenOptions$find = flattenOptions(options).find(function (opt) {
|
|
35
36
|
return opt.value === value;
|
|
36
37
|
})) === null || _flattenOptions$find === void 0 ? void 0 : _flattenOptions$find.label;
|
|
38
|
+
var onSelect = function onSelect(currentValue) {
|
|
39
|
+
onChange(currentValue === value ? '' : currentValue);
|
|
40
|
+
onBlur === null || onBlur === void 0 || onBlur(currentValue === value ? '' : currentValue);
|
|
41
|
+
setOpen(false);
|
|
42
|
+
};
|
|
43
|
+
var onOpenChange = function onOpenChange(isOpen) {
|
|
44
|
+
if (!isOpen) {
|
|
45
|
+
onBlur === null || onBlur === void 0 || onBlur(value);
|
|
46
|
+
}
|
|
47
|
+
setOpen(isOpen);
|
|
48
|
+
};
|
|
49
|
+
var onClearAll = function onClearAll() {
|
|
50
|
+
onChange('');
|
|
51
|
+
onBlur === null || onBlur === void 0 || onBlur('');
|
|
52
|
+
setOpen(false);
|
|
53
|
+
};
|
|
37
54
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
38
55
|
open: open,
|
|
39
|
-
onOpenChange:
|
|
56
|
+
onOpenChange: onOpenChange
|
|
40
57
|
}, /*#__PURE__*/React.createElement(ComboboxTrigger, {
|
|
41
58
|
open: open,
|
|
42
59
|
disabled: disabled,
|
|
43
60
|
className: className,
|
|
44
61
|
size: size,
|
|
45
62
|
readOnly: readOnly,
|
|
46
|
-
onClearAll:
|
|
47
|
-
return onChange('');
|
|
48
|
-
},
|
|
63
|
+
onClearAll: onClearAll,
|
|
49
64
|
selected: !!selectedLabel,
|
|
50
65
|
showClear: showClear,
|
|
51
66
|
"aria-invalid": rest['aria-invalid'],
|
|
@@ -54,10 +69,7 @@ export function ComboboxSingle(_ref) {
|
|
|
54
69
|
className: popoverClassName,
|
|
55
70
|
options: options,
|
|
56
71
|
value: value,
|
|
57
|
-
onSelect:
|
|
58
|
-
onChange(currentValue === value ? '' : currentValue);
|
|
59
|
-
setOpen(false);
|
|
60
|
-
},
|
|
72
|
+
onSelect: onSelect,
|
|
61
73
|
size: size
|
|
62
74
|
}));
|
|
63
75
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ComboboxContentProps, ComboboxTriggerProps } from './combobox.types';
|
|
2
|
+
import type { ComboboxContentProps, ComboboxTriggerProps } from './combobox.types';
|
|
3
3
|
export declare function ComboboxTrigger({ children, open, disabled, readOnly, size, className, selected, showClear, onClearAll, formItemId, ...rest }: ComboboxTriggerProps): React.JSX.Element;
|
|
4
4
|
export declare function ComboboxContent({ options, value: selectedValue, onSelect, size, multiple, className, }: ComboboxContentProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectOption } from '@scaleflex/ui-tw/form';
|
|
2
2
|
import { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
3
3
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
4
|
-
import { ComponentProps, KeyboardEvent, MouseEvent, ReactElement, ReactNode } from 'react';
|
|
4
|
+
import type { ComponentProps, KeyboardEvent, MouseEvent, ReactElement, ReactNode } from 'react';
|
|
5
5
|
export type ClearEvent = MouseEvent | KeyboardEvent;
|
|
6
6
|
export type ComboboxTriggerProps = {
|
|
7
7
|
children: ReactNode;
|
|
@@ -19,7 +19,9 @@ export type ComboboxTriggerProps = {
|
|
|
19
19
|
export type ComboboxContentProps = {
|
|
20
20
|
options: SelectOption[];
|
|
21
21
|
value: string | string[];
|
|
22
|
-
onSelect: (value: string
|
|
22
|
+
onSelect: (value: string, options?: {
|
|
23
|
+
isTriggerOnBlur?: boolean;
|
|
24
|
+
}) => void;
|
|
23
25
|
size?: FormSizeType;
|
|
24
26
|
multiple?: boolean;
|
|
25
27
|
className?: string;
|
|
@@ -53,15 +55,18 @@ interface ComboboxCommonProps {
|
|
|
53
55
|
export interface ComboboxSingleProps extends ComboboxCommonProps {
|
|
54
56
|
value: string;
|
|
55
57
|
onChange: (value: string) => void;
|
|
58
|
+
onBlur?: (value: string) => void;
|
|
56
59
|
showClear?: boolean;
|
|
57
60
|
}
|
|
58
61
|
export interface ComboboxMultiInlineProps extends ComboboxCommonProps {
|
|
59
62
|
value: string[];
|
|
60
63
|
onChange: (value: string[]) => void;
|
|
64
|
+
onBlur?: (value: string[]) => void;
|
|
61
65
|
showClear?: boolean;
|
|
62
66
|
}
|
|
63
67
|
export interface ComboboxMultiTagProps extends ComboboxCommonProps {
|
|
64
68
|
value: string[];
|
|
65
69
|
onChange: (value: string[]) => void;
|
|
70
|
+
onBlur?: (value: string[]) => void;
|
|
66
71
|
}
|
|
67
72
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CommandGroupProps, CommandInputProps, CommandItemProps } from '@scaleflex/ui-tw/combobox/combobox.types';
|
|
1
|
+
import type { CommandGroupProps, CommandInputProps, CommandItemProps } from '@scaleflex/ui-tw/combobox/combobox.types';
|
|
2
2
|
import { Dialog } from '@scaleflex/ui-tw/dialog';
|
|
3
3
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { ComponentProps } from 'react';
|
|
5
|
+
import type { ComponentProps } from 'react';
|
|
6
6
|
declare function Command({ className, ...props }: ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
|
|
7
7
|
declare function CommandDialog({ title, description, children, ...props }: ComponentProps<typeof Dialog> & {
|
|
8
8
|
title?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
+
import React, { type ComponentProps } from 'react';
|
|
3
3
|
declare function Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
|
|
5
5
|
declare function DialogPortal({ ...props }: ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormComboboxFieldProps } from '@scaleflex/ui-tw/form/form.types';
|
|
1
|
+
import type { FormComboboxFieldProps } from '@scaleflex/ui-tw/form/form.types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FieldValues, Path } from 'react-hook-form';
|
|
4
4
|
declare function FormComboboxField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ variant, comboboxProps, ...rest }: FormComboboxFieldProps<TFieldValues, TName>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
import { FormFieldGroupProps } from '../form.types';
|
|
3
|
+
import type { FormFieldGroupProps } from '../form.types';
|
|
4
4
|
declare function FormFieldGroup<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ control, name, label, description, size, readOnly, disabled, tooltip, highlight, horizontal, horizontalLabelWidth, children, }: FormFieldGroupProps<TFieldValues, TName>): React.JSX.Element;
|
|
5
5
|
export { FormFieldGroup };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
import { FormInputFieldProps } from '../form.types';
|
|
3
|
+
import type { FormInputFieldProps } from '../form.types';
|
|
4
4
|
declare function FormInputField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ inputProps, ...rest }: FormInputFieldProps<TFieldValues, TName>): React.JSX.Element;
|
|
5
5
|
export { FormInputField };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
import { FormInputFieldProps } from '../form.types';
|
|
3
|
+
import type { FormInputFieldProps } from '../form.types';
|
|
4
4
|
declare function FormPasswordField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ inputProps, ...rest }: FormInputFieldProps<TFieldValues, TName>): React.JSX.Element;
|
|
5
5
|
export { FormPasswordField };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
import { FormSelectFieldProps } from '../form.types';
|
|
3
|
+
import type { FormSelectFieldProps } from '../form.types';
|
|
4
4
|
declare function FormSelectField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ selectProps, showGroupSeparator, ...rest }: FormSelectFieldProps<TFieldValues, TName>): React.JSX.Element;
|
|
5
5
|
export { FormSelectField };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
import { FormSwitchFieldProps } from '../form.types';
|
|
3
|
+
import type { FormSwitchFieldProps } from '../form.types';
|
|
4
4
|
declare function FormSwitchField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ control, name, label, description, disabled, tooltip, size, layout, switchProps, }: FormSwitchFieldProps<TFieldValues, TName>): React.JSX.Element;
|
|
5
5
|
export { FormSwitchField };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
-
import { FormTextareaFieldProps } from '../form.types';
|
|
3
|
+
import type { FormTextareaFieldProps } from '../form.types';
|
|
4
4
|
declare function FormTextareaField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ textareaProps, ...rest }: FormTextareaFieldProps<TFieldValues, TName>): React.JSX.Element;
|
|
5
5
|
export { FormTextareaField };
|
package/form/form.component.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
-
import { LabelProps } from '@scaleflex/ui-tw/label/label.types';
|
|
2
|
+
import type { LabelProps } from '@scaleflex/ui-tw/label/label.types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { ComponentProps } from 'react';
|
|
4
|
+
import { type ComponentProps } from 'react';
|
|
5
5
|
import { type ControllerProps, type FieldPath, type FieldValues } from 'react-hook-form';
|
|
6
|
-
import { FormMessageSizeType } from './form.types';
|
|
6
|
+
import type { FormMessageSizeType } from './form.types';
|
|
7
7
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
8
8
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
9
9
|
declare const useFormField: () => {
|
package/form/form.types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ComboboxMultiInlineProps, ComboboxMultiTagProps, ComboboxSingleProps } from '@scaleflex/ui-tw/combobox/combobox.types';
|
|
2
|
-
import { InputProps } from '@scaleflex/ui-tw/input';
|
|
3
|
-
import { SelectProps } from '@scaleflex/ui-tw/select/select.types';
|
|
4
|
-
import { SwitchProps } from '@scaleflex/ui-tw/switch/switch.types';
|
|
5
|
-
import { TextareaProps } from '@scaleflex/ui-tw/textarea';
|
|
6
|
-
import { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
1
|
+
import type { ComboboxMultiInlineProps, ComboboxMultiTagProps, ComboboxSingleProps } from '@scaleflex/ui-tw/combobox/combobox.types';
|
|
2
|
+
import type { InputProps } from '@scaleflex/ui-tw/input';
|
|
3
|
+
import type { SelectProps } from '@scaleflex/ui-tw/select/select.types';
|
|
4
|
+
import type { SwitchProps } from '@scaleflex/ui-tw/switch/switch.types';
|
|
5
|
+
import type { TextareaProps } from '@scaleflex/ui-tw/textarea';
|
|
6
|
+
import type { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
7
7
|
import type { Values } from '@scaleflex/ui-tw/types/values';
|
|
8
8
|
import { ReactElement, ReactNode } from 'react';
|
|
9
|
-
import { ControllerRenderProps, type FieldPath, FieldValues, Path, UseControllerProps } from 'react-hook-form';
|
|
9
|
+
import { type ControllerRenderProps, type FieldPath, FieldValues, Path, UseControllerProps } from 'react-hook-form';
|
|
10
10
|
import { FormMessageSize, SwitchLayout } from './form.constants';
|
|
11
11
|
export type FormMessageSizeType = Values<typeof FormMessageSize>;
|
|
12
12
|
export type SwitchLayoutType = Values<typeof SwitchLayout>;
|
package/form/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, useFormField, } from './form.component';
|
|
2
2
|
export { isOptionGroup } from './form.utils';
|
|
3
|
-
export { SelectOption, FlatOption, OptionGroup } from './form.types';
|
|
3
|
+
export type { SelectOption, FlatOption, OptionGroup } from './form.types';
|
|
4
4
|
export { FormFieldGroup } from './components/form-field-group.component';
|
|
5
5
|
export { FormInputField } from './components/form-input-field.component';
|
|
6
6
|
export { FormPasswordField } from './components/form-password-field.component';
|
package/form/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, useFormField } from './form.component';
|
|
2
2
|
export { isOptionGroup } from './form.utils';
|
|
3
|
-
export { SelectOption, FlatOption, OptionGroup } from './form.types';
|
|
4
3
|
export { FormFieldGroup } from './components/form-field-group.component';
|
|
5
4
|
export { FormInputField } from './components/form-input-field.component';
|
|
6
5
|
export { FormPasswordField } from './components/form-password-field.component';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { InputProps } from './input.types';
|
|
2
|
+
import type { InputProps } from './input.types';
|
|
3
3
|
declare const inputVariants: (props?: ({
|
|
4
4
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
package/input/input.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
3
|
export interface InputProps extends Omit<ComponentProps<'input'>, 'size'> {
|
|
4
4
|
size?: FormSizeType;
|
|
5
5
|
'aria-invalid'?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LabelIconProps } from '@scaleflex/ui-tw/label/label.types';
|
|
1
|
+
import type { LabelIconProps } from '@scaleflex/ui-tw/label/label.types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const LabelIcon: (props: LabelIconProps) => React.JSX.Element | null;
|
|
4
4
|
export { LabelIcon };
|
package/label/label.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
2
2
|
import { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
3
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
3
|
+
import type { ComponentProps, ReactElement } from 'react';
|
|
4
4
|
export interface LabelProps extends Omit<ComponentProps<typeof LabelPrimitive.Root>, 'size'> {
|
|
5
5
|
size?: FormSizeType;
|
|
6
6
|
icon?: ReactElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.34",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@radix-ui/react-slot": "^1.1.2",
|
|
21
21
|
"@radix-ui/react-switch": "^1.0.1",
|
|
22
22
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
23
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
23
|
+
"@scaleflex/icons-tw": "^0.0.34",
|
|
24
24
|
"@types/lodash.merge": "^4.6.9",
|
|
25
25
|
"class-variance-authority": "^0.7.1",
|
|
26
26
|
"cmdk": "^1.1.1",
|
package/pill/pill.component.d.ts
CHANGED
package/pill/pill.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pillVariants } from '@scaleflex/ui-tw/pill/pill.component';
|
|
2
2
|
import type { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { ComponentProps, MouseEvent } from 'react';
|
|
3
|
+
import type { ComponentProps, MouseEvent } from 'react';
|
|
4
4
|
export interface PillProps extends ComponentProps<'div'>, VariantProps<typeof pillVariants> {
|
|
5
5
|
removable?: boolean;
|
|
6
6
|
onRemove?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
2
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
+
import React, { type ComponentProps } from 'react';
|
|
3
3
|
declare function Popover({ ...props }: ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
5
5
|
declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SelectIconProps } from '@scaleflex/ui-tw/select/select.types';
|
|
1
|
+
import type { SelectIconProps } from '@scaleflex/ui-tw/select/select.types';
|
|
2
2
|
export declare const SelectIcon: (props: SelectIconProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SelectorProps } from '../select.types';
|
|
3
|
-
export declare function Selector({ value, onChange, placeholder, disabled, readOnly, size, className, icon, options, showGroupSeparator, formItemId, ...rest }: SelectorProps): React.JSX.Element;
|
|
2
|
+
import type { SelectorProps } from '../select.types';
|
|
3
|
+
export declare function Selector({ value, onChange, placeholder, disabled, readOnly, size, className, icon, options, showGroupSeparator, formItemId, popoverClassName, ...rest }: SelectorProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["value", "onChange", "placeholder", "disabled", "readOnly", "size", "className", "icon", "options", "showGroupSeparator", "formItemId"];
|
|
2
|
+
var _excluded = ["value", "onChange", "placeholder", "disabled", "readOnly", "size", "className", "icon", "options", "showGroupSeparator", "formItemId", "popoverClassName"];
|
|
3
3
|
import { isOptionGroup } from '@scaleflex/ui-tw/form';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue } from '../';
|
|
@@ -16,6 +16,7 @@ export function Selector(_ref) {
|
|
|
16
16
|
options = _ref.options,
|
|
17
17
|
showGroupSeparator = _ref.showGroupSeparator,
|
|
18
18
|
formItemId = _ref.formItemId,
|
|
19
|
+
popoverClassName = _ref.popoverClassName,
|
|
19
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
return /*#__PURE__*/React.createElement(Select, {
|
|
21
22
|
value: value,
|
|
@@ -30,7 +31,9 @@ export function Selector(_ref) {
|
|
|
30
31
|
icon: icon
|
|
31
32
|
}, /*#__PURE__*/React.createElement(SelectValue, {
|
|
32
33
|
placeholder: placeholder
|
|
33
|
-
})), /*#__PURE__*/React.createElement(SelectContent,
|
|
34
|
+
})), /*#__PURE__*/React.createElement(SelectContent, {
|
|
35
|
+
className: popoverClassName
|
|
36
|
+
}, options.map(function (option, groupIndex) {
|
|
34
37
|
if (isOptionGroup(option)) {
|
|
35
38
|
return /*#__PURE__*/React.createElement(SelectGroup, {
|
|
36
39
|
key: groupIndex
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
2
|
-
import { SelectItemProps, SelectLabelProps, SelectTriggerProps } from '@scaleflex/ui-tw/select/select.types';
|
|
3
|
-
import React, { ComponentProps } from 'react';
|
|
2
|
+
import type { SelectItemProps, SelectLabelProps, SelectTriggerProps } from '@scaleflex/ui-tw/select/select.types';
|
|
3
|
+
import React, { type ComponentProps } from 'react';
|
|
4
4
|
declare function Select({ ...props }: ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
5
5
|
declare function SelectGroup({ ...props }: ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
6
6
|
declare function SelectValue({ ...props }: ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
package/select/select.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
2
2
|
import { SelectOption } from '@scaleflex/ui-tw/form';
|
|
3
3
|
import { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
4
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
4
|
+
import type { ComponentProps, ReactElement } from 'react';
|
|
5
5
|
export interface SelectProps extends ComponentProps<typeof SelectPrimitive.Root> {
|
|
6
6
|
}
|
|
7
7
|
export interface SelectTriggerProps extends ComponentProps<typeof SelectPrimitive.Trigger> {
|
|
@@ -33,5 +33,6 @@ export interface SelectorProps {
|
|
|
33
33
|
options: SelectOption[];
|
|
34
34
|
showGroupSeparator?: boolean;
|
|
35
35
|
formItemId?: string;
|
|
36
|
+
popoverClassName?: string;
|
|
36
37
|
'aria-invalid'?: boolean;
|
|
37
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { ComponentProps } from 'react';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
4
4
|
declare function Separator({ className, orientation, decorative, ...props }: ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
|
|
5
5
|
export { Separator };
|
package/switch/switch.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
2
2
|
import { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
3
|
-
import { ComponentProps } from 'react';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
4
4
|
export interface SwitchProps extends ComponentProps<typeof SwitchPrimitive.Root> {
|
|
5
5
|
size?: FormSizeType;
|
|
6
6
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { LeftToolbarButtonsProps } from '@scaleflex/ui-tw/textarea/textarea.types';
|
|
1
|
+
import type { LeftToolbarButtonsProps } from '@scaleflex/ui-tw/textarea/textarea.types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const LeftToolbarButtons: (props: LeftToolbarButtonsProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RightToolbarButtonsProps } from '@scaleflex/ui-tw/textarea/textarea.types';
|
|
1
|
+
import type { RightToolbarButtonsProps } from '@scaleflex/ui-tw/textarea/textarea.types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const RightToolbarButtons: (props: RightToolbarButtonsProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextareaWithActionsProps } from '@scaleflex/ui-tw/textarea/textarea.types';
|
|
1
|
+
import type { TextareaWithActionsProps } from '@scaleflex/ui-tw/textarea/textarea.types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare function TextareaWithActions({ leftToolbar, rightToolbar, className, ...textareaProps }: TextareaWithActionsProps): React.JSX.Element;
|
|
4
4
|
export { TextareaWithActions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TextareaProps } from './textarea.types';
|
|
2
|
+
import type { TextareaProps } from './textarea.types';
|
|
3
3
|
declare const textareaVariants: (props?: ({
|
|
4
4
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormSizeType } from '@scaleflex/ui-tw/types/form-size';
|
|
2
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import type { ComponentProps, ReactElement } from 'react';
|
|
3
3
|
export interface TextareaProps extends Omit<ComponentProps<'textarea'>, 'size'> {
|
|
4
4
|
size?: FormSizeType;
|
|
5
5
|
'aria-invalid'?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { ComponentProps } from 'react';
|
|
4
|
-
import { TooltipContentProps, WithTooltipProps } from './tooltip.types';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
4
|
+
import type { TooltipContentProps, WithTooltipProps } from './tooltip.types';
|
|
5
5
|
declare function TooltipProvider({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
6
6
|
declare function Tooltip({ ...props }: ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
7
7
|
declare function TooltipTrigger({ ...props }: ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import type { ComponentProps, ReactElement } from 'react';
|
|
3
3
|
import { TooltipVariant } from './tooltip.constants';
|
|
4
4
|
export type TooltipVariantType = (typeof TooltipVariant)[keyof typeof TooltipVariant];
|
|
5
5
|
export interface WithTooltipProps extends Omit<ComponentProps<typeof TooltipPrimitive.Content>, 'content'> {
|