devnonla-ui 0.4.3 → 0.5.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/README.md +12 -4
- package/package.json +1 -1
- package/src/button/Button.tsx +1 -1
- package/src/chat/AgentChatbox.tsx +112 -0
- package/src/chat/AgentPanel.tsx +7 -100
- package/src/chat/chatMessageList.tsx +114 -0
- package/src/chat/common/agentStreamHelpers.ts +104 -0
- package/src/chat/common/createAgentSseSession.ts +304 -0
- package/src/chat/common/types.ts +0 -4
- package/src/chat/common/useAgentChatStream.ts +224 -0
- package/src/chat/common/useAgentStream.ts +28 -367
- package/src/chat/index.ts +5 -1
- package/src/chat/message-ui/ChatInput.tsx +20 -5
- package/src/chat/tool-ui/ChatToolCall.tsx +28 -28
- package/src/colorpicker/ColorPicker.tsx +1 -1
- package/src/datepicker/DatePicker.tsx +2 -2
- package/src/dropdown/ContextMenu.tsx +15 -3
- package/src/dropdown/Dropdown.tsx +16 -4
- package/src/dropdown/menuClasses.ts +5 -1
- package/src/index.ts +3 -1
- package/src/input/Input.tsx +2 -2
- package/src/menu/Menu.tsx +1 -1
- package/src/pagination/Pagination.tsx +2 -2
- package/src/segmented/Segmented.tsx +53 -4
- package/src/select/Select.tsx +5 -3
- package/src/splitter/Splitter.tsx +6 -12
- package/src/styles.css +19 -2
- package/src/tag/Tag.tsx +1 -1
- package/src/timepicker/TimePicker.tsx +5 -5
|
@@ -3,7 +3,7 @@ import { type CSSProperties, type MouseEvent, type ReactNode, useState } from "r
|
|
|
3
3
|
import { usePopupContainer } from "../app/context";
|
|
4
4
|
import { cn } from "../lib/cn";
|
|
5
5
|
import { type PopperPlacement, placementToRadix } from "../lib/placement";
|
|
6
|
-
import { menuContentClass, menuIconClass, menuItemClass } from "./menuClasses";
|
|
6
|
+
import { menuContentClass, menuGroupClass, menuGroupLabelClass, menuIconClass, menuItemClass } from "./menuClasses";
|
|
7
7
|
|
|
8
8
|
export type MenuItemType = {
|
|
9
9
|
key?: string;
|
|
@@ -11,7 +11,7 @@ export type MenuItemType = {
|
|
|
11
11
|
icon?: ReactNode;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
danger?: boolean;
|
|
14
|
-
type?: "item" | "divider";
|
|
14
|
+
type?: "item" | "divider" | "group";
|
|
15
15
|
children?: (MenuItemType | null | undefined)[];
|
|
16
16
|
onClick?: (info?: { key: string }) => void;
|
|
17
17
|
style?: CSSProperties;
|
|
@@ -49,7 +49,7 @@ function ChevronRight() {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
function itemKey(item: MenuItemType, i: number) {
|
|
52
|
-
return item.key ?? (item.type === "divider" ? `divider-${i}` : `item-${i}`);
|
|
52
|
+
return item.key ?? (item.type === "divider" ? `divider-${i}` : item.type === "group" ? `group-${i}` : `item-${i}`);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
function MenuItems({ items, onClick, portal }: { items: (MenuItemType | null | undefined)[]; onClick?: MenuProps["onClick"]; portal?: HTMLElement }) {
|
|
@@ -61,10 +61,22 @@ function MenuItems({ items, onClick, portal }: { items: (MenuItemType | null | u
|
|
|
61
61
|
if (item.type === "divider") {
|
|
62
62
|
return <DropdownMenu.Separator key={key} className="my-1 h-px bg-border" />;
|
|
63
63
|
}
|
|
64
|
+
if (item.type === "group") {
|
|
65
|
+
return (
|
|
66
|
+
<DropdownMenu.Group key={key} className={menuGroupClass}>
|
|
67
|
+
{item.label != null && item.label !== "" ? (
|
|
68
|
+
<DropdownMenu.Label className={cn(menuGroupLabelClass, item.className)} style={item.style}>
|
|
69
|
+
{item.label}
|
|
70
|
+
</DropdownMenu.Label>
|
|
71
|
+
) : null}
|
|
72
|
+
<MenuItems items={item.children ?? []} onClick={onClick} portal={portal} />
|
|
73
|
+
</DropdownMenu.Group>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
64
76
|
if (item.children?.length) {
|
|
65
77
|
return (
|
|
66
78
|
<DropdownMenu.Sub key={key}>
|
|
67
|
-
<DropdownMenu.SubTrigger disabled={item.disabled} className={cn(menuItemClass, "data-[state=open]:bg-
|
|
79
|
+
<DropdownMenu.SubTrigger disabled={item.disabled} className={cn(menuItemClass, "data-[state=open]:bg-ink-active", item.danger && "text-destructive", item.className)} style={item.style}>
|
|
68
80
|
{item.icon ? <span className={menuIconClass}>{item.icon}</span> : null}
|
|
69
81
|
<span className="min-w-0 flex-1">{item.label}</span>
|
|
70
82
|
<ChevronRight />
|
|
@@ -2,8 +2,12 @@ import { cn } from "../lib/cn";
|
|
|
2
2
|
import { glassOverlayClass } from "../lib/surface";
|
|
3
3
|
|
|
4
4
|
export const menuItemClass =
|
|
5
|
-
"nonla-menu-item relative flex cursor-default select-none items-center gap-2 rounded-
|
|
5
|
+
"nonla-menu-item relative flex cursor-default select-none items-center gap-2 rounded-lg border border-solid border-transparent px-2.5 py-1 text-sm leading-5 outline-none data-[disabled]:opacity-40";
|
|
6
6
|
|
|
7
7
|
export const menuContentClass = cn(glassOverlayClass, "min-w-40 overflow-hidden p-1");
|
|
8
8
|
|
|
9
9
|
export const menuIconClass = "inline-flex size-4 shrink-0 items-center justify-center [&_img]:size-4 [&_svg]:size-4";
|
|
10
|
+
|
|
11
|
+
export const menuGroupClass = "not-first:pt-2.5";
|
|
12
|
+
|
|
13
|
+
export const menuGroupLabelClass = "px-2.5 pb-1 pt-1 text-xs font-medium leading-4 text-tertiary-foreground";
|
package/src/index.ts
CHANGED
|
@@ -16,13 +16,13 @@ export { Alert } from "./alert/Alert";
|
|
|
16
16
|
export type { CalendarProps } from "./calendar/Calendar";
|
|
17
17
|
export { Calendar } from "./calendar/Calendar";
|
|
18
18
|
export type {
|
|
19
|
+
AgentChatboxProps,
|
|
19
20
|
AgentHistoryMessage,
|
|
20
21
|
AgentMessage,
|
|
21
22
|
AgentMessageRole,
|
|
22
23
|
AgentPanelEndpoint,
|
|
23
24
|
AgentPanelProps,
|
|
24
25
|
AgentStreamRequest,
|
|
25
|
-
AgentToolAction,
|
|
26
26
|
AgentToolCallEvent,
|
|
27
27
|
AgentToolHook,
|
|
28
28
|
AgentToolNameMatch,
|
|
@@ -45,6 +45,7 @@ export type {
|
|
|
45
45
|
ToolUIProps,
|
|
46
46
|
} from "./chat";
|
|
47
47
|
export {
|
|
48
|
+
AgentChatbox,
|
|
48
49
|
AgentPanel,
|
|
49
50
|
BackgroundTasksBar,
|
|
50
51
|
BackgroundTaskToolUI,
|
|
@@ -81,6 +82,7 @@ export {
|
|
|
81
82
|
RunJsToolUI,
|
|
82
83
|
resolveToolUI,
|
|
83
84
|
ToolUiTrailing,
|
|
85
|
+
useAgentChatStream,
|
|
84
86
|
useAgentStream,
|
|
85
87
|
WebFetchToolUI,
|
|
86
88
|
} from "./chat";
|
package/src/input/Input.tsx
CHANGED
|
@@ -299,7 +299,7 @@ const InputNumber = forwardRef<HTMLInputElement, InputNumberProps>(function Inpu
|
|
|
299
299
|
tabIndex={-1}
|
|
300
300
|
aria-label="Increase"
|
|
301
301
|
disabled={atMax}
|
|
302
|
-
className={cn("flex flex-1 items-center justify-center text-muted-foreground", "hover:bg-
|
|
302
|
+
className={cn("flex flex-1 items-center justify-center text-muted-foreground", "hover:bg-ink-hover hover:text-foreground active:bg-ink-active", "disabled:opacity-30 disabled:pointer-events-none", "border-b border-border/60")}
|
|
303
303
|
onMouseDown={(e) => e.preventDefault()}
|
|
304
304
|
onClick={() => stepBy(1)}
|
|
305
305
|
>
|
|
@@ -310,7 +310,7 @@ const InputNumber = forwardRef<HTMLInputElement, InputNumberProps>(function Inpu
|
|
|
310
310
|
tabIndex={-1}
|
|
311
311
|
aria-label="Decrease"
|
|
312
312
|
disabled={atMin}
|
|
313
|
-
className={cn("flex flex-1 items-center justify-center text-muted-foreground", "hover:bg-
|
|
313
|
+
className={cn("flex flex-1 items-center justify-center text-muted-foreground", "hover:bg-ink-hover hover:text-foreground active:bg-ink-active", "disabled:opacity-30 disabled:pointer-events-none")}
|
|
314
314
|
onMouseDown={(e) => e.preventDefault()}
|
|
315
315
|
onClick={() => stepBy(-1)}
|
|
316
316
|
>
|
package/src/menu/Menu.tsx
CHANGED
|
@@ -65,7 +65,7 @@ export type MenuItemProps = {
|
|
|
65
65
|
|
|
66
66
|
export function MenuItem({ icon, label, extra, selected, action, onClick, className }: MenuItemProps) {
|
|
67
67
|
return (
|
|
68
|
-
<div className={cn("group relative flex min-h-8 items-center rounded-md", selected ? "bg-ink-active" : "hover:bg-
|
|
68
|
+
<div className={cn("group relative flex min-h-8 items-center rounded-md", selected ? "bg-ink-active" : "hover:bg-ink-hover", className)}>
|
|
69
69
|
<button
|
|
70
70
|
type="button"
|
|
71
71
|
aria-current={selected ? "true" : undefined}
|
|
@@ -114,7 +114,7 @@ function ItemBtn({
|
|
|
114
114
|
className={cn(
|
|
115
115
|
"group inline-flex min-w-0 cursor-pointer items-center justify-center px-1.5 tabular-nums select-none",
|
|
116
116
|
"transition-colors disabled:cursor-not-allowed disabled:opacity-40",
|
|
117
|
-
active ? "bg-brand font-medium text-(--nonla-solid-fg)" : "text-muted-foreground hover:bg-
|
|
117
|
+
active ? "bg-brand font-medium text-(--nonla-solid-fg)" : "text-muted-foreground hover:bg-ink-hover hover:text-foreground",
|
|
118
118
|
className,
|
|
119
119
|
)}
|
|
120
120
|
style={{
|
|
@@ -245,7 +245,7 @@ function GoButton({
|
|
|
245
245
|
"inline-flex cursor-pointer items-center justify-center px-2 text-foreground",
|
|
246
246
|
controlFieldSurface,
|
|
247
247
|
controlFieldTransition,
|
|
248
|
-
"hover:bg-
|
|
248
|
+
"hover:bg-ink-hover disabled:cursor-not-allowed disabled:opacity-45",
|
|
249
249
|
)}
|
|
250
250
|
style={{
|
|
251
251
|
height: controlHeightVar(size),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode, useLayoutEffect, useRef, useState } from "react";
|
|
2
2
|
import { cn } from "../lib/cn";
|
|
3
3
|
import { type ControlSize, controlHeightVar, controlRadiusVar, getSizeTokens, useControlSize } from "../lib/sizes";
|
|
4
4
|
|
|
@@ -20,6 +20,8 @@ function norm<V extends string | number>(opt: SegmentedOption<V>): { label: Reac
|
|
|
20
20
|
return opt;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
type Thumb = { left: number; top: number; width: number; height: number };
|
|
24
|
+
|
|
23
25
|
export function Segmented<V extends string | number = string | number>({ options, value, defaultValue, onChange, size, block, disabled, className }: SegmentedProps<V>) {
|
|
24
26
|
const items = options.map((o) => norm(o));
|
|
25
27
|
const current = value ?? defaultValue ?? items[0]?.value;
|
|
@@ -28,26 +30,73 @@ export function Segmented<V extends string | number = string | number>({ options
|
|
|
28
30
|
const itemPadX = Math.max(tok.paddingInline - 4, 6);
|
|
29
31
|
const radius = controlRadiusVar(resolvedSize);
|
|
30
32
|
|
|
33
|
+
const rootRef = useRef<HTMLDivElement>(null);
|
|
34
|
+
const itemRefs = useRef(new Map<string, HTMLButtonElement>());
|
|
35
|
+
const [thumb, setThumb] = useState<Thumb | null>(null);
|
|
36
|
+
|
|
37
|
+
const itemsKey = items.map((i) => String(i.value)).join("");
|
|
38
|
+
|
|
39
|
+
useLayoutEffect(() => {
|
|
40
|
+
const root = rootRef.current;
|
|
41
|
+
if (!root) return;
|
|
42
|
+
|
|
43
|
+
const measure = () => {
|
|
44
|
+
const el = itemRefs.current.get(String(current));
|
|
45
|
+
if (!el) {
|
|
46
|
+
setThumb(null);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
setThumb({ left: el.offsetLeft, top: el.offsetTop, width: el.offsetWidth, height: el.offsetHeight });
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
measure();
|
|
53
|
+
const ro = new ResizeObserver(measure);
|
|
54
|
+
ro.observe(root);
|
|
55
|
+
return () => ro.disconnect();
|
|
56
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
57
|
+
}, [current, resolvedSize, block, itemsKey]);
|
|
58
|
+
|
|
31
59
|
return (
|
|
32
60
|
<div
|
|
33
|
-
|
|
61
|
+
ref={rootRef}
|
|
62
|
+
className={cn(
|
|
63
|
+
"relative inline-flex w-fit max-w-full shrink-0 items-center gap-0.5 rounded-lg border border-solid border-glass-border bg-glass-bar p-0.5 shadow-[inset_0_1px_0_var(--glass-highlight)] backdrop-blur-xl",
|
|
64
|
+
block && "flex w-full",
|
|
65
|
+
className,
|
|
66
|
+
)}
|
|
34
67
|
role="tablist"
|
|
35
68
|
style={{ borderRadius: radius }}
|
|
36
69
|
data-size={resolvedSize}
|
|
37
70
|
>
|
|
71
|
+
{thumb ? (
|
|
72
|
+
<span
|
|
73
|
+
aria-hidden
|
|
74
|
+
className="nonla-segmented-thumb pointer-events-none absolute border border-solid border-glass-border bg-glass shadow-[inset_0_1px_0_var(--glass-highlight),0_1px_3px_color-mix(in_srgb,black_10%,transparent)]"
|
|
75
|
+
style={{
|
|
76
|
+
width: thumb.width,
|
|
77
|
+
height: thumb.height,
|
|
78
|
+
transform: `translate(${thumb.left}px, ${thumb.top}px)`,
|
|
79
|
+
borderRadius: `max(4px, calc(${radius} - 2px))`,
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
82
|
+
) : null}
|
|
38
83
|
{items.map((item) => {
|
|
39
84
|
const active = item.value === current;
|
|
40
85
|
return (
|
|
41
86
|
<button
|
|
42
87
|
key={String(item.value)}
|
|
88
|
+
ref={(el) => {
|
|
89
|
+
if (el) itemRefs.current.set(String(item.value), el);
|
|
90
|
+
else itemRefs.current.delete(String(item.value));
|
|
91
|
+
}}
|
|
43
92
|
type="button"
|
|
44
93
|
role="tab"
|
|
45
94
|
aria-selected={active}
|
|
46
95
|
disabled={disabled || item.disabled}
|
|
47
96
|
className={cn(
|
|
48
|
-
"inline-flex cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap border-
|
|
97
|
+
"relative z-10 inline-flex cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap border border-solid border-transparent transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-45",
|
|
49
98
|
block ? "min-w-0 flex-1" : "shrink-0",
|
|
50
|
-
active ? "
|
|
99
|
+
active ? "text-foreground" : "bg-transparent text-foreground hover:bg-ink-hover",
|
|
51
100
|
)}
|
|
52
101
|
style={{
|
|
53
102
|
height: `max(22px, calc(${controlHeightVar(resolvedSize)} - 4px))`,
|
package/src/select/Select.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useState,
|
|
13
13
|
} from "react";
|
|
14
14
|
import { usePopupContainer } from "../app/context";
|
|
15
|
+
import { menuItemClass } from "../dropdown/menuClasses";
|
|
15
16
|
import { cn } from "../lib/cn";
|
|
16
17
|
import { type ControlSize, controlFieldFocusBorder, controlFieldStyle, controlFieldSurface, controlFieldTransition, controlStatusClass, useControlSize } from "../lib/sizes";
|
|
17
18
|
import { glassOverlayClass } from "../lib/surface";
|
|
@@ -233,7 +234,7 @@ export const Select = forwardRef<HTMLButtonElement, SelectProps>(function Select
|
|
|
233
234
|
role="button"
|
|
234
235
|
tabIndex={-1}
|
|
235
236
|
aria-label="Clear"
|
|
236
|
-
className="inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground opacity-0 transition-opacity hover:bg-
|
|
237
|
+
className="inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground opacity-0 transition-opacity hover:bg-ink-hover hover:text-foreground group-hover/select:opacity-100"
|
|
237
238
|
onPointerDown={(e) => e.preventDefault()}
|
|
238
239
|
onClick={(e) => {
|
|
239
240
|
e.preventDefault();
|
|
@@ -293,11 +294,12 @@ export const Select = forwardRef<HTMLButtonElement, SelectProps>(function Select
|
|
|
293
294
|
tabIndex={-1}
|
|
294
295
|
aria-selected={opt.value === selected}
|
|
295
296
|
data-active={i === active ? "true" : undefined}
|
|
297
|
+
data-highlighted={!opt.disabled && i === active && opt.value !== selected ? "" : undefined}
|
|
296
298
|
className={cn(
|
|
297
|
-
|
|
299
|
+
menuItemClass,
|
|
300
|
+
"cursor-pointer",
|
|
298
301
|
opt.disabled && "pointer-events-none opacity-40",
|
|
299
302
|
!opt.disabled && opt.value === selected && "nonla-glass-chip-on text-foreground",
|
|
300
|
-
!opt.disabled && i === active && opt.value !== selected && "nonla-glass-chip",
|
|
301
303
|
)}
|
|
302
304
|
onMouseEnter={() => setActive(i)}
|
|
303
305
|
onMouseDown={(e) => e.preventDefault()}
|
|
@@ -290,9 +290,12 @@ function SplitterRoot({
|
|
|
290
290
|
>
|
|
291
291
|
<span
|
|
292
292
|
className={cn(
|
|
293
|
-
"pointer-events-none absolute rounded-full transition-
|
|
294
|
-
isVertical
|
|
293
|
+
"pointer-events-none absolute rounded-full transition-all",
|
|
294
|
+
isVertical
|
|
295
|
+
? "inset-x-0 top-1/2 h-px -translate-y-1/2 group-hover:h-[3px] group-focus-visible:h-[3px]"
|
|
296
|
+
: "inset-y-0 left-1/2 w-px -translate-x-1/2 group-hover:w-[3px] group-focus-visible:w-[3px]",
|
|
295
297
|
dragging ? "bg-brand" : "bg-border group-hover:bg-brand group-focus-visible:bg-brand",
|
|
298
|
+
dragging && (isVertical ? "h-[3px]" : "w-[3px]"),
|
|
296
299
|
)}
|
|
297
300
|
/>
|
|
298
301
|
{draggerIcon ? (
|
|
@@ -304,16 +307,7 @@ function SplitterRoot({
|
|
|
304
307
|
>
|
|
305
308
|
{draggerIcon}
|
|
306
309
|
</span>
|
|
307
|
-
) :
|
|
308
|
-
<span
|
|
309
|
-
className={cn(
|
|
310
|
-
"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-sm bg-card shadow-button-outline transition-opacity",
|
|
311
|
-
"opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
312
|
-
dragging && "opacity-100",
|
|
313
|
-
isVertical ? "h-1 w-8" : "h-8 w-1",
|
|
314
|
-
)}
|
|
315
|
-
/>
|
|
316
|
-
)}
|
|
310
|
+
) : null}
|
|
317
311
|
</div>
|
|
318
312
|
</div>
|
|
319
313
|
) : null}
|
package/src/styles.css
CHANGED
|
@@ -650,13 +650,17 @@
|
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
/* Nested glass chip — hover is frost only; selected tints with brand */
|
|
653
|
-
.nonla-glass-chip
|
|
654
|
-
.nonla-menu-item[data-highlighted] {
|
|
653
|
+
.nonla-glass-chip {
|
|
655
654
|
background: var(--glass-bar);
|
|
656
655
|
border-color: var(--glass-border);
|
|
657
656
|
-webkit-backdrop-filter: blur(24px);
|
|
658
657
|
backdrop-filter: blur(24px);
|
|
659
658
|
}
|
|
659
|
+
/* Menu item hover — pure ink tint; panel's warm frost shows through, no milky gray */
|
|
660
|
+
.nonla-menu-item[data-highlighted] {
|
|
661
|
+
background: var(--ink-hover);
|
|
662
|
+
border-color: var(--glass-border);
|
|
663
|
+
}
|
|
660
664
|
.nonla-glass-chip-on {
|
|
661
665
|
background: var(--glass-bar);
|
|
662
666
|
border-color: color-mix(in oklab, var(--brand) 38%, var(--glass-border));
|
|
@@ -664,6 +668,16 @@
|
|
|
664
668
|
-webkit-backdrop-filter: blur(24px);
|
|
665
669
|
backdrop-filter: blur(24px);
|
|
666
670
|
}
|
|
671
|
+
/* Segmented sliding thumb — glass pill glides between items */
|
|
672
|
+
.nonla-segmented-thumb {
|
|
673
|
+
top: 0;
|
|
674
|
+
left: 0;
|
|
675
|
+
transition:
|
|
676
|
+
transform 380ms cubic-bezier(0.3, 1.25, 0.5, 1),
|
|
677
|
+
width 380ms cubic-bezier(0.3, 1.25, 0.5, 1),
|
|
678
|
+
height 380ms cubic-bezier(0.3, 1.25, 0.5, 1);
|
|
679
|
+
}
|
|
680
|
+
|
|
667
681
|
@media (prefers-reduced-motion: reduce) {
|
|
668
682
|
.nonla-btn-glass {
|
|
669
683
|
transition: box-shadow var(--nonla-dur-fast) var(--nonla-ease-out);
|
|
@@ -671,6 +685,9 @@
|
|
|
671
685
|
.nonla-btn-glass:active:not(:disabled):not([aria-disabled]) {
|
|
672
686
|
transform: none;
|
|
673
687
|
}
|
|
688
|
+
.nonla-segmented-thumb {
|
|
689
|
+
transition: none;
|
|
690
|
+
}
|
|
674
691
|
}
|
|
675
692
|
|
|
676
693
|
.nonla-overlay {
|
package/src/tag/Tag.tsx
CHANGED
|
@@ -97,7 +97,7 @@ export function Tag({
|
|
|
97
97
|
{closable ? (
|
|
98
98
|
<button
|
|
99
99
|
type="button"
|
|
100
|
-
className="-mr-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full text-current/55 transition-colors hover:bg-
|
|
100
|
+
className="-mr-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full text-current/55 transition-colors hover:bg-ink-hover hover:text-current"
|
|
101
101
|
aria-label="Remove"
|
|
102
102
|
onClick={onClose}
|
|
103
103
|
>
|
|
@@ -245,7 +245,7 @@ function StepperButton({
|
|
|
245
245
|
aria-label={label}
|
|
246
246
|
className={cn(
|
|
247
247
|
"flex h-10 items-center justify-center rounded-md text-muted-foreground transition-colors",
|
|
248
|
-
"hover:bg-
|
|
248
|
+
"hover:bg-ink-hover hover:text-foreground active:bg-ink-active",
|
|
249
249
|
)}
|
|
250
250
|
style={{ width: size }}
|
|
251
251
|
onPointerDown={onPointerDown}
|
|
@@ -298,7 +298,7 @@ function PickGrid({
|
|
|
298
298
|
tabIndex={-1}
|
|
299
299
|
className={cn(
|
|
300
300
|
"flex h-11 items-center justify-center rounded-md tabular-nums text-[13.5px] font-normal transition-colors",
|
|
301
|
-
selected ? "bg-
|
|
301
|
+
selected ? "bg-ink-active text-foreground" : "text-foreground hover:bg-ink-hover",
|
|
302
302
|
)}
|
|
303
303
|
onClick={() => onSelect(opt.value)}
|
|
304
304
|
>
|
|
@@ -372,7 +372,7 @@ function StepperBoard({
|
|
|
372
372
|
className={cn(
|
|
373
373
|
"flex cursor-pointer items-center justify-center rounded-md font-semibold leading-none tracking-tight transition-colors",
|
|
374
374
|
col.wide ? "text-[23px]" : "tabular-nums",
|
|
375
|
-
col.active ? "bg-
|
|
375
|
+
col.active ? "bg-ink-hover text-foreground" : "text-foreground hover:bg-ink-hover",
|
|
376
376
|
)}
|
|
377
377
|
style={{ width: size, height: size, fontSize: col.wide ? undefined : fontSize }}
|
|
378
378
|
onClick={col.onPick}
|
|
@@ -640,7 +640,7 @@ export const TimePicker = forwardRef<HTMLInputElement, TimePickerProps>(function
|
|
|
640
640
|
type="button"
|
|
641
641
|
tabIndex={-1}
|
|
642
642
|
aria-label="Clear"
|
|
643
|
-
className="inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground opacity-0 transition-opacity hover:bg-
|
|
643
|
+
className="inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground opacity-0 transition-opacity hover:bg-ink-hover hover:text-foreground group-hover/timepicker:opacity-100 group-focus-within/timepicker:opacity-100"
|
|
644
644
|
onMouseDown={(e) => e.preventDefault()}
|
|
645
645
|
onClick={clear}
|
|
646
646
|
>
|
|
@@ -682,7 +682,7 @@ export const TimePicker = forwardRef<HTMLInputElement, TimePickerProps>(function
|
|
|
682
682
|
type="button"
|
|
683
683
|
tabIndex={-1}
|
|
684
684
|
aria-label="Back"
|
|
685
|
-
className="absolute top-2 left-1.5 z-10 flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-
|
|
685
|
+
className="absolute top-2 left-1.5 z-10 flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-ink-hover hover:text-foreground"
|
|
686
686
|
onClick={() => setPicking(null)}
|
|
687
687
|
>
|
|
688
688
|
<Chevron dir="left" />
|