@joanroucoux/cairn-ui 0.9.1 → 0.10.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs +3 -3
  3. package/fesm2022/joanroucoux-cairn-ui-alert.mjs +3 -3
  4. package/fesm2022/joanroucoux-cairn-ui-amount.mjs +3 -3
  5. package/fesm2022/joanroucoux-cairn-ui-async.mjs +3 -3
  6. package/fesm2022/joanroucoux-cairn-ui-avatar.mjs +6 -6
  7. package/fesm2022/joanroucoux-cairn-ui-back-link.mjs +4 -4
  8. package/fesm2022/joanroucoux-cairn-ui-back-link.mjs.map +1 -1
  9. package/fesm2022/joanroucoux-cairn-ui-badge.mjs +3 -3
  10. package/fesm2022/joanroucoux-cairn-ui-button.mjs +3 -3
  11. package/fesm2022/joanroucoux-cairn-ui-card.mjs +3 -3
  12. package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs +3 -3
  13. package/fesm2022/joanroucoux-cairn-ui-delta.mjs +3 -3
  14. package/fesm2022/joanroucoux-cairn-ui-dialog.mjs +4 -4
  15. package/fesm2022/joanroucoux-cairn-ui-dialog.mjs.map +1 -1
  16. package/fesm2022/joanroucoux-cairn-ui-donut.mjs +3 -3
  17. package/fesm2022/joanroucoux-cairn-ui-drawer.mjs +9 -8
  18. package/fesm2022/joanroucoux-cairn-ui-drawer.mjs.map +1 -1
  19. package/fesm2022/joanroucoux-cairn-ui-empty.mjs +3 -3
  20. package/fesm2022/joanroucoux-cairn-ui-external-link.mjs +3 -3
  21. package/fesm2022/joanroucoux-cairn-ui-fact.mjs +6 -6
  22. package/fesm2022/joanroucoux-cairn-ui-field.mjs +9 -9
  23. package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs +3 -3
  24. package/fesm2022/joanroucoux-cairn-ui-group-header.mjs +3 -3
  25. package/fesm2022/joanroucoux-cairn-ui-icon-toggle.mjs +43 -0
  26. package/fesm2022/joanroucoux-cairn-ui-icon-toggle.mjs.map +1 -0
  27. package/fesm2022/joanroucoux-cairn-ui-input.mjs +6 -6
  28. package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs +3 -3
  29. package/fesm2022/joanroucoux-cairn-ui-menu.mjs +9 -9
  30. package/fesm2022/joanroucoux-cairn-ui-meter.mjs +3 -3
  31. package/fesm2022/joanroucoux-cairn-ui-motion.mjs +29 -20
  32. package/fesm2022/joanroucoux-cairn-ui-motion.mjs.map +1 -1
  33. package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs +3 -3
  34. package/fesm2022/joanroucoux-cairn-ui-result-group.mjs +3 -3
  35. package/fesm2022/joanroucoux-cairn-ui-row.mjs +16 -16
  36. package/fesm2022/joanroucoux-cairn-ui-row.mjs.map +1 -1
  37. package/fesm2022/joanroucoux-cairn-ui-segmented.mjs +3 -3
  38. package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs +3 -3
  39. package/fesm2022/joanroucoux-cairn-ui-select.mjs +3 -3
  40. package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs +3 -3
  41. package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs +3 -3
  42. package/fesm2022/joanroucoux-cairn-ui-stat.mjs +3 -3
  43. package/fesm2022/joanroucoux-cairn-ui-switch.mjs +3 -3
  44. package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs +6 -6
  45. package/fesm2022/joanroucoux-cairn-ui-table.mjs +29 -29
  46. package/fesm2022/joanroucoux-cairn-ui-table.mjs.map +1 -1
  47. package/fesm2022/joanroucoux-cairn-ui-toast.mjs +6 -6
  48. package/package.json +5 -1
  49. package/styles/theme.css +1 -0
  50. package/styles/tokens.css +1 -0
  51. package/types/joanroucoux-cairn-ui-drawer.d.ts +2 -0
  52. package/types/joanroucoux-cairn-ui-icon-toggle.d.ts +13 -0
  53. package/types/joanroucoux-cairn-ui-motion.d.ts +5 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { DestroyRef, Directive, ElementRef, Injectable, afterNextRender, effect, inject, input, signal, untracked } from "@angular/core";
