@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.
Files changed (79) hide show
  1. package/dist/components-lean.css +20 -941
  2. package/dist/components.css +20 -948
  3. package/dist/components.js +66 -498
  4. package/dist/core.js +121 -38
  5. package/dist/custom-elements.json +3971 -6744
  6. package/dist/foundation.css +5 -6
  7. package/dist/index.d.ts +0 -8
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/kernel.js +208 -208
  10. package/dist/native-ui-lean.css +25 -947
  11. package/dist/native-ui.css +25 -954
  12. package/dist/native-ui.js +4 -4
  13. package/dist/register-all.js +4 -4
  14. package/dist/traits/drag-controller.d.ts.map +1 -1
  15. package/dist/traits.js +3 -3
  16. package/dist/ui-icon.js +1 -1
  17. package/package.json +6 -9
  18. package/dist/components/ui-nav/index.d.ts +0 -6
  19. package/dist/components/ui-nav/index.d.ts.map +0 -1
  20. package/dist/components/ui-nav/ui-nav-element.d.ts +0 -20
  21. package/dist/components/ui-nav/ui-nav-element.d.ts.map +0 -1
  22. package/dist/components/ui-nav/ui-nav-group-element.d.ts +0 -24
  23. package/dist/components/ui-nav/ui-nav-group-element.d.ts.map +0 -1
  24. package/dist/components/ui-nav/ui-nav-group-header-element.d.ts +0 -7
  25. package/dist/components/ui-nav/ui-nav-group-header-element.d.ts.map +0 -1
  26. package/dist/components/ui-nav/ui-nav-item-element.d.ts +0 -23
  27. package/dist/components/ui-nav/ui-nav-item-element.d.ts.map +0 -1
  28. package/dist/components/ui-nav/ui-nav.d.ts +0 -2
  29. package/dist/components/ui-nav/ui-nav.d.ts.map +0 -1
  30. package/dist/containers/ui-layout-chat/index.d.ts +0 -3
  31. package/dist/containers/ui-layout-chat/index.d.ts.map +0 -1
  32. package/dist/containers/ui-layout-chat/ui-layout-chat-element.d.ts +0 -14
  33. package/dist/containers/ui-layout-chat/ui-layout-chat-element.d.ts.map +0 -1
  34. package/dist/containers/ui-layout-chat/ui-layout-chat.d.ts +0 -3
  35. package/dist/containers/ui-layout-chat/ui-layout-chat.d.ts.map +0 -1
  36. package/dist/containers/ui-layout-inspector/index.d.ts +0 -3
  37. package/dist/containers/ui-layout-inspector/index.d.ts.map +0 -1
  38. package/dist/containers/ui-layout-inspector/ui-layout-inspector-element.d.ts +0 -14
  39. package/dist/containers/ui-layout-inspector/ui-layout-inspector-element.d.ts.map +0 -1
  40. package/dist/containers/ui-layout-inspector/ui-layout-inspector.d.ts +0 -3
  41. package/dist/containers/ui-layout-inspector/ui-layout-inspector.d.ts.map +0 -1
  42. package/dist/containers/ui-layout-sidebar/index.d.ts +0 -4
  43. package/dist/containers/ui-layout-sidebar/index.d.ts.map +0 -1
  44. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts +0 -11
  45. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts.map +0 -1
  46. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item-element.d.ts +0 -10
  47. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item-element.d.ts.map +0 -1
  48. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item.d.ts +0 -3
  49. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-item.d.ts.map +0 -1
  50. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar.d.ts +0 -4
  51. package/dist/containers/ui-layout-sidebar/ui-layout-sidebar.d.ts.map +0 -1
  52. package/dist/inspector/build-inspector.d.ts +0 -8
  53. package/dist/inspector/build-inspector.d.ts.map +0 -1
  54. package/dist/inspector/index.d.ts +0 -10
  55. package/dist/inspector/index.d.ts.map +0 -1
  56. package/dist/inspector/native-tokens-color-swatch-element.d.ts +0 -15
  57. package/dist/inspector/native-tokens-color-swatch-element.d.ts.map +0 -1
  58. package/dist/inspector/native-tokens-color-swatch.d.ts +0 -3
  59. package/dist/inspector/native-tokens-color-swatch.d.ts.map +0 -1
  60. package/dist/inspector/native-tokens-colors-element.d.ts +0 -14
  61. package/dist/inspector/native-tokens-colors-element.d.ts.map +0 -1
  62. package/dist/inspector/native-tokens-colors.d.ts +0 -4
  63. package/dist/inspector/native-tokens-colors.d.ts.map +0 -1
  64. package/dist/inspector/native-tokens-inspector-element.d.ts +0 -15
  65. package/dist/inspector/native-tokens-inspector-element.d.ts.map +0 -1
  66. package/dist/inspector/native-tokens-inspector.d.ts +0 -3
  67. package/dist/inspector/native-tokens-inspector.d.ts.map +0 -1
  68. package/dist/inspector/native-tokens-themes-element.d.ts +0 -13
  69. package/dist/inspector/native-tokens-themes-element.d.ts.map +0 -1
  70. package/dist/inspector/native-tokens-themes.d.ts +0 -4
  71. package/dist/inspector/native-tokens-themes.d.ts.map +0 -1
  72. package/dist/inspector/native-tokens-variable-element.d.ts +0 -19
  73. package/dist/inspector/native-tokens-variable-element.d.ts.map +0 -1
  74. package/dist/inspector/native-tokens-variable.d.ts +0 -4
  75. package/dist/inspector/native-tokens-variable.d.ts.map +0 -1
  76. package/dist/inspector.css +0 -231
  77. package/dist/inspector.d.ts +0 -12
  78. package/dist/inspector.d.ts.map +0 -1
  79. package/dist/inspector.js +0 -609
@@ -1291,11 +1291,10 @@
1291
1291
  ui-input,
1292
1292
  ui-input-otp,
1293
1293
  ui-kbd,
1294
- ui-layout-chat,
1295
- ui-layout-inspector,
1296
- ui-layout-sidebar, ui-layout-sidebar-item,
1297
1294
  ui-listbox,
