@nonoun/native-ui 0.2.10 → 0.4.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/components-lean.css +20 -941
- package/dist/components.css +20 -948
- package/dist/components.js +66 -498
- package/dist/core.js +121 -38
- package/dist/custom-elements.json +3971 -6744
- package/dist/foundation.css +5 -6
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/kernel.js +208 -208
- package/dist/native-ui-lean.css +25 -947
- package/dist/native-ui.css +25 -954
- package/dist/native-ui.js +4 -4
- package/dist/register-all.js +4 -4
- package/dist/traits/drag-controller.d.ts.map +1 -1
- package/dist/traits.js +3 -3
- package/dist/ui-icon.js +1 -1
- package/package.json +6 -9
- package/dist/components/ui-nav/index.d.ts +0 -6
- package/dist/components/ui-nav/index.d.ts.map +0 -1
- package/dist/components/ui-nav/ui-nav-element.d.ts +0 -20
- package/dist/components/ui-nav/ui-nav-element.d.ts.map +0 -1
- package/dist/components/ui-nav/ui-nav-group-element.d.ts +0 -24
- package/dist/components/ui-nav/ui-nav-group-element.d.ts.map +0 -1
- package/dist/components/ui-nav/ui-nav-group-header-element.d.ts +0 -7
- package/dist/components/ui-nav/ui-nav-group-header-element.d.ts.map +0 -1
- package/dist/components/ui-nav/ui-nav-item-element.d.ts +0 -23
- package/dist/components/ui-nav/ui-nav-item-element.d.ts.map +0 -1
- package/dist/components/ui-nav/ui-nav.d.ts +0 -2
- package/dist/components/ui-nav/ui-nav.d.ts.map +0 -1
- package/dist/containers/ui-layout-chat/index.d.ts +0 -3
- package/dist/containers/ui-layout-chat/index.d.ts.map +0 -1
- package/dist/containers/ui-layout-chat/ui-layout-chat-element.d.ts +0 -14
- package/dist/containers/ui-layout-chat/ui-layout-chat-element.d.ts.map +0 -1
- package/dist/containers/ui-layout-chat/ui-layout-chat.d.ts +0 -3
- package/dist/containers/ui-layout-chat/ui-layout-chat.d.ts.map +0 -1
- package/dist/containers/ui-layout-inspector/index.d.ts +0 -3
- package/dist/containers/ui-layout-inspector/index.d.ts.map +0 -1
- package/dist/containers/ui-layout-inspector/ui-layout-inspector-element.d.ts +0 -14
- package/dist/containers/ui-layout-inspector/ui-layout-inspector-element.d.ts.map +0 -1
- package/dist/containers/ui-layout-inspector/ui-layout-inspector.d.ts +0 -3
- package/dist/containers/ui-layout-inspector/ui-layout-inspector.d.ts.map +0 -1
- package/dist/containers/ui-layout-sidebar/index.d.ts +0 -4
- package/dist/containers/ui-layout-sidebar/index.d.ts.map +0 -1
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts +0 -11
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts.map +0 -1
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item-element.d.ts +0 -10
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item-element.d.ts.map +0 -1
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item.d.ts +0 -3
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item.d.ts.map +0 -1
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar.d.ts +0 -4
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar.d.ts.map +0 -1
- package/dist/inspector/build-inspector.d.ts +0 -8
- package/dist/inspector/build-inspector.d.ts.map +0 -1
- package/dist/inspector/index.d.ts +0 -10
- package/dist/inspector/index.d.ts.map +0 -1
- package/dist/inspector/native-tokens-color-swatch-element.d.ts +0 -15
- package/dist/inspector/native-tokens-color-swatch-element.d.ts.map +0 -1
- package/dist/inspector/native-tokens-color-swatch.d.ts +0 -3
- package/dist/inspector/native-tokens-color-swatch.d.ts.map +0 -1
- package/dist/inspector/native-tokens-colors-element.d.ts +0 -14
- package/dist/inspector/native-tokens-colors-element.d.ts.map +0 -1
- package/dist/inspector/native-tokens-colors.d.ts +0 -4
- package/dist/inspector/native-tokens-colors.d.ts.map +0 -1
- package/dist/inspector/native-tokens-inspector-element.d.ts +0 -15
- package/dist/inspector/native-tokens-inspector-element.d.ts.map +0 -1
- package/dist/inspector/native-tokens-inspector.d.ts +0 -3
- package/dist/inspector/native-tokens-inspector.d.ts.map +0 -1
- package/dist/inspector/native-tokens-themes-element.d.ts +0 -13
- package/dist/inspector/native-tokens-themes-element.d.ts.map +0 -1
- package/dist/inspector/native-tokens-themes.d.ts +0 -4
- package/dist/inspector/native-tokens-themes.d.ts.map +0 -1
- package/dist/inspector/native-tokens-variable-element.d.ts +0 -19
- package/dist/inspector/native-tokens-variable-element.d.ts.map +0 -1
- package/dist/inspector/native-tokens-variable.d.ts +0 -4
- package/dist/inspector/native-tokens-variable.d.ts.map +0 -1
- package/dist/inspector.css +0 -231
- package/dist/inspector.d.ts +0 -12
- package/dist/inspector.d.ts.map +0 -1
- package/dist/inspector.js +0 -609
package/dist/components.css
CHANGED
|
@@ -39,6 +39,15 @@
|
|
|
39
39
|
:where(ui-icon[size="lg"]) { --ui-icon-size: var(--ui-icon-lg); }
|
|
40
40
|
:where(ui-icon[size="xl"]) { --ui-icon-size: var(--ui-icon-xl); }
|
|
41
41
|
|
|
42
|
+
/* ── Intent (declarative color) ── */
|
|
43
|
+
|
|
44
|
+
:where(ui-icon[intent="accent"]) { --ui-icon-color: var(--accent-ink); }
|
|
45
|
+
:where(ui-icon[intent="success"]) { --ui-icon-color: var(--success-ink); }
|
|
46
|
+
:where(ui-icon[intent="warning"]) { --ui-icon-color: var(--warning-ink); }
|
|
47
|
+
:where(ui-icon[intent="danger"]) { --ui-icon-color: var(--danger-ink); }
|
|
48
|
+
:where(ui-icon[intent="info"]) { --ui-icon-color: var(--info-ink); }
|
|
49
|
+
:where(ui-icon[intent="muted"]) { --ui-icon-color: var(--neutral-ink-muted); }
|
|
50
|
+
|
|
42
51
|
/* ── Forced Colors ── */
|
|
43
52
|
|
|
44
53
|
@media (forced-colors: active) {
|
|
@@ -762,7 +771,7 @@
|
|
|
762
771
|
/* ╭──────────────────────────────────────────────────────────╮
|
|
763
772
|
│ ui-chat │
|
|
764
773
|
│ Chat application shell with header / content / input / │
|
|
765
|
-
│ footer sub-containers. Fills its parent (
|
|
774
|
+
│ footer sub-containers. Fills its parent (nui-app-panel │
|
|
766
775
|
│ or any flex column). │
|
|
767
776
|
╰──────────────────────────────────────────────────────────╯ */
|
|
768
777
|
|
|
@@ -1320,6 +1329,16 @@
|
|
|
1320
1329
|
opacity: var(--ui-backdrop-opacity);
|
|
1321
1330
|
}
|
|
1322
1331
|
|
|
1332
|
+
/* ── Sizing API ──
|
|
1333
|
+
WHY: Host pages set width and box-shadow directly on ui-card inside ui-dialog.
|
|
1334
|
+
Expose custom properties so consumers can set these declaratively on ui-dialog
|
|
1335
|
+
without reaching into children. */
|
|
1336
|
+
|
|
1337
|
+
:where(ui-dialog) > :where(dialog) > :where(*) {
|
|
1338
|
+
width: var(--ui-dialog-width, auto);
|
|
1339
|
+
box-shadow: var(--ui-dialog-shadow, none);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1323
1342
|
}
|
|
1324
1343
|
|
|
1325
1344
|
@layer ui {
|
|
@@ -1975,370 +1994,6 @@
|
|
|
1975
1994
|
|
|
1976
1995
|
}
|
|
1977
1996
|
|
|
1978
|
-
@layer ui {
|
|
1979
|
-
|
|
1980
|
-
/* ╭──────────────────────────────────────────────────────────╮
|
|
1981
|
-
│ ui-nav │
|
|
1982
|
-
│ Navigation list with keyboard nav + selection. │
|
|
1983
|
-
│ Transparent wrapper — no visual surface. │
|
|
1984
|
-
│ Uses ui-nav-item / ui-nav-group for children. │
|
|
1985
|
-
╰──────────────────────────────────────────────────────────╯ */
|
|
1986
|
-
|
|
1987
|
-
/* WHY: ui-nav is a transparent flex wrapper — no inline padding.
|
|
1988
|
-
Inline padding is owned by leaf items (nav-item, summary).
|
|
1989
|
-
Block padding is owned by nav-group margins. */
|
|
1990
|
-
:where(ui-nav) {
|
|
1991
|
-
display: flex;
|
|
1992
|
-
flex-direction: column;
|
|
1993
|
-
gap: 0;
|
|
1994
|
-
padding: 0;
|
|
1995
|
-
outline: none;
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
/* ── Nav Item ── */
|
|
1999
|
-
/* WHY: Nav items share the same visual pattern as options (ghost row,
|
|
2000
|
-
hover/active/selected states). */
|
|
2001
|
-
|
|
2002
|
-
:where(ui-nav-item) {
|
|
2003
|
-
--_font-weight: var(--ui-font-weight-text);
|
|
2004
|
-
--_line-height: var(--ui-line-height-control);
|
|
2005
|
-
|
|
2006
|
-
display: flex;
|
|
2007
|
-
align-items: center;
|
|
2008
|
-
gap: calc(var(--_space) * 2);
|
|
2009
|
-
padding-inline: calc(var(--_space-k) * var(--_space));
|
|
2010
|
-
|
|
2011
|
-
min-height: var(--_min-height);
|
|
2012
|
-
|
|
2013
|
-
font-size: var(--_font-size);
|
|
2014
|
-
letter-spacing: var(--_letter-spacing);
|
|
2015
|
-
line-height: var(--_line-height);
|
|
2016
|
-
font-weight: var(--_font-weight);
|
|
2017
|
-
|
|
2018
|
-
cursor: pointer;
|
|
2019
|
-
user-select: none;
|
|
2020
|
-
color: var(--_ink-muted);
|
|
2021
|
-
|
|
2022
|
-
transition:
|
|
2023
|
-
background var(--_duration) var(--_easing),
|
|
2024
|
-
color var(--_duration) var(--_easing),
|
|
2025
|
-
border-color var(--_duration) var(--_easing),
|
|
2026
|
-
opacity var(--_duration) var(--_easing),
|
|
2027
|
-
transform var(--_duration) var(--_easing);
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
/* ── Nav Item States ── */
|
|
2031
|
-
|
|
2032
|
-
:where(ui-nav-item):hover,
|
|
2033
|
-
:where(ui-nav-item)[force-hover] {
|
|
2034
|
-
color: var(--_ink-hover);
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
:where(ui-nav-item):active,
|
|
2038
|
-
:where(ui-nav-item)[force-active] {
|
|
2039
|
-
color: var(--_ink-active);
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
:where(ui-nav-item)[aria-current="page"] {
|
|
2043
|
-
color: var(--_ink-strong);
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
:where(ui-nav-item)[aria-disabled="true"] {
|
|
2047
|
-
color: var(--_ink-disabled);
|
|
2048
|
-
cursor: not-allowed;
|
|
2049
|
-
pointer-events: none;
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
:where(ui-nav-item):focus-visible,
|
|
2053
|
-
:where(ui-nav-item)[force-focus-visible] {
|
|
2054
|
-
outline: 2px solid var(--ui-focus-ring);
|
|
2055
|
-
outline-offset: -2px;
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
/* ── Nav Group ── */
|
|
2059
|
-
/* WHY: Groups stamp a native <details>/<summary> for collapsible behavior.
|
|
2060
|
-
DOM structure: ui-nav-group > details > summary > ui-nav-group-header
|
|
2061
|
-
> ui-nav-item* */
|
|
2062
|
-
|
|
2063
|
-
:where(ui-nav-group) {
|
|
2064
|
-
--_indicator-index: 0;
|
|
2065
|
-
|
|
2066
|
-
display: block;
|
|
2067
|
-
position: relative;
|
|
2068
|
-
}
|
|
2069
|
-
|
|
2070
|
-
:where(ui-nav-group) + :where(ui-nav-group) {
|
|
2071
|
-
margin-block-start: calc(var(--_space) * 2);
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
/* ── Details (native disclosure with animated open/close) ── */
|
|
2075
|
-
/* WHY: ::details-content lets us animate the content area directly.
|
|
2076
|
-
interpolate-size allows height to transition between 0 and auto.
|
|
2077
|
-
content-visibility with allow-discrete keeps content visible during close. */
|
|
2078
|
-
|
|
2079
|
-
:where(ui-nav-group) > :where(details) {
|
|
2080
|
-
interpolate-size: allow-keywords;
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
:where(ui-nav-group) > :where(details)::details-content {
|
|
2084
|
-
height: 0;
|
|
2085
|
-
overflow: clip;
|
|
2086
|
-
opacity: 0;
|
|
2087
|
-
|
|
2088
|
-
transition:
|
|
2089
|
-
height var(--_duration) var(--_easing),
|
|
2090
|
-
opacity var(--_duration) var(--_easing),
|
|
2091
|
-
content-visibility var(--_duration) var(--_easing) allow-discrete;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
:where(ui-nav-group) > :where(details[open])::details-content {
|
|
2095
|
-
height: auto;
|
|
2096
|
-
opacity: 1;
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
/* ── Summary (clickable header row) ── */
|
|
2100
|
-
|
|
2101
|
-
:where(ui-nav-group) > :where(details) > :where(summary) {
|
|
2102
|
-
display: flex;
|
|
2103
|
-
align-items: center;
|
|
2104
|
-
gap: calc(var(--_space) * 2);
|
|
2105
|
-
padding-inline: calc(var(--_space-k) * var(--_space));
|
|
2106
|
-
cursor: pointer;
|
|
2107
|
-
user-select: none;
|
|
2108
|
-
list-style: none;
|
|
2109
|
-
outline: none;
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
/* WHY: Remove default marker in WebKit */
|
|
2113
|
-
:where(ui-nav-group) > :where(details) > :where(summary)::-webkit-details-marker {
|
|
2114
|
-
display: none;
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
:where(ui-nav-group) > :where(details) > :where(summary)::marker {
|
|
2118
|
-
display: none;
|
|
2119
|
-
content: '';
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
|
-
/* ── Nav Group Header ── */
|
|
2123
|
-
/* WHY: Header sits inside <summary>. Bold text with optional icon. */
|
|
2124
|
-
|
|
2125
|
-
:where(ui-nav-group-header) {
|
|
2126
|
-
display: flex;
|
|
2127
|
-
align-items: center;
|
|
2128
|
-
flex: 1;
|
|
2129
|
-
gap: calc(var(--_space) * 2);
|
|
2130
|
-
min-height: var(--_min-height);
|
|
2131
|
-
font-size: var(--_font-size);
|
|
2132
|
-
font-weight: var(--ui-font-weight-button);
|
|
2133
|
-
letter-spacing: var(--_letter-spacing);
|
|
2134
|
-
line-height: var(--ui-line-height-control);
|
|
2135
|
-
color: var(--_ink);
|
|
2136
|
-
cursor: pointer;
|
|
2137
|
-
user-select: none;
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
/* WHY: Fixed-size icon well — matches ui-layout-sidebar-item [slot="icon"].
|
|
2141
|
-
All sidebar icons align on the same 1.5rem column regardless of icon size.
|
|
2142
|
-
JS wraps the first <ui-icon> child in a .icon-well span during setup(). */
|
|
2143
|
-
:where(ui-nav-group-header) > :where(.icon-well) {
|
|
2144
|
-
display: inline-flex;
|
|
2145
|
-
align-items: center;
|
|
2146
|
-
justify-content: center;
|
|
2147
|
-
width: 1.5rem;
|
|
2148
|
-
height: 1.5rem;
|
|
2149
|
-
flex-shrink: 0;
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
/* ── Chevron icon (right side of summary) ── */
|
|
2153
|
-
|
|
2154
|
-
:where(ui-nav-group) > :where(details) > :where(summary)::after {
|
|
2155
|
-
content: '';
|
|
2156
|
-
flex-shrink: 0;
|
|
2157
|
-
width: var(--_icon-size);
|
|
2158
|
-
height: var(--_icon-size);
|
|
2159
|
-
|
|
2160
|
-
mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z' fill='currentColor'/%3E%3C/svg%3E");
|
|
2161
|
-
mask-size: contain;
|
|
2162
|
-
mask-repeat: no-repeat;
|
|
2163
|
-
mask-position: center;
|
|
2164
|
-
-webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z' fill='currentColor'/%3E%3C/svg%3E");
|
|
2165
|
-
-webkit-mask-size: contain;
|
|
2166
|
-
-webkit-mask-repeat: no-repeat;
|
|
2167
|
-
-webkit-mask-position: center;
|
|
2168
|
-
|
|
2169
|
-
background: var(--_ink-muted);
|
|
2170
|
-
|
|
2171
|
-
transition:
|
|
2172
|
-
transform var(--_duration) var(--_easing);
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
/* Chevron rotates when open */
|
|
2176
|
-
:where(ui-nav-group) > :where(details[open]) > :where(summary)::after {
|
|
2177
|
-
transform: rotate(180deg);
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
/* ── Selected group — has a child with aria-current ── */
|
|
2181
|
-
|
|
2182
|
-
:where(ui-nav-group):state(has-selection) > :where(details) > :where(summary) :where(ui-nav-group-header) {
|
|
2183
|
-
color: var(--_ink-strong);
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
/* ── Summary Hover ── */
|
|
2187
|
-
|
|
2188
|
-
:where(ui-nav-group) > :where(details) > :where(summary):hover :where(ui-nav-group-header),
|
|
2189
|
-
:where(ui-nav-group[force-hover]) > :where(details) > :where(summary) :where(ui-nav-group-header) {
|
|
2190
|
-
color: var(--_ink-strong);
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
/* ── Summary Focus ── */
|
|
2194
|
-
|
|
2195
|
-
:where(ui-nav-group) > :where(details) > :where(summary):focus-visible,
|
|
2196
|
-
:where(ui-nav-group[force-focus-visible]) > :where(details) > :where(summary) {
|
|
2197
|
-
outline: 2px solid var(--ui-focus-ring);
|
|
2198
|
-
outline-offset: -2px;
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
/* ── Vertical connector line (icon groups only) ── */
|
|
2202
|
-
/* WHY: Connector draws from below the header to the bottom of the group.
|
|
2203
|
-
Only shown when header contains an icon. Scoped via :has(). */
|
|
2204
|
-
|
|
2205
|
-
/* WHY: Insets account for the summary's padding-inline so the connector
|
|
2206
|
-
line passes through the icon center and child text aligns with header text. */
|
|
2207
|
-
:where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)) {
|
|
2208
|
-
--_group-pad: calc(var(--_space-k) * var(--_space));
|
|
2209
|
-
--_group-icon-well: 1.5rem;
|
|
2210
|
-
--_group-line-inset: calc(var(--_group-pad) + var(--_group-icon-well) / 2);
|
|
2211
|
-
--_group-child-inset: calc(var(--_group-icon-well) + var(--_space) * 2);
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2214
|
-
:where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open]))::after {
|
|
2215
|
-
content: '';
|
|
2216
|
-
position: absolute;
|
|
2217
|
-
inset-inline-start: var(--_group-line-inset);
|
|
2218
|
-
top: var(--_min-height);
|
|
2219
|
-
bottom: 0;
|
|
2220
|
-
width: 1px;
|
|
2221
|
-
background: var(--_border-muted);
|
|
2222
|
-
pointer-events: none;
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
/* ── Sliding indicator (same pattern as vertical tabs) ── */
|
|
2226
|
-
/* WHY: A ::before pseudo on the group slides along the connector line.
|
|
2227
|
-
JS sets --_indicator-index; :state(has-selection) gates visibility. */
|
|
2228
|
-
|
|
2229
|
-
:where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open])):state(has-selection)::before {
|
|
2230
|
-
content: '';
|
|
2231
|
-
position: absolute;
|
|
2232
|
-
z-index: 1;
|
|
2233
|
-
inset-inline-start: calc(var(--_group-line-inset, 0px) - 0.5px);
|
|
2234
|
-
top: var(--_min-height);
|
|
2235
|
-
height: var(--_min-height);
|
|
2236
|
-
width: 2px;
|
|
2237
|
-
border-radius: 1px;
|
|
2238
|
-
background: var(--_surface);
|
|
2239
|
-
pointer-events: none;
|
|
2240
|
-
transform: translateY(calc(var(--_indicator-index) * var(--_min-height)));
|
|
2241
|
-
|
|
2242
|
-
transition:
|
|
2243
|
-
transform var(--_duration) var(--_easing),
|
|
2244
|
-
background var(--_duration) var(--_easing);
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
/* ── Grouped Child Items ── */
|
|
2248
|
-
/* WHY: When header has an icon, margin-inline-start = icon-size + gap
|
|
2249
|
-
so item text aligns with header text past the icon.
|
|
2250
|
-
Items are inside <details> after the <summary>. */
|
|
2251
|
-
|
|
2252
|
-
:where(ui-nav-group) > :where(details) > :where(ui-nav-item) {
|
|
2253
|
-
margin-inline-start: var(--_group-child-inset, 0);
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
/* ── Nav Group Flyout (collapsed sidebar) ── */
|
|
2257
|
-
/* WHY: In collapsed mode, summary click opens a ui-listbox popover to the right
|
|
2258
|
-
instead of expanding the <details>. Same pattern as sidebar-trigger menus. */
|
|
2259
|
-
|
|
2260
|
-
:where(ui-nav-group) > :where(ui-listbox.nav-group-flyout[popover]) {
|
|
2261
|
-
--_popover-origin: left center;
|
|
2262
|
-
--_popover-from: perspective(800px) scale(0.96) rotateY(20deg);
|
|
2263
|
-
|
|
2264
|
-
position: fixed;
|
|
2265
|
-
position-area: inline-end span-block-end;
|
|
2266
|
-
position-try-fallbacks: --nav-flyout-flip-up;
|
|
2267
|
-
margin-block: var(--ui-popover-viewport-margin);
|
|
2268
|
-
margin-inline: 0;
|
|
2269
|
-
margin-inline-start: var(--ui-popover-gap);
|
|
2270
|
-
min-width: 200px;
|
|
2271
|
-
max-height: var(--ui-popover-max-height);
|
|
2272
|
-
overflow-y: auto;
|
|
2273
|
-
}
|
|
2274
|
-
|
|
2275
|
-
@position-try --nav-flyout-flip-up {
|
|
2276
|
-
position-area: inline-end span-block-start;
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
@position-try --nav-flyout-flip-down {
|
|
2280
|
-
position-area: inline-end span-block-end;
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
/* ── Container Query: Collapsed Sidebar ── */
|
|
2284
|
-
/* WHY: Nav components own their own collapsed behavior via @container.
|
|
2285
|
-
The sidebar aside declares container-name: sidebar. When it shrinks
|
|
2286
|
-
to 48px (icon rail), nav responds to the width — not to [collapsed].
|
|
2287
|
-
Threshold 80px: collapsed = 48px, min expanded = 160px. */
|
|
2288
|
-
|
|
2289
|
-
@container sidebar (max-width: 80px) {
|
|
2290
|
-
|
|
2291
|
-
/* Nav items hide entirely — only group headers (with icons) remain. */
|
|
2292
|
-
:where(ui-nav-item) {
|
|
2293
|
-
display: none;
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
/* Summary shrinks to icon-only. Reduced inline padding wraps tightly
|
|
2297
|
-
around the icon; parent align-items: center handles horizontal centering. */
|
|
2298
|
-
:where(ui-nav-group) > :where(details) > :where(summary) {
|
|
2299
|
-
padding-inline: var(--_space);
|
|
2300
|
-
border-radius: var(--_radius);
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
/* Hide chevron — no expand/collapse in icon rail (flyout instead). */
|
|
2304
|
-
:where(ui-nav-group) > :where(details) > :where(summary)::after {
|
|
2305
|
-
display: none;
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
/* Hide vertical connector line and sliding indicator. */
|
|
2309
|
-
:where(ui-nav-group)::after,
|
|
2310
|
-
:where(ui-nav-group)::before {
|
|
2311
|
-
display: none;
|
|
2312
|
-
}
|
|
2313
|
-
|
|
2314
|
-
/* Header collapses to icon-only. font-size: 0 hides text nodes
|
|
2315
|
-
(can't be targeted by CSS). Icon overrides back to normal below. */
|
|
2316
|
-
:where(ui-nav-group-header) {
|
|
2317
|
-
flex: 0 0 auto;
|
|
2318
|
-
font-size: 0;
|
|
2319
|
-
gap: 0;
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
|
-
:where(ui-nav-group-header) :where(.icon-well) :where(ui-icon) {
|
|
2323
|
-
font-size: var(--_font-size, 1rem);
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
/* WHY: In collapsed mode the group is a small icon — centering
|
|
2327
|
-
the flyout vertically with the anchor is more natural than top-aligning.
|
|
2328
|
-
Fallbacks handle viewport clipping (top/bottom edge). */
|
|
2329
|
-
:where(ui-nav-group) > :where(ui-listbox.nav-group-flyout[popover]) {
|
|
2330
|
-
position-area: inline-end;
|
|
2331
|
-
position-try-fallbacks: --nav-flyout-flip-up, --nav-flyout-flip-down;
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
|
-
/* Collapse inter-group spacing in icon rail. */
|
|
2335
|
-
:where(ui-nav-group) + :where(ui-nav-group) {
|
|
2336
|
-
margin-block-start: 0;
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
1997
|
@layer ui {
|
|
2343
1998
|
|
|
2344
1999
|
/* ── Pagination Container ── */
|
|
@@ -4592,589 +4247,6 @@
|
|
|
4592
4247
|
|
|
4593
4248
|
}
|
|
4594
4249
|
|
|
4595
|
-
@layer ui {
|
|
4596
|
-
|
|
4597
|
-
/* ╭──────────────────────────────────────────────────────────╮
|
|
4598
|
-
│ ui-layout-body │
|
|
4599
|
-
│ Rounded, padded, scrollable content surface. │
|
|
4600
|
-
│ Fills remaining flex space inside ui-layout-canvas. │
|
|
4601
|
-
╰──────────────────────────────────────────────────────────╯ */
|
|
4602
|
-
|
|
4603
|
-
:where(ui-layout-body) {
|
|
4604
|
-
display: flex;
|
|
4605
|
-
flex: 1;
|
|
4606
|
-
min-width: 0;
|
|
4607
|
-
flex-direction: column;
|
|
4608
|
-
overflow-y: auto;
|
|
4609
|
-
scrollbar-width: none;
|
|
4610
|
-
background: var(--_ground, var(--_panel));
|
|
4611
|
-
border-radius: var(--_radius);
|
|
4612
|
-
padding: calc(var(--_space-k) * var(--_space));
|
|
4613
|
-
}
|
|
4614
|
-
|
|
4615
|
-
:where(ui-layout-body)[show-scrollbar] {
|
|
4616
|
-
scrollbar-width: thin;
|
|
4617
|
-
}
|
|
4618
|
-
|
|
4619
|
-
}
|
|
4620
|
-
|
|
4621
|
-
@layer ui {
|
|
4622
|
-
|
|
4623
|
-
/* ╭──────────────────────────────────────────────────────────╮
|
|
4624
|
-
│ ui-layout-breadcrumb │
|
|
4625
|
-
│ Grid bar with leading / label / trailing slots. │
|
|
4626
|
-
│ Same slot pattern as ui-header. │
|
|
4627
|
-
╰──────────────────────────────────────────────────────────╯ */
|
|
4628
|
-
|
|
4629
|
-
/* ── Base ── */
|
|
4630
|
-
|
|
4631
|
-
:where(ui-layout-breadcrumb) {
|
|
4632
|
-
display: grid;
|
|
4633
|
-
grid-template-columns: 1fr;
|
|
4634
|
-
align-items: center;
|
|
4635
|
-
min-height: var(--ui-layout-bar-height);
|
|
4636
|
-
gap: calc(var(--_space) * 2);
|
|
4637
|
-
padding-block: var(--_space);
|
|
4638
|
-
padding-inline: calc(var(--_space-k) * var(--_space));
|
|
4639
|
-
flex-shrink: 0;
|
|
4640
|
-
min-width: 0;
|
|
4641
|
-
}
|
|
4642
|
-
|
|
4643
|
-
/* ── Slots ── */
|
|
4644
|
-
|
|
4645
|
-
:where(ui-layout-breadcrumb):has(> [slot="leading"]):has(> [slot="trailing"]) {
|
|
4646
|
-
grid-template-columns: auto 1fr auto;
|
|
4647
|
-
}
|
|
4648
|
-
|
|
4649
|
-
:where(ui-layout-breadcrumb):has(> [slot="leading"]):not(:has(> [slot="trailing"])) {
|
|
4650
|
-
grid-template-columns: auto 1fr;
|
|
4651
|
-
}
|
|
4652
|
-
|
|
4653
|
-
:where(ui-layout-breadcrumb):not(:has(> [slot="leading"])):has(> [slot="trailing"]) {
|
|
4654
|
-
grid-template-columns: 1fr auto;
|
|
4655
|
-
}
|
|
4656
|
-
|
|
4657
|
-
:where(ui-layout-breadcrumb) > :where([slot="leading"]) {
|
|
4658
|
-
display: flex;
|
|
4659
|
-
align-items: center;
|
|
4660
|
-
gap: calc(var(--_space) * 2);
|
|
4661
|
-
}
|
|
4662
|
-
|
|
4663
|
-
:where(ui-layout-breadcrumb) > :where([slot="label"]),
|
|
4664
|
-
:where(ui-layout-breadcrumb) > :where(:not([slot])) {
|
|
4665
|
-
min-width: 0;
|
|
4666
|
-
}
|
|
4667
|
-
|
|
4668
|
-
:where(ui-layout-breadcrumb) > :where([slot="trailing"]) {
|
|
4669
|
-
display: flex;
|
|
4670
|
-
align-items: center;
|
|
4671
|
-
gap: calc(var(--_space) * 2);
|
|
4672
|
-
}
|
|
4673
|
-
|
|
4674
|
-
}
|
|
4675
|
-
|
|
4676
|
-
@layer ui {
|
|
4677
|
-
|
|
4678
|
-
/* ╭──────────────────────────────────────────────────────────╮
|
|
4679
|
-
│ ui-layout-canvas │
|
|
4680
|
-
│ Structural flex row for body + chat panels. │
|
|
4681
|
-
│ No background, no radius — purely layout. │
|
|
4682
|
-
╰──────────────────────────────────────────────────────────╯ */
|
|
4683
|
-
|
|
4684
|
-
:where(ui-layout-canvas) {
|
|
4685
|
-
display: flex;
|
|
4686
|
-
flex: 1;
|
|
4687
|
-
min-height: 0;
|
|
4688
|
-
padding: 0 calc(var(--_space-k) * var(--_space)) calc(var(--_space-k) * var(--_space));
|
|
4689
|
-
}
|
|
4690
|
-
|
|
4691
|
-
}
|
|
4692
|
-
|
|
4693
|
-
@layer ui {
|
|
4694
|
-
|
|
4695
|
-
/* ╭──────────────────────────────────────────────────────────╮
|
|
4696
|
-
│ ui-layout-chat │
|
|
4697
|
-
│ Rounded, padded, scrollable right panel. │
|
|
4698
|
-
│ Hidden by default — shown via [open] attribute. │
|
|
4699
|
-
╰──────────────────────────────────────────────────────────╯ */
|
|
4700
|
-
|
|
4701
|
-
:where(ui-layout-chat) {
|
|
4702
|
-
position: relative;
|
|
4703
|
-
display: flex;
|
|
4704
|
-
flex-direction: column;
|
|
4705
|
-
width: 0;
|
|
4706
|
-
min-width: 0;
|
|
4707
|
-
max-width: 480px;
|
|
4708
|
-
overflow: clip;
|
|
4709
|
-
scrollbar-width: none;
|
|
4710
|
-
background: var(--_ground, var(--_panel));
|
|
4711
|
-
border-radius: var(--_radius);
|
|
4712
|
-
padding: 0;
|
|
4713
|
-
transition:
|
|
4714
|
-
width var(--_duration) var(--_easing),
|
|
4715
|
-
min-width var(--_duration) var(--_easing),
|
|
4716
|
-
padding var(--_duration) var(--_easing),
|
|
4717
|
-
margin var(--_duration) var(--_easing);
|
|
4718
|
-
}
|
|
4719
|
-
|
|
4720
|
-
:where(ui-layout-chat[open]) {
|
|
4721
|
-
width: 360px;
|
|
4722
|
-
min-width: 280px;
|
|
4723
|
-
margin-inline-start: calc(var(--_space) * 2);
|
|
4724
|
-
overflow-y: auto;
|
|
4725
|
-
padding: calc(var(--_space-k) * var(--_space));
|
|
4726
|
-
}
|
|
4727
|
-
|
|
4728
|
-
/* WHY: When ui-chat manages its own sub-container padding and scroll,
|
|
4729
|
-
the layout container delegates — no own padding, no own scroll.
|
|
4730
|
-
overflow: visible lets CSS anchor-positioned popovers (ui-select etc.)
|
|
4731
|
-
resolve through to the top layer. */
|
|
4732
|
-
:where(ui-layout-chat[open]):has(> ui-chat) {
|
|
4733
|
-
padding: 0;
|
|
4734
|
-
overflow: visible;
|
|
4735
|
-
}
|
|
4736
|
-
|
|
4737
|
-
/* WHY: Disable width transition while dragging — it fights the pointer. */
|
|
4738
|
-
:where(ui-layout-chat[resizing]) {
|
|
4739
|
-
transition: none;
|
|
4740
|
-
}
|
|
4741
|
-
|
|
4742
|
-
:where(ui-layout-chat)[show-scrollbar] {
|
|
4743
|
-
scrollbar-width: thin;
|
|
4744
|
-
}
|
|
4745
|
-
|
|
4746
|
-
/* ── Resize Handle ── */
|
|
4747
|
-
|
|
4748
|
-
:where(ui-layout-chat) :where(.layout-resize-handle) {
|
|
4749
|
-
position: absolute;
|
|
4750
|
-
top: 0;
|
|
4751
|
-
left: 0;
|
|
4752
|
-
width: 4px;
|
|
4753
|
-
height: 100%;
|
|
4754
|
-
cursor: col-resize;
|
|
4755
|
-
z-index: 1;
|
|
4756
|
-
}
|
|
4757
|
-
|
|
4758
|
-
:where(ui-layout-chat) :where(.layout-resize-handle):hover,
|
|
4759
|
-
:where(ui-layout-chat[resizing]) :where(.layout-resize-handle) {
|
|
4760
|
-
background: var(--_border-muted);
|
|
4761
|
-
}
|
|
4762
|
-
|
|
4763
|
-
}
|
|
4764
|
-
|
|
4765
|
-
@layer ui {
|
|
4766
|
-
|
|
4767
|
-
/* ╭──────────────────────────────────────────────────────────╮
|
|
4768
|
-
│ ui-layout-inspector │
|
|
4769
|
-
│ Rounded, padded, scrollable right panel. │
|
|
4770
|
-
│ Hidden by default — shown via [open] attribute. │
|
|
4771
|
-
╰──────────────────────────────────────────────────────────╯ */
|
|
4772
|
-
|
|
4773
|
-
:where(ui-layout-inspector) {
|
|
4774
|
-
position: relative;
|
|
4775
|
-
display: flex;
|
|
4776
|
-
flex-direction: column;
|
|
4777
|
-
width: 0;
|
|
4778
|
-
min-width: 0;
|
|
4779
|
-
max-width: 480px;
|
|
4780
|
-
overflow: clip;
|
|
4781
|
-
scrollbar-width: none;
|
|
4782
|
-
background: var(--_ground, var(--_panel));
|
|
4783
|
-
border-radius: var(--_radius);
|
|
4784
|
-
padding: 0;
|
|
4785
|
-
transition:
|
|
4786
|
-
width var(--_duration) var(--_easing),
|
|
4787
|
-
min-width var(--_duration) var(--_easing),
|
|
4788
|
-
padding var(--_duration) var(--_easing),
|
|
4789
|
-
margin var(--_duration) var(--_easing);
|
|
4790
|
-
}
|
|
4791
|
-
|
|
4792
|
-
:where(ui-layout-inspector[open]) {
|
|
4793
|
-
width: 360px;
|
|
4794
|
-
min-width: 280px;
|
|
4795
|
-
margin-inline-start: calc(var(--_space) * 2);
|
|
4796
|
-
overflow-y: auto;
|
|
4797
|
-
padding: calc(var(--_space-k) * var(--_space));
|
|
4798
|
-
}
|
|
4799
|
-
|
|
4800
|
-
:where(ui-layout-inspector[resizing]) {
|
|
4801
|
-
transition: none;
|
|
4802
|
-
}
|
|
4803
|
-
|
|
4804
|
-
:where(ui-layout-inspector)[show-scrollbar] {
|
|
4805
|
-
scrollbar-width: thin;
|
|
4806
|
-
}
|
|
4807
|
-
|
|
4808
|
-
/* ── Resize Handle ── */
|
|
4809
|
-
|
|
4810
|
-
:where(ui-layout-inspector) :where(.layout-resize-handle) {
|
|
4811
|
-
position: absolute;
|
|
4812
|
-
top: 0;
|
|
4813
|
-
left: 0;
|
|
4814
|
-
width: 4px;
|
|
4815
|
-
height: 100%;
|
|
4816
|
-
cursor: col-resize;
|
|
4817
|
-
z-index: 1;
|
|
4818
|
-
}
|
|
4819
|
-
|
|
4820
|
-
:where(ui-layout-inspector) :where(.layout-resize-handle):hover,
|
|
4821
|
-
:where(ui-layout-inspector[resizing]) :where(.layout-resize-handle) {
|
|
4822
|
-
background: var(--_border-muted);
|
|
4823
|
-
}
|
|
4824
|
-
|
|
4825
|
-
}
|
|
4826
|
-
|
|
4827
|
-
@layer ui {
|
|
4828
|
-
|
|
4829
|
-
/* ╭──────────────────────────────────────────────────────────╮
|
|
4830
|
-
│ ui-layout-sidebar │
|
|
4831
|
-
│ Full-page layout: collapsible/resizable sidebar aside │
|
|
4832
|
-
│ + content column (breadcrumb, canvas, body, chat). │
|
|
4833
|
-
╰──────────────────────────────────────────────────────────╯ */
|
|
4834
|
-
|
|
4835
|
-
/* ── Outer Layout ── */
|
|
4836
|
-
|
|
4837
|
-
:where(ui-layout-sidebar) {
|
|
4838
|
-
display: flex;
|
|
4839
|
-
height: 100dvh;
|
|
4840
|
-
}
|
|
4841
|
-
|
|
4842
|
-
/* WHY: Reserve sidebar width before JS builds the DOM — prevents layout shift.
|
|
4843
|
-
Collapsed state is read synchronously in the constructor so CSS matches immediately.
|
|
4844
|
-
Replaced by the real aside once [data-ready] is set. */
|
|
4845
|
-
:where(ui-layout-sidebar):not([data-ready]):not([collapsed])::before {
|
|
4846
|
-
content: '';
|
|
4847
|
-
width: var(--ui-layout-sidebar-width);
|
|
4848
|
-
flex-shrink: 0;
|
|
4849
|
-
background: var(--_body);
|
|
4850
|
-
border-right: 1px solid var(--_border-muted);
|
|
4851
|
-
}
|
|
4852
|
-
|
|
4853
|
-
:where(ui-layout-sidebar):not([data-ready])[collapsed]::before {
|
|
4854
|
-
content: '';
|
|
4855
|
-
width: 48px;
|
|
4856
|
-
flex-shrink: 0;
|
|
4857
|
-
background: var(--_body);
|
|
4858
|
-
border-right: 1px solid var(--_border-muted);
|
|
4859
|
-
}
|
|
4860
|
-
|
|
4861
|
-
/* ── Content Column ── */
|
|
4862
|
-
/* WHY: Everything except the aside forms a flex column. */
|
|
4863
|
-
|
|
4864
|
-
:where(ui-layout-sidebar) > :where(:not([slot])) {
|
|
4865
|
-
flex: 1 1 0%;
|
|
4866
|
-
min-width: 0;
|
|
4867
|
-
min-height: 0;
|
|
4868
|
-
display: flex;
|
|
4869
|
-
flex-direction: column;
|
|
4870
|
-
padding: 0;
|
|
4871
|
-
}
|
|
4872
|
-
|
|
4873
|
-
/* ── Sidebar Aside ── */
|
|
4874
|
-
/* WHY: position: relative creates the containing block for absolute
|
|
4875
|
-
header/footer overlays. Content fills the full height and scrolls
|
|
4876
|
-
underneath the pinned header/footer. */
|
|
4877
|
-
|
|
4878
|
-
:where(ui-layout-sidebar) > :where([slot="sidebar"]) {
|
|
4879
|
-
--_sidebar-header-height: 0px;
|
|
4880
|
-
--_sidebar-footer-height: 0px;
|
|
4881
|
-
|
|
4882
|
-
container-name: sidebar;
|
|
4883
|
-
container-type: inline-size;
|
|
4884
|
-
position: sticky;
|
|
4885
|
-
top: 0;
|
|
4886
|
-
width: var(--ui-layout-sidebar-width);
|
|
4887
|
-
min-width: 160px;
|
|
4888
|
-
max-width: 400px;
|
|
4889
|
-
height: 100dvh;
|
|
4890
|
-
display: block;
|
|
4891
|
-
transition: width var(--_duration) var(--_easing), min-width var(--_duration) var(--_easing);
|
|
4892
|
-
overflow: hidden;
|
|
4893
|
-
z-index: 10;
|
|
4894
|
-
}
|
|
4895
|
-
|
|
4896
|
-
/* WHY: Disable width transition while dragging — it fights the pointer. */
|
|
4897
|
-
:where(ui-layout-sidebar) > :where([slot="sidebar"][resizing]) {
|
|
4898
|
-
transition: none;
|
|
4899
|
-
}
|
|
4900
|
-
|
|
4901
|
-
/* ── Collapsed Icon Rail ── */
|
|
4902
|
-
/* WHY: Collapsed = icon rail, not fully hidden. 48px fits icons (1rem) + padding.
|
|
4903
|
-
[collapsed] drives the aside to 48px which triggers @container sidebar queries
|
|
4904
|
-
in this file and in child component CSS (ui-nav.css, etc.). */
|
|
4905
|
-
|
|
4906
|
-
:where(ui-layout-sidebar)[collapsed] > :where([slot="sidebar"]) {
|
|
4907
|
-
width: 48px;
|
|
4908
|
-
min-width: 48px;
|
|
4909
|
-
}
|
|
4910
|
-
|
|
4911
|
-
/* ── Resize Handle ── */
|
|
4912
|
-
|
|
4913
|
-
:where(ui-layout-sidebar) :where(.layout-resize-handle) {
|
|
4914
|
-
position: absolute;
|
|
4915
|
-
top: 0;
|
|
4916
|
-
right: 0;
|
|
4917
|
-
width: 4px;
|
|
4918
|
-
height: 100%;
|
|
4919
|
-
cursor: col-resize;
|
|
4920
|
-
z-index: 1;
|
|
4921
|
-
}
|
|
4922
|
-
|
|
4923
|
-
:where(ui-layout-sidebar) :where(.layout-resize-handle):hover,
|
|
4924
|
-
:where(ui-layout-sidebar) > :where([slot="sidebar"][resizing]) :where(.layout-resize-handle) {
|
|
4925
|
-
background: var(--_border-muted);
|
|
4926
|
-
}
|
|
4927
|
-
|
|
4928
|
-
/* WHY: When collapsed to icon rail, the sidebar edge meets content — drop left padding. */
|
|
4929
|
-
|
|
4930
|
-
:where(ui-layout-sidebar)[collapsed] :where(ui-layout-canvas) {
|
|
4931
|
-
padding-inline-start: 0;
|
|
4932
|
-
}
|
|
4933
|
-
|
|
4934
|
-
:where(ui-layout-sidebar)[collapsed] :where(ui-layout-breadcrumb) {
|
|
4935
|
-
padding-inline-start: 0;
|
|
4936
|
-
}
|
|
4937
|
-
|
|
4938
|
-
/* ── Sidebar Header ── */
|
|
4939
|
-
/* WHY: Absolute-positioned overlay pinned to top of aside. Content scrolls
|
|
4940
|
-
underneath it. z-index: 2 sits above content (z-index: 0). */
|
|
4941
|
-
|
|
4942
|
-
:where(ui-layout-sidebar-header) {
|
|
4943
|
-
position: absolute;
|
|
4944
|
-
top: 0;
|
|
4945
|
-
left: 0;
|
|
4946
|
-
right: 0;
|
|
4947
|
-
z-index: 2;
|
|
4948
|
-
display: flex;
|
|
4949
|
-
flex-direction: column;
|
|
4950
|
-
}
|
|
4951
|
-
|
|
4952
|
-
/* ── Sidebar Content ── */
|
|
4953
|
-
/* WHY: Full height of the aside, scrollable. Padding-block offsets keep
|
|
4954
|
-
content from starting behind header / ending behind footer.
|
|
4955
|
-
Fade-out alpha mask dissolves content edges under the overlays. */
|
|
4956
|
-
|
|
4957
|
-
:where(ui-layout-sidebar-content) {
|
|
4958
|
-
display: flex;
|
|
4959
|
-
flex-direction: column;
|
|
4960
|
-
padding-block-start: var(--_sidebar-header-height);
|
|
4961
|
-
padding-block-end: var(--_sidebar-footer-height);
|
|
4962
|
-
width: 100%;
|
|
4963
|
-
height: 100%;
|
|
4964
|
-
overflow-y: auto;
|
|
4965
|
-
scrollbar-width: none;
|
|
4966
|
-
}
|
|
4967
|
-
|
|
4968
|
-
/* WHY: When header is present, fade top edge. Content dissolves as it
|
|
4969
|
-
scrolls under the header — transparent at top, fully visible by 1.25×
|
|
4970
|
-
the header height. No opaque header background needed. */
|
|
4971
|
-
:where(ui-layout-sidebar-content)[data-has-header] {
|
|
4972
|
-
mask-image: linear-gradient(
|
|
4973
|
-
to bottom,
|
|
4974
|
-
transparent 0,
|
|
4975
|
-
black calc(var(--_sidebar-header-height) * 1.25),
|
|
4976
|
-
black 100%
|
|
4977
|
-
);
|
|
4978
|
-
}
|
|
4979
|
-
|
|
4980
|
-
/* WHY: When footer is present, fade bottom edge. */
|
|
4981
|
-
:where(ui-layout-sidebar-content)[data-has-footer] {
|
|
4982
|
-
mask-image: linear-gradient(
|
|
4983
|
-
to bottom,
|
|
4984
|
-
black 0,
|
|
4985
|
-
black calc(100% - var(--_sidebar-footer-height) * 1.25),
|
|
4986
|
-
transparent 100%
|
|
4987
|
-
);
|
|
4988
|
-
}
|
|
4989
|
-
|
|
4990
|
-
/* WHY: When both header AND footer are present, fade both edges. */
|
|
4991
|
-
:where(ui-layout-sidebar-content)[data-has-header][data-has-footer] {
|
|
4992
|
-
mask-image: linear-gradient(
|
|
4993
|
-
to bottom,
|
|
4994
|
-
transparent 0,
|
|
4995
|
-
black calc(var(--_sidebar-header-height) * 1.25),
|
|
4996
|
-
black calc(100% - var(--_sidebar-footer-height) * 1.25),
|
|
4997
|
-
transparent 100%
|
|
4998
|
-
);
|
|
4999
|
-
}
|
|
5000
|
-
|
|
5001
|
-
/* ── Sidebar Footer ── */
|
|
5002
|
-
/* WHY: Absolute-positioned overlay pinned to bottom of aside. */
|
|
5003
|
-
|
|
5004
|
-
:where(ui-layout-sidebar-footer) {
|
|
5005
|
-
position: absolute;
|
|
5006
|
-
bottom: 0;
|
|
5007
|
-
left: 0;
|
|
5008
|
-
right: 0;
|
|
5009
|
-
z-index: 2;
|
|
5010
|
-
display: flex;
|
|
5011
|
-
flex-direction: column;
|
|
5012
|
-
}
|
|
5013
|
-
|
|
5014
|
-
/* ── Sidebar Item ── */
|
|
5015
|
-
/* WHY: Universal sidebar row element. Provides inline padding for any content
|
|
5016
|
-
(buttons, links, icons). When a child ui-listbox[popover] is present, JS
|
|
5017
|
-
wires PopoverController for click-to-toggle menu behavior.
|
|
5018
|
-
Absorbs the old ui-layout-sidebar-trigger role — one element for all rows. */
|
|
5019
|
-
|
|
5020
|
-
:where(ui-layout-sidebar-item) {
|
|
5021
|
-
display: flex;
|
|
5022
|
-
align-items: center;
|
|
5023
|
-
flex: 1;
|
|
5024
|
-
min-width: 0;
|
|
5025
|
-
gap: calc(var(--_space) * 2);
|
|
5026
|
-
min-height: var(--_min-height);
|
|
5027
|
-
font-size: var(--_font-size);
|
|
5028
|
-
font-weight: var(--ui-font-weight-button);
|
|
5029
|
-
letter-spacing: var(--_letter-spacing);
|
|
5030
|
-
line-height: var(--ui-line-height-control);
|
|
5031
|
-
color: var(--_ink);
|
|
5032
|
-
cursor: pointer;
|
|
5033
|
-
user-select: none;
|
|
5034
|
-
border: none;
|
|
5035
|
-
background: none;
|
|
5036
|
-
padding-block: var(--_space);
|
|
5037
|
-
padding-inline: calc(var(--_space-k) * var(--_space));
|
|
5038
|
-
border-radius: var(--_radius);
|
|
5039
|
-
transition: color var(--_duration) var(--_easing);
|
|
5040
|
-
}
|
|
5041
|
-
|
|
5042
|
-
/* WHY: Items in header/footer match the breadcrumb bar height so the
|
|
5043
|
-
first sidebar row aligns horizontally with the breadcrumb. */
|
|
5044
|
-
:where(ui-layout-sidebar-header) > :where(ui-layout-sidebar-item),
|
|
5045
|
-
:where(ui-layout-sidebar-footer) > :where(ui-layout-sidebar-item) {
|
|
5046
|
-
min-height: var(--ui-layout-bar-height);
|
|
5047
|
-
}
|
|
5048
|
-
|
|
5049
|
-
:where(ui-layout-sidebar-item):hover,
|
|
5050
|
-
:where(ui-layout-sidebar-item)[force-hover] {
|
|
5051
|
-
color: var(--_ink-strong);
|
|
5052
|
-
}
|
|
5053
|
-
|
|
5054
|
-
:where(ui-layout-sidebar-item):focus-visible,
|
|
5055
|
-
:where(ui-layout-sidebar-item)[force-focus-visible] {
|
|
5056
|
-
outline: 2px solid var(--ui-focus-ring);
|
|
5057
|
-
outline-offset: -2px;
|
|
5058
|
-
}
|
|
5059
|
-
|
|
5060
|
-
/* WHY: Fixed-size icon well so all sidebar icons (header logo, nav group icons,
|
|
5061
|
-
standalone icons) center-align on the same column width regardless of intrinsic
|
|
5062
|
-
icon size. 1.5rem matches the sidebar's visual rhythm at default density.
|
|
5063
|
-
Consumer wraps the icon: <span slot="icon"><ui-icon name="..."></ui-icon></span>
|
|
5064
|
-
The wrapper is the well; the icon keeps its own --ui-icon-size dimensions. */
|
|
5065
|
-
:where(ui-layout-sidebar-item) > :where([slot="icon"]) {
|
|
5066
|
-
display: inline-flex;
|
|
5067
|
-
align-items: center;
|
|
5068
|
-
justify-content: center;
|
|
5069
|
-
width: 1.5rem;
|
|
5070
|
-
height: 1.5rem;
|
|
5071
|
-
flex-shrink: 0;
|
|
5072
|
-
}
|
|
5073
|
-
|
|
5074
|
-
/* WHY: Trailing caret pushes to end — same pattern as button justify="spread". */
|
|
5075
|
-
:where(ui-layout-sidebar-item) > :where([slot="trailing"]) {
|
|
5076
|
-
margin-inline-start: auto;
|
|
5077
|
-
flex-shrink: 0;
|
|
5078
|
-
color: var(--_ink-muted);
|
|
5079
|
-
}
|
|
5080
|
-
|
|
5081
|
-
/* WHY: When the item wraps a sub-component (e.g. ui-button) that provides
|
|
5082
|
-
its own icon, hide [slot="icon"] in expanded mode — it only serves as the
|
|
5083
|
-
bare collapsed-rail representation. Items without sub-components (just
|
|
5084
|
-
icon + label + trailing) keep [slot="icon"] visible in both modes. */
|
|
5085
|
-
:where(ui-layout-sidebar-item:has(> ui-button)) > :where([slot="icon"]) {
|
|
5086
|
-
display: none;
|
|
5087
|
-
}
|
|
5088
|
-
|
|
5089
|
-
/* WHY: Title text truncates when sidebar narrows during resize. */
|
|
5090
|
-
:where(ui-layout-sidebar-item) > :where([slot="label"]) {
|
|
5091
|
-
flex: 1;
|
|
5092
|
-
min-width: 0;
|
|
5093
|
-
white-space: nowrap;
|
|
5094
|
-
overflow: hidden;
|
|
5095
|
-
text-overflow: ellipsis;
|
|
5096
|
-
}
|
|
5097
|
-
|
|
5098
|
-
/* ── Item Popover ── */
|
|
5099
|
-
/* WHY: Popover opens to the right of the sidebar item.
|
|
5100
|
-
Default: top-aligned, grows downward (span-block-end).
|
|
5101
|
-
Flip: bottom-aligned, grows upward (span-block-start). */
|
|
5102
|
-
|
|
5103
|
-
:where(ui-layout-sidebar-item) > :where(ui-listbox[popover]) {
|
|
5104
|
-
--_popover-origin: left center;
|
|
5105
|
-
--_popover-from: perspective(800px) scale(0.96) rotateY(20deg);
|
|
5106
|
-
|
|
5107
|
-
position: fixed;
|
|
5108
|
-
position-area: inline-end span-block-end;
|
|
5109
|
-
position-try-fallbacks: --sidebar-item-flip-up;
|
|
5110
|
-
margin-block: var(--ui-popover-viewport-margin);
|
|
5111
|
-
margin-inline: 0;
|
|
5112
|
-
margin-inline-start: var(--ui-popover-gap);
|
|
5113
|
-
min-width: 200px;
|
|
5114
|
-
max-height: var(--ui-popover-max-height);
|
|
5115
|
-
overflow-y: auto;
|
|
5116
|
-
}
|
|
5117
|
-
|
|
5118
|
-
@position-try --sidebar-item-flip-up {
|
|
5119
|
-
position-area: inline-end span-block-start;
|
|
5120
|
-
}
|
|
5121
|
-
|
|
5122
|
-
@position-try --sidebar-item-flip-down {
|
|
5123
|
-
position-area: inline-end span-block-end;
|
|
5124
|
-
}
|
|
5125
|
-
|
|
5126
|
-
/* ── Container Query: Collapsed Sidebar ── */
|
|
5127
|
-
/* WHY: Each component owns its own collapsed behavior via @container.
|
|
5128
|
-
The aside is the container (container-name: sidebar). When it shrinks
|
|
5129
|
-
to 48px (icon rail), components respond to the width, not to [collapsed].
|
|
5130
|
-
Threshold 80px: collapsed = 48px, min expanded = 160px. */
|
|
5131
|
-
|
|
5132
|
-
@container sidebar (max-width: 80px) {
|
|
5133
|
-
|
|
5134
|
-
/* Resize handle — no dragging in icon rail */
|
|
5135
|
-
:where(.layout-resize-handle) {
|
|
5136
|
-
display: none;
|
|
5137
|
-
}
|
|
5138
|
-
|
|
5139
|
-
/* Header/footer — center content horizontally */
|
|
5140
|
-
:where(ui-layout-sidebar-header),
|
|
5141
|
-
:where(ui-layout-sidebar-footer) {
|
|
5142
|
-
align-items: center;
|
|
5143
|
-
}
|
|
5144
|
-
|
|
5145
|
-
/* Content — center items in the 48px rail */
|
|
5146
|
-
:where(ui-layout-sidebar-content) {
|
|
5147
|
-
align-items: center;
|
|
5148
|
-
}
|
|
5149
|
-
|
|
5150
|
-
/* Item — shrink to icon-only. Show [slot="icon"], hide everything else.
|
|
5151
|
-
WHY: Sidebar items can contain complex children (buttons with slots,
|
|
5152
|
-
links, etc.). Rather than overriding sub-component styles, the item
|
|
5153
|
-
provides its own bare icon via [slot="icon"] for the collapsed rail. */
|
|
5154
|
-
:where(ui-layout-sidebar-item) {
|
|
5155
|
-
flex: 0 0 auto;
|
|
5156
|
-
padding-inline: var(--_space);
|
|
5157
|
-
}
|
|
5158
|
-
|
|
5159
|
-
:where(ui-layout-sidebar-item) > :where([slot="icon"]) {
|
|
5160
|
-
display: inline-flex;
|
|
5161
|
-
}
|
|
5162
|
-
|
|
5163
|
-
:where(ui-layout-sidebar-item) > :where(:not([slot="icon"]):not(ui-listbox[popover]):not(.nav-group-flyout)) {
|
|
5164
|
-
display: none;
|
|
5165
|
-
}
|
|
5166
|
-
|
|
5167
|
-
/* WHY: In collapsed mode the sidebar item is a small icon — centering
|
|
5168
|
-
the popover vertically with the anchor is more natural than top-aligning.
|
|
5169
|
-
Fallbacks handle viewport clipping (top/bottom edge). */
|
|
5170
|
-
:where(ui-layout-sidebar-item) > :where(ui-listbox[popover]) {
|
|
5171
|
-
position-area: inline-end;
|
|
5172
|
-
position-try-fallbacks: --sidebar-item-flip-up, --sidebar-item-flip-down;
|
|
5173
|
-
}
|
|
5174
|
-
}
|
|
5175
|
-
|
|
5176
|
-
}
|
|
5177
|
-
|
|
5178
4250
|
@layer ui {
|
|
5179
4251
|
|
|
5180
4252
|
/* ── Base ── */
|