@nldd/design-system 0.8.88 → 0.8.90

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 (108) hide show
  1. package/README.md +4 -4
  2. package/custom-elements.json +303 -64
  3. package/dist/components/components.js +897 -201
  4. package/dist/components/content/image/image.d.ts +23 -3
  5. package/dist/components/content/image/image.d.ts.map +1 -1
  6. package/dist/components/content/image/image.js +74 -17
  7. package/dist/components/content/image/image.js.map +1 -1
  8. package/dist/components/content/image/image.template.js +1 -1
  9. package/dist/components/content/image/image.template.js.map +1 -1
  10. package/dist/components/{dist-LX8LuMac.js → dist-BLaE_n_F.js} +1 -1
  11. package/dist/components/{dist-CX3DK4i7.js → dist-BeymuiGt.js} +3 -3
  12. package/dist/components/{dist-CbCO0WCd.js → dist-CENYEz7C.js} +1 -1
  13. package/dist/components/{dist-B_Mnmrj4.js → dist-CYLM5ciE.js} +1 -1
  14. package/dist/components/{dist-fIxe0l7k.js → dist-DHA-0RyT.js} +91 -34
  15. package/dist/components/{dist-CgDuh26K.js → dist-D_ckX1sK.js} +1 -1
  16. package/dist/components/{dist-eVFegyjM.js → dist-Dh_b9r4M.js} +1 -1
  17. package/dist/components/{dist-DXZ-cFAl.js → dist-DkZlotgT.js} +2 -2
  18. package/dist/components/{dist-CSrO_mYe.js → dist-TCqV9dho.js} +1 -1
  19. package/dist/components/{dist-ByH8hQze.js → dist-Y54Lma86.js} +2 -2
  20. package/dist/components/{dist-CRwuSgMM.js → dist-yyE8P2O6.js} +2 -2
  21. package/dist/components/inputs/radio-button/radio-button.d.ts +58 -18
  22. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  23. package/dist/components/inputs/radio-button/radio-button.js +136 -29
  24. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  25. package/dist/components/inputs/radio-button/radio-button.styles.d.ts.map +1 -1
  26. package/dist/components/inputs/radio-button/radio-button.styles.js +17 -23
  27. package/dist/components/inputs/radio-button/radio-button.styles.js.map +1 -1
  28. package/dist/components/inputs/radio-button/radio-button.template.d.ts.map +1 -1
  29. package/dist/components/inputs/radio-button/radio-button.template.js +13 -10
  30. package/dist/components/inputs/radio-button/radio-button.template.js.map +1 -1
  31. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +65 -18
  32. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  33. package/dist/components/inputs/radio-button-field/radio-button-field.js +151 -29
  34. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  35. package/dist/components/inputs/radio-button-field/radio-button-field.styles.d.ts.map +1 -1
  36. package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +17 -0
  37. package/dist/components/inputs/radio-button-field/radio-button-field.styles.js.map +1 -1
  38. package/dist/components/inputs/radio-button-field/radio-button-field.template.d.ts.map +1 -1
  39. package/dist/components/inputs/radio-button-field/radio-button-field.template.js +21 -12
  40. package/dist/components/inputs/radio-button-field/radio-button-field.template.js.map +1 -1
  41. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +3 -0
  42. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
  43. package/dist/components/inputs/radio-button-group/radio-button-group.js +16 -4
  44. package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
  45. package/dist/components/inputs/segmented-control/segmented-control.d.ts +46 -13
  46. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  47. package/dist/components/inputs/segmented-control/segmented-control.js +145 -16
  48. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  49. package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
  50. package/dist/components/inputs/segmented-control/segmented-control.styles.js +16 -0
  51. package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
  52. package/dist/components/inputs/segmented-control/segmented-control.template.d.ts.map +1 -1
  53. package/dist/components/inputs/segmented-control/segmented-control.template.js +47 -24
  54. package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
  55. package/dist/components/inputs/text-editor/text-editor.cursor.d.ts.map +1 -1
  56. package/dist/components/inputs/text-editor/text-editor.cursor.js +14 -1
  57. package/dist/components/inputs/text-editor/text-editor.cursor.js.map +1 -1
  58. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
  59. package/dist/components/inputs/text-editor/text-editor.mentions.js +3 -1
  60. package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
  61. package/dist/components/inputs/toggle-button/toggle-button.d.ts +36 -2
  62. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  63. package/dist/components/inputs/toggle-button/toggle-button.js +116 -3
  64. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  65. package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
  66. package/dist/components/inputs/toggle-button/toggle-button.styles.js +17 -1
  67. package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
  68. package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
  69. package/dist/components/inputs/toggle-button/toggle-button.template.js +25 -2
  70. package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
  71. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +4 -0
  72. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
  73. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +21 -2
  74. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  75. package/dist/components/lists-and-tables/list/list.d.ts +1 -1
  76. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  77. package/dist/components/lists-and-tables/list/list.js +4 -3
  78. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  79. package/dist/components/lists-and-tables/list/list.template.d.ts.map +1 -1
  80. package/dist/components/lists-and-tables/list/list.template.js +15 -10
  81. package/dist/components/lists-and-tables/list/list.template.js.map +1 -1
  82. package/dist/components/status-and-feedback/notification/notification-region.d.ts +4 -0
  83. package/dist/components/status-and-feedback/notification/notification-region.d.ts.map +1 -1
  84. package/dist/components/status-and-feedback/notification/notification-region.js +99 -30
  85. package/dist/components/status-and-feedback/notification/notification-region.js.map +1 -1
  86. package/dist/components/status-and-feedback/notification/notification.d.ts +7 -1
  87. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
  88. package/dist/components/status-and-feedback/notification/notification.js +21 -1
  89. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  90. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
  91. package/dist/components/status-and-feedback/notification/notification.styles.js +6 -0
  92. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
  93. package/dist/css/variables.css +2 -2
  94. package/dist/nldd.min.js +618 -540
  95. package/dist/types/vue.d.ts +22 -18
  96. package/dist/utilities/described-by-mixin.d.ts +2 -2
  97. package/dist/utilities/described-by-mixin.d.ts.map +1 -1
  98. package/dist/utilities/described-by-mixin.js +11 -6
  99. package/dist/utilities/described-by-mixin.js.map +1 -1
  100. package/dist/utilities/radio-grouping.d.ts +66 -0
  101. package/dist/utilities/radio-grouping.d.ts.map +1 -0
  102. package/dist/utilities/radio-grouping.js +133 -0
  103. package/dist/utilities/radio-grouping.js.map +1 -0
  104. package/dist/utilities/radio-position.d.ts +20 -0
  105. package/dist/utilities/radio-position.d.ts.map +1 -0
  106. package/dist/utilities/radio-position.js +11 -0
  107. package/dist/utilities/radio-position.js.map +1 -0
  108. package/package.json +10 -10