1298
- ui-nav, ui-nav-group, ui-nav-group-header, ui-nav-item,
1295
+ nui-app-panel,
1296
+ nui-sidebar, nui-sidebar-item,
1297
+ nui-sidebar-nav, nui-sidebar-group, nui-sidebar-group-header, nui-sidebar-nav-item,
1299
1298
  ui-option, ui-option-group, ui-option-group-header,
1300
1299
  ui-pagination,
1301
1300
  ui-radio, ui-radio-group,
@@ -1359,7 +1358,7 @@
1359
1358
  ui-select, ui-combobox,
1360
1359
  ui-segmented-control, ui-segment,
1361
1360
  ui-tab, ui-accordion-item,
1362
- ui-tree-item, ui-nav-item,
1361
+ ui-tree-item, nui-sidebar-nav-item,
1363
1362
  ui-breadcrumb-item, ui-table-row,
1364
1363
  ui-calendar, ui-range,
1365
1364
  ui-card, ui-slideshow
@@ -1383,7 +1382,7 @@
1383
1382
  ui-listbox, ui-command,
1384
1383
  ui-segmented-control, ui-tabs,
1385
1384
  ui-accordion, ui-tree,
1386
- ui-calendar, ui-pagination, ui-nav
1385
+ ui-calendar, ui-pagination, nui-sidebar-nav
1387
1386
  )[aria-disabled="true"] {
1388
1387
  color: var(--_ink-disabled);
1389
1388
  pointer-events: none;
@@ -2107,6 +2106,15 @@
2107
2106
  :where(ui-icon[size="lg"]) { --ui-icon-size: var(--ui-icon-lg); }
2108
2107
  :where(ui-icon[size="xl"]) { --ui-icon-size: var(--ui-icon-xl); }
2109
2108
 
2109
+ /* ── Intent (declarative color) ── */
2110
+
2111
+ :where(ui-icon[intent="accent"]) { --ui-icon-color: var(--accent-ink); }
2112
+ :where(ui-icon[intent="success"]) { --ui-icon-color: var(--success-ink); }
2113
+ :where(ui-icon[intent="warning"]) { --ui-icon-color: var(--warning-ink); }
2114
+ :where(ui-icon[intent="danger"]) { --ui-icon-color: var(--danger-ink); }
2115
+ :where(ui-icon[intent="info"]) { --ui-icon-color: var(--info-ink); }
2116
+ :where(ui-icon[intent="muted"]) { --ui-icon-color: var(--neutral-ink-muted); }
2117
+
2110
2118
  /* ── Forced Colors ── */
2111
2119
 
2112
2120
  @media (forced-colors: active) {
@@ -2818,7 +2826,7 @@
2818
2826
  /* ╭──────────────────────────────────────────────────────────╮
2819
2827
  │ ui-chat │
2820
2828
  │ Chat application shell with header / content / input / │
2821
- │ footer sub-containers. Fills its parent (ui-layout-chat
2829
+ │ footer sub-containers. Fills its parent (nui-app-panel
2822
2830
  │ or any flex column). │
2823
2831
  ╰──────────────────────────────────────────────────────────╯ */
2824
2832
 
@@ -3370,6 +3378,16 @@
3370
3378
  opacity: var(--ui-backdrop-opacity);
3371
3379
  }
3372
3380
 
3381
+ /* ── Sizing API ──
3382
+ WHY: Host pages set width and box-shadow directly on ui-card inside ui-dialog.
3383
+ Expose custom properties so consumers can set these declaratively on ui-dialog
3384
+ without reaching into children. */
3385
+
3386
+ :where(ui-dialog) > :where(dialog) > :where(*) {
3387
+ width: var(--ui-dialog-width, auto);
3388
+ box-shadow: var(--ui-dialog-shadow, none);
3389
+ }
3390
+
3373
3391
  }
3374
3392
 
3375
3393
  @layer ui {
@@ -4016,365 +4034,6 @@
4016
4034
 
4017
4035
  }
4018
4036
 
