@nanoporetech-digital/components 6.6.1 → 6.8.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 (186) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/index-14451c95.js +4 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
  5. package/dist/cjs/nano-checkbox-group.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
  7. package/dist/cjs/nano-checkbox.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nano-components.cjs.js +1 -1
  9. package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
  10. package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +1 -1
  12. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nano-global-nav.cjs.entry.js +6 -6
  14. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nano-global-search-results.cjs.entry.js +4 -0
  16. package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
  17. package/dist/cjs/nano-hero.cjs.entry.js +1 -1
  18. package/dist/cjs/nano-hero.cjs.entry.js.map +1 -1
  19. package/dist/cjs/nano-input.cjs.entry.js +1 -1
  20. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nano-more-less.cjs.entry.js +77 -0
  22. package/dist/cjs/nano-more-less.cjs.entry.js.map +1 -0
  23. package/dist/cjs/nano-sticker.cjs.entry.js +3 -1
  24. package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
  25. package/dist/cjs/{nano-table-fc1bbee6.js → nano-table-b4de2576.js} +2 -3
  26. package/dist/cjs/nano-table-b4de2576.js.map +1 -0
  27. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  28. package/dist/cjs/{table.worker-ebd2715a.js → table.worker-074a4646.js} +2 -2
  29. package/dist/cjs/table.worker-074a4646.js.map +1 -0
  30. package/dist/collection/collection-manifest.json +1 -0
  31. package/dist/collection/components/checkbox/checkbox-group.css +0 -1
  32. package/dist/collection/components/checkbox/checkbox.css +0 -1
  33. package/dist/collection/components/file-upload/file-upload.css +0 -1
  34. package/dist/collection/components/global-nav/global-nav.js +5 -6
  35. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  36. package/dist/collection/components/global-nav/style/global-nav.css +2 -18
  37. package/dist/collection/components/global-search-results/global-search-results.js +24 -0
  38. package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
  39. package/dist/collection/components/hero/hero.css +2 -3
  40. package/dist/collection/components/input/input.css +0 -1
  41. package/dist/collection/components/more-less/more-less.js +178 -0
  42. package/dist/collection/components/more-less/more-less.js.map +1 -0
  43. package/dist/collection/components/select/select.css +0 -1
  44. package/dist/collection/components/sticker/sticker.js +3 -1
  45. package/dist/collection/components/sticker/sticker.js.map +1 -1
  46. package/dist/collection/components/table/table.cell.js +0 -1
  47. package/dist/collection/components/table/table.cell.js.map +1 -1
  48. package/dist/collection/components/table/table.js +5 -2
  49. package/dist/collection/components/table/table.js.map +1 -1
  50. package/dist/collection/utils/custom-template.js +78 -0
  51. package/dist/collection/utils/custom-template.js.map +1 -0
  52. package/dist/components/index.d.ts +1 -0
  53. package/dist/components/index.js +1 -0
  54. package/dist/components/index.js.map +1 -1
  55. package/dist/components/input.js +1 -1
  56. package/dist/components/input.js.map +1 -1
  57. package/dist/components/nano-checkbox-group.js +1 -1
  58. package/dist/components/nano-checkbox-group.js.map +1 -1
  59. package/dist/components/nano-checkbox.js +1 -1
  60. package/dist/components/nano-checkbox.js.map +1 -1
  61. package/dist/components/nano-file-upload.js +1 -1
  62. package/dist/components/nano-file-upload.js.map +1 -1
  63. package/dist/components/nano-global-nav.js +24 -30
  64. package/dist/components/nano-global-nav.js.map +1 -1
  65. package/dist/components/nano-global-search-results.js +6 -1
  66. package/dist/components/nano-global-search-results.js.map +1 -1
  67. package/dist/components/nano-hero.js +1 -1
  68. package/dist/components/nano-hero.js.map +1 -1
  69. package/dist/components/nano-more-less.d.ts +11 -0
  70. package/dist/components/nano-more-less.js +98 -0
  71. package/dist/components/nano-more-less.js.map +1 -0
  72. package/dist/components/select.js +1 -1
  73. package/dist/components/select.js.map +1 -1
  74. package/dist/components/sticker.js +3 -1
  75. package/dist/components/sticker.js.map +1 -1
  76. package/dist/components/table.js +0 -1
  77. package/dist/components/table.js.map +1 -1
  78. package/dist/esm/index-9695db0a.js +4 -0
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/esm/nano-checkbox-group.entry.js +1 -1
  81. package/dist/esm/nano-checkbox-group.entry.js.map +1 -1
  82. package/dist/esm/nano-checkbox.entry.js +1 -1
  83. package/dist/esm/nano-checkbox.entry.js.map +1 -1
  84. package/dist/esm/nano-components.js +1 -1
  85. package/dist/esm/nano-file-upload.entry.js +1 -1
  86. package/dist/esm/nano-file-upload.entry.js.map +1 -1
  87. package/dist/esm/nano-global-nav-user-profile_3.entry.js +1 -1
  88. package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
  89. package/dist/esm/nano-global-nav.entry.js +6 -6
  90. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  91. package/dist/esm/nano-global-search-results.entry.js +4 -0
  92. package/dist/esm/nano-global-search-results.entry.js.map +1 -1
  93. package/dist/esm/nano-hero.entry.js +1 -1
  94. package/dist/esm/nano-hero.entry.js.map +1 -1
  95. package/dist/esm/nano-input.entry.js +1 -1
  96. package/dist/esm/nano-input.entry.js.map +1 -1
  97. package/dist/esm/nano-more-less.entry.js +73 -0
  98. package/dist/esm/nano-more-less.entry.js.map +1 -0
  99. package/dist/esm/nano-sticker.entry.js +3 -1
  100. package/dist/esm/nano-sticker.entry.js.map +1 -1
  101. package/dist/esm/{nano-table-52224679.js → nano-table-dd08a12c.js} +2 -3
  102. package/dist/esm/nano-table-dd08a12c.js.map +1 -0
  103. package/dist/esm/nano-table.entry.js +1 -1
  104. package/dist/esm/{table.worker-2b9e10f0.js → table.worker-094f28de.js} +2 -2
  105. package/dist/esm/table.worker-094f28de.js.map +1 -0
  106. package/dist/nano-assets/hash.txt +1 -1
  107. package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
  108. package/dist/nano-components/nano-checkbox-group.entry.js.map +1 -1
  109. package/dist/nano-components/nano-checkbox.entry.js +1 -1
  110. package/dist/nano-components/nano-checkbox.entry.js.map +1 -1
  111. package/dist/nano-components/nano-components.esm.js +1 -1
  112. package/dist/nano-components/nano-components.esm.js.map +1 -1
  113. package/dist/nano-components/nano-file-upload.entry.js +1 -1
  114. package/dist/nano-components/nano-file-upload.entry.js.map +1 -1
  115. package/dist/nano-components/nano-global-nav-user-profile_3.entry.js +1 -1
  116. package/dist/nano-components/nano-global-nav-user-profile_3.entry.js.map +1 -1
  117. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  118. package/dist/nano-components/nano-global-nav.entry.js.map +1 -1
  119. package/dist/nano-components/nano-global-search-results.entry.js +1 -1
  120. package/dist/nano-components/nano-global-search-results.entry.js.map +1 -1
  121. package/dist/nano-components/nano-hero.entry.js +1 -1
  122. package/dist/nano-components/nano-hero.entry.js.map +1 -1
  123. package/dist/nano-components/nano-input.entry.js +1 -1
  124. package/dist/nano-components/nano-input.entry.js.map +1 -1
  125. package/dist/nano-components/nano-more-less.entry.js +5 -0
  126. package/dist/nano-components/nano-more-less.entry.js.map +1 -0
  127. package/dist/nano-components/nano-sticker.entry.js +1 -1
  128. package/dist/nano-components/nano-sticker.entry.js.map +1 -1
  129. package/dist/nano-components/nano-table-dd08a12c.js +5 -0
  130. package/dist/nano-components/nano-table-dd08a12c.js.map +1 -0
  131. package/dist/nano-components/nano-table.entry.js +1 -1
  132. package/dist/nano-components/table.worker-094f28de.js +5 -0
  133. package/dist/themes/nanopore.cn.css +1 -1
  134. package/dist/themes/nanopore.cn.css.map +1 -1
  135. package/dist/themes/nanopore.css +1 -1
  136. package/dist/themes/nanopore.css.map +1 -1
  137. package/dist/types/components/global-nav/global-nav.d.ts +0 -1
  138. package/dist/types/components/global-search-results/global-search-results.d.ts +2 -0
  139. package/dist/types/components/more-less/more-less.d.ts +35 -0
  140. package/dist/types/components/table/table.d.ts +1 -1
  141. package/dist/types/components.d.ts +63 -2
  142. package/dist/types/utils/custom-template.d.ts +60 -0
  143. package/docs-json.json +168 -21
  144. package/docs-vscode.json +25 -0
  145. package/hydrate/index.js +107 -16
  146. package/package.json +2 -2
  147. package/dist/cjs/nano-table-fc1bbee6.js.map +0 -1
  148. package/dist/cjs/table.worker-ebd2715a.js.map +0 -1
  149. package/dist/esm/nano-table-52224679.js.map +0 -1
  150. package/dist/esm/table.worker-2b9e10f0.js.map +0 -1
  151. package/dist/nano-assets/fonts/3AF163_15_0.woff +0 -0
  152. package/dist/nano-assets/fonts/3AF163_15_0.woff2 +0 -0
  153. package/dist/nano-assets/fonts/3AF163_16_0.woff +0 -0
  154. package/dist/nano-assets/fonts/3AF163_16_0.woff2 +0 -0
  155. package/dist/nano-assets/fonts/3AF163_17_0.woff +0 -0
  156. package/dist/nano-assets/fonts/3AF163_17_0.woff2 +0 -0
  157. package/dist/nano-assets/fonts/3AF163_1B_0.woff +0 -0
  158. package/dist/nano-assets/fonts/3AF163_1B_0.woff2 +0 -0
  159. package/dist/nano-assets/fonts/3AF163_1C_0.woff +0 -0
  160. package/dist/nano-assets/fonts/3AF163_1C_0.woff2 +0 -0
  161. package/dist/nano-assets/fonts/3AF163_1_0.woff +0 -0
  162. package/dist/nano-assets/fonts/3AF163_1_0.woff2 +0 -0
  163. package/dist/nano-assets/fonts/3AF163_2A_0.woff +0 -0
  164. package/dist/nano-assets/fonts/3AF163_2A_0.woff2 +0 -0
  165. package/dist/nano-assets/fonts/3AF163_2_0.woff +0 -0
  166. package/dist/nano-assets/fonts/3AF163_2_0.woff2 +0 -0
  167. package/dist/nano-assets/fonts/3AF163_5_0.woff +0 -0
  168. package/dist/nano-assets/fonts/3AF163_5_0.woff2 +0 -0
  169. package/dist/nano-assets/fonts/3AF163_8_0.woff +0 -0
  170. package/dist/nano-assets/fonts/3AF163_8_0.woff2 +0 -0
  171. package/dist/nano-assets/fonts/3AF163_9_0.woff +0 -0
  172. package/dist/nano-assets/fonts/3AF163_9_0.woff2 +0 -0
  173. package/dist/nano-assets/fonts/3AF163_A_0.woff +0 -0
  174. package/dist/nano-assets/fonts/3AF163_A_0.woff2 +0 -0
  175. package/dist/nano-assets/fonts/3AF163_B_0.woff +0 -0
  176. package/dist/nano-assets/fonts/3AF163_B_0.woff2 +0 -0
  177. package/dist/nano-assets/fonts/3AF163_C_0.woff +0 -0
  178. package/dist/nano-assets/fonts/3AF163_C_0.woff2 +0 -0
  179. package/dist/nano-assets/fonts/HVMicro500.woff +0 -0
  180. package/dist/nano-assets/fonts/HVMicro500.woff2 +0 -0
  181. package/dist/nano-assets/fonts/HVMicro500It.woff +0 -0
  182. package/dist/nano-assets/fonts/HVMicro500It.woff2 +0 -0
  183. package/dist/nano-components/nano-table-52224679.js +0 -5
  184. package/dist/nano-components/nano-table-52224679.js.map +0 -1
  185. package/dist/nano-components/table.worker-2b9e10f0.js +0 -5
  186. /package/dist/nano-components/{table.worker-2b9e10f0.js.map → table.worker-094f28de.js.map} +0 -0