package/README.md CHANGED
@@ -30,7 +30,7 @@ import { NLDDButton, NLDDCheckbox, NLDDSwitch } from '@nldd/design-system';
30
30
 
31
31
  ## Storybook
32
32
 
33
- Bekijk de live component documentatie: **https://minbzk.github.io/storybook/**
33
+ Bekijk de live component documentatie: **https://nederlandsedigitaledienst.github.io/design-system/**
34
34
 
35
35
  ## Claude Code plugin
36
36
 
@@ -41,7 +41,7 @@ juiste tags, attributen, CSS-tokens en patronen.
41
41
  Toevoegen en installeren:
42
42
 
43
43
  ```
44
- /plugin marketplace add MinBZK/storybook
44
+ /plugin marketplace add NederlandseDigitaleDienst/design-system
45
45
  /plugin install nldd@nldd-plugins
46
46
  ```
47
47
 
@@ -78,7 +78,7 @@ npm run storybook
78
78
  | `accessible-label` | string | `''` | Toegankelijk label voor schermlezers |
79
79
  | `popovertarget` | string | `''` | ID van het popover-element |
80
80
 
81
- Zie de [Storybook-documentatie](https://minbzk.github.io/storybook/) voor alle componenten.
81
+ Zie de [Storybook-documentatie](https://nederlandsedigitaledienst.github.io/design-system/) voor alle componenten.
82
82
 
83
83
  ## Styling structuur
84
84
 
@@ -121,7 +121,7 @@ huisstijlkleur van het hele systeem bepaalt.
121
121
 
122
122
  ## Feedback en verzoeken
123
123
 
124
- Mis je een component of wil je een wijziging voorstellen? [Maak een issue aan](https://github.com/MinBZK/storybook/issues).
124
+ Mis je een component of wil je een wijziging voorstellen? [Maak een issue aan](https://github.com/NederlandseDigitaleDienst/design-system/issues).
125
125
 
126
126
  ## Fonts
127
127
 
@@ -4109,7 +4109,7 @@
4109
4109
  },
4110
4110
  "default": "''",
4111
4111
  "fieldName": "alt",
4112
- "description": "Alt text. Required unless `decorative`."
4112
+ "description": "Alt text for the image from `src`. Required unless `decorative`; slotted media carries its own."
4113
4113
  },
4114
4114
  {
4115
4115
  "name": "srcset",
@@ -4263,7 +4263,7 @@
4263
4263
  "slots": [
4264
4264
  {
4265
4265
  "name": "",
4266
- "description": "Custom `<img>`, `<picture>` or inline `<svg>` (overrides the src-based default). An inline svg keeps its own colors and scales by its viewBox, so a drawing gets the same box, ratio and caption as a photo. The internal `error` listener is attached only to the built-in `<img>`, so slotted content does not trigger the error-state overlay automatically. Consumers slotting their own image are responsible for handling its error state (e.g. swapping the slot content or styling a fallback)."
4266
+ "description": "Custom `<img>`, `<picture>` or inline `<svg>` (overrides the src-based default). An inline svg keeps its own colors and scales by its viewBox, so a drawing gets the same box, ratio and caption as a photo. Slotted media carries its own text alternative: an `alt` on the img (empty when it conveys nothing), or `role=\"img\"` with an `aria-label`, `aria-labelledby` or `<title>` on the svg. The internal `error` listener is attached only to the built-in `<img>`, so slotted content does not trigger the error-state overlay automatically. Consumers slotting their own image are responsible for handling its error state (e.g. swapping the slot content or styling a fallback)."
4267
4267
  },
4268
4268
  {
4269
4269
  "name": "caption",
@@ -12763,7 +12763,7 @@
12763
12763
  "declarations": [
12764
12764
  {
12765
12765
  "kind": "class",
12766
- "description": "A radio button with an inline label. Use inside nldd-radio-button-group for keyboard navigation and group semantics. The group sets the name. Form-associated: the checked field submits its `value` under `name` (the inner nldd-radio-button sits in the shadow root and never joins the consumer's form; the field submits on its behalf). Unchecking siblings is the group's job, so exactly one value per group reaches the form.",
12766
+ "description": "A radio button with an inline label. Use inside nldd-radio-button-group, which sets the name and labels the group. Fields that stand on their own group by name, the way native radios do: checking one unchecks the others, the arrow keys move between them and Tab stops at the group once. Put them in a container with role=\"radiogroup\", or a screen reader has nothing to count them from. The field is the radio: it carries the role, the state, the label it is announced by and the focus, and the nldd-radio-button inside only draws the shape. A radio of its own in there would be a second control inside a control, and a group of one to count. Form-associated: the checked field submits its `value` under `name`. Unchecking siblings is the group's job, so exactly one value per group reaches the form.",
12767
12767
  "name": "NLDDRadioButtonField",
12768
12768
  "members": [
12769
12769
  {
@@ -12888,22 +12888,14 @@
12888
12888
  },
12889
12889
  {
12890
12890
  "kind": "method",
12891
- "name": "focus",
12891
+ "name": "select",
12892
+ "privacy": "public",
12892
12893
  "return": {
12893
12894
  "type": {
12894
12895
  "text": "void"
12895
12896
  }
12896
12897
  },
12897
- "parameters": [
12898
- {
12899
- "name": "options",
12900
- "optional": true,
12901
- "type": {
12902
- "text": "FocusOptions"
12903
- }
12904
- }
12905
- ],
12906
- "description": "Delegates focus to the inner `<nldd-radio-button>`, which in turn focuses\nits native input. Lets consumers call `radioFieldEl.focus()` without\nreaching into shadow DOM."
12898
+ "description": "Checks this field, the way a click or the space bar does. The group hears\nthe change and unchecks the others; without a group the fields that share\nits name are unchecked here."
12907
12899
  },
12908
12900
  {
12909
12901
  "kind": "method",
@@ -12913,7 +12905,7 @@
12913
12905
  "text": "Element | null"
12914
12906
  }
12915
12907
  },
12916
- "description": "The radio button it renders knows which element inside itself is the control.",
12908
+ "description": "The element assistive software meets is this one, so the description and\nthe invalid state belong here rather than on the shape inside.",
12917
12909
  "inheritedFrom": {
12918
12910
  "name": "DescribedBy",
12919
12911
  "module": "src/utilities/described-by-mixin.ts"
@@ -13094,7 +13086,7 @@
13094
13086
  "text": "string"
13095
13087
  },
13096
13088
  "default": "''",
13097
- "description": "Radio group name for form submission, forwarded to the inner nldd-radio-button. Set automatically by nldd-radio-button-group.",
13089
+ "description": "Radio group name for form submission; ties the fields of one group together. Set automatically by nldd-radio-button-group.",
13098
13090
  "fieldName": "name"
13099
13091
  },
13100
13092
  {
@@ -13104,7 +13096,7 @@
13104
13096
  },
13105
13097
  "default": "false",
13106
13098
  "fieldName": "required",
13107
- "description": "Required state, forwarded to the inner nldd-radio-button. Set automatically by nldd-radio-button-group."
13099
+ "description": "Required state. What it asks is whether anything in the group is checked, as a native radio does. Set automatically by nldd-radio-button-group."
13108
13100
  },
13109
13101
  {
13110
13102
  "name": "label",
@@ -13361,7 +13353,7 @@
13361
13353
  "declarations": [
13362
13354
  {
13363
13355
  "kind": "class",
13364
- "description": "WAI-ARIA: Wrap radio buttons in a <fieldset>/<legend> or a container with role=\"radiogroup\" and aria-labelledby for proper group semantics. <fieldset> <legend>Kies een optie</legend> <nldd-radio-button name=\"options\" value=\"1\">Optie 1</nldd-radio-button> <nldd-radio-button name=\"options\" value=\"2\">Optie 2</nldd-radio-button> </fieldset>",
13356
+ "description": "WAI-ARIA: put the buttons of one group in a container with role=\"radiogroup\" and a name of its own. A screen reader counts the options from that container, so a bare <fieldset> (which is a group, not a radiogroup) leaves them uncounted. nldd-radio-button-group does this for you. Radio buttons with the same name, in the same form and the same tree, form one group the way native radios do: checking one unchecks the others, the arrow keys move between them, Tab stops at the group once, and a screen reader hears each one's place in it. The element itself is the radio, because an input per shadow root would leave every button a group of one. The shape is all this component draws. A radio with a label beside it is nldd-radio-button-field. <fieldset role=\"radiogroup\" aria-labelledby=\"options-label\"> <legend id=\"options-label\">Kies een optie</legend> <nldd-radio-button name=\"options\" value=\"1\" accessible-label=\"Optie 1\"></nldd-radio-button> <nldd-radio-button name=\"options\" value=\"2\" accessible-label=\"Optie 2\"></nldd-radio-button> </fieldset>",
13365
13357
  "name": "NLDDRadioButton",
13366
13358
  "members": [
13367
13359
  {
@@ -13425,6 +13417,17 @@
13425
13417
  "attribute": "required",
13426
13418
  "reflects": true
13427
13419
  },
13420
+ {
13421
+ "kind": "field",
13422
+ "name": "focusRing",
13423
+ "type": {
13424
+ "text": "boolean"
13425
+ },
13426
+ "default": "false",
13427
+ "description": "Set by nldd-radio-button-field. Not part of the public API: that field is\nthe radio and holds the focus, while the shape it rings is drawn here.",
13428
+ "attribute": "focus-ring",
13429
+ "reflects": true
13430
+ },
13428
13431
  {
13429
13432
  "kind": "field",
13430
13433
  "name": "name",
@@ -13464,6 +13467,20 @@
13464
13467
  "attribute": "invalid",
13465
13468
  "reflects": true
13466
13469
  },
13470
+ {
13471
+ "kind": "method",
13472
+ "name": "describedTarget",
13473
+ "return": {
13474
+ "type": {
13475
+ "text": "Element | null"
13476
+ }
13477
+ },
13478
+ "description": "The element assistive software meets is this one, so the description and\nthe invalid state belong here rather than on something inside.",
13479
+ "inheritedFrom": {
13480
+ "name": "DescribedBy",
13481
+ "module": "src/utilities/described-by-mixin.ts"
13482
+ }
13483
+ },
13467
13484
  {
13468
13485
  "kind": "method",
13469
13486
  "name": "formValue",
@@ -13508,30 +13525,12 @@
13508
13525
  "kind": "method",
13509
13526
  "name": "select",
13510
13527
  "privacy": "public",
13511
- "return": {
13512
- "type": {
13513
- "text": "void"
13514
- }
13515
- }
13516
- },
13517
- {
13518
- "kind": "method",
13519
- "name": "focus",
13520
13528
  "return": {
13521
13529
  "type": {
13522
13530
  "text": "void"
13523
13531
  }
13524
13532
  },
13525
- "parameters": [
13526
- {
13527
- "name": "options",
13528
- "optional": true,
13529
- "type": {
13530
- "text": "FocusOptions"
13531
- }
13532
- }
13533
- ],
13534
- "description": "Delegates focus to the inner native radio `<input>`, so consumers can\ncall `radioEl.focus()` without reaching into shadow DOM."
13533
+ "description": "Checks this radio, the way a click or the space bar does."
13535
13534
  },
13536
13535
  {
13537
13536
  "kind": "field",
@@ -13546,20 +13545,6 @@
13546
13545
  "module": "src/utilities/described-by-mixin.ts"
13547
13546
  }
13548
13547
  },
13549
- {
13550
- "kind": "method",
13551
- "name": "describedTarget",
13552
- "return": {
13553
- "type": {
13554
- "text": "Element | null"
13555
- }
13556
- },
13557
- "description": "The element the description belongs to. Override where it differs.\n\nPublic rather than protected because TypeScript refuses to emit a\ndeclaration for an anonymous class with protected members, and a mixin\nreturns exactly that. Same reason `formValue()` is public in\nFormAssociated.",
13558
- "inheritedFrom": {
13559
- "name": "DescribedBy",
13560
- "module": "src/utilities/described-by-mixin.ts"
13561
- }
13562
- },
13563
13548
  {
13564
13549
  "kind": "field",
13565
13550
  "name": "formAssociated",
@@ -13705,7 +13690,7 @@
13705
13690
  },
13706
13691
  "default": "false",
13707
13692
  "fieldName": "decorative",
13708
- "description": "Renders the shape without the input: no focus, no name/value, nothing announced. For a control that owns the state elsewhere, such as a list row that is itself the radio; putting a real input in there would nest a control inside a control."
13693
+ "description": "Renders the shape only: no role, no focus, no name/value, nothing announced. For a control that owns the state elsewhere, such as a list row or an nldd-radio-button-field that is itself the radio; putting a second radio in there would nest a control inside a control."
13709
13694
  },
13710
13695
  {
13711
13696
  "name": "disabled",
@@ -13732,7 +13717,16 @@
13732
13717
  },
13733
13718
  "default": "false",
13734
13719
  "fieldName": "required",
13735
- "description": "Required state"
13720
+ "description": "Required state. What it asks is whether anything in the group is checked, as a native radio does."
13721
+ },
13722
+ {
13723
+ "name": "focus-ring",
13724
+ "type": {
13725
+ "text": "boolean"
13726
+ },
13727
+ "default": "false",
13728
+ "description": "Draws the focus ring around the shape. Set by nldd-radio-button-field, which is the radio itself and holds the focus. Not part of the public API.",
13729
+ "fieldName": "focusRing"
13736
13730
  },
13737
13731
  {
13738
13732
  "name": "name",
@@ -13759,7 +13753,7 @@
13759
13753
  },
13760
13754
  "default": "''",
13761
13755
  "fieldName": "accessibleLabel",
13762
- "description": "Accessible label forwarded as aria-label to the native input."
13756
+ "description": "Accessible label, set as aria-label on this element: it is the radio."
13763
13757
  },
13764
13758
  {
13765
13759
  "name": "invalid",
@@ -14511,7 +14505,7 @@
14511
14505
  }
14512
14506
  }
14513
14507
  ],
14514
- "description": "Delegates focus to the inner native `<input>`, so consumers can call\n`itemEl.focus()` without reaching into shadow DOM."
14508
+ "description": "Delegates focus to whichever control this mode renders: the element itself\nin radio mode, the native `<input>` in checkbox mode. Lets consumers call\n`itemEl.focus()` without reaching into shadow DOM."
14515
14509
  }
14516
14510
  ],
14517
14511
  "events": [
@@ -14528,7 +14522,7 @@
14528
14522
  },
14529
14523
  "default": "false",
14530
14524
  "fieldName": "required",
14531
- "description": "Required state. Set by nldd-segmented-control."
14525
+ "description": "Required state of the native checkbox. In radio mode the group carries the constraint."
14532
14526
  },
