@nordhealth/components 1.0.0-alpha.47 → 1.0.0-alpha.48

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 (75) hide show
  1. package/custom-elements.json +548 -467
  2. package/lib/Badge.js +1 -1
  3. package/lib/Button.js +1 -1
  4. package/lib/Calendar-6776543a.js +13 -0
  5. package/lib/Calendar-6776543a.js.map +1 -0
  6. package/lib/Calendar.js +1 -1
  7. package/lib/Card.js +1 -1
  8. package/lib/Checkbox.js +1 -1
  9. package/lib/CommandMenu.js +1 -1
  10. package/lib/CommandMenu.js.map +1 -1
  11. package/lib/CommandMenuAction.js +1 -1
  12. package/lib/DatePicker.js +1 -1
  13. package/lib/DatePicker.js.map +1 -1
  14. package/lib/Fieldset.js +1 -1
  15. package/lib/{FormAssociatedMixin-3af06f3e.js → FormAssociatedMixin-b460125c.js} +2 -2
  16. package/lib/{FormAssociatedMixin-3af06f3e.js.map → FormAssociatedMixin-b460125c.js.map} +1 -1
  17. package/lib/{FormField-43d04caa.js → FormField-21cad3fa.js} +2 -2
  18. package/lib/FormField-21cad3fa.js.map +1 -0
  19. package/lib/Header.js +2 -0
  20. package/lib/Header.js.map +1 -0
  21. package/lib/Icon.js +1 -1
  22. package/lib/Input.js +1 -1
  23. package/lib/{InputMixin-ce7052a0.js → InputMixin-367f0927.js} +2 -2
  24. package/lib/{InputMixin-ce7052a0.js.map → InputMixin-367f0927.js.map} +1 -1
  25. package/lib/KeyboardController.js +1 -1
  26. package/lib/{LightDismissController-fe8ab526.js → LightDismissController-cc5b4bf2.js} +2 -2
  27. package/lib/{LightDismissController-fe8ab526.js.map → LightDismissController-cc5b4bf2.js.map} +1 -1
  28. package/lib/{LightDomController-84246dce.js → LightDomController-37815039.js} +2 -2
  29. package/lib/{LightDomController-84246dce.js.map → LightDomController-37815039.js.map} +1 -1
  30. package/lib/Radio.js +1 -1
  31. package/lib/Select.js +1 -1
  32. package/lib/{ShortcutController-ff7b7fea.js → ShortcutController-93173ff4.js} +2 -2
  33. package/lib/{ShortcutController-ff7b7fea.js.map → ShortcutController-93173ff4.js.map} +1 -1
  34. package/lib/Spinner.js +1 -1
  35. package/lib/Stack.js +1 -1
  36. package/lib/Stack.js.map +1 -1
  37. package/lib/Table.js +1 -1
  38. package/lib/{TextField-8f1a0294.js → TextField-d925074c.js} +2 -2
  39. package/lib/TextField-d925074c.js.map +1 -0
  40. package/lib/Textarea.js +1 -1
  41. package/lib/Tooltip.js +1 -1
  42. package/lib/Tooltip.js.map +1 -1
  43. package/lib/VisuallyHidden.js +1 -1
  44. package/lib/{class-map-8601d1a3.js → class-map-df701775.js} +2 -2
  45. package/lib/{class-map-8601d1a3.js.map → class-map-df701775.js.map} +1 -1
  46. package/lib/{directive-helpers-3d1ca3c6.js → directive-helpers-f86e6d16.js} +2 -2
  47. package/lib/{directive-helpers-3d1ca3c6.js.map → directive-helpers-f86e6d16.js.map} +1 -1
  48. package/lib/{if-defined-c9888cf2.js → if-defined-f6a18fde.js} +2 -2
  49. package/lib/{if-defined-c9888cf2.js.map → if-defined-f6a18fde.js.map} +1 -1
  50. package/lib/index.js +1 -1
  51. package/lib/{lit-element-8f368fa0.js → lit-element-99571067.js} +3 -3
  52. package/lib/lit-element-99571067.js.map +1 -0
  53. package/lib/month-view.js +1 -1
  54. package/lib/{number-c84289ac.js → number-ca13a56f.js} +3 -3
  55. package/lib/{number-c84289ac.js.map → number-ca13a56f.js.map} +1 -1
  56. package/lib/ref-3b5a3bd2.js +12 -0
  57. package/lib/{ref-1cd4fff3.js.map → ref-3b5a3bd2.js.map} +1 -1
  58. package/lib/src/common/controllers/SwipeController.d.ts +0 -1
  59. package/lib/src/header/Header.d.ts +22 -0
  60. package/lib/src/header/Header.test.d.ts +2 -0
  61. package/lib/src/index.d.ts +1 -0
  62. package/lib/src/tooltip/Tooltip.d.ts +2 -2
  63. package/lib/tinykeys.module-84e6cc41.js +2 -0
  64. package/lib/tinykeys.module-84e6cc41.js.map +1 -0
  65. package/lib/{unsafe-html-5ab9167e.js → unsafe-html-7493c929.js} +2 -2
  66. package/lib/{unsafe-html-5ab9167e.js.map → unsafe-html-7493c929.js.map} +1 -1
  67. package/package.json +22 -20
  68. package/lib/Calendar-346fe5bf.js +0 -13
  69. package/lib/Calendar-346fe5bf.js.map +0 -1
  70. package/lib/FormField-43d04caa.js.map +0 -1
  71. package/lib/TextField-8f1a0294.js.map +0 -1
  72. package/lib/lit-element-8f368fa0.js.map +0 -1
  73. package/lib/ref-1cd4fff3.js +0 -12
  74. package/lib/tinykeys.module-26a9f7a7.js +0 -2
  75. package/lib/tinykeys.module-26a9f7a7.js.map +0 -1
@@ -158,6 +158,14 @@
158
158
  "name": "default",
159
159
  "module": "\"./radio/Radio.js\""
160
160
  }
161
+ },
162
+ {
163
+ "kind": "js",
164
+ "name": "Header",
165
+ "declaration": {
166
+ "name": "default",
167
+ "module": "\"./header/Header.js\""
168
+ }
161
169
  }
162
170
  ]
163
171
  },
@@ -739,6 +747,7 @@
739
747
  "type": {
740
748
  "text": "DateDisabledPredicate"
741
749
  },