4019
- @layer ui {
4020
-
4021
- /* ╭──────────────────────────────────────────────────────────╮
4022
- │ ui-nav │
4023
- │ Navigation list with keyboard nav + selection. │
4024
- │ Transparent wrapper — no visual surface. │
4025
- │ Uses ui-nav-item / ui-nav-group for children. │
4026
- ╰──────────────────────────────────────────────────────────╯ */
4027
-
4028
- /* WHY: ui-nav is a transparent flex wrapper — no inline padding.
4029
- Inline padding is owned by leaf items (nav-item, summary).
4030
- Block padding is owned by nav-group margins. */
4031
- :where(ui-nav) {
4032
- display: flex;
4033
- flex-direction: column;
4034
- gap: 0;
4035
- padding: 0;
4036
- outline: none;
4037
- }
4038
-
4039
- /* ── Nav Item ── */
4040
- /* WHY: Nav items share the same visual pattern as options (ghost row,
4041
- hover/active/selected states). */
4042
-
4043
- :where(ui-nav-item) {
4044
- --_font-weight: var(--ui-font-weight-text);
4045
- --_line-height: var(--ui-line-height-control);
4046
-
4047
- display: flex;
4048
- align-items: center;
4049
- gap: calc(var(--_space) * 2);
4050
- padding-inline: calc(var(--_space-k) * var(--_space));
4051
-
4052
- min-height: var(--_min-height);
4053
-
4054
- font-size: var(--_font-size);
4055
- letter-spacing: var(--_letter-spacing);
4056
- line-height: var(--_line-height);
4057
- font-weight: var(--_font-weight);
4058
-
4059
- cursor: pointer;
4060
- user-select: none;
4061
- color: var(--_ink-muted);
4062
-
4063
- transition:
4064
- background var(--_duration) var(--_easing),
4065
- color var(--_duration) var(--_easing),
4066
- border-color var(--_duration) var(--_easing),
4067
- opacity var(--_duration) var(--_easing),
4068
- transform var(--_duration) var(--_easing);
4069
- }
4070
-
4071
- /* ── Nav Item States ── */
4072
-
4073
- :where(ui-nav-item):hover{
4074
- color: var(--_ink-hover);
4075
- }
4076
-
4077
- :where(ui-nav-item):active{
4078
- color: var(--_ink-active);
4079
- }
4080
-
4081
- :where(ui-nav-item)[aria-current="page"] {
4082
- color: var(--_ink-strong);
4083
- }
4084
-
4085
- :where(ui-nav-item)[aria-disabled="true"] {
4086
- color: var(--_ink-disabled);
4087
- cursor: not-allowed;
4088
- pointer-events: none;
4089
- }
4090
-
4091
- :where(ui-nav-item):focus-visible{
4092
- outline: 2px solid var(--ui-focus-ring);
4093
- outline-offset: -2px;
4094
- }
4095
-
4096
- /* ── Nav Group ── */
4097
- /* WHY: Groups stamp a native <details>/<summary> for collapsible behavior.
4098
- DOM structure: ui-nav-group > details > summary > ui-nav-group-header
4099
- > ui-nav-item* */
4100
-
4101
- :where(ui-nav-group) {
4102
- --_indicator-index: 0;
4103
-
4104
- display: block;
4105
- position: relative;
4106
- }
4107
-
4108
- :where(ui-nav-group) + :where(ui-nav-group) {
4109
- margin-block-start: calc(var(--_space) * 2);
4110
- }
4111
-
4112
- /* ── Details (native disclosure with animated open/close) ── */
4113
- /* WHY: ::details-content lets us animate the content area directly.
4114
- interpolate-size allows height to transition between 0 and auto.
4115
- content-visibility with allow-discrete keeps content visible during close. */
4116
-
4117
- :where(ui-nav-group) > :where(details) {
4118
- interpolate-size: allow-keywords;
4119
- }
4120
-
4121
- :where(ui-nav-group) > :where(details)::details-content {
4122
- height: 0;
4123
- overflow: clip;
4124
- opacity: 0;
4125
-
4126
- transition:
4127
- height var(--_duration) var(--_easing),
4128
- opacity var(--_duration) var(--_easing),
4129
- content-visibility var(--_duration) var(--_easing) allow-discrete;
4130
- }
4131
-
4132
- :where(ui-nav-group) > :where(details[open])::details-content {
4133
- height: auto;
4134
- opacity: 1;
4135
- }
4136
-
4137
- /* ── Summary (clickable header row) ── */
4138
-
4139
- :where(ui-nav-group) > :where(details) > :where(summary) {
4140
- display: flex;
4141
- align-items: center;
4142
- gap: calc(var(--_space) * 2);
4143
- padding-inline: calc(var(--_space-k) * var(--_space));
4144
- cursor: pointer;
4145
- user-select: none;
4146
- list-style: none;
4147
- outline: none;
4148
- }
4149
-
4150
- /* WHY: Remove default marker in WebKit */
4151
- :where(ui-nav-group) > :where(details) > :where(summary)::-webkit-details-marker {
4152
- display: none;
4153
- }
4154
-
4155
- :where(ui-nav-group) > :where(details) > :where(summary)::marker {
4156
- display: none;
4157
- content: '';
4158
- }
4159
-
4160
- /* ── Nav Group Header ── */
4161
- /* WHY: Header sits inside <summary>. Bold text with optional icon. */
4162
-
4163
- :where(ui-nav-group-header) {
4164
- display: flex;
4165
- align-items: center;
4166
- flex: 1;
4167
- gap: calc(var(--_space) * 2);
4168
- min-height: var(--_min-height);
4169
- font-size: var(--_font-size);
4170
- font-weight: var(--ui-font-weight-button);
4171
- letter-spacing: var(--_letter-spacing);
4172
- line-height: var(--ui-line-height-control);
4173
- color: var(--_ink);
4174
- cursor: pointer;
4175
- user-select: none;
4176
- }
4177
-
4178
- /* WHY: Fixed-size icon well — matches ui-layout-sidebar-item [slot="icon"].
4179
- All sidebar icons align on the same 1.5rem column regardless of icon size.
4180
- JS wraps the first <ui-icon> child in a .icon-well span during setup(). */
4181
- :where(ui-nav-group-header) > :where(.icon-well) {
4182
- display: inline-flex;
4183
- align-items: center;
4184
- justify-content: center;
4185
- width: 1.5rem;
4186
- height: 1.5rem;
4187
- flex-shrink: 0;
4188
- }
4189
-
4190
- /* ── Chevron icon (right side of summary) ── */
4191
-
4192
- :where(ui-nav-group) > :where(details) > :where(summary)::after {
4193
- content: '';
4194
- flex-shrink: 0;
4195
- width: var(--_icon-size);
4196
- height: var(--_icon-size);
4197
-
4198
- 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");
4199
- mask-size: contain;
4200
- mask-repeat: no-repeat;
4201
- mask-position: center;
4202
- -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");
4203
- -webkit-mask-size: contain;
4204
- -webkit-mask-repeat: no-repeat;
4205
- -webkit-mask-position: center;
4206
-
4207
- background: var(--_ink-muted);
4208
-
4209
- transition:
4210
- transform var(--_duration) var(--_easing);
4211
- }
4212
-
4213
- /* Chevron rotates when open */
4214
- :where(ui-nav-group) > :where(details[open]) > :where(summary)::after {
4215
- transform: rotate(180deg);
4216
- }
4217
-
4218
- /* ── Selected group — has a child with aria-current ── */
4219
-
4220
- :where(ui-nav-group):state(has-selection) > :where(details) > :where(summary) :where(ui-nav-group-header) {
4221
- color: var(--_ink-strong);
4222
- }
4223
-
4224
- /* ── Summary Hover ── */
4225
-
4226
- :where(ui-nav-group) > :where(details) > :where(summary):hover :where(ui-nav-group-header){
4227
- color: var(--_ink-strong);
4228
- }
4229
-
4230
- /* ── Summary Focus ── */
4231
-
4232
- :where(ui-nav-group) > :where(details) > :where(summary):focus-visible{
4233
- outline: 2px solid var(--ui-focus-ring);
4234
- outline-offset: -2px;
4235
- }
4236
-
4237
- /* ── Vertical connector line (icon groups only) ── */
4238
- /* WHY: Connector draws from below the header to the bottom of the group.
4239
- Only shown when header contains an icon. Scoped via :has(). */
4240
-
4241
- /* WHY: Insets account for the summary's padding-inline so the connector
4242
- line passes through the icon center and child text aligns with header text. */
4243
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)) {
4244
- --_group-pad: calc(var(--_space-k) * var(--_space));
4245
- --_group-icon-well: 1.5rem;
4246
- --_group-line-inset: calc(var(--_group-pad) + var(--_group-icon-well) / 2);
4247
- --_group-child-inset: calc(var(--_group-icon-well) + var(--_space) * 2);
4248
- }
4249
-
4250
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open]))::after {
4251
- content: '';
4252
- position: absolute;
4253
- inset-inline-start: var(--_group-line-inset);
4254
- top: var(--_min-height);
4255
- bottom: 0;
4256
- width: 1px;
4257
- background: var(--_border-muted);
4258
- pointer-events: none;
4259
- }
4260
-
4261
- /* ── Sliding indicator (same pattern as vertical tabs) ── */
4262
- /* WHY: A ::before pseudo on the group slides along the connector line.
4263
- JS sets --_indicator-index; :state(has-selection) gates visibility. */
4264
-
4265
- :where(ui-nav-group):has(:where(ui-nav-group-header) :where(.icon-well)):has(:where(details[open])):state(has-selection)::before {
4266
- content: '';
4267
- position: absolute;
4268
- z-index: 1;
4269
- inset-inline-start: calc(var(--_group-line-inset, 0px) - 0.5px);
4270
- top: var(--_min-height);
4271
- height: var(--_min-height);
4272
- width: 2px;
4273
- border-radius: 1px;
4274
- background: var(--_surface);
4275
- pointer-events: none;
4276
- transform: translateY(calc(var(--_indicator-index) * var(--_min-height)));
4277
-
4278
- transition:
4279
- transform var(--_duration) var(--_easing),
4280
- background var(--_duration) var(--_easing);
4281
- }
4282
-
4283
- /* ── Grouped Child Items ── */
4284
- /* WHY: When header has an icon, margin-inline-start = icon-size + gap
4285
- so item text aligns with header text past the icon.
4286
- Items are inside <details> after the <summary>. */
4287
-
4288
- :where(ui-nav-group) > :where(details) > :where(ui-nav-item) {
4289
- margin-inline-start: var(--_group-child-inset, 0);
4290
- }
4291
-
4292
- /* ── Nav Group Flyout (collapsed sidebar) ── */
4293
- /* WHY: In collapsed mode, summary click opens a ui-listbox popover to the right
4294
- instead of expanding the <details>. Same pattern as sidebar-trigger menus. */
4295
-
4296
- :where(ui-nav-group) > :where(ui-listbox.nav-group-flyout[popover]) {
4297
- --_popover-origin: left center;
4298
- --_popover-from: perspective(800px) scale(0.96) rotateY(20deg);
4299
-
4300
- position: fixed;
4301
- position-area: inline-end span-block-end;
4302
- position-try-fallbacks: --nav-flyout-flip-up;
4303
- margin-block: var(--ui-popover-viewport-margin);
4304
- margin-inline: 0;
4305
- margin-inline-start: var(--ui-popover-gap);
4306
- min-width: 200px;
4307
- max-height: var(--ui-popover-max-height);
4308
- overflow-y: auto;
4309
- }
4310
-
4311
- @position-try --nav-flyout-flip-up {
4312
- position-area: inline-end span-block-start;
4313
- }
4314
-
4315
- @position-try --nav-flyout-flip-down {
4316
- position-area: inline-end span-block-end;
4317
- }
4318
-
4319
- /* ── Container Query: Collapsed Sidebar ── */
4320
- /* WHY: Nav components own their own collapsed behavior via @container.
4321
- The sidebar aside declares container-name: sidebar. When it shrinks
4322
- to 48px (icon rail), nav responds to the width — not to [collapsed].
4323
- Threshold 80px: collapsed = 48px, min expanded = 160px. */
4324
-
4325
- @container sidebar (max-width: 80px) {
4326
-
4327
- /* Nav items hide entirely — only group headers (with icons) remain. */
4328
- :where(ui-nav-item) {
4329
- display: none;
4330
- }
4331
-
4332
- /* Summary shrinks to icon-only. Reduced inline padding wraps tightly
4333
- around the icon; parent align-items: center handles horizontal centering. */
4334
- :where(ui-nav-group) > :where(details) > :where(summary) {
4335
- padding-inline: var(--_space);
4336
- border-radius: var(--_radius);
4337
- }
4338
-
4339
- /* Hide chevron — no expand/collapse in icon rail (flyout instead). */
4340
- :where(ui-nav-group) > :where(details) > :where(summary)::after {
4341
- display: none;
4342
- }
4343
-
4344
- /* Hide vertical connector line and sliding indicator. */
4345
- :where(ui-nav-group)::after,
4346
- :where(ui-nav-group)::before {
4347
- display: none;
4348
- }
4349
-
4350
- /* Header collapses to icon-only. font-size: 0 hides text nodes
4351
- (can't be targeted by CSS). Icon overrides back to normal below. */
4352
- :where(ui-nav-group-header) {
4353
- flex: 0 0 auto;
4354
- font-size: 0;
4355
- gap: 0;
4356
- }
4357
-
4358
- :where(ui-nav-group-header) :where(.icon-well) :where(ui-icon) {
4359
- font-size: var(--_font-size, 1rem);
4360
- }
4361
-
4362
- /* WHY: In collapsed mode the group is a small icon — centering
4363
- the flyout vertically with the anchor is more natural than top-aligning.
4364
- Fallbacks handle viewport clipping (top/bottom edge). */
4365
- :where(ui-nav-group) > :where(ui-listbox.nav-group-flyout[popover]) {
4366
- position-area: inline-end;
4367
- position-try-fallbacks: --nav-flyout-flip-up, --nav-flyout-flip-down;
4368
- }
4369
-
4370
- /* Collapse inter-group spacing in icon rail. */
4371
- :where(ui-nav-group) + :where(ui-nav-group) {
4372
- margin-block-start: 0;
4373
- }
4374
- }
4375
-
4376
- }
4377
-
4378
4037
  @layer ui {
4379
4038
 
4380
4039
  /* ── Pagination Container ── */
@@ -6583,587 +6242,6 @@
6583
6242
 
6584
6243
  }