@@ -0,0 +1,35 @@
1
+ import { ComponentInterface } from '../../stencil-public-runtime';
2
+ /**
3
+ * A simple component to show more or less elements.
4
+ *
5
+ * @slot less - a button displayed when all fewer are shown. When clicked will show elements
6
+ * @slot more - a button displayed when all items are shown. When clicked will hide elements
7
+ * @slot - default slot displaying children elements to show or hide
8
+ *
9
+ * @part button-wrapper - wraps the 'more' / 'less' buttons
10
+ * @part button-wrapper--more - wraps the 'more' button
11
+ * @part button-wrapper--less - wraps the 'less' button
12
+ */
13
+ export declare class Rating implements ComponentInterface {
14
+ private mo;
15
+ slottedElements: HTMLElement[];
16
+ host: HTMLNanoMoreLessElement;
17
+ /** The default state. `false` - excess items are hidden. `true` - excess items are shown. */
18
+ show: boolean;
19
+ /** Optional JS selector to target which elements to hide or show */
20
+ childrenSelector: string;
21
+ /** The maximum number of items to show when `show` is true.
22
+ * Excess items will be hidden. */
23
+ maxToShow: number;
24
+ /** Only show the 'show more' button */
25
+ noHideBtn: boolean;
26
+ get children(): HTMLCollectionOf<Element> | NodeListOf<Element>;
27
+ handleShowHideElements(): void;
28
+ private slotChangeObserver;
29
+ private processSlottedContent;
30
+ private handleClick;
31
+ componentDidLoad(): void;
32
+ connectedCallback(): void;
33
+ disconnectedCallback(): void;
34
+ render(): any;
35
+ }
@@ -19,7 +19,7 @@ export declare class Table implements ComponentInterface {
19
19
  /** Function called whenever `col.cellTemplate` renders an unknown object.
20
20
  * The function should render a valid HTMLElement to the cell arg.
21
21
  * Example usage - render JSX from a 3rd party lib and append the result to the cell element. */
22
- customRenderer: (node: any, cell: HTMLElement) => void | Promise<string>;
22
+ customRenderer: (node: any, cell: HTMLElement | DocumentFragment) => void | Promise<string>;
23
23
  /** The type of table. Grid type will make cells navigable by keyboard */
24
24
  type: 'grid' | 'table';
25
25
  /** A descriptive title of the table.
@@ -1128,6 +1128,10 @@ export namespace Components {
1128
1128
  * and should be a direct child of <nano-global-nav>
1129
1129
  */
1130
1130
  interface NanoGlobalSearchResults {
1131
+ /**
1132
+ * Manually close the search panel
1133
+ */
1134
+ "closeSearch": () => Promise<void>;
1131
1135
  }
1132
1136
  /**
1133
1137
  * A lightweight, context-aware CSS grid implementation.
@@ -1616,6 +1620,27 @@ export namespace Components {
1616
1620
  */
1617
1621
  "saveState": boolean;
1618
1622
  }