750
+ "default": "isDateDisabled",
742
751
  "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
743
752
  },
744
753
  {
@@ -1100,6 +1109,113 @@
1100
1109
  }
1101
1110
  ]
1102
1111
  },
1112
+ {
1113
+ "kind": "javascript-module",
1114
+ "path": "src/card/Card.ts",
1115
+ "declarations": [
1116
+ {
1117
+ "kind": "class",
1118
+ "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
1119
+ "name": "Card",
1120
+ "slots": [
1121
+ {
1122
+ "description": "The card content.",
1123
+ "name": ""
1124
+ },
1125
+ {
1126
+ "description": "Optional slot that holds a header for the card.",
1127
+ "name": "header"
1128
+ },
1129
+ {
1130
+ "description": "Optional slot that holds footer content for the card.",
1131
+ "name": "footer"
1132
+ }
1133
+ ],
1134
+ "members": [
1135
+ {
1136
+ "kind": "field",
1137
+ "name": "headerSlot",
1138
+ "privacy": "private",
1139
+ "default": "new SlotController(this, \"header\")"
1140
+ },
1141
+ {
1142
+ "kind": "field",
1143
+ "name": "footerSlot",
1144
+ "privacy": "private",
1145
+ "default": "new SlotController(this, \"footer\")"
1146
+ },
1147
+ {
1148
+ "kind": "field",
1149
+ "name": "padding",
1150
+ "type": {
1151
+ "text": "\"m\" | \"l\" | \"none\""
1152
+ },
1153
+ "default": "\"m\"",
1154
+ "description": "Control the padding of the card component.\nWhen set to \"none\", the header and footer slots will still have padding.",
1155
+ "attribute": "padding",
1156
+ "reflects": true
1157
+ },
1158
+ {
1159
+ "kind": "field",
1160
+ "name": "_warningLogged",
1161
+ "type": {
1162
+ "text": "boolean"
1163
+ },
1164
+ "privacy": "private",
1165
+ "static": true,
1166
+ "default": "false",
1167
+ "inheritedFrom": {
1168
+ "name": "DraftComponentMixin",
1169
+ "module": "src/common/mixins/DraftComponentMixin.ts"
1170
+ }
1171
+ }
1172
+ ],
1173
+ "attributes": [
1174
+ {
1175
+ "name": "padding",
1176
+ "type": {
1177
+ "text": "\"m\" | \"l\" | \"none\""
1178
+ },
1179
+ "default": "\"m\"",
1180
+ "description": "Control the padding of the card component.\nWhen set to \"none\", the header and footer slots will still have padding.",
1181
+ "fieldName": "padding"
1182
+ }
1183
+ ],
1184
+ "mixins": [
1185
+ {
1186
+ "name": "DraftComponentMixin",
1187
+ "module": "/src/common/mixins/DraftComponentMixin.js"
1188
+ }
1189
+ ],
1190
+ "superclass": {
1191
+ "name": "LitElement",
1192
+ "package": "lit"
1193
+ },
1194
+ "status": "draft",
1195
+ "category": "structure",
1196
+ "tagName": "nord-card",
1197
+ "customElement": true
1198
+ }
1199
+ ],
1200
+ "exports": [
1201
+ {
1202
+ "kind": "js",
1203
+ "name": "default",
1204
+ "declaration": {
1205
+ "name": "Card",
1206
+ "module": "src/card/Card.ts"
1207
+ }
1208
+ },
1209
+ {
1210
+ "kind": "custom-element-definition",
1211
+ "name": "nord-card",
1212
+ "declaration": {
1213
+ "name": "Card",
1214
+ "module": "src/card/Card.ts"
1215
+ }
1216
+ }
1217
+ ]
1218
+ },
1103
1219
  {
1104
1220
  "kind": "javascript-module",
1105
1221
  "path": "src/checkbox/Checkbox.ts",
@@ -1740,113 +1856,6 @@
1740
1856
  }
1741
1857
  ]
1742
1858
  },
1743
- {
1744
- "kind": "javascript-module",
1745
- "path": "src/card/Card.ts",
1746
- "declarations": [
1747
- {
1748
- "kind": "class",
1749
- "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
1750
- "name": "Card",
1751
- "slots": [
1752
- {
1753
- "description": "The card content.",
1754
- "name": ""
1755
- },
1756
- {
1757
- "description": "Optional slot that holds a header for the card.",
1758
- "name": "header"
1759
- },
1760
- {
1761
- "description": "Optional slot that holds footer content for the card.",
1762
- "name": "footer"
1763
- }
1764
- ],
1765
- "members": [
1766
- {
1767
- "kind": "field",
1768
- "name": "headerSlot",
1769
- "privacy": "private",
1770
- "default": "new SlotController(this, \"header\")"
1771
- },
1772
- {
1773
- "kind": "field",
1774
- "name": "footerSlot",
1775
- "privacy": "private",
1776
- "default": "new SlotController(this, \"footer\")"
1777
- },
1778
- {
1779
- "kind": "field",
1780
- "name": "padding",
1781
- "type": {
1782
- "text": "\"m\" | \"l\" | \"none\""
1783
- },
1784
- "default": "\"m\"",
1785
- "description": "Control the padding of the card component.\nWhen set to \"none\", the header and footer slots will still have padding.",
1786
- "attribute": "padding",
1787
- "reflects": true
1788
- },
1789
- {
1790
- "kind": "field",
1791
- "name": "_warningLogged",
1792
- "type": {
1793
- "text": "boolean"
1794
- },
1795
- "privacy": "private",
1796
- "static": true,
1797
- "default": "false",
1798
- "inheritedFrom": {
1799
- "name": "DraftComponentMixin",
1800
- "module": "src/common/mixins/DraftComponentMixin.ts"
1801
- }
1802
- }
1803
- ],
1804
- "attributes": [
1805
- {
1806
- "name": "padding",
1807
- "type": {
1808
- "text": "\"m\" | \"l\" | \"none\""
1809
- },
1810
- "default": "\"m\"",
1811
- "description": "Control the padding of the card component.\nWhen set to \"none\", the header and footer slots will still have padding.",
1812
- "fieldName": "padding"
1813
- }
1814
- ],
1815
- "mixins": [
1816
- {
1817
- "name": "DraftComponentMixin",
1818
- "module": "/src/common/mixins/DraftComponentMixin.js"
1819
- }
1820
- ],
1821
- "superclass": {
1822
- "name": "LitElement",
1823
- "package": "lit"
1824
- },
1825
- "status": "draft",
1826
- "category": "structure",
1827
- "tagName": "nord-card",
1828
- "customElement": true
1829
- }
1830
- ],
1831
- "exports": [
1832
- {
1833
- "kind": "js",
1834
- "name": "default",
1835
- "declaration": {
1836
- "name": "Card",
1837
- "module": "src/card/Card.ts"
1838
- }
1839
- },
1840
- {
1841
- "kind": "custom-element-definition",
1842
- "name": "nord-card",
1843
- "declaration": {
1844
- "name": "Card",
1845
- "module": "src/card/Card.ts"
1846
- }
1847
- }
1848
- ]
1849
- },
1850
1859
  {
1851
1860
  "kind": "javascript-module",
1852
1861
  "path": "src/command-menu/CommandMenu.ts",
@@ -3426,6 +3435,7 @@
3426
3435
  "type": {
3427
3436
  "text": "DateDisabledPredicate"
3428
3437
  },
3438
+ "default": "isDateDisabled",
3429
3439
  "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
3430
3440
  },
