@wavv/ui 2.4.12 → 2.4.14

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.
@@ -84,7 +84,7 @@ const DraftEditor = ({ value, onChange, onEnterKey, onFocus, onBlur, mergeFields
84
84
  height: height,
85
85
  editorMaxHeight: editorMaxHeight,
86
86
  noPadding: noPadding || textOnly,
87
- readOnly: readOnly,
87
+ readOnly: readOnly || disabled,
88
88
  color: color,
89
89
  overflow: overflow,
90
90
  clampLines: clampLines,
@@ -106,7 +106,7 @@ const DraftEditor = ({ value, onChange, onEnterKey, onFocus, onBlur, mergeFields
106
106
  className: className,
107
107
  children: [
108
108
  /*#__PURE__*/ jsxs(InputWrapper, {
109
- readOnly: readOnly,
109
+ readOnly: readOnly || disabled,
110
110
  children: [
111
111
  label && /*#__PURE__*/ jsx(Label, {
112
112
  filled: isInputFilled(value),
@@ -119,7 +119,7 @@ const DraftEditor = ({ value, onChange, onEnterKey, onFocus, onBlur, mergeFields
119
119
  editorState: editorState,
120
120
  onChange: handleChange,
121
121
  placeholder: placeholder,
122
- readOnly: readOnly,
122
+ readOnly: readOnly || disabled,
123
123
  handleReturn: handleEditorReturn,
124
124
  handlePastedText: handlePaste,
125
125
  onFocus: handleFocus,
@@ -143,10 +143,10 @@ const EditorContainer = styled(InputContainer)(({ theme, height, noPadding, disa
143
143
  color: disabled ? theme.input.color.disabled : color || theme.input.color.default,
144
144
  cursor: readOnly ? 'inherit' : 'text',
145
145
  '&:hover': {
146
- backgroundColor: readOnly ? theme.input.background.default : void 0,
147
- borderBottom: readOnly ? `1px solid ${theme.input.borderColor.default}` : void 0,
146
+ backgroundColor: readOnly && !disabled ? theme.input.background.default : void 0,
147
+ borderBottom: readOnly && !disabled ? `1px solid ${theme.input.borderColor.default}` : void 0,
148
148
  Label: {
149
- color: readOnly ? theme.input.labelColor.filled : void 0
149
+ color: readOnly && !disabled ? theme.input.labelColor.filled : void 0
150
150
  }
151
151
  }
152
152
  }), ({ theme, height, hasLabel, editorMaxHeight, overflow, clampLines, hideEditor, fontSize, noPadding, filled })=>({
@@ -18,7 +18,7 @@ declare const icons: {
18
18
  readonly bug: ComponentType<WrappedIconProps>;
19
19
  readonly bulb: ComponentType<WrappedIconProps>;
20
20
  readonly calendar: ComponentType<WrappedIconProps>;
21
- readonly callboards: ComponentType<WrappedIconProps>;
21
+ readonly callboard: ComponentType<WrappedIconProps>;
22
22
  readonly camera: ComponentType<WrappedIconProps>;
23
23
  readonly card: ComponentType<WrappedIconProps>;
24
24
  readonly cart: ComponentType<WrappedIconProps>;
@@ -39,11 +39,13 @@ declare const icons: {
39
39
  readonly 'copy-plus': ComponentType<WrappedIconProps>;
40
40
  readonly cycle: ComponentType<WrappedIconProps>;
41
41
  readonly dash: ComponentType<WrappedIconProps>;
42
+ readonly delete: ComponentType<WrappedIconProps>;
42
43
  readonly devices: ComponentType<WrappedIconProps>;
43
44
  readonly 'double-arrow-left': ComponentType<WrappedIconProps>;
44
45
  readonly 'double-arrow-right': ComponentType<WrappedIconProps>;
45
46
  readonly download: ComponentType<WrappedIconProps>;
46
47
  readonly drag: ComponentType<WrappedIconProps>;
48
+ readonly duplicate: ComponentType<WrappedIconProps>;
47
49
  readonly edit: ComponentType<WrappedIconProps>;
48
50
  readonly 'emoji-happy': ComponentType<WrappedIconProps>;
49
51
  readonly 'emoji-neutral': ComponentType<WrappedIconProps>;
@@ -153,7 +155,7 @@ declare const icons: {
153
155
  readonly 'vol-on': ComponentType<WrappedIconProps>;
154
156
  readonly warning: ComponentType<WrappedIconProps>;
155
157
  readonly 'warning-circle': ComponentType<WrappedIconProps>;
156
- readonly workflow: ComponentType<WrappedIconProps>;
158
+ readonly automation: ComponentType<WrappedIconProps>;
157
159
  readonly youtube: ComponentType<WrappedIconProps>;
158
160
  };
159
161
  export type IconNames = keyof typeof icons;
@@ -1,4 +1,4 @@
1
- import { ArrowDown, ArrowDownWideNarrow, ArrowLeft, ArrowRight, ArrowRightLeft, ArrowUp, ArrowUpWideNarrow, BadgeCheck, Ban, Bell, BellDot, Bold, Bot, Braces, Bug, CalendarDays, Camera, ChartColumn, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleCheck, CirclePause, CirclePlay, CirclePlus, CircleQuestionMark, CircleStop, CircleUserRound, CircleX, Clapperboard, Clock, Copy, CopyCheck, CopyPlus, CreditCard, Download, Ear, EllipsisVertical, ExternalLink, Eye, EyeOff, Facebook, FileText, Flag, FlaskConical, Frown, Funnel, Globe, GripVertical, Hash, Heading, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Headset, Heart, Highlighter, Hourglass, House, IdCard, Info, Instagram, Italic, Kanban, Layers2, LayoutDashboard, Lightbulb, Link, Linkedin, List, ListChecks, ListFilter, ListOrdered, ListTodo, Loader, LockKeyhole, LockKeyholeOpen, LogIn, LogOut, MapPin, MapPinned, Maximize2, Meh, Menu, Merge, MessageSquareMore, Mic, MicOff, Minimize2, Minus, MonitorSmartphone, NotebookPen, Paperclip, Pause, Pencil, Percent, Pilcrow, Pin, PinOff, Play, Plus, Redo, RefreshCcwDot, RefreshCw, Rocket, RotateCw, Search, Send, Settings, Share, Share2, Shield, ShieldCheck, ShieldOff, ShieldPlus, ShoppingCart, Smartphone, Smile, Sparkles, Square, SquareKanban, SquarePen, SquareStack, Star, Strikethrough, Tag, TextQuote, Trash2, TriangleAlert, Trophy, Underline, Undo, Upload, UserRound, UserRoundCheck, UserRoundPlus, UserRoundX, Users, Video, Voicemail, Volume2, Workflow, X, Youtube } from "lucide-react";
1
+ import { ArrowDown, ArrowDownWideNarrow, ArrowLeft, ArrowRight, ArrowRightLeft, ArrowUp, ArrowUpWideNarrow, BadgeCheck, Ban, Bell, BellDot, Bold, Bot, Braces, Bug, CalendarDays, Camera, ChartColumn, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleCheck, CirclePause, CirclePlay, CirclePlus, CircleQuestionMark, CircleStop, CircleUserRound, CircleX, Clapperboard, Clock, Copy, CopyCheck, CopyPlus, CreditCard, Delete, Download, Ear, EllipsisVertical, ExternalLink, Eye, EyeOff, Facebook, FileText, Flag, FlaskConical, Frown, Funnel, Globe, GripVertical, Hash, Heading, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, Headset, Heart, Highlighter, Hourglass, House, IdCard, Info, Instagram, Italic, Kanban, Layers2, LayoutDashboard, Lightbulb, Link, Linkedin, List, ListChecks, ListFilter, ListOrdered, ListTodo, Loader, LockKeyhole, LockKeyholeOpen, LogIn, LogOut, MapPin, MapPinned, Maximize2, Meh, Menu, Merge, MessageSquareMore, Mic, MicOff, Minimize2, Minus, MonitorSmartphone, NotebookPen, Paperclip, Pause, Pencil, Percent, Pilcrow, Pin, PinOff, Play, Plus, Redo, RefreshCcwDot, RefreshCw, Rocket, RotateCw, Search, Send, Settings, Share, Share2, Shield, ShieldCheck, ShieldOff, ShieldPlus, ShoppingCart, Smartphone, Smile, Sparkles, Square, SquareKanban, SquarePen, SquareStack, Star, Strikethrough, Tag, TextQuote, Trash2, TriangleAlert, Trophy, Underline, Undo, Upload, UserRound, UserRoundCheck, UserRoundPlus, UserRoundX, Users, Video, Voicemail, Volume2, Workflow, X, Youtube } from "lucide-react";
2
2
  import createWrappedIcon from "./createWrappedIcon.js";
3
3
  const icons = {
4
4
  'activity-history': createWrappedIcon(IdCard),
@@ -18,7 +18,7 @@ const icons = {
18
18
  bug: createWrappedIcon(Bug),
19
19
  bulb: createWrappedIcon(Lightbulb),
20
20
  calendar: createWrappedIcon(CalendarDays),
21
- callboards: createWrappedIcon(SquareKanban),
21
+ callboard: createWrappedIcon(SquareKanban),
22
22
  camera: createWrappedIcon(Camera),
23
23
  card: createWrappedIcon(CreditCard),
24
24
  cart: createWrappedIcon(ShoppingCart),
@@ -39,11 +39,13 @@ const icons = {
39
39
  'copy-plus': createWrappedIcon(CopyPlus),
40
40
  cycle: createWrappedIcon(RefreshCw),
41
41
  dash: createWrappedIcon(Minus),
42
+ delete: createWrappedIcon(Delete),
42
43
  devices: createWrappedIcon(MonitorSmartphone),
43
44
  'double-arrow-left': createWrappedIcon(ChevronsLeft),
44
45
  'double-arrow-right': createWrappedIcon(ChevronsRight),
45
46
  download: createWrappedIcon(Download),
46
47
  drag: createWrappedIcon(GripVertical),
48
+ duplicate: createWrappedIcon(CopyPlus),
47
49
  edit: createWrappedIcon(Pencil),
48
50
  'emoji-happy': createWrappedIcon(Smile),
49
51
  'emoji-neutral': createWrappedIcon(Meh),
@@ -153,7 +155,7 @@ const icons = {
153
155
  'vol-on': createWrappedIcon(Volume2),
154
156
  warning: createWrappedIcon(TriangleAlert),
155
157
  'warning-circle': createWrappedIcon(CircleAlert),
156
- workflow: createWrappedIcon(Workflow),
158
+ automation: createWrappedIcon(Workflow),
157
159
  youtube: createWrappedIcon(Youtube)
158
160
  };
159
161
  const Icon_icons = icons;
@@ -11,7 +11,7 @@ import SearchDropdown from "./SearchDropdown.js";
11
11
  const MultiSelect = ({ options, items, listLabel, listText, itemsTitle, maxItems, placeholder, width, accepts, disabled, hideItemsInfo, compact, backgroundColor, borderless, autoFocus, embedded, invalid, maxListHeight, maxMenuHeight, onToggleAllItems, addItem, removeItem, onTextChange, ref, ...props })=>{
12
12
  const [expanded, setExpanded] = useState(autoFocus || false);
13
13
  const [error, setError] = useState(false);
14
- const { color, font, input: inputColors } = useTheme();
14
+ const { font, input: inputColors } = useTheme();
15
15
  const clickOutsideRef = useOnClickOutside(()=>setExpanded(false), expanded);
16
16
  const dropdownTriggerRef = useRef(null);
17
17
  const dropdownRef = useRef(null);
@@ -161,7 +161,7 @@ const MultiSelect = ({ options, items, listLabel, listText, itemsTitle, maxItems
161
161
  }),
162
162
  items.length > 0 && /*#__PURE__*/ jsx(Icon, {
163
163
  name: expanded ? 'chevron-up' : 'chevron-down',
164
- color: color.brand,
164
+ color: inputColors.labelColor.default,
165
165
  pointer: true,
166
166
  onClick: toggleExpand
167
167
  })
@@ -27,11 +27,11 @@ const Select_Select = ({ backgroundColor, menuBackground, children, fontSize, fo
27
27
  const [internalValue, setInternalValue] = useState(()=>{
28
28
  if (isMultiple) {
29
29
  const defaultValueArray = defaultValue;
30
- return Array.isArray(defaultValueArray) ? defaultValueArray.map(String) : defaultValueArray ? [
31
- String(defaultValueArray)
30
+ return Array.isArray(defaultValueArray) ? defaultValueArray : defaultValueArray ? [
31
+ defaultValueArray
32
32
  ] : [];
33
33
  }
34
- return defaultValue ? String(defaultValue) : '';
34
+ return defaultValue ?? '';
35
35
  });
36
36
  const isControlled = void 0 !== value;
37
37
  const currentValue = isControlled ? value : internalValue;
@@ -3,6 +3,8 @@ import type { Padding, WidthHeight } from '../types';
3
3
  type Props = {
4
4
  /** The background color of the tree */
5
5
  backgroundColor?: string;
6
+ /** When true, no background is applied */
7
+ noBackground?: boolean;
6
8
  /** The currently selected keys in the collection */
7
9
  selectedKeys?: Set<React.Key>;
8
10
  /** Handler that is called when the selection changes */
@@ -22,7 +24,7 @@ type Props = {
22
24
  onExpandedChange?: TreeProps<object>['onExpandedChange'];
23
25
  } & WidthHeight & Padding & Omit<TreeProps<object>, 'items' | 'selectionMode' | 'selectionBehavior' | 'selectedKeys' | 'onSelectionChange' | 'disallowEmptySelection' | 'dragAndDropHooks' | 'dependencies'>;
24
26
  declare const Tree: {
25
- ({ backgroundColor, expandedKeys: expandedKeysProp, onExpandedChange, defaultExpandedKeys, selectedKeys, onSelectionChange, ...props }: Props): import("react/jsx-runtime").JSX.Element;
27
+ ({ backgroundColor, noBackground, expandedKeys: expandedKeysProp, onExpandedChange, defaultExpandedKeys, selectedKeys, onSelectionChange, ...props }: Props): import("react/jsx-runtime").JSX.Element;
26
28
  Item: ({ children, title, id, iconLeft, iconRight, expandOnSelect, indent, content, disabled, ...props }: {
27
29
  title: string;
28
30
  children?: import("react").ReactNode;
@@ -5,7 +5,7 @@ import { Tree } from "react-aria-components";
5
5
  import { paddingProps } from "../helpers/styledProps.js";
6
6
  import { TreeContext } from "./TreeContext.js";
7
7
  import TreeItem from "./TreeItem.js";
8
- const Tree_Tree = ({ backgroundColor, expandedKeys: expandedKeysProp, onExpandedChange, defaultExpandedKeys, selectedKeys, onSelectionChange, ...props })=>{
8
+ const Tree_Tree = ({ backgroundColor, noBackground, expandedKeys: expandedKeysProp, onExpandedChange, defaultExpandedKeys, selectedKeys, onSelectionChange, ...props })=>{
9
9
  const initialExpanded = new Set(defaultExpandedKeys ?? []);
10
10
  const [internalExpandedKeys, setInternalExpandedKeys] = useState(initialExpanded);
11
11
  const isControlled = void 0 !== expandedKeysProp;
@@ -46,6 +46,7 @@ const Tree_Tree = ({ backgroundColor, expandedKeys: expandedKeysProp, onExpanded
46
46
  selectionMode: "single",
47
47
  disallowEmptySelection: true,
48
48
  backgroundColor: backgroundColor,
49
+ noBackground: noBackground,
49
50
  expandedKeys: expandedKeys,
50
51
  onExpandedChange: handleExpandedChange,
51
52
  selectedKeys: selectedKeys,
@@ -56,11 +57,11 @@ const Tree_Tree = ({ backgroundColor, expandedKeys: expandedKeysProp, onExpanded
56
57
  });
57
58
  };
58
59
  Tree_Tree.Item = TreeItem;
59
- const TreeContainer = styled(Tree)(({ theme: { menu }, width, height, backgroundColor })=>({
60
+ const TreeContainer = styled(Tree)(({ theme: { menu }, width, height, backgroundColor, noBackground })=>({
60
61
  display: 'flex',
61
62
  flexFlow: 'column',
62
63
  overflowY: 'auto',
63
- backgroundColor: backgroundColor || menu.background,
64
+ backgroundColor: noBackground ? void 0 : backgroundColor || menu.background,
64
65
  padding: '8px 0',
65
66
  width: width || '100%',
66
67
  height
@@ -68,9 +68,9 @@ type SingleSelectInputProps = BaseSelectInputProps & {
68
68
  /** The selection mode for the select */
69
69
  selectionMode?: 'single';
70
70
  /** The controlled value of the input */
71
- value?: Key;
71
+ value?: string;
72
72
  /** The uncontrolled initial value of the input */
73
- defaultValue?: Key;
73
+ defaultValue?: string;
74
74
  /** The function to be called when an option is selected */
75
75
  onChange?: (key: string) => void;
76
76
  };
@@ -78,9 +78,9 @@ type MultipleSelectInputProps = BaseSelectInputProps & {
78
78
  /** The selection mode for the select */
79
79
  selectionMode: 'multiple';
80
80
  /** The controlled value of the input */
81
- value?: Key | Key[];
81
+ value?: string | string[];
82
82
  /** The uncontrolled initial value of the input */
83
- defaultValue?: Key | Key[];
83
+ defaultValue?: string | string[];
84
84
  onChange?: (keys: string | string[]) => void;
85
85
  };
86
86
  export type SelectInputProps = SingleSelectInputProps | MultipleSelectInputProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "2.4.12",
3
+ "version": "2.4.14",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {