@botiverse/raft-ui 0.63.1 → 0.65.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 +51 -0
- package/dist/components/activity-inbox/activity-inbox-sidebar.recipe.mjs +1 -1
- package/dist/components/activity-inbox/activity-inbox-toolbar.recipe.mjs +6 -1
- package/dist/components/alert-dialog/alert-dialog.mjs +3 -3
- package/dist/components/announcement-dialog/announcement-dialog.mjs +2 -2
- package/dist/components/app-link-card/app-link-card.d.mts +56 -0
- package/dist/components/app-link-card/app-link-card.mjs +207 -0
- package/dist/components/app-link-card/index.d.mts +2 -0
- package/dist/components/app-rail/app-rail.recipe.mjs +12 -7
- package/dist/components/app-shell/app-shell.mjs +1 -1
- package/dist/components/avatar/avatar.mjs +1 -0
- package/dist/components/badge/badge.mjs +6 -1
- package/dist/components/banner/banner.mjs +1 -1
- package/dist/components/button/button-split.d.mts +38 -0
- package/dist/components/button/button-split.mjs +126 -0
- package/dist/components/button/button.mjs +13 -8
- package/dist/components/button/index.d.mts +2 -1
- package/dist/components/code-block/code-block.recipe.mjs +1 -1
- package/dist/components/combobox/combobox.mjs +4 -4
- package/dist/components/combobox-select/combobox-select.css +6 -3
- package/dist/components/comment/comment-margin.mjs +2 -1
- package/dist/components/composer/composer-suggestion-list.mjs +1 -1
- package/dist/components/composer/composer-toolbar-label.mjs +1 -1
- package/dist/components/composer/composer.mjs +1 -1
- package/dist/components/composer/composer.recipe.mjs +38 -26
- package/dist/components/conversation-panel/conversation-panel-empty-state.mjs +1 -1
- package/dist/components/conversation-panel/conversation-panel.recipe.mjs +3 -2
- package/dist/components/dialog/dialog-sheet-context.mjs +1 -1
- package/dist/components/dialog/dialog.mjs +7 -7
- package/dist/components/drawer/drawer.mjs +3 -2
- package/dist/components/drawer/drawer.recipe.mjs +5 -3
- package/dist/components/empty-state/empty-state.mjs +1 -1
- package/dist/components/field/field.mjs +1 -1
- package/dist/components/files/files.recipe.mjs +1 -1
- package/dist/components/filter-chip/filter-chip.mjs +1 -1
- package/dist/components/form-section/form-section.mjs +1 -1
- package/dist/components/icon-tile/icon-tile.mjs +3 -3
- package/dist/components/inbox-item/inbox-item.recipe.mjs +4 -2
- package/dist/components/input/input.recipe.mjs +1 -1
- package/dist/components/input-group/input-group.mjs +1 -1
- package/dist/components/lightbox/lightbox.mjs +1 -1
- package/dist/components/list-row/list-row.recipe.mjs +2 -2
- package/dist/components/message-action-card/message-action-card-content.recipe.mjs +1 -1
- package/dist/components/message-action-card/message-action-card.recipe.mjs +1 -1
- package/dist/components/message-item/index.d.mts +2 -2
- package/dist/components/message-item/message-item-content.d.mts +14 -0
- package/dist/components/message-item/message-item-content.mjs +146 -1
- package/dist/components/message-item/message-item.recipe.d.mts +3 -0
- package/dist/components/message-item/message-item.recipe.mjs +3 -2
- package/dist/components/message-item/message-reaction.recipe.mjs +4 -3
- package/dist/components/message-list/message-list.recipe.mjs +3 -1
- package/dist/components/mode-bar/mode-bar.mjs +1 -1
- package/dist/components/notification-center/notification-center.mjs +1 -1
- package/dist/components/panel/panel-action.recipe.mjs +5 -5
- package/dist/components/panel/panel-header.recipe.mjs +10 -9
- package/dist/components/panel/panel.recipe.mjs +2 -2
- package/dist/components/picker-trigger-button/picker-trigger-button.mjs +1 -1
- package/dist/components/profile-panel/profile-panel.recipe.mjs +1 -1
- package/dist/components/scroll-area/scroll-area.css +74 -33
- package/dist/components/search/search-entity.recipe.mjs +3 -2
- package/dist/components/search/search-message.recipe.mjs +1 -0
- package/dist/components/search/search-thread.recipe.mjs +1 -1
- package/dist/components/search/search-trigger.mjs +1 -1
- package/dist/components/search/search.recipe.mjs +7 -3
- package/dist/components/segmented-control/segmented-control.mjs +9 -8
- package/dist/components/select/select.mjs +2 -2
- package/dist/components/sidebar/sidebar-item.recipe.mjs +5 -4
- package/dist/components/sidebar/sidebar-section.recipe.mjs +5 -2
- package/dist/components/sidebar/sidebar.recipe.mjs +3 -3
- package/dist/components/switch/switch.mjs +3 -3
- package/dist/components/tabs/tabs.mjs +1 -1
- package/dist/components/task-board/task-board-column.recipe.mjs +1 -1
- package/dist/components/task-list/task-list-section.recipe.mjs +1 -1
- package/dist/components/tasks/tasks-panel.recipe.mjs +4 -3
- package/dist/components/text-selection-toolbar/text-selection-toolbar.recipe.mjs +1 -1
- package/dist/components/textarea/textarea.mjs +1 -1
- package/dist/components/thread-panel/thread-panel.recipe.mjs +3 -3
- package/dist/components/toggle-group/toggle-group.mjs +1 -1
- package/dist/foundation.css +100 -5
- package/dist/lib/head-edges.mjs +38 -8
- package/dist/lib/list-cell.mjs +1 -0
- package/dist/styles.css +54 -7
- package/dist/tokens.json +260 -4
- package/dist/wip.d.mts +6 -1
- package/dist/wip.mjs +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { tv } from "../../lib/tv.mjs";
|
|
2
|
+
import { Button } from "./button.mjs";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { createContext, useCallback, useContext, useLayoutEffect, useMemo, useState } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/button/button-split.tsx
|
|
7
|
+
const buttonSplit = tv({ base: [
|
|
8
|
+
"relative isolate inline-flex shrink-0 items-stretch",
|
|
9
|
+
"rounded-control ring-sticker-edge",
|
|
10
|
+
"data-sticker-edge:ring-[1.5px]",
|
|
11
|
+
"data-[size=lg]:rounded-(--control-radius)"
|
|
12
|
+
] });
|
|
13
|
+
const buttonSplitMain = tv({ base: ["rounded-e-none border-e-0", "ring-0 focus-visible:z-1"] });
|
|
14
|
+
const buttonSplitMenu = tv({
|
|
15
|
+
base: [
|
|
16
|
+
"min-w-0 rounded-s-none px-0",
|
|
17
|
+
"ring-0 focus-visible:z-1",
|
|
18
|
+
"after:inset-s-0"
|
|
19
|
+
],
|
|
20
|
+
variants: {
|
|
21
|
+
variant: {
|
|
22
|
+
primary: "data-popup-open:overlay-sticker-medium",
|
|
23
|
+
warning: "data-popup-open:overlay-sticker-medium",
|
|
24
|
+
danger: "data-popup-open:overlay-sticker-medium",
|
|
25
|
+
default: "data-popup-open:overlay-medium"
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
md: ["w-7", "after:-inset-e-[calc(--spacing(4)+1.5px)]"],
|
|
29
|
+
lg: ["w-9 md:pointer-fine:w-7", "after:-inset-e-[calc(--spacing(2)+1.5px)] md:pointer-fine:after:-inset-e-[calc(--spacing(4)+1.5px)]"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: "default",
|
|
34
|
+
size: "md"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const STICKERS = /* @__PURE__ */ new Set([
|
|
38
|
+
"primary",
|
|
39
|
+
"warning",
|
|
40
|
+
"danger"
|
|
41
|
+
]);
|
|
42
|
+
const ButtonSplitContext = createContext({
|
|
43
|
+
disabled: false,
|
|
44
|
+
registerStickerPart: () => () => {},
|
|
45
|
+
setSize: () => {}
|
|
46
|
+
});
|
|
47
|
+
/** An enabled sticker part asks its group to draw the die-cut edge while it is mounted. */
|
|
48
|
+
function useStickerEdge(active) {
|
|
49
|
+
const { registerStickerPart } = useContext(ButtonSplitContext);
|
|
50
|
+
useLayoutEffect(() => active ? registerStickerPart() : void 0, [active, registerStickerPart]);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A Button with a menu beside it, such as Create agent and its ▾: a
|
|
54
|
+
* `ButtonSplitMain`, then a `ButtonSplitMenu` as the trigger of a DropdownMenu.
|
|
55
|
+
* The two parts touch and read as one button. A `role="group"`: name it with
|
|
56
|
+
* `aria-label`, not with the main part's name. For a frameless split in a
|
|
57
|
+
* panel header, use `PanelSplitAction`.
|
|
58
|
+
*/
|
|
59
|
+
function ButtonSplit({ disabled = false, className, ...props }) {
|
|
60
|
+
const [stickerParts, setStickerParts] = useState(0);
|
|
61
|
+
const registerStickerPart = useCallback(() => {
|
|
62
|
+
setStickerParts((count) => count + 1);
|
|
63
|
+
return () => setStickerParts((count) => count - 1);
|
|
64
|
+
}, []);
|
|
65
|
+
const [size, setSize] = useState("md");
|
|
66
|
+
const context = useMemo(() => ({
|
|
67
|
+
disabled,
|
|
68
|
+
registerStickerPart,
|
|
69
|
+
setSize
|
|
70
|
+
}), [disabled, registerStickerPart]);
|
|
71
|
+
return /* @__PURE__ */ jsx(ButtonSplitContext.Provider, {
|
|
72
|
+
value: context,
|
|
73
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
74
|
+
role: "group",
|
|
75
|
+
...props,
|
|
76
|
+
"data-slot": "button-split",
|
|
77
|
+
"data-sticker-edge": stickerParts > 0 ? "" : void 0,
|
|
78
|
+
"data-size": size,
|
|
79
|
+
className: buttonSplit({ className })
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** The action of a split button: a Button, rounded only on its start side. */
|
|
84
|
+
function ButtonSplitMain({ variant = "default", size = "md", disabled, className, ...props }) {
|
|
85
|
+
const group = useContext(ButtonSplitContext);
|
|
86
|
+
const isDisabled = disabled || group.disabled;
|
|
87
|
+
useStickerEdge(STICKERS.has(variant) && !isDisabled && !props.loading);
|
|
88
|
+
const { setSize } = group;
|
|
89
|
+
useLayoutEffect(() => setSize(size), [setSize, size]);
|
|
90
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
91
|
+
...props,
|
|
92
|
+
variant,
|
|
93
|
+
size,
|
|
94
|
+
disabled: isDisabled,
|
|
95
|
+
"data-split-part": "main",
|
|
96
|
+
"data-split-sticker": STICKERS.has(variant) ? "" : void 0,
|
|
97
|
+
className: buttonSplitMain({ className })
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The narrow part of a split button that opens its menu, with a chevron by
|
|
102
|
+
* default; its start border is the divider. Render it as the trigger of a
|
|
103
|
+
* DropdownMenu:
|
|
104
|
+
* `<DropdownMenuTrigger render={<ButtonSplitMenu aria-label="More ways to create an agent" />} />`.
|
|
105
|
+
*/
|
|
106
|
+
function ButtonSplitMenu({ variant = "default", size = "md", disabled, className, children, ...props }) {
|
|
107
|
+
const group = useContext(ButtonSplitContext);
|
|
108
|
+
const isDisabled = disabled || group.disabled;
|
|
109
|
+
useStickerEdge(STICKERS.has(variant) && !isDisabled && !props.loading);
|
|
110
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
111
|
+
...props,
|
|
112
|
+
variant,
|
|
113
|
+
size,
|
|
114
|
+
disabled: isDisabled,
|
|
115
|
+
"data-split-part": "menu",
|
|
116
|
+
"data-split-sticker": STICKERS.has(variant) ? "" : void 0,
|
|
117
|
+
className: buttonSplitMenu({
|
|
118
|
+
variant,
|
|
119
|
+
size,
|
|
120
|
+
className
|
|
121
|
+
}),
|
|
122
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": true })
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
export { ButtonSplit, ButtonSplitMain, ButtonSplitMenu, buttonSplit, buttonSplitMain, buttonSplitMenu };
|
|
@@ -8,12 +8,17 @@ import { Button } from "@base-ui/react/button";
|
|
|
8
8
|
const sticker = (fill) => [`border-sticker-ink ${fill} text-sticker-ink ring-[1.5px] ring-sticker-edge`, "hover:overlay-sticker-medium active:overlay-sticker-medium"];
|
|
9
9
|
const outline = (ink) => [`border-line-strong bg-layer-card ${ink}`, "hover:overlay-medium active:overlay-medium"];
|
|
10
10
|
const textMd = [
|
|
11
|
-
"h-8 gap-2 rounded-control px-3 py-0 text-control",
|
|
11
|
+
"h-8 md:pointer-fine:h-control gap-2 rounded-control px-3 py-0 text-control",
|
|
12
12
|
"has-data-[icon=inline-start]:pl-2.5 has-data-[icon=inline-end]:pr-2.5",
|
|
13
13
|
"[&_svg:not([class*='size-'])]:size-4 **:data-icon:size-[1em]",
|
|
14
|
-
"after:absolute after:inset-x-0 after:-inset-y-[calc(--spacing(1.5)+1.5px)]"
|
|
14
|
+
"after:absolute after:inset-x-0 after:-inset-y-[calc(--spacing(1.5)+1.5px)]",
|
|
15
|
+
"md:pointer-fine:after:-inset-y-[calc(var(--control-hit-inset)+1.5px)]"
|
|
16
|
+
];
|
|
17
|
+
const iconMd = [
|
|
18
|
+
"size-8 md:pointer-fine:size-control rounded-control p-0 [&_svg:not([class*='size-'])]:size-[18px]",
|
|
19
|
+
"after:absolute after:-inset-[calc(--spacing(1.5)+1.5px)]",
|
|
20
|
+
"md:pointer-fine:after:-inset-[calc(var(--control-hit-inset)+1.5px)]"
|
|
15
21
|
];
|
|
16
|
-
const iconMd = ["size-8 rounded-control p-0 [&_svg:not([class*='size-'])]:size-[18px]", "after:absolute after:-inset-[calc(--spacing(1.5)+1.5px)]"];
|
|
17
22
|
const buttonVariants = tv({
|
|
18
23
|
slots: {
|
|
19
24
|
root: [
|
|
@@ -63,7 +68,7 @@ const buttonVariants = tv({
|
|
|
63
68
|
sm: { root: textMd },
|
|
64
69
|
md: { root: textMd },
|
|
65
70
|
lg: { root: [
|
|
66
|
-
"h-control gap-2 rounded-control px-4 py-0 text-subhead",
|
|
71
|
+
"h-control gap-2 rounded-(--control-radius) px-4 py-0 text-subhead",
|
|
67
72
|
"has-data-[icon=inline-start]:pl-3.5 has-data-[icon=inline-end]:pr-3.5",
|
|
68
73
|
"[&_svg:not([class*='size-'])]:size-[18px] **:data-icon:size-[1em]",
|
|
69
74
|
"after:absolute after:inset-x-0 after:-inset-y-[calc(var(--spacing-control-hit)+1.5px)]"
|
|
@@ -72,7 +77,7 @@ const buttonVariants = tv({
|
|
|
72
77
|
"icon-xs": { root: iconMd },
|
|
73
78
|
"icon-sm": { root: iconMd },
|
|
74
79
|
"icon-md": { root: iconMd },
|
|
75
|
-
"icon-lg": { root: ["size-control rounded-control p-0 [&_svg:not([class*='size-'])]:size-control-icon", "after:absolute after:-inset-[calc(var(--spacing-control-hit)+1.5px)]"] }
|
|
80
|
+
"icon-lg": { root: ["size-control rounded-(--control-radius) p-0 [&_svg:not([class*='size-'])]:size-control-icon", "after:absolute after:-inset-[calc(var(--spacing-control-hit)+1.5px)]"] }
|
|
76
81
|
}
|
|
77
82
|
},
|
|
78
83
|
defaultVariants: {
|
|
@@ -117,7 +122,7 @@ const buttonVariants = tv({
|
|
|
117
122
|
"icon-sm",
|
|
118
123
|
"icon-md"
|
|
119
124
|
],
|
|
120
|
-
class: { root: "[--icon-inset:calc((--spacing(8)-18px)/2)]" }
|
|
125
|
+
class: { root: "[--icon-inset:calc((--spacing(8)-18px)/2)] md:pointer-fine:[--icon-inset:calc((var(--control-height)-18px)/2)]" }
|
|
121
126
|
},
|
|
122
127
|
{
|
|
123
128
|
variant: "on-frame",
|
|
@@ -126,7 +131,7 @@ const buttonVariants = tv({
|
|
|
126
131
|
"sm",
|
|
127
132
|
"md"
|
|
128
133
|
],
|
|
129
|
-
class: { root: "h-
|
|
134
|
+
class: { root: "h-(--frame-item-height) px-2.5 text-subhead after:-inset-y-[calc((44px-var(--frame-item-height))/2+1.5px)]" }
|
|
130
135
|
},
|
|
131
136
|
{
|
|
132
137
|
variant: "on-frame",
|
|
@@ -135,7 +140,7 @@ const buttonVariants = tv({
|
|
|
135
140
|
"icon-sm",
|
|
136
141
|
"icon-md"
|
|
137
142
|
],
|
|
138
|
-
class: { root: ["size-
|
|
143
|
+
class: { root: ["size-(--frame-item-height) after:-inset-[calc((44px-var(--frame-item-height))/2+1.5px)] [&_svg:not([class*='size-'])]:size-5", "[--icon-inset:calc((var(--frame-item-height)-20px)/2)]"] }
|
|
139
144
|
}
|
|
140
145
|
]
|
|
141
146
|
});
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { Button, ButtonProps, ButtonSize, DeprecatedButtonSize, buttonVariants } from "./button.mjs";
|
|
2
|
-
|
|
2
|
+
import { ButtonSplit, ButtonSplitMain, ButtonSplitMainProps, ButtonSplitMenu, ButtonSplitMenuProps, ButtonSplitProps, ButtonSplitSize, ButtonSplitVariant } from "./button-split.mjs";
|
|
3
|
+
export { Button, type ButtonProps, type ButtonSize, ButtonSplit, ButtonSplitMain, type ButtonSplitMainProps, ButtonSplitMenu, type ButtonSplitMenuProps, type ButtonSplitProps, type ButtonSplitSize, type ButtonSplitVariant, type DeprecatedButtonSize, buttonVariants };
|
|
@@ -37,7 +37,7 @@ const codeBlock = tv({ slots: {
|
|
|
37
37
|
"inline-flex shrink-0 items-center justify-center",
|
|
38
38
|
"transition-[color,background-color,opacity]",
|
|
39
39
|
"focus-visible:outline-none",
|
|
40
|
-
"size-8 rounded-chip text-foreground",
|
|
40
|
+
"size-8 rounded-chip md:pointer-fine:size-control md:pointer-fine:rounded-control text-foreground",
|
|
41
41
|
"hover:bg-fill-medium active:bg-fill-medium",
|
|
42
42
|
"focus-visible:ring-0 focus-visible:shadow-focus",
|
|
43
43
|
"[&_svg:not([class*='size-'])]:size-4.5"
|
|
@@ -17,7 +17,7 @@ const combobox = tv({
|
|
|
17
17
|
"**:data-[slot='button-content']:w-full **:data-[slot='button-content']:justify-between",
|
|
18
18
|
"[&>span[data-slot='combobox-trigger-content']]:min-w-0 [&>span[data-slot='combobox-trigger-content']]:flex-1",
|
|
19
19
|
"[&>span[data-slot='combobox-trigger-content']>svg]:shrink-0",
|
|
20
|
-
"h-8 gap-1.5 rounded-control border-transparent bg-transparent px-2.5",
|
|
20
|
+
"h-8 md:pointer-fine:h-control gap-1.5 rounded-control border-transparent bg-transparent px-2.5",
|
|
21
21
|
"text-control font-semibold text-foreground-muted",
|
|
22
22
|
"inset-ring inset-ring-line-seam hover:bg-transparent",
|
|
23
23
|
"data-has-value:bg-info-soft data-has-value:text-foreground data-has-value:inset-ring-0 data-has-value:hover:bg-info-soft",
|
|
@@ -42,7 +42,7 @@ const combobox = tv({
|
|
|
42
42
|
"[&>[data-slot=combobox-clear]:last-child]:me-[calc(var(--control-embedded-inset)-0.75rem-1px)]",
|
|
43
43
|
"[&_[data-slot='combobox-trigger-indicator']]:size-4",
|
|
44
44
|
"[&_[data-slot='combobox-trigger-indicator']>svg]:shrink-0",
|
|
45
|
-
"min-h-control rounded-control border-[1.5px] border-line-field bg-layer-card px-3 py-0",
|
|
45
|
+
"min-h-control rounded-(--control-radius) border-[1.5px] border-line-field bg-layer-card px-3 py-0",
|
|
46
46
|
"font-sans text-body text-foreground",
|
|
47
47
|
"transition-shadow duration-90 ease-out has-focus-visible:shadow-focus",
|
|
48
48
|
"[&>svg]:text-foreground-hint [&>svg:not([class*='size-'])]:size-4.5",
|
|
@@ -51,7 +51,7 @@ const combobox = tv({
|
|
|
51
51
|
],
|
|
52
52
|
inputGroup: [
|
|
53
53
|
"flex items-center border-b",
|
|
54
|
-
"h-10 gap-2 border-line-hairline bg-transparent px-3 py-0",
|
|
54
|
+
"h-10 md:pointer-fine:h-control gap-2 border-line-hairline bg-transparent px-3 py-0",
|
|
55
55
|
"text-callout text-foreground-hint",
|
|
56
56
|
"[&>svg]:size-4 [&>svg]:shrink-0",
|
|
57
57
|
"first:rounded-t-container has-focus-visible:keyboard:inset-ring-2 has-focus-visible:keyboard:inset-ring-foreground"
|
|
@@ -96,7 +96,7 @@ const combobox = tv({
|
|
|
96
96
|
groupLabel: ["py-2", "px-2.5 pt-2 pb-1 text-caption font-bold text-foreground-hint"],
|
|
97
97
|
chips: [
|
|
98
98
|
"flex flex-wrap items-center",
|
|
99
|
-
"min-h-control gap-1.5 rounded-control border-[1.5px] border-line-field bg-layer-card py-[calc(var(--control-embedded-inset)-1.5px)] pr-3 pl-[calc(var(--control-embedded-inset)-1px)]",
|
|
99
|
+
"min-h-control gap-1.5 rounded-(--control-radius) border-[1.5px] border-line-field bg-layer-card py-[calc(var(--control-embedded-inset)-1.5px)] pr-3 pl-[calc(var(--control-embedded-inset)-1px)]",
|
|
100
100
|
"*:data-[slot=combobox-input]:h-control-embedded",
|
|
101
101
|
"transition-shadow duration-90 ease-out has-focus-visible:shadow-focus"
|
|
102
102
|
],
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
gap: var(--control-embedded-inset);
|
|
21
21
|
padding: 0 calc(var(--control-embedded-inset) - 1px) 0 12px;
|
|
22
22
|
border: 1.5px solid var(--line-field);
|
|
23
|
-
border-radius: var(--radius
|
|
23
|
+
border-radius: var(--control-radius);
|
|
24
24
|
outline: 0;
|
|
25
25
|
background: var(--layer-card);
|
|
26
26
|
color: var(--foreground);
|
|
@@ -194,8 +194,8 @@
|
|
|
194
194
|
width: 100%;
|
|
195
195
|
/* The option inset (styles.css, --spacing-option-inset): one line is 36px,
|
|
196
196
|
and a second line adds only its own height (forms.md#option-height). */
|
|
197
|
-
min-height:
|
|
198
|
-
padding: calc((
|
|
197
|
+
min-height: var(--option-height);
|
|
198
|
+
padding: calc((var(--option-height) - 1lh) / 2) 10px;
|
|
199
199
|
display: flex;
|
|
200
200
|
align-items: center;
|
|
201
201
|
justify-content: space-between;
|
|
@@ -277,6 +277,9 @@
|
|
|
277
277
|
}
|
|
278
278
|
.r-combobox-select--sm.r-combobox-select__control {
|
|
279
279
|
--control-height: 1.75rem;
|
|
280
|
+
/* A 28px field keeps the 32px control's corner on every input: the root's
|
|
281
|
+
control-radius (10 on a touch screen) belongs to 44px fields. */
|
|
282
|
+
--control-radius: var(--radius-control);
|
|
280
283
|
--control-embedded-inset: 3px;
|
|
281
284
|
--control-embedded-size: 22px;
|
|
282
285
|
font-size: var(--text-control);
|
|
@@ -51,6 +51,8 @@ function CommentMargin({ className, render, style, gap = 8, ...props }) {
|
|
|
51
51
|
}, []);
|
|
52
52
|
const place = useCallback((id, placement) => patch(id, placement), [patch]);
|
|
53
53
|
const observe = useCallback((id, element) => {
|
|
54
|
+
patch(id, { height: heightOf(element) });
|
|
55
|
+
if (typeof ResizeObserver === "undefined") return () => {};
|
|
54
56
|
observer.current ??= new ResizeObserver((records) => {
|
|
55
57
|
for (const record of records) {
|
|
56
58
|
const target = observed.current.get(record.target);
|
|
@@ -58,7 +60,6 @@ function CommentMargin({ className, render, style, gap = 8, ...props }) {
|
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
observed.current.set(element, id);
|
|
61
|
-
patch(id, { height: heightOf(element) });
|
|
62
63
|
observer.current.observe(element);
|
|
63
64
|
return () => {
|
|
64
65
|
observer.current?.unobserve(element);
|
|
@@ -13,7 +13,7 @@ const composerSuggestionList = tv({
|
|
|
13
13
|
groupLabel: ["py-1.5", "px-2.5 pt-2 pb-1 font-sans text-caption font-bold text-foreground-hint"],
|
|
14
14
|
item: [
|
|
15
15
|
"flex w-full items-center text-left",
|
|
16
|
-
"min-h-
|
|
16
|
+
"min-h-option cursor-pointer gap-2.5 rounded-chip px-2.5 py-1",
|
|
17
17
|
"font-sans text-callout font-medium text-foreground",
|
|
18
18
|
"hover:bg-brand-soft data-[highlighted=true]:bg-brand-soft",
|
|
19
19
|
"data-[disabled=true]:cursor-default data-[disabled=true]:text-foreground-disabled",
|
|
@@ -4,7 +4,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
4
4
|
//#region src/components/composer/composer-toolbar-label.tsx
|
|
5
5
|
const composerToolbarLabel = tv({ slots: { root: [
|
|
6
6
|
"inline-flex cursor-pointer select-none items-center",
|
|
7
|
-
"min-h-8 gap-2",
|
|
7
|
+
"min-h-8 md:pointer-fine:min-h-(--bar-button-size) gap-2",
|
|
8
8
|
"font-sans text-callout font-semibold text-foreground",
|
|
9
9
|
"has-data-disabled:cursor-not-allowed has-data-disabled:text-foreground-disabled"
|
|
10
10
|
] } });
|
|
@@ -74,7 +74,7 @@ function ComposerIconButton({ className, ...props }) {
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
function ComposerSubmit({ type = "submit", className, ...props }) {
|
|
77
|
-
const { submit } = composer();
|
|
77
|
+
const { submit } = composer({ icon: props.size?.startsWith("icon") ?? false });
|
|
78
78
|
return /* @__PURE__ */ jsx(Button, {
|
|
79
79
|
...props,
|
|
80
80
|
className: submit({ className }),
|
|
@@ -1,30 +1,42 @@
|
|
|
1
|
+
import { barButtonDesktop } from "../../lib/head-edges.mjs";
|
|
1
2
|
import { tv } from "../../lib/tv.mjs";
|
|
2
3
|
//#region src/components/composer/composer.recipe.ts
|
|
3
|
-
const composer = tv({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
const composer = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: [
|
|
7
|
+
"flex w-full flex-col gap-2 p-2",
|
|
8
|
+
"rounded-container border-[1.5px] px-3 pt-3 pb-[calc(var(--control-embedded-inset)-1px)]",
|
|
9
|
+
"border-line-field bg-layer-card text-foreground shadow-none",
|
|
10
|
+
"has-focus-visible:shadow-focus"
|
|
11
|
+
],
|
|
12
|
+
inputFrame: ["w-full min-w-0", "[--r-scroll-area-resize-grip-size:0px]"],
|
|
13
|
+
input: [
|
|
14
|
+
"max-h-32 w-full resize-none bg-transparent outline-none",
|
|
15
|
+
"field-sizing-content overflow-y-auto",
|
|
16
|
+
"min-h-6 px-0.5",
|
|
17
|
+
"font-sans text-body font-normal text-foreground",
|
|
18
|
+
"placeholder:text-foreground-hint"
|
|
19
|
+
],
|
|
20
|
+
toolbar: [
|
|
21
|
+
"flex items-center justify-between",
|
|
22
|
+
"mx-[calc(var(--control-embedded-inset)-0.75rem-1px)] gap-embedded-inset",
|
|
23
|
+
"md:pointer-fine:mx-[calc((var(--control-icon-size)-var(--bar-button-size))/2)]"
|
|
24
|
+
],
|
|
25
|
+
actions: ["flex items-center gap-embedded-inset"],
|
|
26
|
+
meta: ["flex items-center", "gap-embedded-inset"],
|
|
27
|
+
iconButton: [
|
|
28
|
+
"size-8 rounded-chip text-foreground-muted",
|
|
29
|
+
barButtonDesktop,
|
|
30
|
+
"disabled:border-transparent disabled:bg-transparent",
|
|
31
|
+
"aria-disabled:border-transparent aria-disabled:bg-transparent",
|
|
32
|
+
"[&_svg:not([class*='size-'])]:size-4.5"
|
|
33
|
+
],
|
|
34
|
+
submit: ["rounded-chip"]
|
|
35
|
+
},
|
|
36
|
+
variants: { icon: {
|
|
37
|
+
true: { submit: barButtonDesktop },
|
|
38
|
+
false: {}
|
|
39
|
+
} }
|
|
40
|
+
});
|
|
29
41
|
//#endregion
|
|
30
42
|
export { composer };
|
|
@@ -6,7 +6,7 @@ const conversationPanelEmptyState = tv({ slots: {
|
|
|
6
6
|
root: [
|
|
7
7
|
"flex h-full min-h-0 min-w-0 flex-1 flex-col items-center justify-center",
|
|
8
8
|
"text-center",
|
|
9
|
-
"gap-2 px-
|
|
9
|
+
"gap-2 px-(--surface-inset) py-6",
|
|
10
10
|
"font-sans text-headline font-bold normal-case text-foreground-muted"
|
|
11
11
|
],
|
|
12
12
|
brand: ["shrink-0", "mb-1 inline-flex rounded-none p-0 text-foreground-hint"],
|
|
@@ -6,8 +6,9 @@ const conversationPanel = tv({ slots: {
|
|
|
6
6
|
tabs: [
|
|
7
7
|
"shrink-0",
|
|
8
8
|
"border-b border-line-seam bg-layer-canvas",
|
|
9
|
-
"*:data-[slot=tabs-list]:w-full *:data-[slot=tabs-list]:px-5 max-md:*:data-[slot=tabs-list]:px-4",
|
|
10
|
-
"*:data-[slot=tabs-list]:data-[variant=default]:py-2"
|
|
9
|
+
"*:data-[slot=tabs-list]:w-full *:data-[slot=tabs-list]:px-5 max-md:*:data-[slot=tabs-list]:px-4 md:pointer-fine:*:data-[slot=tabs-list]:px-(--page-inset)",
|
|
10
|
+
"*:data-[slot=tabs-list]:data-[variant=default]:py-2",
|
|
11
|
+
"md:pointer-fine:*:data-[slot=tabs-list]:data-[variant=default]:py-[calc((var(--header-height)-1px-var(--control-height))/2)]"
|
|
11
12
|
],
|
|
12
13
|
footer: ["pt-0", "bg-layer-canvas"]
|
|
13
14
|
} });
|
|
@@ -47,7 +47,7 @@ const dialogSheet = tv({ slots: {
|
|
|
47
47
|
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
48
48
|
"motion-reduce:transition-none"
|
|
49
49
|
],
|
|
50
|
-
header: ["flex h-
|
|
50
|
+
header: ["flex h-(--header-height) shrink-0 items-center gap-2 px-4 pt-0", "border-b border-line-seam"],
|
|
51
51
|
title: ["min-w-0 flex-1 truncate"],
|
|
52
52
|
commitSlot: ["flex shrink-0 items-center empty:hidden"],
|
|
53
53
|
body: ["min-h-0 content-start", "px-4 pt-4 first:pt-4 pb-[max(16px,env(safe-area-inset-bottom,0px))]"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../cn.mjs";
|
|
2
2
|
import { decisionWidth } from "../../lib/decision-width.mjs";
|
|
3
|
-
import { headEdgePull } from "../../lib/head-edges.mjs";
|
|
3
|
+
import { barButtonDesktop, headEdgePull } from "../../lib/head-edges.mjs";
|
|
4
4
|
import { stackedActions, useStackedActions } from "../../lib/stacked-actions.mjs";
|
|
5
5
|
import { tv } from "../../lib/tv.mjs";
|
|
6
6
|
import { useThemeScopeProps } from "../../lib/theme/theme-scope.mjs";
|
|
@@ -28,18 +28,18 @@ const dialog = tv({
|
|
|
28
28
|
],
|
|
29
29
|
header: [
|
|
30
30
|
"grid shrink-0 grid-cols-[minmax(0,1fr)_max-content] items-center min-w-0",
|
|
31
|
-
"gap-2 px-
|
|
31
|
+
"gap-2 px-(--surface-inset) pt-(--surface-inset)",
|
|
32
32
|
headEdgePull
|
|
33
33
|
],
|
|
34
34
|
body: [
|
|
35
35
|
"min-w-0 flex-1 overflow-y-auto",
|
|
36
|
-
"px-
|
|
36
|
+
"px-(--surface-inset) pt-1.5 pb-(--surface-inset) first:pt-(--surface-inset)",
|
|
37
37
|
"font-sans text-subhead text-foreground-muted"
|
|
38
38
|
],
|
|
39
39
|
footer: [
|
|
40
40
|
"flex shrink-0 items-center justify-end",
|
|
41
41
|
...stackedActions,
|
|
42
|
-
"gap-2 px-
|
|
42
|
+
"gap-2 px-(--surface-inset) pb-(--surface-inset) first:pt-(--surface-inset) [[data-slot=dialog-header]+&]:pt-(--surface-inset)",
|
|
43
43
|
"*:data-[slot=text-link]:text-footnote"
|
|
44
44
|
],
|
|
45
45
|
footerNote: ["m-0 md:me-2 md:flex-1", "text-start font-sans text-footnote text-pretty text-foreground-muted md:whitespace-nowrap"],
|
|
@@ -61,9 +61,9 @@ const dialog = tv({
|
|
|
61
61
|
bar: {
|
|
62
62
|
false: {},
|
|
63
63
|
true: {
|
|
64
|
-
header: ["flex h-
|
|
64
|
+
header: ["flex h-(--header-height) shrink-0 items-center gap-2 border-b px-(--surface-inset) py-0", "border-line-seam pt-0 [&>[data-slot=dialog-close]]:my-0"],
|
|
65
65
|
body: ["flex min-h-0 flex-1 overflow-hidden p-0", "px-0 pt-0 pb-0 first:pt-0 text-foreground"],
|
|
66
|
-
footer: ["shrink-0 border-t px-
|
|
66
|
+
footer: ["shrink-0 border-t px-(--surface-inset) py-3", "border-line-seam pt-3 pb-3 first:pt-3 [[data-slot=dialog-header]+&]:pt-3"]
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
layer: {
|
|
@@ -170,7 +170,7 @@ function DialogClose({ className, variant, size, children, render, "aria-label":
|
|
|
170
170
|
variant: variant ?? "ghost",
|
|
171
171
|
size: size ?? "icon-md",
|
|
172
172
|
"aria-label": ariaLabel ?? "Close",
|
|
173
|
-
className: cn("-my-1.5", className)
|
|
173
|
+
className: cn("-my-1.5", size ? void 0 : barButtonDesktop, className)
|
|
174
174
|
}),
|
|
175
175
|
...props,
|
|
176
176
|
children: children ?? /* @__PURE__ */ jsx(X, { className: "size-4.5" })
|
|
@@ -107,7 +107,7 @@ function DrawerContent({ className, children, portalProps, ...props }) {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
function DrawerClose({ className, variant, size, children, render, "aria-label": ariaLabel, ...props }) {
|
|
110
|
-
const { close, closeIcon } = drawer();
|
|
110
|
+
const { close, closeButton, closeIcon } = drawer();
|
|
111
111
|
if (render) return /* @__PURE__ */ jsx(Drawer.Close, {
|
|
112
112
|
"data-slot": "drawer-close",
|
|
113
113
|
className,
|
|
@@ -121,7 +121,8 @@ function DrawerClose({ className, variant, size, children, render, "aria-label":
|
|
|
121
121
|
render: /* @__PURE__ */ jsx(Button, {
|
|
122
122
|
variant: variant ?? "ghost",
|
|
123
123
|
size: size ?? "icon-lg",
|
|
124
|
-
"aria-label": ariaLabel ?? "Close"
|
|
124
|
+
"aria-label": ariaLabel ?? "Close",
|
|
125
|
+
className: size ? void 0 : closeButton()
|
|
125
126
|
}),
|
|
126
127
|
className: close({ className }),
|
|
127
128
|
...props,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { barButton } from "../../lib/head-edges.mjs";
|
|
1
2
|
import { tv } from "../../lib/tv.mjs";
|
|
2
3
|
import { panelHeadEdges } from "../panel/panel-header.recipe.mjs";
|
|
3
4
|
//#region src/components/drawer/drawer.recipe.ts
|
|
@@ -84,6 +85,7 @@ const drawer = tv({
|
|
|
84
85
|
"before:rounded-full before:bg-line-seam"
|
|
85
86
|
],
|
|
86
87
|
close: ["shrink-0"],
|
|
88
|
+
closeButton: [barButton],
|
|
87
89
|
closeIcon: ["size-control-icon"],
|
|
88
90
|
header: ["flex flex-col", "items-stretch gap-1 px-4 pt-4 pb-2 text-left"],
|
|
89
91
|
body: ["flex flex-1 flex-col", "items-stretch px-4 pt-2 pb-4 text-left"],
|
|
@@ -136,12 +138,12 @@ const drawer = tv({
|
|
|
136
138
|
"before:w-1 before:h-9"
|
|
137
139
|
],
|
|
138
140
|
header: [
|
|
139
|
-
"min-h-
|
|
141
|
+
"min-h-(--header-height) shrink-0 flex-row items-center justify-between gap-2 py-0 text-left",
|
|
140
142
|
"border-b border-line-seam",
|
|
141
143
|
panelHeadEdges
|
|
142
144
|
],
|
|
143
|
-
body: ["items-stretch text-left", "min-h-0 overflow-y-auto px-
|
|
144
|
-
footer: ["border-t border-line-seam px-
|
|
145
|
+
body: ["items-stretch text-left", "min-h-0 overflow-y-auto px-(--surface-inset) pt-(--page-top) pb-(--page-inset)"],
|
|
146
|
+
footer: ["border-t border-line-seam px-(--surface-inset) py-3"],
|
|
145
147
|
title: ["min-w-0 max-w-none flex-1 text-left"],
|
|
146
148
|
description: ["max-w-none text-left"],
|
|
147
149
|
actions: ["flex-row flex-wrap justify-end", "**:data-[slot=button]:w-auto"]
|
|
@@ -3,7 +3,7 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
//#region src/components/empty-state/empty-state.tsx
|
|
5
5
|
const emptyState = tv({ slots: {
|
|
6
|
-
root: ["flex w-full min-w-0 flex-col items-center justify-center px-6 py-12 text-center"],
|
|
6
|
+
root: ["flex w-full min-w-0 flex-col items-center justify-center px-6 md:pointer-fine:px-(--page-inset) py-12 text-center"],
|
|
7
7
|
content: [
|
|
8
8
|
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2 text-center",
|
|
9
9
|
"[&>[data-slot=empty-state-icon]]:mb-0",
|
|
@@ -11,7 +11,7 @@ const field = tv({
|
|
|
11
11
|
"*:min-w-0",
|
|
12
12
|
"*:data-[slot=checkbox]:mt-[calc((1lh-1.25rem)/2)]",
|
|
13
13
|
"*:data-[slot=radio-group-item]:mt-[calc((1lh-1.25rem)/2)]",
|
|
14
|
-
"*:data-[slot=switch]:mt-[calc((1lh-
|
|
14
|
+
"*:data-[slot=switch]:mt-[calc((1lh-var(--switch-height))/2)]"
|
|
15
15
|
],
|
|
16
16
|
label: [
|
|
17
17
|
"block wrap-anywhere",
|
|
@@ -3,7 +3,7 @@ import { tv } from "../../lib/tv.mjs";
|
|
|
3
3
|
const files = tv({ slots: {
|
|
4
4
|
panel: ["flex min-h-0 flex-1 flex-col", "bg-layer-canvas text-foreground"],
|
|
5
5
|
viewport: ["min-h-0 flex-1 overflow-y-auto"],
|
|
6
|
-
list: ["flex flex-col gap-2 px-
|
|
6
|
+
list: ["flex flex-col gap-2 px-(--surface-inset) py-3", "max-md:px-4"],
|
|
7
7
|
row: [
|
|
8
8
|
"group/file-row flex w-full min-w-0 gap-3 px-3",
|
|
9
9
|
"transition-colors",
|
|
@@ -7,7 +7,7 @@ import { Button } from "@base-ui/react/button";
|
|
|
7
7
|
//#region src/components/filter-chip/filter-chip.tsx
|
|
8
8
|
const filterChip = tv({ slots: {
|
|
9
9
|
root: [
|
|
10
|
-
"inline-flex h-8 min-w-0 shrink items-center",
|
|
10
|
+
"inline-flex h-8 md:pointer-fine:h-control min-w-0 shrink items-center",
|
|
11
11
|
"gap-1.5 rounded-control bg-info-soft pr-1 pl-2.5",
|
|
12
12
|
"font-sans text-control font-semibold text-foreground",
|
|
13
13
|
"[&>svg]:pointer-events-none [&>svg]:shrink-0",
|
|
@@ -5,7 +5,7 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
//#region src/components/form-section/form-section.tsx
|
|
7
7
|
const formSection = tv({ slots: {
|
|
8
|
-
root: ["flex flex-col gap-
|
|
8
|
+
root: ["flex flex-col gap-(--field-gap) py-[calc(var(--section-gap)/2)] first:pt-0", "[[data-slot=form-section]+&]:border-t [[data-slot=form-section]+&]:border-line-hairline"],
|
|
9
9
|
head: ["flex min-w-0 flex-col", "gap-0.5"],
|
|
10
10
|
titleRow: ["flex min-w-0 items-center gap-2"],
|
|
11
11
|
title: ["m-0 min-w-0 flex-1", "font-sans text-footnote font-bold text-foreground-muted"],
|
|
@@ -12,9 +12,9 @@ const iconTile = tv({
|
|
|
12
12
|
},
|
|
13
13
|
size: {
|
|
14
14
|
xs: { root: "size-[19px] [&_svg:not([class*='size-'])]:size-[11px]" },
|
|
15
|
-
sm: { root: "size-[27px] [&_svg:not([class*='size-'])]:size-3.5" },
|
|
16
|
-
md: { root: "size-[35px] [&_svg:not([class*='size-'])]:size-[18px]" },
|
|
17
|
-
lg: { root: "size-[51px] [&_svg:not([class*='size-'])]:size-[22px]" }
|
|
15
|
+
sm: { root: "size-[27px] rounded-chip [&_svg:not([class*='size-'])]:size-3.5" },
|
|
16
|
+
md: { root: "size-[35px] rounded-control [&_svg:not([class*='size-'])]:size-[18px]" },
|
|
17
|
+
lg: { root: "size-[51px] rounded-container [&_svg:not([class*='size-'])]:size-[22px]" }
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: {
|
|
@@ -9,6 +9,8 @@ const inboxItem = tv({
|
|
|
9
9
|
"has-data-[slot=inbox-item-leading]:grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
10
10
|
"has-data-[slot=inbox-item-selection]:has-data-[slot=inbox-item-leading]:grid-cols-[auto_auto_minmax(0,1fr)_auto]",
|
|
11
11
|
"gap-x-3 gap-y-0 rounded-none border-0 py-3",
|
|
12
|
+
"md:pointer-fine:py-2",
|
|
13
|
+
"pointer-coarse:min-h-14 pointer-coarse:py-2",
|
|
12
14
|
listCell,
|
|
13
15
|
listCellStates,
|
|
14
16
|
"data-[active=true]:before:bg-fill-cell-selected",
|
|
@@ -73,7 +75,7 @@ const inboxItem = tv({
|
|
|
73
75
|
itemStatusWord: ["shrink-0 @max-[320px]/inbox-item-row:hidden"],
|
|
74
76
|
itemStatusPixel: ["hidden items-center @max-[320px]/inbox-item-row:inline-flex"],
|
|
75
77
|
itemListGroup: ["flex flex-col gap-0.5", "mt-1.5 first:mt-0"],
|
|
76
|
-
itemListHeading: ["mb-0.5 px-
|
|
78
|
+
itemListHeading: ["mb-0.5 px-(--surface-inset) py-1", "font-sans text-footnote font-bold text-foreground-hint"],
|
|
77
79
|
itemMarks: ["flex h-5 shrink-0 items-center justify-end gap-1.5", "text-foreground-hint"],
|
|
78
80
|
itemHoverTarget: ["pointer-events-auto"],
|
|
79
81
|
itemTimestamp: ["shrink-0 whitespace-nowrap text-right tabular-nums", "font-mono text-mono-meta text-foreground-hint"],
|
|
@@ -118,7 +120,7 @@ const inboxItem = tv({
|
|
|
118
120
|
"items-center",
|
|
119
121
|
"has-data-[slot=inbox-item-line]:@container/inbox-item-row",
|
|
120
122
|
"has-data-[slot=inbox-item-line]:[--inbox-item-content-end:-1]",
|
|
121
|
-
"has-data-[slot=inbox-item-line]:pointer-fine:[:
|
|
123
|
+
"has-data-[slot=inbox-item-line]:pointer-fine:hover:[--inbox-item-actions-room:--spacing(10)] has-data-[slot=inbox-item-line]:pointer-fine:[:focus-within,[data-active=true],[data-popup-open],:has([data-popup-open])]:[--inbox-item-actions-room:--spacing(10)]",
|
|
122
124
|
"has-data-[slot=inbox-item-line]:pointer-coarse:[--inbox-item-actions-room:--spacing(11)]",
|
|
123
125
|
"has-data-[slot=inbox-item-line]:hover:[--inbox-item-time-display:inline] has-data-[slot=inbox-item-line]:keyboard:focus-within:[--inbox-item-time-display:inline]"
|
|
124
126
|
],
|
|
@@ -2,7 +2,7 @@ import { tv } from "../../lib/tv.mjs";
|
|
|
2
2
|
//#region src/components/input/input.recipe.ts
|
|
3
3
|
const input = tv({ slots: { root: [
|
|
4
4
|
"h-control w-full px-3 py-0 font-heading text-field font-field outline-none",
|
|
5
|
-
"rounded-control border-[1.5px] border-line-field bg-layer-card",
|
|
5
|
+
"rounded-(--control-radius) border-[1.5px] border-line-field bg-layer-card",
|
|
6
6
|
"text-foreground placeholder:text-foreground-hint",
|
|
7
7
|
"shadow-none transition-shadow duration-90 ease-out focus-visible:shadow-focus",
|
|
8
8
|
"data-invalid:border-danger-strong",
|