feat: migrate Toolbar with teleport-safe focus ownership
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix; Vue state adapters. */
|
||||
/* ==========================================================================
|
||||
Toolbar - Container for interactive controls with arrow key navigation
|
||||
========================================================================== */
|
||||
|
||||
/* Base styles */
|
||||
.hv-toolbar {
|
||||
@apply grid w-fit grid-flow-col items-center gap-2;
|
||||
|
||||
.hv-separator--vertical {
|
||||
@apply h-1/2 self-center;
|
||||
}
|
||||
|
||||
.hv-separator--horizontal {
|
||||
@apply w-1/2 justify-center justify-self-center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Orientation variants */
|
||||
.hv-toolbar--horizontal {
|
||||
}
|
||||
|
||||
.hv-toolbar--vertical {
|
||||
@apply grid-flow-row items-start justify-start;
|
||||
.hv-button-group {
|
||||
@apply justify-start;
|
||||
}
|
||||
}
|
||||
|
||||
/* Attached variant */
|
||||
.hv-toolbar--attached {
|
||||
@apply rounded-3xl bg-surface p-1 shadow-overlay;
|
||||
}
|
||||
@@ -133,3 +133,4 @@
|
||||
@import "./components/button-group.css" layer(components);
|
||||
@import "./components/toggle-button.css" layer(components);
|
||||
@import "./components/toggle-button-group.css" layer(components);
|
||||
@import "./components/toolbar.css" layer(components);
|
||||
|
||||
@@ -1148,3 +1148,22 @@ export const toggleButtonGroupVariants = tv({
|
||||
export type ToggleButtonGroupVariants = VariantProps<
|
||||
typeof toggleButtonGroupVariants
|
||||
>;
|
||||
|
||||
export const toolbarVariants = tv({
|
||||
base: "hv-toolbar",
|
||||
defaultVariants: {
|
||||
isAttached: false,
|
||||
orientation: "horizontal",
|
||||
},
|
||||
variants: {
|
||||
isAttached: {
|
||||
true: "hv-toolbar--attached",
|
||||
},
|
||||
orientation: {
|
||||
horizontal: "hv-toolbar--horizontal",
|
||||
vertical: "hv-toolbar--vertical",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export type ToolbarVariants = VariantProps<typeof toolbarVariants>;
|
||||
|
||||
Reference in New Issue
Block a user