@ship-ui/core 0.19.5 → 0.22.2

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 (153) hide show
  1. package/README.md +3 -0
  2. package/assets/mcp/components.json +66 -4243
  3. package/bin/mcp/index.js +6027 -273
  4. package/bin/ship-fg-scanner +0 -0
  5. package/bin/ship-fg.mjs +14 -12
  6. package/bin/src/subset.ts +3 -1
  7. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs +42 -0
  8. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs.map +1 -0
  9. package/fesm2022/ship-ui-core-ship-accordion.mjs +127 -0
  10. package/fesm2022/ship-ui-core-ship-accordion.mjs.map +1 -0
  11. package/fesm2022/ship-ui-core-ship-alert.mjs +305 -0
  12. package/fesm2022/ship-ui-core-ship-alert.mjs.map +1 -0
  13. package/fesm2022/ship-ui-core-ship-blueprint.mjs +1156 -0
  14. package/fesm2022/ship-ui-core-ship-blueprint.mjs.map +1 -0
  15. package/fesm2022/ship-ui-core-ship-button-group.mjs +41 -0
  16. package/fesm2022/ship-ui-core-ship-button-group.mjs.map +1 -0
  17. package/fesm2022/ship-ui-core-ship-button.mjs +38 -0
  18. package/fesm2022/ship-ui-core-ship-button.mjs.map +1 -0
  19. package/fesm2022/ship-ui-core-ship-card.mjs +35 -0
  20. package/fesm2022/ship-ui-core-ship-card.mjs.map +1 -0
  21. package/fesm2022/ship-ui-core-ship-checkbox.mjs +113 -0
  22. package/fesm2022/ship-ui-core-ship-checkbox.mjs.map +1 -0
  23. package/fesm2022/ship-ui-core-ship-chip.mjs +44 -0
  24. package/fesm2022/ship-ui-core-ship-chip.mjs.map +1 -0
  25. package/fesm2022/ship-ui-core-ship-color-picker.mjs +947 -0
  26. package/fesm2022/ship-ui-core-ship-color-picker.mjs.map +1 -0
  27. package/fesm2022/ship-ui-core-ship-datepicker.mjs +951 -0
  28. package/fesm2022/ship-ui-core-ship-datepicker.mjs.map +1 -0
  29. package/fesm2022/ship-ui-core-ship-dialog.mjs +263 -0
  30. package/fesm2022/ship-ui-core-ship-dialog.mjs.map +1 -0
  31. package/fesm2022/ship-ui-core-ship-divider.mjs +22 -0
  32. package/fesm2022/ship-ui-core-ship-divider.mjs.map +1 -0
  33. package/fesm2022/ship-ui-core-ship-event-card.mjs +50 -0
  34. package/fesm2022/ship-ui-core-ship-event-card.mjs.map +1 -0
  35. package/fesm2022/ship-ui-core-ship-file-upload.mjs +112 -0
  36. package/fesm2022/ship-ui-core-ship-file-upload.mjs.map +1 -0
  37. package/fesm2022/ship-ui-core-ship-form-field.mjs +310 -0
  38. package/fesm2022/ship-ui-core-ship-form-field.mjs.map +1 -0
  39. package/fesm2022/ship-ui-core-ship-icon.mjs +81 -0
  40. package/fesm2022/ship-ui-core-ship-icon.mjs.map +1 -0
  41. package/fesm2022/ship-ui-core-ship-list.mjs +22 -0
  42. package/fesm2022/ship-ui-core-ship-list.mjs.map +1 -0
  43. package/fesm2022/ship-ui-core-ship-menu.mjs +545 -0
  44. package/fesm2022/ship-ui-core-ship-menu.mjs.map +1 -0
  45. package/fesm2022/ship-ui-core-ship-popover.mjs +286 -0
  46. package/fesm2022/ship-ui-core-ship-popover.mjs.map +1 -0
  47. package/fesm2022/ship-ui-core-ship-progress-bar.mjs +37 -0
  48. package/fesm2022/ship-ui-core-ship-progress-bar.mjs.map +1 -0
  49. package/fesm2022/ship-ui-core-ship-radio.mjs +102 -0
  50. package/fesm2022/ship-ui-core-ship-radio.mjs.map +1 -0
  51. package/fesm2022/ship-ui-core-ship-range-slider.mjs +277 -0
  52. package/fesm2022/ship-ui-core-ship-range-slider.mjs.map +1 -0
  53. package/fesm2022/ship-ui-core-ship-select.mjs +971 -0
  54. package/fesm2022/ship-ui-core-ship-select.mjs.map +1 -0
  55. package/fesm2022/ship-ui-core-ship-sidenav.mjs +248 -0
  56. package/fesm2022/ship-ui-core-ship-sidenav.mjs.map +1 -0
  57. package/fesm2022/ship-ui-core-ship-sortable.mjs +485 -0
  58. package/fesm2022/ship-ui-core-ship-sortable.mjs.map +1 -0
  59. package/fesm2022/ship-ui-core-ship-spinner.mjs +28 -0
  60. package/fesm2022/ship-ui-core-ship-spinner.mjs.map +1 -0
  61. package/fesm2022/ship-ui-core-ship-stepper.mjs +76 -0
  62. package/fesm2022/ship-ui-core-ship-stepper.mjs.map +1 -0
  63. package/fesm2022/ship-ui-core-ship-table-filter-bar.mjs +28 -0
  64. package/fesm2022/ship-ui-core-ship-table-filter-bar.mjs.map +1 -0
  65. package/fesm2022/ship-ui-core-ship-table.mjs +442 -0
  66. package/fesm2022/ship-ui-core-ship-table.mjs.map +1 -0
  67. package/fesm2022/ship-ui-core-ship-tabs.mjs +38 -0
  68. package/fesm2022/ship-ui-core-ship-tabs.mjs.map +1 -0
  69. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs +119 -0
  70. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs.map +1 -0
  71. package/fesm2022/ship-ui-core-ship-toggle-card.mjs +75 -0
  72. package/fesm2022/ship-ui-core-ship-toggle-card.mjs.map +1 -0
  73. package/fesm2022/ship-ui-core-ship-toggle.mjs +105 -0
  74. package/fesm2022/ship-ui-core-ship-toggle.mjs.map +1 -0
  75. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs +186 -0
  76. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs.map +1 -0
  77. package/fesm2022/ship-ui-core.mjs +880 -8782
  78. package/fesm2022/ship-ui-core.mjs.map +1 -1
  79. package/package.json +147 -3
  80. package/styles/core.scss +43 -0
  81. package/styles/helpers.scss +2 -0
  82. package/styles/index.scss +12 -123
  83. package/types/ship-ui-core-sh-form-field-experimental.d.ts +11 -0
  84. package/types/ship-ui-core-ship-accordion.d.ts +19 -0
  85. package/types/ship-ui-core-ship-alert.d.ts +68 -0
  86. package/types/ship-ui-core-ship-blueprint.d.ts +112 -0
  87. package/types/ship-ui-core-ship-button-group.d.ts +15 -0
  88. package/types/ship-ui-core-ship-button.d.ts +13 -0
  89. package/types/ship-ui-core-ship-card.d.ts +11 -0
  90. package/types/ship-ui-core-ship-checkbox.d.ts +22 -0
  91. package/types/ship-ui-core-ship-chip.d.ts +15 -0
  92. package/types/ship-ui-core-ship-color-picker.d.ts +105 -0
  93. package/types/ship-ui-core-ship-datepicker.d.ts +96 -0
  94. package/types/ship-ui-core-ship-dialog.d.ts +76 -0
  95. package/types/ship-ui-core-ship-divider.d.ts +8 -0
  96. package/types/ship-ui-core-ship-event-card.d.ts +11 -0
  97. package/types/ship-ui-core-ship-file-upload.d.ts +20 -0
  98. package/types/ship-ui-core-ship-form-field.d.ts +32 -0
  99. package/types/ship-ui-core-ship-icon.d.ts +18 -0
  100. package/types/ship-ui-core-ship-list.d.ts +8 -0
  101. package/types/ship-ui-core-ship-menu.d.ts +49 -0
  102. package/types/ship-ui-core-ship-popover.d.ts +40 -0
  103. package/types/ship-ui-core-ship-progress-bar.d.ts +14 -0
  104. package/types/ship-ui-core-ship-radio.d.ts +22 -0
  105. package/types/ship-ui-core-ship-range-slider.d.ts +31 -0
  106. package/types/ship-ui-core-ship-select.d.ts +81 -0
  107. package/types/ship-ui-core-ship-sidenav.d.ts +36 -0
  108. package/types/ship-ui-core-ship-sortable.d.ts +72 -0
  109. package/types/ship-ui-core-ship-spinner.d.ts +10 -0
  110. package/types/ship-ui-core-ship-stepper.d.ts +13 -0
  111. package/types/ship-ui-core-ship-table-filter-bar.d.ts +8 -0
  112. package/types/ship-ui-core-ship-table.d.ts +69 -0
  113. package/types/ship-ui-core-ship-tabs.d.ts +14 -0
  114. package/types/ship-ui-core-ship-theme-toggle.d.ts +28 -0
  115. package/types/ship-ui-core-ship-toggle-card.d.ts +15 -0
  116. package/types/ship-ui-core-ship-toggle.d.ts +21 -0
  117. package/types/ship-ui-core-ship-virtual-scroll.d.ts +22 -0
  118. package/types/ship-ui-core.d.ts +88 -1070
  119. package/styles/components/ship-accordion.scss +0 -113
  120. package/styles/components/ship-alert-container.scss +0 -49
  121. package/styles/components/ship-alert.scss +0 -177
  122. package/styles/components/ship-blueprint.scss +0 -242
  123. package/styles/components/ship-button-group.scss +0 -165
  124. package/styles/components/ship-button.scss +0 -141
  125. package/styles/components/ship-card.scss +0 -57
  126. package/styles/components/ship-checkbox.scss +0 -116
  127. package/styles/components/ship-chip.scss +0 -104
  128. package/styles/components/ship-color-picker.scss +0 -150
  129. package/styles/components/ship-datepicker.scss +0 -317
  130. package/styles/components/ship-dialog.scss +0 -152
  131. package/styles/components/ship-divider.scss +0 -27
  132. package/styles/components/ship-event-card.scss +0 -51
  133. package/styles/components/ship-file-upload.scss +0 -47
  134. package/styles/components/ship-form-field.scss +0 -408
  135. package/styles/components/ship-icon.scss +0 -54
  136. package/styles/components/ship-list.scss +0 -165
  137. package/styles/components/ship-menu.scss +0 -237
  138. package/styles/components/ship-popover.scss +0 -205
  139. package/styles/components/ship-progress-bar.scss +0 -173
  140. package/styles/components/ship-radio.scss +0 -113
  141. package/styles/components/ship-range-slider.scss +0 -421
  142. package/styles/components/ship-select.scss +0 -153
  143. package/styles/components/ship-sidenav.scss +0 -195
  144. package/styles/components/ship-sortable.scss +0 -45
  145. package/styles/components/ship-spinner.scss +0 -53
  146. package/styles/components/ship-stepper.scss +0 -158
  147. package/styles/components/ship-table.scss +0 -443
  148. package/styles/components/ship-tabs.scss +0 -125
  149. package/styles/components/ship-theme-toggle.scss +0 -41
  150. package/styles/components/ship-toggle-card.scss +0 -69
  151. package/styles/components/ship-toggle.scss +0 -255
  152. package/styles/components/ship-tooltip.scss +0 -151
  153. package/styles/components/ship-virtual-scroll.scss +0 -12
