@nvidia-elements/core 0.2.2 → 0.2.3

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 (141) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/accordion/accordion2.js +39 -39
  3. package/dist/alert/alert-group2.js +14 -14
  4. package/dist/alert/alert2.js +20 -20
  5. package/dist/avatar/avatar-group2.js +1 -1
  6. package/dist/avatar/avatar2.js +6 -6
  7. package/dist/badge/badge2.js +21 -21
  8. package/dist/breadcrumb/breadcrumb2.js +12 -12
  9. package/dist/bundles/index.d.ts +418 -1802
  10. package/dist/bundles/index.js +6 -6
  11. package/dist/button/button.d.ts +5 -2
  12. package/dist/button/button2.js +13 -13
  13. package/dist/button/button2.js.map +1 -1
  14. package/dist/button-group/button-group2.js +15 -15
  15. package/dist/card/card2.js +17 -17
  16. package/dist/chat-message/chat-message2.js +7 -7
  17. package/dist/checkbox/checkbox-group2.js +7 -7
  18. package/dist/checkbox/checkbox2.js +7 -7
  19. package/dist/color/color2.js +7 -7
  20. package/dist/combobox/combobox2.js +10 -10
  21. package/dist/copy-button/copy-button2.js +10 -10
  22. package/dist/custom-elements-jsx.d.ts +346 -613
  23. package/dist/custom-elements-vue.d.ts +346 -613
  24. package/dist/custom-elements.json +4870 -14220
  25. package/dist/data.html.json +252 -168
  26. package/dist/data.snippets.json +42 -42
  27. package/dist/date/date2.js +7 -7
  28. package/dist/datetime/datetime2.js +7 -7
  29. package/dist/dialog/dialog-footer2.js +6 -6
  30. package/dist/dialog/dialog-header2.js +6 -6
  31. package/dist/dialog/dialog2.js +19 -19
  32. package/dist/divider/divider2.js +5 -5
  33. package/dist/dot/dot2.js +8 -8
  34. package/dist/drawer/drawer-content2.js +6 -6
  35. package/dist/drawer/drawer-footer2.js +6 -6
  36. package/dist/drawer/drawer-header2.js +6 -6
  37. package/dist/drawer/drawer2.js +19 -19
  38. package/dist/dropdown/dropdown-footer2.js +6 -6
  39. package/dist/dropdown/dropdown-header2.js +6 -6
  40. package/dist/dropdown/dropdown2.js +16 -16
  41. package/dist/dropdown-group/dropdown-group.js +16 -16
  42. package/dist/dropzone/dropzone.d.ts +1 -404
  43. package/dist/dropzone/dropzone2.js +14 -14
  44. package/dist/dropzone/dropzone2.js.map +1 -1
  45. package/dist/file/file2.js +1 -1
  46. package/dist/format-datetime/format-datetime2.js +10 -10
  47. package/dist/format-number/format-number2.js +16 -16
  48. package/dist/format-relative-time/format-relative-time2.js +7 -7
  49. package/dist/forms/control/control2.js +19 -19
  50. package/dist/forms/control-group/control-group2.js +6 -6
  51. package/dist/forms/control-message/control-message2.js +9 -9
  52. package/dist/grid/cell/cell2.js +1 -1
  53. package/dist/grid/column/column2.js +10 -10
  54. package/dist/grid/footer/footer2.js +6 -6
  55. package/dist/grid/grid2.js +12 -12
  56. package/dist/grid/header/header2.js +9 -9
  57. package/dist/grid/placeholder/placeholder2.js +1 -1
  58. package/dist/grid/row/row2.js +9 -9
  59. package/dist/icon/icon2.js +15 -15
  60. package/dist/icon-button/icon-button2.js +9 -9
  61. package/dist/index.js +4 -4
  62. package/dist/input/input-group2.js +1 -1
  63. package/dist/input/input2.js +6 -6
  64. package/dist/internal/controllers/keynav-grid.controller.js +39 -39
  65. package/dist/internal/controllers/type-button.controller.examples.js.map +1 -1
  66. package/dist/internal/controllers/type-button.controller.examples.json +1 -1
  67. package/dist/internal/controllers/type-command.controller.d.ts +10 -1
  68. package/dist/internal/controllers/type-command.controller.js +23 -14
  69. package/dist/internal/controllers/type-command.controller.js.map +1 -1
  70. package/dist/internal/controllers/type-native-popover.utils.js +7 -7
  71. package/dist/internal/index.d.ts +0 -1
  72. package/dist/internal/index.js +40 -41
  73. package/dist/internal/services/global.service.js +1 -1
  74. package/dist/logo/logo2.js +6 -6
  75. package/dist/menu/menu-item.d.ts +4 -2
  76. package/dist/menu/menu-item2.js +12 -12
  77. package/dist/menu/menu-item2.js.map +1 -1
  78. package/dist/menu/menu2.js +10 -10
  79. package/dist/month/month2.js +7 -7
  80. package/dist/notification/notification-group2.js +11 -11
  81. package/dist/notification/notification2.js +22 -22
  82. package/dist/page/page-panel/page-panel-content2.js +1 -1
  83. package/dist/page/page-panel/page-panel-footer2.js +6 -6
  84. package/dist/page/page-panel/page-panel-header2.js +6 -6
  85. package/dist/page/page-panel/page-panel2.js +14 -14
  86. package/dist/page/page2.js +9 -9
  87. package/dist/page-header/page-header2.js +1 -1
  88. package/dist/page-loader/page-loader2.js +10 -10
  89. package/dist/pagination/pagination.d.ts +1 -404
  90. package/dist/pagination/pagination2.js +17 -17
  91. package/dist/pagination/pagination2.js.map +1 -1
  92. package/dist/panel/panel2.js +21 -21
  93. package/dist/password/password2.js +7 -7
  94. package/dist/preferences-input/preferences-input.d.ts +1 -404
  95. package/dist/preferences-input/preferences-input2.js +9 -9
  96. package/dist/preferences-input/preferences-input2.js.map +1 -1
  97. package/dist/progress-bar/progress-bar2.js +8 -8
  98. package/dist/progress-ring/progress-ring2.js +15 -15
  99. package/dist/progressive-filter-chip/progressive-filter-chip2.js +15 -15
  100. package/dist/pulse/pulse2.js +6 -6
  101. package/dist/radio/radio-group2.js +7 -7
  102. package/dist/radio/radio2.js +7 -7
  103. package/dist/range/range2.js +5 -5
  104. package/dist/resize-handle/resize-handle.d.ts +1 -404
  105. package/dist/resize-handle/resize-handle2.js +16 -16
  106. package/dist/resize-handle/resize-handle2.js.map +1 -1
  107. package/dist/search/search2.js +8 -8
  108. package/dist/select/select2.js +18 -18
  109. package/dist/skeleton/skeleton2.js +7 -7
  110. package/dist/sort-button/sort-button.d.ts +4 -2
  111. package/dist/sort-button/sort-button2.js +19 -19
  112. package/dist/sort-button/sort-button2.js.map +1 -1
  113. package/dist/sparkline/sparkline2.js +14 -14
  114. package/dist/star-rating/star-rating2.js +6 -6
  115. package/dist/steps/steps.d.ts +4 -2
  116. package/dist/steps/steps2.js +36 -36
  117. package/dist/steps/steps2.js.map +1 -1
  118. package/dist/switch/switch-group2.js +6 -6
  119. package/dist/switch/switch2.js +7 -7
  120. package/dist/tabs/tabs-group2.js +21 -21
  121. package/dist/tabs/tabs.d.ts +4 -2
  122. package/dist/tabs/tabs2.js +30 -30
  123. package/dist/tabs/tabs2.js.map +1 -1
  124. package/dist/tag/tag.d.ts +5 -2
  125. package/dist/tag/tag2.js +20 -20
  126. package/dist/tag/tag2.js.map +1 -1
  127. package/dist/textarea/textarea2.js +1 -1
  128. package/dist/time/time2.js +7 -7
  129. package/dist/toast/toast2.js +21 -21
  130. package/dist/toggletip/toggletip-footer2.js +6 -6
  131. package/dist/toggletip/toggletip-header2.js +6 -6
  132. package/dist/toggletip/toggletip2.js +17 -17
  133. package/dist/toolbar/toolbar2.js +11 -11
  134. package/dist/tooltip/tooltip2.js +16 -16
  135. package/dist/tree/tree-node2.js +30 -30
  136. package/dist/tree/tree2.js +14 -14
  137. package/dist/week/week2.js +7 -7
  138. package/package.json +3 -3
  139. package/dist/internal/base/button.d.ts +0 -114
  140. package/dist/internal/base/button.js +0 -117
  141. package/dist/internal/base/button.js.map +0 -1