1623
+ /**
1624
+ * A simple component to show more or less elements.
1625
+ */
1626
+ interface NanoMoreLess {
1627
+ /**
1628
+ * Optional JS selector to target which elements to hide or show
1629
+ */
1630
+ "childrenSelector": string;
1631
+ /**
1632
+ * The maximum number of items to show when `show` is true. Excess items will be hidden.
1633
+ */
1634
+ "maxToShow": number;
1635
+ /**
1636
+ * Only show the 'show more' button
1637
+ */
1638
+ "noHideBtn": boolean;
1639
+ /**
1640
+ * The default state. `false` - excess items are hidden. `true` - excess items are shown.
1641
+ */
1642
+ "show": boolean;
1643
+ }
1619
1644
  /**
1620
1645
  * Nav items to be used with the various nav items.
1621
1646
  * [Globla-Nav](/story/compounds-global-nav)
@@ -2459,7 +2484,7 @@ export namespace Components {
2459
2484
  */
2460
2485
  "customRenderer": (
2461
2486
  node: any,
2462
- cell: HTMLElement
2487
+ cell: HTMLElement | DocumentFragment
2463
2488
  ) => void | Promise<string>;
2464
2489
  /**
2465
2490
  * A custom sorting function. Should return a promise. If the promise resolves as `true` the column UI will be updated. If the promise resolves as falsey, the sort will be performed by the component. A good use-case would be performing the sort on a server / via fetch. Then on success, updating the table's data via the `rows` property
@@ -3078,6 +3103,15 @@ declare global {
3078
3103
  prototype: HTMLNanoMenuDrawerElement;
3079
3104
  new (): HTMLNanoMenuDrawerElement;
3080
3105
  };
3106
+ /**
3107
+ * A simple component to show more or less elements.
3108
+ */
3109
+ interface HTMLNanoMoreLessElement extends Components.NanoMoreLess, HTMLStencilElement {
3110
+ }
3111
+ var HTMLNanoMoreLessElement: {
3112
+ prototype: HTMLNanoMoreLessElement;
3113
+ new (): HTMLNanoMoreLessElement;
3114
+ };
3081
3115
  /**
3082
3116
  * Nav items to be used with the various nav items.
3083
3117
  * [Globla-Nav](/story/compounds-global-nav)
@@ -3314,6 +3348,7 @@ declare global {
3314
3348
  "nano-intersection-observe": HTMLNanoIntersectionObserveElement;
3315
3349
  "nano-menu": HTMLNanoMenuElement;
3316
3350
  "nano-menu-drawer": HTMLNanoMenuDrawerElement;
3351
+ "nano-more-less": HTMLNanoMoreLessElement;
3317
3352
  "nano-nav-item": HTMLNanoNavItemElement;
3318
3353
  "nano-option": HTMLNanoOptionElement;
3319
3354
  "nano-overflow-nav": HTMLNanoOverflowNavElement;
@@ -5029,6 +5064,27 @@ declare namespace LocalJSX {
5029
5064
  */
