@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.
@@ -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;
@@ -116,6 +116,7 @@ const ComboBox_ComboBox = ({ backgroundColor, menuBackground, children, fontSize
116
116
  label: label,
117
117
  filled: hasValue,
118
118
  disabled: disabled,
119
+ required: required,
119
120
  children: [
120
121
  /*#__PURE__*/ jsx(Input, {
121
122
  placeholder: placeholder,
@@ -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 || showFileNames;
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 })=>({
@@ -5,6 +5,7 @@ const FileTrigger_FileTrigger = (props)=>/*#__PURE__*/ jsx(FileTrigger, {
5
5
  ...props,
6
6
  children: /*#__PURE__*/ jsx(Button, {
7
7
  small: true,
8
+ outline: true,
8
9
  children: "Select files"
9
10
  })
10
11
  });
@@ -64,6 +64,7 @@ const DatePicker_DatePicker = ({ value, label, iconLeft, iconRight, loading, fon
64
64
  label: label,
65
65
  filled: !!selectedDate,
66
66
  disabled: disabled,
67
+ required: required,
67
68
  children: /*#__PURE__*/ jsx(Input, {
68
69
  ref: ref,
69
70
  hide: inputHidden,
@@ -81,6 +81,7 @@ const DateRangePicker_DateRangePicker = ({ startValue, endValue, label, iconLeft
81
81
  label: label,
82
82
  filled: hasValue,
83
83
  disabled: disabled,
84
+ required: required,
84
85
  children: /*#__PURE__*/ jsxs(InputsWrapper, {
85
86
  fontSize: fontSize,
86
87
  hide: inputHidden,
@@ -43,6 +43,7 @@ const NumberInput = ({ value, label, placeholder, iconLeft, iconRight, loading,
43
43
  label: label,
44
44
  filled: hasValue,
45
45
  disabled: disabled,
46
+ required: required,
46
47
  children: /*#__PURE__*/ jsx(Input, {
47
48
  ref: ref,
48
49
  placeholder: placeholder,
@@ -72,6 +72,7 @@ const PhoneInput = ({ value, label, placeholder, iconLeft, iconRight, leftElemen
72
72
  label: label,
73
73
  filled: !!inputValue,
74
74
  disabled: disabled,
75
+ required: required,
75
76
  children: /*#__PURE__*/ jsx(Input, {
76
77
  ref: internalRef,
77
78
  placeholder: placeholder,
@@ -54,6 +54,7 @@ const SearchInput = ({ value, label, placeholder, iconLeft, iconRight, leftEleme
54
54
  label: label,
55
55
  filled: !!inputValue,
56
56
  disabled: disabled,
57
+ required: required,
57
58
  children: /*#__PURE__*/ jsx(Input, {
58
59
  ref: ref,
59
60
  placeholder: placeholder,
@@ -75,6 +75,7 @@ const TextArea_TextArea = ({ value, label, placeholder, iconLeft, iconRight, loa
75
75
  label: label,
76
76
  filled: !!inputValue,
77
77
  disabled: disabled,
78
+ required: required,
78
79
  children: /*#__PURE__*/ jsx(TextArea, {
79
80
  ref: textAreaRef,
80
81
  placeholder: placeholder,
@@ -47,6 +47,7 @@ const TextInput = ({ value, label, placeholder, iconLeft, iconRight, leftElement
47
47
  label: label,
48
48
  filled: !!inputValue,
49
49
  disabled: disabled,
50
+ required: required,
50
51
  children: /*#__PURE__*/ jsx(Input, {
51
52
  ref: ref,
52
53
  placeholder: placeholder,
@@ -45,6 +45,7 @@ const TimeInput = ({ value, label, iconLeft, iconRight, loading, fontSize, place
45
45
  label: label,
46
46
  filled: !!selectedTime,
47
47
  disabled: disabled,
48
+ required: required,
48
49
  children: /*#__PURE__*/ jsx(Input, {
49
50
  ref: ref,
50
51
  hide: inputHidden,
@@ -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__*/ jsx(Ellipsis, {
10
- width: "100%",
11
- children: label
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",
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.0",
35
- "@tiptap/extension-character-count": "^3.11.0",
36
- "@tiptap/extension-highlight": "^3.11.0",
37
- "@tiptap/extension-placeholder": "^3.11.0",
38
- "@tiptap/extension-task-item": "^3.11.0",
39
- "@tiptap/extension-task-list": "^3.11.0",
40
- "@tiptap/markdown": "^3.11.0",
41
- "@tiptap/pm": "^3.11.0",
42
- "@tiptap/react": "^3.11.0",
43
- "@tiptap/starter-kit": "^3.11.0",
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.27",
49
- "lucide-react": "^0.554.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.0.1",
54
+ "react-keyed-flatten-children": "^5.1.1",
55
55
  "react-phone-input-auto-format": "^0.1.0",
56
- "recharts": "^3.4.1",
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.7",
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.0",
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.6",
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.56.1",
98
+ "playwright": "^1.57.0",
99
99
  "postcss": "^8.5.6",
100
- "prettier": "^3.6.2",
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.20.6",
111
+ "tsx": "^4.21.0",
112
112
  "typescript": "5.9.3",
113
113
  "uuid": "^13.0.0"
114
114
  },