@nanoporetech-digital/components 4.10.0 → 5.1.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.
Files changed (174) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/cjs/{form-control-2e900f54.js → form-control-443e90bf.js} +2 -3
  3. package/dist/cjs/form-control-443e90bf.js.map +1 -0
  4. package/dist/cjs/index-71f899a7.js +6 -2
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/nano-components.cjs.js +1 -1
  7. package/dist/cjs/nano-dropdown.cjs.entry.js +1 -1
  8. package/dist/cjs/nano-dropdown.cjs.entry.js.map +1 -1
  9. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +2 -2
  10. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nano-grid-item.cjs.entry.js +29 -0
  12. package/dist/cjs/nano-grid-item.cjs.entry.js.map +1 -0
  13. package/dist/cjs/nano-grid_2.cjs.entry.js +443 -0
  14. package/dist/cjs/nano-grid_2.cjs.entry.js.map +1 -0
  15. package/dist/cjs/nano-hero.cjs.entry.js +4 -10
  16. package/dist/cjs/nano-hero.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nano-icon-button_2.cjs.entry.js +2 -2
  18. package/dist/cjs/nano-icon-button_2.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nano-input.cjs.entry.js +2 -2
  20. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nano-range.cjs.entry.js +1 -1
  22. package/dist/cjs/nano-range.cjs.entry.js.map +1 -1
  23. package/dist/cjs/nano-sortable.cjs.entry.js +1 -0
  24. package/dist/cjs/nano-sortable.cjs.entry.js.map +1 -1
  25. package/dist/cjs/{nano-table-ff33dc43.js → nano-table-5587101f.js} +37 -30
  26. package/dist/cjs/nano-table-5587101f.js.map +1 -0
  27. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  28. package/dist/cjs/{table.worker-0a6bc962.js → table.worker-abba820e.js} +2 -2
  29. package/dist/cjs/table.worker-abba820e.js.map +1 -0
  30. package/dist/collection/components/dropdown/dropdown.css +2 -1
  31. package/dist/collection/components/form-control/form-control.js +1 -2
  32. package/dist/collection/components/form-control/form-control.js.map +1 -1
  33. package/dist/collection/components/grid/grid-item.js +11 -136
  34. package/dist/collection/components/grid/grid-item.js.map +1 -1
  35. package/dist/collection/components/grid/grid.css +9 -242
  36. package/dist/collection/components/grid/grid.js +255 -240
  37. package/dist/collection/components/grid/grid.js.map +1 -1
  38. package/dist/collection/components/hero/hero.css +42 -89
  39. package/dist/collection/components/hero/hero.js +4 -11
  40. package/dist/collection/components/hero/hero.js.map +1 -1
  41. package/dist/collection/components/icon-button/icon-button.css +12 -0
  42. package/dist/collection/components/icon-button/icon-button.js +1 -1
  43. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  44. package/dist/collection/components/input/input.css +8 -9
  45. package/dist/collection/components/range/range.css +0 -3
  46. package/dist/collection/components/select/select.css +8 -9
  47. package/dist/collection/components/sortable/sortable.js +2 -1
  48. package/dist/collection/components/sortable/sortable.js.map +1 -1
  49. package/dist/collection/components/table/table.css +6 -0
  50. package/dist/collection/components/table/table.js +25 -18
  51. package/dist/collection/components/table/table.js.map +1 -1
  52. package/dist/collection/components/table/table.row.js +7 -7
  53. package/dist/collection/components/table/table.row.js.map +1 -1
  54. package/dist/collection/utils/constructible-style.js +129 -0
  55. package/dist/collection/utils/constructible-style.js.map +1 -0
  56. package/dist/components/dropdown.js +1 -1
  57. package/dist/components/dropdown.js.map +1 -1
  58. package/dist/components/form-control.js +1 -2
  59. package/dist/components/form-control.js.map +1 -1
  60. package/dist/components/grid.js +275 -183
  61. package/dist/components/grid.js.map +1 -1
  62. package/dist/components/icon-button.js +2 -2
  63. package/dist/components/icon-button.js.map +1 -1
  64. package/dist/components/input.js +1 -1
  65. package/dist/components/input.js.map +1 -1
  66. package/dist/components/nano-grid-item.js +33 -1
  67. package/dist/components/nano-grid-item.js.map +1 -1
  68. package/dist/components/nano-hero.js +6 -19
  69. package/dist/components/nano-hero.js.map +1 -1
  70. package/dist/components/nano-range.js +1 -1
  71. package/dist/components/nano-range.js.map +1 -1
  72. package/dist/components/nano-sortable.js +1 -0
  73. package/dist/components/nano-sortable.js.map +1 -1
  74. package/dist/components/select.js +1 -1
  75. package/dist/components/select.js.map +1 -1
  76. package/dist/components/table.js +36 -29
  77. package/dist/components/table.js.map +1 -1
  78. package/dist/esm/{form-control-269ba84f.js → form-control-e8739b2e.js} +2 -3
  79. package/dist/esm/form-control-e8739b2e.js.map +1 -0
  80. package/dist/esm/index-dad5627b.js +6 -2
  81. package/dist/esm/loader.js +1 -1
  82. package/dist/esm/nano-components.js +1 -1
  83. package/dist/esm/nano-dropdown.entry.js +1 -1
  84. package/dist/esm/nano-dropdown.entry.js.map +1 -1
  85. package/dist/esm/nano-global-nav-user-profile_3.entry.js +2 -2
  86. package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
  87. package/dist/esm/nano-grid-item.entry.js +25 -0
  88. package/dist/esm/nano-grid-item.entry.js.map +1 -0
  89. package/dist/esm/nano-grid_2.entry.js +438 -0
  90. package/dist/esm/nano-grid_2.entry.js.map +1 -0
  91. package/dist/esm/nano-hero.entry.js +4 -10
  92. package/dist/esm/nano-hero.entry.js.map +1 -1
  93. package/dist/esm/nano-icon-button_2.entry.js +2 -2
  94. package/dist/esm/nano-icon-button_2.entry.js.map +1 -1
  95. package/dist/esm/nano-input.entry.js +2 -2
  96. package/dist/esm/nano-input.entry.js.map +1 -1
  97. package/dist/esm/nano-range.entry.js +1 -1
  98. package/dist/esm/nano-range.entry.js.map +1 -1
  99. package/dist/esm/nano-sortable.entry.js +1 -0
  100. package/dist/esm/nano-sortable.entry.js.map +1 -1
  101. package/dist/esm/{nano-table-ec980076.js → nano-table-fb6b3bcb.js} +37 -30
  102. package/dist/esm/nano-table-fb6b3bcb.js.map +1 -0
  103. package/dist/esm/nano-table.entry.js +1 -1
  104. package/dist/esm/{table.worker-b53db58e.js → table.worker-43365547.js} +2 -2
  105. package/dist/esm/table.worker-43365547.js.map +1 -0
  106. package/dist/nano-components/nano-components.css +1 -1
  107. package/dist/nano-components/nano-components.esm.js +1 -1
  108. package/dist/nano-components/nano-components.esm.js.map +1 -1
  109. package/dist/nano-components/p-17b099cc.entry.js +5 -0
  110. package/dist/nano-components/p-17b099cc.entry.js.map +1 -0
  111. package/dist/nano-components/p-553acf24.entry.js +5 -0
  112. package/dist/nano-components/{p-58b53239.entry.js.map → p-553acf24.entry.js.map} +1 -1
  113. package/dist/nano-components/p-6975f110.entry.js +5 -0
  114. package/dist/nano-components/p-6975f110.entry.js.map +1 -0
  115. package/dist/nano-components/p-71057181.js +5 -0
  116. package/dist/nano-components/p-71057181.js.map +1 -0
  117. package/dist/nano-components/{p-f591400b.entry.js → p-913cf45f.entry.js} +2 -2
  118. package/dist/nano-components/p-99914796.js +5 -0
  119. package/dist/nano-components/p-99914796.js.map +1 -0
  120. package/dist/nano-components/p-9b5429e1.entry.js +5 -0
  121. package/dist/nano-components/p-9b5429e1.entry.js.map +1 -0
  122. package/dist/nano-components/p-ad6209ec.entry.js +5 -0
  123. package/dist/nano-components/p-ad6209ec.entry.js.map +1 -0
  124. package/dist/nano-components/p-bdef618c.entry.js +5 -0
  125. package/dist/nano-components/p-bdef618c.entry.js.map +1 -0
  126. package/dist/nano-components/{p-241baff8.entry.js → p-d79c6862.entry.js} +2 -2
  127. package/dist/nano-components/p-d79c6862.entry.js.map +1 -0
  128. package/dist/nano-components/{p-806bcd46.js → p-daa6f834.js} +2 -2
  129. package/dist/nano-components/p-deb0799c.entry.js +5 -0
  130. package/dist/nano-components/{p-6a3a29c6.entry.js.map → p-deb0799c.entry.js.map} +1 -1
  131. package/dist/nano-components/p-ebb98a9e.entry.js +5 -0
  132. package/dist/nano-components/p-ebb98a9e.entry.js.map +1 -0
  133. package/dist/types/components/grid/grid-item.d.ts +3 -11
  134. package/dist/types/components/grid/grid.d.ts +44 -68
  135. package/dist/types/components/hero/hero.d.ts +1 -3
  136. package/dist/types/components/table/table.d.ts +5 -0
  137. package/dist/types/components.d.ts +85 -61
  138. package/dist/types/utils/constructible-style.d.ts +31 -0
  139. package/docs-json.json +152 -88
  140. package/docs-vscode.json +28 -21
  141. package/hydrate/index.js +348 -307
  142. package/package.json +2 -2
  143. package/dist/cjs/form-control-2e900f54.js.map +0 -1
  144. package/dist/cjs/nano-grid_3.cjs.entry.js +0 -431
  145. package/dist/cjs/nano-grid_3.cjs.entry.js.map +0 -1
  146. package/dist/cjs/nano-table-ff33dc43.js.map +0 -1
  147. package/dist/cjs/table.worker-0a6bc962.js.map +0 -1
  148. package/dist/collection/components/grid/grid-item.css +0 -15
  149. package/dist/components/grid-item.js +0 -107
  150. package/dist/components/grid-item.js.map +0 -1
  151. package/dist/esm/form-control-269ba84f.js.map +0 -1
  152. package/dist/esm/nano-grid_3.entry.js +0 -425
  153. package/dist/esm/nano-grid_3.entry.js.map +0 -1
  154. package/dist/esm/nano-table-ec980076.js.map +0 -1
  155. package/dist/esm/table.worker-b53db58e.js.map +0 -1
  156. package/dist/nano-components/p-064af7d0.js +0 -5
  157. package/dist/nano-components/p-064af7d0.js.map +0 -1
  158. package/dist/nano-components/p-107d4549.entry.js +0 -5
  159. package/dist/nano-components/p-107d4549.entry.js.map +0 -1
  160. package/dist/nano-components/p-239d343a.entry.js +0 -5
  161. package/dist/nano-components/p-239d343a.entry.js.map +0 -1
  162. package/dist/nano-components/p-241baff8.entry.js.map +0 -1
  163. package/dist/nano-components/p-58b53239.entry.js +0 -5
  164. package/dist/nano-components/p-5ac74848.js +0 -5
  165. package/dist/nano-components/p-5ac74848.js.map +0 -1
  166. package/dist/nano-components/p-6a3a29c6.entry.js +0 -5
  167. package/dist/nano-components/p-87bc66b5.entry.js +0 -5
  168. package/dist/nano-components/p-87bc66b5.entry.js.map +0 -1
  169. package/dist/nano-components/p-d3de231c.entry.js +0 -5
  170. package/dist/nano-components/p-d3de231c.entry.js.map +0 -1
  171. package/dist/nano-components/p-d792f692.entry.js +0 -5
  172. package/dist/nano-components/p-d792f692.entry.js.map +0 -1
  173. /package/dist/nano-components/{p-806bcd46.js.map → p-913cf45f.entry.js.map} +0 -0
  174. /package/dist/nano-components/{p-f591400b.entry.js.map → p-daa6f834.js.map} +0 -0
