@nordhealth/components 3.22.0 → 4.0.0-alpha.1

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.
@@ -673,208 +673,6 @@
673
673
  }
674
674
  ]
675
675
  },
676
- {
677
- "kind": "javascript-module",
678
- "path": "src/badge/Badge.ts",
679
- "declarations": [
680
- {
681
- "kind": "class",
682
- "description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
683
- "name": "Badge",
684
- "slots": [
685
- {
686
- "description": "The badge content.",
687
- "name": ""
688
- },
689
- {
690
- "description": "Used to place an icon at the start of badge.",
691
- "name": "icon"
692
- }
693
- ],
694
- "members": [
695
- {
696
- "kind": "field",
697
- "name": "type",
698
- "type": {
699
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
700
- },
701
- "description": "The type of badge.\nDetermines the background color of the badge.",
702
- "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
703
- "default": "\"neutral\"",
704
- "attribute": "type",
705
- "reflects": true
706
- },
707
- {
708
- "kind": "field",
709
- "name": "variant",
710
- "type": {
711
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
712
- },
713
- "description": "The style variant of the badge.\nDetermines the background color of the badge.",
714
- "default": "\"neutral\"",
715
- "attribute": "variant",
716
- "reflects": true
717
- },
718
- {
719
- "kind": "field",
720
- "name": "strong",
721
- "type": {
722
- "text": "boolean"
723
- },
724
- "default": "false",
725
- "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
726
- "attribute": "strong",
727
- "reflects": true
728
- }
729
- ],
730
- "attributes": [
731
- {
732
- "name": "type",
733
- "type": {
734
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
735
- },
736
- "description": "The type of badge.\nDetermines the background color of the badge.",
737
- "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
738
- "default": "\"neutral\"",
739
- "fieldName": "type"
740
- },
741
- {
742
- "name": "variant",
743
- "type": {
744
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
745
- },
746
- "description": "The style variant of the badge.\nDetermines the background color of the badge.",
747
- "default": "\"neutral\"",
748
- "fieldName": "variant"
749
- },
750
- {
751
- "name": "strong",
752
- "type": {
753
- "text": "boolean"
754
- },
755
- "default": "false",
756
- "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
757
- "fieldName": "strong"
758
- }
759
- ],
760
- "superclass": {
761
- "name": "LitElement",
762
- "package": "lit"
763
- },
764
- "localization": [],
765
- "status": "ready",
766
- "category": "text",
767
- "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 established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s easy to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n- Don't use badges for labeling, categorizing, or organizing objects. Use the [tag component](/components/tag/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n",
768
- "examples": [],
769
- "dependencies": [],
770
- "tagName": "nord-badge",
771
- "customElement": true
772
- }
773
- ],
774
- "exports": [
775
- {
776
- "kind": "js",
777
- "name": "default",
778
- "declaration": {
779
- "name": "Badge",
780
- "module": "src/badge/Badge.ts"
781
- }
782
- },
783
- {
784
- "kind": "custom-element-definition",
785
- "name": "nord-badge",
786
- "declaration": {
787
- "name": "Badge",
788
- "module": "src/badge/Badge.ts"
789
- }
790
- }
791
- ]
792
- },
793
- {
794
- "kind": "javascript-module",
795
- "path": "src/banner/Banner.ts",
796
- "declarations": [
797
- {
798
- "kind": "class",
799
- "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
800
- "name": "Banner",
801
- "cssProperties": [
802
- {
803
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
804
- "name": "--n-banner-border-radius",
805
- "default": "var(--n-border-radius)"
806
- },
807
- {
808
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
809
- "name": "--n-banner-box-shadow",
810
- "default": "var(--n-box-shadow-card)"
811
- }
812
- ],
813
- "slots": [
814
- {
815
- "description": "default slot",
816
- "name": ""
817
- }
818
- ],
819
- "members": [
820
- {
821
- "kind": "field",
822
- "name": "variant",
823
- "type": {
824
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
825
- },
826
- "default": "\"info\"",
827
- "description": "The style variant of the banner.",
828
- "attribute": "variant",
829
- "reflects": true
830
- }
831
- ],
832
- "attributes": [
833
- {
834
- "name": "variant",
835
- "type": {
836
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
837
- },
838
- "default": "\"info\"",
839
- "description": "The style variant of the banner.",
840
- "fieldName": "variant"
841
- }
842
- ],
843
- "superclass": {
844
- "name": "LitElement",
845
- "package": "lit"
846
- },
847
- "localization": [],
848
- "status": "ready",
849
- "category": "feedback",
850
- "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 this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it 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\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n",
851
- "examples": [],
852
- "dependencies": [
853
- "icon"
854
- ],
855
- "tagName": "nord-banner",
856
- "customElement": true
857
- }
858
- ],
859
- "exports": [
860
- {
861
- "kind": "js",
862
- "name": "default",
863
- "declaration": {
864
- "name": "Banner",
865
- "module": "src/banner/Banner.ts"
866
- }
867
- },
868
- {
869
- "kind": "custom-element-definition",
870
- "name": "nord-banner",
871
- "declaration": {
872
- "name": "Banner",
873
- "module": "src/banner/Banner.ts"
874
- }
875
- }
876
- ]
877
- },
878
676
  {
879
677
  "kind": "javascript-module",
880
678
  "path": "src/button/Button.ts",
@@ -1488,124 +1286,169 @@
1488
1286
  },
1489
1287
  {
1490
1288
  "kind": "javascript-module",
1491
- "path": "src/button-group/ButtonGroup.ts",
1289
+ "path": "src/badge/Badge.ts",
1492
1290
  "declarations": [
1493
1291
  {
1494
1292
  "kind": "class",
1495
- "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
1496
- "name": "ButtonGroup",
1497
- "cssProperties": [
1498
- {
1499
- "description": "Controls the rounded corners of the button group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
1500
- "name": "--n-button-group-border-radius",
1501
- "default": "var(--n-border-radius-s)"
1502
- },
1503
- {
1504
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
1505
- "name": "--n-button-group-box-shadow",
1506
- "default": "var(--n-box-shadow)"
1507
- }
1508
- ],
1293
+ "description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
1294
+ "name": "Badge",
1509
1295
  "slots": [
1510
1296
  {
1511
- "description": "The button group content",
1297
+ "description": "The badge content.",
1512
1298
  "name": ""
1299
+ },
1300
+ {
1301
+ "description": "Used to place an icon at the start of badge.",
1302
+ "name": "icon"
1513
1303
  }
1514
1304
  ],
1515
1305
  "members": [
1516
1306
  {
1517
1307
  "kind": "field",
1518
- "name": "defaultSlot",
1519
- "privacy": "private",
1520
- "default": "new SlotController(this)"
1521
- },
1522
- {
1523
- "kind": "field",
1524
- "name": "dirController",
1525
- "privacy": "private",
1526
- "default": "new DirectionController(this)"
1308
+ "name": "type",
1309
+ "type": {
1310
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1311
+ },
1312
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1313
+ "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
1314
+ "default": "\"neutral\"",
1315
+ "attribute": "type",
1316
+ "reflects": true
1527
1317
  },
1528
1318
  {
1529
1319
  "kind": "field",
1530
1320
  "name": "variant",
1531
1321
  "type": {
1532
- "text": "\"default\" | \"spaced\""
1322
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
1533
1323
  },
1534
- "default": "\"default\"",
1535
- "description": "The style variant of the button group.",
1324
+ "description": "The style variant of the badge.\nDetermines the background color of the badge.",
1325
+ "default": "\"neutral\"",
1536
1326
  "attribute": "variant",
1537
1327
  "reflects": true
1538
1328
  },
1539
1329
  {
1540
1330
  "kind": "field",
1541
- "name": "direction",
1331
+ "name": "strong",
1542
1332
  "type": {
1543
- "text": "\"vertical\" | \"horizontal\""
1544
- },
1545
- "default": "\"horizontal\"",
1546
- "description": "The direction of the button group.",
1547
- "attribute": "direction",
1548
- "reflects": true
1549
- },
1550
- {
1551
- "kind": "field",
1552
- "name": "wrap",
1553
- "type": {
1554
- "text": "boolean"
1333
+ "text": "boolean"
1555
1334
  },
1556
1335
  "default": "false",
1557
- "description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
1558
- "attribute": "wrap",
1559
- "reflects": true
1560
- },
1561
- {
1562
- "kind": "field",
1563
- "name": "role",
1564
- "type": {
1565
- "text": "string"
1566
- },
1567
- "default": "\"group\"",
1568
- "description": "The appropriate role for the containing element.",
1569
- "attribute": "role",
1336
+ "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
1337
+ "attribute": "strong",
1570
1338
  "reflects": true
1571
1339
  }
1572
1340
  ],
1573
1341
  "attributes": [
1574
1342
  {
1575
- "name": "variant",
1343
+ "name": "type",
1576
1344
  "type": {
1577
- "text": "\"default\" | \"spaced\""
1345
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1578
1346
  },
1579
- "default": "\"default\"",
1580
- "description": "The style variant of the button group.",
1581
- "fieldName": "variant"
1347
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1348
+ "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
1349
+ "default": "\"neutral\"",
1350
+ "fieldName": "type"
1582
1351
  },
1583
1352
  {
1584
- "name": "direction",
1353
+ "name": "variant",
1585
1354
  "type": {
1586
- "text": "\"vertical\" | \"horizontal\""
1355
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
1587
1356
  },
1588
- "default": "\"horizontal\"",
1589
- "description": "The direction of the button group.",
1590
- "fieldName": "direction"
1357
+ "description": "The style variant of the badge.\nDetermines the background color of the badge.",
1358
+ "default": "\"neutral\"",
1359
+ "fieldName": "variant"
1591
1360
  },
1592
1361
  {
1593
- "name": "wrap",
1362
+ "name": "strong",
1594
1363
  "type": {
1595
1364
  "text": "boolean"
1596
1365
  },
1597
1366
  "default": "false",
1598
- "description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
1599
- "fieldName": "wrap"
1367
+ "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
1368
+ "fieldName": "strong"
1369
+ }
1370
+ ],
1371
+ "superclass": {
1372
+ "name": "LitElement",
1373
+ "package": "lit"
1374
+ },
1375
+ "localization": [],
1376
+ "status": "ready",
1377
+ "category": "text",
1378
+ "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 established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s easy to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n- Don't use badges for labeling, categorizing, or organizing objects. Use the [tag component](/components/tag/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n",
1379
+ "examples": [],
1380
+ "dependencies": [],
1381
+ "tagName": "nord-badge",
1382
+ "customElement": true
1383
+ }
1384
+ ],
1385
+ "exports": [
1386
+ {
1387
+ "kind": "js",
1388
+ "name": "default",
1389
+ "declaration": {
1390
+ "name": "Badge",
1391
+ "module": "src/badge/Badge.ts"
1392
+ }
1393
+ },
1394
+ {
1395
+ "kind": "custom-element-definition",
1396
+ "name": "nord-badge",
1397
+ "declaration": {
1398
+ "name": "Badge",
1399
+ "module": "src/badge/Badge.ts"
1400
+ }
1401
+ }
1402
+ ]
1403
+ },
1404
+ {
1405
+ "kind": "javascript-module",
1406
+ "path": "src/banner/Banner.ts",
1407
+ "declarations": [
1408
+ {
1409
+ "kind": "class",
1410
+ "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
1411
+ "name": "Banner",
1412
+ "cssProperties": [
1413
+ {
1414
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1415
+ "name": "--n-banner-border-radius",
1416
+ "default": "var(--n-border-radius)"
1600
1417
  },
1601
1418
  {
1602
- "name": "role",
1419
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1420
+ "name": "--n-banner-box-shadow",
1421
+ "default": "var(--n-box-shadow-card)"
1422
+ }
1423
+ ],
1424
+ "slots": [
1425
+ {
1426
+ "description": "default slot",
1427
+ "name": ""
1428
+ }
1429
+ ],
1430
+ "members": [
1431
+ {
1432
+ "kind": "field",
1433
+ "name": "variant",
1603
1434
  "type": {
1604
- "text": "string"
1435
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1605
1436
  },
1606
- "default": "\"group\"",
1607
- "description": "The appropriate role for the containing element.",
1608
- "fieldName": "role"
1437
+ "default": "\"info\"",
1438
+ "description": "The style variant of the banner.",
1439
+ "attribute": "variant",
1440
+ "reflects": true
1441
+ }
1442
+ ],
1443
+ "attributes": [
1444
+ {
1445
+ "name": "variant",
1446
+ "type": {
1447
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1448
+ },
1449
+ "default": "\"info\"",
1450
+ "description": "The style variant of the banner.",
1451
+ "fieldName": "variant"
1609
1452
  }
1610
1453
  ],
1611
1454
  "superclass": {
@@ -1614,11 +1457,13 @@
1614
1457
  },
1615
1458
  "localization": [],
1616
1459
  "status": "ready",
1617
- "category": "structure",
1618
- "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 to group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing 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 unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| --------- | -------------------------------------------------------------------------------------------------------- |\n| `default` | The default variant renders a group of segmented buttons to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the buttons to space them out evenly. |\n",
1460
+ "category": "feedback",
1461
+ "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 this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it 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\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n",
1619
1462
  "examples": [],
1620
- "dependencies": [],
1621
- "tagName": "nord-button-group",
1463
+ "dependencies": [
1464
+ "icon"
1465
+ ],
1466
+ "tagName": "nord-banner",
1622
1467
  "customElement": true
1623
1468
  }
1624
1469
  ],
@@ -1627,16 +1472,16 @@
1627
1472
  "kind": "js",
1628
1473
  "name": "default",
1629
1474
  "declaration": {
1630
- "name": "ButtonGroup",
1631
- "module": "src/button-group/ButtonGroup.ts"
1475
+ "name": "Banner",
1476
+ "module": "src/banner/Banner.ts"
1632
1477
  }
1633
1478
  },
