@scaleflex/ui-tw 0.0.77 → 0.0.79

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.
@@ -49,6 +49,7 @@ export type ComboboxContentProps = {
49
49
  };
50
50
  export interface CommandInputProps extends Omit<ComponentProps<typeof CommandPrimitive.Input>, 'size'> {
51
51
  size?: FormSizeType;
52
+ wrapperClassName?: string;
52
53
  }
53
54
  export interface CommandGroupProps extends ComponentProps<typeof CommandPrimitive.Group> {
54
55
  size?: FormSizeType;
@@ -62,6 +63,7 @@ export interface CommandItemProps extends ComponentProps<typeof CommandPrimitive
62
63
  shortcut?: ReactElement | string;
63
64
  selectedValue?: string | string[];
64
65
  multiple?: boolean;
66
+ iconClassName?: string;
65
67
  }
66
68
  interface ComboboxCommonProps {
67
69
  options: SelectOption[];
@@ -8,12 +8,12 @@ declare function CommandDialog({ title, description, children, ...props }: Compo
8
8
  title?: string;
9
9
  description?: string;
10
10
  }): React.JSX.Element;
11
- declare function CommandInput({ className, size, ...props }: CommandInputProps): React.JSX.Element;
11
+ declare function CommandInput({ className, size, wrapperClassName, ...props }: CommandInputProps): React.JSX.Element;
12
12
  declare function CommandList({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
13
13
  declare function CommandEmpty({ className, ...rest }: ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
14
14
  declare function CommandGroup({ className, size, ...props }: CommandGroupProps): React.JSX.Element;
15
15
  declare function CommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
16
- declare function CommandItem({ className, size, isGroup, icon, tooltip, children, selectedValue, multiple, value, shortcut, disabledTooltip, disabled, ...props }: CommandItemProps): React.JSX.Element;
16
+ declare function CommandItem({ className, size, isGroup, icon, tooltip, children, selectedValue, multiple, value, shortcut, disabledTooltip, disabled, iconClassName, ...props }: CommandItemProps): React.JSX.Element;
17
17
  declare function CommandCheckboxItem({ className, size, isGroup, children, selectedValue, value, icon, disabled, tooltip, disabledTooltip, ...props }: CommandItemProps): React.JSX.Element;
18
18
  declare function CommandShortcut({ className, ...props }: ComponentProps<'span'>): React.JSX.Element;
19
19
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandCheckboxItem, CommandShortcut, CommandSeparator, };
@@ -2,12 +2,12 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["className"],
4
4
  _excluded2 = ["title", "description", "children"],
5
- _excluded3 = ["className", "size"],
5
+ _excluded3 = ["className", "size", "wrapperClassName"],
6
6
  _excluded4 = ["className"],
7
7
  _excluded5 = ["className"],
8
8
  _excluded6 = ["className", "size"],
9
9
  _excluded7 = ["className"],
10
- _excluded8 = ["className", "size", "isGroup", "icon", "tooltip", "children", "selectedValue", "multiple", "value", "shortcut", "disabledTooltip", "disabled"],
10
+ _excluded8 = ["className", "size", "isGroup", "icon", "tooltip", "children", "selectedValue", "multiple", "value", "shortcut", "disabledTooltip", "disabled", "iconClassName"],
11
11
  _excluded9 = ["className", "size", "isGroup", "children", "selectedValue", "value", "icon", "disabled", "tooltip", "disabledTooltip"],
12
12
  _excluded10 = ["className"];
13
13
  import { Checkbox } from '@scaleflex/ui-tw/checkbox';
@@ -51,12 +51,13 @@ function CommandInput(_ref3) {
51
51
  var className = _ref3.className,
52
52
  _ref3$size = _ref3.size,
53
53
  size = _ref3$size === void 0 ? FormSize.Md : _ref3$size,
54
+ wrapperClassName = _ref3.wrapperClassName,
54
55
  props = _objectWithoutProperties(_ref3, _excluded3);
55
56
  return /*#__PURE__*/React.createElement("div", {
56
57
  "data-slot": "command-input-wrapper",
57
58
  className: cn('border-border flex h-10 items-center gap-2 border-b px-4', selectTriggerVariants({
58
59
  size: size
59
- }))
60
+ }), wrapperClassName)
60
61
  }, /*#__PURE__*/React.createElement(SearchIcon, {
61
62
  className: cn('shrink-0 opacity-50', switchThumbSizeOptions[size])
62
63
  }), /*#__PURE__*/React.createElement(CommandPrimitive.Input, _extends({
@@ -120,6 +121,7 @@ function CommandItem(_ref8) {
120
121
  shortcut = _ref8.shortcut,
121
122
  disabledTooltip = _ref8.disabledTooltip,
122
123
  disabled = _ref8.disabled,
124
+ iconClassName = _ref8.iconClassName,
123
125
  props = _objectWithoutProperties(_ref8, _excluded8);
124
126
  var selected = value && (multiple ? selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.includes(value) : value === selectedValue);
125
127
  return /*#__PURE__*/React.createElement(CommandPrimitive.Item, _extends({
@@ -134,7 +136,7 @@ function CommandItem(_ref8) {
134
136
  }, icon && /*#__PURE__*/React.createElement(SelectIcon, {
135
137
  size: size,
136
138
  icon: icon,
137
- className: cn('text-muted-foreground hover:text-primary shrink-0', selected && 'text-primary', disabled && 'opacity-50')
139
+ className: cn('text-muted-foreground hover:text-primary shrink-0', selected && 'text-primary', disabled && 'opacity-50', iconClassName)
138
140
  }), /*#__PURE__*/React.createElement("div", {
139
141
  className: "flex items-center gap-1 overflow-hidden"
140
142
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { FieldValues, Path } from 'react-hook-form';
3
3
  import type { FormFieldGroupProps } from '../form.types';
4
- declare function FormFieldGroup<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ control, name, label, description, size, readOnly, disabled, tooltip, disabledTooltip, highlight, horizontal, horizontalLabelWidth, children, inputAriaLabel, }: FormFieldGroupProps<TFieldValues, TName>): React.JSX.Element;
4
+ declare function FormFieldGroup<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ control, name, label, description, size, readOnly, disabled, tooltip, disabledTooltip, highlight, horizontal, horizontalLabelWidth, children, }: FormFieldGroupProps<TFieldValues, TName>): React.JSX.Element;
5
5
  export { FormFieldGroup };
@@ -19,8 +19,7 @@ function FormFieldGroup(_ref) {
19
19
  _ref$horizontal = _ref.horizontal,
20
20
  horizontal = _ref$horizontal === void 0 ? false : _ref$horizontal,
21
21
  horizontalLabelWidth = _ref.horizontalLabelWidth,
22
- children = _ref.children,
23
- inputAriaLabel = _ref.inputAriaLabel;
22
+ children = _ref.children;
24
23
  return /*#__PURE__*/React.createElement(FormField, {
25
24
  control: control,
26
25
  name: name,
@@ -41,9 +40,7 @@ function FormFieldGroup(_ref) {
41
40
  disabled: disabled
42
41
  }, label), /*#__PURE__*/React.createElement("div", {
43
42
  className: "grid gap-1.5"
44
- }, /*#__PURE__*/React.createElement(FormControl, {
45
- "aria-label": inputAriaLabel
46
- }, children(field, {
43
+ }, /*#__PURE__*/React.createElement(FormControl, null, children(field, {
47
44
  size: size,
48
45
  readOnly: readOnly,
49
46
  disabled: disabled
@@ -40,7 +40,6 @@ export interface FormFieldGroupProps<TFieldValues extends FieldValues, TName ext
40
40
  highlight?: boolean;
41
41
  horizontal?: boolean;
42
42
  horizontalLabelWidth?: string;
43
- inputAriaLabel?: string;
44
43
  }
45
44
  export interface FormSwitchFieldProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>> extends UseControllerProps<TFieldValues, TName>, FormBaseFieldProps {
46
45
  layout?: SwitchLayoutType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleflex/ui-tw",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "author": "scaleflex",
5
5
  "repository": "github:scaleflex/ui",
6
6
  "homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
@@ -23,7 +23,7 @@
23
23
  "@radix-ui/react-slot": "^1.1.2",
24
24
  "@radix-ui/react-switch": "^1.0.1",
25
25
  "@radix-ui/react-tooltip": "^1.2.6",
26
- "@scaleflex/icons-tw": "^0.0.77",
26
+ "@scaleflex/icons-tw": "^0.0.79",
27
27
  "@tanstack/react-table": "^8.21.3",
28
28
  "@types/lodash.merge": "^4.6.9",
29
29
  "class-variance-authority": "^0.7.1",