5030
5065
  "saveState"?: boolean;
5031
5066
  }
5067
+ /**
5068
+ * A simple component to show more or less elements.
5069
+ */
5070
+ interface NanoMoreLess {
5071
+ /**
5072
+ * Optional JS selector to target which elements to hide or show
5073
+ */
5074
+ "childrenSelector"?: string;
5075
+ /**
5076
+ * The maximum number of items to show when `show` is true. Excess items will be hidden.
5077
+ */
5078
+ "maxToShow"?: number;
5079
+ /**
5080
+ * Only show the 'show more' button
5081
+ */
5082
+ "noHideBtn"?: boolean;
5083
+ /**
5084
+ * The default state. `false` - excess items are hidden. `true` - excess items are shown.
5085
+ */
5086
+ "show"?: boolean;
5087
+ }
5032
5088
  /**
5033
5089
  * Nav items to be used with the various nav items.
5034
5090
  * [Globla-Nav](/story/compounds-global-nav)
@@ -5928,7 +5984,7 @@ declare namespace LocalJSX {
5928
5984
  */
5929
5985
  "customRenderer"?: (
5930
5986
  node: any,
5931
- cell: HTMLElement
5987
+ cell: HTMLElement | DocumentFragment
5932
5988
  ) => void | Promise<string>;