1634
1479
  {
1635
1480
  "kind": "custom-element-definition",
1636
- "name": "nord-button-group",
1481
+ "name": "nord-banner",
1637
1482
  "declaration": {
1638
- "name": "ButtonGroup",
1639
- "module": "src/button-group/ButtonGroup.ts"
1483
+ "name": "Banner",
1484
+ "module": "src/banner/Banner.ts"
1640
1485
  }
1641
1486
  }
1642
1487
  ]
@@ -2145,93 +1990,216 @@
2145
1990
  },
2146
1991
  {
2147
1992
  "kind": "javascript-module",
2148
- "path": "src/checkbox/Checkbox.ts",
1993
+ "path": "src/card/Card.ts",
2149
1994
  "declarations": [
2150
1995
  {
2151
1996
  "kind": "class",
2152
- "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
2153
- "name": "Checkbox",
1997
+ "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.",
1998
+ "name": "Card",
2154
1999
  "cssProperties": [
2155
2000
  {
2156
- "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
2157
- "name": "--n-label-color",
2158
- "default": "var(--n-color-text)"
2001
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2002
+ "name": "--n-card-border-radius",
2003
+ "default": "var(--n-border-radius)"
2004
+ },
2005
+ {
2006
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2007
+ "name": "--n-card-box-shadow",
2008
+ "default": "var(--n-box-shadow-popout)"
2009
+ },
2010
+ {
2011
+ "description": "Controls the padding on all sides of the card.",
2012
+ "name": "--n-card-padding",
2013
+ "default": "var(--n-space-m)"
2014
+ },
2015
+ {
2016
+ "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
2017
+ "name": "--n-card-slot-padding",
2018
+ "default": "var(--n-space-m)"
2159
2019
  }
2160
2020
  ],
2161
2021
  "slots": [
2162
2022
  {
2163
- "description": "Use when a label requires more than plain text.",
2164
- "name": "label"
2023
+ "description": "The card content.",
2024
+ "name": ""
2165
2025
  },
2166
2026
  {
2167
- "description": "Optional slot that holds hint text for the input.",
2168
- "name": "hint"
2027
+ "description": "Optional slot that holds a header for the card.",
2028
+ "name": "header"
2169
2029
  },
2170
2030
  {
2171
- "description": "Optional slot that holds error text for the input.",
2172
- "name": "error"
2031
+ "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
2032
+ "name": "header-end"
2033
+ },
2034
+ {
2035
+ "description": "Optional slot that holds footer content for the card.",
2036
+ "name": "footer"
2173
2037
  }
2174
2038
  ],
2175
2039
  "members": [
2176
2040
  {
2177
2041
  "kind": "field",
2178
- "name": "formValue",
2179
- "privacy": "protected",
2180
- "readonly": true,
2181
- "inheritedFrom": {
2182
- "name": "FormAssociatedMixin",
2183
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2184
- }
2042
+ "name": "headerSlot",
2043
+ "privacy": "private",
2044
+ "default": "new SlotController(this, \"header\")"
2185
2045
  },
2186
2046
  {
2187
2047
  "kind": "field",
2188
- "name": "indeterminate",
2189
- "type": {
2190
- "text": "boolean"
2191
- },
2192
- "default": "false",
2193
- "description": "Controls whether the checkbox is in an indeterminate state.",
2194
- "attribute": "indeterminate",
2195
- "reflects": true
2048
+ "name": "headerEndSlot",
2049
+ "privacy": "private",
2050
+ "default": "new SlotController(this, \"header-end\")"
2196
2051
  },
2197
2052
  {
2198
2053
  "kind": "field",
2199
- "name": "checked",
2200
- "type": {
2201
- "text": "boolean"
2202
- },
2203
- "default": "false",
2204
- "description": "Controls whether the checkbox is checked or not.",
2205
- "attribute": "checked",
2206
- "reflects": true
2207
- },
2208
- {
2209
- "kind": "method",
2210
- "name": "handleChange",
2211
- "privacy": "protected",
2212
- "parameters": [
2213
- {
2214
- "name": "e",
2215
- "type": {
2216
- "text": "Event"
2217
- }
2218
- }
2219
- ],
2220
- "return": {
2221
- "type": {
2222
- "text": "void"
2223
- }
2224
- },
2225
- "inheritedFrom": {
2226
- "name": "FormAssociatedMixin",
2227
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2228
- }
2054
+ "name": "footerSlot",
2055
+ "privacy": "private",
2056
+ "default": "new SlotController(this, \"footer\")"
2229
2057
  },
2230
2058
  {
2231
2059
  "kind": "field",
2232
- "name": "size",
2060
+ "name": "padding",
2233
2061
  "type": {
2234
- "text": "\"s\" | \"m\" | \"l\""
2062
+ "text": "\"m\" | \"l\" | \"none\""
2063
+ },
2064
+ "default": "\"m\"",
2065
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2066
+ "attribute": "padding",
2067
+ "reflects": true
2068
+ }
2069
+ ],
2070
+ "attributes": [
2071
+ {
2072
+ "name": "padding",
2073
+ "type": {
2074
+ "text": "\"m\" | \"l\" | \"none\""
2075
+ },
2076
+ "default": "\"m\"",
2077
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2078
+ "fieldName": "padding"
2079
+ }
2080
+ ],
2081
+ "superclass": {
2082
+ "name": "LitElement",
2083
+ "package": "lit"
2084
+ },
2085
+ "localization": [],
2086
+ "status": "ready",
2087
+ "category": "structure",
2088
+ "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 to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place cards within cards. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n",
2089
+ "examples": [],
2090
+ "dependencies": [],
2091
+ "tagName": "nord-card",
2092
+ "customElement": true
2093
+ }
2094
+ ],
2095
+ "exports": [
2096
+ {
2097
+ "kind": "js",
2098
+ "name": "default",
2099
+ "declaration": {
2100
+ "name": "Card",
2101
+ "module": "src/card/Card.ts"
2102
+ }
2103
+ },
2104
+ {
2105
+ "kind": "custom-element-definition",
2106
+ "name": "nord-card",
2107
+ "declaration": {
2108
+ "name": "Card",
2109
+ "module": "src/card/Card.ts"
2110
+ }
2111
+ }
2112
+ ]
2113
+ },
2114
+ {
2115
+ "kind": "javascript-module",
2116
+ "path": "src/checkbox/Checkbox.ts",
2117
+ "declarations": [
2118
+ {
2119
+ "kind": "class",
2120
+ "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
2121
+ "name": "Checkbox",
2122
+ "cssProperties": [
2123
+ {
2124
+ "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
2125
+ "name": "--n-label-color",
2126
+ "default": "var(--n-color-text)"
2127
+ }
2128
+ ],
2129
+ "slots": [
2130
+ {
2131
+ "description": "Use when a label requires more than plain text.",
2132
+ "name": "label"
2133
+ },
2134
+ {
2135
+ "description": "Optional slot that holds hint text for the input.",
2136
+ "name": "hint"
2137
+ },
2138
+ {
2139
+ "description": "Optional slot that holds error text for the input.",
2140
+ "name": "error"
2141
+ }
2142
+ ],
2143
+ "members": [
2144
+ {
2145
+ "kind": "field",
2146
+ "name": "formValue",
2147
+ "privacy": "protected",
2148
+ "readonly": true,
2149
+ "inheritedFrom": {
2150
+ "name": "FormAssociatedMixin",
2151
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2152
+ }
2153
+ },
2154
+ {
2155
+ "kind": "field",
2156
+ "name": "indeterminate",
2157
+ "type": {
2158
+ "text": "boolean"
2159
+ },
2160
+ "default": "false",
2161
+ "description": "Controls whether the checkbox is in an indeterminate state.",
2162
+ "attribute": "indeterminate",
2163
+ "reflects": true
2164
+ },
2165
+ {
2166
+ "kind": "field",
2167
+ "name": "checked",
2168
+ "type": {
2169
+ "text": "boolean"
2170
+ },
2171
+ "default": "false",
2172
+ "description": "Controls whether the checkbox is checked or not.",
2173
+ "attribute": "checked",
2174
+ "reflects": true
2175
+ },
2176
+ {
2177
+ "kind": "method",
2178
+ "name": "handleChange",
2179
+ "privacy": "protected",
2180
+ "parameters": [
2181
+ {
2182
+ "name": "e",
2183
+ "type": {
2184
+ "text": "Event"
2185
+ }
2186
+ }
2187
+ ],
2188
+ "return": {
2189
+ "type": {
2190
+ "text": "void"
2191
+ }
2192
+ },
2193
+ "inheritedFrom": {
2194
+ "name": "FormAssociatedMixin",
2195
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2196
+ }
2197
+ },
2198
+ {
2199
+ "kind": "field",
2200
+ "name": "size",
2201
+ "type": {
2202
+ "text": "\"s\" | \"m\" | \"l\""
2235
2203
  },
2236
2204
  "default": "\"m\"",
2237
2205
  "description": "The size of the component.",
@@ -2883,123 +2851,155 @@
2883
2851
  },
2884
2852
  {
2885
2853
  "kind": "javascript-module",
2886
- "path": "src/card/Card.ts",
2854
+ "path": "src/button-group/ButtonGroup.ts",
2887
2855
  "declarations": [
2888
2856
  {
2889
2857
  "kind": "class",
2890
- "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.",
2891
- "name": "Card",
2858
+ "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
2859
+ "name": "ButtonGroup",
2892
2860
  "cssProperties": [
2893
2861
  {
2894
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2895
- "name": "--n-card-border-radius",
2896
- "default": "var(--n-border-radius)"
2897
- },
2898
- {
2899
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2900
- "name": "--n-card-box-shadow",
2901
- "default": "var(--n-box-shadow-popout)"
2902
- },
2903
- {
2904
- "description": "Controls the padding on all sides of the card.",
2905
- "name": "--n-card-padding",
2906
- "default": "var(--n-space-m)"
2862
+ "description": "Controls the rounded corners of the button group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
2863
+ "name": "--n-button-group-border-radius",
2864
+ "default": "var(--n-border-radius-s)"
2907
2865
  },
2908
2866
  {
2909
- "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
2910
- "name": "--n-card-slot-padding",
2911
- "default": "var(--n-space-m)"
2867
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
2868
+ "name": "--n-button-group-box-shadow",
2869
+ "default": "var(--n-box-shadow)"
2912
2870
  }
2913
2871
  ],
2914
2872
  "slots": [
2915
2873
  {
2916
- "description": "The card content.",
2874
+ "description": "The button group content",
2917
2875
  "name": ""
2918
- },
2919
- {
2920
- "description": "Optional slot that holds a header for the card.",
2921
- "name": "header"
2922
- },
2923
- {
2924
- "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
2925
- "name": "header-end"
2926
- },
2927
- {
2928
- "description": "Optional slot that holds footer content for the card.",
2929
- "name": "footer"
2930
2876
  }
2931
2877
  ],
2932
2878
  "members": [
2933
2879
  {
2934
2880
  "kind": "field",
2935
- "name": "headerSlot",
2881
+ "name": "defaultSlot",
2936
2882
  "privacy": "private",
2937
- "default": "new SlotController(this, \"header\")"
2883
+ "default": "new SlotController(this)"
2938
2884
  },
2939
2885
  {
2940
2886
  "kind": "field",
2941
- "name": "headerEndSlot",
2887
+ "name": "dirController",
2942
2888
  "privacy": "private",
2943
- "default": "new SlotController(this, \"header-end\")"
2889
+ "default": "new DirectionController(this)"
2944
2890
  },
2945
2891
  {
2946
2892
  "kind": "field",
2947
- "name": "footerSlot",
2948
- "privacy": "private",
2949
- "default": "new SlotController(this, \"footer\")"
2893
+ "name": "variant",
2894
+ "type": {
2895
+ "text": "\"default\" | \"spaced\""
2896
+ },
2897
+ "default": "\"default\"",
2898
+ "description": "The style variant of the button group.",
2899
+ "attribute": "variant",
2900
+ "reflects": true
2950
2901
  },
2951
2902
  {
2952
2903
  "kind": "field",
2953
- "name": "padding",
2904
+ "name": "direction",
2954
2905
  "type": {
2955
- "text": "\"m\" | \"l\" | \"none\""
2906
+ "text": "\"vertical\" | \"horizontal\""
2956
2907
  },
2957
- "default": "\"m\"",
2958
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2959
- "attribute": "padding",
2908
+ "default": "\"horizontal\"",
2909
+ "description": "The direction of the button group.",
2910
+ "attribute": "direction",
2911
+ "reflects": true
2912
+ },
2913
+ {
2914
+ "kind": "field",
2915
+ "name": "wrap",
2916
+ "type": {
2917
+ "text": "boolean"
2918
+ },
2919
+ "default": "false",
2920
+ "description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
2921
+ "attribute": "wrap",
2922
+ "reflects": true
2923
+ },
2924
+ {
2925
+ "kind": "field",
2926
+ "name": "role",
2927
+ "type": {
2928
+ "text": "string"
2929
+ },
2930
+ "default": "\"group\"",
2931
+ "description": "The appropriate role for the containing element.",
2932
+ "attribute": "role",
2960
2933
  "reflects": true
2961
2934
  }
2962
2935
  ],
2963
2936
  "attributes": [
2964
2937
  {
2965
- "name": "padding",
2938
+ "name": "variant",
2966
2939
  "type": {
2967
- "text": "\"m\" | \"l\" | \"none\""
2940
+ "text": "\"default\" | \"spaced\""
2968
2941
  },
2969
- "default": "\"m\"",
2970
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2971
- "fieldName": "padding"
2972
- }
2973
- ],
2974
- "superclass": {
2975
- "name": "LitElement",
2976
- "package": "lit"
2977
- },
2978
- "localization": [],
2979
- "status": "ready",
2980
- "category": "structure",
2981
- "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 to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place cards within cards. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n",
2982
- "examples": [],
2983
- "dependencies": [],
2984
- "tagName": "nord-card",
2985
- "customElement": true
2986
- }
2987
- ],
2942
+ "default": "\"default\"",
2943
+ "description": "The style variant of the button group.",
2944
+ "fieldName": "variant"
2945
+ },
2946
+ {
2947
+ "name": "direction",
2948
+ "type": {
2949
+ "text": "\"vertical\" | \"horizontal\""
2950
+ },
2951
+ "default": "\"horizontal\"",
2952
+ "description": "The direction of the button group.",
2953
+ "fieldName": "direction"
2954
+ },
2955
+ {
2956
+ "name": "wrap",
2957
+ "type": {
2958
+ "text": "boolean"
2959
+ },
2960
+ "default": "false",
2961
+ "description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
2962
+ "fieldName": "wrap"
2963
+ },
2964
+ {
2965
+ "name": "role",
2966
+ "type": {
2967
+ "text": "string"
2968
+ },
2969
+ "default": "\"group\"",
2970
+ "description": "The appropriate role for the containing element.",
2971
+ "fieldName": "role"
2972
+ }
2973
+ ],
2974
+ "superclass": {
2975
+ "name": "LitElement",
2976
+ "package": "lit"
2977
+ },
2978
+ "localization": [],
2979
+ "status": "ready",
2980
+ "category": "structure",
2981
+ "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 to group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing 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 unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| --------- | -------------------------------------------------------------------------------------------------------- |\n| `default` | The default variant renders a group of segmented buttons to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the buttons to space them out evenly. |\n",
2982
+ "examples": [],
2983
+ "dependencies": [],
2984
+ "tagName": "nord-button-group",
2985
+ "customElement": true
2986
+ }
2987
+ ],
2988
2988
  "exports": [
2989
2989
  {
2990
2990
  "kind": "js",
2991
2991
  "name": "default",
2992
2992
  "declaration": {
2993
- "name": "Card",
2994
- "module": "src/card/Card.ts"
2993
+ "name": "ButtonGroup",
2994
+ "module": "src/button-group/ButtonGroup.ts"
2995
2995
  }
2996
2996
  },
2997
2997
  {
2998
2998
  "kind": "custom-element-definition",
2999
- "name": "nord-card",
2999
+ "name": "nord-button-group",
3000
3000
  "declaration": {
3001
- "name": "Card",
3002
- "module": "src/card/Card.ts"
3001
+ "name": "ButtonGroup",
3002
+ "module": "src/button-group/ButtonGroup.ts"
3003
3003
  }
3004
3004
  }
3005
3005
  ]
@@ -14626,6 +14626,114 @@
14626
14626
  }
