@nordhealth/components 3.15.0 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1481,161 +1481,6 @@
1481
1481
  }
1482
1482
  ]
1483
1483
  },
1484
- {
1485
- "kind": "javascript-module",
1486
- "path": "src/button-group/ButtonGroup.ts",
1487
- "declarations": [
1488
- {
1489
- "kind": "class",
1490
- "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
1491
- "name": "ButtonGroup",
1492
- "cssProperties": [
1493
- {
1494
- "description": "Controls the rounded corners of the button group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
1495
- "name": "--n-button-group-border-radius",
1496
- "default": "var(--n-border-radius-s)"
1497
- },
1498
- {
1499
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
1500
- "name": "--n-button-group-box-shadow",
1501
- "default": "var(--n-box-shadow)"
1502
- }
1503
- ],
1504
- "slots": [
1505
- {
1506
- "description": "The button group content",
1507
- "name": ""
1508
- }
1509
- ],
1510
- "members": [
1511
- {
1512
- "kind": "field",
1513
- "name": "defaultSlot",
1514
- "privacy": "private",
1515
- "default": "new SlotController(this)"
1516
- },
1517
- {
1518
- "kind": "field",
1519
- "name": "dirController",
1520
- "privacy": "private",
1521
- "default": "new DirectionController(this)"
1522
- },
1523
- {
1524
- "kind": "field",
1525
- "name": "variant",
1526
- "type": {
1527
- "text": "\"default\" | \"spaced\""
1528
- },
1529
- "default": "\"default\"",
1530
- "description": "The style variant of the button group.",
1531
- "attribute": "variant",
1532
- "reflects": true
1533
- },
1534
- {
1535
- "kind": "field",
1536
- "name": "direction",
1537
- "type": {
1538
- "text": "\"vertical\" | \"horizontal\""
1539
- },
1540
- "default": "\"horizontal\"",
1541
- "description": "The direction of the button group.",
1542
- "attribute": "direction",
1543
- "reflects": true
1544
- },
1545
- {
1546
- "kind": "field",
1547
- "name": "wrap",
1548
- "type": {
1549
- "text": "boolean"
1550
- },
1551
- "default": "false",
1552
- "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`).",
1553
- "attribute": "wrap",
1554
- "reflects": true
1555
- },
1556
- {
1557
- "kind": "field",
1558
- "name": "role",
1559
- "type": {
1560
- "text": "string"
1561
- },
1562
- "default": "\"group\"",
1563
- "description": "The appropriate role for the containing element.",
1564
- "attribute": "role",
1565
- "reflects": true
1566
- }
1567
- ],
1568
- "attributes": [
1569
- {
1570
- "name": "variant",
1571
- "type": {
1572
- "text": "\"default\" | \"spaced\""
1573
- },
1574
- "default": "\"default\"",
1575
- "description": "The style variant of the button group.",
1576
- "fieldName": "variant"
1577
- },
1578
- {
1579
- "name": "direction",
1580
- "type": {
1581
- "text": "\"vertical\" | \"horizontal\""
1582
- },
1583
- "default": "\"horizontal\"",
1584
- "description": "The direction of the button group.",
1585
- "fieldName": "direction"
1586
- },
1587
- {
1588
- "name": "wrap",
1589
- "type": {
1590
- "text": "boolean"
1591
- },
1592
- "default": "false",
1593
- "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`).",
1594
- "fieldName": "wrap"
1595
- },
1596
- {
1597
- "name": "role",
1598
- "type": {
1599
- "text": "string"
1600
- },
1601
- "default": "\"group\"",
1602
- "description": "The appropriate role for the containing element.",
1603
- "fieldName": "role"
1604
- }
1605
- ],
1606
- "superclass": {
1607
- "name": "LitElement",
1608
- "package": "lit"
1609
- },
1610
- "localization": [],
1611
- "status": "new",
1612
- "category": "structure",
1613
- "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",
1614
- "examples": [],
1615
- "dependencies": [],
1616
- "tagName": "nord-button-group",
1617
- "customElement": true
1618
- }
1619
- ],
1620
- "exports": [
1621
- {
1622
- "kind": "js",
1623
- "name": "default",
1624
- "declaration": {
1625
- "name": "ButtonGroup",
1626
- "module": "src/button-group/ButtonGroup.ts"
1627
- }
1628
- },
1629
- {
1630
- "kind": "custom-element-definition",
1631
- "name": "nord-button-group",
1632
- "declaration": {
1633
- "name": "ButtonGroup",
1634
- "module": "src/button-group/ButtonGroup.ts"
1635
- }
1636
- }
1637
- ]
1638
- },
1639
1484
  {
1640
1485
  "kind": "javascript-module",
1641
1486
  "path": "src/calendar/Calendar.ts",
@@ -2993,103 +2838,258 @@
2993
2838
  },