@@ -1,26 +1,26 @@
1
1
  import { formatFileSize as e } from "../internal/utils/strings.js";
2
- import { removeEmptyTextNode as t } from "../internal/utils/dom.js";
3
- import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
4
- import { I18nController as r } from "../internal/controllers/i18n.controller.js";
5
- import { scopedRegistry as i } from "../internal/decorators/scoped-registry.js";
6
- import { useStyles as a } from "../internal/styles/index.js";
2
+ import { I18nController as t } from "../internal/controllers/i18n.controller.js";
3
+ import { removeEmptyTextNode as n } from "../internal/utils/dom.js";
4
+ import { scopedRegistry as r } from "../internal/decorators/scoped-registry.js";
5
+ import { useStyles as i } from "../internal/styles/index.js";
6
+ import { __decorate as a } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
7
7
  import { Icon as o } from "../icon/icon2.js";
8
8
  import s from "./dropzone.js";
9
9
  import { fileSizeValidator as c, fileTypeValidator as l, getFileTypeSpecifiers as u } from "./dropzone.util.js";
10
10
  import { LitElement as d, html as f } from "lit";
11
11
  import { property as p } from "lit/decorators/property.js";
12
- import { query as m } from "lit/decorators/query.js";
13
- import { FormControlMixin as h } from "@nvidia-elements/forms/mixin";
12
+ import { FormControlMixin as m } from "@nvidia-elements/forms/mixins";
13
+ import { query as h } from "lit/decorators/query.js";
14
14
  //#region src/dropzone/dropzone.ts