@@ -0,0 +1,112 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ElementRef, viewChild, signal, input, model, computed, effect, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { ShipFormField } from '@ship-ui/core/ship-form-field';
4
+ import { ShipIcon } from '@ship-ui/core/ship-icon';
5
+
6
+ class ShipFileUpload {
7
+ constructor() {
8
+ this._el = inject(ElementRef);
9
+ this.inputRef = viewChild.required('input');
10
+ this.filesOver = signal(false, /* @ts-ignore */
11
+ ...(ngDevMode ? [{ debugName: "filesOver" }] : /* istanbul ignore next */ []));
12
+ this.multiple = input(/* @ts-ignore */
13
+ ...(ngDevMode ? [undefined, { debugName: "multiple" }] : /* istanbul ignore next */ []));
14
+ this.accept = input(null, /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
16
+ this.placeholder = model('Click or drag files here', /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
18
+ this.overlayText = input('Drop files here', /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "overlayText" }] : /* istanbul ignore next */ []));
20
+ this.files = model([], /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "files" }] : /* istanbul ignore next */ []));
22
+ this.fileUploadClasses = computed(() => this._el.nativeElement.classList.toString(), /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "fileUploadClasses" }] : /* istanbul ignore next */ []));
24
+ this.inputEffect = effect(() => {
25
+ const input = this.inputRef().nativeElement;
26
+ if (!input)
27
+ return;
28
+ if (input.placeholder) {
29
+ this.placeholder.set(input.placeholder);
30
+ }
31
+ input.addEventListener('dragover', (e) => {
32
+ e.preventDefault();
33
+ this.filesOver.set(true);
34
+ });
35
+ input.addEventListener('dragleave', (e) => {
36
+ e.preventDefault();
37
+ this.filesOver.set(false);
38
+ });
39
+ input.addEventListener('drop', (e) => {
40
+ e.preventDefault();
41
+ this.filesOver.set(false);
42
+ const files = e.dataTransfer?.files;
43
+ if (files && files.length > 0) {
44
+ this.handleFileUpload(Array.from(files));
45
+ input.files = files;
46
+ }
47
+ });
48
+ input.addEventListener('change', (e) => {
49
+ e.preventDefault();
50
+ this.handleFileUpload(Array.from(e.target.files));
51
+ });
52
+ }, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "inputEffect" }] : /* istanbul ignore next */ []));
54
+ }
55
+ handleFileUpload(newFiles) {
56
+ if (this.multiple()) {
57
+ this.files.update((currentFiles) => [...currentFiles, ...newFiles]);
58
+ }
59
+ else {
60
+ this.files.set(newFiles);
61
+ }
62
+ }
63
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipFileUpload, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
64
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: ShipFileUpload, isStandalone: true, selector: "sh-file-upload", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, overlayText: { classPropertyName: "overlayText", publicName: "overlayText", isSignal: true, isRequired: false, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { placeholder: "placeholderChange", files: "filesChange" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: `
65
+ <sh-form-field [class]="fileUploadClasses()">
66
+ <ng-content select="label" ngProjectAs="label"></ng-content>
67
+
68
+ <div class="input" ngProjectAs="input" #inputWrap>
69
+ @if (files().length === 1) {
70
+ <div class="files-text">{{ files()[0].name }}</div>
71
+ } @else if (files().length > 1) {
72
+ <div class="files-text">{{ files().length }} files selected</div>
73
+ } @else {
74
+ <div class="placeholder">{{ filesOver() ? overlayText() : placeholder() }}</div>
75
+ }
76
+ <input type="file" [attr.multiple]="multiple()" [attr.accept]="accept()" #input />
77
+ <div class="bg-overlay" [class.files-over]="filesOver()"></div>
78
+ </div>
79
+
80
+ <sh-icon suffix>upload-simple</sh-icon>
81
+ </sh-form-field>
82
+ `, isInline: true, styles: ["sh-file-upload{--fu-bg-active: rgba(0, 0, 0, .1);display:flex;flex-direction:column;gap:.75rem;position:relative;width:100%}sh-file-upload sh-list{border-radius:var(--shape-3);background-color:var(--base-2)}sh-file-upload .files-text,sh-file-upload .placeholder{color:var(--base-8);font:var(--paragraph-30B)}sh-file-upload input{position:absolute;opacity:0;inset:0;cursor:pointer;z-index:100}sh-file-upload .bg-overlay{opacity:0;position:absolute;inset:.0625rem;background-color:var(--fu-bg-active);transition:opacity 125ms linear;z-index:0;border-radius:var(--ff-s)}sh-file-upload .bg-overlay.files-over{opacity:1}\n"], dependencies: [{ kind: "component", type: ShipFormField, selector: "sh-form-field", inputs: ["color", "variant", "size", "readonly"] }, { kind: "component", type: ShipIcon, selector: "sh-icon", inputs: ["color", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
83
+ }
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipFileUpload, decorators: [{
85
+ type: Component,
86
+ args: [{ selector: 'sh-file-upload', encapsulation: ViewEncapsulation.None, imports: [ShipFormField, ShipIcon], template: `
87
+ <sh-form-field [class]="fileUploadClasses()">
88
+ <ng-content select="label" ngProjectAs="label"></ng-content>
89
+
90
+ <div class="input" ngProjectAs="input" #inputWrap>
91
+ @if (files().length === 1) {
92
+ <div class="files-text">{{ files()[0].name }}</div>
93
+ } @else if (files().length > 1) {
94
+ <div class="files-text">{{ files().length }} files selected</div>
95
+ } @else {
96
+ <div class="placeholder">{{ filesOver() ? overlayText() : placeholder() }}</div>
97
+ }
98
+ <input type="file" [attr.multiple]="multiple()" [attr.accept]="accept()" #input />
99
+ <div class="bg-overlay" [class.files-over]="filesOver()"></div>
100
+ </div>
101
+
102
+ <sh-icon suffix>upload-simple</sh-icon>
103
+ </sh-form-field>
104
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["sh-file-upload{--fu-bg-active: rgba(0, 0, 0, .1);display:flex;flex-direction:column;gap:.75rem;position:relative;width:100%}sh-file-upload sh-list{border-radius:var(--shape-3);background-color:var(--base-2)}sh-file-upload .files-text,sh-file-upload .placeholder{color:var(--base-8);font:var(--paragraph-30B)}sh-file-upload input{position:absolute;opacity:0;inset:0;cursor:pointer;z-index:100}sh-file-upload .bg-overlay{opacity:0;position:absolute;inset:.0625rem;background-color:var(--fu-bg-active);transition:opacity 125ms linear;z-index:0;border-radius:var(--ff-s)}sh-file-upload .bg-overlay.files-over{opacity:1}\n"] }]
105
+ }], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }, { type: i0.Output, args: ["placeholderChange"] }], overlayText: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayText", required: false }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }, { type: i0.Output, args: ["filesChange"] }] } });
106
+
107
+ /**
108
+ * Generated bundle index. Do not edit.
109
+ */
110
+
111
+ export { ShipFileUpload };
112
+ //# sourceMappingURL=ship-ui-core-ship-file-upload.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ship-ui-core-ship-file-upload.mjs","sources":["../../../projects/ship-ui/ship-file-upload/ship-file-upload.ts","../../../projects/ship-ui/ship-file-upload/ship-ui-core-ship-file-upload.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, model, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { ShipFormField } from '@ship-ui/core/ship-form-field';\nimport { ShipIcon } from '@ship-ui/core/ship-icon';\n\n@Component({\n selector: 'sh-file-upload',\n styleUrl: './ship-file-upload.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [ShipFormField, ShipIcon],\n template: `\n <sh-form-field [class]=\"fileUploadClasses()\">\n <ng-content select=\"label\" ngProjectAs=\"label\"></ng-content>\n\n <div class=\"input\" ngProjectAs=\"input\" #inputWrap>\n @if (files().length === 1) {\n <div class=\"files-text\">{{ files()[0].name }}</div>\n } @else if (files().length > 1) {\n <div class=\"files-text\">{{ files().length }} files selected</div>\n } @else {\n <div class=\"placeholder\">{{ filesOver() ? overlayText() : placeholder() }}</div>\n }\n <input type=\"file\" [attr.multiple]=\"multiple()\" [attr.accept]=\"accept()\" #input />\n <div class=\"bg-overlay\" [class.files-over]=\"filesOver()\"></div>\n </div>\n\n <sh-icon suffix>upload-simple</sh-icon>\n </sh-form-field>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ShipFileUpload {\n _el = inject(ElementRef);\n inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n filesOver = signal(false);\n multiple = input<boolean | null>();\n accept = input<string | null>(null);\n placeholder = model<string>('Click or drag files here');\n overlayText = input<string>('Drop files here');\n files = model<File[]>([]);\n\n fileUploadClasses = computed(() => this._el.nativeElement.classList.toString());\n\n handleFileUpload(newFiles: File[]) {\n if (this.multiple()) {\n this.files.update((currentFiles) => [...currentFiles, ...newFiles]);\n } else {\n this.files.set(newFiles);\n }\n }\n\n inputEffect = effect(() => {\n const input = this.inputRef().nativeElement;\n\n if (!input) return;\n\n if (input.placeholder) {\n this.placeholder.set(input.placeholder);\n }\n\n input.addEventListener('dragover', (e) => {\n e.preventDefault();\n this.filesOver.set(true);\n });\n\n input.addEventListener('dragleave', (e) => {\n e.preventDefault();\n this.filesOver.set(false);\n });\n\n input.addEventListener('drop', (e) => {\n e.preventDefault();\n this.filesOver.set(false);\n\n const files = e.dataTransfer?.files;\n\n if (files && files.length > 0) {\n this.handleFileUpload(Array.from(files));\n\n (input as HTMLInputElement).files = files;\n }\n });\n\n input.addEventListener('change', (e: any) => {\n e.preventDefault();\n this.handleFileUpload(Array.from(e.target.files));\n });\n });\n}\n","/**\n * Generated bundle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AA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AChCrE;;AAEG;;;;"}
@@ -0,0 +1,310 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ElementRef, input, afterNextRender, HostListener, ChangeDetectionStrategy, ViewEncapsulation, Component, model, output } from '@angular/core';
3
+ import { shipComponentClasses } from '@ship-ui/core';
4
+ import { ShipPopover } from '@ship-ui/core/ship-popover';
5
+
6
+ class ShipFormField {
7
+ #selfRef;
8
+ onClick() {
9
+ if (this.#selfRef.nativeElement.querySelector('input')) {
10
+ this.#selfRef.nativeElement.querySelector('input').focus();
11
+ }
12
+ if (this.#selfRef.nativeElement.querySelector('textarea')) {
13
+ this.#selfRef.nativeElement.querySelector('textarea').focus();
14
+ }
15
+ }
16
+ constructor() {
17
+ this.#selfRef = inject(ElementRef);
18
+ this.color = input(null, /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
20
+ this.variant = input(null, /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
22
+ this.size = input(null, /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
24
+ this.readonly = input(false, /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
26
+ this.hostClasses = shipComponentClasses('formField', {
27
+ color: this.color,
28
+ variant: this.variant,
29
+ size: this.size,
30
+ readonly: this.readonly,
31
+ });
32
+ afterNextRender(() => {
33
+ const el = this.#selfRef.nativeElement;
34
+ const inputEl = el.querySelector('input') || el.querySelector('textarea');
35
+ const labelEl = el.querySelector('label');
36
+ const errorEl = el.querySelector('[error]');
37
+ const hintEl = el.querySelector('[hint]');
38
+ if (inputEl) {
39
+ if (!inputEl.id) {
40
+ inputEl.id = `sh-input-${Math.random().toString(36).substring(2, 9)}`;
41
+ }
42
+ if (labelEl && !labelEl.getAttribute('for')) {
43
+ labelEl.setAttribute('for', inputEl.id);
44
+ }
45
+ const describedBy = [];
46
+ if (errorEl) {
47
+ if (!errorEl.id)
48
+ errorEl.id = `sh-error-${Math.random().toString(36).substring(2, 9)}`;
49
+ describedBy.push(errorEl.id);
50
+ }
51
+ if (hintEl) {
52
+ if (!hintEl.id)
53
+ hintEl.id = `sh-hint-${Math.random().toString(36).substring(2, 9)}`;
54
+ describedBy.push(hintEl.id);
55
+ }
56
+ if (describedBy.length > 0 && !inputEl.hasAttribute('aria-describedby')) {
57
+ inputEl.setAttribute('aria-describedby', describedBy.join(' '));
58
+ }
59
+ }
60
+ const supportFieldSizing = typeof CSS !== 'undefined' && CSS.supports('field-sizing', 'content');
61
+ const text = this.#selfRef.nativeElement.querySelector('textarea');
62
+ if (!supportFieldSizing && text !== null) {
63
+ function resize() {
64
+ text.style.height = 'auto';
65
+ text.style.height = text.scrollHeight + 'px';
66
+ }
67
+ /* 0-timeout to get the already changed text */
68
+ function delayedResize() {
69
+ setTimeout(resize, 0);
70
+ }
71
+ text.addEventListener('change', resize);
72
+ text.addEventListener('cut', delayedResize);
73
+ text.addEventListener('paste', delayedResize);
74
+ text.addEventListener('drop', delayedResize);
75
+ text.addEventListener('keydown', delayedResize);
76
+ text.focus();
77
+ text.select();
78
+ resize();
79
+ }
80
+ });
81
+ }
82
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipFormField, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
83
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ShipFormField, isStandalone: true, selector: "sh-form-field", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, properties: { "class": "hostClasses()" } }, ngImport: i0, template: `
84
+ <ng-content select="label"></ng-content>
85
+
86
+ <div class="input-wrap">
87
+ <div class="prefix">
88
+ <ng-content select="[boxPrefix]"></ng-content>
89
+ <ng-content select="[prefix]"></ng-content>
90
+ <ng-content select="[textPrefix]"></ng-content>
91
+ </div>
92
+
93
+ <ng-content select="input"></ng-content>
94
+ <ng-content select="textarea"></ng-content>
95
+
96
+ <div class="suffix">
97
+ <ng-content select="[textSuffix]"></ng-content>
98
+ <ng-content select="[suffix]"></ng-content>
99
+ <ng-content select="[boxSuffix]"></ng-content>
100
+ </div>
101
+ </div>
102
+
103
+ <div class="helpers">
104
+ <div class="error-wrap">
105
+ <ng-content select="[error]"></ng-content>
106
+ </div>
107
+
108
+ <div class="hint">
109
+ <ng-content select="[hint]"></ng-content>
110
+ </div>
111
+ </div>
112
+ `, isInline: true, styles: ["sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipFormField, decorators: [{
115
+ type: Component,
116
+ args: [{ selector: 'sh-form-field', encapsulation: ViewEncapsulation.None, imports: [], template: `
117
+ <ng-content select="label"></ng-content>
118
+
119
+ <div class="input-wrap">
120
+ <div class="prefix">
121
+ <ng-content select="[boxPrefix]"></ng-content>
122
+ <ng-content select="[prefix]"></ng-content>
123
+ <ng-content select="[textPrefix]"></ng-content>
124
+ </div>
125
+
126
+ <ng-content select="input"></ng-content>
127
+ <ng-content select="textarea"></ng-content>
128
+
129
+ <div class="suffix">
130
+ <ng-content select="[textSuffix]"></ng-content>
131
+ <ng-content select="[suffix]"></ng-content>
132
+ <ng-content select="[boxSuffix]"></ng-content>
133
+ </div>
134
+ </div>
135
+
136
+ <div class="helpers">
137
+ <div class="error-wrap">
138
+ <ng-content select="[error]"></ng-content>
139
+ </div>
140
+
141
+ <div class="hint">
142
+ <ng-content select="[hint]"></ng-content>
143
+ </div>
144
+ </div>
145
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
146
+ '[class]': 'hostClasses()',
147
+ }, styles: ["sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}\n"] }]
148
+ }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], onClick: [{
149
+ type: HostListener,
150
+ args: ['click']
151
+ }] } });
152
+
153
+ class ShipFormFieldPopover {
154
+ constructor() {
155
+ this.#selfRef = inject(ElementRef);
156
+ this.isOpen = model(false, /* @ts-ignore */
157
+ ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
158
+ this.closed = output();
159
+ this.color = input(null, /* @ts-ignore */
160
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
161
+ this.variant = input(null, /* @ts-ignore */
162
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
163
+ this.size = input(null, /* @ts-ignore */
164
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
165
+ this.readonly = input(false, /* @ts-ignore */
166
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
167
+ this.hostClasses = shipComponentClasses('formField', {
168
+ color: this.color,
169
+ variant: this.variant,
170
+ size: this.size,
171
+ readonly: this.readonly,
172
+ });
173
+ }
174
+ #selfRef;
175
+ onClick(event) {
176
+ const target = event.target;
177
+ if (target.closest('.input-wrap')) {
178
+ if (this.#selfRef.nativeElement.querySelector('input')) {
179
+ this.#selfRef.nativeElement.querySelector('input').focus();
180
+ }
181
+ if (this.#selfRef.nativeElement.querySelector('textarea')) {
182
+ this.#selfRef.nativeElement.querySelector('textarea').focus();
183
+ }
184
+ }
185
+ }
186
+ close() {
187
+ this.closed.emit();
188
+ }
189
+ ngOnInit() {
190
+ const supportFieldSizing = typeof CSS !== 'undefined' && CSS.supports('field-sizing', 'content');
191
+ const text = this.#selfRef.nativeElement.querySelector('textarea');
192
+ if (!supportFieldSizing && text !== null) {
193
+ const text = this.#selfRef.nativeElement.querySelector('textarea');
194
+ function resize() {
195
+ text.style.height = 'auto';
196
+ text.style.height = text.scrollHeight + 'px';
197
+ }
198
+ /* 0-timeout to get the already changed text */
199
+ function delayedResize() {
200
+ setTimeout(resize, 0);
201
+ }
202
+ if (text) {
203
+ text.addEventListener('change', resize);
204
+ text.addEventListener('cut', delayedResize);
205
+ text.addEventListener('paste', delayedResize);
206
+ text.addEventListener('drop', delayedResize);
207
+ text.addEventListener('keydown', delayedResize);
208
+ text.focus();
209
+ text.select();
210
+ resize();
211
+ }
212
+ }
213
+ }
214
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipFormFieldPopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
215
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: ShipFormFieldPopover, isStandalone: true, selector: "sh-form-field-popover", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", closed: "closed" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class": "hostClasses()" } }, ngImport: i0, template: `
216
+ <ng-content select="label"></ng-content>
217
+
218
+ <sh-popover
219
+ [(isOpen)]="isOpen"
220
+ (closed)="close()"
221
+ [asSheetOnMobile]="true"
222
+ [options]="{
223
+ closeOnButton: false,
224
+ closeOnEsc: true,
225
+ }">
226
+ <div trigger class="input-wrap" [class.is-open]="isOpen()">
227
+ <div class="prefix">
228
+ <ng-content select="[prefix]"></ng-content>
229
+ <ng-content select="[textPrefix]"></ng-content>
230
+ </div>
231
+
232
+ <div class="prefix-space"></div>
233
+
234
+ <ng-content select="input"></ng-content>
235
+
236
+ <ng-content select="textarea"></ng-content>
237
+
238
+ <ng-content select="[textSuffix]"></ng-content>
239
+ <div class="suffix-space"></div>
240
+ <ng-content select="[suffix]"></ng-content>
241
+ </div>
242
+ <ng-content select="[popoverContent]"></ng-content>
243
+ </sh-popover>
244
+
245
+ <div class="helpers">
246
+ <div class="error-wrap">
247
+ <ng-content select="[error]"></ng-content>
248
+ </div>
249
+
250
+ <div class="hint">
251
+ <ng-content select="[hint]"></ng-content>
252
+ </div>
253
+ </div>
254
+ `, isInline: true, styles: ["sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}\n"], dependencies: [{ kind: "component", type: ShipPopover, selector: "sh-popover", inputs: ["asMultiLayer", "asSheetOnMobile", "disableOpenByClick", "isOpen", "options"], outputs: ["isOpenChange", "closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
255
+ }
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipFormFieldPopover, decorators: [{
257
+ type: Component,
258
+ args: [{ selector: 'sh-form-field-popover', encapsulation: ViewEncapsulation.None, imports: [ShipPopover], template: `
259
+ <ng-content select="label"></ng-content>
260
+
261
+ <sh-popover
262
+ [(isOpen)]="isOpen"
263
+ (closed)="close()"
264
+ [asSheetOnMobile]="true"
265
+ [options]="{
266
+ closeOnButton: false,
267
+ closeOnEsc: true,
268
+ }">
269
+ <div trigger class="input-wrap" [class.is-open]="isOpen()">
270
+ <div class="prefix">
271
+ <ng-content select="[prefix]"></ng-content>
272
+ <ng-content select="[textPrefix]"></ng-content>
273
+ </div>
274
+
275
+ <div class="prefix-space"></div>
276
+
277
+ <ng-content select="input"></ng-content>
278
+
279
+ <ng-content select="textarea"></ng-content>
280
+
281
+ <ng-content select="[textSuffix]"></ng-content>
282
+ <div class="suffix-space"></div>
283
+ <ng-content select="[suffix]"></ng-content>
284
+ </div>
285
+ <ng-content select="[popoverContent]"></ng-content>
286
+ </sh-popover>
287
+
288
+ <div class="helpers">
289
+ <div class="error-wrap">
290
+ <ng-content select="[error]"></ng-content>
291
+ </div>
292
+
293
+ <div class="hint">
294
+ <ng-content select="[hint]"></ng-content>
295
+ </div>
296
+ </div>
297
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
298
+ '[class]': 'hostClasses()',
299
+ }, styles: ["sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}\n"] }]
300
+ }], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], closed: [{ type: i0.Output, args: ["closed"] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], onClick: [{
301
+ type: HostListener,
302
+ args: ['click', ['$event']]
303
+ }] } });
304
+
305
+ /**
306
+ * Generated bundle index. Do not edit.
307
+ */
308
+
309
+ export { ShipFormField, ShipFormFieldPopover };
310
+ //# sourceMappingURL=ship-ui-core-ship-form-field.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ship-ui-core-ship-form-field.mjs","sources":["../../../projects/ship-ui/ship-form-field/ship-form-field.ts","../../../projects/ship-ui/ship-form-field/ship-form-field-popover.ts","../../../projects/ship-ui/ship-form-field/ship-ui-core-ship-form-field.ts"],"sourcesContent":["import { afterNextRender, ChangeDetectionStrategy, Component, ElementRef, HostListener, inject, input, ViewEncapsulation } from '@angular/core';\nimport { shipComponentClasses } from '@ship-ui/core';\nimport { ShipColor, ShipFormFieldVariant, ShipSize } from '@ship-ui/core';\n\n@Component({\n selector: 'sh-form-field',\n styleUrl: './ship-form-field.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [],\n template: `\n <ng-content select=\"label\"></ng-content>\n\n <div class=\"input-wrap\">\n <div class=\"prefix\">\n <ng-content select=\"[boxPrefix]\"></ng-content>\n <ng-content select=\"[prefix]\"></ng-content>\n <ng-content select=\"[textPrefix]\"></ng-content>\n </div>\n\n <ng-content select=\"input\"></ng-content>\n <ng-content select=\"textarea\"></ng-content>\n\n <div class=\"suffix\">\n <ng-content select=\"[textSuffix]\"></ng-content>\n <ng-content select=\"[suffix]\"></ng-content>\n <ng-content select=\"[boxSuffix]\"></ng-content>\n </div>\n </div>\n\n <div class=\"helpers\">\n <div class=\"error-wrap\">\n <ng-content select=\"[error]\"></ng-content>\n </div>\n\n <div class=\"hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n },\n})\nexport class ShipFormField {\n #selfRef = inject(ElementRef);\n\n color = input<ShipColor | null>(null);\n variant = input<ShipFormFieldVariant | null>(null);\n size = input<ShipSize | null>(null);\n readonly = input<boolean>(false);\n\n hostClasses = shipComponentClasses('formField', {\n color: this.color,\n variant: this.variant,\n size: this.size,\n readonly: this.readonly,\n });\n\n @HostListener('click')\n onClick() {\n if (this.#selfRef.nativeElement.querySelector('input')) {\n this.#selfRef.nativeElement.querySelector('input').focus();\n }\n\n if (this.#selfRef.nativeElement.querySelector('textarea')) {\n this.#selfRef.nativeElement.querySelector('textarea').focus();\n }\n }\n\n constructor() {\n afterNextRender(() => {\n const el = this.#selfRef.nativeElement;\n const inputEl = el.querySelector('input') || el.querySelector('textarea');\n const labelEl = el.querySelector('label');\n const errorEl = el.querySelector('[error]');\n const hintEl = el.querySelector('[hint]');\n\n if (inputEl) {\n if (!inputEl.id) {\n inputEl.id = `sh-input-${Math.random().toString(36).substring(2, 9)}`;\n }\n\n if (labelEl && !labelEl.getAttribute('for')) {\n labelEl.setAttribute('for', inputEl.id);\n }\n\n const describedBy: string[] = [];\n if (errorEl) {\n if (!errorEl.id) errorEl.id = `sh-error-${Math.random().toString(36).substring(2, 9)}`;\n describedBy.push(errorEl.id);\n }\n if (hintEl) {\n if (!hintEl.id) hintEl.id = `sh-hint-${Math.random().toString(36).substring(2, 9)}`;\n describedBy.push(hintEl.id);\n }\n\n if (describedBy.length > 0 && !inputEl.hasAttribute('aria-describedby')) {\n inputEl.setAttribute('aria-describedby', describedBy.join(' '));\n }\n }\n\n const supportFieldSizing = typeof CSS !== 'undefined' && CSS.supports('field-sizing', 'content');\n const text = this.#selfRef.nativeElement.querySelector('textarea');\n\n if (!supportFieldSizing && text !== null) {\n function resize() {\n text.style.height = 'auto';\n text.style.height = text.scrollHeight + 'px';\n }\n\n /* 0-timeout to get the already changed text */\n function delayedResize() {\n setTimeout(resize, 0);\n }\n\n text.addEventListener('change', resize);\n text.addEventListener('cut', delayedResize);\n text.addEventListener('paste', delayedResize);\n text.addEventListener('drop', delayedResize);\n text.addEventListener('keydown', delayedResize);\n\n text.focus();\n text.select();\n resize();\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, HostListener, inject, input, model, output, ViewEncapsulation } from '@angular/core';\nimport { ShipPopover } from '@ship-ui/core/ship-popover';\nimport { shipComponentClasses } from '@ship-ui/core';\nimport { ShipColor, ShipFormFieldVariant, ShipSize } from '@ship-ui/core';\n\n@Component({\n selector: 'sh-form-field-popover',\n styleUrl: './ship-form-field.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [ShipPopover],\n template: `\n <ng-content select=\"label\"></ng-content>\n\n <sh-popover\n [(isOpen)]=\"isOpen\"\n (closed)=\"close()\"\n [asSheetOnMobile]=\"true\"\n [options]=\"{\n closeOnButton: false,\n closeOnEsc: true,\n }\">\n <div trigger class=\"input-wrap\" [class.is-open]=\"isOpen()\">\n <div class=\"prefix\">\n <ng-content select=\"[prefix]\"></ng-content>\n <ng-content select=\"[textPrefix]\"></ng-content>\n </div>\n\n <div class=\"prefix-space\"></div>\n\n <ng-content select=\"input\"></ng-content>\n\n <ng-content select=\"textarea\"></ng-content>\n\n <ng-content select=\"[textSuffix]\"></ng-content>\n <div class=\"suffix-space\"></div>\n <ng-content select=\"[suffix]\"></ng-content>\n </div>\n <ng-content select=\"[popoverContent]\"></ng-content>\n </sh-popover>\n\n <div class=\"helpers\">\n <div class=\"error-wrap\">\n <ng-content select=\"[error]\"></ng-content>\n </div>\n\n <div class=\"hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n },\n})\nexport class ShipFormFieldPopover {\n #selfRef = inject(ElementRef);\n\n isOpen = model<boolean>(false);\n closed = output<void>();\n\n color = input<ShipColor | null>(null);\n variant = input<ShipFormFieldVariant | null>(null);\n size = input<ShipSize | null>(null);\n readonly = input<boolean>(false);\n\n hostClasses = shipComponentClasses('formField', {\n color: this.color,\n variant: this.variant,\n size: this.size,\n readonly: this.readonly,\n });\n\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n if (target.closest('.input-wrap')) {\n if (this.#selfRef.nativeElement.querySelector('input')) {\n this.#selfRef.nativeElement.querySelector('input').focus();\n }\n \n if (this.#selfRef.nativeElement.querySelector('textarea')) {\n this.#selfRef.nativeElement.querySelector('textarea').focus();\n }\n }\n }\n\n close() {\n this.closed.emit();\n }\n\n ngOnInit() {\n const supportFieldSizing = typeof CSS !== 'undefined' && CSS.supports('field-sizing', 'content');\n const text = this.#selfRef.nativeElement.querySelector('textarea');\n\n if (!supportFieldSizing && text !== null) {\n const text = this.#selfRef.nativeElement.querySelector('textarea');\n\n function resize() {\n text.style.height = 'auto';\n text.style.height = text.scrollHeight + 'px';\n }\n\n /* 0-timeout to get the already changed text */\n function delayedResize() {\n setTimeout(resize, 0);\n }\n\n if (text) {\n text.addEventListener('change', resize);\n text.addEventListener('cut', delayedResize);\n text.addEventListener('paste', delayedResize);\n text.addEventListener('drop', delayedResize);\n text.addEventListener('keydown', delayedResize);\n\n text.focus();\n text.select();\n resize();\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MA4Ca,aAAa,CAAA;AACxB,IAAA,QAAQ;IAeR,OAAO,GAAA;QACL,IAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE;AACtD,YAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE;QAC5D;QAEA,IAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE;AACzD,YAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE;QAC/D;IACF;AAEA,IAAA,WAAA,GAAA;AAzBA,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;QAE7B,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,IAAI;kFAAC;QACrC,IA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