14533
14527
  {
14534
14528
  "name": "value",
@@ -14581,7 +14575,7 @@
14581
14575
  "text": "SegmentedControlType"
14582
14576
  },
14583
14577
  "default": "'radio'",
14584
- "description": "Type of the native input: 'radio' | 'checkbox' (default: 'radio'). Set by nldd-segmented-control.",
14578
+ "description": "Selection mode: 'radio' | 'checkbox' (default: 'radio'). In radio mode the item is the radio itself, in checkbox mode it renders a native checkbox. Set by nldd-segmented-control.",
14585
14579
  "fieldName": "inputType"
14586
14580
  },
14587
14581
  {
@@ -14590,7 +14584,7 @@
14590
14584
  "text": "string"
14591
14585
  },
14592
14586
  "default": "''",
14593
- "description": "Name of the group for form submission, put on the native input. Set by nldd-segmented-control.",
14587
+ "description": "Name of the group for form submission, put on the native checkbox. Set by nldd-segmented-control.",
14594
14588
  "fieldName": "groupName"
14595
14589
  },
14596
14590
  {
@@ -14637,7 +14631,7 @@
14637
14631
  "text": "boolean"
14638
14632
  },
14639
14633
  "default": "false",
14640
- "description": "Marks the group as required: something has to be selected.\n\nHanded to the items, because that is where the platform reads it. One\nrequired radio makes the whole group required, and the browser writes its\nown message in the user's language.\n\nOnly in radio mode. The same attribute on a checkbox means that box has to\nbe ticked, so spreading it over a checkbox group would demand all of them\ninstead of one. HTML has no way to say \"at least one of these\", and\nneither do we: `aria-required` still goes on the group so assistive\nsoftware says it, but nothing enforces it.",
14634
+ "description": "Marks the group as required: something has to be selected.\n\nThe group carries the constraint, on a radio of its own that is checked as\nsoon as anything is selected. The items are the radios the user meets, and\nthey have no input left to read it from. The browser writes the message in\nthe user's language.\n\nOnly in radio mode. The same attribute on a checkbox means that box has to\nbe ticked, so a required checkbox group would demand all of them instead of\none. HTML has no way to say \"at least one of these\", and neither do we:\n`aria-required` still goes on the group so assistive software says it, but\nnothing enforces it.",
14641
14635
  "attribute": "required",