15
- var g = class extends h(d) {
15
+ var g = class extends m(d) {
16
16
  #e;
17
17
  static {
18
- this.styles = a([s]);
18
+ this.styles = i([s]);
19
19
  }
20
20
  static {
21
21
  this.metadata = {
22
22
  tag: "nve-dropzone",
23
- version: "0.2.2",
23
+ version: "0.2.3",
24
24
  validators: [l, c],
25
25
  valueSchema: {
26
26
  type: "array",
@@ -42,7 +42,7 @@ var g = class extends h(d) {
42
42
  this.value = [], this.requestUpdate();
43
43
  }
44
44
  constructor() {
45
- super(), this.accept = "image/gif, image/jpeg, image/png, image/svg+xml", this.maxFileSize = 2 * 1024 ** 2, this.#e = new r(this), this.i18n = this.#e.i18n, this.value = [];
45
+ super(), this.accept = "image/gif, image/jpeg, image/png, image/svg+xml", this.maxFileSize = 2 * 1024 ** 2, this.#e = new t(this), this.i18n = this.#e.i18n, this.value = [];
46
46
  }
47
47
  connectedCallback() {
48
48
  super.connectedCallback(), this.setAttribute("nve-control", ""), globalThis.document.addEventListener("dragover", this.#t), globalThis.document.addEventListener("drop", this.#t);
@@ -88,16 +88,16 @@ var g = class extends h(d) {
88
88
  this.toggleAttribute("highlighted", e);
89
89
  }
90
90
  #d(e) {
91
- e.target.assignedNodes().forEach((e) => t(e));
91
+ e.target.assignedNodes().forEach((e) => n(e));
92
92
  }
93
93
  render() {
94
94
  return f`<div internal-host><div class="container" @click="${this.#n}" @dragenter="${this.#r}" @dragover="${this.#i}" @dragleave="${this.#a}" @drop="${this.#o}"><svg class="border" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="none" rx="4" ry="4" stroke="currentColor" stroke-width="2" stroke-dasharray="6,6" stroke-dashoffset="0" stroke-linecap="square"/></svg><slot name="icon"><nve-icon part="icon" class="icon" name="upload"></nve-icon></slot><slot @slotchange="${this.#d}"><div class="text-center"><div class="text-bold">${this.i18n.dragAndDrop} ${this.i18n.files} ${this.i18n.or} <span class="text-emphasized">${this.i18n.browseFiles}</span></div><div class="text-muted">${this.#l(this.accept)} — ${this.i18n.maxFileSize} ${e(this.maxFileSize)}</div></div></slot><input id="dropzone-input" type="file" accept="${this.accept}" @change="${this.#s}" multiple="multiple" hidden></div></div>`;
95
95
  }
96
96
  };
97
- n([p()], g.prototype, "accept", void 0), n([p({
97
+ a([p()], g.prototype, "accept", void 0), a([p({
98
98
  attribute: "max-file-size",
99
99
  type: Number
100
- })], g.prototype, "maxFileSize", void 0), n([p({ type: Object })], g.prototype, "i18n", void 0), n([m("#dropzone-input")], g.prototype, "fileInput", void 0), g = n([i()], g);
100
+ })], g.prototype, "maxFileSize", void 0), a([p({ type: Object })], g.prototype, "i18n", void 0), a([h("#dropzone-input")], g.prototype, "fileInput", void 0), g = a([r()], g);
101
101
  //#endregion
102
102
  export { g as Dropzone };
103
103
 
@@ -1 +1 @@
1
- {"version":3,"file":"dropzone2.js","names":["#i18nController","#preventDefaults","#toggleHighlighted","#addFiles","#handleClick","#handleDragEnter","#handleDragOver","#handleDragLeave","#handleDrop","#removeEmptyNodes","#formatFileTypeSpecifiers","#handleFileInputChange"],"sources":["../../src/dropzone/dropzone.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { query } from 'lit/decorators/query.js';\nimport {\n formatFileSize,\n useStyles,\n removeEmptyTextNode,\n I18nController,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './dropzone.css?inline';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixin';\nimport { fileTypeValidator, fileSizeValidator, getFileTypeSpecifiers } from './dropzone.util';\n\n/**\n * @element nve-dropzone\n * @description A dropzone form control that enables users to drag and drop files onto it.\n * @since 1.29.0\n * @entrypoint \\@nvidia-elements/core/dropzone\n * @event change - Dispatched when the value has changed (files located in event.target)\n * @slot - use only when custom messaging requires it\n * @cssprop --background\n * @cssprop --border-color\n * @cssprop --border-radius\n * @cssprop --padding\n * @cssprop --min-height\n * @cssprop --color\n * @slot icon - default slot for icon\n * @slot content - default slot for content\n * @csspart icon - The upload icon element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n * @stable false\n */\n@scopedRegistry()\nexport class Dropzone extends FormControlMixin<typeof LitElement, File[]>(LitElement) {\n @property()\n accept: string = `image/gif, image/jpeg, image/png, image/svg+xml`;\n\n @property({ attribute: 'max-file-size', type: Number })\n maxFileSize: number = 2 * 1024 ** 2;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables internal string values to update for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n @query('#dropzone-input')\n private fileInput: HTMLInputElement;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropzone',\n version: '0.0.0',\n validators: [fileTypeValidator, fileSizeValidator],\n valueSchema: {\n type: 'array' as const,\n items: {\n type: 'object' as const,\n properties: {\n name: { type: 'string' as const },\n size: { type: 'number' as const },\n type: { type: 'string' as const }\n }\n }\n }\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n formResetCallback() {\n this.value = [];\n this.requestUpdate();\n }\n\n constructor() {\n super();\n this.value = [];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('nve-control', '');\n globalThis.document.addEventListener('dragover', this.#preventDefaults);\n globalThis.document.addEventListener('drop', this.#preventDefaults);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n globalThis.document.removeEventListener('dragover', this.#preventDefaults);\n globalThis.document.removeEventListener('drop', this.#preventDefaults);\n }\n\n #preventDefaults(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n #handleClick() {\n this.fileInput.click();\n }\n\n #handleDragEnter(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragOver(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragLeave(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n }\n\n #handleDrop(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n\n const files = Array.from(event.dataTransfer!.files);\n this.#addFiles(files);\n }\n\n #handleFileInputChange(event: Event) {\n this.#preventDefaults(event);\n\n const files = Array.from(this.fileInput.files!);\n this.#addFiles(files);\n\n this.fileInput.value = '';\n }\n\n #addFiles(files: File[]) {\n this.value = [...(this.value ?? []), ...files];\n this.dispatchChangeEvent();\n }\n\n #formatFileTypeSpecifiers(acceptTypes: string) {\n const types = getFileTypeSpecifiers(acceptTypes);\n\n if (types.length === 1) {\n return types[0]!.toUpperCase();\n }\n\n const lastType = types.pop();\n return `${types.join(', ').toUpperCase()} or ${lastType!.toUpperCase()}`;\n }\n\n #toggleHighlighted(highlighted: boolean) {\n this.toggleAttribute('highlighted', highlighted);\n }\n\n #removeEmptyNodes(e: Event) {\n (e.target as HTMLSlotElement).assignedNodes().forEach((node: Node) => removeEmptyTextNode(node));\n }\n\n render() {\n return html`<div internal-host>\n <div class=\"container\"\n @click=${this.#handleClick} \n @dragenter=${this.#handleDragEnter}\n @dragover=${this.#handleDragOver}\n @dragleave=${this.#handleDragLeave}\n @drop=${this.#handleDrop}>\n <svg class=\"border\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" fill=\"none\" rx=\"4\" ry=\"4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-dasharray=\"6,6\" stroke-dashoffset=\"0\" stroke-linecap=\"square\" />\n </svg>\n <slot name=\"icon\"><nve-icon part=\"icon\" class=\"icon\" name=\"upload\"></nve-icon></slot>\n <slot @slotchange=${this.#removeEmptyNodes}>\n <div class=\"text-center\">\n <div class=\"text-bold\">${this.i18n.dragAndDrop} ${this.i18n.files} ${this.i18n.or} <span class=\"text-emphasized\">${this.i18n.browseFiles}</span></div>\n <div class=\"text-muted\">${this.#formatFileTypeSpecifiers(this.accept)} &mdash; ${this.i18n.maxFileSize} ${formatFileSize(this.maxFileSize)}</div>\n </div>\n </slot>\n <input id=\"dropzone-input\" type=\"file\" accept=${this.accept} @change=${this.#handleFileInputChange} multiple hidden></input>\n </div>\n </div>`;\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"dropzone2.js","names":["#i18nController","#preventDefaults","#toggleHighlighted","#addFiles","#handleClick","#handleDragEnter","#handleDragOver","#handleDragLeave","#handleDrop","#removeEmptyNodes","#formatFileTypeSpecifiers","#handleFileInputChange"],"sources":["../../src/dropzone/dropzone.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { query } from 'lit/decorators/query.js';\nimport {\n formatFileSize,\n useStyles,\n removeEmptyTextNode,\n I18nController,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './dropzone.css?inline';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { fileTypeValidator, fileSizeValidator, getFileTypeSpecifiers } from './dropzone.util';\n\n/**\n * @element nve-dropzone\n * @description A dropzone form control that enables users to drag and drop files onto it.\n * @since 1.29.0\n * @entrypoint \\@nvidia-elements/core/dropzone\n * @event change - Dispatched when the value has changed (files located in event.target)\n * @slot - use only when custom messaging requires it\n * @cssprop --background\n * @cssprop --border-color\n * @cssprop --border-radius\n * @cssprop --padding\n * @cssprop --min-height\n * @cssprop --color\n * @slot icon - default slot for icon\n * @slot content - default slot for content\n * @csspart icon - The upload icon element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n * @stable false\n */\n@scopedRegistry()\nexport class Dropzone extends FormControlMixin<typeof LitElement, File[]>(LitElement) {\n @property()\n accept: string = `image/gif, image/jpeg, image/png, image/svg+xml`;\n\n @property({ attribute: 'max-file-size', type: Number })\n maxFileSize: number = 2 * 1024 ** 2;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables internal string values to update for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n @query('#dropzone-input')\n private fileInput: HTMLInputElement;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropzone',\n version: '0.0.0',\n validators: [fileTypeValidator, fileSizeValidator],\n valueSchema: {\n type: 'array' as const,\n items: {\n type: 'object' as const,\n properties: {\n name: { type: 'string' as const },\n size: { type: 'number' as const },\n type: { type: 'string' as const }\n }\n }\n }\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n formResetCallback() {\n this.value = [];\n this.requestUpdate();\n }\n\n constructor() {\n super();\n this.value = [];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('nve-control', '');\n globalThis.document.addEventListener('dragover', this.#preventDefaults);\n globalThis.document.addEventListener('drop', this.#preventDefaults);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n globalThis.document.removeEventListener('dragover', this.#preventDefaults);\n globalThis.document.removeEventListener('drop', this.#preventDefaults);\n }\n\n #preventDefaults(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n #handleClick() {\n this.fileInput.click();\n }\n\n #handleDragEnter(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragOver(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragLeave(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n }\n\n #handleDrop(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n\n const files = Array.from(event.dataTransfer!.files);\n this.#addFiles(files);\n }\n\n #handleFileInputChange(event: Event) {\n this.#preventDefaults(event);\n\n const files = Array.from(this.fileInput.files!);\n this.#addFiles(files);\n\n this.fileInput.value = '';\n }\n\n #addFiles(files: File[]) {\n this.value = [...(this.value ?? []), ...files];\n this.dispatchChangeEvent();\n }\n\n #formatFileTypeSpecifiers(acceptTypes: string) {\n const types = getFileTypeSpecifiers(acceptTypes);\n\n if (types.length === 1) {\n return types[0]!.toUpperCase();\n }\n\n const lastType = types.pop();\n return `${types.join(', ').toUpperCase()} or ${lastType!.toUpperCase()}`;\n }\n\n #toggleHighlighted(highlighted: boolean) {\n this.toggleAttribute('highlighted', highlighted);\n }\n\n #removeEmptyNodes(e: Event) {\n (e.target as HTMLSlotElement).assignedNodes().forEach((node: Node) => removeEmptyTextNode(node));\n }\n\n render() {\n return html`<div internal-host>\n <div class=\"container\"\n @click=${this.#handleClick} \n @dragenter=${this.#handleDragEnter}\n @dragover=${this.#handleDragOver}\n @dragleave=${this.#handleDragLeave}\n @drop=${this.#handleDrop}>\n <svg class=\"border\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" fill=\"none\" rx=\"4\" ry=\"4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-dasharray=\"6,6\" stroke-dashoffset=\"0\" stroke-linecap=\"square\" />\n </svg>\n <slot name=\"icon\"><nve-icon part=\"icon\" class=\"icon\" name=\"upload\"></nve-icon></slot>\n <slot @slotchange=${this.#removeEmptyNodes}>\n <div class=\"text-center\">\n <div class=\"text-bold\">${this.i18n.dragAndDrop} ${this.i18n.files} ${this.i18n.or} <span class=\"text-emphasized\">${this.i18n.browseFiles}</span></div>\n <div class=\"text-muted\">${this.#formatFileTypeSpecifiers(this.accept)} &mdash; ${this.i18n.maxFileSize} ${formatFileSize(this.maxFileSize)}</div>\n </div>\n </slot>\n <input id=\"dropzone-input\" type=\"file\" accept=${this.accept} @change=${this.#handleFileInputChange} multiple hidden></input>\n </div>\n </div>`;\n }\n}\n"],"mappings":"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"}
@@ -11,7 +11,7 @@ var a = class extends n {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-file",
14
- version: "0.2.2"
14
+ version: "0.2.3"
15
15
  };
16
16
  }
17
17
  connectedCallback() {
@@ -1,19 +1,19 @@
1
1
  import { LogService as e } from "../internal/services/log.service.js";
2
- import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
3
- import { typeSSR as n } from "../internal/controllers/type-ssr.controller.js";
4
- import { useStyles as r } from "../internal/styles/index.js";
2
+ import { typeSSR as t } from "../internal/controllers/type-ssr.controller.js";
3
+ import { useStyles as n } from "../internal/styles/index.js";
4
+ import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
5
5
  import i from "./format-datetime.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  import { property as s } from "lit/decorators/property.js";
8
8
  //#region src/format-datetime/format-datetime.ts
9
9
  var c = class extends a {
10
10
  static {
11
- this.styles = r([i]);
11
+ this.styles = n([i]);
12
12
  }
13
13
  static {
14
14
  this.metadata = {
15
15
  tag: "nve-format-datetime",
16
- version: "0.2.2"
16
+ version: "0.2.3"
17
17
  };
18
18
  }
19
19
  get #e() {
@@ -58,19 +58,19 @@ var c = class extends a {
58
58
  this.requestUpdate();
59
59
  }
60
60
  };
61
- t([s({ type: String })], c.prototype, "date", void 0), t([s({ type: String })], c.prototype, "locale", void 0), t([s({ type: String })], c.prototype, "weekday", void 0), t([s({ type: String })], c.prototype, "year", void 0), t([s({ type: String })], c.prototype, "month", void 0), t([s({ type: String })], c.prototype, "day", void 0), t([s({ type: String })], c.prototype, "hour", void 0), t([s({ type: String })], c.prototype, "minute", void 0), t([s({ type: String })], c.prototype, "second", void 0), t([s({
61
+ r([s({ type: String })], c.prototype, "date", void 0), r([s({ type: String })], c.prototype, "locale", void 0), r([s({ type: String })], c.prototype, "weekday", void 0), r([s({ type: String })], c.prototype, "year", void 0), r([s({ type: String })], c.prototype, "month", void 0), r([s({ type: String })], c.prototype, "day", void 0), r([s({ type: String })], c.prototype, "hour", void 0), r([s({ type: String })], c.prototype, "minute", void 0), r([s({ type: String })], c.prototype, "second", void 0), r([s({
62
62
  type: String,
63
63
  attribute: "date-style"
64
- })], c.prototype, "dateStyle", void 0), t([s({
64
+ })], c.prototype, "dateStyle", void 0), r([s({
65
65
  type: String,
66
66
  attribute: "time-style"
67
- })], c.prototype, "timeStyle", void 0), t([s({
67
+ })], c.prototype, "timeStyle", void 0), r([s({
68
68
  type: String,
69
69
  attribute: "time-zone-name"
70
- })], c.prototype, "timeZoneName", void 0), t([s({
70
+ })], c.prototype, "timeZoneName", void 0), r([s({
71
71
  type: String,
72
72
  attribute: "time-zone"
73
- })], c.prototype, "timeZone", void 0), c = t([n()], c);
73
+ })], c.prototype, "timeZone", void 0), c = r([t()], c);
74
74
  //#endregion
75
75
  export { c as FormatDatetime };
76
76
 
@@ -1,7 +1,7 @@
1
1
  import { LogService as e } from "../internal/services/log.service.js";
2
- import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
3
- import { typeSSR as n } from "../internal/controllers/type-ssr.controller.js";
4
- import { useStyles as r } from "../internal/styles/index.js";
2
+ import { typeSSR as t } from "../internal/controllers/type-ssr.controller.js";
3
+ import { useStyles as n } from "../internal/styles/index.js";
4
+ import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
5
5
  import i from "./format-number.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  import { property as s } from "lit/decorators/property.js";
@@ -24,12 +24,12 @@ var c = [
24
24
  super(...e), this.formatStyle = "decimal";
25
25
  }
26
26
  static {
27
- this.styles = r([i]);
27
+ this.styles = n([i]);
28
28
  }
29
29
  static {
30
30
  this.metadata = {
31
31
  tag: "nve-format-number",
32
- version: "0.2.2"
32
+ version: "0.2.3"
33
33
  };
34
34
  }
35
35
  get #e() {
@@ -74,37 +74,37 @@ var c = [
74
74
  this.requestUpdate();
75
75
  }
76
76
  };
77
- t([s({ type: String })], u.prototype, "number", void 0), t([s({ type: String })], u.prototype, "locale", void 0), t([s({
77
+ r([s({ type: String })], u.prototype, "number", void 0), r([s({ type: String })], u.prototype, "locale", void 0), r([s({
78
78
  type: String,
79
79
  attribute: "format-style"
80
- })], u.prototype, "formatStyle", void 0), t([s({ type: String })], u.prototype, "currency", void 0), t([s({
80
+ })], u.prototype, "formatStyle", void 0), r([s({ type: String })], u.prototype, "currency", void 0), r([s({
81
81
  type: String,
82
82
  attribute: "currency-sign"
83
- })], u.prototype, "currencySign", void 0), t([s({
83
+ })], u.prototype, "currencySign", void 0), r([s({
84
84
  type: String,
85
85
  attribute: "currency-display"
86
- })], u.prototype, "currencyDisplay", void 0), t([s({ type: String })], u.prototype, "unit", void 0), t([s({
86
+ })], u.prototype, "currencyDisplay", void 0), r([s({ type: String })], u.prototype, "unit", void 0), r([s({
87
87
  type: String,
88
88
  attribute: "unit-display"
89
- })], u.prototype, "unitDisplay", void 0), t([s({ type: String })], u.prototype, "notation", void 0), t([s({
89
+ })], u.prototype, "unitDisplay", void 0), r([s({ type: String })], u.prototype, "notation", void 0), r([s({
90
90
  type: String,
91
91
  attribute: "compact-display"
92
- })], u.prototype, "compactDisplay", void 0), t([s({
92
+ })], u.prototype, "compactDisplay", void 0), r([s({
93
93
  type: String,
94
94
  attribute: "sign-display"
95
- })], u.prototype, "signDisplay", void 0), t([s({
95
+ })], u.prototype, "signDisplay", void 0), r([s({
96
96
  type: String,
97
97
  attribute: "use-grouping"
98
- })], u.prototype, "useGrouping", void 0), t([s({
98
+ })], u.prototype, "useGrouping", void 0), r([s({
99
99
  type: Number,
100
100
  attribute: "minimum-fraction-digits"
101
- })], u.prototype, "minimumFractionDigits", void 0), t([s({
101
+ })], u.prototype, "minimumFractionDigits", void 0), r([s({
102
102
  type: Number,
103
103
  attribute: "maximum-fraction-digits"
104
- })], u.prototype, "maximumFractionDigits", void 0), t([s({
104
+ })], u.prototype, "maximumFractionDigits", void 0), r([s({
105
105
  type: Number,
106
106
  attribute: "minimum-integer-digits"
107
- })], u.prototype, "minimumIntegerDigits", void 0), u = t([n()], u);
107
+ })], u.prototype, "minimumIntegerDigits", void 0), u = r([t()], u);
108
108
  //#endregion
109
109
  export { u as FormatNumber };
110
110
 
@@ -1,7 +1,7 @@
1
1
  import { LogService as e } from "../internal/services/log.service.js";
2
- import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
3
- import { typeSSR as n } from "../internal/controllers/type-ssr.controller.js";
4
- import { useStyles as r } from "../internal/styles/index.js";
2
+ import { typeSSR as t } from "../internal/controllers/type-ssr.controller.js";
3
+ import { useStyles as n } from "../internal/styles/index.js";
4
+ import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
5
5
  import i from "./format-relative-time.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  import { property as s } from "lit/decorators/property.js";
@@ -48,12 +48,12 @@ var c = {
48
48
  super(...e), this.numeric = "always", this.formatStyle = "long", this.unit = "auto", this.sync = !1;
49
49
  }
50
50
  static {
51
- this.styles = r([i]);
51
+ this.styles = n([i]);
52
52
  }
53
53
  static {
54
54
  this.metadata = {
55
55
  tag: "nve-format-relative-time",
56
- version: "0.2.2"
56
+ version: "0.2.3"
57
57
  };
58
58
  }
59
59
  #e;
@@ -128,10 +128,10 @@ var c = {
128
128
  this.requestUpdate();
129
129
  }
130
130
  };
131
- t([s({ type: String })], u.prototype, "date", void 0), t([s({ type: String })], u.prototype, "locale", void 0), t([s({ type: String })], u.prototype, "numeric", void 0), t([s({
131
+ r([s({ type: String })], u.prototype, "date", void 0), r([s({ type: String })], u.prototype, "locale", void 0), r([s({ type: String })], u.prototype, "numeric", void 0), r([s({
132
132
  type: String,
133
133
  attribute: "format-style"
134
- })], u.prototype, "formatStyle", void 0), t([s({ type: String })], u.prototype, "unit", void 0), t([s({ type: Boolean })], u.prototype, "sync", void 0), u = t([n()], u);
134
+ })], u.prototype, "formatStyle", void 0), r([s({ type: String })], u.prototype, "unit", void 0), r([s({ type: Boolean })], u.prototype, "sync", void 0), u = r([t()], u);
135
135
  //#endregion
136
136
  export { u as FormatRelativeTime };
137
137
 
@@ -1,10 +1,10 @@
1
- import { appendRootNodeStyle as e, getAttributeListChanges as t } from "../../internal/utils/dom.js";
2
- import { associateAriaDescribedBy as n, associateDataList as r, associateLabel as i, attachInternals as a } from "../../internal/utils/a11y.js";
3
- import { __decorate as o } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
4
- import { I18nController as s } from "../../internal/controllers/i18n.controller.js";
5
- import { typeSSR as c } from "../../internal/controllers/type-ssr.controller.js";
6
- import { hostAttr as l } from "../../internal/decorators/host-attr.js";
7
- import { useStyles as u } from "../../internal/styles/index.js";
1
+ import { I18nController as e } from "../../internal/controllers/i18n.controller.js";
2
+ import { appendRootNodeStyle as t, getAttributeListChanges as n } from "../../internal/utils/dom.js";
3
+ import { associateAriaDescribedBy as r, associateDataList as i, associateLabel as a, attachInternals as o } from "../../internal/utils/a11y.js";
4
+ import { typeSSR as s } from "../../internal/controllers/type-ssr.controller.js";
5
+ import { hostAttr as c } from "../../internal/decorators/host-attr.js";
6
+ import { useStyles as l } from "../../internal/styles/index.js";
7
+ import { __decorate as u } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
8
8
  import { inputQuery as d, setupControlStates as f, setupControlStatusStates as p, setupControlValidationStates as m } from "../utils/states.js";
9
9
  import { setupControlLayoutStates as h } from "../utils/layout.js";
10
10
  import g from "./control.global.js";
@@ -13,8 +13,8 @@ import { LitElement as v, html as y, isServer as b, nothing as x } from "lit";
13
13
  import { property as S } from "lit/decorators/property.js";
14
14
  //#region src/forms/control/control.ts
15
15
  var C = class extends v {
16
- constructor(...e) {
17
- super(...e), this.fitText = !1, this.fitContent = !1, this.#e = new s(this), this.i18n = this.#e.i18n, this.nveControl = "", this.#i = [], this._associateDatalist = !0, this.#a = () => {
16
+ constructor(...t) {
17
+ super(...t), this.fitText = !1, this.fitContent = !1, this.#e = new e(this), this.i18n = this.#e.i18n, this.nveControl = "", this.#i = [], this._associateDatalist = !0, this.#a = () => {
18
18
  this.#f(), this.input && this.#i.length === 0 && (this.#o(), this.#c());
19
19
  }, this.#s = () => {
20
20
  this.#f(), this.#p();
@@ -45,19 +45,19 @@ var C = class extends v {
45
45
  }
46
46
  #i;
47
47
  static {
48
- this.styles = u([_]);
48
+ this.styles = l([_]);
49
49
  }
50
50
  static {
51
51
  this.metadata = {
52
52
  tag: "nve-control",
53
- version: "0.2.2"
53
+ version: "0.2.3"
54
54
  };
55
55
  }
56
56
  render() {
57
57
  return this.nveControl === "inline" ? y`<div internal-host part="_internal-host"><div input part="_input"><slot interaction-state></slot></div><slot name="label" part="_label"></slot><slot name="messages" part="_messages"></slot></div>` : y`<div internal-host part="_internal-host"><slot name="label" part="_label"></slot><div input part="_input">${this.prefixContent}<slot></slot>${this.suffixContent}</div><slot name="messages" part="_messages"></slot></div>`;
58
58
  }
59
59
  connectedCallback() {
60
- super.connectedCallback(), a(this), e(this, g), this.shadowRoot.addEventListener("slotchange", this.#a);
60
+ super.connectedCallback(), o(this), t(this, g), this.shadowRoot.addEventListener("slotchange", this.#a);
61
61
  }
62
62
  disconnectedCallback() {
63
63
  super.disconnectedCallback(), this.shadowRoot.removeEventListener("slotchange", this.#a), this.shadowRoot.removeEventListener("slotchange", this.#s), this.fitText && this.input && (this.input.removeEventListener("input", this.#l), this.input.removeEventListener("change", this.#l)), this.#i.forEach((e) => e.disconnect()), this.#i.length = 0;
@@ -70,7 +70,7 @@ var C = class extends v {
70
70
  }));
71
71
  }
72
72
  #o() {
73
- m(this, this.#n), this.#i.push(...f(this), ...p(this, this.#n), h(this), t(this, ["hidden", "status"], () => this.#f())), this.#d(), this.#p(), this.shadowRoot.addEventListener("slotchange", this.#s);
73
+ m(this, this.#n), this.#i.push(...f(this), ...p(this, this.#n), h(this), n(this, ["hidden", "status"], () => this.#f())), this.#d(), this.#p(), this.shadowRoot.addEventListener("slotchange", this.#s);
74
74
  }
75
75
  #s;
76
76
  #c() {
@@ -90,7 +90,7 @@ var C = class extends v {
90
90
  this.input && (this.toggleAttribute("multiple", this.input?.multiple), this.input?.hasAttribute("size") ? this.setAttribute("size", "") : this.removeAttribute("size"));
91
91
  }
92
92
  #p() {
93
- this.#m(), i(this.#t, this.input), n(Array.from(this.#n), this.input), this._associateDatalist && r(this.querySelector("datalist"), this.input);
93
+ this.#m(), a(this.#t, this.input), r(Array.from(this.#n), this.input), this._associateDatalist && i(this.querySelector("datalist"), this.input);
94
94
  }
95
95
  #m() {
96
96
  let e = this.querySelector("label") || this.shadowRoot.querySelector("slot").assignedNodes({ flatten: !0 }).find((e) => e.tagName === "LABEL");
@@ -102,21 +102,21 @@ var C = class extends v {
102
102
  } catch {}
103
103
  }
104
104
  };
105
- o([S({ type: String })], C.prototype, "status", void 0), o([S({
105
+ u([S({ type: String })], C.prototype, "status", void 0), u([S({
106
106
  type: String,
107
107
  reflect: !0
108
- })], C.prototype, "layout", void 0), o([S({
108
+ })], C.prototype, "layout", void 0), u([S({
109
109
  type: Boolean,
110
110
  reflect: !0,
111
111
  attribute: "fit-text"
112
- })], C.prototype, "fitText", void 0), o([S({
112
+ })], C.prototype, "fitText", void 0), u([S({
113
113
  type: Boolean,
114
114
  reflect: !0,
115
115
  attribute: "fit-content"
116
- })], C.prototype, "fitContent", void 0), o([S({ type: Object })], C.prototype, "i18n", void 0), o([S({
116
+ })], C.prototype, "fitContent", void 0), u([S({ type: Object })], C.prototype, "i18n", void 0), u([S({
117
117
  type: String,
118
118
  reflect: !0
119
- })], C.prototype, "prominence", void 0), o([l({ attribute: "nve-control" })], C.prototype, "nveControl", void 0), C = o([c()], C);
119
+ })], C.prototype, "prominence", void 0), u([c({ attribute: "nve-control" })], C.prototype, "nveControl", void 0), C = u([s()], C);
120
120
  //#endregion
121
121
  export { C as Control };
122
122
 
@@ -1,6 +1,6 @@
1
1
  import { associateAriaDescribedBy as e, associateAriaLabel as t, associateControlGroup as n, attachInternals as r } from "../../internal/utils/a11y.js";
2
- import { __decorate as i } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
3
- import { useStyles as a } from "../../internal/styles/index.js";
2
+ import { useStyles as i } from "../../internal/styles/index.js";
3
+ import { __decorate as a } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
4
4
  import { inputQuery as o, setupControlGroupStates as s, setupControlStatusStates as c } from "../utils/states.js";
5
5
  import { setupControlLayoutStates as l } from "../utils/layout.js";
6
6
  import u from "./control-group.js";
@@ -19,12 +19,12 @@ var m = class extends d {
19
19
  }
20
20
  #t = [];
21
21
  static {
22
- this.styles = a([u]);
22
+ this.styles = i([u]);
23
23
  }
24
24
  static {
25
25
  this.metadata = {
26
26
  tag: "nve-control-group",
27
- version: "0.2.2"
27
+ version: "0.2.3"
28
28
  };
29
29
  }
30
30
  render() {
@@ -50,10 +50,10 @@ var m = class extends d {
50
50
  this.label && (this.label.slot = "label");
51
51
  }
52
52
  };
53
- i([p({
53
+ a([p({
54
54
  type: String,
55
55
  reflect: !0
56
- })], m.prototype, "layout", void 0), i([p({
56
+ })], m.prototype, "layout", void 0), a([p({
57
57
  type: String,
58
58
  reflect: !0
59
59
  })], m.prototype, "prominence", void 0);
@@ -1,7 +1,7 @@
1
- import { __decorate as e } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
2
- import { hostAttr as t } from "../../internal/decorators/host-attr.js";
3
- import { scopedRegistry as n } from "../../internal/decorators/scoped-registry.js";
4
- import { useStyles as r } from "../../internal/styles/index.js";
1
+ import { hostAttr as e } from "../../internal/decorators/host-attr.js";
2
+ import { scopedRegistry as t } from "../../internal/decorators/scoped-registry.js";
3
+ import { useStyles as n } from "../../internal/styles/index.js";
4
+ import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
5
5
  import { Icon as i } from "../../icon/icon2.js";
6
6
  import a from "./control-message.js";
7
7
  import { LitElement as o, html as s } from "lit";
@@ -18,12 +18,12 @@ var l = {
18
18
  super(...e), this.error = null, this.slot = "messages";
19
19
  }
20
20
  static {
21
- this.styles = r([a]);
21
+ this.styles = n([a]);
22
22
  }
23
23
  static {
24
24
  this.metadata = {
25
25
  tag: "nve-control-message",
26
- version: "0.2.2"
26
+ version: "0.2.3"
27
27
  };
28
28
  }
29
29
  static {
@@ -33,13 +33,13 @@ var l = {
33
33
  return s`<div internal-host><slot name="icon"><nve-icon part="icon" name="${this.error ? l.error : l[this.status]}"></nve-icon></slot><slot></slot></div>`;
34
34
  }
35
35
  };
36
- e([c({
36
+ r([c({
37
37
  type: String,
38
38
  reflect: !0
39
- })], u.prototype, "status", void 0), e([c({
39
+ })], u.prototype, "status", void 0), r([c({
40
40
  type: String,
41
41
  reflect: !0
42
- })], u.prototype, "error", void 0), e([t()], u.prototype, "slot", void 0), u = e([n()], u);
42
+ })], u.prototype, "error", void 0), r([e()], u.prototype, "slot", void 0), u = r([t()], u);
43
43
  //#endregion
44
44
  export { u as ControlMessage };
45
45
 
@@ -10,7 +10,7 @@ var a = class extends r {
10
10
  static {
11
11
  this.metadata = {
12
12
  tag: "nve-grid-cell",
13
- version: "0.2.2"
13
+ version: "0.2.3"
14
14
  };
15
15
  }
16
16
  render() {
@@ -1,19 +1,19 @@
1
1
  import { appendRootNodeStyle as e } from "../../internal/utils/dom.js";
2
2
  import { attachInternals as t } from "../../internal/utils/a11y.js";
3
- import { __decorate as n } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
4
- import { useStyles as r } from "../../internal/styles/index.js";
3
+ import { useStyles as n } from "../../internal/styles/index.js";
4
+ import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
5
5
  import i from "./column.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  import { property as s } from "lit/decorators/property.js";
8
8
  //#region src/grid/column/column.ts
9
- var c = class n extends a {
9
+ var c = class r extends a {
10
10
  static {
11
- this.styles = r([i]);
11
+ this.styles = n([i]);
12
12
  }
13
13
  static {
14
14
  this.metadata = {
15
15
  tag: "nve-grid-column",
16
- version: "0.2.2"
16
+ version: "0.2.3"
17
17
  };
18
18
  }
19
19
  get #e() {
@@ -50,7 +50,7 @@ var c = class n extends a {
50
50
  this.#n ? this.#n.replaceSync(i) : this.#n = e(this.#e, i), this.setAttribute(t, "");
51
51
  }
52
52
  #i() {
53
- let e = Array.from(this.parentElement.querySelectorAll(n.metadata.tag)), t = e.slice(e.indexOf(this) + 1, e.length), r = this.getBoundingClientRect(), i = this.#e.getBoundingClientRect(), a = this.offsetLeft < i.width / 2 ? "left" : "right", o = r.left - i.left, s = t.reduce((e, t) => e + t.getBoundingClientRect().width, 0), c = `[id='${this.#e.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),
53
+ let e = Array.from(this.parentElement.querySelectorAll(r.metadata.tag)), t = e.slice(e.indexOf(this) + 1, e.length), n = this.getBoundingClientRect(), i = this.#e.getBoundingClientRect(), a = this.offsetLeft < i.width / 2 ? "left" : "right", o = n.left - i.left, s = t.reduce((e, t) => e + t.getBoundingClientRect().width, 0), c = `[id='${this.#e.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),
54
54
  [id='${this.#e.id}'] nve-grid-cell:nth-of-type(${this.ariaColIndex})`;
55
55
  return {
56
56
  side: a,
@@ -81,17 +81,17 @@ var c = class n extends a {
81
81
  }`);
82
82
  }
83
83
  };
84
- n([s({
84
+ r([s({
85
85
  type: String,
86
86
  reflect: !0
87
- })], c.prototype, "width", void 0), n([s({
87
+ })], c.prototype, "width", void 0), r([s({
88
88
  type: String,
89
89
  reflect: !0
90
- })], c.prototype, "position", void 0), n([s({
90
+ })], c.prototype, "position", void 0), r([s({
91
91
  type: String,
92
92
  reflect: !0,
93
93
  attribute: "column-align"
94
- })], c.prototype, "columnAlign", void 0), n([s({
94
+ })], c.prototype, "columnAlign", void 0), r([s({
95
95
  type: String,
96
96
  reflect: !0,
97
97
  attribute: "aria-colindex"
@@ -1,7 +1,7 @@
1
1
  import { attachInternals as e } from "../../internal/utils/a11y.js";
2
- import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
3
- import { hostAttr as n } from "../../internal/decorators/host-attr.js";
4
- import { useStyles as r } from "../../internal/styles/index.js";
2
+ import { hostAttr as t } from "../../internal/decorators/host-attr.js";
3
+ import { useStyles as n } from "../../internal/styles/index.js";
4
+ import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
5
5
  import i from "./footer.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  //#region src/grid/footer/footer.ts
@@ -10,12 +10,12 @@ var s = class extends a {
10
10
  super(...e), this.slot = "footer";
11
11
  }
12
12
  static {
13
- this.styles = r([i]);
13
+ this.styles = n([i]);
14
14
  }
15
15
  static {
16
16
  this.metadata = {
17
17
  tag: "nve-grid-footer",
18
- version: "0.2.2"
18
+ version: "0.2.3"
19
19
  };
20
20
  }
21
21
  static {
@@ -28,7 +28,7 @@ var s = class extends a {
28
28
  super.connectedCallback(), e(this), this._internals.role = "row";
29
29
  }
30
30
  };
31
- t([n()], s.prototype, "slot", void 0);
31
+ r([t()], s.prototype, "slot", void 0);
32
32
  //#endregion
33
33
  export { s as GridFooter };
34
34
 
@@ -1,9 +1,9 @@
1
- import { appendRootNodeStyle as e, generateId as t } from "../internal/utils/dom.js";
2
- import { attachInternals as n } from "../internal/utils/a11y.js";
3
- import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
4
- import { audit as i } from "../internal/controllers/audit.controller.js";
5
- import { keyNavigationGrid as a } from "../internal/controllers/keynav-grid.controller.js";
6
- import { useStyles as o } from "../internal/styles/index.js";
1
+ import { audit as e } from "../internal/controllers/audit.controller.js";
2
+ import { appendRootNodeStyle as t, generateId as n } from "../internal/utils/dom.js";
3
+ import { keyNavigationGrid as r } from "../internal/controllers/keynav-grid.controller.js";
4
+ import { attachInternals as i } from "../internal/utils/a11y.js";
5
+ import { useStyles as a } from "../internal/styles/index.js";
6
+ import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
7
7
  import { GridPlaceholder as s } from "./placeholder/placeholder2.js";
8
8
  import { GridColumn as c } from "./column/column2.js";
9
9
  import { GridCell as l } from "./cell/cell2.js";
@@ -17,12 +17,12 @@ import { property as _ } from "lit/decorators/property.js";
17
17
  //#region src/grid/grid.ts
18
18
  var v = class extends h {
19
19
  static {
20
- this.styles = o([p]);
20
+ this.styles = a([p]);
21
21
  }
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-grid",
25
- version: "0.2.2",
25
+ version: "0.2.3",
26
26
  children: [
27
27
  u.metadata.tag,
28
28
  d.metadata.tag,
@@ -57,19 +57,19 @@ var v = class extends h {
57
57
  return g`<div internal-host><div part="_scrollbox"><slot></slot></div><slot name="footer"></slot></div>`;
58
58
  }
59
59
  connectedCallback() {
60
- super.connectedCallback(), n(this), this._internals.role = "grid", this.id ||= t(), e(this, m);
60
+ super.connectedCallback(), i(this), this._internals.role = "grid", this.id ||= n(), t(this, m);
61
61
  }
62
62
  async scrollTo(...e) {
63
63
  await this.shadowRoot.querySelector("[part=\"_scrollbox\"]")?.scrollTo(...e);
64
64
  }
65
65
  };
66
- r([_({
66
+ o([_({
67
67
  type: String,
68
68
  reflect: !0
69
- })], v.prototype, "container", void 0), r([_({
69
+ })], v.prototype, "container", void 0), o([_({
70
70
  type: Boolean,
71
71
  reflect: !0
72
- })], v.prototype, "stripe", void 0), v = r([i(), a()], v);
72
+ })], v.prototype, "stripe", void 0), v = o([e(), r()], v);
73
73
  //#endregion
74
74
  export { v as Grid };
75
75