@nova-design-system/nova-webcomponents 3.20.0 → 3.21.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 (178) hide show
  1. package/dist/cjs/index-93d3b2f8.js +4 -0
  2. package/dist/cjs/index.cjs.js +1 -2
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/native.cjs.js +1 -1
  6. package/dist/cjs/nv-button.cjs.entry.js +7 -2
  7. package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nv-datagrid.cjs.entry.js +2 -2
  9. package/dist/cjs/nv-datagrid.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nv-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/nv-dialog.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nv-icon.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nv-iconbutton_2.cjs.entry.js +6 -1
  15. package/dist/cjs/nv-iconbutton_2.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nv-tableheader.cjs.entry.js +77 -0
  17. package/dist/cjs/nv-tableheader.cjs.entry.js.map +1 -0
  18. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  19. package/dist/cjs/nv-togglebutton.cjs.entry.js +2 -2
  20. package/dist/cjs/nv-togglebutton.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
  22. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  23. package/dist/collection/collection-manifest.json +1 -0
  24. package/dist/collection/components/nv-button/nv-button.js +26 -1
  25. package/dist/collection/components/nv-button/nv-button.js.map +1 -1
  26. package/dist/collection/components/nv-button/styles/nv-button.css +4 -0
  27. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js +1 -1
  28. package/dist/collection/components/nv-datagrid/nv-datagrid.docs.js.map +1 -1
  29. package/dist/collection/components/nv-datagrid/nv-datagrid.js +4 -2
  30. package/dist/collection/components/nv-datagrid/nv-datagrid.js.map +1 -1
  31. package/dist/collection/components/nv-dialog/nv-dialog.css +1 -0
  32. package/dist/collection/components/nv-icon/nv-icons.js +1 -2
  33. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -1
  34. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +26 -1
  35. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -1
  36. package/dist/collection/components/nv-menuitem/nv-menuitem.js +1 -1
  37. package/dist/collection/components/nv-table/nv-table.docs.js +7 -0
  38. package/dist/collection/components/nv-table/nv-table.docs.js.map +1 -1
  39. package/dist/collection/components/nv-tableheader/nv-tableheader.css +28 -0
  40. package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js +13 -0
  41. package/dist/collection/components/nv-tableheader/nv-tableheader.docs.js.map +1 -0
  42. package/dist/collection/components/nv-tableheader/nv-tableheader.js +139 -0
  43. package/dist/collection/components/nv-tableheader/nv-tableheader.js.map +1 -0
  44. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  45. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  46. package/dist/collection/components/nv-togglebutton/styles/nv-togglebutton.css +4 -0
  47. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
  48. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  49. package/dist/components/index.js +1 -2
  50. package/dist/components/index.js.map +1 -1
  51. package/dist/components/nv-accordion-item.js +1 -1
  52. package/dist/components/nv-accordion.js +3 -3
  53. package/dist/components/nv-alert.js +1 -1
  54. package/dist/components/nv-avatar.js +1 -1
  55. package/dist/components/nv-badge.js +1 -1
  56. package/dist/components/nv-breadcrumb.js +1 -1
  57. package/dist/components/nv-button.js +1 -1
  58. package/dist/components/nv-datagrid.js +4 -4
  59. package/dist/components/nv-datagrid.js.map +1 -1
  60. package/dist/components/nv-dialog.js +4 -4
  61. package/dist/components/nv-dialog.js.map +1 -1
  62. package/dist/components/nv-dialogfooter.js +1 -1
  63. package/dist/components/nv-fielddate.js +2 -2
  64. package/dist/components/nv-fielddaterange.js +2 -2
  65. package/dist/components/nv-fielddropdown.js +3 -3
  66. package/dist/components/nv-fielddropdownitem.js +1 -1
  67. package/dist/components/nv-fieldmultiselect.js +3 -3
  68. package/dist/components/nv-fieldnumber.js +1 -1
  69. package/dist/components/nv-fieldpassword.js +2 -2
  70. package/dist/components/nv-fieldselect.js +2 -2
  71. package/dist/components/nv-fieldslider.js +3 -3
  72. package/dist/components/nv-fieldtext.js +1 -1
  73. package/dist/components/nv-fieldtime.js +2 -2
  74. package/dist/components/nv-icon.js +1 -1
  75. package/dist/components/nv-iconbutton.js +1 -1
  76. package/dist/components/nv-menu.js +2 -2
  77. package/dist/components/nv-menuitem.js +1 -1
  78. package/dist/components/nv-notification.js +1 -1
  79. package/dist/components/nv-tableheader.d.ts +11 -0
  80. package/dist/components/nv-tableheader.js +112 -0
  81. package/dist/components/nv-tableheader.js.map +1 -0
  82. package/dist/components/nv-toggle.js +2 -2
  83. package/dist/components/nv-togglebutton.js +2 -2
  84. package/dist/components/nv-togglebutton.js.map +1 -1
  85. package/dist/components/nv-togglebuttongroup.js +1 -1
  86. package/dist/components/nv-tooltip.js +1 -1
  87. package/dist/components/{p-60083982.js → p-00347aae.js} +3 -3
  88. package/dist/components/{p-60083982.js.map → p-00347aae.js.map} +1 -1
  89. package/dist/components/p-0bfe8a47.js +88 -0
  90. package/dist/components/p-0bfe8a47.js.map +1 -0
  91. package/dist/components/p-2062ba39.js +191 -0
  92. package/dist/components/p-2062ba39.js.map +1 -0
  93. package/dist/components/{p-5a5db065.js → p-5c6b5444.js} +10 -4
  94. package/dist/components/p-5c6b5444.js.map +1 -0
  95. package/dist/components/{p-18f50d91.js → p-61382072.js} +2 -2
  96. package/dist/components/{p-18f50d91.js.map → p-61382072.js.map} +1 -1
  97. package/dist/components/{p-81d915ef.js → p-643d7802.js} +2 -2
  98. package/dist/components/{p-81d915ef.js.map → p-643d7802.js.map} +1 -1
  99. package/dist/components/{p-334e19d3.js → p-86588fba.js} +3 -3
  100. package/dist/components/{p-334e19d3.js.map → p-86588fba.js.map} +1 -1
  101. package/dist/components/{p-45a3cf85.js → p-8ce28cff.js} +2 -2
  102. package/dist/components/{p-45a3cf85.js.map → p-8ce28cff.js.map} +1 -1
  103. package/dist/components/{p-2ac6f42d.js → p-c4d20cc9.js} +2 -2
  104. package/dist/components/{p-2ac6f42d.js.map → p-c4d20cc9.js.map} +1 -1
  105. package/dist/components/{p-49205084.js → p-c69f5a37.js} +2 -2
  106. package/dist/components/{p-49205084.js.map → p-c69f5a37.js.map} +1 -1
  107. package/dist/components/{p-b67f31af.js → p-d1d4cc45.js} +3 -3
  108. package/dist/components/{p-b67f31af.js.map → p-d1d4cc45.js.map} +1 -1
  109. package/dist/esm/index-dc2723f3.js +4 -0
  110. package/dist/esm/index.js +1 -2
  111. package/dist/esm/index.js.map +1 -1
  112. package/dist/esm/loader.js +1 -1
  113. package/dist/esm/native.js +1 -1
  114. package/dist/esm/nv-button.entry.js +7 -2
  115. package/dist/esm/nv-button.entry.js.map +1 -1
  116. package/dist/esm/nv-datagrid.entry.js +2 -2
  117. package/dist/esm/nv-datagrid.entry.js.map +1 -1
  118. package/dist/esm/nv-dialog.entry.js +1 -1
  119. package/dist/esm/nv-dialog.entry.js.map +1 -1
  120. package/dist/esm/nv-icon.entry.js +1 -1
  121. package/dist/esm/nv-icon.entry.js.map +1 -1
  122. package/dist/esm/nv-iconbutton_2.entry.js +6 -1
  123. package/dist/esm/nv-iconbutton_2.entry.js.map +1 -1
  124. package/dist/esm/nv-tableheader.entry.js +73 -0
  125. package/dist/esm/nv-tableheader.entry.js.map +1 -0
  126. package/dist/esm/nv-toggle.entry.js +2 -2
  127. package/dist/esm/nv-togglebutton.entry.js +2 -2
  128. package/dist/esm/nv-togglebutton.entry.js.map +1 -1
  129. package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
  130. package/dist/esm/nv-tooltip.entry.js +1 -1
  131. package/dist/native/index.esm.js +1 -1
  132. package/dist/native/index.esm.js.map +1 -1
  133. package/dist/native/native.css +1 -1
  134. package/dist/native/native.esm.js +1 -1
  135. package/dist/native/native.esm.js.map +1 -1
  136. package/dist/native/p-2b4cf4b8.entry.js +2 -0
  137. package/dist/native/{p-dfb6b65e.entry.js.map → p-2b4cf4b8.entry.js.map} +1 -1
  138. package/dist/native/{p-8e423742.entry.js → p-44ba73dc.entry.js} +2 -2
  139. package/dist/native/{p-8e423742.entry.js.map → p-44ba73dc.entry.js.map} +1 -1
  140. package/dist/native/{p-075d231e.entry.js → p-4de8697c.entry.js} +2 -2
  141. package/dist/native/{p-44a78545.entry.js → p-533e2530.entry.js} +2 -2
  142. package/dist/native/p-56ed7306.entry.js +2 -0
  143. package/dist/native/p-56ed7306.entry.js.map +1 -0
  144. package/dist/native/p-973f5db2.entry.js +2 -0
  145. package/dist/native/p-973f5db2.entry.js.map +1 -0
  146. package/dist/native/p-ae5be175.entry.js +2 -0
  147. package/dist/native/p-ae5be175.entry.js.map +1 -0
  148. package/dist/native/p-b43d6629.entry.js +2 -0
  149. package/dist/native/p-b43d6629.entry.js.map +1 -0
  150. package/dist/native/{p-122c78c3.entry.js → p-be49d837.entry.js} +2 -2
  151. package/dist/native/{p-122c78c3.entry.js.map → p-be49d837.entry.js.map} +1 -1
  152. package/dist/native/{p-445221dc.entry.js → p-c4baad6e.entry.js} +2 -2
  153. package/dist/types/components/nv-button/nv-button.d.ts +5 -0
  154. package/dist/types/components/nv-datagrid/nv-datagrid.d.ts +2 -0
  155. package/dist/types/components/nv-icon/nv-icons.d.ts +1 -1
  156. package/dist/types/components/nv-iconbutton/nv-iconbutton.d.ts +5 -0
  157. package/dist/types/components/nv-tableheader/nv-tableheader.d.ts +32 -0
  158. package/dist/types/components/nv-tableheader/nv-tableheader.docs.d.ts +4 -0
  159. package/dist/types/components.d.ts +92 -0
  160. package/dist/vscode-data.json +39 -6
  161. package/hydrate/index.js +114 -17
  162. package/hydrate/index.mjs +114 -17
  163. package/package.json +5 -1
  164. package/dist/components/p-5a5db065.js.map +0 -1
  165. package/dist/components/p-946a047c.js +0 -88
  166. package/dist/components/p-946a047c.js.map +0 -1
  167. package/dist/components/p-e1b2eba2.js +0 -185
  168. package/dist/components/p-e1b2eba2.js.map +0 -1
  169. package/dist/native/p-a6fc987a.entry.js +0 -2
  170. package/dist/native/p-a6fc987a.entry.js.map +0 -1
  171. package/dist/native/p-d62869ff.entry.js +0 -2
  172. package/dist/native/p-d62869ff.entry.js.map +0 -1
  173. package/dist/native/p-d8f3cf92.entry.js +0 -2
  174. package/dist/native/p-d8f3cf92.entry.js.map +0 -1
  175. package/dist/native/p-dfb6b65e.entry.js +0 -2
  176. /package/dist/native/{p-075d231e.entry.js.map → p-4de8697c.entry.js.map} +0 -0
  177. /package/dist/native/{p-44a78545.entry.js.map → p-533e2530.entry.js.map} +0 -0
  178. /package/dist/native/{p-445221dc.entry.js.map → p-c4baad6e.entry.js.map} +0 -0
