@raqm/ui 0.1.2 → 0.2.1

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 (100) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +87 -126
  3. package/fesm2022/raqm-ui-badge.mjs +3 -1
  4. package/fesm2022/raqm-ui-badge.mjs.map +1 -1
  5. package/fesm2022/raqm-ui-calendar.mjs +79 -12
  6. package/fesm2022/raqm-ui-calendar.mjs.map +1 -1
  7. package/fesm2022/raqm-ui-combobox.mjs +47 -23
  8. package/fesm2022/raqm-ui-combobox.mjs.map +1 -1
  9. package/fesm2022/raqm-ui-command.mjs +60 -12
  10. package/fesm2022/raqm-ui-command.mjs.map +1 -1
  11. package/fesm2022/raqm-ui-dialog.mjs +1 -3
  12. package/fesm2022/raqm-ui-dialog.mjs.map +1 -1
  13. package/fesm2022/raqm-ui-dropdown-menu.mjs.map +1 -1
  14. package/fesm2022/raqm-ui-hover-card.mjs.map +1 -1
  15. package/fesm2022/raqm-ui-icon.mjs +160 -0
  16. package/fesm2022/raqm-ui-icon.mjs.map +1 -0
  17. package/fesm2022/raqm-ui-input-otp.mjs +7 -4
  18. package/fesm2022/raqm-ui-input-otp.mjs.map +1 -1
  19. package/fesm2022/raqm-ui-menubar.mjs.map +1 -1
  20. package/fesm2022/raqm-ui-overlay-internal.mjs +15 -5
  21. package/fesm2022/raqm-ui-overlay-internal.mjs.map +1 -1
  22. package/fesm2022/raqm-ui-popover.mjs +51 -19
  23. package/fesm2022/raqm-ui-popover.mjs.map +1 -1
  24. package/fesm2022/raqm-ui-resizable.mjs +14 -4
  25. package/fesm2022/raqm-ui-resizable.mjs.map +1 -1
  26. package/fesm2022/raqm-ui-scroll-area.mjs +85 -29
  27. package/fesm2022/raqm-ui-scroll-area.mjs.map +1 -1
  28. package/fesm2022/raqm-ui-select.mjs +46 -19
  29. package/fesm2022/raqm-ui-select.mjs.map +1 -1
  30. package/fesm2022/raqm-ui-sidebar.mjs +13 -3
  31. package/fesm2022/raqm-ui-sidebar.mjs.map +1 -1
  32. package/fesm2022/raqm-ui-slider.mjs +59 -12
  33. package/fesm2022/raqm-ui-slider.mjs.map +1 -1
  34. package/fesm2022/raqm-ui-toast.mjs +60 -20
  35. package/fesm2022/raqm-ui-toast.mjs.map +1 -1
  36. package/fesm2022/raqm-ui-tooltip.mjs +28 -3
  37. package/fesm2022/raqm-ui-tooltip.mjs.map +1 -1
  38. package/fesm2022/raqm-ui.mjs +1 -0
  39. package/package.json +52 -18
  40. package/styles/accordion.css +1 -0
  41. package/styles/alert-dialog.css +1 -0
  42. package/styles/alert.css +1 -0
  43. package/styles/attachment.css +1 -0
  44. package/styles/avatar.css +1 -0
  45. package/styles/badge.css +1 -0
  46. package/styles/base.css +1 -0
  47. package/styles/button-group.css +1 -0
  48. package/styles/button.css +1 -0
  49. package/styles/checkbox.css +1 -0
  50. package/styles/combobox.css +1 -0
  51. package/styles/command.css +1 -0
  52. package/styles/common.css +17 -0
  53. package/styles/context-menu.css +1 -0
  54. package/styles/dialog.css +1 -0
  55. package/styles/drawer.css +1 -0
  56. package/styles/dropdown-menu.css +1 -0
  57. package/styles/empty.css +1 -0
  58. package/styles/field-parts.css +1 -0
  59. package/styles/field-relationships.css +1 -0
  60. package/styles/input-group-button.css +1 -0
  61. package/styles/input-group-relationships.css +1 -0
  62. package/styles/input-otp.css +1 -0
  63. package/styles/input.css +1 -0
  64. package/styles/item.css +1 -0
  65. package/styles/kbd.css +1 -0
  66. package/styles/menubar.css +1 -0
  67. package/styles/native-select.css +1 -0
  68. package/styles/navigation-menu.css +1 -0
  69. package/styles/overlay.css +1 -0
  70. package/styles/pagination.css +1 -0
  71. package/styles/popover.css +1 -0
  72. package/styles/questionnaire.css +1 -0
  73. package/styles/radio-group.css +1 -0
  74. package/styles/resizable.css +1 -0
  75. package/styles/sheet.css +1 -0
  76. package/styles/sidebar.css +1 -0
  77. package/styles/spinner.css +1 -0
  78. package/styles/switch.css +1 -0
  79. package/styles/table.css +1 -0
  80. package/styles/tabs.css +1 -0
  81. package/styles/textarea.css +1 -0
  82. package/styles/theme.css +50 -4324
  83. package/styles/toggle-group.css +1 -0
  84. package/styles/toggle.css +1 -0
  85. package/styles/tooltip.css +1 -0
  86. package/types/raqm-ui-calendar.d.ts +1 -0
  87. package/types/raqm-ui-combobox.d.ts +8 -4
  88. package/types/raqm-ui-command.d.ts +4 -0
  89. package/types/raqm-ui-dialog.d.ts +7 -1
  90. package/types/raqm-ui-icon.d.ts +65 -0
  91. package/types/raqm-ui-input-otp.d.ts +1 -0
  92. package/types/raqm-ui-resizable.d.ts +4 -0
  93. package/types/raqm-ui-rolldown-runtime-C25Le4-w.d.ts +1 -0
  94. package/types/raqm-ui-scroll-area.d.ts +11 -0
  95. package/types/raqm-ui-slider.d.ts +1 -1
  96. package/types/raqm-ui-toast.d.ts +6 -0
  97. package/types/raqm-ui.d.ts +1 -0
  98. package/fesm2022/raqm-ui-carousel.mjs +0 -410
  99. package/fesm2022/raqm-ui-carousel.mjs.map +0 -1
  100. package/types/raqm-ui-carousel.d.ts +0 -81
@@ -0,0 +1,160 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, InjectionToken, computed, effect, inject, input, isDevMode } from "@angular/core";
3
+ const warned = /* @__PURE__ */ new Set();
4
+ function warnOnce(key, message) {
5
+ if (warned.has(key)) return;
6
+ warned.add(key);
7
+ console.warn(message);
8
+ }
9
+ const hasIcon = (icons, name) => Object.hasOwn(icons, name);
10
+ const RAQM_ICONS = new InjectionToken("RAQM_ICONS", { factory: () => ({}) });
11
+ function provideRaqmIcons(icons) {
12
+ return {
13
+ provide: RAQM_ICONS,
14
+ useValue: icons
15
+ };
16
+ }
17
+ var RaqmIcon = class RaqmIcon {
18
+ name = input.required(...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
19
+ label = input(null, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
20
+ icons = inject(RAQM_ICONS);
21
+ definition = computed(() => {
22
+ const name = this.name();
23
+ if (!hasIcon(this.icons, name)) return null;
24
+ const definition = this.icons[name];
25
+ return definition?.paths?.length ? definition : null;
26
+ }, ...ngDevMode ? [{ debugName: "definition" }] : /* istanbul ignore next */ []);
27
+ accessibleName = computed(() => {
28
+ const label = this.label();
29
+ if (label !== null && label !== void 0) return label.trim() || null;
30
+ return this.definition()?.title?.trim() || null;
31
+ }, ...ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []);
32
+ constructor() {
33
+ if (!isDevMode()) return;
34
+ effect(() => {
35
+ const name = this.name();
36
+ if (!hasIcon(this.icons, name)) {
37
+ warnOnce(`unknown:${name}`, `[RaqmIcon] Unknown icon "${name}". Register it with provideRaqmIcons().`);
38
+ return;
39
+ }
40
+ if (!this.icons[name]?.paths?.length) warnOnce(`empty:${name}`, `[RaqmIcon] Icon "${name}" has no paths. Add at least one path to its definition.`);
41
+ });
42
+ }
43
+ static ɵfac = i0.ɵɵngDeclareFactory({
44
+ minVersion: "12.0.0",
45
+ version: "22.2.2",
46
+ ngImport: i0,
47
+ type: RaqmIcon,
48
+ deps: [],
49
+ target: i0.ɵɵFactoryTarget.Component
50
+ });
51
+ static ɵcmp = i0.ɵɵngDeclareComponent({
52
+ minVersion: "17.0.0",
53
+ version: "22.2.2",
54
+ type: RaqmIcon,
55
+ isStandalone: true,
56
+ selector: "raqm-icon",
57
+ inputs: {
58
+ name: {
59
+ classPropertyName: "name",
60
+ publicName: "name",
61
+ isSignal: true,
62
+ isRequired: true,
63
+ transformFunction: null
64
+ },
65
+ label: {
66
+ classPropertyName: "label",
67
+ publicName: "label",
68
+ isSignal: true,
69
+ isRequired: false,
70
+ transformFunction: null
71
+ }
72
+ },
73
+ host: {
74
+ properties: { "attr.data-raqm-icon": "name()" },
75
+ classAttribute: "raqm-icon"
76
+ },
77
+ ngImport: i0,
78
+ template: `
79
+ @if (definition(); as icon) {
80
+ <svg
81
+ [attr.viewBox]="icon.viewBox"
82
+ [attr.role]="accessibleName() ? 'img' : null"
83
+ [attr.aria-label]="accessibleName()"
84
+ [attr.aria-hidden]="accessibleName() ? null : 'true'"
85
+ focusable="false"
86
+ >
87
+ @for (path of icon.paths; track $index) {
88
+ <path
89
+ [attr.d]="path"
90
+ [attr.fill-rule]="icon.fillRule ?? null"
91
+ [attr.clip-rule]="icon.clipRule ?? null"
92
+ />
93
+ }
94
+ </svg>
95
+ }
96
+ `,
97
+ isInline: true,
98
+ styles: [":where(:host){display:inline-flex;flex:none;inline-size:1em;block-size:1em;vertical-align:-.125em}:where(svg){display:block;inline-size:100%;block-size:100%;fill:currentColor}\n"],
99
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
100
+ });
101
+ };
102
+ i0.ɵɵngDeclareClassMetadata({
103
+ minVersion: "12.0.0",
104
+ version: "22.2.2",
105
+ ngImport: i0,
106
+ type: RaqmIcon,
107
+ decorators: [{
108
+ type: Component,
109
+ args: [{
110
+ selector: "raqm-icon",
111
+ template: `
112
+ @if (definition(); as icon) {
113
+ <svg
114
+ [attr.viewBox]="icon.viewBox"
115
+ [attr.role]="accessibleName() ? 'img' : null"
116
+ [attr.aria-label]="accessibleName()"
117
+ [attr.aria-hidden]="accessibleName() ? null : 'true'"
118
+ focusable="false"
119
+ >
120
+ @for (path of icon.paths; track $index) {
121
+ <path
122
+ [attr.d]="path"
123
+ [attr.fill-rule]="icon.fillRule ?? null"
124
+ [attr.clip-rule]="icon.clipRule ?? null"
125
+ />
126
+ }
127
+ </svg>
128
+ }
129
+ `,
130
+ changeDetection: ChangeDetectionStrategy.OnPush,
131
+ host: {
132
+ class: "raqm-icon",
133
+ "[attr.data-raqm-icon]": "name()"
134
+ },
135
+ styles: [":where(:host){display:inline-flex;flex:none;inline-size:1em;block-size:1em;vertical-align:-.125em}:where(svg){display:block;inline-size:100%;block-size:100%;fill:currentColor}\n"]
136
+ }]
137
+ }],
138
+ ctorParameters: () => [],
139
+ propDecorators: {
140
+ name: [{
141
+ type: i0.Input,
142
+ args: [{
143
+ isSignal: true,
144
+ alias: "name",
145
+ required: true
146
+ }]
147
+ }],
148
+ label: [{
149
+ type: i0.Input,
150
+ args: [{
151
+ isSignal: true,
152
+ alias: "label",
153
+ required: false
154
+ }]
155
+ }]
156
+ }
157
+ });
158
+ export { RAQM_ICONS, RaqmIcon, provideRaqmIcons };
159
+
160
+ //# sourceMappingURL=raqm-ui-icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raqm-ui-icon.mjs","names":[],"sources":["../../../projects/ui/icon/icon.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n InjectionToken,\n Provider,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\n\n/**\n * One icon artwork, expressed as SVG path data. The package ships no icons; consumers\n * register their own map with {@link provideRaqmIcons}.\n */\nexport interface RaqmIconDefinition {\n /** The SVG `viewBox`, for example `0 0 24 24`. */\n readonly viewBox: string;\n /** One or more path `d` values; every path is filled with `currentColor`. */\n readonly paths: readonly string[];\n /** Fill rule for multi-path marks that rely on even-odd holes. */\n readonly fillRule?: 'nonzero' | 'evenodd';\n /** Clip rule for multi-path marks that rely on even-odd holes. */\n readonly clipRule?: 'nonzero' | 'evenodd';\n /** Fallback accessible name used when the consumer does not pass `label`. */\n readonly title?: string;\n}\n\n/** Consumer icon registry, keyed by the `name` used on `<raqm-icon>`. */\nexport type RaqmIconMap = Readonly<Record<string, RaqmIconDefinition>>;\n\n// One warning per problem, not one per rendered row.\nconst warned = new Set<string>();\n\nfunction warnOnce(key: string, message: string): void {\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(message);\n}\n\nconst hasIcon = (icons: RaqmIconMap, name: string): boolean => Object.hasOwn(icons, name);\n\n/** Icon registry token. Empty by default; fill it with {@link provideRaqmIcons}. */\nexport const RAQM_ICONS = new InjectionToken<RaqmIconMap>('RAQM_ICONS', {\n factory: () => ({}),\n});\n\n/**\n * Registers consumer icon data for `RaqmIcon`.\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [provideRaqmIcons({ home: HOME_ICON })],\n * });\n * ```\n *\n * Call it once at the application or route level; a later call replaces the whole map.\n */\nexport function provideRaqmIcons(icons: RaqmIconMap): Provider {\n return { provide: RAQM_ICONS, useValue: icons };\n}\n\n/**\n * Inline SVG icon rendered from consumer-supplied path data.\n *\n * Decorative by default (`aria-hidden`); pass `label` (or set `title` on the definition)\n * to expose it as `role=\"img\"` with an accessible name. Unknown names render nothing and\n * warn in development.\n */\n@Component({\n selector: 'raqm-icon',\n template: `\n @if (definition(); as icon) {\n <svg\n [attr.viewBox]=\"icon.viewBox\"\n [attr.role]=\"accessibleName() ? 'img' : null\"\n [attr.aria-label]=\"accessibleName()\"\n [attr.aria-hidden]=\"accessibleName() ? null : 'true'\"\n focusable=\"false\"\n >\n @for (path of icon.paths; track $index) {\n <path\n [attr.d]=\"path\"\n [attr.fill-rule]=\"icon.fillRule ?? null\"\n [attr.clip-rule]=\"icon.clipRule ?? null\"\n />\n }\n </svg>\n }\n `,\n styleUrl: './icon.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'raqm-icon',\n '[attr.data-raqm-icon]': 'name()',\n },\n})\nexport class RaqmIcon {\n /** Registry key of the artwork to render. */\n readonly name = input.required<string>();\n\n /** Accessible name. Omit it for decorative icons. */\n readonly label = input<string | null>(null);\n\n private readonly icons = inject(RAQM_ICONS);\n\n protected readonly definition = computed<RaqmIconDefinition | null>(() => {\n const name = this.name();\n if (!hasIcon(this.icons, name)) return null;\n const definition = this.icons[name];\n // A definition without paths would render an invisible, empty <svg>.\n return definition?.paths?.length ? definition : null;\n });\n\n protected readonly accessibleName = computed(() => {\n const label = this.label();\n // An explicit label, even an empty one, decides the name: `label=\"\"` marks a\n // titled definition as decorative in this placement.\n if (label !== null && label !== undefined) return label.trim() || null;\n return this.definition()?.title?.trim() || null;\n });\n\n constructor() {\n if (!isDevMode()) return;\n\n // Names arrive from templates, so a typo would otherwise fail silently.\n effect(() => {\n const name = this.name();\n if (!hasIcon(this.icons, name)) {\n warnOnce(\n `unknown:${name}`,\n `[RaqmIcon] Unknown icon \"${name}\". Register it with provideRaqmIcons().`,\n );\n return;\n }\n if (!this.icons[name]?.paths?.length) {\n warnOnce(\n `empty:${name}`,\n `[RaqmIcon] Icon \"${name}\" has no paths. Add at least one path to its definition.`,\n );\n }\n });\n }\n}\n"],"mappings":";;AAiCA,MAAM,yBAAS,IAAI,IAAG;AAEtB,SAAS,SAAS,KAAa,SAAe;CAC5C,IAAI,OAAO,IAAI,GAAG,GAAG;CACrB,OAAO,IAAI,GAAG;CACd,QAAQ,KAAK,OAAO;AACtB;AAEA,MAAM,WAAW,OAAoB,SAA0B,OAAO,OAAO,OAAO,IAAI;AAGxF,MAAa,aAAa,IAAI,eAA4B,cAAc,EACtE,gBAAgB,CAAA,GACjB,CAAA;AAaD,SAAgB,iBAAiB,OAAkB;CACjD,OAAO;EAAE,SAAS;EAAY,UAAU;CAAK;AAC/C;AAqCA,IAAa,WAAb,MAAa,SAAQ;CAEV,OAAO,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAG/B,QAAQ,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAE1B,QAAQ,OAAO,UAAU;CAEvB,aAAa,eAAyC;EACvE,MAAM,OAAO,KAAK,KAAI;EACtB,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,OAAO;EACvC,MAAM,aAAa,KAAK,MAAM;EAE9B,OAAO,YAAY,OAAO,SAAS,aAAa;CAClD,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAEiB,iBAAiB,eAAc;EAChD,MAAM,QAAQ,KAAK,MAAK;EAGxB,IAAI,UAAU,QAAQ,UAAU,QAAW,OAAO,MAAM,KAAI,KAAM;E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AAO;IACP,yBAAyB;GAC1B;GAAA,QAAA,CAAA,mLAAA;EAAA,CAAA"}
@@ -278,6 +278,11 @@ var RaqmInputOtpComponent = class RaqmInputOtpComponent {
278
278
  const pattern = this.pattern();
279
279
  return typeof pattern === "string" ? pattern : pattern?.source ?? null;
280
280
  }, ...ngDevMode ? [{ debugName: "patternSource" }] : /* istanbul ignore next */ []);
281
+ validationRegex = computed(() => {
282
+ const pattern = this.pattern();
283
+ if (pattern === void 0) return null;
284
+ return typeof pattern === "string" ? new RegExp(pattern) : new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ""));
285
+ }, ...ngDevMode ? [{ debugName: "validationRegex" }] : /* istanbul ignore next */ []);
281
286
  invalidState = computed(() => this.invalid() || this.ariaInvalid() !== null && this.ariaInvalid() !== false && this.ariaInvalid() !== "false", ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
282
287
  constructor() {
283
288
  afterEveryRender(() => {
@@ -308,10 +313,8 @@ var RaqmInputOtpComponent = class RaqmInputOtpComponent {
308
313
  });
309
314
  }
310
315
  matches(value) {
311
- const pattern = this.pattern();
312
- if (pattern === void 0) return true;
313
- const regex = typeof pattern === "string" ? new RegExp(pattern) : new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ""));
314
- return value === "" || regex.test(value);
316
+ const regex = this.validationRegex();
317
+ return regex === null || value === "" || regex.test(value);
315
318
  }
