@nordmanai/nif 0.2.17 → 0.2.18
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 +232 -225
- package/dist/styles.css +1 -1
- package/dist/ui/components/nm-sidebar/nm-sidebar.d.ts +2 -0
- package/package.json +1 -1
- package/registry/index.json +1 -1
- package/registry/ui/components/nm-sidebar/nm-sidebar.css +22 -3
- package/registry/ui/components/nm-sidebar/nm-sidebar.tsx +4 -0
|
@@ -129,6 +129,8 @@ export declare function NmSidebarMenuActions({ className, showOnHover, ...props
|
|
|
129
129
|
}): ReactNode;
|
|
130
130
|
/** A row of controls in the header or footer, such as a primary button and an icon button, spaced apart. */
|
|
131
131
|
export declare function NmSidebarBar({ className, ...props }: ComponentProps<'div'>): ReactNode;
|
|
132
|
+
/** The product name at the top of the sidebar. Static: it has a row's geometry so it lines up with the rows below, but no hover or press. */
|
|
133
|
+
export declare function NmSidebarBrand({ className, ...props }: ComponentProps<'div'>): ReactNode;
|
|
132
134
|
/** A count or a short word at the end of a row. The NIF Chip, small. */
|
|
133
135
|
export declare function NmSidebarMenuBadge({ className, ...props }: ComponentProps<typeof NmChip>): ReactNode;
|
|
134
136
|
/** Two lines in a row, such as a name and a plan in the footer. For a large menu button. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordmanai/nif",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
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
|
@@ -177,18 +177,37 @@
|
|
|
177
177
|
.nm-sidebar-provider > .nm-sidebar__trigger--anchored {
|
|
178
178
|
position: absolute;
|
|
179
179
|
top: var(--nm-space-12);
|
|
180
|
-
|
|
180
|
+
/* Its icon sits where a row's icon sits: the group padding, the row border, then the row's icon padding. */
|
|
181
|
+
inset-inline-start: calc(var(--nm-space-8) + var(--nm-rule));
|
|
181
182
|
z-index: calc(var(--nm-rail-z) + 1);
|
|
182
183
|
}
|
|
183
184
|
/* The header leaves the anchored toggle's room and lines its first row up with it. */
|
|
184
185
|
.nm-sidebar-provider:has(> .nm-sidebar__trigger--anchored) .nm-sidebar__header {
|
|
185
186
|
padding-block-start: var(--nm-space-12);
|
|
186
|
-
|
|
187
|
+
/* The first row's text starts where a row's text starts: after the icon column. */
|
|
188
|
+
padding-inline-start: calc(var(--nm-space-8) + var(--nm-icon-button) + var(--nm-space-8));
|
|
187
189
|
min-height: calc(var(--nm-space-12) + var(--nm-icon-control) + var(--nm-space-8));
|
|
188
190
|
}
|
|
189
|
-
.nm-sidebar-provider:has(> .nm-sidebar__trigger--anchored) .nm-sidebar__header > .nm-sidebar__menu > .nm-sidebar__menu-item:first-child > .nm-sidebar__menu-button
|
|
191
|
+
.nm-sidebar-provider:has(> .nm-sidebar__trigger--anchored) .nm-sidebar__header > .nm-sidebar__menu > .nm-sidebar__menu-item:first-child > .nm-sidebar__menu-button,
|
|
192
|
+
.nm-sidebar-provider:has(> .nm-sidebar__trigger--anchored) .nm-sidebar__header > .nm-sidebar__brand {
|
|
190
193
|
min-height: var(--nm-icon-control);
|
|
191
194
|
}
|
|
195
|
+
/* The product name: a row's geometry and type, semibold, with nothing to hover or press. */
|
|
196
|
+
.nm-sidebar__brand {
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
gap: var(--nm-space-8);
|
|
200
|
+
box-sizing: border-box;
|
|
201
|
+
width: 100%;
|
|
202
|
+
height: var(--control-h);
|
|
203
|
+
padding: 0 var(--nm-icon-pad);
|
|
204
|
+
border: var(--nm-rule) solid transparent;
|
|
205
|
+
color: var(--nm-fg);
|
|
206
|
+
font: inherit;
|
|
207
|
+
font-size: var(--nm-type-ui);
|
|
208
|
+
font-weight: var(--nm-weight-semibold);
|
|
209
|
+
white-space: nowrap;
|
|
210
|
+
}
|
|
192
211
|
/* Holds the anchored toggle's place in a bar while the sidebar is closed. */
|
|
193
212
|
.nm-sidebar__trigger-space {
|
|
194
213
|
display: inline-block;
|
|
@@ -503,6 +503,10 @@ export function NmSidebarMenuActions({ className, showOnHover = false, ...props
|
|
|
503
503
|
export function NmSidebarBar({ className, ...props }: ComponentProps<'div'>): ReactNode {
|
|
504
504
|
return <div data-slot="sidebar-bar" className={nmClass('nm-sidebar__bar', className)} {...props} />;
|
|
505
505
|
}
|
|
506
|
+
/** The product name at the top of the sidebar. Static: it has a row's geometry so it lines up with the rows below, but no hover or press. */
|
|
507
|
+
export function NmSidebarBrand({ className, ...props }: ComponentProps<'div'>): ReactNode {
|
|
508
|
+
return <div data-slot="sidebar-brand" className={nmClass('nm-sidebar__brand', className)} {...props} />;
|
|
509
|
+
}
|
|
506
510
|
/** A count or a short word at the end of a row. The NIF Chip, small. */
|
|
507
511
|
export function NmSidebarMenuBadge({ className, ...props }: ComponentProps<typeof NmChip>): ReactNode {
|
|
508
512
|
return <NmChip data-slot="sidebar-menu-badge" size="sm" className={nmClass('nm-sidebar__menu-badge', className)} {...props} />;
|