@@ -46,6 +46,11 @@ export class NvIconbutton {
46
46
  * Sets the shape of the button. Choose between square and rounded.
47
47
  */
48
48
  this.shape = 'square';
49
+ /**
50
+ * Use this to make the button skip-able when users navigate with the keyboard.
51
+ * The button remains clickable but won’t be reached via the Tab key.
52
+ */
53
+ this.disableTabindex = false;
49
54
  //#endregion PROPERTIES
50
55
  /****************************************************************************/
51
56
  //#region METHODS
@@ -111,7 +116,7 @@ export class NvIconbutton {
111
116
  /****************************************************************************/
112
117
  //#region RENDER
113
118
  render() {
114
- return (h(Host, { key: '5590d5f6378669a2f74ce93d33ac14c86f435523', role: "button", type: this.type, tabindex: "0", disabled: this.disabled ? true : undefined, class: clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && h("nv-loader", { key: 'f88ed8a8b579d15318f419c8072a4c14e56990ce', size: this.size }), !this.loading && h("nv-icon", { key: '12b3fc9818014ea93237e8037ce2d90ee214517a', name: this.name, size: this.size }), h("slot", { key: '97e130b7caf544954f3168866429ed7633e46301' })));
119
+ return (h(Host, { key: 'f3d9a8c4f5f3b549595b1a4b8eecddae89b23909', role: "button", type: this.type, tabindex: this.disableTabindex ? -1 : 0, disabled: this.disabled ? true : undefined, class: clsx('root', `size-${this.size}`, `emphasis-${this.emphasis}`, this.loading && 'loading', `shape-${this.shape}`), onClick: this.handleClick }, this.loading && h("nv-loader", { key: '9f25f8a2c72279f1ad4c92ed6e17341e4b43f26e', size: this.size }), !this.loading && h("nv-icon", { key: 'aa0d10482d4dded8f6680afe066c3c8d781160ef', name: this.name, size: this.size }), h("slot", { key: 'dc2a1ca7305ae4b14924d7acb79286596e5b358f' })));
115
120
  }
116
121
  static get is() { return "nv-iconbutton"; }
117
122
  static get formAssociated() { return true; }
@@ -315,6 +320,26 @@ export class NvIconbutton {
315
320
  "attribute": "shape",
316
321
  "reflect": true,
317
322
  "defaultValue": "'square'"
323
+ },
324
+ "disableTabindex": {
325
+ "type": "boolean",
326
+ "mutable": false,
327
+ "complexType": {
328
+ "original": "boolean",
329
+ "resolved": "boolean",
330
+ "references": {}
331
+ },
332
+ "required": false,
333
+ "optional": false,
334
+ "docs": {
335
+ "tags": [],
336
+ "text": "Use this to make the button skip-able when users navigate with the keyboard.\nThe button remains clickable but won\u2019t be reached via the Tab key."
337
+ },
338
+ "getter": false,
339
+ "setter": false,
340
+ "attribute": "disable-tabindex",
341
+ "reflect": true,
342
+ "defaultValue": "false"
318
343
  }
319
344
  };
320
345
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nv-iconbutton.js","sourceRoot":"","sources":["../../../src/components/nv-iconbutton/nv-iconbutton.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,eAAe,EACf,OAAO,EACP,KAAK,EACL,MAAM,GACP,MAAM,eAA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E,IAAI,CAAC,WAAW;YAExB,IAAI,CAAC,OAAO,IAAI,kEAAW,IAAI,EAAE,IAAI,CAAC,IAAI,GAAc;YAExD,CAAC,IAAI,CAAC,OAAO,IAAI,gEAAS,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;YAE/D,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n Listen,\n} from '@stencil/core';\nimport clsx from 'clsx';\n\nimport {\n ButtonSize,\n ButtonEmphasis,\n ButtonType,\n IconButtonShape,\n} from '../../utils/constants';\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * @slot default - Content of the button.\n */\n@Component({\n tag: 'nv-iconbutton',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-iconbutton.scss',\n scoped: false,\n})\nexport class NvIconbutton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvIconbuttonElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small the button appears, allowing for\n * customization of the button's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ButtonSize}` = 'md';\n\n /**\n * Adjusts the button’s emphasis to make it more or less visually prominent\n * to users. Use this to draw attention to important actions or reduce focus\n * on less critical ones.\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ButtonEmphasis}` = 'high';\n\n /**\n * Set this to true to show a spinner on the button, letting users know that\n * their action is being processed. It helps improve user experience by\n * indicating ongoing activities. The icon is not displayed when the button\n * is loading. Also, the button is disabled. If you want to disable the\n * button, it is not possible. It is automatically disabled when loading.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ mutable: true, reflect: true })\n disabled: boolean = false;\n\n /**\n * Makes the button look active when it’s within a compatible component\n * like a button group.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Choose the icon you want to display. This also sets the aria-label for\n * improved accessibility, helping users who rely on screen readers.\n * The icon is not displayed when the button is loading.\n */\n @Prop({ reflect: true })\n readonly name: `${IconName}` | string;\n\n /**\n * Sets the button type to control its function in forms. Use 'submit' to send\n * form data, 'reset' to clear the form, or 'button' for a standard button\n * that doesn’t interact with form submission by default.\n */\n @Prop({ reflect: true })\n readonly type: `${ButtonType}` = 'button';\n\n /**\n * Sets the shape of the button. Choose between square and rounded.\n */\n @Prop({ reflect: true })\n readonly shape: `${IconButtonShape}` = 'square';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles form-related actions when the button is clicked.\n * - Submits the form if the button type is 'submit'.\n * - Resets the form if the button type is 'reset'.\n * @param {Event} event - The click event.\n */\n private handleClick = (event: Event) => {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (this.type === 'submit') {\n this.internals?.form?.requestSubmit();\n }\n if (this.type === 'reset') {\n this.internals?.form?.reset();\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('loading')\n handleLoadingChange(loading: boolean) {\n this.loading = loading;\n this.disabled = loading;\n }\n\n @Watch('disabled')\n handleDisabledChange(disabled: boolean) {\n if (this.loading) {\n this.disabled = this.loading;\n } else {\n this.disabled = disabled;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region EVENTS\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.el.click();\n }\n }\n\n @Listen('touchstart', { passive: false })\n handleTouchStart(event: TouchEvent) {\n if (event.touches.length > 1) return;\n event.preventDefault();\n this.el.click();\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"button\"\n type={this.type}\n tabindex=\"0\"\n disabled={this.disabled ? true : undefined}\n class={clsx(\n 'root',\n `size-${this.size}`,\n `emphasis-${this.emphasis}`,\n this.loading && 'loading',\n `shape-${this.shape}`,\n )}\n onClick={this.handleClick}\n >\n {this.loading && <nv-loader size={this.size}></nv-loader>}\n\n {!this.loading && <nv-icon name={this.name} size={this.size} />}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
1
+ {"version":3,"file":"nv-iconbutton.js","sourceRoot":"","sources":["../../../src/components/nv-iconbutton/nv-iconbutton.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,eAAe,EACf,OAAO,EACP,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB;;GAEG;AAQH,MAAM,OAAO,YAAY;IAPzB;QAWE,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;WAIG;QAEM,SAAI,GAAoB,IAAI,CAAC;QAEtC;;;;WAIG;QAEM,aAAQ,GAAwB,MAAM,CAAC;QAEhD;;;;;;WAMG;QAEH,YAAO,GAAY,KAAK,CAAC;QAEzB;;WAEG;QAEH,aAAQ,GAAY,KAAK,CAAC;QAE1B;;;WAGG;QAEM,WAAM,GAAY,KAAK,CAAC;QAUjC;;;;WAIG;QAEM,SAAI,GAAoB,QAAQ,CAAC;QAE1C;;WAEG;QAEM,UAAK,GAAyB,QAAQ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n AttachInternals,\n Element,\n Watch,\n Listen,\n} from '@stencil/core';\nimport clsx from 'clsx';\n\nimport {\n ButtonSize,\n ButtonEmphasis,\n ButtonType,\n IconButtonShape,\n} from '../../utils/constants';\nimport { IconName } from '../nv-icon/nv-icons';\n\n/**\n * @slot default - Content of the button.\n */\n@Component({\n tag: 'nv-iconbutton',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-iconbutton.scss',\n scoped: false,\n})\nexport class NvIconbutton {\n @AttachInternals() internals: ElementInternals;\n @Element() el: HTMLNvIconbuttonElement;\n\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Determines how large or small the button appears, allowing for\n * customization of the button's dimensions to fit different design\n * specifications and user needs.\n */\n @Prop({ reflect: true })\n readonly size: `${ButtonSize}` = 'md';\n\n /**\n * Adjusts the button’s emphasis to make it more or less visually prominent\n * to users. Use this to draw attention to important actions or reduce focus\n * on less critical ones.\n */\n @Prop({ reflect: true })\n readonly emphasis: `${ButtonEmphasis}` = 'high';\n\n /**\n * Set this to true to show a spinner on the button, letting users know that\n * their action is being processed. It helps improve user experience by\n * indicating ongoing activities. The icon is not displayed when the button\n * is loading. Also, the button is disabled. If you want to disable the\n * button, it is not possible. It is automatically disabled when loading.\n */\n @Prop({ reflect: true, mutable: true })\n loading: boolean = false;\n\n /**\n * Disables the button, preventing user interaction.\n */\n @Prop({ mutable: true, reflect: true })\n disabled: boolean = false;\n\n /**\n * Makes the button look active when it’s within a compatible component\n * like a button group.\n */\n @Prop({ reflect: true })\n readonly active: boolean = false;\n\n /**\n * Choose the icon you want to display. This also sets the aria-label for\n * improved accessibility, helping users who rely on screen readers.\n * The icon is not displayed when the button is loading.\n */\n @Prop({ reflect: true })\n readonly name: `${IconName}` | string;\n\n /**\n * Sets the button type to control its function in forms. Use 'submit' to send\n * form data, 'reset' to clear the form, or 'button' for a standard button\n * that doesn’t interact with form submission by default.\n */\n @Prop({ reflect: true })\n readonly type: `${ButtonType}` = 'button';\n\n /**\n * Sets the shape of the button. Choose between square and rounded.\n */\n @Prop({ reflect: true })\n readonly shape: `${IconButtonShape}` = 'square';\n\n /**\n * Use this to make the button skip-able when users navigate with the keyboard.\n * The button remains clickable but won’t be reached via the Tab key.\n */\n @Prop({ reflect: true })\n readonly disableTabindex: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n /**\n * Handles form-related actions when the button is clicked.\n * - Submits the form if the button type is 'submit'.\n * - Resets the form if the button type is 'reset'.\n * @param {Event} event - The click event.\n */\n private handleClick = (event: Event) => {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n\n if (this.type === 'submit') {\n this.internals?.form?.requestSubmit();\n }\n if (this.type === 'reset') {\n this.internals?.form?.reset();\n }\n };\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n\n @Watch('loading')\n handleLoadingChange(loading: boolean) {\n this.loading = loading;\n this.disabled = loading;\n }\n\n @Watch('disabled')\n handleDisabledChange(disabled: boolean) {\n if (this.loading) {\n this.disabled = this.loading;\n } else {\n this.disabled = disabled;\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region EVENTS\n\n @Listen('keydown', { passive: false })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.el.click();\n }\n }\n\n @Listen('touchstart', { passive: false })\n handleTouchStart(event: TouchEvent) {\n if (event.touches.length > 1) return;\n event.preventDefault();\n this.el.click();\n }\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentWillLoad() {\n if (this.loading) {\n this.disabled = this.loading;\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"button\"\n type={this.type}\n tabindex={this.disableTabindex ? -1 : 0}\n disabled={this.disabled ? true : undefined}\n class={clsx(\n 'root',\n `size-${this.size}`,\n `emphasis-${this.emphasis}`,\n this.loading && 'loading',\n `shape-${this.shape}`,\n )}\n onClick={this.handleClick}\n >\n {this.loading && <nv-loader size={this.size}></nv-loader>}\n\n {!this.loading && <nv-icon name={this.name} size={this.size} />}\n\n <slot></slot>\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
@@ -82,7 +82,7 @@ export class NvMenuitem {
82
82
  "mutable": false,
83
83
  "complexType": {
84
84
  "original": "`${IconName}`",
85
- "resolved": "\"home\" | \"photo\" | \"access-point-off\" | \"access-point\" | \"accessible\" | \"activity\" | \"address-book\" | \"adjustments-horizontal\" | \"adjustments-up\" | \"adjustments\" | \"affiliate\" | \"air-conditioning\" | \"alert-circle\" | \"alert-square-rounded\" | \"alert-triangle\" | \"align-center\" | \"align-left\" | \"align-right\" | \"app-window\" | \"apps\" | \"archive\" | \"areas\" | \"arrow-back-up\" | \"arrow-back\" | \"arrow-down-left\" | \"arrow-down-right\" | \"arrow-down\" | \"arrow-forward-up\" | \"arrow-forward\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up-left\" | \"arrow-up-right\" | \"arrow-up\" | \"arrows-diagonal\" | \"arrows-exchange\" | \"arrows-maximize\" | \"arrows-minimize\" | \"arrows-move\" | \"aspect-ratio\" | \"atom\" | \"ban\" | \"basket\" | \"battery-1\" | \"battery-2\" | \"battery-3\" | \"battery-4\" | \"battery-automotive\" | \"battery-charging\" | \"battery-eco\" | \"battery-off\" | \"battery\" | \"bell-bolt\" | \"bell-off\" | \"bell-ringing\" | \"bell\" | \"bike\" | \"bluetooth-connected\" | \"bluetooth-off\" | \"bluetooth\" | \"bolt-off\" | \"bolt\" | \"book\" | \"bookmark-off\" | \"bookmark\" | \"bookmarks\" | \"box-align-top\" | \"box-multiple\" | \"brand-facebook\" | \"brand-instagram\" | \"brand-linkedin\" | \"brand-x\" | \"brand-youtube\" | \"briefcase\" | \"brightness-down\" | \"brightness-up\" | \"browser-check\" | \"browser-plus\" | \"browser-x\" | \"browser\" | \"brush\" | \"building-bank\" | \"building-factory\" | \"building-lighthouse\" | \"building-store\" | \"building\" | \"bulb-off\" | \"bulb\" | \"cake\" | \"calendar-time\" | \"calendar\" | \"camera-off\" | \"camera\" | \"car-crane\" | \"car\" | \"caravan\" | \"cash-banknote\" | \"cash\" | \"cast\" | \"cell\" | \"charging-pile\" | \"chart-arcs\" | \"chart-area-line\" | \"chart-area\" | \"chart-arrows-vertical\" | \"chart-arrows\" | \"chart-bar\" | \"chart-bubble\" | \"chart-circles\" | \"chart-donut\" | \"chart-dots\" | \"chart-line\" | \"chart-pie\" | \"chart-radar\" | \"check\" | \"checkbox\" | \"checklist\" | \"checks\" | \"chevron-down\" | \"chevron-left\" | \"chevron-right\" | \"chevron-top\" | \"chevrons-left\" | \"chevrons-right\" | \"circle-caret-right\" | \"circle-check\" | \"circle-x\" | \"circuit-alternate\" | \"circuit-ground-digital\" | \"clipboard-check\" | \"clipboard-list\" | \"clipboard-plus\" | \"clipboard-text\" | \"clipboard-x\" | \"clipboard\" | \"clock-edit\" | \"clock\" | \"cloud-data-connection\" | \"cloud-download\" | \"cloud-rain\" | \"cloud-snow\" | \"cloud-upload\" | \"cloud\" | \"collapse-close\" | \"collapse-open\" | \"color-picker\" | \"color-swatch\" | \"columns-1\" | \"columns-2\" | \"columns-3\" | \"compass\" | \"contract\" | \"cookie\" | \"copy\" | \"cpu\" | \"crane\" | \"credit-card\" | \"crop\" | \"cross\" | \"crown\" | \"currency-bitcoin\" | \"currency-dollar\" | \"currency-ethereum\" | \"currency-euro\" | \"cut\" | \"dashboard\" | \"database\" | \"device-desktop\" | \"device-floppy\" | \"device-gamepad\" | \"device-laptop\" | \"device-mobile-rotated\" | \"device-mobile\" | \"device-tablet\" | \"device-watch\" | \"devices\" | \"dialpad\" | \"direction-horizontal\" | \"direction-sign\" | \"direction\" | \"discount\" | \"door-enter\" | \"door-exit\" | \"door-off\" | \"dots-vertical\" | \"dots\" | \"download\" | \"drone\" | \"droplet-filled\" | \"droplet-half\" | \"droplet\" | \"droplets\" | \"edit\" | \"empty\" | \"engine\" | \"equal-not\" | \"eraser-off\" | \"eraser\" | \"external-link\" | \"eye-off\" | \"eye\" | \"face-id\" | \"feather\" | \"file-alert\" | \"file-analytics\" | \"file-check\" | \"file-code\" | \"file-download\" | \"file-export\" | \"file-horizontal\" | \"file-import\" | \"file-plus\" | \"file-search\" | \"file-text-bookmark\" | \"file-text\" | \"file-type-bmp\" | \"file-type-css\" | \"file-type-csv\" | \"file-type-doc\" | \"file-type-html\" | \"file-type-jpg\" | \"file-type-js\" | \"file-type-pdf\" | \"file-type-png\" | \"file-type-ppt\" | \"file-type-xls\" | \"file-type-xml\" | \"file-type-zip\" | \"file-upload\" | \"file-x\" | \"file-zip\" | \"file\" | \"files-off\" | \"files\" | \"filter-off\" | \"filter-sort\" | \"filter\" | \"fingerprint\" | \"fire-extinguisher\" | \"flag\" | \"flame\" | \"flip-horizontal\" | \"flip-vertical\" | \"folder-minus\" | \"folder-off\" | \"folder-plus\" | \"folder-x\" | \"folder\" | \"folders\" | \"frame\" | \"gas-station\" | \"gauge-off\" | \"gauge\" | \"gift\" | \"git-branch-delete\" | \"git-branch\" | \"git-cherry-pick\" | \"git-commit\" | \"git-compare\" | \"git-fork\" | \"git-merge\" | \"git-pull-request-closed\" | \"git-pull-request-draft\" | \"git-pull-request\" | \"gps\" | \"grid-dots\" | \"grip-horizontal\" | \"grip-vertical\" | \"hand-stop\" | \"hand-waving\" | \"hash\" | \"haze\" | \"headphones-off\" | \"headphones\" | \"headset\" | \"heart-off\" | \"heart\" | \"heartbeat\" | \"helicopter\" | \"helmet-swopp\" | \"helmet\" | \"help\" | \"history\" | \"hourglass-empty\" | \"hourglass-high\" | \"hourglass-low\" | \"hourglass-off\" | \"hourglass\" | \"inbox\" | \"info-circle\" | \"keyboard-hide\" | \"keyboard-show\" | \"keyboard\" | \"layout-board-split\" | \"layout-dashboard\" | \"layout-grid\" | \"layout-sidebar-left-collapse\" | \"layout-sidebar-left-expand\" | \"layout-sidebar-right-collapse\" | \"layout-sidebar-right-expand\" | \"layout\" | \"leaf\" | \"lifebuoy\" | \"link\" | \"list-search\" | \"list\" | \"loader\" | \"location\" | \"lock-off\" | \"lock-open\" | \"lock\" | \"login\" | \"logout\" | \"mail-forward\" | \"mail-opened\" | \"mail\" | \"map-pin-2\" | \"map-pin-off\" | \"map-pin\" | \"map\" | \"master-data\" | \"menu\" | \"message-dots\" | \"message-off\" | \"message\" | \"messages\" | \"microphone-off\" | \"microphone\" | \"minus\" | \"mist\" | \"moon\" | \"motorbike\" | \"mouse\" | \"movie\" | \"network\" | \"news\" | \"note\" | \"notebook\" | \"notes\" | \"offshore-station\" | \"package\" | \"palette\" | \"paperclip\" | \"pencil\" | \"phone-call\" | \"phone-calling\" | \"phone-check\" | \"phone-incoming\" | \"phone-off\" | \"phone-outgoing\" | \"phone\" | \"photo-off\" | \"pig\" | \"pin\" | \"pinned-off\" | \"pinned\" | \"plane-off\" | \"plane\" | \"plant\" | \"player-pause\" | \"player-play\" | \"player-skip-back\" | \"player-skip-forward\" | \"player-stop\" | \"player-track-next\" | \"player-track-prev\" | \"plug-connected\" | \"plug\" | \"plus\" | \"power-ac\" | \"power-dc\" | \"power\" | \"presentation-analytics\" | \"presentation\" | \"printer\" | \"propeller\" | \"published\" | \"puzzle-2\" | \"puzzle\" | \"pylon\" | \"qrcode\" | \"quotes-open\" | \"quotes\" | \"radar\" | \"radio\" | \"radioactive\" | \"receipt-dollar\" | \"receipt-euro\" | \"receipt\" | \"recharging\" | \"recycle\" | \"refresh-alert\" | \"refresh-off\" | \"refresh\" | \"repeat-once\" | \"repeat\" | \"replace\" | \"report-analytics\" | \"report-medical\" | \"report-search\" | \"report\" | \"ripple-off\" | \"ripple\" | \"rocket\" | \"rotate-2\" | \"rotate-clockwise-2\" | \"rotate-clockwise\" | \"rotate-dot\" | \"rotate\" | \"router\" | \"ruler-measure\" | \"sailboat\" | \"satellite\" | \"scale\" | \"school\" | \"scissors\" | \"scooter-electric\" | \"screenshot\" | \"search\" | \"seeding\" | \"select\" | \"selector\" | \"send\" | \"server\" | \"settings\" | \"shape\" | \"share-2\" | \"share\" | \"shield-check\" | \"shield-lock\" | \"shield-off\" | \"shield-x\" | \"shield\" | \"ship-off\" | \"ship\" | \"shopping-cart\" | \"slash\" | \"smart-home\" | \"snowflake\" | \"solar-panel\" | \"sort-ascending-letters\" | \"sort-ascending-numbers\" | \"sort-descending-letters\" | \"sort-descending-numbers\" | \"spacing-horizontal\" | \"spacing-vertical\" | \"sparkles\" | \"speakerphone\" | \"stack\" | \"stairs\" | \"star\" | \"sun\" | \"sunrise\" | \"sunset\" | \"switch-horizontal\" | \"switch-vertical\" | \"table\" | \"tag\" | \"tank-empty-fill\" | \"tank-full-fill\" | \"tank-medium-fill\" | \"temperature-off\" | \"temperature\" | \"template\" | \"terminal\" | \"text-size\" | \"text\" | \"thumb-down\" | \"thumb-up\" | \"ticket\" | \"timeline\" | \"tir\" | \"tool\" | \"tools\" | \"train\" | \"trash-off\" | \"trash\" | \"tree\" | \"trees\" | \"truck-delivery\" | \"truck\" | \"umbrella\" | \"unlink\" | \"upload\" | \"user-circle\" | \"user-exclamation\" | \"user-minus\" | \"user-off\" | \"user-plus\" | \"user-worker\" | \"user\" | \"users\" | \"versions\" | \"video-minus\" | \"video-off\" | \"video-plus\" | \"video\" | \"volume-2\" | \"volume-3\" | \"volume\" | \"wallet\" | \"wand\" | \"wave\" | \"waves\" | \"wifi-off\" | \"wifi\" | \"wind-direction\" | \"wind\" | \"windmill\" | \"wood\" | \"world-code\" | \"world\" | \"writing\" | \"x\" | \"zoom-reset\"",
85
+ "resolved": "\"home\" | \"photo\" | \"access-point-off\" | \"access-point\" | \"accessible\" | \"activity\" | \"address-book\" | \"adjustments-horizontal\" | \"adjustments-up\" | \"adjustments\" | \"affiliate\" | \"air-conditioning\" | \"alert-circle\" | \"alert-square-rounded\" | \"alert-triangle\" | \"align-center\" | \"align-left\" | \"align-right\" | \"app-window\" | \"apps\" | \"archive\" | \"areas\" | \"arrow-back-up\" | \"arrow-back\" | \"arrow-down-left\" | \"arrow-down-right\" | \"arrow-down\" | \"arrow-forward-up\" | \"arrow-forward\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up-left\" | \"arrow-up-right\" | \"arrow-up\" | \"arrows-diagonal\" | \"arrows-exchange\" | \"arrows-maximize\" | \"arrows-minimize\" | \"arrows-move\" | \"aspect-ratio\" | \"atom\" | \"ban\" | \"basket\" | \"battery-1\" | \"battery-2\" | \"battery-3\" | \"battery-4\" | \"battery-automotive\" | \"battery-charging\" | \"battery-eco\" | \"battery-off\" | \"battery\" | \"bell-bolt\" | \"bell-off\" | \"bell-ringing\" | \"bell\" | \"bike\" | \"bluetooth-connected\" | \"bluetooth-off\" | \"bluetooth\" | \"bolt-off\" | \"bolt\" | \"book\" | \"bookmark-off\" | \"bookmark\" | \"bookmarks\" | \"box-align-top\" | \"box-multiple\" | \"brand-facebook\" | \"brand-instagram\" | \"brand-linkedin\" | \"brand-x\" | \"brand-youtube\" | \"briefcase\" | \"brightness-down\" | \"brightness-up\" | \"browser-check\" | \"browser-plus\" | \"browser-x\" | \"browser\" | \"brush\" | \"building-bank\" | \"building-factory\" | \"building-lighthouse\" | \"building-store\" | \"building\" | \"bulb-off\" | \"bulb\" | \"cake\" | \"calendar-time\" | \"calendar\" | \"camera-off\" | \"camera\" | \"car-crane\" | \"car\" | \"caravan\" | \"cash-banknote\" | \"cash\" | \"cast\" | \"cell\" | \"charging-pile\" | \"chart-arcs\" | \"chart-area-line\" | \"chart-area\" | \"chart-arrows-vertical\" | \"chart-arrows\" | \"chart-bar\" | \"chart-bubble\" | \"chart-circles\" | \"chart-donut\" | \"chart-dots\" | \"chart-line\" | \"chart-pie\" | \"chart-radar\" | \"check\" | \"checkbox\" | \"checklist\" | \"checks\" | \"chevron-down\" | \"chevron-left\" | \"chevron-right\" | \"chevron-top\" | \"chevrons-left\" | \"chevrons-right\" | \"circle-caret-right\" | \"circle-check\" | \"circle-x\" | \"circuit-alternate\" | \"circuit-ground-digital\" | \"clipboard-check\" | \"clipboard-list\" | \"clipboard-plus\" | \"clipboard-text\" | \"clipboard-x\" | \"clipboard\" | \"clock-edit\" | \"clock\" | \"cloud-data-connection\" | \"cloud-download\" | \"cloud-rain\" | \"cloud-snow\" | \"cloud-upload\" | \"cloud\" | \"color-picker\" | \"color-swatch\" | \"columns-1\" | \"columns-2\" | \"columns-3\" | \"compass\" | \"contract\" | \"cookie\" | \"copy\" | \"cpu\" | \"crane\" | \"credit-card\" | \"crop\" | \"cross\" | \"crown\" | \"currency-bitcoin\" | \"currency-dollar\" | \"currency-ethereum\" | \"currency-euro\" | \"cut\" | \"dashboard\" | \"database\" | \"device-desktop\" | \"device-floppy\" | \"device-gamepad\" | \"device-laptop\" | \"device-mobile-rotated\" | \"device-mobile\" | \"device-tablet\" | \"device-watch\" | \"devices\" | \"dialpad\" | \"direction-horizontal\" | \"direction-sign\" | \"direction\" | \"discount\" | \"door-enter\" | \"door-exit\" | \"door-off\" | \"dots-vertical\" | \"dots\" | \"download\" | \"drone\" | \"droplet-filled\" | \"droplet-half\" | \"droplet\" | \"droplets\" | \"edit\" | \"empty\" | \"engine\" | \"equal-not\" | \"eraser-off\" | \"eraser\" | \"external-link\" | \"eye-off\" | \"eye\" | \"face-id\" | \"feather\" | \"file-alert\" | \"file-analytics\" | \"file-check\" | \"file-code\" | \"file-download\" | \"file-export\" | \"file-horizontal\" | \"file-import\" | \"file-plus\" | \"file-search\" | \"file-text-bookmark\" | \"file-text\" | \"file-type-bmp\" | \"file-type-css\" | \"file-type-csv\" | \"file-type-doc\" | \"file-type-html\" | \"file-type-jpg\" | \"file-type-js\" | \"file-type-pdf\" | \"file-type-png\" | \"file-type-ppt\" | \"file-type-xls\" | \"file-type-xml\" | \"file-type-zip\" | \"file-upload\" | \"file-x\" | \"file-zip\" | \"file\" | \"files-off\" | \"files\" | \"filter-off\" | \"filter-sort\" | \"filter\" | \"fingerprint\" | \"fire-extinguisher\" | \"flag\" | \"flame\" | \"flip-horizontal\" | \"flip-vertical\" | \"folder-minus\" | \"folder-off\" | \"folder-plus\" | \"folder-x\" | \"folder\" | \"folders\" | \"frame\" | \"gas-station\" | \"gauge-off\" | \"gauge\" | \"gift\" | \"git-branch-delete\" | \"git-branch\" | \"git-cherry-pick\" | \"git-commit\" | \"git-compare\" | \"git-fork\" | \"git-merge\" | \"git-pull-request-closed\" | \"git-pull-request-draft\" | \"git-pull-request\" | \"gps\" | \"grid-dots\" | \"grip-horizontal\" | \"grip-vertical\" | \"hand-stop\" | \"hand-waving\" | \"hash\" | \"haze\" | \"headphones-off\" | \"headphones\" | \"headset\" | \"heart-off\" | \"heart\" | \"heartbeat\" | \"helicopter\" | \"helmet-swopp\" | \"helmet\" | \"help\" | \"history\" | \"hourglass-empty\" | \"hourglass-high\" | \"hourglass-low\" | \"hourglass-off\" | \"hourglass\" | \"inbox\" | \"info-circle\" | \"keyboard-hide\" | \"keyboard-show\" | \"keyboard\" | \"layout-board-split\" | \"layout-dashboard\" | \"layout-grid\" | \"layout-sidebar-left-collapse\" | \"layout-sidebar-left-expand\" | \"layout-sidebar-right-collapse\" | \"layout-sidebar-right-expand\" | \"layout\" | \"leaf\" | \"lifebuoy\" | \"link\" | \"list-search\" | \"list\" | \"loader\" | \"location\" | \"lock-off\" | \"lock-open\" | \"lock\" | \"login\" | \"logout\" | \"mail-forward\" | \"mail-opened\" | \"mail\" | \"map-pin-2\" | \"map-pin-off\" | \"map-pin\" | \"map\" | \"master-data\" | \"menu\" | \"message-dots\" | \"message-off\" | \"message\" | \"messages\" | \"microphone-off\" | \"microphone\" | \"minus\" | \"mist\" | \"moon\" | \"motorbike\" | \"mouse\" | \"movie\" | \"network\" | \"news\" | \"note\" | \"notebook\" | \"notes\" | \"offshore-station\" | \"package\" | \"palette\" | \"paperclip\" | \"pencil\" | \"phone-call\" | \"phone-calling\" | \"phone-check\" | \"phone-incoming\" | \"phone-off\" | \"phone-outgoing\" | \"phone\" | \"photo-off\" | \"pig\" | \"pin\" | \"pinned-off\" | \"pinned\" | \"plane-off\" | \"plane\" | \"plant\" | \"player-pause\" | \"player-play\" | \"player-skip-back\" | \"player-skip-forward\" | \"player-stop\" | \"player-track-next\" | \"player-track-prev\" | \"plug-connected\" | \"plug\" | \"plus\" | \"power-ac\" | \"power-dc\" | \"power\" | \"presentation-analytics\" | \"presentation\" | \"printer\" | \"propeller\" | \"published\" | \"puzzle-2\" | \"puzzle\" | \"pylon\" | \"qrcode\" | \"quotes-open\" | \"quotes\" | \"radar\" | \"radio\" | \"radioactive\" | \"receipt-dollar\" | \"receipt-euro\" | \"receipt\" | \"recharging\" | \"recycle\" | \"refresh-alert\" | \"refresh-off\" | \"refresh\" | \"repeat-once\" | \"repeat\" | \"replace\" | \"report-analytics\" | \"report-medical\" | \"report-search\" | \"report\" | \"ripple-off\" | \"ripple\" | \"rocket\" | \"rotate-2\" | \"rotate-clockwise-2\" | \"rotate-clockwise\" | \"rotate-dot\" | \"rotate\" | \"router\" | \"ruler-measure\" | \"sailboat\" | \"satellite\" | \"scale\" | \"school\" | \"scissors\" | \"scooter-electric\" | \"screenshot\" | \"search\" | \"seeding\" | \"select\" | \"selector\" | \"send\" | \"server\" | \"settings\" | \"shape\" | \"share-2\" | \"share\" | \"shield-check\" | \"shield-lock\" | \"shield-off\" | \"shield-x\" | \"shield\" | \"ship-off\" | \"ship\" | \"shopping-cart\" | \"sitemap\" | \"slash\" | \"smart-home\" | \"snowflake\" | \"solar-panel\" | \"sort-ascending-letters\" | \"sort-ascending-numbers\" | \"sort-descending-letters\" | \"sort-descending-numbers\" | \"spacing-horizontal\" | \"spacing-vertical\" | \"sparkles\" | \"speakerphone\" | \"stack\" | \"stairs\" | \"star\" | \"sun\" | \"sunrise\" | \"sunset\" | \"switch-horizontal\" | \"switch-vertical\" | \"table\" | \"tag\" | \"tank-empty-fill\" | \"tank-full-fill\" | \"tank-medium-fill\" | \"temperature-off\" | \"temperature\" | \"template\" | \"terminal\" | \"text-size\" | \"text\" | \"thumb-down\" | \"thumb-up\" | \"ticket\" | \"timeline\" | \"tir\" | \"tool\" | \"tools\" | \"train\" | \"trash-off\" | \"trash\" | \"tree\" | \"trees\" | \"truck-delivery\" | \"truck\" | \"umbrella\" | \"unlink\" | \"upload\" | \"user-circle\" | \"user-exclamation\" | \"user-minus\" | \"user-off\" | \"user-plus\" | \"user-worker\" | \"user\" | \"users\" | \"versions\" | \"video-minus\" | \"video-off\" | \"video-plus\" | \"video\" | \"volume-2\" | \"volume-3\" | \"volume\" | \"wallet\" | \"wand\" | \"wave\" | \"waves\" | \"wifi-off\" | \"wifi\" | \"wind-direction\" | \"wind\" | \"windmill\" | \"wood\" | \"world-code\" | \"world\" | \"writing\" | \"x\" | \"zoom-reset\"",
86
86
  "references": {
87
87
  "IconName": {
88
88
  "location": "import",
@@ -1,12 +1,19 @@
1
1
  import { h } from "@stencil/core";
2
2
  const NvTableDocs = {
3
3
  component: 'nv-table',
4
+ subcomponents: ['nv-tableheader'],
5
+ composedComponents: ['nv-tableheader'],
4
6
  stories: [
5
7
  {
6
8
  name: 'Default',
7
9
  description: 'The NvTable behaves just like a native HTML table element, but is enhanced with Nova styles and additional functionality. Use standard table elements (thead, tbody, tfoot, tr, th, td) as children.',
8
10
  template: (h("nv-table", { "data-storybook-args": true }, h("table", null, h("thead", null, h("tr", null, h("th", null, "Name"), h("th", null, "Age"), h("th", null, "Email"))), h("tbody", null, h("tr", null, h("td", null, "Alice Johnson"), h("td", null, "25"), h("td", null, "alice.johnson@example.com")), h("tr", null, h("td", null, "Bob Smith"), h("td", null, "30"), h("td", null, "bob.smith@example.com")), h("tr", null, h("td", null, "Charlie Brown"), h("td", null, "35"), h("td", null, "charlie.brown@example.com")))))),
9
11
  },
12
+ {
13
+ name: 'TableWithTableheader',
14
+ description: 'Use the nv-tableheader component to add a header with additional features row to the table.',
15
+ template: (h("nv-table", { "data-storybook-args": true }, h("table", null, h("thead", null, h("tr", null, h("th", null, h("nv-tableheader", { sortable: true }, "Name")), h("th", null, h("nv-tableheader", { sortable: true }, "Age")))), h("tbody", null, h("tr", null, h("td", null, "Alice Johnson"), h("td", null, "25")), h("tr", null, h("td", null, "Bob Smith"), h("td", null, "30")), h("tr", null, h("td", null, "Charlie Brown"), h("td", null, "35")))))),
16
+ },
10
17
  {
11
18
  name: 'ColumnResizingWidthClasses',
12
19
  description: 'Columns can be resized by default. Use width classes (like w-10) to set initial column widths. Use data-no-resize attribute to prevent specific columns from being resized. Columns without fixed widths will grow to fill available space.',
@@ -1 +1 @@
1
- {"version":3,"file":"nv-table.docs.js","sourceRoot":"","sources":["../../../src/components/nv-table/nv-table.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIlC,MAAM,WAAW,GAAiC;IAChD,SAAS,EAAE,UAAU;IACrB,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EACT,sMAAsM;YACxM,QAAQ,EAAE,CACR;gBACE;oBACE;wBACE;4BACE,qBAAa;4BACb,oBAAY;4BACZ,sBAAc,CACX,CACC;oBACR;wBACE;4BACE,8BAAsB;4BACtB,mBAAW;4BACX,0CAAkC,CAC/B;wBACL;4BACE,0BAAkB;4BAClB,mBAAW;4BACX,sCAA8B,CAC3B;wBACL;4BACE,8BAAsB;4BACtB,mBAAW;4BACX,0CAAkC,CAC/B,CACC,CACF,CACC,CACZ;SACF;QACD;YACE,IAAI,EAAE,4BAA4B;YAClC,WAAW,EACT,6OAA6O;YAC/O,QAAQ,EAAE,CACR;gBACE;oBACE;wBACE;4BACE,wBAAe,MAAM,WAAU;4BAC/B,wBAAe,MAAM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;gCAC9B,yBAAiB;gCACjB,2BAAmB;gCACnB,sBAAc;gCACd,sBAAc;gCACd,wBAAgB;gCAChB,2BAAmB;gCACnB,uBAAe;gCACf,wBAAgB;gCAChB,uBAAe;gCACf,sBAAc;gCACd,wBAAgB;gCAChB,iDAAkC,CAC/B,CACC;wBACR;4BACE;gCACE,iDAAkC;gCAClC,iCAAyB;gCACzB,4BAAoB;gCACpB,qCAA6B;gCAC7B,4BAAoB;gCACpB,sCAA8B;gCAC9B,2BAAmB;gCACnB,wBAAgB;gCAChB,6BAAqB;gCACrB,2CAAmC;gCACnC,+CAAuC;gCACvC,4BAAoB;gCACpB,uDAAwC,CACrC;4BACL;gCACE,mDAAoC;gCACpC,4BAAoB;gCACpB,uBAAe;gCACf,uCAA+B;gCAC/B,4BAAoB;gCACpB,sCAA8B;gCAC9B,2BAAmB;gCACnB,wBAAgB;gCAChB,6BAAqB;gCACrB,+CAAuC;gCACvC,0DAAkD;gCAClD,iCAAyB;gCACzB,uDAAwC,CACrC;4BACL;gCACE,qDAAsC;gCACtC,gCAAwB;gCACxB,wBAAgB;gCAChB,yCAAiC;gCACjC,4BAAoB;gCACpB,2CAAmC;gCACnC,2BAAmB;gCACnB,yBAAiB;gCACjB,0BAAkB;gCAClB,+CAAuC;gCACvC,2DAAmD;gCACnD,gCAAwB;gCACxB,uDAAwC,CACrC,CACC,CACF,CACC,CACP,CACP;SACF;KACF;CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\n\nconst NvTableDocs: NovaDocs<Components.NvTable> = {\n component: 'nv-table',\n stories: [\n {\n name: 'Default',\n description:\n 'The NvTable behaves just like a native HTML table element, but is enhanced with Nova styles and additional functionality. Use standard table elements (thead, tbody, tfoot, tr, th, td) as children.',\n template: (\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Age</th>\n <th>Email</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Alice Johnson</td>\n <td>25</td>\n <td>alice.johnson@example.com</td>\n </tr>\n <tr>\n <td>Bob Smith</td>\n <td>30</td>\n <td>bob.smith@example.com</td>\n </tr>\n <tr>\n <td>Charlie Brown</td>\n <td>35</td>\n <td>charlie.brown@example.com</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n ),\n },\n {\n name: 'ColumnResizingWidthClasses',\n description:\n 'Columns can be resized by default. Use width classes (like w-10) to set initial column widths. Use data-no-resize attribute to prevent specific columns from being resized. Columns without fixed widths will grow to fill available space.',\n template: (\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th data-class=\"w-10\">Name</th>\n <th data-class=\"w-10\">Age</th>\n <th data-no-resize>Email (grows to fill space)</th>\n <th data-class=\"w-10\" data-no-resize>\n Actions\n </th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Alice Johnson</td>\n <td>25</td>\n <td>alice.johnson@company.example.com</td>\n <td>Edit</td>\n </tr>\n <tr>\n <td>Bob Smith</td>\n <td>30</td>\n <td>bob.smith@company.example.com</td>\n <td>Edit</td>\n </tr>\n <tr>\n <td>Charlie Brown</td>\n <td>35</td>\n <td>charlie.brown@company.example.com</td>\n <td>Edit</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n ),\n },\n {\n name: 'RowSelection',\n description:\n 'Use the data-selected attribute on table rows to apply selection styling and indicate the currently selected row.',\n template: (\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Department</th>\n <th>Status</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Alice Johnson</td>\n <td>Engineering</td>\n <td>Active</td>\n </tr>\n <tr data-selected>\n <td>Bob Smith</td>\n <td>Design</td>\n <td>Active</td>\n </tr>\n <tr>\n <td>Charlie Brown</td>\n <td>Product</td>\n <td>Inactive</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n ),\n },\n {\n name: 'StickyHeader',\n description:\n 'Use data-sticky-top on thead elements to make the header stick to the top during vertical scrolling. This is useful for long tables where you want to keep column headers visible.',\n template: (\n <div data-class=\"h-40 overflow-y-auto\">\n <nv-table data-storybook-args>\n <table>\n <thead data-sticky-top>\n <tr>\n <th>Name</th>\n <th>Position</th>\n <th>Department</th>\n </tr>\n </thead>\n <tbody>\n {Array(10)\n .fill(0)\n .map((_, index) => (\n <tr key={index}>\n <td>Employee {index + 1}</td>\n <td>Developer</td>\n <td>Engineering</td>\n </tr>\n ))}\n </tbody>\n </table>\n </nv-table>\n </div>\n ),\n },\n {\n name: 'StickyColumnsHorizontalScroll',\n description:\n 'Use data-sticky-left and data-sticky-right on th/td elements to make columns stick during horizontal scrolling. Apply the same attribute to both header and data cells. Requires an overflow-x-auto container.',\n template: (\n <div data-class=\"overflow-x-auto\">\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th data-sticky-left>Name</th>\n <th>Position</th>\n <th>Department</th>\n <th>Email</th>\n <th>Phone</th>\n <th>Address</th>\n <th>Start Date</th>\n <th>Salary</th>\n <th>Manager</th>\n <th>Skills</th>\n <th>Notes</th>\n <th>Website</th>\n <th data-sticky-right>Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td data-sticky-left>John Doe</td>\n <td>Senior Developer</td>\n <td>Engineering</td>\n <td>john.doe@company.com</td>\n <td>+1-555-0123</td>\n <td>123 Main St, NY 10001</td>\n <td>2022-03-10</td>\n <td>$95,000</td>\n <td>Sarah Wilson</td>\n <td>React, TypeScript, Node.js</td>\n <td>Team lead with React expertise</td>\n <td>johndoe.dev</td>\n <td data-sticky-right>Edit | Delete</td>\n </tr>\n <tr>\n <td data-sticky-left>Jane Smith</td>\n <td>UX Designer</td>\n <td>Design</td>\n <td>jane.smith@company.com</td>\n <td>+1-555-0456</td>\n <td>456 Oak Ave, LA 90210</td>\n <td>2021-09-15</td>\n <td>$87,000</td>\n <td>Tom Anderson</td>\n <td>Figma, Adobe CC, User Research</td>\n <td>Creative designer with 8 years experience</td>\n <td>janesmith.design</td>\n <td data-sticky-right>Edit | Delete</td>\n </tr>\n <tr>\n <td data-sticky-left>Mike Johnson</td>\n <td>Product Manager</td>\n <td>Product</td>\n <td>mike.johnson@company.com</td>\n <td>+1-555-0789</td>\n <td>789 Pine St, Chicago 60601</td>\n <td>2020-01-08</td>\n <td>$110,000</td>\n <td>Lisa Chen</td>\n <td>Agile, Scrum, Product Strategy</td>\n <td>Experienced project manager and strategist</td>\n <td>mikejohnson.biz</td>\n <td data-sticky-right>Edit | Delete</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n </div>\n ),\n },\n ],\n};\n\nexport default NvTableDocs;\n"]}
1
+ {"version":3,"file":"nv-table.docs.js","sourceRoot":"","sources":["../../../src/components/nv-table/nv-table.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIlC,MAAM,WAAW,GAAiC;IAChD,SAAS,EAAE,UAAU;IACrB,aAAa,EAAE,CAAC,gBAAgB,CAAC;IACjC,kBAAkB,EAAE,CAAC,gBAAgB,CAAC;IACtC,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EACT,sMAAsM;YACxM,QAAQ,EAAE,CACR;gBACE;oBACE;wBACE;4BACE,qBAAa;4BACb,oBAAY;4BACZ,sBAAc,CACX,CACC;oBACR;wBACE;4BACE,8BAAsB;4BACtB,mBAAW;4BACX,0CAAkC,CAC/B;wBACL;4BACE,0BAAkB;4BAClB,mBAAW;4BACX,sCAA8B,CAC3B;wBACL;4BACE,8BAAsB;4BACtB,mBAAW;4BACX,0CAAkC,CAC/B,CACC,CACF,CACC,CACZ;SACF;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,6FAA6F;YAC/F,QAAQ,EAAE,CACR;gBACE;oBACE;wBACE;4BACE;gCACE,sBAAgB,QAAQ,iBAAsB,CAC3C;4BACL;gCACE,sBAAgB,QAAQ,gBAAqB,CAC1C,CACF,CAC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,EAAE,CAAC,CACjB,UAAI,GAAG,EAAE,KAAK;4BACZ;;gCAAc,KAAK,GAAG,CAAC,CAAM;4BAC7B,0BAAkB;4BAClB,4BAAoB,CACjB,CACN,CAAC,CACE,CACF,CACC,CACP,CACP;SACF;QACD;YACE,IAAI,EAAE,+BAA+B;YACrC,WAAW,EACT,gNAAgN;YAClN,QAAQ,EAAE,CACR,yBAAgB,iBAAiB;gBAC/B;oBACE;wBACE;4BACE;gCACE,6CAA8B;gCAC9B,yBAAiB;gCACjB,2BAAmB;gCACnB,sBAAc;gCACd,sBAAc;gCACd,wBAAgB;gCAChB,2BAAmB;gCACnB,uBAAe;gCACf,wBAAgB;gCAChB,uBAAe;gCACf,sBAAc;gCACd,wBAAgB;gCAChB,iDAAkC,CAC/B,CACC;wBACR;4BACE;gCACE,iDAAkC;gCAClC,iCAAyB;gCACzB,4BAAoB;gCACpB,qCAA6B;gCAC7B,4BAAoB;gCACpB,sCAA8B;gCAC9B,2BAAmB;gCACnB,wBAAgB;gCAChB,6BAAqB;gCACrB,2CAAmC;gCACnC,+CAAuC;gCACvC,4BAAoB;gCACpB,uDAAwC,CACrC;4BACL;gCACE,mDAAoC;gCACpC,4BAAoB;gCACpB,uBAAe;gCACf,uCAA+B;gCAC/B,4BAAoB;gCACpB,sCAA8B;gCAC9B,2BAAmB;gCACnB,wBAAgB;gCAChB,6BAAqB;gCACrB,+CAAuC;gCACvC,0DAAkD;gCAClD,iCAAyB;gCACzB,uDAAwC,CACrC;4BACL;gCACE,qDAAsC;gCACtC,gCAAwB;gCACxB,wBAAgB;gCAChB,yCAAiC;gCACjC,4BAAoB;gCACpB,2CAAmC;gCACnC,2BAAmB;gCACnB,yBAAiB;gCACjB,0BAAkB;gCAClB,+CAAuC;gCACvC,2DAAmD;gCACnD,gCAAwB;gCACxB,uDAAwC,CACrC,CACC,CACF,CACC,CACP,CACP;SACF;KACF;CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\n\nconst NvTableDocs: NovaDocs<Components.NvTable> = {\n component: 'nv-table',\n subcomponents: ['nv-tableheader'],\n composedComponents: ['nv-tableheader'],\n stories: [\n {\n name: 'Default',\n description:\n 'The NvTable behaves just like a native HTML table element, but is enhanced with Nova styles and additional functionality. Use standard table elements (thead, tbody, tfoot, tr, th, td) as children.',\n template: (\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Age</th>\n <th>Email</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Alice Johnson</td>\n <td>25</td>\n <td>alice.johnson@example.com</td>\n </tr>\n <tr>\n <td>Bob Smith</td>\n <td>30</td>\n <td>bob.smith@example.com</td>\n </tr>\n <tr>\n <td>Charlie Brown</td>\n <td>35</td>\n <td>charlie.brown@example.com</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n ),\n },\n {\n name: 'TableWithTableheader',\n description:\n 'Use the nv-tableheader component to add a header with additional features row to the table.',\n template: (\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th>\n <nv-tableheader sortable>Name</nv-tableheader>\n </th>\n <th>\n <nv-tableheader sortable>Age</nv-tableheader>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Alice Johnson</td>\n <td>25</td>\n </tr>\n <tr>\n <td>Bob Smith</td>\n <td>30</td>\n </tr>\n <tr>\n <td>Charlie Brown</td>\n <td>35</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n ),\n },\n {\n name: 'ColumnResizingWidthClasses',\n description:\n 'Columns can be resized by default. Use width classes (like w-10) to set initial column widths. Use data-no-resize attribute to prevent specific columns from being resized. Columns without fixed widths will grow to fill available space.',\n template: (\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th data-class=\"w-10\">Name</th>\n <th data-class=\"w-10\">Age</th>\n <th data-no-resize>Email (grows to fill space)</th>\n <th data-class=\"w-10\" data-no-resize>\n Actions\n </th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Alice Johnson</td>\n <td>25</td>\n <td>alice.johnson@company.example.com</td>\n <td>Edit</td>\n </tr>\n <tr>\n <td>Bob Smith</td>\n <td>30</td>\n <td>bob.smith@company.example.com</td>\n <td>Edit</td>\n </tr>\n <tr>\n <td>Charlie Brown</td>\n <td>35</td>\n <td>charlie.brown@company.example.com</td>\n <td>Edit</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n ),\n },\n {\n name: 'RowSelection',\n description:\n 'Use the data-selected attribute on table rows to apply selection styling and indicate the currently selected row.',\n template: (\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Department</th>\n <th>Status</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Alice Johnson</td>\n <td>Engineering</td>\n <td>Active</td>\n </tr>\n <tr data-selected>\n <td>Bob Smith</td>\n <td>Design</td>\n <td>Active</td>\n </tr>\n <tr>\n <td>Charlie Brown</td>\n <td>Product</td>\n <td>Inactive</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n ),\n },\n {\n name: 'StickyHeader',\n description:\n 'Use data-sticky-top on thead elements to make the header stick to the top during vertical scrolling. This is useful for long tables where you want to keep column headers visible.',\n template: (\n <div data-class=\"h-40 overflow-y-auto\">\n <nv-table data-storybook-args>\n <table>\n <thead data-sticky-top>\n <tr>\n <th>Name</th>\n <th>Position</th>\n <th>Department</th>\n </tr>\n </thead>\n <tbody>\n {Array(10)\n .fill(0)\n .map((_, index) => (\n <tr key={index}>\n <td>Employee {index + 1}</td>\n <td>Developer</td>\n <td>Engineering</td>\n </tr>\n ))}\n </tbody>\n </table>\n </nv-table>\n </div>\n ),\n },\n {\n name: 'StickyColumnsHorizontalScroll',\n description:\n 'Use data-sticky-left and data-sticky-right on th/td elements to make columns stick during horizontal scrolling. Apply the same attribute to both header and data cells. Requires an overflow-x-auto container.',\n template: (\n <div data-class=\"overflow-x-auto\">\n <nv-table data-storybook-args>\n <table>\n <thead>\n <tr>\n <th data-sticky-left>Name</th>\n <th>Position</th>\n <th>Department</th>\n <th>Email</th>\n <th>Phone</th>\n <th>Address</th>\n <th>Start Date</th>\n <th>Salary</th>\n <th>Manager</th>\n <th>Skills</th>\n <th>Notes</th>\n <th>Website</th>\n <th data-sticky-right>Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td data-sticky-left>John Doe</td>\n <td>Senior Developer</td>\n <td>Engineering</td>\n <td>john.doe@company.com</td>\n <td>+1-555-0123</td>\n <td>123 Main St, NY 10001</td>\n <td>2022-03-10</td>\n <td>$95,000</td>\n <td>Sarah Wilson</td>\n <td>React, TypeScript, Node.js</td>\n <td>Team lead with React expertise</td>\n <td>johndoe.dev</td>\n <td data-sticky-right>Edit | Delete</td>\n </tr>\n <tr>\n <td data-sticky-left>Jane Smith</td>\n <td>UX Designer</td>\n <td>Design</td>\n <td>jane.smith@company.com</td>\n <td>+1-555-0456</td>\n <td>456 Oak Ave, LA 90210</td>\n <td>2021-09-15</td>\n <td>$87,000</td>\n <td>Tom Anderson</td>\n <td>Figma, Adobe CC, User Research</td>\n <td>Creative designer with 8 years experience</td>\n <td>janesmith.design</td>\n <td data-sticky-right>Edit | Delete</td>\n </tr>\n <tr>\n <td data-sticky-left>Mike Johnson</td>\n <td>Product Manager</td>\n <td>Product</td>\n <td>mike.johnson@company.com</td>\n <td>+1-555-0789</td>\n <td>789 Pine St, Chicago 60601</td>\n <td>2020-01-08</td>\n <td>$110,000</td>\n <td>Lisa Chen</td>\n <td>Agile, Scrum, Product Strategy</td>\n <td>Experienced project manager and strategist</td>\n <td>mikejohnson.biz</td>\n <td data-sticky-right>Edit | Delete</td>\n </tr>\n </tbody>\n </table>\n </nv-table>\n </div>\n ),\n },\n ],\n};\n\nexport default NvTableDocs;\n"]}
@@ -0,0 +1,28 @@
1
+ nv-tableheader {
2
+ display: inline-flex;
3
+ width: 100%;
4
+ align-items: center;
5
+ gap: var(--spacing-2);
6
+ }
7
+ nv-tableheader:focus-visible {
8
+ border-radius: var(--radius-rounded-sm);
9
+ }
10
+ nv-tableheader:focus-visible:focus, nv-tableheader:focus-visible:focus-within {
11
+ outline: none;
12
+ }
13
+ nv-tableheader:focus-visible:focus-visible, nv-tableheader:focus-visible:has(:focus-visible) {
14
+ outline: calc(var(--focus-outline-stroke) * 1) solid var(--color-focus-brand);
15
+ outline-offset: calc(var(--focus-outline-offset) * 1);
16
+ }
17
+ nv-tableheader nv-iconbutton {
18
+ transition: transform 120ms ease, opacity 120ms ease;
19
+ }
20
+ nv-tableheader nv-iconbutton svg {
21
+ transition: transform 240ms ease;
22
+ }
23
+ nv-tableheader nv-iconbutton.is-none {
24
+ opacity: 0.5;
25
+ }
26
+ nv-tableheader nv-iconbutton.is-desc svg {
27
+ transform: rotate(180deg);
28
+ }
@@ -0,0 +1,13 @@
1
+ import { h } from "@stencil/core";
2
+ const NvTableheaderDocs = {
3
+ component: 'nv-tableheader',
4
+ badge: 'beta',
5
+ stories: [
6
+ {
7
+ name: 'Default',
8
+ template: (h("nv-tableheader", { "data-storybook-args": true }, "Child Content")),
9
+ },
10
+ ],
11
+ };
12
+ export default NvTableheaderDocs;
13
+ //# sourceMappingURL=nv-tableheader.docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nv-tableheader.docs.js","sourceRoot":"","sources":["../../../src/components/nv-tableheader/nv-tableheader.docs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAIlC,MAAM,iBAAiB,GAAuC;IAC5D,SAAS,EAAE,gBAAgB;IAC3B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE;QACP;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,CACR,qEAAkE,CACnE;SACF;KACF;CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport type { NovaDocs } from '../../nova-docs';\nimport { Components } from '../../components';\n\nconst NvTableheaderDocs: NovaDocs<Components.NvTableheader> = {\n component: 'nv-tableheader',\n badge: 'beta',\n stories: [\n {\n name: 'Default',\n template: (\n <nv-tableheader data-storybook-args>Child Content</nv-tableheader>\n ),\n },\n ],\n};\n\nexport default NvTableheaderDocs;\n"]}
@@ -0,0 +1,139 @@
1
+ import { Host, h } from "@stencil/core";
2
+ /**
3
+ * @slot default - Child content of the component.
4
+ */
5
+ export class NvTableheader {
6
+ constructor() {
7
+ /****************************************************************************/
8
+ //#region PROPERTIES
9
+ /**
10
+ * Will render the header as sortable with the corresponding icon button.
11
+ * Allows the header to be tabbed, and trigger sorting via click or keyboard
12
+ * navigation
13
+ */
14
+ this.sortable = false;
15
+ /**
16
+ * The current sort direction of the header. Will be 'none' if the header is
17
+ * not sortable or if the sort direction is not set.
18
+ */
19
+ this.sortDirection = 'none';
20
+ }
21
+ //#endregion PROPERTIES
22
+ /****************************************************************************/
23
+ //#region METHODS
24
+ cycleSortDirection(e) {
25
+ if (!this.sortable)
26
+ return;
27
+ e === null || e === void 0 ? void 0 : e.preventDefault();
28
+ const next = {
29
+ none: 'asc',
30
+ asc: 'desc',
31
+ desc: 'none',
32
+ };
33
+ this.sortDirection = next[this.sortDirection];
34
+ this.sortDirectionChanged.emit(this.sortDirection);
35
+ }
36
+ handleKeyDown(event) {
37
+ if (!this.sortable)
38
+ return;
39
+ if (event.key === 'Enter' || event.key === ' ') {
40
+ event.preventDefault();
41
+ this.cycleSortDirection();
42
+ }
43
+ }
44
+ get ariaSort() {
45
+ const sortMap = {
46
+ none: 'none',
47
+ asc: 'ascending',
48
+ desc: 'descending',
49
+ };
50
+ if (!this.sortable)
51
+ return sortMap.none;
52
+ return sortMap[this.sortDirection];
53
+ }
54
+ //#endregion EVENTS
55
+ /****************************************************************************/
56
+ //#region RENDER
57
+ render() {
58
+ return (h(Host, { key: 'ff2fc290253d468d2d139afdc708b012258b3f31', role: "columnheader", "aria-sort": this.ariaSort, tabindex: this.sortable ? 0 : undefined, onKeyDown: this.handleKeyDown.bind(this), onClick: this.cycleSortDirection.bind(this) }, h("slot", { key: '3c70c590cc33ca2d722dbc3313c9e10583bfa631' }), this.sortable && (h("span", { key: '219a872d53157545302495cec6844d55b5026e00', class: "sort-icon-wrap", "aria-hidden": "true" }, h("nv-iconbutton", { key: 'd39698493a8504bb7e2af6fa52ac4c548b91bf40', disableTabindex: true, name: "arrow-up", size: "xs", emphasis: this.sortDirection === 'none' ? 'lower' : 'low',
59
+ // prevent mousedown from selecting text
60
+ onMouseDown: (e) => e.preventDefault(), class: {
61
+ 'is-none': this.sortDirection === 'none',
62
+ 'is-desc': this.sortDirection === 'desc',
63
+ } })))));
64
+ }
65
+ static get is() { return "nv-tableheader"; }
66
+ static get originalStyleUrls() {
67
+ return {
68
+ "$": ["nv-tableheader.scss"]
69
+ };
70
+ }
71
+ static get styleUrls() {
72
+ return {
73
+ "$": ["nv-tableheader.css"]
74
+ };
75
+ }
76
+ static get properties() {
77
+ return {
78
+ "sortable": {
79
+ "type": "boolean",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "boolean",
83
+ "resolved": "boolean",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "Will render the header as sortable with the corresponding icon button.\nAllows the header to be tabbed, and trigger sorting via click or keyboard\nnavigation"
91
+ },
92
+ "getter": false,
93
+ "setter": false,
94
+ "attribute": "sortable",
95
+ "reflect": true,
96
+ "defaultValue": "false"
97
+ },
98
+ "sortDirection": {
99
+ "type": "string",
100
+ "mutable": true,
101
+ "complexType": {
102
+ "original": "'none' | 'asc' | 'desc'",
103
+ "resolved": "\"asc\" | \"desc\" | \"none\"",
104
+ "references": {}
105
+ },
106
+ "required": false,
107
+ "optional": false,
108
+ "docs": {
109
+ "tags": [],
110
+ "text": "The current sort direction of the header. Will be 'none' if the header is\nnot sortable or if the sort direction is not set."
111
+ },
112
+ "getter": false,
113
+ "setter": false,
114
+ "attribute": "sort-direction",
115
+ "reflect": true,
116
+ "defaultValue": "'none'"
117
+ }
118
+ };
119
+ }
120
+ static get events() {
121
+ return [{
122
+ "method": "sortDirectionChanged",
123
+ "name": "sortDirectionChanged",
124
+ "bubbles": true,
125
+ "cancelable": true,
126
+ "composed": true,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "Event emitted when the sort direction changes. Payload is the new sort\ndirection."
130
+ },
131
+ "complexType": {
132
+ "original": "string",
133
+ "resolved": "string",
134
+ "references": {}
135
+ }
136
+ }];
137
+ }
138
+ }
139
+ //# sourceMappingURL=nv-tableheader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nv-tableheader.js","sourceRoot":"","sources":["../../../src/components/nv-tableheader/nv-tableheader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAE9E;;GAEG;AAMH,MAAM,OAAO,aAAa;IAL1B;QAME,8EAA8E;QAC9E,oBAAoB;QAEpB;;;;WAIG;QAEM,aAAQ,GAAY,KAAK,CAAC;QAEnC;;;WAGG;QAEH,kBAAa,GAA4B,MAAM,CAAC;KA2FjD;IAzFC,uBAAuB;IACvB,8EAA8E;IAC9E,iBAAiB;IAET,kBAAkB,CAAC,CAAS;QAClC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC3B,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,cAAc,EAAE,CAAC;QAEpB,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,MAAM;SACJ,CAAC;QAEX,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC9C,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrD,CAAC;IAEO,aAAa,CAAC,KAAoB;QACxC,IAAI,CAAC,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AC,aAAa,KAAK,MAAM;wBACxC,SAAS,EAAE,IAAI,CAAC,aAAa,KAAK,MAAM;qBACzC,GACD,CACG,CACR,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n/**\n * @slot default - Child content of the component.\n */\n@Component({\n tag: 'nv-tableheader',\n styleUrl: 'nv-tableheader.scss',\n shadow: false,\n})\nexport class NvTableheader {\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Will render the header as sortable with the corresponding icon button.\n * Allows the header to be tabbed, and trigger sorting via click or keyboard\n * navigation\n */\n @Prop({ reflect: true })\n readonly sortable: boolean = false;\n\n /**\n * The current sort direction of the header. Will be 'none' if the header is\n * not sortable or if the sort direction is not set.\n */\n @Prop({ reflect: true, mutable: true })\n sortDirection: 'none' | 'asc' | 'desc' = 'none';\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region METHODS\n\n private cycleSortDirection(e?: Event) {\n if (!this.sortable) return;\n e?.preventDefault();\n\n const next = {\n none: 'asc',\n asc: 'desc',\n desc: 'none',\n } as const;\n\n this.sortDirection = next[this.sortDirection];\n this.sortDirectionChanged.emit(this.sortDirection);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (!this.sortable) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.cycleSortDirection();\n }\n }\n\n get ariaSort() {\n const sortMap = {\n none: 'none',\n asc: 'ascending',\n desc: 'descending',\n } as const;\n\n if (!this.sortable) return sortMap.none;\n return sortMap[this.sortDirection];\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region WATCHERS\n //#endregion WATCHERS\n /****************************************************************************/\n //#region LIFECYCLE\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Event emitted when the sort direction changes. Payload is the new sort\n * direction.\n */\n @Event()\n sortDirectionChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host\n role=\"columnheader\"\n aria-sort={this.ariaSort}\n tabindex={this.sortable ? 0 : undefined}\n onKeyDown={this.handleKeyDown.bind(this)}\n onClick={this.cycleSortDirection.bind(this)}\n >\n <slot></slot>\n\n {this.sortable && (\n <span class=\"sort-icon-wrap\" aria-hidden=\"true\">\n <nv-iconbutton\n disableTabindex\n name=\"arrow-up\"\n size=\"xs\"\n emphasis={this.sortDirection === 'none' ? 'lower' : 'low'}\n // prevent mousedown from selecting text\n onMouseDown={(e: MouseEvent) => e.preventDefault()}\n class={{\n 'is-none': this.sortDirection === 'none',\n 'is-desc': this.sortDirection === 'desc',\n }}\n />\n </span>\n )}\n </Host>\n );\n }\n // #endregion RENDER\n}\n"]}
@@ -60,8 +60,8 @@ export class NvToggle {
60
60
  /****************************************************************************/
61
61
  //#region RENDER
62
62
  render() {
63
- return (h(Host, { key: '65222149af4edb9f8fd2da7efe9a01e15dec4722', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, h("div", { key: '7edd5587281b5610269f1ac09826ce379abfae24', class: "input-container" }, h("input", { key: '30d3db3cbdc263259a5ba1bf8e637225c4db3b4a', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), h("div", { key: 'a8a6d3c2774560b7d43cda75882d90cc564f4c54', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'fe980a07df4901081fda42df758236da0b8a11d0', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, h("slot", { key: '723cec5914c6c0bed7e14e61e2f64e83c8e8b7b8', name: "label" }, this.label))), (this.description ||
64
- this.el.querySelector('[slot="description"]')) && (h("div", { key: 'f811065ed06f0816d8f0f1f65d4c659cbde3f683', class: "description" }, h("slot", { key: '541946e3f33a315bf667999c30a44fd93fc5f07f', name: "description" }, this.description))))));
63
+ return (h(Host, { key: '8e5b801ed4263b02b9b00628e94de448986eca98', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, h("div", { key: 'b25ed406fae37d41f1c1fbe4234ded3f94db14b0', class: "input-container" }, h("input", { key: '5a98b81705597f2a115517b6031289ee9be54bda', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), h("div", { key: '89366dfe5c0106d7e28a858745941f0358220ce7', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: '3f0192378adbd8d5d5f5f5684d1e929462d7832b', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, h("slot", { key: 'ee95958740e62af025bc4a456fe1b9f12b9aac71', name: "label" }, this.label))), (this.description ||
64
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'eee5a91ccbe1eed1d2ce41c0ce08cf8b49440501', class: "description" }, h("slot", { key: 'a925c57db61229d032412e315ff1f738a479b090', name: "description" }, this.description))))));
65
65
  }
66
66
  static get is() { return "nv-toggle"; }
67
67
  static get formAssociated() { return true; }
@@ -41,7 +41,7 @@ export class NvTogglebutton {
41
41
  /****************************************************************************/
42
42
  //#region RENDER
43
43
  render() {
44
- return (h(Host, { key: 'c4b698b1fb80f0dcca5d7a77bc20d22db1cbf538', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, h("slot", { key: '605385f07f32b989685983cfd1a082525741fba4' })));
44
+ return (h(Host, { key: 'a36d2ac3ed287145dae1812e8488313e7509b979', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, h("slot", { key: '463f95e6e68148d94047e8b71c99c449dccffbd6' })));
45
45
  }
46
46
  static get is() { return "nv-togglebutton"; }
47
47
  static get originalStyleUrls() {
@@ -11,6 +11,7 @@ nv-togglebutton[size=xs] {
11
11
  gap: var(--button-xs-gap);
12
12
  border-radius: var(--button-xs-border-radius);
13
13
  line-height: var(--button-xs-line-height);
14
+ height: var(--button-xs-height);
14
15
  font-size: var(--button-xs-font-size);
15
16
  padding-top: calc(var(--togglegroup-xs-button-padding-y) - 1px);
16
17
  padding-bottom: calc(var(--togglegroup-xs-button-padding-y) - 1px);
@@ -27,6 +28,7 @@ nv-togglebutton[size=sm] {
27
28
  gap: var(--button-sm-gap);
28
29
  border-radius: var(--button-sm-border-radius);
29
30
  line-height: var(--button-sm-line-height);
31
+ height: var(--button-sm-height);
30
32
  font-size: var(--button-sm-font-size);
31
33
  padding-top: calc(var(--togglegroup-sm-button-padding-y) - 1px);
32
34
  padding-bottom: calc(var(--togglegroup-sm-button-padding-y) - 1px);
@@ -43,6 +45,7 @@ nv-togglebutton[size=md] {
43
45
  gap: var(--button-md-gap);
44
46
  border-radius: var(--button-md-border-radius);
45
47
  line-height: var(--button-md-line-height);
48
+ height: var(--button-md-height);
46
49
  font-size: var(--button-md-font-size);
47
50
  padding-top: calc(var(--togglegroup-md-button-padding-y) - 1px);
48
51
  padding-bottom: calc(var(--togglegroup-md-button-padding-y) - 1px);
@@ -59,6 +62,7 @@ nv-togglebutton[size=lg] {
59
62
  gap: var(--button-lg-gap);
60
63
  border-radius: var(--button-lg-border-radius);
61
64
  line-height: var(--button-lg-line-height);
65
+ height: var(--button-lg-height);
62
66
  font-size: var(--button-lg-font-size);
63
67
  padding-top: calc(var(--togglegroup-lg-button-padding-y) - 1px);
64
68
  padding-bottom: calc(var(--togglegroup-lg-button-padding-y) - 1px);
@@ -149,7 +149,7 @@ export class NvTogglebuttongroup {
149
149
  /****************************************************************************/
150
150
  //#region RENDER
151
151
  render() {
152
- return (h(Host, { key: 'ab91ff1817e3388508ed1da7a9ed57a79cf8c4bc' }, h("slot", { key: '4a3280db78c1f0cd120a0cb32d95eabaf69995a6' })));
152
+ return (h(Host, { key: '02b7814ffceeaa875edcbce4ebdd6465b24abf62' }, h("slot", { key: '89c9387a50ec0c1c660e490b66742be96e6f6b3e' })));
153
153
  }
154
154
  static get is() { return "nv-togglebuttongroup"; }
155
155
  static get originalStyleUrls() {
@@ -40,7 +40,7 @@ export class NvTooltip {
40
40
  /****************************************************************************/
41
41
  //#region RENDER
42
42
  render() {
43
- return (h(Host, { key: 'c2fdcd47be909554e31a3a7d77cd94dcb07c0d6e' }, h("slot", { key: '2305f6b7175d0ba84819351f60f2a4d76d117df9' }), h("nv-popover", { key: 'e388730b5858671d08981c6bbf72588a5084edbf', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, h("p", { key: '73f548a1c822f7c6d5a97bb4ef8da0d335cf049e', slot: "content" }, this.message), h("slot", { key: 'abb7a2dfa6a327122732802a867c5d4057fd1616', name: "content" }))));
43
+ return (h(Host, { key: '2ec10db6ad78e1637696e383069caf3fc8919587' }, h("slot", { key: '0df02ac8d76de82ae25ec3d9c73ef18cd6eee4d8' }), h("nv-popover", { key: '1ed0766ed0c3d43952be2be0dbafd94f07ec44b3', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, h("p", { key: 'bd44fba212d86969688bdf3e00a711f152500952', slot: "content" }, this.message), h("slot", { key: '31f2c47d800e4bd057c7475de931e11542eb5208', name: "content" }))));
44
44
  }
45
45
  static get is() { return "nv-tooltip"; }
46
46
  static get originalStyleUrls() {
@@ -200,8 +200,6 @@ const iconNames = [
200
200
  'cloud-snow',
201
201
  'cloud-upload',
202
202
  'cloud',
203
- 'collapse-close',
204
- 'collapse-open',
205
203
  'color-picker',
206
204
  'color-swatch',
207
205
  'columns-1',
@@ -495,6 +493,7 @@ const iconNames = [
495
493
  'ship-off',
496
494
  'ship',
497
495
  'shopping-cart',
496
+ 'sitemap',
498
497
  'slash',
499
498
  'smart-home',
500
499
  'snowflake',