@stll/ui 0.29.1 → 0.30.0
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/button.d.ts +2 -2
- package/dist/components/court-badge.d.ts +1 -1
- package/dist/components/court-badge.js +9 -1
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/select.d.ts +1 -2
- package/dist/components/select.js +1 -7
- package/dist/components/sidebar.d.ts +2 -2
- package/dist/lib/control-size.d.ts +1 -1
- package/package.json +1 -1
|
@@ -14,8 +14,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
14
14
|
*/
|
|
15
15
|
declare const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
|
|
16
16
|
declare const buttonVariants: (props?: ({
|
|
17
|
-
size?: "default" | "
|
|
18
|
-
variant?: "link" | "default" | "destructive" | "
|
|
17
|
+
size?: "default" | "xs" | "sm" | "icon" | "chip" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "xl" | null | undefined;
|
|
18
|
+
variant?: "link" | "default" | "destructive" | "outline" | "destructive-outline" | "destructive-ghost" | "ghost" | "muted" | "secondary" | null | undefined;
|
|
19
19
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
20
|
type ButtonProps = {
|
|
21
21
|
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/components/court-badge.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* How a court's abbreviation is drawn:
|
|
3
|
+
* How a court's abbreviation is drawn: a firm edge for the apex, then lighter
|
|
4
4
|
* treatments down the instances.
|
|
5
5
|
*
|
|
6
6
|
* A rank, not a status, so the scale is weight and not colour. Colour here
|
|
@@ -8,9 +8,17 @@ const COURT_BADGE_BASE_CLASS = "inline-flex shrink-0 items-center rounded-sm bor
|
|
|
8
8
|
* find. The lighter weights write their text in `foreground-strong-muted`
|
|
9
9
|
* rather than `muted-foreground`: two capitals are not a paragraph a reader
|
|
10
10
|
* can infer from context, so they hold body-text contrast in both themes.
|
|
11
|
+
*
|
|
12
|
+
* Every weight also writes its text in a foreground token on a tint, never
|
|
13
|
+
* inverted on a fill. The apex is separated by the strength of its edge, not
|
|
14
|
+
* by a block of ink: an ink block is the one treatment whose legibility
|
|
15
|
+
* depends on `text-background` surviving intact, and it reads as a filled
|
|
16
|
+
* square among chips whose surfaces are 4% tints — the two capitals inside it
|
|
17
|
+
* carry the whole fact, with no contrast to spare if anything composites them.
|
|
18
|
+
* Weight, applied to the border, says the same thing and cannot fail that way.
|
|
11
19
|
*/
|
|
12
20
|
const WEIGHT_CLASS = {
|
|
13
|
-
solid: "border-foreground bg-
|
|
21
|
+
solid: "border-foreground bg-muted text-foreground",
|
|
14
22
|
tinted: "border-border bg-muted text-foreground",
|
|
15
23
|
outline: "border-border text-foreground-strong-muted",
|
|
16
24
|
dashed: "border-border border-dashed text-foreground-strong-muted"
|
|
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
5
5
|
//#region src/components/input-group.d.ts
|
|
6
6
|
declare const InputGroup: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
7
7
|
declare const inputGroupAddonVariants: (props?: ({
|
|
8
|
-
align?: "inline-end" | "inline-start" | "block-
|
|
8
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare const InputGroupAddon: ({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) => React$1.JSX.Element;
|
|
11
11
|
declare const InputGroupText: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
|
|
@@ -10,13 +10,12 @@ declare const SelectTrigger: ({ className, size, children, ...props }: Select$1.
|
|
|
10
10
|
size?: ControlSize;
|
|
11
11
|
}) => React$1.JSX.Element;
|
|
12
12
|
declare const SelectValue: ({ className, children, placeholder, ...props }: Select$1.Value.Props) => React$1.JSX.Element;
|
|
13
|
-
declare const SelectPopup: ({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger,
|
|
13
|
+
declare const SelectPopup: ({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: Select$1.Popup.Props & {
|
|
14
14
|
side?: Select$1.Positioner.Props["side"];
|
|
15
15
|
sideOffset?: Select$1.Positioner.Props["sideOffset"];
|
|
16
16
|
align?: Select$1.Positioner.Props["align"];
|
|
17
17
|
alignOffset?: Select$1.Positioner.Props["alignOffset"];
|
|
18
18
|
alignItemWithTrigger?: Select$1.Positioner.Props["alignItemWithTrigger"];
|
|
19
|
-
collisionAvoidance?: Select$1.Positioner.Props["collisionAvoidance"];
|
|
20
19
|
}) => React$1.JSX.Element;
|
|
21
20
|
declare const SelectItem: ({ className, children, label: _label, ...props }: SelectItemProps) => React$1.JSX.Element;
|
|
22
21
|
declare const SelectSeparator: ({ className, ...props }: Select$1.Separator.Props) => React$1.JSX.Element;
|
|
@@ -61,17 +61,11 @@ const SelectValue = ({ className, children, placeholder, ...props }) => {
|
|
|
61
61
|
children: renderSelectedDisplay(displays, placeholder)
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
const
|
|
65
|
-
align: "shift",
|
|
66
|
-
fallbackAxisSide: "none",
|
|
67
|
-
side: "none"
|
|
68
|
-
};
|
|
69
|
-
const SelectPopup = ({ className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = true, collisionAvoidance = DEFAULT_COLLISION_AVOIDANCE, ...props }) => /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
64
|
+
const SelectPopup = ({ className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = true, ...props }) => /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
70
65
|
align,
|
|
71
66
|
alignItemWithTrigger,
|
|
72
67
|
alignOffset,
|
|
73
68
|
className: cn(OVERLAY_LAYER_CLASS_NAMES.popup, "select-none"),
|
|
74
|
-
collisionAvoidance,
|
|
75
69
|
"data-slot": "select-positioner",
|
|
76
70
|
side,
|
|
77
71
|
sideOffset,
|
|
@@ -30,7 +30,7 @@ declare function useSidebar(): SidebarContextProps;
|
|
|
30
30
|
* left for the content column. Mobile reports 0: there the sidebar is an
|
|
31
31
|
* overlay sheet and occupies no layout width.
|
|
32
32
|
*/
|
|
33
|
-
declare function useSidebarInlineSize(): 0 |
|
|
33
|
+
declare function useSidebarInlineSize(): 0 | 48 | 256;
|
|
34
34
|
declare const SidebarProvider: ({ defaultOpen, forceCollapsed, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
35
35
|
defaultOpen?: boolean;
|
|
36
36
|
forceCollapsed?: boolean;
|
|
@@ -83,7 +83,7 @@ declare const SidebarMenu: ({ className, ...props }: React.ComponentProps<"ul">)
|
|
|
83
83
|
declare const SidebarMenuItem: ({ className, ...props }: React.ComponentProps<"li">) => import("react").JSX.Element;
|
|
84
84
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
85
85
|
variant?: "default" | "outline" | null | undefined;
|
|
86
|
-
size?: "default" | "
|
|
86
|
+
size?: "default" | "sm" | "lg" | "rail" | null | undefined;
|
|
87
87
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
88
88
|
declare const SidebarMenuButton: ({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
|
|
89
89
|
asChild?: boolean;
|
|
@@ -5,6 +5,6 @@ declare const CONTROL_SIZE: Readonly<{
|
|
|
5
5
|
readonly lg: "lg";
|
|
6
6
|
}>;
|
|
7
7
|
type ControlSize = (typeof CONTROL_SIZE)[keyof typeof CONTROL_SIZE];
|
|
8
|
-
declare const CONTROL_SIZES: readonly ("default" | "
|
|
8
|
+
declare const CONTROL_SIZES: readonly ("default" | "sm" | "lg")[];
|
|
9
9
|
//#endregion
|
|
10
10
|
export { CONTROL_SIZE, CONTROL_SIZES, type ControlSize };
|
package/package.json
CHANGED