14627
14627
  ]
14628
14628
  },
14629
+ {
14630
+ "kind": "javascript-module",
14631
+ "path": "src/spinner/Spinner.ts",
14632
+ "declarations": [
14633
+ {
14634
+ "kind": "class",
14635
+ "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.",
14636
+ "name": "Spinner",
14637
+ "cssProperties": [
14638
+ {
14639
+ "description": "Controls the color the spinner.",
14640
+ "name": "--n-spinner-color",
14641
+ "default": "var(--n-color-accent)"
14642
+ }
14643
+ ],
14644
+ "members": [
14645
+ {
14646
+ "kind": "field",
14647
+ "name": "size",
14648
+ "type": {
14649
+ "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
14650
+ },
14651
+ "default": "\"m\"",
14652
+ "description": "The size of the spinner.",
14653
+ "attribute": "size",
14654
+ "reflects": true
14655
+ },
14656
+ {
14657
+ "kind": "field",
14658
+ "name": "color",
14659
+ "type": {
14660
+ "text": "string | undefined"
14661
+ },
14662
+ "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.\nTakes precedence over the `--n-spinner-color` CSS custom property.",
14663
+ "attribute": "color",
14664
+ "reflects": true
14665
+ },
14666
+ {
14667
+ "kind": "field",
14668
+ "name": "label",
14669
+ "type": {
14670
+ "text": "string | undefined"
14671
+ },
14672
+ "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
14673
+ "attribute": "label",
14674
+ "reflects": true
14675
+ }
14676
+ ],
14677
+ "attributes": [
14678
+ {
14679
+ "name": "size",
14680
+ "type": {
14681
+ "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
14682
+ },
14683
+ "default": "\"m\"",
14684
+ "description": "The size of the spinner.",
14685
+ "fieldName": "size"
14686
+ },
14687
+ {
14688
+ "name": "color",
14689
+ "type": {
14690
+ "text": "string | undefined"
14691
+ },
14692
+ "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.\nTakes precedence over the `--n-spinner-color` CSS custom property.",
14693
+ "fieldName": "color"
14694
+ },
14695
+ {
14696
+ "name": "label",
14697
+ "type": {
14698
+ "text": "string | undefined"
14699
+ },
14700
+ "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
14701
+ "fieldName": "label"
14702
+ }
14703
+ ],
14704
+ "superclass": {
14705
+ "name": "LitElement",
14706
+ "package": "lit"
14707
+ },
14708
+ "localization": [],
14709
+ "status": "ready",
14710
+ "category": "feedback",
14711
+ "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 for indicating users that their action is being processed.\n- Use the label property to provide an accessible label for the spinner. If no label is supplied, the spinner is hidden from assistive technology.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to show progress. Favor a progress bar instead.\n\n</div>\n",
14712
+ "examples": [],
14713
+ "dependencies": [],
14714
+ "tagName": "nord-spinner",
14715
+ "customElement": true
14716
+ }
14717
+ ],
14718
+ "exports": [
14719
+ {
14720
+ "kind": "js",
14721
+ "name": "default",
14722
+ "declaration": {
14723
+ "name": "Spinner",
14724
+ "module": "src/spinner/Spinner.ts"
14725
+ }
14726
+ },
14727
+ {
14728
+ "kind": "custom-element-definition",
14729
+ "name": "nord-spinner",
14730
+ "declaration": {
14731
+ "name": "Spinner",
14732
+ "module": "src/spinner/Spinner.ts"
14733
+ }
14734
+ }
14735
+ ]
14736
+ },
14629
14737
  {
14630
14738
  "kind": "javascript-module",
14631
14739
  "path": "src/stack/Stack.ts",
@@ -14879,201 +14987,93 @@
14879
14987
  },
