@raqm/ui 0.0.0-stage → 0.1.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.
- package/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/NOTICE.md +28 -0
- package/README.md +126 -3
- package/combobox/README.md +17 -0
- package/fesm2022/raqm-ui-accordion.mjs +414 -0
- package/fesm2022/raqm-ui-accordion.mjs.map +1 -0
- package/fesm2022/raqm-ui-alert-dialog.mjs +457 -0
- package/fesm2022/raqm-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/raqm-ui-alert.mjs +195 -0
- package/fesm2022/raqm-ui-alert.mjs.map +1 -0
- package/fesm2022/raqm-ui-aspect-ratio.mjs +66 -0
- package/fesm2022/raqm-ui-aspect-ratio.mjs.map +1 -0
- package/fesm2022/raqm-ui-attachment.mjs +435 -0
- package/fesm2022/raqm-ui-attachment.mjs.map +1 -0
- package/fesm2022/raqm-ui-avatar.mjs +337 -0
- package/fesm2022/raqm-ui-avatar.mjs.map +1 -0
- package/fesm2022/raqm-ui-badge.mjs +68 -0
- package/fesm2022/raqm-ui-badge.mjs.map +1 -0
- package/fesm2022/raqm-ui-breadcrumb.mjs +309 -0
- package/fesm2022/raqm-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/raqm-ui-button-group.mjs +138 -0
- package/fesm2022/raqm-ui-button-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-button.mjs +295 -0
- package/fesm2022/raqm-ui-button.mjs.map +1 -0
- package/fesm2022/raqm-ui-calendar.mjs +1394 -0
- package/fesm2022/raqm-ui-calendar.mjs.map +1 -0
- package/fesm2022/raqm-ui-card.mjs +331 -0
- package/fesm2022/raqm-ui-card.mjs.map +1 -0
- package/fesm2022/raqm-ui-carousel.mjs +410 -0
- package/fesm2022/raqm-ui-carousel.mjs.map +1 -0
- package/fesm2022/raqm-ui-checkbox.mjs +86 -0
- package/fesm2022/raqm-ui-checkbox.mjs.map +1 -0
- package/fesm2022/raqm-ui-collapsible.mjs +266 -0
- package/fesm2022/raqm-ui-collapsible.mjs.map +1 -0
- package/fesm2022/raqm-ui-combobox.mjs +1584 -0
- package/fesm2022/raqm-ui-combobox.mjs.map +1 -0
- package/fesm2022/raqm-ui-command.mjs +1210 -0
- package/fesm2022/raqm-ui-command.mjs.map +1 -0
- package/fesm2022/raqm-ui-context-menu.mjs +723 -0
- package/fesm2022/raqm-ui-context-menu.mjs.map +1 -0
- package/fesm2022/raqm-ui-dialog.mjs +1214 -0
- package/fesm2022/raqm-ui-dialog.mjs.map +1 -0
- package/fesm2022/raqm-ui-drawer.mjs +687 -0
- package/fesm2022/raqm-ui-drawer.mjs.map +1 -0
- package/fesm2022/raqm-ui-dropdown-menu.mjs +1168 -0
- package/fesm2022/raqm-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/raqm-ui-empty.mjs +272 -0
- package/fesm2022/raqm-ui-empty.mjs.map +1 -0
- package/fesm2022/raqm-ui-field.mjs +517 -0
- package/fesm2022/raqm-ui-field.mjs.map +1 -0
- package/fesm2022/raqm-ui-hover-card.mjs +828 -0
- package/fesm2022/raqm-ui-hover-card.mjs.map +1 -0
- package/fesm2022/raqm-ui-input-group.mjs +270 -0
- package/fesm2022/raqm-ui-input-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-input-otp.mjs +788 -0
- package/fesm2022/raqm-ui-input-otp.mjs.map +1 -0
- package/fesm2022/raqm-ui-input.mjs +73 -0
- package/fesm2022/raqm-ui-input.mjs.map +1 -0
- package/fesm2022/raqm-ui-item.mjs +495 -0
- package/fesm2022/raqm-ui-item.mjs.map +1 -0
- package/fesm2022/raqm-ui-kbd.mjs +80 -0
- package/fesm2022/raqm-ui-kbd.mjs.map +1 -0
- package/fesm2022/raqm-ui-label.mjs +44 -0
- package/fesm2022/raqm-ui-label.mjs.map +1 -0
- package/fesm2022/raqm-ui-menubar.mjs +536 -0
- package/fesm2022/raqm-ui-menubar.mjs.map +1 -0
- package/fesm2022/raqm-ui-native-select.mjs +131 -0
- package/fesm2022/raqm-ui-native-select.mjs.map +1 -0
- package/fesm2022/raqm-ui-navigation-menu.mjs +1399 -0
- package/fesm2022/raqm-ui-navigation-menu.mjs.map +1 -0
- package/fesm2022/raqm-ui-overlay-internal.mjs +185 -0
- package/fesm2022/raqm-ui-overlay-internal.mjs.map +1 -0
- package/fesm2022/raqm-ui-pagination.mjs +440 -0
- package/fesm2022/raqm-ui-pagination.mjs.map +1 -0
- package/fesm2022/raqm-ui-popover.mjs +1495 -0
- package/fesm2022/raqm-ui-popover.mjs.map +1 -0
- package/fesm2022/raqm-ui-progress.mjs +369 -0
- package/fesm2022/raqm-ui-progress.mjs.map +1 -0
- package/fesm2022/raqm-ui-questionnaire.mjs +1005 -0
- package/fesm2022/raqm-ui-questionnaire.mjs.map +1 -0
- package/fesm2022/raqm-ui-radio-group.mjs +151 -0
- package/fesm2022/raqm-ui-radio-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-resizable.mjs +439 -0
- package/fesm2022/raqm-ui-resizable.mjs.map +1 -0
- package/fesm2022/raqm-ui-scroll-area.mjs +510 -0
- package/fesm2022/raqm-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/raqm-ui-select.mjs +1073 -0
- package/fesm2022/raqm-ui-select.mjs.map +1 -0
- package/fesm2022/raqm-ui-separator.mjs +103 -0
- package/fesm2022/raqm-ui-separator.mjs.map +1 -0
- package/fesm2022/raqm-ui-sheet.mjs +411 -0
- package/fesm2022/raqm-ui-sheet.mjs.map +1 -0
- package/fesm2022/raqm-ui-sidebar.mjs +1784 -0
- package/fesm2022/raqm-ui-sidebar.mjs.map +1 -0
- package/fesm2022/raqm-ui-skeleton.mjs +50 -0
- package/fesm2022/raqm-ui-skeleton.mjs.map +1 -0
- package/fesm2022/raqm-ui-slider.mjs +609 -0
- package/fesm2022/raqm-ui-slider.mjs.map +1 -0
- package/fesm2022/raqm-ui-spinner.mjs +137 -0
- package/fesm2022/raqm-ui-spinner.mjs.map +1 -0
- package/fesm2022/raqm-ui-switch.mjs +109 -0
- package/fesm2022/raqm-ui-switch.mjs.map +1 -0
- package/fesm2022/raqm-ui-table.mjs +271 -0
- package/fesm2022/raqm-ui-table.mjs.map +1 -0
- package/fesm2022/raqm-ui-tabs.mjs +536 -0
- package/fesm2022/raqm-ui-tabs.mjs.map +1 -0
- package/fesm2022/raqm-ui-textarea.mjs +37 -0
- package/fesm2022/raqm-ui-textarea.mjs.map +1 -0
- package/fesm2022/raqm-ui-toast.mjs +918 -0
- package/fesm2022/raqm-ui-toast.mjs.map +1 -0
- package/fesm2022/raqm-ui-toggle-group.mjs +462 -0
- package/fesm2022/raqm-ui-toggle-group.mjs.map +1 -0
- package/fesm2022/raqm-ui-toggle.mjs +158 -0
- package/fesm2022/raqm-ui-toggle.mjs.map +1 -0
- package/fesm2022/raqm-ui-tooltip.mjs +1226 -0
- package/fesm2022/raqm-ui-tooltip.mjs.map +1 -0
- package/fesm2022/raqm-ui.mjs +50 -0
- package/input-otp/README.md +12 -0
- package/package.json +275 -3
- package/styles/theme.css +4324 -0
- package/types/raqm-ui-accordion.d.ts +124 -0
- package/types/raqm-ui-alert-dialog.d.ts +81 -0
- package/types/raqm-ui-alert.d.ts +29 -0
- package/types/raqm-ui-aspect-ratio.d.ts +13 -0
- package/types/raqm-ui-attachment.d.ts +72 -0
- package/types/raqm-ui-avatar.d.ts +67 -0
- package/types/raqm-ui-badge.d.ts +20 -0
- package/types/raqm-ui-breadcrumb.d.ts +35 -0
- package/types/raqm-ui-button-group.d.ts +27 -0
- package/types/raqm-ui-button.d.ts +80 -0
- package/types/raqm-ui-calendar.d.ts +359 -0
- package/types/raqm-ui-card.d.ts +34 -0
- package/types/raqm-ui-carousel.d.ts +81 -0
- package/types/raqm-ui-checkbox.d.ts +24 -0
- package/types/raqm-ui-collapsible.d.ts +72 -0
- package/types/raqm-ui-combobox.d.ts +405 -0
- package/types/raqm-ui-command.d.ts +256 -0
- package/types/raqm-ui-context-menu.d.ts +196 -0
- package/types/raqm-ui-dialog.d.ts +232 -0
- package/types/raqm-ui-drawer.d.ts +121 -0
- package/types/raqm-ui-dropdown-menu.d.ts +319 -0
- package/types/raqm-ui-empty.d.ts +35 -0
- package/types/raqm-ui-field.d.ts +88 -0
- package/types/raqm-ui-hover-card.d.ts +139 -0
- package/types/raqm-ui-input-group.d.ts +45 -0
- package/types/raqm-ui-input-otp.d.ts +197 -0
- package/types/raqm-ui-input.d.ts +16 -0
- package/types/raqm-ui-item.d.ts +71 -0
- package/types/raqm-ui-kbd.d.ts +12 -0
- package/types/raqm-ui-label.d.ts +6 -0
- package/types/raqm-ui-menubar.d.ts +159 -0
- package/types/raqm-ui-native-select.d.ts +23 -0
- package/types/raqm-ui-navigation-menu.d.ts +230 -0
- package/types/raqm-ui-overlay-internal.d.ts +5 -0
- package/types/raqm-ui-pagination.d.ts +84 -0
- package/types/raqm-ui-popover.d.ts +235 -0
- package/types/raqm-ui-progress.d.ts +79 -0
- package/types/raqm-ui-questionnaire.d.ts +217 -0
- package/types/raqm-ui-radio-group.d.ts +48 -0
- package/types/raqm-ui-resizable.d.ts +98 -0
- package/types/raqm-ui-scroll-area.d.ts +132 -0
- package/types/raqm-ui-select.d.ts +205 -0
- package/types/raqm-ui-separator.d.ts +21 -0
- package/types/raqm-ui-sheet.d.ts +79 -0
- package/types/raqm-ui-sidebar.d.ts +285 -0
- package/types/raqm-ui-skeleton.d.ts +6 -0
- package/types/raqm-ui-slider.d.ts +129 -0
- package/types/raqm-ui-spinner.d.ts +32 -0
- package/types/raqm-ui-switch.d.ts +32 -0
- package/types/raqm-ui-table.d.ts +36 -0
- package/types/raqm-ui-tabs.d.ts +154 -0
- package/types/raqm-ui-textarea.d.ts +6 -0
- package/types/raqm-ui-toast.d.ts +190 -0
- package/types/raqm-ui-toggle-group.d.ts +167 -0
- package/types/raqm-ui-toggle.d.ts +42 -0
- package/types/raqm-ui-tooltip.d.ts +207 -0
- package/types/raqm-ui.d.ts +50 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raqm-ui-accordion.mjs","names":[],"sources":["../../../projects/ui/accordion/accordion.ts","../../../projects/ui/accordion/public-api.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n Directive,\r\n OnInit,\r\n InjectionToken,\r\n Signal,\r\n booleanAttribute,\r\n computed,\r\n inject,\r\n input,\r\n isDevMode,\r\n model,\r\n signal,\r\n} from '@angular/core';\r\n\r\nexport interface RaqmAccordionItemRef {\r\n /** Unique, non-empty item value used by the root's open-state contract. */\r\n readonly value: string;\r\n}\r\n\r\n/** Root contract published under {@link RAQM_ACCORDION}; the dedicated token avoids a runtime module cycle. */\r\nexport interface RaqmAccordionContext {\r\n readonly multiple: Signal<boolean>;\r\n readonly disabled: Signal<boolean>;\r\n isOpen(value: string): boolean;\r\n /** Applies the root's open-state rules to an activated value (no-op if disabled). */\r\n toggle(value: string): void;\r\n register(item: RaqmAccordionItemRef): void;\r\n unregister(item: RaqmAccordionItemRef): void;\r\n}\r\n\r\n/** Item contract; the item owns both ids so the trigger/content ARIA pair cannot drift. */\r\nexport interface RaqmAccordionItemContext {\r\n readonly open: Signal<boolean>;\r\n readonly effectiveDisabled: Signal<boolean>;\r\n readonly triggerId: string;\r\n readonly contentId: string;\r\n toggle(): void;\r\n}\r\n\r\n/** Root token; injected optionally so a misplaced item renders and only logs a dev-mode error. */\r\nexport const RAQM_ACCORDION = new InjectionToken<RaqmAccordionContext>('RaqmAccordion');\r\n\r\n/** Item token; optional so a misplaced part renders and only logs a dev-mode error. */\r\nexport const RAQM_ACCORDION_ITEM = new InjectionToken<RaqmAccordionItemContext>(\r\n 'RaqmAccordionItem',\r\n);\r\n\r\n/** Accordion root; carries no ARIA role (each trigger owns the heading) and keeps at most one open value in single mode. */\r\n@Component({\r\n selector: 'raqm-accordion',\r\n template: '<ng-content />',\r\n styles: [\r\n `\r\n :host {\r\n display: flex;\r\n flex-direction: column;\r\n inline-size: 100%;\r\n }\r\n `,\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-accordion',\r\n },\r\n providers: [{ provide: RAQM_ACCORDION, useExisting: RaqmAccordionComponent }],\r\n})\r\nexport class RaqmAccordionComponent implements RaqmAccordionContext {\r\n readonly multiple = input(false, { transform: booleanAttribute });\r\n\r\n readonly value = model<readonly string[]>([]);\r\n\r\n // Uncontrolled seed, read only while the model is empty and the user has not interacted.\r\n readonly defaultValue = input<readonly string[]>([]);\r\n\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n\r\n // Registered in DOM order; a signal so the dev-only duplicate check sees dynamic additions.\r\n private readonly items = signal<readonly RaqmAccordionItemRef[]>([]);\r\n\r\n // Empty model means the seed until the first toggle; afterwards it means \"all closed\".\r\n private readonly interacted = signal(false);\r\n\r\n // Effective open values: bound model, else the seed. Single mode keeps one entry without coercing the model.\r\n private readonly openValues = computed<readonly string[]>(() => {\r\n const bound = this.value();\r\n if (bound.length > 0 || this.interacted()) {\r\n return bound;\r\n }\r\n const seed = this.defaultValue();\r\n return this.multiple() ? seed : seed.slice(0, 1);\r\n });\r\n\r\n /** Whether the given value is currently expanded; single mode reads only the first entry. */\r\n isOpen(value: string): boolean {\r\n const current = this.openValues();\r\n return this.multiple() ? current.includes(value) : current[0] === value;\r\n }\r\n\r\n toggle(value: string): void {\r\n if (this.disabled()) {\r\n return;\r\n }\r\n const current = this.openValues();\r\n this.interacted.set(true);\r\n if (this.multiple()) {\r\n this.value.set(\r\n current.includes(value) ? current.filter((open) => open !== value) : [...current, value],\r\n );\r\n return;\r\n }\r\n this.value.set(current[0] === value ? [] : [value]);\r\n }\r\n\r\n /** Registers in DOM order; reads the bound `value`, so items must register from `ngOnInit`. */\r\n register(item: RaqmAccordionItemRef): void {\r\n if (isDevMode() && this.items().some((registered) => registered.value === item.value)) {\r\n console.error(\r\n `[raqm-accordion] Duplicate item value \"${item.value}\"; Accordion item values must be unique.`,\r\n );\r\n }\r\n this.items.update((items) => [...items, item]);\r\n }\r\n\r\n /** Unregisters an item on destroy; never changes the open state. */\r\n unregister(item: RaqmAccordionItemRef): void {\r\n this.items.update((items) => items.filter((registered) => registered !== item));\r\n }\r\n}\r\n\r\n// Monotonic counter for stable per-item element ids.\r\nlet nextAccordionItemId = 0;\r\n\r\n/** Accordion item; owns both element ids and registers from `ngOnInit` so the duplicate check sees the bound `value`. */\r\n@Component({\r\n selector: 'raqm-accordion-item',\r\n template: '<ng-content />',\r\n styles: [\r\n `\r\n :host {\r\n display: block;\r\n }\r\n\r\n :host(:not(:last-child)) {\r\n border-block-end: 1px solid var(--raqm-border);\r\n }\r\n `,\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-accordion-item',\r\n // Open/closed hook driving the shipped content animation.\r\n '[attr.data-raqm-state]': 'open() ? \"open\" : \"closed\"',\r\n // Presence-only hook; the native button carries the real disabled state.\r\n '[attr.data-raqm-disabled]': 'effectiveDisabled() ? \"\" : null',\r\n },\r\n providers: [{ provide: RAQM_ACCORDION_ITEM, useExisting: RaqmAccordionItemComponent }],\r\n})\r\nexport class RaqmAccordionItemComponent implements RaqmAccordionItemContext, OnInit {\r\n private readonly accordion = inject<RaqmAccordionContext | null>(RAQM_ACCORDION, {\r\n optional: true,\r\n });\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n\r\n readonly value = input.required<string>();\r\n\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n\r\n private readonly instanceId = `raqm-accordion-item-${++nextAccordionItemId}`;\r\n\r\n readonly triggerId = `${this.instanceId}-trigger`;\r\n\r\n readonly contentId = `${this.instanceId}-content`;\r\n\r\n readonly effectiveDisabled = computed(\r\n () => this.disabled() || (this.accordion?.disabled() ?? false),\r\n );\r\n\r\n readonly open = computed(() => this.accordion?.isOpen(this.value()) ?? false);\r\n\r\n // Reads the live input, so registration always sees the bound value.\r\n private readonly ref: RaqmAccordionItemRef = (() => {\r\n const self = this;\r\n return {\r\n get value(): string {\r\n return self.value();\r\n },\r\n };\r\n })();\r\n\r\n constructor() {\r\n if (isDevMode() && this.accordion === null) {\r\n console.error(\r\n '[raqm-accordion-item] No parent <raqm-accordion> found; the item has no open state.',\r\n );\r\n }\r\n\r\n // Unregisters on destroy; registration deliberately lives in `ngOnInit`, never here.\r\n this.destroyRef.onDestroy(() => this.accordion?.unregister(this.ref));\r\n }\r\n\r\n /** Registers the item with its parent root once its required `value` input is bound. */\r\n ngOnInit(): void {\r\n this.accordion?.register(this.ref);\r\n }\r\n\r\n toggle(): void {\r\n if (this.effectiveDisabled()) {\r\n return;\r\n }\r\n this.accordion?.toggle(this.value());\r\n }\r\n}\r\n\r\n/** Viewless directive on the real `<button>`, the only activation path; disabled triggers stay focusable via `aria-disabled`. */\r\n@Directive({\r\n selector: 'button[raqm-accordion-trigger]',\r\n host: {\r\n class: 'raqm-accordion-trigger',\r\n // A disclosure button never submits a form.\r\n type: 'button',\r\n '[attr.id]': 'triggerId()',\r\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\r\n '[attr.aria-controls]': 'contentId()',\r\n // Kept focusable while disabled, advertising the state instead.\r\n '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\r\n '(click)': 'onClick()',\r\n },\r\n})\r\nexport class RaqmAccordionTriggerDirective {\r\n private readonly item = inject<RaqmAccordionItemContext | null>(RAQM_ACCORDION_ITEM, {\r\n optional: true,\r\n });\r\n\r\n protected readonly open = computed(() => this.item?.open() ?? false);\r\n\r\n protected readonly effectiveDisabled = computed(() => this.item?.effectiveDisabled() ?? false);\r\n\r\n protected readonly triggerId = computed(() => this.item?.triggerId ?? null);\r\n\r\n protected readonly contentId = computed(() => this.item?.contentId ?? null);\r\n\r\n constructor() {\r\n if (isDevMode() && this.item === null) {\r\n console.error(\r\n '[raqm-accordion-trigger] No parent <raqm-accordion-item> found; the trigger cannot toggle a panel.',\r\n );\r\n }\r\n }\r\n\r\n protected onClick(): void {\r\n if (!this.effectiveDisabled()) {\r\n this.item?.toggle();\r\n }\r\n }\r\n}\r\n\r\n/** `role=\"region\"` paired with its trigger by owned ids; stays mounted, animates by grid row, and is `inert` while closed. */\r\n@Component({\r\n selector: 'raqm-accordion-content',\r\n template: '<div class=\"raqm-accordion-content-inner\"><ng-content /></div>',\r\n styleUrl: './accordion-content.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'raqm-accordion-content',\r\n role: 'region',\r\n '[attr.id]': 'contentId()',\r\n '[attr.aria-labelledby]': 'triggerId()',\r\n // Open/closed hook driving the shipped grid animation.\r\n '[attr.data-raqm-state]': 'open() ? \"open\" : \"closed\"',\r\n // A closed region is inert, so its content is unreachable while collapsed.\r\n '[attr.inert]': 'open() ? null : \"\"',\r\n },\r\n})\r\nexport class RaqmAccordionContentComponent {\r\n private readonly item = inject<RaqmAccordionItemContext | null>(RAQM_ACCORDION_ITEM, {\r\n optional: true,\r\n });\r\n\r\n protected readonly open = computed(() => this.item?.open() ?? true);\r\n\r\n protected readonly contentId = computed(() => this.item?.contentId ?? null);\r\n\r\n protected readonly triggerId = computed(() => this.item?.triggerId ?? null);\r\n\r\n constructor() {\r\n if (isDevMode() && this.item === null) {\r\n console.error(\r\n '[raqm-accordion-content] No parent <raqm-accordion-item> found; the content cannot know its open state.',\r\n );\r\n }\r\n }\r\n}\r\n","// Public API for the `@raqm/ui/accordion` secondary entry point; also re-exported by the root.\r\nimport {\r\n RaqmAccordionComponent,\r\n RaqmAccordionContentComponent,\r\n RaqmAccordionItemComponent,\r\n RaqmAccordionTriggerDirective,\r\n} from './accordion';\r\n\r\nexport {\r\n RaqmAccordionComponent,\r\n RaqmAccordionContentComponent,\r\n RaqmAccordionItemComponent,\r\n RaqmAccordionTriggerDirective,\r\n};\r\n\r\n// A nested readonly array is accepted by Angular `imports`, so the whole family imports as one entry.\r\nexport const RaqmAccordion = [\r\n RaqmAccordionComponent,\r\n RaqmAccordionItemComponent,\r\n Raq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A,CAAA;EAhBzC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAwB,UACxB;GAAgE,iBAEzD,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,MAAM;IACN,aAAa;IACb,0BAA0B;IAE1B,0BAA0B;IAE1B,gBAAgB;GACjB;GAAA,QAAA,CAAA,sbAAA;EAAA,CAAA;;;;ACnQH,MAAa,gBAAgB;CAC3B;CACA;CACA;CACA;AACQ"}
|
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, booleanAttribute, effect, inject, input, signal } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { RaqmButton } from "@raqm/ui/button";
|
|
5
|
+
import * as i1 from "@raqm/ui/dialog";
|
|
6
|
+
import { RAQM_DIALOG, RAQM_DIALOG_POLICY, RaqmDialogBaseComponent, RaqmDialogCloseDirective, RaqmDialogContentDirective, RaqmDialogDescriptionDirective, RaqmDialogTitleDirective, RaqmDialogTriggerDirective } from "@raqm/ui/dialog";
|
|
7
|
+
var RaqmAlertDialogComponent = class RaqmAlertDialogComponent extends RaqmDialogBaseComponent {
|
|
8
|
+
small = input(false, {
|
|
9
|
+
...ngDevMode ? { debugName: "small" } : /* istanbul ignore next */ {},
|
|
10
|
+
transform: booleanAttribute
|
|
11
|
+
});
|
|
12
|
+
closeButtonVisible = signal(false, ...ngDevMode ? [{ debugName: "closeButtonVisible" }] : /* istanbul ignore next */ []);
|
|
13
|
+
closeLabelText = signal(void 0, ...ngDevMode ? [{ debugName: "closeLabelText" }] : /* istanbul ignore next */ []);
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
effect(() => this.policy?.small?.set(this.small()));
|
|
17
|
+
}
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
19
|
+
minVersion: "12.0.0",
|
|
20
|
+
version: "22.2.2",
|
|
21
|
+
ngImport: i0,
|
|
22
|
+
type: RaqmAlertDialogComponent,
|
|
23
|
+
deps: [],
|
|
24
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
25
|
+
});
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
27
|
+
minVersion: "17.0.0",
|
|
28
|
+
version: "22.2.2",
|
|
29
|
+
type: RaqmAlertDialogComponent,
|
|
30
|
+
isStandalone: true,
|
|
31
|
+
selector: "raqm-alert-dialog",
|
|
32
|
+
inputs: { small: {
|
|
33
|
+
classPropertyName: "small",
|
|
34
|
+
publicName: "small",
|
|
35
|
+
isSignal: true,
|
|
36
|
+
isRequired: false,
|
|
37
|
+
transformFunction: null
|
|
38
|
+
} },
|
|
39
|
+
providers: [{
|
|
40
|
+
provide: RAQM_DIALOG,
|
|
41
|
+
useExisting: RaqmAlertDialogComponent
|
|
42
|
+
}, {
|
|
43
|
+
provide: RAQM_DIALOG_POLICY,
|
|
44
|
+
useFactory: () => ({
|
|
45
|
+
role: "alertdialog",
|
|
46
|
+
contentClass: "raqm-alert-dialog-content",
|
|
47
|
+
small: signal(false),
|
|
48
|
+
touchOpening: signal(false),
|
|
49
|
+
dismissOnBackdrop: false
|
|
50
|
+
})
|
|
51
|
+
}],
|
|
52
|
+
exportAs: ["raqmAlertDialog"],
|
|
53
|
+
usesInheritance: true,
|
|
54
|
+
ngImport: i0,
|
|
55
|
+
template: "<ng-content />\r\n\r\n<!-- The CDK container, not this wrapper, is the role=dialog element. -->\r\n<ng-template #panel>\r\n <div\r\n class=\"raqm-dialog-content\"\r\n [class]=\"policy?.contentClass ?? ''\"\r\n [attr.data-raqm-small]=\"policy?.small?.() ? '' : null\"\r\n [attr.data-raqm-side]=\"policy?.side?.() ?? null\"\r\n [attr.dir]=\"panelDir()\"\r\n [class.raqm-dialog-content--entering]=\"entering()\"\r\n [class.raqm-dialog-content--closing]=\"closing()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\" />\r\n\r\n <!-- showCloseButton=false hides only this control; Escape and backdrop dismissal still close. -->\r\n @if (closeButtonVisible()) {\r\n <button\r\n raqm-button=\"ghost\"\r\n icon-small\r\n class=\"raqm-dialog-close\"\r\n [attr.aria-label]=\"closeLabelText()\"\r\n (click)=\"onCloseButtonClick()\"\r\n >\r\n <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 stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"M18 6 6 18\" />\r\n <path d=\"m6 6 12 12\" />\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n</ng-template>\r\n",
|
|
56
|
+
styles: [":host{display:contents}.raqm-dialog-content{position:relative;display:grid;gap:calc(var(--raqm-spacing) * 6);box-sizing:border-box;inline-size:calc(100vw - 2rem);inline-size:calc(100dvw - 2rem);max-inline-size:100%;max-block-size:calc(100vh - 2rem);max-block-size:calc(100dvh - 2rem);overflow:auto;padding:calc(var(--raqm-spacing) * 6);border-radius:var(--raqm-radius-xl);background-color:var(--raqm-popover);color:var(--raqm-popover-foreground);font-size:var(--raqm-font-size-sm);line-height:1.25rem;box-shadow:0 0 0 1px color-mix(in oklch,var(--raqm-foreground) 10%,transparent);outline:none}@media(min-width:40rem){.raqm-dialog-content{inline-size:24rem}}.raqm-dialog-content--entering{animation:raqm-dialog-in var(--raqm-duration-fast) var(--raqm-ease-out)}@keyframes raqm-dialog-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:none}}.raqm-dialog-content--closing{opacity:0;transform:scale(.95);transition:opacity var(--raqm-duration-fast) var(--raqm-ease-out),transform var(--raqm-duration-fast) var(--raqm-ease-out)}@media(prefers-reduced-motion:reduce){.raqm-dialog-content,.raqm-dialog-content--closing{animation:none;transition:none}}.raqm-dialog-close{position:absolute;inset-block-start:calc(var(--raqm-spacing) * 4.5);inset-inline-end:calc(var(--raqm-spacing) * 4.5)}@media(forced-colors:active){.raqm-dialog-close{border-color:ButtonText}.raqm-dialog-content{border:1px solid CanvasText}}\n", ".raqm-alert-dialog-content{inline-size:100vw;inline-size:100dvw;max-inline-size:calc(var(--raqm-spacing) * 80);font-size:var(--raqm-font-size-base);line-height:var(--raqm-line-height-normal)}@media(min-width:40rem){.raqm-alert-dialog-content:not([data-raqm-small]){max-inline-size:calc(var(--raqm-spacing) * 96)}}\n"],
|
|
57
|
+
dependencies: [{
|
|
58
|
+
kind: "directive",
|
|
59
|
+
type: NgTemplateOutlet,
|
|
60
|
+
selector: "[ngTemplateOutlet]",
|
|
61
|
+
inputs: [
|
|
62
|
+
"ngTemplateOutletContext",
|
|
63
|
+
"ngTemplateOutlet",
|
|
64
|
+
"ngTemplateOutletInjector"
|
|
65
|
+
]
|
|
66
|
+
}, {
|
|
67
|
+
kind: "component",
|
|
68
|
+
type: RaqmButton,
|
|
69
|
+
selector: "button[raqm-button], a[raqm-button]",
|
|
70
|
+
inputs: [
|
|
71
|
+
"raqm-button",
|
|
72
|
+
"extra-small",
|
|
73
|
+
"small",
|
|
74
|
+
"large",
|
|
75
|
+
"icon",
|
|
76
|
+
"icon-extra-small",
|
|
77
|
+
"icon-small",
|
|
78
|
+
"icon-large",
|
|
79
|
+
"disabled",
|
|
80
|
+
"tabindex"
|
|
81
|
+
]
|
|
82
|
+
}],
|
|
83
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
87
|
+
minVersion: "12.0.0",
|
|
88
|
+
version: "22.2.2",
|
|
89
|
+
ngImport: i0,
|
|
90
|
+
type: RaqmAlertDialogComponent,
|
|
91
|
+
decorators: [{
|
|
92
|
+
type: Component,
|
|
93
|
+
args: [{
|
|
94
|
+
selector: "raqm-alert-dialog",
|
|
95
|
+
imports: [NgTemplateOutlet, RaqmButton],
|
|
96
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
97
|
+
exportAs: "raqmAlertDialog",
|
|
98
|
+
providers: [{
|
|
99
|
+
provide: RAQM_DIALOG,
|
|
100
|
+
useExisting: RaqmAlertDialogComponent
|
|
101
|
+
}, {
|
|
102
|
+
provide: RAQM_DIALOG_POLICY,
|
|
103
|
+
useFactory: () => ({
|
|
104
|
+
role: "alertdialog",
|
|
105
|
+
contentClass: "raqm-alert-dialog-content",
|
|
106
|
+
small: signal(false),
|
|
107
|
+
touchOpening: signal(false),
|
|
108
|
+
dismissOnBackdrop: false
|
|
109
|
+
})
|
|
110
|
+
}],
|
|
111
|
+
template: "<ng-content />\r\n\r\n<!-- The CDK container, not this wrapper, is the role=dialog element. -->\r\n<ng-template #panel>\r\n <div\r\n class=\"raqm-dialog-content\"\r\n [class]=\"policy?.contentClass ?? ''\"\r\n [attr.data-raqm-small]=\"policy?.small?.() ? '' : null\"\r\n [attr.data-raqm-side]=\"policy?.side?.() ?? null\"\r\n [attr.dir]=\"panelDir()\"\r\n [class.raqm-dialog-content--entering]=\"entering()\"\r\n [class.raqm-dialog-content--closing]=\"closing()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\" />\r\n\r\n <!-- showCloseButton=false hides only this control; Escape and backdrop dismissal still close. -->\r\n @if (closeButtonVisible()) {\r\n <button\r\n raqm-button=\"ghost\"\r\n icon-small\r\n class=\"raqm-dialog-close\"\r\n [attr.aria-label]=\"closeLabelText()\"\r\n (click)=\"onCloseButtonClick()\"\r\n >\r\n <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 stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"M18 6 6 18\" />\r\n <path d=\"m6 6 12 12\" />\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n</ng-template>\r\n",
|
|
112
|
+
styles: [":host{display:contents}.raqm-dialog-content{position:relative;display:grid;gap:calc(var(--raqm-spacing) * 6);box-sizing:border-box;inline-size:calc(100vw - 2rem);inline-size:calc(100dvw - 2rem);max-inline-size:100%;max-block-size:calc(100vh - 2rem);max-block-size:calc(100dvh - 2rem);overflow:auto;padding:calc(var(--raqm-spacing) * 6);border-radius:var(--raqm-radius-xl);background-color:var(--raqm-popover);color:var(--raqm-popover-foreground);font-size:var(--raqm-font-size-sm);line-height:1.25rem;box-shadow:0 0 0 1px color-mix(in oklch,var(--raqm-foreground) 10%,transparent);outline:none}@media(min-width:40rem){.raqm-dialog-content{inline-size:24rem}}.raqm-dialog-content--entering{animation:raqm-dialog-in var(--raqm-duration-fast) var(--raqm-ease-out)}@keyframes raqm-dialog-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:none}}.raqm-dialog-content--closing{opacity:0;transform:scale(.95);transition:opacity var(--raqm-duration-fast) var(--raqm-ease-out),transform var(--raqm-duration-fast) var(--raqm-ease-out)}@media(prefers-reduced-motion:reduce){.raqm-dialog-content,.raqm-dialog-content--closing{animation:none;transition:none}}.raqm-dialog-close{position:absolute;inset-block-start:calc(var(--raqm-spacing) * 4.5);inset-inline-end:calc(var(--raqm-spacing) * 4.5)}@media(forced-colors:active){.raqm-dialog-close{border-color:ButtonText}.raqm-dialog-content{border:1px solid CanvasText}}\n", ".raqm-alert-dialog-content{inline-size:100vw;inline-size:100dvw;max-inline-size:calc(var(--raqm-spacing) * 80);font-size:var(--raqm-font-size-base);line-height:var(--raqm-line-height-normal)}@media(min-width:40rem){.raqm-alert-dialog-content:not([data-raqm-small]){max-inline-size:calc(var(--raqm-spacing) * 96)}}\n"]
|
|
113
|
+
}]
|
|
114
|
+
}],
|
|
115
|
+
ctorParameters: () => [],
|
|
116
|
+
propDecorators: { small: [{
|
|
117
|
+
type: i0.Input,
|
|
118
|
+
args: [{
|
|
119
|
+
isSignal: true,
|
|
120
|
+
alias: "small",
|
|
121
|
+
required: false
|
|
122
|
+
}]
|
|
123
|
+
}] }
|
|
124
|
+
});
|
|
125
|
+
var RaqmAlertDialogTriggerDirective = class RaqmAlertDialogTriggerDirective extends RaqmDialogTriggerDirective {
|
|
126
|
+
policy = inject(RAQM_DIALOG_POLICY, { optional: true });
|
|
127
|
+
setOpeningPointer(event) {
|
|
128
|
+
this.policy?.touchOpening.set(event.pointerType === "touch");
|
|
129
|
+
}
|
|
130
|
+
resetOpeningPointer() {
|
|
131
|
+
this.policy?.touchOpening.set(false);
|
|
132
|
+
}
|
|
133
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
134
|
+
minVersion: "12.0.0",
|
|
135
|
+
version: "22.2.2",
|
|
136
|
+
ngImport: i0,
|
|
137
|
+
type: RaqmAlertDialogTriggerDirective,
|
|
138
|
+
deps: null,
|
|
139
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
140
|
+
});
|
|
141
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
142
|
+
minVersion: "14.0.0",
|
|
143
|
+
version: "22.2.2",
|
|
144
|
+
type: RaqmAlertDialogTriggerDirective,
|
|
145
|
+
isStandalone: true,
|
|
146
|
+
selector: "button[raqm-alert-dialog-trigger]",
|
|
147
|
+
host: {
|
|
148
|
+
listeners: {
|
|
149
|
+
"pointerdown": "setOpeningPointer($event)",
|
|
150
|
+
"keydown": "resetOpeningPointer()"
|
|
151
|
+
},
|
|
152
|
+
classAttribute: "raqm-alert-dialog-trigger"
|
|
153
|
+
},
|
|
154
|
+
usesInheritance: true,
|
|
155
|
+
ngImport: i0
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
159
|
+
minVersion: "12.0.0",
|
|
160
|
+
version: "22.2.2",
|
|
161
|
+
ngImport: i0,
|
|
162
|
+
type: RaqmAlertDialogTriggerDirective,
|
|
163
|
+
decorators: [{
|
|
164
|
+
type: Directive,
|
|
165
|
+
args: [{
|
|
166
|
+
selector: "button[raqm-alert-dialog-trigger]",
|
|
167
|
+
host: {
|
|
168
|
+
class: "raqm-alert-dialog-trigger",
|
|
169
|
+
"(pointerdown)": "setOpeningPointer($event)",
|
|
170
|
+
"(keydown)": "resetOpeningPointer()"
|
|
171
|
+
}
|
|
172
|
+
}]
|
|
173
|
+
}]
|
|
174
|
+
});
|
|
175
|
+
var RaqmAlertDialogContentDirective = class RaqmAlertDialogContentDirective extends RaqmDialogContentDirective {
|
|
176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
177
|
+
minVersion: "12.0.0",
|
|
178
|
+
version: "22.2.2",
|
|
179
|
+
ngImport: i0,
|
|
180
|
+
type: RaqmAlertDialogContentDirective,
|
|
181
|
+
deps: null,
|
|
182
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
183
|
+
});
|
|
184
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
185
|
+
minVersion: "14.0.0",
|
|
186
|
+
version: "22.2.2",
|
|
187
|
+
type: RaqmAlertDialogContentDirective,
|
|
188
|
+
isStandalone: true,
|
|
189
|
+
selector: "ng-template[raqm-alert-dialog-content]",
|
|
190
|
+
exportAs: ["raqmAlertDialogContent"],
|
|
191
|
+
usesInheritance: true,
|
|
192
|
+
ngImport: i0
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
196
|
+
minVersion: "12.0.0",
|
|
197
|
+
version: "22.2.2",
|
|
198
|
+
ngImport: i0,
|
|
199
|
+
type: RaqmAlertDialogContentDirective,
|
|
200
|
+
decorators: [{
|
|
201
|
+
type: Directive,
|
|
202
|
+
args: [{
|
|
203
|
+
selector: "ng-template[raqm-alert-dialog-content]",
|
|
204
|
+
exportAs: "raqmAlertDialogContent"
|
|
205
|
+
}]
|
|
206
|
+
}]
|
|
207
|
+
});
|
|
208
|
+
var RaqmAlertDialogHeaderDirective = class RaqmAlertDialogHeaderDirective {
|
|
209
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
210
|
+
minVersion: "12.0.0",
|
|
211
|
+
version: "22.2.2",
|
|
212
|
+
ngImport: i0,
|
|
213
|
+
type: RaqmAlertDialogHeaderDirective,
|
|
214
|
+
deps: [],
|
|
215
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
216
|
+
});
|
|
217
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
218
|
+
minVersion: "14.0.0",
|
|
219
|
+
version: "22.2.2",
|
|
220
|
+
type: RaqmAlertDialogHeaderDirective,
|
|
221
|
+
isStandalone: true,
|
|
222
|
+
selector: "[raqm-alert-dialog-header]",
|
|
223
|
+
host: { classAttribute: "raqm-alert-dialog-header" },
|
|
224
|
+
ngImport: i0
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
228
|
+
minVersion: "12.0.0",
|
|
229
|
+
version: "22.2.2",
|
|
230
|
+
ngImport: i0,
|
|
231
|
+
type: RaqmAlertDialogHeaderDirective,
|
|
232
|
+
decorators: [{
|
|
233
|
+
type: Directive,
|
|
234
|
+
args: [{
|
|
235
|
+
selector: "[raqm-alert-dialog-header]",
|
|
236
|
+
host: { class: "raqm-alert-dialog-header" }
|
|
237
|
+
}]
|
|
238
|
+
}]
|
|
239
|
+
});
|
|
240
|
+
var RaqmAlertDialogFooterDirective = class RaqmAlertDialogFooterDirective {
|
|
241
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
242
|
+
minVersion: "12.0.0",
|
|
243
|
+
version: "22.2.2",
|
|
244
|
+
ngImport: i0,
|
|
245
|
+
type: RaqmAlertDialogFooterDirective,
|
|
246
|
+
deps: [],
|
|
247
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
248
|
+
});
|
|
249
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
250
|
+
minVersion: "14.0.0",
|
|
251
|
+
version: "22.2.2",
|
|
252
|
+
type: RaqmAlertDialogFooterDirective,
|
|
253
|
+
isStandalone: true,
|
|
254
|
+
selector: "[raqm-alert-dialog-footer]",
|
|
255
|
+
host: { classAttribute: "raqm-alert-dialog-footer" },
|
|
256
|
+
ngImport: i0
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
260
|
+
minVersion: "12.0.0",
|
|
261
|
+
version: "22.2.2",
|
|
262
|
+
ngImport: i0,
|
|
263
|
+
type: RaqmAlertDialogFooterDirective,
|
|
264
|
+
decorators: [{
|
|
265
|
+
type: Directive,
|
|
266
|
+
args: [{
|
|
267
|
+
selector: "[raqm-alert-dialog-footer]",
|
|
268
|
+
host: { class: "raqm-alert-dialog-footer" }
|
|
269
|
+
}]
|
|
270
|
+
}]
|
|
271
|
+
});
|
|
272
|
+
var RaqmAlertDialogMediaDirective = class RaqmAlertDialogMediaDirective {
|
|
273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
274
|
+
minVersion: "12.0.0",
|
|
275
|
+
version: "22.2.2",
|
|
276
|
+
ngImport: i0,
|
|
277
|
+
type: RaqmAlertDialogMediaDirective,
|
|
278
|
+
deps: [],
|
|
279
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
280
|
+
});
|
|
281
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
282
|
+
minVersion: "14.0.0",
|
|
283
|
+
version: "22.2.2",
|
|
284
|
+
type: RaqmAlertDialogMediaDirective,
|
|
285
|
+
isStandalone: true,
|
|
286
|
+
selector: "[raqm-alert-dialog-media]",
|
|
287
|
+
host: { classAttribute: "raqm-alert-dialog-media" },
|
|
288
|
+
ngImport: i0
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
292
|
+
minVersion: "12.0.0",
|
|
293
|
+
version: "22.2.2",
|
|
294
|
+
ngImport: i0,
|
|
295
|
+
type: RaqmAlertDialogMediaDirective,
|
|
296
|
+
decorators: [{
|
|
297
|
+
type: Directive,
|
|
298
|
+
args: [{
|
|
299
|
+
selector: "[raqm-alert-dialog-media]",
|
|
300
|
+
host: { class: "raqm-alert-dialog-media" }
|
|
301
|
+
}]
|
|
302
|
+
}]
|
|
303
|
+
});
|
|
304
|
+
var RaqmAlertDialogTitleDirective = class RaqmAlertDialogTitleDirective {
|
|
305
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
306
|
+
minVersion: "12.0.0",
|
|
307
|
+
version: "22.2.2",
|
|
308
|
+
ngImport: i0,
|
|
309
|
+
type: RaqmAlertDialogTitleDirective,
|
|
310
|
+
deps: [],
|
|
311
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
312
|
+
});
|
|
313
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
314
|
+
minVersion: "14.0.0",
|
|
315
|
+
version: "22.2.2",
|
|
316
|
+
type: RaqmAlertDialogTitleDirective,
|
|
317
|
+
isStandalone: true,
|
|
318
|
+
selector: "[raqm-alert-dialog-title]",
|
|
319
|
+
host: { classAttribute: "raqm-alert-dialog-title" },
|
|
320
|
+
hostDirectives: [{ directive: i1.RaqmDialogTitleDirective }],
|
|
321
|
+
ngImport: i0
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
325
|
+
minVersion: "12.0.0",
|
|
326
|
+
version: "22.2.2",
|
|
327
|
+
ngImport: i0,
|
|
328
|
+
type: RaqmAlertDialogTitleDirective,
|
|
329
|
+
decorators: [{
|
|
330
|
+
type: Directive,
|
|
331
|
+
args: [{
|
|
332
|
+
selector: "[raqm-alert-dialog-title]",
|
|
333
|
+
hostDirectives: [RaqmDialogTitleDirective],
|
|
334
|
+
host: { class: "raqm-alert-dialog-title" }
|
|
335
|
+
}]
|
|
336
|
+
}]
|
|
337
|
+
});
|
|
338
|
+
var RaqmAlertDialogDescriptionDirective = class RaqmAlertDialogDescriptionDirective {
|
|
339
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
340
|
+
minVersion: "12.0.0",
|
|
341
|
+
version: "22.2.2",
|
|
342
|
+
ngImport: i0,
|
|
343
|
+
type: RaqmAlertDialogDescriptionDirective,
|
|
344
|
+
deps: [],
|
|
345
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
346
|
+
});
|
|
347
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
348
|
+
minVersion: "14.0.0",
|
|
349
|
+
version: "22.2.2",
|
|
350
|
+
type: RaqmAlertDialogDescriptionDirective,
|
|
351
|
+
isStandalone: true,
|
|
352
|
+
selector: "[raqm-alert-dialog-description]",
|
|
353
|
+
host: { classAttribute: "raqm-alert-dialog-description" },
|
|
354
|
+
hostDirectives: [{ directive: i1.RaqmDialogDescriptionDirective }],
|
|
355
|
+
ngImport: i0
|
|
356
|
+
});
|
|
357
|
+
};
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
359
|
+
minVersion: "12.0.0",
|
|
360
|
+
version: "22.2.2",
|
|
361
|
+
ngImport: i0,
|
|
362
|
+
type: RaqmAlertDialogDescriptionDirective,
|
|
363
|
+
decorators: [{
|
|
364
|
+
type: Directive,
|
|
365
|
+
args: [{
|
|
366
|
+
selector: "[raqm-alert-dialog-description]",
|
|
367
|
+
hostDirectives: [RaqmDialogDescriptionDirective],
|
|
368
|
+
host: { class: "raqm-alert-dialog-description" }
|
|
369
|
+
}]
|
|
370
|
+
}]
|
|
371
|
+
});
|
|
372
|
+
var RaqmAlertDialogActionDirective = class RaqmAlertDialogActionDirective {
|
|
373
|
+
constructor() {
|
|
374
|
+
const element = inject(ElementRef).nativeElement;
|
|
375
|
+
if (!element.hasAttribute("type")) element.setAttribute("type", "button");
|
|
376
|
+
}
|
|
377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
378
|
+
minVersion: "12.0.0",
|
|
379
|
+
version: "22.2.2",
|
|
380
|
+
ngImport: i0,
|
|
381
|
+
type: RaqmAlertDialogActionDirective,
|
|
382
|
+
deps: [],
|
|
383
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
384
|
+
});
|
|
385
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
386
|
+
minVersion: "14.0.0",
|
|
387
|
+
version: "22.2.2",
|
|
388
|
+
type: RaqmAlertDialogActionDirective,
|
|
389
|
+
isStandalone: true,
|
|
390
|
+
selector: "button[raqm-alert-dialog-action]",
|
|
391
|
+
host: { classAttribute: "raqm-alert-dialog-action" },
|
|
392
|
+
ngImport: i0
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
396
|
+
minVersion: "12.0.0",
|
|
397
|
+
version: "22.2.2",
|
|
398
|
+
ngImport: i0,
|
|
399
|
+
type: RaqmAlertDialogActionDirective,
|
|
400
|
+
decorators: [{
|
|
401
|
+
type: Directive,
|
|
402
|
+
args: [{
|
|
403
|
+
selector: "button[raqm-alert-dialog-action]",
|
|
404
|
+
host: { class: "raqm-alert-dialog-action" }
|
|
405
|
+
}]
|
|
406
|
+
}],
|
|
407
|
+
ctorParameters: () => []
|
|
408
|
+
});
|
|
409
|
+
var RaqmAlertDialogCancelDirective = class RaqmAlertDialogCancelDirective {
|
|
410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
411
|
+
minVersion: "12.0.0",
|
|
412
|
+
version: "22.2.2",
|
|
413
|
+
ngImport: i0,
|
|
414
|
+
type: RaqmAlertDialogCancelDirective,
|
|
415
|
+
deps: [],
|
|
416
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
417
|
+
});
|
|
418
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
419
|
+
minVersion: "14.0.0",
|
|
420
|
+
version: "22.2.2",
|
|
421
|
+
type: RaqmAlertDialogCancelDirective,
|
|
422
|
+
isStandalone: true,
|
|
423
|
+
selector: "button[raqm-alert-dialog-cancel]",
|
|
424
|
+
host: { classAttribute: "raqm-alert-dialog-cancel" },
|
|
425
|
+
hostDirectives: [{ directive: i1.RaqmDialogCloseDirective }],
|
|
426
|
+
ngImport: i0
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
430
|
+
minVersion: "12.0.0",
|
|
431
|
+
version: "22.2.2",
|
|
432
|
+
ngImport: i0,
|
|
433
|
+
type: RaqmAlertDialogCancelDirective,
|
|
434
|
+
decorators: [{
|
|
435
|
+
type: Directive,
|
|
436
|
+
args: [{
|
|
437
|
+
selector: "button[raqm-alert-dialog-cancel]",
|
|
438
|
+
hostDirectives: [RaqmDialogCloseDirective],
|
|
439
|
+
host: { class: "raqm-alert-dialog-cancel" }
|
|
440
|
+
}]
|
|
441
|
+
}]
|
|
442
|
+
});
|
|
443
|
+
const RaqmAlertDialog = [
|
|
444
|
+
RaqmAlertDialogComponent,
|
|
445
|
+
RaqmAlertDialogTriggerDirective,
|
|
446
|
+
RaqmAlertDialogContentDirective,
|
|
447
|
+
RaqmAlertDialogHeaderDirective,
|
|
448
|
+
RaqmAlertDialogFooterDirective,
|
|
449
|
+
RaqmAlertDialogMediaDirective,
|
|
450
|
+
RaqmAlertDialogTitleDirective,
|
|
451
|
+
RaqmAlertDialogDescriptionDirective,
|
|
452
|
+
RaqmAlertDialogActionDirective,
|
|
453
|
+
RaqmAlertDialogCancelDirective
|
|
454
|
+
];
|
|
455
|
+
export { RaqmAlertDialog, RaqmAlertDialogActionDirective, RaqmAlertDialogCancelDirective, RaqmAlertDialogComponent, RaqmAlertDialogContentDirective, RaqmAlertDialogDescriptionDirective, RaqmAlertDialogFooterDirective, RaqmAlertDialogHeaderDirective, RaqmAlertDialogMediaDirective, RaqmAlertDialogTitleDirective, RaqmAlertDialogTriggerDirective };
|
|
456
|
+
|
|
457
|
+
//# sourceMappingURL=raqm-ui-alert-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raqm-ui-alert-dialog.mjs","names":[],"sources":["../../../projects/ui/alert-dialog/alert-dialog.component.ts","../../../projects/ui/dialog/dialog.component.html","../../../projects/ui/alert-dialog/alert-dialog.directive.ts","../../../projects/ui/alert-dialog/public-api.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n booleanAttribute,\r\n effect,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { RaqmButton } from '@raqm/ui/button';\r\nimport {\r\n RaqmDialogBaseComponent,\r\n RAQM_DIALOG,\r\n RAQM_DIALOG_POLICY,\r\n RaqmDialogPolicy,\r\n} from '@raqm/ui/dialog';\r\n\r\n/** Modal interruption sharing Dialog's stack, focus trap, scroll lock and teardown. */\r\n@Component({\r\n selector: 'raqm-alert-dialog',\r\n imports: [NgTemplateOutlet, RaqmButton],\r\n templateUrl: '../dialog/dialog.component.html',\r\n styleUrls: ['../dialog/dialog.component.scss', './alert-dialog.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'raqmAlertDialog',\r\n providers: [\r\n { provide: RAQM_DIALOG, useExisting: RaqmAlertDialogComponent },\r\n {\r\n provide: RAQM_DIALOG_POLICY,\r\n useFactory: (): RaqmDialogPolicy => ({\r\n role: 'alertdialog',\r\n contentClass: 'raqm-alert-dialog-content',\r\n small: signal(false),\r\n touchOpening: signal(false),\r\n dismissOnBackdrop: false,\r\n }),\r\n },\r\n ],\r\n})\r\nexport class RaqmAlertDialogComponent extends RaqmDialogBaseComponent {\r\n /** The compact alert layout; false is the normal layout. */\r\n readonly small = input(false, { transform: booleanAttribute });\r\n\r\n protected readonly closeButtonVisible = signal(false);\r\n protected readonly closeLabelText = signal<string | undefined>(undefined);\r\n\r\n constructor() {\r\n super();\r\n effect(() => this.policy?.small?.set(this.small()));\r\n }\r\n}\r\n","<ng-content />\r\n\r\n<!-- The CDK container, not this wrapper, is the role=dialog element. -->\r\n<ng-template #panel>\r\n <div\r\n class=\"raqm-dialog-content\"\r\n [class]=\"policy?.contentClass ?? ''\"\r\n [attr.data-raqm-small]=\"policy?.small?.() ? '' : null\"\r\n [attr.data-raqm-side]=\"policy?.side?.() ?? null\"\r\n [attr.dir]=\"panelDir()\"\r\n [class.raqm-dialog-content--entering]=\"entering()\"\r\n [class.raqm-dialog-content--closing]=\"closing()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate()\" />\r\n\r\n <!-- showCloseButton=false hides only this control; Escape and backdrop dismissal still close. -->\r\n @if (closeButtonVisible()) {\r\n <button\r\n raqm-button=\"ghost\"\r\n icon-small\r\n class=\"raqm-dialog-close\"\r\n [attr.aria-label]=\"closeLabelText()\"\r\n (click)=\"onCloseButtonClick()\"\r\n >\r\n <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 stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n >\r\n <path d=\"M18 6 6 18\" />\r\n <path d=\"m6 6 12 12\" />\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n</ng-template>\r\n","import { Directive, ElementRef, inject } from '@angular/core';\r\nimport { RAQM_DIALOG_POLICY } from '@raqm/ui/dialog';\r\nimport {\r\n RaqmDialogCloseDirective,\r\n RaqmDialogContentDirective,\r\n RaqmDialogDescriptionDirective,\r\n RaqmDialogTitleDirective,\r\n RaqmDialogTriggerDirective,\r\n} from '@raqm/ui/dialog';\r\n\r\n/** Native opener reusing Dialog registration and disclosure ARIA. */\r\n@Directive({\r\n selector: 'button[raqm-alert-dialog-trigger]',\r\n host: {\r\n class: 'raqm-alert-dialog-trigger',\r\n '(pointerdown)': 'setOpeningPointer($event)',\r\n '(keydown)': 'resetOpeningPointer()',\r\n },\r\n})\r\nexport class RaqmAlertDialogTriggerDirective extends RaqmDialogTriggerDirective {\r\n private readonly policy = inject(RAQM_DIALOG_POLICY, { optional: true });\r\n\r\n protected setOpeningPointer(event: PointerEvent): void {\r\n this.policy?.touchOpening.set(event.pointerType === 'touch');\r\n }\r\n\r\n protected resetOpeningPointer(): void {\r\n this.policy?.touchOpening.set(false);\r\n }\r\n}\r\n\r\n/** Portal body template; the root owns the compact-size policy. */\r\n@Directive({\r\n selector: 'ng-template[raqm-alert-dialog-content]',\r\n exportAs: 'raqmAlertDialogContent',\r\n})\r\nexport class RaqmAlertDialogContentDirective extends RaqmDialogContentDirective {}\r\n\r\n/** Passive header; media-aware responsive grid. */\r\n@Directive({\r\n selector: '[raqm-alert-dialog-header]',\r\n host: { class: 'raqm-alert-dialog-header' },\r\n})\r\nexport class RaqmAlertDialogHeaderDirective {}\r\n\r\n/** Passive action footer; controls remain application-authored native buttons. */\r\n@Directive({\r\n selector: '[raqm-alert-dialog-footer]',\r\n host: { class: 'raqm-alert-dialog-footer' },\r\n})\r\nexport class RaqmAlertDialogFooterDirective {}\r\n\r\n/** Optional media slot for an application-owned icon or image. */\r\n@Directive({\r\n selector: '[raqm-alert-dialog-media]',\r\n host: { class: 'raqm-alert-dialog-media' },\r\n})\r\nexport class RaqmAlertDialogMediaDirective {}\r\n\r\n/** Accessible title registered with the real alertdialog container. */\r\n@Directive({\r\n selector: '[raqm-alert-dialog-title]',\r\n hostDirectives: [RaqmDialogTitleDirective],\r\n host: { class: 'raqm-alert-dialog-title' },\r\n})\r\nexport class RaqmAlertDialogTitleDirective {}\r\n\r\n/** Accessible description registered with the real alertdialog container. */\r\n@Directive({\r\n selector: '[raqm-alert-dialog-description]',\r\n hostDirectives: [RaqmDialogDescriptionDirective],\r\n host: { class: 'raqm-alert-dialog-description' },\r\n})\r\nexport class RaqmAlertDialogDescriptionDirective {}\r\n\r\n/** Plain native action: compose raqm-button; activation does not implicitly close. */\r\n@Directive({\r\n selector: 'button[raqm-alert-dialog-action]',\r\n host: { class: 'raqm-alert-dialog-action' },\r\n})\r\nexport class RaqmAlertDialogActionDirective {\r\n constructor() {\r\n const element = inject<ElementRef<HTMLButtonElement>>(ElementRef).nativeElement;\r\n if (!element.hasAttribute('type')) {\r\n element.setAttribute('type', 'button');\r\n }\r\n }\r\n}\r\n\r\n/** Native cancel control using Dialog's single animated user-close path. */\r\n@Directive({\r\n selector: 'button[raqm-alert-dialog-cancel]',\r\n hostDirectives: [RaqmDialogCloseDirective],\r\n host: { class: 'raqm-alert-dialog-cancel' },\r\n})\r\nexport class RaqmAlertDialogCancelDirective {}\r\n","// Public API for `@raqm/ui/alert-dialog`; the root entry point re-exports these symbols.\r\nimport { RaqmAlertDialogComponent } from './alert-dialog.component';\r\nimport {\r\n RaqmAlertDialogActionDirective,\r\n RaqmAlertDialogCancelDirective,\r\n RaqmAlertDialogContentDirective,\r\n RaqmAlertDialogDescriptionDirective,\r\n RaqmAlertDialogFooterDirective,\r\n RaqmAlertDialogHeaderDirective,\r\n RaqmAlertDialogMediaDirective,\r\n RaqmAlertDialogTitleDirective,\r\n RaqmAlertDialogTriggerDirective,\r\n} from './alert-dialog.directive';\r\n\r\nexport {\r\n RaqmAlertDialogComponent,\r\n RaqmAlertDialogTriggerDirective,\r\n RaqmAlertDialogContentDirective,\r\n RaqmAlertDialogHeaderDirective,\r\n RaqmAlertDialogFooterDirective,\r\n RaqmAlertDialogMediaDirective,\r\n RaqmAlertDialogTitleDirective,\r\n RaqmAlertDialogDescriptionDirective,\r\n RaqmAlertDialogActionDirective,\r\n RaqmAlertDialogCancelDirective,\r\n};\r\n\r\nexport const RaqmAlertDialog = [\r\n RaqmAlertDialogComponent,\r\n RaqmAlertDialogTriggerDirective,\r\n RaqmAlertDialogContentDirective,\r\n RaqmAlertDialogHeaderDirective,\r\n RaqmAlertDialogFooterDirective,\r\n RaqmAlertDialogMediaDirective,\r\n RaqmAlertDialogTitleDirective,\r\n RaqmAlertDialogDescriptionDirective,\r\n RaqmAlertDialogActionDirective,\r\n RaqmAlertDialogCancelDirective,\r\n] as const;\r\n"],"mappings":";;;;;;AAuCA,IAAa,2BAAb,MAAa,iCAAiC,wBAAuB;CAE1D,QAAQ,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,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