@4sh/ui-kit 0.7.0 → 0.9.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/README.fr.md +12 -11
- package/README.md +12 -11
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +3 -3
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +7 -5
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +4 -4
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +3 -3
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +6 -6
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +4 -4
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +8 -6
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +5 -5
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +211 -27
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +18 -5
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +11 -9
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +7 -7
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +5 -5
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +5 -5
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +5 -5
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +5 -5
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +282 -0
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +8 -6
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +7 -5
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +5 -5
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +215 -0
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +8 -6
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +4 -4
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +12 -7
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +13 -13
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +3 -3
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +10 -10
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +3 -3
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +4 -4
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +10 -10
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +45 -26
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +629 -0
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +16 -16
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +4 -4
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +4 -4
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +4 -4
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +3 -3
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +370 -0
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +4 -4
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +7 -5
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +7 -5
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +14 -12
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -22
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +25 -21
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +298 -0
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +7 -5
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +34 -34
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +6 -6
- package/mcp/data/text-search-docs.json +741 -71
- package/mcp/data/ui-config.json +25927 -11496
- package/mcp/package.json +1 -1
- package/package.json +21 -1
- package/styles/base/_ripple.scss +53 -0
- package/styles/component-vars.scss +1426 -687
- package/styles/index.scss +1 -0
- package/styles/settings/_ui-config.scss +54 -2
- package/styles/utils/_mixins.scss +32 -30
- package/styles/utils/_overlay.scss +1 -1
- package/styles.css +1 -1
- package/types/4sh-ui-kit-actions-ui-button.d.ts +3 -1
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +3 -1
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +59 -2
- package/types/4sh-ui-kit-forms-ui-field.d.ts +13 -1
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +3 -1
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +93 -0
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +3 -1
- package/types/4sh-ui-kit-forms-ui-select.d.ts +3 -1
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +114 -0
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +3 -1
- package/types/4sh-ui-kit-forms.d.ts +5 -1
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +4 -4
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +256 -0
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +201 -0
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +3 -1
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +3 -1
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +3 -1
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +3 -1
- package/types/4sh-ui-kit-ripple.d.ts +156 -0
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms-ui-toggle-button.mjs","sources":["../../../projects/ui-kit/forms/ui-toggle-button/src/lib/ui-toggle-button.ts","../../../projects/ui-kit/forms/ui-toggle-button/src/lib/ui-toggle-button.html","../../../projects/ui-kit/forms/ui-toggle-button/src/public-api.ts","../../../projects/ui-kit/forms/ui-toggle-button/src/4sh-ui-kit-forms-ui-toggle-button.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n input,\n isDevMode,\n output,\n TemplateRef,\n viewChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n BaseFieldControl,\n createOptionResolver,\n warnMissingAccessibleName,\n} from '@4sh/ui-kit/forms';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiLevel } from '@4sh/ui-kit/types';\n\nexport type ToggleButtonSize = 'default' | 'small' | 'large';\n/** Habillage de l'état **non** sélectionné (l'état sélectionné est toujours plein). */\nexport type ToggleButtonVariant = 'outlined' | 'filled' | 'ghost';\nexport type ToggleButtonIconPos = 'left' | 'right';\nexport type ToggleButtonOrientation = 'horizontal' | 'vertical';\n\n/** Model value: one of the `trueValue`/`falseValue` pair (single), or the array of pressed option values (group). */\nexport type ToggleButtonValue<T> = T | T[] | null;\n\n/**\n * Rich option shape for the group mode. Options may also be primitives\n * (`string`/`number`) or any object, in which case `optionLabel` /\n * `optionValue` / `optionDisabled` / `optionIcon` tell the control how to read\n * them.\n */\nexport interface ToggleButtonOption<T = unknown> {\n /** Text shown inside the button. */\n label?: string;\n /** Value carried into the model when the button is pressed. */\n value: T;\n /** Icon name (design-system icon). */\n icon?: string;\n /** Icon substituted while the button is pressed. */\n selectedIcon?: string;\n /** Disables just this button. */\n disabled?: boolean;\n /** Accessible name (required for an icon-only button). */\n ariaLabel?: string;\n}\n\n/** Context handed to the `icon` / `content` templates (single mode). */\nexport interface ToggleButtonStateContext {\n /** Whether the button is currently pressed (default `$implicit`). */\n $implicit: boolean;\n /** Same as `$implicit`, named for readability. */\n checked: boolean;\n}\n\n/** Context handed to the `item` template (group mode). */\nexport interface ToggleButtonItemContext<T = unknown> {\n /** The original option (default `$implicit`). */\n $implicit: T;\n /** Same as `$implicit`, named for readability. */\n option: T;\n /** Whether this button is currently pressed. */\n selected: boolean;\n /** Index of the option in the list. */\n index: number;\n}\n\n/** Payload emitted when a group button is clicked. */\nexport interface ToggleButtonOptionClickEvent<T = unknown> {\n /** The original option (as passed in `options`). */\n option: T;\n /** The resolved value of that option. */\n value: T;\n /** Index of the option in the list. */\n index: number;\n /** Pressed state after the click. */\n selected: boolean;\n /** Originating DOM event. */\n originalEvent: Event;\n}\n\n/** @ignore Internal, normalized view of a group option. */\ninterface NormalizedToggle {\n key: string;\n index: number;\n value: unknown;\n label: string | null;\n icon: string | null;\n ariaLabel: string | null;\n disabled: boolean;\n selected: boolean;\n iconOnly: boolean;\n original: unknown;\n}\n\n/** @ignore */\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * ui-toggle-button — a button that holds a pressed state.\n *\n * Two modes, one component:\n * - **single** (default): one native `<button aria-pressed>` backing a boolean\n * (or the `trueValue`/`falseValue` pair). Labels and icons may differ per\n * state (`onLabel`/`offLabel`, `onIcon`/`offIcon`).\n * - **group** (`options` set): one button per option, `role=\"group\"` on the\n * host, model = the array of pressed values. Deliberately always\n * multi-select: an exclusive choice is `ui-segment-control`'s job, which says\n * it with `radiogroup` semantics instead of `aria-pressed`.\n *\n * `level` colours the pressed state, `variant` draws the released one, both\n * from the `actions.*` token sets. Interactive states (hover/focus/pressed/\n * disabled) are pure CSS.\n *\n * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms\n * (`[formField]`) — it is a `ControlValueAccessor`.\n *\n * @example\n * ```html\n * <ui-toggle-button [(ngModel)]=\"bold\" label=\"Gras\" icon=\"bold\" />\n * <ui-toggle-button [(ngModel)]=\"days\" [options]=\"dayOptions\" ariaLabel=\"Jours ouvrés\" />\n * ```\n */\n@Component({\n selector: 'ui-toggle-button',\n imports: [UiIcon, NgTemplateOutlet],\n templateUrl: './ui-toggle-button.html',\n styleUrl: './ui-toggle-button.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleButton), multi: true },\n ],\n host: {\n '[class]': 'hostClasses()',\n '[attr.role]': \"isGroup() ? 'group' : null\",\n '[attr.aria-label]': 'groupAriaLabel()',\n '[attr.aria-labelledby]': 'groupAriaLabelledBy()',\n },\n})\nexport class UiToggleButton<T = boolean> extends BaseFieldControl<ToggleButtonValue<T>> {\n // --- Single mode ------------------------------------------------------\n /** Label shown in both states (fallback of `onLabel` / `offLabel`). */\n label = input<string>();\n /** Label shown while pressed. */\n onLabel = input<string>();\n /** Label shown while released. */\n offLabel = input<string>();\n /** Icon shown in both states (fallback of `onIcon` / `offIcon`). */\n icon = input<string>();\n /** Icon shown while pressed. */\n onIcon = input<string>();\n /** Icon shown while released. */\n offIcon = input<string>();\n /** Side of the label the icon sits on. */\n iconPos = input<ToggleButtonIconPos>('left');\n /** Model value emitted when pressed. */\n trueValue = input<T>(true as T);\n /** Model value emitted when released. */\n falseValue = input<T>(false as T);\n\n // --- Group mode -------------------------------------------------------\n /** Options to display, one button each. Presence switches the host to group mode. */\n options = input<readonly (T | ToggleButtonOption<T>)[]>();\n /** Field name to read a label from, when options are objects. */\n optionLabel = input<string>();\n /** Field name to read the value from, when options are objects. */\n optionValue = input<string>();\n /** Field name to read the disabled flag from, when options are objects. */\n optionDisabled = input<string>();\n /** Field name to read an icon name from, when options are objects. */\n optionIcon = input<string>();\n /** Property used to compare object values for equality (selection matching). */\n dataKey = input<string>();\n /** Layout axis of the group. */\n orientation = input<ToggleButtonOrientation>('horizontal');\n\n // --- Shared -----------------------------------------------------------\n /** Colour family of the pressed state. */\n level = input<UiLevel>('high');\n /** How the released state is drawn. */\n variant = input<ToggleButtonVariant>('outlined');\n /** Size. */\n size = input<ToggleButtonSize>('default');\n /** Span the full width of the parent (group buttons share the width evenly). */\n fluid = input(false, { transform: booleanAttribute });\n /** Pill shape. */\n rounded = input(false, { transform: booleanAttribute });\n /** Whether the last pressed button can be released (single), or the group emptied. */\n allowEmpty = input(true, { transform: booleanAttribute });\n\n // --- Templates --------------------------------------------------------\n /** Replaces the icon, single mode (receives `{ $implicit, checked }`). */\n iconTemplate = input<TemplateRef<ToggleButtonStateContext>>();\n /** Replaces the whole button content, single mode (receives `{ $implicit, checked }`). */\n contentTemplate = input<TemplateRef<ToggleButtonStateContext>>();\n /** Replaces a group button's content (receives `{ $implicit, option, selected, index }`). */\n itemTemplate = input<TemplateRef<ToggleButtonItemContext<T>>>();\n\n /** Emitted on user interaction with the new model value. */\n toggleChange = output<ToggleButtonValue<T>>();\n /** Emitted when a group button is clicked (even if it does not change the value). */\n optionClick = output<ToggleButtonOptionClickEvent<T>>();\n /** Emitted when a button receives focus. */\n toggleFocus = output<FocusEvent>();\n /** Emitted when a button loses focus. */\n toggleBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly buttons = viewChildren<ElementRef<HTMLButtonElement>>('itemEl');\n\n /** @ignore */\n private readonly resolver = createOptionResolver({\n optionValue: this.optionValue,\n optionLabel: this.optionLabel,\n optionDisabled: this.optionDisabled,\n dataKey: this.dataKey,\n });\n\n constructor() {\n super();\n\n if (isDevMode()) {\n effect(() => {\n if (this.isGroup()) {\n if (!this.ariaLabel() && !this.ariaLabelledBy()) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n 'Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n if (this.normalizedOptions().some((o) => o.iconOnly && !o.ariaLabel)) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n 'Icon-only option has no accessible name: add `ariaLabel` on the option.',\n );\n }\n return;\n }\n if (this.isIconOnly() && !this.ariaLabel()) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n 'Icon-only button has no accessible name: provide `ariaLabel`.',\n );\n }\n // A name that changes with the state is re-announced on focus, so the\n // control sounds like a different button depending on its value.\n if (this.hasStateLabels() && !this.ariaLabel() && !this.ariaLabelledBy()) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n '`onLabel`/`offLabel` differ: provide a state-independent `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n });\n }\n }\n\n /** @ignore Group mode: an `options` list was provided. */\n protected readonly isGroup = computed(() => !!this.options());\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => {\n const size = this.size();\n if (size === 'small') return 'sm';\n return size === 'large' ? 'lg' : 'default';\n });\n\n /** @ignore */\n protected readonly hostClasses = computed(() => {\n const c = ['ui-toggle-button', `_${this.level()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.variant() !== 'outlined') c.push(`_${this.variant()}`);\n if (this.rounded()) c.push('_rounded');\n if (this.fluid()) c.push('_fluid');\n if (this.isGroup()) {\n c.push('_group');\n if (this.orientation() === 'vertical') c.push('_vertical');\n }\n if (this.readonly()) c.push('_readonly');\n if (this.isDisabled()) c.push('_disabled');\n if (this.isInvalid()) c.push('_invalid');\n return c.join(' ');\n });\n\n /** @ignore Only the group carries the group-level ARIA naming. */\n protected readonly groupAriaLabel = computed(() =>\n this.isGroup() ? this.ariaLabel() || null : null,\n );\n /** @ignore */\n protected readonly groupAriaLabelledBy = computed(() =>\n this.isGroup() ? this.ariaLabelledBy() || null : null,\n );\n\n // --- Single mode ------------------------------------------------------\n\n /** @ignore */\n protected readonly checked = computed(() => this.modelValue() === this.trueValue());\n /** @ignore */\n protected readonly hasStateLabels = computed(\n () => !!this.onLabel() && !!this.offLabel() && this.onLabel() !== this.offLabel(),\n );\n /** @ignore Label of the current state, falling back to the shared one. */\n protected readonly currentLabel = computed(\n () => (this.checked() ? this.onLabel() : this.offLabel()) ?? this.label() ?? null,\n );\n /** @ignore Icon of the current state, falling back to the shared one. */\n protected readonly currentIcon = computed(\n () => (this.checked() ? this.onIcon() : this.offIcon()) ?? this.icon() ?? null,\n );\n /** @ignore Square button: an icon, no text. */\n protected readonly isIconOnly = computed(\n () => !this.contentTemplate() && !this.currentLabel() && !!this.currentIcon(),\n );\n /** @ignore */\n protected readonly iconBefore = computed(() => this.iconPos() === 'left');\n /** @ignore */\n protected readonly stateContext = computed<ToggleButtonStateContext>(() => ({\n $implicit: this.checked(),\n checked: this.checked(),\n }));\n /** @ignore Accessible name of the single button (never empty-stringed). */\n protected readonly buttonAriaLabel = computed(\n () => this.ariaLabel() || (this.isIconOnly() ? this.currentLabel() : null),\n );\n\n // --- Group mode -------------------------------------------------------\n\n /** @ignore Options resolved to a flat, render-ready shape. */\n protected readonly normalizedOptions = computed<NormalizedToggle[]>(() => {\n const raw = this.options() ?? [];\n const model = this.modelValue();\n const groupDisabled = this.isDisabled();\n return raw.map((option, index) => {\n const value = this.resolveValue(option);\n const selected = this.isPressed(value, model);\n const label = this.resolveLabel(option);\n const icon = this.resolveIcon(option, selected);\n return {\n key: `${this.uid}-${index}`,\n index,\n value,\n label,\n icon,\n ariaLabel: isRecord(option) ? this.resolver.asText(option['ariaLabel']) : null,\n disabled: groupDisabled || this.resolver.resolveDisabled(option),\n selected,\n iconOnly: !label && !!icon,\n original: option,\n };\n });\n });\n\n /** @ignore */\n protected itemContext(item: NormalizedToggle): ToggleButtonItemContext<T> {\n return {\n $implicit: item.original as T,\n option: item.original as T,\n selected: item.selected,\n index: item.index,\n };\n }\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-toggle-button';\n }\n\n /** Focus the button (the first enabled one in group mode). */\n focus(options?: FocusOptions): void {\n const target = this.buttons().find((ref) => !ref.nativeElement.disabled);\n target?.nativeElement.focus(options);\n }\n\n /** @ignore Single mode: flip the boolean pair. */\n protected toggle(): void {\n if (this.isDisabled() || this.readonly()) return;\n if (this.checked() && !this.allowEmpty()) return;\n\n const next = this.checked() ? this.falseValue() : this.trueValue();\n this.modelValue.set(next);\n this.emitChange(next);\n this.toggleChange.emit(next);\n }\n\n /** @ignore Group mode: press / release one option. */\n protected toggleOption(item: NormalizedToggle, event: Event): void {\n if (item.disabled || this.readonly()) return;\n const value = item.value as T;\n const model = this.modelValue();\n const next = Array.isArray(model) ? [...(model as T[])] : [];\n const at = next.findIndex((v) => this.resolver.equals(v, value));\n let selected: boolean;\n\n if (at !== -1) {\n if (!this.allowEmpty() && next.length === 1) return;\n next.splice(at, 1);\n selected = false;\n } else {\n next.push(value);\n selected = true;\n }\n\n this.modelValue.set(next);\n this.emitChange(next);\n this.toggleChange.emit(next);\n this.optionClick.emit({\n option: item.original as T,\n value,\n index: item.index,\n selected,\n originalEvent: event,\n });\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.toggleBlur.emit(event);\n }\n\n /** @ignore Rich option shape (`{ value }`) resolves without a field mapping. */\n private resolveValue(option: unknown): unknown {\n if (!this.optionValue() && isRecord(option) && 'value' in option) return option['value'];\n return this.resolver.resolveValue(option);\n }\n\n /** @ignore An option object with no label key stays label-less (icon-only button). */\n private resolveLabel(option: unknown): string | null {\n if (!this.optionLabel() && isRecord(option) && !('label' in option)) return null;\n return this.resolver.resolveLabel(option);\n }\n\n /** @ignore */\n private resolveIcon(option: unknown, selected: boolean): string | null {\n if (selected && isRecord(option)) {\n const swapped = this.resolver.asText(option['selectedIcon']);\n if (swapped) return swapped;\n }\n const field = this.optionIcon();\n if (field) return this.resolver.asText(this.resolver.getField(option, field));\n if (isRecord(option)) return this.resolver.asText(option['icon']);\n return null;\n }\n\n /** @ignore A group's model is the array of pressed values. */\n private isPressed(value: unknown, model: ToggleButtonValue<T> | undefined): boolean {\n return Array.isArray(model) && model.some((v) => this.resolver.equals(v, value));\n }\n}\n","@if (isGroup()) {\n @for (item of normalizedOptions(); track item.key) {\n <button\n #itemEl\n type=\"button\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"item.selected\"\n [class._icon-only]=\"item.iconOnly\"\n [disabled]=\"item.disabled\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"item.selected\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggleOption(item, $event)\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"itemContext(item)\" />\n } @else {\n @if (iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n @if (item.label) {\n <span class=\"ui-toggle-button-label\">{{ item.label }}</span>\n }\n @if (!iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n }\n </button>\n }\n} @else {\n <button\n #itemEl\n type=\"button\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"checked()\"\n [class._icon-only]=\"isIconOnly()\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"checked()\"\n [attr.aria-label]=\"buttonAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggle()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (contentTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n @if (currentLabel()) {\n <span class=\"ui-toggle-button-label\">{{ currentLabel() }}</span>\n }\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n }\n </button>\n}\n\n<ng-template #singleIcon>\n @if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else if (currentIcon(); as iconName) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"iconName\" [size]=\"iconSize()\" />\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-toggle-button\n */\n\nexport * from './lib/ui-toggle-button';\n","/**\n * Generated bundle index. Do not edit.\n */\n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AE,gBAAgB,CAAC,EAAA,SAAA,EAGxB;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,oBAAoB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;qBAC3F,EAAA,IAAA,EACK;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,aAAa,EAAE,4BAA4B;AAC3C,wBAAA,mBAAmB,EAAE,kBAAkB;AACvC,wBAAA,wBAAwB,EAAE,uBAAuB;AAClD,qBAAA,EAAA,QAAA,EAAA,2iFAAA,EAAA,MAAA,EAAA,CAAA,s4TAAA,CAAA,EAAA;osFAuEsE,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvNjF;;AAEG;;ACFH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms-ui-toggle-button.mjs","sources":["../../../projects/ui-kit/forms/ui-toggle-button/src/lib/ui-toggle-button.ts","../../../projects/ui-kit/forms/ui-toggle-button/src/lib/ui-toggle-button.html","../../../projects/ui-kit/forms/ui-toggle-button/src/public-api.ts","../../../projects/ui-kit/forms/ui-toggle-button/src/4sh-ui-kit-forms-ui-toggle-button.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n input,\n isDevMode,\n output,\n TemplateRef,\n viewChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n BaseFieldControl,\n createOptionResolver,\n warnMissingAccessibleName,\n} from '@4sh/ui-kit/forms';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiLevel } from '@4sh/ui-kit/types';\n\nexport type ToggleButtonSize = 'default' | 'small' | 'large';\n/** Habillage de l'état **non** sélectionné (l'état sélectionné est toujours plein). */\nexport type ToggleButtonVariant = 'outlined' | 'filled' | 'ghost';\nexport type ToggleButtonIconPos = 'left' | 'right';\nexport type ToggleButtonOrientation = 'horizontal' | 'vertical';\n\n/** Model value: one of the `trueValue`/`falseValue` pair (single), or the array of pressed option values (group). */\nexport type ToggleButtonValue<T> = T | T[] | null;\n\n/**\n * Rich option shape for the group mode. Options may also be primitives\n * (`string`/`number`) or any object, in which case `optionLabel` /\n * `optionValue` / `optionDisabled` / `optionIcon` tell the control how to read\n * them.\n */\nexport interface ToggleButtonOption<T = unknown> {\n /** Text shown inside the button. */\n label?: string;\n /** Value carried into the model when the button is pressed. */\n value: T;\n /** Icon name (design-system icon). */\n icon?: string;\n /** Icon substituted while the button is pressed. */\n selectedIcon?: string;\n /** Disables just this button. */\n disabled?: boolean;\n /** Accessible name (required for an icon-only button). */\n ariaLabel?: string;\n}\n\n/** Context handed to the `icon` / `content` templates (single mode). */\nexport interface ToggleButtonStateContext {\n /** Whether the button is currently pressed (default `$implicit`). */\n $implicit: boolean;\n /** Same as `$implicit`, named for readability. */\n checked: boolean;\n}\n\n/** Context handed to the `item` template (group mode). */\nexport interface ToggleButtonItemContext<T = unknown> {\n /** The original option (default `$implicit`). */\n $implicit: T;\n /** Same as `$implicit`, named for readability. */\n option: T;\n /** Whether this button is currently pressed. */\n selected: boolean;\n /** Index of the option in the list. */\n index: number;\n}\n\n/** Payload emitted when a group button is clicked. */\nexport interface ToggleButtonOptionClickEvent<T = unknown> {\n /** The original option (as passed in `options`). */\n option: T;\n /** The resolved value of that option. */\n value: T;\n /** Index of the option in the list. */\n index: number;\n /** Pressed state after the click. */\n selected: boolean;\n /** Originating DOM event. */\n originalEvent: Event;\n}\n\n/** @ignore Internal, normalized view of a group option. */\ninterface NormalizedToggle {\n key: string;\n index: number;\n value: unknown;\n label: string | null;\n icon: string | null;\n ariaLabel: string | null;\n disabled: boolean;\n selected: boolean;\n iconOnly: boolean;\n original: unknown;\n}\n\n/** @ignore */\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * ui-toggle-button — a button that holds a pressed state.\n *\n * Two modes, one component:\n * - **single** (default): one native `<button aria-pressed>` backing a boolean\n * (or the `trueValue`/`falseValue` pair). Labels and icons may differ per\n * state (`onLabel`/`offLabel`, `onIcon`/`offIcon`).\n * - **group** (`options` set): one button per option, `role=\"group\"` on the\n * host, model = the array of pressed values. Deliberately always\n * multi-select: an exclusive choice is `ui-segment-control`'s job, which says\n * it with `radiogroup` semantics instead of `aria-pressed`.\n *\n * `level` colours the pressed state, `variant` draws the released one, both\n * from the `actions.*` token sets. Interactive states (hover/focus/pressed/\n * disabled) are pure CSS.\n *\n * Works standalone, with `[(ngModel)]`, reactive forms, or signal forms\n * (`[formField]`) — it is a `ControlValueAccessor`.\n *\n * @example\n * ```html\n * <ui-toggle-button [(ngModel)]=\"bold\" label=\"Gras\" icon=\"bold\" />\n * <ui-toggle-button [(ngModel)]=\"days\" [options]=\"dayOptions\" ariaLabel=\"Jours ouvrés\" />\n * ```\n */\n@Component({\n selector: 'ui-toggle-button',\n imports: [UiIcon, NgTemplateOutlet],\n templateUrl: './ui-toggle-button.html',\n styleUrl: './ui-toggle-button.scss',\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggleButton), multi: true },\n ],\n host: {\n '[class]': 'hostClasses()',\n '[attr.role]': \"isGroup() ? 'group' : null\",\n '[attr.aria-label]': 'groupAriaLabel()',\n '[attr.aria-labelledby]': 'groupAriaLabelledBy()',\n },\n})\nexport class UiToggleButton<T = boolean> extends BaseFieldControl<ToggleButtonValue<T>> {\n // --- Single mode ------------------------------------------------------\n /** Label shown in both states (fallback of `onLabel` / `offLabel`). */\n label = input<string>();\n /** Label shown while pressed. */\n onLabel = input<string>();\n /** Label shown while released. */\n offLabel = input<string>();\n /** Icon shown in both states (fallback of `onIcon` / `offIcon`). */\n icon = input<string>();\n /** Icon shown while pressed. */\n onIcon = input<string>();\n /** Icon shown while released. */\n offIcon = input<string>();\n /** Side of the label the icon sits on. */\n iconPos = input<ToggleButtonIconPos>('left');\n /** Model value emitted when pressed. */\n trueValue = input<T>(true as T);\n /** Model value emitted when released. */\n falseValue = input<T>(false as T);\n\n // --- Group mode -------------------------------------------------------\n /** Options to display, one button each. Presence switches the host to group mode. */\n options = input<readonly (T | ToggleButtonOption<T>)[]>();\n /** Field name to read a label from, when options are objects. */\n optionLabel = input<string>();\n /** Field name to read the value from, when options are objects. */\n optionValue = input<string>();\n /** Field name to read the disabled flag from, when options are objects. */\n optionDisabled = input<string>();\n /** Field name to read an icon name from, when options are objects. */\n optionIcon = input<string>();\n /** Property used to compare object values for equality (selection matching). */\n dataKey = input<string>();\n /** Layout axis of the group. */\n orientation = input<ToggleButtonOrientation>('horizontal');\n\n // --- Shared -----------------------------------------------------------\n /** Colour family of the pressed state. */\n level = input<UiLevel>('high');\n /** How the released state is drawn. */\n variant = input<ToggleButtonVariant>('outlined');\n /** Size. */\n size = input<ToggleButtonSize>('default');\n /** Span the full width of the parent (group buttons share the width evenly). */\n fluid = input(false, { transform: booleanAttribute });\n /** Ripple Effect */\n ripple = input(true, { transform: booleanAttribute });\n /** Pill shape. */\n rounded = input(false, { transform: booleanAttribute });\n /** Whether the last pressed button can be released (single), or the group emptied. */\n allowEmpty = input(true, { transform: booleanAttribute });\n\n // --- Templates --------------------------------------------------------\n /** Replaces the icon, single mode (receives `{ $implicit, checked }`). */\n iconTemplate = input<TemplateRef<ToggleButtonStateContext>>();\n /** Replaces the whole button content, single mode (receives `{ $implicit, checked }`). */\n contentTemplate = input<TemplateRef<ToggleButtonStateContext>>();\n /** Replaces a group button's content (receives `{ $implicit, option, selected, index }`). */\n itemTemplate = input<TemplateRef<ToggleButtonItemContext<T>>>();\n\n /** Emitted on user interaction with the new model value. */\n toggleChange = output<ToggleButtonValue<T>>();\n /** Emitted when a group button is clicked (even if it does not change the value). */\n optionClick = output<ToggleButtonOptionClickEvent<T>>();\n /** Emitted when a button receives focus. */\n toggleFocus = output<FocusEvent>();\n /** Emitted when a button loses focus. */\n toggleBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly buttons = viewChildren<ElementRef<HTMLButtonElement>>('itemEl');\n\n /** @ignore */\n private readonly resolver = createOptionResolver({\n optionValue: this.optionValue,\n optionLabel: this.optionLabel,\n optionDisabled: this.optionDisabled,\n dataKey: this.dataKey,\n });\n\n constructor() {\n super();\n\n if (isDevMode()) {\n effect(() => {\n if (this.isGroup()) {\n if (!this.ariaLabel() && !this.ariaLabelledBy()) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n 'Group has no accessible name: provide `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n if (this.normalizedOptions().some((o) => o.iconOnly && !o.ariaLabel)) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n 'Icon-only option has no accessible name: add `ariaLabel` on the option.',\n );\n }\n return;\n }\n if (this.isIconOnly() && !this.ariaLabel()) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n 'Icon-only button has no accessible name: provide `ariaLabel`.',\n );\n }\n // A name that changes with the state is re-announced on focus, so the\n // control sounds like a different button depending on its value.\n if (this.hasStateLabels() && !this.ariaLabel() && !this.ariaLabelledBy()) {\n warnMissingAccessibleName(\n 'ui-toggle-button',\n '`onLabel`/`offLabel` differ: provide a state-independent `ariaLabel` (or `ariaLabelledBy`).',\n );\n }\n });\n }\n }\n\n /** @ignore Group mode: an `options` list was provided. */\n protected readonly isGroup = computed(() => !!this.options());\n\n /** @ignore */\n protected readonly iconSize = computed<UiIconSize>(() => {\n const size = this.size();\n if (size === 'small') return 'sm';\n return size === 'large' ? 'lg' : 'default';\n });\n\n /** @ignore */\n protected readonly hostClasses = computed(() => {\n const c = ['ui-toggle-button', `_${this.level()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.variant() !== 'outlined') c.push(`_${this.variant()}`);\n if (this.rounded()) c.push('_rounded');\n if (this.fluid()) c.push('_fluid');\n if (this.isGroup()) {\n c.push('_group');\n if (this.orientation() === 'vertical') c.push('_vertical');\n }\n if (this.readonly()) c.push('_readonly');\n if (this.isDisabled()) c.push('_disabled');\n if (this.isInvalid()) c.push('_invalid');\n return c.join(' ');\n });\n\n /** @ignore Only the group carries the group-level ARIA naming. */\n protected readonly groupAriaLabel = computed(() =>\n this.isGroup() ? this.ariaLabel() || null : null,\n );\n /** @ignore */\n protected readonly groupAriaLabelledBy = computed(() =>\n this.isGroup() ? this.ariaLabelledBy() || null : null,\n );\n\n // --- Single mode ------------------------------------------------------\n\n /** @ignore */\n protected readonly checked = computed(() => this.modelValue() === this.trueValue());\n /** @ignore */\n protected readonly hasStateLabels = computed(\n () => !!this.onLabel() && !!this.offLabel() && this.onLabel() !== this.offLabel(),\n );\n /** @ignore Label of the current state, falling back to the shared one. */\n protected readonly currentLabel = computed(\n () => (this.checked() ? this.onLabel() : this.offLabel()) ?? this.label() ?? null,\n );\n /** @ignore Icon of the current state, falling back to the shared one. */\n protected readonly currentIcon = computed(\n () => (this.checked() ? this.onIcon() : this.offIcon()) ?? this.icon() ?? null,\n );\n /** @ignore Square button: an icon, no text. */\n protected readonly isIconOnly = computed(\n () => !this.contentTemplate() && !this.currentLabel() && !!this.currentIcon(),\n );\n /** @ignore */\n protected readonly iconBefore = computed(() => this.iconPos() === 'left');\n /** @ignore */\n protected readonly stateContext = computed<ToggleButtonStateContext>(() => ({\n $implicit: this.checked(),\n checked: this.checked(),\n }));\n /** @ignore Accessible name of the single button (never empty-stringed). */\n protected readonly buttonAriaLabel = computed(\n () => this.ariaLabel() || (this.isIconOnly() ? this.currentLabel() : null),\n );\n\n // --- Group mode -------------------------------------------------------\n\n /** @ignore Options resolved to a flat, render-ready shape. */\n protected readonly normalizedOptions = computed<NormalizedToggle[]>(() => {\n const raw = this.options() ?? [];\n const model = this.modelValue();\n const groupDisabled = this.isDisabled();\n return raw.map((option, index) => {\n const value = this.resolveValue(option);\n const selected = this.isPressed(value, model);\n const label = this.resolveLabel(option);\n const icon = this.resolveIcon(option, selected);\n return {\n key: `${this.uid}-${index}`,\n index,\n value,\n label,\n icon,\n ariaLabel: isRecord(option) ? this.resolver.asText(option['ariaLabel']) : null,\n disabled: groupDisabled || this.resolver.resolveDisabled(option),\n selected,\n iconOnly: !label && !!icon,\n original: option,\n };\n });\n });\n\n /** @ignore */\n protected itemContext(item: NormalizedToggle): ToggleButtonItemContext<T> {\n return {\n $implicit: item.original as T,\n option: item.original as T,\n selected: item.selected,\n index: item.index,\n };\n }\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-toggle-button';\n }\n\n /** Focus the button (the first enabled one in group mode). */\n focus(options?: FocusOptions): void {\n const target = this.buttons().find((ref) => !ref.nativeElement.disabled);\n target?.nativeElement.focus(options);\n }\n\n /** @ignore Single mode: flip the boolean pair. */\n protected toggle(): void {\n if (this.isDisabled() || this.readonly()) return;\n if (this.checked() && !this.allowEmpty()) return;\n\n const next = this.checked() ? this.falseValue() : this.trueValue();\n this.modelValue.set(next);\n this.emitChange(next);\n this.toggleChange.emit(next);\n }\n\n /** @ignore Group mode: press / release one option. */\n protected toggleOption(item: NormalizedToggle, event: Event): void {\n if (item.disabled || this.readonly()) return;\n const value = item.value as T;\n const model = this.modelValue();\n const next = Array.isArray(model) ? [...(model as T[])] : [];\n const at = next.findIndex((v) => this.resolver.equals(v, value));\n let selected: boolean;\n\n if (at !== -1) {\n if (!this.allowEmpty() && next.length === 1) return;\n next.splice(at, 1);\n selected = false;\n } else {\n next.push(value);\n selected = true;\n }\n\n this.modelValue.set(next);\n this.emitChange(next);\n this.toggleChange.emit(next);\n this.optionClick.emit({\n option: item.original as T,\n value,\n index: item.index,\n selected,\n originalEvent: event,\n });\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.toggleBlur.emit(event);\n }\n\n /** @ignore Rich option shape (`{ value }`) resolves without a field mapping. */\n private resolveValue(option: unknown): unknown {\n if (!this.optionValue() && isRecord(option) && 'value' in option) return option['value'];\n return this.resolver.resolveValue(option);\n }\n\n /** @ignore An option object with no label key stays label-less (icon-only button). */\n private resolveLabel(option: unknown): string | null {\n if (!this.optionLabel() && isRecord(option) && !('label' in option)) return null;\n return this.resolver.resolveLabel(option);\n }\n\n /** @ignore */\n private resolveIcon(option: unknown, selected: boolean): string | null {\n if (selected && isRecord(option)) {\n const swapped = this.resolver.asText(option['selectedIcon']);\n if (swapped) return swapped;\n }\n const field = this.optionIcon();\n if (field) return this.resolver.asText(this.resolver.getField(option, field));\n if (isRecord(option)) return this.resolver.asText(option['icon']);\n return null;\n }\n\n /** @ignore A group's model is the array of pressed values. */\n private isPressed(value: unknown, model: ToggleButtonValue<T> | undefined): boolean {\n return Array.isArray(model) && model.some((v) => this.resolver.equals(v, value));\n }\n}\n","@if (isGroup()) {\n @for (item of normalizedOptions(); track item.key) {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"item.selected\"\n [class._icon-only]=\"item.iconOnly\"\n [disabled]=\"item.disabled\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"item.selected\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggleOption(item, $event)\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (itemTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"itemContext(item)\" />\n } @else {\n @if (iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n @if (item.label) {\n <span class=\"ui-toggle-button-label\">{{ item.label }}</span>\n }\n @if (!iconBefore() && item.icon) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"item.icon\" [size]=\"iconSize()\" />\n }\n }\n </button>\n }\n} @else {\n <button\n #itemEl\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-toggle-button-item\"\n [class._selected]=\"checked()\"\n [class._icon-only]=\"isIconOnly()\"\n [id]=\"resolvedId()\"\n [disabled]=\"isDisabled()\"\n [attr.name]=\"name()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-pressed]=\"checked()\"\n [attr.aria-label]=\"buttonAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (click)=\"toggle()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n >\n @if (contentTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n @if (currentLabel()) {\n <span class=\"ui-toggle-button-label\">{{ currentLabel() }}</span>\n }\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"singleIcon\" />\n }\n }\n </button>\n}\n\n<ng-template #singleIcon>\n @if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else if (currentIcon(); as iconName) {\n <ui-icon class=\"ui-toggle-button-icon\" [name]=\"iconName\" [size]=\"iconSize()\" />\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-toggle-button\n */\n\nexport * from './lib/ui-toggle-button';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAqGA;AACA,SAAS,QAAQ,CAAC,KAAc,EAAA;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;AACpD;AAEA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAgBG,MAAO,cAA4B,SAAQ,gBAAsC,CAAA;AAiFrF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;;AA/ET,QAA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AAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,oBAAoB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;qBAC3F,EAAA,IAAA,EACK;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,aAAa,EAAE,4BAA4B;AAC3C,wBAAA,mBAAmB,EAAE,kBAAkB;AACvC,wBAAA,wBAAwB,EAAE,uBAAuB;AAClD,qBAAA,EAAA,QAAA,EAAA,qpFAAA,EAAA,MAAA,EAAA,CAAA,22bAAA,CAAA,EAAA;gyFAyEsE,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzNjF;;AAEG;;ACFH;;AAEG;;"}
|
|
@@ -102,12 +102,12 @@ class UiToggle extends BaseFieldControl {
|
|
|
102
102
|
this.emitTouch();
|
|
103
103
|
this.toggleBlur.emit(event);
|
|
104
104
|
}
|
|
105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
106
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToggle, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
106
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: UiToggle, isStandalone: true, selector: "ui-toggle", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, trueValue: { classPropertyName: "trueValue", publicName: "trueValue", isSignal: true, isRequired: false, transformFunction: null }, falseValue: { classPropertyName: "falseValue", publicName: "falseValue", isSignal: true, isRequired: false, transformFunction: null }, handle: { classPropertyName: "handle", publicName: "handle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleChange: "toggleChange", toggleFocus: "toggleFocus", toggleBlur: "toggleBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggle), multi: true }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<label [class]=\"classes()\">\n @if (hasLabel() && labelPosition() === 'before') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n\n <span class=\"ui-toggle-control\">\n <input\n #inputEl\n type=\"checkbox\"\n role=\"switch\"\n class=\"ui-toggle-input\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"ui-toggle-track\" aria-hidden=\"true\">\n <span class=\"ui-toggle-thumb\">\n @if (handle(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"handleContext()\" />\n }\n </span>\n </span>\n </span>\n\n @if (hasLabel() && labelPosition() === 'after') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n</label>\n\n<ng-template #labelTpl>\n <span class=\"ui-toggle-label\">\n <span class=\"ui-toggle-text\">{{ label() }}</span>\n @if (required()) {\n <span class=\"ui-toggle-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n</ng-template>\n", styles: [".ui-toggle{display:inline-flex;align-items:center;gap:var(--ui-toggle-gap, var(--ui-form-control-gap, var(--units-sm)));cursor:pointer}.ui-toggle-control{position:relative;display:inline-flex;flex-shrink:0}.ui-toggle-input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.ui-toggle-track{display:flex;align-items:center;box-sizing:border-box;border:var(--ui-toggle-track-stroke-width, var(--stroke-sm)) solid var(--ui-toggle-track-stroke, transparent);border-radius:var(--ui-toggle-track-radius, var(--radius-full));background-color:var(--ui-toggle-track-surface, var(--form-low-content-default));transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle-thumb{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;border-radius:var(--ui-toggle-thumb-radius, var(--radius-full));background-color:var(--ui-toggle-thumb-surface, var(--form-high-surface-default));color:var(--ui-toggle-thumb-color, var(--form-low-content-default));line-height:0;overflow:hidden;transition:transform var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle .ui-toggle-track{width:var(--ui-toggle-track-width, 2.75rem);height:var(--ui-toggle-track-height, 1.5rem);padding:var(--ui-toggle-track-padding, .0625rem)}.ui-toggle .ui-toggle-thumb{width:var(--ui-toggle-thumb-size, 1.25rem);height:var(--ui-toggle-thumb-size, 1.25rem)}.ui-toggle._checked .ui-toggle-thumb{transform:translate(var(--ui-toggle-thumb-offset, 1.25rem))}.ui-toggle._small .ui-toggle-track{width:var(--ui-toggle-track-width-small, 2.25rem);height:var(--ui-toggle-track-height-small, 1.25rem);padding:var(--ui-toggle-track-padding-small, .0625rem)}.ui-toggle._small .ui-toggle-thumb{width:var(--ui-toggle-thumb-size-small, 1rem);height:var(--ui-toggle-thumb-size-small, 1rem)}.ui-toggle._small._checked .ui-toggle-thumb{transform:translate(var(--ui-toggle-thumb-offset-small, 1rem))}.ui-toggle:hover:not(._disabled):not(._readonly) .ui-toggle-track{background-color:var(--ui-toggle-track-surface-hover, var(--form-high-content-hover))}.ui-toggle._checked:hover:not(._disabled):not(._readonly) .ui-toggle-track{background-color:var(--ui-toggle-track-surface-hover, var(--form-high-content-hover))}.ui-toggle._checked .ui-toggle-track{background-color:var(--ui-toggle-track-surface-checked, var(--form-high-content-checked))}.ui-toggle:has(.ui-toggle-input:focus-visible) .ui-toggle-track{box-shadow:0 0 0 var(--ui-toggle-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-toggle._invalid .ui-toggle-track{border-color:var(--ui-toggle-track-stroke-invalid, var(--form-error-stroke-default))}.ui-toggle._invalid:has(.ui-toggle-input:focus-visible) .ui-toggle-track{box-shadow:0 0 0 var(--ui-toggle-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-focus-ring-color-invalid, var(--form-error-stroke-focused)) r g b/50%)}.ui-toggle-label{display:inline-flex;align-items:center;gap:var(--ui-toggle-label-gap, var(--units-2xs));font-family:var(--ui-toggle-font-family, var(--fontfamily-base));font-size:var(--ui-toggle-font-size, var(--size-typography-text-default));color:var(--ui-label-color, var(--form-high-content-default));cursor:inherit;-webkit-user-select:none;user-select:none;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle._small .ui-toggle-label{font-size:var(--ui-toggle-font-size-small, var(--size-typography-text-md))}.ui-toggle-required{color:var(--ui-toggle-required-color, var(--informative-errorlow-content-default))}.ui-toggle._disabled{cursor:not-allowed}.ui-toggle._disabled .ui-toggle-track{background-color:var(--ui-toggle-track-surface-disabled, var(--form-low-content-disabled))}.ui-toggle._disabled .ui-toggle-thumb{background-color:var(--ui-toggle-thumb-surface-disabled, var(--form-high-surface-disabled))}.ui-toggle._disabled .ui-toggle-label{color:var(--ui-label-color-disabled, var(--form-high-content-disabled))}.ui-toggle._disabled._checked .ui-toggle-track{background-color:var(--ui-toggle-track-surface-checked-disabled, var(--form-high-content-disabled))}.ui-toggle._readonly{cursor:default}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
107
107
|
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UiToggle, decorators: [{
|
|
109
109
|
type: Component,
|
|
110
|
-
args: [{ selector: 'ui-toggle', imports: [NgTemplateOutlet], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggle), multi: true }], template: "<label [class]=\"classes()\">\n @if (hasLabel() && labelPosition() === 'before') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n\n <span class=\"ui-toggle-control\">\n <input\n #inputEl\n type=\"checkbox\"\n role=\"switch\"\n class=\"ui-toggle-input\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"ui-toggle-track\" aria-hidden=\"true\">\n <span class=\"ui-toggle-thumb\">\n @if (handle(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"handleContext()\" />\n }\n </span>\n </span>\n </span>\n\n @if (hasLabel() && labelPosition() === 'after') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n</label>\n\n<ng-template #labelTpl>\n <span class=\"ui-toggle-label\">\n <span class=\"ui-toggle-text\">{{ label() }}</span>\n @if (required()) {\n <span class=\"ui-toggle-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n</ng-template>\n", styles: [".ui-toggle{display:inline-flex;align-items:center;gap:var(--ui-toggle-gap, var(--ui-form-control-gap, var(--units-sm)));cursor:pointer}.ui-toggle-control{position:relative;display:inline-flex;flex-shrink:0}.ui-toggle-input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.ui-toggle-track{display:flex;align-items:center;box-sizing:border-box;border:var(--ui-toggle-track-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-toggle-track-radius, var(--radius-full));background-color:var(--form-low-content-default);transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle-thumb{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;border-radius:var(--ui-toggle-thumb-radius, var(--radius-full));background-color:var(--form-high-surface-default);color:var(--form-low-content-default);line-height:0;overflow:hidden;transition:transform var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle .ui-toggle-track{width:var(--ui-toggle-track-width, 2.75rem);height:var(--ui-toggle-track-height, 1.5rem);padding:var(--ui-toggle-track-padding, .0625rem)}.ui-toggle .ui-toggle-thumb{width:var(--ui-toggle-thumb-size, 1.25rem);height:var(--ui-toggle-thumb-size, 1.25rem)}.ui-toggle._checked .ui-toggle-thumb{transform:translate(var(--ui-toggle-thumb-offset, 1.25rem))}.ui-toggle._small .ui-toggle-track{width:var(--ui-toggle-track-width-small, 2.25rem);height:var(--ui-toggle-track-height-small, 1.25rem);padding:var(--ui-toggle-track-padding-small, .0625rem)}.ui-toggle._small .ui-toggle-thumb{width:var(--ui-toggle-thumb-size-small, 1rem);height:var(--ui-toggle-thumb-size-small, 1rem)}.ui-toggle._small._checked .ui-toggle-thumb{transform:translate(var(--ui-toggle-thumb-offset-small, 1rem))}.ui-toggle:hover:not(._disabled):not(._readonly) .ui-toggle-track{background-color:var(--form-high-content-hover)}.ui-toggle._checked:hover:not(._disabled):not(._readonly) .ui-toggle-track{background-color:var(--form-high-content-hover)}.ui-toggle._checked .ui-toggle-track{background-color:var(--form-high-content-checked)}.ui-toggle:has(.ui-toggle-input:focus-visible) .ui-toggle-track{box-shadow:0 0 0 var(--ui-toggle-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-high-stroke-focused) r g b/50%)}.ui-toggle._invalid .ui-toggle-track{border-color:var(--form-error-stroke-default)}.ui-toggle._invalid:has(.ui-toggle-input:focus-visible) .ui-toggle-track{box-shadow:0 0 0 var(--ui-toggle-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--form-error-stroke-focused) r g b/50%)}.ui-toggle-label{display:inline-flex;align-items:center;gap:var(--ui-toggle-label-gap, var(--units-2xs));font-family:var(--fontfamily-base);font-size:var(--ui-toggle-font-size, var(--size-typography-text-default));color:var(--ui-label-color, var(--form-high-content-default));cursor:inherit;-webkit-user-select:none;user-select:none;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle._small .ui-toggle-label{font-size:var(--ui-toggle-font-size-small, var(--size-typography-text-md))}.ui-toggle-required{color:var(--informative-errorlow-content-default)}.ui-toggle._disabled{cursor:not-allowed}.ui-toggle._disabled .ui-toggle-track{background-color:var(--form-low-content-disabled)}.ui-toggle._disabled .ui-toggle-thumb{background-color:var(--form-high-surface-disabled)}.ui-toggle._disabled .ui-toggle-label{color:var(--form-high-content-disabled)}.ui-toggle._disabled._checked .ui-toggle-track{background-color:var(--form-high-content-disabled)}.ui-toggle._readonly{cursor:default}\n"] }]
|
|
110
|
+
args: [{ selector: 'ui-toggle', imports: [NgTemplateOutlet], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggle), multi: true }], template: "<label [class]=\"classes()\">\n @if (hasLabel() && labelPosition() === 'before') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n\n <span class=\"ui-toggle-control\">\n <input\n #inputEl\n type=\"checkbox\"\n role=\"switch\"\n class=\"ui-toggle-input\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"ui-toggle-track\" aria-hidden=\"true\">\n <span class=\"ui-toggle-thumb\">\n @if (handle(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"handleContext()\" />\n }\n </span>\n </span>\n </span>\n\n @if (hasLabel() && labelPosition() === 'after') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n</label>\n\n<ng-template #labelTpl>\n <span class=\"ui-toggle-label\">\n <span class=\"ui-toggle-text\">{{ label() }}</span>\n @if (required()) {\n <span class=\"ui-toggle-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n</ng-template>\n", styles: [".ui-toggle{display:inline-flex;align-items:center;gap:var(--ui-toggle-gap, var(--ui-form-control-gap, var(--units-sm)));cursor:pointer}.ui-toggle-control{position:relative;display:inline-flex;flex-shrink:0}.ui-toggle-input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.ui-toggle-track{display:flex;align-items:center;box-sizing:border-box;border:var(--ui-toggle-track-stroke-width, var(--stroke-sm)) solid var(--ui-toggle-track-stroke, transparent);border-radius:var(--ui-toggle-track-radius, var(--radius-full));background-color:var(--ui-toggle-track-surface, var(--form-low-content-default));transition:background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),border-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),box-shadow var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle-thumb{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box;border-radius:var(--ui-toggle-thumb-radius, var(--radius-full));background-color:var(--ui-toggle-thumb-surface, var(--form-high-surface-default));color:var(--ui-toggle-thumb-color, var(--form-low-content-default));line-height:0;overflow:hidden;transition:transform var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout)),background-color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle .ui-toggle-track{width:var(--ui-toggle-track-width, 2.75rem);height:var(--ui-toggle-track-height, 1.5rem);padding:var(--ui-toggle-track-padding, .0625rem)}.ui-toggle .ui-toggle-thumb{width:var(--ui-toggle-thumb-size, 1.25rem);height:var(--ui-toggle-thumb-size, 1.25rem)}.ui-toggle._checked .ui-toggle-thumb{transform:translate(var(--ui-toggle-thumb-offset, 1.25rem))}.ui-toggle._small .ui-toggle-track{width:var(--ui-toggle-track-width-small, 2.25rem);height:var(--ui-toggle-track-height-small, 1.25rem);padding:var(--ui-toggle-track-padding-small, .0625rem)}.ui-toggle._small .ui-toggle-thumb{width:var(--ui-toggle-thumb-size-small, 1rem);height:var(--ui-toggle-thumb-size-small, 1rem)}.ui-toggle._small._checked .ui-toggle-thumb{transform:translate(var(--ui-toggle-thumb-offset-small, 1rem))}.ui-toggle:hover:not(._disabled):not(._readonly) .ui-toggle-track{background-color:var(--ui-toggle-track-surface-hover, var(--form-high-content-hover))}.ui-toggle._checked:hover:not(._disabled):not(._readonly) .ui-toggle-track{background-color:var(--ui-toggle-track-surface-hover, var(--form-high-content-hover))}.ui-toggle._checked .ui-toggle-track{background-color:var(--ui-toggle-track-surface-checked, var(--form-high-content-checked))}.ui-toggle:has(.ui-toggle-input:focus-visible) .ui-toggle-track{box-shadow:0 0 0 var(--ui-toggle-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-focus-ring-color, var(--form-high-stroke-focused)) r g b/50%)}.ui-toggle._invalid .ui-toggle-track{border-color:var(--ui-toggle-track-stroke-invalid, var(--form-error-stroke-default))}.ui-toggle._invalid:has(.ui-toggle-input:focus-visible) .ui-toggle-track{box-shadow:0 0 0 var(--ui-toggle-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) rgb(from var(--ui-toggle-focus-ring-color-invalid, var(--form-error-stroke-focused)) r g b/50%)}.ui-toggle-label{display:inline-flex;align-items:center;gap:var(--ui-toggle-label-gap, var(--units-2xs));font-family:var(--ui-toggle-font-family, var(--fontfamily-base));font-size:var(--ui-toggle-font-size, var(--size-typography-text-default));color:var(--ui-label-color, var(--form-high-content-default));cursor:inherit;-webkit-user-select:none;user-select:none;transition:color var(--ui-control-transition-duration, var(--transition-default)) var(--ui-control-transition-easing, var(--transition-easeinout))}.ui-toggle._small .ui-toggle-label{font-size:var(--ui-toggle-font-size-small, var(--size-typography-text-md))}.ui-toggle-required{color:var(--ui-toggle-required-color, var(--informative-errorlow-content-default))}.ui-toggle._disabled{cursor:not-allowed}.ui-toggle._disabled .ui-toggle-track{background-color:var(--ui-toggle-track-surface-disabled, var(--form-low-content-disabled))}.ui-toggle._disabled .ui-toggle-thumb{background-color:var(--ui-toggle-thumb-surface-disabled, var(--form-high-surface-disabled))}.ui-toggle._disabled .ui-toggle-label{color:var(--ui-label-color-disabled, var(--form-high-content-disabled))}.ui-toggle._disabled._checked .ui-toggle-track{background-color:var(--ui-toggle-track-surface-checked-disabled, var(--form-high-content-disabled))}.ui-toggle._readonly{cursor:default}\n"] }]
|
|
111
111
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], trueValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "trueValue", required: false }] }], falseValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "falseValue", required: false }] }], handle: [{ type: i0.Input, args: [{ isSignal: true, alias: "handle", required: false }] }], toggleChange: [{ type: i0.Output, args: ["toggleChange"] }], toggleFocus: [{ type: i0.Output, args: ["toggleFocus"] }], toggleBlur: [{ type: i0.Output, args: ["toggleBlur"] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }] } });
|
|
112
112
|
|
|
113
113
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms-ui-toggle.mjs","sources":["../../../projects/ui-kit/forms/ui-toggle/src/lib/ui-toggle.ts","../../../projects/ui-kit/forms/ui-toggle/src/lib/ui-toggle.html","../../../projects/ui-kit/forms/ui-toggle/src/public-api.ts","../../../projects/ui-kit/forms/ui-toggle/src/4sh-ui-kit-forms-ui-toggle.ts"],"sourcesContent":["import {\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n output,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFieldControl } from '@4sh/ui-kit/forms';\n\nexport type ToggleSize = 'default' | 'small';\nexport type ToggleLabelPosition = 'before' | 'after';\nexport interface ToggleHandleContext {\n checked: boolean;\n}\n\n/**\n * ui-toggle — headless switch built on a real native `<input type=\"checkbox\" role=\"switch\">`.\n *\n * The native input stays in the DOM (invisible, covering the track) so keyboard,\n * screen readers, label click and form semantics come for free. `role=\"switch\"`\n * + `aria-checked` make assistive tech announce it as on/off. Interactive states\n * (hover/focus/disabled/checked) are pure CSS driven by `form.*` design tokens.\n *\n * Works standalone, with `[(ngModel)]` or reactive forms (ControlValueAccessor).\n * By default the model value is boolean; `trueValue`/`falseValue` let the model\n * carry any pair of values (e.g. 'on'/'off', 1/0).\n */\n@Component({\n selector: 'ui-toggle',\n imports: [NgTemplateOutlet],\n templateUrl: './ui-toggle.html',\n styleUrl: './ui-toggle.scss',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggle), multi: true }],\n})\nexport class UiToggle<T = boolean> extends BaseFieldControl<T> {\n /** Label displayed next to the switch (clicking it toggles the switch). */\n label = input<string>();\n /** Side of the switch the label sits on (both sides are clickable). */\n labelPosition = input<ToggleLabelPosition>('after');\n /** Size. */\n size = input<ToggleSize>('default');\n /** Model value emitted when on. */\n trueValue = input<T>(true as T);\n /** Model value emitted when off. */\n falseValue = input<T>(false as T);\n /**\n * Custom handle (thumb) template. Receives a `{ checked }` context, so the\n * rendered content can react to the on/off state (e.g. a check / times icon).\n */\n handle = input<TemplateRef<ToggleHandleContext>>();\n\n /** Emitted on user toggle with the new model value (never when disabled/readonly). */\n toggleChange = output<T>();\n /** Emitted when the native input receives focus. */\n toggleFocus = output<FocusEvent>();\n /** Emitted when the native input loses focus. */\n toggleBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n\n /** @ignore */\n protected readonly checked = computed(() => this.modelValue() === this.trueValue());\n /** @ignore A visible label is provided. */\n protected readonly hasLabel = computed(() => !!this.label());\n /** @ignore Context handed to the custom handle template. */\n protected readonly handleContext = computed<ToggleHandleContext>(() => ({\n checked: this.checked(),\n }));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-toggle'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.checked()) c.push('_checked');\n if (this.isDisabled()) c.push('_disabled');\n if (this.readonly()) c.push('_readonly');\n if (this.isInvalid()) c.push('_invalid');\n return c.join(' ');\n });\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-toggle';\n }\n\n /** Focus the native input programmatically. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n /** @ignore Native change: single source of truth for user toggles. */\n protected onNativeChange(): void {\n const inputEl = this.inputEl().nativeElement;\n if (this.readonly()) {\n inputEl.checked = this.checked(); // revert the native toggle\n return;\n }\n const value = inputEl.checked ? this.trueValue() : this.falseValue();\n this.modelValue.set(value);\n this.emitChange(value);\n this.toggleChange.emit(value);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.toggleBlur.emit(event);\n }\n}\n","<label [class]=\"classes()\">\n @if (hasLabel() && labelPosition() === 'before') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n\n <span class=\"ui-toggle-control\">\n <input\n #inputEl\n type=\"checkbox\"\n role=\"switch\"\n class=\"ui-toggle-input\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"ui-toggle-track\" aria-hidden=\"true\">\n <span class=\"ui-toggle-thumb\">\n @if (handle(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"handleContext()\" />\n }\n </span>\n </span>\n </span>\n\n @if (hasLabel() && labelPosition() === 'after') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n</label>\n\n<ng-template #labelTpl>\n <span class=\"ui-toggle-label\">\n <span class=\"ui-toggle-text\">{{ label() }}</span>\n @if (required()) {\n <span class=\"ui-toggle-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-toggle\n */\n\nexport * from './lib/ui-toggle';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAoBA;;;;;;;;;;;AAWG;AAQG,MAAO,QAAsB,SAAQ,gBAAmB,CAAA;AAP9D,IAAA,WAAA,GAAA;;;AASE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;QAEvB,IAAA,CAAA,aAAa,GAAG,KAAK,CAAsB,OAAO;0FAAC;;QAEnD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,SAAS;iFAAC;;QAEnC,IAAA,CAAA,SAAS,GAAG,KAAK,CAAI,IAAS;sFAAC;;QAE/B,IAAA,CAAA,UAAU,GAAG,KAAK,CAAI,KAAU;uFAAC;AACjC;;;AAGG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK;8FAAoC;;QAGlD,IAAA,CAAA,YAAY,GAAG,MAAM,EAAK;;QAE1B,IAAA,CAAA,WAAW,GAAG,MAAM,EAAc;;QAElC,IAAA,CAAA,UAAU,GAAG,MAAM,EAAc;;AAGhB,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAA+B,SAAS;oFAAC;;AAGnE,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,KAAK,IAAI,CAAC,SAAS,EAAE;oFA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KAAK,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,g+CAAA,EAAA,MAAA,EAAA,CAAA,qwIAAA,CAAA,EAAA;ozBA2BrB,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhEvF;;AAEG;;ACFH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms-ui-toggle.mjs","sources":["../../../projects/ui-kit/forms/ui-toggle/src/lib/ui-toggle.ts","../../../projects/ui-kit/forms/ui-toggle/src/lib/ui-toggle.html","../../../projects/ui-kit/forms/ui-toggle/src/public-api.ts","../../../projects/ui-kit/forms/ui-toggle/src/4sh-ui-kit-forms-ui-toggle.ts"],"sourcesContent":["import {\n Component,\n computed,\n ElementRef,\n forwardRef,\n input,\n output,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BaseFieldControl } from '@4sh/ui-kit/forms';\n\nexport type ToggleSize = 'default' | 'small';\nexport type ToggleLabelPosition = 'before' | 'after';\nexport interface ToggleHandleContext {\n checked: boolean;\n}\n\n/**\n * ui-toggle — headless switch built on a real native `<input type=\"checkbox\" role=\"switch\">`.\n *\n * The native input stays in the DOM (invisible, covering the track) so keyboard,\n * screen readers, label click and form semantics come for free. `role=\"switch\"`\n * + `aria-checked` make assistive tech announce it as on/off. Interactive states\n * (hover/focus/disabled/checked) are pure CSS driven by `form.*` design tokens.\n *\n * Works standalone, with `[(ngModel)]` or reactive forms (ControlValueAccessor).\n * By default the model value is boolean; `trueValue`/`falseValue` let the model\n * carry any pair of values (e.g. 'on'/'off', 1/0).\n */\n@Component({\n selector: 'ui-toggle',\n imports: [NgTemplateOutlet],\n templateUrl: './ui-toggle.html',\n styleUrl: './ui-toggle.scss',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => UiToggle), multi: true }],\n})\nexport class UiToggle<T = boolean> extends BaseFieldControl<T> {\n /** Label displayed next to the switch (clicking it toggles the switch). */\n label = input<string>();\n /** Side of the switch the label sits on (both sides are clickable). */\n labelPosition = input<ToggleLabelPosition>('after');\n /** Size. */\n size = input<ToggleSize>('default');\n /** Model value emitted when on. */\n trueValue = input<T>(true as T);\n /** Model value emitted when off. */\n falseValue = input<T>(false as T);\n /**\n * Custom handle (thumb) template. Receives a `{ checked }` context, so the\n * rendered content can react to the on/off state (e.g. a check / times icon).\n */\n handle = input<TemplateRef<ToggleHandleContext>>();\n\n /** Emitted on user toggle with the new model value (never when disabled/readonly). */\n toggleChange = output<T>();\n /** Emitted when the native input receives focus. */\n toggleFocus = output<FocusEvent>();\n /** Emitted when the native input loses focus. */\n toggleBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly inputEl = viewChild.required<ElementRef<HTMLInputElement>>('inputEl');\n\n /** @ignore */\n protected readonly checked = computed(() => this.modelValue() === this.trueValue());\n /** @ignore A visible label is provided. */\n protected readonly hasLabel = computed(() => !!this.label());\n /** @ignore Context handed to the custom handle template. */\n protected readonly handleContext = computed<ToggleHandleContext>(() => ({\n checked: this.checked(),\n }));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-toggle'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.checked()) c.push('_checked');\n if (this.isDisabled()) c.push('_disabled');\n if (this.readonly()) c.push('_readonly');\n if (this.isInvalid()) c.push('_invalid');\n return c.join(' ');\n });\n\n /** @ignore */\n protected override uidPrefix(): string {\n return 'ui-toggle';\n }\n\n /** Focus the native input programmatically. */\n focus(options?: FocusOptions): void {\n this.inputEl().nativeElement.focus(options);\n }\n\n /** @ignore Native change: single source of truth for user toggles. */\n protected onNativeChange(): void {\n const inputEl = this.inputEl().nativeElement;\n if (this.readonly()) {\n inputEl.checked = this.checked(); // revert the native toggle\n return;\n }\n const value = inputEl.checked ? this.trueValue() : this.falseValue();\n this.modelValue.set(value);\n this.emitChange(value);\n this.toggleChange.emit(value);\n }\n\n /** @ignore */\n protected onBlur(event: FocusEvent): void {\n this.emitTouch();\n this.toggleBlur.emit(event);\n }\n}\n","<label [class]=\"classes()\">\n @if (hasLabel() && labelPosition() === 'before') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n\n <span class=\"ui-toggle-control\">\n <input\n #inputEl\n type=\"checkbox\"\n role=\"switch\"\n class=\"ui-toggle-input\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-invalid]=\"isInvalid() ? 'true' : null\"\n (change)=\"onNativeChange()\"\n (focus)=\"toggleFocus.emit($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"ui-toggle-track\" aria-hidden=\"true\">\n <span class=\"ui-toggle-thumb\">\n @if (handle(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"handleContext()\" />\n }\n </span>\n </span>\n </span>\n\n @if (hasLabel() && labelPosition() === 'after') {\n <ng-container [ngTemplateOutlet]=\"labelTpl\" />\n }\n</label>\n\n<ng-template #labelTpl>\n <span class=\"ui-toggle-label\">\n <span class=\"ui-toggle-text\">{{ label() }}</span>\n @if (required()) {\n <span class=\"ui-toggle-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-toggle\n */\n\nexport * from './lib/ui-toggle';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAoBA;;;;;;;;;;;AAWG;AAQG,MAAO,QAAsB,SAAQ,gBAAmB,CAAA;AAP9D,IAAA,WAAA,GAAA;;;AASE,QAAA,IAAA,CAAA,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SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,SAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrCnG,g+CA+CA,EAAA,MAAA,EAAA,CAAA,60JAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDbY,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKf,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAPpB,SAAS;+BACE,WAAW,EAAA,OAAA,EACZ,CAAC,gBAAgB,CAAC,EAAA,SAAA,EAGhB,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,QAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,g+CAAA,EAAA,MAAA,EAAA,CAAA,60JAAA,CAAA,EAAA;ozBA2BrB,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhEvF;;AAEG;;ACFH;;AAEG;;"}
|
|
@@ -184,10 +184,10 @@ class BaseFieldControl extends BaseControlValueAccessor {
|
|
|
184
184
|
uidPrefix() {
|
|
185
185
|
return 'ui-field';
|
|
186
186
|
}
|
|
187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
188
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BaseFieldControl, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
188
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: BaseFieldControl, isStandalone: true, inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
189
189
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BaseFieldControl, decorators: [{
|
|
191
191
|
type: Directive
|
|
192
192
|
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
193
193
|
/**
|
|
@@ -211,6 +211,11 @@ class BaseFormField extends BaseFieldControl {
|
|
|
211
211
|
/** Error message shown in place of the helper when the field is in error. */
|
|
212
212
|
this.errorText = input(/* @ts-ignore */
|
|
213
213
|
...(ngDevMode ? [undefined, { debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
214
|
+
/** Prefixes the message under the field (helper or error) with a decorative icon. */
|
|
215
|
+
this.showMessageIcon = input(false, { ...(ngDevMode ? { debugName: "showMessageIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
216
|
+
/** Overrides the glyph shown by `showMessageIcon`. */
|
|
217
|
+
this.messageIcon = input(/* @ts-ignore */
|
|
218
|
+
...(ngDevMode ? [undefined, { debugName: "messageIcon" }] : /* istanbul ignore next */ []));
|
|
214
219
|
/** Size. */
|
|
215
220
|
this.size = input('default', /* @ts-ignore */
|
|
216
221
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
@@ -241,12 +246,12 @@ class BaseFormField extends BaseFieldControl {
|
|
|
241
246
|
}, /* @ts-ignore */
|
|
242
247
|
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
243
248
|
}
|
|
244
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
245
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BaseFormField, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
250
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: BaseFormField, isStandalone: true, inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, showMessageIcon: { classPropertyName: "showMessageIcon", publicName: "showMessageIcon", isSignal: true, isRequired: false, transformFunction: null }, messageIcon: { classPropertyName: "messageIcon", publicName: "messageIcon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
246
251
|
}
|
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: BaseFormField, decorators: [{
|
|
248
253
|
type: Directive
|
|
249
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }] } });
|
|
254
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], showMessageIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMessageIcon", required: false }] }], messageIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "messageIcon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }] } });
|
|
250
255
|
|
|
251
256
|
/**
|
|
252
257
|
* Standard dropdown-panel anchoring shared by the overlay form fields
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-forms.mjs","sources":["../../../projects/ui-kit/forms/src/lib/base-control-value-accessor.ts","../../../projects/ui-kit/forms/src/lib/base-form-field.ts","../../../projects/ui-kit/forms/src/lib/overlay-positions.ts","../../../projects/ui-kit/forms/src/lib/mask-engine.ts","../../../projects/ui-kit/forms/src/lib/option-resolver.ts","../../../projects/ui-kit/forms/src/lib/format-label.ts","../../../projects/ui-kit/forms/src/lib/warn-missing-accessible-name.ts","../../../projects/ui-kit/forms/src/public-api.ts","../../../projects/ui-kit/forms/src/4sh-ui-kit-forms.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n inject,\n Injector,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ControlValueAccessor,\n NgControl,\n PristineChangeEvent,\n StatusChangeEvent,\n TouchedChangeEvent,\n ValidationErrors,\n} from '@angular/forms';\n\n/**\n * Base class for form components (`ui-checkbox`, `ui-radio`, `ui-input`…).\n *\n * Implements `ControlValueAccessor` and mirrors the attached `NgControl` state\n * into signals, so templates/styles can react to it declaratively:\n *\n * - `touched` / `dirty` / `pristine` / `untouched` — interaction state\n * - `controlInvalid` / `controlErrors` — validation state\n * - `controlDisabled` — driven by `control.disable()`\n * - `showError` — invalid AND (touched or dirty),\n * the usual \"when to paint red\" rule\n *\n * The subscription is wired automatically after first render and cleaned up on\n * destroy. Subclasses only have to:\n * 1. implement `writeValue()` (form → view),\n * 2. call `emitChange(value)` on user interaction (view → form),\n * 3. call `emitTouch()` on blur,\n * 4. declare the DI provider:\n * `{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyComponent), multi: true }`.\n *\n * Works with reactive forms, template-driven forms, or standalone (no form at\n * all — the signals simply keep their defaults).\n */\nexport abstract class BaseControlValueAccessor<T> implements ControlValueAccessor {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly dirty = signal(false);\n readonly pristine = signal(true);\n readonly touched = signal(false);\n readonly untouched = signal(true);\n /** Validation state of the attached control (false when no control). */\n readonly controlInvalid = signal(false);\n /** Validation errors of the attached control (null when valid / no control). */\n readonly controlErrors = signal<ValidationErrors | null>(null);\n /** Disabled state driven by the forms API (`control.disable()`), not by the `disabled` input. */\n readonly controlDisabled = signal(false);\n /** True when the error state should be surfaced to the user. */\n readonly showError = computed(() => this.controlInvalid() && (this.touched() || this.dirty()));\n\n protected onChange: (value: T) => void = () => {\n /* noop until registered */\n };\n protected onTouched: () => void = () => {\n /* noop until registered */\n };\n\n constructor() {\n // NgControl injects lazily (after the directive tree is built) to avoid\n // the classic NgControl ↔ value-accessor circular dependency.\n afterNextRender(() => this.watchNgControlEvents());\n }\n\n /** Write the form value into the component state (form → view). */\n abstract writeValue(value: T): void;\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.controlDisabled.set(isDisabled);\n }\n\n /** Propagate a user-driven value change to the form (view → form). */\n protected emitChange(value: T): void {\n this.onChange(value);\n }\n\n /** Mark the control as touched (call on blur). */\n protected emitTouch(): void {\n this.onTouched();\n this.touched.set(true);\n this.untouched.set(false);\n }\n\n /** Mirror the NgControl state into the signals. Wired automatically; safe to call once manually if needed. */\n protected watchNgControlEvents(): void {\n const control = this.injector.get(NgControl, null, { optional: true, self: true })?.control;\n if (!control) return;\n\n const mirror = () => {\n this.pristine.set(control.pristine);\n this.dirty.set(control.dirty);\n this.touched.set(control.touched);\n this.untouched.set(control.untouched);\n this.controlInvalid.set(control.invalid);\n this.controlErrors.set(control.errors);\n };\n\n // Signal-forms interop provides a fake NgControl without an `events`\n // stream, but its getters read the field's signals: mirroring inside\n // an effect tracks them and keeps the state live.\n if (!control.events) {\n effect(mirror, { injector: this.injector });\n return;\n }\n\n // Seed with the current state (events only fire on transitions).\n mirror();\n\n control.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {\n if (event instanceof PristineChangeEvent) {\n this.pristine.set(event.pristine);\n this.dirty.set(!event.pristine);\n } else if (event instanceof TouchedChangeEvent) {\n this.touched.set(event.touched);\n this.untouched.set(!event.touched);\n } else if (event instanceof StatusChangeEvent) {\n this.controlInvalid.set(event.status === 'INVALID');\n this.controlErrors.set(control.errors);\n }\n });\n }\n}\n","import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { BaseControlValueAccessor } from './base-control-value-accessor';\nimport { UiFeedbackLevel } from '@4sh/ui-kit/types';\n\nexport type FieldSize = 'default' | 'small';\n/** Visual validation status (subset of `UiFeedbackLevel`, shared with `ui-helper`). */\nexport type FieldLevel = Extract<UiFeedbackLevel, 'default' | 'success' | 'error'>;\n/**\n * Placement of the floating label (\"float label\" mode):\n * - `over`: rises above the box, where a classic label sits,\n * - `in`: rises to a band reserved at the top **inside** the box,\n * - `on`: rises **onto** the top border, notching it.\n */\nexport type FieldFloatLabel = 'over' | 'in' | 'on';\n\nlet nextUid = 0;\n\n/**\n * Base class for every standalone form control (`ui-checkbox`, `ui-toggle`,\n * `ui-slider`, `ui-nudger`…): the CVA plumbing shared by all of them, without\n * any \"box\" chrome (no label/helper/error message rendering).\n *\n * Provides the common inputs (aria*, id/name, required/disabled/readonly/\n * invalid, tabindex), the auto-generated id machinery (`resolvedId`,\n * `messageId`), the `modelValue` signal with the default `writeValue`, and the\n * derived `isDisabled` / `isInvalid` states. Extends `BaseControlValueAccessor`:\n * subclasses call `emitChange` / `emitTouch` on user interaction.\n *\n * Decorated with `@Directive()` (no selector) so the signal inputs are inherited\n * correctly by the concrete components.\n */\n@Directive()\nexport abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {\n /** Accessible name when no visible label is provided. */\n ariaLabel = input<string>();\n /** id of an external element that labels this control. */\n ariaLabelledBy = input<string>();\n /** id forwarded to the native input (auto-generated when omitted). */\n inputId = input<string>();\n /** name forwarded to the native input. */\n name = input<string>();\n /** Required marker (*) + native required attribute. */\n required = input(false, { transform: booleanAttribute });\n /** Disables the field (native attribute). */\n disabled = input(false, { transform: booleanAttribute });\n /** Read-only (native attribute). */\n readonly = input(false, { transform: booleanAttribute });\n /** Forces the error styling (automatic when the attached control is invalid and touched/dirty). */\n invalid = input(false, { transform: booleanAttribute });\n /** tabindex forwarded to the native input. */\n tabindex = input<number>();\n\n /** @ignore Auto-generated unique id (prefix branded via `uidPrefix`). */\n protected readonly uid = `${this.uidPrefix()}-${nextUid++}`;\n /** @ignore Current value (written by the form or by user input). */\n protected readonly modelValue = signal<T | undefined>(undefined);\n\n /** @ignore */\n protected readonly resolvedId = computed(() => this.inputId() ?? this.uid);\n /** @ignore id of the message (for aria-describedby). */\n protected readonly messageId = computed(() => `${this.resolvedId()}-message`);\n /** @ignore Input disabled OR control disabled (form API). */\n protected readonly isDisabled = computed(() => this.disabled() || this.controlDisabled());\n /** @ignore Explicit error OR invalid control worth surfacing. */\n protected readonly isInvalid = computed(() => this.invalid() || this.showError());\n\n writeValue(value: T): void {\n this.modelValue.set(value);\n }\n\n /** @ignore Prefix of the auto-generated id — override to brand it per component. */\n protected uidPrefix(): string {\n return 'ui-field';\n }\n}\n\n/**\n * Base class for \"box\" form fields (`ui-input`, `ui-input-number`,\n * `ui-input-mask`, `ui-textarea`…).\n *\n * Extends `BaseFieldControl` with the box-specific inputs (label, helper,\n * error, size, level) and the derived state (effective level, displayed\n * message/value). Subclasses only handle their own `<input>` (specific\n * parsing/formatting) and call `emitChange` / `emitTouch`.\n */\n@Directive()\nexport abstract class BaseFormField<T> extends BaseFieldControl<T> {\n /** Label (rendered via `ui-label`). */\n label = input<string>();\n /** Helper text under the field (rendered via `ui-helper`). */\n helperText = input<string>();\n /** Error message shown in place of the helper when the field is in error. */\n errorText = input<string>();\n /** Size. */\n size = input<FieldSize>('default');\n /** Explicit validation status (`error` is forced when the control is invalid + touched). */\n level = input<FieldLevel>('default');\n /**\n * Floating label placement. Unset = classic label above the box.\n *\n * The label then plays the placeholder role while at rest, so the native\n * `placeholder` is neutralised (see `hasFloatLabel`).\n */\n floatLabel = input<FieldFloatLabel>();\n\n /** @ignore There is a label to float: a `floatLabel` alone has nothing to move. */\n protected readonly hasFloatLabel = computed(() => !!this.floatLabel() && !!this.label());\n\n /** @ignore Effective level: error when invalid, otherwise the requested `level`. */\n protected readonly effectiveLevel = computed<FieldLevel>(() =>\n this.isInvalid() ? 'error' : this.level(),\n );\n /** @ignore Displayed message: errorText when in error (if provided), otherwise helperText. */\n protected readonly displayMessage = computed(() =>\n this.isInvalid() && this.errorText() ? this.errorText() : this.helperText(),\n );\n /** @ignore Value shown in the input (string). Override for specific formatting. */\n protected readonly displayValue = computed(() => {\n const v = this.modelValue();\n return v === undefined || v === null ? '' : String(v);\n });\n}\n","import { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Standard dropdown-panel anchoring shared by the overlay form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`, `ui-datepicker`):\n * below the field, flipped above when `autoFlip`, flipped horizontally\n * (right-aligned) whenever there isn't enough room on the right.\n */\nexport function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[] {\n const belowStart: ConnectedPosition = {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: 8,\n };\n const belowEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n };\n const aboveStart: ConnectedPosition = {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -8,\n };\n const aboveEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n };\n return autoFlip ? [belowStart, belowEnd, aboveStart, aboveEnd] : [belowStart, belowEnd];\n}\n","/**\n * Pure masking engine shared by `ui-input-mask` and `ui-datepicker` (auto-formatting the typed\n * date). Same precedent as `overlay-positions.ts` in this folder: framework-free functions, no\n * class/Directive/Component, reusable by any form component that needs literal-inserting input\n * masking. Extracted from `ui-input-mask.ts` — behavior is a byte-for-byte copy, only `this.mask()`\n * /`this.ranges()`/`this.slotChar()` become explicit parameters.\n */\n\n/** Mask tokens → accepted character class. */\nexport const MASK_TOKENS: Record<string, RegExp> = {\n '9': /[0-9]/, // digit\n a: /[a-zA-Z]/, // letter\n '*': /[a-zA-Z0-9]/, // alphanumeric\n};\n\nexport interface MaskBounds {\n min: number;\n max: number;\n}\n\nexport interface MaskSlot {\n char: string | null;\n rgx?: RegExp;\n bound?: MaskBounds & { pos: number; len: number };\n}\n\nexport interface MaskBuildResult {\n display: string;\n masked: string;\n data: string;\n tokenIndices: number[];\n}\n\n/** Parse the `ranges` input (`\"1-31 1-12 1900-2100\"`) into one bound per numeric segment. */\nexport function parseMaskRanges(ranges: string): (MaskBounds | null)[] {\n return ranges\n .trim()\n .split(/\\s+/)\n .map((part) => {\n const m = /^(\\d+)-(\\d+)$/.exec(part);\n return m ? { min: Number(m[1]), max: Number(m[2]) } : null;\n });\n}\n\n/**\n * Resolve the mask template into slots: literals, input slots, and the `ranges` bounds attached\n * to every slot of the numeric segment (consecutive `9` tokens) it belongs to.\n */\nexport function buildMaskSlots(\n mask: string,\n bounds: (MaskBounds | null)[],\n tokens: Record<string, RegExp> = MASK_TOKENS,\n): MaskSlot[] {\n const slots: MaskSlot[] = [];\n const segments: MaskSlot[][] = [];\n let segment: MaskSlot[] | null = null;\n\n for (const m of mask) {\n const rgx = tokens[m];\n const slot: MaskSlot = rgx ? { char: null, rgx } : { char: m };\n slots.push(slot);\n if (rgx && m === '9') {\n if (!segment) segments.push((segment = []));\n segment.push(slot);\n } else {\n segment = null;\n }\n }\n\n // Every segment gets a `.bound`, even unranged ones (±Infinity = no-op range): `pos`/`len` are\n // needed for `atSegmentEnd` regardless, else an unranged segment (e.g. ui-datepicker's year)\n // never auto-inserts its own following literal (FSHSP-118).\n segments.forEach((seg, i) => {\n const range = bounds[i] ?? { min: -Infinity, max: Infinity };\n seg.forEach((slot, pos) => (slot.bound = { ...range, pos, len: seg.length }));\n });\n\n return slots;\n}\n\n/** Keep only the data characters (alphanumeric) of a raw input string. */\nexport function extractMaskData(raw: string): string {\n return raw.replace(/[^a-zA-Z0-9]/g, '');\n}\n\n/**\n * Can `ch` fill this slot? It must match the token class and — when the segment is bounded\n * AND `enforceBounds` — the digits typed so far plus `ch` must still admit at least one in-range\n * completion of the remaining positions (`2` then `4` is refused on `0-23`, `2` then `3` is\n * accepted).\n *\n * `enforceBounds = false` skips that second check (still requires the token class to match):\n * meant for re-deriving the mask after characters were REMOVED, not typed. The bounds check\n * exists to reject an invalid *new* leading digit while typing forward (e.g. `8` can never start\n * a valid `1-31` day, so it's skipped rather than accepted) — applied instead to the digits left\n * over after a deletion, that same skip can discard a still-valid residual digit and misalign\n * every segment after it. See `autoFormatSegments`.\n */\nexport function acceptsMaskChar(\n slot: MaskSlot,\n segment: string,\n ch: string,\n enforceBounds = true,\n): boolean {\n if (!slot.rgx?.test(ch)) return false;\n const bound = slot.bound;\n if (!enforceBounds || !bound) return true;\n const scale = 10 ** (bound.len - bound.pos - 1);\n const low = Number(segment + ch) * scale;\n return low <= bound.max && low + scale - 1 >= bound.min;\n}\n\n/** Apply the mask template to a sequence of data characters (fills empty positions with `slotChar`). */\nexport function applyMaskTemplate(\n slots: MaskSlot[],\n data: string,\n slotChar: string,\n): MaskBuildResult {\n let di = 0;\n let display = '';\n let masked = '';\n let lastFilled = 0;\n let used = '';\n const tokenIndices: number[] = [];\n // Characters already accepted in the current numeric segment (drives the bounds check).\n let segment = '';\n\n for (const slot of slots) {\n if (slot.char !== null) {\n display += slot.char;\n masked += slot.char;\n continue;\n }\n tokenIndices.push(display.length); // index of this token position in `display`\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di])) di++;\n if (di < data.length) {\n display += data[di];\n masked += data[di];\n used += data[di];\n if (slot.bound) segment += data[di];\n di++;\n lastFilled = masked.length;\n } else {\n display += slotChar;\n }\n }\n // Masked value = up to the last typed character (no trailing literals/slots).\n return { display, masked: masked.slice(0, lastFilled), data: used, tokenIndices };\n}\n\n/** Caret position for `n` typed data characters (literals skipped, end-of-text once all filled). */\nexport function caretForMask(tokenIndices: number[], n: number, length: number): number {\n if (n <= 0) return tokenIndices[0] ?? 0;\n if (n >= tokenIndices.length) return length; // all filled → end\n return tokenIndices[n]; // next input position (literals skipped)\n}\n\n/**\n * Auto-format-as-you-type variant of {@link applyMaskTemplate}: inserts a literal separator as\n * soon as the segment right before it is complete, without ever padding unfilled positions with\n * a filler character (unlike `applyMaskTemplate`, meant for a field that displays the full\n * template at rest). Used by `ui-datepicker`'s typeable trigger to auto-insert \"/\" as digits are\n * typed, the same way a card-expiry field auto-inserts its \"/\".\n */\nexport function autoFormatSegments(\n slots: MaskSlot[],\n data: string,\n { enforceBounds = true }: { enforceBounds?: boolean } = {},\n): { text: string; tokenIndices: number[]; dataEnd: number } {\n let di = 0;\n let text = '';\n let segment = '';\n let atSegmentEnd = false;\n const tokenIndices: number[] = [];\n // Position right after the last DATA character appended — unlike `text.length`, never lands\n // after a separator inserted eagerly (see the \"auto-insert\" doc above) with nothing typed past\n // it yet. Landing the caret there instead (see call sites) means a Backspace right after a\n // just-completed segment removes that segment's last digit, not the decorative separator —\n // which would otherwise be silently re-inserted next render, making Backspace look like it did\n // nothing (FSHSP-118).\n let dataEnd = 0;\n\n for (const slot of slots) {\n if (slot.char !== null) {\n // Append EVERY consecutive literal after a completed segment, not just the first — needed\n // for a multi-char separator like range's \" - \" (FSHSP-118). `atSegmentEnd` is left as-is\n // here; the next digit slot always resets it before it's read again.\n if (atSegmentEnd) text += slot.char;\n continue;\n }\n tokenIndices.push(text.length);\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di], enforceBounds)) di++;\n if (di >= data.length) break; // no more data: stop, no filler\n text += data[di];\n dataEnd = text.length;\n if (slot.bound) segment += data[di];\n atSegmentEnd = !!slot.bound && slot.bound.pos === slot.bound.len - 1;\n di++;\n }\n return { text, tokenIndices, dataEnd };\n}\n","/**\n * Shared option-resolution helpers for list-based form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`).\n *\n * Options can be primitives or objects; `optionValue` / `optionLabel` /\n * `optionDisabled` are (dot-path) fields read on object options, and `dataKey`\n * drives object equality. The accessors are passed as thunks so the resolver\n * stays reactive when bound to signal inputs.\n */\n\n/** Normalized option: resolved value/label/disabled + the original option. */\nexport interface OptionEntry {\n value: unknown;\n label: string;\n disabled: boolean;\n original: unknown;\n}\n\n/** Field accessors (typically the component's signal inputs). */\nexport interface OptionResolverFields {\n optionValue: () => string | undefined;\n optionLabel: () => string | undefined;\n optionDisabled: () => string | undefined;\n dataKey: () => string | undefined;\n}\n\nexport interface OptionResolver {\n /** Normalizes an option into an {@link OptionEntry}. */\n toEntry(option: unknown): OptionEntry;\n\n /** Reads a (dot-path) field from an object (`undefined` otherwise). */\n getField(target: unknown, path: string | undefined): unknown;\n\n /** Model value of an option (`optionValue` field, or the option itself). */\n resolveValue(option: unknown): unknown;\n\n /** Display label of an option (`optionLabel` field, `label` key, or text). */\n resolveLabel(option: unknown): string | null;\n\n /** Disabled flag of an option (`optionDisabled` field, or `disabled` key). */\n resolveDisabled(option: unknown): boolean;\n\n /** `String(value)`, or `null` for null/undefined. */\n asText(value: unknown): string | null;\n\n /** Value equality — by `dataKey` for objects, strict otherwise. */\n equals(a: unknown, b: unknown): boolean;\n}\n\nexport function createOptionResolver(fields: OptionResolverFields): OptionResolver {\n const isObject = (option: unknown): option is Record<string, unknown> =>\n typeof option === 'object' && option !== null;\n\n const getField = (target: unknown, path: string | undefined): unknown => {\n if (!path || !isObject(target)) return undefined;\n return path\n .split('.')\n .reduce<unknown>((acc, key) => (isObject(acc) ? acc[key] : undefined), target);\n };\n\n const asText = (value: unknown): string | null =>\n value === null || value === undefined ? null : String(value);\n\n const resolveValue = (option: unknown): unknown => {\n const field = fields.optionValue();\n if (field && isObject(option)) return getField(option, field);\n return option;\n };\n\n const resolveLabel = (option: unknown): string | null => {\n const field = fields.optionLabel();\n if (field && isObject(option)) return asText(getField(option, field));\n if (isObject(option) && 'label' in option) return asText(option['label']);\n return asText(option);\n };\n\n const resolveDisabled = (option: unknown): boolean => {\n const field = fields.optionDisabled();\n if (field && isObject(option)) return !!getField(option, field);\n if (isObject(option) && 'disabled' in option) return !!option['disabled'];\n return false;\n };\n\n const equals = (a: unknown, b: unknown): boolean => {\n const key = fields.dataKey();\n if (key && isObject(a) && isObject(b)) return a[key] === b[key];\n return a === b;\n };\n\n const toEntry = (option: unknown): OptionEntry => ({\n value: resolveValue(option),\n label: resolveLabel(option) ?? '',\n disabled: resolveDisabled(option),\n original: option,\n });\n\n return { toEntry, getField, resolveValue, resolveLabel, resolveDisabled, asText, equals };\n}\n","/**\n * Substitutes the `{0}` token of a (possibly user-overridden) label with a value.\n * Plain split/join — never interprets `$` sequences in `value` (unlike `String.replace`).\n */\nexport function formatLabel(template: string, value: string | number): string {\n return template.split('{0}').join(String(value));\n}\n","import { isDevMode } from '@angular/core';\n\n// Dev-only a11y guard shared by form controls that require an accessible name\n// (`ariaLabel`/`ariaLabelledBy`/`label`). Centralizes the \"how to warn\" (console + dev-mode\n// gating) so each component only supplies its own trigger condition and message text.\nexport function warnMissingAccessibleName(componentTag: string, message: string): void {\n if (isDevMode()) {\n console.warn(`[${componentTag}] ${message}`);\n }\n}\n","/*\n * Public API Surface of ui-kit/forms\n *\n * Shared form infrastructure: the base classes every `ui-*` field inherits\n * from, plus the helpers those fields rely on. Importing a field component\n * (e.g. `@4sh/ui-kit/forms/ui-input`) pulls this in automatically — you only import\n * from here directly when building your OWN field on top of the kit's\n * conventions.\n */\n\nexport * from './lib/base-control-value-accessor';\nexport * from './lib/base-form-field';\nexport * from './lib/overlay-positions';\nexport * from './lib/mask-engine';\nexport * from './lib/option-resolver';\nexport * from './lib/format-label';\nexport * from './lib/warn-missing-accessible-name';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAmBA;;;;;;;;;;;;;;;;;;;;;;AAsBG;MACmB,wBAAwB,CAAA;AAwB5C,IAAA,WAAA,GAAA;AAvBiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAEvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,IAAI;qFAAC;QACvB,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,KAAK;oFAAC;QACvB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,IAAI;sFAAC;;QAExB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,KAAK;2FAAC;;QAE9B,IAAA,CAAA,aAAa,GAAG,MAAM,CAA0B,IAAI;0FAAC;;QAErD,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,KAAK;4FAAC;;QAE/B,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;sFAAC;QAEpF,IAAA,CAAA,QAAQ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QAAA,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE;AACjC,QAAA,QAAQ,EAAE,eAAe,CAAC,MAAM,CAAC;AACjC,QAAA,QAAQ,EAAE,MAAM;AACjB,KAAA,CAAC;AAEF,IAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE;AAC3F;;ACjGA;;;AAGG;AACG,SAAU,WAAW,CAAC,QAAgB,EAAE,KAAsB,EAAA;AAClE,IAAA,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAClD;;ACJA;AACA;AACA;AACM,SAAU,yBAAyB,CAAC,YAAoB,EAAE,OAAe,EAAA;IAC7E,IAAI,SAAS,EAAE,EAAE;QACf,OAAO,CAAC,IAAI,CAAC,CAAA,CAAA,EAAI,YAAY,CAAA,EAAA,EAAK,OAAO,CAAA,CAAE,CAAC;IAC9C;AACF;;ACTA;;;;;;;;AAQG;;ACRH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms.mjs","sources":["../../../projects/ui-kit/forms/src/lib/base-control-value-accessor.ts","../../../projects/ui-kit/forms/src/lib/base-form-field.ts","../../../projects/ui-kit/forms/src/lib/overlay-positions.ts","../../../projects/ui-kit/forms/src/lib/mask-engine.ts","../../../projects/ui-kit/forms/src/lib/option-resolver.ts","../../../projects/ui-kit/forms/src/lib/format-label.ts","../../../projects/ui-kit/forms/src/lib/warn-missing-accessible-name.ts","../../../projects/ui-kit/forms/src/public-api.ts","../../../projects/ui-kit/forms/src/4sh-ui-kit-forms.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n inject,\n Injector,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ControlValueAccessor,\n NgControl,\n PristineChangeEvent,\n StatusChangeEvent,\n TouchedChangeEvent,\n ValidationErrors,\n} from '@angular/forms';\n\n/**\n * Base class for form components (`ui-checkbox`, `ui-radio`, `ui-input`…).\n *\n * Implements `ControlValueAccessor` and mirrors the attached `NgControl` state\n * into signals, so templates/styles can react to it declaratively:\n *\n * - `touched` / `dirty` / `pristine` / `untouched` — interaction state\n * - `controlInvalid` / `controlErrors` — validation state\n * - `controlDisabled` — driven by `control.disable()`\n * - `showError` — invalid AND (touched or dirty),\n * the usual \"when to paint red\" rule\n *\n * The subscription is wired automatically after first render and cleaned up on\n * destroy. Subclasses only have to:\n * 1. implement `writeValue()` (form → view),\n * 2. call `emitChange(value)` on user interaction (view → form),\n * 3. call `emitTouch()` on blur,\n * 4. declare the DI provider:\n * `{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyComponent), multi: true }`.\n *\n * Works with reactive forms, template-driven forms, or standalone (no form at\n * all — the signals simply keep their defaults).\n */\nexport abstract class BaseControlValueAccessor<T> implements ControlValueAccessor {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly dirty = signal(false);\n readonly pristine = signal(true);\n readonly touched = signal(false);\n readonly untouched = signal(true);\n /** Validation state of the attached control (false when no control). */\n readonly controlInvalid = signal(false);\n /** Validation errors of the attached control (null when valid / no control). */\n readonly controlErrors = signal<ValidationErrors | null>(null);\n /** Disabled state driven by the forms API (`control.disable()`), not by the `disabled` input. */\n readonly controlDisabled = signal(false);\n /** True when the error state should be surfaced to the user. */\n readonly showError = computed(() => this.controlInvalid() && (this.touched() || this.dirty()));\n\n protected onChange: (value: T) => void = () => {\n /* noop until registered */\n };\n protected onTouched: () => void = () => {\n /* noop until registered */\n };\n\n constructor() {\n // NgControl injects lazily (after the directive tree is built) to avoid\n // the classic NgControl ↔ value-accessor circular dependency.\n afterNextRender(() => this.watchNgControlEvents());\n }\n\n /** Write the form value into the component state (form → view). */\n abstract writeValue(value: T): void;\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.controlDisabled.set(isDisabled);\n }\n\n /** Propagate a user-driven value change to the form (view → form). */\n protected emitChange(value: T): void {\n this.onChange(value);\n }\n\n /** Mark the control as touched (call on blur). */\n protected emitTouch(): void {\n this.onTouched();\n this.touched.set(true);\n this.untouched.set(false);\n }\n\n /** Mirror the NgControl state into the signals. Wired automatically; safe to call once manually if needed. */\n protected watchNgControlEvents(): void {\n const control = this.injector.get(NgControl, null, { optional: true, self: true })?.control;\n if (!control) return;\n\n const mirror = () => {\n this.pristine.set(control.pristine);\n this.dirty.set(control.dirty);\n this.touched.set(control.touched);\n this.untouched.set(control.untouched);\n this.controlInvalid.set(control.invalid);\n this.controlErrors.set(control.errors);\n };\n\n // Signal-forms interop provides a fake NgControl without an `events`\n // stream, but its getters read the field's signals: mirroring inside\n // an effect tracks them and keeps the state live.\n if (!control.events) {\n effect(mirror, { injector: this.injector });\n return;\n }\n\n // Seed with the current state (events only fire on transitions).\n mirror();\n\n control.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {\n if (event instanceof PristineChangeEvent) {\n this.pristine.set(event.pristine);\n this.dirty.set(!event.pristine);\n } else if (event instanceof TouchedChangeEvent) {\n this.touched.set(event.touched);\n this.untouched.set(!event.touched);\n } else if (event instanceof StatusChangeEvent) {\n this.controlInvalid.set(event.status === 'INVALID');\n this.controlErrors.set(control.errors);\n }\n });\n }\n}\n","import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { BaseControlValueAccessor } from './base-control-value-accessor';\nimport { UiFeedbackLevel } from '@4sh/ui-kit/types';\n\nexport type FieldSize = 'default' | 'small';\n/** Visual validation status (subset of `UiFeedbackLevel`, shared with `ui-helper`). */\nexport type FieldLevel = Extract<UiFeedbackLevel, 'default' | 'success' | 'error'>;\n/**\n * Placement of the floating label (\"float label\" mode):\n * - `over`: rises above the box, where a classic label sits,\n * - `in`: rises to a band reserved at the top **inside** the box,\n * - `on`: rises **onto** the top border, notching it.\n */\nexport type FieldFloatLabel = 'over' | 'in' | 'on';\n\nlet nextUid = 0;\n\n/**\n * Base class for every standalone form control (`ui-checkbox`, `ui-toggle`,\n * `ui-slider`, `ui-nudger`…): the CVA plumbing shared by all of them, without\n * any \"box\" chrome (no label/helper/error message rendering).\n *\n * Provides the common inputs (aria*, id/name, required/disabled/readonly/\n * invalid, tabindex), the auto-generated id machinery (`resolvedId`,\n * `messageId`), the `modelValue` signal with the default `writeValue`, and the\n * derived `isDisabled` / `isInvalid` states. Extends `BaseControlValueAccessor`:\n * subclasses call `emitChange` / `emitTouch` on user interaction.\n *\n * Decorated with `@Directive()` (no selector) so the signal inputs are inherited\n * correctly by the concrete components.\n */\n@Directive()\nexport abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {\n /** Accessible name when no visible label is provided. */\n ariaLabel = input<string>();\n /** id of an external element that labels this control. */\n ariaLabelledBy = input<string>();\n /** id forwarded to the native input (auto-generated when omitted). */\n inputId = input<string>();\n /** name forwarded to the native input. */\n name = input<string>();\n /** Required marker (*) + native required attribute. */\n required = input(false, { transform: booleanAttribute });\n /** Disables the field (native attribute). */\n disabled = input(false, { transform: booleanAttribute });\n /** Read-only (native attribute). */\n readonly = input(false, { transform: booleanAttribute });\n /** Forces the error styling (automatic when the attached control is invalid and touched/dirty). */\n invalid = input(false, { transform: booleanAttribute });\n /** tabindex forwarded to the native input. */\n tabindex = input<number>();\n\n /** @ignore Auto-generated unique id (prefix branded via `uidPrefix`). */\n protected readonly uid = `${this.uidPrefix()}-${nextUid++}`;\n /** @ignore Current value (written by the form or by user input). */\n protected readonly modelValue = signal<T | undefined>(undefined);\n\n /** @ignore */\n protected readonly resolvedId = computed(() => this.inputId() ?? this.uid);\n /** @ignore id of the message (for aria-describedby). */\n protected readonly messageId = computed(() => `${this.resolvedId()}-message`);\n /** @ignore Input disabled OR control disabled (form API). */\n protected readonly isDisabled = computed(() => this.disabled() || this.controlDisabled());\n /** @ignore Explicit error OR invalid control worth surfacing. */\n protected readonly isInvalid = computed(() => this.invalid() || this.showError());\n\n writeValue(value: T): void {\n this.modelValue.set(value);\n }\n\n /** @ignore Prefix of the auto-generated id — override to brand it per component. */\n protected uidPrefix(): string {\n return 'ui-field';\n }\n}\n\n/**\n * Base class for \"box\" form fields (`ui-input`, `ui-input-number`,\n * `ui-input-mask`, `ui-textarea`…).\n *\n * Extends `BaseFieldControl` with the box-specific inputs (label, helper,\n * error, size, level) and the derived state (effective level, displayed\n * message/value). Subclasses only handle their own `<input>` (specific\n * parsing/formatting) and call `emitChange` / `emitTouch`.\n */\n@Directive()\nexport abstract class BaseFormField<T> extends BaseFieldControl<T> {\n /** Label (rendered via `ui-label`). */\n label = input<string>();\n /** Helper text under the field (rendered via `ui-helper`). */\n helperText = input<string>();\n /** Error message shown in place of the helper when the field is in error. */\n errorText = input<string>();\n /** Prefixes the message under the field (helper or error) with a decorative icon. */\n showMessageIcon = input(false, { transform: booleanAttribute });\n /** Overrides the glyph shown by `showMessageIcon`. */\n messageIcon = input<string>();\n /** Size. */\n size = input<FieldSize>('default');\n /** Explicit validation status (`error` is forced when the control is invalid + touched). */\n level = input<FieldLevel>('default');\n /**\n * Floating label placement. Unset = classic label above the box.\n *\n * The label then plays the placeholder role while at rest, so the native\n * `placeholder` is neutralised (see `hasFloatLabel`).\n */\n floatLabel = input<FieldFloatLabel>();\n\n /** @ignore There is a label to float: a `floatLabel` alone has nothing to move. */\n protected readonly hasFloatLabel = computed(() => !!this.floatLabel() && !!this.label());\n\n /** @ignore Effective level: error when invalid, otherwise the requested `level`. */\n protected readonly effectiveLevel = computed<FieldLevel>(() =>\n this.isInvalid() ? 'error' : this.level(),\n );\n /** @ignore Displayed message: errorText when in error (if provided), otherwise helperText. */\n protected readonly displayMessage = computed(() =>\n this.isInvalid() && this.errorText() ? this.errorText() : this.helperText(),\n );\n /** @ignore Value shown in the input (string). Override for specific formatting. */\n protected readonly displayValue = computed(() => {\n const v = this.modelValue();\n return v === undefined || v === null ? '' : String(v);\n });\n}\n","import { ConnectedPosition } from '@angular/cdk/overlay';\n\n/**\n * Standard dropdown-panel anchoring shared by the overlay form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`, `ui-datepicker`):\n * below the field, flipped above when `autoFlip`, flipped horizontally\n * (right-aligned) whenever there isn't enough room on the right.\n */\nexport function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[] {\n const belowStart: ConnectedPosition = {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: 8,\n };\n const belowEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: 8,\n };\n const aboveStart: ConnectedPosition = {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -8,\n };\n const aboveEnd: ConnectedPosition = {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -8,\n };\n return autoFlip ? [belowStart, belowEnd, aboveStart, aboveEnd] : [belowStart, belowEnd];\n}\n","/**\n * Pure masking engine shared by `ui-input-mask` and `ui-datepicker` (auto-formatting the typed\n * date). Same precedent as `overlay-positions.ts` in this folder: framework-free functions, no\n * class/Directive/Component, reusable by any form component that needs literal-inserting input\n * masking. Extracted from `ui-input-mask.ts` — behavior is a byte-for-byte copy, only `this.mask()`\n * /`this.ranges()`/`this.slotChar()` become explicit parameters.\n */\n\n/** Mask tokens → accepted character class. */\nexport const MASK_TOKENS: Record<string, RegExp> = {\n '9': /[0-9]/, // digit\n a: /[a-zA-Z]/, // letter\n '*': /[a-zA-Z0-9]/, // alphanumeric\n};\n\nexport interface MaskBounds {\n min: number;\n max: number;\n}\n\nexport interface MaskSlot {\n char: string | null;\n rgx?: RegExp;\n bound?: MaskBounds & { pos: number; len: number };\n}\n\nexport interface MaskBuildResult {\n display: string;\n masked: string;\n data: string;\n tokenIndices: number[];\n}\n\n/** Parse the `ranges` input (`\"1-31 1-12 1900-2100\"`) into one bound per numeric segment. */\nexport function parseMaskRanges(ranges: string): (MaskBounds | null)[] {\n return ranges\n .trim()\n .split(/\\s+/)\n .map((part) => {\n const m = /^(\\d+)-(\\d+)$/.exec(part);\n return m ? { min: Number(m[1]), max: Number(m[2]) } : null;\n });\n}\n\n/**\n * Resolve the mask template into slots: literals, input slots, and the `ranges` bounds attached\n * to every slot of the numeric segment (consecutive `9` tokens) it belongs to.\n */\nexport function buildMaskSlots(\n mask: string,\n bounds: (MaskBounds | null)[],\n tokens: Record<string, RegExp> = MASK_TOKENS,\n): MaskSlot[] {\n const slots: MaskSlot[] = [];\n const segments: MaskSlot[][] = [];\n let segment: MaskSlot[] | null = null;\n\n for (const m of mask) {\n const rgx = tokens[m];\n const slot: MaskSlot = rgx ? { char: null, rgx } : { char: m };\n slots.push(slot);\n if (rgx && m === '9') {\n if (!segment) segments.push((segment = []));\n segment.push(slot);\n } else {\n segment = null;\n }\n }\n\n // Every segment gets a `.bound`, even unranged ones (±Infinity = no-op range): `pos`/`len` are\n // needed for `atSegmentEnd` regardless, else an unranged segment (e.g. ui-datepicker's year)\n // never auto-inserts its own following literal (FSHSP-118).\n segments.forEach((seg, i) => {\n const range = bounds[i] ?? { min: -Infinity, max: Infinity };\n seg.forEach((slot, pos) => (slot.bound = { ...range, pos, len: seg.length }));\n });\n\n return slots;\n}\n\n/** Keep only the data characters (alphanumeric) of a raw input string. */\nexport function extractMaskData(raw: string): string {\n return raw.replace(/[^a-zA-Z0-9]/g, '');\n}\n\n/**\n * Can `ch` fill this slot? It must match the token class and — when the segment is bounded\n * AND `enforceBounds` — the digits typed so far plus `ch` must still admit at least one in-range\n * completion of the remaining positions (`2` then `4` is refused on `0-23`, `2` then `3` is\n * accepted).\n *\n * `enforceBounds = false` skips that second check (still requires the token class to match):\n * meant for re-deriving the mask after characters were REMOVED, not typed. The bounds check\n * exists to reject an invalid *new* leading digit while typing forward (e.g. `8` can never start\n * a valid `1-31` day, so it's skipped rather than accepted) — applied instead to the digits left\n * over after a deletion, that same skip can discard a still-valid residual digit and misalign\n * every segment after it. See `autoFormatSegments`.\n */\nexport function acceptsMaskChar(\n slot: MaskSlot,\n segment: string,\n ch: string,\n enforceBounds = true,\n): boolean {\n if (!slot.rgx?.test(ch)) return false;\n const bound = slot.bound;\n if (!enforceBounds || !bound) return true;\n const scale = 10 ** (bound.len - bound.pos - 1);\n const low = Number(segment + ch) * scale;\n return low <= bound.max && low + scale - 1 >= bound.min;\n}\n\n/** Apply the mask template to a sequence of data characters (fills empty positions with `slotChar`). */\nexport function applyMaskTemplate(\n slots: MaskSlot[],\n data: string,\n slotChar: string,\n): MaskBuildResult {\n let di = 0;\n let display = '';\n let masked = '';\n let lastFilled = 0;\n let used = '';\n const tokenIndices: number[] = [];\n // Characters already accepted in the current numeric segment (drives the bounds check).\n let segment = '';\n\n for (const slot of slots) {\n if (slot.char !== null) {\n display += slot.char;\n masked += slot.char;\n continue;\n }\n tokenIndices.push(display.length); // index of this token position in `display`\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di])) di++;\n if (di < data.length) {\n display += data[di];\n masked += data[di];\n used += data[di];\n if (slot.bound) segment += data[di];\n di++;\n lastFilled = masked.length;\n } else {\n display += slotChar;\n }\n }\n // Masked value = up to the last typed character (no trailing literals/slots).\n return { display, masked: masked.slice(0, lastFilled), data: used, tokenIndices };\n}\n\n/** Caret position for `n` typed data characters (literals skipped, end-of-text once all filled). */\nexport function caretForMask(tokenIndices: number[], n: number, length: number): number {\n if (n <= 0) return tokenIndices[0] ?? 0;\n if (n >= tokenIndices.length) return length; // all filled → end\n return tokenIndices[n]; // next input position (literals skipped)\n}\n\n/**\n * Auto-format-as-you-type variant of {@link applyMaskTemplate}: inserts a literal separator as\n * soon as the segment right before it is complete, without ever padding unfilled positions with\n * a filler character (unlike `applyMaskTemplate`, meant for a field that displays the full\n * template at rest). Used by `ui-datepicker`'s typeable trigger to auto-insert \"/\" as digits are\n * typed, the same way a card-expiry field auto-inserts its \"/\".\n */\nexport function autoFormatSegments(\n slots: MaskSlot[],\n data: string,\n { enforceBounds = true }: { enforceBounds?: boolean } = {},\n): { text: string; tokenIndices: number[]; dataEnd: number } {\n let di = 0;\n let text = '';\n let segment = '';\n let atSegmentEnd = false;\n const tokenIndices: number[] = [];\n // Position right after the last DATA character appended — unlike `text.length`, never lands\n // after a separator inserted eagerly (see the \"auto-insert\" doc above) with nothing typed past\n // it yet. Landing the caret there instead (see call sites) means a Backspace right after a\n // just-completed segment removes that segment's last digit, not the decorative separator —\n // which would otherwise be silently re-inserted next render, making Backspace look like it did\n // nothing (FSHSP-118).\n let dataEnd = 0;\n\n for (const slot of slots) {\n if (slot.char !== null) {\n // Append EVERY consecutive literal after a completed segment, not just the first — needed\n // for a multi-char separator like range's \" - \" (FSHSP-118). `atSegmentEnd` is left as-is\n // here; the next digit slot always resets it before it's read again.\n if (atSegmentEnd) text += slot.char;\n continue;\n }\n tokenIndices.push(text.length);\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di], enforceBounds)) di++;\n if (di >= data.length) break; // no more data: stop, no filler\n text += data[di];\n dataEnd = text.length;\n if (slot.bound) segment += data[di];\n atSegmentEnd = !!slot.bound && slot.bound.pos === slot.bound.len - 1;\n di++;\n }\n return { text, tokenIndices, dataEnd };\n}\n","/**\n * Shared option-resolution helpers for list-based form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`).\n *\n * Options can be primitives or objects; `optionValue` / `optionLabel` /\n * `optionDisabled` are (dot-path) fields read on object options, and `dataKey`\n * drives object equality. The accessors are passed as thunks so the resolver\n * stays reactive when bound to signal inputs.\n */\n\n/** Normalized option: resolved value/label/disabled + the original option. */\nexport interface OptionEntry {\n value: unknown;\n label: string;\n disabled: boolean;\n original: unknown;\n}\n\n/** Field accessors (typically the component's signal inputs). */\nexport interface OptionResolverFields {\n optionValue: () => string | undefined;\n optionLabel: () => string | undefined;\n optionDisabled: () => string | undefined;\n dataKey: () => string | undefined;\n}\n\nexport interface OptionResolver {\n /** Normalizes an option into an {@link OptionEntry}. */\n toEntry(option: unknown): OptionEntry;\n\n /** Reads a (dot-path) field from an object (`undefined` otherwise). */\n getField(target: unknown, path: string | undefined): unknown;\n\n /** Model value of an option (`optionValue` field, or the option itself). */\n resolveValue(option: unknown): unknown;\n\n /** Display label of an option (`optionLabel` field, `label` key, or text). */\n resolveLabel(option: unknown): string | null;\n\n /** Disabled flag of an option (`optionDisabled` field, or `disabled` key). */\n resolveDisabled(option: unknown): boolean;\n\n /** `String(value)`, or `null` for null/undefined. */\n asText(value: unknown): string | null;\n\n /** Value equality — by `dataKey` for objects, strict otherwise. */\n equals(a: unknown, b: unknown): boolean;\n}\n\nexport function createOptionResolver(fields: OptionResolverFields): OptionResolver {\n const isObject = (option: unknown): option is Record<string, unknown> =>\n typeof option === 'object' && option !== null;\n\n const getField = (target: unknown, path: string | undefined): unknown => {\n if (!path || !isObject(target)) return undefined;\n return path\n .split('.')\n .reduce<unknown>((acc, key) => (isObject(acc) ? acc[key] : undefined), target);\n };\n\n const asText = (value: unknown): string | null =>\n value === null || value === undefined ? null : String(value);\n\n const resolveValue = (option: unknown): unknown => {\n const field = fields.optionValue();\n if (field && isObject(option)) return getField(option, field);\n return option;\n };\n\n const resolveLabel = (option: unknown): string | null => {\n const field = fields.optionLabel();\n if (field && isObject(option)) return asText(getField(option, field));\n if (isObject(option) && 'label' in option) return asText(option['label']);\n return asText(option);\n };\n\n const resolveDisabled = (option: unknown): boolean => {\n const field = fields.optionDisabled();\n if (field && isObject(option)) return !!getField(option, field);\n if (isObject(option) && 'disabled' in option) return !!option['disabled'];\n return false;\n };\n\n const equals = (a: unknown, b: unknown): boolean => {\n const key = fields.dataKey();\n if (key && isObject(a) && isObject(b)) return a[key] === b[key];\n return a === b;\n };\n\n const toEntry = (option: unknown): OptionEntry => ({\n value: resolveValue(option),\n label: resolveLabel(option) ?? '',\n disabled: resolveDisabled(option),\n original: option,\n });\n\n return { toEntry, getField, resolveValue, resolveLabel, resolveDisabled, asText, equals };\n}\n","/**\n * Substitutes the `{0}` token of a (possibly user-overridden) label with a value.\n * Plain split/join — never interprets `$` sequences in `value` (unlike `String.replace`).\n */\nexport function formatLabel(template: string, value: string | number): string {\n return template.split('{0}').join(String(value));\n}\n","import { isDevMode } from '@angular/core';\n\n// Dev-only a11y guard shared by form controls that require an accessible name\n// (`ariaLabel`/`ariaLabelledBy`/`label`). Centralizes the \"how to warn\" (console + dev-mode\n// gating) so each component only supplies its own trigger condition and message text.\nexport function warnMissingAccessibleName(componentTag: string, message: string): void {\n if (isDevMode()) {\n console.warn(`[${componentTag}] ${message}`);\n }\n}\n","/*\n * Public API Surface of ui-kit/forms\n *\n * Shared form infrastructure: the base classes every `ui-*` field inherits\n * from, plus the helpers those fields rely on. Importing a field component\n * (e.g. `@4sh/ui-kit/forms/ui-input`) pulls this in automatically — you only import\n * from here directly when building your OWN field on top of the kit's\n * conventions.\n */\n\nexport * from './lib/base-control-value-accessor';\nexport * from './lib/base-form-field';\nexport * from './lib/overlay-positions';\nexport * from './lib/mask-engine';\nexport * from './lib/option-resolver';\nexport * from './lib/format-label';\nexport * from './lib/warn-missing-accessible-name';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAmBA;;;;;;;;;;;;;;;;;;;;;;AAsBG;MACmB,wBAAwB,CAAA;AAwB5C,IAAA,WAAA,GAAA;AAvBiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAEvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,IAAI;qFAAC;QAC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