ropav 0.8.1 → 0.9.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.
@@ -13,6 +13,13 @@ var sidebar_root_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__P
13
13
  __name: "sidebar-root",
14
14
  props: {
15
15
  class: {},
16
+ style: { type: [
17
+ Boolean,
18
+ null,
19
+ String,
20
+ Object,
21
+ Array
22
+ ] },
16
23
  side: {},
17
24
  variant: {},
18
25
  collapsible: {},
@@ -116,7 +123,7 @@ var sidebar_root_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__P
116
123
  }));
117
124
  const panelId = useId$1();
118
125
  const panelElement = shallowRef(null);
119
- const style = computed(() => state.width.value === void 0 ? void 0 : { "--sidebar-width": state.width.value });
126
+ const style = computed(() => [props.style, state.width.value === void 0 ? void 0 : { "--sidebar-width": state.width.value }]);
120
127
  provideSidebarContext({
121
128
  panelEl: computed(() => panelElement.value),
122
129
  panelId,
@@ -2,12 +2,21 @@ import type { PressEvent } from "../../composables/use-press.js";
2
2
  import type { LinkCurrent } from "../link/link.types.js";
3
3
  import type { SidebarCollapsibleMode } from "./sidebar.state.js";
4
4
  import type { SidebarVariants } from "@ropav/styles";
5
+ import type { StyleValue } from "vue";
5
6
  /** Which edge of the page the panel sits on. */
6
7
  export type SidebarSide = NonNullable<SidebarVariants["side"]>;
7
8
  /** How much of the shell's chrome the sidebar paints. */
8
9
  export type SidebarVariant = NonNullable<SidebarVariants["variant"]>;
9
10
  export interface SidebarRootProps {
10
11
  class?: string;
12
+ /**
13
+ * Declared rather than left to fall through, because this root binds a style of its own and
14
+ * that style is `undefined` until someone sets a width. An `undefined` on a `:style` binding
15
+ * does not mean "leave it alone" — it takes the attribute off the element, and a caller's style
16
+ * merged into the same binding would go with it, at the moment the width happened to be
17
+ * cleared. Naming it here keeps the two in one binding that is only ever added to.
18
+ */
19
+ style?: StyleValue;
11
20
  /** @default "left" */
12
21
  side?: SidebarSide;
13
22
  /**