@ultraviolet/ui 1.55.3 → 1.56.1
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/README.md +4 -3
- package/dist/components/Alert/index.cjs +1 -2
- package/dist/components/Alert/index.js +1 -2
- package/dist/components/Avatar/index.cjs +4 -5
- package/dist/components/Avatar/index.js +4 -5
- package/dist/components/Banner/index.cjs +1 -2
- package/dist/components/Banner/index.js +1 -2
- package/dist/components/Bullet/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts +14 -14
- package/dist/components/Checkbox/index.cjs +1 -2
- package/dist/components/Checkbox/index.js +1 -2
- package/dist/components/Dialog/Context.d.ts +0 -1
- package/dist/components/Dialog/index.d.ts +46 -46
- package/dist/components/Dialog/subComponents/Text.d.ts +0 -1
- package/dist/components/Expandable/index.d.ts +2 -2
- package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +1 -1
- package/dist/components/GlobalAlert/index.cjs +1 -2
- package/dist/components/GlobalAlert/index.d.ts +1 -17
- package/dist/components/GlobalAlert/index.js +1 -2
- package/dist/components/LineChart/helpers.cjs +5 -10
- package/dist/components/LineChart/helpers.js +5 -10
- package/dist/components/Link/index.cjs +2 -4
- package/dist/components/Link/index.js +2 -4
- package/dist/components/List/Cell.cjs +1 -1
- package/dist/components/List/Cell.d.ts +2 -0
- package/dist/components/List/Cell.js +1 -1
- package/dist/components/List/Row.cjs +4 -4
- package/dist/components/List/Row.d.ts +2 -2
- package/dist/components/List/Row.js +4 -4
- package/dist/components/List/constants.cjs +1 -1
- package/dist/components/List/constants.d.ts +1 -1
- package/dist/components/List/constants.js +1 -1
- package/dist/components/List/index.d.ts +9 -9
- package/dist/components/Menu/index.d.ts +4 -4
- package/dist/components/MenuV2/index.d.ts +41 -36
- package/dist/components/Modal/Dialog.d.ts +0 -1
- package/dist/components/Modal/Disclosure.d.ts +0 -1
- package/dist/components/NumberInput/index.cjs +6 -12
- package/dist/components/NumberInput/index.js +6 -12
- package/dist/components/NumberInputV2/index.cjs +23 -17
- package/dist/components/NumberInputV2/index.d.ts +23 -12
- package/dist/components/NumberInputV2/index.js +23 -17
- package/dist/components/Popover/index.d.ts +35 -30
- package/dist/components/Popup/index.cjs +4 -8
- package/dist/components/Popup/index.js +4 -8
- package/dist/components/Row/index.d.ts +2 -2
- package/dist/components/SearchInput/index.cjs +100 -0
- package/dist/components/SearchInput/index.d.ts +36 -0
- package/dist/components/SearchInput/index.js +98 -0
- package/dist/components/SearchInput/types.d.ts +17 -0
- package/dist/components/SelectInput/index.cjs +4 -8
- package/dist/components/SelectInput/index.js +4 -8
- package/dist/components/SelectInputV2/SelectBar.cjs +8 -6
- package/dist/components/SelectInputV2/SelectBar.d.ts +3 -1
- package/dist/components/SelectInputV2/SelectBar.js +8 -6
- package/dist/components/SelectInputV2/index.cjs +6 -5
- package/dist/components/SelectInputV2/index.d.ts +1 -1
- package/dist/components/SelectInputV2/index.js +6 -5
- package/dist/components/SelectableCard/index.cjs +4 -4
- package/dist/components/SelectableCard/index.d.ts +1 -2
- package/dist/components/SelectableCard/index.js +4 -4
- package/dist/components/SelectableCardGroup/index.cjs +2 -2
- package/dist/components/SelectableCardGroup/index.d.ts +1 -1
- package/dist/components/SelectableCardGroup/index.js +2 -2
- package/dist/components/Skeleton/IconSkeleton.d.ts +2 -3
- package/dist/components/Skeleton/Line.d.ts +2 -3
- package/dist/components/Skeleton/Square.d.ts +2 -3
- package/dist/components/Skeleton/index.d.ts +13 -14
- package/dist/components/Stack/index.d.ts +2 -2
- package/dist/components/Status/index.d.ts +1 -1
- package/dist/components/Stepper/Step.cjs +38 -20
- package/dist/components/Stepper/Step.js +38 -20
- package/dist/components/Stepper/index.cjs +9 -11
- package/dist/components/Stepper/index.d.ts +5 -8
- package/dist/components/Stepper/index.js +9 -11
- package/dist/components/SwitchButton/FocusOverlay.cjs +1 -2
- package/dist/components/SwitchButton/FocusOverlay.js +1 -2
- package/dist/components/SwitchButton/index.cjs +1 -2
- package/dist/components/SwitchButton/index.js +1 -2
- package/dist/components/Table/index.d.ts +8 -8
- package/dist/components/Tabs/Tab.cjs +1 -2
- package/dist/components/Tabs/Tab.d.ts +2 -2
- package/dist/components/Tabs/Tab.js +1 -2
- package/dist/components/Tabs/TabMenu.d.ts +2 -2
- package/dist/components/Tabs/TabMenuItem.d.ts +5 -5
- package/dist/components/Tabs/TabsContext.d.ts +0 -1
- package/dist/components/Tabs/index.cjs +1 -2
- package/dist/components/Tabs/index.d.ts +16 -16
- package/dist/components/Tabs/index.js +1 -2
- package/dist/components/TagInput/index.cjs +15 -11
- package/dist/components/TagInput/index.js +15 -11
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/TextInput/index.d.ts +1 -1
- package/dist/components/TextInputV2/index.cjs +9 -9
- package/dist/components/TextInputV2/index.d.ts +17 -15
- package/dist/components/TextInputV2/index.js +9 -9
- package/dist/components/Toggle/index.cjs +2 -4
- package/dist/components/Toggle/index.d.ts +11 -11
- package/dist/components/Toggle/index.js +2 -4
- package/dist/components/VerificationCode/index.cjs +3 -3
- package/dist/components/VerificationCode/index.js +3 -3
- package/dist/components/index.d.ts +9 -8
- package/dist/helpers/recursivelyGetChildrenString.cjs +3 -6
- package/dist/helpers/recursivelyGetChildrenString.js +3 -6
- package/dist/index.cjs +119 -117
- package/dist/index.js +10 -8
- package/dist/mocks/list.d.ts +1 -1
- package/dist/theme/index.d.ts +31 -799
- package/dist/utils/responsive/Breakpoint.d.ts +5 -5
- package/dist/utils/responsive/utilities.cjs +2 -4
- package/dist/utils/responsive/utilities.js +2 -4
- package/package.json +5 -5
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
declare const SIZES: {
|
|
3
|
+
small: string;
|
|
4
|
+
medium: string;
|
|
5
|
+
large: string;
|
|
6
|
+
};
|
|
2
7
|
export type DisclosureProps = {
|
|
3
8
|
visible: boolean;
|
|
4
9
|
};
|
|
@@ -15,60 +20,60 @@ type ChildMenuProps = {
|
|
|
15
20
|
* When a user activates a choice in a menu, the menu usually closes unless the choice opened a submenu.
|
|
16
21
|
*/
|
|
17
22
|
export declare const MenuV2: import("react").ForwardRefExoticComponent<{
|
|
18
|
-
id?: string
|
|
19
|
-
ariaLabel?: string
|
|
23
|
+
id?: string;
|
|
24
|
+
ariaLabel?: string;
|
|
20
25
|
children?: ReactNode | (({ toggle }: ChildMenuProps) => ReactNode);
|
|
21
|
-
className?: string
|
|
26
|
+
className?: string;
|
|
22
27
|
disclosure: DisclosureElement;
|
|
23
|
-
hasArrow?: boolean
|
|
24
|
-
visible?: boolean
|
|
25
|
-
'data-testid'?: string
|
|
26
|
-
maxHeight?: string
|
|
28
|
+
hasArrow?: boolean;
|
|
29
|
+
visible?: boolean;
|
|
30
|
+
'data-testid'?: string;
|
|
31
|
+
maxHeight?: string;
|
|
27
32
|
/**
|
|
28
33
|
* @deprecated: use `size` instead
|
|
29
34
|
*/
|
|
30
|
-
maxWidth?: string
|
|
35
|
+
maxWidth?: string;
|
|
31
36
|
/**
|
|
32
37
|
* By default, the portal target is children container or document.body if children is a function. You can override this
|
|
33
38
|
* behavior by setting a portalTarget prop.
|
|
34
39
|
*/
|
|
35
|
-
portalTarget?: HTMLElement
|
|
36
|
-
size?:
|
|
40
|
+
portalTarget?: HTMLElement;
|
|
41
|
+
size?: keyof typeof SIZES;
|
|
37
42
|
/**
|
|
38
43
|
* The behavior of the menu when it is opened. If set to `click`, the menu will open when the user clicks on the disclosure.
|
|
39
44
|
* If set to `hover`, the menu will open when the user hovers over the disclosure.
|
|
40
45
|
*/
|
|
41
|
-
triggerMethod?: "click" | "hover"
|
|
46
|
+
triggerMethod?: "click" | "hover";
|
|
42
47
|
} & Pick<{
|
|
43
|
-
id?: string
|
|
48
|
+
id?: string;
|
|
44
49
|
children: ReactNode | ((renderProps: {
|
|
45
|
-
className?: string
|
|
50
|
+
className?: string;
|
|
46
51
|
onBlur: () => void;
|
|
47
52
|
onFocus: () => void;
|
|
48
53
|
onPointerEnter: () => void;
|
|
49
54
|
onPointerLeave: () => void;
|
|
50
55
|
ref: import("react").RefObject<HTMLDivElement>;
|
|
51
56
|
}) => ReactNode);
|
|
52
|
-
maxWidth?:
|
|
53
|
-
placement?: import("../Popup/helpers").PopupPlacement
|
|
57
|
+
maxWidth?: number | string;
|
|
58
|
+
placement?: import("../Popup/helpers").PopupPlacement;
|
|
54
59
|
text?: ReactNode;
|
|
55
|
-
className?: string
|
|
56
|
-
containerFullWidth?: boolean
|
|
57
|
-
visible?: boolean
|
|
58
|
-
innerRef?: Ref<HTMLDivElement | null
|
|
59
|
-
role?: string
|
|
60
|
-
'data-testid'?: string
|
|
61
|
-
hasArrow?: boolean
|
|
62
|
-
onClose?: (
|
|
63
|
-
tabIndex?: number
|
|
64
|
-
onKeyDown?: import("react").KeyboardEventHandler
|
|
65
|
-
'aria-haspopup'?:
|
|
66
|
-
hideOnClickOutside?: boolean
|
|
67
|
-
debounceDelay?: number
|
|
68
|
-
maxHeight?: string | number
|
|
69
|
-
disableAnimation?: boolean
|
|
70
|
-
portalTarget?: HTMLElement
|
|
71
|
-
dynamicDomRendering?: boolean
|
|
60
|
+
className?: string;
|
|
61
|
+
containerFullWidth?: boolean;
|
|
62
|
+
visible?: boolean;
|
|
63
|
+
innerRef?: Ref<HTMLDivElement | null>;
|
|
64
|
+
role?: string;
|
|
65
|
+
'data-testid'?: string;
|
|
66
|
+
hasArrow?: boolean;
|
|
67
|
+
onClose?: () => void;
|
|
68
|
+
tabIndex?: number;
|
|
69
|
+
onKeyDown?: import("react").KeyboardEventHandler;
|
|
70
|
+
'aria-haspopup'?: import("react").HTMLAttributes<HTMLDivElement>["aria-haspopup"];
|
|
71
|
+
hideOnClickOutside?: boolean;
|
|
72
|
+
debounceDelay?: number;
|
|
73
|
+
maxHeight?: string | number;
|
|
74
|
+
disableAnimation?: boolean;
|
|
75
|
+
portalTarget?: HTMLElement;
|
|
76
|
+
dynamicDomRendering?: boolean;
|
|
72
77
|
} & import("react").RefAttributes<HTMLDivElement>, "placement" | "dynamicDomRendering"> & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
73
78
|
Item: import("react").ForwardRefExoticComponent<{
|
|
74
79
|
href?: string | undefined;
|
|
@@ -77,10 +82,10 @@ export declare const MenuV2: import("react").ForwardRefExoticComponent<{
|
|
|
77
82
|
className?: string | undefined;
|
|
78
83
|
children: ReactNode;
|
|
79
84
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
80
|
-
borderless?: boolean
|
|
81
|
-
sentiment?:
|
|
82
|
-
active?: boolean
|
|
83
|
-
'data-testid'?: string
|
|
85
|
+
borderless?: boolean;
|
|
86
|
+
sentiment?: "primary" | "neutral" | "danger";
|
|
87
|
+
active?: boolean;
|
|
88
|
+
'data-testid'?: string;
|
|
84
89
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
85
90
|
Group: ({ label, children }: {
|
|
86
91
|
label: string;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DialogProps } from './types';
|
|
3
2
|
export declare const Dialog: ({ children, open, placement, onClose, hideOnClickOutside, size, id, ariaLabel, className, "data-testid": dataTestId, preventBodyScroll, hideOnEsc, backdropClassName, dialogCss, backdropCss, }: DialogProps) => import("react").ReactPortal | null;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DisclosureProps } from './types';
|
|
3
2
|
export declare const Disclosure: ({ disclosure, handleOpen, visible, handleClose, toggle, id, }: DisclosureProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -161,10 +161,8 @@ const NumberInput = ({
|
|
|
161
161
|
const handleOnBlur = (event) => {
|
|
162
162
|
if (currentValue) {
|
|
163
163
|
const boundedValue = helpers.bounded(currentValue, minValue ?? currentValue, maxValue ?? currentValue);
|
|
164
|
-
if (maxValue && currentValue > maxValue)
|
|
165
|
-
|
|
166
|
-
if (minValue && currentValue < minValue)
|
|
167
|
-
onMinCrossed?.();
|
|
164
|
+
if (maxValue && currentValue > maxValue) onMaxCrossed?.();
|
|
165
|
+
if (minValue && currentValue < minValue) onMinCrossed?.();
|
|
168
166
|
setValue(boundedValue);
|
|
169
167
|
onBlur?.(event);
|
|
170
168
|
}
|
|
@@ -194,20 +192,16 @@ const NumberInput = ({
|
|
|
194
192
|
}
|
|
195
193
|
};
|
|
196
194
|
const isMinusDisabled = React.useMemo(() => {
|
|
197
|
-
if (disabled)
|
|
198
|
-
|
|
199
|
-
if (currentValue === void 0)
|
|
200
|
-
return false;
|
|
195
|
+
if (disabled) return true;
|
|
196
|
+
if (currentValue === void 0) return false;
|
|
201
197
|
if (helpers.getMinusRoundedValue(currentValue, step) < minValue) {
|
|
202
198
|
return true;
|
|
203
199
|
}
|
|
204
200
|
return disabled;
|
|
205
201
|
}, [currentValue, disabled, minValue, step]);
|
|
206
202
|
const isPlusDisabled = React.useMemo(() => {
|
|
207
|
-
if (disabled)
|
|
208
|
-
|
|
209
|
-
if (currentValue === void 0)
|
|
210
|
-
return false;
|
|
203
|
+
if (disabled) return true;
|
|
204
|
+
if (currentValue === void 0) return false;
|
|
211
205
|
if (maxValue && helpers.getPlusRoundedValue(currentValue, step) > maxValue) {
|
|
212
206
|
return true;
|
|
213
207
|
}
|
|
@@ -157,10 +157,8 @@ const NumberInput = ({
|
|
|
157
157
|
const handleOnBlur = (event) => {
|
|
158
158
|
if (currentValue) {
|
|
159
159
|
const boundedValue = bounded(currentValue, minValue ?? currentValue, maxValue ?? currentValue);
|
|
160
|
-
if (maxValue && currentValue > maxValue)
|
|
161
|
-
|
|
162
|
-
if (minValue && currentValue < minValue)
|
|
163
|
-
onMinCrossed?.();
|
|
160
|
+
if (maxValue && currentValue > maxValue) onMaxCrossed?.();
|
|
161
|
+
if (minValue && currentValue < minValue) onMinCrossed?.();
|
|
164
162
|
setValue(boundedValue);
|
|
165
163
|
onBlur?.(event);
|
|
166
164
|
}
|
|
@@ -190,20 +188,16 @@ const NumberInput = ({
|
|
|
190
188
|
}
|
|
191
189
|
};
|
|
192
190
|
const isMinusDisabled = useMemo(() => {
|
|
193
|
-
if (disabled)
|
|
194
|
-
|
|
195
|
-
if (currentValue === void 0)
|
|
196
|
-
return false;
|
|
191
|
+
if (disabled) return true;
|
|
192
|
+
if (currentValue === void 0) return false;
|
|
197
193
|
if (getMinusRoundedValue(currentValue, step) < minValue) {
|
|
198
194
|
return true;
|
|
199
195
|
}
|
|
200
196
|
return disabled;
|
|
201
197
|
}, [currentValue, disabled, minValue, step]);
|
|
202
198
|
const isPlusDisabled = useMemo(() => {
|
|
203
|
-
if (disabled)
|
|
204
|
-
|
|
205
|
-
if (currentValue === void 0)
|
|
206
|
-
return false;
|
|
199
|
+
if (disabled) return true;
|
|
200
|
+
if (currentValue === void 0) return false;
|
|
207
201
|
if (maxValue && getPlusRoundedValue(currentValue, step) > maxValue) {
|
|
208
202
|
return true;
|
|
209
203
|
}
|