@eintrek/erp-theme 1.4.15 → 1.4.16
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/dist/components/ui/select.d.ts +11 -0
- package/dist/index.esm.js +12 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,17 @@ import * as React from "react";
|
|
|
3
3
|
declare function Select({ onValueChange, onOpenChange, open, defaultOpen, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* The trigger fills its container.
|
|
8
|
+
*
|
|
9
|
+
* Upstream ships w-fit, which sizes the control to whatever text happens to
|
|
10
|
+
* be in it — so a field reading "เลือก..." is narrow and the same field with
|
|
11
|
+
* a name in it is wide, and a form of them looks ragged. Across these apps
|
|
12
|
+
* 102 call sites had already written w-full to undo it and 158 had not,
|
|
13
|
+
* which is a default fighting almost everyone who uses it.
|
|
14
|
+
*
|
|
15
|
+
* A caller that wants the compact behaviour passes w-fit.
|
|
16
|
+
*/
|
|
6
17
|
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
18
|
size?: "sm" | "default";
|
|
8
19
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -263,8 +263,19 @@ function SelectGroup({ ...props }) {
|
|
|
263
263
|
function SelectValue({ ...props }) {
|
|
264
264
|
return jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
265
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* The trigger fills its container.
|
|
268
|
+
*
|
|
269
|
+
* Upstream ships w-fit, which sizes the control to whatever text happens to
|
|
270
|
+
* be in it — so a field reading "เลือก..." is narrow and the same field with
|
|
271
|
+
* a name in it is wide, and a form of them looks ragged. Across these apps
|
|
272
|
+
* 102 call sites had already written w-full to undo it and 158 had not,
|
|
273
|
+
* which is a default fighting almost everyone who uses it.
|
|
274
|
+
*
|
|
275
|
+
* A caller that wants the compact behaviour passes w-fit.
|
|
276
|
+
*/
|
|
266
277
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
267
|
-
return (jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn$1("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-
|
|
278
|
+
return (jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn$1("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, jsx(SelectPrimitive.Icon, { asChild: true, children: jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })] }));
|
|
268
279
|
}
|
|
269
280
|
function SelectContent({ className, children, position = "popper", ...props }) {
|
|
270
281
|
return (jsx(SelectPrimitive.Portal, { children: jsxs(SelectPrimitive.Content, { "data-slot": "select-content", className: cn$1("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", position === "popper" &&
|