5933
5989
  /**
5934
5990
  * A custom sorting function. Should return a promise. If the promise resolves as `true` the column UI will be updated. If the promise resolves as falsey, the sort will be performed by the component. A good use-case would be performing the sort on a server / via fetch. Then on success, updating the table's data via the `rows` property
@@ -6133,6 +6189,7 @@ declare namespace LocalJSX {
6133
6189
  "nano-intersection-observe": NanoIntersectionObserve;
6134
6190
  "nano-menu": NanoMenu;
6135
6191
  "nano-menu-drawer": NanoMenuDrawer;
6192
+ "nano-more-less": NanoMoreLess;
6136
6193
  "nano-nav-item": NanoNavItem;
6137
6194
  "nano-option": NanoOption;
6138
6195
  "nano-overflow-nav": NanoOverflowNav;
@@ -6319,6 +6376,10 @@ declare module "@stencil/core" {
6319
6376
  * Only one nano-menu-drawer element should be present on any page. It is fixed to a side on larger screens and items are added to the global nav 'burger' on smaller screens.
6320
6377
  */
6321
6378
  "nano-menu-drawer": LocalJSX.NanoMenuDrawer & JSXBase.HTMLAttributes<HTMLNanoMenuDrawerElement>;
6379
+ /**
6380
+ * A simple component to show more or less elements.
6381
+ */
6382
+ "nano-more-less": LocalJSX.NanoMoreLess & JSXBase.HTMLAttributes<HTMLNanoMoreLessElement>;
6322
6383
  /**
6323
6384
  * Nav items to be used with the various nav items.
6324
6385
  * [Globla-Nav](/story/compounds-global-nav)
@@ -0,0 +1,60 @@
1
+ import { VNode } from '../stencil-public-runtime';
2
+ import { JSXBase } from '../stencil-public-runtime';
3
+ /** A JSX `createElement` function passed to rendering functions.
4
+ * You can use this to create markup outside of JSX environments
5
+ * e.g. https://reactjs.org/docs/react-without-jsx.html */
6
+ interface HFunc<T> {
7
+ (tag: any): T;
8
+ }
9
+ interface HFunc<T> {
10
+ (tag: any, data: any): T;
11
+ }
12
+ interface HFunc<T> {
13
+ (tag: any, text: string): T;
14
+ }
15
+ interface HFunc<T> {
16
+ (sel: any, children: Array<T | undefined | null>): T;
17
+ }
18
+ interface HFunc<T> {
19
+ (sel: any, data: any, text: string): T;
20
+ }
21
+ interface HFunc<T> {
22
+ (sel: any, data: any, children: Array<T | undefined | null>): T;
23
+ }
24
+ interface HFunc<T> {
25
+ (sel: any, data: any, children: T): T;
26
+ }
27
+ type LibJSX = Record<string, any>;
28
+ type JSXRender = VNode | VNode[] | LibJSX | LibJSX[];
29
+ type TplReturn = JSXRender | string | Element | undefined;
30
+ type TplResult = TplReturn | Promise<string>;
31
+ type DropFirst<T extends unknown[]> = T extends [any, ...infer U] ? U : never;
32
+ export type CustomRenderer = (node: any, cell: HTMLElement | DocumentFragment) => void | Promise<string>;
33
+ export type TemplateFunc<T> = (createElement: HFunc<JSXRender>, props?: T) => TplResult;
34
+ type TemplateCall = (...args: any) => TplResult;
35
+ type WrapProps<T extends TemplateCall> = {
36
+ parentTag: string;
37
+ attrs?: JSXBase.HTMLAttributes;
38
+ template: T;
39
+ args?: DropFirst<Parameters<T>>;
40
+ };
41
+ /**
42
+ * A functional component to handle custom rendering.
43
+ * Usage:
44
+ * @Prop() template = (_createElement: typeof h, exampleArg1: number, exampleArg2: boolean) => { if (exampleArg1) return <button>yay</button }
45
+ * // Optional
46
+ * @Prop() customRenderer: CustomRenderer
47
+ *
48
+ * <CustomRender
49
+ * parentTag='div'
50
+ * attrs={{ onClick: e => this.handleClick(e), class: 'button-wrapper' }}
51
+ * template={this.template}
52
+ * args={[3, true]}
53
+ * />
54
+ *
55
+ * @param props - renderer template function, arguments to pass to the renderer function, parental wrapper tag (and attributes)
56
+ * @param children - other virtual nodes to render
57
+ * @returns a jsx vnode
58
+ */
59
+ export declare function CustomRender<T extends TemplateCall>(props: WrapProps<T>, children?: any): VNode;
60
+ export {};
package/docs-json.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-10-02T11:59:32",
2
+ "timestamp": "2024-11-07T10:18:25",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.23.2",
@@ -7291,10 +7291,6 @@
7291
7291
  "name": "part",
