@4sh/ui-kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +229 -0
- package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-types.mjs +12 -0
- package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit.mjs +16 -0
- package/fesm2022/4sh-ui-kit.mjs.map +1 -0
- package/package.json +287 -0
- package/styles/base/_base.scss +19 -0
- package/styles/base/_motion.scss +144 -0
- package/styles/base/_typography.scss +99 -0
- package/styles/generated/_tokens-breakpoint.scss +8 -0
- package/styles/generated/_tokens-metrics.scss +37 -0
- package/styles/generated/_tokens-primitives.scss +284 -0
- package/styles/generated/_tokens-responsive.scss +99 -0
- package/styles/generated/_tokens-semantics.scss +1274 -0
- package/styles/generated/_tokens-styles.scss +35 -0
- package/styles/generated/_tokens-transitions.scss +11 -0
- package/styles/generated/_tokens-typography.scss +14 -0
- package/styles/generated/_tokens.scss +10 -0
- package/styles/index.scss +25 -0
- package/styles/settings/_ui-config.scss +67 -0
- package/styles/utils/_functions.scss +67 -0
- package/styles/utils/_helpers.scss +129 -0
- package/styles/utils/_mixins.scss +186 -0
- package/styles/utils/_motion.scss +47 -0
- package/styles/utils/_overlay.scss +26 -0
- package/styles/utils.scss +15 -0
- package/styles.css +1 -0
- package/types/4sh-ui-kit-forms.d.ts +259 -0
- package/types/4sh-ui-kit-motion.d.ts +111 -0
- package/types/4sh-ui-kit-overlay.d.ts +31 -0
- package/types/4sh-ui-kit-theming.d.ts +54 -0
- package/types/4sh-ui-kit-types.d.ts +13 -0
- package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
- package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
- package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
- package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
- package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
- package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
- package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
- package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
- package/types/4sh-ui-kit-ui-button.d.ts +91 -0
- package/types/4sh-ui-kit-ui-card.d.ts +102 -0
- package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
- package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
- package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
- package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
- package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
- package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
- package/types/4sh-ui-kit-ui-field.d.ts +53 -0
- package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
- package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
- package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
- package/types/4sh-ui-kit-ui-image.d.ts +88 -0
- package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
- package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
- package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
- package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
- package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
- package/types/4sh-ui-kit-ui-input.d.ts +78 -0
- package/types/4sh-ui-kit-ui-label.d.ts +36 -0
- package/types/4sh-ui-kit-ui-link.d.ts +72 -0
- package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
- package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
- package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
- package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
- package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
- package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
- package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
- package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
- package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
- package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
- package/types/4sh-ui-kit-ui-select.d.ts +392 -0
- package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
- package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
- package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
- package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
- package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
- package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
- package/types/4sh-ui-kit-ui-table.d.ts +570 -0
- package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
- package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
- package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
- package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
- package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
- package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
- package/types/4sh-ui-kit.d.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-ui-input-tags.mjs","sources":["../../../projects/ui-kit/ui-input-tags/src/lib/ui-input-tags.ts","../../../projects/ui-kit/ui-input-tags/src/lib/ui-input-tags.html","../../../projects/ui-kit/ui-input-tags/src/public-api.ts","../../../projects/ui-kit/ui-input-tags/src/4sh-ui-kit-ui-input-tags.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n forwardRef,\n input,\n isDevMode,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { BaseFormField } from '@4sh/ui-kit/forms';\nimport { createOptionResolver } from '@4sh/ui-kit/forms';\nimport { dropdownOverlayPositions } from '@4sh/ui-kit/forms';\nimport { formatLabel } from '@4sh/ui-kit/forms';\nimport { warnMissingAccessibleName } from '@4sh/ui-kit/forms';\nimport { UiField } from '@4sh/ui-kit/ui-field';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/ui-icon';\nimport { UiChip } from '@4sh/ui-kit/ui-chip';\nimport { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';\nimport { UiMotion } from '@4sh/ui-kit/motion';\nimport { closeOnNavigation } from '@4sh/ui-kit/overlay';\n\n/** Delimiter used to split the typed text (and pasted text) into several tags. */\nexport type TagDelimiter = string | RegExp;\n\n/** Payload of the `tagAdd` output. */\nexport interface InputTagsAddEvent {\n /** Originating DOM event. */\n originalEvent: Event;\n /** Added value. */\n value: unknown;\n}\n\n/** Payload of the `tagRemove` output. */\nexport interface InputTagsRemoveEvent {\n /** Originating DOM event. */\n originalEvent: Event;\n /** Removed value. */\n value: unknown;\n /** Index of the removed value. */\n index: number;\n}\n\n/** Payload of the `completeMethod` output (typeahead). */\nexport interface InputTagsCompleteEvent {\n /** Originating DOM event. */\n originalEvent: Event;\n /** Search query. */\n query: string;\n}\n\n/** Payload of the `optionSelect` output (typeahead). */\nexport interface InputTagsSelectEvent {\n /** Originating DOM event. */\n originalEvent: Event;\n /** Selected suggestion (original object/primitive). */\n value: unknown;\n}\n\n/** Context handed to the `#item` template (per tag). */\nexport interface InputTagsItemContext<T = unknown> {\n /** The tag value (default `$implicit`). */\n $implicit: T;\n /** Same as `$implicit`, named for readability. */\n value: T;\n /** Resolved display label of the tag. */\n label: string;\n /** Index of the tag. */\n index: number;\n /** Removes this tag. */\n onRemove: (event: Event) => void;\n}\n\n/** Context handed to the `#option` template (per suggestion). */\nexport interface InputTagsOptionContext<T = unknown> {\n /** The suggestion (default `$implicit`). */\n $implicit: T;\n /** Same as `$implicit`, named for readability. */\n option: T;\n /** Index of the suggestion in the visible list. */\n index: number;\n}\n\n/** Context handed to the `#group` template. */\nexport interface InputTagsGroupContext<G = unknown> {\n /** The group object (default `$implicit`). */\n $implicit: G;\n /** Same as `$implicit`, named for readability. */\n group: G;\n}\n\n/** @ignore Flat view of one suggestion. */\ninterface TagEntry {\n value: unknown;\n label: string;\n disabled: boolean;\n original: unknown;\n}\n\n/** @ignore Group of entries. */\ninterface TagGroupEntry {\n label: string;\n original: unknown;\n entries: TagEntry[];\n}\n\n/** @ignore Rendered suggestion row. */\ntype TagRow =\n | { kind: 'group'; key: string; label: string; original: unknown }\n | { kind: 'option'; key: string; id: string; index: number; entry: TagEntry; present: boolean };\n\n/**\n * ui-input-tags — headless multi-value tag entry built on the `ui-field` shell\n * (label + box + helper). Tags are entered by typing and pressing `Enter`\n * (and/or a `delimiter`), and removed with `Backspace` / the × action.\n *\n * The model is an **array** driven through {@link BaseFormField}\n * (`ControlValueAccessor`) — compatible with `[(ngModel)]`, Reactive Forms and\n * Signal Forms (`[formField]`, stable since Angular 22). Options: `max`,\n * `allowDuplicate`, `addOnBlur` / `addOnTab` / `addOnPaste`, and a `typeahead`\n * mode (a CDK-overlay suggestions panel fed by the parent via `completeMethod`).\n *\n * A11y: the tag list is a `role=\"listbox\"` (`aria-orientation=\"horizontal\"`);\n * each tag is a `role=\"option\"` with roving focus (`←` / `→` between tags,\n * `Backspace` / `Delete` to delete). The editable input follows the combobox\n * pattern in `typeahead` mode.\n *\n * @example\n * ```html\n * <ui-input-tags label=\"Mots-clés\" [(ngModel)]=\"keywords\" placeholder=\"Ajouter…\" />\n * ```\n */\n@Component({\n selector: 'ui-input-tags',\n imports: [NgTemplateOutlet, OverlayModule, UiField, UiIcon, UiChip, UiMotion],\n templateUrl: './ui-input-tags.html',\n styleUrl: './ui-input-tags.scss',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInputTags), multi: true }],\n})\nexport class UiInputTags<T = unknown> extends BaseFormField<T[]> {\n /** Native placeholder shown when the input is empty (and no tag exists). */\n placeholder = input<string>();\n /** Maximum number of tags allowed (`undefined` = unlimited). */\n max = input<number, unknown>(undefined, { transform: numberAttribute });\n /** Delimiter that splits typed/pasted text into several tags (in addition to `Enter`). */\n delimiter = input<TagDelimiter>();\n /** Allow the same value to be added several times. */\n allowDuplicate = input(false, { transform: booleanAttribute });\n /** Add the current input as a tag when the field loses focus. */\n addOnBlur = input(false, { transform: booleanAttribute });\n /** Add the current input as a tag on `Tab`. */\n addOnTab = input(false, { transform: booleanAttribute });\n /** Split pasted text with the `delimiter` (or whitespace/newlines) and add each part. */\n addOnPaste = input(false, { transform: booleanAttribute });\n /** Max character length of a single typed tag. */\n maxLength = input<number, unknown>(undefined, { transform: numberAttribute });\n\n /** Color family of the default `ui-chip` tags (ignored when an `#item` template is used). */\n chipLevel = input<UiFeedbackLevel>('default');\n /** Intensity of the default `ui-chip` tags: `low` (subtle, default) or `high` (solid). */\n chipSubLevel = input<UiSubLevel>('low');\n /** Pill shape (default) vs rounded-rectangle for the default `ui-chip` tags. */\n chipRounded = input(true, { transform: booleanAttribute });\n\n /** Show a suggestions dropdown as the user types (fed via `completeMethod`). */\n typeahead = input(false, { transform: booleanAttribute });\n /** Suggestions to display — set by the parent in response to `completeMethod`. */\n suggestions = input<readonly unknown[]>([]);\n /** Field name (dot-path) read as a suggestion label. */\n optionLabel = input<string>();\n /** Field name (dot-path) read as the value added to the model. */\n optionValue = input<string>();\n /** Field name (dot-path) read as a suggestion's disabled flag. */\n optionDisabled = input<string>();\n /** Property compared for value equality (duplicate detection on objects). */\n dataKey = input<string>();\n /** Treat `suggestions` as groups. */\n group = input(false, { transform: booleanAttribute });\n /** Field name of a group's label. */\n optionGroupLabel = input<string>('label');\n /** Field name of a group's children array. */\n optionGroupChildren = input<string>('items');\n /** Minimum number of characters before `completeMethod` is emitted. */\n minLength = input<number, unknown>(1, { transform: numberAttribute });\n /** Debounce (ms) between the last keystroke and `completeMethod`. */\n delay = input<number, unknown>(300, { transform: numberAttribute });\n /** Emit a query as soon as the input is focused (before any typing). */\n completeOnFocus = input(false, { transform: booleanAttribute });\n /** Max height of the suggestions list (CSS size). Defaults from the SCSS. */\n scrollHeight = input<string>();\n /** Visually focus the first suggestion when the panel opens. */\n autoOptionFocus = input(false, { transform: booleanAttribute });\n /** Visually focus the suggestion under the mouse pointer. */\n focusOnHover = input(true, { transform: booleanAttribute });\n /** Auto-flip the panel above the input when space is lacking below. */\n autoFlip = input(true, { transform: booleanAttribute });\n /** Extra class(es) applied to the suggestions panel. */\n panelStyleClass = input<string>();\n\n /** Message shown when a query returns no suggestion. */\n emptyMessage = input<string>('Aucun résultat');\n /** Accessible label of each tag's remove action — `{0}` is the tag label. */\n removeTagLabel = input<string>('Supprimer {0}');\n\n /** Emitted when a tag is added. */\n tagAdd = output<InputTagsAddEvent>();\n /** Emitted when a tag is removed. */\n tagRemove = output<InputTagsRemoveEvent>();\n /** Emitted whenever the model changes. */\n valueChange = output<T[]>();\n /** Emitted (debounced) when a typeahead query should run. */\n completeMethod = output<InputTagsCompleteEvent>();\n /** Emitted when a suggestion is selected. */\n optionSelect = output<InputTagsSelectEvent>();\n /** Emitted when the suggestions panel opens. */\n opened = output<void>();\n /** Emitted when the suggestions panel closes. */\n closed = output<void>();\n /** Emitted when the input receives focus. */\n inputFocus = output<FocusEvent>();\n /** Emitted when the input loses focus. */\n inputBlur = output<FocusEvent>();\n\n /** Custom tag template: `<ng-template #item let-value let-remove=\"onRemove\">`. */\n protected readonly itemTemplate = contentChild<TemplateRef<InputTagsItemContext<T>>>('item');\n /** Custom suggestion template: `<ng-template #option let-option>`. */\n protected readonly optionTemplate = contentChild<TemplateRef<InputTagsOptionContext<T>>>('option');\n /** Custom group-header template: `<ng-template #group let-group>`. */\n protected readonly groupTemplate = contentChild<TemplateRef<InputTagsGroupContext>>('group');\n\n /** @ignore Component root (overlay origin). */\n private readonly containerEl = viewChild.required<ElementRef<HTMLElement>>('container');\n /** @ignore Editable input. */\n private readonly inputEl = viewChild<ElementRef<HTMLInputElement>>('inputEl');\n /** @ignore Panel root element. */\n private readonly panelEl = viewChild<ElementRef<HTMLElement>>('panel');\n /** @ignore Tag option elements (roving focus). `read: ElementRef` covers both the\n * plain `<span>` (template mode) and the `<ui-chip>` host (default mode). */\n private readonly tagEls = viewChildren('tagEl', { read: ElementRef });\n\n /** @ignore */\n protected readonly panelOpen = signal(false);\n /** @ignore */\n protected readonly overlayOrigin = signal<Element | null>(null);\n /** @ignore */\n protected readonly overlayWidth = signal<number | null>(null);\n /** @ignore Text currently typed in the input. */\n protected readonly inputText = signal('');\n /** @ignore Index of the roving-focused tag (-1 = the input holds focus). */\n protected readonly focusedTag = signal(-1);\n /** @ignore Index of the visually focused suggestion (-1 = none). */\n protected readonly focusedOption = signal(-1);\n /** @ignore A query has been emitted and is awaiting fresh suggestions. */\n private queryDirty = false;\n /** @ignore Debounce handle for `completeMethod`. */\n private searchTimeout: ReturnType<typeof setTimeout> | undefined;\n\n constructor() {\n super();\n\n // Never carry an open panel over to the next page (the field can live in\n // an app shell that survives the navigation).\n closeOnNavigation(() => this.close(false));\n\n if (isDevMode()) {\n effect(() => {\n if (!this.label() && !this.ariaLabel() && !this.ariaLabelledBy()) {\n warnMissingAccessibleName(\n 'ui-input-tags',\n 'Field has no accessible name: provide `label`, `ariaLabel` or `ariaLabelledBy`.',\n );\n }\n });\n }\n }\n\n // --- Derived state -----------------------------------------------------\n\n /** @ignore Current tags. */\n protected readonly tagValues = computed<T[]>(() => this.modelValue() ?? []);\n /** @ignore Tags as display rows (value + resolved label). */\n protected readonly tagRows = computed(() =>\n this.tagValues().map((value, index) => {\n const label = this.labelOfValue(value);\n return { value, index, label, removeAriaLabel: formatLabel(this.removeTagLabel(), label) };\n }),\n );\n /** @ignore */\n protected readonly listboxId = computed(() => `${this.resolvedId()}-tags`);\n /** @ignore */\n protected readonly panelListId = computed(() => `${this.resolvedId()}-list`);\n /** @ignore Icon size aligned with the field size. */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n /** @ignore Tags can be removed (not disabled / read-only). */\n protected readonly canRemove = computed(() => !this.isDisabled() && !this.readonly());\n /** @ignore The tag cap has been reached. */\n protected readonly isFull = computed(() => {\n const max = this.max();\n return max != null && max > 0 && this.tagValues().length >= max;\n });\n /** @ignore The input accepts typing. */\n protected readonly canType = computed(() => !this.isDisabled() && !this.readonly() && !this.isFull());\n /** @ignore The placeholder is shown only while there is no tag. */\n protected readonly effectivePlaceholder = computed(() => (this.tagValues().length ? '' : (this.placeholder() ?? '')));\n\n /** @ignore Flat entries (no groups). */\n private readonly flatEntries = computed<TagEntry[]>(() => {\n if (this.group()) return this.groupEntries().flatMap((g) => g.entries);\n return (this.suggestions() ?? []).map((option) => this.toEntry(option));\n });\n\n /** @ignore Groups of entries. */\n private readonly groupEntries = computed<TagGroupEntry[]>(() => {\n if (!this.group()) return [];\n return (this.suggestions() ?? []).map((groupOption) => {\n const children = this.getField(groupOption, this.optionGroupChildren());\n return {\n label: this.asText(this.getField(groupOption, this.optionGroupLabel())) ?? '',\n original: groupOption,\n entries: (Array.isArray(children) ? children : []).map((option) => this.toEntry(option)),\n };\n });\n });\n\n /** @ignore Rendered suggestion rows (already-added values are marked present/disabled). */\n protected readonly visibleRows = computed<TagRow[]>(() => {\n const rows: TagRow[] = [];\n let index = 0;\n const pushOption = (entry: TagEntry): void => {\n const present = this.isPresent(entry.value);\n rows.push({\n kind: 'option',\n key: `${this.panelListId()}-${index}`,\n id: `${this.resolvedId()}-option-${index}`,\n index,\n entry: { ...entry, disabled: entry.disabled || (present && !this.allowDuplicate()) },\n present,\n });\n index++;\n };\n\n if (this.group()) {\n this.groupEntries().forEach((g, gi) => {\n if (!g.entries.length) return;\n rows.push({ kind: 'group', key: `${this.panelListId()}-group-${gi}`, label: g.label, original: g.original });\n g.entries.forEach(pushOption);\n });\n } else {\n this.flatEntries().forEach(pushOption);\n }\n return rows;\n });\n\n /** @ignore Visible option rows only (visual-focus space). */\n protected readonly visibleOptions = computed(() =>\n this.visibleRows().filter((r): r is Extract<TagRow, { kind: 'option' }> => r.kind === 'option'),\n );\n\n /** @ignore */\n protected readonly optionCount = computed(() => this.visibleOptions().length);\n /** @ignore */\n protected readonly showEmpty = computed(() => this.panelOpen() && !this.visibleRows().length);\n\n /** @ignore id of the visually focused suggestion (aria-activedescendant). */\n protected readonly activeDescendant = computed(() => {\n if (!this.panelOpen()) return null;\n return this.visibleOptions()[this.focusedOption()]?.id ?? null;\n });\n\n /** @ignore */\n protected readonly overlayPositions = computed(() => dropdownOverlayPositions(this.autoFlip()));\n\n // --- CVA -----------------------------------------------------------------\n\n override writeValue(value: T[]): void {\n this.modelValue.set(Array.isArray(value) ? value : []);\n }\n\n /** Moves focus to the input. */\n focus(options?: FocusOptions): void {\n this.inputEl()?.nativeElement.focus(options);\n }\n\n // --- Tag mutations -------------------------------------------------------\n\n /** @ignore Add one value as a tag (respects `max` and `allowDuplicate`). Returns true if added. */\n private addValue(value: T, event: Event): boolean {\n if (!this.canType()) return false;\n if (!this.allowDuplicate() && this.isPresent(value)) return false;\n this.commit([...this.tagValues(), value]);\n this.tagAdd.emit({ originalEvent: event, value });\n return true;\n }\n\n /** @ignore Add the typed text (or its delimiter-split parts) as tag(s). */\n private addFromInput(event: Event): void {\n const parts = this.split(this.inputText())\n .map((p) => p.trim())\n .filter(Boolean);\n let added = false;\n for (const part of parts) {\n if (this.addValue(part as T, event)) added = true;\n if (this.isFull()) break;\n }\n if (added || parts.length) this.inputText.set('');\n }\n\n /** Removes the tag at `index`. */\n removeAt(index: number, event: Event): void {\n if (this.isDisabled() || this.readonly()) return;\n const tags = this.tagValues();\n if (index < 0 || index >= tags.length) return;\n const value = tags[index];\n this.commit(tags.filter((_, i) => i !== index));\n this.tagRemove.emit({ originalEvent: event, value, index });\n // Keep the roving focus coherent after removal.\n const nextCount = tags.length - 1;\n if (nextCount === 0) this.focusInput();\n else this.focusTag(Math.min(index, nextCount - 1));\n }\n\n /** @ignore Propagate a user-driven value change (view → form). */\n private commit(value: T[]): void {\n this.modelValue.set(value);\n this.emitChange(value);\n this.valueChange.emit(value);\n }\n\n // --- Input interactions --------------------------------------------------\n\n /** @ignore */\n protected onInput(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.inputText.set(value);\n\n // A typed delimiter flushes the completed part(s) into tags.\n if (this.delimiter() && this.split(value).length > 1) {\n this.flushDelimited(event);\n return;\n }\n\n if (!this.typeahead()) return;\n\n if (this.searchTimeout) clearTimeout(this.searchTimeout);\n const query = this.inputText();\n if (query.length < this.minLength()) {\n this.close(false);\n return;\n }\n this.focusedOption.set(-1);\n this.searchTimeout = setTimeout(() => this.runSearch(event, query), this.delay());\n }\n\n /** @ignore Split the text, add every completed part, keep the trailing remainder in the input. */\n private flushDelimited(event: Event): void {\n const parts = this.split(this.inputText());\n const remainder = parts.pop() ?? '';\n parts.map((p) => p.trim()).filter(Boolean).forEach((p) => this.addValue(p as T, event));\n this.inputText.set(remainder);\n }\n\n /** @ignore */\n protected onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled() || this.readonly()) return;\n const input = this.inputEl()?.nativeElement;\n const atStart = !input || (input.selectionStart === 0 && input.selectionEnd === 0);\n\n switch (event.key) {\n case 'Enter':\n event.preventDefault();\n if (this.panelOpen() && this.focusedOption() !== -1) this.selectFocusedOption(event);\n else this.addFromInput(event);\n return;\n case 'Backspace':\n if (this.inputText().length === 0 && this.tagValues().length) {\n event.preventDefault();\n this.removeAt(this.tagValues().length - 1, event);\n }\n return;\n case 'ArrowLeft':\n if (atStart && this.tagValues().length) {\n event.preventDefault();\n this.focusTag(this.tagValues().length - 1);\n }\n return;\n case 'ArrowDown':\n if (this.typeahead()) {\n event.preventDefault();\n this.panelOpen() ? this.moveOption(1) : this.reopen();\n }\n return;\n case 'ArrowUp':\n if (this.typeahead() && this.panelOpen()) {\n event.preventDefault();\n this.moveOption(-1);\n }\n return;\n case 'Escape':\n if (this.panelOpen()) {\n event.preventDefault();\n event.stopPropagation();\n this.close();\n }\n return;\n case 'Tab':\n if (this.addOnTab() && this.inputText().trim()) {\n event.preventDefault();\n this.addFromInput(event);\n }\n if (this.panelOpen()) this.close(false);\n return;\n default:\n return;\n }\n }\n\n /** @ignore */\n protected onPaste(event: ClipboardEvent): void {\n if (!this.addOnPaste() || !this.canType()) return;\n const text = event.clipboardData?.getData('text') ?? '';\n if (!text) return;\n event.preventDefault();\n const parts = (this.delimiter() ? this.split(text) : text.split(/[\\r\\n\\t,;]+/))\n .map((p) => p.trim())\n .filter(Boolean);\n for (const part of parts) {\n this.addValue(part as T, event);\n if (this.isFull()) break;\n }\n }\n\n /** @ignore */\n protected onInputFocus(event: FocusEvent): void {\n if (this.isDisabled()) return;\n this.focusedTag.set(-1);\n if (this.typeahead() && !this.queryDirty && this.completeOnFocus()) this.runSearch(event, this.inputText());\n this.inputFocus.emit(event);\n }\n\n /** @ignore */\n protected onInputBlur(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n const insideComponent = this.containerEl().nativeElement.contains(next);\n const insidePanel = this.panelEl()?.nativeElement.contains(next);\n if (!insideComponent && !insidePanel) {\n if (this.addOnBlur() && this.inputText().trim()) this.addFromInput(event);\n this.emitTouch();\n }\n this.inputBlur.emit(event);\n }\n\n /** @ignore Focus / clicks on the field box (but not a tag / button) land on the input. */\n protected onBoxMousedown(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n if (target.closest('button') || target.closest('.ui-input-tags-tag') || target.closest('input')) return;\n event.preventDefault();\n this.focusInput();\n }\n\n // --- Roving tag focus ----------------------------------------------------\n\n /** @ignore */\n protected onTagKeydown(event: KeyboardEvent, index: number): void {\n if (this.isDisabled() || this.readonly()) return;\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (index > 0) this.focusTag(index - 1);\n return;\n case 'ArrowRight':\n event.preventDefault();\n if (index < this.tagValues().length - 1) this.focusTag(index + 1);\n else this.focusInput();\n return;\n case 'Backspace':\n case 'Delete':\n event.preventDefault();\n this.removeAt(index, event);\n return;\n case 'Home':\n event.preventDefault();\n this.focusTag(0);\n return;\n case 'End':\n event.preventDefault();\n this.focusTag(this.tagValues().length - 1);\n return;\n default:\n return;\n }\n }\n\n /** @ignore */\n private focusTag(index: number): void {\n this.focusedTag.set(index);\n setTimeout(() => this.tagEls()[index]?.nativeElement.focus());\n }\n\n /** @ignore */\n private focusInput(): void {\n this.focusedTag.set(-1);\n this.focus();\n }\n\n // --- Typeahead panel -----------------------------------------------------\n\n /** @ignore */\n private runSearch(event: Event, query: string): void {\n this.queryDirty = true;\n this.completeMethod.emit({ originalEvent: event, query });\n this.open();\n }\n\n /** @ignore */\n private open(): void {\n if (!this.canType() || this.panelOpen()) return;\n const origin =\n this.containerEl().nativeElement.querySelector('.ui-field-box') ?? this.containerEl().nativeElement;\n this.overlayOrigin.set(origin);\n this.overlayWidth.set(origin.getBoundingClientRect().width);\n this.focusedOption.set(this.autoOptionFocus() ? this.visibleOptions().findIndex((o) => !o.entry.disabled) : -1);\n this.panelOpen.set(true);\n this.opened.emit();\n }\n\n /** @ignore */\n protected close(focusInput = true): void {\n if (!this.panelOpen()) return;\n this.panelOpen.set(false);\n this.focusedOption.set(-1);\n this.queryDirty = false;\n this.closed.emit();\n if (focusInput) this.focus();\n }\n\n /** @ignore */\n private reopen(): void {\n if (!this.visibleRows().length) return;\n this.open();\n if (this.focusedOption() === -1) this.moveOption(1);\n }\n\n /** @ignore */\n protected onOptionClick(row: Extract<TagRow, { kind: 'option' }>, event: Event): void {\n event.preventDefault();\n this.selectRow(row, event);\n }\n\n /** @ignore Keep focus on the input when clicking an option. */\n protected onOptionMousedown(event: MouseEvent): void {\n event.preventDefault();\n }\n\n /** @ignore */\n protected onOptionMouseEnter(row: Extract<TagRow, { kind: 'option' }>): void {\n if (this.focusOnHover() && !row.entry.disabled) this.focusedOption.set(row.index);\n }\n\n /** @ignore */\n private selectRow(row: Extract<TagRow, { kind: 'option' }>, event: Event): void {\n if (row.entry.disabled) return;\n if (this.addValue(row.entry.value as T, event)) {\n this.optionSelect.emit({ originalEvent: event, value: row.entry.original });\n }\n this.inputText.set('');\n this.close();\n }\n\n /** @ignore */\n private selectFocusedOption(event: Event): void {\n const row = this.visibleOptions()[this.focusedOption()];\n if (row) this.selectRow(row, event);\n else this.addFromInput(event);\n }\n\n /** @ignore Move the visual focus, skipping disabled options (no wrap). */\n private moveOption(delta: 1 | -1): void {\n const options = this.visibleOptions();\n if (!options.length) return;\n let i = this.focusedOption();\n if (i === -1) i = delta === 1 ? -1 : options.length;\n for (i += delta; i >= 0 && i < options.length; i += delta) {\n if (!options[i].entry.disabled) {\n this.focusedOption.set(i);\n this.scrollOptionIntoView(options[i].id);\n return;\n }\n }\n }\n\n /** @ignore */\n private scrollOptionIntoView(id: string): void {\n this.panelEl()?.nativeElement.querySelector(`[id=\"${id}\"]`)?.scrollIntoView({ block: 'nearest' });\n }\n\n // --- Option resolution ---------------------------------------------------\n\n /** @ignore Display label for a tag value. */\n private labelOfValue(value: unknown): string {\n if (value === null || value === undefined) return '';\n const entry = this.flatEntries().find((e) => this.equals(e.value, value));\n if (entry) return entry.label;\n return this.resolveLabel(value) ?? this.asText(value) ?? '';\n }\n\n /** @ignore Shared option resolution (see `option-resolver.ts`). */\n private readonly resolver = createOptionResolver({\n optionValue: this.optionValue,\n optionLabel: this.optionLabel,\n optionDisabled: this.optionDisabled,\n dataKey: this.dataKey,\n });\n\n /** @ignore */\n private toEntry(option: unknown): TagEntry {\n return this.resolver.toEntry(option);\n }\n\n /** @ignore Read a (dot-path) field from an object. */\n private getField(target: unknown, path: string | undefined): unknown {\n return this.resolver.getField(target, path);\n }\n\n /** @ignore */\n private resolveValue(option: unknown): unknown {\n return this.resolver.resolveValue(option);\n }\n\n /** @ignore */\n private resolveLabel(option: unknown): string | null {\n return this.resolver.resolveLabel(option);\n }\n\n /** @ignore */\n private asText(value: unknown): string | null {\n return this.resolver.asText(value);\n }\n\n /** @ignore Whether a value is already a tag. */\n private isPresent(value: unknown): boolean {\n return this.tagValues().some((v) => this.equals(v, value));\n }\n\n /** @ignore Value equality — by `dataKey` for objects, strict otherwise. */\n private equals(a: unknown, b: unknown): boolean {\n return this.resolver.equals(a, b);\n }\n\n /** @ignore Split text by the delimiter (string or regex); whole text when none. */\n private split(text: string): string[] {\n const d = this.delimiter();\n if (!d) return [text];\n return text.split(d as string | RegExp);\n }\n}\n","<!-- One suggestion row (typeahead): group header or option. -->\n<ng-template #rowTpl let-row>\n @if (row.kind === 'group') {\n <li class=\"ui-input-tags-group\" role=\"presentation\" [class._small]=\"size() === 'small'\">\n @if (groupTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ $implicit: row.original, group: row.original }\" />\n } @else {\n {{ row.label }}\n }\n </li>\n } @else {\n <!-- ARIA combobox/listbox pattern: keyboard and focus are handled by\n the input role=\"combobox\" (roving via aria-activedescendant). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <li\n class=\"ui-input-tags-option\"\n role=\"option\"\n [attr.id]=\"row.id\"\n [class._small]=\"size() === 'small'\"\n [class._present]=\"row.present\"\n [class._focused]=\"row.index === focusedOption()\"\n [class._disabled]=\"row.entry.disabled\"\n [attr.aria-selected]=\"row.present\"\n [attr.aria-disabled]=\"row.entry.disabled || null\"\n [attr.aria-setsize]=\"optionCount()\"\n [attr.aria-posinset]=\"row.index + 1\"\n (mousedown)=\"onOptionMousedown($event)\"\n (click)=\"onOptionClick(row, $event)\"\n (mouseenter)=\"onOptionMouseEnter(row)\"\n >\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row.entry.original, option: row.entry.original, index: row.index }\"\n />\n } @else {\n <span class=\"ui-input-tags-option-label\">{{ row.entry.label }}</span>\n }\n @if (row.present) {\n <ui-icon class=\"ui-input-tags-option-check\" name=\"check\" [size]=\"iconSize()\" />\n }\n </li>\n }\n</ng-template>\n\n<!-- Suggestions panel (CDK overlay, typeahead). -->\n<ng-template #panelTpl>\n <div\n #panel\n class=\"ui-input-tags-panel\"\n [class]=\"panelStyleClass()\"\n [class._small]=\"size() === 'small'\"\n [style.width.px]=\"overlayWidth()\"\n [uiMotion]=\"'slide-down'\"\n #panelMotion=\"uiMotion\"\n motionOnInsert\n >\n <div class=\"ui-input-tags-scroller\" [class._small]=\"size() === 'small'\" [style.max-height]=\"scrollHeight() || null\">\n <ul\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n [attr.id]=\"panelListId()\"\n [attr.aria-label]=\"label() || ariaLabel() || null\"\n >\n @for (row of visibleRows(); track row.key) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n } @empty {\n <li class=\"ui-input-tags-empty\" role=\"presentation\">{{ emptyMessage() }}</li>\n }\n </ul>\n </div>\n </div>\n</ng-template>\n\n<!-- Field shell: label + box (tags listbox + input) + helper. -->\n<div #container class=\"ui-input-tags\">\n <ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [autoHeight]=\"true\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n >\n <div class=\"ui-input-tags-control\" (mousedown)=\"onBoxMousedown($event)\">\n <!-- The listbox wraps ONLY the option tags (a listbox may not contain a textbox);\n `display: contents` keeps tags and input flowing on the same wrapped lines. -->\n <div\n class=\"ui-input-tags-list\"\n role=\"listbox\"\n aria-orientation=\"horizontal\"\n [attr.id]=\"listboxId()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n >\n @for (tag of tagRows(); track $index) {\n @if (itemTemplate(); as tpl) {\n <!-- Template mode: a bare option wrapper hosts the custom tag content. -->\n <span\n #tagEl\n class=\"ui-input-tags-tag _custom\"\n [class._disabled]=\"isDisabled()\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : (focusedTag() === tag.index ? 0 : -1)\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: tag.value, value: tag.value, label: tag.label, index: tag.index, onRemove: removeAt.bind(this, tag.index) }\"\n />\n </span>\n } @else {\n <!-- Default mode: the tag is a ui-chip that IS the roving option. -->\n <ui-chip\n #tagEl\n class=\"ui-input-tags-tag\"\n role=\"option\"\n aria-selected=\"true\"\n [attr.aria-label]=\"tag.label\"\n [label]=\"tag.label\"\n [level]=\"chipLevel()\"\n [subLevel]=\"chipSubLevel()\"\n size=\"small\"\n [rounded]=\"chipRounded()\"\n [disabled]=\"isDisabled()\"\n [removable]=\"canRemove()\"\n [removeTabindex]=\"-1\"\n [removeAriaLabel]=\"tag.removeAriaLabel\"\n [attr.aria-setsize]=\"tagRows().length\"\n [attr.aria-posinset]=\"tag.index + 1\"\n [attr.tabindex]=\"isDisabled() ? null : (focusedTag() === tag.index ? 0 : -1)\"\n (keydown)=\"onTagKeydown($event, tag.index)\"\n (focus)=\"focusedTag.set(tag.index)\"\n (remove)=\"removeAt(tag.index, $event)\"\n />\n }\n }\n </div>\n\n <input\n #inputEl\n type=\"text\"\n class=\"ui-input-tags-input\"\n [class._small]=\"size() === 'small'\"\n autocomplete=\"off\"\n [id]=\"resolvedId()\"\n [value]=\"inputText()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || isFull()\"\n [attr.name]=\"name() || null\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.role]=\"typeahead() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"typeahead() ? 'list' : null\"\n [attr.aria-haspopup]=\"typeahead() ? 'listbox' : null\"\n [attr.aria-expanded]=\"typeahead() ? panelOpen() : null\"\n [attr.aria-controls]=\"typeahead() && panelOpen() ? panelListId() : null\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (paste)=\"onPaste($event)\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n />\n </div>\n </ui-field>\n</div>\n\n@if (typeahead()) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"panelOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close(false)\"\n (overlayOutsideClick)=\"close(false)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTpl\" />\n </ng-template>\n}\n","/*\n * Public API Surface of ui-kit/ui-input-tags\n */\n\nexport * from './lib/ui-input-tags';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyHA;;;;;;;;;;;;;;;;;;;;AAoBG;AAQG,MAAO,WAAyB,SAAQ,aAAkB,CAAA;AAsH9D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AArHT,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAU;;QAE7B,IAAA,CAAA,GAAG,GAAG,KAAK,CAAkB,SAAS,2EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;AAEvE,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAgB;;QAEjC,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,KAAK,sFAAI,SAAS,EAAE,gBAAgB,EAAA,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QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEnB,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEd,OAAO,mEAG9B,OAAO,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExPtE;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, output, viewChild, computed, forwardRef, Component } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { BaseFormField } from '@4sh/ui-kit/forms';
|
|
5
|
+
import { UiField } from '@4sh/ui-kit/ui-field';
|
|
6
|
+
import { UiIcon } from '@4sh/ui-kit/ui-icon';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* ui-input — headless composed text field, built on the `ui-field` shell
|
|
10
|
+
* (label + box + helper) + a native `<input>`.
|
|
11
|
+
*
|
|
12
|
+
* Covers all text types (text/email/tel/url/search/**password**). Password
|
|
13
|
+
* reveal, search clearing, etc. are handled via the **right action zone**
|
|
14
|
+
* (`iconRightAriaLabel` + `iconRightClick`).
|
|
15
|
+
*
|
|
16
|
+
* Standalone, `[(ngModel)]` or reactive forms (ControlValueAccessor via BaseFormField).
|
|
17
|
+
* For numbers → `ui-input-number`, for masks → `ui-input-mask`.
|
|
18
|
+
*/
|
|
19
|
+
class UiInput extends BaseFormField {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
/** Native input type. */
|
|
23
|
+
this.type = input('text', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
25
|
+
/**
|
|
26
|
+
* Display-only value (bypasses the CVA model). For composite hosts
|
|
27
|
+
* (e.g. `ui-datepicker`) that own the visible text and read it back via
|
|
28
|
+
* `valueChange` — leave unset when using `[(ngModel)]`/reactive forms.
|
|
29
|
+
*/
|
|
30
|
+
this.value = input(/* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
32
|
+
/** `aria-haspopup` forwarded to the native input (popup trigger hosts). */
|
|
33
|
+
this.ariaHasPopup = input(/* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [undefined, { debugName: "ariaHasPopup" }] : /* istanbul ignore next */ []));
|
|
35
|
+
/** `aria-expanded` forwarded to the native input (popup trigger hosts). */
|
|
36
|
+
this.ariaExpanded = input(/* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [undefined, { debugName: "ariaExpanded" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/** `aria-controls` forwarded to the native input (popup trigger hosts). */
|
|
39
|
+
this.ariaControls = input(/* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [undefined, { debugName: "ariaControls" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Native placeholder. */
|
|
42
|
+
this.placeholder = input(/* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/** Suffix unit (e.g. "%", "@domain"). Shown when provided. */
|
|
45
|
+
this.unit = input(/* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [undefined, { debugName: "unit" }] : /* istanbul ignore next */ []));
|
|
47
|
+
/** Left FontAwesome icon name (decorative). */
|
|
48
|
+
this.iconLeft = input(/* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [undefined, { debugName: "iconLeft" }] : /* istanbul ignore next */ []));
|
|
50
|
+
/** Right FontAwesome icon name. */
|
|
51
|
+
this.iconRight = input(/* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [undefined, { debugName: "iconRight" }] : /* istanbul ignore next */ []));
|
|
53
|
+
/**
|
|
54
|
+
* Accessible name of the right icon. **When provided, the right icon becomes a
|
|
55
|
+
* clickable action zone** (square, full-height button) that emits `iconRightClick`.
|
|
56
|
+
*/
|
|
57
|
+
this.iconRightAriaLabel = input(/* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [undefined, { debugName: "iconRightAriaLabel" }] : /* istanbul ignore next */ []));
|
|
59
|
+
/** Native autocomplete. */
|
|
60
|
+
this.autocomplete = input(/* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [undefined, { debugName: "autocomplete" }] : /* istanbul ignore next */ []));
|
|
62
|
+
/** Native maxlength. */
|
|
63
|
+
this.maxlength = input(/* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [undefined, { debugName: "maxlength" }] : /* istanbul ignore next */ []));
|
|
65
|
+
/** Emitted on each input with the new value. */
|
|
66
|
+
this.valueChange = output();
|
|
67
|
+
/** Emitted on click of the right action zone (active when `iconRightAriaLabel` is set). */
|
|
68
|
+
this.iconRightClick = output();
|
|
69
|
+
/** Emitted when the input receives focus. */
|
|
70
|
+
this.inputFocus = output();
|
|
71
|
+
/** Emitted when the input loses focus. */
|
|
72
|
+
this.inputBlur = output();
|
|
73
|
+
/** @ignore */
|
|
74
|
+
this.inputEl = viewChild.required('inputEl', /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []));
|
|
76
|
+
/** @ignore Icon size aligned with the field size. */
|
|
77
|
+
this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
79
|
+
/** @ignore The right icon is an action zone (has an accessible name). */
|
|
80
|
+
this.hasRightAction = computed(() => !!this.iconRight() && !!this.iconRightAriaLabel(), /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "hasRightAction" }] : /* istanbul ignore next */ []));
|
|
82
|
+
}
|
|
83
|
+
/** Focuses the input. */
|
|
84
|
+
focus(options) {
|
|
85
|
+
this.inputEl().nativeElement.focus(options);
|
|
86
|
+
}
|
|
87
|
+
/** Native `<input>` element — composite hosts that own `value` (e.g. `ui-datepicker`)
|
|
88
|
+
* need direct DOM access to control the caret while reformatting text as typed. */
|
|
89
|
+
nativeInputElement() {
|
|
90
|
+
return this.inputEl().nativeElement;
|
|
91
|
+
}
|
|
92
|
+
/** @ignore Input: single source of the value (view → form). */
|
|
93
|
+
onInput() {
|
|
94
|
+
const value = this.inputEl().nativeElement.value;
|
|
95
|
+
this.modelValue.set(value);
|
|
96
|
+
this.emitChange(value);
|
|
97
|
+
this.valueChange.emit(value);
|
|
98
|
+
}
|
|
99
|
+
/** @ignore */
|
|
100
|
+
onBlur(event) {
|
|
101
|
+
this.emitTouch();
|
|
102
|
+
this.inputBlur.emit(event);
|
|
103
|
+
}
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiInput, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: UiInput, isStandalone: true, selector: "ui-input", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, ariaHasPopup: { classPropertyName: "ariaHasPopup", publicName: "ariaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, iconRightAriaLabel: { classPropertyName: "iconRightAriaLabel", publicName: "iconRightAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", iconRightClick: "iconRightClick", inputFocus: "inputFocus", inputBlur: "inputBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInput), multi: true }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon uiFieldPrefix class=\"ui-input-icon\" [class._disabled]=\"isDisabled()\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n\n <input\n #inputEl\n class=\"ui-input-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"type()\"\n [id]=\"resolvedId()\"\n [value]=\"value() ?? displayValue()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.autocomplete]=\"autocomplete() || null\"\n [attr.maxlength]=\"maxlength()\"\n [attr.aria-haspopup]=\"ariaHasPopup() || null\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (unit(); as u) {\n <span uiFieldSuffix class=\"ui-input-unit\" [class._small]=\"size() === 'small'\" [class._disabled]=\"isDisabled()\">{{ u }}</span>\n }\n\n @if (iconRight(); as name) {\n @if (hasRightAction()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-input-action\"\n [attr.aria-label]=\"iconRightAriaLabel()\"\n [disabled]=\"isDisabled()\"\n (click)=\"iconRightClick.emit($event)\"\n >\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </button>\n } @else {\n <ui-icon uiFieldSuffix class=\"ui-input-icon\" [class._disabled]=\"isDisabled()\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n }\n</ui-field>\n", styles: [".ui-input-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-native:first-child{padding-inline-start:var(--units-md)}.ui-input-native:last-child{padding-inline-end:var(--units-md)}.ui-input-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-native._small{font-size:var(--size-typography-text-md)}.ui-input-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-icon:first-child{margin-inline-start:var(--units-md)}.ui-input-icon:last-child{margin-inline-end:var(--units-md)}.ui-input-icon._disabled{color:var(--form-high-content-disabled)}.ui-input-unit{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-unit:first-child{margin-inline-start:var(--units-md)}.ui-input-unit:last-child{margin-inline-end:var(--units-md)}.ui-input-unit._disabled{color:var(--form-high-content-disabled)}.ui-input-unit{font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-unit._small{font-size:var(--size-typography-text-md)}.ui-input-action{display:flex;align-items:center;justify-content:center;align-self:stretch;aspect-ratio:1;flex-shrink:0;padding:0;border:none;background:none;border-radius:0 calc(var(--radius-sm) - var(--stroke-default)) calc(var(--radius-sm) - var(--stroke-default)) 0;color:var(--form-low-content-default);cursor:pointer;transition:color var(--transition-default) var(--transition-easeinout),background-color var(--transition-default) var(--transition-easeinout)}.ui-input-action:hover:not(:disabled){color:var(--form-high-content-hover);background-color:var(--form-high-surface-hover)}.ui-input-action:focus-visible{outline:none;color:var(--form-high-content-focused);background-color:var(--form-high-surface-focused)}.ui-input-action:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}\n"], dependencies: [{ kind: "component", type: UiField, selector: "ui-field", inputs: ["label", "for", "required", "size", "level", "disabled", "readonly", "multiline", "autoHeight", "message", "messageId", "hasFooter"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiInput, decorators: [{
|
|
108
|
+
type: Component,
|
|
109
|
+
args: [{ selector: 'ui-input', imports: [UiField, UiIcon], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInput), multi: true }], template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon uiFieldPrefix class=\"ui-input-icon\" [class._disabled]=\"isDisabled()\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n\n <input\n #inputEl\n class=\"ui-input-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"type()\"\n [id]=\"resolvedId()\"\n [value]=\"value() ?? displayValue()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.autocomplete]=\"autocomplete() || null\"\n [attr.maxlength]=\"maxlength()\"\n [attr.aria-haspopup]=\"ariaHasPopup() || null\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (unit(); as u) {\n <span uiFieldSuffix class=\"ui-input-unit\" [class._small]=\"size() === 'small'\" [class._disabled]=\"isDisabled()\">{{ u }}</span>\n }\n\n @if (iconRight(); as name) {\n @if (hasRightAction()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-input-action\"\n [attr.aria-label]=\"iconRightAriaLabel()\"\n [disabled]=\"isDisabled()\"\n (click)=\"iconRightClick.emit($event)\"\n >\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </button>\n } @else {\n <ui-icon uiFieldSuffix class=\"ui-input-icon\" [class._disabled]=\"isDisabled()\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n }\n</ui-field>\n", styles: [".ui-input-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);color:var(--form-high-content-default)}.ui-input-native:first-child{padding-inline-start:var(--units-md)}.ui-input-native:last-child{padding-inline-end:var(--units-md)}.ui-input-native::placeholder{color:var(--form-low-content-default);opacity:1}.ui-input-native:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}.ui-input-native._small{font-size:var(--size-typography-text-md)}.ui-input-icon{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-icon:first-child{margin-inline-start:var(--units-md)}.ui-input-icon:last-child{margin-inline-end:var(--units-md)}.ui-input-icon._disabled{color:var(--form-high-content-disabled)}.ui-input-unit{flex-shrink:0;color:var(--form-low-content-default)}.ui-input-unit:first-child{margin-inline-start:var(--units-md)}.ui-input-unit:last-child{margin-inline-end:var(--units-md)}.ui-input-unit._disabled{color:var(--form-high-content-disabled)}.ui-input-unit{font-family:var(--fontfamily-base);font-size:var(--size-typography-text-default);white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-unit._small{font-size:var(--size-typography-text-md)}.ui-input-action{display:flex;align-items:center;justify-content:center;align-self:stretch;aspect-ratio:1;flex-shrink:0;padding:0;border:none;background:none;border-radius:0 calc(var(--radius-sm) - var(--stroke-default)) calc(var(--radius-sm) - var(--stroke-default)) 0;color:var(--form-low-content-default);cursor:pointer;transition:color var(--transition-default) var(--transition-easeinout),background-color var(--transition-default) var(--transition-easeinout)}.ui-input-action:hover:not(:disabled){color:var(--form-high-content-hover);background-color:var(--form-high-surface-hover)}.ui-input-action:focus-visible{outline:none;color:var(--form-high-content-focused);background-color:var(--form-high-surface-focused)}.ui-input-action:disabled{cursor:not-allowed;color:var(--form-high-content-disabled)}\n"] }]
|
|
110
|
+
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], ariaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHasPopup", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], unit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unit", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], iconRightAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRightAriaLabel", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], maxlength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxlength", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], iconRightClick: [{ type: i0.Output, args: ["iconRightClick"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
|
|
111
|
+
|
|
112
|
+
/*
|
|
113
|
+
* Public API Surface of ui-kit/ui-input
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Generated bundle index. Do not edit.
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
export { UiInput };
|
|
121
|
+
//# sourceMappingURL=4sh-ui-kit-ui-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-ui-input.mjs","sources":["../../../projects/ui-kit/ui-input/src/lib/ui-input.ts","../../../projects/ui-kit/ui-input/src/lib/ui-input.html","../../../projects/ui-kit/ui-input/src/public-api.ts","../../../projects/ui-kit/ui-input/src/4sh-ui-kit-ui-input.ts"],"sourcesContent":["import { Component, computed, ElementRef, forwardRef, input, output, viewChild } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFormField } from '@4sh/ui-kit/forms';\nimport { UiField } from '@4sh/ui-kit/ui-field';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/ui-icon';\n\n/** Supported text types (numeric has its dedicated `ui-input-number` component). */\nexport type InputType = 'text' | 'password' | 'email' | 'tel' | 'url' | 'search';\n\n/**\n * ui-input — headless composed text field, built on the `ui-field` shell\n * (label + box + helper) + a native `<input>`.\n *\n * Covers all text types (text/email/tel/url/search/**password**). Password\n * reveal, search clearing, etc. are handled via the **right action zone**\n * (`iconRightAriaLabel` + `iconRightClick`).\n *\n * Standalone, `[(ngModel)]` or reactive forms (ControlValueAccessor via BaseFormField).\n * For numbers → `ui-input-number`, for masks → `ui-input-mask`.\n */\n@Component({\n selector: 'ui-input',\n imports: [UiField, UiIcon],\n templateUrl: './ui-input.html',\n styleUrl: './ui-input.scss',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiInput), multi: true }],\n})\nexport class UiInput extends BaseFormField<string> {\n /** Native input type. */\n type = input<InputType>('text');\n /**\n * Display-only value (bypasses the CVA model). For composite hosts\n * (e.g. `ui-datepicker`) that own the visible text and read it back via\n * `valueChange` — leave unset when using `[(ngModel)]`/reactive forms.\n */\n value = input<string>();\n /** `aria-haspopup` forwarded to the native input (popup trigger hosts). */\n ariaHasPopup = input<'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'>();\n /** `aria-expanded` forwarded to the native input (popup trigger hosts). */\n ariaExpanded = input<boolean>();\n /** `aria-controls` forwarded to the native input (popup trigger hosts). */\n ariaControls = input<string>();\n /** Native placeholder. */\n placeholder = input<string>();\n /** Suffix unit (e.g. \"%\", \"@domain\"). Shown when provided. */\n unit = input<string>();\n /** Left FontAwesome icon name (decorative). */\n iconLeft = input<string>();\n /** Right FontAwesome icon name. */\n iconRight = input<string>();\n /**\n * Accessible name of the right icon. **When provided, the right icon becomes a\n * clickable action zone** (square, full-height button) that emits `iconRightClick`.\n */\n iconRightAriaLabel = input<string>();\n /** Native autocomplete. */\n autocomplete = input<string>();\n /** Native maxlength. */\n maxlength = input<number>();\n\n /** Emitted on each input with the new value. */\n valueChange = output<string>();\n /** Emitted on click of the right action zone (active when `iconRightAriaLabel` is set). */\n iconRightClick = output<MouseEvent>();\n /** Emitted when the input receives focus. */\n inputFocus = output<FocusEvent>();\n /** Emitted when the input loses focus. */\n inputBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n\n /** @ignore Icon size aligned with the field size. */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n /** @ignore The right icon is an action zone (has an accessible name). */\n protected readonly hasRightAction = computed(() => !!this.iconRight() && !!this.iconRightAriaLabel());\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n /** Native `<input>` element — composite hosts that own `value` (e.g. `ui-datepicker`)\n * need direct DOM access to control the caret while reformatting text as typed. */\n nativeInputElement(): HTMLInputElement {\n return this.inputEl().nativeElement;\n }\n\n /** @ignore Input: single source of the value (view → form). */\n protected onInput(): void {\n const value = this.inputEl().nativeElement.value;\n this.modelValue.set(value);\n this.emitChange(value);\n this.valueChange.emit(value);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.inputBlur.emit(event);\n }\n}\n","<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n>\n @if (iconLeft(); as name) {\n <ui-icon uiFieldPrefix class=\"ui-input-icon\" [class._disabled]=\"isDisabled()\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n\n <input\n #inputEl\n class=\"ui-input-native\"\n [class._small]=\"size() === 'small'\"\n [type]=\"type()\"\n [id]=\"resolvedId()\"\n [value]=\"value() ?? displayValue()\"\n [placeholder]=\"placeholder() ?? ''\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.autocomplete]=\"autocomplete() || null\"\n [attr.maxlength]=\"maxlength()\"\n [attr.aria-haspopup]=\"ariaHasPopup() || null\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n (input)=\"onInput()\"\n (focus)=\"inputFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (unit(); as u) {\n <span uiFieldSuffix class=\"ui-input-unit\" [class._small]=\"size() === 'small'\" [class._disabled]=\"isDisabled()\">{{ u }}</span>\n }\n\n @if (iconRight(); as name) {\n @if (hasRightAction()) {\n <button\n uiFieldSuffix\n type=\"button\"\n class=\"ui-input-action\"\n [attr.aria-label]=\"iconRightAriaLabel()\"\n [disabled]=\"isDisabled()\"\n (click)=\"iconRightClick.emit($event)\"\n >\n <ui-icon [name]=\"name\" [size]=\"iconSize()\" />\n </button>\n } @else {\n <ui-icon uiFieldSuffix class=\"ui-input-icon\" [class._disabled]=\"isDisabled()\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n }\n</ui-field>\n","/*\n * Public API Surface of ui-kit/ui-input\n */\n\nexport * from './lib/ui-input';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AASA;;;;;;;;;;AAUG;AAQG,MAAO,OAAQ,SAAQ,aAAqB,CAAA;AAPlD,IAAA,WAAA,GAAA;;;QASE,IAAA,CAA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,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,OAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,soEAAA,EAAA,MAAA,EAAA,CAAA,wnEAAA,CAAA,EAAA;y9CA6CpB,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtEvF;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, computed, Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ui-label — form field label (mirrors the Figma `ui-label` component).
|
|
6
|
+
*
|
|
7
|
+
* Renders a native <label> with an optional required marker (*). Used standalone
|
|
8
|
+
* or composed inside form components (ui-checkbox, ui-radio, ui-input…).
|
|
9
|
+
*
|
|
10
|
+
* Theming hook: the text color reads `--ui-label-color` first, so a parent form
|
|
11
|
+
* component can drive the label state (hover, disabled…) without piercing this
|
|
12
|
+
* component's style encapsulation:
|
|
13
|
+
*
|
|
14
|
+
* ```scss
|
|
15
|
+
* .ui-checkbox:hover { --ui-label-color: var(--form-high-content-hover); }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
class UiLabel {
|
|
19
|
+
constructor() {
|
|
20
|
+
/** Label text (or project content via <ng-content>). */
|
|
21
|
+
this.label = input(/* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
23
|
+
/** Shows the required marker (*). */
|
|
24
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
25
|
+
/** Text size. */
|
|
26
|
+
this.size = input('default', /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
28
|
+
/** `for` attribute — id of the labelled form element. */
|
|
29
|
+
this.for = input(/* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [undefined, { debugName: "for" }] : /* istanbul ignore next */ []));
|
|
31
|
+
/** Disabled styling (cascades from the parent form component). */
|
|
32
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
33
|
+
/** @ignore */
|
|
34
|
+
this.classes = computed(() => {
|
|
35
|
+
const c = ['ui-label'];
|
|
36
|
+
if (this.size() !== 'default')
|
|
37
|
+
c.push(`_${this.size()}`);
|
|
38
|
+
if (this.disabled())
|
|
39
|
+
c.push('_disabled');
|
|
40
|
+
return c.join(' ');
|
|
41
|
+
}, /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
43
|
+
}
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: UiLabel, isStandalone: true, selector: "ui-label", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<label [class]=\"classes()\" [attr.for]=\"for() || null\">\n <span class=\"ui-label-text\">{{ label() }}<ng-content /></span>\n @if (required()) {\n <span class=\"ui-label-marker\" aria-hidden=\"true\">*</span>\n }\n</label>\n", styles: [".ui-label{display:inline-flex;align-items:center;gap:var(--units-xs);font-family:var(--fontfamily-base);font-weight:var(--weight-regular);font-size:var(--size-typography-text-md);color:var(--ui-label-color, var(--form-high-content-default));cursor:inherit}.ui-label-marker{color:var(--informative-errorlow-content-default)}.ui-label._small{font-size:var(--size-typography-text-sm)}.ui-label._disabled{color:var(--ui-label-color, var(--form-high-content-disabled))}\n"] }); }
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiLabel, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'ui-label', template: "<label [class]=\"classes()\" [attr.for]=\"for() || null\">\n <span class=\"ui-label-text\">{{ label() }}<ng-content /></span>\n @if (required()) {\n <span class=\"ui-label-marker\" aria-hidden=\"true\">*</span>\n }\n</label>\n", styles: [".ui-label{display:inline-flex;align-items:center;gap:var(--units-xs);font-family:var(--fontfamily-base);font-weight:var(--weight-regular);font-size:var(--size-typography-text-md);color:var(--ui-label-color, var(--form-high-content-default));cursor:inherit}.ui-label-marker{color:var(--informative-errorlow-content-default)}.ui-label._small{font-size:var(--size-typography-text-sm)}.ui-label._disabled{color:var(--ui-label-color, var(--form-high-content-disabled))}\n"] }]
|
|
50
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], for: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* Public API Surface of ui-kit/ui-label
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Generated bundle index. Do not edit.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
export { UiLabel };
|
|
61
|
+
//# sourceMappingURL=4sh-ui-kit-ui-label.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-ui-label.mjs","sources":["../../../projects/ui-kit/ui-label/src/lib/ui-label.ts","../../../projects/ui-kit/ui-label/src/lib/ui-label.html","../../../projects/ui-kit/ui-label/src/public-api.ts","../../../projects/ui-kit/ui-label/src/4sh-ui-kit-ui-label.ts"],"sourcesContent":["import { booleanAttribute, Component, computed, input } from '@angular/core';\n\nexport type LabelSize = 'default' | 'small';\n\n/**\n * ui-label — form field label (mirrors the Figma `ui-label` component).\n *\n * Renders a native <label> with an optional required marker (*). Used standalone\n * or composed inside form components (ui-checkbox, ui-radio, ui-input…).\n *\n * Theming hook: the text color reads `--ui-label-color` first, so a parent form\n * component can drive the label state (hover, disabled…) without piercing this\n * component's style encapsulation:\n *\n * ```scss\n * .ui-checkbox:hover { --ui-label-color: var(--form-high-content-hover); }\n * ```\n */\n@Component({\n selector: 'ui-label',\n templateUrl: './ui-label.html',\n styleUrl: './ui-label.scss',\n})\nexport class UiLabel {\n /** Label text (or project content via <ng-content>). */\n label = input<string>();\n /** Shows the required marker (*). */\n required = input(false, { transform: booleanAttribute });\n /** Text size. */\n size = input<LabelSize>('default');\n /** `for` attribute — id of the labelled form element. */\n for = input<string>();\n /** Disabled styling (cascades from the parent form component). */\n disabled = input(false, { transform: booleanAttribute });\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-label'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n}\n","<label [class]=\"classes()\" [attr.for]=\"for() || null\">\n <span class=\"ui-label-text\">{{ label() }}<ng-content /></span>\n @if (required()) {\n <span class=\"ui-label-marker\" aria-hidden=\"true\">*</span>\n }\n</label>\n","/*\n * Public API Surface of ui-kit/ui-label\n */\n\nexport * from './lib/ui-label';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;A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CAAA,odAAA,CAAA,EAAA;;;AEnBtB;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, output, viewChild, computed, isDevMode, effect, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { RouterLink } from '@angular/router';
|
|
5
|
+
import { UiIcon } from '@4sh/ui-kit/ui-icon';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* ui-link — inline textual link (renders a real <a>), for prose / navigation.
|
|
9
|
+
*
|
|
10
|
+
* Choose by semantics, not appearance:
|
|
11
|
+
* • Something that NAVIGATES (URL/route) → this component, or `ui-button`
|
|
12
|
+
* with `href`/`routerLink` when it must look like a button.
|
|
13
|
+
* • Something that triggers an ACTION (submit, open a modal…) → `ui-button`.
|
|
14
|
+
*
|
|
15
|
+
* Accepts a plain `href` (external) or a `routerLink` (internal navigation).
|
|
16
|
+
* Interactive states (hover/focus/pressed) are CSS-driven, never Angular props.
|
|
17
|
+
*/
|
|
18
|
+
class UiLink {
|
|
19
|
+
constructor() {
|
|
20
|
+
/** Visible link text (optional when using projected content or icon-only). */
|
|
21
|
+
this.label = input(/* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.ariaLabel = input(/* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
25
|
+
this.size = input('default', /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
27
|
+
// --- Destination -----------------------------------------------------
|
|
28
|
+
/** External / plain URL. */
|
|
29
|
+
this.href = input(/* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [undefined, { debugName: "href" }] : /* istanbul ignore next */ []));
|
|
31
|
+
/** Angular router target (internal navigation, uses RouterLink). */
|
|
32
|
+
this.routerLink = input(/* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [undefined, { debugName: "routerLink" }] : /* istanbul ignore next */ []));
|
|
34
|
+
/** Anchor target (e.g. "_blank"). */
|
|
35
|
+
this.target = input(/* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [undefined, { debugName: "target" }] : /* istanbul ignore next */ []));
|
|
37
|
+
/** Anchor rel. Defaults to "noopener noreferrer" for external links. */
|
|
38
|
+
this.rel = input(/* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [undefined, { debugName: "rel" }] : /* istanbul ignore next */ []));
|
|
40
|
+
/** Convenience for external links: sets target="_blank" + a safe rel. */
|
|
41
|
+
this.external = input(false, { ...(ngDevMode ? { debugName: "external" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
42
|
+
// --- Icons (presence-based, same as ui-button) -----------------------
|
|
43
|
+
/** FontAwesome icon name shown before the text. */
|
|
44
|
+
this.iconLeft = input(/* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [undefined, { debugName: "iconLeft" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/** FontAwesome icon name shown after the text. */
|
|
47
|
+
this.iconRight = input(/* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [undefined, { debugName: "iconRight" }] : /* istanbul ignore next */ []));
|
|
49
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
50
|
+
this.tabindex = input(/* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [undefined, { debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
52
|
+
/** aria-current exposed on the anchor (e.g. "page" for the current breadcrumb item). */
|
|
53
|
+
this.ariaCurrent = input(/* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [undefined, { debugName: "ariaCurrent" }] : /* istanbul ignore next */ []));
|
|
55
|
+
/** Emitted on click (never when disabled). Navigation stays native. */
|
|
56
|
+
this.linkClick = output();
|
|
57
|
+
/** Fired when the link receives focus. */
|
|
58
|
+
this.linkFocus = output();
|
|
59
|
+
/** Fired when the link loses focus. */
|
|
60
|
+
this.linkBlur = output();
|
|
61
|
+
/** @ignore */
|
|
62
|
+
this.hostEl = viewChild.required('host', /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "hostEl" }] : /* istanbul ignore next */ []));
|
|
64
|
+
/** @ignore Icon size follows the text size. */
|
|
65
|
+
this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'), /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
67
|
+
/** @ignore No visible text but at least one icon → icon-only. */
|
|
68
|
+
this.isIconOnly = computed(() => !this.label() && (!!this.iconLeft() || !!this.iconRight()), /* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []));
|
|
70
|
+
/** @ignore Link mode uses the Angular RouterLink directive. */
|
|
71
|
+
this.useRouterLink = computed(() => this.routerLink() != null, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "useRouterLink" }] : /* istanbul ignore next */ []));
|
|
73
|
+
/** @ignore Effective anchor target (external forces _blank). */
|
|
74
|
+
this.computedTarget = computed(() => this.target() ?? (this.external() ? '_blank' : null), /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "computedTarget" }] : /* istanbul ignore next */ []));
|
|
76
|
+
/** @ignore Anchor rel: explicit, or a safe default for _blank / external. */
|
|
77
|
+
this.computedRel = computed(() => {
|
|
78
|
+
if (this.rel())
|
|
79
|
+
return this.rel();
|
|
80
|
+
if (this.computedTarget() === '_blank')
|
|
81
|
+
return 'noopener noreferrer';
|
|
82
|
+
return null;
|
|
83
|
+
}, /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "computedRel" }] : /* istanbul ignore next */ []));
|
|
85
|
+
/** @ignore Tabindex: -1 when disabled (an <a> has no native disabled). */
|
|
86
|
+
this.linkTabindex = computed(() => (this.disabled() ? -1 : (this.tabindex() ?? null)), /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "linkTabindex" }] : /* istanbul ignore next */ []));
|
|
88
|
+
/** @ignore Accessible name: explicit, or the label when icon-only. */
|
|
89
|
+
this.accessibleLabel = computed(() => {
|
|
90
|
+
if (this.ariaLabel())
|
|
91
|
+
return this.ariaLabel();
|
|
92
|
+
if (this.isIconOnly())
|
|
93
|
+
return this.label() ?? null;
|
|
94
|
+
return null;
|
|
95
|
+
}, /* @ts-ignore */
|
|
96
|
+
...(ngDevMode ? [{ debugName: "accessibleLabel" }] : /* istanbul ignore next */ []));
|
|
97
|
+
/** @ignore */
|
|
98
|
+
this.classes = computed(() => {
|
|
99
|
+
const c = ['ui-link'];
|
|
100
|
+
if (this.size() !== 'default')
|
|
101
|
+
c.push(`_${this.size()}`);
|
|
102
|
+
if (this.isIconOnly())
|
|
103
|
+
c.push('_icon-only');
|
|
104
|
+
if (this.disabled())
|
|
105
|
+
c.push('_disabled');
|
|
106
|
+
return c.join(' ');
|
|
107
|
+
}, /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
109
|
+
// A11y safeguard: an icon-only link must have an accessible name.
|
|
110
|
+
if (isDevMode()) {
|
|
111
|
+
effect(() => {
|
|
112
|
+
if (this.isIconOnly() && !this.accessibleLabel()) {
|
|
113
|
+
console.warn('[ui-link] Icon-only link has no accessible name: provide `ariaLabel` (or `label`).');
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/** Sets the focus on the link (useful for controlling focus programmatically). */
|
|
119
|
+
focus(options) {
|
|
120
|
+
this.hostEl().nativeElement.focus(options);
|
|
121
|
+
}
|
|
122
|
+
/** @ignore */
|
|
123
|
+
onClick(event) {
|
|
124
|
+
if (this.disabled()) {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.linkClick.emit(event);
|
|
129
|
+
}
|
|
130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
131
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: UiLink, isStandalone: true, selector: "ui-link", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null }, external: { classPropertyName: "external", publicName: "external", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { linkClick: "linkClick", linkFocus: "linkFocus", linkBlur: "linkBlur" }, host: { properties: { "style.display": "'inline-flex'" } }, viewQueries: [{ propertyName: "hostEl", first: true, predicate: ["host"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (useRouterLink()) {\n <a\n #host\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n} @else {\n <a\n #host\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n}\n\n<ng-template #inner>\n @if (iconLeft()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconLeft()!\" [size]=\"iconSize()\" />\n }\n\n <span class=\"ui-link-content\">\n @if (label() && !isIconOnly()) {\n <span class=\"ui-link-label\">{{ label() }}</span>\n }\n <ng-content />\n </span>\n\n @if (iconRight()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconRight()!\" [size]=\"iconSize()\" />\n }\n</ng-template>\n", styles: [".ui-link{display:inline-flex;align-items:center;gap:var(--units-sm);font-family:var(--fontfamily-base);font-weight:var(--weight-bold);font-size:var(--size-typography-text-default);line-height:1.4;color:var(--actions-low-content-default);text-decoration:none;text-decoration-thickness:from-font;text-underline-offset:.15em;border-radius:var(--radius-2xs);cursor:pointer;transition:color var(--transition-default) var(--transition-easeinout),text-decoration-color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-link-icon{line-height:0}.ui-link-content{display:inline}.ui-link-content:empty{display:none}.ui-link._small{font-size:var(--size-typography-text-md)}.ui-link._icon-only{gap:0;text-decoration:none}.ui-link:hover:not(._disabled){color:var(--actions-low-content-hover);text-decoration:underline}.ui-link:focus-visible{outline:none;color:var(--actions-low-content-focused);text-decoration:underline;box-shadow:0 0 0 var(--units-2xs) var(--actions-low-content-focused)}.ui-link:active:not(._disabled){color:var(--actions-low-content-pressed)}.ui-link._disabled{color:var(--actions-low-content-disabled);text-decoration-color:var(--actions-low-content-disabled);cursor:not-allowed;pointer-events:none}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
132
|
+
}
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: UiLink, decorators: [{
|
|
134
|
+
type: Component,
|
|
135
|
+
args: [{ selector: 'ui-link', imports: [UiIcon, RouterLink, NgTemplateOutlet], host: { '[style.display]': "'inline-flex'" }, template: "@if (useRouterLink()) {\n <a\n #host\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n} @else {\n <a\n #host\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n}\n\n<ng-template #inner>\n @if (iconLeft()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconLeft()!\" [size]=\"iconSize()\" />\n }\n\n <span class=\"ui-link-content\">\n @if (label() && !isIconOnly()) {\n <span class=\"ui-link-label\">{{ label() }}</span>\n }\n <ng-content />\n </span>\n\n @if (iconRight()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconRight()!\" [size]=\"iconSize()\" />\n }\n</ng-template>\n", styles: [".ui-link{display:inline-flex;align-items:center;gap:var(--units-sm);font-family:var(--fontfamily-base);font-weight:var(--weight-bold);font-size:var(--size-typography-text-default);line-height:1.4;color:var(--actions-low-content-default);text-decoration:none;text-decoration-thickness:from-font;text-underline-offset:.15em;border-radius:var(--radius-2xs);cursor:pointer;transition:color var(--transition-default) var(--transition-easeinout),text-decoration-color var(--transition-default) var(--transition-easeinout),box-shadow var(--transition-default) var(--transition-easeinout)}.ui-link-icon{line-height:0}.ui-link-content{display:inline}.ui-link-content:empty{display:none}.ui-link._small{font-size:var(--size-typography-text-md)}.ui-link._icon-only{gap:0;text-decoration:none}.ui-link:hover:not(._disabled){color:var(--actions-low-content-hover);text-decoration:underline}.ui-link:focus-visible{outline:none;color:var(--actions-low-content-focused);text-decoration:underline;box-shadow:0 0 0 var(--units-2xs) var(--actions-low-content-focused)}.ui-link:active:not(._disabled){color:var(--actions-low-content-pressed)}.ui-link._disabled{color:var(--actions-low-content-disabled);text-decoration-color:var(--actions-low-content-disabled);cursor:not-allowed;pointer-events:none}\n"] }]
|
|
136
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], external: [{ type: i0.Input, args: [{ isSignal: true, alias: "external", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], ariaCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaCurrent", required: false }] }], linkClick: [{ type: i0.Output, args: ["linkClick"] }], linkFocus: [{ type: i0.Output, args: ["linkFocus"] }], linkBlur: [{ type: i0.Output, args: ["linkBlur"] }], hostEl: [{ type: i0.ViewChild, args: ['host', { isSignal: true }] }] } });
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
* Public API Surface of ui-kit/ui-link
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Generated bundle index. Do not edit.
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
export { UiLink };
|
|
147
|
+
//# sourceMappingURL=4sh-ui-kit-ui-link.mjs.map
|