14642
14636
  "reflects": true
14643
14637
  },
@@ -14989,7 +14983,7 @@
14989
14983
  },
14990
14984
  "default": "'radio'",
14991
14985
  "fieldName": "type",
14992
- "description": "Input type: 'radio' | 'checkbox' (default: 'radio')."
14986
+ "description": "Selection mode: 'radio' | 'checkbox' (default: 'radio')."
14993
14987
  },
14994
14988
  {
14995
14989
  "name": "variant",
@@ -15025,7 +15019,7 @@
15025
15019
  },
15026
15020
  "default": "''",
15027
15021
  "fieldName": "name",
15028
- "description": "Name for form submission, forwarded to native inputs"
15022
+ "description": "Name for form submission"
15029
15023
  },
15030
15024
  {
15031
15025
  "name": "accessible-label",
@@ -20959,7 +20953,7 @@
20959
20953
  "declarations": [
20960
20954
  {
20961
20955
  "kind": "class",
20962
- "description": "A selectable button that toggles between selected and unselected. Available as a button (aria-pressed), checkbox, or radio input.",
20956
+ "description": "A selectable button that toggles between selected and unselected. Available as a button (aria-pressed), a checkbox, or a radio. In radio mode the button itself is the radio: it carries the role, the state and its place in the group. A native radio in a shadow root of its own would be a group of one, counted as \"1 of 1\" and stopped at by Tab.",
20963
20957
  "name": "NLDDToggleButton",
20964
20958
  "members": [
20965
20959
  {
@@ -21344,7 +21338,7 @@
21344
21338
  },
21345
21339
  "default": "'button'",
21346
21340
  "fieldName": "type",
21347
- "description": "Underlying element (default: 'button')"
21341
+ "description": "What the button is: a button with aria-pressed, a native checkbox, or a radio (default: 'button')"
21348
21342
  },
21349
21343
  {
21350
21344
  "name": "size",
@@ -31365,7 +31359,7 @@
31365
31359
  },
31366
31360
  {
31367
31361
  "name": "empty",
31368
- "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."
31362
+ "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 a `[slot=\"toolbar\"]` is hidden along with them, and an unfilled slot takes the whole list off the page. A `type=\"listbox\"` is the exception on both counts: its search field is where the rows come from, so the field, the toolbar and the list itself stay, and the message waits until there is a query, the same as `no-results` does. 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."
31369
31363
  },
31370
31364
  {
31371
31365
  "name": "no-results",
@@ -36916,6 +36910,10 @@
36916
36910
  "type": {
36917
36911
  "text": "readonly Element[]"
36918
36912
  }
36913
+ },
36914
+ {
36915
+ "name": "onSelf",
36916
+ "default": "false"
36919
36917
  }
36920
36918
  ],
36921
36919
  "description": "Points an element at the elements that describe it.\n\nElement references and not ids, because an id only resolves inside the tree\nof the element that carries it. An `aria-describedby=\"err\"` on an input in a\nshadow root cannot find an error text in the light DOM: the attribute is\nwritten, the id is right, and the description comes out empty.\n`ariaDescribedByElements` takes the elements themselves and crosses the\nboundary."
@@ -36940,6 +36938,10 @@
36940
36938
  "type": {
36941
36939
  "text": "boolean"
36942
36940
  }
36941
+ },
36942
+ {
36943
+ "name": "onSelf",
36944
+ "default": "false"
36943
36945
  }
36944
36946
  ],