7292
7292
  "text": "burger-content - the main content area of the overflow / burger menu"
7293
7293
  },
7294
- {
7295
- "name": "part",
7296
- "text": "sticker - the `nano-sticker` wrapping the main nav-bar"
7297
- },
7298
7294
  {
7299
7295
  "name": "part",
7300
7296
  "text": "bars - the main wrapper around the `main-bar` and `search-bar` nav bars"
@@ -7953,10 +7949,6 @@
7953
7949
  {
7954
7950
  "name": "search-bar",
7955
7951
  "docs": "the search bar that appears under the main nav menu bar"
7956
- },
7957
- {
7958
- "name": "sticker",
7959
- "docs": "the `nano-sticker` wrapping the main nav-bar"
7960
7952
  }
7961
7953
  ],
7962
7954
  "dependents": [],
@@ -7966,8 +7958,7 @@
7966
7958
  "nano-icon",
7967
7959
  "nano-input",
7968
7960
  "nano-nav-item",
7969
- "nano-global-nav-user-profile",
7970
- "nano-sticker"
7961
+ "nano-global-nav-user-profile"
7971
7962
  ],
7972
7963
  "dependencyGraph": {
7973
7964
  "nano-global-nav": [
@@ -7976,8 +7967,7 @@
7976
7967
  "nano-icon",
7977
7968
  "nano-input",
7978
7969
  "nano-nav-item",
7979
- "nano-global-nav-user-profile",
7980
- "nano-sticker"
7970
+ "nano-global-nav-user-profile"
7981
7971
  ],
7982
7972
  "nano-select": [
7983
7973
  "nano-icon",
@@ -8075,7 +8065,19 @@
8075
8065
  "docsTags": [],
8076
8066
  "usage": {},
8077
8067
  "props": [],
8078
- "methods": [],
8068
+ "methods": [
8069
+ {
8070
+ "name": "closeSearch",
8071
+ "returns": {
8072
+ "type": "Promise<void>",
8073
+ "docs": ""
8074
+ },
8075
+ "signature": "closeSearch() => Promise<void>",
8076
+ "parameters": [],
8077
+ "docs": "Manually close the search panel",
8078
+ "docsTags": []
8079
+ }
8080
+ ],
8079
8081
  "events": [
8080
8082
  {
8081
8083
  "event": "nanoSearchGoBack",
@@ -11373,6 +11375,152 @@
11373
11375
  ]
11374
11376
  }
11375
11377
  },
11378
+ {
11379
+ "filePath": "./src/components/more-less/more-less.tsx",
11380
+ "encapsulation": "scoped",
11381
+ "tag": "nano-more-less",
11382
+ "readme": "# nano-more-less\n\n\n",
11383
+ "docs": "A simple component to show more or less elements.",
11384
+ "docsTags": [
11385
+ {
11386
+ "name": "slot",
11387
+ "text": "less - a button displayed when all fewer are shown. When clicked will show elements"
11388
+ },
11389
+ {
11390
+ "name": "slot",
11391
+ "text": "more - a button displayed when all items are shown. When clicked will hide elements"
11392
+ },
11393
+ {
11394
+ "name": "slot",
11395
+ "text": "- default slot displaying children elements to show or hide"
11396
+ },
11397
+ {
11398
+ "name": "part",
11399
+ "text": "button-wrapper - wraps the 'more' / 'less' buttons"
11400
+ },
11401
+ {
11402
+ "name": "part",
11403
+ "text": "button-wrapper--more - wraps the 'more' button"
11404
+ },
11405
+ {
11406
+ "name": "part",
11407
+ "text": "button-wrapper--less - wraps the 'less' button"
11408
+ }
11409
+ ],
11410
+ "usage": {},
11411
+ "props": [
11412
+ {
11413
+ "name": "childrenSelector",
11414
+ "type": "string",
11415
+ "mutable": false,
11416
+ "attr": "children-selector",
11417
+ "reflectToAttr": false,
11418
+ "docs": "Optional JS selector to target which elements to hide or show",
11419
+ "docsTags": [],
11420
+ "values": [
11421
+ {
11422
+ "type": "string"
11423
+ }
11424
+ ],
11425
+ "optional": false,
11426
+ "required": false,
11427
+ "getter": false,
11428
+ "setter": false
11429
+ },
11430
+ {
11431
+ "name": "maxToShow",
11432
+ "type": "number",
11433
+ "mutable": false,
11434
+ "attr": "max-to-show",
11435
+ "reflectToAttr": false,
11436
+ "docs": "The maximum number of items to show when `show` is true.\nExcess items will be hidden.",
11437
+ "docsTags": [],
11438
+ "default": "3",
11439
+ "values": [
11440
+ {
11441
+ "type": "number"
11442
+ }
11443
+ ],
11444
+ "optional": false,
11445
+ "required": false,
11446
+ "getter": false,
11447
+ "setter": false
11448
+ },
11449
+ {
11450
+ "name": "noHideBtn",
11451
+ "type": "boolean",
11452
+ "mutable": false,
11453
+ "attr": "no-hide-btn",
11454
+ "reflectToAttr": false,
11455
+ "docs": "Only show the 'show more' button",
11456
+ "docsTags": [],
11457
+ "default": "false",
11458
+ "values": [
11459
+ {
11460
+ "type": "boolean"
11461
+ }
11462
+ ],
11463
+ "optional": false,
11464
+ "required": false,
11465
+ "getter": false,
11466
+ "setter": false
11467
+ },
11468
+ {
11469
+ "name": "show",
11470
+ "type": "boolean",
11471
+ "mutable": true,
11472
+ "attr": "show",
11473
+ "reflectToAttr": true,
11474
+ "docs": "The default state. `false` - excess items are hidden. `true` - excess items are shown.",
11475
+ "docsTags": [],
11476
+ "default": "false",
11477
+ "values": [
11478
+ {
11479
+ "type": "boolean"
11480
+ }
11481
+ ],
11482
+ "optional": false,
11483
+ "required": false,
11484
+ "getter": false,
11485
+ "setter": false
11486
+ }
11487
+ ],
11488
+ "methods": [],
11489
+ "events": [],
11490
+ "listeners": [],
11491
+ "styles": [],
11492
+ "slots": [
11493
+ {
11494
+ "name": "",
11495
+ "docs": "default slot displaying children elements to show or hide"
11496
+ },
11497
+ {
11498
+ "name": "less",
11499
+ "docs": "a button displayed when all fewer are shown. When clicked will show elements"
11500
+ },
11501
+ {
11502
+ "name": "more",
11503
+ "docs": "a button displayed when all items are shown. When clicked will hide elements"
11504
+ }
11505
+ ],
11506
+ "parts": [
11507
+ {
11508
+ "name": "button-wrapper",
11509
+ "docs": "wraps the 'more' / 'less' buttons"
11510
+ },
11511
+ {
11512
+ "name": "button-wrapper--less",
11513
+ "docs": "wraps the 'less' button"
11514
+ },
11515
+ {
11516
+ "name": "button-wrapper--more",
11517
+ "docs": "wraps the 'more' button"
11518
+ }
11519
+ ],
11520
+ "dependents": [],
11521
+ "dependencies": [],
11522
+ "dependencyGraph": {}
11523
+ },
11376
11524
  {
11377
11525
  "filePath": "./src/components/nav-item/nav-item.tsx",
11378
11526
  "encapsulation": "shadow",
@@ -16222,8 +16370,7 @@
16222
16370
  "parts": [],
16223
16371
  "dependents": [
16224
16372
  "nano-dialog",
16225
- "nano-drawer",
16226
- "nano-global-nav"
16373
+ "nano-drawer"
16227
16374
  ],
16228
16375
  "dependencies": [],
16229
16376
  "dependencyGraph": {
@@ -16232,9 +16379,6 @@
16232
16379
  ],
16233
16380
  "nano-drawer": [
16234
16381
  "nano-sticker"
16235
- ],
16236
- "nano-global-nav": [
16237
- "nano-sticker"
16238
16382
  ]
16239
16383
  }
16240
16384
  },
