@telepix-lab/telepix-ui 0.6.4 → 0.6.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.
@@ -12461,7 +12461,7 @@ const SELECT_TRIGGER_SIZES = {
12461
12461
  * </Select>
12462
12462
  */
12463
12463
  const Select = (props) => jsxRuntime.jsx(Root2, { ...props });
12464
- const SelectTrigger = ({ placeholder, variant = "outline", size = "regular", icon, ...rest }) => {
12464
+ const SelectTrigger = ({ placeholder, textValue, variant = "outline", size = "regular", icon, ...rest }) => {
12465
12465
  const { className, ...otherProps } = rest;
12466
12466
  return (jsxRuntime.jsxs(Trigger$1, { className: cn("relative group/state flex items-center justify-between w-full bg-page-l-null outline-none cursor-pointer text-comp-mono-default data-[placeholder]:not-disabled:text-comp-mono-subtle-default data-disabled:text-comp-disabled rounded-md", variant === SELECT_TRIGGER_VARIANTS.OUTLINE &&
12467
12467
  "border border-border-bound [&:not(:is([data-placeholder]))]:border-border-focused data-disabled:border-transparent py-0 px-2", variant === SELECT_TRIGGER_VARIANTS.GHOST &&
@@ -12469,7 +12469,7 @@ const SelectTrigger = ({ placeholder, variant = "outline", size = "regular", ico
12469
12469
  "border border-transparent py-0 px-2 bg-page-l3 [&:not(:is([data-placeholder]))]:border-border-focused [&:not(:is([data-placeholder]))]:bg-page-l2 data-disabled:border-transparent data-disabled:bg-page-l-null", size === SELECT_TRIGGER_SIZES.COMPACT &&
12470
12470
  "py-1.5 px-1 text-label font-medium leading-label-compact gap-1", size === SELECT_TRIGGER_SIZES.REGULAR &&
12471
12471
  "py-1.5 px-2 text-body font-medium leading-body-compact gap-2", size === SELECT_TRIGGER_SIZES.LARGE &&
12472
- "py-3 px-4 text-base leading-base-compact font-medium gap-3", className), ...otherProps, children: [icon && jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: icon }), jsxRuntime.jsx(Value, { placeholder: placeholder }), jsxRuntime.jsx(Icon$1, { className: "flex items-center justify-center text-comp-mono-default group-disabled/state:text-comp-disabled", children: jsxRuntime.jsx(CaretDownIcon, {}) }), jsxRuntime.jsx(StateColorContainer, { className: "rounded-md group-data-disabled/state:bg-fill-default" })] }));
12472
+ "py-3 px-4 text-base leading-base-compact font-medium gap-3", className), ...otherProps, children: [icon && jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: icon }), jsxRuntime.jsx(Value, { placeholder: placeholder, asChild: !!textValue, children: textValue && jsxRuntime.jsx("span", { children: textValue }) }), jsxRuntime.jsx(Icon$1, { className: "flex items-center justify-center text-comp-mono-default group-disabled/state:text-comp-disabled", children: jsxRuntime.jsx(CaretDownIcon, {}) }), jsxRuntime.jsx(StateColorContainer, { className: "rounded-md group-data-disabled/state:bg-fill-default" })] }));
12473
12473
  };
