@codefast/ui 0.14.0 → 0.14.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @codefast/ui
2
2
 
3
+ ## 0.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1140](https://github.com/codefastlabs/codefast/pull/1140) `SelectTrigger` truncates long values with an ellipsis instead of overflowing: the trigger can shrink (`min-w-0`,
8
+ `max-w-full`) and `SelectValue` renders as a truncating block. `line-clamp-1` combined with `flex` gave no ellipsis.
9
+ Icons inside the value stay inline. `NativeSelect` ends a long value in an ellipsis too, instead of clipping it
10
+ mid-letter.
11
+ - Updated dependencies:
12
+ - @codefast/theme@0.11.0
13
+
3
14
  ## 0.14.0
4
15
 
5
16
  ### Minor Changes
@@ -5,7 +5,7 @@ import { cn } from "#lib/utils";
5
5
  * @since 0.3.16-canary.0
6
6
  */
7
7
  function NativeSelect({ className, size = "default", ...props }) {
8
- return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-size": size, "data-slot": "native-select-wrapper", children: [_jsx("select", { className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 ps-2.5 pe-8 text-sm shadow-xs transition-[color,box-shadow] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "data-size": size, "data-slot": "native-select", ...props }), _jsx(ChevronDownIcon, { "aria-hidden": "true", className: "pointer-events-none absolute inset-e-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground select-none", "data-slot": "native-select-icon" })] }));
8
+ return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-size": size, "data-slot": "native-select-wrapper", children: [_jsx("select", { className: "h-8 w-full min-w-0 appearance-none truncate rounded-lg border border-input bg-transparent py-1 ps-2.5 pe-8 text-sm shadow-xs transition-[color,box-shadow] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "data-size": size, "data-slot": "native-select", ...props }), _jsx(ChevronDownIcon, { "aria-hidden": "true", className: "pointer-events-none absolute inset-e-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground select-none", "data-slot": "native-select-icon" })] }));
9
9
  }
10
10
  /**
11
11
  * @since 0.3.16-canary.0
@@ -25,7 +25,7 @@ function SelectValue({ ...props }) {
25
25
  * @since 0.3.16-canary.0
26
26
  */
27
27
  function SelectTrigger({ children, className, size = "default", ...props }) {
28
- return (_jsxs(SelectPrimitive.Trigger, { className: cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-size": size, "data-slot": "select-trigger", ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
28
+ return (_jsxs(SelectPrimitive.Trigger, { className: cn("flex w-fit max-w-full min-w-0 items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:block *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:truncate dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_[data-slot=select-value]_svg]:me-1.5 [&_[data-slot=select-value]_svg]:inline-block [&_[data-slot=select-value]_svg]:align-[-0.125em] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), "data-size": size, "data-slot": "select-trigger", ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
29
29
  }
30
30
  /**
31
31
  * @since 0.3.16-canary.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/ui",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Core UI components library built with React and Tailwind CSS",
5
5
  "keywords": [
6
6
  "components",
@@ -473,7 +473,7 @@
473
473
  "cmdk": "^1.1.1",
474
474
  "embla-carousel-react": "^8.6.0",
475
475
  "input-otp": "^1.5.0",
476
- "lucide-react": "^1.55.0",
476
+ "lucide-react": "^1.57.0",
477
477
  "radix-ui": "^1.8.1",
478
478
  "react-hook-form": "^7.90.0",
479
479
  "react-resizable-panels": "^4.14.5",
@@ -484,7 +484,7 @@
484
484
  "vaul": "^1.1.2"
485
485
  },
486
486
  "peerDependencies": {
487
- "@codefast/theme": ">=0.10.0",
487
+ "@codefast/theme": ">=0.11.0",
488
488
  "@types/react": ">=19.0.0",
489
489
  "@types/react-dom": ">=19.0.0",
490
490
  "react": ">=19.0.0",