@wavv/ui 2.3.3 → 2.3.5
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/build/components/Accordion/Accordion.d.ts +1 -1
- package/build/components/Button/Button.d.ts +1 -1
- package/build/components/ComboBox.js +1 -0
- package/build/components/DropZone.js +1 -1
- package/build/components/Dropdown.d.ts +1 -1
- package/build/components/Dropdown.js +3 -1
- package/build/components/Ellipsis.js +2 -1
- package/build/components/FileTrigger.js +1 -0
- package/build/components/Inputs/DatePicker.js +1 -0
- package/build/components/Inputs/DateRangePicker.js +1 -0
- package/build/components/Inputs/NumberInput.js +1 -0
- package/build/components/Inputs/PhoneInput.js +1 -0
- package/build/components/Inputs/SearchInput.js +1 -0
- package/build/components/Inputs/TextArea.js +1 -0
- package/build/components/Inputs/TextInput.js +1 -0
- package/build/components/Inputs/TimeInput.js +1 -0
- package/build/components/Inputs/helpers/Label.d.ts +2 -1
- package/build/components/Inputs/helpers/Label.js +21 -4
- package/build/components/Select.js +1 -0
- package/build/components/Table/Table.d.ts +1 -1
- package/build/index.d.ts +1 -0
- package/package.json +21 -21
|
@@ -37,6 +37,7 @@ declare const Accordion: {
|
|
|
37
37
|
style?: React.CSSProperties;
|
|
38
38
|
} & import("../types").Padding & import("../types").Height & {
|
|
39
39
|
download?: any;
|
|
40
|
+
form?: string | undefined | undefined;
|
|
40
41
|
key?: import("react").Key | null | undefined;
|
|
41
42
|
list?: string | undefined | undefined;
|
|
42
43
|
rows?: number | undefined | undefined;
|
|
@@ -52,7 +53,6 @@ declare const Accordion: {
|
|
|
52
53
|
ref?: import("react").Ref<HTMLDivElement> | undefined;
|
|
53
54
|
cite?: string | undefined | undefined;
|
|
54
55
|
data?: string | undefined | undefined;
|
|
55
|
-
form?: string | undefined | undefined;
|
|
56
56
|
label?: string | undefined | undefined;
|
|
57
57
|
slot?: string | undefined | undefined;
|
|
58
58
|
span?: number | undefined | undefined;
|
|
@@ -12,6 +12,7 @@ declare const _default: (({ content, children, dropdown, options, ref, ...rest }
|
|
|
12
12
|
collapse?: boolean;
|
|
13
13
|
} & import("./ButtonTypes").ButtonStyles) & Margin & import("../types").Width & {
|
|
14
14
|
download?: any;
|
|
15
|
+
form?: string | undefined | undefined;
|
|
15
16
|
key?: import("react").Key | null | undefined;
|
|
16
17
|
list?: string | undefined | undefined;
|
|
17
18
|
rows?: number | undefined | undefined;
|
|
@@ -27,7 +28,6 @@ declare const _default: (({ content, children, dropdown, options, ref, ...rest }
|
|
|
27
28
|
ref?: import("react").Ref<HTMLDivElement> | undefined;
|
|
28
29
|
cite?: string | undefined | undefined;
|
|
29
30
|
data?: string | undefined | undefined;
|
|
30
|
-
form?: string | undefined | undefined;
|
|
31
31
|
label?: string | undefined | undefined;
|
|
32
32
|
slot?: string | undefined | undefined;
|
|
33
33
|
span?: number | undefined | undefined;
|
|
@@ -8,7 +8,7 @@ import FileTrigger from "./FileTrigger.js";
|
|
|
8
8
|
import { marginProps, paddingProps, widthHeightProps } from "./helpers/styledProps.js";
|
|
9
9
|
const DropZone_DropZone = ({ label = 'Drop here', showFileNames = true, disabled, acceptedFileTypes, allowsMultiple, defaultCamera, acceptDirectory, onDrop, onSelect, ...rest })=>{
|
|
10
10
|
const [displayFiles, setDisplayFiles] = useState('');
|
|
11
|
-
const showFileTrigger = !!acceptedFileTypes || !!allowsMultiple || !!defaultCamera || !!acceptDirectory || !!onSelect
|
|
11
|
+
const showFileTrigger = !!acceptedFileTypes || !!allowsMultiple || !!defaultCamera || !!acceptDirectory || !!onSelect;
|
|
12
12
|
const handleFileDrop = (event)=>{
|
|
13
13
|
let files = event.items.filter((file)=>'file' === file.kind);
|
|
14
14
|
if (acceptedFileTypes && acceptedFileTypes.length > 0) files = files.filter((file)=>matchesFileTypes(file, acceptedFileTypes));
|
|
@@ -4,7 +4,7 @@ type Props = {
|
|
|
4
4
|
/** The options to be displayed in the dropdown */
|
|
5
5
|
options?: ListOption[];
|
|
6
6
|
} & Omit<SelectInputProps, 'options' | 'textOnly'> & OpenStateProps & Omit<ButtonProps, 'ref' | 'isDisabled'>;
|
|
7
|
-
declare const _default: (({ children, before, after, open, label, placeholder, options, width, height, value, defaultValue, loading, hideCaret, color, disabled, readOnly, placeholderColor, fontSize, fontWeight, description, errorMessage, position, backgroundColor, menuBackground, iconLeft, leftElement, rightElement, onChange, onOpenChange, afterShow, afterHide, ...props }: Props) => import("react/jsx-runtime").JSX.Element) & {
|
|
7
|
+
declare const _default: (({ children, before, after, open, label, placeholder, options, width, height, value, defaultValue, loading, hideCaret, color, disabled, readOnly, required, invalid, placeholderColor, fontSize, fontWeight, description, errorMessage, position, backgroundColor, menuBackground, iconLeft, leftElement, rightElement, onChange, onOpenChange, afterShow, afterHide, ...props }: Props) => import("react/jsx-runtime").JSX.Element) & {
|
|
8
8
|
Item: ({ children, id, value, header, body, leftElement, rightElement, inline, disabled, ...props }: {
|
|
9
9
|
children?: import("react").ReactNode;
|
|
10
10
|
} & Partial<SelectItem> & Omit<import("react-aria-components").GridListItemProps<object>, "id" | "value" | "isDisabled">) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ import GridListItem from "./ListBoxParts/GridListItem.js";
|
|
|
10
10
|
import GridListSection from "./ListHelpers/GridListSection.js";
|
|
11
11
|
import ListStyles from "./ListHelpers/ListStyles.js";
|
|
12
12
|
import MotionPopover from "./MotionPopover.js";
|
|
13
|
-
const Dropdown = ({ children, before, after, open, label, placeholder = 'Select', options = [], width, height, value, defaultValue, loading, hideCaret, color, disabled, readOnly, placeholderColor, fontSize, fontWeight, description, errorMessage, position, backgroundColor, menuBackground, iconLeft, leftElement, rightElement, onChange, onOpenChange, afterShow, afterHide, ...props })=>{
|
|
13
|
+
const Dropdown = ({ children, before, after, open, label, placeholder = 'Select', options = [], width, height, value, defaultValue, loading, hideCaret, color, disabled, readOnly, required, invalid, placeholderColor, fontSize, fontWeight, description, errorMessage, position, backgroundColor, menuBackground, iconLeft, leftElement, rightElement, onChange, onOpenChange, afterShow, afterHide, ...props })=>{
|
|
14
14
|
const [isOpen, handleOpenChange] = useControlledOpenState({
|
|
15
15
|
open,
|
|
16
16
|
onOpenChange,
|
|
@@ -44,6 +44,8 @@ const Dropdown = ({ children, before, after, open, label, placeholder = 'Select'
|
|
|
44
44
|
value: selectedOption?.value || currentValue,
|
|
45
45
|
disabled: disabled,
|
|
46
46
|
readOnly: readOnly || loading,
|
|
47
|
+
required: required,
|
|
48
|
+
invalid: invalid,
|
|
47
49
|
placeholder: placeholder,
|
|
48
50
|
placeholderColor: placeholderColor,
|
|
49
51
|
loading: loading,
|
|
@@ -12,7 +12,8 @@ const EllipsisContainer = styled.div(({ clampLines })=>({
|
|
|
12
12
|
WebkitLineClamp: clampLines,
|
|
13
13
|
display: clampLines ? '-webkit-box' : void 0,
|
|
14
14
|
WebkitBoxOrient: clampLines ? 'vertical' : void 0,
|
|
15
|
-
wordBreak: clampLines ? 'break-word' : void 0
|
|
15
|
+
wordBreak: clampLines ? 'break-word' : void 0,
|
|
16
|
+
minWidth: 0
|
|
16
17
|
}), ({ width })=>({
|
|
17
18
|
width: width || 'auto'
|
|
18
19
|
}), ({ textAlign })=>({
|
|
@@ -2,11 +2,12 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
type LabelProps = {
|
|
3
3
|
filled?: boolean;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
required?: boolean;
|
|
5
6
|
disablePointerEvents?: boolean;
|
|
6
7
|
};
|
|
7
8
|
type LabelWrapperProps = {
|
|
8
9
|
children: ReactNode;
|
|
9
10
|
label?: string;
|
|
10
11
|
} & LabelProps;
|
|
11
|
-
declare const LabelWrapper: ({ children, label, ...props }: LabelWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const LabelWrapper: ({ children, label, required, ...props }: LabelWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default LabelWrapper;
|
|
@@ -3,12 +3,19 @@ import styled from "@emotion/styled";
|
|
|
3
3
|
import { Label } from "react-aria-components";
|
|
4
4
|
import Ellipsis from "../../Ellipsis.js";
|
|
5
5
|
import isPropAllowed from "../../helpers/isPropAllowed.js";
|
|
6
|
-
const LabelWrapper = ({ children, label, ...props })=>/*#__PURE__*/ jsxs(Label_Label, {
|
|
6
|
+
const LabelWrapper = ({ children, label, required, ...props })=>/*#__PURE__*/ jsxs(Label_Label, {
|
|
7
7
|
...props,
|
|
8
8
|
children: [
|
|
9
|
-
label && /*#__PURE__*/
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
label && /*#__PURE__*/ jsxs(LabelContainer, {
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ jsx(Ellipsis, {
|
|
12
|
+
children: label
|
|
13
|
+
}),
|
|
14
|
+
required && /*#__PURE__*/ jsx(Required, {
|
|
15
|
+
disabled: props.disabled,
|
|
16
|
+
children: "*"
|
|
17
|
+
})
|
|
18
|
+
]
|
|
12
19
|
}),
|
|
13
20
|
children
|
|
14
21
|
]
|
|
@@ -19,6 +26,13 @@ const preventProps = {
|
|
|
19
26
|
'disablePointerEvents'
|
|
20
27
|
])
|
|
21
28
|
};
|
|
29
|
+
const LabelContainer = styled.div({
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
gap: 2,
|
|
33
|
+
width: 'inherit',
|
|
34
|
+
minWidth: 0
|
|
35
|
+
});
|
|
22
36
|
const Label_Label = styled(Label, preventProps)(({ theme: { font, input }, filled, disablePointerEvents })=>({
|
|
23
37
|
display: 'flex',
|
|
24
38
|
flexDirection: 'column',
|
|
@@ -38,5 +52,8 @@ const Label_Label = styled(Label, preventProps)(({ theme: { font, input }, fille
|
|
|
38
52
|
}), ({ theme: { input }, disabled })=>({
|
|
39
53
|
color: disabled ? input.labelColor.disabled : void 0
|
|
40
54
|
}));
|
|
55
|
+
const Required = styled.span(({ theme, disabled })=>({
|
|
56
|
+
color: disabled ? theme.input.labelColor.disabled : theme.color.error
|
|
57
|
+
}));
|
|
41
58
|
const helpers_Label = LabelWrapper;
|
|
42
59
|
export { helpers_Label as default };
|
|
@@ -92,6 +92,7 @@ const Select_Select = ({ backgroundColor, menuBackground, children, fontSize, fo
|
|
|
92
92
|
filled: hasValue,
|
|
93
93
|
disabled: disabled,
|
|
94
94
|
disablePointerEvents: true,
|
|
95
|
+
required: required,
|
|
95
96
|
children: /*#__PURE__*/ jsx(DisplayValue, {
|
|
96
97
|
fontSize: fontSize,
|
|
97
98
|
fontWeight: fontWeight,
|
|
@@ -69,6 +69,7 @@ declare const Table: {
|
|
|
69
69
|
emphasis?: boolean | string;
|
|
70
70
|
} & Padding & import("../types").Height & {
|
|
71
71
|
download?: any;
|
|
72
|
+
form?: string | undefined | undefined;
|
|
72
73
|
key?: import("react").Key | null | undefined;
|
|
73
74
|
list?: string | undefined | undefined;
|
|
74
75
|
rows?: number | undefined | undefined;
|
|
@@ -84,7 +85,6 @@ declare const Table: {
|
|
|
84
85
|
ref?: import("react").Ref<HTMLTableRowElement> | undefined;
|
|
85
86
|
cite?: string | undefined | undefined;
|
|
86
87
|
data?: string | undefined | undefined;
|
|
87
|
-
form?: string | undefined | undefined;
|
|
88
88
|
label?: string | undefined | undefined;
|
|
89
89
|
slot?: string | undefined | undefined;
|
|
90
90
|
span?: number | undefined | undefined;
|
package/build/index.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export type { ITheme, ThemeProp } from './theme/ThemeTypes';
|
|
|
75
75
|
export type { ThemeOption } from './theme';
|
|
76
76
|
export type { EditorValue } from './components/Editor';
|
|
77
77
|
export type { Selection } from 'react-aria-components';
|
|
78
|
+
export type { DropEvent, DropItem } from 'react-aria';
|
|
78
79
|
export type { DotType } from './components/Dot';
|
|
79
80
|
export { default as useConfirm } from './hooks/useConfirm';
|
|
80
81
|
export { default as useElementObserver } from './hooks/useElementObserver';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavv/ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -31,29 +31,29 @@
|
|
|
31
31
|
"@emotion/styled": "^11.14.1",
|
|
32
32
|
"@internationalized/date": "3.10.0",
|
|
33
33
|
"@react-hook/resize-observer": "^2.0.2",
|
|
34
|
-
"@tiptap/core": "^3.11.
|
|
35
|
-
"@tiptap/extension-character-count": "^3.11.
|
|
36
|
-
"@tiptap/extension-highlight": "^3.11.
|
|
37
|
-
"@tiptap/extension-placeholder": "^3.11.
|
|
38
|
-
"@tiptap/extension-task-item": "^3.11.
|
|
39
|
-
"@tiptap/extension-task-list": "^3.11.
|
|
40
|
-
"@tiptap/markdown": "^3.11.
|
|
41
|
-
"@tiptap/pm": "^3.11.
|
|
42
|
-
"@tiptap/react": "^3.11.
|
|
43
|
-
"@tiptap/starter-kit": "^3.11.
|
|
34
|
+
"@tiptap/core": "^3.11.1",
|
|
35
|
+
"@tiptap/extension-character-count": "^3.11.1",
|
|
36
|
+
"@tiptap/extension-highlight": "^3.11.1",
|
|
37
|
+
"@tiptap/extension-placeholder": "^3.11.1",
|
|
38
|
+
"@tiptap/extension-task-item": "^3.11.1",
|
|
39
|
+
"@tiptap/extension-task-list": "^3.11.1",
|
|
40
|
+
"@tiptap/markdown": "^3.11.1",
|
|
41
|
+
"@tiptap/pm": "^3.11.1",
|
|
42
|
+
"@tiptap/react": "^3.11.1",
|
|
43
|
+
"@tiptap/starter-kit": "^3.11.1",
|
|
44
44
|
"cmdk": "^1.1.1",
|
|
45
45
|
"date-fns": "^4.1.0",
|
|
46
46
|
"draft-js": "^0.11.7",
|
|
47
47
|
"es-toolkit": "^1.42.0",
|
|
48
|
-
"libphonenumber-js": "^1.12.
|
|
49
|
-
"lucide-react": "^0.
|
|
48
|
+
"libphonenumber-js": "^1.12.30",
|
|
49
|
+
"lucide-react": "^0.555.0",
|
|
50
50
|
"polished": "^4.1.4",
|
|
51
51
|
"prism-react-renderer": "^2.4.1",
|
|
52
52
|
"react-aria": "3.44.0",
|
|
53
53
|
"react-aria-components": "1.13.0",
|
|
54
|
-
"react-keyed-flatten-children": "^5.
|
|
54
|
+
"react-keyed-flatten-children": "^5.1.1",
|
|
55
55
|
"react-phone-input-auto-format": "^0.1.0",
|
|
56
|
-
"recharts": "^3.
|
|
56
|
+
"recharts": "^3.5.1",
|
|
57
57
|
"sanitize.css": "^13.0.0",
|
|
58
58
|
"webfontloader": "^1.6.28"
|
|
59
59
|
},
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"@chromatic-com/storybook": "^4.1.3",
|
|
66
66
|
"@emotion/babel-plugin": "^11.13.5",
|
|
67
67
|
"@emotion/react": "^11.14.0",
|
|
68
|
-
"@rsbuild/core": "1.6.
|
|
68
|
+
"@rsbuild/core": "1.6.11",
|
|
69
69
|
"@rsbuild/plugin-react": "^1.4.2",
|
|
70
70
|
"@rsbuild/plugin-svgr": "^1.2.2",
|
|
71
|
-
"@rslib/core": "^0.18.
|
|
71
|
+
"@rslib/core": "^0.18.2",
|
|
72
72
|
"@storybook/addon-docs": "^9.1.16",
|
|
73
73
|
"@storybook/addon-links": "^9.1.16",
|
|
74
74
|
"@storybook/addon-themes": "^9.1.16",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@types/node": "^24.10.1",
|
|
84
84
|
"@types/prompts": "^2.4.9",
|
|
85
85
|
"@types/randomcolor": "^0.5.9",
|
|
86
|
-
"@types/react": "^19.2.
|
|
86
|
+
"@types/react": "^19.2.7",
|
|
87
87
|
"@types/react-dom": "^19.2.3",
|
|
88
88
|
"@types/signale": "^1.4.7",
|
|
89
89
|
"@types/webfontloader": "^1.6.38",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"ncp": "^2.0.0",
|
|
96
96
|
"path": "^0.12.7",
|
|
97
97
|
"phone": "^3.1.67",
|
|
98
|
-
"playwright": "^1.
|
|
98
|
+
"playwright": "^1.57.0",
|
|
99
99
|
"postcss": "^8.5.6",
|
|
100
|
-
"prettier": "^3.
|
|
100
|
+
"prettier": "^3.7.3",
|
|
101
101
|
"prompts": "^2.4.2",
|
|
102
102
|
"randomcolor": "^0.6.2",
|
|
103
103
|
"react": "^19.2.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"storybook-react-rsbuild": "^2.1.6",
|
|
109
109
|
"tsc-files": "^1.1.4",
|
|
110
110
|
"tslib": "^2.8.1",
|
|
111
|
-
"tsx": "^4.
|
|
111
|
+
"tsx": "^4.21.0",
|
|
112
112
|
"typescript": "5.9.3",
|
|
113
113
|
"uuid": "^13.0.0"
|
|
114
114
|
},
|