12474
12474
  const SelectContent = ({ children, viewportClassName, viewportWrapperClassName, ...rest }) => {
12475
12475
  const { className, position, sideOffset, ...otherProps } = rest;
@@ -12486,7 +12486,7 @@ const SelectItem = ({ indicator, ...rest }) => {
12486
12486
  const { className, textValue, ...otherProps } = rest;
12487
12487
  return (jsxRuntime.jsxs(Item, { className: cn(`relative group/state flex items-center justify-between gap-2 py-1.5 px-2 cursor-pointer text-comp-mono-default text-body font-medium leading-body-compact outline-none rounded-sm
12488
12488
  [&:is([data-disabled])]:text-comp-disabled [&:is([data-disabled])]:cursor-not-allowed
12489
- `, className), ...otherProps, children: [jsxRuntime.jsx(ItemText, { children: textValue }), indicator && (jsxRuntime.jsx(ItemIndicator, { className: "w-4 flex items-center justify-center", children: indicator })), jsxRuntime.jsx(StateColorContainer, { className: "rounded-sm group-data-disabled/state:bg-fill-default" })] }));
12489
+ `, className), ...otherProps, children: [jsxRuntime.jsx(ItemText, { children: textValue ?? otherProps.value }), indicator && (jsxRuntime.jsx(ItemIndicator, { className: "w-4 flex items-center justify-center", children: indicator })), jsxRuntime.jsx(StateColorContainer, { className: "rounded-sm group-data-disabled/state:bg-fill-default" })] }));
12490
12490
  };
12491
12491
  Select.displayName = "Select";
12492
12492
  SelectTrigger.displayName = "SelectTrigger";
@@ -26,12 +26,13 @@ export declare const Select: {
26
26
  };
27
27
  interface SelectTrigger extends React.ComponentProps<typeof SelectRadix.Trigger> {
28
28
  placeholder?: string;
29
+ textValue?: string;
29
30
  variant?: SelectTriggerVariant;
30
31
  size?: SelectTriggerSize;
31
32
  icon?: React.ReactNode;
32
33
  }
33
34
  export declare const SelectTrigger: {
34
- ({ placeholder, variant, size, icon, ...rest }: SelectTrigger): import("react/jsx-runtime").JSX.Element;
35
+ ({ placeholder, textValue, variant, size, icon, ...rest }: SelectTrigger): import("react/jsx-runtime").JSX.Element;
35
36
  displayName: string;
36
37
  };
37
38
  interface SelectContent extends React.ComponentProps<typeof SelectRadix.Content> {
package/dist/client.d.ts CHANGED
@@ -144,12 +144,13 @@ declare const Select: {
144
144
  };
145
145
  interface SelectTrigger extends React__default.ComponentProps<typeof Select$1.Trigger> {
146
146
  placeholder?: string;
147
+ textValue?: string;
147
148
  variant?: SelectTriggerVariant;
148
149
  size?: SelectTriggerSize;
149
150
  icon?: React__default.ReactNode;
150
151
  }
151
152
  declare const SelectTrigger: {
152
- ({ placeholder, variant, size, icon, ...rest }: SelectTrigger): react_jsx_runtime.JSX.Element;
153
+ ({ placeholder, textValue, variant, size, icon, ...rest }: SelectTrigger): react_jsx_runtime.JSX.Element;
153
154
  displayName: string;
154
155
  };
155
156
  interface SelectContent extends React__default.ComponentProps<typeof Select$1.Content> {
@@ -12441,7 +12441,7 @@ const SELECT_TRIGGER_SIZES = {
12441
12441
  * </Select>
12442
12442
  */
12443
12443
  const Select = (props) => jsx(Root2, { ...props });
12444
- const SelectTrigger = ({ placeholder, variant = "outline", size = "regular", icon, ...rest }) => {
12444
+ const SelectTrigger = ({ placeholder, textValue, variant = "outline", size = "regular", icon, ...rest }) => {
12445
12445
  const { className, ...otherProps } = rest;
12446
12446
  return (jsxs(Trigger$1, { className: cn("relative group/state flex items-center justify-between w-full bg-page-l-null outline-none cursor-pointer text-comp-mono-default data-[placeholder]:not-disabled:text-comp-mono-subtle-default data-disabled:text-comp-disabled rounded-md", variant === SELECT_TRIGGER_VARIANTS.OUTLINE &&
12447
12447
  "border border-border-bound [&:not(:is([data-placeholder]))]:border-border-focused data-disabled:border-transparent py-0 px-2", variant === SELECT_TRIGGER_VARIANTS.GHOST &&
@@ -12449,7 +12449,7 @@ const SelectTrigger = ({ placeholder, variant = "outline", size = "regular", ico
12449
12449
  "border border-transparent py-0 px-2 bg-page-l3 [&:not(:is([data-placeholder]))]:border-border-focused [&:not(:is([data-placeholder]))]:bg-page-l2 data-disabled:border-transparent data-disabled:bg-page-l-null", size === SELECT_TRIGGER_SIZES.COMPACT &&
12450
12450
  "py-1.5 px-1 text-label font-medium leading-label-compact gap-1", size === SELECT_TRIGGER_SIZES.REGULAR &&
12451
12451
  "py-1.5 px-2 text-body font-medium leading-body-compact gap-2", size === SELECT_TRIGGER_SIZES.LARGE &&
12452
- "py-3 px-4 text-base leading-base-compact font-medium gap-3", className), ...otherProps, children: [icon && jsx("div", { className: "flex items-center justify-center", children: icon }), jsx(Value, { placeholder: placeholder }), jsx(Icon$1, { className: "flex items-center justify-center text-comp-mono-default group-disabled/state:text-comp-disabled", children: jsx(CaretDownIcon, {}) }), jsx(StateColorContainer, { className: "rounded-md group-data-disabled/state:bg-fill-default" })] }));
12452
+ "py-3 px-4 text-base leading-base-compact font-medium gap-3", className), ...otherProps, children: [icon && jsx("div", { className: "flex items-center justify-center", children: icon }), jsx(Value, { placeholder: placeholder, asChild: !!textValue, children: textValue && jsx("span", { children: textValue }) }), jsx(Icon$1, { className: "flex items-center justify-center text-comp-mono-default group-disabled/state:text-comp-disabled", children: jsx(CaretDownIcon, {}) }), jsx(StateColorContainer, { className: "rounded-md group-data-disabled/state:bg-fill-default" })] }));
12453
12453
  };
12454
12454
  const SelectContent = ({ children, viewportClassName, viewportWrapperClassName, ...rest }) => {
12455
12455
  const { className, position, sideOffset, ...otherProps } = rest;
@@ -12466,7 +12466,7 @@ const SelectItem = ({ indicator, ...rest }) => {
12466
12466
  const { className, textValue, ...otherProps } = rest;
12467
12467
  return (jsxs(Item, { className: cn(`relative group/state flex items-center justify-between gap-2 py-1.5 px-2 cursor-pointer text-comp-mono-default text-body font-medium leading-body-compact outline-none rounded-sm
12468
12468
  [&:is([data-disabled])]:text-comp-disabled [&:is([data-disabled])]:cursor-not-allowed
12469
- `, className), ...otherProps, children: [jsx(ItemText, { children: textValue }), indicator && (jsx(ItemIndicator, { className: "w-4 flex items-center justify-center", children: indicator })), jsx(StateColorContainer, { className: "rounded-sm group-data-disabled/state:bg-fill-default" })] }));
12469
+ `, className), ...otherProps, children: [jsx(ItemText, { children: textValue ?? otherProps.value }), indicator && (jsx(ItemIndicator, { className: "w-4 flex items-center justify-center", children: indicator })), jsx(StateColorContainer, { className: "rounded-sm group-data-disabled/state:bg-fill-default" })] }));
12470
12470
  };
12471
12471
  Select.displayName = "Select";
12472
12472
  SelectTrigger.displayName = "SelectTrigger";
@@ -26,12 +26,13 @@ export declare const Select: {
26
26
  };
27
27
  interface SelectTrigger extends React.ComponentProps<typeof SelectRadix.Trigger> {
28
28
  placeholder?: string;
29
+ textValue?: string;
29
30
  variant?: SelectTriggerVariant;
30
31
  size?: SelectTriggerSize;
31
32
  icon?: React.ReactNode;
32
33
  }
33
34
  export declare const SelectTrigger: {
34
- ({ placeholder, variant, size, icon, ...rest }: SelectTrigger): import("react/jsx-runtime").JSX.Element;
35
+ ({ placeholder, textValue, variant, size, icon, ...rest }: SelectTrigger): import("react/jsx-runtime").JSX.Element;
35
36
  displayName: string;
36
37
  };
37
38
  interface SelectContent extends React.ComponentProps<typeof SelectRadix.Content> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telepix-lab/telepix-ui",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "A UI kit for TelePIX",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {