@nldd/design-system 0.8.85 → 0.8.86
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/custom-elements.json +156 -18
- package/dist/components/components.js +406 -128
- package/dist/components/layout/collection/collection.d.ts +15 -8
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +38 -13
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +36 -23
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +11 -3
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +30 -17
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +19 -21
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +23 -2
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +56 -2
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +33 -8
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +7 -5
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +2 -2
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +13 -13
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +13 -3
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +39 -3
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.js +8 -1
- package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.template.d.ts +4 -1
- package/dist/components/lists-and-tables/list/list.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.template.js +31 -12
- package/dist/components/lists-and-tables/list/list.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +8 -3
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +35 -9
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +18 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +50 -12
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +3 -3
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +15 -0
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js +4 -3
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js.map +1 -1
- package/dist/components/visibility-mixin-BU1vIMW7.js +161 -0
- package/dist/favicon.svg +4 -0
- package/dist/nldd.min.js +775 -646
- package/dist/touch-icon.png +0 -0
- package/dist/types/vue.d.ts +24 -10
- package/dist/utilities/spacing-scale.d.ts +26 -0
- package/dist/utilities/spacing-scale.d.ts.map +1 -0
- package/dist/utilities/spacing-scale.js +54 -0
- package/dist/utilities/spacing-scale.js.map +1 -0
- package/dist/utilities/visibility-mixin.d.ts +11 -8
- package/dist/utilities/visibility-mixin.d.ts.map +1 -1
- package/dist/utilities/visibility-mixin.js +58 -45
- package/dist/utilities/visibility-mixin.js.map +1 -1
- package/dist/utilities/visibility-mixin.styles.d.ts +14 -0
- package/dist/utilities/visibility-mixin.styles.d.ts.map +1 -0
- package/dist/utilities/visibility-mixin.styles.js +52 -0
- package/dist/utilities/visibility-mixin.styles.js.map +1 -0
- package/package.json +5 -2
- package/dist/components/visibility-mixin-vbfhyo7f.js +0 -104
package/custom-elements.json
CHANGED
|
@@ -21866,7 +21866,7 @@
|
|
|
21866
21866
|
"declarations": [
|
|
21867
21867
|
{
|
|
21868
21868
|
"kind": "class",
|
|
21869
|
-
"description": "A container for displaying collections of items. Supports grid, stack, and horizontal scroll layouts. In grid and stack modes, items are paginated via a load-more button. In horizontal scroll, the prev/next controls and the edge fade appear only when the items overflow the container. With `lazy-load`, the next items are automatically loaded when the load-more button comes into view.",
|
|
21869
|
+
"description": "A container for displaying collections of items. Supports grid, stack, lanes and horizontal scroll layouts. In grid and stack modes, items are paginated via a load-more button. In horizontal scroll, the prev/next controls and the edge fade appear only when the items overflow the container. With `lazy-load`, the next items are automatically loaded when the load-more button comes into view.",
|
|
21870
21870
|
"name": "NLDDCollection",
|
|
21871
21871
|
"members": [
|
|
21872
21872
|
{
|
|
@@ -21921,12 +21921,39 @@
|
|
|
21921
21921
|
"kind": "field",
|
|
21922
21922
|
"name": "gap",
|
|
21923
21923
|
"type": {
|
|
21924
|
-
"text": "
|
|
21924
|
+
"text": "SpacingSize | undefined"
|
|
21925
21925
|
},
|
|
21926
|
-
"description": "
|
|
21926
|
+
"description": "A step of the spacing scale, overriding the responsive default at every\nbreakpoint. Unset keeps the default.",
|
|
21927
21927
|
"attribute": "gap",
|
|
21928
21928
|
"reflects": true
|
|
21929
21929
|
},
|
|
21930
|
+
{
|
|
21931
|
+
"kind": "field",
|
|
21932
|
+
"name": "smGap",
|
|
21933
|
+
"type": {
|
|
21934
|
+
"text": "SpacingSize | undefined"
|
|
21935
|
+
},
|
|
21936
|
+
"attribute": "sm-gap",
|
|
21937
|
+
"reflects": true
|
|
21938
|
+
},
|
|
21939
|
+
{
|
|
21940
|
+
"kind": "field",
|
|
21941
|
+
"name": "mdGap",
|
|
21942
|
+
"type": {
|
|
21943
|
+
"text": "SpacingSize | undefined"
|
|
21944
|
+
},
|
|
21945
|
+
"attribute": "md-gap",
|
|
21946
|
+
"reflects": true
|
|
21947
|
+
},
|
|
21948
|
+
{
|
|
21949
|
+
"kind": "field",
|
|
21950
|
+
"name": "lgGap",
|
|
21951
|
+
"type": {
|
|
21952
|
+
"text": "SpacingSize | undefined"
|
|
21953
|
+
},
|
|
21954
|
+
"attribute": "lg-gap",
|
|
21955
|
+
"reflects": true
|
|
21956
|
+
},
|
|
21930
21957
|
{
|
|
21931
21958
|
"kind": "field",
|
|
21932
21959
|
"name": "translations",
|
|
@@ -21951,7 +21978,7 @@
|
|
|
21951
21978
|
},
|
|
21952
21979
|
"default": "'grid'",
|
|
21953
21980
|
"fieldName": "layout",
|
|
21954
|
-
"description": "Layout mode: 'grid' | 'stack' | 'horizontal-scroll' (default: 'grid')"
|
|
21981
|
+
"description": "Layout mode: 'grid' | 'stack' | 'lanes' | 'horizontal-scroll' (default: 'grid')"
|
|
21955
21982
|
},
|
|
21956
21983
|
{
|
|
21957
21984
|
"name": "show-load-more",
|
|
@@ -21986,16 +22013,40 @@
|
|
|
21986
22013
|
"text": "string | undefined"
|
|
21987
22014
|
},
|
|
21988
22015
|
"fieldName": "itemWidth",
|
|
21989
|
-
"description": "Preferred width for each item (e.g. '280px', '20rem'). In grid
|
|
22016
|
+
"description": "Preferred width for each item (e.g. '280px', '20rem'). In grid and lanes layouts used as the minimum column width (columns will be at least this wide; 1fr if container allows more). In horizontal scroll used as flex-basis. Never forces horizontal overflow — the value is clamped to container width."
|
|
21990
22017
|
},
|
|
21991
22018
|
{
|
|
21992
22019
|
"name": "gap",
|
|
21993
22020
|
"type": {
|
|
21994
|
-
"text": "
|
|
22021
|
+
"text": "SpacingSize | undefined"
|
|
21995
22022
|
},
|
|
21996
|
-
"description": "
|
|
22023
|
+
"description": "Gap between items, as a step of the spacing scale ('0', '2', '4', '6', '8', '10', '12', '16', '20', '24', '28', '32', '40', '44', '48', '56', '64', '80', '96'). Overrides the responsive default at every breakpoint; unset keeps the default.",
|
|
21997
22024
|
"fieldName": "gap"
|
|
21998
22025
|
},
|
|
22026
|
+
{
|
|
22027
|
+
"name": "sm-gap",
|
|
22028
|
+
"type": {
|
|
22029
|
+
"text": "SpacingSize | undefined"
|
|
22030
|
+
},
|
|
22031
|
+
"fieldName": "smGap",
|
|
22032
|
+
"description": "Gap at sm, overriding `gap` there"
|
|
22033
|
+
},
|
|
22034
|
+
{
|
|
22035
|
+
"name": "md-gap",
|
|
22036
|
+
"type": {
|
|
22037
|
+
"text": "SpacingSize | undefined"
|
|
22038
|
+
},
|
|
22039
|
+
"fieldName": "mdGap",
|
|
22040
|
+
"description": "Gap at md, overriding `gap` there"
|
|
22041
|
+
},
|
|
22042
|
+
{
|
|
22043
|
+
"name": "lg-gap",
|
|
22044
|
+
"type": {
|
|
22045
|
+
"text": "SpacingSize | undefined"
|
|
22046
|
+
},
|
|
22047
|
+
"fieldName": "lgGap",
|
|
22048
|
+
"description": "Gap at lg, overriding `gap` there"
|
|
22049
|
+
},
|
|
21999
22050
|
{
|
|
22000
22051
|
"name": "translations",
|
|
22001
22052
|
"type": {
|
|
@@ -22049,7 +22100,7 @@
|
|
|
22049
22100
|
"declarations": [
|
|
22050
22101
|
{
|
|
22051
22102
|
"kind": "class",
|
|
22052
|
-
"description": "A simple layout primitive: pick a layout mode, give it a gap, optionally align contents, and add padding. Padding can be set for all sides, per axis (inline/block), or per individual side. Specificity: per side > per axis > all sides. Responsive padding and gap have sm/md/lg variants. Each variant emits both an @media (viewport) and @container (layout-container) query. When inside a layout-container the @container query wins; otherwise the @media query provides the viewport-based fallback. Layout modes: - `stack` (default): block items, stacked vertically. The \"what you expect from DOM flow\" mode. - `row`: flex row, no wrapping. Items shrink or overflow. - `wrap`: flex row, items wrap to new lines. - `grid`: CSS grid, auto-fit columns at min 280px wide. - `columns`: CSS multi-column flow, 280px minimum column width, items don't split across column breaks. Alignment maps to the layout's natural axis: - `stack`: vertical = main-axis (justify-content), horizontal = cross-axis (align-items) - `row` / `wrap`: horizontal = main-axis, vertical = cross-axis - `grid`: horizontal = justify-items, vertical = align-items (per cell) - `columns`: alignment props have no effect (CSS multicol doesn't expose alignment) Item order is set per-child via attributes on the slotted children themselves: `<child order=\"3\">` for a fixed position, or `<child sm-order=\"N\">` / `<child md-order=\"N\">` / `<child lg-order=\"N\">` to override per breakpoint (resolved against THIS container's width via @container queries, same scope as the responsive padding/gap). The container observes slot changes and child attribute mutations and bridges these to `--_slot-order` / `--_slot-sm-order` / etc. custom properties on each child's inline style, which the container's CSS then reads via `::slotted(*)` inside @container queries. Cascade: `sm-order` falls back to `order` falls back to `0` at sm (and analogously for md/lg). No-op for `layout=\"columns\"` (CSS multicol has no per-item ordering hook). The `column-count` attribute (1-8) forces an exact column count for `layout=\"grid\"` (overrides auto-fit) and `layout=\"columns\"` (overrides the natural width-driven count). `sm-column-count` / `md-column-count` / `lg-column-count` resolve against this container's OWN width via an `@container (...)` query on the host — not against the viewport. That lets a footer in a narrow sidebar choose its own column count independent of the surrounding page width. `layout=\"lanes\"` packs items into balanced columns using native CSS grid lanes where supported, falling back to CSS multicol (column-order) elsewhere. CSS-only, no JS. Honours `gap` on both axes and `column-count`.",
|
|
22103
|
+
"description": "A simple layout primitive: pick a layout mode, give it a gap, optionally align contents, and add padding. Padding can be set for all sides, per axis (inline/block), or per individual side. Specificity: per side > per axis > all sides. Responsive padding and gap have sm/md/lg variants. Each variant emits both an @media (viewport) and @container (layout-container) query. When inside a layout-container the @container query wins; otherwise the @media query provides the viewport-based fallback. Layout modes: - `stack` (default): block items, stacked vertically. The \"what you expect from DOM flow\" mode. - `row`: flex row, no wrapping. Items shrink or overflow. - `wrap`: flex row, items wrap to new lines. - `grid`: CSS grid, auto-fit columns at min 280px wide. - `columns`: CSS multi-column flow, 280px minimum column width, items don't split across column breaks. Alignment maps to the layout's natural axis: - `stack`: vertical = main-axis (justify-content), horizontal = cross-axis (align-items) - `row` / `wrap`: horizontal = main-axis, vertical = cross-axis - `grid`: horizontal = justify-items, vertical = align-items (per cell) - `columns`: alignment props have no effect (CSS multicol doesn't expose alignment) Item order is set per-child via attributes on the slotted children themselves: `<child order=\"3\">` for a fixed position, or `<child sm-order=\"N\">` / `<child md-order=\"N\">` / `<child lg-order=\"N\">` to override per breakpoint (resolved against THIS container's width via @container queries, same scope as the responsive padding/gap). The container observes slot changes and child attribute mutations and bridges these to `--_slot-order` / `--_slot-sm-order` / etc. custom properties on each child's inline style, which the container's CSS then reads via `::slotted(*)` inside @container queries. Cascade: `sm-order` falls back to `order` falls back to `0` at sm (and analogously for md/lg). No-op for `layout=\"columns\"` (CSS multicol has no per-item ordering hook). The `column-count` attribute (1-8) forces an exact column count for `layout=\"grid\"` (overrides auto-fit) and `layout=\"columns\"` (overrides the natural width-driven count). `sm-column-count` / `md-column-count` / `lg-column-count` resolve against this container's OWN width via an `@container (...)` query on the host — not against the viewport. That lets a footer in a narrow sidebar choose its own column count independent of the surrounding page width. `layout=\"lanes\"` packs items into balanced columns using native CSS grid lanes where supported, falling back to CSS multicol (column-order) elsewhere. CSS-only, no JS. Honours `gap` on both axes and `column-count`. Note that nldd-collection's lanes falls back to its own grid rather than to multicol: that component pages, and multicol redistributes the whole set every time load-more adds to it.",
|
|
22053
22104
|
"name": "NLDDContainer",
|
|
22054
22105
|
"members": [
|
|
22055
22106
|
{
|
|
@@ -26708,7 +26759,7 @@
|
|
|
26708
26759
|
"declarations": [
|
|
26709
26760
|
{
|
|
26710
26761
|
"kind": "class",
|
|
26711
|
-
"description": "A page layout with optional sticky header and footer. Without sticky-header, the host is the scroll container and the header is in normal flow. With sticky-header, the header becomes absolute and .page__scroll takes over scrolling. A ResizeObserver on the header sets padding-top on the scroll wrapper (only when not scrolled). In root-scroll mode (--context-scroll-mode: root, derived upstream by nldd-app-view) the page stops owning a scroller: the document scrolls and the sticky header/footer
|
|
26762
|
+
"description": "A page layout with optional sticky header and footer. Without sticky-header, the host is the scroll container and the header is in normal flow. With sticky-header, the header becomes absolute and .page__scroll takes over scrolling. A ResizeObserver on the header sets padding-top on the scroll wrapper (only when not scrolled). In root-scroll mode (--context-scroll-mode: root, derived upstream by nldd-app-view) the page stops owning a scroller: the document scrolls and the sticky header/footer stick against the document, offset by --context-inset-top/bottom. The mode is read on connect/resize and reflected to [data-scroll] so the CSS can branch. The page passes those insets on to its own content, with its sticky header and footer added: anything sticky inside (an nldd-sidebar-section, a sticky table head) reads --context-inset-top / --context-inset-bottom and clears every bar above and below it without being told a number. The heights are measured, because a top title bar shrinks as you scroll past its anchor. While the page owns the scroller, only its own bars count: the chrome above the page sits outside that scroller and does not push sticky content down.",
|
|
26712
26763
|
"name": "NLDDPage",
|
|
26713
26764
|
"members": [
|
|
26714
26765
|
{
|
|
@@ -30512,6 +30563,17 @@
|
|
|
30512
30563
|
"attribute": "checkbox",
|
|
30513
30564
|
"reflects": true
|
|
30514
30565
|
},
|
|
30566
|
+
{
|
|
30567
|
+
"kind": "field",
|
|
30568
|
+
"name": "radio",
|
|
30569
|
+
"type": {
|
|
30570
|
+
"text": "boolean"
|
|
30571
|
+
},
|
|
30572
|
+
"default": "false",
|
|
30573
|
+
"description": "When set, the whole row is one radio of a group. Ignored when href is set.",
|
|
30574
|
+
"attribute": "radio",
|
|
30575
|
+
"reflects": true
|
|
30576
|
+
},
|
|
30515
30577
|
{
|
|
30516
30578
|
"kind": "field",
|
|
30517
30579
|
"name": "checked",
|
|
@@ -30519,7 +30581,7 @@
|
|
|
30519
30581
|
"text": "boolean"
|
|
30520
30582
|
},
|
|
30521
30583
|
"default": "false",
|
|
30522
|
-
"description": "Checked state of a `checkbox` row.
|
|
30584
|
+
"description": "Checked state of a `checkbox` or `radio` row. A checkbox row toggles it on\nactivation; a radio row only ever sets it, because picking the option you\nalready have is not a way to unpick it.",
|
|
30523
30585
|
"attribute": "checked",
|
|
30524
30586
|
"reflects": true
|
|
30525
30587
|
},
|
|
@@ -30639,7 +30701,7 @@
|
|
|
30639
30701
|
"events": [
|
|
30640
30702
|
{
|
|
30641
30703
|
"name": "change",
|
|
30642
|
-
"description": "On a `checkbox` row after it toggles; detail: { checked: boolean }"
|
|
30704
|
+
"description": "On a `checkbox` row after it toggles, and on a `radio` row when it becomes checked; detail: { checked: boolean }"
|
|
30643
30705
|
}
|
|
30644
30706
|
],
|
|
30645
30707
|
"attributes": [
|
|
@@ -30692,7 +30754,16 @@
|
|
|
30692
30754
|
"type": {
|
|
30693
30755
|
"text": "boolean"
|
|
30694
30756
|
},
|
|
30695
|
-
"description": "
|
|
30757
|
+
"description": "Makes the whole row one radio of a group: the action becomes a `role=\"radio\"` button carrying `aria-checked`, and activation sets `checked` (never clears it) and fires `change`. Put the rows in an `nldd-list type=\"radiogroup\"`, which is what makes them a set. Wins over `button`, loses to `href` and `checkbox`. The arrow keys move focus without checking, where a native radio group and `nldd-radio-button-group` check as they go: a row can carry more than a label, so stepping past one should not commit it.",
|
|
30758
|
+
"name": "radio",
|
|
30759
|
+
"default": "false",
|
|
30760
|
+
"fieldName": "radio"
|
|
30761
|
+
},
|
|
30762
|
+
{
|
|
30763
|
+
"type": {
|
|
30764
|
+
"text": "boolean"
|
|
30765
|
+
},
|
|
30766
|
+
"description": "Checked state of a `checkbox` or `radio` row. A checkbox row toggles it on activation, a radio row only ever sets it",
|
|
30696
30767
|
"name": "checked",
|
|
30697
30768
|
"default": "false",
|
|
30698
30769
|
"fieldName": "checked"
|
|
@@ -30799,7 +30870,7 @@
|
|
|
30799
30870
|
"declarations": [
|
|
30800
30871
|
{
|
|
30801
30872
|
"kind": "class",
|
|
30802
|
-
"description": "A container for `nldd-list-item` elements. The `type` attribute switches the list's a11y role and behavior: - `list` (default) — `role=\"list\"`, items `role=\"listitem\"`. Reorderable allowed. - `tree` — `role=\"tree\"`, items `role=\"treeitem\"`. Branch rows put their child rows in their own `slot=\"children\"`, which the item renders as a `role=\"group\"`. Level, position and set size are NOT authored: the nesting represents the hierarchy, so assistive technology derives them. A branch row must carry `expanded`; the group is hidden while it is false. Visual indentation is the consumer's — repeat a spacer-cell per level. Comes with its own keyboard, see \"Tree\" below. - `navigation` — host `role=\"navigation\"`, items with `selected` get `aria-current=\"page\"` on their inner `<a>` or `<button>`. - `form` — rows that are not actions themselves: the controls inside them are. A row of a label and a field, a switch, a menu button, or a value you cannot change at all. Semantically the same as `list` (`role=\"list\"`, `role=\"listitem\"`), and everything visual is unchanged; what falls away is the keyboard of a list you walk through. No arrow navigation, so no promise of it either, and no tab stop on the row: Tab goes straight to the controls, in source order, the way it does in any form. Rows that ARE actions (`href`, `button`, `checkbox`, or a segment) contradict that and warn in development. SwiftUI draws the same line between `List` and `Form`, for the same reason. - `listbox` — an accessible, filterable listbox (combobox pattern). The list renders its OWN search input (`role=\"combobox\"`) pinned above the options; `.list__items` becomes `role=\"listbox\"` and items become `role=\"option\"`. Focus stays in the input, the active option moves via `aria-activedescendant`, and filtering is consumer-managed via the `input` event (toggle `[hidden]` on items). See \"Listbox\" below. Selection state is consumer-managed: the list never mutates `selected` itself. A list you walk through answers to the arrow keys, and there is no attribute to switch that on. Whether the keys do something is not a property of one list: it is what a reader may assume about all of them, and a per-list setting made that unknowable from the outside. It follows the type, which you can see before you touch a key. - ArrowUp / ArrowDown — move focus between the rows there is something to do with. A row of nothing but text is skipped, because focus that leads nowhere is a dead end. - Home / End — the first / last of those rows. - Tab — the list is ONE tab stop, so Tab moves past it rather than through it. Within the current row Tab walks that row's own controls: a chevron beside a checkbox, a menu button at the end. The same controls in the other rows are held out of the tab order (`tabindex=\"-1\"`, or `no-tab` on a design-system control that keeps its tab stop in its own shadow root), and so are this row's once focus leaves the list, so tabbing back in lands on the row again. - Escape — out of a control the row holds, back onto the row. One level up, where Shift+Tab is one step back. On the row itself the list claims nothing, so Escape carries on to whatever holds the list, and a control showing a menu keeps the first press for closing that menu. While focus sits in a control a row holds, the list stands down: those keys are the control's, and a list that took them anyway would pull focus out of a combo box or a text field mid-word. What the row IS — its own link, button or segments — keeps answering here. Arrows move focus only; selection stays consumer-managed. Three types answer differently, and all three say so on screen before you touch a key: a listbox runs its keyboard from its search field, a reorderable list moves rows with the arrows, and a form has no rows to move between at all. In `type=\"listbox\"` the list owns a native `<input role=\"combobox\">` (mirroring how `nldd-combo-box` wires an input to a slotted listbox). Keyboard, handled on the input so focus never leaves it: - ArrowDown / ArrowUp — move the active option among the VISIBLE (non-`[hidden]`) options (wrap around). - Home / End — first / last visible option. - Enter — activate the active option by triggering its inner action (a link navigates, a button fires the consumer's handler). Selection stays consumer-managed. - Escape — clear the search value (and refire `input`). On every active change the input's `aria-activedescendant` is set to the active option's id and the option is scrolled into view. The active option (`_highlighted` on the item, a highlight) is distinct from `selected`. Filtering is the consumer's job: listen to `input` (`{ detail: { value } }`) and toggle `[hidden]` on items; after the visible set changes the list resets the active option to the first visible one. `reorderable` and the roving arrow keys are ignored in listbox mode (listbox has its own keyboard). A tree adds to that keyboard, and counts the rows of an open branch as part of the order the arrows walk: - ArrowRight — opens a closed branch; on an open one it steps to its first child. - ArrowLeft — closes an open branch; on a leaf it steps out to the parent row. - Enter — follows the row: its own link or button, or on a segmented branch the first action that is not the chevron. A branch with only a chevron folds instead. - Space — open and close, the same as Right and Left. Only while focus sits on the row itself: a row that is its own control, and a segmented action you tabbed into, handle both keys themselves. Opening and closing runs through the row's own disclosure control — the segment marked `disclosure`, or the row itself when it is a button. The list activates that control rather than writing `expanded`, so the state keeps being set in one place: the consumer's handler. A row that is a link is never activated this way, since that would navigate away. The tree is one tab stop. Focus lands on the row itself when the row has no control of its own, because that is where `treeitem` sits and it makes assistive technology announce the row rather than a button inside it. Tab then walks the controls of THAT row (a chevron beside a checkbox, say) and leaves the list after the last one. A deliberate deviation: strictly speaking a row with several controls is a `treegrid`, not a `tree`. We keep the tree semantics — level and set size are what matters here, not rows and columns — and borrow the \"Tab within the row\" behavior from the grid pattern. Should a tree with real columns come up, that is when `treegrid` earns its own type. On reorder (type=\"list\" + reorderable), the list dispatches `nldd-reorder` with `fromIndex` / `toIndex` and expects the consumer to mutate the DOM (or their data model that renders the DOM). Focus is restored to the moved item's drag handle via a single `requestAnimationFrame` — this assumes the consumer reorders **synchronously** in the event handler. Async renderers (React, Vue, …) that update the DOM on a later tick will miss the focus restore and should manage focus themselves after their render commits.",
|
|
30873
|
+
"description": "A container for `nldd-list-item` elements. The `type` attribute switches the list's a11y role and behavior: - `list` (default) — `role=\"list\"`, items `role=\"listitem\"`. Reorderable allowed. - `radiogroup` — `role=\"radiogroup\"`, for a set of `nldd-list-item radio` rows: one choice, laid out as rows so each option can carry a count or a second line. The rows step out of the accessibility tree themselves (`role=\"none\"`), so the radios are the group's own children. The arrows move focus here and activation checks, rather than the selection following focus as it does in `nldd-radio-button-group`. - `tree` — `role=\"tree\"`, items `role=\"treeitem\"`. Branch rows put their child rows in their own `slot=\"children\"`, which the item renders as a `role=\"group\"`. Level, position and set size are NOT authored: the nesting represents the hierarchy, so assistive technology derives them. A branch row must carry `expanded`; the group is hidden while it is false. Visual indentation is the consumer's — repeat a spacer-cell per level. Comes with its own keyboard, see \"Tree\" below. - `navigation` — host `role=\"navigation\"`, items with `selected` get `aria-current=\"page\"` on their inner `<a>` or `<button>`. - `form` — rows that are not actions themselves: the controls inside them are. A row of a label and a field, a switch, a menu button, or a value you cannot change at all. Semantically the same as `list` (`role=\"list\"`, `role=\"listitem\"`), and everything visual is unchanged; what falls away is the keyboard of a list you walk through. No arrow navigation, so no promise of it either, and no tab stop on the row: Tab goes straight to the controls, in source order, the way it does in any form. Rows that ARE actions (`href`, `button`, `checkbox`, or a segment) contradict that and warn in development. SwiftUI draws the same line between `List` and `Form`, for the same reason. - `listbox` — an accessible, filterable listbox (combobox pattern). The list renders its OWN search input (`role=\"combobox\"`) pinned above the options; `.list__items` becomes `role=\"listbox\"` and items become `role=\"option\"`. Focus stays in the input, the active option moves via `aria-activedescendant`, and filtering is consumer-managed via the `input` event (toggle `[hidden]` on items). See \"Listbox\" below. Selection state is consumer-managed: the list never mutates `selected` itself. A list you walk through answers to the arrow keys, and there is no attribute to switch that on. Whether the keys do something is not a property of one list: it is what a reader may assume about all of them, and a per-list setting made that unknowable from the outside. It follows the type, which you can see before you touch a key. - ArrowUp / ArrowDown — move focus between the rows there is something to do with. A row of nothing but text is skipped, because focus that leads nowhere is a dead end. - Home / End — the first / last of those rows. - Tab — the list is ONE tab stop, so Tab moves past it rather than through it. Within the current row Tab walks that row's own controls: a chevron beside a checkbox, a menu button at the end. The same controls in the other rows are held out of the tab order (`tabindex=\"-1\"`, or `no-tab` on a design-system control that keeps its tab stop in its own shadow root), and so are this row's once focus leaves the list, so tabbing back in lands on the row again. - Escape — out of a control the row holds, back onto the row. One level up, where Shift+Tab is one step back. On the row itself the list claims nothing, so Escape carries on to whatever holds the list, and a control showing a menu keeps the first press for closing that menu. While focus sits in a control a row holds, the list stands down: those keys are the control's, and a list that took them anyway would pull focus out of a combo box or a text field mid-word. What the row IS — its own link, button or segments — keeps answering here. Arrows move focus only; selection stays consumer-managed. Three types answer differently, and all three say so on screen before you touch a key: a listbox runs its keyboard from its search field, a reorderable list moves rows with the arrows, and a form has no rows to move between at all. In `type=\"listbox\"` the list owns a native `<input role=\"combobox\">` (mirroring how `nldd-combo-box` wires an input to a slotted listbox). Keyboard, handled on the input so focus never leaves it: - ArrowDown / ArrowUp — move the active option among the VISIBLE (non-`[hidden]`) options (wrap around). - Home / End — first / last visible option. - Enter — activate the active option by triggering its inner action (a link navigates, a button fires the consumer's handler). Selection stays consumer-managed. - Escape — clear the search value (and refire `input`). On every active change the input's `aria-activedescendant` is set to the active option's id and the option is scrolled into view. The active option (`_highlighted` on the item, a highlight) is distinct from `selected`. Filtering is the consumer's job: listen to `input` (`{ detail: { value } }`) and toggle `[hidden]` on items; after the visible set changes the list resets the active option to the first visible one. `reorderable` and the roving arrow keys are ignored in listbox mode (listbox has its own keyboard). A tree adds to that keyboard, and counts the rows of an open branch as part of the order the arrows walk: - ArrowRight — opens a closed branch; on an open one it steps to its first child. - ArrowLeft — closes an open branch; on a leaf it steps out to the parent row. - Enter — follows the row: its own link or button, or on a segmented branch the first action that is not the chevron. A branch with only a chevron folds instead. - Space — open and close, the same as Right and Left. Only while focus sits on the row itself: a row that is its own control, and a segmented action you tabbed into, handle both keys themselves. Opening and closing runs through the row's own disclosure control — the segment marked `disclosure`, or the row itself when it is a button. The list activates that control rather than writing `expanded`, so the state keeps being set in one place: the consumer's handler. A row that is a link is never activated this way, since that would navigate away. The tree is one tab stop. Focus lands on the row itself when the row has no control of its own, because that is where `treeitem` sits and it makes assistive technology announce the row rather than a button inside it. Tab then walks the controls of THAT row (a chevron beside a checkbox, say) and leaves the list after the last one. A deliberate deviation: strictly speaking a row with several controls is a `treegrid`, not a `tree`. We keep the tree semantics — level and set size are what matters here, not rows and columns — and borrow the \"Tab within the row\" behavior from the grid pattern. Should a tree with real columns come up, that is when `treegrid` earns its own type. On reorder (type=\"list\" + reorderable), the list dispatches `nldd-reorder` with `fromIndex` / `toIndex` and expects the consumer to mutate the DOM (or their data model that renders the DOM). Focus is restored to the moved item's drag handle via a single `requestAnimationFrame` — this assumes the consumer reorders **synchronously** in the event handler. Async renderers (React, Vue, …) that update the DOM on a later tick will miss the focus restore and should manage focus themselves after their render commits.",
|
|
30803
30874
|
"name": "NLDDList",
|
|
30804
30875
|
"slots": [
|
|
30805
30876
|
{
|
|
@@ -30816,7 +30887,11 @@
|
|
|
30816
30887
|
},
|
|
30817
30888
|
{
|
|
30818
30889
|
"name": "empty",
|
|
30819
|
-
"description": "Shown when no items
|
|
30890
|
+
"description": "Shown when the list has no items at all. Empty by default: what an empty list should say is the app's to write, so put an `nldd-inline-dialog` here. There is nothing to search or filter in a list with no rows, so the search field of a `type=\"listbox\"` and a `[slot=\"toolbar\"]` are hidden along with them, and an unfilled slot takes the whole list off the page. A list that fetches its rows is in this state until they arrive: put an `nldd-inline-dialog variant=\"loading\"` here to hold the place rather than have the controls appear a moment later."
|
|
30891
|
+
},
|
|
30892
|
+
{
|
|
30893
|
+
"name": "no-results",
|
|
30894
|
+
"description": "Shown when the list has items but every one of them is `[hidden]`, which is what consumer-driven filtering leaves behind. A different state from `empty` and a different sentence: here the search field and the `[slot=\"toolbar\"]` stay, because they are the way back to the rows. Falls back to `[slot=\"empty\"]` when not given. In `type=\"listbox\"` it is suppressed while the search field is empty (no query yet), so the consumer can show just the search field or its own hint outside the list."
|
|
30820
30895
|
}
|
|
30821
30896
|
],
|
|
30822
30897
|
"members": [
|
|
@@ -37843,13 +37918,76 @@
|
|
|
37843
37918
|
}
|
|
37844
37919
|
]
|
|
37845
37920
|
},
|
|
37921
|
+
{
|
|
37922
|
+
"kind": "javascript-module",
|
|
37923
|
+
"path": "src/utilities/spacing-scale.ts",
|
|
37924
|
+
"declarations": [
|
|
37925
|
+
{
|
|
37926
|
+
"kind": "variable",
|
|
37927
|
+
"name": "SPACING_SCALE",
|
|
37928
|
+
"type": {
|
|
37929
|
+
"text": "[\n\t'0', '2', '4', '6', '8', '10', '12', '16', '20', '24',\n\t'28', '32', '40', '44', '48', '56', '64', '80', '96',\n]"
|
|
37930
|
+
},
|
|
37931
|
+
"default": "[ '0', '2', '4', '6', '8', '10', '12', '16', '20', '24', '28', '32', '40', '44', '48', '56', '64', '80', '96', ]",
|
|
37932
|
+
"description": "Every step there is. `'0'` is a value, not the absence of one."
|
|
37933
|
+
},
|
|
37934
|
+
{
|
|
37935
|
+
"kind": "function",
|
|
37936
|
+
"name": "spacingToValue",
|
|
37937
|
+
"return": {
|
|
37938
|
+
"type": {
|
|
37939
|
+
"text": "string | null"
|
|
37940
|
+
}
|
|
37941
|
+
},
|
|
37942
|
+
"parameters": [
|
|
37943
|
+
{
|
|
37944
|
+
"name": "value",
|
|
37945
|
+
"type": {
|
|
37946
|
+
"text": "string | undefined"
|
|
37947
|
+
}
|
|
37948
|
+
},
|
|
37949
|
+
{
|
|
37950
|
+
"name": "element",
|
|
37951
|
+
"type": {
|
|
37952
|
+
"text": "string"
|
|
37953
|
+
}
|
|
37954
|
+
},
|
|
37955
|
+
{
|
|
37956
|
+
"name": "attribute",
|
|
37957
|
+
"type": {
|
|
37958
|
+
"text": "string"
|
|
37959
|
+
}
|
|
37960
|
+
}
|
|
37961
|
+
],
|
|
37962
|
+
"description": "A step of the scale as the token it stands for.\n\nReturns null when there is nothing to set, so a caller can remove the\nproperty rather than write an empty one. `element` and `attribute` are only\nthere to name the offender in a dev warning."
|
|
37963
|
+
}
|
|
37964
|
+
],
|
|
37965
|
+
"exports": [
|
|
37966
|
+
{
|
|
37967
|
+
"kind": "js",
|
|
37968
|
+
"name": "SPACING_SCALE",
|
|
37969
|
+
"declaration": {
|
|
37970
|
+
"name": "SPACING_SCALE",
|
|
37971
|
+
"module": "src/utilities/spacing-scale.ts"
|
|
37972
|
+
}
|
|
37973
|
+
},
|
|
37974
|
+
{
|
|
37975
|
+
"kind": "js",
|
|
37976
|
+
"name": "spacingToValue",
|
|
37977
|
+
"declaration": {
|
|
37978
|
+
"name": "spacingToValue",
|
|
37979
|
+
"module": "src/utilities/spacing-scale.ts"
|
|
37980
|
+
}
|
|
37981
|
+
}
|
|
37982
|
+
]
|
|
37983
|
+
},
|
|
37846
37984
|
{
|
|
37847
37985
|
"kind": "javascript-module",
|
|
37848
37986
|
"path": "src/utilities/visibility-mixin.ts",
|
|
37849
37987
|
"declarations": [
|
|
37850
37988
|
{
|
|
37851
37989
|
"kind": "mixin",
|
|
37852
|
-
"description": "Adds `hide-below` and `hide-above` attributes that toggle visibility based\non the inline-size of an ancestor CSS container.\n\nWithout a `containerName` argument the
|
|
37990
|
+
"description": "Adds `hide-below` and `hide-above` attributes that toggle visibility based\non the inline-size of an ancestor CSS container.\n\nWithout a `containerName` argument the rule is an anonymous `@container (…)`\nquery — it matches the nearest ancestor that declares\n`container-type: inline-size`. Pass a name to target a specific container\n(e.g. `'cells-container'` for cells inside `nldd-list`, which sets that\nname inline on its host as a Safari shadow-DOM workaround).\n\nValues are either a named breakpoint — `sm` / `md` / `lg` — or a CSS length\n(e.g. '320px', '20rem'). Named values resolve to the standard breakpoint\nthresholds: `hide-below` uses the breakpoint's lower bound (e.g.\n`hide-below=\"lg\"` hides in sm+md and shows in lg), `hide-above` its upper\nbound; the open edges (below sm, above lg) are no-ops.\n\nThe named values are static CSS (see `visibility-mixin.styles.ts`), added\nthrough `finalizeStyles` so that a component's own `static styles` does not\nhave to know about them. A custom length has no static form: the threshold\nis only known at runtime and a container query cannot read one from a CSS\nvariable, so its rule is written at runtime into a constructable stylesheet\nthe shadow root adopts. Neither path is an inline stylesheet, so no consumer\nneeds `'unsafe-inline'` in its `style-src` for either.",
|
|
37853
37991
|
"name": "VisibilityMixin",
|
|
37854
37992
|
"members": [
|
|
37855
37993
|
{
|
|
@@ -37872,15 +38010,15 @@
|
|
|
37872
38010
|
},
|
|
37873
38011
|
{
|
|
37874
38012
|
"kind": "field",
|
|
37875
|
-
"name": "
|
|
38013
|
+
"name": "_visibilitySheet",
|
|
37876
38014
|
"type": {
|
|
37877
|
-
"text": "
|
|
38015
|
+
"text": "CSSStyleSheet | undefined"
|
|
37878
38016
|
},
|
|
37879
38017
|
"privacy": "private"
|
|
37880
38018
|
},
|
|
37881
38019
|
{
|
|
37882
38020
|
"kind": "method",
|
|
37883
|
-
"name": "
|
|
38021
|
+
"name": "_updateVisibilityRules",
|
|
37884
38022
|
"privacy": "private",
|
|
37885
38023
|
"return": {
|
|
37886
38024
|
"type": {
|