@revikornmann/muka-ui 0.56.0 → 0.59.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.
- package/dist/cjs/components/ListItem/ListItem.css +37 -0
- package/dist/cjs/components/ListItem/ListItem.js +2 -1
- package/dist/cjs/components/ListItem/ListItem.js.map +1 -1
- package/dist/cjs/components/Menu/Menu.css +33 -0
- package/dist/cjs/components/ProfileBadge/ProfileBadge.css +43 -0
- package/dist/cjs/components/ProfileBadge/ProfileBadge.js +7 -2
- package/dist/cjs/components/ProfileBadge/ProfileBadge.js.map +1 -1
- package/dist/cjs/components/SiteHeader/SiteHeader.css +38 -0
- package/dist/cjs/components/SiteHeader/SiteHeader.js +2 -1
- package/dist/cjs/components/SiteHeader/SiteHeader.js.map +1 -1
- package/dist/cjs/components/TopBar/TopBar.css +22 -28
- package/dist/cjs/components/TopBar/TopBar.js +21 -21
- package/dist/cjs/components/TopBar/TopBar.js.map +1 -1
- package/dist/cjs/components/View/View.js +2 -2
- package/dist/cjs/components/View/View.js.map +1 -1
- package/dist/esm/components/ListItem/ListItem.css +37 -0
- package/dist/esm/components/ListItem/ListItem.js +2 -1
- package/dist/esm/components/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/Menu/Menu.css +33 -0
- package/dist/esm/components/ProfileBadge/ProfileBadge.css +43 -0
- package/dist/esm/components/ProfileBadge/ProfileBadge.js +7 -2
- package/dist/esm/components/ProfileBadge/ProfileBadge.js.map +1 -1
- package/dist/esm/components/SiteHeader/SiteHeader.css +38 -0
- package/dist/esm/components/SiteHeader/SiteHeader.js +2 -1
- package/dist/esm/components/SiteHeader/SiteHeader.js.map +1 -1
- package/dist/esm/components/TopBar/TopBar.css +22 -28
- package/dist/esm/components/TopBar/TopBar.js +21 -21
- package/dist/esm/components/TopBar/TopBar.js.map +1 -1
- package/dist/esm/components/View/View.js +2 -2
- package/dist/esm/components/View/View.js.map +1 -1
- package/dist/styles/components/ListItem.css +37 -0
- package/dist/styles/components/Menu.css +33 -0
- package/dist/styles/components/ProfileBadge.css +43 -0
- package/dist/styles/components/SiteHeader.css +38 -0
- package/dist/styles/components/TopBar.css +22 -28
- package/dist/styles/index.css +1198 -1051
- package/dist/styles/muka-dark.css +1198 -1051
- package/dist/styles/muka-light.css +1198 -1051
- package/dist/styles/tokens-bouwplan-dark.css +3 -1
- package/dist/styles/tokens-bouwplan-light.css +3 -1
- package/dist/styles/tokens-fscl-dark.css +3 -1
- package/dist/styles/tokens-fscl-light.css +3 -1
- package/dist/styles/tokens-grip-dark.css +3 -1
- package/dist/styles/tokens-grip-light.css +3 -1
- package/dist/styles/tokens-muka-dark.css +3 -1
- package/dist/styles/tokens-muka-light.css +3 -1
- package/dist/styles/tokens-wireframe-dark.css +3 -1
- package/dist/styles/tokens-wireframe-light.css +3 -1
- package/dist/styles/wireframe-dark.css +1198 -1051
- package/dist/styles/wireframe-light.css +1198 -1051
- package/dist/types/components/ListItem/ListItem.d.ts +7 -0
- package/dist/types/components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/types/components/ProfileBadge/ProfileBadge.d.ts +13 -1
- package/dist/types/components/ProfileBadge/ProfileBadge.d.ts.map +1 -1
- package/dist/types/components/SiteHeader/SiteHeader.d.ts +7 -0
- package/dist/types/components/SiteHeader/SiteHeader.d.ts.map +1 -1
- package/dist/types/components/TopBar/TopBar.d.ts +3 -9
- package/dist/types/components/TopBar/TopBar.d.ts.map +1 -1
- package/dist/types/components/View/View.d.ts +0 -6
- package/dist/types/components/View/View.d.ts.map +1 -1
- package/package.json +1 -1
- package/tokens/t4-components/topbar.json +15 -1
|
@@ -492,3 +492,36 @@
|
|
|
492
492
|
transform: translateX(0);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
+
|
|
496
|
+
/* ─── Items with an icon: compact ListItem rows ──────────────────────────── */
|
|
497
|
+
|
|
498
|
+
/*
|
|
499
|
+
* A menu whose items carry an icon uses the compact ListItem layout (Figma
|
|
500
|
+
* ListItem × Padding=Compact, the Bouwplan account menu): a 12px inset on the
|
|
501
|
+
* list, rows with an 8px inset, a 32px icon slot holding a 20px icon, 12px
|
|
502
|
+
* between icon and label. The icon takes
|
|
503
|
+
* the menu's icon colour, so an `<Icon>` passed in doesn't need a colour or
|
|
504
|
+
* a size of its own. Menus without icons keep their tighter rows.
|
|
505
|
+
*/
|
|
506
|
+
.muka-menu__viewport:has(.muka-menu__item-icon) {
|
|
507
|
+
padding: var(--spacing-3);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.muka-menu__item:has(> .muka-menu__item-icon) {
|
|
511
|
+
gap: var(--spacing-3);
|
|
512
|
+
padding-top: var(--spacing-2);
|
|
513
|
+
padding-bottom: var(--spacing-2);
|
|
514
|
+
padding-left: var(--spacing-2);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.muka-menu__item-icon {
|
|
518
|
+
min-width: var(--size-2xl);
|
|
519
|
+
min-height: var(--size-2xl);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.muka-menu__item-icon > .muka-icon,
|
|
523
|
+
.muka-menu__item-icon > svg {
|
|
524
|
+
width: var(--icon-size-sm);
|
|
525
|
+
height: var(--icon-size-sm);
|
|
526
|
+
color: inherit;
|
|
527
|
+
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
.muka-profile-badge {
|
|
4
4
|
display: inline-flex;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
min-width: 0;
|
|
5
7
|
align-items: center;
|
|
6
8
|
font-family: var(--text-body-base-regular-fontFamily);
|
|
7
9
|
}
|
|
@@ -15,6 +17,10 @@
|
|
|
15
17
|
gap: var(--spacing-3); /* 12px */
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
.muka-profile-badge--sm {
|
|
21
|
+
gap: var(--spacing-2); /* 8px */
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
.muka-profile-badge__avatar {
|
|
19
25
|
flex-shrink: 0;
|
|
20
26
|
}
|
|
@@ -28,6 +34,10 @@
|
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
.muka-profile-badge__name {
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
white-space: nowrap;
|
|
31
41
|
font-family: var(--text-body-base-regular-fontFamily);
|
|
32
42
|
font-size: var(--text-body-base-regular-fontSize);
|
|
33
43
|
font-weight: var(--text-body-base-regular-fontWeight);
|
|
@@ -66,3 +76,36 @@
|
|
|
66
76
|
outline: 2px solid var(--color-border-focus);
|
|
67
77
|
outline-offset: 2px;
|
|
68
78
|
}
|
|
79
|
+
|
|
80
|
+
/* Trailing chevron: the badge opens a menu */
|
|
81
|
+
.muka-profile-badge__chevron {
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/*
|
|
86
|
+
* A clickable badge with a chevron is a pill (Figma Profile Badge, Bouwplan
|
|
87
|
+
* header): 4px inset on the avatar side, 12px after the chevron. The border
|
|
88
|
+
* is an inset shadow so it appears on hover and while the menu is open
|
|
89
|
+
* without moving the content.
|
|
90
|
+
*/
|
|
91
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron {
|
|
92
|
+
padding: var(--spacing-1) var(--spacing-3) var(--spacing-1) var(--spacing-1);
|
|
93
|
+
border-radius: var(--radius-full);
|
|
94
|
+
transition: box-shadow 0.2s ease;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:hover,
|
|
98
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:active {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:hover,
|
|
103
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron[aria-expanded='true'],
|
|
104
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron[data-state='open'] {
|
|
105
|
+
box-shadow: inset 0 0 0 var(--border-width-regular) var(--button-color-ghost-border-hover);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* A badge without an avatar keeps the 12px start inset */
|
|
109
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:not(:has(.muka-profile-badge__avatar)) {
|
|
110
|
+
padding-left: var(--spacing-3);
|
|
111
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Avatar } from '../Avatar/Avatar';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
4
5
|
import './ProfileBadge.css';
|
|
5
6
|
/**
|
|
6
7
|
* Maps a ProfileBadge size to the nearest Avatar size.
|
|
@@ -12,6 +13,7 @@ import './ProfileBadge.css';
|
|
|
12
13
|
const AVATAR_SIZE_MAP = {
|
|
13
14
|
lg: 'sm',
|
|
14
15
|
md: 'xs',
|
|
16
|
+
sm: '2xs',
|
|
15
17
|
};
|
|
16
18
|
/**
|
|
17
19
|
* ProfileBadge Component
|
|
@@ -23,13 +25,15 @@ const AVATAR_SIZE_MAP = {
|
|
|
23
25
|
* Sizes (per Figma):
|
|
24
26
|
* - `lg`: avatar + name + email, 16px gap
|
|
25
27
|
* - `md`: avatar + name only, 12px gap
|
|
28
|
+
* - `sm`: 32px avatar + name only, 8px gap; with `showChevron`, the header's
|
|
29
|
+
* account-menu trigger
|
|
26
30
|
*
|
|
27
31
|
* @accessibility WCAG 2.1 AA compliant
|
|
28
32
|
* - The name is rendered as visible text; the avatar carries an accessible label
|
|
29
33
|
* - With `onClick`, or as a trigger (`MenuTrigger asChild`), the badge is a
|
|
30
34
|
* keyboard-focusable button that receives the trigger's ARIA state
|
|
31
35
|
*/
|
|
32
|
-
export const ProfileBadge = React.forwardRef(function ProfileBadge({ name, email, src, alt, size = 'lg', showAvatar = true, onClick, className = '', 'aria-label': ariaLabel, ...rest }, ref) {
|
|
36
|
+
export const ProfileBadge = React.forwardRef(function ProfileBadge({ name, email, src, alt, size = 'lg', showAvatar = true, showChevron = false, onClick, className = '', 'aria-label': ariaLabel, ...rest }, ref) {
|
|
33
37
|
const showEmail = size === 'lg' && !!email;
|
|
34
38
|
// A trigger (e.g. Radix's MenuTrigger asChild) opens on pointer/key events
|
|
35
39
|
// and passes no onClick; it still needs a real, focusable button.
|
|
@@ -38,11 +42,12 @@ export const ProfileBadge = React.forwardRef(function ProfileBadge({ name, email
|
|
|
38
42
|
'muka-profile-badge',
|
|
39
43
|
`muka-profile-badge--${size}`,
|
|
40
44
|
interactive && 'muka-profile-badge--clickable',
|
|
45
|
+
showChevron && 'muka-profile-badge--with-chevron',
|
|
41
46
|
className,
|
|
42
47
|
]
|
|
43
48
|
.filter(Boolean)
|
|
44
49
|
.join(' ');
|
|
45
|
-
const content = (_jsxs(_Fragment, { children: [showAvatar && (_jsx(Avatar, { className: "muka-profile-badge__avatar", name: name, src: src, alt: alt ?? name, size: AVATAR_SIZE_MAP[size] })), _jsxs("span", { className: "muka-profile-badge__text", children: [_jsx("span", { className: "muka-profile-badge__name", children: name }), showEmail && _jsx("span", { className: "muka-profile-badge__email", children: email })] })] }));
|
|
50
|
+
const content = (_jsxs(_Fragment, { children: [showAvatar && (_jsx(Avatar, { className: "muka-profile-badge__avatar", name: name, src: src, alt: alt ?? name, size: AVATAR_SIZE_MAP[size] })), _jsxs("span", { className: "muka-profile-badge__text", children: [_jsx("span", { className: "muka-profile-badge__name", children: name }), showEmail && _jsx("span", { className: "muka-profile-badge__email", children: email })] }), showChevron && (_jsx(Icon, { name: "arrow-down-s", size: "sm", colorVariant: "subtle", className: "muka-profile-badge__chevron" }))] }));
|
|
46
51
|
if (interactive) {
|
|
47
52
|
return (_jsx("button", { type: "button", ...rest, ref: ref, className: classes, onClick: onClick, "aria-label": ariaLabel, children: content }));
|
|
48
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileBadge.js","sourceRoot":"","sources":["../../../../components/ProfileBadge/ProfileBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProfileBadge.js","sourceRoot":"","sources":["../../../../components/ProfileBadge/ProfileBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,oBAAoB,CAAC;AAyD5B;;;;;;GAMG;AACH,MAAM,eAAe,GAAG;IACtB,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,KAAK;CACD,CAAC;AAEX;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAiC,SAAS,YAAY,CAChG,EACE,IAAI,EACJ,KAAK,EACL,GAAG,EACH,GAAG,EACH,IAAI,GAAG,IAAI,EACX,UAAU,GAAG,IAAI,EACjB,WAAW,GAAG,KAAK,EACnB,OAAO,EACP,SAAS,GAAG,EAAE,EACd,YAAY,EAAE,SAAS,EACvB,GAAG,IAAI,EACR,EACD,GAAG;IAEH,MAAM,SAAS,GAAG,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC;IAC3C,2EAA2E;IAC3E,kEAAkE;IAClE,MAAM,WAAW,GACf,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,SAAS,CAAC;IAE/F,MAAM,OAAO,GAAG;QACd,oBAAoB;QACpB,uBAAuB,IAAI,EAAE;QAC7B,WAAW,IAAI,+BAA+B;QAC9C,WAAW,IAAI,kCAAkC;QACjD,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,MAAM,OAAO,GAAG,CACd,8BACG,UAAU,IAAI,CACb,KAAC,MAAM,IACL,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,IAAI,IAAI,EAChB,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,GAC3B,CACH,EACD,gBAAM,SAAS,EAAC,0BAA0B,aACxC,eAAM,SAAS,EAAC,0BAA0B,YAAE,IAAI,GAAQ,EACvD,SAAS,IAAI,eAAM,SAAS,EAAC,2BAA2B,YAAE,KAAK,GAAQ,IACnE,EACN,WAAW,IAAI,CACd,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,IAAI,EAAC,YAAY,EAAC,QAAQ,EAAC,SAAS,EAAC,6BAA6B,GAAG,CACrG,IACA,CACJ,CAAC;IAEF,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,KACT,IAAI,EACR,GAAG,EAAE,GAAmC,EACxC,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,gBACJ,SAAS,YAEpB,OAAO,GACD,CACV,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iBAAS,IAAI,EAAE,GAAG,EAAE,GAAgC,EAAE,SAAS,EAAE,OAAO,gBAAc,SAAS,YAC5F,OAAO,GACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -102,3 +102,41 @@
|
|
|
102
102
|
display: none;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* layout="full" (Figma Public header, Bouwplan): the content spans the width,
|
|
108
|
+
* the nav sits between brand and actions (space-between), and the inset grows
|
|
109
|
+
* with the screen: 24/16 on small screens, 16/24 from 768px, 32 from 1536px.
|
|
110
|
+
* Safe-area insets still win where they are larger.
|
|
111
|
+
*/
|
|
112
|
+
.muka-site-header--full .muka-site-header__inner {
|
|
113
|
+
max-width: none;
|
|
114
|
+
justify-content: space-between;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.muka-site-header--full .muka-site-header__actions {
|
|
118
|
+
margin-left: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (min-width: 768px) {
|
|
122
|
+
.muka-site-header--full .muka-site-header__inner {
|
|
123
|
+
padding-block: var(--spacing-4);
|
|
124
|
+
padding-left: max(var(--spacing-6), env(safe-area-inset-left, 0px));
|
|
125
|
+
padding-right: max(var(--spacing-6), env(safe-area-inset-right, 0px));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (min-width: 1536px) {
|
|
130
|
+
.muka-site-header--full .muka-site-header__inner {
|
|
131
|
+
padding-block: var(--spacing-8);
|
|
132
|
+
padding-left: max(var(--spacing-8), env(safe-area-inset-left, 0px));
|
|
133
|
+
padding-right: max(var(--spacing-8), env(safe-area-inset-right, 0px));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Small screens: no nav, so the actions take the end on their own. */
|
|
138
|
+
@media (max-width: 767px) {
|
|
139
|
+
.muka-site-header--full .muka-site-header__actions {
|
|
140
|
+
margin-left: auto;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -15,10 +15,11 @@ import './SiteHeader.css';
|
|
|
15
15
|
* `--muka-site-header-background` to a token, e.g.
|
|
16
16
|
* `style={{ '--muka-site-header-background': 'var(--color-surface-level2)' }}`.
|
|
17
17
|
*/
|
|
18
|
-
export const SiteHeader = ({ brand, nav, navLabel, actions, compactActions, sticky = true, className, ...props }) => {
|
|
18
|
+
export const SiteHeader = ({ brand, nav, navLabel, actions, compactActions, sticky = true, layout = 'contained', className, ...props }) => {
|
|
19
19
|
const classes = [
|
|
20
20
|
'muka-site-header',
|
|
21
21
|
sticky && 'muka-site-header--sticky',
|
|
22
|
+
layout === 'full' && 'muka-site-header--full',
|
|
22
23
|
className,
|
|
23
24
|
].filter(Boolean).join(' ');
|
|
24
25
|
return (_jsx("header", { className: classes, ...props, children: _jsxs("div", { className: "muka-site-header__inner", children: [_jsx("div", { className: "muka-site-header__brand", children: brand }), nav && (_jsx("nav", { className: "muka-site-header__nav", "aria-label": navLabel, children: nav })), (actions || compactActions) && (_jsxs("div", { className: "muka-site-header__actions", children: [actions && (_jsx("div", { className: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteHeader.js","sourceRoot":"","sources":["../../../../components/SiteHeader/SiteHeader.tsx"],"names":[],"mappings":";AACA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"SiteHeader.js","sourceRoot":"","sources":["../../../../components/SiteHeader/SiteHeader.tsx"],"names":[],"mappings":";AACA,OAAO,kBAAkB,CAAC;AAuC1B;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,GAAG,EACH,QAAQ,EACR,OAAO,EACP,cAAc,EACd,MAAM,GAAG,IAAI,EACb,MAAM,GAAG,WAAW,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,kBAAkB;QAClB,MAAM,IAAI,0BAA0B;QACpC,MAAM,KAAK,MAAM,IAAI,wBAAwB;QAC7C,SAAS;KACV,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,iBAAQ,SAAS,EAAE,OAAO,KAAM,KAAK,YACnC,eAAK,SAAS,EAAC,yBAAyB,aACtC,cAAK,SAAS,EAAC,yBAAyB,YAAE,KAAK,GAAO,EAErD,GAAG,IAAI,CACN,cAAK,SAAS,EAAC,uBAAuB,gBAAa,QAAQ,YACxD,GAAG,GACA,CACP,EAEA,CAAC,OAAO,IAAI,cAAc,CAAC,IAAI,CAC9B,eAAK,SAAS,EAAC,2BAA2B,aACvC,OAAO,IAAI,CACV,cACE,SAAS,EAAE;gCACT,gCAAgC;gCAChC,cAAc,IAAI,sCAAsC;6BACzD,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAE1B,OAAO,GACJ,CACP,EACA,cAAc,IAAI,CACjB,cAAK,SAAS,EAAC,wEAAwE,YACpF,cAAc,GACX,CACP,IACG,CACP,IACG,GACC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
--tb-title-font-size: var(--text-heading-xs-fontSize);
|
|
30
30
|
--tb-title-line-height: var(--text-heading-xs-lineHeight);
|
|
31
31
|
--tb-title-letter-spacing: var(--text-heading-xs-letterSpacing);
|
|
32
|
-
--tb-breadcrumb-display: none;
|
|
33
32
|
--tb-pad-y: 0;
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -56,7 +55,7 @@
|
|
|
56
55
|
--tb-title-letter-spacing: var(--text-heading-md-letterSpacing);
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
/* ─── Large tier: left-aligned title
|
|
58
|
+
/* ─── Large tier: back button, then a left-aligned title ─── */
|
|
60
59
|
@media (min-width: 1024px) {
|
|
61
60
|
.muka-topbar:not([data-size]):not([data-max-size='md']) {
|
|
62
61
|
--tb-height: var(--topbar-height-lg);
|
|
@@ -70,7 +69,6 @@
|
|
|
70
69
|
--tb-title-font-size: var(--text-heading-md-fontSize);
|
|
71
70
|
--tb-title-line-height: var(--text-heading-md-lineHeight);
|
|
72
71
|
--tb-title-letter-spacing: var(--text-heading-md-letterSpacing);
|
|
73
|
-
--tb-breadcrumb-display: flex;
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
|
|
@@ -86,7 +84,6 @@
|
|
|
86
84
|
--tb-title-font-size: var(--text-heading-md-fontSize);
|
|
87
85
|
--tb-title-line-height: var(--text-heading-md-lineHeight);
|
|
88
86
|
--tb-title-letter-spacing: var(--text-heading-md-letterSpacing);
|
|
89
|
-
--tb-breadcrumb-display: flex;
|
|
90
87
|
}
|
|
91
88
|
|
|
92
89
|
/* Push content below the iOS notch / status bar. Opt out via disableSafeArea. */
|
|
@@ -110,13 +107,6 @@
|
|
|
110
107
|
border-radius: var(--topbar-drag-handle-radius);
|
|
111
108
|
}
|
|
112
109
|
|
|
113
|
-
/* ─── Breadcrumb (large tier, stacked above the title) ── */
|
|
114
|
-
|
|
115
|
-
.muka-topbar__breadcrumb {
|
|
116
|
-
display: var(--tb-breadcrumb-display);
|
|
117
|
-
align-items: center;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
110
|
/* ─── Container (the bar itself) ──────────────────────── */
|
|
121
111
|
|
|
122
112
|
.muka-topbar__container {
|
|
@@ -145,46 +135,50 @@
|
|
|
145
135
|
z-index: 1;
|
|
146
136
|
}
|
|
147
137
|
|
|
148
|
-
/*
|
|
149
|
-
@media (min-width: 1024px) {
|
|
150
|
-
.muka-topbar:not([data-size]):not([data-max-size='md']):has(.muka-topbar__breadcrumb) .muka-topbar__leading {
|
|
151
|
-
display: none;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.muka-topbar[data-size='lg']:has(.muka-topbar__breadcrumb) .muka-topbar__leading {
|
|
156
|
-
display: none;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/* ─── Heading (breadcrumb + title) ────────────────────── */
|
|
138
|
+
/* ─── Heading (title) ─────────────────────────────────── */
|
|
160
139
|
|
|
161
|
-
/* Base/sm/md: transparent wrapper so the title is the center grid item
|
|
162
|
-
the breadcrumb stays hidden. */
|
|
140
|
+
/* Base/sm/md: transparent wrapper so the title is the center grid item. */
|
|
163
141
|
.muka-topbar__heading {
|
|
164
142
|
display: contents;
|
|
165
143
|
}
|
|
166
144
|
|
|
167
|
-
/* Large tier:
|
|
145
|
+
/* Large tier: the heading takes the free width so a long title truncates
|
|
146
|
+
before the trailing actions, and sits a fixed gap after the back button. */
|
|
168
147
|
@media (min-width: 1024px) {
|
|
169
148
|
.muka-topbar:not([data-size]):not([data-max-size='md']) .muka-topbar__heading {
|
|
170
149
|
display: flex;
|
|
171
150
|
flex-direction: column;
|
|
172
151
|
justify-content: center;
|
|
173
|
-
gap: var(--spacing-1);
|
|
174
152
|
flex: 1 1 0%;
|
|
175
153
|
min-width: 0;
|
|
176
154
|
}
|
|
155
|
+
|
|
156
|
+
.muka-topbar:not([data-size]):not([data-max-size='md']) .muka-topbar__leading + .muka-topbar__heading {
|
|
157
|
+
margin-left: var(--topbar-gap-lg);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.muka-topbar:not([data-size]):not([data-max-size='md']) .muka-topbar__heading:first-child {
|
|
161
|
+
padding-left: var(--topbar-title-inset-lg);
|
|
162
|
+
}
|
|
177
163
|
}
|
|
178
164
|
|
|
179
165
|
.muka-topbar[data-size='lg'] .muka-topbar__heading {
|
|
180
166
|
display: flex;
|
|
181
167
|
flex-direction: column;
|
|
182
168
|
justify-content: center;
|
|
183
|
-
gap: var(--spacing-1);
|
|
184
169
|
flex: 1 1 0%;
|
|
185
170
|
min-width: 0;
|
|
186
171
|
}
|
|
187
172
|
|
|
173
|
+
.muka-topbar[data-size='lg'] .muka-topbar__leading + .muka-topbar__heading {
|
|
174
|
+
margin-left: var(--topbar-gap-lg);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* No back button: the title sits a little further in than the bar padding. */
|
|
178
|
+
.muka-topbar[data-size='lg'] .muka-topbar__heading:first-child {
|
|
179
|
+
padding-left: var(--topbar-title-inset-lg);
|
|
180
|
+
}
|
|
181
|
+
|
|
188
182
|
/* ─── Title ───────────────────────────────────────────── */
|
|
189
183
|
|
|
190
184
|
.muka-topbar__title {
|
|
@@ -34,8 +34,8 @@ function withTopBarButtons(node) {
|
|
|
34
34
|
* bottom sheets and non-modal dialogs.
|
|
35
35
|
*
|
|
36
36
|
* Sizing is responsive by default (small <768px, medium 768–1023px, large
|
|
37
|
-
* ≥1024px). At the large tier the title is left-aligned
|
|
38
|
-
*
|
|
37
|
+
* ≥1024px). At the large tier the title is left-aligned, a fixed gap after
|
|
38
|
+
* the `leading` back button. Pass `size` to force a tier,
|
|
39
39
|
* or `maxSize="md"` to stop at the medium tier.
|
|
40
40
|
*
|
|
41
41
|
* Icon-only Buttons in `leading`, `trailing` and `trailingSecondary` always
|
|
@@ -47,31 +47,31 @@ function withTopBarButtons(node) {
|
|
|
47
47
|
* - Navigation elements are focusable and keyboard-accessible
|
|
48
48
|
* - Title uses `aria-live="polite"` for dynamic updates
|
|
49
49
|
*/
|
|
50
|
-
export const TopBar = ({ title, subtitle, titleLeading, titleTrailing, titleLabel, onTitleClick, renderTitle, leading, trailing, trailingSecondary, variant = 'default', size, maxSize,
|
|
50
|
+
export const TopBar = ({ title, subtitle, titleLeading, titleTrailing, titleLabel, onTitleClick, renderTitle, leading, trailing, trailingSecondary, variant = 'default', size, maxSize, controlBar, disableSafeArea = false, className = '', }) => {
|
|
51
51
|
const topBarClasses = [
|
|
52
52
|
'muka-topbar',
|
|
53
53
|
variant === 'draggable' && 'muka-topbar--draggable',
|
|
54
54
|
disableSafeArea && 'muka-topbar--no-safe-area',
|
|
55
55
|
className,
|
|
56
56
|
].filter(Boolean).join(' ');
|
|
57
|
-
return (_jsxs("header", { className: topBarClasses, "data-size": size, "data-max-size": !size && maxSize === 'md' ? 'md' : undefined, children: [variant === 'draggable' && (_jsx("div", { className: "muka-topbar__drag-handle-container", children: _jsx("div", { className: "muka-topbar__drag-handle" }) })), _jsxs("div", { className: "muka-topbar__container", children: [leading && (_jsx("div", { className: "muka-topbar__leading", children: withTopBarButtons(leading) })),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
return (_jsxs("header", { className: topBarClasses, "data-size": size, "data-max-size": !size && maxSize === 'md' ? 'md' : undefined, children: [variant === 'draggable' && (_jsx("div", { className: "muka-topbar__drag-handle-container", children: _jsx("div", { className: "muka-topbar__drag-handle" }) })), _jsxs("div", { className: "muka-topbar__container", children: [leading && (_jsx("div", { className: "muka-topbar__leading", children: withTopBarButtons(leading) })), _jsx("div", { className: "muka-topbar__heading", children: title && (() => {
|
|
58
|
+
const subline = subtitle ? _jsx("span", { className: "muka-topbar__subtitle", children: subtitle }) : null;
|
|
59
|
+
let heading;
|
|
60
|
+
if (!titleTrailing && !subtitle) {
|
|
61
|
+
heading = (_jsx("p", { className: "muka-topbar__title", "aria-live": "polite", children: title }));
|
|
62
|
+
}
|
|
63
|
+
else if (!titleTrailing) {
|
|
64
|
+
heading = (_jsxs("div", { className: "muka-topbar__title-block", children: [_jsx("p", { className: "muka-topbar__title", "aria-live": "polite", children: title }), subline] }));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const button = (_jsxs("button", { type: "button", className: "muka-topbar__title muka-topbar__title--button", "aria-label": titleLabel ? `${title}, ${titleLabel}` : undefined, onClick: onTitleClick, children: [_jsx("span", { className: "muka-topbar__title-text", "aria-live": "polite", children: title }), _jsx("span", { className: "muka-topbar__title-glyph", "aria-hidden": "true", children: _jsx(Icon, { name: titleTrailing === 'switch' ? 'arrow-drop-up-down' : 'arrow-down-s', variant: "line", size: "sm" }) })] }));
|
|
68
|
+
const trigger = renderTitle ? renderTitle(button) : button;
|
|
69
|
+
heading = subline ? (_jsxs("div", { className: "muka-topbar__title-block", children: [trigger, subline] })) : (trigger);
|
|
70
|
+
}
|
|
71
|
+
if (!titleLeading)
|
|
72
|
+
return heading;
|
|
73
|
+
return (_jsxs("div", { className: "muka-topbar__title-row", children: [_jsx("span", { className: "muka-topbar__title-leading", "aria-hidden": "true", children: titleLeading }), heading] }));
|
|
74
|
+
})() }), _jsxs("div", { className: "muka-topbar__trailing", children: [trailingSecondary && (_jsx("div", { className: "muka-topbar__trailing-action", children: withTopBarButtons(trailingSecondary) })), trailing && (_jsx("div", { className: "muka-topbar__trailing-action", children: withTopBarButtons(trailing) }))] })] }), controlBar && (_jsx("div", { className: "muka-topbar__controlbar", children: controlBar }))] }));
|
|
75
75
|
};
|
|
76
76
|
export default TopBar;
|
|
77
77
|
//# sourceMappingURL=TopBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBar.js","sourceRoot":"","sources":["../../../../components/TopBar/TopBar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TopBar.js","sourceRoot":"","sources":["../../../../components/TopBar/TopBar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,cAAc,CAAC;AA+FtB;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,IAAqB;IAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;QACxC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAC/C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;YAClC,MAAM,QAAQ,GAAG,KAA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AC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;gCAC3D,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAClB,eAAK,SAAS,EAAC,0BAA0B,aACtC,OAAO,EACP,OAAO,IACJ,CACP,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CAAC;4BACJ,CAAC;4BACD,IAAI,CAAC,YAAY;gCAAE,OAAO,OAAO,CAAC;4BAClC,OAAO,CACL,eAAK,SAAS,EAAC,wBAAwB,aACrC,eAAM,SAAS,EAAC,4BAA4B,iBAAa,MAAM,YAC5D,YAAY,GACR,EACN,OAAO,IACJ,CACP,CAAC;wBACJ,CAAC,CAAC,EAAE,GACA,EAEN,eAAK,SAAS,EAAC,uBAAuB,aACnC,iBAAiB,IAAI,CACpB,cAAK,SAAS,EAAC,8BAA8B,YAC1C,iBAAiB,CAAC,iBAAiB,CAAC,GACjC,CACP,EACA,QAAQ,IAAI,CACX,cAAK,SAAS,EAAC,8BAA8B,YAC1C,iBAAiB,CAAC,QAAQ,CAAC,GACxB,CACP,IACG,IACF,EAEL,UAAU,IAAI,CACb,cAAK,SAAS,EAAC,yBAAyB,YACrC,UAAU,GACP,CACP,IACM,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -42,14 +42,14 @@ function withViewButtons(node, variant) {
|
|
|
42
42
|
* - Uses `<main>` landmark for the scrollable body
|
|
43
43
|
* - TopBar provides semantic `<header>` structure
|
|
44
44
|
*/
|
|
45
|
-
export const View = ({ level, title, subtitle, titleLeading, titleTrailing, titleLabel, onTitleClick, renderTitle, leading, trailing, trailingSecondary, controlBar,
|
|
45
|
+
export const View = ({ level, title, subtitle, titleLeading, titleTrailing, titleLabel, onTitleClick, renderTitle, leading, trailing, trailingSecondary, controlBar, surfaceLevel = 2, size, footer, children, className = '', }) => {
|
|
46
46
|
const viewClasses = [
|
|
47
47
|
'muka-view',
|
|
48
48
|
`muka-view--${level}`,
|
|
49
49
|
`muka-view--surface-${surfaceLevel}`,
|
|
50
50
|
className,
|
|
51
51
|
].filter(Boolean).join(' ');
|
|
52
|
-
return (_jsxs("div", { className: viewClasses, "data-size": size, children: [_jsx(TopBar, { title: title, subtitle: subtitle, titleLeading: titleLeading, titleTrailing: titleTrailing, titleLabel: titleLabel, onTitleClick: onTitleClick, renderTitle: renderTitle, leading: withViewButtons(leading, 'secondary'), trailing: withViewButtons(trailing, 'ghost'), trailingSecondary: withViewButtons(trailingSecondary, 'ghost'), controlBar: controlBar,
|
|
52
|
+
return (_jsxs("div", { className: viewClasses, "data-size": size, children: [_jsx(TopBar, { title: title, subtitle: subtitle, titleLeading: titleLeading, titleTrailing: titleTrailing, titleLabel: titleLabel, onTitleClick: onTitleClick, renderTitle: renderTitle, leading: withViewButtons(leading, 'secondary'), trailing: withViewButtons(trailing, 'ghost'), trailingSecondary: withViewButtons(trailingSecondary, 'ghost'), controlBar: controlBar, size: size }), _jsxs("main", { className: "muka-view__body", children: [_jsx("div", { className: "muka-view__body-inner", children: children }), footer && (_jsx("div", { className: "muka-view__footer", children: footer }))] })] }));
|
|
53
53
|
};
|
|
54
54
|
export default View;
|
|
55
55
|
//# sourceMappingURL=View.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../components/View/View.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAA4B,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../components/View/View.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAA4B,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW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C;IAE5B,OAAO,CACL,eAAK,SAAS,EAAE,WAAW,eAAa,IAAI,aAC1C,KAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,EAC9C,QAAQ,EAAE,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,EAC5C,iBAAiB,EAAE,eAAe,CAAC,iBAAiB,EAAE,OAAO,CAAC,EAC9D,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,GACV,EAEF,gBAAM,SAAS,EAAC,iBAAiB,aAC/B,cAAK,SAAS,EAAC,uBAAuB,YACnC,QAAQ,GACL,EAEL,MAAM,IAAI,CACT,cAAK,SAAS,EAAC,mBAAmB,YAC/B,MAAM,GACH,CACP,IACI,IACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -278,3 +278,40 @@ li.muka-listitem {
|
|
|
278
278
|
.muka-listitem-group--no-divider .muka-listitem__divider {
|
|
279
279
|
display: none;
|
|
280
280
|
}
|
|
281
|
+
|
|
282
|
+
/* ─── Compact padding ──────────────────────────────────── */
|
|
283
|
+
|
|
284
|
+
/*
|
|
285
|
+
* Figma ListItem × Padding=Compact: an 8px inset, 12px between leading and
|
|
286
|
+
* label, a 32px leading slot (a 20px icon centred, or a 32px avatar) and a
|
|
287
|
+
* regular-weight label. Used in menus and short navigation lists.
|
|
288
|
+
*/
|
|
289
|
+
.muka-listitem--compact {
|
|
290
|
+
align-items: center;
|
|
291
|
+
gap: var(--spacing-3);
|
|
292
|
+
padding: var(--spacing-2);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.muka-listitem--compact .muka-listitem__leading {
|
|
296
|
+
width: var(--size-2xl);
|
|
297
|
+
height: var(--size-2xl);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.muka-listitem--compact .muka-listitem__icon {
|
|
301
|
+
width: var(--size-2xl);
|
|
302
|
+
height: var(--size-2xl);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.muka-listitem--compact .muka-listitem__image {
|
|
306
|
+
width: var(--size-2xl);
|
|
307
|
+
height: var(--size-2xl);
|
|
308
|
+
border-radius: var(--radius-sm);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.muka-listitem--compact .muka-listitem__label {
|
|
312
|
+
font-weight: var(--text-label-md-regular-fontWeight);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.muka-listitem--compact .muka-listitem__content {
|
|
316
|
+
gap: var(--spacing-3);
|
|
317
|
+
}
|
|
@@ -492,3 +492,36 @@
|
|
|
492
492
|
transform: translateX(0);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
+
|
|
496
|
+
/* ─── Items with an icon: compact ListItem rows ──────────────────────────── */
|
|
497
|
+
|
|
498
|
+
/*
|
|
499
|
+
* A menu whose items carry an icon uses the compact ListItem layout (Figma
|
|
500
|
+
* ListItem × Padding=Compact, the Bouwplan account menu): a 12px inset on the
|
|
501
|
+
* list, rows with an 8px inset, a 32px icon slot holding a 20px icon, 12px
|
|
502
|
+
* between icon and label. The icon takes
|
|
503
|
+
* the menu's icon colour, so an `<Icon>` passed in doesn't need a colour or
|
|
504
|
+
* a size of its own. Menus without icons keep their tighter rows.
|
|
505
|
+
*/
|
|
506
|
+
.muka-menu__viewport:has(.muka-menu__item-icon) {
|
|
507
|
+
padding: var(--spacing-3);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.muka-menu__item:has(> .muka-menu__item-icon) {
|
|
511
|
+
gap: var(--spacing-3);
|
|
512
|
+
padding-top: var(--spacing-2);
|
|
513
|
+
padding-bottom: var(--spacing-2);
|
|
514
|
+
padding-left: var(--spacing-2);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.muka-menu__item-icon {
|
|
518
|
+
min-width: var(--size-2xl);
|
|
519
|
+
min-height: var(--size-2xl);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.muka-menu__item-icon > .muka-icon,
|
|
523
|
+
.muka-menu__item-icon > svg {
|
|
524
|
+
width: var(--icon-size-sm);
|
|
525
|
+
height: var(--icon-size-sm);
|
|
526
|
+
color: inherit;
|
|
527
|
+
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
.muka-profile-badge {
|
|
4
4
|
display: inline-flex;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
min-width: 0;
|
|
5
7
|
align-items: center;
|
|
6
8
|
font-family: var(--text-body-base-regular-fontFamily);
|
|
7
9
|
}
|
|
@@ -15,6 +17,10 @@
|
|
|
15
17
|
gap: var(--spacing-3); /* 12px */
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
.muka-profile-badge--sm {
|
|
21
|
+
gap: var(--spacing-2); /* 8px */
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
.muka-profile-badge__avatar {
|
|
19
25
|
flex-shrink: 0;
|
|
20
26
|
}
|
|
@@ -28,6 +34,10 @@
|
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
.muka-profile-badge__name {
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
white-space: nowrap;
|
|
31
41
|
font-family: var(--text-body-base-regular-fontFamily);
|
|
32
42
|
font-size: var(--text-body-base-regular-fontSize);
|
|
33
43
|
font-weight: var(--text-body-base-regular-fontWeight);
|
|
@@ -66,3 +76,36 @@
|
|
|
66
76
|
outline: 2px solid var(--color-border-focus);
|
|
67
77
|
outline-offset: 2px;
|
|
68
78
|
}
|
|
79
|
+
|
|
80
|
+
/* Trailing chevron: the badge opens a menu */
|
|
81
|
+
.muka-profile-badge__chevron {
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/*
|
|
86
|
+
* A clickable badge with a chevron is a pill (Figma Profile Badge, Bouwplan
|
|
87
|
+
* header): 4px inset on the avatar side, 12px after the chevron. The border
|
|
88
|
+
* is an inset shadow so it appears on hover and while the menu is open
|
|
89
|
+
* without moving the content.
|
|
90
|
+
*/
|
|
91
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron {
|
|
92
|
+
padding: var(--spacing-1) var(--spacing-3) var(--spacing-1) var(--spacing-1);
|
|
93
|
+
border-radius: var(--radius-full);
|
|
94
|
+
transition: box-shadow 0.2s ease;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:hover,
|
|
98
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:active {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:hover,
|
|
103
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron[aria-expanded='true'],
|
|
104
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron[data-state='open'] {
|
|
105
|
+
box-shadow: inset 0 0 0 var(--border-width-regular) var(--button-color-ghost-border-hover);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* A badge without an avatar keeps the 12px start inset */
|
|
109
|
+
.muka-profile-badge--clickable.muka-profile-badge--with-chevron:not(:has(.muka-profile-badge__avatar)) {
|
|
110
|
+
padding-left: var(--spacing-3);
|
|
111
|
+
}
|
|
@@ -102,3 +102,41 @@
|
|
|
102
102
|
display: none;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* layout="full" (Figma Public header, Bouwplan): the content spans the width,
|
|
108
|
+
* the nav sits between brand and actions (space-between), and the inset grows
|
|
109
|
+
* with the screen: 24/16 on small screens, 16/24 from 768px, 32 from 1536px.
|
|
110
|
+
* Safe-area insets still win where they are larger.
|
|
111
|
+
*/
|
|
112
|
+
.muka-site-header--full .muka-site-header__inner {
|
|
113
|
+
max-width: none;
|
|
114
|
+
justify-content: space-between;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.muka-site-header--full .muka-site-header__actions {
|
|
118
|
+
margin-left: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (min-width: 768px) {
|
|
122
|
+
.muka-site-header--full .muka-site-header__inner {
|
|
123
|
+
padding-block: var(--spacing-4);
|
|
124
|
+
padding-left: max(var(--spacing-6), env(safe-area-inset-left, 0px));
|
|
125
|
+
padding-right: max(var(--spacing-6), env(safe-area-inset-right, 0px));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (min-width: 1536px) {
|
|
130
|
+
.muka-site-header--full .muka-site-header__inner {
|
|
131
|
+
padding-block: var(--spacing-8);
|
|
132
|
+
padding-left: max(var(--spacing-8), env(safe-area-inset-left, 0px));
|
|
133
|
+
padding-right: max(var(--spacing-8), env(safe-area-inset-right, 0px));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Small screens: no nav, so the actions take the end on their own. */
|
|
138
|
+
@media (max-width: 767px) {
|
|
139
|
+
.muka-site-header--full .muka-site-header__actions {
|
|
140
|
+
margin-left: auto;
|
|
141
|
+
}
|
|
142
|
+
}
|