14880
14988
  {
14881
14989
  "kind": "javascript-module",
14882
- "path": "src/spinner/Spinner.ts",
14990
+ "path": "src/tab-group/TabGroup.ts",
14883
14991
  "declarations": [
14884
14992
  {
14885
14993
  "kind": "class",
14886
- "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.",
14887
- "name": "Spinner",
14994
+ "description": "Tab Group allows multiple panels to be contained within a single window,\nusing tabs as a navigational element.",
14995
+ "name": "TabGroup",
14888
14996
  "cssProperties": [
14889
14997
  {
14890
- "description": "Controls the color the spinner.",
14891
- "name": "--n-spinner-color",
14892
- "default": "var(--n-color-accent)"
14998
+ "description": "Controls the padding around the tab group (including the tab list), using our [spacing tokens](/tokens/#space).",
14999
+ "name": "--n-tab-group-padding",
15000
+ "default": "0"
15001
+ }
15002
+ ],
15003
+ "slots": [
15004
+ {
15005
+ "description": "The element which contains the content to be revealed.",
15006
+ "name": ""
15007
+ },
15008
+ {
15009
+ "description": "The element which contains all tabs to reveal tabbed content.",
15010
+ "name": "tab"
14893
15011
  }
14894
15012
  ],
14895
15013
  "members": [
14896
15014
  {
14897
15015
  "kind": "field",
14898
- "name": "size",
15016
+ "name": "direction",
15017
+ "privacy": "private",
15018
+ "default": "new DirectionController(this)"
15019
+ },
15020
+ {
15021
+ "kind": "field",
15022
+ "name": "observer",
14899
15023
  "type": {
14900
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
15024
+ "text": "MutationObserver | undefined"
14901
15025
  },
14902
- "default": "\"m\"",
14903
- "description": "The size of the spinner.",
14904
- "attribute": "size",
14905
- "reflects": true
15026
+ "privacy": "private"
14906
15027
  },
14907
15028
  {
14908
15029
  "kind": "field",
14909
- "name": "color",
15030
+ "name": "observerOptions",
14910
15031
  "type": {
14911
- "text": "string | undefined"
15032
+ "text": "object"
14912
15033
  },
14913
- "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.\nTakes precedence over the `--n-spinner-color` CSS custom property.",
14914
- "attribute": "color",
14915
- "reflects": true
15034
+ "privacy": "private",
15035
+ "static": true,
15036
+ "default": "{ attributes: true, subtree: true, attributeFilter: [\"selected\"], attributeOldValue: true, }"
15037
+ },
15038
+ {
15039
+ "kind": "field",
15040
+ "name": "tabGroupId",
15041
+ "privacy": "private",
15042
+ "default": "`nord-tab-group-${tabGroupCount++}`",
15043
+ "description": "Unique ID for each tab group component present."
14916
15044
  },
14917
15045
  {
14918
15046
  "kind": "field",
14919
15047
  "name": "label",
14920
15048
  "type": {
14921
- "text": "string | undefined"
15049
+ "text": "string"
14922
15050
  },
14923
- "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
15051
+ "default": "\"\"",
15052
+ "description": "Adds an accessible label to the tab list container.",
14924
15053
  "attribute": "label",
14925
15054
  "reflects": true
14926
- }
14927
- ],
14928
- "attributes": [
15055
+ },
14929
15056
  {
14930
- "name": "size",
15057
+ "kind": "field",
15058
+ "name": "padding",
14931
15059
  "type": {
14932
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
15060
+ "text": "\"m\" | \"l\" | \"none\" | undefined"
14933
15061
  },
14934
15062
  "default": "\"m\"",
14935
- "description": "The size of the spinner.",
14936
- "fieldName": "size"
15063
+ "description": "Controls the padding of the tab group component.",
15064
+ "attribute": "padding",
15065
+ "reflects": true
14937
15066
  },
14938
15067
  {
14939
- "name": "color",
15068
+ "kind": "field",
15069
+ "name": "sticky",
14940
15070
  "type": {
14941
- "text": "string | undefined"
15071
+ "text": "boolean"
14942
15072
  },
14943
- "description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.\nTakes precedence over the `--n-spinner-color` CSS custom property.",
14944
- "fieldName": "color"
14945
- },
14946
- {
14947
- "name": "label",
14948
- "type": {
14949
- "text": "string | undefined"
14950
- },
14951
- "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
14952
- "fieldName": "label"
14953
- }
14954
- ],
14955
- "superclass": {
14956
- "name": "LitElement",
14957
- "package": "lit"
14958
- },
14959
- "localization": [],
14960
- "status": "ready",
14961
- "category": "feedback",
14962
- "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 for indicating users that their action is being processed.\n- Use the label property to provide an accessible label for the spinner. If no label is supplied, the spinner is hidden from assistive technology.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to show progress. Favor a progress bar instead.\n\n</div>\n",
14963
- "examples": [],
14964
- "dependencies": [],
14965
- "tagName": "nord-spinner",
14966
- "customElement": true
14967
- }
14968
- ],
14969
- "exports": [
14970
- {
14971
- "kind": "js",
14972
- "name": "default",
14973
- "declaration": {
14974
- "name": "Spinner",
14975
- "module": "src/spinner/Spinner.ts"
14976
- }
14977
- },
14978
- {
14979
- "kind": "custom-element-definition",
14980
- "name": "nord-spinner",
14981
- "declaration": {
14982
- "name": "Spinner",
14983
- "module": "src/spinner/Spinner.ts"
14984
- }
14985
- }
14986
- ]
14987
- },
14988
- {
14989
- "kind": "javascript-module",
14990
- "path": "src/tab-group/TabGroup.ts",
14991
- "declarations": [
14992
- {
14993
- "kind": "class",
14994
- "description": "Tab Group allows multiple panels to be contained within a single window,\nusing tabs as a navigational element.",
14995
- "name": "TabGroup",
14996
- "cssProperties": [
14997
- {
14998
- "description": "Controls the padding around the tab group (including the tab list), using our [spacing tokens](/tokens/#space).",
14999
- "name": "--n-tab-group-padding",
15000
- "default": "0"
15001
- }
15002
- ],
15003
- "slots": [
15004
- {
15005
- "description": "The element which contains the content to be revealed.",
15006
- "name": ""
15007
- },
15008
- {
15009
- "description": "The element which contains all tabs to reveal tabbed content.",
15010
- "name": "tab"
15011
- }
15012
- ],
15013
- "members": [
15014
- {
15015
- "kind": "field",
15016
- "name": "direction",
15017
- "privacy": "private",
15018
- "default": "new DirectionController(this)"
15019
- },
15020
- {
15021
- "kind": "field",
15022
- "name": "observer",
15023
- "type": {
15024
- "text": "MutationObserver | undefined"
15025
- },
15026
- "privacy": "private"
15027
- },
15028
- {
15029
- "kind": "field",
15030
- "name": "observerOptions",
15031
- "type": {
15032
- "text": "object"
15033
- },
15034
- "privacy": "private",
15035
- "static": true,
15036
- "default": "{ attributes: true, subtree: true, attributeFilter: [\"selected\"], attributeOldValue: true, }"
15037
- },
15038
- {
15039
- "kind": "field",
15040
- "name": "tabGroupId",
15041
- "privacy": "private",
15042
- "default": "`nord-tab-group-${tabGroupCount++}`",
15043
- "description": "Unique ID for each tab group component present."
15044
- },
15045
- {
15046
- "kind": "field",
15047
- "name": "label",
15048
- "type": {
15049
- "text": "string"
15050
- },
15051
- "default": "\"\"",
15052
- "description": "Adds an accessible label to the tab list container.",
15053
- "attribute": "label",
15054
- "reflects": true
15055
- },
15056
- {
15057
- "kind": "field",
15058
- "name": "padding",
15059
- "type": {
15060
- "text": "\"m\" | \"l\" | \"none\" | undefined"
15061
- },
15062
- "default": "\"m\"",
15063
- "description": "Controls the padding of the tab group component.",
15064
- "attribute": "padding",
15065
- "reflects": true
15066
- },
15067
- {
15068
- "kind": "field",
15069
- "name": "sticky",
15070
- "type": {
15071
- "text": "boolean"
15072
- },
15073
- "default": "false",
15074
- "description": "Whether the tab list sticks to the top of the tab group as you scroll.",
15075
- "attribute": "sticky",
15076
- "reflects": true
15073
+ "default": "false",
15074
+ "description": "Whether the tab list sticks to the top of the tab group as you scroll.",
15075
+ "attribute": "sticky",
15076
+ "reflects": true
15077
15077
  },
15078
15078
  {
15079
15079
  "kind": "field",
@@ -15231,6 +15231,54 @@
15231
15231
  }
15232
15232
  ]
15233
15233
  },
15234
+ {
15235
+ "kind": "javascript-module",
15236
+ "path": "src/tab-panel/TabPanel.ts",
15237
+ "declarations": [
15238
+ {
15239
+ "kind": "class",
15240
+ "description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
15241
+ "name": "TabPanel",
15242
+ "slots": [
15243
+ {
15244
+ "description": "The tab panel content.",
15245
+ "name": ""
15246
+ }
15247
+ ],
15248
+ "members": [],
15249
+ "superclass": {
15250
+ "name": "LitElement",
15251
+ "package": "lit"
15252
+ },
15253
+ "localization": [],
15254
+ "status": "ready",
15255
+ "category": "navigation",
15256
+ "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 tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab 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 unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n",
15257
+ "examples": [],
15258
+ "dependencies": [],
15259
+ "tagName": "nord-tab-panel",
15260
+ "customElement": true
15261
+ }
15262
+ ],
15263
+ "exports": [
15264
+ {
15265
+ "kind": "js",
15266
+ "name": "default",
15267
+ "declaration": {
15268
+ "name": "TabPanel",
15269
+ "module": "src/tab-panel/TabPanel.ts"
15270
+ }
15271
+ },
15272
+ {
15273
+ "kind": "custom-element-definition",
15274
+ "name": "nord-tab-panel",
15275
+ "declaration": {
15276
+ "name": "TabPanel",
15277
+ "module": "src/tab-panel/TabPanel.ts"
15278
+ }
15279
+ }
15280
+ ]
15281
+ },
15234
15282
  {
15235
15283
  "kind": "javascript-module",
15236
15284
  "path": "src/table/Table.ts",
@@ -15377,54 +15425,6 @@
15377
15425
  }
15378
15426
  ]
15379
15427
  },
15380
- {
15381
- "kind": "javascript-module",
15382
- "path": "src/tab-panel/TabPanel.ts",
15383
- "declarations": [
15384
- {
15385
- "kind": "class",
15386
- "description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
15387
- "name": "TabPanel",
15388
- "slots": [
15389
- {
15390
- "description": "The tab panel content.",
15391
- "name": ""
15392
- }
15393
- ],
15394
- "members": [],
15395
- "superclass": {
15396
- "name": "LitElement",
15397
- "package": "lit"
15398
- },
15399
- "localization": [],
15400
- "status": "ready",
15401
- "category": "navigation",
15402
- "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 tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab 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 unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n",
15403
- "examples": [],
15404
- "dependencies": [],
15405
- "tagName": "nord-tab-panel",
15406
- "customElement": true
15407
- }
15408
- ],
15409
- "exports": [
15410
- {
15411
- "kind": "js",
15412
- "name": "default",
15413
- "declaration": {
15414
- "name": "TabPanel",
15415
- "module": "src/tab-panel/TabPanel.ts"
15416
- }
15417
- },
15418
- {
15419
- "kind": "custom-element-definition",
15420
- "name": "nord-tab-panel",
15421
- "declaration": {
15422
- "name": "TabPanel",
15423
- "module": "src/tab-panel/TabPanel.ts"
15424
- }
15425
- }
15426
- ]
15427
- },
15428
15428
  {
15429
15429
  "kind": "javascript-module",
15430
15430
  "path": "src/tag/Tag.ts",
@@ -17339,390 +17339,337 @@
17339
17339
  },
