@nordmanai/nif 0.2.15 → 0.2.17
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/dist/index.js +3 -2
- package/dist/styles.css +1 -1
- package/dist/ui/components/nm-sidebar/nm-sidebar.d.ts +3 -2
- package/package.json +1 -1
- package/registry/index.json +1 -1
- package/registry/ui/components/nm-sidebar/nm-sidebar.css +9 -2
- package/registry/ui/components/nm-sidebar/nm-sidebar.tsx +3 -3
|
@@ -150,9 +150,10 @@ export declare function NmSidebarMenuSubButton({ render, size, isActive, disable
|
|
|
150
150
|
/** Not available. A link gets aria-disabled; a rendered button gets disabled. */
|
|
151
151
|
disabled?: boolean;
|
|
152
152
|
}): ReactNode;
|
|
153
|
-
/** A chevron at the end of a row. In a collapsible row it points right and turns down when the row is open. With `menu` it points down, for a row that opens a menu. */
|
|
154
|
-
export declare function NmSidebarChevron({ className, menu, ...props }: Omit<ComponentProps<typeof NmIcon>, 'id'> & {
|
|
153
|
+
/** A chevron at the end of a row. In a collapsible row it points right and turns down when the row is open. With `menu` it points down, for a row that opens a menu below. With `flyout` it keeps pointing right, for a row whose menu opens beside the sidebar. */
|
|
154
|
+
export declare function NmSidebarChevron({ className, menu, flyout, ...props }: Omit<ComponentProps<typeof NmIcon>, 'id'> & {
|
|
155
155
|
menu?: boolean;
|
|
156
|
+
flyout?: boolean;
|
|
156
157
|
}): ReactNode;
|
|
157
158
|
/**
|
|
158
159
|
* A dropdown menu opened from the sidebar. It closes the moment the sidebar goes out of view
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordmanai/nif",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "Nordman Interface Framework: the one UI and UX system for every Nordman product. Base UI, in the shadcn composition, styled by NIF tokens.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
package/registry/index.json
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
.nm-sidebar-provider {
|
|
3
3
|
--nm-sidebar-width: var(--nm-width-sidebar);
|
|
4
4
|
--nm-sidebar-width-icon: var(--nm-width-sidebar-icon);
|
|
5
|
+
/* The sidebar shares the page's background; only its divider separates it. Floating and inset variants keep their raised card. */
|
|
6
|
+
--nm-sidebar-bg: var(--nm-canvas);
|
|
5
7
|
position: relative;
|
|
6
8
|
box-sizing: border-box;
|
|
7
9
|
display: flex;
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
min-height: 0;
|
|
40
42
|
overflow: hidden;
|
|
41
43
|
color: var(--nm-fg);
|
|
42
|
-
background: var(--nm-
|
|
44
|
+
background: var(--nm-sidebar-bg);
|
|
43
45
|
transition:
|
|
44
46
|
width var(--reveal) var(--ease),
|
|
45
47
|
padding var(--reveal) var(--ease);
|
|
@@ -97,7 +99,7 @@
|
|
|
97
99
|
inset-inline-start: 0;
|
|
98
100
|
width: var(--nm-sidebar-width);
|
|
99
101
|
border-inline-end: var(--nm-rule) solid var(--nm-border-strong);
|
|
100
|
-
background: var(--nm-
|
|
102
|
+
background: var(--nm-sidebar-bg);
|
|
101
103
|
}
|
|
102
104
|
.nm-sidebar[data-side='right'][data-peek] .nm-sidebar__inner {
|
|
103
105
|
inset-inline-start: auto;
|
|
@@ -510,6 +512,11 @@
|
|
|
510
512
|
.nm-sidebar__chevron[data-menu] {
|
|
511
513
|
transform: none;
|
|
512
514
|
}
|
|
515
|
+
[aria-expanded='true'] > .nm-sidebar__chevron[data-flyout],
|
|
516
|
+
[data-popup-open] > .nm-sidebar__chevron[data-flyout],
|
|
517
|
+
.nm-sidebar__chevron[data-flyout] {
|
|
518
|
+
transform: rotate(-90deg);
|
|
519
|
+
}
|
|
513
520
|
|
|
514
521
|
/* The action at the end of a row sits over the row's end, centred on its height. */
|
|
515
522
|
.nm-sidebar__menu-action {
|
|
@@ -571,9 +571,9 @@ export function NmSidebarMenuSubButton({
|
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
573
|
|
|
574
|
-
/** A chevron at the end of a row. In a collapsible row it points right and turns down when the row is open. With `menu` it points down, for a row that opens a menu. */
|
|
575
|
-
export function NmSidebarChevron({ className, menu = false, ...props }: Omit<ComponentProps<typeof NmIcon>, 'id'> & { menu?: boolean }): ReactNode {
|
|
576
|
-
return <NmIcon id="chevron" data-menu={menu ? '' : undefined} className={nmClass('nm-sidebar__chevron', className)} {...props} />;
|
|
574
|
+
/** A chevron at the end of a row. In a collapsible row it points right and turns down when the row is open. With `menu` it points down, for a row that opens a menu below. With `flyout` it keeps pointing right, for a row whose menu opens beside the sidebar. */
|
|
575
|
+
export function NmSidebarChevron({ className, menu = false, flyout = false, ...props }: Omit<ComponentProps<typeof NmIcon>, 'id'> & { menu?: boolean; flyout?: boolean }): ReactNode {
|
|
576
|
+
return <NmIcon id="chevron" data-menu={menu ? '' : undefined} data-flyout={flyout ? '' : undefined} className={nmClass('nm-sidebar__chevron', className)} {...props} />;
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
/**
|