@4sh/ui-kit 0.16.0 → 0.17.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 +10 -10
- package/README.md +10 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +299 -2
- package/mcp/data/text-search-docs.json +149 -9
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +275 -194
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-actions-ui-speed-dial.mjs","sources":["../../../projects/ui-kit/actions/ui-speed-dial/src/lib/ui-speed-dial.ts","../../../projects/ui-kit/actions/ui-speed-dial/src/lib/ui-speed-dial.html","../../../projects/ui-kit/actions/ui-speed-dial/src/public-api.ts","../../../projects/ui-kit/actions/ui-speed-dial/src/4sh-ui-kit-actions-ui-speed-dial.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { DOCUMENT, NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { UiLevel } from '@4sh/ui-kit/types';\nimport {\n ButtonNativeProps,\n ButtonSize,\n ButtonVariant,\n UiButton,\n} from '@4sh/ui-kit/actions/ui-button';\nimport { UiMenuItem } from '@4sh/ui-kit/navigation/ui-menu';\nimport { UiTooltip, TooltipPosition } from '@4sh/ui-kit/informative/ui-tooltip';\nimport { closeOnNavigation } from '@4sh/ui-kit/overlay';\nimport { UiMotion, UiMotionPreset } from '@4sh/ui-kit/motion';\n\n/**\n * Axis the actions fan out along.\n *\n * `linear`/`semi-circle` read the four cardinal values; `quarter-circle`\n * reads the four corners — a cardinal value falls back to `'up-right'` there\n * (see `arcSpan`).\n */\nexport type SpeedDialDirection =\n 'up' | 'down' | 'left' | 'right' | 'up-left' | 'up-right' | 'down-left' | 'down-right';\n\n/**\n * `linear` stacks the actions along `direction`. The other three arrange them\n * on an arc around the trigger (`radius`): `circle` the full ring,\n * `semi-circle` a 180° half centred on `direction`, `quarter-circle` a 90°\n * quadrant in the `direction` corner.\n */\nexport type SpeedDialType = 'linear' | 'circle' | 'semi-circle' | 'quarter-circle';\n\n/**\n * One action revealed by the dial — the leaf subset of {@link UiMenuItem}\n * `ui-button` can actually render (no groups/separators, and no\n * `queryParams`/`routerLinkActiveExact`: `ui-button`'s link mode does not\n * carry them).\n */\nexport type UiSpeedDialItem = Pick<\n UiMenuItem,\n 'id' | 'label' | 'icon' | 'command' | 'disabled' | 'routerLink' | 'url' | 'target' | 'ariaLabel'\n>;\n\n/** Payload of `itemClick` / an item's own `command`. */\nexport interface UiSpeedDialItemClickEvent {\n originalEvent: Event;\n item: UiSpeedDialItem;\n}\n\n/** @ignore Render node: item + its stable key + its index among enabled actions. */\ninterface UiSpeedDialNode {\n item: UiSpeedDialItem;\n key: string;\n index: number;\n}\n\n/** Process-wide unique id source (aria wiring). */\nlet nextUid = 0;\n\n/** @ignore Rounds away floating point noise CSS `calc()` cannot parse (see `arcTransform`). */\nfunction round(value: number): number {\n return Math.round(value * 1e6) / 1e6;\n}\n\n/**\n * @ignore Angular span an arc-type dial occupies, in degrees clockwise from\n * top (0° = up, 90° = right, 180° = down, 270° = left — the same convention\n * `arcTransform` reads it back with).\n *\n * `circle` ignores `direction`: a full ring has no \"side\". `semi-circle`\n * centres its 180° half on `direction`. `quarter-circle` fills the 90°\n * quadrant named by `direction`'s corner, defaulting to `up-right` for a\n * cardinal value (`quarter-circle` has no \"up\" of its own — only corners).\n */\nfunction arcSpan(\n type: Exclude<SpeedDialType, 'linear'>,\n direction: SpeedDialDirection,\n): { start: number; span: number } {\n if (type === 'circle') return { start: 0, span: 360 };\n if (type === 'semi-circle') {\n const center = { up: 0, right: 90, down: 180, left: 270 }[direction as string] ?? 0;\n return { start: center - 90, span: 180 };\n }\n const start =\n { 'up-right': 0, 'down-right': 90, 'down-left': 180, 'up-left': 270 }[direction as string] ?? 0;\n return { start, span: 90 };\n}\n\n/**\n * ui-speed-dial — a floating trigger button that fans a set of actions out\n * around itself.\n *\n * Driven by a declarative `items` list ({@link UiSpeedDialItem}: `command` /\n * `routerLink` / `url`, `icon`, `disabled`) — the same leaf shape as\n * {@link UiMenuItem}, so a menu's entries can feed a dial without reshaping\n * them. Four layouts ({@link SpeedDialType}): `linear` (stacks along\n * `direction`), `circle` (full ring), `semi-circle` and `quarter-circle`\n * (partial arcs centred/cornered on `direction`) — `radius` sizes the three\n * arc layouts.\n *\n * Open state is the two-way `visible` model. The action list mounts only\n * while open (`@if`) — closed actions are neither rendered nor reachable by\n * keyboard, so no `aria-hidden`/`inert` bookkeeping is needed. Escape closes\n * and returns focus to the trigger; `hideOnClickOutside` dismisses on an\n * outside click. The actions form **one tab stop** (roving tabindex, same\n * pattern as `ui-menu` / `ui-editor`'s toolbar): arrow keys move between\n * them, `Home`/`End` jump to the ends, disabled entries are skipped.\n *\n * The trigger and every action are `ui-button` instances (`rounded\n * iconOnly`) — colors come from the `actions.*` tokens, nothing is drawn by\n * hand. `mask` dims the page behind the open dial (`--primitives-black-50`,\n * the same token as `ui-modal`'s scrim).\n *\n * Positioning is left to the caller: the component does not assume a fixed\n * corner. Wrap it in a `position: fixed` host (see the MDX \"Bouton flottant\"\n * recipe) to reproduce the classic floating-action-button placement.\n */\n@Component({\n selector: 'ui-speed-dial',\n imports: [UiButton, NgTemplateOutlet, RouterLink, UiTooltip, UiMotion],\n templateUrl: './ui-speed-dial.html',\n styleUrl: './ui-speed-dial.scss',\n})\nexport class UiSpeedDial {\n /** Actions revealed by the dial (see {@link UiSpeedDialItem}). */\n items = input.required<UiSpeedDialItem[]>();\n /** Open state (two-way). */\n visible = model(false);\n\n /** Layout: `linear` (stacked), `circle` (ring), `semi-circle` or `quarter-circle` (arc). */\n type = input<SpeedDialType>('linear');\n /**\n * Axis the actions fan along. `linear`/`semi-circle` read the four\n * cardinal values; `quarter-circle` reads the four corners. Unused by\n * `circle`, which always goes full ring.\n */\n direction = input<SpeedDialDirection>('up');\n /** Ring/arc radius in px — every type but `linear`. Falls back to a size-derived default. */\n radius = input<number>();\n\n /** Semantic level of the trigger. */\n level = input<UiLevel>('high');\n /**\n * Semantic level of the actions. Defaults to `low`, deliberately different\n * from the trigger's own `level`: a `high`-styled action would read as a\n * second primary button rather than a revealed option.\n */\n itemLevel = input<UiLevel>('low');\n /** Apparence of the trigger and the actions. */\n variant = input<ButtonVariant>('filled');\n /** Size of the trigger and the actions. */\n size = input<ButtonSize>('default');\n\n /** Icon of the trigger while closed. */\n showIcon = input<string>('plus');\n /**\n * Icon of the trigger while open. Left unset, `showIcon` rotates 45° in\n * place instead of being swapped for a second icon.\n */\n hideIcon = input<string>();\n /** Animates the trigger icon's rotation (`hideIcon` unset only). */\n rotateAnimation = input(true, { transform: booleanAttribute });\n\n /** Dims the page behind the dial while open. */\n mask = input(false, { transform: booleanAttribute });\n /** Closes the dial on an outside click. */\n hideOnClickOutside = input(true, { transform: booleanAttribute });\n /** Disables the trigger and every action. */\n disabled = input(false, { transform: booleanAttribute });\n\n /** Shows each action's label as a tooltip (icon-only actions). */\n showTooltips = input(false, { transform: booleanAttribute });\n /** Animates the trigger and the actions (reduced-motion always wins). */\n motion = input(true, { transform: booleanAttribute });\n\n /** Accessible name of the trigger. */\n ariaLabel = input<string>();\n /** id of an external element naming the trigger. */\n ariaLabelledBy = input<string>();\n /** Native tabindex of the trigger. */\n tabindex = input<number>(0, { transform: numberAttribute });\n\n /** Fired when the trigger is clicked (never when disabled). */\n triggerClick = output<MouseEvent>();\n /** Fired when the dial opens. */\n opened = output<void>();\n /** Fired when the dial closes. */\n closed = output<void>();\n /** Fired when an action is activated (click / keyboard), never when disabled. */\n itemClick = output<UiSpeedDialItemClickEvent>();\n\n /** @ignore */\n private readonly document = inject(DOCUMENT);\n /** @ignore Host element — outside-click detection. */\n private readonly hostEl = inject(ElementRef<HTMLElement>);\n /** @ignore Trigger button (programmatic focus). */\n private readonly triggerEl = viewChild<UiButton>('trigger');\n /** @ignore Rendered action buttons, in DOM order — the roving tabindex ring.\n * Matched by their own `#actionBtn` ref so the trigger (`#trigger`) is excluded. */\n private readonly actionEls = viewChildren<UiButton>('actionBtn');\n\n /** Unique id of the actions list (wired to the trigger's `aria-controls`). */\n readonly uid = `ui-speed-dial-${nextUid++}`;\n /** @ignore Key of the action currently holding the roving tab stop. */\n protected readonly focusedKey = signal<string | null>(null);\n\n constructor() {\n // A dial declared in an app shell (header, sidebar) outlives the routed\n // view: close it rather than leaving it open over the next page.\n //\n // Deferred one frame (`afterNextRender`, not the constructor directly): a\n // dial that starts open (`[visible]=\"true\"`, e.g. this very Storybook\n // canvas) races the router's OWN initial navigation — that first\n // `NavigationStart` can still fire after this component exists but\n // before `router.url` has settled, which `closeOnNavigation` would then\n // read as \"the page changed\" and close a dial that never got a chance to\n // be seen open. One frame is enough for that bootstrap navigation to\n // resolve, and `closeOnNavigation`'s own job (dismiss on a LATER, real\n // navigation) is not time-critical to wire up before then.\n afterNextRender(() => closeOnNavigation(() => this.hide()));\n\n // Outside-click dismissal: attached only while open, torn down on close —\n // a document-wide listener has no reason to exist while nothing is open.\n effect((onCleanup) => {\n if (!this.visible()) return;\n const handler = (event: PointerEvent) => this.onDocumentPointerdown(event);\n this.document.addEventListener('pointerdown', handler, true);\n onCleanup(() => this.document.removeEventListener('pointerdown', handler, true));\n });\n }\n\n /** @ignore Enabled actions, keyed for the roving tabindex + trigonometry. */\n protected readonly nodes = computed<UiSpeedDialNode[]>(() =>\n this.items().map((item, index) => ({ item, key: item.id ?? `${this.uid}_${index}`, index })),\n );\n\n /** @ignore Keys of the enabled entries, in order (roving focus path). */\n private readonly focusableKeys = computed<string[]>(() =>\n this.nodes()\n .filter((n) => !n.item.disabled)\n .map((n) => n.key),\n );\n\n /** @ignore Node owning the tab stop: last focused, else the first enabled one. */\n protected readonly tabStopKey = computed<string | null>(() => {\n const keys = this.focusableKeys();\n const focused = this.focusedKey();\n return focused && keys.includes(focused) ? focused : (keys[0] ?? null);\n });\n\n /**\n * @ignore Explicit ring radius, in px — set as the `--_radius` override.\n * Left unset (`null`, no inline style), the SCSS default takes over.\n */\n protected readonly radiusOverride = computed(() => {\n const r = this.radius();\n return r != null ? `${r}px` : null;\n });\n\n /**\n * @ignore Per-item position on an arc (`circle`/`semi-circle`/\n * `quarter-circle`): self-centred on the trigger, `--_radius` out at its\n * angular slot (see `radiusOverride` for the explicit/default split).\n *\n * `circle` steps evenly around the FULL span (`span / total`, wrapping);\n * the other two divide by `total - 1` so the first and last actions land\n * exactly on the arc's own ends, not short of them.\n */\n protected readonly arcTransform = computed(() => {\n const type = this.type();\n const total = this.nodes().length;\n if (type === 'linear' || !total) return () => null;\n const { start, span } = arcSpan(type, this.direction());\n const step = type === 'circle' ? span / total : span / Math.max(total - 1, 1);\n return (index: number) => {\n const angle = ((start + step * index) * Math.PI) / 180;\n // Floating point noise (e.g. sin(π) ≈ 1.2e-16) prints as exponential\n // notation, which CSS `calc()` cannot parse — round it away.\n const x = round(Math.sin(angle));\n const y = round(-Math.cos(angle));\n return `translate(-50%, -50%) translate(calc(${x} * var(--_radius)), calc(${y} * var(--_radius)))`;\n };\n });\n\n /**\n * @ignore Enter/leave preset.\n *\n * Arc items (`circle`/`semi-circle`/`quarter-circle`) already carry their\n * own `[style.transform]` (angular position, `arcTransform`) —\n * `zoom`/`slide-*` animate `transform` too, and a CSS animation on a\n * property wins over an inline style for it, wiping the position out for\n * the animation's duration. `fade` (opacity only) is the one preset that\n * cannot collide with it.\n *\n * `linear` items carry no such transform, so they get the more expressive\n * `slide-${direction}` — \"enter moving toward `direction`\".\n */\n protected readonly itemMotionPreset = computed<UiMotionPreset>(() => {\n if (this.type() !== 'linear') return 'fade';\n // `linear` only means a cardinal direction; a corner value (meant for\n // `quarter-circle`) has no matching slide preset — fall back to 'up'.\n const d = this.direction();\n return (\n d === 'up' || d === 'down' || d === 'left' || d === 'right' ? `slide-${d}` : 'slide-up'\n ) as UiMotionPreset;\n });\n\n /** @ignore Trigger icon while open: `hideIcon`, or `showIcon` rotated in place. */\n protected readonly triggerIcon = computed(() => this.hideIcon() ?? this.showIcon());\n /** @ignore The trigger icon rotates only when there is no dedicated `hideIcon`. */\n protected readonly triggerIconRotates = computed(\n () => this.visible() && !this.hideIcon() && this.rotateAnimation(),\n );\n\n /** @ignore Tooltip side: opposite the fan-out direction, so it never overlaps an action. */\n protected readonly tooltipPosition = computed<TooltipPosition>(() => {\n if (this.type() !== 'linear') return 'top';\n const d = this.direction();\n if (d === 'up') return 'right';\n if (d === 'down') return 'right';\n if (d === 'left') return 'top';\n return 'top';\n });\n\n /**\n * @ignore Attributes forwarded onto the trigger's real `<button>`/`<a>`\n * (`ui-button`'s `#host`, not the `<ui-speed-dial>` wrapper): `role`,\n * `ariaLabel` and `tabindex` already have dedicated `ui-button` inputs, the\n * rest goes through `buttonProps` (see `ui-button`'s own forwarding).\n */\n protected readonly triggerProps = computed<ButtonNativeProps>(() => ({\n 'aria-haspopup': 'true',\n 'aria-expanded': this.visible() ? 'true' : 'false',\n 'aria-controls': this.uid,\n 'aria-labelledby': this.ariaLabelledBy() ?? null,\n }));\n\n /** @ignore Static: every action is a `menuitem`, whatever it renders as (button/link). */\n protected readonly itemProps: ButtonNativeProps = { role: 'menuitem' };\n\n /** @ignore */\n protected readonly hostClasses = computed(() => {\n const c = ['ui-speed-dial', `_${this.type()}`];\n if (this.type() === 'linear') c.push(`_${this.direction()}`);\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.visible()) c.push('_open');\n return c.join(' ');\n });\n\n /** Opens the dial. */\n show(): void {\n if (this.disabled() || this.visible()) return;\n this.visible.set(true);\n this.opened.emit();\n }\n\n /** Closes the dial. */\n hide(focusTrigger = false): void {\n if (!this.visible()) return;\n this.visible.set(false);\n this.focusedKey.set(null);\n this.closed.emit();\n if (focusTrigger) this.triggerEl()?.focus();\n }\n\n /** Toggles the dial open/closed. */\n toggle(): void {\n this.visible() ? this.hide() : this.show();\n }\n\n /** Moves focus onto the trigger. */\n focus(options?: FocusOptions): void {\n this.triggerEl()?.focus(options);\n }\n\n /** @ignore */\n protected onTriggerClick(event: MouseEvent): void {\n if (this.disabled()) return;\n this.triggerClick.emit(event);\n this.toggle();\n }\n\n /** @ignore Arrow key on the (closed) trigger opens the dial onto its first action. */\n protected onTriggerKeydown(event: KeyboardEvent): void {\n if (this.disabled() || this.visible()) return;\n if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) return;\n event.preventDefault();\n this.show();\n this.queueFocusTabStop();\n }\n\n /** @ignore Activation: command + itemClick, then close (never on a disabled entry). */\n protected onItemClick(event: Event, node: UiSpeedDialNode): void {\n const item = node.item;\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n if (!item.url && !item.routerLink) event.preventDefault();\n this.focusedKey.set(node.key);\n item.command?.({ originalEvent: event, item });\n this.itemClick.emit({ originalEvent: event, item });\n this.hide(true);\n }\n\n /**\n * @ignore Roving keyboard navigation among the open actions.\n *\n * Both arrow pairs move the same way regardless of `direction`/`type`: it\n * keeps the mapping simple and predictable rather than re-deriving which\n * pair means \"forward\" for eight possible linear/circular layouts.\n */\n protected onListKeydown(event: KeyboardEvent): void {\n const keys = this.focusableKeys();\n if (!keys.length) return;\n const current = this.focusedKey();\n const index = current ? keys.indexOf(current) : -1;\n\n switch (event.key) {\n case 'ArrowUp':\n case 'ArrowRight':\n event.preventDefault();\n this.focusByKey(keys[(index + 1) % keys.length]);\n break;\n case 'ArrowDown':\n case 'ArrowLeft':\n event.preventDefault();\n this.focusByKey(keys[(index - 1 + keys.length) % keys.length]);\n break;\n case 'Home':\n event.preventDefault();\n this.focusByKey(keys[0]);\n break;\n case 'End':\n event.preventDefault();\n this.focusByKey(keys[keys.length - 1]);\n break;\n case 'Escape':\n event.preventDefault();\n this.hide(true);\n break;\n }\n }\n\n /** @ignore */\n protected onEntryFocus(key: string): void {\n this.focusedKey.set(key);\n }\n\n /** @ignore Outside pointerdown closes the dial (mousedown mirrors ui-menu's own outside-click). */\n protected onDocumentPointerdown(event: PointerEvent): void {\n if (!this.visible() || !this.hideOnClickOutside()) return;\n if (event.target instanceof Node && this.hostEl.nativeElement.contains(event.target)) return;\n this.hide();\n }\n\n /** @ignore Clicking the mask itself closes the dial. */\n protected onMaskClick(): void {\n this.hide();\n }\n\n /** @ignore */\n private focusByKey(key: string | undefined): void {\n if (!key) return;\n this.focusedKey.set(key);\n const target = this.nodes().find((n) => n.key === key);\n if (!target) return;\n this.actionEls()[target.index]?.focus();\n }\n\n /** @ignore Focus the roving tab stop once the actions are rendered (macrotask: rAF\n * never fires in throttled/background tabs). */\n private queueFocusTabStop(): void {\n setTimeout(() => this.focusByKey(this.tabStopKey() ?? undefined));\n }\n}\n","<div [class]=\"hostClasses()\" [style.--_radius]=\"radiusOverride()\">\n @if (mask() && visible()) {\n <div\n class=\"ui-speed-dial-mask\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"!motion()\"\n #maskMotion=\"uiMotion\"\n [animate.enter]=\"maskMotion.enter()\"\n [animate.leave]=\"maskMotion.leave()\"\n (click)=\"onMaskClick()\"\n aria-hidden=\"true\"\n ></div>\n }\n\n <ui-button\n #trigger\n class=\"ui-speed-dial-trigger\"\n [class._rotate]=\"triggerIconRotates()\"\n rounded\n iconOnly\n [level]=\"level()\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n [icon]=\"triggerIcon()\"\n [ariaLabel]=\"ariaLabel()\"\n [disabled]=\"disabled()\"\n [tabindex]=\"tabindex()\"\n [buttonProps]=\"triggerProps()\"\n (buttonClick)=\"onTriggerClick($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n />\n\n @if (visible()) {\n <!-- ARIA menu pattern: keyboard delegated to the role=\"menu\" container,\n focus lives on the items (roving tabindex), same as ui-menu. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-speed-dial-list\"\n [id]=\"uid\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() || null\"\n (keydown)=\"onListKeydown($event)\"\n >\n @for (node of nodes(); track node.key) {\n <ui-button\n #actionBtn\n class=\"ui-speed-dial-item\"\n [style.--_stagger-index]=\"node.index\"\n [style.transform]=\"type() !== 'linear' ? arcTransform()(node.index) : null\"\n [uiMotion]=\"itemMotionPreset()\"\n [motionDisabled]=\"!motion()\"\n #itemMotion=\"uiMotion\"\n [animate.enter]=\"itemMotion.enter()\"\n [animate.leave]=\"itemMotion.leave()\"\n rounded\n iconOnly\n [level]=\"itemLevel()\"\n [variant]=\"variant()\"\n size=\"small\"\n [icon]=\"node.item.icon\"\n [ariaLabel]=\"node.item.ariaLabel || node.item.label\"\n [disabled]=\"node.item.disabled\"\n [href]=\"node.item.url\"\n [routerLink]=\"node.item.routerLink\"\n [target]=\"node.item.target\"\n [tabindex]=\"node.key === tabStopKey() ? 0 : -1\"\n [buttonProps]=\"itemProps\"\n [uiTooltip]=\"showTooltips() ? node.item.ariaLabel || node.item.label : undefined\"\n [tooltipPosition]=\"tooltipPosition()\"\n (buttonClick)=\"onItemClick($event, node)\"\n (focus)=\"onEntryFocus(node.key)\"\n />\n }\n </div>\n }\n</div>\n","/*\n * Public API Surface of ui-kit/ui-speed-dial\n */\n\nexport * from './lib/ui-speed-dial';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAwEA;AACA,IAAI,OAAO,GAAG,CAAC;AAEf;AACA,SAAS,KAAK,CAAC,KAAa,EAAA;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG;AACtC;AAEA;;;;;;;;;AASG;AACH,SAAS,OAAO,CACd,IAAsC,EACtC,SAA6B,EAAA;IAE7B,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE;AACrD,IAAA,IAAI,IAAI,KAAK,aAAa,EAAE;QAC1B,MAAM,MAAM,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,SAAmB,CAAC,IAAI,CAAC;QACnF,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;IAC1C;IACA,MAAM,KAAK,GACT,EAAE,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,SAAmB,CAAC,IAAI,CAA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CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,SAAS,sEAGN,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvNjE;;AAEG;;ACFH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-actions-ui-speed-dial.mjs","names":[],"sources":["../../../projects/ui-kit/actions/ui-speed-dial/src/lib/ui-speed-dial.ts","../../../projects/ui-kit/actions/ui-speed-dial/src/lib/ui-speed-dial.html"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { DOCUMENT, NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { UiLevel } from '@4sh/ui-kit/types';\nimport {\n ButtonNativeProps,\n ButtonSize,\n ButtonVariant,\n UiButton,\n} from '@4sh/ui-kit/actions/ui-button';\nimport { UiMenuItem } from '@4sh/ui-kit/navigation/ui-menu';\nimport { UiTooltip, TooltipPosition } from '@4sh/ui-kit/informative/ui-tooltip';\nimport { closeOnNavigation } from '@4sh/ui-kit/overlay';\nimport { UiMotion, UiMotionPreset } from '@4sh/ui-kit/motion';\n\n/**\n * Axis the actions fan out along.\n *\n * `linear`/`semi-circle` read the four cardinal values; `quarter-circle`\n * reads the four corners — a cardinal value falls back to `'up-right'` there\n * (see `arcSpan`).\n */\nexport type SpeedDialDirection =\n 'up' | 'down' | 'left' | 'right' | 'up-left' | 'up-right' | 'down-left' | 'down-right';\n\n/**\n * `linear` stacks the actions along `direction`. The other three arrange them\n * on an arc around the trigger (`radius`): `circle` the full ring,\n * `semi-circle` a 180° half centred on `direction`, `quarter-circle` a 90°\n * quadrant in the `direction` corner.\n */\nexport type SpeedDialType = 'linear' | 'circle' | 'semi-circle' | 'quarter-circle';\n\n/**\n * One action revealed by the dial — the leaf subset of {@link UiMenuItem}\n * `ui-button` can actually render (no groups/separators, and no\n * `queryParams`/`routerLinkActiveExact`: `ui-button`'s link mode does not\n * carry them).\n */\nexport type UiSpeedDialItem = Pick<\n UiMenuItem,\n 'id' | 'label' | 'icon' | 'command' | 'disabled' | 'routerLink' | 'url' | 'target' | 'ariaLabel'\n>;\n\n/** Payload of `itemClick` / an item's own `command`. */\nexport interface UiSpeedDialItemClickEvent {\n originalEvent: Event;\n item: UiSpeedDialItem;\n}\n\n/** @ignore Render node: item + its stable key + its index among enabled actions. */\ninterface UiSpeedDialNode {\n item: UiSpeedDialItem;\n key: string;\n index: number;\n}\n\n/** Process-wide unique id source (aria wiring). */\nlet nextUid = 0;\n\n/** @ignore Rounds away floating point noise CSS `calc()` cannot parse (see `arcTransform`). */\nfunction round(value: number): number {\n return Math.round(value * 1e6) / 1e6;\n}\n\n/**\n * @ignore Angular span an arc-type dial occupies, in degrees clockwise from\n * top (0° = up, 90° = right, 180° = down, 270° = left — the same convention\n * `arcTransform` reads it back with).\n *\n * `circle` ignores `direction`: a full ring has no \"side\". `semi-circle`\n * centres its 180° half on `direction`. `quarter-circle` fills the 90°\n * quadrant named by `direction`'s corner, defaulting to `up-right` for a\n * cardinal value (`quarter-circle` has no \"up\" of its own — only corners).\n */\nfunction arcSpan(\n type: Exclude<SpeedDialType, 'linear'>,\n direction: SpeedDialDirection,\n): { start: number; span: number } {\n if (type === 'circle') return { start: 0, span: 360 };\n if (type === 'semi-circle') {\n const center = { up: 0, right: 90, down: 180, left: 270 }[direction as string] ?? 0;\n return { start: center - 90, span: 180 };\n }\n const start =\n { 'up-right': 0, 'down-right': 90, 'down-left': 180, 'up-left': 270 }[direction as string] ?? 0;\n return { start, span: 90 };\n}\n\n/**\n * ui-speed-dial — a floating trigger button that fans a set of actions out\n * around itself.\n *\n * Driven by a declarative `items` list ({@link UiSpeedDialItem}: `command` /\n * `routerLink` / `url`, `icon`, `disabled`) — the same leaf shape as\n * {@link UiMenuItem}, so a menu's entries can feed a dial without reshaping\n * them. Four layouts ({@link SpeedDialType}): `linear` (stacks along\n * `direction`), `circle` (full ring), `semi-circle` and `quarter-circle`\n * (partial arcs centred/cornered on `direction`) — `radius` sizes the three\n * arc layouts.\n *\n * Open state is the two-way `visible` model. The action list mounts only\n * while open (`@if`) — closed actions are neither rendered nor reachable by\n * keyboard, so no `aria-hidden`/`inert` bookkeeping is needed. Escape closes\n * and returns focus to the trigger; `hideOnClickOutside` dismisses on an\n * outside click. The actions form **one tab stop** (roving tabindex, same\n * pattern as `ui-menu` / `ui-editor`'s toolbar): arrow keys move between\n * them, `Home`/`End` jump to the ends, disabled entries are skipped.\n *\n * The trigger and every action are `ui-button` instances (`rounded\n * iconOnly`) — colors come from the `actions.*` tokens, nothing is drawn by\n * hand. `mask` dims the page behind the open dial (`--primitives-black-50`,\n * the same token as `ui-modal`'s scrim).\n *\n * Positioning is left to the caller: the component does not assume a fixed\n * corner. Wrap it in a `position: fixed` host (see the MDX \"Bouton flottant\"\n * recipe) to reproduce the classic floating-action-button placement.\n */\n@Component({\n selector: 'ui-speed-dial',\n imports: [UiButton, NgTemplateOutlet, RouterLink, UiTooltip, UiMotion],\n templateUrl: './ui-speed-dial.html',\n styleUrl: './ui-speed-dial.scss',\n})\nexport class UiSpeedDial {\n /** Actions revealed by the dial (see {@link UiSpeedDialItem}). */\n items = input.required<UiSpeedDialItem[]>();\n /** Open state (two-way). */\n visible = model(false);\n\n /** Layout: `linear` (stacked), `circle` (ring), `semi-circle` or `quarter-circle` (arc). */\n type = input<SpeedDialType>('linear');\n /**\n * Axis the actions fan along. `linear`/`semi-circle` read the four\n * cardinal values; `quarter-circle` reads the four corners. Unused by\n * `circle`, which always goes full ring.\n */\n direction = input<SpeedDialDirection>('up');\n /** Ring/arc radius in px — every type but `linear`. Falls back to a size-derived default. */\n radius = input<number>();\n\n /** Semantic level of the trigger. */\n level = input<UiLevel>('high');\n /**\n * Semantic level of the actions. Defaults to `low`, deliberately different\n * from the trigger's own `level`: a `high`-styled action would read as a\n * second primary button rather than a revealed option.\n */\n itemLevel = input<UiLevel>('low');\n /** Apparence of the trigger and the actions. */\n variant = input<ButtonVariant>('filled');\n /** Size of the trigger and the actions. */\n size = input<ButtonSize>('default');\n\n /** Icon of the trigger while closed. */\n showIcon = input<string>('plus');\n /**\n * Icon of the trigger while open. Left unset, `showIcon` rotates 45° in\n * place instead of being swapped for a second icon.\n */\n hideIcon = input<string>();\n /** Animates the trigger icon's rotation (`hideIcon` unset only). */\n rotateAnimation = input(true, { transform: booleanAttribute });\n\n /** Dims the page behind the dial while open. */\n mask = input(false, { transform: booleanAttribute });\n /** Closes the dial on an outside click. */\n hideOnClickOutside = input(true, { transform: booleanAttribute });\n /** Disables the trigger and every action. */\n disabled = input(false, { transform: booleanAttribute });\n\n /** Shows each action's label as a tooltip (icon-only actions). */\n showTooltips = input(false, { transform: booleanAttribute });\n /** Animates the trigger and the actions (reduced-motion always wins). */\n motion = input(true, { transform: booleanAttribute });\n\n /** Accessible name of the trigger. */\n ariaLabel = input<string>();\n /** id of an external element naming the trigger. */\n ariaLabelledBy = input<string>();\n /** Native tabindex of the trigger. */\n tabindex = input<number>(0, { transform: numberAttribute });\n\n /** Fired when the trigger is clicked (never when disabled). */\n triggerClick = output<MouseEvent>();\n /** Fired when the dial opens. */\n opened = output<void>();\n /** Fired when the dial closes. */\n closed = output<void>();\n /** Fired when an action is activated (click / keyboard), never when disabled. */\n itemClick = output<UiSpeedDialItemClickEvent>();\n\n /** @ignore */\n private readonly document = inject(DOCUMENT);\n /** @ignore Host element — outside-click detection. */\n private readonly hostEl = inject(ElementRef<HTMLElement>);\n /** @ignore Trigger button (programmatic focus). */\n private readonly triggerEl = viewChild<UiButton>('trigger');\n /** @ignore Rendered action buttons, in DOM order — the roving tabindex ring.\n * Matched by their own `#actionBtn` ref so the trigger (`#trigger`) is excluded. */\n private readonly actionEls = viewChildren<UiButton>('actionBtn');\n\n /** Unique id of the actions list (wired to the trigger's `aria-controls`). */\n readonly uid = `ui-speed-dial-${nextUid++}`;\n /** @ignore Key of the action currently holding the roving tab stop. */\n protected readonly focusedKey = signal<string | null>(null);\n\n constructor() {\n // A dial declared in an app shell (header, sidebar) outlives the routed\n // view: close it rather than leaving it open over the next page.\n //\n // Deferred one frame (`afterNextRender`, not the constructor directly): a\n // dial that starts open (`[visible]=\"true\"`, e.g. this very Storybook\n // canvas) races the router's OWN initial navigation — that first\n // `NavigationStart` can still fire after this component exists but\n // before `router.url` has settled, which `closeOnNavigation` would then\n // read as \"the page changed\" and close a dial that never got a chance to\n // be seen open. One frame is enough for that bootstrap navigation to\n // resolve, and `closeOnNavigation`'s own job (dismiss on a LATER, real\n // navigation) is not time-critical to wire up before then.\n afterNextRender(() => closeOnNavigation(() => this.hide()));\n\n // Outside-click dismissal: attached only while open, torn down on close —\n // a document-wide listener has no reason to exist while nothing is open.\n effect((onCleanup) => {\n if (!this.visible()) return;\n const handler = (event: PointerEvent) => this.onDocumentPointerdown(event);\n this.document.addEventListener('pointerdown', handler, true);\n onCleanup(() => this.document.removeEventListener('pointerdown', handler, true));\n });\n }\n\n /** @ignore Enabled actions, keyed for the roving tabindex + trigonometry. */\n protected readonly nodes = computed<UiSpeedDialNode[]>(() =>\n this.items().map((item, index) => ({ item, key: item.id ?? `${this.uid}_${index}`, index })),\n );\n\n /** @ignore Keys of the enabled entries, in order (roving focus path). */\n private readonly focusableKeys = computed<string[]>(() =>\n this.nodes()\n .filter((n) => !n.item.disabled)\n .map((n) => n.key),\n );\n\n /** @ignore Node owning the tab stop: last focused, else the first enabled one. */\n protected readonly tabStopKey = computed<string | null>(() => {\n const keys = this.focusableKeys();\n const focused = this.focusedKey();\n return focused && keys.includes(focused) ? focused : (keys[0] ?? null);\n });\n\n /**\n * @ignore Explicit ring radius, in px — set as the `--_radius` override.\n * Left unset (`null`, no inline style), the SCSS default takes over.\n */\n protected readonly radiusOverride = computed(() => {\n const r = this.radius();\n return r != null ? `${r}px` : null;\n });\n\n /**\n * @ignore Per-item position on an arc (`circle`/`semi-circle`/\n * `quarter-circle`): self-centred on the trigger, `--_radius` out at its\n * angular slot (see `radiusOverride` for the explicit/default split).\n *\n * `circle` steps evenly around the FULL span (`span / total`, wrapping);\n * the other two divide by `total - 1` so the first and last actions land\n * exactly on the arc's own ends, not short of them.\n */\n protected readonly arcTransform = computed(() => {\n const type = this.type();\n const total = this.nodes().length;\n if (type === 'linear' || !total) return () => null;\n const { start, span } = arcSpan(type, this.direction());\n const step = type === 'circle' ? span / total : span / Math.max(total - 1, 1);\n return (index: number) => {\n const angle = ((start + step * index) * Math.PI) / 180;\n // Floating point noise (e.g. sin(π) ≈ 1.2e-16) prints as exponential\n // notation, which CSS `calc()` cannot parse — round it away.\n const x = round(Math.sin(angle));\n const y = round(-Math.cos(angle));\n return `translate(-50%, -50%) translate(calc(${x} * var(--_radius)), calc(${y} * var(--_radius)))`;\n };\n });\n\n /**\n * @ignore Enter/leave preset.\n *\n * Arc items (`circle`/`semi-circle`/`quarter-circle`) already carry their\n * own `[style.transform]` (angular position, `arcTransform`) —\n * `zoom`/`slide-*` animate `transform` too, and a CSS animation on a\n * property wins over an inline style for it, wiping the position out for\n * the animation's duration. `fade` (opacity only) is the one preset that\n * cannot collide with it.\n *\n * `linear` items carry no such transform, so they get the more expressive\n * `slide-${direction}` — \"enter moving toward `direction`\".\n */\n protected readonly itemMotionPreset = computed<UiMotionPreset>(() => {\n if (this.type() !== 'linear') return 'fade';\n // `linear` only means a cardinal direction; a corner value (meant for\n // `quarter-circle`) has no matching slide preset — fall back to 'up'.\n const d = this.direction();\n return (\n d === 'up' || d === 'down' || d === 'left' || d === 'right' ? `slide-${d}` : 'slide-up'\n ) as UiMotionPreset;\n });\n\n /** @ignore Trigger icon while open: `hideIcon`, or `showIcon` rotated in place. */\n protected readonly triggerIcon = computed(() => this.hideIcon() ?? this.showIcon());\n /** @ignore The trigger icon rotates only when there is no dedicated `hideIcon`. */\n protected readonly triggerIconRotates = computed(\n () => this.visible() && !this.hideIcon() && this.rotateAnimation(),\n );\n\n /** @ignore Tooltip side: opposite the fan-out direction, so it never overlaps an action. */\n protected readonly tooltipPosition = computed<TooltipPosition>(() => {\n if (this.type() !== 'linear') return 'top';\n const d = this.direction();\n if (d === 'up') return 'right';\n if (d === 'down') return 'right';\n if (d === 'left') return 'top';\n return 'top';\n });\n\n /**\n * @ignore Attributes forwarded onto the trigger's real `<button>`/`<a>`\n * (`ui-button`'s `#host`, not the `<ui-speed-dial>` wrapper): `role`,\n * `ariaLabel` and `tabindex` already have dedicated `ui-button` inputs, the\n * rest goes through `buttonProps` (see `ui-button`'s own forwarding).\n */\n protected readonly triggerProps = computed<ButtonNativeProps>(() => ({\n 'aria-haspopup': 'true',\n 'aria-expanded': this.visible() ? 'true' : 'false',\n 'aria-controls': this.uid,\n 'aria-labelledby': this.ariaLabelledBy() ?? null,\n }));\n\n /** @ignore Static: every action is a `menuitem`, whatever it renders as (button/link). */\n protected readonly itemProps: ButtonNativeProps = { role: 'menuitem' };\n\n /** @ignore */\n protected readonly hostClasses = computed(() => {\n const c = ['ui-speed-dial', `_${this.type()}`];\n if (this.type() === 'linear') c.push(`_${this.direction()}`);\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.visible()) c.push('_open');\n return c.join(' ');\n });\n\n /** Opens the dial. */\n show(): void {\n if (this.disabled() || this.visible()) return;\n this.visible.set(true);\n this.opened.emit();\n }\n\n /** Closes the dial. */\n hide(focusTrigger = false): void {\n if (!this.visible()) return;\n this.visible.set(false);\n this.focusedKey.set(null);\n this.closed.emit();\n if (focusTrigger) this.triggerEl()?.focus();\n }\n\n /** Toggles the dial open/closed. */\n toggle(): void {\n this.visible() ? this.hide() : this.show();\n }\n\n /** Moves focus onto the trigger. */\n focus(options?: FocusOptions): void {\n this.triggerEl()?.focus(options);\n }\n\n /** @ignore */\n protected onTriggerClick(event: MouseEvent): void {\n if (this.disabled()) return;\n this.triggerClick.emit(event);\n this.toggle();\n }\n\n /** @ignore Arrow key on the (closed) trigger opens the dial onto its first action. */\n protected onTriggerKeydown(event: KeyboardEvent): void {\n if (this.disabled() || this.visible()) return;\n if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) return;\n event.preventDefault();\n this.show();\n this.queueFocusTabStop();\n }\n\n /** @ignore Activation: command + itemClick, then close (never on a disabled entry). */\n protected onItemClick(event: Event, node: UiSpeedDialNode): void {\n const item = node.item;\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n if (!item.url && !item.routerLink) event.preventDefault();\n this.focusedKey.set(node.key);\n item.command?.({ originalEvent: event, item });\n this.itemClick.emit({ originalEvent: event, item });\n this.hide(true);\n }\n\n /**\n * @ignore Roving keyboard navigation among the open actions.\n *\n * Both arrow pairs move the same way regardless of `direction`/`type`: it\n * keeps the mapping simple and predictable rather than re-deriving which\n * pair means \"forward\" for eight possible linear/circular layouts.\n */\n protected onListKeydown(event: KeyboardEvent): void {\n const keys = this.focusableKeys();\n if (!keys.length) return;\n const current = this.focusedKey();\n const index = current ? keys.indexOf(current) : -1;\n\n switch (event.key) {\n case 'ArrowUp':\n case 'ArrowRight':\n event.preventDefault();\n this.focusByKey(keys[(index + 1) % keys.length]);\n break;\n case 'ArrowDown':\n case 'ArrowLeft':\n event.preventDefault();\n this.focusByKey(keys[(index - 1 + keys.length) % keys.length]);\n break;\n case 'Home':\n event.preventDefault();\n this.focusByKey(keys[0]);\n break;\n case 'End':\n event.preventDefault();\n this.focusByKey(keys[keys.length - 1]);\n break;\n case 'Escape':\n event.preventDefault();\n this.hide(true);\n break;\n }\n }\n\n /** @ignore */\n protected onEntryFocus(key: string): void {\n this.focusedKey.set(key);\n }\n\n /** @ignore Outside pointerdown closes the dial (mousedown mirrors ui-menu's own outside-click). */\n protected onDocumentPointerdown(event: PointerEvent): void {\n if (!this.visible() || !this.hideOnClickOutside()) return;\n if (event.target instanceof Node && this.hostEl.nativeElement.contains(event.target)) return;\n this.hide();\n }\n\n /** @ignore Clicking the mask itself closes the dial. */\n protected onMaskClick(): void {\n this.hide();\n }\n\n /** @ignore */\n private focusByKey(key: string | undefined): void {\n if (!key) return;\n this.focusedKey.set(key);\n const target = this.nodes().find((n) => n.key === key);\n if (!target) return;\n this.actionEls()[target.index]?.focus();\n }\n\n /** @ignore Focus the roving tab stop once the actions are rendered (macrotask: rAF\n * never fires in throttled/background tabs). */\n private queueFocusTabStop(): void {\n setTimeout(() => this.focusByKey(this.tabStopKey() ?? undefined));\n }\n}\n","<div [class]=\"hostClasses()\" [style.--_radius]=\"radiusOverride()\">\n @if (mask() && visible()) {\n <div\n class=\"ui-speed-dial-mask\"\n [uiMotion]=\"'fade'\"\n [motionDisabled]=\"!motion()\"\n #maskMotion=\"uiMotion\"\n [animate.enter]=\"maskMotion.enter()\"\n [animate.leave]=\"maskMotion.leave()\"\n (click)=\"onMaskClick()\"\n aria-hidden=\"true\"\n ></div>\n }\n\n <ui-button\n #trigger\n class=\"ui-speed-dial-trigger\"\n [class._rotate]=\"triggerIconRotates()\"\n rounded\n iconOnly\n [level]=\"level()\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n [icon]=\"triggerIcon()\"\n [ariaLabel]=\"ariaLabel()\"\n [disabled]=\"disabled()\"\n [tabindex]=\"tabindex()\"\n [buttonProps]=\"triggerProps()\"\n (buttonClick)=\"onTriggerClick($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n />\n\n @if (visible()) {\n <!-- ARIA menu pattern: keyboard delegated to the role=\"menu\" container,\n focus lives on the items (roving tabindex), same as ui-menu. -->\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"ui-speed-dial-list\"\n [id]=\"uid\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel() || null\"\n (keydown)=\"onListKeydown($event)\"\n >\n @for (node of nodes(); track node.key) {\n <ui-button\n #actionBtn\n class=\"ui-speed-dial-item\"\n [style.--_stagger-index]=\"node.index\"\n [style.transform]=\"type() !== 'linear' ? arcTransform()(node.index) : null\"\n [uiMotion]=\"itemMotionPreset()\"\n [motionDisabled]=\"!motion()\"\n #itemMotion=\"uiMotion\"\n [animate.enter]=\"itemMotion.enter()\"\n [animate.leave]=\"itemMotion.leave()\"\n rounded\n iconOnly\n [level]=\"itemLevel()\"\n [variant]=\"variant()\"\n size=\"small\"\n [icon]=\"node.item.icon\"\n [ariaLabel]=\"node.item.ariaLabel || node.item.label\"\n [disabled]=\"node.item.disabled\"\n [href]=\"node.item.url\"\n [routerLink]=\"node.item.routerLink\"\n [target]=\"node.item.target\"\n [tabindex]=\"node.key === tabStopKey() ? 0 : -1\"\n [buttonProps]=\"itemProps\"\n [uiTooltip]=\"showTooltips() ? node.item.ariaLabel || node.item.label : undefined\"\n [tooltipPosition]=\"tooltipPosition()\"\n (buttonClick)=\"onItemClick($event, node)\"\n (focus)=\"onEntryFocus(node.key)\"\n />\n }\n </div>\n }\n</div>\n"],"mappings":";;;;;;;;AAyEA,IAAI,UAAU;AAGd,SAAS,MAAM,OAAa;CAC1B,OAAO,KAAK,MAAM,QAAQ,GAAG,IAAI;AACnC;AAYA,SAAS,QACP,MACA,WAA6B;CAE7B,IAAI,SAAS,UAAU,OAAO;EAAE,OAAO;EAAG,MAAM;CAAG;CACnD,IAAI,SAAS,eAEX,OAAO;EAAE,QADM;GAAE,IAAI;GAAG,OAAO;GAAI,MAAM;GAAK,MAAM;EAAG,EAAG,cAAwB,KACzD;EAAI,MAAM;CAAG;CAIxC,OAAO;EAAE,OADP;GAAE,YAAY;GAAG,cAAc;GAAI,aAAa;GAAK,WAAW;EAAG,EAAG,cAAwB;EAChF,MAAM;CAAE;AAC1B;AAqCA,IAAa,cAAb,MAAa,YAAW;CAmFtB,cAAA;EAjFA,KAAA,QAAQ,MAAM,SAA6B,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,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AAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAGN,aAAW,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -1,138 +1,230 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
/** Families always available, keyed by name. Registered families are merged on top. */
|
|
9
|
-
const UI_ICON_BUILTIN_FAMILIES = {
|
|
10
|
-
fontawesome: fontAwesomeFamily,
|
|
11
|
-
};
|
|
12
|
-
/** Registered icon families (multi provider). Merged over the built-ins. */
|
|
13
|
-
const UI_ICON_FAMILIES = new InjectionToken('UI_ICON_FAMILIES');
|
|
14
|
-
/** Family key used when a `ui-icon` does not set `family`. */
|
|
15
|
-
const UI_ICON_DEFAULT_FAMILY = new InjectionToken('UI_ICON_DEFAULT_FAMILY');
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, Directive, InjectionToken, booleanAttribute, computed, effect, inject, input, isDevMode, makeEnvironmentProviders } from "@angular/core";
|
|
3
|
+
const fontAwesomeFamily = { classes: (name, type) => `${type === "outline" ? "fa-regular" : "fa-solid"} fa-${name}` };
|
|
4
|
+
const UI_ICON_BUILTIN_FAMILIES = { fontawesome: fontAwesomeFamily };
|
|
5
|
+
const UI_ICON_FAMILIES = new InjectionToken("UI_ICON_FAMILIES");
|
|
6
|
+
const UI_ICON_DEFAULT_FAMILY = new InjectionToken("UI_ICON_DEFAULT_FAMILY");
|
|
16
7
|
function provideUiIconFamilies(families, options) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* one — including the icons a kit component instantiates internally (the
|
|
28
|
-
* datepicker chevrons, the select checkmarks…), which no input exposes. Resolution
|
|
29
|
-
* goes through the element injector, so it also reaches content relocated into a
|
|
30
|
-
* CDK overlay: an overlay panel keeps the injector chain of the template that
|
|
31
|
-
* declared it, not of its DOM position.
|
|
32
|
-
*
|
|
33
|
-
* `family` on a single icon still wins, and a nested directive wins over an outer
|
|
34
|
-
* one. Register the family itself with `provideUiIconFamilies()`.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```html
|
|
38
|
-
* <form uiIconFamily="material">…</form>
|
|
39
|
-
* <ui-datepicker uiIconFamily="material" [(ngModel)]="date" valueType="date" />
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
class UiIconFamilyScope {
|
|
43
|
-
constructor() {
|
|
44
|
-
/** Registered family key applied to descendant icons. Empty/unset = no scope. */
|
|
45
|
-
this.uiIconFamily = input(/* @ts-ignore */
|
|
46
|
-
...(ngDevMode ? [undefined, { debugName: "uiIconFamily" }] : /* istanbul ignore next */ []));
|
|
47
|
-
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiIconFamilyScope, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
49
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: UiIconFamilyScope, isStandalone: true, selector: "[uiIconFamily]", inputs: { uiIconFamily: { classPropertyName: "uiIconFamily", publicName: "uiIconFamily", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
50
|
-
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiIconFamilyScope, decorators: [{
|
|
52
|
-
type: Directive,
|
|
53
|
-
args: [{
|
|
54
|
-
selector: '[uiIconFamily]',
|
|
55
|
-
}]
|
|
56
|
-
}], propDecorators: { uiIconFamily: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiIconFamily", required: false }] }] } });
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* ui-icon — renders an icon from a configurable font family.
|
|
60
|
-
*
|
|
61
|
-
* FontAwesome is the built-in default. Register other families (Material Symbols,
|
|
62
|
-
* Bootstrap Icons, a custom font…) with `provideUiIconFamilies()`, then pick one per
|
|
63
|
-
* icon via `family`, per subtree via the `uiIconFamily` directive, or app-wide via
|
|
64
|
-
* the provider's `default` option.
|
|
65
|
-
*
|
|
66
|
-
* Accessible: decorative by default (aria-hidden); pass `decorative=false` + `ariaLabel`
|
|
67
|
-
* when the icon conveys meaning on its own.
|
|
68
|
-
*/
|
|
69
|
-
class UiIcon {
|
|
70
|
-
constructor() {
|
|
71
|
-
/** Icon name for the selected family (e.g. "circle-user"). */
|
|
72
|
-
this.name = input.required(/* @ts-ignore */
|
|
73
|
-
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
74
|
-
/** Icon size. */
|
|
75
|
-
this.size = input('default', /* @ts-ignore */
|
|
76
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
77
|
-
/** Visual variant, interpreted by the family (filled vs outlined). */
|
|
78
|
-
this.type = input('solid', /* @ts-ignore */
|
|
79
|
-
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
80
|
-
/** Family key (default: configured default, else "fontawesome"). */
|
|
81
|
-
this.family = input(/* @ts-ignore */
|
|
82
|
-
...(ngDevMode ? [undefined, { debugName: "family" }] : /* istanbul ignore next */ []));
|
|
83
|
-
/** Purely decorative icon (hidden from screen readers). */
|
|
84
|
-
this.decorative = input(true, { ...(ngDevMode ? { debugName: "decorative" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
85
|
-
/** Accessible label (required when not decorative). */
|
|
86
|
-
this.ariaLabel = input(/* @ts-ignore */
|
|
87
|
-
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
88
|
-
this.registered = inject(UI_ICON_FAMILIES, { optional: true });
|
|
89
|
-
this.configuredDefault = inject(UI_ICON_DEFAULT_FAMILY, { optional: true });
|
|
90
|
-
/** Nearest enclosing `uiIconFamily` directive, if any (see {@link UiIconFamilyScope}). */
|
|
91
|
-
this.familyScope = inject(UiIconFamilyScope, { optional: true });
|
|
92
|
-
/** Built-in families + registered ones (registered win on key clash). */
|
|
93
|
-
this.families = computed(() => Object.assign({}, UI_ICON_BUILTIN_FAMILIES, ...(this.registered ?? [])), /* @ts-ignore */
|
|
94
|
-
...(ngDevMode ? [{ debugName: "families" }] : /* istanbul ignore next */ []));
|
|
95
|
-
/**
|
|
96
|
-
* @ignore Resolved family, falling back to FontAwesome on unknown key.
|
|
97
|
-
* Precedence: own `family` → nearest `uiIconFamily` subtree → app-wide default.
|
|
98
|
-
*/
|
|
99
|
-
this.resolvedFamily = computed(() => {
|
|
100
|
-
const key = this.family() ?? this.familyScope?.uiIconFamily() ?? this.configuredDefault ?? 'fontawesome';
|
|
101
|
-
const family = this.families()[key];
|
|
102
|
-
if (!family && isDevMode()) {
|
|
103
|
-
console.warn(`[ui-icon] Unknown icon family "${key}". Falling back to "fontawesome".`);
|
|
104
|
-
}
|
|
105
|
-
return family ?? fontAwesomeFamily;
|
|
106
|
-
}, /* @ts-ignore */
|
|
107
|
-
...(ngDevMode ? [{ debugName: "resolvedFamily" }] : /* istanbul ignore next */ []));
|
|
108
|
-
/** @ignore */
|
|
109
|
-
this.classes = computed(() => `ui-icon _${this.size()} ${this.resolvedFamily().classes(this.name(), this.type())}`, /* @ts-ignore */
|
|
110
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
111
|
-
/** @ignore Text content for ligature fonts (null for class-based fonts like FontAwesome). */
|
|
112
|
-
this.content = computed(() => this.resolvedFamily().content?.(this.name(), this.type()) ?? null, /* @ts-ignore */
|
|
113
|
-
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
114
|
-
effect(() => {
|
|
115
|
-
if (!this.decorative() && !this.ariaLabel() && isDevMode()) {
|
|
116
|
-
console.warn(`[ui-icon] Meaningful icon "${this.name()}" (decorative=false) has no ariaLabel — ` +
|
|
117
|
-
`it renders role="img" with no accessible name.`);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
122
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: UiIcon, isStandalone: true, selector: "ui-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, family: { classPropertyName: "family", publicName: "family", isSignal: true, isRequired: false, transformFunction: null }, decorative: { classPropertyName: "decorative", publicName: "decorative", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<i\n [class]=\"classes()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n [attr.role]=\"decorative() ? null : 'img'\"\n [attr.aria-label]=\"decorative() ? null : ariaLabel()\"\n >{{ content() }}</i\n>\n", styles: [":host{display:inline-flex;line-height:0}.ui-icon{display:inline-flex;align-items:center;justify-content:center;min-width:var(--ui-icon-min-size, 1em);min-height:var(--ui-icon-min-size, 1em);aspect-ratio:var(--ui-icon-aspect-ratio, 1);color:inherit;font-size:var(--ui-icon-size, var(--_scale))}.ui-icon._sm{--_scale: var(--ui-icon-size-sm, var(--size-typography-icon-sm))}.ui-icon._md{--_scale: var(--ui-icon-size-md, var(--size-typography-icon-md))}.ui-icon._default{--_scale: var(--ui-icon-size-default, var(--size-typography-icon-default))}.ui-icon._lg{--_scale: var(--ui-icon-size-lg, var(--size-typography-icon-lg))}.ui-icon._xl{--_scale: var(--ui-icon-size-xl, var(--size-typography-icon-xl))}\n"] }); }
|
|
8
|
+
const providers = [{
|
|
9
|
+
provide: UI_ICON_FAMILIES,
|
|
10
|
+
useValue: families,
|
|
11
|
+
multi: true
|
|
12
|
+
}];
|
|
13
|
+
if (options?.default) providers.push({
|
|
14
|
+
provide: UI_ICON_DEFAULT_FAMILY,
|
|
15
|
+
useValue: options.default
|
|
16
|
+
});
|
|
17
|
+
return makeEnvironmentProviders(providers);
|
|
123
18
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
19
|
+
var UiIconFamilyScope = class UiIconFamilyScope {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.uiIconFamily = input(...ngDevMode ? [void 0, { debugName: "uiIconFamily" }] : /* istanbul ignore next */ []);
|
|
22
|
+
}
|
|
23
|
+
static {
|
|
24
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
25
|
+
minVersion: "12.0.0",
|
|
26
|
+
version: "22.3.0",
|
|
27
|
+
ngImport: i0,
|
|
28
|
+
type: UiIconFamilyScope,
|
|
29
|
+
deps: [],
|
|
30
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
static {
|
|
34
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
35
|
+
minVersion: "17.1.0",
|
|
36
|
+
version: "22.3.0",
|
|
37
|
+
type: UiIconFamilyScope,
|
|
38
|
+
isStandalone: true,
|
|
39
|
+
selector: "[uiIconFamily]",
|
|
40
|
+
inputs: { uiIconFamily: {
|
|
41
|
+
classPropertyName: "uiIconFamily",
|
|
42
|
+
publicName: "uiIconFamily",
|
|
43
|
+
isSignal: true,
|
|
44
|
+
isRequired: false,
|
|
45
|
+
transformFunction: null
|
|
46
|
+
} },
|
|
47
|
+
ngImport: i0
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
52
|
+
minVersion: "12.0.0",
|
|
53
|
+
version: "22.3.0",
|
|
54
|
+
ngImport: i0,
|
|
55
|
+
type: UiIconFamilyScope,
|
|
56
|
+
decorators: [{
|
|
57
|
+
type: Directive,
|
|
58
|
+
args: [{ selector: "[uiIconFamily]" }]
|
|
59
|
+
}],
|
|
60
|
+
propDecorators: { uiIconFamily: [{
|
|
61
|
+
type: i0.Input,
|
|
62
|
+
args: [{
|
|
63
|
+
isSignal: true,
|
|
64
|
+
alias: "uiIconFamily",
|
|
65
|
+
required: false
|
|
66
|
+
}]
|
|
67
|
+
}] }
|
|
68
|
+
});
|
|
69
|
+
var UiIcon = class UiIcon {
|
|
70
|
+
constructor() {
|
|
71
|
+
this.name = input.required(...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
72
|
+
this.size = input("default", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.type = input("solid", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
74
|
+
this.family = input(...ngDevMode ? [void 0, { debugName: "family" }] : /* istanbul ignore next */ []);
|
|
75
|
+
this.decorative = input(true, {
|
|
76
|
+
...ngDevMode ? { debugName: "decorative" } : /* istanbul ignore next */ {},
|
|
77
|
+
transform: booleanAttribute
|
|
78
|
+
});
|
|
79
|
+
this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
80
|
+
this.registered = inject(UI_ICON_FAMILIES, { optional: true });
|
|
81
|
+
this.configuredDefault = inject(UI_ICON_DEFAULT_FAMILY, { optional: true });
|
|
82
|
+
this.familyScope = inject(UiIconFamilyScope, { optional: true });
|
|
83
|
+
this.families = computed(() => Object.assign({}, UI_ICON_BUILTIN_FAMILIES, ...this.registered ?? []), ...ngDevMode ? [{ debugName: "families" }] : /* istanbul ignore next */ []);
|
|
84
|
+
this.resolvedFamily = computed(() => {
|
|
85
|
+
const key = this.family() ?? this.familyScope?.uiIconFamily() ?? this.configuredDefault ?? "fontawesome";
|
|
86
|
+
const family = this.families()[key];
|
|
87
|
+
if (!family && isDevMode()) console.warn(`[ui-icon] Unknown icon family "${key}". Falling back to "fontawesome".`);
|
|
88
|
+
return family ?? fontAwesomeFamily;
|
|
89
|
+
}, ...ngDevMode ? [{ debugName: "resolvedFamily" }] : /* istanbul ignore next */ []);
|
|
90
|
+
this.classes = computed(() => `ui-icon _${this.size()} ${this.resolvedFamily().classes(this.name(), this.type())}`, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
91
|
+
this.content = computed(() => this.resolvedFamily().content?.(this.name(), this.type()) ?? null, ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
92
|
+
effect(() => {
|
|
93
|
+
if (!this.decorative() && !this.ariaLabel() && isDevMode()) console.warn(`[ui-icon] Meaningful icon "${this.name()}" (decorative=false) has no ariaLabel — it renders role="img" with no accessible name.`);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
static {
|
|
97
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
98
|
+
minVersion: "12.0.0",
|
|
99
|
+
version: "22.3.0",
|
|
100
|
+
ngImport: i0,
|
|
101
|
+
type: UiIcon,
|
|
102
|
+
deps: [],
|
|
103
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
static {
|
|
107
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
108
|
+
minVersion: "17.1.0",
|
|
109
|
+
version: "22.3.0",
|
|
110
|
+
type: UiIcon,
|
|
111
|
+
isStandalone: true,
|
|
112
|
+
selector: "ui-icon",
|
|
113
|
+
inputs: {
|
|
114
|
+
name: {
|
|
115
|
+
classPropertyName: "name",
|
|
116
|
+
publicName: "name",
|
|
117
|
+
isSignal: true,
|
|
118
|
+
isRequired: true,
|
|
119
|
+
transformFunction: null
|
|
120
|
+
},
|
|
121
|
+
size: {
|
|
122
|
+
classPropertyName: "size",
|
|
123
|
+
publicName: "size",
|
|
124
|
+
isSignal: true,
|
|
125
|
+
isRequired: false,
|
|
126
|
+
transformFunction: null
|
|
127
|
+
},
|
|
128
|
+
type: {
|
|
129
|
+
classPropertyName: "type",
|
|
130
|
+
publicName: "type",
|
|
131
|
+
isSignal: true,
|
|
132
|
+
isRequired: false,
|
|
133
|
+
transformFunction: null
|
|
134
|
+
},
|
|
135
|
+
family: {
|
|
136
|
+
classPropertyName: "family",
|
|
137
|
+
publicName: "family",
|
|
138
|
+
isSignal: true,
|
|
139
|
+
isRequired: false,
|
|
140
|
+
transformFunction: null
|
|
141
|
+
},
|
|
142
|
+
decorative: {
|
|
143
|
+
classPropertyName: "decorative",
|
|
144
|
+
publicName: "decorative",
|
|
145
|
+
isSignal: true,
|
|
146
|
+
isRequired: false,
|
|
147
|
+
transformFunction: null
|
|
148
|
+
},
|
|
149
|
+
ariaLabel: {
|
|
150
|
+
classPropertyName: "ariaLabel",
|
|
151
|
+
publicName: "ariaLabel",
|
|
152
|
+
isSignal: true,
|
|
153
|
+
isRequired: false,
|
|
154
|
+
transformFunction: null
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
ngImport: i0,
|
|
158
|
+
template: "<i\n [class]=\"classes()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n [attr.role]=\"decorative() ? null : 'img'\"\n [attr.aria-label]=\"decorative() ? null : ariaLabel()\"\n >{{ content() }}</i\n>\n",
|
|
159
|
+
styles: [":host{display:inline-flex;line-height:0}.ui-icon{display:inline-flex;align-items:center;justify-content:center;min-width:var(--ui-icon-min-size, 1em);min-height:var(--ui-icon-min-size, 1em);aspect-ratio:var(--ui-icon-aspect-ratio, 1);color:inherit;font-size:var(--ui-icon-size, var(--_scale))}.ui-icon._sm{--_scale: var(--ui-icon-size-sm, var(--size-typography-icon-sm))}.ui-icon._md{--_scale: var(--ui-icon-size-md, var(--size-typography-icon-md))}.ui-icon._default{--_scale: var(--ui-icon-size-default, var(--size-typography-icon-default))}.ui-icon._lg{--_scale: var(--ui-icon-size-lg, var(--size-typography-icon-lg))}.ui-icon._xl{--_scale: var(--ui-icon-size-xl, var(--size-typography-icon-xl))}\n"]
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
164
|
+
minVersion: "12.0.0",
|
|
165
|
+
version: "22.3.0",
|
|
166
|
+
ngImport: i0,
|
|
167
|
+
type: UiIcon,
|
|
168
|
+
decorators: [{
|
|
169
|
+
type: Component,
|
|
170
|
+
args: [{
|
|
171
|
+
selector: "ui-icon",
|
|
172
|
+
template: "<i\n [class]=\"classes()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n [attr.role]=\"decorative() ? null : 'img'\"\n [attr.aria-label]=\"decorative() ? null : ariaLabel()\"\n >{{ content() }}</i\n>\n",
|
|
173
|
+
styles: [":host{display:inline-flex;line-height:0}.ui-icon{display:inline-flex;align-items:center;justify-content:center;min-width:var(--ui-icon-min-size, 1em);min-height:var(--ui-icon-min-size, 1em);aspect-ratio:var(--ui-icon-aspect-ratio, 1);color:inherit;font-size:var(--ui-icon-size, var(--_scale))}.ui-icon._sm{--_scale: var(--ui-icon-size-sm, var(--size-typography-icon-sm))}.ui-icon._md{--_scale: var(--ui-icon-size-md, var(--size-typography-icon-md))}.ui-icon._default{--_scale: var(--ui-icon-size-default, var(--size-typography-icon-default))}.ui-icon._lg{--_scale: var(--ui-icon-size-lg, var(--size-typography-icon-lg))}.ui-icon._xl{--_scale: var(--ui-icon-size-xl, var(--size-typography-icon-xl))}\n"]
|
|
174
|
+
}]
|
|
175
|
+
}],
|
|
176
|
+
ctorParameters: () => [],
|
|
177
|
+
propDecorators: {
|
|
178
|
+
name: [{
|
|
179
|
+
type: i0.Input,
|
|
180
|
+
args: [{
|
|
181
|
+
isSignal: true,
|
|
182
|
+
alias: "name",
|
|
183
|
+
required: true
|
|
184
|
+
}]
|
|
185
|
+
}],
|
|
186
|
+
size: [{
|
|
187
|
+
type: i0.Input,
|
|
188
|
+
args: [{
|
|
189
|
+
isSignal: true,
|
|
190
|
+
alias: "size",
|
|
191
|
+
required: false
|
|
192
|
+
}]
|
|
193
|
+
}],
|
|
194
|
+
type: [{
|
|
195
|
+
type: i0.Input,
|
|
196
|
+
args: [{
|
|
197
|
+
isSignal: true,
|
|
198
|
+
alias: "type",
|
|
199
|
+
required: false
|
|
200
|
+
}]
|
|
201
|
+
}],
|
|
202
|
+
family: [{
|
|
203
|
+
type: i0.Input,
|
|
204
|
+
args: [{
|
|
205
|
+
isSignal: true,
|
|
206
|
+
alias: "family",
|
|
207
|
+
required: false
|
|
208
|
+
}]
|
|
209
|
+
}],
|
|
210
|
+
decorative: [{
|
|
211
|
+
type: i0.Input,
|
|
212
|
+
args: [{
|
|
213
|
+
isSignal: true,
|
|
214
|
+
alias: "decorative",
|
|
215
|
+
required: false
|
|
216
|
+
}]
|
|
217
|
+
}],
|
|
218
|
+
ariaLabel: [{
|
|
219
|
+
type: i0.Input,
|
|
220
|
+
args: [{
|
|
221
|
+
isSignal: true,
|
|
222
|
+
alias: "ariaLabel",
|
|
223
|
+
required: false
|
|
224
|
+
}]
|
|
225
|
+
}]
|
|
226
|
+
}
|
|
227
|
+
});
|
|
137
228
|
export { UI_ICON_BUILTIN_FAMILIES, UI_ICON_DEFAULT_FAMILY, UI_ICON_FAMILIES, UiIcon, UiIconFamilyScope, fontAwesomeFamily, provideUiIconFamilies };
|
|
138
|
-
|
|
229
|
+
|
|
230
|
+
//# sourceMappingURL=4sh-ui-kit-base-ui-icon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-base-ui-icon.mjs","sources":["../../../projects/ui-kit/base/ui-icon/src/lib/ui-icon-families.ts","../../../projects/ui-kit/base/ui-icon/src/lib/ui-icon.ts","../../../projects/ui-kit/base/ui-icon/src/lib/ui-icon.html","../../../projects/ui-kit/base/ui-icon/src/public-api.ts","../../../projects/ui-kit/base/ui-icon/src/4sh-ui-kit-base-ui-icon.ts"],"sourcesContent":["import {\n Directive,\n EnvironmentProviders,\n InjectionToken,\n input,\n makeEnvironmentProviders,\n Provider,\n} from '@angular/core';\n\n/** Visual variant of an icon, interpreted by each family (filled vs outlined). */\nexport type UiIconType = 'solid' | 'outline';\n\n/**\n * Describes how an icon font family turns a name + variant into markup, so\n * ui-icon can render any font (FontAwesome, Material Symbols, Bootstrap Icons…).\n */\nexport interface UiIconFamily {\n /** CSS classes applied to the `<i>`. */\n classes: (name: string, type: UiIconType) => string;\n /** Text content of the `<i>` — ligature fonts (e.g. Material Symbols) put the name here. */\n content?: (name: string, type: UiIconType) => string | null;\n}\n\n/** Built-in FontAwesome Free family (the default). */\nexport const fontAwesomeFamily: UiIconFamily = {\n classes: (name, type) => `${type === 'outline' ? 'fa-regular' : 'fa-solid'} fa-${name}`,\n};\n\n/** Families always available, keyed by name. Registered families are merged on top. */\nexport const UI_ICON_BUILTIN_FAMILIES: Record<string, UiIconFamily> = {\n fontawesome: fontAwesomeFamily,\n};\n\n/** Registered icon families (multi provider). Merged over the built-ins. */\nexport const UI_ICON_FAMILIES = new InjectionToken<Record<string, UiIconFamily>[]>(\n 'UI_ICON_FAMILIES',\n);\n\n/** Family key used when a `ui-icon` does not set `family`. */\nexport const UI_ICON_DEFAULT_FAMILY = new InjectionToken<string>('UI_ICON_DEFAULT_FAMILY');\n\nexport function provideUiIconFamilies(\n families: Record<string, UiIconFamily>,\n options?: { default?: string },\n): EnvironmentProviders {\n const providers: Provider[] = [{ provide: UI_ICON_FAMILIES, useValue: families, multi: true }];\n if (options?.default) {\n providers.push({ provide: UI_ICON_DEFAULT_FAMILY, useValue: options.default });\n }\n return makeEnvironmentProviders(providers);\n}\n\n/**\n * uiIconFamily — default icon family for a whole subtree.\n *\n * Every descendant `ui-icon` left without an explicit `family` renders with this\n * one — including the icons a kit component instantiates internally (the\n * datepicker chevrons, the select checkmarks…), which no input exposes. Resolution\n * goes through the element injector, so it also reaches content relocated into a\n * CDK overlay: an overlay panel keeps the injector chain of the template that\n * declared it, not of its DOM position.\n *\n * `family` on a single icon still wins, and a nested directive wins over an outer\n * one. Register the family itself with `provideUiIconFamilies()`.\n *\n * @example\n * ```html\n * <form uiIconFamily=\"material\">…</form>\n * <ui-datepicker uiIconFamily=\"material\" [(ngModel)]=\"date\" valueType=\"date\" />\n * ```\n */\n@Directive({\n selector: '[uiIconFamily]',\n})\nexport class UiIconFamilyScope {\n /** Registered family key applied to descendant icons. Empty/unset = no scope. */\n readonly uiIconFamily = input<string>();\n}\n","import {\n booleanAttribute,\n Component,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\nimport {\n fontAwesomeFamily,\n UI_ICON_BUILTIN_FAMILIES,\n UI_ICON_DEFAULT_FAMILY,\n UI_ICON_FAMILIES,\n UiIconFamily,\n UiIconFamilyScope,\n UiIconType,\n} from './ui-icon-families';\n\nexport type UiIconSize = 'sm' | 'md' | 'default' | 'lg' | 'xl';\nexport type { UiIconType };\n\n/**\n * ui-icon — renders an icon from a configurable font family.\n *\n * FontAwesome is the built-in default. Register other families (Material Symbols,\n * Bootstrap Icons, a custom font…) with `provideUiIconFamilies()`, then pick one per\n * icon via `family`, per subtree via the `uiIconFamily` directive, or app-wide via\n * the provider's `default` option.\n *\n * Accessible: decorative by default (aria-hidden); pass `decorative=false` + `ariaLabel`\n * when the icon conveys meaning on its own.\n */\n@Component({\n selector: 'ui-icon',\n templateUrl: './ui-icon.html',\n styleUrl: './ui-icon.scss',\n})\nexport class UiIcon {\n /** Icon name for the selected family (e.g. \"circle-user\"). */\n name = input.required<string>();\n /** Icon size. */\n size = input<UiIconSize>('default');\n /** Visual variant, interpreted by the family (filled vs outlined). */\n type = input<UiIconType>('solid');\n /** Family key (default: configured default, else \"fontawesome\"). */\n family = input<string>();\n /** Purely decorative icon (hidden from screen readers). */\n decorative = input(true, { transform: booleanAttribute });\n /** Accessible label (required when not decorative). */\n ariaLabel = input<string>();\n\n private readonly registered = inject(UI_ICON_FAMILIES, { optional: true });\n private readonly configuredDefault = inject(UI_ICON_DEFAULT_FAMILY, { optional: true });\n /** Nearest enclosing `uiIconFamily` directive, if any (see {@link UiIconFamilyScope}). */\n private readonly familyScope = inject(UiIconFamilyScope, { optional: true });\n\n /** Built-in families + registered ones (registered win on key clash). */\n private readonly families = computed<Record<string, UiIconFamily>>(() =>\n Object.assign({}, UI_ICON_BUILTIN_FAMILIES, ...(this.registered ?? [])),\n );\n\n /**\n * @ignore Resolved family, falling back to FontAwesome on unknown key.\n * Precedence: own `family` → nearest `uiIconFamily` subtree → app-wide default.\n */\n private readonly resolvedFamily = computed(() => {\n const key =\n this.family() ?? this.familyScope?.uiIconFamily() ?? this.configuredDefault ?? 'fontawesome';\n const family = this.families()[key];\n if (!family && isDevMode()) {\n console.warn(`[ui-icon] Unknown icon family \"${key}\". Falling back to \"fontawesome\".`);\n }\n return family ?? fontAwesomeFamily;\n });\n\n /** @ignore */\n protected readonly classes = computed(\n () => `ui-icon _${this.size()} ${this.resolvedFamily().classes(this.name(), this.type())}`,\n );\n\n /** @ignore Text content for ligature fonts (null for class-based fonts like FontAwesome). */\n protected readonly content = computed(\n () => this.resolvedFamily().content?.(this.name(), this.type()) ?? null,\n );\n\n constructor() {\n effect(() => {\n if (!this.decorative() && !this.ariaLabel() && isDevMode()) {\n console.warn(\n `[ui-icon] Meaningful icon \"${this.name()}\" (decorative=false) has no ariaLabel — ` +\n `it renders role=\"img\" with no accessible name.`,\n );\n }\n });\n }\n}\n","<i\n [class]=\"classes()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n [attr.role]=\"decorative() ? null : 'img'\"\n [attr.aria-label]=\"decorative() ? null : ariaLabel()\"\n >{{ content() }}</i\n>\n","/*\n * Public API Surface of ui-kit/ui-icon\n */\n\nexport * from './lib/ui-icon';\nexport * from './lib/ui-icon-families';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAuBA;AACO,MAAM,iBAAiB,GAAiB;IAC7C,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAA,EAAG,IAAI,KAAK,SAAS,GAAG,YAAY,GAAG,UAAU,CAAA,IAAA,EAAO,IAAI,CAAA,CAAE;;AAGzF;AACO,MAAM,wBAAwB,GAAiC;AACpE,IAAA,WAAW,EAAE,iBAAiB;;AAGhC;MACa,gBAAgB,GAAG,IAAI,cAAc,CAChD,kBAAkB;AAGpB;MACa,sBAAsB,GAAG,IAAI,cAAc,CAAS,wBAAwB;AAEnF,SAAU,qBAAqB,CACnC,QAAsC,EACtC,OAA8B,EAAA;AAE9B,IAAA,MAAM,SAAS,GAAe,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC9F,IAAA,IAAI,OAAO,EAAE,OAAO,EAAE;AACpB,QAAA,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;IAChF;AACA,IAAA,OAAO,wBAAwB,CAAC,SAAS,CAAC;AAC5C;AAEA;;;;;;;;;;;;;;;;;;AAkBG;MAIU,iBAAiB,CAAA;AAH9B,IAAA,WAAA,GAAA;;AAKW,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK;oGAAU;AACxC,IA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,IAAI,CAAC,IAAI,EAAE,CAAA,wCAAA,CAA0C;AACjF,oBAAA,CAAA,8CAAA,CAAgD,CACnD;YACH;AACF,QAAA,CAAC,CAAC;IACJ;8GAzDW,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,mzBCtCnB,0NAOA,EAAA,MAAA,EAAA,CAAA,8rBAAA,CAAA,EAAA,CAAA,CAAA;;2FD+Ba,MAAM,EAAA,UAAA,EAAA,CAAA;kBALlB,SAAS;+BACE,SAAS,EAAA,QAAA,EAAA,0NAAA,EAAA,MAAA,EAAA,CAAA,8rBAAA,CAAA,EAAA;;;AElCrB;;AAEG;;ACFH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-base-ui-icon.mjs","names":[],"sources":["../../../projects/ui-kit/base/ui-icon/src/lib/ui-icon-families.ts","../../../projects/ui-kit/base/ui-icon/src/lib/ui-icon.ts","../../../projects/ui-kit/base/ui-icon/src/lib/ui-icon.html"],"sourcesContent":["import {\n Directive,\n EnvironmentProviders,\n InjectionToken,\n input,\n makeEnvironmentProviders,\n Provider,\n} from '@angular/core';\n\n/** Visual variant of an icon, interpreted by each family (filled vs outlined). */\nexport type UiIconType = 'solid' | 'outline';\n\n/**\n * Describes how an icon font family turns a name + variant into markup, so\n * ui-icon can render any font (FontAwesome, Material Symbols, Bootstrap Icons…).\n */\nexport interface UiIconFamily {\n /** CSS classes applied to the `<i>`. */\n classes: (name: string, type: UiIconType) => string;\n /** Text content of the `<i>` — ligature fonts (e.g. Material Symbols) put the name here. */\n content?: (name: string, type: UiIconType) => string | null;\n}\n\n/** Built-in FontAwesome Free family (the default). */\nexport const fontAwesomeFamily: UiIconFamily = {\n classes: (name, type) => `${type === 'outline' ? 'fa-regular' : 'fa-solid'} fa-${name}`,\n};\n\n/** Families always available, keyed by name. Registered families are merged on top. */\nexport const UI_ICON_BUILTIN_FAMILIES: Record<string, UiIconFamily> = {\n fontawesome: fontAwesomeFamily,\n};\n\n/** Registered icon families (multi provider). Merged over the built-ins. */\nexport const UI_ICON_FAMILIES = new InjectionToken<Record<string, UiIconFamily>[]>(\n 'UI_ICON_FAMILIES',\n);\n\n/** Family key used when a `ui-icon` does not set `family`. */\nexport const UI_ICON_DEFAULT_FAMILY = new InjectionToken<string>('UI_ICON_DEFAULT_FAMILY');\n\nexport function provideUiIconFamilies(\n families: Record<string, UiIconFamily>,\n options?: { default?: string },\n): EnvironmentProviders {\n const providers: Provider[] = [{ provide: UI_ICON_FAMILIES, useValue: families, multi: true }];\n if (options?.default) {\n providers.push({ provide: UI_ICON_DEFAULT_FAMILY, useValue: options.default });\n }\n return makeEnvironmentProviders(providers);\n}\n\n/**\n * uiIconFamily — default icon family for a whole subtree.\n *\n * Every descendant `ui-icon` left without an explicit `family` renders with this\n * one — including the icons a kit component instantiates internally (the\n * datepicker chevrons, the select checkmarks…), which no input exposes. Resolution\n * goes through the element injector, so it also reaches content relocated into a\n * CDK overlay: an overlay panel keeps the injector chain of the template that\n * declared it, not of its DOM position.\n *\n * `family` on a single icon still wins, and a nested directive wins over an outer\n * one. Register the family itself with `provideUiIconFamilies()`.\n *\n * @example\n * ```html\n * <form uiIconFamily=\"material\">…</form>\n * <ui-datepicker uiIconFamily=\"material\" [(ngModel)]=\"date\" valueType=\"date\" />\n * ```\n */\n@Directive({\n selector: '[uiIconFamily]',\n})\nexport class UiIconFamilyScope {\n /** Registered family key applied to descendant icons. Empty/unset = no scope. */\n readonly uiIconFamily = input<string>();\n}\n","import {\n booleanAttribute,\n Component,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\nimport {\n fontAwesomeFamily,\n UI_ICON_BUILTIN_FAMILIES,\n UI_ICON_DEFAULT_FAMILY,\n UI_ICON_FAMILIES,\n UiIconFamily,\n UiIconFamilyScope,\n UiIconType,\n} from './ui-icon-families';\n\nexport type UiIconSize = 'sm' | 'md' | 'default' | 'lg' | 'xl';\nexport type { UiIconType };\n\n/**\n * ui-icon — renders an icon from a configurable font family.\n *\n * FontAwesome is the built-in default. Register other families (Material Symbols,\n * Bootstrap Icons, a custom font…) with `provideUiIconFamilies()`, then pick one per\n * icon via `family`, per subtree via the `uiIconFamily` directive, or app-wide via\n * the provider's `default` option.\n *\n * Accessible: decorative by default (aria-hidden); pass `decorative=false` + `ariaLabel`\n * when the icon conveys meaning on its own.\n */\n@Component({\n selector: 'ui-icon',\n templateUrl: './ui-icon.html',\n styleUrl: './ui-icon.scss',\n})\nexport class UiIcon {\n /** Icon name for the selected family (e.g. \"circle-user\"). */\n name = input.required<string>();\n /** Icon size. */\n size = input<UiIconSize>('default');\n /** Visual variant, interpreted by the family (filled vs outlined). */\n type = input<UiIconType>('solid');\n /** Family key (default: configured default, else \"fontawesome\"). */\n family = input<string>();\n /** Purely decorative icon (hidden from screen readers). */\n decorative = input(true, { transform: booleanAttribute });\n /** Accessible label (required when not decorative). */\n ariaLabel = input<string>();\n\n private readonly registered = inject(UI_ICON_FAMILIES, { optional: true });\n private readonly configuredDefault = inject(UI_ICON_DEFAULT_FAMILY, { optional: true });\n /** Nearest enclosing `uiIconFamily` directive, if any (see {@link UiIconFamilyScope}). */\n private readonly familyScope = inject(UiIconFamilyScope, { optional: true });\n\n /** Built-in families + registered ones (registered win on key clash). */\n private readonly families = computed<Record<string, UiIconFamily>>(() =>\n Object.assign({}, UI_ICON_BUILTIN_FAMILIES, ...(this.registered ?? [])),\n );\n\n /**\n * @ignore Resolved family, falling back to FontAwesome on unknown key.\n * Precedence: own `family` → nearest `uiIconFamily` subtree → app-wide default.\n */\n private readonly resolvedFamily = computed(() => {\n const key =\n this.family() ?? this.familyScope?.uiIconFamily() ?? this.configuredDefault ?? 'fontawesome';\n const family = this.families()[key];\n if (!family && isDevMode()) {\n console.warn(`[ui-icon] Unknown icon family \"${key}\". Falling back to \"fontawesome\".`);\n }\n return family ?? fontAwesomeFamily;\n });\n\n /** @ignore */\n protected readonly classes = computed(\n () => `ui-icon _${this.size()} ${this.resolvedFamily().classes(this.name(), this.type())}`,\n );\n\n /** @ignore Text content for ligature fonts (null for class-based fonts like FontAwesome). */\n protected readonly content = computed(\n () => this.resolvedFamily().content?.(this.name(), this.type()) ?? null,\n );\n\n constructor() {\n effect(() => {\n if (!this.decorative() && !this.ariaLabel() && isDevMode()) {\n console.warn(\n `[ui-icon] Meaningful icon \"${this.name()}\" (decorative=false) has no ariaLabel — ` +\n `it renders role=\"img\" with no accessible name.`,\n );\n }\n });\n }\n}\n","<i\n [class]=\"classes()\"\n [attr.aria-hidden]=\"decorative() ? 'true' : null\"\n [attr.role]=\"decorative() ? null : 'img'\"\n [attr.aria-label]=\"decorative() ? null : ariaLabel()\"\n >{{ content() }}</i\n>\n"],"mappings":";;AAwBA,MAAa,oBAAkC,EAC7C,UAAU,MAAM,SAAS,GAAG,SAAS,YAAY,eAAe,WAAU,MAAO,OAClF;AAGD,MAAa,2BAAyD,EACpE,aAAa,kBACd;AAGD,MAAa,mBAAmB,IAAI,eAClC,kBAAkB;AAIpB,MAAa,yBAAyB,IAAI,eAAuB,wBAAwB;AAEzF,SAAgB,sBACd,UACA,SAA8B;CAE9B,MAAM,YAAwB,CAAC;EAAE,SAAS;EAAkB,UAAU;EAAU,OAAO;CAAI,CAAE;CAC7F,IAAI,SAAS,SACX,UAAU,KAAK;EAAE,SAAS;EAAwB,UAAU,QAAQ;CAAO,CAAE;CAE/E,OAAO,yBAAyB,SAAS;AAC3C;AAwBA,IAAa,oBAAb,MAAa,kBAAiB;CAH9B,cAAA;EAKW,KAAA,eAAe,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACxC;CAHY;EAAA,KAAA,OAAA,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