17340
17340
  {
17341
17341
  "kind": "javascript-module",
17342
- "path": "src/tooltip/Tooltip.ts",
17342
+ "path": "src/toggle/Toggle.ts",
17343
17343
  "declarations": [
17344
17344
  {
17345
17345
  "kind": "class",
17346
- "description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
17347
- "name": "Tooltip",
17346
+ "description": "Toggle switch gives control over a feature or option that can be\nturned on or off. If a physical switch would work for the action, a\ntoggle is probably the best component to use.",
17347
+ "name": "Toggle",
17348
17348
  "cssProperties": [
17349
17349
  {
17350
- "description": "Controls the maximum inline size, or width, of the tooltip.",
17351
- "name": "--n-tooltip-max-size",
17352
- "default": "50ch"
17350
+ "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
17351
+ "name": "--n-label-color",
17352
+ "default": "var(--n-color-text)"
17353
17353
  }
17354
17354
  ],
17355
17355
  "slots": [
17356
17356
  {
17357
- "description": "The tooltip content",
17358
- "name": ""
17357
+ "description": "Use when a label requires more than plain text.",
17358
+ "name": "label"
17359
17359
  },
17360
17360
  {
17361
- "description": "Optional slot that holds shortcut keys to access the subject",
17362
- "name": "shortcut"
17361
+ "description": "Optional slot that holds hint text for the input.",
17362
+ "name": "hint"
17363
+ },
17364
+ {
17365
+ "description": "Optional slot that holds error text for the input.",
17366
+ "name": "error"
17363
17367
  }
17364
17368
  ],
17365
17369
  "members": [
17366
17370
  {
17367
17371
  "kind": "field",
17368
- "name": "lastOpened",
17372
+ "name": "formValue",
17373
+ "privacy": "protected",
17374
+ "readonly": true,
17375
+ "inheritedFrom": {
17376
+ "name": "FormAssociatedMixin",
17377
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17378
+ }
17379
+ },
17380
+ {
17381
+ "kind": "field",
17382
+ "name": "checked",
17369
17383
  "type": {
17370
- "text": "Tooltip | undefined"
17384
+ "text": "boolean"
17371
17385
  },
17372
- "privacy": "private",
17373
- "static": true
17386
+ "default": "false",
17387
+ "description": "Controls whether the toggle is checked or not.",
17388
+ "attribute": "checked",
17389
+ "reflects": true
17374
17390
  },
17375
17391
  {
17376
17392
  "kind": "field",
17377
- "name": "shortcutSlot",
17378
- "privacy": "private",
17379
- "default": "new SlotController(this, \"shortcut\")"
17393
+ "name": "reverse",
17394
+ "type": {
17395
+ "text": "boolean"
17396
+ },
17397
+ "default": "false",
17398
+ "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
17399
+ "attribute": "reverse",
17400
+ "reflects": true
17380
17401
  },
17381
17402
  {
17382
17403
  "kind": "field",
17383
- "name": "events",
17384
- "privacy": "private",
17385
- "default": "new EventController(this)"
17404
+ "name": "size",
17405
+ "type": {
17406
+ "text": "\"s\" | \"m\" | \"l\""
17407
+ },
17408
+ "default": "\"m\"",
17409
+ "description": "The size of the toggle switch.",
17410
+ "attribute": "size",
17411
+ "reflects": true
17386
17412
  },
17387
17413
  {
17388
- "kind": "field",
17389
- "name": "currentElement",
17390
- "type": {
17391
- "text": "FocusableElement | undefined"
17414
+ "kind": "method",
17415
+ "name": "handleChange",
17416
+ "privacy": "protected",
17417
+ "parameters": [
17418
+ {
17419
+ "name": "e",
17420
+ "type": {
17421
+ "text": "Event"
17422
+ }
17423
+ }
17424
+ ],
17425
+ "return": {
17426
+ "type": {
17427
+ "text": "void"
17428
+ }
17392
17429
  },
17393
- "privacy": "private"
17430
+ "inheritedFrom": {
17431
+ "name": "FormAssociatedMixin",
17432
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17433
+ }
17394
17434
  },
17395
17435
  {
17396
17436
  "kind": "field",
17397
- "name": "timeoutId",
17398
- "type": {
17399
- "text": "ReturnType<typeof setTimeout> | undefined"
17400
- },
17401
- "privacy": "private"
17437
+ "name": "labelSlot",
17438
+ "privacy": "protected",
17439
+ "default": "new SlotController(this, \"label\")",
17440
+ "inheritedFrom": {
17441
+ "name": "FormAssociatedMixin",
17442
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17443
+ }
17402
17444
  },
17403
17445
  {
17404
17446
  "kind": "field",
17405
- "name": "proxy",
17406
- "type": {
17407
- "text": "HTMLSpanElement | undefined"
17408
- },
17409
- "privacy": "private",
17410
- "description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
17447
+ "name": "errorSlot",
17448
+ "privacy": "protected",
17449
+ "default": "new SlotController(this, \"error\")",
17450
+ "inheritedFrom": {
17451
+ "name": "FormAssociatedMixin",
17452
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17453
+ }
17411
17454
  },
17412
17455
  {
17413
17456
  "kind": "field",
17414
- "name": "state",
17415
- "type": {
17416
- "text": "TooltipStates"
17417
- },
17418
- "privacy": "private",
17419
- "default": "\"hidden\"",
17420
- "description": "The current state of the tooltip, dependent on the state machine"
17457
+ "name": "hintSlot",
17458
+ "privacy": "protected",
17459
+ "default": "new SlotController(this, \"hint\")",
17460
+ "inheritedFrom": {
17461
+ "name": "FormAssociatedMixin",
17462
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17463
+ }
17421
17464
  },
17422
17465
  {
17423
17466
  "kind": "field",
17424
- "name": "coords",
17467
+ "name": "formData",
17468
+ "privacy": "protected",
17469
+ "default": "new FormDataController(this, { value: () => this.formValue })",
17470
+ "inheritedFrom": {
17471
+ "name": "FormAssociatedMixin",
17472
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17473
+ }
17474
+ },
17475
+ {
17476
+ "kind": "field",
17477
+ "name": "inputId",
17425
17478
  "type": {
17426
- "text": "[number, number]"
17479
+ "text": "string"
17427
17480
  },
17428
- "privacy": "private",
17429
- "default": "[0, 0]"
17481
+ "privacy": "protected",
17482
+ "default": "\"input\"",
17483
+ "inheritedFrom": {
17484
+ "name": "FormAssociatedMixin",
17485
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17486
+ }
17430
17487
  },
17431
17488
  {
17432
17489
  "kind": "field",
17433
- "name": "position",
17490
+ "name": "errorId",
17434
17491
  "type": {
17435
- "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
17492
+ "text": "string"
17436
17493
  },
17437
- "default": "\"block-start\"",
17438
- "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
17439
- "attribute": "position",
17440
- "reflects": true
17494
+ "privacy": "protected",
17495
+ "default": "\"error\"",
17496
+ "inheritedFrom": {
17497
+ "name": "FormAssociatedMixin",
17498
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17499
+ }
17441
17500
  },
17442
17501
  {
17443
17502
  "kind": "field",
17444
- "name": "role",
17503
+ "name": "hintId",
17445
17504
  "type": {
17446
17505
  "text": "string"
17447
17506
  },
17448
- "default": "\"tooltip\"",
17449
- "description": "The tooltip role, set on the component by default.",
17450
- "attribute": "role",
17451
- "reflects": true
17507
+ "privacy": "protected",
17508
+ "default": "\"hint\"",
17509
+ "inheritedFrom": {
17510
+ "name": "FormAssociatedMixin",
17511
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17512
+ }
17452
17513
  },
17453
17514
  {
17454
17515
  "kind": "field",
17455
- "name": "id",
17516
+ "name": "label",
17456
17517
  "type": {
17457
17518
  "text": "string"
17458
17519
  },
17459
17520
  "default": "\"\"",
17460
- "description": "The id for the active element to reference via aria-describedby.",
17461
- "attribute": "id",
17462
- "reflects": true
17521
+ "description": "Label for the input.",
17522
+ "attribute": "label",
17523
+ "reflects": true,
17524
+ "inheritedFrom": {
17525
+ "name": "FormAssociatedMixin",
17526
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17527
+ }
17463
17528
  },
17464
17529
  {
17465
17530
  "kind": "field",
17466
- "name": "delay",
17531
+ "name": "hint",
17467
17532
  "type": {
17468
- "text": "number"
17533
+ "text": "string | undefined"
17469
17534
  },
17470
- "default": "500",
17471
- "description": "The delay in milliseconds before the tooltip is opened.",
17472
- "attribute": "delay",
17473
- "reflects": true
17474
- },
17475
- {
17476
- "kind": "method",
17477
- "name": "handleIdChange",
17478
- "privacy": "protected"
17479
- },
17480
- {
17481
- "kind": "method",
17482
- "name": "handleStateChange",
17483
- "privacy": "private",
17484
- "parameters": [
17485
- {
17486
- "name": "prevState",
17487
- "type": {
17488
- "text": "TooltipStates"
17489
- }
17490
- }
17491
- ]
17535
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
17536
+ "attribute": "hint",
17537
+ "reflects": true,
17538
+ "inheritedFrom": {
17539
+ "name": "FormAssociatedMixin",
17540
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17541
+ }
17492
17542
  },
17493
17543
  {
17494
17544
  "kind": "field",
17495
- "name": "updatePosition",
17496
- "privacy": "private",
17497
- "description": "Setting and updating the position of the tooltip"
17545
+ "name": "hideLabel",
17546
+ "type": {
17547
+ "text": "boolean"
17548
+ },
17549
+ "default": "false",
17550
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
17551
+ "attribute": "hide-label",
17552
+ "reflects": true,
17553
+ "inheritedFrom": {
17554
+ "name": "FormAssociatedMixin",
17555
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17556
+ }
17498
17557
  },
17499
17558
  {
17500
17559
  "kind": "field",
17501
- "name": "hideTooltip",
17502
- "privacy": "private"
17560
+ "name": "placeholder",
17561
+ "type": {
17562
+ "text": "string | undefined"
17563
+ },
17564
+ "description": "Placeholder text to display within the input.",
17565
+ "attribute": "placeholder",
17566
+ "reflects": true,
17567
+ "inheritedFrom": {
17568
+ "name": "FormAssociatedMixin",
17569
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17570
+ }
17503
17571
  },
17504
17572
  {
17505
17573
  "kind": "field",
17506
- "name": "reposition",
17507
- "privacy": "private"
17574
+ "name": "error",
17575
+ "type": {
17576
+ "text": "string | undefined"
17577
+ },
17578
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
17579
+ "attribute": "error",
17580
+ "reflects": true,
17581
+ "inheritedFrom": {
17582
+ "name": "FormAssociatedMixin",
17583
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17584
+ }
17508
17585
  },
17509
17586
  {
17510
17587
  "kind": "field",
17511
- "name": "handleShow",
17512
- "privacy": "private"
17588
+ "name": "required",
17589
+ "type": {
17590
+ "text": "boolean"
17591
+ },
17592
+ "default": "false",
17593
+ "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
17594
+ "attribute": "required",
17595
+ "reflects": true,
17596
+ "inheritedFrom": {
17597
+ "name": "FormAssociatedMixin",
17598
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17599
+ }
17513
17600
  },
17514
17601
  {
17515
17602
  "kind": "field",
17516
- "name": "handleHide",
17517
- "privacy": "private"
17603
+ "name": "hideRequired",
17604
+ "type": {
17605
+ "text": "boolean"
17606
+ },
17607
+ "default": "false",
17608
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
17609
+ "attribute": "hide-required",
17610
+ "reflects": true,
17611
+ "inheritedFrom": {
17612
+ "name": "FormAssociatedMixin",
17613
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17614
+ }
17518
17615
  },
17519
17616
  {
17520
- "kind": "field",
17521
- "name": "hideOnEscape",
17522
- "privacy": "private"
17523
- },
17524
- {
17525
- "kind": "field",
17526
- "name": "addDescribedBy",
17527
- "privacy": "private"
17528
- },
17529
- {
17530
- "kind": "field",
17531
- "name": "removeDescribedBy",
17532
- "privacy": "private"
17533
- }
17534
- ],
17535
- "attributes": [
17536
- {
17537
- "name": "position",
17538
- "type": {
17539
- "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
17540
- },
17541
- "default": "\"block-start\"",
17542
- "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
17543
- "fieldName": "position"
17544
- },
17545
- {
17546
- "name": "role",
17547
- "type": {
17548
- "text": "string"
17549
- },
17550
- "default": "\"tooltip\"",
17551
- "description": "The tooltip role, set on the component by default.",
17552
- "fieldName": "role"
17553
- },
17554
- {
17555
- "name": "id",
17556
- "type": {
17557
- "text": "string"
17558
- },
17559
- "default": "\"\"",
17560
- "description": "The id for the active element to reference via aria-describedby.",
17561
- "fieldName": "id"
17562
- },
17563
- {
17564
- "name": "delay",
17565
- "type": {
17566
- "text": "number"
17567
- },
17568
- "default": "500",
17569
- "description": "The delay in milliseconds before the tooltip is opened.",
17570
- "fieldName": "delay"
17571
- }
17572
- ],
17573
- "superclass": {
17574
- "name": "LitElement",
17575
- "package": "lit"
17576
- },
17577
- "localization": [],
17578
- "status": "ready",
17579
- "category": "overlay",
17580
- "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 tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessibility.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n---\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, 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\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n---\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n",
17581
- "examples": [],
17582
- "dependencies": [],
17583
- "tagName": "nord-tooltip",
17584
- "customElement": true
17585
- }
17586
- ],
17587
- "exports": [
17588
- {
17589
- "kind": "js",
17590
- "name": "default",
17591
- "declaration": {
17592
- "name": "Tooltip",
17593
- "module": "src/tooltip/Tooltip.ts"
17594
- }
17595
- },
17596
- {
17597
- "kind": "custom-element-definition",
17598
- "name": "nord-tooltip",
17599
- "declaration": {
17600
- "name": "Tooltip",
17601
- "module": "src/tooltip/Tooltip.ts"
17602
- }
17603
- }
17604
- ]
17605
- },
17606
- {
17607
- "kind": "javascript-module",
17608
- "path": "src/toggle/Toggle.ts",
17609
- "declarations": [
17610
- {
17611
- "kind": "class",
17612
- "description": "Toggle switch gives control over a feature or option that can be\nturned on or off. If a physical switch would work for the action, a\ntoggle is probably the best component to use.",
17613
- "name": "Toggle",
17614
- "cssProperties": [
17615
- {
17616
- "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
17617
- "name": "--n-label-color",
17618
- "default": "var(--n-color-text)"
17619
- }
17620
- ],
17621
- "slots": [
17622
- {
17623
- "description": "Use when a label requires more than plain text.",
17624
- "name": "label"
17625
- },
17626
- {
17627
- "description": "Optional slot that holds hint text for the input.",
17628
- "name": "hint"
17629
- },
17630
- {
17631
- "description": "Optional slot that holds error text for the input.",
17632
- "name": "error"
17633
- }
17634
- ],
17635
- "members": [
17636
- {
17637
- "kind": "field",
17638
- "name": "formValue",
17617
+ "kind": "method",
17618
+ "name": "handleInput",
17639
17619
  "privacy": "protected",
17640
- "readonly": true,
17620
+ "parameters": [
17621
+ {
17622
+ "name": "e",
17623
+ "type": {
17624
+ "text": "Event"
17625
+ }
17626
+ }
17627
+ ],
17641
17628
  "inheritedFrom": {
17642
17629
  "name": "FormAssociatedMixin",
17643
17630
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17644
17631
  }
17645
17632
  },
17646
- {
17647
- "kind": "field",
17648
- "name": "checked",
17649
- "type": {
17650
- "text": "boolean"
17651
- },
17652
- "default": "false",
17653
- "description": "Controls whether the toggle is checked or not.",
17654
- "attribute": "checked",
17655
- "reflects": true
17656
- },
17657
- {
17658
- "kind": "field",
17659
- "name": "reverse",
17660
- "type": {
17661
- "text": "boolean"
17662
- },
17663
- "default": "false",
17664
- "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
17665
- "attribute": "reverse",
17666
- "reflects": true
17667
- },
17668
- {
17669
- "kind": "field",
17670
- "name": "size",
17671
- "type": {
17672
- "text": "\"s\" | \"m\" | \"l\""
17673
- },
17674
- "default": "\"m\"",
17675
- "description": "The size of the toggle switch.",
17676
- "attribute": "size",
17677
- "reflects": true
17678
- },
17679
17633
  {
17680
17634
  "kind": "method",
17681
- "name": "handleChange",
17635
+ "name": "renderLabel",
17682
17636
  "privacy": "protected",
17683
17637
  "parameters": [
17684
17638
  {
17685
- "name": "e",
17639
+ "name": "additionalContent",
17640
+ "optional": true,
17686
17641
  "type": {
17687
- "text": "Event"
17642
+ "text": "TemplateResult"
17688
17643
  }
17689
17644
  }
17690
17645
  ],
17691
- "return": {
17692
- "type": {
17693
- "text": "void"
17694
- }
17695
- },
17696
17646
  "inheritedFrom": {
17697
17647
  "name": "FormAssociatedMixin",
17698
17648
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17699
17649
  }
17700
17650
  },
17701
17651
  {
17702
- "kind": "field",
17703
- "name": "labelSlot",
17652
+ "kind": "method",
17653
+ "name": "renderError",
17704
17654
  "privacy": "protected",
17705
- "default": "new SlotController(this, \"label\")",
17706
17655
  "inheritedFrom": {
17707
17656
  "name": "FormAssociatedMixin",
17708
17657
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17709
17658
  }
17710
17659
  },
17711
17660
  {
17712
- "kind": "field",
17713
- "name": "errorSlot",
17661
+ "kind": "method",
17662
+ "name": "getDescribedBy",
17714
17663
  "privacy": "protected",
17715
- "default": "new SlotController(this, \"error\")",
17716
17664
  "inheritedFrom": {
17717
17665
  "name": "FormAssociatedMixin",
17718
17666
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17719
17667
  }
17720
17668
  },
17721
17669
  {
17722
- "kind": "field",
17723
- "name": "hintSlot",
17670
+ "kind": "method",
17671
+ "name": "getInvalid",
17724
17672
  "privacy": "protected",
17725
- "default": "new SlotController(this, \"hint\")",
17726
17673
  "inheritedFrom": {
17727
17674
  "name": "FormAssociatedMixin",
17728
17675
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -17730,9 +17677,9 @@
17730
17677
  },
17731
17678
  {
17732
17679
  "kind": "field",
17733
- "name": "formData",
17680
+ "name": "hasHint",
17734
17681
  "privacy": "protected",
17735
- "default": "new FormDataController(this, { value: () => this.formValue })",
17682
+ "readonly": true,
17736
17683
  "inheritedFrom": {
17737
17684
  "name": "FormAssociatedMixin",
17738
17685
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -17740,12 +17687,9 @@
17740
17687
  },
17741
17688
  {
17742
17689
  "kind": "field",
17743
- "name": "inputId",
17744
- "type": {
17745
- "text": "string"
17746
- },
17690
+ "name": "hasError",
17747
17691
  "privacy": "protected",
17748
- "default": "\"input\"",
17692
+ "readonly": true,
17749
17693
  "inheritedFrom": {
17750
17694
  "name": "FormAssociatedMixin",
17751
17695
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -17753,521 +17697,601 @@
17753
17697
  },
17754
17698
  {
17755
17699
  "kind": "field",
17756
- "name": "errorId",
17700
+ "name": "disabled",
17757
17701
  "type": {
17758
- "text": "string"
17702
+ "text": "boolean"
17759
17703
  },
17760
- "privacy": "protected",
17761
- "default": "\"error\"",
17704
+ "default": "false",
17705
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
17706
+ "attribute": "disabled",
17707
+ "reflects": true,
17762
17708
  "inheritedFrom": {
17763
- "name": "FormAssociatedMixin",
17764
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17709
+ "name": "InputMixin",
17710
+ "module": "src/common/mixins/InputMixin.ts"
17765
17711
  }
17766
17712
  },
17767
17713
  {
17768
17714
  "kind": "field",
17769
- "name": "hintId",
17715
+ "name": "name",
17770
17716
  "type": {
17771
- "text": "string"
17717
+ "text": "string | undefined"
17772
17718
  },
17773
- "privacy": "protected",
17774
- "default": "\"hint\"",
17719
+ "description": "The name of the form component.",
17720
+ "attribute": "name",
17721
+ "reflects": true,
17775
17722
  "inheritedFrom": {
17776
- "name": "FormAssociatedMixin",
17777
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17723
+ "name": "InputMixin",
17724
+ "module": "src/common/mixins/InputMixin.ts"
17778
17725
  }
17779
17726
  },
17780
17727
  {
17781
17728
  "kind": "field",
17782
- "name": "label",
17729
+ "name": "value",
17783
17730
  "type": {
17784
17731
  "text": "string"
17785
17732
  },
17786
17733
  "default": "\"\"",
17787
- "description": "Label for the input.",
17788
- "attribute": "label",
17789
- "reflects": true,
17734
+ "description": "The value of the form component.",
17735
+ "attribute": "value",
17790
17736
  "inheritedFrom": {
17791
- "name": "FormAssociatedMixin",
17792
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17737
+ "name": "InputMixin",
17738
+ "module": "src/common/mixins/InputMixin.ts"
17793
17739
  }
17794
17740
  },
17795
17741
  {
17796
17742
  "kind": "field",
17797
- "name": "hint",
17743
+ "name": "formAncestor",
17798
17744
  "type": {
17799
- "text": "string | undefined"
17745
+ "text": "HTMLFormElement | null"
17800
17746
  },
17801
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
17802
- "attribute": "hint",
17803
- "reflects": true,
17747
+ "privacy": "private",
17748
+ "default": "null",
17804
17749
  "inheritedFrom": {
17805
- "name": "FormAssociatedMixin",
17806
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17750
+ "name": "InputMixin",
17751
+ "module": "src/common/mixins/InputMixin.ts"
17807
17752
  }
17808
17753
  },
17809
17754
  {
17810
17755
  "kind": "field",
17811
- "name": "hideLabel",
17756
+ "name": "_formId",
17812
17757
  "type": {
17813
- "text": "boolean"
17758
+ "text": "string | undefined"
17814
17759
  },
17815
- "default": "false",
17816
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
17817
- "attribute": "hide-label",
17818
- "reflects": true,
17760
+ "privacy": "protected",
17819
17761
  "inheritedFrom": {
17820
- "name": "FormAssociatedMixin",
17821
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17762
+ "name": "InputMixin",
17763
+ "module": "src/common/mixins/InputMixin.ts"
17822
17764
  }
17823
17765
  },
17824
17766
  {
17825
17767
  "kind": "field",
17826
- "name": "placeholder",
17768
+ "name": "form",
17827
17769
  "type": {
17828
- "text": "string | undefined"
17770
+ "text": "HTMLFormElement | null"
17829
17771
  },
17830
- "description": "Placeholder text to display within the input.",
17831
- "attribute": "placeholder",
17832
- "reflects": true,
17772
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
17773
+ "attribute": "form",
17833
17774
  "inheritedFrom": {
17834
- "name": "FormAssociatedMixin",
17835
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17775
+ "name": "InputMixin",
17776
+ "module": "src/common/mixins/InputMixin.ts"
17836
17777
  }
17837
17778
  },
17838
17779
  {
17839
17780
  "kind": "field",
17840
- "name": "error",
17841
- "type": {
17842
- "text": "string | undefined"
17843
- },
17844
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
17845
- "attribute": "error",
17846
- "reflects": true,
17781
+ "name": "focusableRef",
17782
+ "privacy": "protected",
17847
17783
  "inheritedFrom": {
17848
- "name": "FormAssociatedMixin",
17849
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17784
+ "name": "FocusableMixin",
17785
+ "module": "src/common/mixins/FocusableMixin.ts"
17850
17786
  }
17851
17787
  },
17852
17788
  {
17853
- "kind": "field",
17854
- "name": "required",
17789
+ "kind": "method",
17790
+ "name": "focus",
17791
+ "parameters": [
17792
+ {
17793
+ "name": "options",
17794
+ "optional": true,
17795
+ "type": {
17796
+ "text": "FocusOptions"
17797
+ },
17798
+ "description": "An object which controls aspects of the focusing process."
17799
+ }
17800
+ ],
17801
+ "description": "Programmatically move focus to the component.",
17802
+ "inheritedFrom": {
17803
+ "name": "FocusableMixin",
17804
+ "module": "src/common/mixins/FocusableMixin.ts"
17805
+ }
17806
+ },
17807
+ {
17808
+ "kind": "method",
17809
+ "name": "blur",
17810
+ "description": "Programmatically remove focus from the component.",
17811
+ "inheritedFrom": {
17812
+ "name": "FocusableMixin",
17813
+ "module": "src/common/mixins/FocusableMixin.ts"
17814
+ }
17815
+ },
17816
+ {
17817
+ "kind": "method",
17818
+ "name": "click",
17819
+ "description": "Programmatically simulates a click on the component.",
17820
+ "inheritedFrom": {
17821
+ "name": "FocusableMixin",
17822
+ "module": "src/common/mixins/FocusableMixin.ts"
17823
+ }
17824
+ }
17825
+ ],
17826
+ "attributes": [
17827
+ {
17828
+ "name": "checked",
17855
17829
  "type": {
17856
17830
  "text": "boolean"
17857
17831
  },
17858
17832
  "default": "false",
17859
- "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
17860
- "attribute": "required",
17861
- "reflects": true,
17862
- "inheritedFrom": {
17863
- "name": "FormAssociatedMixin",
17864
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17865
- }
17833
+ "description": "Controls whether the toggle is checked or not.",
17834
+ "fieldName": "checked"
17866
17835
  },
17867
17836
  {
17868
- "kind": "field",
17869
- "name": "hideRequired",
17837
+ "name": "reverse",
17870
17838
  "type": {
17871
17839
  "text": "boolean"
17872
17840
  },
17873
17841
  "default": "false",
17874
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
17875
- "attribute": "hide-required",
17876
- "reflects": true,
17877
- "inheritedFrom": {
17878
- "name": "FormAssociatedMixin",
17879
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17880
- }
17842
+ "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
17843
+ "fieldName": "reverse"
17881
17844
  },
17882
17845
  {
17883
- "kind": "method",
17884
- "name": "handleInput",
17885
- "privacy": "protected",
17886
- "parameters": [
17887
- {
17888
- "name": "e",
17889
- "type": {
17890
- "text": "Event"
17891
- }
17892
- }
17893
- ],
17846
+ "name": "size",
17847
+ "type": {
17848
+ "text": "\"s\" | \"m\" | \"l\""
17849
+ },
17850
+ "default": "\"m\"",
17851
+ "description": "The size of the toggle switch.",
17852
+ "fieldName": "size"
17853
+ },
17854
+ {
17855
+ "name": "label",
17856
+ "type": {
17857
+ "text": "string"
17858
+ },
17859
+ "default": "\"\"",
17860
+ "description": "Label for the input.",
17861
+ "fieldName": "label",
17894
17862
  "inheritedFrom": {
17895
17863
  "name": "FormAssociatedMixin",
17896
17864
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17897
17865
  }
17898
17866
  },
17899
17867
  {
17900
- "kind": "method",
17901
- "name": "renderLabel",
17902
- "privacy": "protected",
17903
- "parameters": [
17904
- {
17905
- "name": "additionalContent",
17906
- "optional": true,
17907
- "type": {
17908
- "text": "TemplateResult"
17909
- }
17910
- }
17911
- ],
17868
+ "name": "hint",
17869
+ "type": {
17870
+ "text": "string | undefined"
17871
+ },
17872
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
17873
+ "fieldName": "hint",
17912
17874
  "inheritedFrom": {
17913
17875
  "name": "FormAssociatedMixin",
17914
17876
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17915
17877
  }
17916
17878
  },
17917
17879
  {
17918
- "kind": "method",
17919
- "name": "renderError",
17920
- "privacy": "protected",
17880
+ "name": "hide-label",
17881
+ "type": {
17882
+ "text": "boolean"
17883
+ },
17884
+ "default": "false",
17885
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
17886
+ "fieldName": "hideLabel",
17921
17887
  "inheritedFrom": {
17922
17888
  "name": "FormAssociatedMixin",
17923
17889
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17924
17890
  }
17925
17891
  },
17926
17892
  {
17927
- "kind": "method",
17928
- "name": "getDescribedBy",
17929
- "privacy": "protected",
17893
+ "name": "placeholder",
17894
+ "type": {
17895
+ "text": "string | undefined"
17896
+ },
17897
+ "description": "Placeholder text to display within the input.",
17898
+ "fieldName": "placeholder",
17930
17899
  "inheritedFrom": {
17931
17900
  "name": "FormAssociatedMixin",
17932
17901
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17933
17902
  }
17934
17903
  },
17935
17904
  {
17936
- "kind": "method",
17937
- "name": "getInvalid",
17938
- "privacy": "protected",
17905
+ "name": "error",
17906
+ "type": {
17907
+ "text": "string | undefined"
17908
+ },
17909
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
17910
+ "fieldName": "error",
17939
17911
  "inheritedFrom": {
17940
17912
  "name": "FormAssociatedMixin",
17941
17913
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17942
17914
  }
17943
17915
  },
17944
17916
  {
17945
- "kind": "field",
17946
- "name": "hasHint",
17947
- "privacy": "protected",
17948
- "readonly": true,
17917
+ "name": "required",
17918
+ "type": {
17919
+ "text": "boolean"
17920
+ },
17921
+ "default": "false",
17922
+ "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
17923
+ "fieldName": "required",
17949
17924
  "inheritedFrom": {
17950
17925
  "name": "FormAssociatedMixin",
17951
17926
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17952
17927
  }
17953
17928
  },
17954
17929
  {
17955
- "kind": "field",
17956
- "name": "hasError",
17957
- "privacy": "protected",
17958
- "readonly": true,
17930
+ "name": "hide-required",
17931
+ "type": {
17932
+ "text": "boolean"
17933
+ },
17934
+ "default": "false",
17935
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
17936
+ "fieldName": "hideRequired",
17959
17937
  "inheritedFrom": {
17960
17938
  "name": "FormAssociatedMixin",
17961
17939
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17962
17940
  }
17963
17941
  },
17964
17942
  {
17965
- "kind": "field",
17966
17943
  "name": "disabled",
17967
17944
  "type": {
17968
17945
  "text": "boolean"
17969
17946
  },
17970
17947
  "default": "false",
17971
17948
  "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
17972
- "attribute": "disabled",
17973
- "reflects": true,
17949
+ "fieldName": "disabled",
17974
17950
  "inheritedFrom": {
17975
17951
  "name": "InputMixin",
17976
17952
  "module": "src/common/mixins/InputMixin.ts"
17977
17953
  }
17978
17954
  },
17979
17955
  {
17980
- "kind": "field",
17981
17956
  "name": "name",
17982
17957
  "type": {
17983
17958
  "text": "string | undefined"
17984
17959
  },
17985
17960
  "description": "The name of the form component.",
17986
- "attribute": "name",
17987
- "reflects": true,
17961
+ "fieldName": "name",
17988
17962
  "inheritedFrom": {
17989
17963
  "name": "InputMixin",
17990
17964
  "module": "src/common/mixins/InputMixin.ts"
17991
17965
  }
17992
17966
  },
17993
17967
  {
17994
- "kind": "field",
17995
17968
  "name": "value",
17996
17969
  "type": {
17997
17970
  "text": "string"
17998
17971
  },
17999
17972
  "default": "\"\"",
18000
17973
  "description": "The value of the form component.",
18001
- "attribute": "value",
17974
+ "fieldName": "value",
18002
17975
  "inheritedFrom": {
18003
17976
  "name": "InputMixin",
18004
17977
  "module": "src/common/mixins/InputMixin.ts"
18005
17978
  }
18006
17979
  },
18007
17980
  {
18008
- "kind": "field",
18009
- "name": "formAncestor",
17981
+ "name": "form",
18010
17982
  "type": {
18011
17983
  "text": "HTMLFormElement | null"
18012
17984
  },
18013
- "privacy": "private",
18014
- "default": "null",
17985
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
17986
+ "fieldName": "form",
18015
17987
  "inheritedFrom": {
18016
17988
  "name": "InputMixin",
18017
17989
  "module": "src/common/mixins/InputMixin.ts"
18018
17990
  }
17991
+ }
17992
+ ],
17993
+ "mixins": [
17994
+ {
17995
+ "name": "FormAssociatedMixin",
17996
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
18019
17997
  },
18020
17998
  {
18021
- "kind": "field",
18022
- "name": "_formId",
17999
+ "name": "InputMixin",
18000
+ "module": "/src/common/mixins/InputMixin.js"
18001
+ },
18002
+ {
18003
+ "name": "FocusableMixin",
18004
+ "module": "/src/common/mixins/FocusableMixin.js"
18005
+ }
18006
+ ],
18007
+ "superclass": {
18008
+ "name": "LitElement",
18009
+ "package": "lit"
18010
+ },
18011
+ "localization": [],
18012
+ "status": "ready",
18013
+ "category": "form",
18014
+ "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 toggles when your intent is to turn something on or off instantly.\n- Use for any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Toggles should never require users to click a button to apply or save the setting.\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\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 toggle 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\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</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\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
18015
+ "examples": [],
18016
+ "dependencies": [],
18017
+ "tagName": "nord-toggle",
18018
+ "customElement": true,
18019
+ "events": [
18020
+ {
18021
+ "name": "input",
18023
18022
  "type": {
18024
- "text": "string | undefined"
18023
+ "text": "NordEvent"
18025
18024
  },
18026
- "privacy": "protected",
18025
+ "description": "Fired as the user types into the input.",
18027
18026
  "inheritedFrom": {
18028
- "name": "InputMixin",
18029
- "module": "src/common/mixins/InputMixin.ts"
18027
+ "name": "FormAssociatedMixin",
18028
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
18030
18029
  }
18031
18030
  },
18032
18031
  {
18033
- "kind": "field",
18034
- "name": "form",
18032
+ "name": "change",
18035
18033
  "type": {
18036
- "text": "HTMLFormElement | null"
18034
+ "text": "NordEvent"
18037
18035
  },
18038
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
18039
- "attribute": "form",
18036
+ "description": "Fired whenever the input's value is changed via user interaction.",
18040
18037
  "inheritedFrom": {
18041
- "name": "InputMixin",
18042
- "module": "src/common/mixins/InputMixin.ts"
18038
+ "name": "FormAssociatedMixin",
18039
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
18043
18040
  }
18041
+ }
18042
+ ]
18043
+ }
18044
+ ],
18045
+ "exports": [
18046
+ {
18047
+ "kind": "js",
18048
+ "name": "default",
18049
+ "declaration": {
18050
+ "name": "Toggle",
18051
+ "module": "src/toggle/Toggle.ts"
18052
+ }
18053
+ },
18054
+ {
18055
+ "kind": "custom-element-definition",
18056
+ "name": "nord-toggle",
18057
+ "declaration": {
18058
+ "name": "Toggle",
18059
+ "module": "src/toggle/Toggle.ts"
18060
+ }
18061
+ }
18062
+ ]
18063
+ },
18064
+ {
18065
+ "kind": "javascript-module",
18066
+ "path": "src/tooltip/Tooltip.ts",
18067
+ "declarations": [
18068
+ {
18069
+ "kind": "class",
18070
+ "description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
18071
+ "name": "Tooltip",
18072
+ "cssProperties": [
18073
+ {
18074
+ "description": "Controls the maximum inline size, or width, of the tooltip.",
18075
+ "name": "--n-tooltip-max-size",
18076
+ "default": "50ch"
18077
+ }
18078
+ ],
18079
+ "slots": [
18080
+ {
18081
+ "description": "The tooltip content",
18082
+ "name": ""
18044
18083
  },
18084
+ {
18085
+ "description": "Optional slot that holds shortcut keys to access the subject",
18086
+ "name": "shortcut"
18087
+ }
18088
+ ],
18089
+ "members": [
18045
18090
  {
18046
18091
  "kind": "field",
18047
- "name": "focusableRef",
18048
- "privacy": "protected",
18049
- "inheritedFrom": {
18050
- "name": "FocusableMixin",
18051
- "module": "src/common/mixins/FocusableMixin.ts"
18052
- }
18092
+ "name": "lastOpened",
18093
+ "type": {
18094
+ "text": "Tooltip | undefined"
18095
+ },
18096
+ "privacy": "private",
18097
+ "static": true
18053
18098
  },
18054
18099
  {
18055
- "kind": "method",
18056
- "name": "focus",
18057
- "parameters": [
18058
- {
18059
- "name": "options",
18060
- "optional": true,
18061
- "type": {
18062
- "text": "FocusOptions"
18063
- },
18064
- "description": "An object which controls aspects of the focusing process."
18065
- }
18066
- ],
18067
- "description": "Programmatically move focus to the component.",
18068
- "inheritedFrom": {
18069
- "name": "FocusableMixin",
18070
- "module": "src/common/mixins/FocusableMixin.ts"
18071
- }
18100
+ "kind": "field",
18101
+ "name": "shortcutSlot",
18102
+ "privacy": "private",
18103
+ "default": "new SlotController(this, \"shortcut\")"
18072
18104
  },
18073
18105
  {
18074
- "kind": "method",
18075
- "name": "blur",
18076
- "description": "Programmatically remove focus from the component.",
18077
- "inheritedFrom": {
18078
- "name": "FocusableMixin",
18079
- "module": "src/common/mixins/FocusableMixin.ts"
18080
- }
18106
+ "kind": "field",
18107
+ "name": "events",
18108
+ "privacy": "private",
18109
+ "default": "new EventController(this)"
18081
18110
  },
18082
18111
  {
18083
- "kind": "method",
18084
- "name": "click",
18085
- "description": "Programmatically simulates a click on the component.",
18086
- "inheritedFrom": {
18087
- "name": "FocusableMixin",
18088
- "module": "src/common/mixins/FocusableMixin.ts"
18089
- }
18090
- }
18091
- ],
18092
- "attributes": [
18112
+ "kind": "field",
18113
+ "name": "currentElement",
18114
+ "type": {
18115
+ "text": "FocusableElement | undefined"
18116
+ },
18117
+ "privacy": "private"
18118
+ },
18093
18119
  {
18094
- "name": "checked",
18120
+ "kind": "field",
18121
+ "name": "timeoutId",
18095
18122
  "type": {
18096
- "text": "boolean"
18123
+ "text": "ReturnType<typeof setTimeout> | undefined"
18097
18124
  },
18098
- "default": "false",
18099
- "description": "Controls whether the toggle is checked or not.",
18100
- "fieldName": "checked"
18125
+ "privacy": "private"
18101
18126
  },
18102
18127
  {
18103
- "name": "reverse",
18128
+ "kind": "field",
18129
+ "name": "proxy",
18104
18130
  "type": {
18105
- "text": "boolean"
18131
+ "text": "HTMLSpanElement | undefined"
18106
18132
  },
18107
- "default": "false",
18108
- "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
18109
- "fieldName": "reverse"
18133
+ "privacy": "private",
18134
+ "description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
18110
18135
  },
18111
18136
  {
18112
- "name": "size",
18137
+ "kind": "field",
18138
+ "name": "state",
18113
18139
  "type": {
18114
- "text": "\"s\" | \"m\" | \"l\""
18140
+ "text": "TooltipStates"
18115
18141
  },
18116
- "default": "\"m\"",
18117
- "description": "The size of the toggle switch.",
18118
- "fieldName": "size"
18142
+ "privacy": "private",
18143
+ "default": "\"hidden\"",
18144
+ "description": "The current state of the tooltip, dependent on the state machine"
18119
18145
  },
18120
18146
  {
18121
- "name": "label",
18147
+ "kind": "field",
18148
+ "name": "coords",
18149
+ "type": {
18150
+ "text": "[number, number]"
18151
+ },
18152
+ "privacy": "private",
18153
+ "default": "[0, 0]"
18154
+ },
18155
+ {
18156
+ "kind": "field",
18157
+ "name": "position",
18158
+ "type": {
18159
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
18160
+ },
18161
+ "default": "\"block-start\"",
18162
+ "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
18163
+ "attribute": "position",
18164
+ "reflects": true
18165
+ },
18166
+ {
18167
+ "kind": "field",
18168
+ "name": "role",
18169
+ "type": {
18170
+ "text": "string"
18171
+ },
18172
+ "default": "\"tooltip\"",
18173
+ "description": "The tooltip role, set on the component by default.",
18174
+ "attribute": "role",
18175
+ "reflects": true
18176
+ },
18177
+ {
18178
+ "kind": "field",
18179
+ "name": "id",
18122
18180
  "type": {
18123
18181
  "text": "string"
18124
18182
  },
18125
18183
  "default": "\"\"",
18126
- "description": "Label for the input.",
18127
- "fieldName": "label",
18128
- "inheritedFrom": {
18129
- "name": "FormAssociatedMixin",
18130
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18131
- }
18184
+ "description": "The id for the active element to reference via aria-describedby.",
18185
+ "attribute": "id",
18186
+ "reflects": true
18187
+ },
18188
+ {
18189
+ "kind": "field",
18190
+ "name": "delay",
18191
+ "type": {
18192
+ "text": "number"
18193
+ },
18194
+ "default": "500",
18195
+ "description": "The delay in milliseconds before the tooltip is opened.",
18196
+ "attribute": "delay",
18197
+ "reflects": true
18198
+ },
18199
+ {
18200
+ "kind": "method",
18201
+ "name": "handleIdChange",
18202
+ "privacy": "protected"
18203
+ },
18204
+ {
18205
+ "kind": "method",
18206
+ "name": "handleStateChange",
18207
+ "privacy": "private",
18208
+ "parameters": [
18209
+ {
18210
+ "name": "prevState",
18211
+ "type": {
18212
+ "text": "TooltipStates"
18213
+ }
18214
+ }
18215
+ ]
18132
18216
  },
18133
18217
  {
18134
- "name": "hint",
18135
- "type": {
18136
- "text": "string | undefined"
18137
- },
18138
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
18139
- "fieldName": "hint",
18140
- "inheritedFrom": {
18141
- "name": "FormAssociatedMixin",
18142
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18143
- }
18218
+ "kind": "field",
18219
+ "name": "updatePosition",
18220
+ "privacy": "private",
18221
+ "description": "Setting and updating the position of the tooltip"
18144
18222
  },
18145
18223
  {
18146
- "name": "hide-label",
18147
- "type": {
18148
- "text": "boolean"
18149
- },
18150
- "default": "false",
18151
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
18152
- "fieldName": "hideLabel",
18153
- "inheritedFrom": {
18154
- "name": "FormAssociatedMixin",
18155
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18156
- }
18224
+ "kind": "field",
18225
+ "name": "hideTooltip",
18226
+ "privacy": "private"
18157
18227
  },
18158
18228
  {
18159
- "name": "placeholder",
18160
- "type": {
18161
- "text": "string | undefined"
18162
- },
18163
- "description": "Placeholder text to display within the input.",
18164
- "fieldName": "placeholder",
18165
- "inheritedFrom": {
18166
- "name": "FormAssociatedMixin",
18167
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18168
- }
18229
+ "kind": "field",
18230
+ "name": "reposition",
18231
+ "privacy": "private"
18169
18232
  },
18170
18233
  {
18171
- "name": "error",
18172
- "type": {
18173
- "text": "string | undefined"
18174
- },
18175
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
18176
- "fieldName": "error",
18177
- "inheritedFrom": {
18178
- "name": "FormAssociatedMixin",
18179
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18180
- }
18234
+ "kind": "field",
18235
+ "name": "handleShow",
18236
+ "privacy": "private"
18181
18237
  },
18182
18238
  {
18183
- "name": "required",
18184
- "type": {
18185
- "text": "boolean"
18186
- },
18187
- "default": "false",
18188
- "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
18189
- "fieldName": "required",
18190
- "inheritedFrom": {
18191
- "name": "FormAssociatedMixin",
18192
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18193
- }
18239
+ "kind": "field",
18240
+ "name": "handleHide",
18241
+ "privacy": "private"
18194
18242
  },
18195
18243
  {
18196
- "name": "hide-required",
18197
- "type": {
18198
- "text": "boolean"
18199
- },
18200
- "default": "false",
18201
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
18202
- "fieldName": "hideRequired",
18203
- "inheritedFrom": {
18204
- "name": "FormAssociatedMixin",
18205
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18206
- }
18244
+ "kind": "field",
18245
+ "name": "hideOnEscape",
18246
+ "privacy": "private"
18207
18247
  },
18208
18248
  {
18209
- "name": "disabled",
18249
+ "kind": "field",
18250
+ "name": "addDescribedBy",
18251
+ "privacy": "private"
18252
+ },
18253
+ {
18254
+ "kind": "field",
18255
+ "name": "removeDescribedBy",
18256
+ "privacy": "private"
18257
+ }
18258
+ ],
18259
+ "attributes": [
18260
+ {
18261
+ "name": "position",
18210
18262
  "type": {
18211
- "text": "boolean"
18263
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
18212
18264
  },
18213
- "default": "false",
18214
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
18215
- "fieldName": "disabled",
18216
- "inheritedFrom": {
18217
- "name": "InputMixin",
18218
- "module": "src/common/mixins/InputMixin.ts"
18219
- }
18265
+ "default": "\"block-start\"",
18266
+ "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
18267
+ "fieldName": "position"
18220
18268
  },
18221
18269
  {
18222
- "name": "name",
18270
+ "name": "role",
18223
18271
  "type": {
18224
- "text": "string | undefined"
18272
+ "text": "string"
18225
18273
  },
18226
- "description": "The name of the form component.",
18227
- "fieldName": "name",
18228
- "inheritedFrom": {
18229
- "name": "InputMixin",
18230
- "module": "src/common/mixins/InputMixin.ts"
18231
- }
18274
+ "default": "\"tooltip\"",
18275
+ "description": "The tooltip role, set on the component by default.",
18276
+ "fieldName": "role"
18232
18277
  },
18233
18278
  {
18234
- "name": "value",
18279
+ "name": "id",
18235
18280
  "type": {
18236
18281
  "text": "string"
18237
18282
  },
18238
18283
  "default": "\"\"",
18239
- "description": "The value of the form component.",
18240
- "fieldName": "value",
18241
- "inheritedFrom": {
18242
- "name": "InputMixin",
18243
- "module": "src/common/mixins/InputMixin.ts"
18244
- }
18284
+ "description": "The id for the active element to reference via aria-describedby.",
18285
+ "fieldName": "id"
18245
18286
  },
18246
18287
  {
18247
- "name": "form",
18288
+ "name": "delay",
18248
18289
  "type": {
18249
- "text": "HTMLFormElement | null"
18290
+ "text": "number"
18250
18291
  },
18251
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
18252
- "fieldName": "form",
18253
- "inheritedFrom": {
18254
- "name": "InputMixin",
18255
- "module": "src/common/mixins/InputMixin.ts"
18256
- }
18257
- }
18258
- ],
18259
- "mixins": [
18260
- {
18261
- "name": "FormAssociatedMixin",
18262
- "module": "/src/common/mixins/FormAssociatedMixin.js"
18263
- },
18264
- {
18265
- "name": "InputMixin",
18266
- "module": "/src/common/mixins/InputMixin.js"
18267
- },
18268
- {
18269
- "name": "FocusableMixin",
18270
- "module": "/src/common/mixins/FocusableMixin.js"
18292
+ "default": "500",
18293
+ "description": "The delay in milliseconds before the tooltip is opened.",
18294
+ "fieldName": "delay"
18271
18295
  }
18272
18296
  ],
18273
18297
  "superclass": {
@@ -18276,36 +18300,12 @@
18276
18300
  },
18277
18301
  "localization": [],
18278
18302
  "status": "ready",
18279
- "category": "form",
18280
- "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 toggles when your intent is to turn something on or off instantly.\n- Use for any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Toggles should never require users to click a button to apply or save the setting.\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\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 toggle 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\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</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\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
18303
+ "category": "overlay",
18304
+ "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 tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessibility.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n---\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, 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\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n---\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n",
18281
18305
  "examples": [],
18282
18306
  "dependencies": [],
18283
- "tagName": "nord-toggle",
18284
- "customElement": true,
18285
- "events": [
18286
- {
18287
- "name": "input",
18288
- "type": {
18289
- "text": "NordEvent"
18290
- },
18291
- "description": "Fired as the user types into the input.",
18292
- "inheritedFrom": {
18293
- "name": "FormAssociatedMixin",
18294
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18295
- }
18296
- },
18297
- {
18298
- "name": "change",
18299
- "type": {
18300
- "text": "NordEvent"
18301
- },
18302
- "description": "Fired whenever the input's value is changed via user interaction.",
18303
- "inheritedFrom": {
18304
- "name": "FormAssociatedMixin",
18305
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18306
- }
18307
- }
18308
- ]
18307
+ "tagName": "nord-tooltip",
18308
+ "customElement": true
18309
18309
  }
18310
18310
  ],
18311
18311
  "exports": [
@@ -18313,32 +18313,36 @@
18313
18313
  "kind": "js",
18314
18314
  "name": "default",
18315
18315
  "declaration": {
18316
- "name": "Toggle",
18317
- "module": "src/toggle/Toggle.ts"
18316
+ "name": "Tooltip",
18317
+ "module": "src/tooltip/Tooltip.ts"
18318
18318
  }
18319
18319
  },
18320
18320
  {
18321
18321
  "kind": "custom-element-definition",
18322
- "name": "nord-toggle",
18322
+ "name": "nord-tooltip",
18323
18323
  "declaration": {
18324
- "name": "Toggle",
18325
- "module": "src/toggle/Toggle.ts"
18324
+ "name": "Tooltip",
18325
+ "module": "src/tooltip/Tooltip.ts"
18326
18326
  }
18327
18327
  }
18328
18328
  ]
18329
18329
  },
18330
18330
  {
18331
18331
  "kind": "javascript-module",
18332
- "path": "src/visually-hidden/VisuallyHidden.ts",
18332
+ "path": "src/top-bar/TopBar.ts",
18333
18333
  "declarations": [
18334
18334
  {
18335
18335
  "kind": "class",
18336
- "description": "Visually hidden is used when an element needs to be available\nto assistive technologies like screen readers, but be otherwise\nhidden.",
18337
- "name": "VisuallyHidden",
18336
+ "description": "Top bar is a header component that is always visible at the top of the interface. Top bar allows functionality such as search and contextual menus to be placed at the top of the interface.",
18337
+ "name": "TopBar",
18338
18338
  "slots": [
18339
18339
  {
18340
- "description": "The visually hidden content.",
18340
+ "description": "Used for the main content of the top bar. We recommend placing your application’s global search functionality into this slot.",
18341
18341
  "name": ""
18342
+ },
18343
+ {
18344
+ "description": "Optional slot for menus, buttons, toggles, etc.",
18345
+ "name": "end"
18342
18346
  }
18343
18347
  ],
18344
18348
  "members": [],
@@ -18348,11 +18352,11 @@
18348
18352
  },
18349
18353
  "localization": [],
18350
18354
  "status": "ready",
18351
- "category": "text",
18352
- "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 to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n",
18355
+ "category": "structure",
18356
+ "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- Applications that utilize the top bar can allow users to customize the color of the top bar to match their preference. [View an example](/components/top-bar/?example=color).\n- If your application allows it, include search to help users find resources and navigate.\n- Include a user menu in the end slot of the top bar.\n- Use the [layout component](/components/layout/?example=top-bar) to provide structure for the top bar component. We’ve also created [an example which shows full theming capabilities](/components/layout/?example=theming).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for global navigation. Use the [navigation component](/components/navigation/) instead.\n- Don’t allow the user to set a top bar color that doesn’t provide enough contrast with the content.\n- Don’t allow the user to freely pick a hex code as the top bar color. Instead, offer a choice from a predefined palette of colors which provides sufficient contrast with the content. [View an example](/components/top-bar/?example=color).\n\n</div>\n\n---\n\n## Theming\n\nPlease see the [Top Bar theming](/themes/#top-bar-theming) section in our theming documentation for detailed guidelines.\n\n<nord-button variant=\"primary\" href=\"/themes/#top-bar-theming\">Theming Guidelines</nord-button>\n",
18353
18357
  "examples": [],
18354
18358
  "dependencies": [],
18355
- "tagName": "nord-visually-hidden",
18359
+ "tagName": "nord-top-bar",
18356
18360
  "customElement": true
18357
18361
  }
18358
18362
  ],
@@ -18361,36 +18365,32 @@
18361
18365
  "kind": "js",
18362
18366
  "name": "default",
18363
18367
  "declaration": {
18364
- "name": "VisuallyHidden",
18365
- "module": "src/visually-hidden/VisuallyHidden.ts"
18368
+ "name": "TopBar",
18369
+ "module": "src/top-bar/TopBar.ts"
18366
18370
  }
18367
18371
  },
18368
18372
  {
18369
18373
  "kind": "custom-element-definition",
18370
- "name": "nord-visually-hidden",
18374
+ "name": "nord-top-bar",
18371
18375
  "declaration": {
18372
- "name": "VisuallyHidden",
18373
- "module": "src/visually-hidden/VisuallyHidden.ts"
18376
+ "name": "TopBar",
18377
+ "module": "src/top-bar/TopBar.ts"
18374
18378
  }
18375
18379
  }
18376
18380
  ]