316
319
  clean(value) {
317
320
  const capped = value.slice(0, this.length());
@@ -1 +1 @@
1
- {"version":3,"file":"raqm-ui-input-otp.mjs","names":[],"sources":["../../../projects/ui/input-otp/input-otp-context.ts","../../../projects/ui/input-otp/input-otp-parts.ts","../../../projects/ui/input-otp/input-otp.ts","../../../projects/ui/input-otp/input-otp.component.html","../../../projects/ui/input-otp/public-api.ts"],"sourcesContent":["// Input OTP contract: the internal state the decorative slots mirror from the root.\r\n\r\nimport { InjectionToken, Signal } from '@angular/core';\r\n\r\n/** Internal state read by the decorative slots; only the native input is interactive. */\r\nexport interface RaqmInputOtpContext {\r\n readonly currentValue: Signal<string>;\r\n readonly invalidState: Signal<boolean>;\r\n isActive(index: number): boolean;\r\n}\r\nexport const RAQM_INPUT_OTP = new InjectionToken<RaqmInputOtpContext>('RaqmInputOtp');\r\n","// Input OTP presentation parts: the grouping, one mirrored slot and the decorative separator.\r\n// None of them is a tab stop; the root's single native `<input>` stays the only control.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n Directive,\r\n computed,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\n/** Visual grouping of adjoining OTP slots; never introduces another tab stop. */\r\n@Directive({\r\n selector: 'raqm-input-otp-group, [raqm-input-otp-group]',\r\n host: {\r\n class: 'raqm-input-otp-group',\r\n 'data-raqm-slot': 'input-otp-group',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpGroupDirective {}\r\n\r\n/** One indexed presentation slot mirrored from the root's single native input. */\r\n@Component({\r\n selector: 'raqm-input-otp-slot',\r\n template: `{{ char() }}\r\n @if (active() && !char()) {\r\n <span class=\"raqm-input-otp-slot__caret\"><span></span></span>\r\n }`,\r\n styleUrl: './input-otp-slot.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-slot',\r\n 'data-raqm-slot': 'input-otp-slot',\r\n 'aria-hidden': 'true',\r\n '[attr.data-raqm-index]': 'index()',\r\n '[attr.data-raqm-active]': 'active()',\r\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\r\n },\r\n})\r\nexport class RaqmInputOtpSlotComponent {\r\n readonly index = input.required<number>();\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n private readonly root = inject(RAQM_INPUT_OTP);\r\n protected readonly char = computed(() => this.root.currentValue()[this.index()] ?? '');\r\n protected readonly active = computed(() => this.root.isActive(this.index()));\r\n protected readonly invalid = computed(\r\n () =>\r\n this.root.invalidState() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n}\r\n\r\n/** Decorative separator, hidden from the input's accessible value. */\r\n@Component({\r\n selector: 'raqm-input-otp-separator',\r\n template: `<svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"M5 12h14\" />\r\n </svg>`,\r\n styleUrl: './input-otp-separator.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-separator',\r\n 'data-raqm-slot': 'input-otp-separator',\r\n role: 'separator',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpSeparatorComponent {}\r\n","// Input OTP root: one native text input with projected slot presentation. The grouping, slot\r\n// and separator parts live in `input-otp-parts.ts` and re-export through this module.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n afterEveryRender,\r\n afterRenderEffect,\r\n booleanAttribute,\r\n computed,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\nexport { RAQM_INPUT_OTP } from './input-otp-context';\r\nexport type { RaqmInputOtpContext } from './input-otp-context';\r\nexport {\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp-parts';\r\n\r\n/**\r\n * One native text input with projected OTP slot presentation.\r\n *\r\n * @remarks\r\n * A composite widget, not a form control: no `ControlValueAccessor` ships. The projection adds no\r\n * tab stop — the single native `<input>` is the only control, and its forwarded `id` keeps\r\n * `<label for>` and the `aria-*` aliases on the real control.\r\n */\r\n@Component({\r\n selector: 'raqm-input-otp',\r\n templateUrl: './input-otp.component.html',\r\n styleUrl: './input-otp.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [{ provide: RAQM_INPUT_OTP, useExisting: RaqmInputOtpComponent }],\r\n host: {\r\n class: 'raqm-input-otp',\r\n '[attr.id]': 'null',\r\n '[attr.aria-label]': 'null',\r\n '[attr.aria-labelledby]': 'null',\r\n '[attr.aria-describedby]': 'null',\r\n '[attr.aria-invalid]': 'null',\r\n '[attr.data-raqm-disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-raqm-invalid]': 'invalidState() ? \"\" : null',\r\n translate: 'no',\r\n },\r\n})\r\nexport class RaqmInputOtpComponent {\r\n readonly maxLength = input.required<number>();\r\n readonly value = input<string | undefined>(undefined);\r\n readonly defaultValue = input('');\r\n /** Optional value pattern; pass `^\\\\d+$` to allow digits only. */\r\n readonly pattern = input<string | RegExp | undefined>(undefined);\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n readonly required = input(false, { transform: booleanAttribute });\r\n readonly readOnly = input(false, { transform: booleanAttribute });\r\n readonly invalid = input(false, { transform: booleanAttribute });\r\n readonly id = input<string | null>(null);\r\n readonly name = input<string | null>(null);\r\n readonly form = input<string | null>(null);\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\r\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n readonly autoComplete = input('one-time-code');\r\n readonly inputMode = input('numeric');\r\n readonly pasteTransformer = input<((text: string) => string) | undefined>(undefined);\r\n readonly valueChange = output<string>();\r\n readonly complete = output<string>();\r\n\r\n private readonly localValue = signal<string | undefined>(undefined);\r\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private composing = false;\r\n private pointerStart: { x: number; y: number } | null = null;\r\n readonly focused = signal(false);\r\n readonly selectionStart = signal(0);\r\n readonly selectionEnd = signal(0);\r\n readonly length = computed(() => Math.max(1, Math.floor(this.maxLength()) || 1));\r\n readonly currentValue = computed(() =>\r\n this.clean(this.value() ?? this.localValue() ?? this.defaultValue()),\r\n );\r\n readonly patternSource = computed(() => {\r\n const pattern = this.pattern();\r\n return typeof pattern === 'string' ? pattern : (pattern?.source ?? null);\r\n });\r\n readonly invalidState = computed(\r\n () =>\r\n this.invalid() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n\r\n constructor() {\r\n afterEveryRender(() => {\r\n const control = this.control().nativeElement;\r\n if (!this.composing && control.value !== this.currentValue()) {\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n afterRenderEffect((cleanup) => {\r\n const control = this.control().nativeElement;\r\n const document = control.ownerDocument;\r\n const selection = () => this.syncSelection();\r\n document.addEventListener('selectionchange', selection);\r\n const form = control.form;\r\n const reset = (event: Event) =>\r\n queueMicrotask(() => {\r\n if (!event.defaultPrevented && !this.destroyRef.destroyed) {\r\n if (this.value() === undefined) this.localValue.set(this.clean(this.defaultValue()));\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n form?.addEventListener('reset', reset);\r\n cleanup(() => {\r\n document.removeEventListener('selectionchange', selection);\r\n form?.removeEventListener('reset', reset);\r\n });\r\n });\r\n }\r\n\r\n private matches(value: string): boolean {\r\n // Cloned so a stateful /g or /y lastIndex cannot affect later edits.\r\n const pattern = this.pattern();\r\n if (pattern === undefined) return true;\r\n const regex =\r\n typeof pattern === 'string'\r\n ? new RegExp(pattern)\r\n : new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ''));\r\n return value === '' || regex.test(value);\r\n }\r\n\r\n private clean(value: string): string {\r\n const capped = value.slice(0, this.length());\r\n if (this.matches(capped)) return capped;\r\n const filtered = Array.from(value)\r\n .filter((char) => this.matches(char))\r\n .join('')\r\n .slice(0, this.length());\r\n return this.matches(filtered) ? filtered : '';\r\n }\r\n\r\n private commit(value: string, caret: number): void {\r\n const previous = this.currentValue();\r\n if (value !== previous) {\r\n if (this.value() === undefined) this.localValue.set(value);\r\n this.valueChange.emit(value);\r\n if (previous.length < this.length() && value.length === this.length())\r\n this.complete.emit(value);\r\n }\r\n const control = this.control().nativeElement;\r\n // Parent bindings settle on the next render; reconciliation never steals focus.\r\n control.value = value;\r\n const position = Math.min(caret, control.value.length);\r\n control.setSelectionRange(position, position);\r\n this.syncSelection();\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n if (this.composing || (event as InputEvent).isComposing) return;\r\n const control = this.control().nativeElement;\r\n if (this.disabled() || this.readOnly()) {\r\n control.value = this.currentValue();\r\n return;\r\n }\r\n const raw = control.value;\r\n const caret = this.clean(raw.slice(0, control.selectionStart ?? raw.length)).length;\r\n const next = this.clean(raw);\r\n // Entirely invalid edits restore the old value rather than erasing a valid code.\r\n this.commit(raw !== '' && next === '' ? this.currentValue() : next, caret);\r\n }\r\n\r\n protected onPaste(event: ClipboardEvent): void {\r\n if (!event.clipboardData || this.disabled() || this.readOnly()) return;\r\n event.preventDefault();\r\n const control = this.control().nativeElement;\r\n const raw = event.clipboardData.getData('text/plain');\r\n const pasted = this.clean(this.pasteTransformer()?.(raw) ?? raw);\r\n // Invalid clipboard content never deletes the selected text.\r\n if (!pasted) return;\r\n const current = this.currentValue();\r\n const start = Math.min(control.selectionStart ?? current.length, current.length);\r\n const end = Math.min(control.selectionEnd ?? start, current.length);\r\n const available = this.length() - (current.length - (end - start));\r\n const inserted = pasted.slice(0, Math.max(0, available));\r\n const next = current.slice(0, start) + inserted + current.slice(end);\r\n if (this.matches(next)) this.commit(next, start + inserted.length);\r\n }\r\n\r\n protected onCompositionStart(): void {\r\n this.composing = true;\r\n }\r\n protected onCompositionEnd(event: Event): void {\r\n this.composing = false;\r\n this.onInput(event);\r\n }\r\n\r\n protected onFocus(): void {\r\n this.focused.set(true);\r\n const control = this.control().nativeElement;\r\n control.setSelectionRange(\r\n Math.min(control.value.length, this.length() - 1),\r\n control.value.length,\r\n );\r\n this.syncSelection();\r\n }\r\n\r\n protected onBlur(): void {\r\n this.focused.set(false);\r\n }\r\n\r\n protected onPointerDown(event: PointerEvent): void {\r\n this.pointerStart = { x: event.clientX, y: event.clientY };\r\n }\r\n\r\n protected onClick(event: MouseEvent): void {\r\n if (this.disabled() || event.detail === 0) return;\r\n const control = this.control().nativeElement;\r\n // Native drag and double/triple-click selections are left untouched.\r\n if (\r\n event.detail > 1 ||\r\n (this.pointerStart &&\r\n (Math.abs(event.clientX - this.pointerStart.x) > 4 ||\r\n Math.abs(event.clientY - this.pointerStart.y) > 4))\r\n )\r\n return;\r\n const slots = Array.from(\r\n this.host.nativeElement.querySelectorAll<HTMLElement>('[data-raqm-slot=\"input-otp-slot\"]'),\r\n );\r\n const target = slots.find((slot) => {\r\n const rect = slot.getBoundingClientRect();\r\n return (\r\n event.clientX >= rect.left &&\r\n event.clientX <= rect.right &&\r\n event.clientY >= rect.top &&\r\n event.clientY <= rect.bottom\r\n );\r\n });\r\n if (target) {\r\n const index = Math.min(Number(target.dataset['index']), control.value.length);\r\n control.setSelectionRange(index, Math.min(index + 1, control.value.length));\r\n this.syncSelection();\r\n }\r\n }\r\n\r\n protected syncSelection(): void {\r\n const control = this.control().nativeElement;\r\n if (control.ownerDocument.activeElement !== control || this.composing) return;\r\n let start = control.selectionStart ?? 0;\r\n let end = control.selectionEnd ?? start;\r\n // Existing characters are selected for replacement; the empty trailing slot stays in insert mode.\r\n if (\r\n start === end &&\r\n control.value.length > 0 &&\r\n !(start === control.value.length && start < this.length())\r\n ) {\r\n const backwards = start < this.selectionEnd();\r\n if (start === this.length() || (backwards && start > 0)) start -= 1;\r\n end = Math.min(start + 1, control.value.length);\r\n control.setSelectionRange(start, end, backwards ? 'backward' : 'forward');\r\n }\r\n this.selectionStart.set(start);\r\n this.selectionEnd.set(end);\r\n }\r\n\r\n isActive(index: number): boolean {\r\n return (\r\n !this.disabled() &&\r\n this.focused() &&\r\n (this.selectionStart() === this.selectionEnd()\r\n ? index === this.selectionStart()\r\n : index >= this.selectionStart() && index < this.selectionEnd())\r\n );\r\n }\r\n}\r\n","<ng-content />\r\n<input\r\n #control\r\n class=\"raqm-input-otp__input\"\r\n data-raqm-slot=\"input-otp\"\r\n type=\"text\"\r\n [id]=\"id()\"\r\n [value]=\"currentValue()\"\r\n [attr.maxlength]=\"length()\"\r\n [attr.pattern]=\"patternSource()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readOnly]=\"readOnly()\"\r\n [attr.name]=\"name()\"\r\n [attr.form]=\"form()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.aria-describedby]=\"ariaDescribedby()\"\r\n [attr.aria-invalid]=\"invalidState() ? ariaInvalid() || 'true' : null\"\r\n [attr.autocomplete]=\"autoComplete()\"\r\n [attr.inputmode]=\"inputMode()\"\r\n [spellcheck]=\"false\"\r\n autocapitalize=\"off\"\r\n (input)=\"onInput($event)\"\r\n (change)=\"onInput($event)\"\r\n (paste)=\"onPaste($event)\"\r\n (compositionstart)=\"onCompositionStart()\"\r\n (compositionend)=\"onCompositionEnd($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (click)=\"onClick($event)\"\r\n (pointerdown)=\"onPointerDown($event)\"\r\n (select)=\"syncSelection()\"\r\n (keyup)=\"syncSelection()\"\r\n/>\r\n","// Public API for `@raqm/ui/input-otp`; the root entry point re-exports these symbols.\r\nimport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp';\r\n\r\nexport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n};\r\n\r\n// The family imports as `imports: [RaqmInputOtp]`.\r\nexport const RaqmInputOtp = [\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSlotComponent,\r\n RaqmInputOtpSeparatorComponent,\r\n] as const;\r\n"],"mappings":";;AAUA,MAAa,iBAAiB,IAAI,eAAoC,cAAc;ACapF,IAAa,6BAAb,MAAa,2BAA0B;CAA1B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA0B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA1B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA0B,cAAA;EAAA,UAAA;EAAA,MAAA;GAAA,YAAA;IAAA,kBAAA;IAAA,eAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;CAAA,CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EARtC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,OAAO;IACP,kBAAkB;IAClB,eAAe;GAChB;EACF,CAAA;;;AAqBD,IAAa,4BAAb,MAAa,0BAAyB;CAC3B,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,cAAc,MAA+B,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAAI,OAAO;CAAc,CAAA;CAClE,OAAO,OAAO,cAAc;CAC1B,OAAO,eAAe,KAAK,KAAK,aAAY,CAAE,CAAC,KAAK,MAAK,MAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACnE,SAAS,eAAe,KAAK,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
+ {"version":3,"file":"raqm-ui-input-otp.mjs","names":[],"sources":["../../../projects/ui/input-otp/input-otp-context.ts","../../../projects/ui/input-otp/input-otp-parts.ts","../../../projects/ui/input-otp/input-otp.ts","../../../projects/ui/input-otp/input-otp.component.html","../../../projects/ui/input-otp/public-api.ts"],"sourcesContent":["// Input OTP contract: the internal state the decorative slots mirror from the root.\r\n\r\nimport { InjectionToken, Signal } from '@angular/core';\r\n\r\n/** Internal state read by the decorative slots; only the native input is interactive. */\r\nexport interface RaqmInputOtpContext {\r\n readonly currentValue: Signal<string>;\r\n readonly invalidState: Signal<boolean>;\r\n isActive(index: number): boolean;\r\n}\r\nexport const RAQM_INPUT_OTP = new InjectionToken<RaqmInputOtpContext>('RaqmInputOtp');\r\n","// Input OTP presentation parts: the grouping, one mirrored slot and the decorative separator.\r\n// None of them is a tab stop; the root's single native `<input>` stays the only control.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n Directive,\r\n computed,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\n/** Visual grouping of adjoining OTP slots; never introduces another tab stop. */\r\n@Directive({\r\n selector: 'raqm-input-otp-group, [raqm-input-otp-group]',\r\n host: {\r\n class: 'raqm-input-otp-group',\r\n 'data-raqm-slot': 'input-otp-group',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpGroupDirective {}\r\n\r\n/** One indexed presentation slot mirrored from the root's single native input. */\r\n@Component({\r\n selector: 'raqm-input-otp-slot',\r\n template: `{{ char() }}\r\n @if (active() && !char()) {\r\n <span class=\"raqm-input-otp-slot__caret\"><span></span></span>\r\n }`,\r\n styleUrl: './input-otp-slot.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-slot',\r\n 'data-raqm-slot': 'input-otp-slot',\r\n 'aria-hidden': 'true',\r\n '[attr.data-raqm-index]': 'index()',\r\n '[attr.data-raqm-active]': 'active()',\r\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\r\n },\r\n})\r\nexport class RaqmInputOtpSlotComponent {\r\n readonly index = input.required<number>();\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n private readonly root = inject(RAQM_INPUT_OTP);\r\n protected readonly char = computed(() => this.root.currentValue()[this.index()] ?? '');\r\n protected readonly active = computed(() => this.root.isActive(this.index()));\r\n protected readonly invalid = computed(\r\n () =>\r\n this.root.invalidState() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n}\r\n\r\n/** Decorative separator, hidden from the input's accessible value. */\r\n@Component({\r\n selector: 'raqm-input-otp-separator',\r\n template: `<svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"M5 12h14\" />\r\n </svg>`,\r\n styleUrl: './input-otp-separator.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-input-otp-separator',\r\n 'data-raqm-slot': 'input-otp-separator',\r\n role: 'separator',\r\n 'aria-hidden': 'true',\r\n },\r\n})\r\nexport class RaqmInputOtpSeparatorComponent {}\r\n","// Input OTP root: one native text input with projected slot presentation. The grouping, slot\r\n// and separator parts live in `input-otp-parts.ts` and re-export through this module.\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n afterEveryRender,\r\n afterRenderEffect,\r\n booleanAttribute,\r\n computed,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\n\r\nimport { RAQM_INPUT_OTP } from './input-otp-context';\r\n\r\nexport { RAQM_INPUT_OTP } from './input-otp-context';\r\nexport type { RaqmInputOtpContext } from './input-otp-context';\r\nexport {\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp-parts';\r\n\r\n/**\r\n * One native text input with projected OTP slot presentation.\r\n *\r\n * @remarks\r\n * A composite widget, not a form control: no `ControlValueAccessor` ships. The projection adds no\r\n * tab stop — the single native `<input>` is the only control, and its forwarded `id` keeps\r\n * `<label for>` and the `aria-*` aliases on the real control.\r\n */\r\n@Component({\r\n selector: 'raqm-input-otp',\r\n templateUrl: './input-otp.component.html',\r\n styleUrl: './input-otp.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [{ provide: RAQM_INPUT_OTP, useExisting: RaqmInputOtpComponent }],\r\n host: {\r\n class: 'raqm-input-otp',\r\n '[attr.id]': 'null',\r\n '[attr.aria-label]': 'null',\r\n '[attr.aria-labelledby]': 'null',\r\n '[attr.aria-describedby]': 'null',\r\n '[attr.aria-invalid]': 'null',\r\n '[attr.data-raqm-disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-raqm-invalid]': 'invalidState() ? \"\" : null',\r\n translate: 'no',\r\n },\r\n})\r\nexport class RaqmInputOtpComponent {\r\n readonly maxLength = input.required<number>();\r\n readonly value = input<string | undefined>(undefined);\r\n readonly defaultValue = input('');\r\n /** Optional value pattern; pass `^\\\\d+$` to allow digits only. */\r\n readonly pattern = input<string | RegExp | undefined>(undefined);\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n readonly required = input(false, { transform: booleanAttribute });\r\n readonly readOnly = input(false, { transform: booleanAttribute });\r\n readonly invalid = input(false, { transform: booleanAttribute });\r\n readonly id = input<string | null>(null);\r\n readonly name = input<string | null>(null);\r\n readonly form = input<string | null>(null);\r\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\r\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\r\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\r\n readonly ariaInvalid = input<string | boolean | null>(null, { alias: 'aria-invalid' });\r\n readonly autoComplete = input('one-time-code');\r\n readonly inputMode = input('numeric');\r\n readonly pasteTransformer = input<((text: string) => string) | undefined>(undefined);\r\n readonly valueChange = output<string>();\r\n readonly complete = output<string>();\r\n\r\n private readonly localValue = signal<string | undefined>(undefined);\r\n private readonly control = viewChild.required<ElementRef<HTMLInputElement>>('control');\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private composing = false;\r\n private pointerStart: { x: number; y: number } | null = null;\r\n readonly focused = signal(false);\r\n readonly selectionStart = signal(0);\r\n readonly selectionEnd = signal(0);\r\n readonly length = computed(() => Math.max(1, Math.floor(this.maxLength()) || 1));\r\n readonly currentValue = computed(() =>\r\n this.clean(this.value() ?? this.localValue() ?? this.defaultValue()),\r\n );\r\n readonly patternSource = computed(() => {\r\n const pattern = this.pattern();\r\n return typeof pattern === 'string' ? pattern : (pattern?.source ?? null);\r\n });\r\n // Compiled once per pattern input; a string stays raw regex source and stateful g/y\r\n // flags are dropped so repeated tests cannot skip later edits.\r\n private readonly validationRegex = computed(() => {\r\n const pattern = this.pattern();\r\n if (pattern === undefined) return null;\r\n return typeof pattern === 'string'\r\n ? new RegExp(pattern)\r\n : new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ''));\r\n });\r\n readonly invalidState = computed(\r\n () =>\r\n this.invalid() ||\r\n (this.ariaInvalid() !== null &&\r\n this.ariaInvalid() !== false &&\r\n this.ariaInvalid() !== 'false'),\r\n );\r\n\r\n constructor() {\r\n afterEveryRender(() => {\r\n const control = this.control().nativeElement;\r\n if (!this.composing && control.value !== this.currentValue()) {\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n afterRenderEffect((cleanup) => {\r\n const control = this.control().nativeElement;\r\n const document = control.ownerDocument;\r\n const selection = () => this.syncSelection();\r\n document.addEventListener('selectionchange', selection);\r\n const form = control.form;\r\n const reset = (event: Event) =>\r\n queueMicrotask(() => {\r\n if (!event.defaultPrevented && !this.destroyRef.destroyed) {\r\n if (this.value() === undefined) this.localValue.set(this.clean(this.defaultValue()));\r\n control.value = this.currentValue();\r\n this.syncSelection();\r\n }\r\n });\r\n form?.addEventListener('reset', reset);\r\n cleanup(() => {\r\n document.removeEventListener('selectionchange', selection);\r\n form?.removeEventListener('reset', reset);\r\n });\r\n });\r\n }\r\n\r\n private matches(value: string): boolean {\r\n const regex = this.validationRegex();\r\n return regex === null || value === '' || regex.test(value);\r\n }\r\n\r\n private clean(value: string): string {\r\n const capped = value.slice(0, this.length());\r\n if (this.matches(capped)) return capped;\r\n const filtered = Array.from(value)\r\n .filter((char) => this.matches(char))\r\n .join('')\r\n .slice(0, this.length());\r\n return this.matches(filtered) ? filtered : '';\r\n }\r\n\r\n private commit(value: string, caret: number): void {\r\n const previous = this.currentValue();\r\n if (value !== previous) {\r\n if (this.value() === undefined) this.localValue.set(value);\r\n this.valueChange.emit(value);\r\n if (previous.length < this.length() && value.length === this.length())\r\n this.complete.emit(value);\r\n }\r\n const control = this.control().nativeElement;\r\n // Parent bindings settle on the next render; reconciliation never steals focus.\r\n control.value = value;\r\n const position = Math.min(caret, control.value.length);\r\n control.setSelectionRange(position, position);\r\n this.syncSelection();\r\n }\r\n\r\n protected onInput(event: Event): void {\r\n if (this.composing || (event as InputEvent).isComposing) return;\r\n const control = this.control().nativeElement;\r\n if (this.disabled() || this.readOnly()) {\r\n control.value = this.currentValue();\r\n return;\r\n }\r\n const raw = control.value;\r\n const caret = this.clean(raw.slice(0, control.selectionStart ?? raw.length)).length;\r\n const next = this.clean(raw);\r\n // Entirely invalid edits restore the old value rather than erasing a valid code.\r\n this.commit(raw !== '' && next === '' ? this.currentValue() : next, caret);\r\n }\r\n\r\n protected onPaste(event: ClipboardEvent): void {\r\n if (!event.clipboardData || this.disabled() || this.readOnly()) return;\r\n event.preventDefault();\r\n const control = this.control().nativeElement;\r\n const raw = event.clipboardData.getData('text/plain');\r\n const pasted = this.clean(this.pasteTransformer()?.(raw) ?? raw);\r\n // Invalid clipboard content never deletes the selected text.\r\n if (!pasted) return;\r\n const current = this.currentValue();\r\n const start = Math.min(control.selectionStart ?? current.length, current.length);\r\n const end = Math.min(control.selectionEnd ?? start, current.length);\r\n const available = this.length() - (current.length - (end - start));\r\n const inserted = pasted.slice(0, Math.max(0, available));\r\n const next = current.slice(0, start) + inserted + current.slice(end);\r\n if (this.matches(next)) this.commit(next, start + inserted.length);\r\n }\r\n\r\n protected onCompositionStart(): void {\r\n this.composing = true;\r\n }\r\n protected onCompositionEnd(event: Event): void {\r\n this.composing = false;\r\n this.onInput(event);\r\n }\r\n\r\n protected onFocus(): void {\r\n this.focused.set(true);\r\n const control = this.control().nativeElement;\r\n control.setSelectionRange(\r\n Math.min(control.value.length, this.length() - 1),\r\n control.value.length,\r\n );\r\n this.syncSelection();\r\n }\r\n\r\n protected onBlur(): void {\r\n this.focused.set(false);\r\n }\r\n\r\n protected onPointerDown(event: PointerEvent): void {\r\n this.pointerStart = { x: event.clientX, y: event.clientY };\r\n }\r\n\r\n protected onClick(event: MouseEvent): void {\r\n if (this.disabled() || event.detail === 0) return;\r\n const control = this.control().nativeElement;\r\n // Native drag and double/triple-click selections are left untouched.\r\n if (\r\n event.detail > 1 ||\r\n (this.pointerStart &&\r\n (Math.abs(event.clientX - this.pointerStart.x) > 4 ||\r\n Math.abs(event.clientY - this.pointerStart.y) > 4))\r\n )\r\n return;\r\n const slots = Array.from(\r\n this.host.nativeElement.querySelectorAll<HTMLElement>('[data-raqm-slot=\"input-otp-slot\"]'),\r\n );\r\n const target = slots.find((slot) => {\r\n const rect = slot.getBoundingClientRect();\r\n return (\r\n event.clientX >= rect.left &&\r\n event.clientX <= rect.right &&\r\n event.clientY >= rect.top &&\r\n event.clientY <= rect.bottom\r\n );\r\n });\r\n if (target) {\r\n const index = Math.min(Number(target.dataset['index']), control.value.length);\r\n control.setSelectionRange(index, Math.min(index + 1, control.value.length));\r\n this.syncSelection();\r\n }\r\n }\r\n\r\n protected syncSelection(): void {\r\n const control = this.control().nativeElement;\r\n if (control.ownerDocument.activeElement !== control || this.composing) return;\r\n let start = control.selectionStart ?? 0;\r\n let end = control.selectionEnd ?? start;\r\n // Existing characters are selected for replacement; the empty trailing slot stays in insert mode.\r\n if (\r\n start === end &&\r\n control.value.length > 0 &&\r\n !(start === control.value.length && start < this.length())\r\n ) {\r\n const backwards = start < this.selectionEnd();\r\n if (start === this.length() || (backwards && start > 0)) start -= 1;\r\n end = Math.min(start + 1, control.value.length);\r\n control.setSelectionRange(start, end, backwards ? 'backward' : 'forward');\r\n }\r\n this.selectionStart.set(start);\r\n this.selectionEnd.set(end);\r\n }\r\n\r\n isActive(index: number): boolean {\r\n return (\r\n !this.disabled() &&\r\n this.focused() &&\r\n (this.selectionStart() === this.selectionEnd()\r\n ? index === this.selectionStart()\r\n : index >= this.selectionStart() && index < this.selectionEnd())\r\n );\r\n }\r\n}\r\n","<ng-content />\r\n<input\r\n #control\r\n class=\"raqm-input-otp__input\"\r\n data-raqm-slot=\"input-otp\"\r\n type=\"text\"\r\n [id]=\"id()\"\r\n [value]=\"currentValue()\"\r\n [attr.maxlength]=\"length()\"\r\n [attr.pattern]=\"patternSource()\"\r\n [disabled]=\"disabled()\"\r\n [required]=\"required()\"\r\n [readOnly]=\"readOnly()\"\r\n [attr.name]=\"name()\"\r\n [attr.form]=\"form()\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [attr.aria-labelledby]=\"ariaLabelledby()\"\r\n [attr.aria-describedby]=\"ariaDescribedby()\"\r\n [attr.aria-invalid]=\"invalidState() ? ariaInvalid() || 'true' : null\"\r\n [attr.autocomplete]=\"autoComplete()\"\r\n [attr.inputmode]=\"inputMode()\"\r\n [spellcheck]=\"false\"\r\n autocapitalize=\"off\"\r\n (input)=\"onInput($event)\"\r\n (change)=\"onInput($event)\"\r\n (paste)=\"onPaste($event)\"\r\n (compositionstart)=\"onCompositionStart()\"\r\n (compositionend)=\"onCompositionEnd($event)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"onBlur()\"\r\n (click)=\"onClick($event)\"\r\n (pointerdown)=\"onPointerDown($event)\"\r\n (select)=\"syncSelection()\"\r\n (keyup)=\"syncSelection()\"\r\n/>\r\n","// Public API for `@raqm/ui/input-otp`; the root entry point re-exports these symbols.\r\nimport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n} from './input-otp';\r\n\r\nexport {\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSeparatorComponent,\r\n RaqmInputOtpSlotComponent,\r\n};\r\n\r\n// The family imports as `imports: [RaqmInputOtp]`.\r\nexport const RaqmInputOtp = [\r\n RaqmInputOtpComponent,\r\n RaqmInputOtpGroupDirective,\r\n RaqmInputOtpSlotComponent,\r\n RaqmInputOtpSeparatorComponent,\r\n] as const;\r\n"],"mappings":";;AAUA,MAAa,iBAAiB,IAAI,eAAoC,cAAc;ACapF,IAAa,6BAAb,MAAa,2BAA0B;CAA1B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA0B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA1B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA0B,cAAA;EAAA,UAAA;EAAA,MAAA;GAAA,YAAA;IAAA,kBAAA;IAAA,eAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;CAAA,CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EARtC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,OAAO;IACP,kBAAkB;IAClB,eAAe;GAChB;EACF,CAAA;;;AAqBD,IAAa,4BAAb,M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GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AE/DvF,MAAa,eAAe;CAC1B;CACA;CACA;CACA;AACQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"raqm-ui-menubar.mjs","names":[],"sources":["../../../projects/ui/menubar/menubar.directive.ts","../../../projects/ui/menubar/menubar-trigger.directive.ts","../../../projects/ui/menubar/menubar-item.directive.ts","../../../projects/ui/menubar/menubar-context.ts","../../../projects/ui/menubar/menubar-radio.directive.ts","../../../projects/ui/menubar/public-api.ts"],"sourcesContent":["import { Directive, booleanAttribute, input } from '@angular/core';\r\n\r\nimport { CdkMenuBar } from '@angular/cdk/menu';\r\n\r\nimport { RaqmMenuDirective, RaqmMenuDirection } from '@raqm/ui/dropdown-menu';\r\n\r\n@Directive({\r\n selector: '[raqm-menubar]',\r\n // The CDK owns role, orientation, stack, focus and keyboard; this adds only the class.\r\n hostDirectives: [RaqmMenuDirection, { directive: CdkMenuBar }],\r\n host: {\r\n class: 'raqm-menubar',\r\n },\r\n})\r\nexport class RaqmMenubarDirective {}\r\n\r\n@Directive({\r\n selector: '[raqm-menubar-content]',\r\n hostDirectives: [{ directive: RaqmMenuDirective }],\r\n host: {\r\n class: 'raqm-menubar-content',\r\n },\r\n})\r\nexport class RaqmMenubarContentDirective {}\r\n\r\n@Directive({\r\n selector: '[raqm-menubar-label]',\r\n host: {\r\n class: 'raqm-menubar-label',\r\n // Presence-only inset hook (the `data-raqm-inset` attribute exists or not).\r\n '[attr.data-raqm-inset]': 'inset() ? \"\" : null',\r\n },\r\n})\r\nexport class RaqmMenubarLabelDirective {\r\n readonly inset = input(false, { transform: booleanAttribute });\r\n}\r\n","import { DestroyRef, Directive, ElementRef, OnInit, inject } from '@angular/core';\r\n\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { CdkMenuItem } from '@angular/cdk/menu';\r\nimport { ConnectedPosition } from '@angular/cdk/overlay';\r\n\r\nimport {\r\n RaqmMenuOverlaySync,\r\n RaqmMenuDirection,\r\n RaqmMenuTriggerBase,\r\n} from '@raqm/ui/dropdown-menu';\r\n\r\nconst MENUBAR_SIDE_OFFSET = 8;\r\nconst MENUBAR_ALIGN_OFFSET = 4;\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-trigger-for]',\r\n // `CdkMenuItem` supplies bar-item role/keyboard/focus; `CdkMenuTrigger` the overlay engine.\r\n hostDirectives: [\r\n RaqmMenuDirection,\r\n {\r\n directive: CdkMenuItem,\r\n inputs: ['cdkMenuItemDisabled: disabled'],\r\n },\r\n {\r\n directive: RaqmMenuTriggerBase,\r\n inputs: ['cdkMenuTriggerFor: raqm-menubar-trigger-for', 'cdkMenuPosition: positions'],\r\n outputs: ['cdkMenuOpened: opened', 'cdkMenuClosed: closed'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-trigger',\r\n },\r\n})\r\nexport class RaqmMenubarTriggerDirective implements OnInit {\r\n // Used only to install the default placement when the app supplies no `positions`.\r\n private readonly trigger = inject(RaqmMenuTriggerBase);\r\n\r\n private readonly direction = inject(Directionality);\r\n\r\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n // Identity tracks library defaults without replacing consumer positions.\r\n private defaultPositions: ConnectedPosition[] | null = null;\r\n\r\n private readonly overlaySync = new RaqmMenuOverlaySync(\r\n this.trigger,\r\n this.element.nativeElement,\r\n inject(DestroyRef),\r\n this.direction,\r\n {\r\n matchAnchorWidth: true,\r\n positions: () => {\r\n if (this.trigger.menuPosition !== this.defaultPositions) return this.trigger.menuPosition;\r\n this.defaultPositions = this.defaultRootPositions();\r\n this.trigger.menuPosition = this.defaultPositions;\r\n return this.defaultPositions;\r\n },\r\n },\r\n );\r\n\r\n ngOnInit(): void {\r\n if (this.trigger.menuPosition == null) {\r\n this.defaultPositions = this.defaultRootPositions();\r\n this.trigger.menuPosition = this.defaultPositions;\r\n }\r\n }\r\n\r\n private defaultRootPositions(): ConnectedPosition[] {\r\n const alignOffset =\r\n this.direction?.value === 'rtl' ? MENUBAR_ALIGN_OFFSET : -MENUBAR_ALIGN_OFFSET;\r\n return [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetX: alignOffset,\r\n offsetY: MENUBAR_SIDE_OFFSET,\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetX: alignOffset,\r\n offsetY: -MENUBAR_SIDE_OFFSET,\r\n },\r\n ];\r\n }\r\n}\r\n","import { Directive } from '@angular/core';\r\n\r\nimport { RaqmMenuCheckboxItemDirective, RaqmMenuItemDirective } from '@raqm/ui/dropdown-menu';\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-item]',\r\n // Re-exposes the Dropdown row's declared inputs; the rest are inherited transitively.\r\n hostDirectives: [\r\n {\r\n directive: RaqmMenuItemDirective,\r\n inputs: ['inset', 'raqm-menu-item: raqm-menubar-item'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-item',\r\n },\r\n})\r\nexport class RaqmMenubarItemDirective {}\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-checkbox-item]',\r\n // The Dropdown checkbox row already composes the keep-open base and one CDK checkbox.\r\n hostDirectives: [\r\n {\r\n directive: RaqmMenuCheckboxItemDirective,\r\n inputs: ['inset', 'checked'],\r\n outputs: ['checkedChange'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-checkbox-item',\r\n },\r\n})\r\nexport class RaqmMenubarCheckboxItemDirective {}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * Private radio-group contract shared with the item children; never re-exported.\r\n *\r\n * @remarks\r\n * The group owns the single `model` value: items read it through `isSelected` and\r\n * commit once through `select`. `register`/`unregister` only catch duplicate values.\r\n */\r\nexport interface RaqmMenubarRadioGroupContext {\r\n isSelected(value: string): boolean;\r\n // A reselect is a no-op, so it never clears the model or emits.\r\n select(value: string): void;\r\n register(value: string): void;\r\n unregister(value: string): void;\r\n}\r\n\r\nexport const RAQM_MENUBAR_RADIO_GROUP = new InjectionToken<RaqmMenubarRadioGroupContext>(\r\n 'raqm-menubar-radio-group',\r\n);\r\n","import {\r\n Directive,\r\n OnDestroy,\r\n OnInit,\r\n booleanAttribute,\r\n effect,\r\n inject,\r\n input,\r\n isDevMode,\r\n model,\r\n} from '@angular/core';\r\n\r\nimport { CdkMenuGroup, CdkMenuItemRadio } from '@angular/cdk/menu';\r\n\r\nimport { RAQM_MENUBAR_RADIO_GROUP, RaqmMenubarRadioGroupContext } from './menubar-context';\r\n\r\n@Directive({\r\n selector: '[raqm-menubar-radio-group]',\r\n // The CDK group scopes exclusive selection to this node with its own dispatcher.\r\n hostDirectives: [{ directive: CdkMenuGroup }],\r\n // The private context the radio items inject; one instance per group element.\r\n providers: [\r\n {\r\n provide: RAQM_MENUBAR_RADIO_GROUP,\r\n useExisting: RaqmMenubarRadioGroupDirective,\r\n },\r\n ],\r\n})\r\nexport class RaqmMenubarRadioGroupDirective implements RaqmMenubarRadioGroupContext {\r\n readonly value = model<string | null>(null);\r\n\r\n // Counts live item children per value, so a duplicate fails clearly in dev.\r\n private readonly registrations = new Map<string, number>();\r\n\r\n // Whether `value` is the committed selection; an unknown value matches nothing.\r\n isSelected(value: string): boolean {\r\n return this.value() === value;\r\n }\r\n\r\n select(value: string): void {\r\n this.value.set(value);\r\n }\r\n\r\n // A second claim for one value in dev fails: two radio items may not share it.\r\n register(value: string): void {\r\n const count = this.registrations.get(value) ?? 0;\r\n if (count > 0 && isDevMode()) {\r\n throw new Error(\r\n `Raqm menubar radio group: duplicate radio item value \"${value}\". ` +\r\n 'Each radio item inside one group needs a unique non-empty value.',\r\n );\r\n }\r\n this.registrations.set(value, count + 1);\r\n }\r\n\r\n // Deleting at zero lets a later item reuse a value once its predecessor is gone.\r\n unregister(value: string): void {\r\n const count = this.registrations.get(value) ?? 0;\r\n if (count <= 1) {\r\n this.registrations.delete(value);\r\n } else {\r\n this.registrations.set(value, count - 1);\r\n }\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-radio-item]',\r\n // The CDK owns role, `aria-checked`, focus, keyboard and exclusive dispatch.\r\n hostDirectives: [\r\n {\r\n directive: CdkMenuItemRadio,\r\n inputs: ['cdkMenuItemDisabled: disabled'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-radio-item',\r\n // Presence-only inset hook (the `data-raqm-inset` attribute exists or not).\r\n '[attr.data-raqm-inset]': 'inset() ? \"\" : null',\r\n // Focus-follows-pointer, identical to the Dropdown rows (see `onPointerEnter`).\r\n '(pointerenter)': 'onPointerEnter($event)',\r\n },\r\n})\r\nexport class RaqmMenubarRadioItemDirective implements OnInit, OnDestroy {\r\n // The single activation source: its `triggered` is observed, its `checked` derived.\r\n private readonly radio = inject(CdkMenuItemRadio);\r\n\r\n // A lone radio (no group) keeps the CDK's own exclusive-dispatch behaviour.\r\n private readonly group = inject(RAQM_MENUBAR_RADIO_GROUP, { optional: true });\r\n\r\n readonly value = input.required<string>();\r\n\r\n readonly inset = input(false, { transform: booleanAttribute });\r\n\r\n // Typed structurally (no rxjs import), matching the Dropdown checkbox pattern.\r\n private readonly triggerSubscription: { unsubscribe(): void };\r\n\r\n constructor() {\r\n // Derives `checked` from the group model, so an unknown group value matches no row.\r\n effect(() => {\r\n if (this.group) {\r\n this.radio.checked = this.group.isSelected(this.value());\r\n }\r\n });\r\n\r\n // One activation path: `triggered` is the only source of the model commit.\r\n this.triggerSubscription = this.radio.triggered.subscribe(() => {\r\n if (this.group && !this.radio.disabled) {\r\n this.group.select(this.value());\r\n }\r\n });\r\n }\r\n\r\n // Registers the value once inputs are bound; a missing or duplicate value fails in dev.\r\n ngOnInit(): void {\r\n const value = this.value();\r\n if (!value && isDevMode()) {\r\n throw new Error('Raqm menubar radio item: a non-empty `value` is required.');\r\n }\r\n this.group?.register(value);\r\n }\r\n\r\n // Releases the value registration and subscription so no menu outlives the directive.\r\n ngOnDestroy(): void {\r\n this.group?.unregister(this.value());\r\n this.triggerSubscription.unsubscribe();\r\n }\r\n\r\n // Hover highlight as in the Dropdown rows: an enabled, non-touch entry focuses the\r\n // row through the public `CdkMenuItem.focus()`, which never activates it.\r\n protected onPointerEnter(event: Event): void {\r\n if (!(event instanceof PointerEvent) || event.pointerType === 'touch' || this.radio.disabled) {\r\n return;\r\n }\r\n this.radio.focus();\r\n }\r\n}\r\n","// Public API for `@raqm/ui/menubar`; the root entry point re-exports these symbols.\r\nimport {\r\n RaqmMenuGroupDirective,\r\n RaqmMenuLabelDirective,\r\n RaqmMenuSeparatorDirective,\r\n RaqmMenuShortcutDirective,\r\n} from '@raqm/ui/dropdown-menu';\r\n\r\nimport {\r\n RaqmMenubarContentDirective,\r\n RaqmMenubarDirective,\r\n RaqmMenubarLabelDirective,\r\n} from './menubar.directive';\r\nimport { RaqmMenubarTriggerDirective } from './menubar-trigger.directive';\r\nimport {\r\n RaqmMenubarCheckboxItemDirective,\r\n RaqmMenubarItemDirective,\r\n} from './menubar-item.directive';\r\nimport {\r\n RaqmMenubarRadioGroupDirective,\r\n RaqmMenubarRadioItemDirective,\r\n} from './menubar-radio.directive';\r\n\r\nexport { RaqmMenubarDirective, RaqmMenubarContentDirective, RaqmMenubarLabelDirective };\r\nexport { RaqmMenubarTriggerDirective };\r\nexport { RaqmMenubarItemDirective, RaqmMenubarCheckboxItemDirective };\r\nexport { RaqmMenubarRadioGroupDirective, RaqmMenubarRadioItemDirective };\r\n\r\nexport const RaqmMenubar = [\r\n RaqmMenubarDirective,\r\n RaqmMenubarTriggerDirective,\r\n RaqmMenubarContentDirective,\r\n RaqmMenubarLabelDirective,\r\n RaqmMenubarItemDirective,\r\n RaqmMenubarCheckboxItemDirective,\r\n RaqmMenubarRadioGroupDirective,\r\n RaqmMenubarRadioItemDirective,\r\n RaqmMenuGroupDirective,\r\n RaqmMenuLabelDirective,\r\n RaqmMenuSeparatorDirective,\r\n RaqmMenuShortcutDirective,\r\n] as const;\r\n"],"mappings":";;;;;;;AAcA,IAAa,uBAAb,MAAa,qBAAoB;CAApB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAoB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAApB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAoB,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,eAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,kBAAA,GAAA,EAAA,WAAA,GAAA,WAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAApB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EARhC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GAEV,gBAAgB,CAAC,mBAAmB,EAAE,WAAW,WAAU,CAAE;GAC7D,MAAM,EACJ,OAAO,eACR;EACF,CAAA;;;AAUD,IAAa,8BAAb,MAAa,4BAA2B;CAA3B,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA2B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA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0B;IAE1B,kBAAkB;GACnB;EACF,CAAA;;;;;;;;;;;;;;;;;;;;;;ACtDD,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACQ"}
1
+ {"version":3,"file":"raqm-ui-menubar.mjs","names":["i1"],"sources":["../../../projects/ui/menubar/menubar.directive.ts","../../../projects/ui/menubar/menubar-trigger.directive.ts","../../../projects/ui/menubar/menubar-item.directive.ts","../../../projects/ui/menubar/menubar-context.ts","../../../projects/ui/menubar/menubar-radio.directive.ts","../../../projects/ui/menubar/public-api.ts"],"sourcesContent":["import { Directive, booleanAttribute, input } from '@angular/core';\r\n\r\nimport { CdkMenuBar } from '@angular/cdk/menu';\r\n\r\nimport { RaqmMenuDirective, RaqmMenuDirection } from '@raqm/ui/dropdown-menu';\r\n\r\n@Directive({\r\n selector: '[raqm-menubar]',\r\n // The CDK owns role, orientation, stack, focus and keyboard; this adds only the class.\r\n hostDirectives: [RaqmMenuDirection, { directive: CdkMenuBar }],\r\n host: {\r\n class: 'raqm-menubar',\r\n },\r\n})\r\nexport class RaqmMenubarDirective {}\r\n\r\n@Directive({\r\n selector: '[raqm-menubar-content]',\r\n hostDirectives: [{ directive: RaqmMenuDirective }],\r\n host: {\r\n class: 'raqm-menubar-content',\r\n },\r\n})\r\nexport class RaqmMenubarContentDirective {}\r\n\r\n@Directive({\r\n selector: '[raqm-menubar-label]',\r\n host: {\r\n class: 'raqm-menubar-label',\r\n // Presence-only inset hook (the `data-raqm-inset` attribute exists or not).\r\n '[attr.data-raqm-inset]': 'inset() ? \"\" : null',\r\n },\r\n})\r\nexport class RaqmMenubarLabelDirective {\r\n readonly inset = input(false, { transform: booleanAttribute });\r\n}\r\n","import { DestroyRef, Directive, ElementRef, OnInit, inject } from '@angular/core';\r\n\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { CdkMenuItem } from '@angular/cdk/menu';\r\nimport { ConnectedPosition } from '@angular/cdk/overlay';\r\n\r\nimport {\r\n RaqmMenuOverlaySync,\r\n RaqmMenuDirection,\r\n RaqmMenuTriggerBase,\r\n} from '@raqm/ui/dropdown-menu';\r\n\r\nconst MENUBAR_SIDE_OFFSET = 8;\r\nconst MENUBAR_ALIGN_OFFSET = 4;\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-trigger-for]',\r\n // `CdkMenuItem` supplies bar-item role/keyboard/focus; `CdkMenuTrigger` the overlay engine.\r\n hostDirectives: [\r\n RaqmMenuDirection,\r\n {\r\n directive: CdkMenuItem,\r\n inputs: ['cdkMenuItemDisabled: disabled'],\r\n },\r\n {\r\n directive: RaqmMenuTriggerBase,\r\n inputs: ['cdkMenuTriggerFor: raqm-menubar-trigger-for', 'cdkMenuPosition: positions'],\r\n outputs: ['cdkMenuOpened: opened', 'cdkMenuClosed: closed'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-trigger',\r\n },\r\n})\r\nexport class RaqmMenubarTriggerDirective implements OnInit {\r\n // Used only to install the default placement when the app supplies no `positions`.\r\n private readonly trigger = inject(RaqmMenuTriggerBase);\r\n\r\n private readonly direction = inject(Directionality);\r\n\r\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n // Identity tracks library defaults without replacing consumer positions.\r\n private defaultPositions: ConnectedPosition[] | null = null;\r\n\r\n private readonly overlaySync = new RaqmMenuOverlaySync(\r\n this.trigger,\r\n this.element.nativeElement,\r\n inject(DestroyRef),\r\n this.direction,\r\n {\r\n matchAnchorWidth: true,\r\n positions: () => {\r\n if (this.trigger.menuPosition !== this.defaultPositions) return this.trigger.menuPosition;\r\n this.defaultPositions = this.defaultRootPositions();\r\n this.trigger.menuPosition = this.defaultPositions;\r\n return this.defaultPositions;\r\n },\r\n },\r\n );\r\n\r\n ngOnInit(): void {\r\n if (this.trigger.menuPosition == null) {\r\n this.defaultPositions = this.defaultRootPositions();\r\n this.trigger.menuPosition = this.defaultPositions;\r\n }\r\n }\r\n\r\n private defaultRootPositions(): ConnectedPosition[] {\r\n const alignOffset =\r\n this.direction?.value === 'rtl' ? MENUBAR_ALIGN_OFFSET : -MENUBAR_ALIGN_OFFSET;\r\n return [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetX: alignOffset,\r\n offsetY: MENUBAR_SIDE_OFFSET,\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetX: alignOffset,\r\n offsetY: -MENUBAR_SIDE_OFFSET,\r\n },\r\n ];\r\n }\r\n}\r\n","import { Directive } from '@angular/core';\r\n\r\nimport { RaqmMenuCheckboxItemDirective, RaqmMenuItemDirective } from '@raqm/ui/dropdown-menu';\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-item]',\r\n // Re-exposes the Dropdown row's declared inputs; the rest are inherited transitively.\r\n hostDirectives: [\r\n {\r\n directive: RaqmMenuItemDirective,\r\n inputs: ['inset', 'raqm-menu-item: raqm-menubar-item'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-item',\r\n },\r\n})\r\nexport class RaqmMenubarItemDirective {}\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-checkbox-item]',\r\n // The Dropdown checkbox row already composes the keep-open base and one CDK checkbox.\r\n hostDirectives: [\r\n {\r\n directive: RaqmMenuCheckboxItemDirective,\r\n inputs: ['inset', 'checked'],\r\n outputs: ['checkedChange'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-checkbox-item',\r\n },\r\n})\r\nexport class RaqmMenubarCheckboxItemDirective {}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * Private radio-group contract shared with the item children; never re-exported.\r\n *\r\n * @remarks\r\n * The group owns the single `model` value: items read it through `isSelected` and\r\n * commit once through `select`. `register`/`unregister` only catch duplicate values.\r\n */\r\nexport interface RaqmMenubarRadioGroupContext {\r\n isSelected(value: string): boolean;\r\n // A reselect is a no-op, so it never clears the model or emits.\r\n select(value: string): void;\r\n register(value: string): void;\r\n unregister(value: string): void;\r\n}\r\n\r\nexport const RAQM_MENUBAR_RADIO_GROUP = new InjectionToken<RaqmMenubarRadioGroupContext>(\r\n 'raqm-menubar-radio-group',\r\n);\r\n","import {\r\n Directive,\r\n OnDestroy,\r\n OnInit,\r\n booleanAttribute,\r\n effect,\r\n inject,\r\n input,\r\n isDevMode,\r\n model,\r\n} from '@angular/core';\r\n\r\nimport { CdkMenuGroup, CdkMenuItemRadio } from '@angular/cdk/menu';\r\n\r\nimport { RAQM_MENUBAR_RADIO_GROUP, RaqmMenubarRadioGroupContext } from './menubar-context';\r\n\r\n@Directive({\r\n selector: '[raqm-menubar-radio-group]',\r\n // The CDK group scopes exclusive selection to this node with its own dispatcher.\r\n hostDirectives: [{ directive: CdkMenuGroup }],\r\n // The private context the radio items inject; one instance per group element.\r\n providers: [\r\n {\r\n provide: RAQM_MENUBAR_RADIO_GROUP,\r\n useExisting: RaqmMenubarRadioGroupDirective,\r\n },\r\n ],\r\n})\r\nexport class RaqmMenubarRadioGroupDirective implements RaqmMenubarRadioGroupContext {\r\n readonly value = model<string | null>(null);\r\n\r\n // Counts live item children per value, so a duplicate fails clearly in dev.\r\n private readonly registrations = new Map<string, number>();\r\n\r\n // Whether `value` is the committed selection; an unknown value matches nothing.\r\n isSelected(value: string): boolean {\r\n return this.value() === value;\r\n }\r\n\r\n select(value: string): void {\r\n this.value.set(value);\r\n }\r\n\r\n // A second claim for one value in dev fails: two radio items may not share it.\r\n register(value: string): void {\r\n const count = this.registrations.get(value) ?? 0;\r\n if (count > 0 && isDevMode()) {\r\n throw new Error(\r\n `Raqm menubar radio group: duplicate radio item value \"${value}\". ` +\r\n 'Each radio item inside one group needs a unique non-empty value.',\r\n );\r\n }\r\n this.registrations.set(value, count + 1);\r\n }\r\n\r\n // Deleting at zero lets a later item reuse a value once its predecessor is gone.\r\n unregister(value: string): void {\r\n const count = this.registrations.get(value) ?? 0;\r\n if (count <= 1) {\r\n this.registrations.delete(value);\r\n } else {\r\n this.registrations.set(value, count - 1);\r\n }\r\n }\r\n}\r\n\r\n@Directive({\r\n selector: 'button[raqm-menubar-radio-item]',\r\n // The CDK owns role, `aria-checked`, focus, keyboard and exclusive dispatch.\r\n hostDirectives: [\r\n {\r\n directive: CdkMenuItemRadio,\r\n inputs: ['cdkMenuItemDisabled: disabled'],\r\n },\r\n ],\r\n host: {\r\n class: 'raqm-menubar-radio-item',\r\n // Presence-only inset hook (the `data-raqm-inset` attribute exists or not).\r\n '[attr.data-raqm-inset]': 'inset() ? \"\" : null',\r\n // Focus-follows-pointer, identical to the Dropdown rows (see `onPointerEnter`).\r\n '(pointerenter)': 'onPointerEnter($event)',\r\n },\r\n})\r\nexport class RaqmMenubarRadioItemDirective implements OnInit, OnDestroy {\r\n // The single activation source: its `triggered` is observed, its `checked` derived.\r\n private readonly radio = inject(CdkMenuItemRadio);\r\n\r\n // A lone radio (no group) keeps the CDK's own exclusive-dispatch behaviour.\r\n private readonly group = inject(RAQM_MENUBAR_RADIO_GROUP, { optional: true });\r\n\r\n readonly value = input.required<string>();\r\n\r\n readonly inset = input(false, { transform: booleanAttribute });\r\n\r\n // Typed structurally (no rxjs import), matching the Dropdown checkbox pattern.\r\n private readonly triggerSubscription: { unsubscribe(): void };\r\n\r\n constructor() {\r\n // Derives `checked` from the group model, so an unknown group value matches no row.\r\n effect(() => {\r\n if (this.group) {\r\n this.radio.checked = this.group.isSelected(this.value());\r\n }\r\n });\r\n\r\n // One activation path: `triggered` is the only source of the model commit.\r\n this.triggerSubscription = this.radio.triggered.subscribe(() => {\r\n if (this.group && !this.radio.disabled) {\r\n this.group.select(this.value());\r\n }\r\n });\r\n }\r\n\r\n // Registers the value once inputs are bound; a missing or duplicate value fails in dev.\r\n ngOnInit(): void {\r\n const value = this.value();\r\n if (!value && isDevMode()) {\r\n throw new Error('Raqm menubar radio item: a non-empty `value` is required.');\r\n }\r\n this.group?.register(value);\r\n }\r\n\r\n // Releases the value registration and subscription so no menu outlives the directive.\r\n ngOnDestroy(): void {\r\n this.group?.unregister(this.value());\r\n this.triggerSubscription.unsubscribe();\r\n }\r\n\r\n // Hover highlight as in the Dropdown rows: an enabled, non-touch entry focuses the\r\n // row through the public `CdkMenuItem.focus()`, which never activates it.\r\n protected onPointerEnter(event: Event): void {\r\n if (!(event instanceof PointerEvent) || event.pointerType === 'touch' || this.radio.disabled) {\r\n return;\r\n }\r\n this.radio.focus();\r\n }\r\n}\r\n","// Public API for `@raqm/ui/menubar`; the root entry point re-exports these symbols.\r\nimport {\r\n RaqmMenuGroupDirective,\r\n RaqmMenuLabelDirective,\r\n RaqmMenuSeparatorDirective,\r\n RaqmMenuShortcutDirective,\r\n} from '@raqm/ui/dropdown-menu';\r\n\r\nimport {\r\n RaqmMenubarContentDirective,\r\n RaqmMenubarDirective,\r\n RaqmMenubarLabelDirective,\r\n} from './menubar.directive';\r\nimport { RaqmMenubarTriggerDirective } from './menubar-trigger.directive';\r\nimport {\r\n RaqmMenubarCheckboxItemDirective,\r\n RaqmMenubarItemDirective,\r\n} from './menubar-item.directive';\r\nimport {\r\n RaqmMenubarRadioGroupDirective,\r\n RaqmMenubarRadioItemDirective,\r\n} from './menubar-radio.directive';\r\n\r\nexport { RaqmMenubarDirective, RaqmMenubarContentDirective, RaqmMenubarLabelDirective };\r\nexport { RaqmMenubarTriggerDirective };\r\nexport { RaqmMenubarItemDirective, RaqmMenubarCheckboxItemDirective };\r\nexport { RaqmMenubarRadioGroupDirective, RaqmMenubarRadioItemDirective };\r\n\r\nexport const RaqmMenubar = [\r\n RaqmMenubarDirective,\r\n RaqmMenubarTriggerDirective,\r\n RaqmMenubarContentDirective,\r\n RaqmMenubarLabelDirective,\r\n RaqmMenubarItemDirective,\r\n RaqmMenubarCheckboxItemDirective,\r\n RaqmMenubarRadioGroupDirective,\r\n RaqmMenubarRadioItemDirective,\r\n RaqmMenuGroupDirective,\r\n RaqmMenuLabelDirective,\r\n RaqmMenuSeparatorDir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;CAClB;CApDW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA6B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA7B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA6B,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA;GAAA,WAAA,EAAA,gBAAA,yBAAA;GAAA,YAAA,EAAA,wBAAA,wBAAA;GAAA,gBAAA;EAAA;EAAA,gBAAA,CAAA;GAAA,WAAAA,GAAA;GAAA,QAAA,CAAA,uBAAA,UAAA;EAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAA7B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA6B,YAAA,CAAA;EAjBzC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GAEV,gBAAgB,CACd;IACE,WAAW;IACX,QAAQ,CAAC,+BAA+B;GACzC,CACF;GACD,MAAM;IACJ,OAAO;IAEP,0BAA0B;IAE1B,kBAAkB;GACnB;EACF,CAAA;;;;;;;;;;;;;;;;;;;;;;ACtDD,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACQ"}
@@ -95,6 +95,7 @@ function bridgeOverlayTheme(origin, pane) {
95
95
  }));
96
96
  const previousTheme = pane.getAttribute("data-raqm-theme");
97
97
  let disposed = false;
98
+ let scheduled = false;
98
99
  const refresh = () => {
99
100
  if (disposed) return;
100
101
  const computed = view.getComputedStyle(origin);
@@ -109,8 +110,16 @@ function bridgeOverlayTheme(origin, pane) {
109
110
  if (pane.getAttribute("data-raqm-theme") !== theme) pane.setAttribute("data-raqm-theme", theme);
110
111
  } else if (pane.hasAttribute("data-raqm-theme")) pane.removeAttribute("data-raqm-theme");
111
112
  };
113
+ const schedule = () => {
114
+ if (disposed || scheduled) return;
115
+ scheduled = true;
116
+ queueMicrotask(() => {
117
+ scheduled = false;
118
+ refresh();
119
+ });
120
+ };
112
121
  refresh();
113
- const observer = typeof view.MutationObserver === "function" ? new view.MutationObserver(refresh) : null;
122
+ const observer = typeof view.MutationObserver === "function" ? new view.MutationObserver(schedule) : null;
114
123
  for (let ancestor = origin; ancestor; ancestor = ancestor.parentElement) observer?.observe(ancestor, {
115
124
  attributes: true,
116
125
  attributeFilter: [
@@ -119,15 +128,16 @@ function bridgeOverlayTheme(origin, pane) {
119
128
  "data-raqm-theme"
120
129
  ]
121
130
  });
122
- view.addEventListener("resize", refresh);
131
+ view.addEventListener("resize", schedule);
123
132
  const media = typeof view.matchMedia === "function" ? ["(prefers-color-scheme: dark)", "(prefers-reduced-motion: reduce)"].map((query) => view.matchMedia(query)) : [];
124
- for (const query of media) query.addEventListener?.("change", refresh);
133
+ for (const query of media) query.addEventListener?.("change", schedule);
125
134
  return () => {
126
135
  if (disposed) return;
127
136
  disposed = true;
137
+ scheduled = false;
128
138
  observer?.disconnect();
129
- view.removeEventListener("resize", refresh);
130
- for (const query of media) query.removeEventListener?.("change", refresh);
139
+ view.removeEventListener("resize", schedule);
140
+ for (const query of media) query.removeEventListener?.("change", schedule);
131
141
  for (const { name, value, priority } of previous) if (value) pane.style.setProperty(name, value, priority);
132
142
  else pane.style.removeProperty(name);
133
143
  if (previousTheme === null) pane.removeAttribute("data-raqm-theme");
@@ -1 +1 @@
1
- {"version":3,"file":"raqm-ui-overlay-internal.mjs","names":[],"sources":["../../../projects/ui/internal/overlay-theme.ts","../../../projects/ui/internal/overlay-ownership.ts"],"sourcesContent":["// Only stylesheet theme tokens belong here; pane-specific geometry variables\r\n// must remain under the overlay owner's control. Keep in sync with _tokens.scss.\r\nconst themeTokens = [\r\n '--raqm-spacing',\r\n '--raqm-radius',\r\n '--raqm-radius-sm',\r\n '--raqm-radius-md',\r\n '--raqm-radius-lg',\r\n '--raqm-radius-xl',\r\n '--raqm-radius-2xl',\r\n '--raqm-font-size-xs',\r\n '--raqm-font-size-sm',\r\n '--raqm-font-size-base',\r\n '--raqm-font-size-lg',\r\n '--raqm-line-height-none',\r\n '--raqm-line-height-tight',\r\n '--raqm-line-height-snug',\r\n '--raqm-line-height-normal',\r\n '--raqm-line-height-relaxed',\r\n '--raqm-font-weight-normal',\r\n '--raqm-font-weight-medium',\r\n '--raqm-shadow-sm',\r\n '--raqm-shadow-md',\r\n '--raqm-shadow-lg',\r\n '--raqm-focus-ring-width',\r\n '--raqm-disabled-opacity',\r\n '--raqm-duration-fast',\r\n '--raqm-duration-base',\r\n '--raqm-duration-slow',\r\n '--raqm-duration-slower',\r\n '--raqm-ease-standard',\r\n '--raqm-ease-in-out',\r\n '--raqm-ease-out',\r\n '--raqm-ease-linear',\r\n '--raqm-ease-emphasized',\r\n '--raqm-background',\r\n '--raqm-foreground',\r\n '--raqm-card',\r\n '--raqm-card-foreground',\r\n '--raqm-popover',\r\n '--raqm-popover-foreground',\r\n '--raqm-primary',\r\n '--raqm-primary-foreground',\r\n '--raqm-secondary',\r\n '--raqm-secondary-foreground',\r\n '--raqm-muted',\r\n '--raqm-muted-foreground',\r\n '--raqm-accent',\r\n '--raqm-accent-foreground',\r\n '--raqm-destructive',\r\n '--raqm-destructive-foreground',\r\n '--raqm-border',\r\n '--raqm-input',\r\n '--raqm-ring',\r\n '--raqm-white',\r\n '--raqm-primary-hover',\r\n '--raqm-secondary-hover',\r\n '--raqm-control-bg',\r\n '--raqm-input-disabled-bg',\r\n '--raqm-invalid-border',\r\n '--raqm-invalid-ring',\r\n '--raqm-focus-ring-color',\r\n '--raqm-outline-border',\r\n '--raqm-outline-hover',\r\n '--raqm-tooltip-kbd-bg',\r\n '--raqm-theme-light-weight',\r\n '--raqm-ghost-hover-alpha',\r\n '--raqm-destructive-bg-alpha',\r\n '--raqm-destructive-hover-alpha',\r\n '--raqm-destructive-focus-alpha',\r\n '--raqm-avatar-blend',\r\n '--raqm-control-bg-alpha',\r\n '--raqm-control-hover-alpha',\r\n '--raqm-field-checked-border-alpha',\r\n '--raqm-field-checked-bg-alpha',\r\n '--raqm-switch-unchecked-alpha',\r\n '--raqm-check-mark',\r\n '--raqm-mixed-mark',\r\n '--raqm-native-select-chevron',\r\n '--raqm-sidebar',\r\n '--raqm-sidebar-foreground',\r\n '--raqm-sidebar-primary',\r\n '--raqm-sidebar-primary-foreground',\r\n '--raqm-sidebar-accent',\r\n '--raqm-sidebar-accent-foreground',\r\n '--raqm-sidebar-border',\r\n '--raqm-sidebar-ring',\r\n] as const;\r\n\r\n/** @internal Mirror an origin's theme onto one attached pane until disposed. */\r\nexport function bridgeOverlayTheme(origin: HTMLElement, pane: HTMLElement): () => void {\r\n const view = origin.ownerDocument?.defaultView;\r\n if (!view || pane.ownerDocument !== origin.ownerDocument || !view.getComputedStyle)\r\n return () => {};\r\n\r\n const properties = [...themeTokens, 'color-scheme'];\r\n const previous = properties.map((name) => ({\r\n name,\r\n value: pane.style.getPropertyValue(name),\r\n priority: pane.style.getPropertyPriority(name),\r\n }));\r\n const previousTheme = pane.getAttribute('data-raqm-theme');\r\n let disposed = false;\r\n\r\n const refresh = () => {\r\n if (disposed) return;\r\n const computed = view.getComputedStyle(origin);\r\n for (const name of properties) {\r\n const value = computed.getPropertyValue(name).trim();\r\n if (value) {\r\n if (pane.style.getPropertyValue(name) !== value || pane.style.getPropertyPriority(name)) {\r\n pane.style.setProperty(name, value);\r\n }\r\n } else if (pane.style.getPropertyValue(name)) {\r\n pane.style.removeProperty(name);\r\n }\r\n }\r\n const theme = origin\r\n .closest('[data-raqm-theme=\"light\"], [data-raqm-theme=\"dark\"]')\r\n ?.getAttribute('data-raqm-theme');\r\n if (theme) {\r\n if (pane.getAttribute('data-raqm-theme') !== theme)\r\n pane.setAttribute('data-raqm-theme', theme);\r\n } else if (pane.hasAttribute('data-raqm-theme')) {\r\n pane.removeAttribute('data-raqm-theme');\r\n }\r\n };\r\n\r\n refresh();\r\n const observer =\r\n typeof view.MutationObserver === 'function' ? new view.MutationObserver(refresh) : null;\r\n for (let ancestor: Element | null = origin; ancestor; ancestor = ancestor.parentElement) {\r\n observer?.observe(ancestor, {\r\n attributes: true,\r\n attributeFilter: ['class', 'style', 'data-raqm-theme'],\r\n });\r\n }\r\n view.addEventListener('resize', refresh);\r\n const media =\r\n typeof view.matchMedia === 'function'\r\n ? ['(prefers-color-scheme: dark)', '(prefers-reduced-motion: reduce)'].map((query) =>\r\n view.matchMedia(query),\r\n )\r\n : [];\r\n for (const query of media) query.addEventListener?.('change', refresh);\r\n\r\n return () => {\r\n if (disposed) return;\r\n disposed = true;\r\n observer?.disconnect();\r\n view.removeEventListener('resize', refresh);\r\n for (const query of media) query.removeEventListener?.('change', refresh);\r\n for (const { name, value, priority } of previous) {\r\n if (value) pane.style.setProperty(name, value, priority);\r\n else pane.style.removeProperty(name);\r\n }\r\n if (previousTheme === null) pane.removeAttribute('data-raqm-theme');\r\n else pane.setAttribute('data-raqm-theme', previousTheme);\r\n };\r\n}\r\n","import type { OverlayRef } from '@angular/cdk/overlay';\r\nimport { bridgeOverlayTheme } from './overlay-theme';\r\n\r\n// Relationships are scoped to the origin's document, not to the global overlay\r\n// container: unrelated overlays must remain outside the owning disclosure.\r\n// Secondary entry points are independently bundled, so use a shared symbol on\r\n// each document rather than a module-local map duplicated in each bundle.\r\nconst ownershipKey = Symbol.for('raqm.ui.overlay-ownership');\r\ntype Ownership = {\r\n origin: HTMLElement;\r\n ref: OverlayRef;\r\n includeBackdrop: boolean;\r\n release: () => void;\r\n};\r\ntype OwnershipDocument = Document & { [ownershipKey]?: Map<HTMLElement, Ownership> };\r\n\r\n/** @internal Register an attached pane until its overlay detaches. */\r\nexport function registerOverlayOwnership(\r\n origin: HTMLElement,\r\n ref: OverlayRef,\r\n includeBackdrop = false,\r\n): () => void {\r\n const document = origin.ownerDocument as OwnershipDocument;\r\n let panes = document[ownershipKey];\r\n if (!panes) {\r\n panes = new Map();\r\n document[ownershipKey] = panes;\r\n }\r\n const pane = ref.overlayElement;\r\n panes.get(pane)?.release();\r\n const releaseTheme = bridgeOverlayTheme(origin, pane);\r\n let released = false;\r\n let subscription: { unsubscribe(): void } | undefined;\r\n const ownership: Ownership = { origin, ref, includeBackdrop, release: () => release() };\r\n const release = () => {\r\n if (released) return;\r\n released = true;\r\n if (panes?.get(pane) === ownership) panes.delete(pane);\r\n subscription?.unsubscribe();\r\n releaseTheme();\r\n };\r\n panes.set(pane, ownership);\r\n subscription = ref.detachments().subscribe(release);\r\n return release;\r\n}\r\n\r\n/** @internal Includes transitively owned panes whose origins remain connected. */\r\nexport function containsOwnedOverlay(root: HTMLElement, target: Node | null): boolean {\r\n if (!target || target.ownerDocument !== root.ownerDocument) return false;\r\n const panes = (root.ownerDocument as OwnershipDocument)[ownershipKey];\r\n const visited = new Set<HTMLElement>();\r\n const contains = (container: HTMLElement): boolean => {\r\n if (container.contains(target)) return true;\r\n if (visited.has(container)) return false;\r\n visited.add(container);\r\n for (const [pane, { origin, ref, includeBackdrop }] of panes ?? []) {\r\n if (origin.isConnected && container.contains(origin)) {\r\n if (includeBackdrop && ref.backdropElement?.contains(target)) return true;\r\n if (contains(pane)) return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return contains(root);\r\n}\r\n"],"mappings":"AAEA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAC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,aAAY;CACd;CACA,MAAM,IAAI,MAAM,SAAS;CACzB,eAAe,IAAI,YAAW,CAAE,CAAC,UAAU,OAAO;CAClD,OAAO;AACT;AAGA,SAAgB,qBAAqB,MAAmB,QAAmB;CACzE,IAAI,CAAC,UAAU,OAAO,kBAAkB,KAAK,eAAe,OAAO;CACnE,MAAM,QAAS,KAAK,cAAoC;CACxD,MAAM,0BAAU,IAAI,IAAG;CACvB,MAAM,YAAY,cAAmC;EACnD,IAAI,UAAU,SAAS,MAAM,GAAG,OAAO;EACvC,IAAI,QAAQ,IAAI,SAAS,GAAG,OAAO;EACnC,QAAQ,IAAI,SAAS;EACrB,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,KAAK,sBAAsB,SAAS,CAAA,GAC9D,IAAI,OAAO,eAAe,UAAU,SAAS,MAAM,GAAG;GACpD,IAAI,mBAAmB,IAAI,iBAAiB,SAAS,MAAM,GAAG,OAAO;GACrE,IAAI,SAAS,IAAI,GAAG,OAAO;EAC7B;EAEF,OAAO;CACT;CACA,OAAO,SAAS,IAAI;AACtB"}
1
+ {"version":3,"file":"raqm-ui-overlay-internal.mjs","names":[],"sources":["../../../projects/ui/internal/overlay-theme.ts","../../../projects/ui/internal/overlay-ownership.ts"],"sourcesContent":["// Only stylesheet theme tokens belong here; pane-specific geometry variables\r\n// must remain under the overlay owner's control. Keep in sync with _tokens.scss.\r\nconst themeTokens = [\r\n '--raqm-spacing',\r\n '--raqm-radius',\r\n '--raqm-radius-sm',\r\n '--raqm-radius-md',\r\n '--raqm-radius-lg',\r\n '--raqm-radius-xl',\r\n '--raqm-radius-2xl',\r\n '--raqm-font-size-xs',\r\n '--raqm-font-size-sm',\r\n '--raqm-font-size-base',\r\n '--raqm-font-size-lg',\r\n '--raqm-line-height-none',\r\n '--raqm-line-height-tight',\r\n '--raqm-line-height-snug',\r\n '--raqm-line-height-normal',\r\n '--raqm-line-height-relaxed',\r\n '--raqm-font-weight-normal',\r\n '--raqm-font-weight-medium',\r\n '--raqm-shadow-sm',\r\n '--raqm-shadow-md',\r\n '--raqm-shadow-lg',\r\n '--raqm-focus-ring-width',\r\n '--raqm-disabled-opacity',\r\n '--raqm-duration-fast',\r\n '--raqm-duration-base',\r\n '--raqm-duration-slow',\r\n '--raqm-duration-slower',\r\n '--raqm-ease-standard',\r\n '--raqm-ease-in-out',\r\n '--raqm-ease-out',\r\n '--raqm-ease-linear',\r\n '--raqm-ease-emphasized',\r\n '--raqm-background',\r\n '--raqm-foreground',\r\n '--raqm-card',\r\n '--raqm-card-foreground',\r\n '--raqm-popover',\r\n '--raqm-popover-foreground',\r\n '--raqm-primary',\r\n '--raqm-primary-foreground',\r\n '--raqm-secondary',\r\n '--raqm-secondary-foreground',\r\n '--raqm-muted',\r\n '--raqm-muted-foreground',\r\n '--raqm-accent',\r\n '--raqm-accent-foreground',\r\n '--raqm-destructive',\r\n '--raqm-destructive-foreground',\r\n '--raqm-border',\r\n '--raqm-input',\r\n '--raqm-ring',\r\n '--raqm-white',\r\n '--raqm-primary-hover',\r\n '--raqm-secondary-hover',\r\n '--raqm-control-bg',\r\n '--raqm-input-disabled-bg',\r\n '--raqm-invalid-border',\r\n '--raqm-invalid-ring',\r\n '--raqm-focus-ring-color',\r\n '--raqm-outline-border',\r\n '--raqm-outline-hover',\r\n '--raqm-tooltip-kbd-bg',\r\n '--raqm-theme-light-weight',\r\n '--raqm-ghost-hover-alpha',\r\n '--raqm-destructive-bg-alpha',\r\n '--raqm-destructive-hover-alpha',\r\n '--raqm-destructive-focus-alpha',\r\n '--raqm-avatar-blend',\r\n '--raqm-control-bg-alpha',\r\n '--raqm-control-hover-alpha',\r\n '--raqm-field-checked-border-alpha',\r\n '--raqm-field-checked-bg-alpha',\r\n '--raqm-switch-unchecked-alpha',\r\n '--raqm-check-mark',\r\n '--raqm-mixed-mark',\r\n '--raqm-native-select-chevron',\r\n '--raqm-sidebar',\r\n '--raqm-sidebar-foreground',\r\n '--raqm-sidebar-primary',\r\n '--raqm-sidebar-primary-foreground',\r\n '--raqm-sidebar-accent',\r\n '--raqm-sidebar-accent-foreground',\r\n '--raqm-sidebar-border',\r\n '--raqm-sidebar-ring',\r\n] as const;\r\n\r\n/** @internal Mirror an origin's theme onto one attached pane until disposed. */\r\nexport function bridgeOverlayTheme(origin: HTMLElement, pane: HTMLElement): () => void {\r\n const view = origin.ownerDocument?.defaultView;\r\n if (!view || pane.ownerDocument !== origin.ownerDocument || !view.getComputedStyle)\r\n return () => {};\r\n\r\n const properties = [...themeTokens, 'color-scheme'];\r\n const previous = properties.map((name) => ({\r\n name,\r\n value: pane.style.getPropertyValue(name),\r\n priority: pane.style.getPropertyPriority(name),\r\n }));\r\n const previousTheme = pane.getAttribute('data-raqm-theme');\r\n let disposed = false;\r\n let scheduled = false;\r\n\r\n const refresh = () => {\r\n if (disposed) return;\r\n const computed = view.getComputedStyle(origin);\r\n for (const name of properties) {\r\n const value = computed.getPropertyValue(name).trim();\r\n if (value) {\r\n if (pane.style.getPropertyValue(name) !== value || pane.style.getPropertyPriority(name)) {\r\n pane.style.setProperty(name, value);\r\n }\r\n } else if (pane.style.getPropertyValue(name)) {\r\n pane.style.removeProperty(name);\r\n }\r\n }\r\n const theme = origin\r\n .closest('[data-raqm-theme=\"light\"], [data-raqm-theme=\"dark\"]')\r\n ?.getAttribute('data-raqm-theme');\r\n if (theme) {\r\n if (pane.getAttribute('data-raqm-theme') !== theme)\r\n pane.setAttribute('data-raqm-theme', theme);\r\n } else if (pane.hasAttribute('data-raqm-theme')) {\r\n pane.removeAttribute('data-raqm-theme');\r\n }\r\n };\r\n\r\n // Ancestor mutations, resize and preference changes can arrive together; one microtask\r\n // refresh per burst keeps the theme applied before paint without repeating the reads.\r\n const schedule = () => {\r\n if (disposed || scheduled) return;\r\n scheduled = true;\r\n queueMicrotask(() => {\r\n scheduled = false;\r\n refresh();\r\n });\r\n };\r\n\r\n refresh();\r\n const observer =\r\n typeof view.MutationObserver === 'function' ? new view.MutationObserver(schedule) : null;\r\n for (let ancestor: Element | null = origin; ancestor; ancestor = ancestor.parentElement) {\r\n observer?.observe(ancestor, {\r\n attributes: true,\r\n attributeFilter: ['class', 'style', 'data-raqm-theme'],\r\n });\r\n }\r\n view.addEventListener('resize', schedule);\r\n const media =\r\n typeof view.matchMedia === 'function'\r\n ? ['(prefers-color-scheme: dark)', '(prefers-reduced-motion: reduce)'].map((query) =>\r\n view.matchMedia(query),\r\n )\r\n : [];\r\n for (const query of media) query.addEventListener?.('change', schedule);\r\n\r\n return () => {\r\n if (disposed) return;\r\n disposed = true;\r\n scheduled = false;\r\n observer?.disconnect();\r\n view.removeEventListener('resize', schedule);\r\n for (const query of media) query.removeEventListener?.('change', schedule);\r\n for (const { name, value, priority } of previous) {\r\n if (value) pane.style.setProperty(name, value, priority);\r\n else pane.style.removeProperty(name);\r\n }\r\n if (previousTheme === null) pane.removeAttribute('data-raqm-theme');\r\n else pane.setAttribute('data-raqm-theme', previousTheme);\r\n };\r\n}\r\n","import type { OverlayRef } from '@angular/cdk/overlay';\r\nimport { bridgeOverlayTheme } from './overlay-theme';\r\n\r\n// Relationships are scoped to the origin's document, not to the global overlay\r\n// container: unrelated overlays must remain outside the owning disclosure.\r\n// Secondary entry points are independently bundled, so use a shared symbol on\r\n// each document rather than a module-local map duplicated in each bundle.\r\nconst ownershipKey = Symbol.for('raqm.ui.overlay-ownership');\r\ntype Ownership = {\r\n origin: HTMLElement;\r\n ref: OverlayRef;\r\n includeBackdrop: boolean;\r\n release: () => void;\r\n};\r\ntype OwnershipDocument = Document & { [ownershipKey]?: Map<HTMLElement, Ownership> };\r\n\r\n/** @internal Register an attached pane until its overlay detaches. */\r\nexport function registerOverlayOwnership(\r\n origin: HTMLElement,\r\n ref: OverlayRef,\r\n includeBackdrop = false,\r\n): () => void {\r\n const document = origin.ownerDocument as OwnershipDocument;\r\n let panes = document[ownershipKey];\r\n if (!panes) {\r\n panes = new Map();\r\n document[ownershipKey] = panes;\r\n }\r\n const pane = ref.overlayElement;\r\n panes.get(pane)?.release();\r\n const releaseTheme = bridgeOverlayTheme(origin, pane);\r\n let released = false;\r\n let subscription: { unsubscribe(): void } | undefined;\r\n const ownership: Ownership = { origin, ref, includeBackdrop, release: () => release() };\r\n const release = () => {\r\n if (released) return;\r\n released = true;\r\n if (panes?.get(pane) === ownership) panes.delete(pane);\r\n subscription?.unsubscribe();\r\n releaseTheme();\r\n };\r\n panes.set(pane, ownership);\r\n subscription = ref.detachments().subscribe(release);\r\n return release;\r\n}\r\n\r\n/** @internal Includes transitively owned panes whose origins remain connected. */\r\nexport function containsOwnedOverlay(root: HTMLElement, target: Node | null): boolean {\r\n if (!target || target.ownerDocument !== root.ownerDocument) return false;\r\n const panes = (root.ownerDocument as OwnershipDocument)[ownershipKey];\r\n const visited = new Set<HTMLElement>();\r\n const contains = (container: HTMLElement): boolean => {\r\n if (container.contains(target)) return true;\r\n if (visited.has(container)) return false;\r\n visited.add(container);\r\n for (const [pane, { origin, ref, includeBackdrop }] of panes ?? []) {\r\n if (origin.isConnected && container.contains(origin)) {\r\n if (includeBackdrop && ref.backdropElement?.contains(target)) return true;\r\n if (contains(pane)) return true;\r\n }\r\n }\r\n return false;\r\n };\r\n return contains(root);\r\n}\r\n"],"mappings":"AAEA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACQ;AAGV,SAAgB,mBAAmB,QAAqB,MAAiB;CACvE,MAA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