2
+ import { DestroyRef, Directive, ElementRef, Injectable, afterNextRender, effect, inject, input, output, signal, untracked } from "@angular/core";
3
3
  var FlipItems = class FlipItems {
4
4
  items = /* @__PURE__ */ new Set();
5
5
  destroyed = /* @__PURE__ */ new Set();
@@ -25,7 +25,7 @@ var FlipItems = class FlipItems {
25
25
  }
26
26
  static ɵfac = i0.ɵɵngDeclareFactory({
27
27
  minVersion: "12.0.0",
28
- version: "22.2.0",
28
+ version: "22.2.1",
29
29
  ngImport: i0,
30
30
  type: FlipItems,
31
31
  deps: [],
@@ -33,14 +33,14 @@ var FlipItems = class FlipItems {
33
33
  });
34
34
  static ɵprov = i0.ɵɵngDeclareInjectable({
35
35
  minVersion: "12.0.0",
36
- version: "22.2.0",
36
+ version: "22.2.1",
37
37
  ngImport: i0,
38
38
  type: FlipItems
39
39
  });
40
40
  };
41
41
  i0.ɵɵngDeclareClassMetadata({
42
42
  minVersion: "12.0.0",
43
- version: "22.2.0",
43
+ version: "22.2.1",
44
44
  ngImport: i0,
45
45
  type: FlipItems,
46
46
  decorators: [{ type: Injectable }]
@@ -151,7 +151,7 @@ var UiFlipList = class UiFlipList {
151
151
  }
152
152
  static ɵfac = i0.ɵɵngDeclareFactory({
153
153
  minVersion: "12.0.0",
154
- version: "22.2.0",
154
+ version: "22.2.1",
155
155
  ngImport: i0,
156
156
  type: UiFlipList,
157
157
  deps: [],
@@ -159,7 +159,7 @@ var UiFlipList = class UiFlipList {
159
159
  });
160
160
  static ɵdir = i0.ɵɵngDeclareDirective({
161
161
  minVersion: "14.0.0",
162
- version: "22.2.0",
162
+ version: "22.2.1",
163
163
  type: UiFlipList,
164
164
  isStandalone: true,
165
165
  selector: "[uiFlipList]",
@@ -169,7 +169,7 @@ var UiFlipList = class UiFlipList {
169
169
  };
170
170
  i0.ɵɵngDeclareClassMetadata({
171
171
  minVersion: "12.0.0",
172
- version: "22.2.0",
172
+ version: "22.2.1",
173
173
  ngImport: i0,
174
174
  type: UiFlipList,
175
175
  decorators: [{
@@ -192,7 +192,7 @@ var UiFlipItem = class UiFlipItem {
192
192
  }
193
193
  static ɵfac = i0.ɵɵngDeclareFactory({
194
194
  minVersion: "12.0.0",
195
- version: "22.2.0",
195
+ version: "22.2.1",
196
196
  ngImport: i0,
197
197
  type: UiFlipItem,
198
198
  deps: [],
@@ -200,7 +200,7 @@ var UiFlipItem = class UiFlipItem {
200
200
  });
201
201
  static ɵdir = i0.ɵɵngDeclareDirective({
202
202
  minVersion: "14.0.0",
203
- version: "22.2.0",
203
+ version: "22.2.1",
204
204
  type: UiFlipItem,
205
205
  isStandalone: true,
206
206
  selector: "[uiFlipItem]",
@@ -209,7 +209,7 @@ var UiFlipItem = class UiFlipItem {
209
209
  };
210
210
  i0.ɵɵngDeclareClassMetadata({
211
211
  minVersion: "12.0.0",
212
- version: "22.2.0",
212
+ version: "22.2.1",
213
213
  ngImport: i0,
214
214
  type: UiFlipItem,
215
215
  decorators: [{
@@ -228,6 +228,7 @@ function paintedElements(host) {
228
228
  }
229
229
  var UiHighlight = class UiHighlight {
230
230
  uiHighlight = input(null, ...ngDevMode ? [{ debugName: "uiHighlight" }] : /* istanbul ignore next */ []);
231
+ highlighted = output();
231
232
  host = inject(ElementRef).nativeElement;
232
233
  reduced = injectReducedMotion();
233
234
  cancel = null;
@@ -310,6 +311,7 @@ var UiHighlight = class UiHighlight {
310
311
  },
311
312
  { offset: 1 }
312
313
  ], { duration: total }));
314
+ this.highlighted.emit();
313
315
  };
314
316
  const frame = requestAnimationFrame(() => {
315
317
  const remaining = Array.from(/* @__PURE__ */ new Set([this.host, ...painted])).flatMap((element) => element.getAnimations()).map((animation) => {
@@ -330,7 +332,7 @@ var UiHighlight = class UiHighlight {
330
332
  }
331
333
  static ɵfac = i0.ɵɵngDeclareFactory({
332
334
  minVersion: "12.0.0",
333
- version: "22.2.0",
335
+ version: "22.2.1",
334
336
  ngImport: i0,
335
337
  type: UiHighlight,
336
338
  deps: [],
@@ -338,7 +340,7 @@ var UiHighlight = class UiHighlight {
338
340
  });
339
341
  static ɵdir = i0.ɵɵngDeclareDirective({
340
342
  minVersion: "17.1.0",
341
- version: "22.2.0",
343
+ version: "22.2.1",
342
344
  type: UiHighlight,
343
345
  isStandalone: true,
344
346
  selector: "[uiHighlight]",
@@ -349,12 +351,13 @@ var UiHighlight = class UiHighlight {
349
351
  isRequired: false,
350
352
  transformFunction: null
351
353
  } },
354
+ outputs: { highlighted: "highlighted" },
352
355
  ngImport: i0
353
356
  });
354
357
  };
355
358
  i0.ɵɵngDeclareClassMetadata({
356
359
  minVersion: "12.0.0",
357
- version: "22.2.0",
360
+ version: "22.2.1",
358
361
  ngImport: i0,
359
362
  type: UiHighlight,
360
363
  decorators: [{
@@ -362,14 +365,20 @@ i0.ɵɵngDeclareClassMetadata({
362
365
  args: [{ selector: "[uiHighlight]" }]
363
366
  }],
364
367
  ctorParameters: () => [],
365
- propDecorators: { uiHighlight: [{
366
- type: i0.Input,
367
- args: [{
368
- isSignal: true,
369
- alias: "uiHighlight",
370
- required: false
368
+ propDecorators: {
369
+ uiHighlight: [{
370
+ type: i0.Input,
371
+ args: [{
372
+ isSignal: true,
373
+ alias: "uiHighlight",
374
+ required: false
375
+ }]
376
+ }],
377
+ highlighted: [{
378
+ type: i0.Output,
379
+ args: ["highlighted"]
371
380
  }]
372
- }] }
381
+ }
373
382
  });
374
383
  function holdTransitionsUntilRendered() {
375
384
  const host = inject(ElementRef).nativeElement;
@@ -1 +1 @@
1
- {"version":3,"file":"joanroucoux-cairn-ui-motion.mjs","names":[],"sources":["../../../projects/ui/motion/internal/flip-items.ts","../../../projects/ui/motion/internal/tokens.ts","../../../projects/ui/motion/reduced-motion.ts","../../../projects/ui/motion/flip-list.ts","../../../projects/ui/motion/highlight.ts","../../../projects/ui/motion/settle-transitions.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class FlipItems {\n private readonly items = new Set<HTMLElement>();\n private readonly destroyed = new Set<HTMLElement>();\n private used = false;\n\n get marked(): boolean {\n return this.used;\n }\n\n add(item: HTMLElement): void {\n this.used = true;\n this.items.add(item);\n }\n\n remove(item: HTMLElement): void {\n this.destroyed.add(item);\n }\n\n inside(host: HTMLElement): HTMLElement[] {\n const inside: HTMLElement[] = [];\n for (const item of this.items) {\n if (host.contains(item)) {\n inside.push(item);\n } else if (this.destroyed.has(item)) {\n this.items.delete(item);\n this.destroyed.delete(item);\n }\n }\n return inside;\n }\n}\n","export function readDuration(element: Element, name: string, fallback: number): number {\n const raw = getComputedStyle(element).getPropertyValue(name).trim();\n const value = parseFloat(raw);\n if (Number.isNaN(value)) {\n return fallback;\n }\n return raw.endsWith('ms') ? value : value * 1000;\n}\n\nexport function readEasing(element: Element, name: string, fallback: string): string {\n return getComputedStyle(element).getPropertyValue(name).trim() || fallback;\n}\n","import { DestroyRef, type Signal, inject, signal } from '@angular/core';\n\nconst QUERY = '(prefers-reduced-motion: reduce)';\n\n/**\n * A signal that follows the user's `prefers-reduced-motion` preference. Call it in an injection\n * context.\n *\n * @example\n * protected readonly reduced = injectReducedMotion();\n */\nexport function injectReducedMotion(): Signal<boolean> {\n if (typeof matchMedia === 'undefined') {\n return signal(false).asReadonly();\n }\n\n const query = matchMedia(QUERY);\n const reduced = signal(query.matches);\n const listener = (event: { matches: boolean }): void => reduced.set(event.matches);\n\n query.addEventListener('change', listener);\n inject(DestroyRef).onDestroy(() => query.removeEventListener('change', listener));\n\n return reduced.asReadonly();\n}\n","import { DestroyRef, Directive, ElementRef, afterNextRender, inject } from '@angular/core';\n\nimport { FlipItems } from './internal/flip-items';\nimport { readDuration, readEasing } from './internal/tokens';\nimport { injectReducedMotion } from './reduced-motion';\n\nfunction translateY(element: Element): number {\n const matrix = /^matrix\\((.+)\\)$/.exec(getComputedStyle(element).transform);\n return matrix ? parseFloat((matrix[1] as string).split(',')[5] as string) : 0;\n}\n\n/**\n * Slides the items of a list into place when one is removed or inserted (FLIP). Pair it with\n * `animate.leave=\"ui-leave-fade\"` on the item so it fades out first. Nothing moves under\n * `prefers-reduced-motion`.\n *\n * The items are the direct children of the list. Mark them with `uiFlipItem` instead when they sit\n * deeper, so a removal also slides the groups below. Only an item added or removed starts a slide;\n * a change inside an item does not.\n *\n * @example\n * <ul uiFlipList>\n * @for (key of keys(); track key.id) {\n * <li uiListRow animate.leave=\"ui-leave-fade\">...</li>\n * }\n * </ul>\n *\n * <table uiTable uiFlipList>\n * @for (group of groups(); track group.id) {\n * <tbody>\n * <tr uiTr group uiFlipItem>...</tr>\n * @for (row of group.rows; track row.id) {\n * <tr uiTr uiFlipItem animate.leave=\"ui-leave-fade\">...</tr>\n * }\n * </tbody>\n * }\n * </table>\n */\n@Directive({\n selector: '[uiFlipList]',\n providers: [FlipItems],\n})\nexport class UiFlipList {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly reduced = injectReducedMotion();\n private readonly mutations = new MutationObserver(() => this.onChange());\n private readonly resizes = new ResizeObserver(() => {\n this.tops = this.measure();\n });\n private readonly running = new Map<HTMLElement, Animation>();\n private readonly watched = new Set<HTMLElement>();\n private readonly items = inject(FlipItems, { self: true });\n private tops = new Map<HTMLElement, number>();\n private shifts = new Map<Element, number>();\n\n constructor() {\n afterNextRender(() => {\n this.tops = this.measure();\n this.mutations.observe(this.host, { childList: true, subtree: true });\n this.resizes.observe(this.host);\n });\n\n inject(DestroyRef).onDestroy(() => {\n this.mutations.disconnect();\n this.resizes.disconnect();\n });\n }\n\n private tracked(): HTMLElement[] {\n if (!this.items.marked) {\n return Array.from(this.host.children).filter((child): child is HTMLElement => child instanceof HTMLElement);\n }\n return this.items.inside(this.host);\n }\n\n private measure(): Map<HTMLElement, number> {\n const elements = this.tracked();\n const origin = this.host.getBoundingClientRect().top - this.host.scrollTop;\n const tops = new Map(elements.map((element) => [element, element.getBoundingClientRect().top - origin]));\n\n this.shifts = new Map();\n for (const animation of this.host.getAnimations({ subtree: true })) {\n const target = (animation.effect as KeyframeEffect).target as Element;\n if (target !== this.host) {\n this.shifts.set(target, translateY(target));\n }\n }\n for (const [moving, shift] of this.shifts) {\n for (const [element, top] of tops) {\n if (moving.contains(element)) {\n tops.set(element, top - shift);\n }\n }\n }\n\n for (const element of elements) {\n if (!this.watched.has(element)) {\n this.watched.add(element);\n this.resizes.observe(element);\n }\n }\n for (const element of this.watched) {\n if (!tops.has(element)) {\n this.watched.delete(element);\n this.running.delete(element);\n this.resizes.unobserve(element);\n }\n }\n return tops;\n }\n\n private onChange(): void {\n const before = this.tops;\n const after = this.measure();\n this.tops = after;\n\n const changed = after.size !== before.size || Array.from(after.keys()).some((element) => !before.has(element));\n if (this.reduced() || !changed) {\n return;\n }\n\n const duration = readDuration(this.host, '--duration-base', 260);\n const easing = readEasing(this.host, '--ease-out', 'ease-out');\n const moved = (element: HTMLElement): number => (before.get(element) ?? 0) - (after.get(element) ?? 0);\n\n for (const [element] of after) {\n if (!before.has(element)) {\n continue;\n }\n const own = moved(element) - moved(this.parentItem(element, before, after));\n if (Math.abs(own) < 0.5) {\n continue;\n }\n const from = own + (this.shifts.get(element) ?? 0);\n this.running.get(element)?.cancel();\n const animation = element.animate([{ transform: `translateY(${from}px)` }, { transform: 'translateY(0)' }], {\n duration,\n easing,\n });\n animation.onfinish = () => {\n if (this.running.get(element) === animation) {\n this.running.delete(element);\n }\n };\n this.running.set(element, animation);\n }\n }\n\n private parentItem(\n element: HTMLElement,\n before: Map<HTMLElement, number>,\n after: Map<HTMLElement, number>,\n ): HTMLElement {\n let node = element.parentElement as HTMLElement;\n while (node !== this.host && !(before.has(node) && after.has(node))) {\n node = node.parentElement as HTMLElement;\n }\n return node;\n }\n}\n\n/**\n * Marks an element as an item of the nearest `uiFlipList`, at any depth. Once one item is marked,\n * the list follows its marked items only.\n *\n * @example\n * <tr uiTr uiFlipItem animate.leave=\"ui-leave-fade\">...</tr>\n */\n@Directive({\n selector: '[uiFlipItem]',\n})\nexport class UiFlipItem {\n constructor() {\n const items = inject(FlipItems, { optional: true });\n if (items) {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n items.add(element);\n inject(DestroyRef).onDestroy(() => items.remove(element));\n }\n }\n}\n","import { DestroyRef, Directive, ElementRef, effect, inject, input, untracked } from '@angular/core';\n\nimport { readDuration, readEasing } from './internal/tokens';\nimport { injectReducedMotion } from './reduced-motion';\n\nconst HOLD_MS = 200;\nconst SCROLL_SETTLE_MS = 200;\nconst SCROLL_START_MS = 300;\n\nfunction paintedElements(host: HTMLElement): HTMLElement[] {\n if (host.tagName === 'TR') {\n return Array.from(host.children).filter((cell): cell is HTMLElement => cell instanceof HTMLElement);\n }\n if (host.hasAttribute('ui-group-cell') && host.firstElementChild instanceof HTMLElement) {\n return [host.firstElementChild];\n }\n return [host];\n}\n\n/**\n * Draws the eye to an element that just changed: scrolls it into view when off screen, flashes the\n * `--soft` fill, then fades back. Each new non-null token plays once, so pass a fresh value per\n * event (an object or a counter), not a boolean. A non-null token present at first render plays on\n * arrival. Can sit on the same element as `animate.enter`: it waits for that fade to finish.\n *\n * Give the element `scroll-margin-top` and `scroll-margin-bottom` equal to what is pinned above and\n * below it (header, tab bar, action bar), or a row under them counts as on screen. For an arrival\n * on a page opened at the element, scroll to it first (`scrollIntoView` in `afterNextRender`) and\n * set the token afterwards, otherwise it scrolls smoothly from where the page is.\n *\n * @example\n * <a ui-row [uiHighlight]=\"changed() === holding.id ? token() : null\" routerLink=\"/holdings/1\">...</a>\n */\n@Directive({\n selector: '[uiHighlight]',\n})\nexport class UiHighlight {\n readonly uiHighlight = input<unknown>(null);\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly reduced = injectReducedMotion();\n private cancel: (() => void) | null = null;\n\n constructor() {\n effect(() => {\n const token = this.uiHighlight();\n if (token === null || token === undefined) {\n return;\n }\n untracked(() => this.play());\n });\n\n inject(DestroyRef).onDestroy(() => this.cancel?.());\n }\n\n private play(): void {\n this.cancel?.();\n\n if (this.isVisible()) {\n this.cancel = this.flash();\n return;\n }\n\n const reduced = this.reduced();\n this.host.scrollIntoView({ behavior: reduced ? 'auto' : 'smooth', block: 'center' });\n\n if (reduced) {\n this.cancel = this.flash();\n return;\n }\n\n let stopFlash: (() => void) | null = null;\n let timer: ReturnType<typeof setTimeout>;\n const moves = (event: Event): boolean =>\n event.target === document || (event.target instanceof Node && event.target.contains(this.host));\n const start = (): void => {\n stopListening();\n stopFlash = this.flash();\n };\n const onScrollEnd = (event: Event): void => {\n if (moves(event)) {\n start();\n }\n };\n const onScroll = (event: Event): void => {\n if (moves(event)) {\n clearTimeout(timer);\n timer = setTimeout(start, SCROLL_SETTLE_MS);\n }\n };\n const stopListening = (): void => {\n clearTimeout(timer);\n window.removeEventListener('scrollend', onScrollEnd, true);\n window.removeEventListener('scroll', onScroll, true);\n };\n timer = setTimeout(start, SCROLL_START_MS);\n window.addEventListener('scrollend', onScrollEnd, true);\n window.addEventListener('scroll', onScroll, true);\n\n this.cancel = () => {\n stopListening();\n stopFlash?.();\n };\n }\n\n private isVisible(): boolean {\n const rect = this.host.getBoundingClientRect();\n const style = getComputedStyle(this.host);\n const top = parseFloat(style.scrollMarginTop) || 0;\n const bottom = parseFloat(style.scrollMarginBottom) || 0;\n return rect.top >= top && rect.bottom <= window.innerHeight - bottom;\n }\n\n private flash(): () => void {\n const painted = paintedElements(this.host);\n let animations: Animation[] = [];\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const paint = (): void => {\n const fade = readDuration(this.host, '--duration-highlight', 1200);\n const easing = readEasing(this.host, '--ease-out', 'ease-out');\n const total = HOLD_MS + fade;\n animations = painted.map((element) =>\n element.animate(\n [\n { backgroundColor: 'var(--soft)', offset: 0 },\n { backgroundColor: 'var(--soft)', offset: HOLD_MS / total, easing },\n { offset: 1 },\n ],\n { duration: total },\n ),\n );\n };\n\n const frame = requestAnimationFrame(() => {\n const remaining = Array.from(new Set([this.host, ...painted]))\n .flatMap((element) => element.getAnimations())\n .map((animation) => {\n const timing = (animation.effect as AnimationEffect).getComputedTiming();\n return Number(timing.endTime) - Number(timing.localTime ?? 0);\n })\n .filter((left) => Number.isFinite(left));\n if (remaining.length === 0) {\n paint();\n return;\n }\n timer = setTimeout(paint, Math.min(Math.max(...remaining), readDuration(this.host, '--duration-base', 260)));\n });\n\n return () => {\n cancelAnimationFrame(frame);\n clearTimeout(timer);\n animations.forEach((animation) => animation.cancel());\n };\n }\n}\n","import { ElementRef, afterNextRender, inject } from '@angular/core';\n\n/**\n * Holds the transitions of the host and of everything inside it until two frames after its first\n * render, so bound classes do not animate on page open. Call it in an injection context. A host\n * whose view is never refreshed (a detached change detector) never gets its transitions back.\n *\n * @example\n * constructor() {\n * holdTransitionsUntilRendered();\n * }\n */\nexport function holdTransitionsUntilRendered(): void {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n host.setAttribute('data-ui-settling', '');\n afterNextRender({\n read: () => {\n requestAnimationFrame(() => requestAnimationFrame(() => host.removeAttribute('data-ui-settling')));\n },\n });\n}\n"],"mappings":";;AAGA,IAAa,YAAb,MAAa,UAAS;CACH,wBAAQ,IAAI,IAAG;CACf,4BAAY,IAAI,IAAG;CAC5B,OAAO;CAEf,IAAI,SAAM;EACR,OAAO,KAAK;CACd;CAEA,IAAI,MAAiB;EACnB,KAAK,OAAO;EACZ,KAAK,MAAM,IAAI,IAAI;CACrB;CAEA,OAAO,MAAiB;EACtB,KAAK,UAAU,IAAI,IAAI;CACzB;CAEA,OAAO,MAAiB;EACtB,MAAM,SAAwB,CAAA;EAC9B,KAAK,MAAM,QAAQ,KAAK,OACtB,IAAI,KAAK,SAAS,IAAI,GACpB,OAAO,KAAK,IAAI;OACX,IAAI,KAAK,UAAU,IAAI,IAAI,GAAG;GACnC,KAAK,MAAM,OAAO,IAAI;GACtB,KAAK,UAAU,OAAO,IAAI;EAC5B;EAEF,OAAO;CACT;CA7B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AA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EAHvB,MAAA;EAAU,MAAA,CAAA,EACT,UAAU,gBACX,CAAA;;;;;;;;;;;;ACvBD,SAAgB,+BAA4B;CAC1C,MAAM,OAAO,OAAgC,UAAU,CAAC,CAAC;CAEzD,KAAK,aAAa,oBAAoB,EAAE;CACxC,gBAAgB,EACd,YAAW;EACT,4BAA4B,4BAA4B,KAAK,gBAAgB,kBAAkB,CAAC,CAAC;CACnG,EACD,CAAA;AACH"}
1
+ {"version":3,"file":"joanroucoux-cairn-ui-motion.mjs","names":[],"sources":["../../../projects/ui/motion/internal/flip-items.ts","../../../projects/ui/motion/internal/tokens.ts","../../../projects/ui/motion/reduced-motion.ts","../../../projects/ui/motion/flip-list.ts","../../../projects/ui/motion/highlight.ts","../../../projects/ui/motion/settle-transitions.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class FlipItems {\n private readonly items = new Set<HTMLElement>();\n private readonly destroyed = new Set<HTMLElement>();\n private used = false;\n\n get marked(): boolean {\n return this.used;\n }\n\n add(item: HTMLElement): void {\n this.used = true;\n this.items.add(item);\n }\n\n remove(item: HTMLElement): void {\n this.destroyed.add(item);\n }\n\n inside(host: HTMLElement): HTMLElement[] {\n const inside: HTMLElement[] = [];\n for (const item of this.items) {\n if (host.contains(item)) {\n inside.push(item);\n } else if (this.destroyed.has(item)) {\n this.items.delete(item);\n this.destroyed.delete(item);\n }\n }\n return inside;\n }\n}\n","export function readDuration(element: Element, name: string, fallback: number): number {\n const raw = getComputedStyle(element).getPropertyValue(name).trim();\n const value = parseFloat(raw);\n if (Number.isNaN(value)) {\n return fallback;\n }\n return raw.endsWith('ms') ? value : value * 1000;\n}\n\nexport function readEasing(element: Element, name: string, fallback: string): string {\n return getComputedStyle(element).getPropertyValue(name).trim() || fallback;\n}\n","import { DestroyRef, type Signal, inject, signal } from '@angular/core';\n\nconst QUERY = '(prefers-reduced-motion: reduce)';\n\n/**\n * A signal that follows the user's `prefers-reduced-motion` preference. Call it in an injection\n * context.\n *\n * @example\n * protected readonly reduced = injectReducedMotion();\n */\nexport function injectReducedMotion(): Signal<boolean> {\n if (typeof matchMedia === 'undefined') {\n return signal(false).asReadonly();\n }\n\n const query = matchMedia(QUERY);\n const reduced = signal(query.matches);\n const listener = (event: { matches: boolean }): void => reduced.set(event.matches);\n\n query.addEventListener('change', listener);\n inject(DestroyRef).onDestroy(() => query.removeEventListener('change', listener));\n\n return reduced.asReadonly();\n}\n","import { DestroyRef, Directive, ElementRef, afterNextRender, inject } from '@angular/core';\n\nimport { FlipItems } from './internal/flip-items';\nimport { readDuration, readEasing } from './internal/tokens';\nimport { injectReducedMotion } from './reduced-motion';\n\nfunction translateY(element: Element): number {\n const matrix = /^matrix\\((.+)\\)$/.exec(getComputedStyle(element).transform);\n return matrix ? parseFloat((matrix[1] as string).split(',')[5] as string) : 0;\n}\n\n/**\n * Slides the items of a list into place when one is removed or inserted (FLIP). Pair it with\n * `animate.leave=\"ui-leave-fade\"` on the item so it fades out first. Nothing moves under\n * `prefers-reduced-motion`.\n *\n * The items are the direct children of the list. Mark them with `uiFlipItem` instead when they sit\n * deeper, so a removal also slides the groups below. Only an item added or removed starts a slide;\n * a change inside an item does not.\n *\n * @example\n * <ul uiFlipList>\n * @for (key of keys(); track key.id) {\n * <li uiListRow animate.leave=\"ui-leave-fade\">...</li>\n * }\n * </ul>\n *\n * <table uiTable uiFlipList>\n * @for (group of groups(); track group.id) {\n * <tbody>\n * <tr uiTr group uiFlipItem>...</tr>\n * @for (row of group.rows; track row.id) {\n * <tr uiTr uiFlipItem animate.leave=\"ui-leave-fade\">...</tr>\n * }\n * </tbody>\n * }\n * </table>\n */\n@Directive({\n selector: '[uiFlipList]',\n providers: [FlipItems],\n})\nexport class UiFlipList {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly reduced = injectReducedMotion();\n private readonly mutations = new MutationObserver(() => this.onChange());\n private readonly resizes = new ResizeObserver(() => {\n this.tops = this.measure();\n });\n private readonly running = new Map<HTMLElement, Animation>();\n private readonly watched = new Set<HTMLElement>();\n private readonly items = inject(FlipItems, { self: true });\n private tops = new Map<HTMLElement, number>();\n private shifts = new Map<Element, number>();\n\n constructor() {\n afterNextRender(() => {\n this.tops = this.measure();\n this.mutations.observe(this.host, { childList: true, subtree: true });\n this.resizes.observe(this.host);\n });\n\n inject(DestroyRef).onDestroy(() => {\n this.mutations.disconnect();\n this.resizes.disconnect();\n });\n }\n\n private tracked(): HTMLElement[] {\n if (!this.items.marked) {\n return Array.from(this.host.children).filter((child): child is HTMLElement => child instanceof HTMLElement);\n }\n return this.items.inside(this.host);\n }\n\n private measure(): Map<HTMLElement, number> {\n const elements = this.tracked();\n const origin = this.host.getBoundingClientRect().top - this.host.scrollTop;\n const tops = new Map(elements.map((element) => [element, element.getBoundingClientRect().top - origin]));\n\n this.shifts = new Map();\n for (const animation of this.host.getAnimations({ subtree: true })) {\n const target = (animation.effect as KeyframeEffect).target as Element;\n if (target !== this.host) {\n this.shifts.set(target, translateY(target));\n }\n }\n for (const [moving, shift] of this.shifts) {\n for (const [element, top] of tops) {\n if (moving.contains(element)) {\n tops.set(element, top - shift);\n }\n }\n }\n\n for (const element of elements) {\n if (!this.watched.has(element)) {\n this.watched.add(element);\n this.resizes.observe(element);\n }\n }\n for (const element of this.watched) {\n if (!tops.has(element)) {\n this.watched.delete(element);\n this.running.delete(element);\n this.resizes.unobserve(element);\n }\n }\n return tops;\n }\n\n private onChange(): void {\n const before = this.tops;\n const after = this.measure();\n this.tops = after;\n\n const changed = after.size !== before.size || Array.from(after.keys()).some((element) => !before.has(element));\n if (this.reduced() || !changed) {\n return;\n }\n\n const duration = readDuration(this.host, '--duration-base', 260);\n const easing = readEasing(this.host, '--ease-out', 'ease-out');\n const moved = (element: HTMLElement): number => (before.get(element) ?? 0) - (after.get(element) ?? 0);\n\n for (const [element] of after) {\n if (!before.has(element)) {\n continue;\n }\n const own = moved(element) - moved(this.parentItem(element, before, after));\n if (Math.abs(own) < 0.5) {\n continue;\n }\n const from = own + (this.shifts.get(element) ?? 0);\n this.running.get(element)?.cancel();\n const animation = element.animate([{ transform: `translateY(${from}px)` }, { transform: 'translateY(0)' }], {\n duration,\n easing,\n });\n animation.onfinish = () => {\n if (this.running.get(element) === animation) {\n this.running.delete(element);\n }\n };\n this.running.set(element, animation);\n }\n }\n\n private parentItem(\n element: HTMLElement,\n before: Map<HTMLElement, number>,\n after: Map<HTMLElement, number>,\n ): HTMLElement {\n let node = element.parentElement as HTMLElement;\n while (node !== this.host && !(before.has(node) && after.has(node))) {\n node = node.parentElement as HTMLElement;\n }\n return node;\n }\n}\n\n/**\n * Marks an element as an item of the nearest `uiFlipList`, at any depth. Once one item is marked,\n * the list follows its marked items only.\n *\n * @example\n * <tr uiTr uiFlipItem animate.leave=\"ui-leave-fade\">...</tr>\n */\n@Directive({\n selector: '[uiFlipItem]',\n})\nexport class UiFlipItem {\n constructor() {\n const items = inject(FlipItems, { optional: true });\n if (items) {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n items.add(element);\n inject(DestroyRef).onDestroy(() => items.remove(element));\n }\n }\n}\n","import { DestroyRef, Directive, ElementRef, effect, inject, input, output, untracked } from '@angular/core';\n\nimport { readDuration, readEasing } from './internal/tokens';\nimport { injectReducedMotion } from './reduced-motion';\n\nconst HOLD_MS = 200;\nconst SCROLL_SETTLE_MS = 200;\nconst SCROLL_START_MS = 300;\n\nfunction paintedElements(host: HTMLElement): HTMLElement[] {\n if (host.tagName === 'TR') {\n return Array.from(host.children).filter((cell): cell is HTMLElement => cell instanceof HTMLElement);\n }\n if (host.hasAttribute('ui-group-cell') && host.firstElementChild instanceof HTMLElement) {\n return [host.firstElementChild];\n }\n return [host];\n}\n\n/**\n * Draws the eye to an element that just changed: scrolls it into view when off screen, flashes the\n * `--soft` fill, then fades back. Each new non-null token plays once, so pass a fresh value per\n * event (an object or a counter), not a boolean. A non-null token present at first render plays on\n * arrival. Can sit on the same element as `animate.enter`: it waits for that fade to finish.\n * `highlighted` fires when the flash starts, after any scroll and enter fade, so a toast can follow it.\n *\n * Give the element `scroll-margin-top` and `scroll-margin-bottom` equal to what is pinned above and\n * below it (header, tab bar, action bar), or a row under them counts as on screen. For an arrival\n * on a page opened at the element, scroll to it first (`scrollIntoView` in `afterNextRender`) and\n * set the token afterwards, otherwise it scrolls smoothly from where the page is.\n *\n * @example\n * <a ui-row [uiHighlight]=\"changed() === holding.id ? token() : null\" routerLink=\"/holdings/1\">...</a>\n */\n@Directive({\n selector: '[uiHighlight]',\n})\nexport class UiHighlight {\n readonly uiHighlight = input<unknown>(null);\n readonly highlighted = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly reduced = injectReducedMotion();\n private cancel: (() => void) | null = null;\n\n constructor() {\n effect(() => {\n const token = this.uiHighlight();\n if (token === null || token === undefined) {\n return;\n }\n untracked(() => this.play());\n });\n\n inject(DestroyRef).onDestroy(() => this.cancel?.());\n }\n\n private play(): void {\n this.cancel?.();\n\n if (this.isVisible()) {\n this.cancel = this.flash();\n return;\n }\n\n const reduced = this.reduced();\n this.host.scrollIntoView({ behavior: reduced ? 'auto' : 'smooth', block: 'center' });\n\n if (reduced) {\n this.cancel = this.flash();\n return;\n }\n\n let stopFlash: (() => void) | null = null;\n let timer: ReturnType<typeof setTimeout>;\n const moves = (event: Event): boolean =>\n event.target === document || (event.target instanceof Node && event.target.contains(this.host));\n const start = (): void => {\n stopListening();\n stopFlash = this.flash();\n };\n const onScrollEnd = (event: Event): void => {\n if (moves(event)) {\n start();\n }\n };\n const onScroll = (event: Event): void => {\n if (moves(event)) {\n clearTimeout(timer);\n timer = setTimeout(start, SCROLL_SETTLE_MS);\n }\n };\n const stopListening = (): void => {\n clearTimeout(timer);\n window.removeEventListener('scrollend', onScrollEnd, true);\n window.removeEventListener('scroll', onScroll, true);\n };\n timer = setTimeout(start, SCROLL_START_MS);\n window.addEventListener('scrollend', onScrollEnd, true);\n window.addEventListener('scroll', onScroll, true);\n\n this.cancel = () => {\n stopListening();\n stopFlash?.();\n };\n }\n\n private isVisible(): boolean {\n const rect = this.host.getBoundingClientRect();\n const style = getComputedStyle(this.host);\n const top = parseFloat(style.scrollMarginTop) || 0;\n const bottom = parseFloat(style.scrollMarginBottom) || 0;\n return rect.top >= top && rect.bottom <= window.innerHeight - bottom;\n }\n\n private flash(): () => void {\n const painted = paintedElements(this.host);\n let animations: Animation[] = [];\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n const paint = (): void => {\n const fade = readDuration(this.host, '--duration-highlight', 1200);\n const easing = readEasing(this.host, '--ease-out', 'ease-out');\n const total = HOLD_MS + fade;\n animations = painted.map((element) =>\n element.animate(\n [\n { backgroundColor: 'var(--soft)', offset: 0 },\n { backgroundColor: 'var(--soft)', offset: HOLD_MS / total, easing },\n { offset: 1 },\n ],\n { duration: total },\n ),\n );\n this.highlighted.emit();\n };\n\n const frame = requestAnimationFrame(() => {\n const remaining = Array.from(new Set([this.host, ...painted]))\n .flatMap((element) => element.getAnimations())\n .map((animation) => {\n const timing = (animation.effect as AnimationEffect).getComputedTiming();\n return Number(timing.endTime) - Number(timing.localTime ?? 0);\n })\n .filter((left) => Number.isFinite(left));\n if (remaining.length === 0) {\n paint();\n return;\n }\n timer = setTimeout(paint, Math.min(Math.max(...remaining), readDuration(this.host, '--duration-base', 260)));\n });\n\n return () => {\n cancelAnimationFrame(frame);\n clearTimeout(timer);\n animations.forEach((animation) => animation.cancel());\n };\n }\n}\n","import { ElementRef, afterNextRender, inject } from '@angular/core';\n\n/**\n * Holds the transitions of the host and of everything inside it until two frames after its first\n * render, so bound classes do not animate on page open. Call it in an injection context. A host\n * whose view is never refreshed (a detached change detector) never gets its transitions back.\n *\n * @example\n * constructor() {\n * holdTransitionsUntilRendered();\n * }\n */\nexport function holdTransitionsUntilRendered(): void {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n host.setAttribute('data-ui-settling', '');\n afterNextRender({\n read: () => {\n requestAnimationFrame(() => requestAnimationFrame(() => host.removeAttribute('data-ui-settling')));\n },\n });\n}\n"],"mappings":";;AAGA,IAAa,YAAb,MAAa,UAAS;CACH,wBAAQ,IAAI,IAAG;CACf,4BAAY,IAAI,IAAG;CAC5B,OAAO;CAEf,IAAI,SAAM;EACR,OAAO,KAAK;CACd;CAEA,IAAI,MAAiB;EACnB,KAAK,OAAO;EACZ,KAAK,MAAM,IAAI,IAAI;CACrB;CAEA,OAAO,MAAiB;EACtB,KAAK,UAAU,IAAI,IAAI;CACzB;CAEA,OAAO,MAAiB;EACtB,MAAM,SAAwB,CAAA;EAC9B,KAAK,MAAM,QAAQ,KAAK,OACtB,IAAI,KAAK,SAAS,IAAI,GACpB,OAAO,KAAK,IAAI;OACX,IAAI,KAAK,UAAU,IAAI,IAAI,GAAG;GACnC,KAAK,MAAM,OAAO,IAAI;GACtB,KAAK,UAAU,OAAO,IAAI;EAC5B;EAEF,OAAO;CACT;CA7BW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAS,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAT,OAAA,QAAA,GAAA,sBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;CAAS,CAAA;;AAAT,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA,EADrB,MAAA,WAAA,CAAA;;ACFD,SAAgB,aAAa,SAAkB,MAAc,UAAgB;CAC3E,MAAM,MAAM,iBAAiB,OAAO,CAAC,CAAC,iBAAiB,IAAI,CAAC,CAAC,KAAI;CACjE,MAAM,QAAQ,WAAW,GAAG;CAC5B,IAAI,OAAO,MAAM,KAAK,GACpB,OAAO;CAET,OAAO,IAAI,SAAS,IAAI,IAAI,QAAQ,QAAQ;AAC9C;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,SAAS,OAAO,SAAS,IAAI,CAAC;GACzC,IAAI,UAAU,WAAW,GAAG;IAC1B,MAAK;IACL;GACF;GACA,QAAQ,WAAW,OAAO,KAAK,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG,aAAa,KAAK,MAAM,mBAAmB,GAAG,CAAC,CAAC;EAC7G,CAAC;EAED,aAAY;GACV,qBAAqB,KAAK;GAC1B,aAAa,KAAK;GAClB,WAAW,SAAS,cAAc,UAAU,OAAM,CAAE;EACtD;CACF;CAxHW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAW,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAX,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAW,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,aAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,SAAA,EAAA,aAAA,cAAA;EAAA,UAAA;CAAA,CAAA;;AAAX,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EAHvB,MAAA;EAAU,MAAA,CAAA,EACT,UAAU,gBACX,CAAA;;;;;;;;;;;;;;;;;;ACxBD,SAAgB,+BAA4B;CAC1C,MAAM,OAAO,OAAgC,UAAU,CAAC,CAAC;CAEzD,KAAK,aAAa,oBAAoB,EAAE;CACxC,gBAAgB,EACd,YAAW;EACT,4BAA4B,4BAA4B,KAAK,gBAAgB,kBAAkB,CAAC,CAAC;CACnG,EACD,CAAA;AACH"}
@@ -15,7 +15,7 @@ var UiNavItem = class UiNavItem {
15
15
  }
16
16
  static ɵfac = i0.ɵɵngDeclareFactory({
17
17
  minVersion: "12.0.0",
18
- version: "22.2.0",
18
+ version: "22.2.1",
19
19
  ngImport: i0,
20
20
  type: UiNavItem,
21
21
  deps: [],
@@ -23,7 +23,7 @@ var UiNavItem = class UiNavItem {
23
23
  });
24
24
  static ɵcmp = i0.ɵɵngDeclareComponent({
25
25
  minVersion: "17.1.0",
26
- version: "22.2.0",
26
+ version: "22.2.1",
27
27
  type: UiNavItem,
28
28
  isStandalone: true,
29
29
  selector: "a[ui-nav-item]",
@@ -45,7 +45,7 @@ var UiNavItem = class UiNavItem {
45
45
  };
46
46
  i0.ɵɵngDeclareClassMetadata({
47
47
  minVersion: "12.0.0",
48
- version: "22.2.0",
48
+ version: "22.2.1",
49
49
  ngImport: i0,
50
50
  type: UiNavItem,
51
51
  decorators: [{
@@ -14,7 +14,7 @@ var UiResultGroup = class UiResultGroup {
14
14
  animation = PULSE_ANIMATION;
15
15
  static ɵfac = i0.ɵɵngDeclareFactory({
16
16
  minVersion: "12.0.0",
17
- version: "22.2.0",
17
+ version: "22.2.1",
18
18
  ngImport: i0,
19
19
  type: UiResultGroup,
20
20
  deps: [],
@@ -22,7 +22,7 @@ var UiResultGroup = class UiResultGroup {
22
22
  });
23
23
  static ɵcmp = i0.ɵɵngDeclareComponent({
24
24
  minVersion: "17.0.0",
25
- version: "22.2.0",
25
+ version: "22.2.1",
26
26
  type: UiResultGroup,
27
27
  isStandalone: true,
28
28
  selector: "ui-result-group",
@@ -93,7 +93,7 @@ var UiResultGroup = class UiResultGroup {
93
93
  };
94
94
  i0.ɵɵngDeclareClassMetadata({
95
95
  minVersion: "12.0.0",
96
- version: "22.2.0",
96
+ version: "22.2.1",
97
97
  ngImport: i0,
98
98
  type: UiResultGroup,
99
99
  decorators: [{
@@ -20,7 +20,7 @@ const SIZE_CLASSES = {
20
20
  lg: "min-h-15",
21
21
  xl: "min-h-18 pointer-fine:min-h-17",
22
22
  card: "min-h-17",
23
- dense: "min-h-14 lg:min-h-12"
23
+ dense: "min-h-14"
24
24
  };
25
25
  const SIZE_GAPS = {
26
26
  md: "gap-2.5",
@@ -77,7 +77,7 @@ var UiRow = class UiRow {
77
77
  }
78
78
  static ɵfac = i0.ɵɵngDeclareFactory({
79
79
  minVersion: "12.0.0",
80
- version: "22.2.0",
80
+ version: "22.2.1",
81
81
  ngImport: i0,
82
82
  type: UiRow,
83
83
  deps: [],
@@ -85,7 +85,7 @@ var UiRow = class UiRow {
85
85
  });
86
86
  static ɵcmp = i0.ɵɵngDeclareComponent({
87
87
  minVersion: "17.0.0",
88
- version: "22.2.0",
88
+ version: "22.2.1",
89
89
  type: UiRow,
90
90
  isStandalone: true,
91
91
  selector: "a[ui-row], button[ui-row]",
@@ -175,7 +175,7 @@ var UiRow = class UiRow {
175
175
  };
176
176
  i0.ɵɵngDeclareClassMetadata({
177
177
  minVersion: "12.0.0",
178
- version: "22.2.0",
178
+ version: "22.2.1",
179
179
  ngImport: i0,
180
180
  type: UiRow,
181
181
  decorators: [{
@@ -276,7 +276,7 @@ i0.ɵɵngDeclareClassMetadata({
276
276
  var UiRowItem = class UiRowItem {
277
277
  static ɵfac = i0.ɵɵngDeclareFactory({
278
278
  minVersion: "12.0.0",
279
- version: "22.2.0",
279
+ version: "22.2.1",
280
280
  ngImport: i0,
281
281
  type: UiRowItem,
282
282
  deps: [],
@@ -284,7 +284,7 @@ var UiRowItem = class UiRowItem {
284
284
  });
285
285
  static ɵdir = i0.ɵɵngDeclareDirective({
286
286
  minVersion: "14.0.0",
287
- version: "22.2.0",
287
+ version: "22.2.1",
288
288
  type: UiRowItem,
289
289
  isStandalone: true,
290
290
  selector: "[uiRowItem]",
@@ -294,7 +294,7 @@ var UiRowItem = class UiRowItem {
294
294
  };
295
295
  i0.ɵɵngDeclareClassMetadata({
296
296
  minVersion: "12.0.0",
297
- version: "22.2.0",
297
+ version: "22.2.1",
298
298
  ngImport: i0,
299
299
  type: UiRowItem,
300
300
  decorators: [{
@@ -313,7 +313,7 @@ var UiListRow = class UiListRow {
313
313
  classes = computed(() => this.ruled() ? "flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17 shadow-[inset_0_-1px_0_var(--hairline)]" : "flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17", ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
314
314
  static ɵfac = i0.ɵɵngDeclareFactory({
315
315
  minVersion: "12.0.0",
316
- version: "22.2.0",
316
+ version: "22.2.1",
317
317
  ngImport: i0,
318
318
  type: UiListRow,
319
319
  deps: [],
@@ -321,7 +321,7 @@ var UiListRow = class UiListRow {
321
321
  });
322
322
  static ɵdir = i0.ɵɵngDeclareDirective({
323
323
  minVersion: "17.1.0",
324
- version: "22.2.0",
324
+ version: "22.2.1",
325
325
  type: UiListRow,
326
326
  isStandalone: true,
327
327
  selector: "[uiListRow]",
@@ -338,7 +338,7 @@ var UiListRow = class UiListRow {
338
338
  };
339
339
  i0.ɵɵngDeclareClassMetadata({
340
340
  minVersion: "12.0.0",
341
- version: "22.2.0",
341
+ version: "22.2.1",
342
342
  ngImport: i0,
343
343
  type: UiListRow,
344
344
  decorators: [{
@@ -360,7 +360,7 @@ i0.ɵɵngDeclareClassMetadata({
360
360
  var UiRowGroup = class UiRowGroup {
361
361
  static ɵfac = i0.ɵɵngDeclareFactory({
362
362
  minVersion: "12.0.0",
363
- version: "22.2.0",
363
+ version: "22.2.1",
364
364
  ngImport: i0,
365
365
  type: UiRowGroup,
366
366
  deps: [],
@@ -368,7 +368,7 @@ var UiRowGroup = class UiRowGroup {
368
368
  });
369
369
  static ɵdir = i0.ɵɵngDeclareDirective({
370
370
  minVersion: "14.0.0",
371
- version: "22.2.0",
371
+ version: "22.2.1",
372
372
  type: UiRowGroup,
373
373
  isStandalone: true,
374
374
  selector: "[uiRowGroup]",
@@ -378,7 +378,7 @@ var UiRowGroup = class UiRowGroup {
378
378
  };
379
379
  i0.ɵɵngDeclareClassMetadata({
380
380
  minVersion: "12.0.0",
381
- version: "22.2.0",
381
+ version: "22.2.1",
382
382
  ngImport: i0,
383
383
  type: UiRowGroup,
384
384
  decorators: [{
@@ -392,7 +392,7 @@ i0.ɵɵngDeclareClassMetadata({
392
392
  var UiRowTile = class UiRowTile {
393
393
  static ɵfac = i0.ɵɵngDeclareFactory({
394
394
  minVersion: "12.0.0",
395
- version: "22.2.0",
395
+ version: "22.2.1",
396
396
  ngImport: i0,
397
397
  type: UiRowTile,
398
398
  deps: [],
@@ -400,7 +400,7 @@ var UiRowTile = class UiRowTile {
400
400
  });
401
401
  static ɵdir = i0.ɵɵngDeclareDirective({
402
402
  minVersion: "14.0.0",
403
- version: "22.2.0",
403
+ version: "22.2.1",
404
404
  type: UiRowTile,
405
405
  isStandalone: true,
406
406
  selector: "[uiRowTile]",
@@ -410,7 +410,7 @@ var UiRowTile = class UiRowTile {
410
410
  };
411
411
  i0.ɵɵngDeclareClassMetadata({
412
412
  minVersion: "12.0.0",
413
- version: "22.2.0",
413
+ version: "22.2.1",
414
414
  ngImport: i0,
415
415
  type: UiRowTile,
416
416
  decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"joanroucoux-cairn-ui-row.mjs","names":[],"sources":["../../../projects/ui/row/row.ts"],"sourcesContent":["import { Component, DestroyRef, Directive, ElementRef, booleanAttribute, computed, inject, input } from '@angular/core';\n\nimport { holdTransitionsUntilRendered } from '@joanroucoux/cairn-ui/motion';\n\nexport const ROW_SIZES = ['md', 'lg', 'xl', 'card', 'dense'] as const;\nexport type RowSize = (typeof ROW_SIZES)[number];\n\nexport const ROW_PADDINGS = ['md', 'sm', 'none'] as const;\nexport type RowPadding = (typeof ROW_PADDINGS)[number];\n\nexport const ROW_GAPS = ['default', 'sm'] as const;\nexport type RowGap = (typeof ROW_GAPS)[number];\n\nexport const ROW_TRAILINGS = ['none', 'chevron'] as const;\nexport type RowTrailing = (typeof ROW_TRAILINGS)[number];\n\nconst SIZE_CLASSES: Record<RowSize, string> = {\n md: 'min-h-14',\n lg: 'min-h-15',\n xl: 'min-h-18 pointer-fine:min-h-17',\n card: 'min-h-17',\n dense: 'min-h-14 lg:min-h-12',\n};\n\nconst SIZE_GAPS: Record<RowSize, string> = { md: 'gap-2.5', lg: 'gap-2.5', xl: 'gap-3', card: 'gap-2', dense: 'gap-3' };\n\nconst PADDING_CLASSES: Record<RowPadding, string> = { md: 'px-2.5', sm: 'px-2', none: 'px-0' };\n\nconst BASE_CLASSES =\n 'flex w-full items-center py-1.5 rounded-control text-left select-none touch-manipulation focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring)';\n\nconst INTERACTIVE_CLASSES =\n 'transition-[scale,background-color] [transition-duration:var(--duration-press),var(--duration-fast)] ease-out hover:bg-(--glow) active:bg-(--soft) active:scale-(--press-scale)';\n\nconst CHEVRON_CLASSES = 'min-h-(--row-min) gap-3 px-0 hover:text-(--muted-foreground)';\n\nconst CHEVRON_INTERACTIVE_CLASSES = 'transition-colors [transition-duration:var(--duration-fast)] ease-out';\n\nconst UNAVAILABLE_CLASSES = 'opacity-50 cursor-not-allowed';\n\nconst SELECTED_CLASSES = 'bg-(--soft)';\n\n/**\n * Clickable row of a list: a holding, an account, a search result. With `trailing=\"chevron\"` it is a\n * flush link row: no side padding, a 16 px chevron at the end, the text dimming on hover.\n *\n * @example\n * <a ui-row [selected]=\"holding.id === openId()\" [routerLink]=\"['/holdings', holding.id]\">\n * {{ holding.name }}\n * </a>\n */\n@Component({\n selector: 'a[ui-row], button[ui-row]',\n template: `\n <ng-content />\n @if (trailing() === 'chevron') {\n <svg\n aria-hidden=\"true\"\n class=\"block flex-none fill-none stroke-(--subtle-foreground)\"\n height=\"16\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.75\"\n viewBox=\"0 0 24 24\"\n width=\"16\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n }\n @if (busy()) {\n <span\n aria-hidden=\"true\"\n class=\"rounded-pill animate-cairn-spin size-4 flex-none border-2 border-current border-r-transparent\"\n ></span>\n }\n `,\n host: {\n '[class]': 'classes()',\n '[attr.aria-busy]': 'busy() || null',\n '[attr.aria-disabled]': \"busy() || unavailable() ? 'true' : null\",\n '[attr.aria-current]': \"selected() ? 'true' : null\",\n },\n})\nexport class UiRow {\n readonly selected = input(false, { transform: booleanAttribute });\n readonly busy = input(false, { transform: booleanAttribute });\n readonly unavailable = input(false, { transform: booleanAttribute });\n readonly size = input<RowSize>('md');\n readonly padding = input<RowPadding>('md');\n readonly gap = input<RowGap>('default');\n readonly trailing = input<RowTrailing>('none');\n\n protected readonly classes = computed(() => {\n const chevron = this.trailing() === 'chevron';\n const layout = chevron\n ? CHEVRON_CLASSES\n : `${SIZE_CLASSES[this.size()]} ${this.gap() === 'sm' ? 'gap-2' : SIZE_GAPS[this.size()]} ${PADDING_CLASSES[this.padding()]}`;\n const interactive = chevron ? CHEVRON_INTERACTIVE_CLASSES : INTERACTIVE_CLASSES;\n\n return `${BASE_CLASSES} ${layout}${this.unavailable() ? ` ${UNAVAILABLE_CLASSES}` : ` ${interactive}`}${this.selected() ? ` ${SELECTED_CLASSES}` : ''}${this.busy() ? ' pointer-events-none' : ''}`;\n });\n\n constructor() {\n holdTransitionsUntilRendered();\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const guard = (event: Event): void => {\n if (this.busy() || this.unavailable()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n host.addEventListener('click', guard, { capture: true });\n inject(DestroyRef).onDestroy(() => host.removeEventListener('click', guard, { capture: true }));\n }\n}\n\n/**\n * Lays out a `ui-row` with a trailing action beside it, such as a \"more\" icon button.\n *\n * @example\n * <div uiRowItem>\n * <a ui-row size=\"xl\" padding=\"sm\" routerLink=\"/accounts/1\">...</a>\n * <button ui-button variant=\"quiet\" size=\"icon-sm\" aria-label=\"Account actions\">...</button>\n * </div>\n */\n@Directive({\n selector: '[uiRowItem]',\n host: {\n class:\n 'flex items-center gap-1 [&>[ui-row]]:w-auto [&>[ui-row]]:min-w-0 [&>[ui-row]]:flex-1 [&>:not([ui-row])]:flex-none',\n },\n})\nexport class UiRowItem {}\n\n/**\n * Non-interactive row of a list, separated from the next by a hairline: a passkey with its delete\n * button, a device, a setting. Put it on an `li` or a `div`. Use `ui-row` instead when the whole\n * row is a link or an action.\n *\n * @example\n * <ul>\n * <li uiListRow>\n * <span class=\"flex-1\">MacBook Air</span>\n * <button ui-button variant=\"quiet-destructive\" size=\"icon-sm\" aria-label=\"Delete MacBook Air\">...</button>\n * </li>\n * </ul>\n */\n@Directive({\n selector: '[uiListRow]',\n host: { '[class]': 'classes()' },\n})\nexport class UiListRow {\n readonly ruled = input(true, { transform: booleanAttribute });\n\n protected readonly classes = computed(() =>\n this.ruled()\n ? 'flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17 shadow-[inset_0_-1px_0_var(--hairline)]'\n : 'flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17',\n );\n}\n\n/**\n * Groups link rows under a hairline, as the \"other ways\" links under a search list. Put it on a `div`\n * around `ui-row` with `trailing=\"chevron\"`.\n *\n * @example\n * <div uiRowGroup>\n * <button ui-row type=\"button\" trailing=\"chevron\">Saisir à la main</button>\n * </div>\n */\n@Directive({\n selector: '[uiRowGroup]',\n host: { class: 'flex flex-col pt-1 shadow-[inset_0_1px_0_var(--hairline)]' },\n})\nexport class UiRowGroup {}\n\n/**\n * The filled tile that leads a row, holding an icon. Put it on a `span` as the first child of a\n * `ui-row` or a `uiListRow`.\n *\n * @example\n * <a ui-row size=\"xl\" padding=\"sm\" href=\"/export\">\n * <span uiRowTile><svg lucideDownload [size]=\"18\" /></span>\n * Export\n * </a>\n */\n@Directive({\n selector: '[uiRowTile]',\n host: { class: 'rounded-control grid size-9 flex-none place-items-center bg-(--muted)' },\n})\nexport class UiRowTile {}\n"],"mappings":";;;AAIA,MAAa,YAAY;CAAC;CAAM;CAAM;CAAM;CAAQ;AAAO;AAG3D,MAAa,eAAe;CAAC;CAAM;CAAM;AAAM;AAG/C,MAAa,WAAW,CAAC,WAAW,IAAI;AAGxC,MAAa,gBAAgB,CAAC,QAAQ,SAAS;AAG/C,MAAM,eAAwC;CAC5C,IAA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AAS;CAAT,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAS,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAT,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAS,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,wEAAA;EAAA,UAAA;CAAA,CAAA;;AAAT,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAJrB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EAAE,OAAO,wEAAuE;EACvF,CAAA"}
1
+ {"version":3,"file":"joanroucoux-cairn-ui-row.mjs","names":[],"sources":["../../../projects/ui/row/row.ts"],"sourcesContent":["import { Component, DestroyRef, Directive, ElementRef, booleanAttribute, computed, inject, input } from '@angular/core';\n\nimport { holdTransitionsUntilRendered } from '@joanroucoux/cairn-ui/motion';\n\nexport const ROW_SIZES = ['md', 'lg', 'xl', 'card', 'dense'] as const;\nexport type RowSize = (typeof ROW_SIZES)[number];\n\nexport const ROW_PADDINGS = ['md', 'sm', 'none'] as const;\nexport type RowPadding = (typeof ROW_PADDINGS)[number];\n\nexport const ROW_GAPS = ['default', 'sm'] as const;\nexport type RowGap = (typeof ROW_GAPS)[number];\n\nexport const ROW_TRAILINGS = ['none', 'chevron'] as const;\nexport type RowTrailing = (typeof ROW_TRAILINGS)[number];\n\nconst SIZE_CLASSES: Record<RowSize, string> = {\n md: 'min-h-14',\n lg: 'min-h-15',\n xl: 'min-h-18 pointer-fine:min-h-17',\n card: 'min-h-17',\n dense: 'min-h-14',\n};\n\nconst SIZE_GAPS: Record<RowSize, string> = { md: 'gap-2.5', lg: 'gap-2.5', xl: 'gap-3', card: 'gap-2', dense: 'gap-3' };\n\nconst PADDING_CLASSES: Record<RowPadding, string> = { md: 'px-2.5', sm: 'px-2', none: 'px-0' };\n\nconst BASE_CLASSES =\n 'flex w-full items-center py-1.5 rounded-control text-left select-none touch-manipulation focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring)';\n\nconst INTERACTIVE_CLASSES =\n 'transition-[scale,background-color] [transition-duration:var(--duration-press),var(--duration-fast)] ease-out hover:bg-(--glow) active:bg-(--soft) active:scale-(--press-scale)';\n\nconst CHEVRON_CLASSES = 'min-h-(--row-min) gap-3 px-0 hover:text-(--muted-foreground)';\n\nconst CHEVRON_INTERACTIVE_CLASSES = 'transition-colors [transition-duration:var(--duration-fast)] ease-out';\n\nconst UNAVAILABLE_CLASSES = 'opacity-50 cursor-not-allowed';\n\nconst SELECTED_CLASSES = 'bg-(--soft)';\n\n/**\n * Clickable row of a list: a holding, an account, a search result. With `trailing=\"chevron\"` it is a\n * flush link row: no side padding, a 16 px chevron at the end, the text dimming on hover.\n *\n * @example\n * <a ui-row [selected]=\"holding.id === openId()\" [routerLink]=\"['/holdings', holding.id]\">\n * {{ holding.name }}\n * </a>\n */\n@Component({\n selector: 'a[ui-row], button[ui-row]',\n template: `\n <ng-content />\n @if (trailing() === 'chevron') {\n <svg\n aria-hidden=\"true\"\n class=\"block flex-none fill-none stroke-(--subtle-foreground)\"\n height=\"16\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.75\"\n viewBox=\"0 0 24 24\"\n width=\"16\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n }\n @if (busy()) {\n <span\n aria-hidden=\"true\"\n class=\"rounded-pill animate-cairn-spin size-4 flex-none border-2 border-current border-r-transparent\"\n ></span>\n }\n `,\n host: {\n '[class]': 'classes()',\n '[attr.aria-busy]': 'busy() || null',\n '[attr.aria-disabled]': \"busy() || unavailable() ? 'true' : null\",\n '[attr.aria-current]': \"selected() ? 'true' : null\",\n },\n})\nexport class UiRow {\n readonly selected = input(false, { transform: booleanAttribute });\n readonly busy = input(false, { transform: booleanAttribute });\n readonly unavailable = input(false, { transform: booleanAttribute });\n readonly size = input<RowSize>('md');\n readonly padding = input<RowPadding>('md');\n readonly gap = input<RowGap>('default');\n readonly trailing = input<RowTrailing>('none');\n\n protected readonly classes = computed(() => {\n const chevron = this.trailing() === 'chevron';\n const layout = chevron\n ? CHEVRON_CLASSES\n : `${SIZE_CLASSES[this.size()]} ${this.gap() === 'sm' ? 'gap-2' : SIZE_GAPS[this.size()]} ${PADDING_CLASSES[this.padding()]}`;\n const interactive = chevron ? CHEVRON_INTERACTIVE_CLASSES : INTERACTIVE_CLASSES;\n\n return `${BASE_CLASSES} ${layout}${this.unavailable() ? ` ${UNAVAILABLE_CLASSES}` : ` ${interactive}`}${this.selected() ? ` ${SELECTED_CLASSES}` : ''}${this.busy() ? ' pointer-events-none' : ''}`;\n });\n\n constructor() {\n holdTransitionsUntilRendered();\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const guard = (event: Event): void => {\n if (this.busy() || this.unavailable()) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n host.addEventListener('click', guard, { capture: true });\n inject(DestroyRef).onDestroy(() => host.removeEventListener('click', guard, { capture: true }));\n }\n}\n\n/**\n * Lays out a `ui-row` with a trailing action beside it, such as a \"more\" icon button.\n *\n * @example\n * <div uiRowItem>\n * <a ui-row size=\"xl\" padding=\"sm\" routerLink=\"/accounts/1\">...</a>\n * <button ui-button variant=\"quiet\" size=\"icon-sm\" aria-label=\"Account actions\">...</button>\n * </div>\n */\n@Directive({\n selector: '[uiRowItem]',\n host: {\n class:\n 'flex items-center gap-1 [&>[ui-row]]:w-auto [&>[ui-row]]:min-w-0 [&>[ui-row]]:flex-1 [&>:not([ui-row])]:flex-none',\n },\n})\nexport class UiRowItem {}\n\n/**\n * Non-interactive row of a list, separated from the next by a hairline: a passkey with its delete\n * button, a device, a setting. Put it on an `li` or a `div`. Use `ui-row` instead when the whole\n * row is a link or an action.\n *\n * @example\n * <ul>\n * <li uiListRow>\n * <span class=\"flex-1\">MacBook Air</span>\n * <button ui-button variant=\"quiet-destructive\" size=\"icon-sm\" aria-label=\"Delete MacBook Air\">...</button>\n * </li>\n * </ul>\n */\n@Directive({\n selector: '[uiListRow]',\n host: { '[class]': 'classes()' },\n})\nexport class UiListRow {\n readonly ruled = input(true, { transform: booleanAttribute });\n\n protected readonly classes = computed(() =>\n this.ruled()\n ? 'flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17 shadow-[inset_0_-1px_0_var(--hairline)]'\n : 'flex min-h-18 items-center gap-3 py-1.5 lg:min-h-17',\n );\n}\n\n/**\n * Groups link rows under a hairline, as the \"other ways\" links under a search list. Put it on a `div`\n * around `ui-row` with `trailing=\"chevron\"`.\n *\n * @example\n * <div uiRowGroup>\n * <button ui-row type=\"button\" trailing=\"chevron\">Saisir à la main</button>\n * </div>\n */\n@Directive({\n selector: '[uiRowGroup]',\n host: { class: 'flex flex-col pt-1 shadow-[inset_0_1px_0_var(--hairline)]' },\n})\nexport class UiRowGroup {}\n\n/**\n * The filled tile that leads a row, holding an icon. Put it on a `span` as the first child of a\n * `ui-row` or a `uiListRow`.\n *\n * @example\n * <a ui-row size=\"xl\" padding=\"sm\" href=\"/export\">\n * <span uiRowTile><svg lucideDownload [size]=\"18\" /></span>\n * Export\n * </a>\n */\n@Directive({\n selector: '[uiRowTile]',\n host: { class: 'rounded-control grid size-9 flex-none place-items-center bg-(--muted)' },\n})\nexport class UiRowTile {}\n"],"mappings":";;;AAIA,MAAa,YAAY;CAAC;CAAM;CAAM;CAAM;CAAQ;AAAO;AAG3D,MAAa,eAAe;CAAC;CAAM;CAAM;AAAM;AAG/C,MAAa,WAAW,CAAC,WAAW,IAAI;AAGxC,MAAa,gBAAgB,CAAC,QAAQ,SAAS;AAG/C,MAAM,eAAwC;CAC5C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;CACN,OAAO;AACR;AAED,MAAM,YAAqC;CAAE,IAAI;CAAW,IAAI;CAAW,IAAI;CAAS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,GAAA,gBAAA;CAAA,CAAA;CAAT,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAS,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,wEAAA;EAAA,UAAA;CAAA,CAAA;;AAAT,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAJrB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EAAE,OAAO,wEAAuE;EACvF,CAAA"}
@@ -58,7 +58,7 @@ var UiSegmented = class UiSegmented {
58
58
  }
59
59
  static ɵfac = i0.ɵɵngDeclareFactory({
60
60
  minVersion: "12.0.0",
61
- version: "22.2.0",
61
+ version: "22.2.1",
62
62
  ngImport: i0,
63
63
  type: UiSegmented,
64
64
  deps: [],
@@ -66,7 +66,7 @@ var UiSegmented = class UiSegmented {
66
66
  });
67
67
  static ɵcmp = i0.ɵɵngDeclareComponent({
68
68
  minVersion: "17.0.0",
69
- version: "22.2.0",
69
+ version: "22.2.1",
70
70
  type: UiSegmented,
71
71
  isStandalone: true,
72
72
  selector: "ui-segmented",
@@ -161,7 +161,7 @@ var UiSegmented = class UiSegmented {
161
161
  };
162
162
  i0.ɵɵngDeclareClassMetadata({
163
163
  minVersion: "12.0.0",
164
- version: "22.2.0",
164
+ version: "22.2.1",
165
165
  ngImport: i0,
166
166
  type: UiSegmented,
167
167
  decorators: [{
@@ -33,7 +33,7 @@ var UiSelectPill = class UiSelectPill {
33
33
  pillClasses = computed(() => `${PILL_CLASSES} ${this.active() ? ACTIVE_PILL_CLASSES : REST_PILL_CLASSES}`, ...ngDevMode ? [{ debugName: "pillClasses" }] : /* istanbul ignore next */ []);
34
34
  static ɵfac = i0.ɵɵngDeclareFactory({
35
35
  minVersion: "12.0.0",
36
- version: "22.2.0",
36
+ version: "22.2.1",
37
37
  ngImport: i0,
38
38
  type: UiSelectPill,
39
39
  deps: [],
@@ -41,7 +41,7 @@ var UiSelectPill = class UiSelectPill {
41
41
  });
42
42
  static ɵcmp = i0.ɵɵngDeclareComponent({
43
43
  minVersion: "17.0.0",
44
- version: "22.2.0",
44
+ version: "22.2.1",
45
45
  type: UiSelectPill,
46
46
  isStandalone: true,
47
47
  selector: "ui-select-pill",
@@ -155,7 +155,7 @@ var UiSelectPill = class UiSelectPill {
155
155
  };
156
156
  i0.ɵɵngDeclareClassMetadata({
157
157
  minVersion: "12.0.0",
158
- version: "22.2.0",
158
+ version: "22.2.1",
159
159
  ngImport: i0,
160
160
  type: UiSelectPill,
161
161
  decorators: [{
@@ -32,7 +32,7 @@ var UiSelect = class UiSelect {
32
32
  classes = computed(() => `${CONTROL_BASE_CLASSES} bg-(--background) ${SELECT_CLASSES} ${PICKER_CLASSES} ${CONTROL_SIZE_CLASSES[this.size()]}`, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
33
33
  static ɵfac = i0.ɵɵngDeclareFactory({
34
34
  minVersion: "12.0.0",
35
- version: "22.2.0",
35
+ version: "22.2.1",
36
36
  ngImport: i0,
37
37
  type: UiSelect,
38
38
  deps: [],
@@ -40,7 +40,7 @@ var UiSelect = class UiSelect {
40
40
  });
41
41
  static ɵdir = i0.ɵɵngDeclareDirective({
42
42
  minVersion: "17.1.0",
43
- version: "22.2.0",
43
+ version: "22.2.1",
44
44
  type: UiSelect,
45
45
  isStandalone: true,
46
46
  selector: "select[uiSelect]",
@@ -77,7 +77,7 @@ var UiSelect = class UiSelect {
77
77
  };
78
78
  i0.ɵɵngDeclareClassMetadata({
79
79
  minVersion: "12.0.0",
80
- version: "22.2.0",
80
+ version: "22.2.1",
81
81
  ngImport: i0,
82
82
  type: UiSelect,
83
83
  decorators: [{
@@ -23,7 +23,7 @@ var UiSkeleton = class UiSkeleton {
23
23
  }, ...ngDevMode ? [{ debugName: "bars" }] : /* istanbul ignore next */ []);
24
24
  static ɵfac = i0.ɵɵngDeclareFactory({
25
25
  minVersion: "12.0.0",
26
- version: "22.2.0",
26
+ version: "22.2.1",
27
27
  ngImport: i0,
28
28
  type: UiSkeleton,
29
29
  deps: [],
@@ -31,7 +31,7 @@ var UiSkeleton = class UiSkeleton {
31
31
  });
32
32
  static ɵcmp = i0.ɵɵngDeclareComponent({
33
33
  minVersion: "17.0.0",
34
- version: "22.2.0",
34
+ version: "22.2.1",
35
35
  type: UiSkeleton,
36
36
  isStandalone: true,
37
37
  selector: "ui-skeleton",
@@ -76,7 +76,7 @@ var UiSkeleton = class UiSkeleton {
76
76
  };
77
77
  i0.ɵɵngDeclareClassMetadata({
78
78
  minVersion: "12.0.0",
79
- version: "22.2.0",
79
+ version: "22.2.1",
80
80
  ngImport: i0,
81
81
  type: UiSkeleton,
82
82
  decorators: [{