@botiverse/raft-ui 0.68.0 → 0.70.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/CHANGELOG.md +18 -0
- package/dist/components/input-group/input-group.d.mts +28 -2
- package/dist/components/input-group/input-group.mjs +16 -2
- package/dist/components/picker-trigger-button/picker-trigger-button.mjs +1 -0
- package/dist/components/segmented-control/segmented-control.mjs +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [0.70.0](https://github.com/botiverse/raft-design/compare/v0.69.0...v0.70.0) (2026-11-06)
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- **PickerTriggerButton** and **SegmentedControlItem**: on a phone and a touch screen they still look 32px but take a 44px tap area, as a Button at `md` does, through a transparent `::after` 6px past the box above and below. A segment's reaches up and down only (3px past its track), so the tap areas of segments 3px apart don't overlap; while the segments scroll inside the track (`data-overflowing`), the track scrolls sideways only and the tap area stops at its edge. ([#1041](https://github.com/botiverse/raft-design/pull/1041))
|
|
6
|
+
- Why: they were the two controls of a toolbar or filter row whose tap area stayed 32px by touch, beside an `md` Button and an `md` InputGroup that reach 44px.
|
|
7
|
+
- Affects: touch screens, and windows narrower than 768px; with a mouse on a desktop they are the control height, 34px, and take no taps past the box, as before. Keep 6px between them and the controls above and below, as with a Button at `md`.
|
|
8
|
+
- Docs: https://raft-design.botiverse.build/foundations/spacing/#heights
|
|
9
|
+
|
|
10
|
+
## [0.69.0](https://github.com/botiverse/raft-design/compare/v0.68.0...v0.69.0) (2026-11-06)
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **InputGroup** `size`: `md` for a field in a toolbar or a filter row, `lg` (the default, unchanged) for a field on its own. At `md` the field is the row's button height: 32px on a phone and a touch screen, like the `md` Buttons and PickerTriggerButtons beside it, with its input taking a 44px tap area, 6px past the box above and below; with a mouse it stays the control height, 34px. The root carries `data-size`. A Button in an `md` field's end addon is 20px by touch (22px with a mouse), 6px inside the box. ([#1039](https://github.com/botiverse/raft-design/pull/1039))
|
|
15
|
+
- Why: on a tablet held landscape, a 44px search field beside 32px filter triggers and a view switch read taller and heavier than the rest of the filter row; a field in a row now takes the row's button height.
|
|
16
|
+
- Affects: nothing until a field opts in with `size="md"`; every InputGroup without it renders as before.
|
|
17
|
+
- Docs: https://raft-design.botiverse.build/components/input-group/#sizes
|
|
18
|
+
|
|
1
19
|
## [0.68.0](https://github.com/botiverse/raft-design/compare/v0.67.0...v0.68.0) (2026-11-06)
|
|
2
20
|
|
|
3
21
|
### Changed
|
|
@@ -7,6 +7,12 @@ import { ComponentPropsWithRef } from "react";
|
|
|
7
7
|
import { Input } from "@base-ui/react/input";
|
|
8
8
|
//#region src/components/input-group/input-group.d.ts
|
|
9
9
|
declare const inputGroup: import("tailwind-variants/lite").TVReturnType<{
|
|
10
|
+
size: {
|
|
11
|
+
md: {
|
|
12
|
+
root: string[];
|
|
13
|
+
};
|
|
14
|
+
lg: {};
|
|
15
|
+
};
|
|
10
16
|
align: {
|
|
11
17
|
"inline-start": {
|
|
12
18
|
addon: string;
|
|
@@ -31,6 +37,12 @@ declare const inputGroup: import("tailwind-variants/lite").TVReturnType<{
|
|
|
31
37
|
textInner: string[];
|
|
32
38
|
control: string[];
|
|
33
39
|
}, undefined, {
|
|
40
|
+
size: {
|
|
41
|
+
md: {
|
|
42
|
+
root: string[];
|
|
43
|
+
};
|
|
44
|
+
lg: {};
|
|
45
|
+
};
|
|
34
46
|
align: {
|
|
35
47
|
"inline-start": {
|
|
36
48
|
addon: string;
|
|
@@ -55,6 +67,12 @@ declare const inputGroup: import("tailwind-variants/lite").TVReturnType<{
|
|
|
55
67
|
textInner: string[];
|
|
56
68
|
control: string[];
|
|
57
69
|
}, import("tailwind-variants/lite").TVReturnTypeLike<{
|
|
70
|
+
size: {
|
|
71
|
+
md: {
|
|
72
|
+
root: string[];
|
|
73
|
+
};
|
|
74
|
+
lg: {};
|
|
75
|
+
};
|
|
58
76
|
align: {
|
|
59
77
|
"inline-start": {
|
|
60
78
|
addon: string;
|
|
@@ -79,8 +97,16 @@ declare const inputGroup: import("tailwind-variants/lite").TVReturnType<{
|
|
|
79
97
|
textInner: string[];
|
|
80
98
|
control: string[];
|
|
81
99
|
}>>;
|
|
82
|
-
export type InputGroupProps = ComponentPropsWithRef<"div"
|
|
83
|
-
|
|
100
|
+
export type InputGroupProps = ComponentPropsWithRef<"div"> & {
|
|
101
|
+
/**
|
|
102
|
+
* `lg` (default): the control height, for a field on its own in a form or a
|
|
103
|
+
* dialog. `md`: a field in a toolbar or a filter row, as high as the row's
|
|
104
|
+
* `md` buttons and filter triggers (32px by touch, with a 44px tap area; the
|
|
105
|
+
* control height with a mouse).
|
|
106
|
+
*/
|
|
107
|
+
size?: "md" | "lg";
|
|
108
|
+
};
|
|
109
|
+
export declare function InputGroup({ size, className, ...props }: InputGroupProps): import("react").JSX.Element;
|
|
84
110
|
export type InputGroupAddonProps = ComponentPropsWithRef<"div"> & Pick<VariantProps<typeof inputGroup>, "align" | "variant">;
|
|
85
111
|
declare function InputGroupAddonRoot({ align, variant, className, ...props }: InputGroupAddonProps): import("react").JSX.Element;
|
|
86
112
|
export type InputGroupAddonTextProps = ComponentPropsWithRef<"span"> & Pick<VariantProps<typeof inputGroup>, "align" | "variant">;
|
|
@@ -37,6 +37,18 @@ const inputGroup = tv({
|
|
|
37
37
|
]
|
|
38
38
|
},
|
|
39
39
|
variants: {
|
|
40
|
+
size: {
|
|
41
|
+
md: { root: [
|
|
42
|
+
"h-8 md:pointer-fine:h-control rounded-control overflow-visible",
|
|
43
|
+
"[--ig-hit:calc(--spacing(1.5)+1.5px)] md:pointer-fine:[--ig-hit:0px]",
|
|
44
|
+
"*:data-[slot=input-group-control]:-my-(--ig-hit) *:data-[slot=input-group-control]:h-[calc(100%+2*var(--ig-hit))]",
|
|
45
|
+
"[--control-embedded-size:calc(2rem-2*var(--control-embedded-inset))]",
|
|
46
|
+
"md:pointer-fine:[--control-embedded-size:calc(var(--control-height)-2*var(--control-embedded-inset))]",
|
|
47
|
+
"*:data-[variant=container]:data-[align=inline-start]:rounded-s-[calc(var(--radius-control)-1.5px)]",
|
|
48
|
+
"*:data-[variant=container]:data-[align=inline-end]:rounded-e-[calc(var(--radius-control)-1.5px)]"
|
|
49
|
+
] },
|
|
50
|
+
lg: {}
|
|
51
|
+
},
|
|
40
52
|
align: {
|
|
41
53
|
"inline-start": {
|
|
42
54
|
addon: "order-first",
|
|
@@ -111,14 +123,16 @@ const inputGroup = tv({
|
|
|
111
123
|
}
|
|
112
124
|
],
|
|
113
125
|
defaultVariants: {
|
|
126
|
+
size: "lg",
|
|
114
127
|
align: "inline-start",
|
|
115
128
|
variant: "default"
|
|
116
129
|
}
|
|
117
130
|
});
|
|
118
|
-
function InputGroup({ className, ...props }) {
|
|
119
|
-
const { root } = inputGroup();
|
|
131
|
+
function InputGroup({ size = "lg", className, ...props }) {
|
|
132
|
+
const { root } = inputGroup({ size });
|
|
120
133
|
return /* @__PURE__ */ jsx("div", {
|
|
121
134
|
"data-slot": "input-group",
|
|
135
|
+
"data-size": size,
|
|
122
136
|
className: root({ className }),
|
|
123
137
|
...props
|
|
124
138
|
});
|
|
@@ -5,6 +5,7 @@ import { Button } from "@base-ui/react/button";
|
|
|
5
5
|
//#region src/components/picker-trigger-button/picker-trigger-button.tsx
|
|
6
6
|
const pickerTriggerButton = tv({ base: [
|
|
7
7
|
"relative inline-flex h-8 md:pointer-fine:h-control shrink-0 items-center justify-center",
|
|
8
|
+
"after:absolute after:inset-x-0 after:-inset-y-1.5 md:pointer-fine:after:hidden",
|
|
8
9
|
"whitespace-nowrap select-none",
|
|
9
10
|
"outline-[1px] outline-offset-2 outline-transparent transition-colors duration-100 focus-visible:outline-transparent",
|
|
10
11
|
"disabled:pointer-events-none disabled:transform-none",
|
|
@@ -13,13 +13,14 @@ const segmentedControl = tv({
|
|
|
13
13
|
"inline-flex min-w-0 items-center",
|
|
14
14
|
"w-fit max-w-full flex-nowrap gap-[3px] rounded-[11px] bg-fill-muted p-[3px]",
|
|
15
15
|
"[--segment-size:2rem] md:pointer-fine:[--segment-size:var(--control-height)]",
|
|
16
|
-
"data-overflowing:overflow-x-auto data-overflowing:overscroll-x-contain data-overflowing:scrollbar-none"
|
|
16
|
+
"data-overflowing:overflow-x-auto data-overflowing:overflow-y-hidden data-overflowing:overscroll-x-contain data-overflowing:scrollbar-none"
|
|
17
17
|
],
|
|
18
18
|
item: [
|
|
19
19
|
"inline-flex min-w-0 shrink-0 items-center gap-1.5",
|
|
20
20
|
"outline-none disabled:pointer-events-none",
|
|
21
21
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
22
22
|
"h-(--segment-size) justify-center rounded-control border-[1.5px] border-transparent bg-transparent px-3",
|
|
23
|
+
"relative after:absolute after:inset-x-0 after:-inset-y-[calc(--spacing(1.5)+1.5px)] md:pointer-fine:after:hidden",
|
|
23
24
|
"font-sans text-callout font-semibold text-foreground-muted",
|
|
24
25
|
"[&_svg:not([class*='size-'])]:size-4",
|
|
25
26
|
"hover:bg-fill-medium active:bg-fill-medium",
|