package/docs-json.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-06-26T23:07:54",
2
+ "timestamp": "2023-07-12T11:02:00",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.23.0",
@@ -5439,6 +5439,11 @@
5439
5439
  "annotation": "prop",
5440
5440
  "docs": "Defaults to var(--nano-layer-index-dropdown, 300);"
5441
5441
  },
5442
+ {
5443
+ "name": "--max-menu-height",
5444
+ "annotation": "prop",
5445
+ "docs": "max height of a slotted menu. defaults to 50vh"
5446
+ },
5442
5447
  {
5443
5448
  "name": "--min-width",
5444
5449
  "annotation": "prop",
@@ -7369,22 +7374,34 @@
7369
7374
  "encapsulation": "shadow",
7370
7375
  "tag": "nano-grid",
7371
7376
  "readme": "# nano-grid (extra examples and methods)\n\n## 1. Define the number of grid columns to display at various container sizes (from 1 to 10). \n\n```html\n<nano-grid m-cols=\"2\" l-cols=\"4\" xl-cols=\"6\" xxl-cols=\"10\" show-helper></nano-grid>\n```\n<nano-grid style=\"min-height: 200px\" m-cols=\"2\" l-cols=\"4\" xl-cols=\"6\" xxl-cols=\"10\" show-helper></nano-grid>\n\n## 2. Put items into the grid\n\nBy default items will fill one column.\n\n```html\n<nano-grid m-cols=\"2\" l-cols=\"4\" xl-cols=\"6\" show-helper>\n <div></div>\n <div></div>\n <div></div>\n</nano-grid>\n```\n\n## 3. Set items to span columns and rows and / or start on different columns and rows at different sizes\n\n```html\n<nano-grid l-cols=\"6\" show-helper>\n <div grid-states=\"\n xl-col-span-2 \n xl-col-start-2 \n xl-row-span-2 \n l-col-span-4\n \"></div>\n <div grid-states=\"xl-col-start-1 xl-row-start-1\"></div>\n <div grid-states=\"xl-col-start-6\"></div>\n <div grid-states=\"l-col-span-2\"></div>\n</nano-grid>\n```\n\n### IE11 Notes\n\nIf you need to support IE11 there are some things to consider.\n\nThere is no native way for IE11 to wrap items to new rows automatically. In order to achive this, items have been statically assigned to their row and column.\n\nThis causes 2 side-effects:\n\n1. In-order to strike a balance between flexibility and not creating humongous CSS files; the maximum grid columns currently supported is *10* with a potential *20* items spread accross them. If you need more look at nesting grids.\n\n2. If you wish to use any item grid-state property (col-span, col-start, row-span or row start) you will then need to assign corresponding properies to ALL items within the grid. E.g.\n\n```html\n<nano-grid l-cols=\"6\" show-helper>\n <div grid-states=\"l-col-span-2 l-col-start-2 l-row-span-2\">1</div>\n <div grid-states=\"l-col-start-1 l-row-start-1\">2</div>\n <div grid-states=\"l-col-start-6\">3</div>\n <div grid-states=\"l-col-span-2\">4</div>\n</nano-grid>\n```\n\n(Something that will work on modern browsers) Will need to become:\n\n```html\n<nano-grid l-cols=\"6\" show-helper>\n <div grid-states=\"l-col-span-2 l-col-start-2 l-row-span-2 l-row-start-1\">1</div>\n <div grid-states=\"l-col-start-1 l-row-start-1\">2</div>\n <div grid-states=\"l-col-start-6 l-row-start-1\">3</div>\n <div grid-states=\"l-col-start-4 l-col-span-2 l-row-start-2\">4</div>\n</nano-grid>\n```\n",
7372
- "docs": "A context-aware CSS grid implementation.\nUses it's own width to choose column number - not screen width.",
7373
- "docsTags": [],
7377
+ "docs": "A lightweight, context-aware CSS grid implementation.\n\n- Define multiple grids templates at different breakpoints\n- Uses `@container` queries to select the correct grid depending on the current dimensions\n- Use `grid-states=\"...\"` on direct descendants for `column` / `row` - `start` / `end`\n- SSR optimised",
7378
+ "docsTags": [
7379
+ {
7380
+ "name": "part",
7381
+ "text": "grid - the main grid element.\nUse this to set css such as `justify-items|content` / `align-items|content` / `place-content`"
7382
+ },
7383
+ {
7384
+ "name": "part",
7385
+ "text": "helper - a replica grid showed when `show-helper` is true"
7386
+ },
7387
+ {
7388
+ "name": "slot",
7389
+ "text": "- default slot. Use this to place grid items. Use `grid-states=\"...\"` attribute to opt-out of auto / sequential placement."
7390
+ }
7391
+ ],
7374
7392
  "usage": {},
7375
7393
  "props": [
7376
7394
  {
7377
- "name": "contentPanel",
7378
- "type": "boolean",
7395
+ "name": "lCols",
7396
+ "type": "number",
7379
7397
  "mutable": false,
7380
- "attr": "content-panel",
7381
- "reflectToAttr": true,
7382
- "docs": "shortcut for a traditional website like grid (requires more than one row). The second row will auto expand to fill the grid height. The first row and > 2nd row will be the size of their content. e.g. header, body and footer.",
7398
+ "attr": "l-cols",
7399
+ "reflectToAttr": false,
7400
+ "docs": "the number of columns the grid has at the large breakpoint.",
7383
7401
  "docsTags": [],
7384
- "default": "false",
7385
7402
  "values": [
7386
7403
  {
7387
- "type": "boolean"
7404
+ "type": "number"
7388
7405
  }
7389
7406
  ],
7390
7407
  "optional": false,
@@ -7393,17 +7410,20 @@
7393
7410
  "setter": false
7394
7411
  },
7395
7412
  {
7396
- "name": "fullHeight",
7397
- "type": "boolean",
7413
+ "name": "lSize",
7414
+ "type": "number | string",
7398
7415
  "mutable": false,
7399
- "attr": "full-height",
7400
- "reflectToAttr": true,
7401
- "docs": "Helper to make grid items expand to full height in IE11",
7416
+ "attr": "l-size",
7417
+ "reflectToAttr": false,
7418
+ "docs": "the component's large breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`",
7402
7419
  "docsTags": [],
7403
- "default": "false",
7420
+ "default": "800",
7404
7421
  "values": [
7405
7422
  {
7406
- "type": "boolean"
7423
+ "type": "number"
7424
+ },
7425
+ {
7426
+ "type": "string"
7407
7427
  }
7408
7428
  ],
7409
7429
  "optional": false,
@@ -7412,32 +7432,31 @@
7412
7432
  "setter": false
7413
7433
  },
7414
7434
  {
7415
- "name": "lCols",
7416
- "type": "number",
7435
+ "name": "lTpl",
7436
+ "type": "string",
7417
7437
  "mutable": false,
7418
- "attr": "l-cols",
7438
+ "attr": "l-tpl",
7419
7439
  "reflectToAttr": false,
7420
- "docs": "the number of columns the grid has at the large breakpoint.",
7440
+ "docs": "Optional large `grid-template`. *Note* - you must set `lCols` for this to take affect",
7421
7441
  "docsTags": [],
7422
7442
  "values": [
7423
7443
  {
7424
- "type": "number"
7444
+ "type": "string"
7425
7445
  }
7426
7446
  ],
7427
- "optional": false,
7447
+ "optional": true,
7428
7448
  "required": false,
7429
7449
  "getter": false,
7430
7450
  "setter": false
7431
7451
  },
7432
7452
  {
7433
- "name": "lSize",
7453
+ "name": "mCols",
7434
7454
  "type": "number",
7435
7455
  "mutable": false,
7436
- "attr": "l-size",
7456
+ "attr": "m-cols",
7437
7457
  "reflectToAttr": false,
7438
- "docs": "the component's large breakpoint. Note - all breakpoints are based on component width, not screen width.",
7458
+ "docs": "the number of columns the grid has at the medium breakpoint.",
7439
7459
  "docsTags": [],
7440
- "default": "800",
7441
7460
  "values": [
7442
7461
  {
7443
7462
  "type": "number"
@@ -7449,16 +7468,20 @@
7449
7468
  "setter": false
7450
7469
  },
7451
7470
  {
7452
- "name": "mCols",
7453
- "type": "number",
7471
+ "name": "mSize",
7472
+ "type": "number | string",
7454
7473
  "mutable": false,
7455
- "attr": "m-cols",
7474
+ "attr": "m-size",
7456
7475
  "reflectToAttr": false,
7457
- "docs": "the number of columns the grid has at the medium breakpoint.",
7476
+ "docs": "the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`",
7458
7477
  "docsTags": [],
7478
+ "default": "550",
7459
7479
  "values": [
7460
7480
  {
7461
7481
  "type": "number"
7482
+ },
7483
+ {
7484
+ "type": "string"
7462
7485
  }
7463
7486
  ],
7464
7487
  "optional": false,
@@ -7467,20 +7490,19 @@
7467
7490
  "setter": false
7468
7491
  },
7469
7492
  {
7470
- "name": "mSize",
7471
- "type": "number",
7493
+ "name": "mTpl",
7494
+ "type": "string",
7472
7495
  "mutable": false,
7473
- "attr": "m-size",
7496
+ "attr": "m-tpl",
7474
7497
  "reflectToAttr": false,
7475
- "docs": "the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width.",
7498
+ "docs": "Optional medium `grid-template`. *Note* - you must set `mCols` for this to take affect",
7476
7499
  "docsTags": [],
7477
- "default": "550",
7478
7500
  "values": [
7479
7501
  {
7480
- "type": "number"
7502
+ "type": "string"
7481
7503
  }
7482
7504
  ],
7483
- "optional": false,
7505
+ "optional": true,
7484
7506
  "required": false,
7485
7507
  "getter": false,
7486
7508
  "setter": false
@@ -7505,16 +7527,19 @@
7505
7527
  },
7506
7528
  {
7507
7529
  "name": "sSize",
7508
- "type": "number",
7530
+ "type": "number | string",
7509
7531
  "mutable": false,
7510
7532
  "attr": "s-size",
7511
7533
  "reflectToAttr": false,
7512
- "docs": "the component's small breakpoint. Note - all breakpoints are based on component width, not screen width.",
7534
+ "docs": "the component's small breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`",
7513
7535
  "docsTags": [],
7514
7536
  "default": "300",
7515
7537
  "values": [
7516
7538
  {
7517
7539
  "type": "number"
7540
+ },
7541
+ {
7542
+ "type": "string"
7518
7543
  }
7519
7544
  ],
7520
7545
  "optional": false,
@@ -7522,6 +7547,24 @@
7522
7547
  "getter": false,
7523
7548
  "setter": false
7524
7549
  },
7550
+ {
7551
+ "name": "sTpl",
7552
+ "type": "string",
7553
+ "mutable": false,
7554
+ "attr": "s-tpl",
7555
+ "reflectToAttr": false,
7556
+ "docs": "Optional small `grid-template`. *Note* - you must set `sCols` for this to take affect",
7557
+ "docsTags": [],
7558
+ "values": [
7559
+ {
7560
+ "type": "string"
7561
+ }
7562
+ ],
7563
+ "optional": true,
7564
+ "required": false,
7565
+ "getter": false,
7566
+ "setter": false
7567
+ },
7525
7568
  {
7526
7569
  "name": "showHelper",
7527
7570
  "type": "boolean",
@@ -7561,16 +7604,19 @@
7561
7604
  },
7562
7605
  {
7563
7606
  "name": "xlSize",
7564
- "type": "number",
7607
+ "type": "number | string",
7565
7608
  "mutable": false,
7566
7609
  "attr": "xl-size",
7567
7610
  "reflectToAttr": false,
7568
- "docs": "the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width.",
7611
+ "docs": "the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`",
7569
7612
  "docsTags": [],
7570
7613
  "default": "1000",
7571
7614
  "values": [
7572
7615
  {
7573
7616
  "type": "number"
7617
+ },
7618
+ {
7619
+ "type": "string"
7574
7620
  }
7575
7621
  ],
7576
7622
  "optional": false,
@@ -7578,6 +7624,24 @@
7578
7624
  "getter": false,
7579
7625
  "setter": false
7580
7626
  },
7627
+ {
7628
+ "name": "xlTpl",
7629
+ "type": "string",
7630
+ "mutable": false,
7631
+ "attr": "xl-tpl",
7632
+ "reflectToAttr": false,
7633
+ "docs": "Optional xl `grid-template`. *Note* - you must set `xlCols` for this to take affect",
7634
+ "docsTags": [],
7635
+ "values": [
7636
+ {
7637
+ "type": "string"
7638
+ }
7639
+ ],
7640
+ "optional": true,
7641
+ "required": false,
7642
+ "getter": false,
7643
+ "setter": false
7644
+ },
7581
7645
  {
7582
7646
  "name": "xxlCols",
7583
7647
  "type": "number",
@@ -7595,20 +7659,28 @@
7595
7659
  "required": false,
7596
7660
  "getter": false,
7597
7661
  "setter": false
7598
- }
7599
- ],
7600
- "methods": [],
7601
- "events": [
7662
+ },
7602
7663
  {
7603
- "event": "nanoBpChange",
7604
- "detail": "string[]",
7605
- "bubbles": true,
7606
- "cancelable": true,
7607
- "composed": true,
7608
- "docs": "Emitted when the `nano-grid` changes breakpoint",
7609
- "docsTags": []
7664
+ "name": "xxlTpl",
7665
+ "type": "string",
7666
+ "mutable": false,
7667
+ "attr": "xxl-tpl",
7668
+ "reflectToAttr": false,
7669
+ "docs": "Optional xxl `grid-template`. *Note* - you must set `xxlCols` for this to take affect",
7670
+ "docsTags": [],
7671
+ "values": [
7672
+ {
7673
+ "type": "string"
7674
+ }
7675
+ ],
7676
+ "optional": true,
7677
+ "required": false,
7678
+ "getter": false,
7679
+ "setter": false
7610
7680
  }
7611
7681
  ],
7682
+ "methods": [],
7683
+ "events": [],
7612
7684
  "listeners": [],
7613
7685
  "styles": [
7614
7686
  {
@@ -7622,8 +7694,22 @@
7622
7694
  "docs": "gap between all rows. Defaults to theme's global padding"
7623
7695
  }
7624
7696
  ],
7625
- "slots": [],
7626
- "parts": [],
7697
+ "slots": [
7698
+ {
7699
+ "name": "",
7700
+ "docs": "default slot. Use this to place grid items. Use `grid-states=\"...\"` attribute to opt-out of auto / sequential placement."
7701
+ }
7702
+ ],
7703
+ "parts": [
7704
+ {
7705
+ "name": "grid",
7706
+ "docs": "the main grid element.\nUse this to set css such as `justify-items|content` / `align-items|content` / `place-content`"
7707
+ },
7708
+ {
7709
+ "name": "helper",
7710
+ "docs": "a replica grid showed when `show-helper` is true"
7711
+ }
7712
+ ],
7627
7713
  "dependents": [
7628
7714
  "nano-hero"
7629
7715
  ],
@@ -7639,45 +7725,25 @@
7639
7725
  "encapsulation": "shadow",
7640
7726
  "tag": "nano-grid-item",
7641
7727
  "readme": "# nano-grid (extra examples and methods)\n\n## 1. Define the number of grid columns to display at various container sizes (from 1 to 10). \n\n```html\n<nano-grid m-cols=\"2\" l-cols=\"4\" xl-cols=\"6\" xxl-cols=\"10\" show-helper></nano-grid>\n```\n<nano-grid style=\"min-height: 200px\" m-cols=\"2\" l-cols=\"4\" xl-cols=\"6\" xxl-cols=\"10\" show-helper></nano-grid>\n\n## 2. Put items into the grid\n\nBy default items will fill one column.\n\n```html\n<nano-grid m-cols=\"2\" l-cols=\"4\" xl-cols=\"6\" show-helper>\n <div></div>\n <div></div>\n <div></div>\n</nano-grid>\n```\n\n## 3. Set items to span columns and rows and / or start on different columns and rows at different sizes\n\n```html\n<nano-grid l-cols=\"6\" show-helper>\n <div grid-states=\"\n xl-col-span-2 \n xl-col-start-2 \n xl-row-span-2 \n l-col-span-4\n \"></div>\n <div grid-states=\"xl-col-start-1 xl-row-start-1\"></div>\n <div grid-states=\"xl-col-start-6\"></div>\n <div grid-states=\"l-col-span-2\"></div>\n</nano-grid>\n```\n\n### IE11 Notes\n\nIf you need to support IE11 there are some things to consider.\n\nThere is no native way for IE11 to wrap items to new rows automatically. In order to achive this, items have been statically assigned to their row and column.\n\nThis causes 2 side-effects:\n\n1. In-order to strike a balance between flexibility and not creating humongous CSS files; the maximum grid columns currently supported is *10* with a potential *20* items spread accross them. If you need more look at nesting grids.\n\n2. If you wish to use any item grid-state property (col-span, col-start, row-span or row start) you will then need to assign corresponding properies to ALL items within the grid. E.g.\n\n```html\n<nano-grid l-cols=\"6\" show-helper>\n <div grid-states=\"l-col-span-2 l-col-start-2 l-row-span-2\">1</div>\n <div grid-states=\"l-col-start-1 l-row-start-1\">2</div>\n <div grid-states=\"l-col-start-6\">3</div>\n <div grid-states=\"l-col-span-2\">4</div>\n</nano-grid>\n```\n\n(Something that will work on modern browsers) Will need to become:\n\n```html\n<nano-grid l-cols=\"6\" show-helper>\n <div grid-states=\"l-col-span-2 l-col-start-2 l-row-span-2 l-row-start-1\">1</div>\n <div grid-states=\"l-col-start-1 l-row-start-1\">2</div>\n <div grid-states=\"l-col-start-6 l-row-start-1\">3</div>\n <div grid-states=\"l-col-start-4 l-col-span-2 l-row-start-2\">4</div>\n</nano-grid>\n```\n",
7642
- "docs": "Grid items to be used with [grid](/story/nano-components-grid) elements",
7643
- "docsTags": [],
7644
- "usage": {},
7645
- "props": [
7728
+ "docs": "",
7729
+ "docsTags": [
7646
7730
  {
7647
- "name": "gridStates",
7648
- "type": "string",
7649
- "mutable": false,
7650
- "attr": "grid-states",
7651
- "reflectToAttr": false,
7652
- "docs": "How to position this item within it's parent grid at different break points. Examples:\nxl-col-span-2\nl-col-start-2\nxxl-row-span-2\nm-row-start-2",
7653
- "docsTags": [],
7654
- "default": "''",
7655
- "values": [
7656
- {
7657
- "type": "string"
7658
- }
7659
- ],
7660
- "optional": false,
7661
- "required": false,
7662
- "getter": false,
7663
- "setter": false
7731
+ "name": "deprecated",
7732
+ "text": "- you can now use `grid-states=\"...\"`\non any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.\n\nGrid items to be used with [grid](/story/nano-components-grid) elements"
7664
7733
  }
7665
7734
  ],
7735
+ "usage": {},
7736
+ "props": [],
7666
7737
  "methods": [],
7667
7738
  "events": [],
7668
7739
  "listeners": [],
7669
7740
  "styles": [],
7670
7741
  "slots": [],
7671
7742
  "parts": [],
7672
- "dependents": [
7673
- "nano-hero"
7674
- ],
7743
+ "dependents": [],
7675
7744
  "dependencies": [],
7676
- "dependencyGraph": {
7677
- "nano-hero": [
7678
- "nano-grid-item"
7679
- ]
7680
- }
7745
+ "dependencyGraph": {},
7746
+ "deprecation": "- you can now use `grid-states=\"...\"`\non any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.\n\nGrid items to be used with [grid](/story/nano-components-grid) elements"
7681
7747
  },
7682
7748
  {
7683
7749
  "filePath": "./src/components/hero/hero.tsx",
@@ -7739,7 +7805,7 @@
7739
7805
  "mutable": false,
7740
7806
  "attr": "img-src",
7741
7807
  "reflectToAttr": false,
7742
- "docs": "src for backgronund image. For more control use the `background` slot instead.",
7808
+ "docs": "src for background image. For more control use the `background` slot instead.",
7743
7809
  "docsTags": [],
7744
7810
  "values": [
7745
7811
  {
@@ -7938,13 +8004,11 @@
7938
8004
  "dependents": [],
7939
8005
  "dependencies": [
7940
8006
  "nano-grid",
7941
- "nano-grid-item",
7942
8007
  "nano-img"
7943
8008
  ],
7944
8009
  "dependencyGraph": {
7945
8010
  "nano-hero": [
7946
8011
  "nano-grid",
7947
- "nano-grid-item",
7948
8012
  "nano-img"
7949
8013
  ],
7950
8014
  "nano-img": [
@@ -13966,7 +14030,7 @@
13966
14030
  "text": "a function that attaches a keyboard accessible handle control element.\nThe function itself *must* return the handle element."
13967
14031
  }
13968
14032
  ],
13969
- "default": "(_number: number, _element: Element) => {\n const handleTpl = /* html */ `\n <nano-icon-button\n slot=\"end\"\n icon-name=\"light/arrows\"\n class=\"nano-sortable__keyboard-handle visually-hidden\"\n ></nano-icon-button>`;\n const div = globalThis.document.createElement('div');\n div.innerHTML = handleTpl;\n\n const handle = div.children[0] as HTMLElement;\n _element.append(handle);\n return handle;\n }",
14033
+ "default": "(_number: number, _element: Element) => {\n const handleTpl = /* html */ `\n <nano-icon-button\n slot=\"end\"\n icon-name=\"light/arrows\"\n class=\"nano-sortable__keyboard-handle visually-hidden\"\n label=\"Re-order this item\"\n ></nano-icon-button>`;\n const div = globalThis.document.createElement('div');\n div.innerHTML = handleTpl;\n\n const handle = div.children[0] as HTMLElement;\n _element.append(handle);\n return handle;\n }",
13970
14034
  "values": [
13971
14035
  {
13972
14036
  "type": "(_number: number, _element: Element) => HTMLElement"
package/docs-vscode.json CHANGED
@@ -1330,24 +1330,20 @@
1330
1330
  "name": "nano-grid",
1331
1331
  "description": {
1332
1332
  "kind": "markdown",
1333
- "value": "A context-aware CSS grid implementation.\nUses it's own width to choose column number - not screen width."
1333
+ "value": "A lightweight, context-aware CSS grid implementation.\n\n- Define multiple grids templates at different breakpoints\n- Uses `@container` queries to select the correct grid depending on the current dimensions\n- Use `grid-states=\"...\"` on direct descendants for `column` / `row` - `start` / `end`\n- SSR optimised"
1334
1334
  },
1335
1335
  "attributes": [
1336
- {
1337
- "name": "content-panel",
1338
- "description": "shortcut for a traditional website like grid (requires more than one row). The second row will auto expand to fill the grid height. The first row and > 2nd row will be the size of their content. e.g. header, body and footer."
1339
- },
1340
- {
1341
- "name": "full-height",
1342
- "description": "Helper to make grid items expand to full height in IE11"
1343
- },
1344
1336
  {
1345
1337
  "name": "l-cols",
1346
1338
  "description": "the number of columns the grid has at the large breakpoint."
1347
1339
  },
1348
1340
  {
1349
1341
  "name": "l-size",
1350
- "description": "the component's large breakpoint. Note - all breakpoints are based on component width, not screen width."
1342
+ "description": "the component's large breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`"
1343
+ },
1344
+ {
1345
+ "name": "l-tpl",
1346
+ "description": "Optional large `grid-template`. *Note* - you must set `lCols` for this to take affect"
1351
1347
  },
1352
1348
  {
1353
1349
  "name": "m-cols",
@@ -1355,7 +1351,11 @@
1355
1351
  },
1356
1352
  {
1357
1353
  "name": "m-size",
1358
- "description": "the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width."
1354
+ "description": "the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`"
1355
+ },
1356
+ {
1357
+ "name": "m-tpl",
1358
+ "description": "Optional medium `grid-template`. *Note* - you must set `mCols` for this to take affect"
1359
1359
  },
1360
1360
  {
1361
1361
  "name": "s-cols",
@@ -1363,7 +1363,11 @@
1363
1363
  },
1364
1364
  {
1365
1365
  "name": "s-size",
1366
- "description": "the component's small breakpoint. Note - all breakpoints are based on component width, not screen width."
1366
+ "description": "the component's small breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`"
1367
+ },
1368
+ {
1369
+ "name": "s-tpl",
1370
+ "description": "Optional small `grid-template`. *Note* - you must set `sCols` for this to take affect"
1367
1371
  },
1368
1372
  {
1369
1373
  "name": "show-helper",
@@ -1375,11 +1379,19 @@
1375
1379
  },
1376
1380
  {
1377
1381
  "name": "xl-size",
1378
- "description": "the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width."
1382
+ "description": "the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width.\nWill default to `px` if no unit supplied e.g. `20rem`"
1383
+ },
1384
+ {
1385
+ "name": "xl-tpl",
1386
+ "description": "Optional xl `grid-template`. *Note* - you must set `xlCols` for this to take affect"
1379
1387
  },
1380
1388
  {
1381
1389
  "name": "xxl-cols",
1382
1390
  "description": "the number of columns the grid has at the xxl breakpoint (anything greater than the xl breakpoint)"
1391
+ },
1392
+ {
1393
+ "name": "xxl-tpl",
1394
+ "description": "Optional xxl `grid-template`. *Note* - you must set `xxlCols` for this to take affect"
1383
1395
  }
1384
1396
  ]
1385
1397
  },
@@ -1387,14 +1399,9 @@
1387
1399
  "name": "nano-grid-item",
1388
1400
  "description": {
1389
1401
  "kind": "markdown",
1390
- "value": "Grid items to be used with [grid](/story/nano-components-grid) elements"
1402
+ "value": ""
1391
1403
  },
1392
- "attributes": [
1393
- {
1394
- "name": "grid-states",
1395
- "description": "How to position this item within it's parent grid at different break points. Examples:\nxl-col-span-2\nl-col-start-2\nxxl-row-span-2\nm-row-start-2"
1396
- }
1397
- ]
1404
+ "attributes": []
1398
1405
  },
1399
1406
  {
1400
1407
  "name": "nano-hero",
@@ -1405,7 +1412,7 @@
1405
1412
  "attributes": [
1406
1413
  {
1407
1414
  "name": "img-src",
1408
- "description": "src for backgronund image. For more control use the `background` slot instead."
1415
+ "description": "src for background image. For more control use the `background` slot instead."
1409
1416
  },
1410
1417
  {
1411
1418
  "name": "img-src-set",