6585
6244
 
6586
- @layer ui {
6587
-
6588
- /* ╭──────────────────────────────────────────────────────────╮
6589
- │ ui-layout-body │
6590
- │ Rounded, padded, scrollable content surface. │
6591
- │ Fills remaining flex space inside ui-layout-canvas. │
6592
- ╰──────────────────────────────────────────────────────────╯ */
6593
-
6594
- :where(ui-layout-body) {
6595
- display: flex;
6596
- flex: 1;
6597
- min-width: 0;
6598
- flex-direction: column;
6599
- overflow-y: auto;
6600
- scrollbar-width: none;
6601
- background: var(--_ground, var(--_panel));
6602
- border-radius: var(--_radius);
6603
- padding: calc(var(--_space-k) * var(--_space));
6604
- }
6605
-
6606
- :where(ui-layout-body)[show-scrollbar] {
6607
- scrollbar-width: thin;
6608
- }
6609
-
6610
- }
6611
-
6612
- @layer ui {
6613
-
6614
- /* ╭──────────────────────────────────────────────────────────╮
6615
- │ ui-layout-breadcrumb │
6616
- │ Grid bar with leading / label / trailing slots. │
6617
- │ Same slot pattern as ui-header. │
6618
- ╰──────────────────────────────────────────────────────────╯ */
6619
-
6620
- /* ── Base ── */
6621
-
6622
- :where(ui-layout-breadcrumb) {
6623
- display: grid;
6624
- grid-template-columns: 1fr;
6625
- align-items: center;
6626
- min-height: var(--ui-layout-bar-height);
6627
- gap: calc(var(--_space) * 2);
6628
- padding-block: var(--_space);
6629
- padding-inline: calc(var(--_space-k) * var(--_space));
6630
- flex-shrink: 0;
6631
- min-width: 0;
6632
- }
6633
-
6634
- /* ── Slots ── */
6635
-
6636
- :where(ui-layout-breadcrumb):has(> [slot="leading"]):has(> [slot="trailing"]) {
6637
- grid-template-columns: auto 1fr auto;
6638
- }
6639
-
6640
- :where(ui-layout-breadcrumb):has(> [slot="leading"]):not(:has(> [slot="trailing"])) {
6641
- grid-template-columns: auto 1fr;
6642
- }
6643
-
6644
- :where(ui-layout-breadcrumb):not(:has(> [slot="leading"])):has(> [slot="trailing"]) {
6645
- grid-template-columns: 1fr auto;
6646
- }
6647
-
6648
- :where(ui-layout-breadcrumb) > :where([slot="leading"]) {
6649
- display: flex;
6650
- align-items: center;
6651
- gap: calc(var(--_space) * 2);
6652
- }
6653
-
6654
- :where(ui-layout-breadcrumb) > :where([slot="label"]),
6655
- :where(ui-layout-breadcrumb) > :where(:not([slot])) {
6656
- min-width: 0;
6657
- }
6658
-
6659
- :where(ui-layout-breadcrumb) > :where([slot="trailing"]) {
6660
- display: flex;
6661
- align-items: center;
6662
- gap: calc(var(--_space) * 2);
6663
- }
6664
-
6665
- }
6666
-
6667
- @layer ui {
6668
-
6669
- /* ╭──────────────────────────────────────────────────────────╮
6670
- │ ui-layout-canvas │
6671
- │ Structural flex row for body + chat panels. │
6672
- │ No background, no radius — purely layout. │
6673
- ╰──────────────────────────────────────────────────────────╯ */
6674
-
6675
- :where(ui-layout-canvas) {
6676
- display: flex;
6677
- flex: 1;
6678
- min-height: 0;
6679
- padding: 0 calc(var(--_space-k) * var(--_space)) calc(var(--_space-k) * var(--_space));
6680
- }
6681
-
6682
- }
6683
-
6684
- @layer ui {
6685
-
6686
- /* ╭──────────────────────────────────────────────────────────╮
6687
- │ ui-layout-chat │
6688
- │ Rounded, padded, scrollable right panel. │
6689
- │ Hidden by default — shown via [open] attribute. │
6690
- ╰──────────────────────────────────────────────────────────╯ */
6691
-
6692
- :where(ui-layout-chat) {
6693
- position: relative;
6694
- display: flex;
6695
- flex-direction: column;
6696
- width: 0;
6697
- min-width: 0;
6698
- max-width: 480px;
6699
- overflow: clip;
6700
- scrollbar-width: none;
6701
- background: var(--_ground, var(--_panel));
6702
- border-radius: var(--_radius);
6703
- padding: 0;
6704
- transition:
6705
- width var(--_duration) var(--_easing),
6706
- min-width var(--_duration) var(--_easing),
6707
- padding var(--_duration) var(--_easing),
6708
- margin var(--_duration) var(--_easing);
6709
- }
6710
-
6711
- :where(ui-layout-chat[open]) {
6712
- width: 360px;
6713
- min-width: 280px;
6714
- margin-inline-start: calc(var(--_space) * 2);
6715
- overflow-y: auto;
6716
- padding: calc(var(--_space-k) * var(--_space));
6717
- }
6718
-
6719
- /* WHY: When ui-chat manages its own sub-container padding and scroll,
6720
- the layout container delegates — no own padding, no own scroll.
6721
- overflow: visible lets CSS anchor-positioned popovers (ui-select etc.)
6722
- resolve through to the top layer. */
6723
- :where(ui-layout-chat[open]):has(> ui-chat) {
6724
- padding: 0;
6725
- overflow: visible;
6726
- }
6727
-
6728
- /* WHY: Disable width transition while dragging — it fights the pointer. */
6729
- :where(ui-layout-chat[resizing]) {
6730
- transition: none;
6731
- }
6732
-
6733
- :where(ui-layout-chat)[show-scrollbar] {
6734
- scrollbar-width: thin;
6735
- }
6736
-
6737
- /* ── Resize Handle ── */
6738
-
6739
- :where(ui-layout-chat) :where(.layout-resize-handle) {
6740
- position: absolute;
6741
- top: 0;
6742
- left: 0;
6743
- width: 4px;
6744
- height: 100%;
6745
- cursor: col-resize;
6746
- z-index: 1;
6747
- }
6748
-
6749
- :where(ui-layout-chat) :where(.layout-resize-handle):hover,
6750
- :where(ui-layout-chat[resizing]) :where(.layout-resize-handle) {
6751
- background: var(--_border-muted);
6752
- }
6753
-
6754
- }
6755
-
6756
- @layer ui {
6757
-
6758
- /* ╭──────────────────────────────────────────────────────────╮
6759
- │ ui-layout-inspector │
6760
- │ Rounded, padded, scrollable right panel. │
6761
- │ Hidden by default — shown via [open] attribute. │
6762
- ╰──────────────────────────────────────────────────────────╯ */
6763
-
6764
- :where(ui-layout-inspector) {
6765
- position: relative;
6766
- display: flex;
6767
- flex-direction: column;
6768
- width: 0;
6769
- min-width: 0;
6770
- max-width: 480px;
6771
- overflow: clip;
6772
- scrollbar-width: none;
6773
- background: var(--_ground, var(--_panel));
6774
- border-radius: var(--_radius);
6775
- padding: 0;
6776
- transition:
6777
- width var(--_duration) var(--_easing),
6778
- min-width var(--_duration) var(--_easing),
6779
- padding var(--_duration) var(--_easing),
6780
- margin var(--_duration) var(--_easing);
6781
- }
6782
-
6783
- :where(ui-layout-inspector[open]) {
6784
- width: 360px;
6785
- min-width: 280px;
6786
- margin-inline-start: calc(var(--_space) * 2);
6787
- overflow-y: auto;
6788
- padding: calc(var(--_space-k) * var(--_space));
6789
- }
6790
-
6791
- :where(ui-layout-inspector[resizing]) {
6792
- transition: none;
6793
- }
6794
-
6795
- :where(ui-layout-inspector)[show-scrollbar] {
6796
- scrollbar-width: thin;
6797
- }
6798
-
6799
- /* ── Resize Handle ── */
6800
-
6801
- :where(ui-layout-inspector) :where(.layout-resize-handle) {
6802
- position: absolute;
6803
- top: 0;
6804
- left: 0;
6805
- width: 4px;
6806
- height: 100%;
6807
- cursor: col-resize;
6808
- z-index: 1;
6809
- }
6810
-
6811
- :where(ui-layout-inspector) :where(.layout-resize-handle):hover,
6812
- :where(ui-layout-inspector[resizing]) :where(.layout-resize-handle) {
6813
- background: var(--_border-muted);
6814
- }
6815
-
6816
- }
6817
-
6818
- @layer ui {
6819
-
6820
- /* ╭──────────────────────────────────────────────────────────╮
6821
- │ ui-layout-sidebar │
6822
- │ Full-page layout: collapsible/resizable sidebar aside │
6823
- │ + content column (breadcrumb, canvas, body, chat). │
6824
- ╰──────────────────────────────────────────────────────────╯ */
6825
-
6826
- /* ── Outer Layout ── */
6827
-
6828
- :where(ui-layout-sidebar) {
6829
- display: flex;
6830
- height: 100dvh;
6831
- }
6832
-
6833
- /* WHY: Reserve sidebar width before JS builds the DOM — prevents layout shift.
6834
- Collapsed state is read synchronously in the constructor so CSS matches immediately.
6835
- Replaced by the real aside once [data-ready] is set. */
6836
- :where(ui-layout-sidebar):not([data-ready]):not([collapsed])::before {
6837
- content: '';
6838
- width: var(--ui-layout-sidebar-width);
6839
- flex-shrink: 0;
6840
- background: var(--_body);
6841
- border-right: 1px solid var(--_border-muted);
6842
- }
6843
-
6844
- :where(ui-layout-sidebar):not([data-ready])[collapsed]::before {
6845
- content: '';
6846
- width: 48px;
6847
- flex-shrink: 0;
6848
- background: var(--_body);
6849
- border-right: 1px solid var(--_border-muted);
6850
- }
6851
-
6852
- /* ── Content Column ── */
6853
- /* WHY: Everything except the aside forms a flex column. */
6854
-
6855
- :where(ui-layout-sidebar) > :where(:not([slot])) {
6856
- flex: 1 1 0%;
6857
- min-width: 0;
6858
- min-height: 0;
6859
- display: flex;
6860
- flex-direction: column;
6861
- padding: 0;
6862
- }
6863
-
6864
- /* ── Sidebar Aside ── */
6865
- /* WHY: position: relative creates the containing block for absolute
6866
- header/footer overlays. Content fills the full height and scrolls
6867
- underneath the pinned header/footer. */
6868
-
6869
- :where(ui-layout-sidebar) > :where([slot="sidebar"]) {
6870
- --_sidebar-header-height: 0px;
6871
- --_sidebar-footer-height: 0px;
6872
-
6873
- container-name: sidebar;
6874
- container-type: inline-size;
6875
- position: sticky;
6876
- top: 0;
6877
- width: var(--ui-layout-sidebar-width);
6878
- min-width: 160px;
6879
- max-width: 400px;
6880
- height: 100dvh;
6881
- display: block;
6882
- transition: width var(--_duration) var(--_easing), min-width var(--_duration) var(--_easing);
6883
- overflow: hidden;
6884
- z-index: 10;
6885
- }
6886
-
6887
- /* WHY: Disable width transition while dragging — it fights the pointer. */
6888
- :where(ui-layout-sidebar) > :where([slot="sidebar"][resizing]) {
6889
- transition: none;
6890
- }
6891
-
6892
- /* ── Collapsed Icon Rail ── */
6893
- /* WHY: Collapsed = icon rail, not fully hidden. 48px fits icons (1rem) + padding.
6894
- [collapsed] drives the aside to 48px which triggers @container sidebar queries
6895
- in this file and in child component CSS (ui-nav.css, etc.). */
6896
-
6897
- :where(ui-layout-sidebar)[collapsed] > :where([slot="sidebar"]) {
6898
- width: 48px;
6899
- min-width: 48px;
6900
- }
6901
-
6902
- /* ── Resize Handle ── */
6903
-
6904
- :where(ui-layout-sidebar) :where(.layout-resize-handle) {
6905
- position: absolute;
6906
- top: 0;
6907
- right: 0;
6908
- width: 4px;
6909
- height: 100%;
6910
- cursor: col-resize;
6911
- z-index: 1;
6912
- }
6913
-
6914
- :where(ui-layout-sidebar) :where(.layout-resize-handle):hover,
6915
- :where(ui-layout-sidebar) > :where([slot="sidebar"][resizing]) :where(.layout-resize-handle) {
6916
- background: var(--_border-muted);
6917
- }
6918
-
6919
- /* WHY: When collapsed to icon rail, the sidebar edge meets content — drop left padding. */
6920
-
6921
- :where(ui-layout-sidebar)[collapsed] :where(ui-layout-canvas) {
6922
- padding-inline-start: 0;
6923
- }
6924
-
6925
- :where(ui-layout-sidebar)[collapsed] :where(ui-layout-breadcrumb) {
6926
- padding-inline-start: 0;
6927
- }
6928
-
6929
- /* ── Sidebar Header ── */
6930
- /* WHY: Absolute-positioned overlay pinned to top of aside. Content scrolls
6931
- underneath it. z-index: 2 sits above content (z-index: 0). */
6932
-
6933
- :where(ui-layout-sidebar-header) {
6934
- position: absolute;
6935
- top: 0;
6936
- left: 0;
6937
- right: 0;
6938
- z-index: 2;
6939
- display: flex;
6940
- flex-direction: column;
6941
- }
6942
-
6943
- /* ── Sidebar Content ── */
6944
- /* WHY: Full height of the aside, scrollable. Padding-block offsets keep
6945
- content from starting behind header / ending behind footer.
6946
- Fade-out alpha mask dissolves content edges under the overlays. */
6947
-
6948
- :where(ui-layout-sidebar-content) {
6949
- display: flex;
6950
- flex-direction: column;
6951
- padding-block-start: var(--_sidebar-header-height);
6952
- padding-block-end: var(--_sidebar-footer-height);
6953
- width: 100%;
6954
- height: 100%;
6955
- overflow-y: auto;
6956
- scrollbar-width: none;
6957
- }
6958
-
6959
- /* WHY: When header is present, fade top edge. Content dissolves as it
6960
- scrolls under the header — transparent at top, fully visible by 1.25×
6961
- the header height. No opaque header background needed. */
6962
- :where(ui-layout-sidebar-content)[data-has-header] {
6963
- mask-image: linear-gradient(
6964
- to bottom,
6965
- transparent 0,
6966
- black calc(var(--_sidebar-header-height) * 1.25),
6967
- black 100%
6968
- );
6969
- }
6970
-
6971
- /* WHY: When footer is present, fade bottom edge. */
6972
- :where(ui-layout-sidebar-content)[data-has-footer] {
6973
- mask-image: linear-gradient(
6974
- to bottom,
6975
- black 0,
6976
- black calc(100% - var(--_sidebar-footer-height) * 1.25),
6977
- transparent 100%
6978
- );
6979
- }
6980
-
6981
- /* WHY: When both header AND footer are present, fade both edges. */
6982
- :where(ui-layout-sidebar-content)[data-has-header][data-has-footer] {
6983
- mask-image: linear-gradient(
6984
- to bottom,
6985
- transparent 0,
6986
- black calc(var(--_sidebar-header-height) * 1.25),
6987
- black calc(100% - var(--_sidebar-footer-height) * 1.25),
6988
- transparent 100%
6989
- );
6990
- }
6991
-
6992
- /* ── Sidebar Footer ── */
6993
- /* WHY: Absolute-positioned overlay pinned to bottom of aside. */
6994
-
6995
- :where(ui-layout-sidebar-footer) {
6996
- position: absolute;
6997
- bottom: 0;
6998
- left: 0;
6999
- right: 0;
7000
- z-index: 2;
7001
- display: flex;
7002
- flex-direction: column;
7003
- }
7004
-
7005
- /* ── Sidebar Item ── */
7006
- /* WHY: Universal sidebar row element. Provides inline padding for any content
7007
- (buttons, links, icons). When a child ui-listbox[popover] is present, JS
7008
- wires PopoverController for click-to-toggle menu behavior.
7009
- Absorbs the old ui-layout-sidebar-trigger role — one element for all rows. */
7010
-
7011
- :where(ui-layout-sidebar-item) {
7012
- display: flex;
7013
- align-items: center;
7014
- flex: 1;
7015
- min-width: 0;
7016
- gap: calc(var(--_space) * 2);
7017
- min-height: var(--_min-height);
7018
- font-size: var(--_font-size);
7019
- font-weight: var(--ui-font-weight-button);
7020
- letter-spacing: var(--_letter-spacing);
7021
- line-height: var(--ui-line-height-control);
7022
- color: var(--_ink);
7023
- cursor: pointer;
7024
- user-select: none;
7025
- border: none;
7026
- background: none;
7027
- padding-block: var(--_space);
7028
- padding-inline: calc(var(--_space-k) * var(--_space));
7029
- border-radius: var(--_radius);
7030
- transition: color var(--_duration) var(--_easing);
7031
- }
7032
-
7033
- /* WHY: Items in header/footer match the breadcrumb bar height so the
7034
- first sidebar row aligns horizontally with the breadcrumb. */
7035
- :where(ui-layout-sidebar-header) > :where(ui-layout-sidebar-item),
7036
- :where(ui-layout-sidebar-footer) > :where(ui-layout-sidebar-item) {
7037
- min-height: var(--ui-layout-bar-height);
7038
- }
7039
-
7040
- :where(ui-layout-sidebar-item):hover{
7041
- color: var(--_ink-strong);
7042
- }
7043
-
7044
- :where(ui-layout-sidebar-item):focus-visible{
7045
- outline: 2px solid var(--ui-focus-ring);
7046
- outline-offset: -2px;
7047
- }
7048
-
7049
- /* WHY: Fixed-size icon well so all sidebar icons (header logo, nav group icons,
7050
- standalone icons) center-align on the same column width regardless of intrinsic
7051
- icon size. 1.5rem matches the sidebar's visual rhythm at default density.
7052
- Consumer wraps the icon: <span slot="icon"><ui-icon name="..."></ui-icon></span>
7053
- The wrapper is the well; the icon keeps its own --ui-icon-size dimensions. */
7054
- :where(ui-layout-sidebar-item) > :where([slot="icon"]) {
7055
- display: inline-flex;
7056
- align-items: center;
7057
- justify-content: center;
7058
- width: 1.5rem;
7059
- height: 1.5rem;
7060
- flex-shrink: 0;
7061
- }
7062
-
7063
- /* WHY: Trailing caret pushes to end — same pattern as button justify="spread". */
7064
- :where(ui-layout-sidebar-item) > :where([slot="trailing"]) {
7065
- margin-inline-start: auto;
7066
- flex-shrink: 0;
7067
- color: var(--_ink-muted);
7068
- }
7069
-
7070
- /* WHY: When the item wraps a sub-component (e.g. ui-button) that provides
7071
- its own icon, hide [slot="icon"] in expanded mode — it only serves as the
7072
- bare collapsed-rail representation. Items without sub-components (just
7073
- icon + label + trailing) keep [slot="icon"] visible in both modes. */
7074
- :where(ui-layout-sidebar-item:has(> ui-button)) > :where([slot="icon"]) {
7075
- display: none;
7076
- }
7077
-
7078
- /* WHY: Title text truncates when sidebar narrows during resize. */
7079
- :where(ui-layout-sidebar-item) > :where([slot="label"]) {
7080
- flex: 1;
7081
- min-width: 0;
7082
- white-space: nowrap;
7083
- overflow: hidden;
7084
- text-overflow: ellipsis;
7085
- }
7086
-
7087
- /* ── Item Popover ── */
7088
- /* WHY: Popover opens to the right of the sidebar item.
7089
- Default: top-aligned, grows downward (span-block-end).
7090
- Flip: bottom-aligned, grows upward (span-block-start). */
7091
-
7092
- :where(ui-layout-sidebar-item) > :where(ui-listbox[popover]) {
7093
- --_popover-origin: left center;
7094
- --_popover-from: perspective(800px) scale(0.96) rotateY(20deg);
7095
-
7096
- position: fixed;
7097
- position-area: inline-end span-block-end;
7098
- position-try-fallbacks: --sidebar-item-flip-up;
7099
- margin-block: var(--ui-popover-viewport-margin);
7100
- margin-inline: 0;
7101
- margin-inline-start: var(--ui-popover-gap);
7102
- min-width: 200px;
7103
- max-height: var(--ui-popover-max-height);
7104
- overflow-y: auto;
7105
- }
7106
-
7107
- @position-try --sidebar-item-flip-up {
7108
- position-area: inline-end span-block-start;
7109
- }
7110
-
7111
- @position-try --sidebar-item-flip-down {
7112
- position-area: inline-end span-block-end;
7113
- }
7114
-
7115
- /* ── Container Query: Collapsed Sidebar ── */
7116
- /* WHY: Each component owns its own collapsed behavior via @container.
7117
- The aside is the container (container-name: sidebar). When it shrinks
7118
- to 48px (icon rail), components respond to the width, not to [collapsed].
7119
- Threshold 80px: collapsed = 48px, min expanded = 160px. */
7120
-
7121
- @container sidebar (max-width: 80px) {
7122
-
7123
- /* Resize handle — no dragging in icon rail */
7124
- :where(.layout-resize-handle) {
7125
- display: none;
7126
- }
7127
-
7128
- /* Header/footer — center content horizontally */
7129
- :where(ui-layout-sidebar-header),
7130
- :where(ui-layout-sidebar-footer) {
7131
- align-items: center;
7132
- }
7133
-
7134
- /* Content — center items in the 48px rail */
7135
- :where(ui-layout-sidebar-content) {
7136
- align-items: center;
7137
- }
7138
-
7139
- /* Item — shrink to icon-only. Show [slot="icon"], hide everything else.
7140
- WHY: Sidebar items can contain complex children (buttons with slots,
7141
- links, etc.). Rather than overriding sub-component styles, the item
7142
- provides its own bare icon via [slot="icon"] for the collapsed rail. */
7143
- :where(ui-layout-sidebar-item) {
7144
- flex: 0 0 auto;
7145
- padding-inline: var(--_space);
7146
- }
7147
-
7148
- :where(ui-layout-sidebar-item) > :where([slot="icon"]) {
7149
- display: inline-flex;
7150
- }
7151
-
7152
- :where(ui-layout-sidebar-item) > :where(:not([slot="icon"]):not(ui-listbox[popover]):not(.nav-group-flyout)) {
7153
- display: none;
7154
- }
7155
-
7156
- /* WHY: In collapsed mode the sidebar item is a small icon — centering
7157
- the popover vertically with the anchor is more natural than top-aligning.
7158
- Fallbacks handle viewport clipping (top/bottom edge). */
7159
- :where(ui-layout-sidebar-item) > :where(ui-listbox[popover]) {
7160
- position-area: inline-end;
7161
- position-try-fallbacks: --sidebar-item-flip-up, --sidebar-item-flip-down;
7162
- }
7163
- }
7164
-
7165
- }
7166
-
7167
6245
  @layer ui {
7168
6246
 
7169
6247
  /* ── Base ── */