@@ -17108,14 +17252,17 @@
17108
17252
  },
17109
17253
  {
17110
17254
  "name": "customRenderer",
17111
- "type": "(node: any, cell: HTMLElement) => void | Promise<string>",
17255
+ "type": "(node: any, cell: HTMLElement | DocumentFragment) => void | Promise<string>",
17112
17256
  "mutable": false,
17113
17257
  "reflectToAttr": false,
17114
17258
  "docs": "Function called whenever `col.cellTemplate` renders an unknown object.\nThe function should render a valid HTMLElement to the cell arg.\nExample usage - render JSX from a 3rd party lib and append the result to the cell element.",
17115
17259
  "docsTags": [],
17116
17260
  "values": [
17117
17261
  {
17118
- "type": "(node: any, cell: HTMLElement) => void"
17262
+ "type": "(node: any, cell: HTMLElement"
17263
+ },
17264
+ {
17265
+ "type": "DocumentFragment) => void"
17119
17266
  },
17120
17267
  {
17121
17268
  "type": "Promise<string>"
package/docs-vscode.json CHANGED
@@ -2404,6 +2404,31 @@
2404
2404
  }
2405
2405
  ]
2406
2406
  },
2407
+ {
2408
+ "name": "nano-more-less",
2409
+ "description": {
2410
+ "kind": "markdown",
2411
+ "value": "A simple component to show more or less elements."
2412
+ },
2413
+ "attributes": [
2414
+ {
2415
+ "name": "children-selector",
2416
+ "description": "Optional JS selector to target which elements to hide or show"
2417
+ },
2418
+ {
2419
+ "name": "max-to-show",
2420
+ "description": "The maximum number of items to show when `show` is true.\nExcess items will be hidden."
2421
+ },
2422
+ {
2423
+ "name": "no-hide-btn",
2424
+ "description": "Only show the 'show more' button"
2425
+ },
2426
+ {
2427
+ "name": "show",
2428
+ "description": "The default state. `false` - excess items are hidden. `true` - excess items are shown."
2429
+ }
2430
+ ]
2431
+ },
2407
2432
  {
2408
2433
  "name": "nano-nav-item",
2409
2434
  "description": {