2994
2839
  {
2995
2840
  "kind": "javascript-module",
2996
- "path": "src/command-menu/CommandMenu.ts",
2841
+ "path": "src/button-group/ButtonGroup.ts",
2997
2842
  "declarations": [
2998
2843
  {
2999
2844
  "kind": "class",
3000
- "description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
3001
- "name": "CommandMenu",
2845
+ "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
2846
+ "name": "ButtonGroup",
3002
2847
  "cssProperties": [
3003
2848
  {
3004
- "description": "Controls the max inline size, or width, of the command menu.",
3005
- "name": "--n-command-menu-inline-size",
3006
- "default": "640px"
3007
- },
3008
- {
3009
- "description": "Controls the max block size, or height, of the command menu.",
3010
- "name": "--n-command-menu-block-size",
3011
- "default": "290px"
2849
+ "description": "Controls the rounded corners of the button group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
2850
+ "name": "--n-button-group-border-radius",
2851
+ "default": "var(--n-border-radius-s)"
3012
2852
  },
3013
2853
  {
3014
- "description": "Controls the command menu offset from the block start, or top, of the screen.",
3015
- "name": "--n-command-menu-block-start",
3016
- "default": "16%"
2854
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
2855
+ "name": "--n-button-group-box-shadow",
2856
+ "default": "var(--n-box-shadow)"
3017
2857
  }
3018
2858
  ],
3019
2859
  "slots": [
3020
2860
  {
3021
- "description": "Used to replace the default footer contents.",
3022
- "name": "footer"
2861
+ "description": "The button group content",
2862
+ "name": ""
3023
2863
  }
3024
2864
  ],
3025
2865
  "members": [
3026
2866
  {
3027
2867
  "kind": "field",
3028
- "name": "inputRef",
3029
- "privacy": "private"
2868
+ "name": "defaultSlot",
2869
+ "privacy": "private",
2870
+ "default": "new SlotController(this)"
3030
2871
  },
3031
2872
  {
3032
2873
  "kind": "field",
3033
- "name": "listRef",
3034
- "privacy": "private"
2874
+ "name": "dirController",
2875
+ "privacy": "private",
2876
+ "default": "new DirectionController(this)"
3035
2877
  },
3036
2878
  {
3037
2879
  "kind": "field",
3038
- "name": "previousFocus",
2880
+ "name": "variant",
3039
2881
  "type": {
3040
- "text": "HTMLElement | undefined"
2882
+ "text": "\"default\" | \"spaced\""
3041
2883
  },
3042
- "privacy": "private"
3043
- },
3044
- {
3045
- "kind": "field",
3046
- "name": "localize",
3047
- "privacy": "private",
3048
- "default": "new LocalizeController<\"nord-command-menu\">(this)"
3049
- },
3050
- {
3051
- "kind": "field",
3052
- "name": "dismissController",
3053
- "privacy": "private",
3054
- "default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.close(),\n })"
2884
+ "default": "\"default\"",
2885
+ "description": "The style variant of the button group.",
2886
+ "attribute": "variant",
2887
+ "reflects": true
3055
2888
  },
3056
2889
  {
3057
2890
  "kind": "field",
3058
- "name": "keyboardController",
3059
- "privacy": "private",
3060
- "default": "new KeyboardController(this, {\n trigger: () => this.select(),\n goBack: () => this.goBack(),\n end: () => this.end(),\n start: () => this.start(),\n next: () => this.next(),\n previous: () => this.previous(),\n toggleOpen: () => this.toggleOpen(),\n })"
2891
+ "name": "direction",
2892
+ "type": {
2893
+ "text": "\"vertical\" | \"horizontal\""
2894
+ },
2895
+ "default": "\"horizontal\"",
2896
+ "description": "The direction of the button group.",
2897
+ "attribute": "direction",
2898
+ "reflects": true
3061
2899
  },
3062
2900
  {
3063
2901
  "kind": "field",
3064
- "name": "open",
2902
+ "name": "wrap",
3065
2903
  "type": {
3066
2904
  "text": "boolean"
3067
2905
  },
3068
2906
  "default": "false",
3069
- "description": "Show or hide the command menu.",
3070
- "attribute": "open",
2907
+ "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`).",
2908
+ "attribute": "wrap",
3071
2909
  "reflects": true
3072
2910
  },
3073
2911
  {
3074
2912
  "kind": "field",
3075
- "name": "commands",
2913
+ "name": "role",
3076
2914
  "type": {
3077
- "text": "Array<ICommandMenuAction>"
2915
+ "text": "string"
3078
2916
  },
3079
- "default": "[]",
3080
- "description": "Array of commands to be included in the menu.\nPlease see “Commands data” section for more documentation."
3081
- },
2917
+ "default": "\"group\"",
2918
+ "description": "The appropriate role for the containing element.",
2919
+ "attribute": "role",
2920
+ "reflects": true
2921
+ }
2922
+ ],
2923
+ "attributes": [
3082
2924
  {
3083
- "kind": "field",
3084
- "name": "parent",
2925
+ "name": "variant",
3085
2926
  "type": {
3086
- "text": "ICommandMenuAction[\"parent\"]"
2927
+ "text": "\"default\" | \"spaced\""
3087
2928
  },
3088
- "privacy": "private"
2929
+ "default": "\"default\"",
2930
+ "description": "The style variant of the button group.",
2931
+ "fieldName": "variant"
3089
2932
  },
3090
2933
  {
3091
- "kind": "field",
3092
- "name": "search",
2934
+ "name": "direction",
2935
+ "type": {
2936
+ "text": "\"vertical\" | \"horizontal\""
2937
+ },
2938
+ "default": "\"horizontal\"",
2939
+ "description": "The direction of the button group.",
2940
+ "fieldName": "direction"
2941
+ },
2942
+ {
2943
+ "name": "wrap",
2944
+ "type": {
2945
+ "text": "boolean"
2946
+ },
2947
+ "default": "false",
2948
+ "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`).",
2949
+ "fieldName": "wrap"
2950
+ },
2951
+ {
2952
+ "name": "role",
2953
+ "type": {
2954
+ "text": "string"
2955
+ },
2956
+ "default": "\"group\"",
2957
+ "description": "The appropriate role for the containing element.",
2958
+ "fieldName": "role"
2959
+ }
2960
+ ],
2961
+ "superclass": {
2962
+ "name": "LitElement",
2963
+ "package": "lit"
2964
+ },
2965
+ "localization": [],
2966
+ "status": "new",
2967
+ "category": "structure",
2968
+ "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",
2969
+ "examples": [],
2970
+ "dependencies": [],
2971
+ "tagName": "nord-button-group",
2972
+ "customElement": true
2973
+ }
2974
+ ],
2975
+ "exports": [
2976
+ {
2977
+ "kind": "js",
2978
+ "name": "default",
2979
+ "declaration": {
2980
+ "name": "ButtonGroup",
2981
+ "module": "src/button-group/ButtonGroup.ts"
2982
+ }
2983
+ },
2984
+ {
2985
+ "kind": "custom-element-definition",
2986
+ "name": "nord-button-group",
2987
+ "declaration": {
2988
+ "name": "ButtonGroup",
2989
+ "module": "src/button-group/ButtonGroup.ts"
2990
+ }
2991
+ }
2992
+ ]
2993
+ },
2994
+ {
2995
+ "kind": "javascript-module",
2996
+ "path": "src/command-menu/CommandMenu.ts",
2997
+ "declarations": [
2998
+ {
2999
+ "kind": "class",
3000
+ "description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
3001
+ "name": "CommandMenu",
3002
+ "cssProperties": [
3003
+ {
3004
+ "description": "Controls the max inline size, or width, of the command menu.",
3005
+ "name": "--n-command-menu-inline-size",
3006
+ "default": "640px"
3007
+ },
3008
+ {
3009
+ "description": "Controls the max block size, or height, of the command menu.",
3010
+ "name": "--n-command-menu-block-size",
3011
+ "default": "290px"
3012
+ },
3013
+ {
3014
+ "description": "Controls the command menu offset from the block start, or top, of the screen.",
3015
+ "name": "--n-command-menu-block-start",
3016
+ "default": "16%"
3017
+ }
3018
+ ],
3019
+ "slots": [
3020
+ {
3021
+ "description": "Used to replace the default footer contents.",
3022
+ "name": "footer"
3023
+ }
3024
+ ],
3025
+ "members": [
3026
+ {
3027
+ "kind": "field",
3028
+ "name": "inputRef",
3029
+ "privacy": "private"
3030
+ },
3031
+ {
3032
+ "kind": "field",
3033
+ "name": "listRef",
3034
+ "privacy": "private"
3035
+ },
3036
+ {
3037
+ "kind": "field",
3038
+ "name": "previousFocus",
3039
+ "type": {
3040
+ "text": "HTMLElement | undefined"
3041
+ },
3042
+ "privacy": "private"
3043
+ },
3044
+ {
3045
+ "kind": "field",
3046
+ "name": "localize",
3047
+ "privacy": "private",
3048
+ "default": "new LocalizeController<\"nord-command-menu\">(this)"
3049
+ },
3050
+ {
3051
+ "kind": "field",
3052
+ "name": "dismissController",
3053
+ "privacy": "private",
3054
+ "default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.close(),\n })"
3055
+ },
3056
+ {
3057
+ "kind": "field",
3058
+ "name": "keyboardController",
3059
+ "privacy": "private",
3060
+ "default": "new KeyboardController(this, {\n trigger: () => this.select(),\n goBack: () => this.goBack(),\n end: () => this.end(),\n start: () => this.start(),\n next: () => this.next(),\n previous: () => this.previous(),\n toggleOpen: () => this.toggleOpen(),\n })"
3061
+ },
3062
+ {
3063
+ "kind": "field",
3064
+ "name": "open",
3065
+ "type": {
3066
+ "text": "boolean"
3067
+ },
3068
+ "default": "false",
3069
+ "description": "Show or hide the command menu.",
3070
+ "attribute": "open",
3071
+ "reflects": true
3072
+ },
3073
+ {
3074
+ "kind": "field",
3075
+ "name": "commands",
3076
+ "type": {
3077
+ "text": "Array<ICommandMenuAction>"
3078
+ },
3079
+ "default": "[]",
3080
+ "description": "Array of commands to be included in the menu.\nPlease see “Commands data” section for more documentation."
3081
+ },
3082
+ {
3083
+ "kind": "field",
3084
+ "name": "parent",
3085
+ "type": {
3086
+ "text": "ICommandMenuAction[\"parent\"]"
3087
+ },
3088
+ "privacy": "private"
3089
+ },
3090
+ {
3091
+ "kind": "field",
3092
+ "name": "search",
3093
3093
  "type": {
3094
3094
  "text": "string"
3095
3095
  },
@@ -6167,100 +6167,6 @@
6167
6167
  }
6168
6168
  ]
6169
6169
  },
6170
- {
6171
- "kind": "javascript-module",
6172
- "path": "src/drawer/Drawer.ts",
6173
- "declarations": [
6174
- {
6175
- "kind": "class",
6176
- "description": "Drawer is used to display context-sensitive actions and information.\nDrawer doesn’t block users from completing their task, like a modal would.",
6177
- "name": "Drawer",
6178
- "cssProperties": [
6179
- {
6180
- "description": "Controls the padding around the main area (the default slot), using our [spacing tokens](/tokens/#space).",
6181
- "name": "--n-drawer-padding",
6182
- "default": "var(--n-space-l)"
6183
- }
6184
- ],
6185
- "slots": [
6186
- {
6187
- "description": "Optional slot that holds a header for the drawer.",
6188
- "name": "header"
6189
- },
6190
- {
6191
- "description": "Default slot.",
6192
- "name": ""
6193
- },
6194
- {
6195
- "description": "Optional slot that holds footer content for the drawer.",
6196
- "name": "footer"
6197
- }
6198
- ],
6199
- "members": [
6200
- {
6201
- "kind": "field",
6202
- "name": "footerSlot",
6203
- "privacy": "private",
6204
- "default": "new SlotController(this, \"footer\")"
6205
- },
6206
- {
6207
- "kind": "field",
6208
- "name": "padding",
6209
- "type": {
6210
- "text": "\"m\" | \"none\""
6211
- },
6212
- "default": "\"m\"",
6213
- "description": "Controls the padding of the drawer component.",
6214
- "attribute": "padding",
6215
- "reflects": true
6216
- }
6217
- ],
6218
- "attributes": [
6219
- {
6220
- "name": "padding",
6221
- "type": {
6222
- "text": "\"m\" | \"none\""
6223
- },
6224
- "default": "\"m\"",
6225
- "description": "Controls the padding of the drawer component.",
6226
- "fieldName": "padding"
6227
- }
6228
- ],
6229
- "superclass": {
6230
- "name": "LitElement",
6231
- "package": "lit"
6232
- },
6233
- "localization": [],
6234
- "status": "new",
6235
- "category": "structure",
6236
- "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 displaying contextual actions or information. For example, when clicking on a table row.\n- Use when you don’t want to block users from completing their task in the main view of an application.\n- Always include a header that summarizes the actions and information in the drawer.\n- Should be closeable through actions like “Done” and “Close”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t put cards inside the drawer. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t reset the drawer’s state when closed if used for settings or filters. Settings should persist.\n- Don’t open from within another drawer. Only one drawer can be open at a time.\n- Don’t use for presenting a small amount of content or an actions menu, use the [popout](/components/popout/) or [dropdown](/components/dropdown/) component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- You can customize the width of the component using `--n-layout-drawer-inline-size` CSS Custom Property that is offered on [Layout component](/components/layout/).\n",
6237
- "examples": [],
6238
- "dependencies": [
6239
- "footer"
6240
- ],
6241
- "tagName": "nord-drawer",
6242
- "customElement": true
6243
- }
6244
- ],
6245
- "exports": [
6246
- {
6247
- "kind": "js",
6248
- "name": "default",
6249
- "declaration": {
6250
- "name": "Drawer",
6251
- "module": "src/drawer/Drawer.ts"
6252
- }
6253
- },
6254
- {
6255
- "kind": "custom-element-definition",
6256
- "name": "nord-drawer",
6257
- "declaration": {
6258
- "name": "Drawer",
6259
- "module": "src/drawer/Drawer.ts"
6260
- }
6261
- }
6262
- ]
6263
- },
6264
6170
  {
6265
6171
  "kind": "javascript-module",
6266
6172
  "path": "src/dropdown/Dropdown.ts",
@@ -6636,12 +6542,106 @@
6636
6542
  },
6637
6543
  {
6638
6544
  "kind": "javascript-module",
6639
- "path": "src/dropdown-item/DropdownItem.ts",
6545
+ "path": "src/drawer/Drawer.ts",
6640
6546
  "declarations": [
6641
6547
  {
6642
6548
  "kind": "class",
6643
- "description": "Dropdown item populates dropdown with actions. Items can be\nplaced either inside a dropdown group or directly inside a\ndropdown component.",
6644
- "name": "DropdownItem",
6549
+ "description": "Drawer is used to display context-sensitive actions and information.\nDrawer doesn’t block users from completing their task, like a modal would.",
6550
+ "name": "Drawer",
6551
+ "cssProperties": [
6552
+ {
6553
+ "description": "Controls the padding around the main area (the default slot), using our [spacing tokens](/tokens/#space).",
6554
+ "name": "--n-drawer-padding",
6555
+ "default": "var(--n-space-l)"
6556
+ }
6557
+ ],
6558
+ "slots": [
6559
+ {
6560
+ "description": "Optional slot that holds a header for the drawer.",
6561
+ "name": "header"
6562
+ },
6563
+ {
6564
+ "description": "Default slot.",
6565
+ "name": ""
6566
+ },
6567
+ {
6568
+ "description": "Optional slot that holds footer content for the drawer.",
6569
+ "name": "footer"
6570
+ }
6571
+ ],
6572
+ "members": [
6573
+ {
6574
+ "kind": "field",
6575
+ "name": "footerSlot",
6576
+ "privacy": "private",
6577
+ "default": "new SlotController(this, \"footer\")"
6578
+ },
6579
+ {
6580
+ "kind": "field",
6581
+ "name": "padding",
6582
+ "type": {
6583
+ "text": "\"m\" | \"none\""
6584
+ },
6585
+ "default": "\"m\"",
6586
+ "description": "Controls the padding of the drawer component.",
6587
+ "attribute": "padding",
6588
+ "reflects": true
6589
+ }
6590
+ ],
6591
+ "attributes": [
6592
+ {
6593
+ "name": "padding",
6594
+ "type": {
6595
+ "text": "\"m\" | \"none\""
6596
+ },
6597
+ "default": "\"m\"",
6598
+ "description": "Controls the padding of the drawer component.",
6599
+ "fieldName": "padding"
6600
+ }
6601
+ ],
6602
+ "superclass": {
6603
+ "name": "LitElement",
6604
+ "package": "lit"
6605
+ },
6606
+ "localization": [],
6607
+ "status": "new",
6608
+ "category": "structure",
6609
+ "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 displaying contextual actions or information. For example, when clicking on a table row.\n- Use when you don’t want to block users from completing their task in the main view of an application.\n- Always include a header that summarizes the actions and information in the drawer.\n- Should be closeable through actions like “Done” and “Close”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t put cards inside the drawer. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t reset the drawer’s state when closed if used for settings or filters. Settings should persist.\n- Don’t open from within another drawer. Only one drawer can be open at a time.\n- Don’t use for presenting a small amount of content or an actions menu, use the [popout](/components/popout/) or [dropdown](/components/dropdown/) component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- You can customize the width of the component using `--n-layout-drawer-inline-size` CSS Custom Property that is offered on [Layout component](/components/layout/).\n",
6610
+ "examples": [],
6611
+ "dependencies": [
6612
+ "footer"
6613
+ ],
6614
+ "tagName": "nord-drawer",
6615
+ "customElement": true
6616
+ }
6617
+ ],
6618
+ "exports": [
6619
+ {
6620
+ "kind": "js",
6621
+ "name": "default",
6622
+ "declaration": {
6623
+ "name": "Drawer",
6624
+ "module": "src/drawer/Drawer.ts"
6625
+ }
6626
+ },
6627
+ {
6628
+ "kind": "custom-element-definition",
6629
+ "name": "nord-drawer",
6630
+ "declaration": {
6631
+ "name": "Drawer",
6632
+ "module": "src/drawer/Drawer.ts"
6633
+ }
6634
+ }
6635
+ ]
6636
+ },
6637
+ {
6638
+ "kind": "javascript-module",
6639
+ "path": "src/dropdown-item/DropdownItem.ts",
6640
+ "declarations": [
6641
+ {
6642
+ "kind": "class",
6643
+ "description": "Dropdown item populates dropdown with actions. Items can be\nplaced either inside a dropdown group or directly inside a\ndropdown component.",
6644
+ "name": "DropdownItem",
6645
6645
  "cssProperties": [
6646
6646
  {
6647
6647
  "description": "Controls the background color of the item, using our [color tokens](/tokens/#color).",
@@ -6947,6 +6947,17 @@
6947
6947
  "attribute": "hide-label",
6948
6948
  "reflects": true
6949
6949
  },
6950
+ {
6951
+ "kind": "field",
6952
+ "name": "size",
6953
+ "type": {
6954
+ "text": "\"s\" | \"m\""
6955
+ },
6956
+ "default": "\"m\"",
6957
+ "description": "The size of the label.",
6958
+ "attribute": "size",
6959
+ "reflects": true
6960
+ },
6950
6961
  {
6951
6962
  "kind": "field",
6952
6963
  "name": "hasHint",
@@ -7012,6 +7023,15 @@
7012
7023
  "default": "false",
7013
7024
  "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
7014
7025
  "fieldName": "hideLabel"
7026
+ },
7027
+ {
7028
+ "name": "size",
7029
+ "type": {
7030
+ "text": "\"s\" | \"m\""
7031
+ },
7032
+ "default": "\"m\"",
7033
+ "description": "The size of the label.",
7034
+ "fieldName": "size"
7015
7035
  }
7016
7036
  ],
7017
7037
  "superclass": {
@@ -9091,281 +9111,76 @@
9091
9111
  },
9092
9112
  {
9093
9113
  "kind": "javascript-module",
9094
- "path": "src/message/Message.ts",
9114
+ "path": "src/localization/LocalizeController.ts",
9095
9115
  "declarations": [
9096
9116
  {
9097
9117
  "kind": "class",
9098
- "description": "Message represents a specific item within a collection,\nsuch as notifications, tasks or conversations. Message\ncan be placed directly inside a dropdown component.",
9099
- "name": "Message",
9100
- "cssProperties": [
9101
- {
9102
- "description": "Controls the border color of the message, using our [color tokens](/tokens/#color).",
9103
- "name": "--n-message-border-color",
9104
- "default": "var(--n-color-border)"
9105
- }
9106
- ],
9107
- "slots": [
9108
- {
9109
- "description": "The message content.",
9110
- "name": ""
9111
- },
9112
- {
9113
- "description": "Used to place content after the message. Typically used for a timestamp.",
9114
- "name": "footer"
9115
- }
9116
- ],
9118
+ "description": "",
9119
+ "name": "LocalizeController",
9117
9120
  "members": [
9118
9121
  {
9119
9122
  "kind": "field",
9120
- "name": "localize",
9121
- "privacy": "private",
9122
- "default": "new LocalizeController<\"nord-message\">(this)"
9123
- },
9124
- {
9125
- "kind": "field",
9126
- "name": "href",
9123
+ "name": "unsubscribe",
9127
9124
  "type": {
9128
- "text": "string | undefined"
9125
+ "text": "ReturnType<typeof subscribe> | undefined"
9129
9126
  },
9130
- "description": "The url the message should link to.",
9131
- "attribute": "href",
9132
- "reflects": true
9127
+ "privacy": "private"
9133
9128
  },
9134
9129
  {
9135
9130
  "kind": "field",
9136
- "name": "highlight",
9131
+ "name": "resolvedTranslation",
9137
9132
  "type": {
9138
- "text": "boolean | undefined"
9133
+ "text": "Translation"
9139
9134
  },
9140
- "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
9141
- "attribute": "highlight",
9142
- "reflects": true
9135
+ "privacy": "private"
9143
9136
  },
9144
9137
  {
9145
9138
  "kind": "field",
9146
- "name": "unread",
9147
- "type": {
9148
- "text": "boolean | undefined"
9149
- },
9150
- "description": "Mark the message as unread. By default messages are read.",
9151
- "attribute": "unread",
9152
- "reflects": true
9139
+ "name": "lang",
9140
+ "description": "The lang of the document or element, with element taking precedence",
9141
+ "readonly": true
9153
9142
  },
9154
9143
  {
9155
9144
  "kind": "field",
9156
- "name": "focusableRef",
9157
- "privacy": "protected",
9158
- "inheritedFrom": {
9159
- "name": "FocusableMixin",
9160
- "module": "src/common/mixins/FocusableMixin.ts"
9161
- }
9145
+ "name": "resolvedLang",
9146
+ "description": "The lang of the translation being applied.\nThis may not match the document/element lang, in case of fallback translation",
9147
+ "readonly": true
9162
9148
  },
9163
9149
  {
9164
9150
  "kind": "method",
9165
- "name": "focus",
9166
- "parameters": [
9167
- {
9168
- "name": "options",
9169
- "optional": true,
9170
- "type": {
9171
- "text": "FocusOptions"
9172
- },
9173
- "description": "An object which controls aspects of the focusing process."
9174
- }
9175
- ],
9176
- "description": "Programmatically move focus to the component.",
9177
- "inheritedFrom": {
9178
- "name": "FocusableMixin",
9179
- "module": "src/common/mixins/FocusableMixin.ts"
9180
- }
9151
+ "name": "hostConnected"
9181
9152
  },
9182
9153
  {
9183
9154
  "kind": "method",
9184
- "name": "blur",
9185
- "description": "Programmatically remove focus from the component.",
9186
- "inheritedFrom": {
9187
- "name": "FocusableMixin",
9188
- "module": "src/common/mixins/FocusableMixin.ts"
9189
- }
9155
+ "name": "hostDisconnected"
9190
9156
  },
9191
9157
  {
9192
9158
  "kind": "method",
9193
- "name": "click",
9194
- "description": "Programmatically simulates a click on the component.",
9195
- "inheritedFrom": {
9196
- "name": "FocusableMixin",
9197
- "module": "src/common/mixins/FocusableMixin.ts"
9198
- }
9199
- }
9200
- ],
9201
- "attributes": [
9202
- {
9203
- "name": "href",
9204
- "type": {
9205
- "text": "string | undefined"
9206
- },
9207
- "description": "The url the message should link to.",
9208
- "fieldName": "href"
9209
- },
9210
- {
9211
- "name": "highlight",
9212
- "type": {
9213
- "text": "boolean | undefined"
9159
+ "name": "term",
9160
+ "return": {
9161
+ "type": {
9162
+ "text": "Result<Translation[TComponentName], Key>"
9163
+ }
9214
9164
  },
9215
- "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
9216
- "fieldName": "highlight"
9165
+ "parameters": [
9166
+ {
9167
+ "name": "key",
9168
+ "type": {
9169
+ "text": "Key"
9170
+ }
9171
+ },
9172
+ {
9173
+ "name": "args",
9174
+ "type": {
9175
+ "text": "FuncParams<Translation[TComponentName], Key>"
9176
+ }
9177
+ }
9178
+ ]
9217
9179
  },
9218
9180
  {
9219
- "name": "unread",
9220
- "type": {
9221
- "text": "boolean | undefined"
9222
- },
9223
- "description": "Mark the message as unread. By default messages are read.",
9224
- "fieldName": "unread"
9225
- }
9226
- ],
9227
- "mixins": [
9228
- {
9229
- "name": "FocusableMixin",
9230
- "module": "/src/common/mixins/FocusableMixin.js"
9231
- }
9232
- ],
9233
- "superclass": {
9234
- "name": "LitElement",
9235
- "package": "lit"
9236
- },
9237
- "localization": [
9238
- {
9239
- "name": "unreadLabel",
9240
- "description": "Label for the unread messages."
9241
- }
9242
- ],
9243
- "status": "new",
9244
- "category": "action",
9245
- "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- Messages should always perform an action when clicked.\n- The click action should navigate to a new page or provide more detail about the message.\n- Mark unread messages as read on user interaction.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t slot other components inside a message.\n\n</div>\n\n---\n\n## Content guidelines\n\nMessage content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the message content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification 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\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAvoid all caps for messages:\n\n<div class=\"n-usage n-usage-do\">Nina Williams arrived to clinic with Norfryd</div>\n<div class=\"n-usage n-usage-dont\">NINA WILLIAMS ARRIVED TO CLINIC WITH NORFRYD</div>\n",
9246
- "examples": [],
9247
- "dependencies": [
9248
- "dropdown-item"
9249
- ],
9250
- "tagName": "nord-message",
9251
- "customElement": true
9252
- }
9253
- ],
9254
- "exports": [
9255
- {
9256
- "kind": "js",
9257
- "name": "default",
9258
- "declaration": {
9259
- "name": "Message",
9260
- "module": "src/message/Message.ts"
9261
- }
9262
- },
9263
- {
9264
- "kind": "custom-element-definition",
9265
- "name": "nord-message",
9266
- "declaration": {
9267
- "name": "Message",
9268
- "module": "src/message/Message.ts"
9269
- }
9270
- }
9271
- ]
9272
- },
9273
- {
9274
- "kind": "javascript-module",
9275
- "path": "src/message/localization.ts",
9276
- "declarations": [
9277
- {
9278
- "kind": "variable",
9279
- "name": "localization",
9280
- "type": {
9281
- "text": "object"
9282
- },
9283
- "default": "{\n unreadLabel: \"Unread\",\n}"
9284
- }
9285
- ],
9286
- "exports": [
9287
- {
9288
- "kind": "js",
9289
- "name": "default",
9290
- "declaration": {
9291
- "name": "localization",
9292
- "module": "src/message/localization.ts"
9293
- }
9294
- }
9295
- ]
9296
- },
9297
- {
9298
- "kind": "javascript-module",
9299
- "path": "src/localization/LocalizeController.ts",
9300
- "declarations": [
9301
- {
9302
- "kind": "class",
9303
- "description": "",
9304
- "name": "LocalizeController",
9305
- "members": [
9306
- {
9307
- "kind": "field",
9308
- "name": "unsubscribe",
9309
- "type": {
9310
- "text": "ReturnType<typeof subscribe> | undefined"
9311
- },
9312
- "privacy": "private"
9313
- },
9314
- {
9315
- "kind": "field",
9316
- "name": "resolvedTranslation",
9317
- "type": {
9318
- "text": "Translation"
9319
- },
9320
- "privacy": "private"
9321
- },
9322
- {
9323
- "kind": "field",
9324
- "name": "lang",
9325
- "description": "The lang of the document or element, with element taking precedence",
9326
- "readonly": true
9327
- },
9328
- {
9329
- "kind": "field",
9330
- "name": "resolvedLang",
9331
- "description": "The lang of the translation being applied.\nThis may not match the document/element lang, in case of fallback translation",
9332
- "readonly": true
9333
- },
9334
- {
9335
- "kind": "method",
9336
- "name": "hostConnected"
9337
- },
9338
- {
9339
- "kind": "method",
9340
- "name": "hostDisconnected"
9341
- },
9342
- {
9343
- "kind": "method",
9344
- "name": "term",
9345
- "return": {
9346
- "type": {
9347
- "text": "Result<Translation[TComponentName], Key>"
9348
- }
9349
- },
9350
- "parameters": [
9351
- {
9352
- "name": "key",
9353
- "type": {
9354
- "text": "Key"
9355
- }
9356
- },
9357
- {
9358
- "name": "args",
9359
- "type": {
9360
- "text": "FuncParams<Translation[TComponentName], Key>"
9361
- }
9362
- }
9363
- ]
9364
- },
9365
- {
9366
- "kind": "field",
9367
- "name": "handleLangChange",
9368
- "privacy": "private"
9181
+ "kind": "field",
9182
+ "name": "handleLangChange",
9183
+ "privacy": "private"
9369
9184
  }
9370
9185
  ]
9371
9186
  }
@@ -9551,151 +9366,74 @@
9551
9366
  },
9552
9367
  {
9553
9368
  "kind": "javascript-module",
9554
- "path": "src/modal/Modal.ts",
9369
+ "path": "src/message/Message.ts",
9555
9370
  "declarations": [
9556
9371
  {
9557
9372
  "kind": "class",
9558
- "description": "Modal component is used to display content that temporarily blocks interactions\nwith the main view of an application. Modal should be used sparingly and\nonly when necessary.",
9559
- "name": "Modal",
9373
+ "description": "Message represents a specific item within a collection,\nsuch as notifications, tasks or conversations. Message\ncan be placed directly inside a dropdown component.",
9374
+ "name": "Message",
9560
9375
  "cssProperties": [
9561
9376
  {
9562
- "description": "Controls the padding on the sides of the modal, using our [spacing tokens](/tokens/#space).",
9563
- "name": "--n-modal-padding-inline",
9564
- "default": "var(--n-space-m)"
9565
- },
9566
- {
9567
- "description": "Controls the padding above and below the modal, using our [spacing tokens](/tokens/#space).",
9568
- "name": "--n-modal-padding-block",
9569
- "default": "var(--n-space-m)"
9570
- },
9571
- {
9572
- "description": "Controls the width of the modal.",
9573
- "name": "--n-modal-max-inline-size",
9574
- "default": "620px"
9377
+ "description": "Controls the border color of the message, using our [color tokens](/tokens/#color).",
9378
+ "name": "--n-message-border-color",
9379
+ "default": "var(--n-color-border)"
9575
9380
  }
9576
9381
  ],
9577
9382
  "slots": [
9578
9383
  {
9579
- "description": "Default slot",
9384
+ "description": "The message content.",
9580
9385
  "name": ""
9581
9386
  },
9582
9387
  {
9583
- "description": "Slot which holds the header of the modal, positioned next to the close button.",
9584
- "name": "header"
9585
- },
9586
- {
9587
- "description": "Slot which is typically used to hold call to action buttons, but can also be used to build custom footers.",
9388
+ "description": "Used to place content after the message. Typically used for a timestamp.",
9588
9389
  "name": "footer"
9589
9390
  }
9590
9391
  ],
9591
9392
  "members": [
9592
- {
9593
- "kind": "field",
9594
- "name": "modal",
9595
- "type": {
9596
- "text": "HTMLDivElement"
9597
- },
9598
- "privacy": "private"
9599
- },
9600
- {
9601
- "kind": "field",
9602
- "name": "backdrop",
9603
- "type": {
9604
- "text": "HTMLDivElement"
9605
- },
9606
- "privacy": "private"
9607
- },
9608
- {
9609
- "kind": "field",
9610
- "name": "headerSlot",
9611
- "privacy": "private",
9612
- "default": "new SlotController(this, \"header\")"
9613
- },
9614
- {
9615
- "kind": "field",
9616
- "name": "featureSlot",
9617
- "privacy": "private",
9618
- "default": "new SlotController(this, \"feature\")"
9619
- },
9620
- {
9621
- "kind": "field",
9622
- "name": "footerSlot",
9623
- "privacy": "private",
9624
- "default": "new SlotController(this, \"footer\")"
9625
- },
9626
9393
  {
9627
9394
  "kind": "field",
9628
9395
  "name": "localize",
9629
9396
  "privacy": "private",
9630
- "default": "new LocalizeController<\"nord-modal\">(this)"
9631
- },
9632
- {
9633
- "kind": "field",
9634
- "name": "modalController",
9635
- "privacy": "private",
9636
- "default": "new ModalController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.handleDismiss(),\n dialog: () => this.modal,\n backdrop: () => this.backdrop,\n close: returnValue => this.close(returnValue),\n })"
9397
+ "default": "new LocalizeController<\"nord-message\">(this)"
9637
9398
  },
9638
9399
  {
9639
9400
  "kind": "field",
9640
- "name": "open",
9401
+ "name": "href",
9641
9402
  "type": {
9642
- "text": "boolean"
9403
+ "text": "string | undefined"
9643
9404
  },
9644
- "default": "false",
9645
- "description": "Controls whether the modal is open or not.",
9646
- "attribute": "open",
9405
+ "description": "The url the message should link to.",
9406
+ "attribute": "href",
9647
9407
  "reflects": true
9648
9408
  },
9649
9409
  {
9650
9410
  "kind": "field",
9651
- "name": "size",
9411
+ "name": "highlight",
9652
9412
  "type": {
9653
- "text": "\"s\" | \"m\" | \"l\" | \"xl\""
9413
+ "text": "boolean | undefined"
9654
9414
  },
9655
- "default": "\"m\"",
9656
- "description": "Controls the max-width of the modal when open.",
9657
- "attribute": "size",
9415
+ "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
9416
+ "attribute": "highlight",
9658
9417
  "reflects": true
9659
9418
  },
9660
9419
  {
9661
9420
  "kind": "field",
9662
- "name": "returnValue",
9421
+ "name": "unread",
9663
9422
  "type": {
9664
- "text": "string"
9423
+ "text": "boolean | undefined"
9665
9424
  },
9666
- "default": "\"\"",
9667
- "description": "The reason why the modal was closed. This typically indicates\nwhich button the user pressed to close the modal, though any value\ncan be supplied if the modal is programmatically closed."
9425
+ "description": "Mark the message as unread. By default messages are read.",
9426
+ "attribute": "unread",
9427
+ "reflects": true
9668
9428
  },
9669
9429
  {
9670
9430
  "kind": "field",
9671
- "name": "scrollable",
9672
- "type": {
9673
- "text": "boolean"
9674
- },
9675
- "default": "false",
9676
- "description": "By default if a modal is too big for the browser window,\nthe entire modal will scroll. This setting changes that behavior\nso that the body of the modal scrolls instead, with the modal\nitself remaining fixed.",
9677
- "attribute": "scrollable",
9678
- "reflects": true
9679
- },
9680
- {
9681
- "kind": "method",
9682
- "name": "showModal",
9683
- "description": "Show the modal, automatically moving focus to the modal or a child\nelement with an `autofocus` attribute."
9684
- },
9685
- {
9686
- "kind": "method",
9687
- "name": "close",
9688
- "parameters": [
9689
- {
9690
- "name": "returnValue",
9691
- "optional": true,
9692
- "type": {
9693
- "text": "string"
9694
- },
9695
- "description": "An optional value to indicate why the modal was closed."
9696
- }
9697
- ],
9698
- "description": "Programmatically close the modal."
9431
+ "name": "focusableRef",
9432
+ "privacy": "protected",
9433
+ "inheritedFrom": {
9434
+ "name": "FocusableMixin",
9435
+ "module": "src/common/mixins/FocusableMixin.ts"
9436
+ }
9699
9437
  },
9700
9438
  {
9701
9439
  "kind": "method",
@@ -9710,70 +9448,61 @@
9710
9448
  "description": "An object which controls aspects of the focusing process."
9711
9449
  }
9712
9450
  ],
9713
- "description": "Programmatically focus the modal."
9451
+ "description": "Programmatically move focus to the component.",
9452
+ "inheritedFrom": {
9453
+ "name": "FocusableMixin",
9454
+ "module": "src/common/mixins/FocusableMixin.ts"
9455
+ }
9714
9456
  },
9715
9457
  {
9716
9458
  "kind": "method",
9717
- "name": "handleOpenUpdated",
9718
- "privacy": "protected",
9719
- "parameters": [
9720
- {
9721
- "name": "prev",
9722
- "type": {
9723
- "text": "boolean"
9724
- }
9725
- }
9726
- ]
9459
+ "name": "blur",
9460
+ "description": "Programmatically remove focus from the component.",
9461
+ "inheritedFrom": {
9462
+ "name": "FocusableMixin",
9463
+ "module": "src/common/mixins/FocusableMixin.ts"
9464
+ }
9727
9465
  },
9728
9466
  {
9729
9467
  "kind": "method",
9730
- "name": "handleDismiss",
9731
- "privacy": "private"
9732
- }
9733
- ],
9734
- "events": [
9735
- {
9736
- "name": "close",
9737
- "type": {
9738
- "text": "NordEvent"
9739
- },
9740
- "description": "Dispatched when a modal is closed for any reason."
9741
- },
9742
- {
9743
- "name": "cancel",
9744
- "type": {
9745
- "text": "NordEvent"
9746
- },
9747
- "description": "Dispatched before the modal has closed when a user attempts to dismiss a modal. Call `preventDefault()` on the event to prevent the modal closing."
9468
+ "name": "click",
9469
+ "description": "Programmatically simulates a click on the component.",
9470
+ "inheritedFrom": {
9471
+ "name": "FocusableMixin",
9472
+ "module": "src/common/mixins/FocusableMixin.ts"
9473
+ }
9748
9474
  }
9749
9475
  ],
9750
9476
  "attributes": [
9751
9477
  {
9752
- "name": "open",
9478
+ "name": "href",
9753
9479
  "type": {
9754
- "text": "boolean"
9480
+ "text": "string | undefined"
9755
9481
  },
9756
- "default": "false",
9757
- "description": "Controls whether the modal is open or not.",
9758
- "fieldName": "open"
9482
+ "description": "The url the message should link to.",
9483
+ "fieldName": "href"
9759
9484
  },
9760
9485
  {
9761
- "name": "size",
9486
+ "name": "highlight",
9762
9487
  "type": {
9763
- "text": "\"s\" | \"m\" | \"l\" | \"xl\""
9488
+ "text": "boolean | undefined"
9764
9489
  },
9765
- "default": "\"m\"",
9766
- "description": "Controls the max-width of the modal when open.",
9767
- "fieldName": "size"
9490
+ "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
9491
+ "fieldName": "highlight"
9768
9492
  },
9769
9493
  {
9770
- "name": "scrollable",
9494
+ "name": "unread",
9771
9495
  "type": {
9772
- "text": "boolean"
9496
+ "text": "boolean | undefined"
9773
9497
  },
9774
- "default": "false",
9775
- "description": "By default if a modal is too big for the browser window,\nthe entire modal will scroll. This setting changes that behavior\nso that the body of the modal scrolls instead, with the modal\nitself remaining fixed.",
9776
- "fieldName": "scrollable"
9498
+ "description": "Mark the message as unread. By default messages are read.",
9499
+ "fieldName": "unread"
9500
+ }
9501
+ ],
9502
+ "mixins": [
9503
+ {
9504
+ "name": "FocusableMixin",
9505
+ "module": "/src/common/mixins/FocusableMixin.js"
9777
9506
  }
9778
9507
  ],
9779
9508
  "superclass": {
@@ -9782,19 +9511,18 @@
9782
9511
  },
9783
9512
  "localization": [
9784
9513
  {
9785
- "name": "closeLabel",
9786
- "description": "Accessible label for the close button."
9514
+ "name": "unreadLabel",
9515
+ "description": "Label for the unread messages."
9787
9516
  }
9788
9517
  ],
9789
- "status": "ready",
9790
- "category": "overlay",
9791
- "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 confirmations and conditional changes.\n- Use when the user is required to take an action.\n- Use when you need to display content that temporarily blocks interactions with the main view of an application.\n- Use when you need to ask a confirmation from a user before proceeding.\n- Use for important warnings, as a way to prevent or correct critical errors.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for nonessential information that is not related to the current userflow.\n- Don’t use when the modal requires additional information for decision making that is unavailable in the modal itself.\n- Don’t open a modal window on top of another modal.\n\n</div>\n\n---\n\n## Content guidelines\n\nModal title should be clear, accurate and predictable. Always lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit the patient called John Doe</div>\n<div class=\"n-usage n-usage-do\">Discard changes?</div>\n<div class=\"n-usage n-usage-dont\">Discard?</div>\n<div class=\"n-usage n-usage-do\">Delete patient?</div>\n<div class=\"n-usage n-usage-dont\">Are you sure you want to delete this patent?</div>\n\nWhen writing modal titles, 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\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in modal titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit patient.</div>\n\n---\n\n## Focus behaviour\n\n- Use the `autofocus` attribute to set the initial focus to the first location that accepts user input.\n- If it is a transactional modal without form inputs, then `autofocus` should be set on the primary button in the modal footer. This is for efficiency since most users will simply dismiss the dialog as soon as they have read the message.\n- If the modal contains a form, use `autofocus` in the first form field.\n- Focus remains trapped inside the modal dialog until it is closed.\n- For more examples and best practices, please see [WAI-ARIA Authoring Practices Modal Dialog Example](https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/dialog-modal/dialog.html).\n",
9518
+ "status": "new",
9519
+ "category": "action",
9520
+ "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- Messages should always perform an action when clicked.\n- The click action should navigate to a new page or provide more detail about the message.\n- Mark unread messages as read on user interaction.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t slot other components inside a message.\n\n</div>\n\n---\n\n## Content guidelines\n\nMessage content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the message content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification 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\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAvoid all caps for messages:\n\n<div class=\"n-usage n-usage-do\">Nina Williams arrived to clinic with Norfryd</div>\n<div class=\"n-usage n-usage-dont\">NINA WILLIAMS ARRIVED TO CLINIC WITH NORFRYD</div>\n",
9792
9521
  "examples": [],
9793
9522
  "dependencies": [
9794
- "icon",
9795
- "footer"
9523
+ "dropdown-item"
9796
9524
  ],
9797
- "tagName": "nord-modal",
9525
+ "tagName": "nord-message",
9798
9526
  "customElement": true
9799
9527
  }
9800
9528
  ],
@@ -9803,96 +9531,388 @@
9803
9531
  "kind": "js",
9804
9532
  "name": "default",
9805
9533
  "declaration": {
9806
- "name": "Modal",
9807
- "module": "src/modal/Modal.ts"
9534
+ "name": "Message",
9535
+ "module": "src/message/Message.ts"
9808
9536
  }
9809
9537
  },
9810
9538
  {
9811
9539
  "kind": "custom-element-definition",
9812
- "name": "nord-modal",
9540
+ "name": "nord-message",
9813
9541
  "declaration": {
9814
- "name": "Modal",
9815
- "module": "src/modal/Modal.ts"
9542
+ "name": "Message",
9543
+ "module": "src/message/Message.ts"
9816
9544
  }
9817
9545
  }
9818
9546
  ]
9819
9547
  },
9820
9548
  {
9821
9549
  "kind": "javascript-module",
9822
- "path": "src/modal/ModalController.ts",
9550
+ "path": "src/message/localization.ts",
9551
+ "declarations": [
9552
+ {
9553
+ "kind": "variable",
9554
+ "name": "localization",
9555
+ "type": {
9556
+ "text": "object"
9557
+ },
9558
+ "default": "{\n unreadLabel: \"Unread\",\n}"
9559
+ }
9560
+ ],
9561
+ "exports": [
9562
+ {
9563
+ "kind": "js",
9564
+ "name": "default",
9565
+ "declaration": {
9566
+ "name": "localization",
9567
+ "module": "src/message/localization.ts"
9568
+ }
9569
+ }
9570
+ ]
9571
+ },
9572
+ {
9573
+ "kind": "javascript-module",
9574
+ "path": "src/modal/Modal.ts",
9823
9575
  "declarations": [
9824
9576
  {
9825
9577
  "kind": "class",
9826
- "description": "",
9827
- "name": "ModalController",
9578
+ "description": "Modal component is used to display content that temporarily blocks interactions\nwith the main view of an application. Modal should be used sparingly and\nonly when necessary.",
9579
+ "name": "Modal",
9580
+ "cssProperties": [
9581
+ {
9582
+ "description": "Controls the padding on the sides of the modal, using our [spacing tokens](/tokens/#space).",
9583
+ "name": "--n-modal-padding-inline",
9584
+ "default": "var(--n-space-m)"
9585
+ },
9586
+ {
9587
+ "description": "Controls the padding above and below the modal, using our [spacing tokens](/tokens/#space).",
9588
+ "name": "--n-modal-padding-block",
9589
+ "default": "var(--n-space-m)"
9590
+ },
9591
+ {
9592
+ "description": "Controls the width of the modal.",
9593
+ "name": "--n-modal-max-inline-size",
9594
+ "default": "620px"
9595
+ }
9596
+ ],
9597
+ "slots": [
9598
+ {
9599
+ "description": "Default slot",
9600
+ "name": ""
9601
+ },
9602
+ {
9603
+ "description": "Slot which holds the header of the modal, positioned next to the close button.",
9604
+ "name": "header"
9605
+ },
9606
+ {
9607
+ "description": "Slot which is typically used to hold call to action buttons, but can also be used to build custom footers.",
9608
+ "name": "footer"
9609
+ }
9610
+ ],
9828
9611
  "members": [
9829
9612
  {
9830
9613
  "kind": "field",
9831
- "name": "openModals",
9832
- "privacy": "private",
9833
- "static": true,
9834
- "default": "new Stack<ModalController>()"
9614
+ "name": "modal",
9615
+ "type": {
9616
+ "text": "HTMLDivElement"
9617
+ },
9618
+ "privacy": "private"
9835
9619
  },
9836
9620
  {
9837
9621
  "kind": "field",
9838
- "name": "scrollBar",
9622
+ "name": "backdrop",
9839
9623
  "type": {
9840
- "text": "ScrollbarController"
9624
+ "text": "HTMLDivElement"
9841
9625
  },
9626
+ "privacy": "private"
9627
+ },
9628
+ {
9629
+ "kind": "field",
9630
+ "name": "headerSlot",
9842
9631
  "privacy": "private",
9843
- "default": "new ScrollbarController(host)"
9632
+ "default": "new SlotController(this, \"header\")"
9844
9633
  },
9845
9634
  {
9846
9635
  "kind": "field",
9847
- "name": "focusTrap",
9848
- "type": {
9849
- "text": "FocusTrapController"
9850
- },
9636
+ "name": "featureSlot",
9851
9637
  "privacy": "private",
9852
- "default": "new FocusTrapController(host)"
9638
+ "default": "new SlotController(this, \"feature\")"
9853
9639
  },
9854
9640
  {
9855
9641
  "kind": "field",
9856
- "name": "lightDismiss",
9857
- "type": {
9858
- "text": "LightDismissController"
9859
- },
9642
+ "name": "footerSlot",
9860
9643
  "privacy": "private",
9861
- "default": "new LightDismissController(host, {\n isOpen: options.isOpen,\n isDismissible: node => node !== options.dialog(),\n onDismiss: this.handleLightDismiss,\n })"
9644
+ "default": "new SlotController(this, \"footer\")"
9862
9645
  },
9863
9646
  {
9864
9647
  "kind": "field",
9865
- "name": "events",
9866
- "type": {
9867
- "text": "EventController"
9868
- },
9648
+ "name": "localize",
9869
9649
  "privacy": "private",
9870
- "default": "new EventController(host)"
9650
+ "default": "new LocalizeController<\"nord-modal\">(this)"
9871
9651
  },
9872
9652
  {
9873
9653
  "kind": "field",
9874
- "name": "options",
9654
+ "name": "modalController",
9655
+ "privacy": "private",
9656
+ "default": "new ModalController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.handleDismiss(),\n dialog: () => this.modal,\n backdrop: () => this.backdrop,\n close: returnValue => this.close(returnValue),\n })"
9657
+ },
9658
+ {
9659
+ "kind": "field",
9660
+ "name": "open",
9875
9661
  "type": {
9876
- "text": "ModalControllerOptions"
9662
+ "text": "boolean"
9877
9663
  },
9878
- "privacy": "private",
9879
- "default": "options"
9664
+ "default": "false",
9665
+ "description": "Controls whether the modal is open or not.",
9666
+ "attribute": "open",
9667
+ "reflects": true
9880
9668
  },
9881
9669
  {
9882
9670
  "kind": "field",
9883
- "name": "trigger",
9671
+ "name": "size",
9884
9672
  "type": {
9885
- "text": "HTMLElement | undefined"
9673
+ "text": "\"s\" | \"m\" | \"l\" | \"xl\""
9886
9674
  },
9887
- "privacy": "private"
9675
+ "default": "\"m\"",
9676
+ "description": "Controls the max-width of the modal when open.",
9677
+ "attribute": "size",
9678
+ "reflects": true
9888
9679
  },
9889
9680
  {
9890
9681
  "kind": "field",
9891
- "name": "lastButton",
9682
+ "name": "returnValue",
9892
9683
  "type": {
9893
- "text": "HTMLButtonElement | undefined"
9684
+ "text": "string"
9894
9685
  },
9895
- "privacy": "private"
9686
+ "default": "\"\"",
9687
+ "description": "The reason why the modal was closed. This typically indicates\nwhich button the user pressed to close the modal, though any value\ncan be supplied if the modal is programmatically closed."
9688
+ },
9689
+ {
9690
+ "kind": "field",
9691
+ "name": "scrollable",
9692
+ "type": {
9693
+ "text": "boolean"
9694
+ },
9695
+ "default": "false",
9696
+ "description": "By default if a modal is too big for the browser window,\nthe entire modal will scroll. This setting changes that behavior\nso that the body of the modal scrolls instead, with the modal\nitself remaining fixed.",
9697
+ "attribute": "scrollable",
9698
+ "reflects": true
9699
+ },
9700
+ {
9701
+ "kind": "method",
9702
+ "name": "showModal",
9703
+ "description": "Show the modal, automatically moving focus to the modal or a child\nelement with an `autofocus` attribute."
9704
+ },
9705
+ {
9706
+ "kind": "method",
9707
+ "name": "close",
9708
+ "parameters": [
9709
+ {
9710
+ "name": "returnValue",
9711
+ "optional": true,
9712
+ "type": {
9713
+ "text": "string"
9714
+ },
9715
+ "description": "An optional value to indicate why the modal was closed."
9716
+ }
9717
+ ],
9718
+ "description": "Programmatically close the modal."
9719
+ },
9720
+ {
9721
+ "kind": "method",
9722
+ "name": "focus",
9723
+ "parameters": [
9724
+ {
9725
+ "name": "options",
9726
+ "optional": true,
9727
+ "type": {
9728
+ "text": "FocusOptions"
9729
+ },
9730
+ "description": "An object which controls aspects of the focusing process."
9731
+ }
9732
+ ],
9733
+ "description": "Programmatically focus the modal."
9734
+ },
9735
+ {
9736
+ "kind": "method",
9737
+ "name": "handleOpenUpdated",
9738
+ "privacy": "protected",
9739
+ "parameters": [
9740
+ {
9741
+ "name": "prev",
9742
+ "type": {
9743
+ "text": "boolean"
9744
+ }
9745
+ }
9746
+ ]
9747
+ },
9748
+ {
9749
+ "kind": "method",
9750
+ "name": "handleDismiss",
9751
+ "privacy": "private"
9752
+ }
9753
+ ],
9754
+ "events": [
9755
+ {
9756
+ "name": "close",
9757
+ "type": {
9758
+ "text": "NordEvent"
9759
+ },
9760
+ "description": "Dispatched when a modal is closed for any reason."
9761
+ },
9762
+ {
9763
+ "name": "cancel",
9764
+ "type": {
9765
+ "text": "NordEvent"
9766
+ },
9767
+ "description": "Dispatched before the modal has closed when a user attempts to dismiss a modal. Call `preventDefault()` on the event to prevent the modal closing."
9768
+ }
9769
+ ],
9770
+ "attributes": [
9771
+ {
9772
+ "name": "open",
9773
+ "type": {
9774
+ "text": "boolean"
9775
+ },
9776
+ "default": "false",
9777
+ "description": "Controls whether the modal is open or not.",
9778
+ "fieldName": "open"
9779
+ },
9780
+ {
9781
+ "name": "size",
9782
+ "type": {
9783
+ "text": "\"s\" | \"m\" | \"l\" | \"xl\""
9784
+ },
9785
+ "default": "\"m\"",
9786
+ "description": "Controls the max-width of the modal when open.",
9787
+ "fieldName": "size"
9788
+ },
9789
+ {
9790
+ "name": "scrollable",
9791
+ "type": {
9792
+ "text": "boolean"
9793
+ },
9794
+ "default": "false",
9795
+ "description": "By default if a modal is too big for the browser window,\nthe entire modal will scroll. This setting changes that behavior\nso that the body of the modal scrolls instead, with the modal\nitself remaining fixed.",
9796
+ "fieldName": "scrollable"
9797
+ }
9798
+ ],
9799
+ "superclass": {
9800
+ "name": "LitElement",
9801
+ "package": "lit"
9802
+ },
9803
+ "localization": [
9804
+ {
9805
+ "name": "closeLabel",
9806
+ "description": "Accessible label for the close button."
9807
+ }
9808
+ ],
9809
+ "status": "ready",
9810
+ "category": "overlay",
9811
+ "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 confirmations and conditional changes.\n- Use when the user is required to take an action.\n- Use when you need to display content that temporarily blocks interactions with the main view of an application.\n- Use when you need to ask a confirmation from a user before proceeding.\n- Use for important warnings, as a way to prevent or correct critical errors.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for nonessential information that is not related to the current userflow.\n- Don’t use when the modal requires additional information for decision making that is unavailable in the modal itself.\n- Don’t open a modal window on top of another modal.\n\n</div>\n\n---\n\n## Content guidelines\n\nModal title should be clear, accurate and predictable. Always lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit the patient called John Doe</div>\n<div class=\"n-usage n-usage-do\">Discard changes?</div>\n<div class=\"n-usage n-usage-dont\">Discard?</div>\n<div class=\"n-usage n-usage-do\">Delete patient?</div>\n<div class=\"n-usage n-usage-dont\">Are you sure you want to delete this patent?</div>\n\nWhen writing modal titles, 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\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in modal titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit patient.</div>\n\n---\n\n## Focus behaviour\n\n- Use the `autofocus` attribute to set the initial focus to the first location that accepts user input.\n- If it is a transactional modal without form inputs, then `autofocus` should be set on the primary button in the modal footer. This is for efficiency since most users will simply dismiss the dialog as soon as they have read the message.\n- If the modal contains a form, use `autofocus` in the first form field.\n- Focus remains trapped inside the modal dialog until it is closed.\n- For more examples and best practices, please see [WAI-ARIA Authoring Practices Modal Dialog Example](https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/dialog-modal/dialog.html).\n",
9812
+ "examples": [],
9813
+ "dependencies": [
9814
+ "icon",
9815
+ "footer"
9816
+ ],
9817
+ "tagName": "nord-modal",
9818
+ "customElement": true
9819
+ }
9820
+ ],
9821
+ "exports": [
9822
+ {
9823
+ "kind": "js",
9824
+ "name": "default",
9825
+ "declaration": {
9826
+ "name": "Modal",
9827
+ "module": "src/modal/Modal.ts"
9828
+ }
9829
+ },
9830
+ {
9831
+ "kind": "custom-element-definition",
9832
+ "name": "nord-modal",
9833
+ "declaration": {
9834
+ "name": "Modal",
9835
+ "module": "src/modal/Modal.ts"
9836
+ }
9837
+ }
9838
+ ]
9839
+ },
9840
+ {
9841
+ "kind": "javascript-module",
9842
+ "path": "src/modal/ModalController.ts",
9843
+ "declarations": [
9844
+ {
9845
+ "kind": "class",
9846
+ "description": "",
9847
+ "name": "ModalController",
9848
+ "members": [
9849
+ {
9850
+ "kind": "field",
9851
+ "name": "openModals",
9852
+ "privacy": "private",
9853
+ "static": true,
9854
+ "default": "new Stack<ModalController>()"
9855
+ },
9856
+ {
9857
+ "kind": "field",
9858
+ "name": "scrollBar",
9859
+ "type": {
9860
+ "text": "ScrollbarController"
9861
+ },
9862
+ "privacy": "private",
9863
+ "default": "new ScrollbarController(host)"
9864
+ },
9865
+ {
9866
+ "kind": "field",
9867
+ "name": "focusTrap",
9868
+ "type": {
9869
+ "text": "FocusTrapController"
9870
+ },
9871
+ "privacy": "private",
9872
+ "default": "new FocusTrapController(host)"
9873
+ },
9874
+ {
9875
+ "kind": "field",
9876
+ "name": "lightDismiss",
9877
+ "type": {
9878
+ "text": "LightDismissController"
9879
+ },
9880
+ "privacy": "private",
9881
+ "default": "new LightDismissController(host, {\n isOpen: options.isOpen,\n isDismissible: node => node !== options.dialog(),\n onDismiss: this.handleLightDismiss,\n })"
9882
+ },
9883
+ {
9884
+ "kind": "field",
9885
+ "name": "events",
9886
+ "type": {
9887
+ "text": "EventController"
9888
+ },
9889
+ "privacy": "private",
9890
+ "default": "new EventController(host)"
9891
+ },
9892
+ {
9893
+ "kind": "field",
9894
+ "name": "options",
9895
+ "type": {
9896
+ "text": "ModalControllerOptions"
9897
+ },
9898
+ "privacy": "private",
9899
+ "default": "options"
9900
+ },
9901
+ {
9902
+ "kind": "field",
9903
+ "name": "trigger",
9904
+ "type": {
9905
+ "text": "HTMLElement | undefined"
9906
+ },
9907
+ "privacy": "private"
9908
+ },
9909
+ {
9910
+ "kind": "field",
9911
+ "name": "lastButton",
9912
+ "type": {
9913
+ "text": "HTMLButtonElement | undefined"
9914
+ },
9915
+ "privacy": "private"
9896
9916
  },
9897
9917
  {
9898
9918
  "kind": "method",
@@ -9981,40 +10001,267 @@
9981
10001
  },
9982
10002
  {
9983
10003
  "kind": "javascript-module",
9984
- "path": "src/nav-item/NavItem.ts",
10004
+ "path": "src/nav-group/NavGroup.ts",
9985
10005
  "declarations": [
9986
10006
  {
9987
10007
  "kind": "class",
9988
- "description": "Navigation item populates sidebar navigation with links.\nEvery item should be placed inside a navigation group.",
9989
- "name": "NavItem",
10008
+ "description": "Navigation group includes all the actions or items in a single\ngroup and is used for grouping items into related categories.",
10009
+ "name": "NavGroup",
9990
10010
  "slots": [
9991
10011
  {
9992
- "description": "The default slot used for the nav item's text.",
10012
+ "description": "The default slot used for the nav items.",
9993
10013
  "name": ""
9994
- },
9995
- {
9996
- "description": "Used for nesting navigation. When used the nav-item becomes a button to collapse the subnav, rather than a link.",
9997
- "name": "subnav"
9998
10014
  }
9999
10015
  ],
10000
10016
  "members": [
10001
10017
  {
10002
10018
  "kind": "field",
10003
- "name": "subnavSlot",
10004
- "privacy": "private",
10005
- "default": "new SlotController(this, \"subnav\")"
10006
- },
10007
- {
10008
- "kind": "field",
10009
- "name": "direction",
10010
- "privacy": "private",
10011
- "default": "new DirectionController(this)"
10012
- },
10013
- {
10014
- "kind": "field",
10015
- "name": "active",
10019
+ "name": "heading",
10016
10020
  "type": {
10017
- "text": "boolean"
10021
+ "text": "string | undefined"
10022
+ },
10023
+ "description": "Heading and accessible label for the nav group",
10024
+ "attribute": "heading",
10025
+ "reflects": true
10026
+ }
10027
+ ],
10028
+ "events": [
10029
+ {
10030
+ "type": {
10031
+ "text": "NordEvent"
10032
+ },
10033
+ "description": "Dispatched whenever a nav item's state changes between open and closed.",
10034
+ "name": "toggle"
10035
+ },
10036
+ {
10037
+ "type": {
10038
+ "text": "NordEvent"
10039
+ },
10040
+ "description": "Dispatched whenever a nav item has been marked as active",
10041
+ "name": "activate"
10042
+ }
10043
+ ],
10044
+ "attributes": [
10045
+ {
10046
+ "name": "heading",
10047
+ "type": {
10048
+ "text": "string | undefined"
10049
+ },
10050
+ "description": "Heading and accessible label for the nav group",
10051
+ "fieldName": "heading"
10052
+ }
10053
+ ],
10054
+ "superclass": {
10055
+ "name": "LitElement",
10056
+ "package": "lit"
10057
+ },
10058
+ "localization": [],
10059
+ "status": "ready",
10060
+ "category": "navigation",
10061
+ "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item 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 item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
10062
+ "examples": [],
10063
+ "dependencies": [
10064
+ "icon"
10065
+ ],
10066
+ "tagName": "nord-nav-group",
10067
+ "customElement": true
10068
+ }
10069
+ ],
10070
+ "exports": [
10071
+ {
10072
+ "kind": "js",
10073
+ "name": "default",
10074
+ "declaration": {
10075
+ "name": "NavGroup",
10076
+ "module": "src/nav-group/NavGroup.ts"
10077
+ }
10078
+ },
10079
+ {
10080
+ "kind": "custom-element-definition",
10081
+ "name": "nord-nav-group",
10082
+ "declaration": {
10083
+ "name": "NavGroup",
10084
+ "module": "src/nav-group/NavGroup.ts"
10085
+ }
10086
+ }
10087
+ ]
10088
+ },
10089
+ {
10090
+ "kind": "javascript-module",
10091
+ "path": "src/nav-toggle/NavToggle.ts",
10092
+ "declarations": [
10093
+ {
10094
+ "kind": "class",
10095
+ "description": "Nav toggle is meant for hiding and showing the primary navigation.\nThis component is used internally in the Layout component, but can also be\nused separate to further customize the behavior.",
10096
+ "name": "NavToggle",
10097
+ "members": [
10098
+ {
10099
+ "kind": "field",
10100
+ "name": "direction",
10101
+ "privacy": "private",
10102
+ "default": "new DirectionController(this)"
10103
+ },
10104
+ {
10105
+ "kind": "field",
10106
+ "name": "localization",
10107
+ "privacy": "private",
10108
+ "default": "new LocalizeController<\"nord-nav-toggle\">(this)"
10109
+ },
10110
+ {
10111
+ "kind": "field",
10112
+ "name": "focusableRef",
10113
+ "privacy": "protected",
10114
+ "inheritedFrom": {
10115
+ "name": "FocusableMixin",
10116
+ "module": "src/common/mixins/FocusableMixin.ts"
10117
+ }
10118
+ },
10119
+ {
10120
+ "kind": "method",
10121
+ "name": "focus",
10122
+ "parameters": [
10123
+ {
10124
+ "name": "options",
10125
+ "optional": true,
10126
+ "type": {
10127
+ "text": "FocusOptions"
10128
+ },
10129
+ "description": "An object which controls aspects of the focusing process."
10130
+ }
10131
+ ],
10132
+ "description": "Programmatically move focus to the component.",
10133
+ "inheritedFrom": {
10134
+ "name": "FocusableMixin",
10135
+ "module": "src/common/mixins/FocusableMixin.ts"
10136
+ }
10137
+ },
10138
+ {
10139
+ "kind": "method",
10140
+ "name": "blur",
10141
+ "description": "Programmatically remove focus from the component.",
10142
+ "inheritedFrom": {
10143
+ "name": "FocusableMixin",
10144
+ "module": "src/common/mixins/FocusableMixin.ts"
10145
+ }
10146
+ },
10147
+ {
10148
+ "kind": "method",
10149
+ "name": "click",
10150
+ "description": "Programmatically simulates a click on the component.",
10151
+ "inheritedFrom": {
10152
+ "name": "FocusableMixin",
10153
+ "module": "src/common/mixins/FocusableMixin.ts"
10154
+ }
10155
+ }
10156
+ ],
10157
+ "mixins": [
10158
+ {
10159
+ "name": "FocusableMixin",
10160
+ "module": "/src/common/mixins/FocusableMixin.js"
10161
+ }
10162
+ ],
10163
+ "superclass": {
10164
+ "name": "LitElement",
10165
+ "package": "lit"
10166
+ },
10167
+ "localization": [
10168
+ {
10169
+ "name": "label",
10170
+ "description": "Accessible label for the nav toggle button."
10171
+ }
10172
+ ],
10173
+ "status": "new",
10174
+ "category": "action",
10175
+ "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 with the toggle that’s labelled as `Toggle navigation`.\n- We recommend setting a keyboard shortcut that toggles the navigation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic button or toggle. Use the [Button component](/components/button/) instead.\n\n</div>\n",
10176
+ "examples": [],
10177
+ "dependencies": [
10178
+ "button",
10179
+ "icon",
10180
+ "visually-hidden"
10181
+ ],
10182
+ "tagName": "nord-nav-toggle",
10183
+ "customElement": true
10184
+ }
10185
+ ],
10186
+ "exports": [
10187
+ {
10188
+ "kind": "js",
10189
+ "name": "default",
10190
+ "declaration": {
10191
+ "name": "NavToggle",
10192
+ "module": "src/nav-toggle/NavToggle.ts"
10193
+ }
10194
+ },
10195
+ {
10196
+ "kind": "custom-element-definition",
10197
+ "name": "nord-nav-toggle",
10198
+ "declaration": {
10199
+ "name": "NavToggle",
10200
+ "module": "src/nav-toggle/NavToggle.ts"
10201
+ }
10202
+ }
10203
+ ]
10204
+ },
10205
+ {
10206
+ "kind": "javascript-module",
10207
+ "path": "src/nav-toggle/localization.ts",
10208
+ "declarations": [
10209
+ {
10210
+ "kind": "variable",
10211
+ "name": "localization",
10212
+ "type": {
10213
+ "text": "object"
10214
+ },
10215
+ "default": "{\n label: \"Toggle navigation\",\n}"
10216
+ }
10217
+ ],
10218
+ "exports": [
10219
+ {
10220
+ "kind": "js",
10221
+ "name": "default",
10222
+ "declaration": {
10223
+ "name": "localization",
10224
+ "module": "src/nav-toggle/localization.ts"
10225
+ }
10226
+ }
10227
+ ]
10228
+ },
10229
+ {
10230
+ "kind": "javascript-module",
10231
+ "path": "src/nav-item/NavItem.ts",
10232
+ "declarations": [
10233
+ {
10234
+ "kind": "class",
10235
+ "description": "Navigation item populates sidebar navigation with links.\nEvery item should be placed inside a navigation group.",
10236
+ "name": "NavItem",
10237
+ "slots": [
10238
+ {
10239
+ "description": "The default slot used for the nav item's text.",
10240
+ "name": ""
10241
+ },
10242
+ {
10243
+ "description": "Used for nesting navigation. When used the nav-item becomes a button to collapse the subnav, rather than a link.",
10244
+ "name": "subnav"
10245
+ }
10246
+ ],
10247
+ "members": [
10248
+ {
10249
+ "kind": "field",
10250
+ "name": "subnavSlot",
10251
+ "privacy": "private",
10252
+ "default": "new SlotController(this, \"subnav\")"
10253
+ },
10254
+ {
10255
+ "kind": "field",
10256
+ "name": "direction",
10257
+ "privacy": "private",
10258
+ "default": "new DirectionController(this)"
10259
+ },
10260
+ {
10261
+ "kind": "field",
10262
+ "name": "active",
10263
+ "type": {
10264
+ "text": "boolean"
10018
10265
  },
10019
10266
  "default": "false",
10020
10267
  "description": "Used for indicating the current page. This gives a prominent background to the nav item,\nand marks the item as the current page for assistive technology.",
@@ -10259,153 +10506,13 @@
10259
10506
  },
10260
10507
  {
10261
10508
  "kind": "javascript-module",
10262
- "path": "src/nav-toggle/NavToggle.ts",
10509
+ "path": "src/navigation/Navigation.ts",
10263
10510
  "declarations": [
10264
10511
  {
10265
10512
  "kind": "class",
10266
- "description": "Nav toggle is meant for hiding and showing the primary navigation.\nThis component is used internally in the Layout component, but can also be\nused separate to further customize the behavior.",
10267
- "name": "NavToggle",
10268
- "members": [
10269
- {
10270
- "kind": "field",
10271
- "name": "direction",
10272
- "privacy": "private",
10273
- "default": "new DirectionController(this)"
10274
- },
10275
- {
10276
- "kind": "field",
10277
- "name": "localization",
10278
- "privacy": "private",
10279
- "default": "new LocalizeController<\"nord-nav-toggle\">(this)"
10280
- },
10281
- {
10282
- "kind": "field",
10283
- "name": "focusableRef",
10284
- "privacy": "protected",
10285
- "inheritedFrom": {
10286
- "name": "FocusableMixin",
10287
- "module": "src/common/mixins/FocusableMixin.ts"
10288
- }
10289
- },
10290
- {
10291
- "kind": "method",
10292
- "name": "focus",
10293
- "parameters": [
10294
- {
10295
- "name": "options",
10296
- "optional": true,
10297
- "type": {
10298
- "text": "FocusOptions"
10299
- },
10300
- "description": "An object which controls aspects of the focusing process."
10301
- }
10302
- ],
10303
- "description": "Programmatically move focus to the component.",
10304
- "inheritedFrom": {
10305
- "name": "FocusableMixin",
10306
- "module": "src/common/mixins/FocusableMixin.ts"
10307
- }
10308
- },
10309
- {
10310
- "kind": "method",
10311
- "name": "blur",
10312
- "description": "Programmatically remove focus from the component.",
10313
- "inheritedFrom": {
10314
- "name": "FocusableMixin",
10315
- "module": "src/common/mixins/FocusableMixin.ts"
10316
- }
10317
- },
10318
- {
10319
- "kind": "method",
10320
- "name": "click",
10321
- "description": "Programmatically simulates a click on the component.",
10322
- "inheritedFrom": {
10323
- "name": "FocusableMixin",
10324
- "module": "src/common/mixins/FocusableMixin.ts"
10325
- }
10326
- }
10327
- ],
10328
- "mixins": [
10329
- {
10330
- "name": "FocusableMixin",
10331
- "module": "/src/common/mixins/FocusableMixin.js"
10332
- }
10333
- ],
10334
- "superclass": {
10335
- "name": "LitElement",
10336
- "package": "lit"
10337
- },
10338
- "localization": [
10339
- {
10340
- "name": "label",
10341
- "description": "Accessible label for the nav toggle button."
10342
- }
10343
- ],
10344
- "status": "new",
10345
- "category": "action",
10346
- "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 with the toggle that’s labelled as `Toggle navigation`.\n- We recommend setting a keyboard shortcut that toggles the navigation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic button or toggle. Use the [Button component](/components/button/) instead.\n\n</div>\n",
10347
- "examples": [],
10348
- "dependencies": [
10349
- "button",
10350
- "icon",
10351
- "visually-hidden"
10352
- ],
10353
- "tagName": "nord-nav-toggle",
10354
- "customElement": true
10355
- }
10356
- ],
10357
- "exports": [
10358
- {
10359
- "kind": "js",
10360
- "name": "default",
10361
- "declaration": {
10362
- "name": "NavToggle",
10363
- "module": "src/nav-toggle/NavToggle.ts"
10364
- }
10365
- },
10366
- {
10367
- "kind": "custom-element-definition",
10368
- "name": "nord-nav-toggle",
10369
- "declaration": {
10370
- "name": "NavToggle",
10371
- "module": "src/nav-toggle/NavToggle.ts"
10372
- }
10373
- }
10374
- ]
10375
- },
10376
- {
10377
- "kind": "javascript-module",
10378
- "path": "src/nav-toggle/localization.ts",
10379
- "declarations": [
10380
- {
10381
- "kind": "variable",
10382
- "name": "localization",
10383
- "type": {
10384
- "text": "object"
10385
- },
10386
- "default": "{\n label: \"Toggle navigation\",\n}"
10387
- }
10388
- ],
10389
- "exports": [
10390
- {
10391
- "kind": "js",
10392
- "name": "default",
10393
- "declaration": {
10394
- "name": "localization",
10395
- "module": "src/nav-toggle/localization.ts"
10396
- }
10397
- }
10398
- ]
10399
- },
10400
- {
10401
- "kind": "javascript-module",
10402
- "path": "src/navigation/Navigation.ts",
10403
- "declarations": [
10404
- {
10405
- "kind": "class",
10406
- "description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
10407
- "name": "Navigation",
10408
- "cssProperties": [
10513
+ "description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
10514
+ "name": "Navigation",
10515
+ "cssProperties": [
10409
10516
  {
10410
10517
  "description": "Controls the background color of the navigation element.",
10411
10518
  "name": "--n-navigation-background-color",
@@ -10527,93 +10634,6 @@
10527
10634
  }
10528
10635
  ]
10529
10636
  },
10530
- {
10531
- "kind": "javascript-module",
10532
- "path": "src/nav-group/NavGroup.ts",
10533
- "declarations": [
10534
- {
10535
- "kind": "class",
10536
- "description": "Navigation group includes all the actions or items in a single\ngroup and is used for grouping items into related categories.",
10537
- "name": "NavGroup",
10538
- "slots": [
10539
- {
10540
- "description": "The default slot used for the nav items.",
10541
- "name": ""
10542
- }
10543
- ],
10544
- "members": [
10545
- {
10546
- "kind": "field",
10547
- "name": "heading",
10548
- "type": {
10549
- "text": "string | undefined"
10550
- },
10551
- "description": "Heading and accessible label for the nav group",
10552
- "attribute": "heading",
10553
- "reflects": true
10554
- }
10555
- ],
10556
- "events": [
10557
- {
10558
- "type": {
10559
- "text": "NordEvent"
10560
- },
10561
- "description": "Dispatched whenever a nav item's state changes between open and closed.",
10562
- "name": "toggle"
10563
- },
10564
- {
10565
- "type": {
10566
- "text": "NordEvent"
10567
- },
10568
- "description": "Dispatched whenever a nav item has been marked as active",
10569
- "name": "activate"
10570
- }
10571
- ],
10572
- "attributes": [
10573
- {
10574
- "name": "heading",
10575
- "type": {
10576
- "text": "string | undefined"
10577
- },
10578
- "description": "Heading and accessible label for the nav group",
10579
- "fieldName": "heading"
10580
- }
10581
- ],
10582
- "superclass": {
10583
- "name": "LitElement",
10584
- "package": "lit"
10585
- },
10586
- "localization": [],
10587
- "status": "ready",
10588
- "category": "navigation",
10589
- "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item 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 item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
10590
- "examples": [],
10591
- "dependencies": [
10592
- "icon"
10593
- ],
10594
- "tagName": "nord-nav-group",
10595
- "customElement": true
10596
- }
10597
- ],
10598
- "exports": [
10599
- {
10600
- "kind": "js",
10601
- "name": "default",
10602
- "declaration": {
10603
- "name": "NavGroup",
10604
- "module": "src/nav-group/NavGroup.ts"
10605
- }
10606
- },
10607
- {
10608
- "kind": "custom-element-definition",
10609
- "name": "nord-nav-group",
10610
- "declaration": {
10611
- "name": "NavGroup",
10612
- "module": "src/nav-group/NavGroup.ts"
10613
- }
10614
- }
10615
- ]
10616
- },
10617
10637
  {
10618
10638
  "kind": "javascript-module",
10619
10639
  "path": "src/notification/Notification.ts",
@@ -10869,7 +10889,7 @@
10869
10889
  "kind": "field",
10870
10890
  "name": "dismiss",
10871
10891
  "privacy": "private",
10872
- "default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"mouseup\"),\n isDismissible: node => node !== this.popout && node !== this.targetElement,\n })",
10892
+ "default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"click\"),\n isDismissible: node => node !== this.popout && node !== this.targetElement,\n })",
10873
10893
  "description": "Handle dismissal of the popout, clicking outside the target button and popout."
10874
10894
  },
10875
10895
  {
@@ -11329,45 +11349,232 @@
11329
11349
  },
11330
11350
  {
11331
11351
  "kind": "javascript-module",
11332
- "path": "src/radio/Radio.ts",
11352
+ "path": "src/qrcode/Qrcode.ts",
11333
11353
  "declarations": [
11334
11354
  {
11335
11355
  "kind": "class",
11336
- "description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
11337
- "name": "Radio",
11338
- "slots": [
11339
- {
11340
- "description": "Use when a label requires more than plain text.",
11341
- "name": "label"
11342
- },
11343
- {
11344
- "description": "Optional slot that holds hint text for the input.",
11345
- "name": "hint"
11346
- },
11347
- {
11348
- "description": "Optional slot that holds error text for the input.",
11349
- "name": "error"
11350
- }
11351
- ],
11356
+ "description": "QR Code component is used for providing information or links\nto users which they can quickly scan with their smartphone.",
11357
+ "name": "Qrcode",
11352
11358
  "members": [
11353
11359
  {
11354
11360
  "kind": "field",
11355
- "name": "inputId",
11361
+ "name": "canvas",
11356
11362
  "type": {
11357
- "text": "string"
11363
+ "text": "HTMLElement"
11358
11364
  },
11359
- "privacy": "protected",
11360
- "default": "\"input\"",
11361
- "inheritedFrom": {
11362
- "name": "FormAssociatedMixin",
11363
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11364
- }
11365
+ "privacy": "private"
11365
11366
  },
11366
11367
  {
11367
11368
  "kind": "field",
11368
- "name": "hintId",
11369
+ "name": "computed",
11369
11370
  "type": {
11370
- "text": "string"
11371
+ "text": "HTMLElement"
11372
+ },
11373
+ "privacy": "private"
11374
+ },
11375
+ {
11376
+ "kind": "field",
11377
+ "name": "value",
11378
+ "type": {
11379
+ "text": "string"
11380
+ },
11381
+ "default": "\"\"",
11382
+ "description": "The value of the QR Code, most commonly an URL.",
11383
+ "attribute": "value",
11384
+ "reflects": true
11385
+ },
11386
+ {
11387
+ "kind": "field",
11388
+ "name": "label",
11389
+ "type": {
11390
+ "text": "string"
11391
+ },
11392
+ "default": "\"\"",
11393
+ "description": "Label used by assistive technology. If unspecified, the value will\nbe used instead.",
11394
+ "attribute": "label",
11395
+ "reflects": true
11396
+ },
11397
+ {
11398
+ "kind": "field",
11399
+ "name": "size",
11400
+ "type": {
11401
+ "text": "number"
11402
+ },
11403
+ "default": "128",
11404
+ "description": "The size of the rendered QR Code in pixels.",
11405
+ "attribute": "size",
11406
+ "reflects": true
11407
+ },
11408
+ {
11409
+ "kind": "field",
11410
+ "name": "color",
11411
+ "type": {
11412
+ "text": "string"
11413
+ },
11414
+ "default": "\"var(--n-color-text)\"",
11415
+ "description": "The fill color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
11416
+ "attribute": "color",
11417
+ "reflects": true
11418
+ },
11419
+ {
11420
+ "kind": "field",
11421
+ "name": "background",
11422
+ "type": {
11423
+ "text": "string"
11424
+ },
11425
+ "default": "\"var(--n-color-surface)\"",
11426
+ "description": "The background color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
11427
+ "attribute": "background",
11428
+ "reflects": true
11429
+ },
11430
+ {
11431
+ "kind": "field",
11432
+ "name": "correction",
11433
+ "type": {
11434
+ "text": "\"L\" | \"M\" | \"Q\" | \"H\""
11435
+ },
11436
+ "default": "\"H\"",
11437
+ "description": "Error correction level makes the QR Code bigger and helps users to\nscan it without issues. L, M, Q and H values will use 7%, 15%, 25%\nand 30% of the QR code for error correction respectively.",
11438
+ "attribute": "correction",
11439
+ "reflects": true
11440
+ },
11441
+ {
11442
+ "kind": "method",
11443
+ "name": "generate",
11444
+ "privacy": "private"
11445
+ }
11446
+ ],
11447
+ "attributes": [
11448
+ {
11449
+ "name": "value",
11450
+ "type": {
11451
+ "text": "string"
11452
+ },
11453
+ "default": "\"\"",
11454
+ "description": "The value of the QR Code, most commonly an URL.",
11455
+ "fieldName": "value"
11456
+ },
11457
+ {
11458
+ "name": "label",
11459
+ "type": {
11460
+ "text": "string"
11461
+ },
11462
+ "default": "\"\"",
11463
+ "description": "Label used by assistive technology. If unspecified, the value will\nbe used instead.",
11464
+ "fieldName": "label"
11465
+ },
11466
+ {
11467
+ "name": "size",
11468
+ "type": {
11469
+ "text": "number"
11470
+ },
11471
+ "default": "128",
11472
+ "description": "The size of the rendered QR Code in pixels.",
11473
+ "fieldName": "size"
11474
+ },
11475
+ {
11476
+ "name": "color",
11477
+ "type": {
11478
+ "text": "string"
11479
+ },
11480
+ "default": "\"var(--n-color-text)\"",
11481
+ "description": "The fill color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
11482
+ "fieldName": "color"
11483
+ },
11484
+ {
11485
+ "name": "background",
11486
+ "type": {
11487
+ "text": "string"
11488
+ },
11489
+ "default": "\"var(--n-color-surface)\"",
11490
+ "description": "The background color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
11491
+ "fieldName": "background"
11492
+ },
11493
+ {
11494
+ "name": "correction",
11495
+ "type": {
11496
+ "text": "\"L\" | \"M\" | \"Q\" | \"H\""
11497
+ },
11498
+ "default": "\"H\"",
11499
+ "description": "Error correction level makes the QR Code bigger and helps users to\nscan it without issues. L, M, Q and H values will use 7%, 15%, 25%\nand 30% of the QR code for error correction respectively.",
11500
+ "fieldName": "correction"
11501
+ }
11502
+ ],
11503
+ "superclass": {
11504
+ "name": "LitElement",
11505
+ "package": "lit"
11506
+ },
11507
+ "localization": [],
11508
+ "status": "ready",
11509
+ "category": "image",
11510
+ "displayName": "QR Code",
11511
+ "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 allow people to access information on their smartphone without the need to type.\n- Always provide an alternative way to access the same information.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide important information behind a QR Code only.\n\n</div>\n",
11512
+ "examples": [],
11513
+ "dependencies": [],
11514
+ "tagName": "nord-qrcode",
11515
+ "customElement": true
11516
+ }
11517
+ ],
11518
+ "exports": [
11519
+ {
11520
+ "kind": "js",
11521
+ "name": "default",
11522
+ "declaration": {
11523
+ "name": "Qrcode",
11524
+ "module": "src/qrcode/Qrcode.ts"
11525
+ }
11526
+ },
11527
+ {
11528
+ "kind": "custom-element-definition",
11529
+ "name": "nord-qrcode",
11530
+ "declaration": {
11531
+ "name": "Qrcode",
11532
+ "module": "src/qrcode/Qrcode.ts"
11533
+ }
11534
+ }
11535
+ ]
11536
+ },
11537
+ {
11538
+ "kind": "javascript-module",
11539
+ "path": "src/radio/Radio.ts",
11540
+ "declarations": [
11541
+ {
11542
+ "kind": "class",
11543
+ "description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
11544
+ "name": "Radio",
11545
+ "slots": [
11546
+ {
11547
+ "description": "Use when a label requires more than plain text.",
11548
+ "name": "label"
11549
+ },
11550
+ {
11551
+ "description": "Optional slot that holds hint text for the input.",
11552
+ "name": "hint"
11553
+ },
11554
+ {
11555
+ "description": "Optional slot that holds error text for the input.",
11556
+ "name": "error"
11557
+ }
11558
+ ],
11559
+ "members": [
11560
+ {
11561
+ "kind": "field",
11562
+ "name": "inputId",
11563
+ "type": {
11564
+ "text": "string"
11565
+ },
11566
+ "privacy": "protected",
11567
+ "default": "\"input\"",
11568
+ "inheritedFrom": {
11569
+ "name": "FormAssociatedMixin",
11570
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11571
+ }
11572
+ },
11573
+ {
11574
+ "kind": "field",
11575
+ "name": "hintId",
11576
+ "type": {
11577
+ "text": "string"
11371
11578
  },
11372
11579
  "privacy": "protected",
11373
11580
  "default": "\"hint\"",
@@ -12072,214 +12279,27 @@
12072
12279
  },
12073
12280
  {
12074
12281
  "kind": "javascript-module",
12075
- "path": "src/qrcode/Qrcode.ts",
12282
+ "path": "src/range/Range.ts",
12076
12283
  "declarations": [
12077
12284
  {
12078
12285
  "kind": "class",
12079
- "description": "QR Code component is used for providing information or links\nto users which they can quickly scan with their smartphone.",
12080
- "name": "Qrcode",
12081
- "members": [
12082
- {
12083
- "kind": "field",
12084
- "name": "canvas",
12085
- "type": {
12086
- "text": "HTMLElement"
12087
- },
12088
- "privacy": "private"
12089
- },
12286
+ "description": "Range input lets user specify a numeric value using a slider which\nmust be no less than a given value, and no more than another given value.",
12287
+ "name": "Range",
12288
+ "cssProperties": [
12090
12289
  {
12091
- "kind": "field",
12092
- "name": "computed",
12093
- "type": {
12094
- "text": "HTMLElement"
12095
- },
12096
- "privacy": "private"
12290
+ "description": "Controls the size of the thumb.",
12291
+ "name": "--n-range-thumb-size",
12292
+ "default": "20px"
12097
12293
  },
12098
12294
  {
12099
- "kind": "field",
12100
- "name": "value",
12101
- "type": {
12102
- "text": "string"
12103
- },
12104
- "default": "\"\"",
12105
- "description": "The value of the QR Code, most commonly an URL.",
12106
- "attribute": "value",
12107
- "reflects": true
12295
+ "description": "Controls the color of the portion of the track that represents the current value.",
12296
+ "name": "--n-range-track-color-active",
12297
+ "default": "var(--n-color-accent)"
12108
12298
  },
12109
12299
  {
12110
- "kind": "field",
12111
- "name": "label",
12112
- "type": {
12113
- "text": "string"
12114
- },
12115
- "default": "\"\"",
12116
- "description": "Label used by assistive technology. If unspecified, the value will\nbe used instead.",
12117
- "attribute": "label",
12118
- "reflects": true
12119
- },
12120
- {
12121
- "kind": "field",
12122
- "name": "size",
12123
- "type": {
12124
- "text": "number"
12125
- },
12126
- "default": "128",
12127
- "description": "The size of the rendered QR Code in pixels.",
12128
- "attribute": "size",
12129
- "reflects": true
12130
- },
12131
- {
12132
- "kind": "field",
12133
- "name": "color",
12134
- "type": {
12135
- "text": "string"
12136
- },
12137
- "default": "\"var(--n-color-text)\"",
12138
- "description": "The fill color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
12139
- "attribute": "color",
12140
- "reflects": true
12141
- },
12142
- {
12143
- "kind": "field",
12144
- "name": "background",
12145
- "type": {
12146
- "text": "string"
12147
- },
12148
- "default": "\"var(--n-color-surface)\"",
12149
- "description": "The background color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
12150
- "attribute": "background",
12151
- "reflects": true
12152
- },
12153
- {
12154
- "kind": "field",
12155
- "name": "correction",
12156
- "type": {
12157
- "text": "\"L\" | \"M\" | \"Q\" | \"H\""
12158
- },
12159
- "default": "\"H\"",
12160
- "description": "Error correction level makes the QR Code bigger and helps users to\nscan it without issues. L, M, Q and H values will use 7%, 15%, 25%\nand 30% of the QR code for error correction respectively.",
12161
- "attribute": "correction",
12162
- "reflects": true
12163
- },
12164
- {
12165
- "kind": "method",
12166
- "name": "generate",
12167
- "privacy": "private"
12168
- }
12169
- ],
12170
- "attributes": [
12171
- {
12172
- "name": "value",
12173
- "type": {
12174
- "text": "string"
12175
- },
12176
- "default": "\"\"",
12177
- "description": "The value of the QR Code, most commonly an URL.",
12178
- "fieldName": "value"
12179
- },
12180
- {
12181
- "name": "label",
12182
- "type": {
12183
- "text": "string"
12184
- },
12185
- "default": "\"\"",
12186
- "description": "Label used by assistive technology. If unspecified, the value will\nbe used instead.",
12187
- "fieldName": "label"
12188
- },
12189
- {
12190
- "name": "size",
12191
- "type": {
12192
- "text": "number"
12193
- },
12194
- "default": "128",
12195
- "description": "The size of the rendered QR Code in pixels.",
12196
- "fieldName": "size"
12197
- },
12198
- {
12199
- "name": "color",
12200
- "type": {
12201
- "text": "string"
12202
- },
12203
- "default": "\"var(--n-color-text)\"",
12204
- "description": "The fill color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
12205
- "fieldName": "color"
12206
- },
12207
- {
12208
- "name": "background",
12209
- "type": {
12210
- "text": "string"
12211
- },
12212
- "default": "\"var(--n-color-surface)\"",
12213
- "description": "The background color of the QR Code.\nCan accept any valid CSS color value, including custom properties.",
12214
- "fieldName": "background"
12215
- },
12216
- {
12217
- "name": "correction",
12218
- "type": {
12219
- "text": "\"L\" | \"M\" | \"Q\" | \"H\""
12220
- },
12221
- "default": "\"H\"",
12222
- "description": "Error correction level makes the QR Code bigger and helps users to\nscan it without issues. L, M, Q and H values will use 7%, 15%, 25%\nand 30% of the QR code for error correction respectively.",
12223
- "fieldName": "correction"
12224
- }
12225
- ],
12226
- "superclass": {
12227
- "name": "LitElement",
12228
- "package": "lit"
12229
- },
12230
- "localization": [],
12231
- "status": "ready",
12232
- "category": "image",
12233
- "displayName": "QR Code",
12234
- "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 allow people to access information on their smartphone without the need to type.\n- Always provide an alternative way to access the same information.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide important information behind a QR Code only.\n\n</div>\n",
12235
- "examples": [],
12236
- "dependencies": [],
12237
- "tagName": "nord-qrcode",
12238
- "customElement": true
12239
- }
12240
- ],
12241
- "exports": [
12242
- {
12243
- "kind": "js",
12244
- "name": "default",
12245
- "declaration": {
12246
- "name": "Qrcode",
12247
- "module": "src/qrcode/Qrcode.ts"
12248
- }
12249
- },
12250
- {
12251
- "kind": "custom-element-definition",
12252
- "name": "nord-qrcode",
12253
- "declaration": {
12254
- "name": "Qrcode",
12255
- "module": "src/qrcode/Qrcode.ts"
12256
- }
12257
- }
12258
- ]
12259
- },
12260
- {
12261
- "kind": "javascript-module",
12262
- "path": "src/range/Range.ts",
12263
- "declarations": [
12264
- {
12265
- "kind": "class",
12266
- "description": "Range input lets user specify a numeric value using a slider which\nmust be no less than a given value, and no more than another given value.",
12267
- "name": "Range",
12268
- "cssProperties": [
12269
- {
12270
- "description": "Controls the size of the thumb.",
12271
- "name": "--n-range-thumb-size",
12272
- "default": "20px"
12273
- },
12274
- {
12275
- "description": "Controls the color of the portion of the track that represents the current value.",
12276
- "name": "--n-range-track-color-active",
12277
- "default": "var(--n-color-accent)"
12278
- },
12279
- {
12280
- "description": "Controls the color of the portion of the track that represents the remaining value.",
12281
- "name": "--n-range-track-color-inactive",
12282
- "default": "var(--n-color-border-strong)"
12300
+ "description": "Controls the color of the portion of the track that represents the remaining value.",
12301
+ "name": "--n-range-track-color-inactive",
12302
+ "default": "var(--n-color-border-strong)"
12283
12303
  },
12284
12304
  {
12285
12305
  "description": "Controls the height of the track.",
@@ -14445,86 +14465,6 @@
14445
14465
  }
14446
14466
  ]
14447
14467
  },
14448
- {
14449
- "kind": "javascript-module",
14450
- "path": "src/skeleton/Skeleton.ts",
14451
- "declarations": [
14452
- {
14453
- "kind": "class",
14454
- "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
14455
- "name": "Skeleton",
14456
- "cssProperties": [
14457
- {
14458
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
14459
- "name": "--n-skeleton-border-radius",
14460
- "default": "var(--n-border-radius)"
14461
- },
14462
- {
14463
- "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
14464
- "name": "--n-skeleton-color",
14465
- "default": "var(--n-color-border)"
14466
- },
14467
- {
14468
- "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
14469
- "name": "--n-skeleton-sheen-color",
14470
- "default": "var(--n-color-border-strong)"
14471
- }
14472
- ],
14473
- "members": [
14474
- {
14475
- "kind": "field",
14476
- "name": "effect",
14477
- "type": {
14478
- "text": "\"pulse\" | \"sheen\" | undefined"
14479
- },
14480
- "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14481
- "attribute": "effect",
14482
- "reflects": true
14483
- }
14484
- ],
14485
- "attributes": [
14486
- {
14487
- "name": "effect",
14488
- "type": {
14489
- "text": "\"pulse\" | \"sheen\" | undefined"
14490
- },
14491
- "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14492
- "fieldName": "effect"
14493
- }
14494
- ],
14495
- "superclass": {
14496
- "name": "LitElement",
14497
- "package": "lit"
14498
- },
14499
- "localization": [],
14500
- "status": "new",
14501
- "category": "feedback",
14502
- "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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n",
14503
- "examples": [],
14504
- "dependencies": [],
14505
- "tagName": "nord-skeleton",
14506
- "customElement": true
14507
- }
14508
- ],
14509
- "exports": [
14510
- {
14511
- "kind": "js",
14512
- "name": "default",
14513
- "declaration": {
14514
- "name": "Skeleton",
14515
- "module": "src/skeleton/Skeleton.ts"
14516
- }
14517
- },
14518
- {
14519
- "kind": "custom-element-definition",
14520
- "name": "nord-skeleton",
14521
- "declaration": {
14522
- "name": "Skeleton",
14523
- "module": "src/skeleton/Skeleton.ts"
14524
- }
14525
- }
14526
- ]
14527
- },
14528
14468
  {
14529
14469
  "kind": "javascript-module",
14530
14470
  "path": "src/spinner/Spinner.ts",
@@ -14791,17 +14731,97 @@
14791
14731
  },
14792
14732
  {
14793
14733
  "kind": "javascript-module",
14794
- "path": "src/tab/Tab.ts",
14734
+ "path": "src/skeleton/Skeleton.ts",
14795
14735
  "declarations": [
14796
14736
  {
14797
14737
  "kind": "class",
14798
- "description": "The interactive tab button for use within the tab group component.",
14799
- "name": "Tab",
14738
+ "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
14739
+ "name": "Skeleton",
14800
14740
  "cssProperties": [
14801
14741
  {
14802
- "description": "Controls the text color of the tab, using our [color tokens](/tokens/#color).",
14803
- "name": "--n-tab-color",
14804
- "default": "var(--n-color-text-weak)"
14742
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
14743
+ "name": "--n-skeleton-border-radius",
14744
+ "default": "var(--n-border-radius)"
14745
+ },
14746
+ {
14747
+ "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
14748
+ "name": "--n-skeleton-color",
14749
+ "default": "var(--n-color-border)"
14750
+ },
14751
+ {
14752
+ "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
14753
+ "name": "--n-skeleton-sheen-color",
14754
+ "default": "var(--n-color-border-strong)"
14755
+ }
14756
+ ],
14757
+ "members": [
14758
+ {
14759
+ "kind": "field",
14760
+ "name": "effect",
14761
+ "type": {
14762
+ "text": "\"pulse\" | \"sheen\" | undefined"
14763
+ },
14764
+ "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14765
+ "attribute": "effect",
14766
+ "reflects": true
14767
+ }
14768
+ ],
14769
+ "attributes": [
14770
+ {
14771
+ "name": "effect",
14772
+ "type": {
14773
+ "text": "\"pulse\" | \"sheen\" | undefined"
14774
+ },
14775
+ "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14776
+ "fieldName": "effect"
14777
+ }
14778
+ ],
14779
+ "superclass": {
14780
+ "name": "LitElement",
14781
+ "package": "lit"
14782
+ },
14783
+ "localization": [],
14784
+ "status": "new",
14785
+ "category": "feedback",
14786
+ "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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n",
14787
+ "examples": [],
14788
+ "dependencies": [],
14789
+ "tagName": "nord-skeleton",
14790
+ "customElement": true
14791
+ }
14792
+ ],
14793
+ "exports": [
14794
+ {
14795
+ "kind": "js",
14796
+ "name": "default",
14797
+ "declaration": {
14798
+ "name": "Skeleton",
14799
+ "module": "src/skeleton/Skeleton.ts"
14800
+ }
14801
+ },
14802
+ {
14803
+ "kind": "custom-element-definition",
14804
+ "name": "nord-skeleton",
14805
+ "declaration": {
14806
+ "name": "Skeleton",
14807
+ "module": "src/skeleton/Skeleton.ts"
14808
+ }
14809
+ }
14810
+ ]
14811
+ },
14812
+ {
14813
+ "kind": "javascript-module",
14814
+ "path": "src/tab/Tab.ts",
14815
+ "declarations": [
14816
+ {
14817
+ "kind": "class",
14818
+ "description": "The interactive tab button for use within the tab group component.",
14819
+ "name": "Tab",
14820
+ "cssProperties": [
14821
+ {
14822
+ "description": "Controls the text color of the tab, using our [color tokens](/tokens/#color).",
14823
+ "name": "--n-tab-color",
14824
+ "default": "var(--n-color-text-weak)"
14805
14825
  },
14806
14826
  {
14807
14827
  "description": "Controls the font weight of the tab, using our [font tokens](/tokens/#font).",
@@ -15178,158 +15198,6 @@
15178
15198
  }
15179
15199
  ]
15180
15200
  },
15181
- {
15182
- "kind": "javascript-module",
15183
- "path": "src/table/Table.ts",
15184
- "declarations": [
15185
- {
15186
- "kind": "class",
15187
- "description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
15188
- "name": "Table",
15189
- "cssProperties": [
15190
- {
15191
- "description": "Controls the padding around the table cells.",
15192
- "name": "--n-table-td-padding",
15193
- "default": "calc(var(--n-space-m) * 0.95)"
15194
- },
15195
- {
15196
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
15197
- "name": "--n-table-border-radius",
15198
- "default": "var(--n-border-radius-s)"
15199
- }
15200
- ],
15201
- "slots": [
15202
- {
15203
- "description": "Default slot which holds the HTML `<table>` element.",
15204
- "name": ""
15205
- }
15206
- ],
15207
- "members": [
15208
- {
15209
- "kind": "field",
15210
- "name": "density",
15211
- "type": {
15212
- "text": "\"condensed\" | \"default\" | \"relaxed\""
15213
- },
15214
- "default": "\"default\"",
15215
- "description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
15216
- "attribute": "density",
15217
- "reflects": true
15218
- },
15219
- {
15220
- "kind": "field",
15221
- "name": "scrollSnap",
15222
- "type": {
15223
- "text": "boolean"
15224
- },
15225
- "default": "false",
15226
- "description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
15227
- "attribute": "scroll-snap",
15228
- "reflects": true
15229
- },
15230
- {
15231
- "kind": "field",
15232
- "name": "striped",
15233
- "type": {
15234
- "text": "boolean"
15235
- },
15236
- "default": "false",
15237
- "description": "Controls whether to use zebra striping on tables, which can improve readability.",
15238
- "attribute": "striped",
15239
- "reflects": true
15240
- },
15241
- {
15242
- "kind": "method",
15243
- "name": "renderStyles",
15244
- "privacy": "private",
15245
- "description": "renders table styles into nearest root.\nthis is necessary since we do not use shadow dom."
15246
- },
15247
- {
15248
- "kind": "method",
15249
- "name": "createRenderRoot",
15250
- "privacy": "protected",
15251
- "description": "opt out of shadow dom"
15252
- }
15253
- ],
15254
- "attributes": [
15255
- {
15256
- "name": "density",
15257
- "type": {
15258
- "text": "\"condensed\" | \"default\" | \"relaxed\""
15259
- },
15260
- "default": "\"default\"",
15261
- "description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
15262
- "fieldName": "density"
15263
- },
15264
- {
15265
- "name": "scroll-snap",
15266
- "type": {
15267
- "text": "boolean"
15268
- },
15269
- "default": "false",
15270
- "description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
15271
- "fieldName": "scrollSnap"
15272
- },
15273
- {
15274
- "name": "striped",
15275
- "type": {
15276
- "text": "boolean"
15277
- },
15278
- "default": "false",
15279
- "description": "Controls whether to use zebra striping on tables, which can improve readability.",
15280
- "fieldName": "striped"
15281
- }
15282
- ],
15283
- "superclass": {
15284
- "name": "LitElement",
15285
- "package": "lit"
15286
- },
15287
- "localization": [],
15288
- "status": "ready",
15289
- "category": "list",
15290
- "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 when you need to display tabular data in a view.\n- Use a `<table>` element directly within the component.\n- Use inside a [Card](/components/card/?example=with+table), and give the card a header.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use to display basic key and value pairs, consider a [description list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) instead.\n- Don’t use tables for layout.\n- Don't use a primary button in every row of a table.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, 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 account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated _wrapper_ component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- Despite the name the Nord table component does not supplement the HTML `<table>` element. Please ensure that a `<table>` element is a direct descendant of the table component.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that [HTML tables have a large feature set](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) which cannot be fully covered in this documentation.\n- When making adjustments to table columns such as width, color, alignment and other styles please consider using the HTML `<col>` and `<colgroup>` elements for applying them. Further information on the `<col>` and `<colgroup>` elements can be [found in the MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col).\n\n---\n\n## Advanced use-cases\n\nThe table component itself does not provide any functionality, only styles. This works well for simple or static tables, but there are instances where functionality such as sorting, resizing, or column dragging are required. This kind of functionality is out of scope for the table component, as the spectrum of possible use-cases is too broad for a single component to cover effectively. Whilst the table component is limited out of the box, these same limitations make it easy to integrate with third-party libraries which offer advanced functionality.\n\nBroadly speaking, there are two categories of library for building advanced tables: _headless_ and _component-based_.\n\n### Which kind of table library should I use?\n\nEach approach has subtle tradeoffs. Understanding these subtleties will help you make the right decision for your application and team.\n\n#### Component-based Table Libraries\n\nComponent-based table libraries will typically supply you with a feature-rich drop-in solution, and ready-to-use components/markup complete with styles/theming.\n\n**Pros:**\n\n- Ship with ready-to-use markup/styles.\n- Little setup required.\n- Turn-key experience.\n\n**Cons:**\n\n- Less control over markup.\n- Custom styles are typically theme-based.\n- Larger bundle-sizes.\n\nIf you want a ready-to-use table and design/bundle-size are not hard requirements, then you should consider using a component-based table library.\n\n#### Headless Table Libraries\n\nHeadless table libraries will typically supply you with functions, state, utilities and event listeners to build your own table markup or attach to existing table markups.\n\n**Pros:**\n\n- Full control over markup and styles.\n- Supports all styling patterns (CSS, CSS-in-JS, UI libraries, etc).\n- Smaller bundle-sizes.\n\n**Cons:**\n\n- More setup and effort required.\n- No markup, styles or themes provided.\n\nIf you want a lighter-weight table or full control over the design, then you should consider using a headless table library.\n\n### Recommendation for headless libraries\n\nIn the headless category, we recommend [Tanstack Table](https://tanstack.com/table/). Tanstack table offers integrations for many UI frameworks, such as Vue and React. It is easy to work with, and because it does not bring any HTML or styles itself, you can use it to render a plain, semantic `<table>` wrapped in a `<nord-table>`, and you will get all the necessary styles.\n\nWe have created examples in both Vue and React, showing how to combine Tanstack table with Nord's table component, in order to build a table with both sorting and resizable columns. Check out the [React example](/components/table/?example=with+react+and+tanstack+table) and likewise the [Vue example](/components/table/?example=with+vue+and+tanstack+table).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / Tanstack table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / Tanstack table source\n </nord-button>\n</nord-stack>\n\n### Recommendation for component-based libraries\n\nIn the component-based category, we recommend [AG Grid](https://www.ag-grid.com/), specifically the community edition. AG Grid is feature-rich, has extensive documentation, and offers integrations for many UI frameworks, such as Vue and React. AG Grid takes control of all rendering and output, but offers extension points for taking control of some aspects. It does not output a `<table>` element, so it cannot be used with Nord's own table component.\n\nHowever it can be styled via themes, and we have created a Nord theme using our design tokens. The theme is published on npm as `@nordhealth/ag-theme-nord`. To use the theme, include the CSS in your project and add the class `ag-theme-nord` to the element wrapping AG Grid.\n\nWe have created examples in both Vue and React showing how to combine AG Grid with Nord's theme, in order to build a table with sorting, resizable columns, draggable and re-orderable columns, plus sticky/pinned columns. Check out the [React example](/components/table/?example=with+react+and+ag+grid) and likewise the [Vue example](/components/table/?example=with+vue+and+ag+grid).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l n-margin-be-s\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / AG Grid table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / AG Grid table source\n </nord-button>\n</nord-stack>\n",
15291
- "examples": [
15292
- {
15293
- "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview",
15294
- "name": "with react and tanstack table"
15295
- },
15296
- {
15297
- "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview",
15298
- "name": "with react and ag grid"
15299
- },
15300
- {
15301
- "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview",
15302
- "name": "with vue and tanstack table"
15303
- },
15304
- {
15305
- "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview",
15306
- "name": "with vue and ag grid"
15307
- }
15308
- ],
15309
- "dependencies": [],
15310
- "tagName": "nord-table",
15311
- "customElement": true
15312
- }
15313
- ],
15314
- "exports": [
15315
- {
15316
- "kind": "js",
15317
- "name": "default",
15318
- "declaration": {
15319
- "name": "Table",
15320
- "module": "src/table/Table.ts"
15321
- }
15322
- },
15323
- {
15324
- "kind": "custom-element-definition",
15325
- "name": "nord-table",
15326
- "declaration": {
15327
- "name": "Table",
15328
- "module": "src/table/Table.ts"
15329
- }
15330
- }
15331
- ]
15332
- },
15333
15201
  {
15334
15202
  "kind": "javascript-module",
15335
15203
  "path": "src/tag/Tag.ts",
@@ -15725,7 +15593,374 @@
15725
15593
  "dependencies": [
15726
15594
  "icon"
15727
15595
  ],
15728
- "tagName": "nord-tag",
15596
+ "tagName": "nord-tag",
15597
+ "customElement": true
15598
+ }
15599
+ ],
15600
+ "exports": [
15601
+ {
15602
+ "kind": "js",
15603
+ "name": "default",
15604
+ "declaration": {
15605
+ "name": "Tag",
15606
+ "module": "src/tag/Tag.ts"
15607
+ }
15608
+ },
15609
+ {
15610
+ "kind": "custom-element-definition",
15611
+ "name": "nord-tag",
15612
+ "declaration": {
15613
+ "name": "Tag",
15614
+ "module": "src/tag/Tag.ts"
15615
+ }
15616
+ }
15617
+ ]
15618
+ },
15619
+ {
15620
+ "kind": "javascript-module",
15621
+ "path": "src/tag/localization.ts",
15622
+ "declarations": [
15623
+ {
15624
+ "kind": "variable",
15625
+ "name": "localization",
15626
+ "type": {
15627
+ "text": "object"
15628
+ },
15629
+ "default": "{\n removeLabel: \"Remove\",\n}"
15630
+ }
15631
+ ],
15632
+ "exports": [
15633
+ {
15634
+ "kind": "js",
15635
+ "name": "default",
15636
+ "declaration": {
15637
+ "name": "localization",
15638
+ "module": "src/tag/localization.ts"
15639
+ }
15640
+ }
15641
+ ]
15642
+ },
15643
+ {
15644
+ "kind": "javascript-module",
15645
+ "path": "src/tag-group/TagGroup.ts",
15646
+ "declarations": [
15647
+ {
15648
+ "kind": "class",
15649
+ "description": "Tag groups are designed to bring together selectable tags that are of a similar nature. For example categories you can filter by.",
15650
+ "name": "TagGroup",
15651
+ "cssProperties": [
15652
+ {
15653
+ "description": "Controls the rounded corners of the tag group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
15654
+ "name": "--n-tag-group-border-radius",
15655
+ "default": "var(--n-border-radius-s)"
15656
+ },
15657
+ {
15658
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
15659
+ "name": "--n-tag-group-box-shadow",
15660
+ "default": "var(--n-box-shadow)"
15661
+ }
15662
+ ],
15663
+ "slots": [
15664
+ {
15665
+ "description": "The tag group content",
15666
+ "name": ""
15667
+ }
15668
+ ],
15669
+ "members": [
15670
+ {
15671
+ "kind": "field",
15672
+ "name": "defaultSlot",
15673
+ "privacy": "private",
15674
+ "default": "new SlotController(this)"
15675
+ },
15676
+ {
15677
+ "kind": "field",
15678
+ "name": "dirController",
15679
+ "privacy": "private",
15680
+ "default": "new DirectionController(this)"
15681
+ },
15682
+ {
15683
+ "kind": "field",
15684
+ "name": "variant",
15685
+ "type": {
15686
+ "text": "\"default\" | \"spaced\""
15687
+ },
15688
+ "default": "\"default\"",
15689
+ "description": "The style variant of the tag group.",
15690
+ "attribute": "variant",
15691
+ "reflects": true
15692
+ },
15693
+ {
15694
+ "kind": "field",
15695
+ "name": "direction",
15696
+ "type": {
15697
+ "text": "\"vertical\" | \"horizontal\""
15698
+ },
15699
+ "default": "\"horizontal\"",
15700
+ "description": "The direction of the tag group.",
15701
+ "attribute": "direction",
15702
+ "reflects": true
15703
+ },
15704
+ {
15705
+ "kind": "field",
15706
+ "name": "wrap",
15707
+ "type": {
15708
+ "text": "boolean"
15709
+ },
15710
+ "default": "false",
15711
+ "description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
15712
+ "attribute": "wrap",
15713
+ "reflects": true
15714
+ },
15715
+ {
15716
+ "kind": "field",
15717
+ "name": "role",
15718
+ "type": {
15719
+ "text": "string"
15720
+ },
15721
+ "default": "\"group\"",
15722
+ "description": "The appropriate role for the containing element.",
15723
+ "attribute": "role",
15724
+ "reflects": true
15725
+ },
15726
+ {
15727
+ "kind": "field",
15728
+ "name": "_warningLogged",
15729
+ "type": {
15730
+ "text": "boolean"
15731
+ },
15732
+ "privacy": "private",
15733
+ "static": true,
15734
+ "default": "false",
15735
+ "inheritedFrom": {
15736
+ "name": "DraftComponentMixin",
15737
+ "module": "src/common/mixins/DraftComponentMixin.ts"
15738
+ }
15739
+ }
15740
+ ],
15741
+ "events": [
15742
+ {
15743
+ "type": {
15744
+ "text": "NordEvent"
15745
+ },
15746
+ "description": "Fired whenever a tag has been checked or unchecked via user interaction.",
15747
+ "name": "change"
15748
+ },
15749
+ {
15750
+ "type": {
15751
+ "text": "NordEvent"
15752
+ },
15753
+ "description": "Fired when the remove button is activated on a tag. This event should be used to remove the tag from the DOM.",
15754
+ "name": "remove"
15755
+ }
15756
+ ],
15757
+ "attributes": [
15758
+ {
15759
+ "name": "variant",
15760
+ "type": {
15761
+ "text": "\"default\" | \"spaced\""
15762
+ },
15763
+ "default": "\"default\"",
15764
+ "description": "The style variant of the tag group.",
15765
+ "fieldName": "variant"
15766
+ },
15767
+ {
15768
+ "name": "direction",
15769
+ "type": {
15770
+ "text": "\"vertical\" | \"horizontal\""
15771
+ },
15772
+ "default": "\"horizontal\"",
15773
+ "description": "The direction of the tag group.",
15774
+ "fieldName": "direction"
15775
+ },
15776
+ {
15777
+ "name": "wrap",
15778
+ "type": {
15779
+ "text": "boolean"
15780
+ },
15781
+ "default": "false",
15782
+ "description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
15783
+ "fieldName": "wrap"
15784
+ },
15785
+ {
15786
+ "name": "role",
15787
+ "type": {
15788
+ "text": "string"
15789
+ },
15790
+ "default": "\"group\"",
15791
+ "description": "The appropriate role for the containing element.",
15792
+ "fieldName": "role"
15793
+ }
15794
+ ],
15795
+ "mixins": [
15796
+ {
15797
+ "name": "DraftComponentMixin",
15798
+ "module": "/src/common/mixins/DraftComponentMixin.js"
15799
+ }
15800
+ ],
15801
+ "superclass": {
15802
+ "name": "LitElement",
15803
+ "package": "lit"
15804
+ },
15805
+ "localization": [],
15806
+ "status": "draft",
15807
+ "category": "structure",
15808
+ "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 selectable tags.\n- Use the appropriate `role` attribute on the tag group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the tag group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than selectable tags and in some instances visually hidden components to the tag 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\nTags should use short and clear labels for easy scanning. They should be concise and informative:\n\n<div class=\"n-usage n-usage-do\">Has seizures</div>\n<div class=\"n-usage n-usage-dont\">This dog has seizures often</div>\n\nWhen writing tag 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\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">Service Dog</div>\n\nAvoid unnecessary words and articles in tag labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">A service dog</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 tags to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the tags to space them out evenly. |\n",
15809
+ "examples": [],
15810
+ "dependencies": [],
15811
+ "tagName": "nord-tag-group",
15812
+ "customElement": true
15813
+ }
15814
+ ],
15815
+ "exports": [
15816
+ {
15817
+ "kind": "js",
15818
+ "name": "default",
15819
+ "declaration": {
15820
+ "name": "TagGroup",
15821
+ "module": "src/tag-group/TagGroup.ts"
15822
+ }
15823
+ },
15824
+ {
15825
+ "kind": "custom-element-definition",
15826
+ "name": "nord-tag-group",
15827
+ "declaration": {
15828
+ "name": "TagGroup",
15829
+ "module": "src/tag-group/TagGroup.ts"
15830
+ }
15831
+ }
15832
+ ]
15833
+ },
15834
+ {
15835
+ "kind": "javascript-module",
15836
+ "path": "src/table/Table.ts",
15837
+ "declarations": [
15838
+ {
15839
+ "kind": "class",
15840
+ "description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
15841
+ "name": "Table",
15842
+ "cssProperties": [
15843
+ {
15844
+ "description": "Controls the padding around the table cells.",
15845
+ "name": "--n-table-td-padding",
15846
+ "default": "calc(var(--n-space-m) * 0.95)"
15847
+ },
15848
+ {
15849
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
15850
+ "name": "--n-table-border-radius",
15851
+ "default": "var(--n-border-radius-s)"
15852
+ }
15853
+ ],
15854
+ "slots": [
15855
+ {
15856
+ "description": "Default slot which holds the HTML `<table>` element.",
15857
+ "name": ""
15858
+ }
15859
+ ],
15860
+ "members": [
15861
+ {
15862
+ "kind": "field",
15863
+ "name": "density",
15864
+ "type": {
15865
+ "text": "\"condensed\" | \"default\" | \"relaxed\""
15866
+ },
15867
+ "default": "\"default\"",
15868
+ "description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
15869
+ "attribute": "density",
15870
+ "reflects": true
15871
+ },
15872
+ {
15873
+ "kind": "field",
15874
+ "name": "scrollSnap",
15875
+ "type": {
15876
+ "text": "boolean"
15877
+ },
15878
+ "default": "false",
15879
+ "description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
15880
+ "attribute": "scroll-snap",
15881
+ "reflects": true
15882
+ },
15883
+ {
15884
+ "kind": "field",
15885
+ "name": "striped",
15886
+ "type": {
15887
+ "text": "boolean"
15888
+ },
15889
+ "default": "false",
15890
+ "description": "Controls whether to use zebra striping on tables, which can improve readability.",
15891
+ "attribute": "striped",
15892
+ "reflects": true
15893
+ },
15894
+ {
15895
+ "kind": "method",
15896
+ "name": "renderStyles",
15897
+ "privacy": "private",
15898
+ "description": "renders table styles into nearest root.\nthis is necessary since we do not use shadow dom."
15899
+ },
15900
+ {
15901
+ "kind": "method",
15902
+ "name": "createRenderRoot",
15903
+ "privacy": "protected",
15904
+ "description": "opt out of shadow dom"
15905
+ }
15906
+ ],
15907
+ "attributes": [
15908
+ {
15909
+ "name": "density",
15910
+ "type": {
15911
+ "text": "\"condensed\" | \"default\" | \"relaxed\""
15912
+ },
15913
+ "default": "\"default\"",
15914
+ "description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
15915
+ "fieldName": "density"
15916
+ },
15917
+ {
15918
+ "name": "scroll-snap",
15919
+ "type": {
15920
+ "text": "boolean"
15921
+ },
15922
+ "default": "false",
15923
+ "description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
15924
+ "fieldName": "scrollSnap"
15925
+ },
15926
+ {
15927
+ "name": "striped",
15928
+ "type": {
15929
+ "text": "boolean"
15930
+ },
15931
+ "default": "false",
15932
+ "description": "Controls whether to use zebra striping on tables, which can improve readability.",
15933
+ "fieldName": "striped"
15934
+ }
15935
+ ],
15936
+ "superclass": {
15937
+ "name": "LitElement",
15938
+ "package": "lit"
15939
+ },
15940
+ "localization": [],
15941
+ "status": "ready",
15942
+ "category": "list",
15943
+ "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 when you need to display tabular data in a view.\n- Use a `<table>` element directly within the component.\n- Use inside a [Card](/components/card/?example=with+table), and give the card a header.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use to display basic key and value pairs, consider a [description list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) instead.\n- Don’t use tables for layout.\n- Don't use a primary button in every row of a table.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, 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 account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated _wrapper_ component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- Despite the name the Nord table component does not supplement the HTML `<table>` element. Please ensure that a `<table>` element is a direct descendant of the table component.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that [HTML tables have a large feature set](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) which cannot be fully covered in this documentation.\n- When making adjustments to table columns such as width, color, alignment and other styles please consider using the HTML `<col>` and `<colgroup>` elements for applying them. Further information on the `<col>` and `<colgroup>` elements can be [found in the MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col).\n\n---\n\n## Advanced use-cases\n\nThe table component itself does not provide any functionality, only styles. This works well for simple or static tables, but there are instances where functionality such as sorting, resizing, or column dragging are required. This kind of functionality is out of scope for the table component, as the spectrum of possible use-cases is too broad for a single component to cover effectively. Whilst the table component is limited out of the box, these same limitations make it easy to integrate with third-party libraries which offer advanced functionality.\n\nBroadly speaking, there are two categories of library for building advanced tables: _headless_ and _component-based_.\n\n### Which kind of table library should I use?\n\nEach approach has subtle tradeoffs. Understanding these subtleties will help you make the right decision for your application and team.\n\n#### Component-based Table Libraries\n\nComponent-based table libraries will typically supply you with a feature-rich drop-in solution, and ready-to-use components/markup complete with styles/theming.\n\n**Pros:**\n\n- Ship with ready-to-use markup/styles.\n- Little setup required.\n- Turn-key experience.\n\n**Cons:**\n\n- Less control over markup.\n- Custom styles are typically theme-based.\n- Larger bundle-sizes.\n\nIf you want a ready-to-use table and design/bundle-size are not hard requirements, then you should consider using a component-based table library.\n\n#### Headless Table Libraries\n\nHeadless table libraries will typically supply you with functions, state, utilities and event listeners to build your own table markup or attach to existing table markups.\n\n**Pros:**\n\n- Full control over markup and styles.\n- Supports all styling patterns (CSS, CSS-in-JS, UI libraries, etc).\n- Smaller bundle-sizes.\n\n**Cons:**\n\n- More setup and effort required.\n- No markup, styles or themes provided.\n\nIf you want a lighter-weight table or full control over the design, then you should consider using a headless table library.\n\n### Recommendation for headless libraries\n\nIn the headless category, we recommend [Tanstack Table](https://tanstack.com/table/). Tanstack table offers integrations for many UI frameworks, such as Vue and React. It is easy to work with, and because it does not bring any HTML or styles itself, you can use it to render a plain, semantic `<table>` wrapped in a `<nord-table>`, and you will get all the necessary styles.\n\nWe have created examples in both Vue and React, showing how to combine Tanstack table with Nord's table component, in order to build a table with both sorting and resizable columns. Check out the [React example](/components/table/?example=with+react+and+tanstack+table) and likewise the [Vue example](/components/table/?example=with+vue+and+tanstack+table).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / Tanstack table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / Tanstack table source\n </nord-button>\n</nord-stack>\n\n### Recommendation for component-based libraries\n\nIn the component-based category, we recommend [AG Grid](https://www.ag-grid.com/), specifically the community edition. AG Grid is feature-rich, has extensive documentation, and offers integrations for many UI frameworks, such as Vue and React. AG Grid takes control of all rendering and output, but offers extension points for taking control of some aspects. It does not output a `<table>` element, so it cannot be used with Nord's own table component.\n\nHowever it can be styled via themes, and we have created a Nord theme using our design tokens. The theme is published on npm as `@nordhealth/ag-theme-nord`. To use the theme, include the CSS in your project and add the class `ag-theme-nord` to the element wrapping AG Grid.\n\nWe have created examples in both Vue and React showing how to combine AG Grid with Nord's theme, in order to build a table with sorting, resizable columns, draggable and re-orderable columns, plus sticky/pinned columns. Check out the [React example](/components/table/?example=with+react+and+ag+grid) and likewise the [Vue example](/components/table/?example=with+vue+and+ag+grid).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l n-margin-be-s\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / AG Grid table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / AG Grid table source\n </nord-button>\n</nord-stack>\n",
15944
+ "examples": [
15945
+ {
15946
+ "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview",
15947
+ "name": "with react and tanstack table"
15948
+ },
15949
+ {
15950
+ "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview",
15951
+ "name": "with react and ag grid"
15952
+ },
15953
+ {
15954
+ "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview",
15955
+ "name": "with vue and tanstack table"
15956
+ },
15957
+ {
15958
+ "url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview",
15959
+ "name": "with vue and ag grid"
15960
+ }
15961
+ ],
15962
+ "dependencies": [],
15963
+ "tagName": "nord-table",
15729
15964
  "customElement": true
15730
15965
  }
15731
15966
  ],
@@ -15734,40 +15969,16 @@
15734
15969
  "kind": "js",
15735
15970
  "name": "default",
15736
15971
  "declaration": {
15737
- "name": "Tag",
15738
- "module": "src/tag/Tag.ts"
15972
+ "name": "Table",
15973
+ "module": "src/table/Table.ts"
15739
15974
  }
15740
15975
  },
15741
15976
  {
15742
15977
  "kind": "custom-element-definition",
15743
- "name": "nord-tag",
15744
- "declaration": {
15745
- "name": "Tag",
15746
- "module": "src/tag/Tag.ts"
15747
- }
15748
- }
15749
- ]
15750
- },
15751
- {
15752
- "kind": "javascript-module",
15753
- "path": "src/tag/localization.ts",
15754
- "declarations": [
15755
- {
15756
- "kind": "variable",
15757
- "name": "localization",
15758
- "type": {
15759
- "text": "object"
15760
- },
15761
- "default": "{\n removeLabel: \"Remove\",\n}"
15762
- }
15763
- ],
15764
- "exports": [
15765
- {
15766
- "kind": "js",
15767
- "name": "default",
15978
+ "name": "nord-table",
15768
15979
  "declaration": {
15769
- "name": "localization",
15770
- "module": "src/tag/localization.ts"
15980
+ "name": "Table",
15981
+ "module": "src/table/Table.ts"
15771
15982
  }
15772
15983
  }
15773
15984
  ]
@@ -16757,257 +16968,42 @@
16757
16968
  "module": "/src/common/mixins/FormAssociatedMixin.js"
16758
16969
  },
16759
16970
  {
16760
- "name": "AutocompleteMixin",
16761
- "module": "/src/common/mixins/AutocompleteMixin.js"
16762
- },
16763
- {
16764
- "name": "ReadonlyMixin",
16765
- "module": "/src/common/mixins/ReadonlyMixin.js"
16766
- },
16767
- {
16768
- "name": "TextSelectableMixin",
16769
- "module": "/src/common/mixins/TextSelectableMixin.js"
16770
- },
16771
- {
16772
- "name": "InputMixin",
16773
- "module": "/src/common/mixins/InputMixin.js"
16774
- },
16775
- {
16776
- "name": "FocusableMixin",
16777
- "module": "/src/common/mixins/FocusableMixin.js"
16778
- }
16779
- ],
16780
- "superclass": {
16781
- "name": "LitElement",
16782
- "package": "lit"
16783
- },
16784
- "localization": [
16785
- {
16786
- "name": "remainingCharacters",
16787
- "description": "A function which receives the number of remaining characters and returns a string to be used as the aria-live message."
16788
- }
16789
- ],
16790
- "status": "ready",
16791
- "category": "form",
16792
- "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 allow text input where the expected input is long.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is short. Use input component instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nTextarea labels act as a title for the text field. Labels should typically be short and in noun&nbsp;form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing textarea 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\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide Description</div>\n\nWhen a textarea isn’t part of a form and is placed individually on a page, you could provide the textarea label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in textarea labels:\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide description:</div>\n",
16793
- "examples": [],
16794
- "dependencies": [],
16795
- "tagName": "nord-textarea",
16796
- "customElement": true
16797
- }
16798
- ],
16799
- "exports": [
16800
- {
16801
- "kind": "js",
16802
- "name": "default",
16803
- "declaration": {
16804
- "name": "Textarea",
16805
- "module": "src/textarea/Textarea.ts"
16806
- }
16807
- },
16808
- {
16809
- "kind": "custom-element-definition",
16810
- "name": "nord-textarea",
16811
- "declaration": {
16812
- "name": "Textarea",
16813
- "module": "src/textarea/Textarea.ts"
16814
- }
16815
- }
16816
- ]
16817
- },
16818
- {
16819
- "kind": "javascript-module",
16820
- "path": "src/textarea/localization.ts",
16821
- "declarations": [
16822
- {
16823
- "kind": "variable",
16824
- "name": "localization",
16825
- "type": {
16826
- "text": "object"
16827
- },
16828
- "default": "{\n remainingCharacters: (remainder: number) => `Characters remaining: ${remainder}`,\n}"
16829
- }
16830
- ],
16831
- "exports": [
16832
- {
16833
- "kind": "js",
16834
- "name": "default",
16835
- "declaration": {
16836
- "name": "localization",
16837
- "module": "src/textarea/localization.ts"
16838
- }
16839
- }
16840
- ]
16841
- },
16842
- {
16843
- "kind": "javascript-module",
16844
- "path": "src/tag-group/TagGroup.ts",
16845
- "declarations": [
16846
- {
16847
- "kind": "class",
16848
- "description": "Tag groups are designed to bring together selectable tags that are of a similar nature. For example categories you can filter by.",
16849
- "name": "TagGroup",
16850
- "cssProperties": [
16851
- {
16852
- "description": "Controls the rounded corners of the tag group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
16853
- "name": "--n-tag-group-border-radius",
16854
- "default": "var(--n-border-radius-s)"
16855
- },
16856
- {
16857
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
16858
- "name": "--n-tag-group-box-shadow",
16859
- "default": "var(--n-box-shadow)"
16860
- }
16861
- ],
16862
- "slots": [
16863
- {
16864
- "description": "The tag group content",
16865
- "name": ""
16866
- }
16867
- ],
16868
- "members": [
16869
- {
16870
- "kind": "field",
16871
- "name": "defaultSlot",
16872
- "privacy": "private",
16873
- "default": "new SlotController(this)"
16874
- },
16875
- {
16876
- "kind": "field",
16877
- "name": "dirController",
16878
- "privacy": "private",
16879
- "default": "new DirectionController(this)"
16880
- },
16881
- {
16882
- "kind": "field",
16883
- "name": "variant",
16884
- "type": {
16885
- "text": "\"default\" | \"spaced\""
16886
- },
16887
- "default": "\"default\"",
16888
- "description": "The style variant of the tag group.",
16889
- "attribute": "variant",
16890
- "reflects": true
16891
- },
16892
- {
16893
- "kind": "field",
16894
- "name": "direction",
16895
- "type": {
16896
- "text": "\"vertical\" | \"horizontal\""
16897
- },
16898
- "default": "\"horizontal\"",
16899
- "description": "The direction of the tag group.",
16900
- "attribute": "direction",
16901
- "reflects": true
16902
- },
16903
- {
16904
- "kind": "field",
16905
- "name": "wrap",
16906
- "type": {
16907
- "text": "boolean"
16908
- },
16909
- "default": "false",
16910
- "description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
16911
- "attribute": "wrap",
16912
- "reflects": true
16913
- },
16914
- {
16915
- "kind": "field",
16916
- "name": "role",
16917
- "type": {
16918
- "text": "string"
16919
- },
16920
- "default": "\"group\"",
16921
- "description": "The appropriate role for the containing element.",
16922
- "attribute": "role",
16923
- "reflects": true
16924
- },
16925
- {
16926
- "kind": "field",
16927
- "name": "_warningLogged",
16928
- "type": {
16929
- "text": "boolean"
16930
- },
16931
- "privacy": "private",
16932
- "static": true,
16933
- "default": "false",
16934
- "inheritedFrom": {
16935
- "name": "DraftComponentMixin",
16936
- "module": "src/common/mixins/DraftComponentMixin.ts"
16937
- }
16938
- }
16939
- ],
16940
- "events": [
16941
- {
16942
- "type": {
16943
- "text": "NordEvent"
16944
- },
16945
- "description": "Fired whenever a tag has been checked or unchecked via user interaction.",
16946
- "name": "change"
16947
- },
16948
- {
16949
- "type": {
16950
- "text": "NordEvent"
16951
- },
16952
- "description": "Fired when the remove button is activated on a tag. This event should be used to remove the tag from the DOM.",
16953
- "name": "remove"
16954
- }
16955
- ],
16956
- "attributes": [
16957
- {
16958
- "name": "variant",
16959
- "type": {
16960
- "text": "\"default\" | \"spaced\""
16961
- },
16962
- "default": "\"default\"",
16963
- "description": "The style variant of the tag group.",
16964
- "fieldName": "variant"
16965
- },
16966
- {
16967
- "name": "direction",
16968
- "type": {
16969
- "text": "\"vertical\" | \"horizontal\""
16970
- },
16971
- "default": "\"horizontal\"",
16972
- "description": "The direction of the tag group.",
16973
- "fieldName": "direction"
16971
+ "name": "AutocompleteMixin",
16972
+ "module": "/src/common/mixins/AutocompleteMixin.js"
16974
16973
  },
16975
16974
  {
16976
- "name": "wrap",
16977
- "type": {
16978
- "text": "boolean"
16979
- },
16980
- "default": "false",
16981
- "description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
16982
- "fieldName": "wrap"
16975
+ "name": "ReadonlyMixin",
16976
+ "module": "/src/common/mixins/ReadonlyMixin.js"
16983
16977
  },
16984
16978
  {
16985
- "name": "role",
16986
- "type": {
16987
- "text": "string"
16988
- },
16989
- "default": "\"group\"",
16990
- "description": "The appropriate role for the containing element.",
16991
- "fieldName": "role"
16992
- }
16993
- ],
16994
- "mixins": [
16979
+ "name": "TextSelectableMixin",
16980
+ "module": "/src/common/mixins/TextSelectableMixin.js"
16981
+ },
16995
16982
  {
16996
- "name": "DraftComponentMixin",
16997
- "module": "/src/common/mixins/DraftComponentMixin.js"
16983
+ "name": "InputMixin",
16984
+ "module": "/src/common/mixins/InputMixin.js"
16985
+ },
16986
+ {
16987
+ "name": "FocusableMixin",
16988
+ "module": "/src/common/mixins/FocusableMixin.js"
16998
16989
  }
16999
16990
  ],
17000
16991
  "superclass": {
17001
16992
  "name": "LitElement",
17002
16993
  "package": "lit"
17003
16994
  },
17004
- "localization": [],
17005
- "status": "draft",
17006
- "category": "structure",
17007
- "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 selectable tags.\n- Use the appropriate `role` attribute on the tag group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the tag group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than selectable tags and in some instances visually hidden components to the tag 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\nTags should use short and clear labels for easy scanning. They should be concise and informative:\n\n<div class=\"n-usage n-usage-do\">Has seizures</div>\n<div class=\"n-usage n-usage-dont\">This dog has seizures often</div>\n\nWhen writing tag 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\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">Service Dog</div>\n\nAvoid unnecessary words and articles in tag labels, such as the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">A service dog</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 tags to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the tags to space them out evenly. |\n",
16995
+ "localization": [
16996
+ {
16997
+ "name": "remainingCharacters",
16998
+ "description": "A function which receives the number of remaining characters and returns a string to be used as the aria-live message."
16999
+ }
17000
+ ],
17001
+ "status": "ready",
17002
+ "category": "form",
17003
+ "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 allow text input where the expected input is long.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is short. Use input component instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nTextarea labels act as a title for the text field. Labels should typically be short and in noun&nbsp;form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing textarea 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\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide Description</div>\n\nWhen a textarea isn’t part of a form and is placed individually on a page, you could provide the textarea label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in textarea labels:\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide description:</div>\n",
17008
17004
  "examples": [],
17009
17005
  "dependencies": [],
17010
- "tagName": "nord-tag-group",
17006
+ "tagName": "nord-textarea",
17011
17007
  "customElement": true
17012
17008
  }
17013
17009
  ],
@@ -17016,16 +17012,40 @@
17016
17012
  "kind": "js",
17017
17013
  "name": "default",
17018
17014
  "declaration": {
17019
- "name": "TagGroup",
17020
- "module": "src/tag-group/TagGroup.ts"
17015
+ "name": "Textarea",
17016
+ "module": "src/textarea/Textarea.ts"
17021
17017
  }
17022
17018
  },
17023
17019
  {
17024
17020
  "kind": "custom-element-definition",
17025
- "name": "nord-tag-group",
17021
+ "name": "nord-textarea",
17026
17022
  "declaration": {
17027
- "name": "TagGroup",
17028
- "module": "src/tag-group/TagGroup.ts"
17023
+ "name": "Textarea",
17024
+ "module": "src/textarea/Textarea.ts"
17025
+ }
17026
+ }
17027
+ ]
17028
+ },
17029
+ {
17030
+ "kind": "javascript-module",
17031
+ "path": "src/textarea/localization.ts",
17032
+ "declarations": [
17033
+ {
17034
+ "kind": "variable",
17035
+ "name": "localization",
17036
+ "type": {
17037
+ "text": "object"
17038
+ },
17039
+ "default": "{\n remainingCharacters: (remainder: number) => `Characters remaining: ${remainder}`,\n}"
17040
+ }
17041
+ ],
17042
+ "exports": [
17043
+ {
17044
+ "kind": "js",
17045
+ "name": "default",
17046
+ "declaration": {
17047
+ "name": "localization",
17048
+ "module": "src/textarea/localization.ts"
17029
17049
  }
17030
17050
  }
17031
17051
  ]
@@ -17186,6 +17206,93 @@
17186
17206
  }
17187
17207
  ]
17188
17208
  },
17209
+ {
17210
+ "kind": "javascript-module",
17211
+ "path": "src/toast-group/ToastGroup.ts",
17212
+ "declarations": [
17213
+ {
17214
+ "kind": "class",
17215
+ "description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
17216
+ "name": "ToastGroup",
17217
+ "slots": [
17218
+ {
17219
+ "description": "Default slot in which to place toasts.",
17220
+ "name": ""
17221
+ }
17222
+ ],
17223
+ "members": [
17224
+ {
17225
+ "kind": "method",
17226
+ "name": "addToast",
17227
+ "parameters": [
17228
+ {
17229
+ "name": "text",
17230
+ "type": {
17231
+ "text": "string"
17232
+ },
17233
+ "description": "The text/message of the toast."
17234
+ },
17235
+ {
17236
+ "name": "options",
17237
+ "default": "{}",
17238
+ "type": {
17239
+ "text": "ToastOptions"
17240
+ },
17241
+ "description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
17242
+ }
17243
+ ],
17244
+ "description": "Convenience method for creating and adding a toast to the group.",
17245
+ "return": {
17246
+ "type": {
17247
+ "text": "Toast"
17248
+ }
17249
+ }
17250
+ }
17251
+ ],
17252
+ "events": [
17253
+ {
17254
+ "type": {
17255
+ "text": "NordEvent"
17256
+ },
17257
+ "description": "Fired when a toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM.",
17258
+ "name": "dismiss"
17259
+ }
17260
+ ],
17261
+ "superclass": {
17262
+ "name": "LitElement",
17263
+ "package": "lit"
17264
+ },
17265
+ "localization": [],
17266
+ "status": "ready",
17267
+ "category": "feedback",
17268
+ "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 in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast 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\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
17269
+ "examples": [],
17270
+ "dependencies": [
17271
+ "toast"
17272
+ ],
17273
+ "tagName": "nord-toast-group",
17274
+ "customElement": true
17275
+ }
17276
+ ],
17277
+ "exports": [
17278
+ {
17279
+ "kind": "js",
17280
+ "name": "default",
17281
+ "declaration": {
17282
+ "name": "ToastGroup",
17283
+ "module": "src/toast-group/ToastGroup.ts"
17284
+ }
17285
+ },
17286
+ {
17287
+ "kind": "custom-element-definition",
17288
+ "name": "nord-toast-group",
17289
+ "declaration": {
17290
+ "name": "ToastGroup",
17291
+ "module": "src/toast-group/ToastGroup.ts"
17292
+ }
17293
+ }
17294
+ ]
17295
+ },
17189
17296
  {
17190
17297
  "kind": "javascript-module",
17191
17298
  "path": "src/toggle/Toggle.ts",
@@ -17902,93 +18009,6 @@
17902
18009
  }
17903
18010
  ]
17904
18011
  },
17905
- {
17906
- "kind": "javascript-module",
17907
- "path": "src/toast-group/ToastGroup.ts",
17908
- "declarations": [
17909
- {
17910
- "kind": "class",
17911
- "description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
17912
- "name": "ToastGroup",
17913
- "slots": [
17914
- {
17915
- "description": "Default slot in which to place toasts.",
17916
- "name": ""
17917
- }
17918
- ],
17919
- "members": [
17920
- {
17921
- "kind": "method",
17922
- "name": "addToast",
17923
- "parameters": [
17924
- {
17925
- "name": "text",
17926
- "type": {
17927
- "text": "string"
17928
- },
17929
- "description": "The text/message of the toast."
17930
- },
17931
- {
17932
- "name": "options",
17933
- "default": "{}",
17934
- "type": {
17935
- "text": "ToastOptions"
17936
- },
17937
- "description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
17938
- }
17939
- ],
17940
- "description": "Convenience method for creating and adding a toast to the group.",
17941
- "return": {
17942
- "type": {
17943
- "text": "Toast"
17944
- }
17945
- }
17946
- }
17947
- ],
17948
- "events": [
17949
- {
17950
- "type": {
17951
- "text": "NordEvent"
17952
- },
17953
- "description": "Fired when a toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM.",
17954
- "name": "dismiss"
17955
- }
17956
- ],
17957
- "superclass": {
17958
- "name": "LitElement",
17959
- "package": "lit"
17960
- },
17961
- "localization": [],
17962
- "status": "ready",
17963
- "category": "feedback",
17964
- "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 in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast 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\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
17965
- "examples": [],
17966
- "dependencies": [
17967
- "toast"
17968
- ],
17969
- "tagName": "nord-toast-group",
17970
- "customElement": true
17971
- }
17972
- ],
17973
- "exports": [
17974
- {
17975
- "kind": "js",
17976
- "name": "default",
17977
- "declaration": {
17978
- "name": "ToastGroup",
17979
- "module": "src/toast-group/ToastGroup.ts"
17980
- }
17981
- },
17982
- {
17983
- "kind": "custom-element-definition",
17984
- "name": "nord-toast-group",
17985
- "declaration": {
17986
- "name": "ToastGroup",
17987
- "module": "src/toast-group/ToastGroup.ts"
17988
- }
17989
- }
17990
- ]
17991
- },
17992
18012
  {
17993
18013
  "kind": "javascript-module",
17994
18014
  "path": "src/tooltip/Tooltip.ts",
@@ -18950,7 +18970,7 @@
18950
18970
  },
18951
18971
  {
18952
18972
  "kind": "field",
18953
- "name": "handleMouseUp",
18973
+ "name": "handleClick",
18954
18974
  "privacy": "private"
18955
18975
  }
18956
18976
  ]