3431
3441
  {
@@ -4329,36 +4339,112 @@
4329
4339
  },
4330
4340
  {
4331
4341
  "kind": "javascript-module",
4332
- "path": "src/icon/Icon.ts",
4342
+ "path": "src/header/Header.ts",
4333
4343
  "declarations": [
4334
4344
  {
4335
4345
  "kind": "class",
4336
- "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
4337
- "name": "Icon",
4346
+ "description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
4347
+ "name": "Header",
4348
+ "slots": [
4349
+ {
4350
+ "description": "The header content.",
4351
+ "name": ""
4352
+ },
4353
+ {
4354
+ "description": "Optional slot for buttons, toggles, etc.",
4355
+ "name": "action"
4356
+ }
4357
+ ],
4338
4358
  "members": [
4339
4359
  {
4340
4360
  "kind": "field",
4341
- "name": "resolver",
4342
- "type": {
4343
- "text": "IconResolver"
4344
- },
4361
+ "name": "actionSlot",
4345
4362
  "privacy": "private",
4346
- "static": true
4363
+ "default": "new SlotController(this, \"action\")"
4347
4364
  },
4348
4365
  {
4349
4366
  "kind": "field",
4350
- "name": "registeredIcons",
4367
+ "name": "_warningLogged",
4368
+ "type": {
4369
+ "text": "boolean"
4370
+ },
4351
4371
  "privacy": "private",
4352
4372
  "static": true,
4353
- "default": "new Map<string, string>()"
4354
- },
4373
+ "default": "false",
4374
+ "inheritedFrom": {
4375
+ "name": "DraftComponentMixin",
4376
+ "module": "src/common/mixins/DraftComponentMixin.ts"
4377
+ }
4378
+ }
4379
+ ],
4380
+ "mixins": [
4355
4381
  {
4356
- "kind": "method",
4357
- "name": "registerResolver",
4358
- "static": true,
4359
- "parameters": [
4360
- {
4361
- "name": "resolver",
4382
+ "name": "DraftComponentMixin",
4383
+ "module": "/src/common/mixins/DraftComponentMixin.js"
4384
+ }
4385
+ ],
4386
+ "superclass": {
4387
+ "name": "LitElement",
4388
+ "package": "lit"
4389
+ },
4390
+ "status": "draft",
4391
+ "category": "structure",
4392
+ "tagName": "nord-header",
4393
+ "customElement": true
4394
+ }
4395
+ ],
4396
+ "exports": [
4397
+ {
4398
+ "kind": "js",
4399
+ "name": "default",
4400
+ "declaration": {
4401
+ "name": "Header",
4402
+ "module": "src/header/Header.ts"
4403
+ }
4404
+ },
4405
+ {
4406
+ "kind": "custom-element-definition",
4407
+ "name": "nord-header",
4408
+ "declaration": {
4409
+ "name": "Header",
4410
+ "module": "src/header/Header.ts"
4411
+ }
4412
+ }
4413
+ ],
4414
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
4415
+ },
4416
+ {
4417
+ "kind": "javascript-module",
4418
+ "path": "src/icon/Icon.ts",
4419
+ "declarations": [
4420
+ {
4421
+ "kind": "class",
4422
+ "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
4423
+ "name": "Icon",
4424
+ "members": [
4425
+ {
4426
+ "kind": "field",
4427
+ "name": "resolver",
4428
+ "type": {
4429
+ "text": "IconResolver"
4430
+ },
4431
+ "privacy": "private",
4432
+ "static": true
4433
+ },
4434
+ {
4435
+ "kind": "field",
4436
+ "name": "registeredIcons",
4437
+ "privacy": "private",
4438
+ "static": true,
4439
+ "default": "new Map<string, string>()"
4440
+ },
4441
+ {
4442
+ "kind": "method",
4443
+ "name": "registerResolver",
4444
+ "static": true,
4445
+ "parameters": [
4446
+ {
4447
+ "name": "resolver",
4362
4448
  "type": {
4363
4449
  "text": "IconResolver"
4364
4450
  },
@@ -5233,19 +5319,23 @@
5233
5319
  },
5234
5320
  {
5235
5321
  "kind": "javascript-module",
5236
- "path": "src/radio/Radio.ts",
5322
+ "path": "src/select/Select.ts",
5237
5323
  "declarations": [
5238
5324
  {
5239
5325
  "kind": "class",
5240
- "description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
5241
- "name": "Radio",
5326
+ "description": "Select lets users choose one option from an options menu.\nConsider using select when you have 5 or more options to choose from.",
5327
+ "name": "Select",
5242
5328
  "slots": [
5329
+ {
5330
+ "description": "Default slot for holding <option> elements.",
5331
+ "name": ""
5332
+ },
5243
5333
  {
5244
5334
  "description": "Use when a label requires more than plain text.",
5245
5335
  "name": "label"
5246
5336
  },
5247
5337
  {
5248
- "description": "Optional slot that holds hint text for the input.",
5338
+ "description": "Use when a hint requires more than plain text.",
5249
5339
  "name": "hint"
5250
5340
  },
5251
5341
  {
@@ -5256,12 +5346,8 @@
5256
5346
  "members": [
5257
5347
  {
5258
5348
  "kind": "field",
5259
- "name": "inputId",
5260
- "type": {
5261
- "text": "string"
5262
- },
5349
+ "name": "formValue",
5263
5350
  "privacy": "protected",
5264
- "default": "\"input\"",
5265
5351
  "inheritedFrom": {
5266
5352
  "name": "FormAssociatedMixin",
5267
5353
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5269,25 +5355,18 @@
5269
5355
  },
5270
5356
  {
5271
5357
  "kind": "field",
5272
- "name": "hintId",
5273
- "type": {
5274
- "text": "string"
5275
- },
5276
- "privacy": "protected",
5277
- "default": "\"hint\"",
5278
- "inheritedFrom": {
5279
- "name": "FormAssociatedMixin",
5280
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5281
- }
5358
+ "name": "defaultSlot",
5359
+ "privacy": "private",
5360
+ "default": "new SlotController(this)"
5282
5361
  },
5283
5362
  {
5284
5363
  "kind": "field",
5285
- "name": "errorId",
5364
+ "name": "inputId",
5286
5365
  "type": {
5287
5366
  "text": "string"
5288
5367
  },
5289
5368
  "privacy": "protected",
5290
- "default": "\"error\"",
5369
+ "default": "\"select\"",
5291
5370
  "inheritedFrom": {
5292
5371
  "name": "FormAssociatedMixin",
5293
5372
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5295,20 +5374,45 @@
5295
5374
  },
5296
5375
  {
5297
5376
  "kind": "field",
5298
- "name": "hintSlot",
5299
- "privacy": "protected",
5300
- "default": "new LightSlotController(this, {\n slotName: \"hint\",\n render: () => (this.hint ? html`<div slot=\"hint-internal\" id=${this.hintId}>${this.hint}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
5301
- "description": "For accessibility reasons, we render some parts of the component to the light DOM.",
5302
- "inheritedFrom": {
5303
- "name": "FormAssociatedMixin",
5304
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5305
- }
5377
+ "name": "options",
5378
+ "privacy": "private"
5379
+ },
5380
+ {
5381
+ "kind": "method",
5382
+ "name": "getButtonText",
5383
+ "privacy": "private",
5384
+ "return": {
5385
+ "type": {
5386
+ "text": "string"
5387
+ }
5388
+ },
5389
+ "parameters": [
5390
+ {
5391
+ "name": "options",
5392
+ "type": {
5393
+ "text": "HTMLOptionElement[]"
5394
+ }
5395
+ }
5396
+ ]
5397
+ },
5398
+ {
5399
+ "kind": "method",
5400
+ "name": "renderOption",
5401
+ "privacy": "private",
5402
+ "parameters": [
5403
+ {
5404
+ "name": "option",
5405
+ "type": {
5406
+ "text": "HTMLOptionElement"
5407
+ }
5408
+ }
5409
+ ]
5306
5410
  },
5307
5411
  {
5308
5412
  "kind": "field",
5309
5413
  "name": "labelSlot",
5310
5414
  "privacy": "protected",
5311
- "default": "new LightSlotController(this, {\n slotName: \"label\",\n render: () => (this.label ? html`<label slot=\"label-internal\" for=${this.inputId}>${this.label}</label>` : nothing),\n syncLightDom: element => {\n if (!isLabel(element)) {\n // eslint-disable-next-line no-console\n console.warn(`NORD: Only <label> elements should be placed in radio's \"label\" slot`)\n } else {\n element.htmlFor = this.inputId\n }\n },\n })",
5415
+ "default": "new SlotController(this, \"label\")",
5312
5416
  "inheritedFrom": {
5313
5417
  "name": "FormAssociatedMixin",
5314
5418
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5318,7 +5422,7 @@
5318
5422
  "kind": "field",
5319
5423
  "name": "errorSlot",
5320
5424
  "privacy": "protected",
5321
- "default": "new LightSlotController(this, {\n slotName: \"error\",\n render: () => (this.error ? html`<div slot=\"error-internal\" id=${this.errorId}>${this.error}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
5425
+ "default": "new SlotController(this, \"error\")",
5322
5426
  "inheritedFrom": {
5323
5427
  "name": "FormAssociatedMixin",
5324
5428
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5326,14 +5430,19 @@
5326
5430
  },
5327
5431
  {
5328
5432
  "kind": "field",
5329
- "name": "inputSlot",
5433
+ "name": "hintSlot",
5330
5434
  "privacy": "protected",
5331
- "default": "new LightDomController(this, {\n render: () =>\n html`\n <input\n slot=\"input\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n ${ref(this.focusableRef)}\n class=\"n-input\"\n id=${this.inputId}\n type=\"radio\"\n name=${ifDefined(this.name)}\n .value=${this.value}\n .checked=${this.checked}\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-describedby=${ifDefined(this.getDescribedBy())}\n aria-invalid=${ifDefined(this.getInvalid())}\n />\n `,\n })"
5435
+ "default": "new SlotController(this, \"hint\")",
5436
+ "inheritedFrom": {
5437
+ "name": "FormAssociatedMixin",
5438
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5439
+ }
5332
5440
  },
5333
5441
  {
5334
5442
  "kind": "field",
5335
- "name": "formValue",
5443
+ "name": "formData",
5336
5444
  "privacy": "protected",
5445
+ "default": "new FormDataController(this, { value: () => this.formValue })",
5337
5446
  "inheritedFrom": {
5338
5447
  "name": "FormAssociatedMixin",
5339
5448
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5341,37 +5450,12 @@
5341
5450
  },
5342
5451
  {
5343
5452
  "kind": "field",
5344
- "name": "checked",
5453
+ "name": "errorId",
5345
5454
  "type": {
5346
- "text": "boolean"
5455
+ "text": "string"
5347
5456
  },
5348
- "default": "false",
5349
- "description": "Controls whether the checkbox is checked or not.",
5350
- "attribute": "checked",
5351
- "reflects": true
5352
- },
5353
- {
5354
- "kind": "method",
5355
- "name": "uncheckSiblings",
5356
- "privacy": "private"
5357
- },
5358
- {
5359
- "kind": "method",
5360
- "name": "handleChange",
5361
5457
  "privacy": "protected",
5362
- "return": {
5363
- "type": {
5364
- "text": "void"
5365
- }
5366
- },
5367
- "parameters": [
5368
- {
5369
- "name": "e",
5370
- "type": {
5371
- "text": "Event"
5372
- }
5373
- }
5374
- ],
5458
+ "default": "\"error\"",
5375
5459
  "inheritedFrom": {
5376
5460
  "name": "FormAssociatedMixin",
5377
5461
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5379,19 +5463,12 @@
5379
5463
  },
5380
5464
  {
5381
5465
  "kind": "field",
5382
- "name": "handleBlur",
5383
- "privacy": "private"
5384
- },
5385
- {
5386
- "kind": "field",
5387
- "name": "handleFocus",
5388
- "privacy": "private"
5389
- },
5390
- {
5391
- "kind": "field",
5392
- "name": "formData",
5466
+ "name": "hintId",
5467
+ "type": {
5468
+ "text": "string"
5469
+ },
5393
5470
  "privacy": "protected",
5394
- "default": "new FormDataController(this, { value: () => this.formValue })",
5471
+ "default": "\"hint\"",
5395
5472
  "inheritedFrom": {
5396
5473
  "name": "FormAssociatedMixin",
5397
5474
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5510,6 +5587,15 @@
5510
5587
  "module": "src/common/mixins/FormAssociatedMixin.ts"
5511
5588
  }
5512
5589
  },
5590
+ {
5591
+ "kind": "method",
5592
+ "name": "handleChange",
5593
+ "privacy": "protected",
5594
+ "inheritedFrom": {
5595
+ "name": "FormAssociatedMixin",
5596
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5597
+ }
5598
+ },
5513
5599
  {
5514
5600
  "kind": "method",
5515
5601
  "name": "renderLabel",
@@ -5686,16 +5772,33 @@
5686
5772
  }
5687
5773
  }
5688
5774
  ],
5689
- "attributes": [
5775
+ "mixins": [
5690
5776
  {
5691
- "name": "checked",
5692
- "type": {
5693
- "text": "boolean"
5694
- },
5695
- "default": "false",
5696
- "description": "Controls whether the checkbox is checked or not.",
5697
- "fieldName": "checked"
5777
+ "name": "FormAssociatedMixin",
5778
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
5698
5779
  },
5780
+ {
5781
+ "name": "InputMixin",
5782
+ "module": "/src/common/mixins/InputMixin.js"
5783
+ },
5784
+ {
5785
+ "name": "FocusableMixin",
5786
+ "module": "/src/common/mixins/FocusableMixin.js"
5787
+ },
5788
+ {
5789
+ "name": "DraftComponentMixin",
5790
+ "module": "/src/common/mixins/DraftComponentMixin.js"
5791
+ }
5792
+ ],
5793
+ "superclass": {
5794
+ "name": "LitElement",
5795
+ "package": "lit"
5796
+ },
5797
+ "status": "draft",
5798
+ "category": "form",
5799
+ "tagName": "nord-select",
5800
+ "customElement": true,
5801
+ "attributes": [
5699
5802
  {
5700
5803
  "name": "label",
5701
5804
  "type": {
@@ -5823,32 +5926,6 @@
5823
5926
  }
5824
5927
  }
5825
5928
  ],
5826
- "mixins": [
5827
- {
5828
- "name": "FormAssociatedMixin",
5829
- "module": "/src/common/mixins/FormAssociatedMixin.js"
5830
- },
5831
- {
5832
- "name": "InputMixin",
5833
- "module": "/src/common/mixins/InputMixin.js"
5834
- },
5835
- {
5836
- "name": "FocusableMixin",
5837
- "module": "/src/common/mixins/FocusableMixin.js"
5838
- },
5839
- {
5840
- "name": "DraftComponentMixin",
5841
- "module": "/src/common/mixins/DraftComponentMixin.js"
5842
- }
5843
- ],
5844
- "superclass": {
5845
- "name": "LitElement",
5846
- "package": "lit"
5847
- },
5848
- "status": "draft",
5849
- "category": "form",
5850
- "tagName": "nord-radio",
5851
- "customElement": true,
5852
5929
  "events": [
5853
5930
  {
5854
5931
  "name": "input",
@@ -5880,40 +5957,152 @@
5880
5957
  "kind": "js",
5881
5958
  "name": "default",
5882
5959
  "declaration": {
5883
- "name": "Radio",
5884
- "module": "src/radio/Radio.ts"
5960
+ "name": "Select",
5961
+ "module": "src/select/Select.ts"
5885
5962
  }
5886
5963
  },
5887
5964
  {
5888
5965
  "kind": "custom-element-definition",
5889
- "name": "nord-radio",
5966
+ "name": "nord-select",
5890
5967
  "declaration": {
5891
- "name": "Radio",
5892
- "module": "src/radio/Radio.ts"
5968
+ "name": "Select",
5969
+ "module": "src/select/Select.ts"
5893
5970
  }
5894
5971
  }
5895
- ],
5896
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n-------\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing radio button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\n-------\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question."
5972
+ ]
5897
5973
  },
5898
5974
  {
5899
5975
  "kind": "javascript-module",
5900
- "path": "src/select/Select.ts",
5976
+ "path": "src/spinner/Spinner.ts",
5901
5977
  "declarations": [
5902
5978
  {
5903
5979
  "kind": "class",
5904
- "description": "Select lets users choose one option from an options menu.\nConsider using select when you have 5 or more options to choose from.",
5905
- "name": "Select",
5906
- "slots": [
5980
+ "description": "Spinner component is used to indicate users that their action is being\nprocessed. You can customize the size and color of the spinner with the\nprovided properties.",
5981
+ "name": "Spinner",
5982
+ "members": [
5907
5983
  {
5908
- "description": "Default slot for holding <option> elements.",
5909
- "name": ""
5984
+ "kind": "field",
5985
+ "name": "size",
5986
+ "type": {
5987
+ "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
5988
+ },
5989
+ "default": "\"m\"",
5990
+ "description": "The size of the spinner.",
5991
+ "attribute": "size",
5992
+ "reflects": true
5993
+ },
5994
+ {
5995
+ "kind": "field",
5996
+ "name": "color",
5997
+ "type": {
5998
+ "text": "string | undefined"
5999
+ },
6000
+ "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
6001
+ "attribute": "color",
6002
+ "reflects": true
6003
+ },
6004
+ {
6005
+ "kind": "field",
6006
+ "name": "label",
6007
+ "type": {
6008
+ "text": "string | undefined"
6009
+ },
6010
+ "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
6011
+ "attribute": "label",
6012
+ "reflects": true
6013
+ },
6014
+ {
6015
+ "kind": "field",
6016
+ "name": "_warningLogged",
6017
+ "type": {
6018
+ "text": "boolean"
6019
+ },
6020
+ "privacy": "private",
6021
+ "static": true,
6022
+ "default": "false",
6023
+ "inheritedFrom": {
6024
+ "name": "DraftComponentMixin",
6025
+ "module": "src/common/mixins/DraftComponentMixin.ts"
6026
+ }
6027
+ }
6028
+ ],
6029
+ "attributes": [
6030
+ {
6031
+ "name": "size",
6032
+ "type": {
6033
+ "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6034
+ },
6035
+ "default": "\"m\"",
6036
+ "description": "The size of the spinner.",
6037
+ "fieldName": "size"
6038
+ },
6039
+ {
6040
+ "name": "color",
6041
+ "type": {
6042
+ "text": "string | undefined"
6043
+ },
6044
+ "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
6045
+ "fieldName": "color"
5910
6046
  },
6047
+ {
6048
+ "name": "label",
6049
+ "type": {
6050
+ "text": "string | undefined"
6051
+ },
6052
+ "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
6053
+ "fieldName": "label"
6054
+ }
6055
+ ],
6056
+ "mixins": [
6057
+ {
6058
+ "name": "DraftComponentMixin",
6059
+ "module": "/src/common/mixins/DraftComponentMixin.js"
6060
+ }
6061
+ ],
6062
+ "superclass": {
6063
+ "name": "LitElement",
6064
+ "package": "lit"
6065
+ },
6066
+ "status": "draft",
6067
+ "category": "feedback",
6068
+ "tagName": "nord-spinner",
6069
+ "customElement": true
6070
+ }
6071
+ ],
6072
+ "exports": [
6073
+ {
6074
+ "kind": "js",
6075
+ "name": "default",
6076
+ "declaration": {
6077
+ "name": "Spinner",
6078
+ "module": "src/spinner/Spinner.ts"
6079
+ }
6080
+ },
6081
+ {
6082
+ "kind": "custom-element-definition",
6083
+ "name": "nord-spinner",
6084
+ "declaration": {
6085
+ "name": "Spinner",
6086
+ "module": "src/spinner/Spinner.ts"
6087
+ }
6088
+ }
6089
+ ]
6090
+ },
6091
+ {
6092
+ "kind": "javascript-module",
6093
+ "path": "src/radio/Radio.ts",
6094
+ "declarations": [
6095
+ {
6096
+ "kind": "class",
6097
+ "description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
6098
+ "name": "Radio",
6099
+ "slots": [
5911
6100
  {
5912
6101
  "description": "Use when a label requires more than plain text.",
5913
6102
  "name": "label"
5914
6103
  },
5915
6104
  {
5916
- "description": "Use when a hint requires more than plain text.",
6105
+ "description": "Optional slot that holds hint text for the input.",
5917
6106
  "name": "hint"
5918
6107
  },
5919
6108
  {
@@ -5924,8 +6113,12 @@
5924
6113
  "members": [
5925
6114
  {
5926
6115
  "kind": "field",
5927
- "name": "formValue",
6116
+ "name": "inputId",
6117
+ "type": {
6118
+ "text": "string"
6119
+ },
5928
6120
  "privacy": "protected",
6121
+ "default": "\"input\"",
5929
6122
  "inheritedFrom": {
5930
6123
  "name": "FormAssociatedMixin",
5931
6124
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5933,18 +6126,12 @@
5933
6126
  },
5934
6127
  {
5935
6128
  "kind": "field",
5936
- "name": "defaultSlot",
5937
- "privacy": "private",
5938
- "default": "new SlotController(this)"
5939
- },
5940
- {
5941
- "kind": "field",
5942
- "name": "inputId",
6129
+ "name": "hintId",
5943
6130
  "type": {
5944
6131
  "text": "string"
5945
6132
  },
5946
6133
  "privacy": "protected",
5947
- "default": "\"select\"",
6134
+ "default": "\"hint\"",
5948
6135
  "inheritedFrom": {
5949
6136
  "name": "FormAssociatedMixin",
5950
6137
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5952,45 +6139,23 @@
5952
6139
  },
5953
6140
  {
5954
6141
  "kind": "field",
5955
- "name": "options",
5956
- "privacy": "private"
5957
- },
5958
- {
5959
- "kind": "method",
5960
- "name": "getButtonText",
5961
- "privacy": "private",
5962
- "return": {
5963
- "type": {
5964
- "text": "string"
5965
- }
6142
+ "name": "errorId",
6143
+ "type": {
6144
+ "text": "string"
5966
6145
  },
5967
- "parameters": [
5968
- {
5969
- "name": "options",
5970
- "type": {
5971
- "text": "HTMLOptionElement[]"
5972
- }
5973
- }
5974
- ]
5975
- },
5976
- {
5977
- "kind": "method",
5978
- "name": "renderOption",
5979
- "privacy": "private",
5980
- "parameters": [
5981
- {
5982
- "name": "option",
5983
- "type": {
5984
- "text": "HTMLOptionElement"
5985
- }
5986
- }
5987
- ]
6146
+ "privacy": "protected",
6147
+ "default": "\"error\"",
6148
+ "inheritedFrom": {
6149
+ "name": "FormAssociatedMixin",
6150
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
6151
+ }
5988
6152
  },
5989
6153
  {
5990
6154
  "kind": "field",
5991
- "name": "labelSlot",
6155
+ "name": "hintSlot",
5992
6156
  "privacy": "protected",
5993
- "default": "new SlotController(this, \"label\")",
6157
+ "default": "new LightSlotController(this, {\n slotName: \"hint\",\n render: () => (this.hint ? html`<div slot=\"hint-internal\" id=${this.hintId}>${this.hint}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
6158
+ "description": "For accessibility reasons, we render some parts of the component to the light DOM.",
5994
6159
  "inheritedFrom": {
5995
6160
  "name": "FormAssociatedMixin",
5996
6161
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5998,9 +6163,9 @@
5998
6163
  },
5999
6164
  {
6000
6165
  "kind": "field",
6001
- "name": "errorSlot",
6166
+ "name": "labelSlot",
6002
6167
  "privacy": "protected",
6003
- "default": "new SlotController(this, \"error\")",
6168
+ "default": "new LightSlotController(this, {\n slotName: \"label\",\n render: () => (this.label ? html`<label slot=\"label-internal\" for=${this.inputId}>${this.label}</label>` : nothing),\n syncLightDom: element => {\n if (!isLabel(element)) {\n // eslint-disable-next-line no-console\n console.warn(`NORD: Only <label> elements should be placed in radio's \"label\" slot`)\n } else {\n element.htmlFor = this.inputId\n }\n },\n })",
6004
6169
  "inheritedFrom": {
6005
6170
  "name": "FormAssociatedMixin",
6006
6171
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -6008,9 +6173,9 @@
6008
6173
  },
6009
6174
  {
6010
6175
  "kind": "field",
6011
- "name": "hintSlot",
6176
+ "name": "errorSlot",
6012
6177
  "privacy": "protected",
6013
- "default": "new SlotController(this, \"hint\")",
6178
+ "default": "new LightSlotController(this, {\n slotName: \"error\",\n render: () => (this.error ? html`<div slot=\"error-internal\" id=${this.errorId}>${this.error}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
6014
6179
  "inheritedFrom": {
6015
6180
  "name": "FormAssociatedMixin",
6016
6181
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -6018,9 +6183,14 @@
6018
6183
  },
6019
6184
  {
6020
6185
  "kind": "field",
6021
- "name": "formData",
6186
+ "name": "inputSlot",
6187
+ "privacy": "protected",
6188
+ "default": "new LightDomController(this, {\n render: () =>\n html`\n <input\n slot=\"input\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n ${ref(this.focusableRef)}\n class=\"n-input\"\n id=${this.inputId}\n type=\"radio\"\n name=${ifDefined(this.name)}\n .value=${this.value}\n .checked=${this.checked}\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-describedby=${ifDefined(this.getDescribedBy())}\n aria-invalid=${ifDefined(this.getInvalid())}\n />\n `,\n })"
6189
+ },
6190
+ {
6191
+ "kind": "field",
6192
+ "name": "formValue",
6022
6193
  "privacy": "protected",
6023
- "default": "new FormDataController(this, { value: () => this.formValue })",
6024
6194
  "inheritedFrom": {
6025
6195
  "name": "FormAssociatedMixin",
6026
6196
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -6028,12 +6198,37 @@
6028
6198
  },
6029
6199
  {
6030
6200
  "kind": "field",
6031
- "name": "errorId",
6201
+ "name": "checked",
6032
6202
  "type": {
6033
- "text": "string"
6203
+ "text": "boolean"
6034
6204
  },
6205
+ "default": "false",
6206
+ "description": "Controls whether the checkbox is checked or not.",
6207
+ "attribute": "checked",
6208
+ "reflects": true
6209
+ },
6210
+ {
6211
+ "kind": "method",
6212
+ "name": "uncheckSiblings",
6213
+ "privacy": "private"
6214
+ },
6215
+ {
6216
+ "kind": "method",
6217
+ "name": "handleChange",
6035
6218
  "privacy": "protected",
6036
- "default": "\"error\"",
6219
+ "return": {
6220
+ "type": {
6221
+ "text": "void"
6222
+ }
6223
+ },
6224
+ "parameters": [
6225
+ {
6226
+ "name": "e",
6227
+ "type": {
6228
+ "text": "Event"
6229
+ }
6230
+ }
6231
+ ],
6037
6232
  "inheritedFrom": {
6038
6233
  "name": "FormAssociatedMixin",
6039
6234
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -6041,12 +6236,19 @@
6041
6236
  },
6042
6237
  {
6043
6238
  "kind": "field",
6044
- "name": "hintId",
6045
- "type": {
6046
- "text": "string"
6047
- },
6239
+ "name": "handleBlur",
6240
+ "privacy": "private"
6241
+ },
6242
+ {
6243
+ "kind": "field",
6244
+ "name": "handleFocus",
6245
+ "privacy": "private"
6246
+ },
6247
+ {
6248
+ "kind": "field",
6249
+ "name": "formData",
6048
6250
  "privacy": "protected",
6049
- "default": "\"hint\"",
6251
+ "default": "new FormDataController(this, { value: () => this.formValue })",
6050
6252
  "inheritedFrom": {
6051
6253
  "name": "FormAssociatedMixin",
6052
6254
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -6165,15 +6367,6 @@
6165
6367
  "module": "src/common/mixins/FormAssociatedMixin.ts"
6166
6368
  }
6167
6369
  },
6168
- {
6169
- "kind": "method",
6170
- "name": "handleChange",
6171
- "privacy": "protected",
6172
- "inheritedFrom": {
6173
- "name": "FormAssociatedMixin",
6174
- "module": "src/common/mixins/FormAssociatedMixin.ts"
6175
- }
6176
- },
6177
6370
  {
6178
6371
  "kind": "method",
6179
6372
  "name": "renderLabel",
@@ -6350,33 +6543,16 @@
6350
6543
  }
6351
6544
  }
6352
6545
  ],
6353
- "mixins": [
6354
- {
6355
- "name": "FormAssociatedMixin",
6356
- "module": "/src/common/mixins/FormAssociatedMixin.js"
6357
- },
6358
- {
6359
- "name": "InputMixin",
6360
- "module": "/src/common/mixins/InputMixin.js"
6361
- },
6546
+ "attributes": [
6362
6547
  {
6363
- "name": "FocusableMixin",
6364
- "module": "/src/common/mixins/FocusableMixin.js"
6548
+ "name": "checked",
6549
+ "type": {
6550
+ "text": "boolean"
6551
+ },
6552
+ "default": "false",
6553
+ "description": "Controls whether the checkbox is checked or not.",
6554
+ "fieldName": "checked"
6365
6555
  },
6366
- {
6367
- "name": "DraftComponentMixin",
6368
- "module": "/src/common/mixins/DraftComponentMixin.js"
6369
- }
6370
- ],
6371
- "superclass": {
6372
- "name": "LitElement",
6373
- "package": "lit"
6374
- },
6375
- "status": "draft",
6376
- "category": "form",
6377
- "tagName": "nord-select",
6378
- "customElement": true,
6379
- "attributes": [
6380
6556
  {
6381
6557
  "name": "label",
6382
6558
  "type": {
@@ -6504,6 +6680,32 @@
6504
6680
  }
6505
6681
  }
6506
6682
  ],
6683
+ "mixins": [
6684
+ {
6685
+ "name": "FormAssociatedMixin",
6686
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
6687
+ },
6688
+ {
6689
+ "name": "InputMixin",
6690
+ "module": "/src/common/mixins/InputMixin.js"
6691
+ },
6692
+ {
6693
+ "name": "FocusableMixin",
6694
+ "module": "/src/common/mixins/FocusableMixin.js"
6695
+ },
6696
+ {
6697
+ "name": "DraftComponentMixin",
6698
+ "module": "/src/common/mixins/DraftComponentMixin.js"
6699
+ }
6700
+ ],
6701
+ "superclass": {
6702
+ "name": "LitElement",
6703
+ "package": "lit"
6704
+ },
6705
+ "status": "draft",
6706
+ "category": "form",
6707
+ "tagName": "nord-radio",
6708
+ "customElement": true,
6507
6709
  "events": [
6508
6710
  {
6509
6711
  "name": "input",
@@ -6535,136 +6737,20 @@
6535
6737
  "kind": "js",
6536
6738
  "name": "default",
6537
6739
  "declaration": {
6538
- "name": "Select",
6539
- "module": "src/select/Select.ts"
6740
+ "name": "Radio",
6741
+ "module": "src/radio/Radio.ts"
6540
6742
  }
6541
6743
  },
6542
6744
  {
6543
6745
  "kind": "custom-element-definition",
6544
- "name": "nord-select",
6746
+ "name": "nord-radio",
6545
6747
  "declaration": {
6546
- "name": "Select",
6547
- "module": "src/select/Select.ts"
6748
+ "name": "Radio",
6749
+ "module": "src/radio/Radio.ts"
6548
6750
  }
6549
6751
  }
6550
- ]
6551
- },
6552
- {
6553
- "kind": "javascript-module",
6554
- "path": "src/spinner/Spinner.ts",
6555
- "declarations": [
6556
- {
6557
- "kind": "class",
6558
- "description": "Spinner component is used to indicate users that their action is being\nprocessed. You can customize the size and color of the spinner with the\nprovided properties.",
6559
- "name": "Spinner",
6560
- "members": [
6561
- {
6562
- "kind": "field",
6563
- "name": "size",
6564
- "type": {
6565
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6566
- },
6567
- "default": "\"m\"",
6568
- "description": "The size of the spinner.",
6569
- "attribute": "size",
6570
- "reflects": true
6571
- },
6572
- {
6573
- "kind": "field",
6574
- "name": "color",
6575
- "type": {
6576
- "text": "string | undefined"
6577
- },
6578
- "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
6579
- "attribute": "color",
6580
- "reflects": true
6581
- },
6582
- {
6583
- "kind": "field",
6584
- "name": "label",
6585
- "type": {
6586
- "text": "string | undefined"
6587
- },
6588
- "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
6589
- "attribute": "label",
6590
- "reflects": true
6591
- },
6592
- {
6593
- "kind": "field",
6594
- "name": "_warningLogged",
6595
- "type": {
6596
- "text": "boolean"
6597
- },
6598
- "privacy": "private",
6599
- "static": true,
6600
- "default": "false",
6601
- "inheritedFrom": {
6602
- "name": "DraftComponentMixin",
6603
- "module": "src/common/mixins/DraftComponentMixin.ts"
6604
- }
6605
- }
6606
- ],
6607
- "attributes": [
6608
- {
6609
- "name": "size",
6610
- "type": {
6611
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6612
- },
6613
- "default": "\"m\"",
6614
- "description": "The size of the spinner.",
6615
- "fieldName": "size"
6616
- },
6617
- {
6618
- "name": "color",
6619
- "type": {
6620
- "text": "string | undefined"
6621
- },
6622
- "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
6623
- "fieldName": "color"
6624
- },
6625
- {
6626
- "name": "label",
6627
- "type": {
6628
- "text": "string | undefined"
6629
- },
6630
- "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
6631
- "fieldName": "label"
6632
- }
6633
- ],
6634
- "mixins": [
6635
- {
6636
- "name": "DraftComponentMixin",
6637
- "module": "/src/common/mixins/DraftComponentMixin.js"
6638
- }
6639
- ],
6640
- "superclass": {
6641
- "name": "LitElement",
6642
- "package": "lit"
6643
- },
6644
- "status": "draft",
6645
- "category": "feedback",
6646
- "tagName": "nord-spinner",
6647
- "customElement": true
6648
- }
6649
6752
  ],
6650
- "exports": [
6651
- {
6652
- "kind": "js",
6653
- "name": "default",
6654
- "declaration": {
6655
- "name": "Spinner",
6656
- "module": "src/spinner/Spinner.ts"
6657
- }
6658
- },
6659
- {
6660
- "kind": "custom-element-definition",
6661
- "name": "nord-spinner",
6662
- "declaration": {
6663
- "name": "Spinner",
6664
- "module": "src/spinner/Spinner.ts"
6665
- }
6666
- }
6667
- ]
6753
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n-------\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing radio button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\n-------\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question."
6668
6754
  },
6669
6755
  {
6670
6756
  "kind": "javascript-module",
@@ -7533,12 +7619,12 @@
7533
7619
  "name": "Tooltip",
7534
7620
  "slots": [
7535
7621
  {
7536
- "description": "The subject of the tooltip, the item the tooltip refers to.",
7622
+ "description": "The tooltip content",
7537
7623
  "name": ""
7538
7624
  },
7539
7625
  {
7540
- "description": "The content of the tooltip itself.",
7541
- "name": "content"
7626
+ "description": "Optional slot that holds shortcut keys to access the subject",
7627
+ "name": "shortcut"
7542
7628
  }
7543
7629
  ],
7544
7630
  "members": [
@@ -8358,11 +8444,6 @@
8358
8444
  "name": "handleTouchStart",
8359
8445
  "privacy": "private"
8360
8446
  },
8361
- {
8362
- "kind": "field",
8363
- "name": "handleTouchMove",
8364
- "privacy": "private"
8365
- },
8366
8447
  {
8367
8448
  "kind": "field",
8368
8449
  "name": "handleTouchEnd",