18377
18381
  },
18378
18382
  {
18379
18383
  "kind": "javascript-module",
18380
- "path": "src/top-bar/TopBar.ts",
18384
+ "path": "src/visually-hidden/VisuallyHidden.ts",
18381
18385
  "declarations": [
18382
18386
  {
18383
18387
  "kind": "class",
18384
- "description": "Top bar is a header component that is always visible at the top of the interface. Top bar allows functionality such as search and contextual menus to be placed at the top of the interface.",
18385
- "name": "TopBar",
18388
+ "description": "Visually hidden is used when an element needs to be available\nto assistive technologies like screen readers, but be otherwise\nhidden.",
18389
+ "name": "VisuallyHidden",
18386
18390
  "slots": [
18387
18391
  {
18388
- "description": "Used for the main content of the top bar. We recommend placing your application’s global search functionality into this slot.",
18392
+ "description": "The visually hidden content.",
18389
18393
  "name": ""
18390
- },
18391
- {
18392
- "description": "Optional slot for menus, buttons, toggles, etc.",
18393
- "name": "end"
18394
18394
  }
18395
18395
  ],
18396
18396
  "members": [],
@@ -18400,11 +18400,11 @@
18400
18400
  },
18401
18401
  "localization": [],
18402
18402
  "status": "ready",
18403
- "category": "structure",
18404
- "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- Applications that utilize the top bar can allow users to customize the color of the top bar to match their preference. [View an example](/components/top-bar/?example=color).\n- If your application allows it, include search to help users find resources and navigate.\n- Include a user menu in the end slot of the top bar.\n- Use the [layout component](/components/layout/?example=top-bar) to provide structure for the top bar component. We’ve also created [an example which shows full theming capabilities](/components/layout/?example=theming).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for global navigation. Use the [navigation component](/components/navigation/) instead.\n- Don’t allow the user to set a top bar color that doesn’t provide enough contrast with the content.\n- Don’t allow the user to freely pick a hex code as the top bar color. Instead, offer a choice from a predefined palette of colors which provides sufficient contrast with the content. [View an example](/components/top-bar/?example=color).\n\n</div>\n\n---\n\n## Theming\n\nPlease see the [Top Bar theming](/themes/#top-bar-theming) section in our theming documentation for detailed guidelines.\n\n<nord-button variant=\"primary\" href=\"/themes/#top-bar-theming\">Theming Guidelines</nord-button>\n",
18403
+ "category": "text",
18404
+ "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 to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n",
18405
18405
  "examples": [],
18406
18406
  "dependencies": [],
18407
- "tagName": "nord-top-bar",
18407
+ "tagName": "nord-visually-hidden",
18408
18408
  "customElement": true
18409
18409
  }
18410
18410
  ],
@@ -18413,16 +18413,16 @@
18413
18413
  "kind": "js",
18414
18414
  "name": "default",
18415
18415
  "declaration": {
18416
- "name": "TopBar",
18417
- "module": "src/top-bar/TopBar.ts"
18416
+ "name": "VisuallyHidden",
18417
+ "module": "src/visually-hidden/VisuallyHidden.ts"
18418
18418
  }
18419
18419
  },
18420
18420
  {
18421
18421
  "kind": "custom-element-definition",
18422
- "name": "nord-top-bar",
18422
+ "name": "nord-visually-hidden",
18423
18423
  "declaration": {
18424
- "name": "TopBar",
18425
- "module": "src/top-bar/TopBar.ts"
18424
+ "name": "VisuallyHidden",
18425
+ "module": "src/visually-hidden/VisuallyHidden.ts"
18426
18426
  }
18427
18427
  }
18428
18428
  ]