@forgeroute/ui 0.5.26 → 0.5.28
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.
- package/fesm2022/forgeroute-ui-card-list-item.mjs +72 -35
- package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-checkbox.mjs +2 -2
- package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-color-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-combobox.mjs +2 -2
- package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-contact-picker.mjs +4 -4
- package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-conversations.mjs +2 -0
- package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-data-table-core.mjs +2 -2
- package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-date-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-datetime-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-detail-card.mjs +20 -4
- package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-dropdown.mjs +16 -2
- package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-file-input.mjs +7 -5
- package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-icon-picker.mjs +2 -2
- package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-media.mjs +67 -2
- package/fesm2022/forgeroute-ui-media.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-messaging.mjs +3 -0
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-multi-select.mjs +2 -2
- package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-notes.mjs +1 -0
- package/fesm2022/forgeroute-ui-notes.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-option-card.mjs +1 -0
- package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-payments.mjs +3 -0
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-pdf.mjs +1 -0
- package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-quickbooks.mjs +1 -0
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-radio-matrix.mjs +2 -2
- package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-radio.mjs +2 -2
- package/fesm2022/forgeroute-ui-radio.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-select.mjs +2 -2
- package/fesm2022/forgeroute-ui-select.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-setup.mjs +1 -0
- package/fesm2022/forgeroute-ui-setup.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-square.mjs +1 -0
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-star-rating.mjs +2 -2
- package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-swatch-picker.mjs +2 -2
- package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-table-toolbar.mjs +17 -5
- package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-text-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-textarea-input.mjs +23 -36
- package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-time-input.mjs +2 -2
- package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-card-list-item.d.ts +21 -11
- package/types/forgeroute-ui-detail-card.d.ts +7 -0
- package/types/forgeroute-ui-dropdown.d.ts +2 -0
- package/types/forgeroute-ui-media.d.ts +28 -0
- package/types/forgeroute-ui-quickbooks.d.ts +1 -1
- package/types/forgeroute-ui-square.d.ts +4 -4
- package/types/forgeroute-ui-stripe.d.ts +4 -4
- package/types/forgeroute-ui-textarea-input.d.ts +9 -9
|
@@ -245,7 +245,7 @@ var SwatchPickerComponent = class SwatchPickerComponent {
|
|
|
245
245
|
</fieldset>
|
|
246
246
|
`,
|
|
247
247
|
isInline: true,
|
|
248
|
-
styles: [":host{display:block}.sp-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.sp-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sp-required{color:#dc2626;margin-left:2px}.sp-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.sp-options.sp-grid{display:grid;grid-template-columns:repeat(var(--sp-cols),max-content)}.sp-option{position:relative;display:inline-flex;cursor:pointer}.sp-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.sp-swatch{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 1px #94a3b8;transition:box-shadow .12s}.sp-option:hover .sp-swatch{box-shadow:0 0 0 2px #64748b}.sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #1e293b}.sp-input:focus-visible+.sp-swatch{outline:2px solid #3b82f6;outline-offset:3px}.sp-check-outline{stroke:#0f172abf}.sp-check-mark{stroke:#fff}.sp-option-disabled{cursor:not-allowed;opacity:.45}.sp-error .sp-option .sp-swatch{box-shadow:0 0 0 1px #dc2626}.sp-error .sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #dc2626}.sp-desc{margin
|
|
248
|
+
styles: [":host{display:block}.sp-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.sp-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sp-required{color:#dc2626;margin-left:2px}.sp-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.sp-options.sp-grid{display:grid;grid-template-columns:repeat(var(--sp-cols),max-content)}.sp-option{position:relative;display:inline-flex;cursor:pointer}.sp-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.sp-swatch{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 1px #94a3b8;transition:box-shadow .12s}.sp-option:hover .sp-swatch{box-shadow:0 0 0 2px #64748b}.sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #1e293b}.sp-input:focus-visible+.sp-swatch{outline:2px solid #3b82f6;outline-offset:3px}.sp-check-outline{stroke:#0f172abf}.sp-check-mark{stroke:#fff}.sp-option-disabled{cursor:not-allowed;opacity:.45}.sp-error .sp-option .sp-swatch{box-shadow:0 0 0 1px #dc2626}.sp-error .sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #dc2626}.sp-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b;overflow-wrap:anywhere}.sp-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sp-options{gap:4px}.sp-option{min-width:44px;min-height:44px;align-items:center;justify-content:center}.sp-options.sp-grid{grid-template-columns:repeat(auto-fill,44px)}}\n"],
|
|
249
249
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
250
250
|
});
|
|
251
251
|
}
|
|
@@ -324,7 +324,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
324
324
|
}
|
|
325
325
|
</fieldset>
|
|
326
326
|
`,
|
|
327
|
-
styles: [":host{display:block}.sp-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.sp-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sp-required{color:#dc2626;margin-left:2px}.sp-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.sp-options.sp-grid{display:grid;grid-template-columns:repeat(var(--sp-cols),max-content)}.sp-option{position:relative;display:inline-flex;cursor:pointer}.sp-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.sp-swatch{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 1px #94a3b8;transition:box-shadow .12s}.sp-option:hover .sp-swatch{box-shadow:0 0 0 2px #64748b}.sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #1e293b}.sp-input:focus-visible+.sp-swatch{outline:2px solid #3b82f6;outline-offset:3px}.sp-check-outline{stroke:#0f172abf}.sp-check-mark{stroke:#fff}.sp-option-disabled{cursor:not-allowed;opacity:.45}.sp-error .sp-option .sp-swatch{box-shadow:0 0 0 1px #dc2626}.sp-error .sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #dc2626}.sp-desc{margin
|
|
327
|
+
styles: [":host{display:block}.sp-field{display:flex;flex-direction:column;gap:6px;border:0;margin:0;padding:0;min-width:0}.sp-label{padding:0;margin-bottom:6px;font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.sp-required{color:#dc2626;margin-left:2px}.sp-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0}.sp-options.sp-grid{display:grid;grid-template-columns:repeat(var(--sp-cols),max-content)}.sp-option{position:relative;display:inline-flex;cursor:pointer}.sp-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.sp-swatch{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;box-sizing:border-box;border:2px solid #fff;box-shadow:0 0 0 1px #94a3b8;transition:box-shadow .12s}.sp-option:hover .sp-swatch{box-shadow:0 0 0 2px #64748b}.sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #1e293b}.sp-input:focus-visible+.sp-swatch{outline:2px solid #3b82f6;outline-offset:3px}.sp-check-outline{stroke:#0f172abf}.sp-check-mark{stroke:#fff}.sp-option-disabled{cursor:not-allowed;opacity:.45}.sp-error .sp-option .sp-swatch{box-shadow:0 0 0 1px #dc2626}.sp-error .sp-option.sp-selected .sp-swatch{box-shadow:0 0 0 3px #dc2626}.sp-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b;overflow-wrap:anywhere}.sp-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.sp-options{gap:4px}.sp-option{min-width:44px;min-height:44px;align-items:center;justify-content:center}.sp-options.sp-grid{grid-template-columns:repeat(auto-fill,44px)}}\n"]
|
|
328
328
|
}]
|
|
329
329
|
}],
|
|
330
330
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-swatch-picker.mjs","names":[],"sources":["../../../projects/forgeroute-ui/swatch-picker/src/lib/swatch-picker/swatch-picker.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ElementRef, input, output, signal, computed, effect, forwardRef, inject } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { uiText } from '@forgeroute/ui/core';\n\nexport interface SwatchOption {\n value: string;\n /** Accessible name and tooltip of the swatch (e.g. \"Ocean blue\"). */\n label: string;\n /** Any CSS colour (`#2563eb`, `rgb(...)`, `var(--x)`). */\n color: string;\n disabled?: boolean;\n /** `data-testid` of this option's native radio input; none when omitted. */\n testId?: string;\n}\n\n/**\n * (library source 2026-11-05, not yet published) Colour swatch picker: a `<fieldset role=\"radiogroup\">` of native radio inputs\n * (arrow keys move + select natively, Home / End jump to the first / last enabled swatch), ControlValueAccessor with a string value\n * (`''` = nothing selected). The selected swatch shows a check mark and a ring (never colour alone); every swatch is named by its `label`\n * (accessible name + `title` tooltip). Built-in validation like `ui-radio-group`: `required` -> \"<label> is required.\"; a value that is not one\n * of the `options` -> \"Select a valid option.\" (not checked while `options` is empty); a disabled picker is never invalid.\n * `disabled` combines with the forms API (`setDisabledState`). 44px touch targets on touch devices and phones; the swatches wrap.\n */\n@Component({\n selector: 'ui-swatch-picker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwatchPickerComponent), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => SwatchPickerComponent), multi: true },\n { provide: UiFieldValidity, useExisting: forwardRef(() => SwatchPickerComponent) },\n ],\n template: `\n <fieldset\n class=\"sp-field\"\n role=\"radiogroup\"\n [class.sp-error]=\"_activeError()\"\n [class.sp-disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\"\n (focusout)=\"onFocusOut($event)\"\n (keydown)=\"onKeydown($event)\">\n @if (label()) {\n <legend class=\"sp-label\">\n {{ label() }}\n @if (required()) { <span class=\"sp-required\" aria-hidden=\"true\">*</span> }\n </legend>\n }\n <div class=\"sp-options\" [class.sp-grid]=\"columns() > 0\" [style.--sp-cols]=\"columns() > 0 ? columns() : null\">\n @for (opt of options(); track opt.value) {\n <label class=\"sp-option\" [class.sp-selected]=\"_value() === opt.value\" [class.sp-option-disabled]=\"disabled() || !!opt.disabled\" [attr.title]=\"opt.label\">\n <input class=\"sp-input\" type=\"radio\"\n [name]=\"_name\"\n [value]=\"opt.value\"\n [checked]=\"_value() === opt.value\"\n [disabled]=\"disabled() || !!opt.disabled\"\n [attr.aria-label]=\"opt.label\"\n [attr.data-testid]=\"opt.testId || null\"\n (change)=\"onSelect(opt.value)\" />\n <span class=\"sp-swatch\" [style.background-color]=\"opt.color\" aria-hidden=\"true\">\n @if (_value() === opt.value) {\n <svg class=\"sp-check\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M5 12.5l4.5 4.5L19 7.5\" class=\"sp-check-outline\" stroke-width=\"5\"/>\n <path d=\"M5 12.5l4.5 4.5L19 7.5\" class=\"sp-check-mark\" stroke-width=\"3\"/>\n </svg>\n }\n </span>\n </label>\n }\n </div>\n @if (_activeError()) {\n <p class=\"sp-desc sp-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"sp-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n `,\n styles: [`\n :host { display: block; }\n .sp-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }\n .sp-label { padding: 0; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .sp-required { color: #dc2626; margin-left: 2px; }\n .sp-options { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }\n .sp-options.sp-grid { display: grid; grid-template-columns: repeat(var(--sp-cols), max-content); }\n .sp-option { position: relative; display: inline-flex; cursor: pointer; }\n .sp-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }\n .sp-swatch {\n display: inline-flex; align-items: center; justify-content: center;\n width: 32px; height: 32px; border-radius: 50%; box-sizing: border-box;\n border: 2px solid #fff; box-shadow: 0 0 0 1px #94a3b8;\n transition: box-shadow 0.12s;\n }\n .sp-option:hover .sp-swatch { box-shadow: 0 0 0 2px #64748b; }\n /* three classes like the hover rule above, later in the source, so hovering the selected swatch keeps its ring */\n .sp-option.sp-selected .sp-swatch { box-shadow: 0 0 0 3px #1e293b; }\n .sp-input:focus-visible + .sp-swatch { outline: 2px solid #3b82f6; outline-offset: 3px; }\n .sp-check-outline { stroke: rgba(15, 23, 42, 0.75); }\n .sp-check-mark { stroke: #fff; }\n .sp-option-disabled { cursor: not-allowed; opacity: 0.45; }\n .sp-error .sp-option .sp-swatch { box-shadow: 0 0 0 1px #dc2626; }\n .sp-error .sp-option.sp-selected .sp-swatch { box-shadow: 0 0 0 3px #dc2626; }\n .sp-desc { margin: 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; overflow-wrap: anywhere; }\n .sp-desc-error { color: #dc2626; }\n @media (pointer: coarse), (max-width: 480px) {\n .sp-options { gap: 4px; }\n .sp-option { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }\n .sp-options.sp-grid { grid-template-columns: repeat(auto-fill, 44px); }\n }\n `],\n})\nexport class SwatchPickerComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n private readonly _el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly label = input('');\n readonly options = input<SwatchOption[]>([]);\n readonly required = input(false);\n readonly hint = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n /** Fixed number of swatches per row (0 = wrap freely, the default). On a phone the row wraps by width instead. */\n readonly columns = input(0);\n /** Native `name` shared by the radios; a unique one is generated when omitted. */\n readonly name = input('');\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _generatedName = `sp-${Math.random().toString(36).slice(2, 8)}`;\n protected get _name(): string { return this.name() || this._generatedName; }\n protected readonly _descId = `${this._generatedName}-desc`;\n protected readonly _value = signal('');\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n readonly invalidChange = output<boolean>();\n /** Emits the chosen value on a user pick. */\n readonly valueChange = output<string>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const v = control.value;\n return issueToErrors(this._check(v == null ? '' : String(v)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _onChange = (_: string) => {};\n private _onTouched = () => {};\n\n writeValue(val: string) { this._value.set(val ?? ''); }\n registerOnChange(fn: (v: string) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onSelect(value: string) {\n if (this.disabled()) return;\n this._value.set(value);\n this._onChange(value);\n this.valueChange.emit(value);\n }\n\n /** Home / End select the first / last enabled swatch (arrow keys are native radio behaviour). */\n protected onKeydown(e: KeyboardEvent) {\n if ((e.key !== 'Home' && e.key !== 'End') || this.disabled()) return;\n const opts = this.options();\n const enabled = opts.filter(o => !o.disabled);\n if (!enabled.length) return;\n e.preventDefault();\n const target = e.key === 'Home' ? enabled[0] : enabled[enabled.length - 1];\n this.onSelect(target.value);\n const inputs = this._el.nativeElement.querySelectorAll<HTMLInputElement>('input[type=radio]');\n inputs[opts.indexOf(target)]?.focus();\n }\n\n /** Touched once focus leaves the whole group. */\n protected onFocusOut(event: FocusEvent) {\n const next = event.relatedTarget as Node | null;\n if (next && (event.currentTarget as HTMLElement).contains(next)) return;\n this._onTouched();\n this._reveal.touched.set(true);\n }\n\n private _check(value: string): FieldIssue | null {\n if (this.disabled()) return null;\n if (!value) return this.required() ? requiredIssue(this.label()) : null;\n const opts = this.options();\n if (opts.length > 0 && !opts.some(o => o.value === value)) return { key: 'option', message: uiText('common.selectValidOption') };\n return null;\n }\n}\n"],"mappings":";;;;AAiHA,IAAa,wBAAb,MAAa,sBAAqB;CAoBhC,IAAc,QAAK;EAAa,OAAO,KAAK,KAAI,KAAM,KAAK;CAAgB;CAc3E,cAAA;EAjCiB,KAAA,MAAM,OAAgC,UAAU;EAExD,KAAA,QAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACpB,KAAA,UAAW,MAAsB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EACpC,KAAA,WAAW,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EACvB,KAAA,OAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EACpB,KAAA,QAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEpB,KAAA,aAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAEzB,KAAA,UAAW,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAEnB,KAAA,OAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAEpB,KAAA,iBAAiB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,iBAAA,+BAAA,CAAA;GAAI,OAAO;EAAU,CAAA;EACzC,KAAA,eAAe,O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AA;IAAA,aAAA;GAAA;GAAA,WArFrB;IACT;KAAE,SAAS;KAAmB,aAAa,iBAAiB,qBAAqB;KAAG,OAAO;IAAI;IAC/F;KAAE,SAAS;KAAe,aAAa,iBAAiB,qBAAqB;KAAG,OAAO;IAAI;IAC3F;KAAE,SAAS;KAAiB,aAAa,iBAAiB,qBAAqB;IAAC;GACjF;GAAA,eAAA;GAAA,UAAA;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CT,UAAA;GAAA,QAAA,CAAA,qhDAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAkCU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAzFjC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,YAChB;GAAI,iBACC,wBAAwB;GAAM,WACpC;IACT;KAAE,SAAS;KAAmB,aAAa,iBAAgB,qBAAsB;KAAG,OAAO;IAAI;IAC/F;KAAE,SAAS;KAAe,aAAa,iBAAgB,qBAAsB;KAAG,OAAO;IAAI;IAC3F;KAAE,SAAS;KAAiB,aAAa,iBAAgB,qBAAsB;IAAC;GACjF;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CT,QAAA,CAAA,qhDAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-swatch-picker.mjs","names":[],"sources":["../../../projects/forgeroute-ui/swatch-picker/src/lib/swatch-picker/swatch-picker.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ElementRef, input, output, signal, computed, effect, forwardRef, inject } from '@angular/core';\nimport { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';\nimport { FieldIssue, UiFieldValidity, createFieldReveal, issueToErrors, requiredIssue } from '@forgeroute/ui/core';\nimport { uiText } from '@forgeroute/ui/core';\n\nexport interface SwatchOption {\n value: string;\n /** Accessible name and tooltip of the swatch (e.g. \"Ocean blue\"). */\n label: string;\n /** Any CSS colour (`#2563eb`, `rgb(...)`, `var(--x)`). */\n color: string;\n disabled?: boolean;\n /** `data-testid` of this option's native radio input; none when omitted. */\n testId?: string;\n}\n\n/**\n * (library source 2026-11-05, not yet published) Colour swatch picker: a `<fieldset role=\"radiogroup\">` of native radio inputs\n * (arrow keys move + select natively, Home / End jump to the first / last enabled swatch), ControlValueAccessor with a string value\n * (`''` = nothing selected). The selected swatch shows a check mark and a ring (never colour alone); every swatch is named by its `label`\n * (accessible name + `title` tooltip). Built-in validation like `ui-radio-group`: `required` -> \"<label> is required.\"; a value that is not one\n * of the `options` -> \"Select a valid option.\" (not checked while `options` is empty); a disabled picker is never invalid.\n * `disabled` combines with the forms API (`setDisabledState`). 44px touch targets on touch devices and phones; the swatches wrap.\n */\n@Component({\n selector: 'ui-swatch-picker',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwatchPickerComponent), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => SwatchPickerComponent), multi: true },\n { provide: UiFieldValidity, useExisting: forwardRef(() => SwatchPickerComponent) },\n ],\n template: `\n <fieldset\n class=\"sp-field\"\n role=\"radiogroup\"\n [class.sp-error]=\"_activeError()\"\n [class.sp-disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-invalid]=\"_activeError() ? 'true' : null\"\n [attr.aria-describedby]=\"(_activeError() || hint()) ? _descId : null\"\n (focusout)=\"onFocusOut($event)\"\n (keydown)=\"onKeydown($event)\">\n @if (label()) {\n <legend class=\"sp-label\">\n {{ label() }}\n @if (required()) { <span class=\"sp-required\" aria-hidden=\"true\">*</span> }\n </legend>\n }\n <div class=\"sp-options\" [class.sp-grid]=\"columns() > 0\" [style.--sp-cols]=\"columns() > 0 ? columns() : null\">\n @for (opt of options(); track opt.value) {\n <label class=\"sp-option\" [class.sp-selected]=\"_value() === opt.value\" [class.sp-option-disabled]=\"disabled() || !!opt.disabled\" [attr.title]=\"opt.label\">\n <input class=\"sp-input\" type=\"radio\"\n [name]=\"_name\"\n [value]=\"opt.value\"\n [checked]=\"_value() === opt.value\"\n [disabled]=\"disabled() || !!opt.disabled\"\n [attr.aria-label]=\"opt.label\"\n [attr.data-testid]=\"opt.testId || null\"\n (change)=\"onSelect(opt.value)\" />\n <span class=\"sp-swatch\" [style.background-color]=\"opt.color\" aria-hidden=\"true\">\n @if (_value() === opt.value) {\n <svg class=\"sp-check\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M5 12.5l4.5 4.5L19 7.5\" class=\"sp-check-outline\" stroke-width=\"5\"/>\n <path d=\"M5 12.5l4.5 4.5L19 7.5\" class=\"sp-check-mark\" stroke-width=\"3\"/>\n </svg>\n }\n </span>\n </label>\n }\n </div>\n @if (_activeError()) {\n <p class=\"sp-desc sp-desc-error\" [id]=\"_descId\" role=\"alert\">{{ _activeError() }}</p>\n } @else if (hint()) {\n <p class=\"sp-desc\" [id]=\"_descId\">{{ hint() }}</p>\n }\n </fieldset>\n `,\n styles: [`\n :host { display: block; }\n .sp-field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }\n .sp-label { padding: 0; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: #374151; line-height: 1; }\n .sp-required { color: #dc2626; margin-left: 2px; }\n .sp-options { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }\n .sp-options.sp-grid { display: grid; grid-template-columns: repeat(var(--sp-cols), max-content); }\n .sp-option { position: relative; display: inline-flex; cursor: pointer; }\n .sp-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }\n .sp-swatch {\n display: inline-flex; align-items: center; justify-content: center;\n width: 32px; height: 32px; border-radius: 50%; box-sizing: border-box;\n border: 2px solid #fff; box-shadow: 0 0 0 1px #94a3b8;\n transition: box-shadow 0.12s;\n }\n .sp-option:hover .sp-swatch { box-shadow: 0 0 0 2px #64748b; }\n /* three classes like the hover rule above, later in the source, so hovering the selected swatch keeps its ring */\n .sp-option.sp-selected .sp-swatch { box-shadow: 0 0 0 3px #1e293b; }\n .sp-input:focus-visible + .sp-swatch { outline: 2px solid #3b82f6; outline-offset: 3px; }\n .sp-check-outline { stroke: rgba(15, 23, 42, 0.75); }\n .sp-check-mark { stroke: #fff; }\n .sp-option-disabled { cursor: not-allowed; opacity: 0.45; }\n .sp-error .sp-option .sp-swatch { box-shadow: 0 0 0 1px #dc2626; }\n .sp-error .sp-option.sp-selected .sp-swatch { box-shadow: 0 0 0 3px #dc2626; }\n .sp-desc { margin: -6px 0 0; font-size: 0.75rem; line-height: 1.4; color: #64748b; overflow-wrap: anywhere; }\n .sp-desc-error { color: #dc2626; }\n @media (pointer: coarse), (max-width: 480px) {\n .sp-options { gap: 4px; }\n .sp-option { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }\n .sp-options.sp-grid { grid-template-columns: repeat(auto-fill, 44px); }\n }\n `],\n})\nexport class SwatchPickerComponent implements ControlValueAccessor, Validator, UiFieldValidity {\n private readonly _el = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly label = input('');\n readonly options = input<SwatchOption[]>([]);\n readonly required = input(false);\n readonly hint = input('');\n readonly error = input('');\n /** The host's \"tried to submit\" flag (e.g. after a failed Save click). `true` reveals the message of an untouched field at once (the field also shows it after the user left THIS field); switching it from true back to false forgets that the field was left. */\n readonly showErrors = input(false);\n /** Fixed number of swatches per row (0 = wrap freely, the default). On a phone the row wraps by width instead. */\n readonly columns = input(0);\n /** Native `name` shared by the radios; a unique one is generated when omitted. */\n readonly name = input('');\n\n readonly _disabledInput = input(false, { alias: 'disabled' });\n private readonly _cvaDisabled = signal(false);\n protected readonly disabled = computed(() => this._disabledInput() || this._cvaDisabled());\n\n private readonly _generatedName = `sp-${Math.random().toString(36).slice(2, 8)}`;\n protected get _name(): string { return this.name() || this._generatedName; }\n protected readonly _descId = `${this._generatedName}-desc`;\n protected readonly _value = signal('');\n\n private readonly _reveal = createFieldReveal(this.showErrors);\n private readonly _issue = computed(() => this._check(this._value()));\n readonly invalid = computed(() => !!this.error() || !!this._issue());\n readonly errorMessage = computed(() => this._issue()?.message ?? '');\n readonly invalidChange = output<boolean>();\n /** Emits the chosen value on a user pick. */\n readonly valueChange = output<string>();\n protected readonly _activeError = computed(() => this._reveal.revealed() ? (this.error() || this.errorMessage()) : '');\n private _onValidatorChange = () => {};\n\n constructor() {\n effect(() => { this.invalidChange.emit(this.invalid()); });\n }\n\n ngOnChanges() { this._onValidatorChange(); }\n\n validate(control: AbstractControl): ValidationErrors | null {\n const v = control.value;\n return issueToErrors(this._check(v == null ? '' : String(v)));\n }\n registerOnValidatorChange(fn: () => void) { this._onValidatorChange = fn; }\n\n private _onChange = (_: string) => {};\n private _onTouched = () => {};\n\n writeValue(val: string) { this._value.set(val ?? ''); }\n registerOnChange(fn: (v: string) => void) { this._onChange = fn; }\n registerOnTouched(fn: () => void) { this._onTouched = fn; }\n setDisabledState(d: boolean) { this._cvaDisabled.set(d); }\n\n protected onSelect(value: string) {\n if (this.disabled()) return;\n this._value.set(value);\n this._onChange(value);\n this.valueChange.emit(value);\n }\n\n /** Home / End select the first / last enabled swatch (arrow keys are native radio behaviour). */\n protected onKeydown(e: KeyboardEvent) {\n if ((e.key !== 'Home' && e.key !== 'End') || this.disabled()) return;\n const opts = this.options();\n const enabled = opts.filter(o => !o.disabled);\n if (!enabled.length) return;\n e.preventDefault();\n const target = e.key === 'Home' ? enabled[0] : enabled[enabled.length - 1];\n this.onSelect(target.value);\n const inputs = this._el.nativeElement.querySelectorAll<HTMLInputElement>('input[type=radio]');\n inputs[opts.indexOf(target)]?.focus();\n }\n\n /** Touched once focus leaves the whole group. */\n protected onFocusOut(event: FocusEvent) {\n const next = event.relatedTarget as Node | null;\n if (next && (event.currentTarget as HTMLElement).contains(next)) return;\n this._onTouched();\n this._reveal.touched.set(true);\n }\n\n private _check(value: string): FieldIssue | null {\n if (this.disabled()) return null;\n if (!value) return this.required() ? requiredIssue(this.label()) : null;\n const opts = this.options();\n if (opts.length > 0 && !opts.some(o => o.value === value)) return { key: 'option', message: uiText('common.selectValidOption') };\n return null;\n }\n}\n"],"mappings":";;;;AAiHA,IAAa,wBAAb,MAAa,sBAAqB;CAoBhC,IAAc,QAAK;EAAa,OAAO,KAAK,KAAI,KAAM,KAAK;CAAgB;CAc3E,cAAA;EAjCiB,KAAA,MAAM,OAAgC,UAAU;EAExD,KAAA,QAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACpB,KAAA,UAAW,MAAsB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EACpC,KAAA,WAAW,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EACvB,KAAA,OAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EACpB,KAAA,QAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEpB,KAAA,aAAa,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAEzB,KAAA,UAAW,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAEnB,KAAA,OAAW,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAEpB,KAAA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;IAAA;IAAA,gBAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,SAAA;IAAA,eAAA;IAAA,aAAA;GAAA;GAAA,WArFrB;IACT;KAAE,SAAS;KAAmB,aAAa,iBAAiB,qBAAqB;KAAG,OAAO;IAAI;IAC/F;KAAE,SAAS;KAAe,aAAa,iBAAiB,qBAAqB;KAAG,OAAO;IAAI;IAC3F;KAAE,SAAS;KAAiB,aAAa,iBAAiB,qBAAqB;IAAC;GACjF;GAAA,eAAA;GAAA,UAAA;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CT,UAAA;GAAA,QAAA,CAAA,4hDAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAkCU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAzFjC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,YAChB;GAAI,iBACC,wBAAwB;GAAM,WACpC;IACT;KAAE,SAAS;KAAmB,aAAa,iBAAgB,qBAAsB;KAAG,OAAO;IAAI;IAC/F;KAAE,SAAS;KAAe,aAAa,iBAAgB,qBAAsB;KAAG,OAAO;IAAI;IAC3F;KAAE,SAAS;KAAiB,aAAa,iBAAgB,qBAAsB;IAAC;GACjF;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CT,QAAA,CAAA,4hDAAA;EAAA,CAAA"}
|
|
@@ -5,6 +5,7 @@ import { FormsModule } from "@angular/forms";
|
|
|
5
5
|
import { ButtonComponent, ModalComponent, UiLabelsService } from "@forgeroute/ui/core";
|
|
6
6
|
import { CheckboxComponent } from "@forgeroute/ui/checkbox";
|
|
7
7
|
import { TextInputComponent } from "@forgeroute/ui/text-input";
|
|
8
|
+
import { EmptyStateComponent } from "@forgeroute/ui/empty-state";
|
|
8
9
|
var TableToolbarComponent = class TableToolbarComponent {
|
|
9
10
|
constructor() {
|
|
10
11
|
this.labels = inject(UiLabelsService);
|
|
@@ -317,7 +318,7 @@ var TableToolbarComponent = class TableToolbarComponent {
|
|
|
317
318
|
@if (showSavedViews()) {
|
|
318
319
|
<ui-modal [open]="viewModalOpen()" [title]="labels.t('toolbar.savedViews')" maxWidth="520px" (close)="viewModalOpen.set(false)">
|
|
319
320
|
@if (savedViews().length === 0) {
|
|
320
|
-
<
|
|
321
|
+
<ui-empty-state class="view-empty" iconType="table" [message]="labels.t('toolbar.noSavedViews')" />
|
|
321
322
|
} @else {
|
|
322
323
|
<div class="view-list">
|
|
323
324
|
@for (view of sortedViews(); track view.id) {
|
|
@@ -344,7 +345,7 @@ var TableToolbarComponent = class TableToolbarComponent {
|
|
|
344
345
|
</ui-modal>
|
|
345
346
|
`,
|
|
346
347
|
isInline: true,
|
|
347
|
-
styles: [":host{display:inline-flex;max-width:100%}.toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.toolbar-item{position:relative}.toolbar-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#334155;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s,border-color .1s}.toolbar-btn:hover{background:#f8fafc}.toolbar-btn.toolbar-btn-active{border-color:#1e293b;background:#f8fafc}.toolbar-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.toolbar-badge{display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.toolbar-primary-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:6px;border:none;background:#2563eb;color:#fff;font-size:.8125rem;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s}.toolbar-primary-btn:hover{background:#1d4ed8}.toolbar-primary-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.more-dropdown{position:absolute;top:calc(100% + 6px);right:0;z-index:200;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 4px 6px #0000000a,0 12px 28px #0000001a;min-width:200px;overflow:hidden}.more-option{display:flex;align-items:center;gap:10px;width:100%;padding:10px 14px;background:none;border:none;border-bottom:1px solid #f1f5f9;font-size:.875rem;color:#1e293b;font-family:inherit;text-align:left;cursor:pointer;transition:background .1s}.more-option:last-child{border-bottom:none}.more-option:hover{background:#f8fafc}.more-option:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.more-badge{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.more-divider{height:1px;background:#f1f5f9;margin:2px 0}.more-view-name{font-size:.75rem;color:#64748b;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.col-list{display:grid;grid-template-columns:1fr 1fr;max-height:340px;overflow-y:auto}@media(max-width:480px){.col-list{grid-template-columns:1fr}}@media(max-width:1024px){.toolbar-btn{padding:8px 12px}.toolbar-primary-btn{padding:8px 14px}}@media(pointer:coarse){.toolbar-btn,.toolbar-primary-btn{min-height:44px}}@media(max-width:640px){:host{display:flex;width:100%;min-width:0}.toolbar{width:100%;min-width:0;justify-content:flex-end;flex-wrap:wrap}.toolbar-btn{padding:10px 12px;font-size:.8125rem;min-height:44px}.toolbar-primary-btn{padding:10px 14px;font-size:.8125rem;min-height:44px}.toolbar-btn,.toolbar-primary-btn{max-width:100%;white-space:normal;text-align:center;justify-content:center;line-height:1.25;overflow-wrap:anywhere}.toolbar-item{min-width:0;max-width:100%;display:flex}.more-dropdown{max-height:calc(100vh - 140px);overflow-y:auto}.more-option{padding:12px 16px;font-size:.9375rem}}.col-option{display:flex;padding:9px 4px;border-bottom:1px solid #f1f5f9;transition:background .1s;border-radius:6px}.col-option:hover{background:#f8fafc}.col-option:nth-last-child(-n+2){border-bottom:none}.view-list{max-height:360px;overflow-y:auto;margin:0 -24px}.view-
|
|
348
|
+
styles: [":host{display:inline-flex;max-width:100%}.toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.toolbar-item{position:relative}.toolbar-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#334155;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s,border-color .1s}.toolbar-btn:hover{background:#f8fafc}.toolbar-btn.toolbar-btn-active{border-color:#1e293b;background:#f8fafc}.toolbar-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.toolbar-badge{display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.toolbar-primary-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:6px;border:none;background:#2563eb;color:#fff;font-size:.8125rem;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s}.toolbar-primary-btn:hover{background:#1d4ed8}.toolbar-primary-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.more-dropdown{position:absolute;top:calc(100% + 6px);right:0;z-index:200;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 4px 6px #0000000a,0 12px 28px #0000001a;min-width:200px;overflow:hidden}.more-option{display:flex;align-items:center;gap:10px;width:100%;padding:10px 14px;background:none;border:none;border-bottom:1px solid #f1f5f9;font-size:.875rem;color:#1e293b;font-family:inherit;text-align:left;cursor:pointer;transition:background .1s}.more-option:last-child{border-bottom:none}.more-option:hover{background:#f8fafc}.more-option:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.more-badge{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.more-divider{height:1px;background:#f1f5f9;margin:2px 0}.more-view-name{font-size:.75rem;color:#64748b;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.col-list{display:grid;grid-template-columns:1fr 1fr;max-height:340px;overflow-y:auto}@media(max-width:480px){.col-list{grid-template-columns:1fr}}@media(max-width:1024px){.toolbar-btn{padding:8px 12px}.toolbar-primary-btn{padding:8px 14px}}@media(pointer:coarse){.toolbar-btn,.toolbar-primary-btn{min-height:44px}}@media(max-width:640px){:host{display:flex;width:100%;min-width:0}.toolbar{width:100%;min-width:0;justify-content:flex-end;flex-wrap:wrap}.toolbar-btn{padding:10px 12px;font-size:.8125rem;min-height:44px}.toolbar-primary-btn{padding:10px 14px;font-size:.8125rem;min-height:44px}.toolbar-btn,.toolbar-primary-btn{max-width:100%;white-space:normal;text-align:center;justify-content:center;line-height:1.25;overflow-wrap:anywhere}.toolbar-item{min-width:0;max-width:100%;display:flex}.more-dropdown{max-height:calc(100vh - 140px);overflow-y:auto}.more-option{padding:12px 16px;font-size:.9375rem}}.col-option{display:flex;padding:9px 4px;border-bottom:1px solid #f1f5f9;transition:background .1s;border-radius:6px}.col-option:hover{background:#f8fafc}.col-option:nth-last-child(-n+2){border-bottom:none}.view-list{max-height:360px;overflow-y:auto;margin:0 -24px}.view-option{display:flex;align-items:center;padding-right:16px;border-bottom:1px solid #f1f5f9;transition:background .1s}.view-option:last-child{border-bottom:none}.view-option:hover{background:#f8fafc}.view-option.view-active{background:#eff6ff}.view-select-btn{flex:1;padding:12px 8px 12px 24px;background:none;border:none;font-size:.9rem;color:#334155;cursor:pointer;font-family:inherit;text-align:left}.view-delete-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:5px;background:none;border:none;cursor:pointer;color:#94a3b8}.view-delete-btn:hover{color:#dc2626;background:#fef2f2}\n"],
|
|
348
349
|
dependencies: [
|
|
349
350
|
{
|
|
350
351
|
kind: "ngmodule",
|
|
@@ -500,6 +501,16 @@ var TableToolbarComponent = class TableToolbarComponent {
|
|
|
500
501
|
"blurred",
|
|
501
502
|
"invalidChange"
|
|
502
503
|
]
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
kind: "component",
|
|
507
|
+
type: EmptyStateComponent,
|
|
508
|
+
selector: "ui-empty-state",
|
|
509
|
+
inputs: [
|
|
510
|
+
"message",
|
|
511
|
+
"title",
|
|
512
|
+
"iconType"
|
|
513
|
+
]
|
|
503
514
|
}
|
|
504
515
|
],
|
|
505
516
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
@@ -522,7 +533,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
522
533
|
ModalComponent,
|
|
523
534
|
CheckboxComponent,
|
|
524
535
|
ButtonComponent,
|
|
525
|
-
TextInputComponent
|
|
536
|
+
TextInputComponent,
|
|
537
|
+
EmptyStateComponent
|
|
526
538
|
],
|
|
527
539
|
host: {
|
|
528
540
|
"(document:click)": "onDocumentClick()",
|
|
@@ -641,7 +653,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
641
653
|
@if (showSavedViews()) {
|
|
642
654
|
<ui-modal [open]="viewModalOpen()" [title]="labels.t('toolbar.savedViews')" maxWidth="520px" (close)="viewModalOpen.set(false)">
|
|
643
655
|
@if (savedViews().length === 0) {
|
|
644
|
-
<
|
|
656
|
+
<ui-empty-state class="view-empty" iconType="table" [message]="labels.t('toolbar.noSavedViews')" />
|
|
645
657
|
} @else {
|
|
646
658
|
<div class="view-list">
|
|
647
659
|
@for (view of sortedViews(); track view.id) {
|
|
@@ -667,7 +679,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
667
679
|
<ui-button modal-footer-right variant="primary" size="sm" [disabled]="!_saveViewName.trim()" (click)="confirmSaveName()"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg> {{ labels.t('toolbar.save') }}</ui-button>
|
|
668
680
|
</ui-modal>
|
|
669
681
|
`,
|
|
670
|
-
styles: [":host{display:inline-flex;max-width:100%}.toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.toolbar-item{position:relative}.toolbar-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#334155;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s,border-color .1s}.toolbar-btn:hover{background:#f8fafc}.toolbar-btn.toolbar-btn-active{border-color:#1e293b;background:#f8fafc}.toolbar-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.toolbar-badge{display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.toolbar-primary-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:6px;border:none;background:#2563eb;color:#fff;font-size:.8125rem;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s}.toolbar-primary-btn:hover{background:#1d4ed8}.toolbar-primary-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.more-dropdown{position:absolute;top:calc(100% + 6px);right:0;z-index:200;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 4px 6px #0000000a,0 12px 28px #0000001a;min-width:200px;overflow:hidden}.more-option{display:flex;align-items:center;gap:10px;width:100%;padding:10px 14px;background:none;border:none;border-bottom:1px solid #f1f5f9;font-size:.875rem;color:#1e293b;font-family:inherit;text-align:left;cursor:pointer;transition:background .1s}.more-option:last-child{border-bottom:none}.more-option:hover{background:#f8fafc}.more-option:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.more-badge{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.more-divider{height:1px;background:#f1f5f9;margin:2px 0}.more-view-name{font-size:.75rem;color:#64748b;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.col-list{display:grid;grid-template-columns:1fr 1fr;max-height:340px;overflow-y:auto}@media(max-width:480px){.col-list{grid-template-columns:1fr}}@media(max-width:1024px){.toolbar-btn{padding:8px 12px}.toolbar-primary-btn{padding:8px 14px}}@media(pointer:coarse){.toolbar-btn,.toolbar-primary-btn{min-height:44px}}@media(max-width:640px){:host{display:flex;width:100%;min-width:0}.toolbar{width:100%;min-width:0;justify-content:flex-end;flex-wrap:wrap}.toolbar-btn{padding:10px 12px;font-size:.8125rem;min-height:44px}.toolbar-primary-btn{padding:10px 14px;font-size:.8125rem;min-height:44px}.toolbar-btn,.toolbar-primary-btn{max-width:100%;white-space:normal;text-align:center;justify-content:center;line-height:1.25;overflow-wrap:anywhere}.toolbar-item{min-width:0;max-width:100%;display:flex}.more-dropdown{max-height:calc(100vh - 140px);overflow-y:auto}.more-option{padding:12px 16px;font-size:.9375rem}}.col-option{display:flex;padding:9px 4px;border-bottom:1px solid #f1f5f9;transition:background .1s;border-radius:6px}.col-option:hover{background:#f8fafc}.col-option:nth-last-child(-n+2){border-bottom:none}.view-list{max-height:360px;overflow-y:auto;margin:0 -24px}.view-
|
|
682
|
+
styles: [":host{display:inline-flex;max-width:100%}.toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.toolbar-item{position:relative}.toolbar-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;border:1px solid #e2e8f0;background:#fff;font-size:.8125rem;font-weight:500;color:#334155;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s,border-color .1s}.toolbar-btn:hover{background:#f8fafc}.toolbar-btn.toolbar-btn-active{border-color:#1e293b;background:#f8fafc}.toolbar-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.toolbar-badge{display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.toolbar-primary-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:6px;border:none;background:#2563eb;color:#fff;font-size:.8125rem;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;transition:background .1s}.toolbar-primary-btn:hover{background:#1d4ed8}.toolbar-primary-btn:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.more-dropdown{position:absolute;top:calc(100% + 6px);right:0;z-index:200;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 4px 6px #0000000a,0 12px 28px #0000001a;min-width:200px;overflow:hidden}.more-option{display:flex;align-items:center;gap:10px;width:100%;padding:10px 14px;background:none;border:none;border-bottom:1px solid #f1f5f9;font-size:.875rem;color:#1e293b;font-family:inherit;text-align:left;cursor:pointer;transition:background .1s}.more-option:last-child{border-bottom:none}.more-option:hover{background:#f8fafc}.more-option:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.more-badge{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;background:#1e293b;color:#fff;border-radius:999px;font-size:.625rem;font-weight:700;min-width:16px;height:16px;padding:0 4px}.more-divider{height:1px;background:#f1f5f9;margin:2px 0}.more-view-name{font-size:.75rem;color:#64748b;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.col-list{display:grid;grid-template-columns:1fr 1fr;max-height:340px;overflow-y:auto}@media(max-width:480px){.col-list{grid-template-columns:1fr}}@media(max-width:1024px){.toolbar-btn{padding:8px 12px}.toolbar-primary-btn{padding:8px 14px}}@media(pointer:coarse){.toolbar-btn,.toolbar-primary-btn{min-height:44px}}@media(max-width:640px){:host{display:flex;width:100%;min-width:0}.toolbar{width:100%;min-width:0;justify-content:flex-end;flex-wrap:wrap}.toolbar-btn{padding:10px 12px;font-size:.8125rem;min-height:44px}.toolbar-primary-btn{padding:10px 14px;font-size:.8125rem;min-height:44px}.toolbar-btn,.toolbar-primary-btn{max-width:100%;white-space:normal;text-align:center;justify-content:center;line-height:1.25;overflow-wrap:anywhere}.toolbar-item{min-width:0;max-width:100%;display:flex}.more-dropdown{max-height:calc(100vh - 140px);overflow-y:auto}.more-option{padding:12px 16px;font-size:.9375rem}}.col-option{display:flex;padding:9px 4px;border-bottom:1px solid #f1f5f9;transition:background .1s;border-radius:6px}.col-option:hover{background:#f8fafc}.col-option:nth-last-child(-n+2){border-bottom:none}.view-list{max-height:360px;overflow-y:auto;margin:0 -24px}.view-option{display:flex;align-items:center;padding-right:16px;border-bottom:1px solid #f1f5f9;transition:background .1s}.view-option:last-child{border-bottom:none}.view-option:hover{background:#f8fafc}.view-option.view-active{background:#eff6ff}.view-select-btn{flex:1;padding:12px 8px 12px 24px;background:none;border:none;font-size:.9rem;color:#334155;cursor:pointer;font-family:inherit;text-align:left}.view-delete-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:5px;background:none;border:none;cursor:pointer;color:#94a3b8}.view-delete-btn:hover{color:#dc2626;background:#fef2f2}\n"]
|
|
671
683
|
}]
|
|
672
684
|
}],
|
|
673
685
|
propDecorators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-table-toolbar.mjs","names":[],"sources":["../../../projects/forgeroute-ui/table-toolbar/src/lib/table-toolbar/table-toolbar.component.ts"],"sourcesContent":["import { Component, input, output, signal, computed, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ColumnDef, SavedView, ToolbarAction } from '@forgeroute/ui/table-types';\nimport { UiLabelsService } from '@forgeroute/ui/core';\nimport { ModalComponent } from '@forgeroute/ui/core';\nimport { CheckboxComponent } from '@forgeroute/ui/checkbox';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\n\n@Component({\n selector: 'ui-table-toolbar',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, ModalComponent, CheckboxComponent, ButtonComponent, TextInputComponent],\n host: {\n '(document:click)': 'onDocumentClick()',\n '(document:keydown.escape)': 'onEscape()',\n },\n template: `\n <div class=\"toolbar\">\n\n <!-- ── Standalone buttons (primary = blue, secondary = outlined) -->\n @for (btn of standaloneButtons(); track btn.type) {\n <button\n [class]=\"btn.variant === 'primary' ? 'toolbar-primary-btn' : 'toolbar-btn'\"\n [attr.aria-pressed]=\"btn.pressed ?? null\"\n (click)=\"emitAction(btn.type, $event)\">\n @if (btn.icon) {\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"btn.icon\"/></svg>\n }\n {{ btn.label }}\n @if (btn.badge) { <span class=\"toolbar-badge\">{{ btn.badge }}</span> }\n </button>\n }\n\n <!-- ── More Actions dropdown (hidden entirely when it would be empty, e.g. read-only with no saved views) -->\n @if (hasMoreItems() && !hideMoreActions()) {\n <div class=\"toolbar-item\">\n <button\n class=\"toolbar-btn\"\n [class.toolbar-btn-active]=\"moreOpen()\"\n (click)=\"toggleMore($event)\"\n [attr.aria-label]=\"labels.t('toolbar.moreActions')\"\n [attr.aria-expanded]=\"moreOpen()\">\n {{ labels.t('toolbar.moreActionsButton') }}\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><polyline points=\"6 9 12 15 18 9\"/></svg>\n </button>\n\n @if (moreOpen()) {\n <div class=\"more-dropdown\" (click)=\"$event.stopPropagation()\">\n\n <!-- 1. Export (when in More Actions) -->\n @if (exportDropdownButton(); as exp) {\n <button class=\"more-option\" (click)=\"emitAction(exp.type, $event)\">\n @if (exp.icon) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"exp.icon\"/></svg>\n }\n {{ exp.label }}\n </button>\n }\n\n <!-- 2. Import -->\n @if (importButton(); as imp) {\n <button class=\"more-option\" (click)=\"emitAction(imp.type, $event)\">\n @if (imp.icon) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"imp.icon\"/></svg>\n }\n {{ imp.label }}\n @if (imp.badge) { <span class=\"more-badge\">{{ imp.badge }}</span> }\n </button>\n }\n\n <!-- 3. Columns (not for read-only users) -->\n @if (!readOnly()) {\n <button class=\"more-option\" (click)=\"openColModal($event)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"/><line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"/><line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"/><line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"/><line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"/><line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"/></svg>\n {{ labels.t('toolbar.columns') }}\n </button>\n }\n\n <!-- 3. Save Current View (full permission only) 4. Saved Views (read-only: only when they have some) -->\n @if (showSavedViews() && !readOnly()) {\n <button class=\"more-option\" (click)=\"saveView(); moreOpen.set(false)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"/><polyline points=\"17 21 17 13 7 13 7 21\"/></svg>\n {{ labels.t('toolbar.saveCurrentView') }}\n </button>\n }\n @if (showSavedViewsItem()) {\n <button class=\"more-option\" (click)=\"openViewModal($event)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18\"/></svg>\n {{ labels.t('toolbar.savedViews') }}\n @if (activeViewId()) { <span class=\"more-view-name\">{{ activeViewName() }}</span> }\n </button>\n }\n\n <!-- 5. Additional page-specific options (alphabetical) -->\n @for (btn of additionalDropdownButtons(); track btn.type) {\n <button class=\"more-option\" (click)=\"emitAction(btn.type, $event)\">\n @if (btn.icon) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"btn.icon\"/></svg>\n }\n {{ btn.label }}\n @if (btn.badge) { <span class=\"more-badge\">{{ btn.badge }}</span> }\n </button>\n }\n\n </div>\n }\n </div>\n }\n </div>\n\n <!-- ── Columns Modal -->\n <ui-modal [open]=\"colModalOpen()\" [title]=\"labels.t('toolbar.columns')\" [description]=\"labels.t('toolbar.columnsDescription')\" maxWidth=\"520px\" (close)=\"closeColModal()\">\n <div class=\"col-list\">\n @for (col of configurableColumns(); track col.key) {\n <ui-checkbox\n class=\"col-option\"\n [checked]=\"isVisible(col.key)\"\n [label]=\"col.label\"\n (checkedChange)=\"toggleColumn(col.key)\" />\n }\n </div>\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" (click)=\"closeColModal()\">{{ labels.t('toolbar.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"primary\" size=\"sm\" (click)=\"applyColumns()\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"20 6 9 17 4 12\"/></svg> {{ labels.t('toolbar.apply') }}</ui-button>\n </ui-modal>\n\n <!-- ── Saved Views Modal -->\n @if (showSavedViews()) {\n <ui-modal [open]=\"viewModalOpen()\" [title]=\"labels.t('toolbar.savedViews')\" maxWidth=\"520px\" (close)=\"viewModalOpen.set(false)\">\n @if (savedViews().length === 0) {\n <p class=\"view-empty\">{{ labels.t('toolbar.noSavedViews') }}</p>\n } @else {\n <div class=\"view-list\">\n @for (view of sortedViews(); track view.id) {\n <div class=\"view-option\" [class.view-active]=\"view.id === activeViewId()\">\n <button class=\"view-select-btn\" (click)=\"loadView(view)\">{{ view.name }}</button>\n @if (!view.isSystem && !readOnly()) {\n <button class=\"view-delete-btn\" [attr.aria-label]=\"labels.t('toolbar.deleteView', { name: view.name })\" (click)=\"deleteView(view.id)\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/></svg>\n </button>\n }\n </div>\n }\n </div>\n }\n <ui-button modal-footer-right variant=\"secondary\" size=\"sm\" (click)=\"viewModalOpen.set(false)\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"20 6 9 17 4 12\"/></svg> {{ labels.t('toolbar.done') }}</ui-button>\n </ui-modal>\n }\n\n <!-- ── Save View Name Modal -->\n <ui-modal [open]=\"saveNameModalOpen()\" [title]=\"labels.t('toolbar.saveView')\" maxWidth=\"360px\" (close)=\"closeSaveNameModal()\">\n <ui-text-input [label]=\"labels.t('toolbar.viewName')\" [(ngModel)]=\"_saveViewName\" [placeholder]=\"labels.t('toolbar.viewNamePlaceholder')\" [maxlength]=\"100\" autocomplete=\"off\" />\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" (click)=\"closeSaveNameModal()\">{{ labels.t('toolbar.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"primary\" size=\"sm\" [disabled]=\"!_saveViewName.trim()\" (click)=\"confirmSaveName()\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"20 6 9 17 4 12\"/></svg> {{ labels.t('toolbar.save') }}</ui-button>\n </ui-modal>\n `,\n styles: [`\n :host { display: inline-flex; max-width: 100%; }\n .toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }\n .toolbar-item { position: relative; }\n\n /* ── Shared button ─── */\n .toolbar-btn {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 10px; border-radius: 6px;\n border: 1px solid #e2e8f0; background: #fff;\n font-size: 0.8125rem; font-weight: 500; color: #334155;\n cursor: pointer; font-family: inherit; white-space: nowrap;\n transition: background 0.1s, border-color 0.1s;\n &:hover { background: #f8fafc; }\n &.toolbar-btn-active { border-color: #1e293b; background: #f8fafc; }\n &:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }\n }\n .toolbar-badge {\n display: inline-flex; align-items: center; justify-content: center;\n background: #1e293b; color: #fff; border-radius: 999px;\n font-size: 0.625rem; font-weight: 700; min-width: 16px; height: 16px;\n padding: 0 4px;\n }\n\n /* ── Primary (blue) standalone button ─── */\n .toolbar-primary-btn {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 12px; border-radius: 6px; border: none;\n background: #2563eb; color: #fff;\n font-size: 0.8125rem; font-weight: 600; cursor: pointer;\n font-family: inherit; white-space: nowrap;\n transition: background 0.1s;\n &:hover { background: #1d4ed8; }\n &:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }\n }\n\n /* ── More Actions dropdown ─── */\n .more-dropdown {\n position: absolute; top: calc(100% + 6px); right: 0; z-index: 200;\n background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;\n box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 12px 28px rgba(0,0,0,0.10);\n min-width: 200px; overflow: hidden;\n }\n .more-option {\n display: flex; align-items: center; gap: 10px; width: 100%;\n padding: 10px 14px; background: none; border: none; border-bottom: 1px solid #f1f5f9;\n font-size: 0.875rem; color: #1e293b; font-family: inherit;\n text-align: left; cursor: pointer; transition: background 0.1s;\n &:last-child { border-bottom: none; }\n &:hover { background: #f8fafc; }\n &:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }\n }\n .more-badge {\n margin-left: auto; display: inline-flex; align-items: center; justify-content: center;\n background: #1e293b; color: #fff; border-radius: 999px;\n font-size: 0.625rem; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px;\n }\n .more-divider { height: 1px; background: #f1f5f9; margin: 2px 0; }\n .more-view-name {\n font-size: 0.75rem; color: #64748b; max-width: 100px;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n\n /* ── Columns modal content ─── */\n .col-list {\n display: grid; grid-template-columns: 1fr 1fr;\n max-height: 340px; overflow-y: auto;\n }\n @media (max-width: 480px) {\n .col-list { grid-template-columns: 1fr; }\n }\n\n /* ── iPad / tablet (≤1024px) — 36px+ touch targets ─── */\n @media (max-width: 1024px) {\n .toolbar-btn { padding: 8px 12px; }\n .toolbar-primary-btn { padding: 8px 14px; }\n }\n\n /* ── Touch (incl. iPad): 44px tap targets, desktop mouse sizes unchanged ─── */\n @media (pointer: coarse) {\n .toolbar-btn, .toolbar-primary-btn { min-height: 44px; }\n }\n\n /* ── Phone (≤640px) — full-width host, 40px+ touch targets, safe dropdown height ─── */\n @media (max-width: 640px) {\n :host { display: flex; width: 100%; min-width: 0; }\n .toolbar { width: 100%; min-width: 0; justify-content: flex-end; flex-wrap: wrap; }\n .toolbar-btn { padding: 10px 12px; font-size: 0.8125rem; min-height: 44px; }\n .toolbar-primary-btn { padding: 10px 14px; font-size: 0.8125rem; min-height: 44px; }\n /* library source 2026-11-04, not yet published: every control stays reachable at 320-480px. The controls wrap onto further rows (above);\n a control wider than the whole row (a long primary label) is capped at the row width and wraps its own text instead of running off the\n screen, where the right-aligned row would have pushed it past the left edge and Export / More Actions out of reach. */\n .toolbar-btn, .toolbar-primary-btn { max-width: 100%; white-space: normal; text-align: center; justify-content: center; line-height: 1.25; overflow-wrap: anywhere; }\n .toolbar-item { min-width: 0; max-width: 100%; display: flex; }\n .more-dropdown { max-height: calc(100vh - 140px); overflow-y: auto; }\n .more-option { padding: 12px 16px; font-size: 0.9375rem; }\n }\n .col-option {\n display: flex; padding: 9px 4px;\n border-bottom: 1px solid #f1f5f9;\n transition: background 0.1s; border-radius: 6px;\n &:hover { background: #f8fafc; }\n /* hide border on last visible row (last 1 or 2 items) */\n &:nth-last-child(-n+2) { border-bottom: none; }\n }\n\n /* ── Views modal content ─── */\n .view-list { max-height: 360px; overflow-y: auto; margin: 0 -24px; }\n .view-empty { padding: 16px 24px; font-size: 0.9rem; color: #94a3b8; margin: 0; }\n .view-option {\n display: flex; align-items: center; padding-right: 16px;\n border-bottom: 1px solid #f1f5f9;\n transition: background 0.1s;\n &:last-child { border-bottom: none; }\n &:hover { background: #f8fafc; }\n &.view-active { background: #eff6ff; }\n }\n .view-select-btn {\n flex: 1; padding: 12px 8px 12px 24px; background: none; border: none;\n font-size: 0.9rem; color: #334155; cursor: pointer; font-family: inherit; text-align: left;\n }\n .view-delete-btn {\n display: flex; align-items: center; justify-content: center;\n width: 28px; height: 28px; border-radius: 5px;\n background: none; border: none; cursor: pointer; color: #94a3b8;\n &:hover { color: #dc2626; background: #fef2f2; }\n }\n\n `],\n})\nexport class TableToolbarComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly columns = input.required<ColumnDef[]>();\n readonly visibleColumns = input.required<string[]>();\n readonly lockedColumn = input('');\n readonly savedViews = input<SavedView[]>([]);\n readonly activeViewId = input<string | null>(null);\n readonly showSavedViews = input(false);\n /**\n * Read-only (permission isn't 'full'): only Export and pure reads marked `allowReadOnly` stay — no other page buttons, no Import, no Columns, no\n * Save Current View, no deleting views. More Actions offers only the user's existing Saved Views and is\n * hidden when they have none.\n */\n readonly readOnly = input(false);\n /** Hides the More Actions dropdown (the table sets it while it is empty and unfiltered, leaving only the primary buttons). */\n readonly hideMoreActions = input(false);\n\n readonly tableButtons = input<ToolbarAction[]>([]);\n\n readonly visibleColumnsChange = output<string[]>();\n readonly saveViewClick = output<string>();\n readonly loadViewClick = output<SavedView>();\n readonly deleteViewClick = output<string>();\n readonly tableButtonClick = output<string>();\n\n protected readonly colModalOpen = signal(false);\n protected readonly viewModalOpen = signal(false);\n protected readonly moreOpen = signal(false);\n protected readonly saveNameModalOpen = signal(false);\n protected _saveViewName = '';\n\n /** Draft column visibility — only applied to the table when the user clicks Apply. */\n private readonly _pendingCols = signal<string[]>([]);\n\n /** Buttons this user may see — read-only users only get Export and pure reads marked `allowReadOnly` (page actions and Import are hidden). */\n private readonly _allowedButtons = computed(() =>\n this.readOnly() ? this.tableButtons().filter(b => b.type === 'export' || (b.allowReadOnly && b.type !== 'import')) : this.tableButtons(),\n );\n\n protected readonly standaloneButtons = computed(() =>\n this._allowedButtons()\n .filter(b => (b.variant === 'primary' || b.variant === 'secondary') && !b.hidden)\n .sort((a, b) => {\n // Primary buttons always render before secondary — regardless of definition order\n if (a.variant === b.variant) return 0;\n return a.variant === 'primary' ? -1 : 1;\n }),\n );\n protected readonly importButton = computed(() =>\n this._allowedButtons().find(b => b.type === 'import' && !b.hidden) ?? null,\n );\n protected readonly exportDropdownButton = computed(() =>\n this._allowedButtons().find(b => b.type === 'export' && !b.variant && !b.hidden) ?? null,\n );\n protected readonly additionalDropdownButtons = computed(() =>\n this._allowedButtons()\n .filter(b => !b.variant && !b.hidden && b.type !== 'import' && b.type !== 'export')\n .sort((a, b) => a.label.localeCompare(b.label, undefined, { sensitivity: 'base' })),\n );\n\n /** Saved Views entry: always for full users; for read-only users only when they already have views. */\n protected readonly showSavedViewsItem = computed(() =>\n this.showSavedViews() && (!this.readOnly() || this.savedViews().length > 0),\n );\n\n /** True when More Actions would contain at least one item. */\n protected readonly hasMoreItems = computed(() =>\n !!this.exportDropdownButton() || !!this.importButton() || !this.readOnly()\n || this.showSavedViewsItem() || this.additionalDropdownButtons().length > 0,\n );\n\n protected readonly configurableColumns = computed(() =>\n this.columns().filter(c => c.key !== this.lockedColumn() && c.cellType !== 'actions'),\n );\n\n protected readonly hiddenCount = computed(() =>\n this.configurableColumns().filter(c => !this.visibleColumns().includes(c.key)).length,\n );\n\n protected readonly activeViewName = computed(() =>\n this.savedViews().find(v => v.id === this.activeViewId())?.name ?? '',\n );\n\n protected readonly sortedViews = computed(() => {\n const views = [...this.savedViews()];\n return views.sort((a, b) => {\n if (a.isSystem !== b.isSystem) return a.isSystem ? -1 : 1;\n return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' });\n });\n });\n\n protected isVisible(key: string): boolean {\n return this._pendingCols().includes(key);\n }\n\n protected toggleColumn(key: string) {\n this._pendingCols.update(cols =>\n cols.includes(key) ? cols.filter(k => k !== key) : [...cols, key],\n );\n }\n\n protected applyColumns() {\n this.visibleColumnsChange.emit(this._pendingCols().filter(k => !this.columns().some(c => c.key === k && c.cellType === 'actions')));\n this.colModalOpen.set(false);\n }\n\n protected closeColModal() {\n this.colModalOpen.set(false);\n }\n\n protected loadView(view: SavedView) {\n this.loadViewClick.emit(view);\n this.viewModalOpen.set(false);\n }\n\n protected deleteView(id: string) {\n if (this.readOnly()) return;\n this.deleteViewClick.emit(id);\n }\n\n protected saveView() {\n if (this.readOnly()) return;\n this._saveViewName = '';\n this.saveNameModalOpen.set(true);\n }\n\n protected confirmSaveName() {\n if (this.readOnly() || !this._saveViewName.trim()) return;\n this.saveViewClick.emit(this._saveViewName.trim());\n this.saveNameModalOpen.set(false);\n this._saveViewName = '';\n }\n\n protected closeSaveNameModal() {\n this.saveNameModalOpen.set(false);\n this._saveViewName = '';\n }\n\n protected openColModal(event: Event) {\n event.stopPropagation();\n this.moreOpen.set(false);\n this._pendingCols.set([...this.visibleColumns()]);\n this.colModalOpen.set(true);\n }\n\n protected openViewModal(event: Event) {\n event.stopPropagation();\n this.moreOpen.set(false);\n this.viewModalOpen.set(true);\n }\n\n protected emitAction(type: string, event: Event) {\n event.stopPropagation();\n this.moreOpen.set(false);\n this.tableButtonClick.emit(type);\n }\n\n protected toggleMore(event: Event) {\n event.stopPropagation();\n this.moreOpen.update(v => !v);\n }\n\n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A6B;GAC9B;GAAA,UACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0IT,QAAA,CAAA,w/HAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-table-toolbar.mjs","names":[],"sources":["../../../projects/forgeroute-ui/table-toolbar/src/lib/table-toolbar/table-toolbar.component.ts"],"sourcesContent":["import { Component, input, output, signal, computed, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { ColumnDef, SavedView, ToolbarAction } from '@forgeroute/ui/table-types';\nimport { UiLabelsService } from '@forgeroute/ui/core';\nimport { ModalComponent } from '@forgeroute/ui/core';\nimport { CheckboxComponent } from '@forgeroute/ui/checkbox';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { EmptyStateComponent } from '@forgeroute/ui/empty-state';\n\n@Component({\n selector: 'ui-table-toolbar',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, ModalComponent, CheckboxComponent, ButtonComponent, TextInputComponent, EmptyStateComponent],\n host: {\n '(document:click)': 'onDocumentClick()',\n '(document:keydown.escape)': 'onEscape()',\n },\n template: `\n <div class=\"toolbar\">\n\n <!-- ── Standalone buttons (primary = blue, secondary = outlined) -->\n @for (btn of standaloneButtons(); track btn.type) {\n <button\n [class]=\"btn.variant === 'primary' ? 'toolbar-primary-btn' : 'toolbar-btn'\"\n [attr.aria-pressed]=\"btn.pressed ?? null\"\n (click)=\"emitAction(btn.type, $event)\">\n @if (btn.icon) {\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"btn.icon\"/></svg>\n }\n {{ btn.label }}\n @if (btn.badge) { <span class=\"toolbar-badge\">{{ btn.badge }}</span> }\n </button>\n }\n\n <!-- ── More Actions dropdown (hidden entirely when it would be empty, e.g. read-only with no saved views) -->\n @if (hasMoreItems() && !hideMoreActions()) {\n <div class=\"toolbar-item\">\n <button\n class=\"toolbar-btn\"\n [class.toolbar-btn-active]=\"moreOpen()\"\n (click)=\"toggleMore($event)\"\n [attr.aria-label]=\"labels.t('toolbar.moreActions')\"\n [attr.aria-expanded]=\"moreOpen()\">\n {{ labels.t('toolbar.moreActionsButton') }}\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><polyline points=\"6 9 12 15 18 9\"/></svg>\n </button>\n\n @if (moreOpen()) {\n <div class=\"more-dropdown\" (click)=\"$event.stopPropagation()\">\n\n <!-- 1. Export (when in More Actions) -->\n @if (exportDropdownButton(); as exp) {\n <button class=\"more-option\" (click)=\"emitAction(exp.type, $event)\">\n @if (exp.icon) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"exp.icon\"/></svg>\n }\n {{ exp.label }}\n </button>\n }\n\n <!-- 2. Import -->\n @if (importButton(); as imp) {\n <button class=\"more-option\" (click)=\"emitAction(imp.type, $event)\">\n @if (imp.icon) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"imp.icon\"/></svg>\n }\n {{ imp.label }}\n @if (imp.badge) { <span class=\"more-badge\">{{ imp.badge }}</span> }\n </button>\n }\n\n <!-- 3. Columns (not for read-only users) -->\n @if (!readOnly()) {\n <button class=\"more-option\" (click)=\"openColModal($event)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"/><line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"/><line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"/><line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"/><line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"/><line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"/></svg>\n {{ labels.t('toolbar.columns') }}\n </button>\n }\n\n <!-- 3. Save Current View (full permission only) 4. Saved Views (read-only: only when they have some) -->\n @if (showSavedViews() && !readOnly()) {\n <button class=\"more-option\" (click)=\"saveView(); moreOpen.set(false)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"/><polyline points=\"17 21 17 13 7 13 7 21\"/></svg>\n {{ labels.t('toolbar.saveCurrentView') }}\n </button>\n }\n @if (showSavedViewsItem()) {\n <button class=\"more-option\" (click)=\"openViewModal($event)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path d=\"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18\"/></svg>\n {{ labels.t('toolbar.savedViews') }}\n @if (activeViewId()) { <span class=\"more-view-name\">{{ activeViewName() }}</span> }\n </button>\n }\n\n <!-- 5. Additional page-specific options (alphabetical) -->\n @for (btn of additionalDropdownButtons(); track btn.type) {\n <button class=\"more-option\" (click)=\"emitAction(btn.type, $event)\">\n @if (btn.icon) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\"><path [attr.d]=\"btn.icon\"/></svg>\n }\n {{ btn.label }}\n @if (btn.badge) { <span class=\"more-badge\">{{ btn.badge }}</span> }\n </button>\n }\n\n </div>\n }\n </div>\n }\n </div>\n\n <!-- ── Columns Modal -->\n <ui-modal [open]=\"colModalOpen()\" [title]=\"labels.t('toolbar.columns')\" [description]=\"labels.t('toolbar.columnsDescription')\" maxWidth=\"520px\" (close)=\"closeColModal()\">\n <div class=\"col-list\">\n @for (col of configurableColumns(); track col.key) {\n <ui-checkbox\n class=\"col-option\"\n [checked]=\"isVisible(col.key)\"\n [label]=\"col.label\"\n (checkedChange)=\"toggleColumn(col.key)\" />\n }\n </div>\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" (click)=\"closeColModal()\">{{ labels.t('toolbar.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"primary\" size=\"sm\" (click)=\"applyColumns()\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"20 6 9 17 4 12\"/></svg> {{ labels.t('toolbar.apply') }}</ui-button>\n </ui-modal>\n\n <!-- ── Saved Views Modal -->\n @if (showSavedViews()) {\n <ui-modal [open]=\"viewModalOpen()\" [title]=\"labels.t('toolbar.savedViews')\" maxWidth=\"520px\" (close)=\"viewModalOpen.set(false)\">\n @if (savedViews().length === 0) {\n <ui-empty-state class=\"view-empty\" iconType=\"table\" [message]=\"labels.t('toolbar.noSavedViews')\" />\n } @else {\n <div class=\"view-list\">\n @for (view of sortedViews(); track view.id) {\n <div class=\"view-option\" [class.view-active]=\"view.id === activeViewId()\">\n <button class=\"view-select-btn\" (click)=\"loadView(view)\">{{ view.name }}</button>\n @if (!view.isSystem && !readOnly()) {\n <button class=\"view-delete-btn\" [attr.aria-label]=\"labels.t('toolbar.deleteView', { name: view.name })\" (click)=\"deleteView(view.id)\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/></svg>\n </button>\n }\n </div>\n }\n </div>\n }\n <ui-button modal-footer-right variant=\"secondary\" size=\"sm\" (click)=\"viewModalOpen.set(false)\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"20 6 9 17 4 12\"/></svg> {{ labels.t('toolbar.done') }}</ui-button>\n </ui-modal>\n }\n\n <!-- ── Save View Name Modal -->\n <ui-modal [open]=\"saveNameModalOpen()\" [title]=\"labels.t('toolbar.saveView')\" maxWidth=\"360px\" (close)=\"closeSaveNameModal()\">\n <ui-text-input [label]=\"labels.t('toolbar.viewName')\" [(ngModel)]=\"_saveViewName\" [placeholder]=\"labels.t('toolbar.viewNamePlaceholder')\" [maxlength]=\"100\" autocomplete=\"off\" />\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" (click)=\"closeSaveNameModal()\">{{ labels.t('toolbar.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"primary\" size=\"sm\" [disabled]=\"!_saveViewName.trim()\" (click)=\"confirmSaveName()\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"20 6 9 17 4 12\"/></svg> {{ labels.t('toolbar.save') }}</ui-button>\n </ui-modal>\n `,\n styles: [`\n :host { display: inline-flex; max-width: 100%; }\n .toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }\n .toolbar-item { position: relative; }\n\n /* ── Shared button ─── */\n .toolbar-btn {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 10px; border-radius: 6px;\n border: 1px solid #e2e8f0; background: #fff;\n font-size: 0.8125rem; font-weight: 500; color: #334155;\n cursor: pointer; font-family: inherit; white-space: nowrap;\n transition: background 0.1s, border-color 0.1s;\n &:hover { background: #f8fafc; }\n &.toolbar-btn-active { border-color: #1e293b; background: #f8fafc; }\n &:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }\n }\n .toolbar-badge {\n display: inline-flex; align-items: center; justify-content: center;\n background: #1e293b; color: #fff; border-radius: 999px;\n font-size: 0.625rem; font-weight: 700; min-width: 16px; height: 16px;\n padding: 0 4px;\n }\n\n /* ── Primary (blue) standalone button ─── */\n .toolbar-primary-btn {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 12px; border-radius: 6px; border: none;\n background: #2563eb; color: #fff;\n font-size: 0.8125rem; font-weight: 600; cursor: pointer;\n font-family: inherit; white-space: nowrap;\n transition: background 0.1s;\n &:hover { background: #1d4ed8; }\n &:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }\n }\n\n /* ── More Actions dropdown ─── */\n .more-dropdown {\n position: absolute; top: calc(100% + 6px); right: 0; z-index: 200;\n background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;\n box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 12px 28px rgba(0,0,0,0.10);\n min-width: 200px; overflow: hidden;\n }\n .more-option {\n display: flex; align-items: center; gap: 10px; width: 100%;\n padding: 10px 14px; background: none; border: none; border-bottom: 1px solid #f1f5f9;\n font-size: 0.875rem; color: #1e293b; font-family: inherit;\n text-align: left; cursor: pointer; transition: background 0.1s;\n &:last-child { border-bottom: none; }\n &:hover { background: #f8fafc; }\n &:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }\n }\n .more-badge {\n margin-left: auto; display: inline-flex; align-items: center; justify-content: center;\n background: #1e293b; color: #fff; border-radius: 999px;\n font-size: 0.625rem; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px;\n }\n .more-divider { height: 1px; background: #f1f5f9; margin: 2px 0; }\n .more-view-name {\n font-size: 0.75rem; color: #64748b; max-width: 100px;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n\n /* ── Columns modal content ─── */\n .col-list {\n display: grid; grid-template-columns: 1fr 1fr;\n max-height: 340px; overflow-y: auto;\n }\n @media (max-width: 480px) {\n .col-list { grid-template-columns: 1fr; }\n }\n\n /* ── iPad / tablet (≤1024px) — 36px+ touch targets ─── */\n @media (max-width: 1024px) {\n .toolbar-btn { padding: 8px 12px; }\n .toolbar-primary-btn { padding: 8px 14px; }\n }\n\n /* ── Touch (incl. iPad): 44px tap targets, desktop mouse sizes unchanged ─── */\n @media (pointer: coarse) {\n .toolbar-btn, .toolbar-primary-btn { min-height: 44px; }\n }\n\n /* ── Phone (≤640px) — full-width host, 40px+ touch targets, safe dropdown height ─── */\n @media (max-width: 640px) {\n :host { display: flex; width: 100%; min-width: 0; }\n .toolbar { width: 100%; min-width: 0; justify-content: flex-end; flex-wrap: wrap; }\n .toolbar-btn { padding: 10px 12px; font-size: 0.8125rem; min-height: 44px; }\n .toolbar-primary-btn { padding: 10px 14px; font-size: 0.8125rem; min-height: 44px; }\n /* library source 2026-11-04, not yet published: every control stays reachable at 320-480px. The controls wrap onto further rows (above);\n a control wider than the whole row (a long primary label) is capped at the row width and wraps its own text instead of running off the\n screen, where the right-aligned row would have pushed it past the left edge and Export / More Actions out of reach. */\n .toolbar-btn, .toolbar-primary-btn { max-width: 100%; white-space: normal; text-align: center; justify-content: center; line-height: 1.25; overflow-wrap: anywhere; }\n .toolbar-item { min-width: 0; max-width: 100%; display: flex; }\n .more-dropdown { max-height: calc(100vh - 140px); overflow-y: auto; }\n .more-option { padding: 12px 16px; font-size: 0.9375rem; }\n }\n .col-option {\n display: flex; padding: 9px 4px;\n border-bottom: 1px solid #f1f5f9;\n transition: background 0.1s; border-radius: 6px;\n &:hover { background: #f8fafc; }\n /* hide border on last visible row (last 1 or 2 items) */\n &:nth-last-child(-n+2) { border-bottom: none; }\n }\n\n /* ── Views modal content ─── */\n .view-list { max-height: 360px; overflow-y: auto; margin: 0 -24px; }\n .view-option {\n display: flex; align-items: center; padding-right: 16px;\n border-bottom: 1px solid #f1f5f9;\n transition: background 0.1s;\n &:last-child { border-bottom: none; }\n &:hover { background: #f8fafc; }\n &.view-active { background: #eff6ff; }\n }\n .view-select-btn {\n flex: 1; padding: 12px 8px 12px 24px; background: none; border: none;\n font-size: 0.9rem; color: #334155; cursor: pointer; font-family: inherit; text-align: left;\n }\n .view-delete-btn {\n display: flex; align-items: center; justify-content: center;\n width: 28px; height: 28px; border-radius: 5px;\n background: none; border: none; cursor: pointer; color: #94a3b8;\n &:hover { color: #dc2626; background: #fef2f2; }\n }\n\n `],\n})\nexport class TableToolbarComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly columns = input.required<ColumnDef[]>();\n readonly visibleColumns = input.required<string[]>();\n readonly lockedColumn = input('');\n readonly savedViews = input<SavedView[]>([]);\n readonly activeViewId = input<string | null>(null);\n readonly showSavedViews = input(false);\n /**\n * Read-only (permission isn't 'full'): only Export and pure reads marked `allowReadOnly` stay — no other page buttons, no Import, no Columns, no\n * Save Current View, no deleting views. More Actions offers only the user's existing Saved Views and is\n * hidden when they have none.\n */\n readonly readOnly = input(false);\n /** Hides the More Actions dropdown (the table sets it while it is empty and unfiltered, leaving only the primary buttons). */\n readonly hideMoreActions = input(false);\n\n readonly tableButtons = input<ToolbarAction[]>([]);\n\n readonly visibleColumnsChange = output<string[]>();\n readonly saveViewClick = output<string>();\n readonly loadViewClick = output<SavedView>();\n readonly deleteViewClick = output<string>();\n readonly tableButtonClick = output<string>();\n\n protected readonly colModalOpen = signal(false);\n protected readonly viewModalOpen = signal(false);\n protected readonly moreOpen = signal(false);\n protected readonly saveNameModalOpen = signal(false);\n protected _saveViewName = '';\n\n /** Draft column visibility — only applied to the table when the user clicks Apply. */\n private readonly _pendingCols = signal<string[]>([]);\n\n /** Buttons this user may see — read-only users only get Export and pure reads marked `allowReadOnly` (page actions and Import are hidden). */\n private readonly _allowedButtons = computed(() =>\n this.readOnly() ? this.tableButtons().filter(b => b.type === 'export' || (b.allowReadOnly && b.type !== 'import')) : this.tableButtons(),\n );\n\n protected readonly standaloneButtons = computed(() =>\n this._allowedButtons()\n .filter(b => (b.variant === 'primary' || b.variant === 'secondary') && !b.hidden)\n .sort((a, b) => {\n // Primary buttons always render before secondary — regardless of definition order\n if (a.variant === b.variant) return 0;\n return a.variant === 'primary' ? -1 : 1;\n }),\n );\n protected readonly importButton = computed(() =>\n this._allowedButtons().find(b => b.type === 'import' && !b.hidden) ?? null,\n );\n protected readonly exportDropdownButton = computed(() =>\n this._allowedButtons().find(b => b.type === 'export' && !b.variant && !b.hidden) ?? null,\n );\n protected readonly additionalDropdownButtons = computed(() =>\n this._allowedButtons()\n .filter(b => !b.variant && !b.hidden && b.type !== 'import' && b.type !== 'export')\n .sort((a, b) => a.label.localeCompare(b.label, undefined, { sensitivity: 'base' })),\n );\n\n /** Saved Views entry: always for full users; for read-only users only when they already have views. */\n protected readonly showSavedViewsItem = computed(() =>\n this.showSavedViews() && (!this.readOnly() || this.savedViews().length > 0),\n );\n\n /** True when More Actions would contain at least one item. */\n protected readonly hasMoreItems = computed(() =>\n !!this.exportDropdownButton() || !!this.importButton() || !this.readOnly()\n || this.showSavedViewsItem() || this.additionalDropdownButtons().length > 0,\n );\n\n protected readonly configurableColumns = computed(() =>\n this.columns().filter(c => c.key !== this.lockedColumn() && c.cellType !== 'actions'),\n );\n\n protected readonly hiddenCount = computed(() =>\n this.configurableColumns().filter(c => !this.visibleColumns().includes(c.key)).length,\n );\n\n protected readonly activeViewName = computed(() =>\n this.savedViews().find(v => v.id === this.activeViewId())?.name ?? '',\n );\n\n protected readonly sortedViews = computed(() => {\n const views = [...this.savedViews()];\n return views.sort((a, b) => {\n if (a.isSystem !== b.isSystem) return a.isSystem ? -1 : 1;\n return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' });\n });\n });\n\n protected isVisible(key: string): boolean {\n return this._pendingCols().includes(key);\n }\n\n protected toggleColumn(key: string) {\n this._pendingCols.update(cols =>\n cols.includes(key) ? cols.filter(k => k !== key) : [...cols, key],\n );\n }\n\n protected applyColumns() {\n this.visibleColumnsChange.emit(this._pendingCols().filter(k => !this.columns().some(c => c.key === k && c.cellType === 'actions')));\n this.colModalOpen.set(false);\n }\n\n protected closeColModal() {\n this.colModalOpen.set(false);\n }\n\n protected loadView(view: SavedView) {\n this.loadViewClick.emit(view);\n this.viewModalOpen.set(false);\n }\n\n protected deleteView(id: string) {\n if (this.readOnly()) return;\n this.deleteViewClick.emit(id);\n }\n\n protected saveView() {\n if (this.readOnly()) return;\n this._saveViewName = '';\n this.saveNameModalOpen.set(true);\n }\n\n protected confirmSaveName() {\n if (this.readOnly() || !this._saveViewName.trim()) return;\n this.saveViewClick.emit(this._saveViewName.trim());\n this.saveNameModalOpen.set(false);\n this._saveViewName = '';\n }\n\n protected closeSaveNameModal() {\n this.saveNameModalOpen.set(false);\n this._saveViewName = '';\n }\n\n protected openColModal(event: Event) {\n event.stopPropagation();\n this.moreOpen.set(false);\n this._pendingCols.set([...this.visibleColumns()]);\n this.colModalOpen.set(true);\n }\n\n protected openViewModal(event: Event) {\n event.stopPropagation();\n this.moreOpen.set(false);\n this.viewModalOpen.set(true);\n }\n\n protected emitAction(type: string, event: Event) {\n event.stopPropagation();\n this.moreOpen.set(false);\n this.tableButtonClick.emit(type);\n }\n\n protected toggleMore(event: Event) {\n event.stopPropagation();\n this.moreOpen.update(v => !v);\n }\n\n protected onDocumentClick() {\n this.moreOpen.set(false);\n }\n\n protected onEscape() {\n this.moreOpen.set(false);\n }\n}\n"],"mappings":";;;;;;;;AA+RA,IAAa,wBAAb,MAAa,sBAAqB;CArRlC,cAAA;EAsRqB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,UAAU,MAAM,SAAuB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EACvC,KAAA,iBAAiB,MAAM,SAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;EAC3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ent {
|
|
|
624
624
|
</div>
|
|
625
625
|
`,
|
|
626
626
|
isInline: true,
|
|
627
|
-
styles: [":host{display:block}.ti-field{display:flex;flex-direction:column;gap:6px}.ti-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.ti-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ti-required{color:#dc2626;margin-left:2px}.ti-prefixed{display:grid;grid-template-columns:minmax(0,1fr)}.ti-prefixed .ti-input{grid-row:var(--ti-input-row);grid-column:1}.ti-prefix{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;font-size:.875rem;line-height:1;color:#64748b;pointer-events:none}@media(pointer:coarse),(max-width:480px){.ti-prefix{font-size:1rem}}.ti-disabled .ti-prefix{opacity:.5}.ti-leading-icon{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;color:#64748b;pointer-events:none}.ti-disabled .ti-leading-icon{opacity:.5}.ti-reveal{grid-row:var(--ti-input-row);grid-column:1;justify-self:end;align-self:center;margin-right:6px;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:#64748b;cursor:pointer}.ti-reveal:hover:not(:disabled){color:#1e293b;background:#f1f5f9}.ti-reveal:focus-visible{outline:2px solid #3b82f6;outline-offset:0}.ti-reveal:disabled{opacity:.5;cursor:not-allowed}@media(pointer:coarse),(max-width:480px){.ti-reveal{width:44px;height:44px;margin-right:0}}.ti-input{width:100%;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.ti-input::placeholder{color:#64748b;opacity:1}.ti-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.ti-input:read-only{background:#f8fafc;cursor:default}.ti-error .ti-input{border-color:#ef4444}.ti-error .ti-input:focus{box-shadow:0 0 0 3px #ef44441f}.ti-disabled .ti-input{opacity:.5;cursor:not-allowed}.ti-desc{margin
|
|
627
|
+
styles: [":host{display:block}.ti-field{display:flex;flex-direction:column;gap:6px}.ti-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.ti-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ti-required{color:#dc2626;margin-left:2px}.ti-prefixed{display:grid;grid-template-columns:minmax(0,1fr)}.ti-prefixed .ti-input{grid-row:var(--ti-input-row);grid-column:1}.ti-prefix{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;font-size:.875rem;line-height:1;color:#64748b;pointer-events:none}@media(pointer:coarse),(max-width:480px){.ti-prefix{font-size:1rem}}.ti-disabled .ti-prefix{opacity:.5}.ti-leading-icon{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;color:#64748b;pointer-events:none}.ti-disabled .ti-leading-icon{opacity:.5}.ti-reveal{grid-row:var(--ti-input-row);grid-column:1;justify-self:end;align-self:center;margin-right:6px;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:#64748b;cursor:pointer}.ti-reveal:hover:not(:disabled){color:#1e293b;background:#f1f5f9}.ti-reveal:focus-visible{outline:2px solid #3b82f6;outline-offset:0}.ti-reveal:disabled{opacity:.5;cursor:not-allowed}@media(pointer:coarse),(max-width:480px){.ti-reveal{width:44px;height:44px;margin-right:0}}.ti-input{width:100%;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.ti-input::placeholder{color:#64748b;opacity:1}.ti-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.ti-input:read-only{background:#f8fafc;cursor:default}.ti-error .ti-input{border-color:#ef4444}.ti-error .ti-input:focus{box-shadow:0 0 0 3px #ef44441f}.ti-disabled .ti-input{opacity:.5;cursor:not-allowed}.ti-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.ti-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.ti-input{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.ti-input{min-height:44px}}\n"],
|
|
628
628
|
dependencies: [{
|
|
629
629
|
kind: "component",
|
|
630
630
|
type: PasswordRequirementsComponent,
|
|
@@ -731,7 +731,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
731
731
|
}
|
|
732
732
|
</div>
|
|
733
733
|
`,
|
|
734
|
-
styles: [":host{display:block}.ti-field{display:flex;flex-direction:column;gap:6px}.ti-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.ti-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ti-required{color:#dc2626;margin-left:2px}.ti-prefixed{display:grid;grid-template-columns:minmax(0,1fr)}.ti-prefixed .ti-input{grid-row:var(--ti-input-row);grid-column:1}.ti-prefix{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;font-size:.875rem;line-height:1;color:#64748b;pointer-events:none}@media(pointer:coarse),(max-width:480px){.ti-prefix{font-size:1rem}}.ti-disabled .ti-prefix{opacity:.5}.ti-leading-icon{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;color:#64748b;pointer-events:none}.ti-disabled .ti-leading-icon{opacity:.5}.ti-reveal{grid-row:var(--ti-input-row);grid-column:1;justify-self:end;align-self:center;margin-right:6px;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:#64748b;cursor:pointer}.ti-reveal:hover:not(:disabled){color:#1e293b;background:#f1f5f9}.ti-reveal:focus-visible{outline:2px solid #3b82f6;outline-offset:0}.ti-reveal:disabled{opacity:.5;cursor:not-allowed}@media(pointer:coarse),(max-width:480px){.ti-reveal{width:44px;height:44px;margin-right:0}}.ti-input{width:100%;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.ti-input::placeholder{color:#64748b;opacity:1}.ti-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.ti-input:read-only{background:#f8fafc;cursor:default}.ti-error .ti-input{border-color:#ef4444}.ti-error .ti-input:focus{box-shadow:0 0 0 3px #ef44441f}.ti-disabled .ti-input{opacity:.5;cursor:not-allowed}.ti-desc{margin
|
|
734
|
+
styles: [":host{display:block}.ti-field{display:flex;flex-direction:column;gap:6px}.ti-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.ti-label{font-size:.8125rem;font-weight:600;color:#374151;line-height:1}.ti-required{color:#dc2626;margin-left:2px}.ti-prefixed{display:grid;grid-template-columns:minmax(0,1fr)}.ti-prefixed .ti-input{grid-row:var(--ti-input-row);grid-column:1}.ti-prefix{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;font-size:.875rem;line-height:1;color:#64748b;pointer-events:none}@media(pointer:coarse),(max-width:480px){.ti-prefix{font-size:1rem}}.ti-disabled .ti-prefix{opacity:.5}.ti-leading-icon{grid-row:var(--ti-input-row);grid-column:1;justify-self:start;align-self:center;margin-left:12px;color:#64748b;pointer-events:none}.ti-disabled .ti-leading-icon{opacity:.5}.ti-reveal{grid-row:var(--ti-input-row);grid-column:1;justify-self:end;align-self:center;margin-right:6px;position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:#64748b;cursor:pointer}.ti-reveal:hover:not(:disabled){color:#1e293b;background:#f1f5f9}.ti-reveal:focus-visible{outline:2px solid #3b82f6;outline-offset:0}.ti-reveal:disabled{opacity:.5;cursor:not-allowed}@media(pointer:coarse),(max-width:480px){.ti-reveal{width:44px;height:44px;margin-right:0}}.ti-input{width:100%;box-sizing:border-box;padding:9px 12px;font-size:.875rem;font-family:inherit;color:#1e293b;background:#fff;border:1px solid #7c8ba1;border-radius:8px;outline:none;transition:border-color .15s,box-shadow .15s}.ti-input::placeholder{color:#64748b;opacity:1}.ti-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.ti-input:read-only{background:#f8fafc;cursor:default}.ti-error .ti-input{border-color:#ef4444}.ti-error .ti-input:focus{box-shadow:0 0 0 3px #ef44441f}.ti-disabled .ti-input{opacity:.5;cursor:not-allowed}.ti-desc{margin:-6px 0 0;font-size:.75rem;line-height:1.4;color:#64748b}.ti-desc-error{color:#dc2626}@media(pointer:coarse),(max-width:480px){.ti-input{font-size:1rem}}@media(pointer:coarse),(max-width:480px){.ti-input{min-height:44px}}\n"]
|
|
735
735
|
}]
|
|
736
736
|
}],
|
|
737
737
|
ctorParameters: () => [],
|