36945
36947
  "description": "Announces that a control is invalid, on the element assistive software meets.\n\nNothing is drawn for it, and that is a decision rather than an omission: what\nis wrong belongs in an nldd-validation-list, in words. A red ring\naround a single checkbox would say the option is wrong, while it is the\nquestion that is unanswered. Choosing not to show it is no reason to keep\nquiet about it, so `aria-invalid` goes on regardless.\n\nA component that wraps another one hands the state on, the same way it hands\non the description."
@@ -38008,6 +38010,243 @@
38008
38010
  }
38009
38011
  ]
38010
38012
  },
38013
+ {
38014
+ "kind": "javascript-module",
38015
+ "path": "src/utilities/radio-grouping.ts",
38016
+ "declarations": [
38017
+ {
38018
+ "kind": "class",
38019
+ "description": "",
38020
+ "name": "RadioGrouping",
38021
+ "members": [
38022
+ {
38023
+ "kind": "field",
38024
+ "name": "position",
38025
+ "type": {
38026
+ "text": "RadioPosition | null"
38027
+ },
38028
+ "default": "null",
38029
+ "description": "Its place among the radios that share its name, or null when it has none."
38030
+ },
38031
+ {
38032
+ "kind": "field",
38033
+ "name": "answered",
38034
+ "type": {
38035
+ "text": "boolean"
38036
+ },
38037
+ "default": "false",
38038
+ "description": "Whether anything in the group is checked, which is what `required` asks of\na radio: one of these, not this one. A radio without a group answers for\nitself, because it is the whole group."
38039
+ },
38040
+ {
38041
+ "kind": "field",
38042
+ "name": "_groupedIn",
38043
+ "type": {
38044
+ "text": "RadioGroupKey | null"
38045
+ },
38046
+ "privacy": "private",
38047
+ "default": "null",
38048
+ "description": "Where it was grouped last, so the radios it leaves behind hear of it."
38049
+ },
38050
+ {
38051
+ "kind": "method",
38052
+ "name": "hostConnected",
38053
+ "return": {
38054
+ "type": {
38055
+ "text": "void"
38056
+ }
38057
+ }
38058
+ },
38059
+ {
38060
+ "kind": "method",
38061
+ "name": "hostDisconnected",
38062
+ "return": {
38063
+ "type": {
38064
+ "text": "void"
38065
+ }
38066
+ }
38067
+ },
38068
+ {
38069
+ "kind": "method",
38070
+ "name": "regroup",
38071
+ "return": {
38072
+ "type": {
38073
+ "text": "void"
38074
+ }
38075
+ },
38076
+ "description": "Reads which group this radio is in now, and recounts the one it left."
38077
+ },
38078
+ {
38079
+ "kind": "method",
38080
+ "name": "refresh",
38081
+ "return": {
38082
+ "type": {
38083
+ "text": "void"
38084
+ }
38085
+ },
38086
+ "description": "Counts the group again, after this radio was checked or disabled."
38087
+ },
38088
+ {
38089
+ "kind": "method",
38090
+ "name": "uncheckOthers",
38091
+ "return": {
38092
+ "type": {
38093
+ "text": "void"
38094
+ }
38095
+ },
38096
+ "description": "Unchecks the others, as checking a native radio does."
38097
+ },
38098
+ {
38099
+ "kind": "method",
38100
+ "name": "moveWithArrow",
38101
+ "return": {
38102
+ "type": {
38103
+ "text": ""
38104
+ }
38105
+ },
38106
+ "parameters": [
38107
+ {
38108
+ "name": "e",
38109
+ "type": {
38110
+ "text": "KeyboardEvent"
38111
+ }
38112
+ }
38113
+ ],
38114
+ "description": "Moves to the next radio of the group and checks it, as the arrow keys do\nfor native radios. Disabled options are stepped over, and the ends wrap."
38115
+ },
38116
+ {
38117
+ "kind": "method",
38118
+ "name": "_key",
38119
+ "privacy": "private",
38120
+ "return": {
38121
+ "type": {
38122
+ "text": "RadioGroupKey | null"
38123
+ }
38124
+ }
38125
+ },
38126
+ {
38127
+ "kind": "method",
38128
+ "name": "_apply",
38129
+ "privacy": "private",
38130
+ "return": {
38131
+ "type": {
38132
+ "text": "void"
38133
+ }
38134
+ },
38135
+ "parameters": [
38136
+ {
38137
+ "name": "position",
38138
+ "type": {
38139
+ "text": "RadioPosition | null"
38140
+ }
38141
+ },
38142
+ {
38143
+ "name": "answered",
38144
+ "type": {
38145
+ "text": "boolean"
38146
+ }
38147
+ }
38148
+ ],
38149
+ "description": "Compared by value: a recount hands out new objects for the same place, and\nasking for a render on every one of those is a render per radio per\nkeystroke, each of them scheduled from inside an update that had just\nfinished."
38150
+ },
38151
+ {
38152
+ "kind": "method",
38153
+ "name": "_radiosIn",
38154
+ "privacy": "private",
38155
+ "static": true,
38156
+ "return": {
38157
+ "type": {
38158
+ "text": "GroupedRadio[]"
38159
+ }
38160
+ },
38161
+ "parameters": [
38162
+ {
38163
+ "name": "{ root, name, form }",
38164
+ "type": {
38165
+ "text": "RadioGroupKey"
38166
+ }
38167
+ }
38168
+ ]
38169
+ },
38170
+ {
38171
+ "kind": "method",
38172
+ "name": "_recount",
38173
+ "privacy": "private",
38174
+ "static": true,
38175
+ "return": {
38176
+ "type": {
38177
+ "text": "void"
38178
+ }
38179
+ },
38180
+ "parameters": [
38181
+ {
38182
+ "name": "key",
38183
+ "type": {
38184
+ "text": "RadioGroupKey"
38185
+ }
38186
+ }
38187
+ ],
38188
+ "description": "A radio on its own keeps the place the browser gives it: none."
38189
+ }
38190
+ ]
38191
+ }
38192
+ ],
38193
+ "exports": [
38194
+ {
38195
+ "kind": "js",
38196
+ "name": "RadioGrouping",
38197
+ "declaration": {
38198
+ "name": "RadioGrouping",
38199
+ "module": "src/utilities/radio-grouping.ts"
38200
+ }
38201
+ }
38202
+ ]
38203
+ },
38204
+ {
38205
+ "kind": "javascript-module",
38206
+ "path": "src/utilities/radio-position.ts",
38207
+ "declarations": [
38208
+ {
38209
+ "kind": "function",
38210
+ "name": "radioPositions",
38211
+ "return": {
38212
+ "type": {
38213
+ "text": "RadioPosition[]"
38214
+ }
38215
+ },
38216
+ "parameters": [
38217
+ {
38218
+ "name": "radios",
38219
+ "type": {
38220
+ "text": "readonly T[]"
38221
+ }
38222
+ },
38223
+ {
38224
+ "name": "isChecked",
38225
+ "type": {
38226
+ "text": "(radio: T) => boolean"
38227
+ }
38228
+ },
38229
+ {
38230
+ "name": "isDisabled",
38231
+ "type": {
38232
+ "text": "(radio: T) => boolean"
38233
+ }
38234
+ }
38235
+ ],
38236
+ "description": "A position for every radio of a group, in the order given."
38237
+ }
38238
+ ],
38239
+ "exports": [
38240
+ {
38241
+ "kind": "js",
38242
+ "name": "radioPositions",
38243
+ "declaration": {
38244
+ "name": "radioPositions",
38245
+ "module": "src/utilities/radio-position.ts"
38246
+ }
38247
+ }
38248
+ ]
38249
+ },
38011
38250
  {
38012
38251
  "kind": "javascript-module",
38013
38252
  "path": "src/utilities/reflect-non-default.ts",