@4sh/ui-kit 0.8.0 → 0.10.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 (143) hide show
  1. package/README.fr.md +11 -10
  2. package/README.md +11 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +3 -3
  4. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +4 -4
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  6. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +4 -4
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  8. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +3 -3
  9. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +6 -6
  10. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +340 -16
  11. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  12. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +5 -5
  13. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  14. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +5 -5
  15. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  16. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +10 -82
  17. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  18. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +4 -4
  19. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  20. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +4 -4
  21. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  22. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +8 -8
  23. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  24. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +179 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -0
  26. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +7 -7
  27. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  28. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +5 -5
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +5 -5
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +5 -5
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +5 -5
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  36. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +4 -4
  37. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  38. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +4 -4
  39. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  40. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +4 -4
  41. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  42. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +4 -4
  43. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  44. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +4 -4
  45. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  46. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +4 -4
  47. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  48. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +5 -5
  49. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  50. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +4 -4
  51. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  52. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +4 -4
  53. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  54. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +4 -4
  55. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  56. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +5 -5
  57. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  58. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +215 -0
  59. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -0
  60. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +5 -5
  61. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  62. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +4 -4
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  64. package/fesm2022/4sh-ui-kit-forms.mjs +105 -7
  65. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  66. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +13 -13
  67. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  68. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +4 -4
  69. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  70. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +3 -3
  71. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +4 -4
  72. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +4 -4
  74. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +4 -4
  76. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +10 -10
  78. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +4 -4
  80. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +4 -4
  82. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +4 -4
  84. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +4 -4
  86. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +3 -3
  88. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +4 -4
  89. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  90. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +4 -4
  91. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  92. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +10 -10
  93. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  94. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +45 -26
  95. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  96. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +605 -0
  97. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -0
  98. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +16 -16
  99. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  100. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +5 -29
  101. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  102. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +5 -29
  103. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  104. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +4 -4
  105. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  106. package/fesm2022/4sh-ui-kit-motion.mjs +3 -3
  107. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +12 -12
  108. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +4 -4
  110. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +3 -3
  112. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +4 -4
  113. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  114. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +12 -36
  115. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  116. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -22
  117. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  118. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +20 -20
  119. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  120. package/fesm2022/4sh-ui-kit-overlay.mjs +60 -2
  121. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  122. package/fesm2022/4sh-ui-kit-ripple.mjs +9 -9
  123. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +4 -4
  124. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +34 -34
  126. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-theming.mjs +6 -6
  128. package/mcp/data/text-search-docs.json +486 -66
  129. package/mcp/data/ui-config.json +26605 -12458
  130. package/mcp/package.json +1 -1
  131. package/package.json +13 -1
  132. package/styles/component-vars.scss +1440 -721
  133. package/styles/settings/_ui-config.scss +45 -2
  134. package/styles/utils/_mixins.scss +32 -30
  135. package/styles/utils/_overlay.scss +1 -1
  136. package/types/4sh-ui-kit-base-ui-image.d.ts +151 -6
  137. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +3 -1
  138. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +110 -0
  139. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +114 -0
  140. package/types/4sh-ui-kit-forms.d.ts +43 -1
  141. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +4 -4
  142. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +256 -0
  143. package/types/4sh-ui-kit-overlay.d.ts +35 -1
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-forms-ui-file-upload.mjs","sources":["../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.model.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.html","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.html","../../../projects/ui-kit/forms/ui-file-upload/src/public-api.ts","../../../projects/ui-kit/forms/ui-file-upload/src/4sh-ui-kit-forms-ui-file-upload.ts"],"sourcesContent":["// =====================================================================\n// Shared model for ui-file-upload and its file-row (ui-file-upload-list).\n// =====================================================================\n\n/** Lifecycle of a selected file. */\nexport type UiUploadStatus = 'pending' | 'uploading' | 'completed' | 'error';\n\n/** A file selected in the uploader, plus its upload/validation state. */\nexport interface UiUploadFile {\n /** Stable id for tracking (kept across re-renders). */\n readonly id: string;\n /** The underlying browser File. */\n readonly file: File;\n /** File name (from the File, exposed for template convenience). */\n readonly name: string;\n /** Size in bytes. */\n readonly size: number;\n /** MIME type reported by the browser. */\n readonly type: string;\n /** Current lifecycle state. */\n status: UiUploadStatus;\n /** Upload progress, 0–100 (meaningful while `status === 'uploading'`). */\n progress: number;\n /** Object URL for image previews — MUST be revoked when the file is removed. */\n objectUrl?: string;\n /** Validation or upload error message, when `status === 'error'`. */\n error?: string;\n}\n\n/** Payload for the custom upload handler (customUpload = true). */\nexport interface UiUploadHandlerEvent {\n /** Files awaiting upload (status `pending`). */\n files: UiUploadFile[];\n /** Marks a file as uploaded (sets status `completed`, progress 100). */\n markUploaded: (file: UiUploadFile) => void;\n /** Marks a file as failed with an optional message. */\n markError: (file: UiUploadFile, message?: string) => void;\n /** Updates a file's progress (0–100). */\n setProgress: (file: UiUploadFile, progress: number) => void;\n}\n\n/** Emitted when files finish uploading (built-in uploader). */\nexport interface UiUploadEvent {\n files: UiUploadFile[];\n /** Raw XHR of the last request (built-in uploader only). */\n xhr?: XMLHttpRequest;\n}\n\n/** Emitted on a validation or upload error. */\nexport interface UiUploadErrorEvent {\n file: UiUploadFile;\n /** 'type' | 'size' | 'limit' | 'upload'. */\n reason: 'type' | 'size' | 'limit' | 'upload';\n message: string;\n}\n\n/** Human-readable file size (e.g. \"2.5 MB\"). Base-1024. */\nexport function formatFileSize(bytes: number): string {\n if (!bytes || bytes < 0) return '0 B';\n const k = 1024;\n const units = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), units.length - 1);\n const value = bytes / Math.pow(k, i);\n const rounded = Math.round(value * 10) / 10;\n return `${rounded} ${units[i]}`;\n}\n\n/**\n * Whether a File matches an `accept` string (e.g. \"image/*,.pdf\").\n * Empty/absent accept means everything is allowed.\n */\nexport function isFileTypeAccepted(file: File, accept: string | undefined): boolean {\n if (!accept) return true;\n const patterns = accept\n .split(',')\n .map((t) => t.trim().toLowerCase())\n .filter(Boolean);\n if (!patterns.length) return true;\n\n const name = file.name.toLowerCase();\n const mime = (file.type || '').toLowerCase();\n\n return patterns.some((pattern) => {\n if (pattern.startsWith('.')) return name.endsWith(pattern); // extension\n if (pattern.endsWith('/*')) return mime.startsWith(pattern.slice(0, -1)); // \"image/\"\n return mime === pattern; // exact mime\n });\n}\n\n/** Whether a File is a previewable image. */\nexport function isImageFile(file: File): boolean {\n return /^image\\//.test(file.type);\n}\n","import { booleanAttribute, Component, computed, input, output } from '@angular/core';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';\nimport { formatFileSize, UiUploadFile } from './ui-file-upload.model';\nimport { formatLabel } from '@4sh/ui-kit/forms';\n\nexport type UiFileUploadListSize = 'default' | 'small';\n\n/**\n * ui-file-upload-list — a single file row (the repeatable unit of an upload list).\n *\n * Presentational: shows a leading thumbnail (for images) or file icon, the file\n * name + size/status, and a remove button. While the file is uploading it swaps\n * the leading icon for a `ui-spinner` and reveals a slim progress bar.\n *\n * Named to mirror the Figma component; the uploader stacks one row per file.\n */\n@Component({\n selector: 'ui-file-upload-list',\n imports: [UiIcon, UiSpinner],\n templateUrl: './ui-file-upload-list.html',\n styleUrl: './ui-file-upload-list.scss',\n})\nexport class UiFileUploadList {\n /** The file to display (name/size/status/progress/preview). */\n file = input.required<UiUploadFile>();\n size = input<UiFileUploadListSize>('default');\n /** FontAwesome icon for non-image files. */\n icon = input<string>('file');\n /** Whether the remove button is shown. */\n removable = input(true, { transform: booleanAttribute });\n /** Accessible name of the remove button (raw text — the file name is appended in the template). */\n removeAriaLabel = input<string>('Supprimer le fichier');\n /** Fallback error text when the file carries no message. */\n failedLabel = input<string>('Échec');\n /** Accessible name of the upload spinner — `{0}` is the file name. */\n uploadingLabel = input<string>('Téléversement de {0}');\n /** Accessible name of the progress bar — `{0}` is the file name. */\n progressLabel = input<string>('Progression du téléversement de {0}');\n\n /** Emitted when the remove button is activated. */\n remove = output<UiUploadFile>();\n\n /** @ignore Formatted size (e.g. \"2.5 MB\"). */\n protected readonly sizeLabel = computed(() => formatFileSize(this.file().size));\n\n /** @ignore Accessible name of the upload spinner (`{0}` filled with the file name). */\n protected readonly uploadingAriaLabel = computed(() =>\n formatLabel(this.uploadingLabel(), this.file().name),\n );\n\n /** @ignore Accessible name of the progress bar (`{0}` filled with the file name). */\n protected readonly progressAriaLabel = computed(() =>\n formatLabel(this.progressLabel(), this.file().name),\n );\n\n /** @ignore Uploading in progress → show the spinner + progress bar. */\n protected readonly isUploading = computed(() => this.file().status === 'uploading');\n\n /** @ignore Error state → surface the message + error styling. */\n protected readonly isError = computed(() => this.file().status === 'error');\n\n /** @ignore Image with a usable preview URL → render a thumbnail. */\n protected readonly thumbnail = computed(() => this.file().objectUrl ?? null);\n\n /** @ignore Secondary line: error message, else size (+ status hint). */\n protected readonly infoLabel = computed(() => {\n const f = this.file();\n if (f.status === 'error') return f.error ?? this.failedLabel();\n if (f.status === 'uploading') return `${this.sizeLabel()} · ${Math.round(f.progress)} %`;\n return this.sizeLabel();\n });\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload-list'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isError()) c.push('_error');\n if (this.thumbnail()) c.push('_has-thumb');\n return c.join(' ');\n });\n\n /** @ignore */\n protected onRemove(): void {\n this.remove.emit(this.file());\n }\n}\n","<div [class]=\"classes()\">\n <div class=\"ui-file-upload-list-file\">\n <span class=\"ui-file-upload-list-media\">\n @if (isUploading()) {\n <ui-spinner size=\"small\" [ariaLabel]=\"uploadingAriaLabel()\" />\n } @else if (thumbnail(); as src) {\n <img class=\"ui-file-upload-list-thumb\" [src]=\"src\" alt=\"\" />\n } @else {\n <ui-icon [name]=\"isError() ? 'triangle-exclamation' : icon()\" [size]=\"iconSize()\" />\n }\n </span>\n\n <span class=\"ui-file-upload-list-infos\">\n <span class=\"ui-file-upload-list-name\" [title]=\"file().name\">{{ file().name }}</span>\n <span class=\"ui-file-upload-list-meta\">{{ infoLabel() }}</span>\n </span>\n </div>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"ui-file-upload-list-remove\"\n [attr.aria-label]=\"removeAriaLabel() + ' : ' + file().name\"\n (click)=\"onRemove()\"\n >\n <ui-icon name=\"trash\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (isUploading()) {\n <div\n class=\"ui-file-upload-list-progress\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"file().progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"progressAriaLabel()\"\n >\n <span class=\"ui-file-upload-list-progress-bar\" [style.width.%]=\"file().progress\"></span>\n </div>\n }\n</div>\n","import {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiButton } from '@4sh/ui-kit/actions/ui-button';\nimport { UiFileUploadList } from './ui-file-upload-list';\nimport { formatLabel } from '@4sh/ui-kit/forms';\nimport {\n isFileTypeAccepted,\n isImageFile,\n UiUploadErrorEvent,\n UiUploadEvent,\n UiUploadFile,\n UiUploadHandlerEvent,\n} from './ui-file-upload.model';\n\nexport type UiFileUploadMode = 'field' | 'drag';\nexport type UiFileUploadSize = 'default' | 'small';\n\nlet nextUploadId = 0;\nlet nextInstanceId = 0;\n\n/**\n * ui-file-upload — headless file uploader (field + drag-and-drop).\n *\n * A native `<input type=\"file\">` (visually hidden) drives selection, so the OS\n * picker, keyboard and screen readers work natively; the whole component is also\n * a drop target. Selection is validated client-side (type / size / count) and\n * files can be uploaded automatically (`auto`), on demand, or via a custom\n * handler (`customUpload`). Progress is tracked with `XMLHttpRequest` so no\n * global HTTP provider is required.\n *\n * Security notes: client-side validation is a UX convenience — always re-validate\n * server-side. Image previews use object URLs that are revoked on removal/clear.\n */\n@Component({\n selector: 'ui-file-upload',\n imports: [NgTemplateOutlet, UiIcon, UiButton, UiFileUploadList],\n templateUrl: './ui-file-upload.html',\n styleUrl: './ui-file-upload.scss',\n})\nexport class UiFileUpload {\n // --- Layout ----------------------------------------------------------\n /** `field` = compact input + Browse button; `drag` = full drop zone. */\n mode = input<UiFileUploadMode>('field');\n size = input<UiFileUploadSize>('default');\n\n // --- Selection -------------------------------------------------------\n /** Native input `name` (submitted with a surrounding form). */\n name = input<string>();\n /** Allow selecting more than one file. */\n multiple = input(false, { transform: booleanAttribute });\n /** Ripple Effect */\n ripple = input(true, { transform: booleanAttribute });\n /** Native `accept` filter, e.g. \"image/*,.pdf\". Also enforced on drop. */\n accept = input<string>();\n /** Max size per file, in bytes. */\n maxFileSize = input<number, unknown>(undefined, { transform: numberAttribute });\n /** Max number of files kept at once. */\n fileLimit = input<number, unknown>(undefined, { transform: numberAttribute });\n disabled = input(false, { transform: booleanAttribute });\n\n // --- Upload behaviour ------------------------------------------------\n /** Upload each file as soon as it is selected. */\n auto = input(false, { transform: booleanAttribute });\n /** Delegate uploading to the `uploadHandler` output instead of the built-in XHR. */\n customUpload = input(false, { transform: booleanAttribute });\n /** Endpoint for the built-in uploader. */\n url = input<string>();\n /** HTTP method for the built-in uploader. */\n method = input<'post' | 'put'>('post');\n /** Field name used for each file in the multipart body. */\n fieldName = input<string>('files');\n /** Send credentials (cookies) with the built-in upload request. */\n withCredentials = input(false, { transform: booleanAttribute });\n\n // --- Presentation / labels ------------------------------------------\n /** Show the file list under the control. */\n showFileList = input(true, { transform: booleanAttribute });\n /** Show the Upload/Cancel toolbar buttons (drag mode). */\n showControls = input(true, { transform: booleanAttribute });\n browseLabel = input<string>('Parcourir');\n /** Placeholder shown in field mode before any selection. */\n chooseLabel = input<string>('Choisir un fichier…');\n uploadLabel = input<string>('Téléverser');\n cancelLabel = input<string>('Effacer');\n /** Drag-zone link + prompt. */\n dragLinkLabel = input<string>('Cliquer pour téléverser');\n dragPromptLabel = input<string>('ou glisser-déposer les fichiers ici');\n /** Small hint under the drag prompt (e.g. \"JPG, PNG (max 5 MB)\"). */\n hint = input<string>();\n /** Accessible name for the whole control. */\n // Composite widget (dropzone + file list), not a single-value CVA control: unlike the other\n // form components it doesn't extend BaseFieldControl, so it redeclares its own `ariaLabel`\n // here — with a non-undefined default, since the dropzone always needs an accessible name.\n ariaLabel = input<string>('Téléversement de fichiers');\n /** Multi-file summary in field mode — `{0}` is replaced by the file count. */\n filesSummaryLabel = input<string>('{0} fichiers');\n /** Rejection message: file type not accepted — `{0}` is the file name. */\n invalidTypeMessage = input<string>('Type de fichier non autorisé : {0}');\n /** Rejection message: file too large — `{0}` is the file name. */\n invalidSizeMessage = input<string>('Fichier trop volumineux : {0}');\n /** Rejection message: `fileLimit` reached — `{0}` is the limit. */\n limitReachedMessage = input<string>('Nombre maximum de fichiers atteint ({0}).');\n /** Error shown when an upload fails without a server message. */\n uploadErrorMessage = input<string>('Échec du téléversement');\n /** Error shown when the upload request fails at the network level. */\n networkErrorMessage = input<string>('Erreur réseau');\n /** Error shown on a non-2xx response — `{0}` is the HTTP status. */\n httpErrorMessage = input<string>('Erreur {0}');\n\n // --- Templates (drag/advanced) --------------------------------------\n /** Overrides a single file row (context: `{ $implicit: UiUploadFile, remove }`). */\n fileTemplate = input<TemplateRef<unknown>>();\n /** Overrides the content section (context: `{ $implicit: UiUploadFile[], remove, clear }`). */\n contentTemplate = input<TemplateRef<unknown>>();\n /** Custom toolbar content (context: `{ $implicit: UiUploadFile[], choose, upload, clear }`). */\n toolbarTemplate = input<TemplateRef<unknown>>();\n\n // --- Outputs ---------------------------------------------------------\n /** Files added to the selection (validated). */\n selected = output<UiUploadFile[]>();\n /** The full current selection changed. */\n filesChange = output<UiUploadFile[]>();\n /** A custom upload was requested (customUpload = true). */\n uploadHandler = output<UiUploadHandlerEvent>();\n /** Built-in upload completed for a batch. */\n uploaded = output<UiUploadEvent>();\n /** A file failed validation or upload. */\n uploadError = output<UiUploadErrorEvent>();\n /** A file was removed. */\n removed = output<UiUploadFile>();\n /** The selection was cleared. */\n cleared = output<void>();\n\n /** @ignore Stable id linking the visible label(s) to the native input. */\n protected readonly inputId = `ui-file-upload-${nextInstanceId++}`;\n\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly fileInput = viewChild.required<ElementRef<HTMLInputElement>>('fileInput');\n\n /** In-flight requests, keyed by file id, so we can abort. */\n private readonly requests = new Map<string, XMLHttpRequest>();\n\n /** @ignore Current selection. */\n private readonly selection = signal<UiUploadFile[]>([]);\n /** Read-only view of the current files. */\n readonly files = this.selection.asReadonly();\n\n /** @ignore Drop-zone highlight while dragging over. */\n protected readonly dragging = signal(false);\n /** @ignore Transient validation messages (rendered in a live region). */\n protected readonly messages = signal<string[]>([]);\n\n constructor() {\n // Revoke every object URL when the component is destroyed (no leaks).\n this.destroyRef.onDestroy(() => {\n for (const f of this.selection()) this.revoke(f);\n for (const xhr of this.requests.values()) xhr.abort();\n });\n\n // A11y safeguard: the control needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel()) {\n console.warn('[ui-file-upload] Provide `ariaLabel` to name the control.');\n }\n });\n }\n }\n\n /** @ignore */\n protected readonly hasFiles = computed(() => this.selection().length > 0);\n /** @ignore */\n protected readonly pending = computed(() =>\n this.selection().filter((f) => f.status === 'pending'),\n );\n /** @ignore Single-file summary shown in field mode. */\n protected readonly fieldSummary = computed(() => {\n const files = this.selection();\n if (!files.length) return this.chooseLabel();\n if (files.length === 1) return files[0].name;\n return formatLabel(this.filesSummaryLabel(), files.length);\n });\n /** @ignore */\n protected readonly canUpload = computed(\n () => !this.disabled() && this.pending().length > 0 && (this.customUpload() || !!this.url()),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload', `_${this.mode()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.dragging()) c.push('_dragging');\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n\n // --- Bound refs for custom templates (stable identities) -------------\n /** @ignore */ protected readonly removeFn = (f: UiUploadFile): void => this.remove(f);\n /** @ignore */ protected readonly clearFn = (): void => this.clear();\n /** @ignore */ protected readonly chooseFn = (): void => this.choose();\n /** @ignore */ protected readonly uploadFn = (): void => this.upload();\n\n // --- Public API ------------------------------------------------------\n\n /** Opens the native file picker. */\n choose(): void {\n if (this.disabled()) return;\n this.fileInput().nativeElement.click();\n }\n\n /** Uploads all pending files (built-in XHR, or emits `uploadHandler`). */\n upload(): void {\n const pending = this.pending();\n if (!pending.length) return;\n\n if (this.customUpload()) {\n this.emitCustomUpload(pending);\n return;\n }\n const endpoint = this.url();\n if (!endpoint) return;\n for (const f of pending) this.xhrUpload(f, endpoint);\n }\n\n /** Removes a file (aborts its upload, revokes its preview). */\n remove(target: UiUploadFile): void {\n this.requests.get(target.id)?.abort();\n this.requests.delete(target.id);\n this.revoke(target);\n this.selection.update((files) => files.filter((f) => f.id !== target.id));\n this.removed.emit(target);\n this.filesChange.emit(this.selection());\n }\n\n /** Clears the whole selection. */\n clear(): void {\n for (const xhr of this.requests.values()) xhr.abort();\n this.requests.clear();\n for (const f of this.selection()) this.revoke(f);\n this.selection.set([]);\n this.messages.set([]);\n this.resetInput();\n this.cleared.emit();\n this.filesChange.emit([]);\n }\n\n // --- Native input / drop --------------------------------------------\n\n /** @ignore */\n protected onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.ingest(input.files);\n // Reset so selecting the same file again re-triggers `change`.\n this.resetInput();\n }\n\n /** @ignore */\n protected onDragOver(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(true);\n }\n\n /** @ignore */\n protected onDragLeave(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n // Ignore leave events bubbling from children still inside the zone.\n if (this.host.nativeElement.contains(event.relatedTarget as Node)) return;\n this.dragging.set(false);\n }\n\n /** @ignore */\n protected onDrop(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(false);\n this.ingest(event.dataTransfer?.files ?? null);\n }\n\n // --- Internals -------------------------------------------------------\n\n /** Validate + add a FileList to the selection. */\n private ingest(list: FileList | null): void {\n if (!list || !list.length || this.disabled()) return;\n\n const incoming = Array.from(list);\n const added: UiUploadFile[] = [];\n const newMessages: string[] = [];\n const limit = this.fileLimit();\n const maxSize = this.maxFileSize();\n\n for (const file of incoming) {\n // Single-file mode: the new file replaces the current one, so only cap the incoming batch.\n if (!this.multiple() && added.length >= 1) break;\n\n const item = this.toUploadFile(file);\n\n if (!isFileTypeAccepted(file, this.accept())) {\n this.fail(item, 'type', formatLabel(this.invalidTypeMessage(), file.name), newMessages);\n continue;\n }\n if (maxSize != null && file.size > maxSize) {\n this.fail(item, 'size', formatLabel(this.invalidSizeMessage(), file.name), newMessages);\n continue;\n }\n if (\n limit != null &&\n (this.multiple() ? this.selection().length : 0) + added.length >= limit\n ) {\n this.fail(item, 'limit', formatLabel(this.limitReachedMessage(), limit), newMessages);\n continue;\n }\n added.push(item);\n }\n\n this.messages.set(newMessages);\n if (!added.length) return;\n\n if (!this.multiple()) {\n // Replacement: release resources held by the previous selection.\n for (const previous of this.selection()) {\n this.requests.get(previous.id)?.abort();\n this.requests.delete(previous.id);\n this.revoke(previous);\n }\n }\n this.selection.update((files) => (this.multiple() ? [...files, ...added] : added));\n this.selected.emit(added);\n this.filesChange.emit(this.selection());\n\n if (this.auto()) this.upload();\n }\n\n private toUploadFile(file: File): UiUploadFile {\n return {\n id: `uifu-${nextUploadId++}`,\n file,\n name: file.name,\n size: file.size,\n type: file.type,\n status: 'pending',\n progress: 0,\n objectUrl: isImageFile(file) ? URL.createObjectURL(file) : undefined,\n };\n }\n\n private fail(\n item: UiUploadFile,\n reason: UiUploadErrorEvent['reason'],\n message: string,\n sink: string[],\n ): void {\n this.revoke(item);\n sink.push(message);\n this.uploadError.emit({ file: { ...item, status: 'error', error: message }, reason, message });\n }\n\n /** Mutates one file in place (immutably) and pushes a new array reference. */\n private patch(id: string, changes: Partial<UiUploadFile>): void {\n this.selection.update((files) => files.map((f) => (f.id === id ? { ...f, ...changes } : f)));\n }\n\n private emitCustomUpload(pending: UiUploadFile[]): void {\n for (const f of pending) this.patch(f.id, { status: 'uploading', progress: 0 });\n this.uploadHandler.emit({\n files: pending,\n setProgress: (file, progress) =>\n this.patch(file.id, {\n status: 'uploading',\n progress: Math.max(0, Math.min(100, progress)),\n }),\n markUploaded: (file) => {\n this.patch(file.id, { status: 'completed', progress: 100 });\n this.filesChange.emit(this.selection());\n },\n markError: (file, msg) => {\n this.patch(file.id, { status: 'error', error: msg ?? this.uploadErrorMessage() });\n this.uploadError.emit({\n file,\n reason: 'upload',\n message: msg ?? this.uploadErrorMessage(),\n });\n },\n });\n }\n\n private xhrUpload(item: UiUploadFile, endpoint: string): void {\n const xhr = new XMLHttpRequest();\n this.requests.set(item.id, xhr);\n this.patch(item.id, { status: 'uploading', progress: 0 });\n\n const body = new FormData();\n body.append(this.fieldName(), item.file, item.name);\n\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable)\n this.patch(item.id, { progress: Math.round((e.loaded / e.total) * 100) });\n });\n xhr.addEventListener('load', () => {\n this.requests.delete(item.id);\n if (xhr.status >= 200 && xhr.status < 300) {\n this.patch(item.id, { status: 'completed', progress: 100 });\n this.uploaded.emit({ files: [item], xhr });\n this.filesChange.emit(this.selection());\n } else {\n this.uploadFailed(item, formatLabel(this.httpErrorMessage(), xhr.status));\n }\n });\n xhr.addEventListener('error', () => this.uploadFailed(item, this.networkErrorMessage()));\n xhr.addEventListener('abort', () => this.requests.delete(item.id));\n\n xhr.open(this.method().toUpperCase(), endpoint, true);\n xhr.withCredentials = this.withCredentials();\n xhr.send(body);\n }\n\n private uploadFailed(item: UiUploadFile, message: string): void {\n this.requests.delete(item.id);\n this.patch(item.id, { status: 'error', error: message });\n this.uploadError.emit({ file: item, reason: 'upload', message });\n }\n\n private revoke(file: UiUploadFile): void {\n if (file.objectUrl) URL.revokeObjectURL(file.objectUrl);\n }\n\n private resetInput(): void {\n const el = this.fileInput().nativeElement;\n if (el) el.value = '';\n }\n}\n","<div\n [class]=\"classes()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <!-- Real native control (visually hidden, keeps keyboard + screen-reader support) -->\n <input\n #fileInput\n class=\"ui-file-upload-input\"\n type=\"file\"\n [id]=\"inputId\"\n [attr.name]=\"name()\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n @if (mode() === 'field') {\n <!-- Field mode: compact summary + Browse trigger (whole label opens picker) -->\n <label class=\"ui-file-upload-field\" [attr.for]=\"inputId\" [attr.data-ripple]=\"ripple() ? 'on' : 'off'\">\n <span class=\"ui-file-upload-field-text\" [class._placeholder]=\"!hasFiles()\">{{\n fieldSummary()\n }}</span>\n <span class=\"ui-file-upload-browse\" aria-hidden=\"true\">{{ browseLabel() }}</span>\n </label>\n } @else {\n <!-- Drag mode: full drop zone -->\n <label class=\"ui-file-upload-zone\" [attr.for]=\"inputId\" [attr.data-ripple]=\"ripple() ? 'on' : 'off'\">\n <ui-icon class=\"ui-file-upload-zone-icon\" name=\"cloud-arrow-up\" size=\"lg\" />\n <span class=\"ui-file-upload-zone-content\">\n <span class=\"ui-file-upload-zone-title\">\n <span class=\"ui-file-upload-zone-link\">{{ dragLinkLabel() }}</span>\n <span class=\"ui-file-upload-zone-prompt\">{{ dragPromptLabel() }}</span>\n </span>\n @if (hint(); as h) {\n <span class=\"ui-file-upload-zone-hint\">{{ h }}</span>\n }\n </span>\n </label>\n\n <!-- Toolbar (custom, or default Upload/Clear actions) -->\n @if (toolbarTemplate(); as tpl) {\n <div class=\"ui-file-upload-toolbar\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: files(),\n choose: chooseFn,\n upload: uploadFn,\n clear: clearFn,\n }\"\n />\n </div>\n } @else if (showControls() && hasFiles()) {\n <div class=\"ui-file-upload-toolbar\">\n @if (!auto()) {\n <ui-button\n [ripple]=\"ripple()\"\n [label]=\"uploadLabel()\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"cloud-arrow-up\"\n [disabled]=\"!canUpload()\"\n (buttonClick)=\"upload()\"\n />\n }\n <ui-button\n [ripple]=\"ripple()\"\n [label]=\"cancelLabel()\"\n level=\"low\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"xmark\"\n (buttonClick)=\"clear()\"\n />\n </div>\n }\n }\n\n <!-- Content section: the file list -->\n @if (contentTemplate(); as tpl) {\n <div class=\"ui-file-upload-content\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: files(), remove: removeFn, clear: clearFn }\"\n />\n </div>\n } @else if (showFileList() && hasFiles()) {\n <ul class=\"ui-file-upload-content\" role=\"list\">\n @for (f of files(); track f.id) {\n <li>\n @if (fileTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: f, remove: removeFn }\"\n />\n } @else {\n <ui-file-upload-list [file]=\"f\" [size]=\"size()\" (remove)=\"remove($event)\" />\n }\n </li>\n }\n </ul>\n }\n\n <!-- Validation messages (assertive live region) -->\n @if (messages().length) {\n <div class=\"ui-file-upload-messages\" role=\"alert\" aria-live=\"assertive\">\n @for (msg of messages(); track msg) {\n <p class=\"ui-file-upload-message\">{{ msg }}</p>\n }\n </div>\n }\n</div>\n","/*\n * Public API Surface of ui-kit/ui-file-upload\n *\n * Includes `ui-file-upload-list`: it renders the upload's own file model,\n * so the two live in one entry point (a separate one would be a cycle).\n */\n\nexport * from './lib/ui-file-upload-list';\nexport * from './lib/ui-file-upload.model';\nexport * from './lib/ui-file-upload';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AAsDA;AACM,SAAU,cAAc,CAAC,KAAa,EAAA;AAC1C,IAAA,IAAI,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;IACrC,MAAM,CAAC,GAAG,IAAI;AACd,IAAA,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC3C,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/E,IAAA,MAAM,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACpC,IAAA,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE;IAC3C,OAAO,CAAA,EAAG,OAAO,CAAA,CAAA,EAAI,KAAK,CAAC,CAAC,CAAC,EAAE;AACjC;AAEA;;;AAGG;AACG,SAAU,kBAAkB,CAAC,IAAU,EAAE,MAA0B,EAAA;AACvE,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,IAAI;IACxB,MAAM,QAAQ,GAAG;SACd,KAAK,CAAC,GAAG;AACT,SAAA,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,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,EAAA,UAAA,EAAA,QAAA,EAAA,UAAA,EAAA,aAAA,EAAA,cAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,aAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAInD,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,CAAC,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,q4HAAA,EAAA,MAAA,EAAA,CAAA,qwNAAA,CAAA,EAAA;w9HAuGe,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1J3F;;;;;AAKG;;ACLH;;AAEG;;"}
1
+ {"version":3,"file":"4sh-ui-kit-forms-ui-file-upload.mjs","sources":["../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.model.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload-list.html","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.ts","../../../projects/ui-kit/forms/ui-file-upload/src/lib/ui-file-upload.html","../../../projects/ui-kit/forms/ui-file-upload/src/public-api.ts","../../../projects/ui-kit/forms/ui-file-upload/src/4sh-ui-kit-forms-ui-file-upload.ts"],"sourcesContent":["// =====================================================================\n// Shared model for ui-file-upload and its file-row (ui-file-upload-list).\n// =====================================================================\n\n/** Lifecycle of a selected file. */\nexport type UiUploadStatus = 'pending' | 'uploading' | 'completed' | 'error';\n\n/** A file selected in the uploader, plus its upload/validation state. */\nexport interface UiUploadFile {\n /** Stable id for tracking (kept across re-renders). */\n readonly id: string;\n /** The underlying browser File. */\n readonly file: File;\n /** File name (from the File, exposed for template convenience). */\n readonly name: string;\n /** Size in bytes. */\n readonly size: number;\n /** MIME type reported by the browser. */\n readonly type: string;\n /** Current lifecycle state. */\n status: UiUploadStatus;\n /** Upload progress, 0–100 (meaningful while `status === 'uploading'`). */\n progress: number;\n /** Object URL for image previews — MUST be revoked when the file is removed. */\n objectUrl?: string;\n /** Validation or upload error message, when `status === 'error'`. */\n error?: string;\n}\n\n/** Payload for the custom upload handler (customUpload = true). */\nexport interface UiUploadHandlerEvent {\n /** Files awaiting upload (status `pending`). */\n files: UiUploadFile[];\n /** Marks a file as uploaded (sets status `completed`, progress 100). */\n markUploaded: (file: UiUploadFile) => void;\n /** Marks a file as failed with an optional message. */\n markError: (file: UiUploadFile, message?: string) => void;\n /** Updates a file's progress (0–100). */\n setProgress: (file: UiUploadFile, progress: number) => void;\n}\n\n/** Emitted when files finish uploading (built-in uploader). */\nexport interface UiUploadEvent {\n files: UiUploadFile[];\n /** Raw XHR of the last request (built-in uploader only). */\n xhr?: XMLHttpRequest;\n}\n\n/** Emitted on a validation or upload error. */\nexport interface UiUploadErrorEvent {\n file: UiUploadFile;\n /** 'type' | 'size' | 'limit' | 'upload'. */\n reason: 'type' | 'size' | 'limit' | 'upload';\n message: string;\n}\n\n/** Human-readable file size (e.g. \"2.5 MB\"). Base-1024. */\nexport function formatFileSize(bytes: number): string {\n if (!bytes || bytes < 0) return '0 B';\n const k = 1024;\n const units = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), units.length - 1);\n const value = bytes / Math.pow(k, i);\n const rounded = Math.round(value * 10) / 10;\n return `${rounded} ${units[i]}`;\n}\n\n/**\n * Whether a File matches an `accept` string (e.g. \"image/*,.pdf\").\n * Empty/absent accept means everything is allowed.\n */\nexport function isFileTypeAccepted(file: File, accept: string | undefined): boolean {\n if (!accept) return true;\n const patterns = accept\n .split(',')\n .map((t) => t.trim().toLowerCase())\n .filter(Boolean);\n if (!patterns.length) return true;\n\n const name = file.name.toLowerCase();\n const mime = (file.type || '').toLowerCase();\n\n return patterns.some((pattern) => {\n if (pattern.startsWith('.')) return name.endsWith(pattern); // extension\n if (pattern.endsWith('/*')) return mime.startsWith(pattern.slice(0, -1)); // \"image/\"\n return mime === pattern; // exact mime\n });\n}\n\n/** Whether a File is a previewable image. */\nexport function isImageFile(file: File): boolean {\n return /^image\\//.test(file.type);\n}\n","import { booleanAttribute, Component, computed, input, output } from '@angular/core';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';\nimport { formatFileSize, UiUploadFile } from './ui-file-upload.model';\nimport { formatLabel } from '@4sh/ui-kit/forms';\n\nexport type UiFileUploadListSize = 'default' | 'small';\n\n/**\n * ui-file-upload-list — a single file row (the repeatable unit of an upload list).\n *\n * Presentational: shows a leading thumbnail (for images) or file icon, the file\n * name + size/status, and a remove button. While the file is uploading it swaps\n * the leading icon for a `ui-spinner` and reveals a slim progress bar.\n *\n * Named to mirror the Figma component; the uploader stacks one row per file.\n */\n@Component({\n selector: 'ui-file-upload-list',\n imports: [UiIcon, UiSpinner],\n templateUrl: './ui-file-upload-list.html',\n styleUrl: './ui-file-upload-list.scss',\n})\nexport class UiFileUploadList {\n /** The file to display (name/size/status/progress/preview). */\n file = input.required<UiUploadFile>();\n size = input<UiFileUploadListSize>('default');\n /** FontAwesome icon for non-image files. */\n icon = input<string>('file');\n /** Whether the remove button is shown. */\n removable = input(true, { transform: booleanAttribute });\n /** Accessible name of the remove button (raw text — the file name is appended in the template). */\n removeAriaLabel = input<string>('Supprimer le fichier');\n /** Fallback error text when the file carries no message. */\n failedLabel = input<string>('Échec');\n /** Accessible name of the upload spinner — `{0}` is the file name. */\n uploadingLabel = input<string>('Téléversement de {0}');\n /** Accessible name of the progress bar — `{0}` is the file name. */\n progressLabel = input<string>('Progression du téléversement de {0}');\n\n /** Emitted when the remove button is activated. */\n remove = output<UiUploadFile>();\n\n /** @ignore Formatted size (e.g. \"2.5 MB\"). */\n protected readonly sizeLabel = computed(() => formatFileSize(this.file().size));\n\n /** @ignore Accessible name of the upload spinner (`{0}` filled with the file name). */\n protected readonly uploadingAriaLabel = computed(() =>\n formatLabel(this.uploadingLabel(), this.file().name),\n );\n\n /** @ignore Accessible name of the progress bar (`{0}` filled with the file name). */\n protected readonly progressAriaLabel = computed(() =>\n formatLabel(this.progressLabel(), this.file().name),\n );\n\n /** @ignore Uploading in progress → show the spinner + progress bar. */\n protected readonly isUploading = computed(() => this.file().status === 'uploading');\n\n /** @ignore Error state → surface the message + error styling. */\n protected readonly isError = computed(() => this.file().status === 'error');\n\n /** @ignore Image with a usable preview URL → render a thumbnail. */\n protected readonly thumbnail = computed(() => this.file().objectUrl ?? null);\n\n /** @ignore Secondary line: error message, else size (+ status hint). */\n protected readonly infoLabel = computed(() => {\n const f = this.file();\n if (f.status === 'error') return f.error ?? this.failedLabel();\n if (f.status === 'uploading') return `${this.sizeLabel()} · ${Math.round(f.progress)} %`;\n return this.sizeLabel();\n });\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload-list'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isError()) c.push('_error');\n if (this.thumbnail()) c.push('_has-thumb');\n return c.join(' ');\n });\n\n /** @ignore */\n protected onRemove(): void {\n this.remove.emit(this.file());\n }\n}\n","<div [class]=\"classes()\">\n <div class=\"ui-file-upload-list-file\">\n <span class=\"ui-file-upload-list-media\">\n @if (isUploading()) {\n <ui-spinner size=\"small\" [ariaLabel]=\"uploadingAriaLabel()\" />\n } @else if (thumbnail(); as src) {\n <img class=\"ui-file-upload-list-thumb\" [src]=\"src\" alt=\"\" />\n } @else {\n <ui-icon [name]=\"isError() ? 'triangle-exclamation' : icon()\" [size]=\"iconSize()\" />\n }\n </span>\n\n <span class=\"ui-file-upload-list-infos\">\n <span class=\"ui-file-upload-list-name\" [title]=\"file().name\">{{ file().name }}</span>\n <span class=\"ui-file-upload-list-meta\">{{ infoLabel() }}</span>\n </span>\n </div>\n\n @if (removable()) {\n <button\n type=\"button\"\n class=\"ui-file-upload-list-remove\"\n [attr.aria-label]=\"removeAriaLabel() + ' : ' + file().name\"\n (click)=\"onRemove()\"\n >\n <ui-icon name=\"trash\" [size]=\"iconSize()\" />\n </button>\n }\n\n @if (isUploading()) {\n <div\n class=\"ui-file-upload-list-progress\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"file().progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"progressAriaLabel()\"\n >\n <span class=\"ui-file-upload-list-progress-bar\" [style.width.%]=\"file().progress\"></span>\n </div>\n }\n</div>\n","import {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiButton } from '@4sh/ui-kit/actions/ui-button';\nimport { UiFileUploadList } from './ui-file-upload-list';\nimport { formatLabel } from '@4sh/ui-kit/forms';\nimport {\n isFileTypeAccepted,\n isImageFile,\n UiUploadErrorEvent,\n UiUploadEvent,\n UiUploadFile,\n UiUploadHandlerEvent,\n} from './ui-file-upload.model';\n\nexport type UiFileUploadMode = 'field' | 'drag';\nexport type UiFileUploadSize = 'default' | 'small';\n\nlet nextUploadId = 0;\nlet nextInstanceId = 0;\n\n/**\n * ui-file-upload — headless file uploader (field + drag-and-drop).\n *\n * A native `<input type=\"file\">` (visually hidden) drives selection, so the OS\n * picker, keyboard and screen readers work natively; the whole component is also\n * a drop target. Selection is validated client-side (type / size / count) and\n * files can be uploaded automatically (`auto`), on demand, or via a custom\n * handler (`customUpload`). Progress is tracked with `XMLHttpRequest` so no\n * global HTTP provider is required.\n *\n * Security notes: client-side validation is a UX convenience — always re-validate\n * server-side. Image previews use object URLs that are revoked on removal/clear.\n */\n@Component({\n selector: 'ui-file-upload',\n imports: [NgTemplateOutlet, UiIcon, UiButton, UiFileUploadList],\n templateUrl: './ui-file-upload.html',\n styleUrl: './ui-file-upload.scss',\n})\nexport class UiFileUpload {\n // --- Layout ----------------------------------------------------------\n /** `field` = compact input + Browse button; `drag` = full drop zone. */\n mode = input<UiFileUploadMode>('field');\n size = input<UiFileUploadSize>('default');\n\n // --- Selection -------------------------------------------------------\n /** Native input `name` (submitted with a surrounding form). */\n name = input<string>();\n /** Allow selecting more than one file. */\n multiple = input(false, { transform: booleanAttribute });\n /** Ripple Effect */\n ripple = input(true, { transform: booleanAttribute });\n /** Native `accept` filter, e.g. \"image/*,.pdf\". Also enforced on drop. */\n accept = input<string>();\n /** Max size per file, in bytes. */\n maxFileSize = input<number, unknown>(undefined, { transform: numberAttribute });\n /** Max number of files kept at once. */\n fileLimit = input<number, unknown>(undefined, { transform: numberAttribute });\n disabled = input(false, { transform: booleanAttribute });\n\n // --- Upload behaviour ------------------------------------------------\n /** Upload each file as soon as it is selected. */\n auto = input(false, { transform: booleanAttribute });\n /** Delegate uploading to the `uploadHandler` output instead of the built-in XHR. */\n customUpload = input(false, { transform: booleanAttribute });\n /** Endpoint for the built-in uploader. */\n url = input<string>();\n /** HTTP method for the built-in uploader. */\n method = input<'post' | 'put'>('post');\n /** Field name used for each file in the multipart body. */\n fieldName = input<string>('files');\n /** Send credentials (cookies) with the built-in upload request. */\n withCredentials = input(false, { transform: booleanAttribute });\n\n // --- Presentation / labels ------------------------------------------\n /** Show the file list under the control. */\n showFileList = input(true, { transform: booleanAttribute });\n /** Show the Upload/Cancel toolbar buttons (drag mode). */\n showControls = input(true, { transform: booleanAttribute });\n browseLabel = input<string>('Parcourir');\n /** Placeholder shown in field mode before any selection. */\n chooseLabel = input<string>('Choisir un fichier…');\n uploadLabel = input<string>('Téléverser');\n cancelLabel = input<string>('Effacer');\n /** Drag-zone link + prompt. */\n dragLinkLabel = input<string>('Cliquer pour téléverser');\n dragPromptLabel = input<string>('ou glisser-déposer les fichiers ici');\n /** Small hint under the drag prompt (e.g. \"JPG, PNG (max 5 MB)\"). */\n hint = input<string>();\n /** Accessible name for the whole control. */\n // Composite widget (dropzone + file list), not a single-value CVA control: unlike the other\n // form components it doesn't extend BaseFieldControl, so it redeclares its own `ariaLabel`\n // here — with a non-undefined default, since the dropzone always needs an accessible name.\n ariaLabel = input<string>('Téléversement de fichiers');\n /** Multi-file summary in field mode — `{0}` is replaced by the file count. */\n filesSummaryLabel = input<string>('{0} fichiers');\n /** Rejection message: file type not accepted — `{0}` is the file name. */\n invalidTypeMessage = input<string>('Type de fichier non autorisé : {0}');\n /** Rejection message: file too large — `{0}` is the file name. */\n invalidSizeMessage = input<string>('Fichier trop volumineux : {0}');\n /** Rejection message: `fileLimit` reached — `{0}` is the limit. */\n limitReachedMessage = input<string>('Nombre maximum de fichiers atteint ({0}).');\n /** Error shown when an upload fails without a server message. */\n uploadErrorMessage = input<string>('Échec du téléversement');\n /** Error shown when the upload request fails at the network level. */\n networkErrorMessage = input<string>('Erreur réseau');\n /** Error shown on a non-2xx response — `{0}` is the HTTP status. */\n httpErrorMessage = input<string>('Erreur {0}');\n\n // --- Templates (drag/advanced) --------------------------------------\n /** Overrides a single file row (context: `{ $implicit: UiUploadFile, remove }`). */\n fileTemplate = input<TemplateRef<unknown>>();\n /** Overrides the content section (context: `{ $implicit: UiUploadFile[], remove, clear }`). */\n contentTemplate = input<TemplateRef<unknown>>();\n /** Custom toolbar content (context: `{ $implicit: UiUploadFile[], choose, upload, clear }`). */\n toolbarTemplate = input<TemplateRef<unknown>>();\n\n // --- Outputs ---------------------------------------------------------\n /** Files added to the selection (validated). */\n selected = output<UiUploadFile[]>();\n /** The full current selection changed. */\n filesChange = output<UiUploadFile[]>();\n /** A custom upload was requested (customUpload = true). */\n uploadHandler = output<UiUploadHandlerEvent>();\n /** Built-in upload completed for a batch. */\n uploaded = output<UiUploadEvent>();\n /** A file failed validation or upload. */\n uploadError = output<UiUploadErrorEvent>();\n /** A file was removed. */\n removed = output<UiUploadFile>();\n /** The selection was cleared. */\n cleared = output<void>();\n\n /** @ignore Stable id linking the visible label(s) to the native input. */\n protected readonly inputId = `ui-file-upload-${nextInstanceId++}`;\n\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly fileInput = viewChild.required<ElementRef<HTMLInputElement>>('fileInput');\n\n /** In-flight requests, keyed by file id, so we can abort. */\n private readonly requests = new Map<string, XMLHttpRequest>();\n\n /** @ignore Current selection. */\n private readonly selection = signal<UiUploadFile[]>([]);\n /** Read-only view of the current files. */\n readonly files = this.selection.asReadonly();\n\n /** @ignore Drop-zone highlight while dragging over. */\n protected readonly dragging = signal(false);\n /** @ignore Transient validation messages (rendered in a live region). */\n protected readonly messages = signal<string[]>([]);\n\n constructor() {\n // Revoke every object URL when the component is destroyed (no leaks).\n this.destroyRef.onDestroy(() => {\n for (const f of this.selection()) this.revoke(f);\n for (const xhr of this.requests.values()) xhr.abort();\n });\n\n // A11y safeguard: the control needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (!this.ariaLabel()) {\n console.warn('[ui-file-upload] Provide `ariaLabel` to name the control.');\n }\n });\n }\n }\n\n /** @ignore */\n protected readonly hasFiles = computed(() => this.selection().length > 0);\n /** @ignore */\n protected readonly pending = computed(() =>\n this.selection().filter((f) => f.status === 'pending'),\n );\n /** @ignore Single-file summary shown in field mode. */\n protected readonly fieldSummary = computed(() => {\n const files = this.selection();\n if (!files.length) return this.chooseLabel();\n if (files.length === 1) return files[0].name;\n return formatLabel(this.filesSummaryLabel(), files.length);\n });\n /** @ignore */\n protected readonly canUpload = computed(\n () => !this.disabled() && this.pending().length > 0 && (this.customUpload() || !!this.url()),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-file-upload', `_${this.mode()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.dragging()) c.push('_dragging');\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n\n // --- Bound refs for custom templates (stable identities) -------------\n /** @ignore */ protected readonly removeFn = (f: UiUploadFile): void => this.remove(f);\n /** @ignore */ protected readonly clearFn = (): void => this.clear();\n /** @ignore */ protected readonly chooseFn = (): void => this.choose();\n /** @ignore */ protected readonly uploadFn = (): void => this.upload();\n\n // --- Public API ------------------------------------------------------\n\n /** Opens the native file picker. */\n choose(): void {\n if (this.disabled()) return;\n this.fileInput().nativeElement.click();\n }\n\n /** Uploads all pending files (built-in XHR, or emits `uploadHandler`). */\n upload(): void {\n const pending = this.pending();\n if (!pending.length) return;\n\n if (this.customUpload()) {\n this.emitCustomUpload(pending);\n return;\n }\n const endpoint = this.url();\n if (!endpoint) return;\n for (const f of pending) this.xhrUpload(f, endpoint);\n }\n\n /** Removes a file (aborts its upload, revokes its preview). */\n remove(target: UiUploadFile): void {\n this.requests.get(target.id)?.abort();\n this.requests.delete(target.id);\n this.revoke(target);\n this.selection.update((files) => files.filter((f) => f.id !== target.id));\n this.removed.emit(target);\n this.filesChange.emit(this.selection());\n }\n\n /** Clears the whole selection. */\n clear(): void {\n for (const xhr of this.requests.values()) xhr.abort();\n this.requests.clear();\n for (const f of this.selection()) this.revoke(f);\n this.selection.set([]);\n this.messages.set([]);\n this.resetInput();\n this.cleared.emit();\n this.filesChange.emit([]);\n }\n\n // --- Native input / drop --------------------------------------------\n\n /** @ignore */\n protected onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.ingest(input.files);\n // Reset so selecting the same file again re-triggers `change`.\n this.resetInput();\n }\n\n /** @ignore */\n protected onDragOver(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(true);\n }\n\n /** @ignore */\n protected onDragLeave(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n // Ignore leave events bubbling from children still inside the zone.\n if (this.host.nativeElement.contains(event.relatedTarget as Node)) return;\n this.dragging.set(false);\n }\n\n /** @ignore */\n protected onDrop(event: DragEvent): void {\n if (this.disabled()) return;\n event.preventDefault();\n event.stopPropagation();\n this.dragging.set(false);\n this.ingest(event.dataTransfer?.files ?? null);\n }\n\n // --- Internals -------------------------------------------------------\n\n /** Validate + add a FileList to the selection. */\n private ingest(list: FileList | null): void {\n if (!list || !list.length || this.disabled()) return;\n\n const incoming = Array.from(list);\n const added: UiUploadFile[] = [];\n const newMessages: string[] = [];\n const limit = this.fileLimit();\n const maxSize = this.maxFileSize();\n\n for (const file of incoming) {\n // Single-file mode: the new file replaces the current one, so only cap the incoming batch.\n if (!this.multiple() && added.length >= 1) break;\n\n const item = this.toUploadFile(file);\n\n if (!isFileTypeAccepted(file, this.accept())) {\n this.fail(item, 'type', formatLabel(this.invalidTypeMessage(), file.name), newMessages);\n continue;\n }\n if (maxSize != null && file.size > maxSize) {\n this.fail(item, 'size', formatLabel(this.invalidSizeMessage(), file.name), newMessages);\n continue;\n }\n if (\n limit != null &&\n (this.multiple() ? this.selection().length : 0) + added.length >= limit\n ) {\n this.fail(item, 'limit', formatLabel(this.limitReachedMessage(), limit), newMessages);\n continue;\n }\n added.push(item);\n }\n\n this.messages.set(newMessages);\n if (!added.length) return;\n\n if (!this.multiple()) {\n // Replacement: release resources held by the previous selection.\n for (const previous of this.selection()) {\n this.requests.get(previous.id)?.abort();\n this.requests.delete(previous.id);\n this.revoke(previous);\n }\n }\n this.selection.update((files) => (this.multiple() ? [...files, ...added] : added));\n this.selected.emit(added);\n this.filesChange.emit(this.selection());\n\n if (this.auto()) this.upload();\n }\n\n private toUploadFile(file: File): UiUploadFile {\n return {\n id: `uifu-${nextUploadId++}`,\n file,\n name: file.name,\n size: file.size,\n type: file.type,\n status: 'pending',\n progress: 0,\n objectUrl: isImageFile(file) ? URL.createObjectURL(file) : undefined,\n };\n }\n\n private fail(\n item: UiUploadFile,\n reason: UiUploadErrorEvent['reason'],\n message: string,\n sink: string[],\n ): void {\n this.revoke(item);\n sink.push(message);\n this.uploadError.emit({ file: { ...item, status: 'error', error: message }, reason, message });\n }\n\n /** Mutates one file in place (immutably) and pushes a new array reference. */\n private patch(id: string, changes: Partial<UiUploadFile>): void {\n this.selection.update((files) => files.map((f) => (f.id === id ? { ...f, ...changes } : f)));\n }\n\n private emitCustomUpload(pending: UiUploadFile[]): void {\n for (const f of pending) this.patch(f.id, { status: 'uploading', progress: 0 });\n this.uploadHandler.emit({\n files: pending,\n setProgress: (file, progress) =>\n this.patch(file.id, {\n status: 'uploading',\n progress: Math.max(0, Math.min(100, progress)),\n }),\n markUploaded: (file) => {\n this.patch(file.id, { status: 'completed', progress: 100 });\n this.filesChange.emit(this.selection());\n },\n markError: (file, msg) => {\n this.patch(file.id, { status: 'error', error: msg ?? this.uploadErrorMessage() });\n this.uploadError.emit({\n file,\n reason: 'upload',\n message: msg ?? this.uploadErrorMessage(),\n });\n },\n });\n }\n\n private xhrUpload(item: UiUploadFile, endpoint: string): void {\n const xhr = new XMLHttpRequest();\n this.requests.set(item.id, xhr);\n this.patch(item.id, { status: 'uploading', progress: 0 });\n\n const body = new FormData();\n body.append(this.fieldName(), item.file, item.name);\n\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable)\n this.patch(item.id, { progress: Math.round((e.loaded / e.total) * 100) });\n });\n xhr.addEventListener('load', () => {\n this.requests.delete(item.id);\n if (xhr.status >= 200 && xhr.status < 300) {\n this.patch(item.id, { status: 'completed', progress: 100 });\n this.uploaded.emit({ files: [item], xhr });\n this.filesChange.emit(this.selection());\n } else {\n this.uploadFailed(item, formatLabel(this.httpErrorMessage(), xhr.status));\n }\n });\n xhr.addEventListener('error', () => this.uploadFailed(item, this.networkErrorMessage()));\n xhr.addEventListener('abort', () => this.requests.delete(item.id));\n\n xhr.open(this.method().toUpperCase(), endpoint, true);\n xhr.withCredentials = this.withCredentials();\n xhr.send(body);\n }\n\n private uploadFailed(item: UiUploadFile, message: string): void {\n this.requests.delete(item.id);\n this.patch(item.id, { status: 'error', error: message });\n this.uploadError.emit({ file: item, reason: 'upload', message });\n }\n\n private revoke(file: UiUploadFile): void {\n if (file.objectUrl) URL.revokeObjectURL(file.objectUrl);\n }\n\n private resetInput(): void {\n const el = this.fileInput().nativeElement;\n if (el) el.value = '';\n }\n}\n","<div\n [class]=\"classes()\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n>\n <!-- Real native control (visually hidden, keeps keyboard + screen-reader support) -->\n <input\n #fileInput\n class=\"ui-file-upload-input\"\n type=\"file\"\n [id]=\"inputId\"\n [attr.name]=\"name()\"\n [attr.accept]=\"accept() || null\"\n [multiple]=\"multiple()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n (change)=\"onInputChange($event)\"\n />\n\n @if (mode() === 'field') {\n <!-- Field mode: compact summary + Browse trigger (whole label opens picker) -->\n <label class=\"ui-file-upload-field\" [attr.for]=\"inputId\" [attr.data-ripple]=\"ripple() ? 'on' : 'off'\">\n <span class=\"ui-file-upload-field-text\" [class._placeholder]=\"!hasFiles()\">{{\n fieldSummary()\n }}</span>\n <span class=\"ui-file-upload-browse\" aria-hidden=\"true\">{{ browseLabel() }}</span>\n </label>\n } @else {\n <!-- Drag mode: full drop zone -->\n <label class=\"ui-file-upload-zone\" [attr.for]=\"inputId\" [attr.data-ripple]=\"ripple() ? 'on' : 'off'\">\n <ui-icon class=\"ui-file-upload-zone-icon\" name=\"cloud-arrow-up\" size=\"lg\" />\n <span class=\"ui-file-upload-zone-content\">\n <span class=\"ui-file-upload-zone-title\">\n <span class=\"ui-file-upload-zone-link\">{{ dragLinkLabel() }}</span>\n <span class=\"ui-file-upload-zone-prompt\">{{ dragPromptLabel() }}</span>\n </span>\n @if (hint(); as h) {\n <span class=\"ui-file-upload-zone-hint\">{{ h }}</span>\n }\n </span>\n </label>\n\n <!-- Toolbar (custom, or default Upload/Clear actions) -->\n @if (toolbarTemplate(); as tpl) {\n <div class=\"ui-file-upload-toolbar\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: files(),\n choose: chooseFn,\n upload: uploadFn,\n clear: clearFn,\n }\"\n />\n </div>\n } @else if (showControls() && hasFiles()) {\n <div class=\"ui-file-upload-toolbar\">\n @if (!auto()) {\n <ui-button\n [ripple]=\"ripple()\"\n [label]=\"uploadLabel()\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"cloud-arrow-up\"\n [disabled]=\"!canUpload()\"\n (buttonClick)=\"upload()\"\n />\n }\n <ui-button\n [ripple]=\"ripple()\"\n [label]=\"cancelLabel()\"\n level=\"low\"\n [size]=\"size() === 'small' ? 'small' : 'default'\"\n icon=\"xmark\"\n (buttonClick)=\"clear()\"\n />\n </div>\n }\n }\n\n <!-- Content section: the file list -->\n @if (contentTemplate(); as tpl) {\n <div class=\"ui-file-upload-content\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: files(), remove: removeFn, clear: clearFn }\"\n />\n </div>\n } @else if (showFileList() && hasFiles()) {\n <ul class=\"ui-file-upload-content\" role=\"list\">\n @for (f of files(); track f.id) {\n <li>\n @if (fileTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: f, remove: removeFn }\"\n />\n } @else {\n <ui-file-upload-list [file]=\"f\" [size]=\"size()\" (remove)=\"remove($event)\" />\n }\n </li>\n }\n </ul>\n }\n\n <!-- Validation messages (assertive live region) -->\n @if (messages().length) {\n <div class=\"ui-file-upload-messages\" role=\"alert\" aria-live=\"assertive\">\n @for (msg of messages(); track msg) {\n <p class=\"ui-file-upload-message\">{{ msg }}</p>\n }\n </div>\n }\n</div>\n","/*\n * Public API Surface of ui-kit/ui-file-upload\n *\n * Includes `ui-file-upload-list`: it renders the upload's own file model,\n * so the two live in one entry point (a separate one would be a cycle).\n */\n\nexport * from './lib/ui-file-upload-list';\nexport * from './lib/ui-file-upload.model';\nexport * from './lib/ui-file-upload';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AAsDA;AACM,SAAU,cAAc,CAAC,KAAa,EAAA;AAC1C,IAAA,IAAI,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;IACrC,MAAM,CAAC,GAAG,IAAI;AACd,IAAA,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC3C,IAAA,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/E,IAAA,MAAM,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACpC,IAAA,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE;IAC3C,OAAO,CAAA,EAAG,OAAO,CAAA,CAAA,EAAI,KAAK,CAAC,CAAC,CAAC,EAAE;AACjC;AAEA;;;AAGG;AACG,SAAU,kBAAkB,CAAC,IAAU,EAAE,MAA0B,EAAA;AACvE,IAAA,IAAI,CAAC,MAAM;AA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AA,SAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,aAAA,EAAA,UAAA,EAAA,SAAA,EAAA,UAAA,EAAA,QAAA,EAAA,UAAA,EAAA,aAAA,EAAA,cAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,aAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAInD,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,CAAC,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,q4HAAA,EAAA,MAAA,EAAA,CAAA,y7PAAA,CAAA,EAAA;w9HAuGe,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1J3F;;;;;AAKG;;ACLH;;AAEG;;"}
@@ -0,0 +1,179 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, numberAttribute, output, viewChild, computed, forwardRef, Component } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+ import { BaseFormField, startOfDay, toIsoTime, toIsoDateTime, toIsoDate, parseIsoTime, parseIsoDateTime, parseIsoDate } from '@4sh/ui-kit/forms';
5
+ import { UiField } from '@4sh/ui-kit/forms/ui-field';
6
+
7
+ /** `mode` → the native `type` that draws the OS picker. */
8
+ const NATIVE_TYPE = {
9
+ date: 'date',
10
+ time: 'time',
11
+ datetime: 'datetime-local',
12
+ };
13
+ /**
14
+ * ui-input-date — **native** date/time field on the `ui-field` shell (label + box + helper).
15
+ *
16
+ * The picker belongs to the OS: the system wheel on mobile — which no overlay matches —
17
+ * and the browser's own calendar on desktop. That is the whole reason this component
18
+ * exists next to [`ui-datepicker`](../ui-datepicker), which owns the opposite trade: a
19
+ * calendar carried by the design system, with ranges, multi-month and inline modes.
20
+ *
21
+ * It is a sibling of `ui-input`, not a variant of it: three things a text field cannot do
22
+ * are settled here.
23
+ *
24
+ * 1. **The value is a date, not a string.** `valueType` commits to `Date` or to an ISO
25
+ * string, exactly as `ui-datepicker` does — that alignment is what lets a host branch
26
+ * between the two on viewport without converting anything.
27
+ * 2. **It emits on `change`, never on `input`.** A native temporal control blanks its own
28
+ * value while the entry is incomplete, so an `input`-driven field fires a burst of
29
+ * empty values as the user types — indistinguishable from clearing the field, and quite
30
+ * visible on an autosave or a dependent control.
31
+ * 3. **The label stays raised.** The browser draws its own `jj/mm/aaaa` template in the
32
+ * box, so a floating label at rest would land on top of it.
33
+ *
34
+ * No `placeholder`: the browser ignores it on these types, that template holding the spot.
35
+ *
36
+ * Standalone, `[(ngModel)]` or reactive forms (ControlValueAccessor via BaseFormField).
37
+ */
38
+ class UiInputDate extends BaseFormField {
39
+ constructor() {
40
+ super(...arguments);
41
+ /** Granularity: a day, a time of day, or both. */
42
+ this.mode = input('date', /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
44
+ /**
45
+ * Shape of the emitted value: `'date'` (a plain `Date`) or `'iso'` (`yyyy-MM-dd`, or
46
+ * `yyyy-MM-ddTHH:mm` as soon as a time is part of it). Incoming values are accepted in
47
+ * **either** shape whatever this says — only the emitted side commits.
48
+ */
49
+ this.valueType = input('date', /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "valueType" }] : /* istanbul ignore next */ []));
51
+ /** Earliest accepted value, as a `Date` or in the ISO shape of the current `mode`. */
52
+ this.min = input(/* @ts-ignore */
53
+ ...(ngDevMode ? [undefined, { debugName: "min" }] : /* istanbul ignore next */ []));
54
+ /** Latest accepted value, same two shapes as {@link min}. */
55
+ this.max = input(/* @ts-ignore */
56
+ ...(ngDevMode ? [undefined, { debugName: "max" }] : /* istanbul ignore next */ []));
57
+ /**
58
+ * Native `step`: days on `date`, **seconds** on `time` / `datetime` (`900` = quarters of
59
+ * an hour; the browser's own default is `60`, i.e. whole minutes).
60
+ */
61
+ this.step = input(undefined, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
62
+ /** Emitted when the browser commits a value — never mid-entry. */
63
+ this.valueChange = output();
64
+ /** Emitted when the field receives focus. */
65
+ this.inputFocus = output();
66
+ /** Emitted when the field loses focus. */
67
+ this.inputBlur = output();
68
+ /** @ignore */
69
+ this.inputEl = viewChild.required('inputEl', /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
71
+ /** @ignore The native `type` the OS picker hangs off. */
72
+ this.nativeType = computed(() => NATIVE_TYPE[this.mode()], /* @ts-ignore */
73
+ ...(ngDevMode ? [{ debugName: "nativeType" }] : /* istanbul ignore next */ []));
74
+ /** @ignore Whether the value carries a time — decides both serializers. */
75
+ this.hasTimeComponent = computed(() => this.mode() !== 'date', /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "hasTimeComponent" }] : /* istanbul ignore next */ []));
77
+ /** @ignore Model → the string the native control reads, `''` when there is no value. */
78
+ this.nativeValue = computed(() => {
79
+ const date = this.parseValue(this.modelValue() ?? null);
80
+ return date ? this.toNative(date) : '';
81
+ }, /* @ts-ignore */
82
+ ...(ngDevMode ? [{ debugName: "nativeValue" }] : /* istanbul ignore next */ []));
83
+ /** @ignore Bounds go through the same serializer as the value: a caller may hand a `Date`
84
+ * or an already-native string, the attribute only ever sees the latter. */
85
+ this.nativeMin = computed(() => this.toNativeBound(this.min()), /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "nativeMin" }] : /* istanbul ignore next */ []));
87
+ /** @ignore */
88
+ this.nativeMax = computed(() => this.toNativeBound(this.max()), /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "nativeMax" }] : /* istanbul ignore next */ []));
90
+ /** @ignore Full `aria-describedby`: the message id, only when a message is rendered. */
91
+ this.resolvedAriaDescribedBy = computed(() => this.displayMessage() ? this.messageId() : null, /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "resolvedAriaDescribedBy" }] : /* istanbul ignore next */ []));
93
+ }
94
+ /** Focuses the field. */
95
+ focus(options) {
96
+ this.inputEl().nativeElement.focus(options);
97
+ }
98
+ /** Native `<input>` element, for a composite host that needs direct DOM access. */
99
+ nativeInputElement() {
100
+ return this.inputEl().nativeElement;
101
+ }
102
+ /** @ignore */
103
+ uidPrefix() {
104
+ return 'ui-input-date';
105
+ }
106
+ /**
107
+ * @ignore The browser committed a value — a complete one, or an empty one because the
108
+ * field was cleared. This is the only place a value leaves the component: `input` fires
109
+ * on every keystroke with the blanks in between, and is deliberately not listened to.
110
+ */
111
+ onNativeChange() {
112
+ const raw = this.inputEl().nativeElement.value;
113
+ const date = raw ? this.fromNative(raw) : null;
114
+ const value = date ? this.serializeValue(date) : null;
115
+ this.modelValue.set(value);
116
+ this.emitChange(value);
117
+ this.valueChange.emit(value);
118
+ }
119
+ /** @ignore */
120
+ onBlur(event) {
121
+ this.emitTouch();
122
+ this.inputBlur.emit(event);
123
+ }
124
+ /** @ignore Internal `Date` → the shape `valueType` commits to. Mirrors `ui-datepicker`'s
125
+ * own `serializeValue`, down to the fresh instance: the caller never gets a reference it
126
+ * could mutate behind our back. */
127
+ serializeValue(date) {
128
+ if (this.valueType() === 'iso')
129
+ return this.toNative(date);
130
+ return this.hasTimeComponent() ? new Date(date) : startOfDay(date);
131
+ }
132
+ /** @ignore Incoming value, `Date` or ISO string, auto-detected — cloned when already a
133
+ * `Date`, symmetric with {@link serializeValue}. */
134
+ parseValue(value) {
135
+ if (value === undefined || value === null || value === '')
136
+ return null;
137
+ return value instanceof Date ? new Date(value) : this.fromNative(value);
138
+ }
139
+ /** @ignore `Date` → the exact string the native control of this `mode` accepts. */
140
+ toNative(date) {
141
+ if (this.mode() === 'time')
142
+ return toIsoTime(date);
143
+ return this.hasTimeComponent() ? toIsoDateTime(date) : toIsoDate(date);
144
+ }
145
+ /** @ignore The reverse. `null` on anything malformed — a bad value degrades to "no value"
146
+ * rather than throwing, the browser being the one that produced it. */
147
+ fromNative(value) {
148
+ if (this.mode() === 'time')
149
+ return parseIsoTime(value);
150
+ return this.hasTimeComponent() ? parseIsoDateTime(value) : parseIsoDate(value);
151
+ }
152
+ /** @ignore A bound is optional, and a string one is already native. */
153
+ toNativeBound(bound) {
154
+ if (!bound)
155
+ return null;
156
+ return bound instanceof Date ? this.toNative(bound) : bound;
157
+ }
158
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputDate, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
159
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.5", type: UiInputDate, isStandalone: true, selector: "ui-input-date", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [
160
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputDate), multi: true },
161
+ ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n", styles: [".ui-input-date-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-date-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-date-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-date-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-date-native._small{font-size:var(--ui-input-date-font-size-small, var(--size-typography-text-md))}.ui-input-date-native{-webkit-appearance:none;appearance:none}.ui-input-date-native::-webkit-date-and-time-value{text-align:left;margin:0}.ui-input-date-native::-webkit-calendar-picker-indicator{cursor:pointer}:host-context([data-theme=dark]) .ui-input-date-native{color-scheme:dark}\n"], dependencies: [{ kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "floatLabel", "filled", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "showMessageIcon", "messageIcon", "hasFooter", "hasPrefix"] }] }); }
162
+ }
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputDate, decorators: [{
164
+ type: Component,
165
+ args: [{ selector: 'ui-input-date', imports: [UiField], providers: [
166
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputDate), multi: true },
167
+ ], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n", styles: [".ui-input-date-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-date-native:first-child{padding-inline-start:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native:last-child{padding-inline-end:var(--ui-form-field-padding-x, var(--units-md))}.ui-input-date-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-date-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-date-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-date-native._small{font-size:var(--ui-input-date-font-size-small, var(--size-typography-text-md))}.ui-input-date-native{-webkit-appearance:none;appearance:none}.ui-input-date-native::-webkit-date-and-time-value{text-align:left;margin:0}.ui-input-date-native::-webkit-calendar-picker-indicator{cursor:pointer}:host-context([data-theme=dark]) .ui-input-date-native{color-scheme:dark}\n"] }]
168
+ }], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], valueType: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueType", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
169
+
170
+ /*
171
+ * Public API Surface of ui-kit/ui-input-date
172
+ */
173
+
174
+ /**
175
+ * Generated bundle index. Do not edit.
176
+ */
177
+
178
+ export { UiInputDate };
179
+ //# sourceMappingURL=4sh-ui-kit-forms-ui-input-date.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"4sh-ui-kit-forms-ui-input-date.mjs","sources":["../../../projects/ui-kit/forms/ui-input-date/src/lib/ui-input-date.ts","../../../projects/ui-kit/forms/ui-input-date/src/lib/ui-input-date.html","../../../projects/ui-kit/forms/ui-input-date/src/public-api.ts","../../../projects/ui-kit/forms/ui-input-date/src/4sh-ui-kit-forms-ui-input-date.ts"],"sourcesContent":["import {\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n numberAttribute,\n output,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n BaseFormField,\n parseIsoDate,\n parseIsoDateTime,\n parseIsoTime,\n startOfDay,\n toIsoDate,\n toIsoDateTime,\n toIsoTime,\n} from '@4sh/ui-kit/forms';\nimport { UiField } from '@4sh/ui-kit/forms/ui-field';\n\n/** Granularity of the field — picks which native control the browser renders. */\nexport type InputDateMode = 'date' | 'time' | 'datetime';\n\n/**\n * Shape of the emitted value. **Identical to `ui-datepicker`'s**, so a host can swap one for\n * the other (native picker on mobile, overlay on desktop) without converting anything.\n */\nexport type InputDateValueType = 'date' | 'iso';\n\n/** Value carried by the field, whichever `valueType` is in force. */\nexport type InputDateValue = Date | string | null;\n\n/** `mode` → the native `type` that draws the OS picker. */\nconst NATIVE_TYPE: Record<InputDateMode, string> = {\n date: 'date',\n time: 'time',\n datetime: 'datetime-local',\n};\n\n/**\n * ui-input-date — **native** date/time field on the `ui-field` shell (label + box + helper).\n *\n * The picker belongs to the OS: the system wheel on mobile — which no overlay matches —\n * and the browser's own calendar on desktop. That is the whole reason this component\n * exists next to [`ui-datepicker`](../ui-datepicker), which owns the opposite trade: a\n * calendar carried by the design system, with ranges, multi-month and inline modes.\n *\n * It is a sibling of `ui-input`, not a variant of it: three things a text field cannot do\n * are settled here.\n *\n * 1. **The value is a date, not a string.** `valueType` commits to `Date` or to an ISO\n * string, exactly as `ui-datepicker` does — that alignment is what lets a host branch\n * between the two on viewport without converting anything.\n * 2. **It emits on `change`, never on `input`.** A native temporal control blanks its own\n * value while the entry is incomplete, so an `input`-driven field fires a burst of\n * empty values as the user types — indistinguishable from clearing the field, and quite\n * visible on an autosave or a dependent control.\n * 3. **The label stays raised.** The browser draws its own `jj/mm/aaaa` template in the\n * box, so a floating label at rest would land on top of it.\n *\n * No `placeholder`: the browser ignores it on these types, that template holding the spot.\n *\n * Standalone, `[(ngModel)]` or reactive forms (ControlValueAccessor via BaseFormField).\n */\n@Component({\n selector: 'ui-input-date',\n imports: [UiField],\n templateUrl: './ui-input-date.html',\n styleUrl: './ui-input-date.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputDate), multi: true },\n ],\n})\nexport class UiInputDate extends BaseFormField<InputDateValue> {\n /** Granularity: a day, a time of day, or both. */\n mode = input<InputDateMode>('date');\n /**\n * Shape of the emitted value: `'date'` (a plain `Date`) or `'iso'` (`yyyy-MM-dd`, or\n * `yyyy-MM-ddTHH:mm` as soon as a time is part of it). Incoming values are accepted in\n * **either** shape whatever this says — only the emitted side commits.\n */\n valueType = input<InputDateValueType>('date');\n /** Earliest accepted value, as a `Date` or in the ISO shape of the current `mode`. */\n min = input<Date | string>();\n /** Latest accepted value, same two shapes as {@link min}. */\n max = input<Date | string>();\n /**\n * Native `step`: days on `date`, **seconds** on `time` / `datetime` (`900` = quarters of\n * an hour; the browser's own default is `60`, i.e. whole minutes).\n */\n step = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /** Emitted when the browser commits a value — never mid-entry. */\n valueChange = output<InputDateValue>();\n /** Emitted when the field receives focus. */\n inputFocus = output<FocusEvent>();\n /** Emitted when the field loses focus. */\n inputBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n\n /** @ignore The native `type` the OS picker hangs off. */\n protected readonly nativeType = computed(() => NATIVE_TYPE[this.mode()]);\n /** @ignore Whether the value carries a time — decides both serializers. */\n private readonly hasTimeComponent = computed(() => this.mode() !== 'date');\n\n /** @ignore Model → the string the native control reads, `''` when there is no value. */\n protected readonly nativeValue = computed(() => {\n const date = this.parseValue(this.modelValue() ?? null);\n return date ? this.toNative(date) : '';\n });\n /** @ignore Bounds go through the same serializer as the value: a caller may hand a `Date`\n * or an already-native string, the attribute only ever sees the latter. */\n protected readonly nativeMin = computed(() => this.toNativeBound(this.min()));\n /** @ignore */\n protected readonly nativeMax = computed(() => this.toNativeBound(this.max()));\n\n /** @ignore Full `aria-describedby`: the message id, only when a message is rendered. */\n protected readonly resolvedAriaDescribedBy = computed(() =>\n this.displayMessage() ? this.messageId() : null,\n );\n\n /** Focuses the field. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n /** Native `<input>` element, for a composite host that needs direct DOM access. */\n nativeInputElement(): HTMLInputElement {\n return this.inputEl().nativeElement;\n }\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-input-date';\n }\n\n /**\n * @ignore The browser committed a value — a complete one, or an empty one because the\n * field was cleared. This is the only place a value leaves the component: `input` fires\n * on every keystroke with the blanks in between, and is deliberately not listened to.\n */\n protected onNativeChange(): void {\n const raw = this.inputEl().nativeElement.value;\n const date = raw ? this.fromNative(raw) : null;\n const value = date ? this.serializeValue(date) : null;\n this.modelValue.set(value);\n this.emitChange(value);\n this.valueChange.emit(value);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.inputBlur.emit(event);\n }\n\n /** @ignore Internal `Date` → the shape `valueType` commits to. Mirrors `ui-datepicker`'s\n * own `serializeValue`, down to the fresh instance: the caller never gets a reference it\n * could mutate behind our back. */\n private serializeValue(date: Date): InputDateValue {\n if (this.valueType() === 'iso') return this.toNative(date);\n return this.hasTimeComponent() ? new Date(date) : startOfDay(date);\n }\n\n /** @ignore Incoming value, `Date` or ISO string, auto-detected — cloned when already a\n * `Date`, symmetric with {@link serializeValue}. */\n private parseValue(value: InputDateValue | undefined): Date | null {\n if (value === undefined || value === null || value === '') return null;\n return value instanceof Date ? new Date(value) : this.fromNative(value);\n }\n\n /** @ignore `Date` → the exact string the native control of this `mode` accepts. */\n private toNative(date: Date): string {\n if (this.mode() === 'time') return toIsoTime(date);\n return this.hasTimeComponent() ? toIsoDateTime(date) : toIsoDate(date);\n }\n\n /** @ignore The reverse. `null` on anything malformed — a bad value degrades to \"no value\"\n * rather than throwing, the browser being the one that produced it. */\n private fromNative(value: string): Date | null {\n if (this.mode() === 'time') return parseIsoTime(value);\n return this.hasTimeComponent() ? parseIsoDateTime(value) : parseIsoDate(value);\n }\n\n /** @ignore A bound is optional, and a string one is already native. */\n private toNativeBound(bound: Date | string | undefined): string | null {\n if (!bound) return null;\n return bound instanceof Date ? this.toNative(bound) : bound;\n }\n}\n","<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"true\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <!-- `filled` is hard-coded above, and it is not a shortcut: the browser draws its own\n `jj/mm/aaaa` template in the box, so this field is never visually empty. A floating\n label at rest would sit on top of that template. -->\n <input\n #inputEl\n class=\"ui-input-date-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"nativeType()\"\n [id]=\"resolvedId()\"\n [value]=\"nativeValue()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.min]=\"nativeMin()\"\n [attr.max]=\"nativeMax()\"\n [attr.step]=\"step() ?? null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedAriaDescribedBy()\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n</ui-field>\n","/*\n * Public API Surface of ui-kit/ui-input-date\n */\n\nexport * from './lib/ui-input-date';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAmCA;AACA,MAAM,WAAW,GAAkC;AACjD,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,QAAQ,EAAE,gBAAgB;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAUG,MAAO,WAAY,SAAQ,aAA6B,CAAA;AAT9D,IAAA,WAAA,GAAA;;;QAWE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,MAAM;iFAAC;AACnC;;;;AAIG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAqB,MAAM;sFAAC;;AAE7C,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAiB;;AAE5B,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAiB;AAC5B;;;AAGG;QACH,IAAA,CA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AA,WAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,WAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAON,WAAW,EAAA,UAAA,EAAA,CAAA;kBATvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,OAAA,EAChB,CAAC,OAAO,CAAC,EAAA,SAAA,EAGP;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACxF,qBAAA,EAAA,QAAA,EAAA,48CAAA,EAAA,MAAA,EAAA,CAAA,6vCAAA,CAAA,EAAA;8qBA6B2E,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvGvF;;AAEG;;ACFH;;AAEG;;"}
@@ -67,10 +67,10 @@ class UiInputGroup {
67
67
  for (const el of this.items())
68
68
  el.style.zIndex = '';
69
69
  }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: UiInputGroup, isStandalone: true, selector: "ui-input-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut()" } }, viewQueries: [{ propertyName: "row", first: true, predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #row class=\"ui-input-group\">\n <ng-content />\n</div>\n", styles: [":host{display:block}.ui-input-group{--_radius: var(--ui-input-group-radius, var(--ui-form-field-radius, var(--radius-sm)));--_overlap: calc(-1 * var(--ui-input-group-overlap, var(--ui-control-stroke-width, var(--stroke-default))));display:flex;align-items:stretch;width:100%}\n"] }); }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.5", type: UiInputGroup, isStandalone: true, selector: "ui-input-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut()" } }, viewQueries: [{ propertyName: "row", first: true, predicate: ["row"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #row class=\"ui-input-group\">\n <ng-content />\n</div>\n", styles: [":host{display:block}.ui-input-group{--_radius: var(--ui-input-group-radius, var(--ui-form-field-radius, var(--radius-sm)));--_overlap: calc(-1 * var(--ui-input-group-overlap, var(--ui-control-stroke-width, var(--stroke-default))));display:flex;align-items:stretch;width:100%}\n"] }); }
72
72
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputGroup, decorators: [{
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputGroup, decorators: [{
74
74
  type: Component,
75
75
  args: [{ selector: 'ui-input-group', host: {
76
76
  '(focusin)': 'onFocusIn($event)',
@@ -99,12 +99,12 @@ class UiInputGroupAddon {
99
99
  }, /* @ts-ignore */
100
100
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
101
101
  }
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputGroupAddon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
103
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: UiInputGroupAddon, isStandalone: true, selector: "ui-input-group-addon", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ng-content />\n</div>\n", styles: [":host{display:flex}.ui-input-group-addon{display:flex;align-items:center;justify-content:center;gap:var(--ui-input-group-addon-gap, var(--ui-form-field-gap, var(--units-sm)));box-sizing:border-box;min-width:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));min-height:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));padding:0 var(--ui-input-group-addon-padding-x, var(--ui-form-field-padding-x, var(--units-md)));border:var(--ui-input-group-addon-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-input-group-item-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--global-background-muted);color:var(--global-text-muted);font-family:var(--fontfamily-base);font-size:var(--ui-input-group-addon-font-size, var(--size-typography-text-default));line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-group-addon._small{min-width:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));min-height:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));font-size:var(--ui-input-group-addon-font-size-small, var(--size-typography-text-md))}\n"] }); }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputGroupAddon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
103
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: UiInputGroupAddon, isStandalone: true, selector: "ui-input-group-addon", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ng-content />\n</div>\n", styles: [":host{display:flex}.ui-input-group-addon{display:flex;align-items:center;justify-content:center;gap:var(--ui-input-group-addon-gap, var(--ui-form-field-gap, var(--units-sm)));box-sizing:border-box;min-width:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));min-height:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));padding:0 var(--ui-input-group-addon-padding-x, var(--ui-form-field-padding-x, var(--units-md)));border:var(--ui-input-group-addon-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-input-group-addon-stroke, var(--form-high-stroke-default));border-radius:var(--ui-input-group-item-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-group-addon-surface, var(--global-background-muted));color:var(--ui-input-group-addon-color, var(--global-text-muted));font-family:var(--ui-input-group-font-family, var(--fontfamily-base));font-size:var(--ui-input-group-addon-font-size, var(--size-typography-text-default));line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-group-addon._small{min-width:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));min-height:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));font-size:var(--ui-input-group-addon-font-size-small, var(--size-typography-text-md))}\n"] }); }
104
104
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: UiInputGroupAddon, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiInputGroupAddon, decorators: [{
106
106
  type: Component,
107
- args: [{ selector: 'ui-input-group-addon', template: "<div [class]=\"classes()\">\n <ng-content />\n</div>\n", styles: [":host{display:flex}.ui-input-group-addon{display:flex;align-items:center;justify-content:center;gap:var(--ui-input-group-addon-gap, var(--ui-form-field-gap, var(--units-sm)));box-sizing:border-box;min-width:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));min-height:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));padding:0 var(--ui-input-group-addon-padding-x, var(--ui-form-field-padding-x, var(--units-md)));border:var(--ui-input-group-addon-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--form-high-stroke-default);border-radius:var(--ui-input-group-item-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--global-background-muted);color:var(--global-text-muted);font-family:var(--fontfamily-base);font-size:var(--ui-input-group-addon-font-size, var(--size-typography-text-default));line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-group-addon._small{min-width:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));min-height:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));font-size:var(--ui-input-group-addon-font-size-small, var(--size-typography-text-md))}\n"] }]
107
+ args: [{ selector: 'ui-input-group-addon', template: "<div [class]=\"classes()\">\n <ng-content />\n</div>\n", styles: [":host{display:flex}.ui-input-group-addon{display:flex;align-items:center;justify-content:center;gap:var(--ui-input-group-addon-gap, var(--ui-form-field-gap, var(--units-sm)));box-sizing:border-box;min-width:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));min-height:var(--ui-input-group-addon-height, var(--ui-form-field-height, var(--size-components-default)));padding:0 var(--ui-input-group-addon-padding-x, var(--ui-form-field-padding-x, var(--units-md)));border:var(--ui-input-group-addon-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-input-group-addon-stroke, var(--form-high-stroke-default));border-radius:var(--ui-input-group-item-radius, var(--ui-form-field-radius, var(--radius-sm)));background-color:var(--ui-input-group-addon-surface, var(--global-background-muted));color:var(--ui-input-group-addon-color, var(--global-text-muted));font-family:var(--ui-input-group-font-family, var(--fontfamily-base));font-size:var(--ui-input-group-addon-font-size, var(--size-typography-text-default));line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-group-addon._small{min-width:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));min-height:var(--ui-input-group-addon-height-small, var(--ui-form-field-height-small, var(--size-components-sm)));font-size:var(--ui-input-group-addon-font-size-small, var(--size-typography-text-md))}\n"] }]
108
108
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
109
109
 
110
110
  /*