@ckui/core 0.1.0-next.2 → 0.1.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +215 -0
- package/fesm2022/ckui-core-chip.mjs +300 -0
- package/fesm2022/ckui-core-chip.mjs.map +1 -0
- package/fesm2022/ckui-core-dialog.mjs +18 -287
- package/fesm2022/ckui-core-dialog.mjs.map +1 -1
- package/fesm2022/ckui-core-drawer.mjs +342 -0
- package/fesm2022/ckui-core-drawer.mjs.map +1 -0
- package/fesm2022/ckui-core-internal-dialog.mjs +296 -0
- package/fesm2022/ckui-core-internal-dialog.mjs.map +1 -0
- package/fesm2022/ckui-core-internal-overlay.mjs +19 -8
- package/fesm2022/ckui-core-internal-overlay.mjs.map +1 -1
- package/fesm2022/ckui-core-switch.mjs +327 -0
- package/fesm2022/ckui-core-switch.mjs.map +1 -0
- package/fesm2022/ckui-core-tabs.mjs +678 -0
- package/fesm2022/ckui-core-tabs.mjs.map +1 -0
- package/package.json +21 -1
- package/types/ckui-core-chip.d.ts +62 -0
- package/types/ckui-core-dialog.d.ts +5 -40
- package/types/ckui-core-drawer.d.ts +153 -0
- package/types/ckui-core-internal-dialog.d.ts +102 -0
- package/types/ckui-core-internal-overlay.d.ts +12 -5
- package/types/ckui-core-switch.d.ts +90 -0
- package/types/ckui-core-tabs.d.ts +212 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ckui-core-tabs.mjs","names":[],"sources":["../../../../projects/core/tabs/context.ts","../../../../projects/core/tabs/tab.ts","../../../../projects/core/tabs/tab-content.ts","../../../../projects/core/tabs/tab-list.ts","../../../../projects/core/tabs/tab-panel.ts","../../../../projects/core/tabs/tabs.ts","../../../../projects/core/tabs/index.ts"],"sourcesContent":["import { InjectionToken, Signal } from '@angular/core';\n\nexport type CkTabsActivation = 'auto' | 'manual';\n\n/** The part of a `ck-tab` its tabs group reads, so the files need not import each other's classes. */\nexport interface CkTabRef {\n readonly element: HTMLElement;\n readonly id: Signal<string>;\n /** The tab's value, or an unmatchable symbol while its `value` input is not set yet. */\n readonly current: Signal<unknown>;\n readonly disabled: Signal<boolean>;\n readonly group: CkTabsContext;\n}\n\n/** The part of a `ck-tab-panel` its tabs group reads. */\nexport interface CkTabPanelRef {\n readonly id: Signal<string>;\n /** The value of the tab the panel belongs to; `null` or `undefined` for the shared panel. */\n readonly value: Signal<unknown>;\n readonly group: CkTabsContext;\n}\n\n/** What the parts of a tabs group need from it. */\nexport interface CkTabsContext {\n readonly activation: Signal<CkTabsActivation>;\n /** Only the tabs of this group, not those of a group nested in one of its panels. */\n readonly tabs: Signal<readonly CkTabRef[]>;\n /** The tab that is shown: the one the value names, else the first enabled tab. */\n readonly selectedTab: Signal<CkTabRef | null>;\n select(tab: CkTabRef): void;\n panelIdFor(tab: CkTabRef): string | null;\n tabIdFor(panel: CkTabPanelRef): string | null;\n isShown(panel: CkTabPanelRef): boolean;\n hasTab(value: unknown): boolean;\n}\n\nexport const CK_TABS_CONTEXT = new InjectionToken<CkTabsContext>('CK_TABS_CONTEXT');\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { createCkId } from '@ckui/core/internal';\nimport { CK_TABS_CONTEXT, CkTabRef } from './context';\n\nconst UNBOUND = Symbol('unbound');\n\n/**\n * One tab of a `ck-tab-list`. Its content is the label. `value` names it in the group's value and\n * ties it to its panel. A disabled tab stays visible, cannot be selected and is skipped by the\n * arrow keys.\n */\n@Component({\n selector: 'ck-tab',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ck-tab',\n role: 'tab',\n '[id]': 'id()',\n '[class.ck-tab--selected]': 'selected()',\n '[class.ck-tab--disabled]': 'disabled()',\n '[attr.aria-selected]': 'selected()',\n '[attr.aria-controls]': 'controls()',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.tabindex]': 'tabIndex()',\n '(click)': 'group.select(this)',\n },\n template: `<span class=\"ck-tab__label\"><ng-content /></span>`,\n})\nexport class CkTab<T = unknown> implements CkTabRef {\n readonly value = input.required<T>();\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Defaults to a generated id; the panel's `aria-labelledby` follows a change. */\n readonly id = input(createCkId('ck-tab'));\n\n /** @internal Used by `ck-tabs` and `ck-tab-list`. */\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n /** @internal */\n readonly group = inject(CK_TABS_CONTEXT);\n\n /**\n * @internal A tab the template has just created has no value yet, though its group already\n * reads it.\n */\n readonly current = computed<unknown>(() => {\n try {\n return this.value();\n } catch {\n return UNBOUND;\n }\n });\n\n protected readonly selected = computed(() => this.group.selectedTab() === this);\n protected readonly controls = computed(() => this.group.panelIdFor(this));\n /** Never the roving 0 for a disabled tab; -1 keeps focus on a tab that becomes disabled under it. */\n protected readonly tabIndex = computed(() => (this.selected() && !this.disabled() ? 0 : -1));\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n/**\n * Marks the `<ng-template>` of a `ck-tab-panel` whose content is created only while the panel is\n * shown and destroyed again when it is hidden.\n */\n@Directive({ selector: 'ng-template[ckTabContent]' })\nexport class CkTabContent {\n /** @internal Used by `ck-tab-panel`. */\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n inject,\n untracked,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { hasAccessibleName } from '@ckui/core/internal';\nimport { CK_TABS_CONTEXT, CkTabRef } from './context';\n\ndeclare const ngDevMode: unknown;\n\n/** -1 for the previous tab, 1 for the next one, 0 for a key that does not move. */\nfunction stepOf(key: string, rtl: boolean): -1 | 0 | 1 {\n switch (key) {\n case 'ArrowLeft':\n return rtl ? 1 : -1;\n case 'ArrowRight':\n return rtl ? -1 : 1;\n default:\n return 0;\n }\n}\n\n/**\n * The row of tabs: `role=\"tablist\"`, one tab stop, Left and Right move between tabs (swapped in\n * right-to-left text), Home and End jump. When the tabs do not fit, the row scrolls sideways and\n * keeps the selected and the focused tab in view. It needs a name: `aria-label` or\n * `aria-labelledby`.\n */\n@Component({\n selector: 'ck-tab-list',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ck-tab-list',\n role: 'tablist',\n '(keydown)': 'onKeydown($event)',\n '(focusin)': 'onFocusIn($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n template: `<ng-content />`,\n})\nexport class CkTabList {\n private readonly group = inject(CK_TABS_CONTEXT);\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private destroyed = false;\n private observer: ResizeObserver | null = null;\n private focusedTab: HTMLElement | null = null;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.destroyed = true;\n this.observer?.disconnect();\n this.observer = null;\n });\n afterRenderEffect(() => {\n const tabs = this.group.tabs();\n this.group.selectedTab();\n this.watch(tabs);\n this.rescueFocus();\n this.revealSelected();\n });\n if (typeof ngDevMode !== 'undefined' && ngDevMode && this.browser) {\n afterNextRender(() => {\n if (!this.destroyed && !hasAccessibleName(this.element, { title: false, text: false })) {\n console.warn(\n '[ckui] ck-tab-list has no accessible name. Add an aria-label or aria-labelledby.',\n this.element,\n );\n }\n });\n }\n }\n\n /** Watches the row and every tab: a resize, a longer label or a late font moves the selected tab. */\n private watch(tabs: readonly CkTabRef[]): void {\n if (!this.browser || this.destroyed) {\n return;\n }\n const Observer = this.element.ownerDocument.defaultView?.ResizeObserver;\n if (Observer === undefined) {\n return;\n }\n this.observer ??= new Observer(() => this.revealCurrent());\n this.observer.disconnect();\n this.observer.observe(this.element);\n for (const tab of tabs) {\n this.observer.observe(tab.element);\n }\n }\n\n /** A focused tab that was removed leaves focus on the body: move it to the selected tab. */\n private rescueFocus(): void {\n const lost = this.focusedTab;\n if (lost === null || this.destroyed) {\n return;\n }\n const active = this.element.ownerDocument.activeElement;\n if (lost.isConnected) {\n if (active !== lost) {\n this.focusedTab = null;\n }\n return;\n }\n this.focusedTab = null;\n if (active === null || active === this.element.ownerDocument.body) {\n untracked(this.group.selectedTab)?.element.focus();\n }\n }\n\n private revealSelected(): void {\n const selected = untracked(this.group.selectedTab);\n if (selected !== null) {\n this.reveal(selected.element);\n }\n }\n\n /** The focused tab when focus is in the row (manual activation may have moved it), else the selected one. */\n private revealCurrent(): void {\n const active = this.element.ownerDocument.activeElement;\n const focused = untracked(this.group.tabs).find((tab) => tab.element === active);\n if (focused !== undefined) {\n this.reveal(focused.element);\n } else {\n this.revealSelected();\n }\n }\n\n /** Scrolls the row, never the page, so the tab is fully visible. Sizes are divided by any scale. */\n private reveal(tab: HTMLElement): void {\n if (!this.browser || this.destroyed || this.element.offsetWidth === 0) {\n return;\n }\n const list = this.element.getBoundingClientRect();\n const box = tab.getBoundingClientRect();\n const scale = list.width / this.element.offsetWidth;\n const toStart = (box.left - list.left) / scale;\n const toEnd = (box.right - list.right) / scale;\n if (toStart < 0) {\n this.element.scrollLeft += toStart;\n } else if (toEnd > 0) {\n this.element.scrollLeft += toEnd;\n }\n }\n\n protected onFocusIn(event: FocusEvent): void {\n const target = event.target as Node;\n const tab = this.group.tabs().find((candidate) => candidate.element.contains(target));\n if (tab !== undefined) {\n this.focusedTab = tab.element;\n this.reveal(tab.element);\n }\n }\n\n protected onFocusOut(event: FocusEvent): void {\n // Focus moving to another element is a real departure; a removed tab fires no related target.\n if (event.relatedTarget !== null) {\n this.focusedTab = null;\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n const target = event.target as Node;\n const tabs = this.group.tabs();\n const focused = tabs.find((tab) => tab.element.contains(target));\n if (focused === undefined) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {\n event.preventDefault();\n this.group.select(focused);\n return;\n }\n const usable = tabs.filter((tab) => !tab.disabled());\n const next = this.targetOf(event.key, focused, usable);\n if (next === null) {\n return;\n }\n event.preventDefault();\n next.element.focus();\n if (this.group.activation() === 'auto') {\n this.group.select(next);\n }\n }\n\n /** The tab a navigation key leads to, or `null` for a key that does not navigate. */\n private targetOf(key: string, focused: CkTabRef, usable: readonly CkTabRef[]): CkTabRef | null {\n if (usable.length === 0) {\n return null;\n }\n const last = usable.length - 1;\n if (key === 'Home') {\n return usable[0];\n }\n if (key === 'End') {\n return usable[last];\n }\n const step = stepOf(key, this.element.matches(':dir(rtl)'));\n if (step === 0) {\n return null;\n }\n const from = usable.indexOf(focused);\n if (from < 0) {\n return step > 0 ? usable[0] : usable[last];\n }\n return usable[(from + step + usable.length) % usable.length];\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n PLATFORM_ID,\n ViewEncapsulation,\n afterNextRender,\n computed,\n contentChild,\n inject,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';\nimport { createCkId } from '@ckui/core/internal';\nimport { CK_TABS_CONTEXT, CkTabPanelRef } from './context';\nimport { CkTabContent } from './tab-content';\n\ndeclare const ngDevMode: unknown;\n\n/**\n * The content of a tab. With a `value` it belongs to the tab of that value and is hidden unless\n * that tab is selected. Without one it is the shared panel: it shows the content of whichever tab\n * is selected, and every tab points at it. Put an `<ng-template ckTabContent>` inside to create\n * the content only while the panel is shown.\n */\n@Component({\n selector: 'ck-tab-panel',\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ck-tab-panel',\n role: 'tabpanel',\n tabindex: '0',\n '[id]': 'id()',\n '[hidden]': '!shown()',\n '[attr.aria-labelledby]': 'labelledBy()',\n },\n template: `<ng-content />\n @if (lazy(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n }`,\n})\nexport class CkTabPanel<T = unknown> implements CkTabPanelRef {\n /** The value of the tab this panel belongs to. Leave it out for one panel shared by all tabs. */\n readonly value = input<T | null | undefined>(undefined);\n /** Defaults to a generated id; the tabs' `aria-controls` follow a change. */\n readonly id = input(createCkId('ck-tab-panel'));\n\n /** @internal */\n readonly group = inject(CK_TABS_CONTEXT);\n private readonly content = contentChild(CkTabContent);\n\n protected readonly shown = computed(() => this.group.isShown(this));\n protected readonly labelledBy = computed(() => this.group.tabIdFor(this));\n protected readonly lazy = computed(() =>\n this.shown() ? (this.content()?.template ?? null) : null,\n );\n\n constructor() {\n if (typeof ngDevMode !== 'undefined' && ngDevMode && isPlatformBrowser(inject(PLATFORM_ID))) {\n let destroyed = false;\n inject(DestroyRef).onDestroy(() => (destroyed = true));\n afterNextRender(() => {\n const value = this.value();\n if (!destroyed && value != null && !this.group.hasTab(value)) {\n console.warn(\n '[ckui] ck-tab-panel has a value that matches no ck-tab, so it is never shown:',\n value,\n );\n }\n });\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Signal,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n forwardRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { CK_CONFIG, CkSize } from '@ckui/core';\nimport {\n CK_TABS_CONTEXT,\n CkTabPanelRef,\n CkTabRef,\n CkTabsActivation,\n CkTabsContext,\n} from './context';\nimport { CkTab } from './tab';\nimport { CkTabPanel } from './tab-panel';\n\nfunction isValued(panel: CkTabPanelRef): boolean {\n return panel.value() != null;\n}\n\n/**\n * Tabs that switch between panels: a `ck-tab-list` of `ck-tab`s and one or more `ck-tab-panel`s.\n * It is not a form control. `value` is the `value` of the selected tab, two-way.\n *\n * A `value` of `null`, or one no enabled tab has, shows the first enabled tab. That is only\n * reflected: the model is written when the user picks a tab, never for the implicit default.\n */\n@Component({\n selector: 'ck-tabs',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: CK_TABS_CONTEXT, useExisting: forwardRef(() => CkTabs) }],\n host: {\n class: 'ck-tabs',\n '[class]': 'modifierClasses()',\n '[class.ck-tabs--full-width]': 'fullWidth()',\n },\n template: `<ng-content />`,\n styleUrl: './tabs.css',\n})\nexport class CkTabs<T = unknown> implements CkTabsContext {\n /** The value of the selected tab. `null` shows the first enabled tab without writing it back. */\n readonly value = model<T | null>(null);\n /** `auto` selects a tab when the arrow keys focus it; `manual` waits for Enter or Space. */\n readonly activation = input<CkTabsActivation>('auto');\n /** `undefined` uses the size from `provideCkui`. */\n readonly size = input<CkSize | undefined>(undefined);\n /** Stretches the tabs to share the width of the row equally. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n\n private readonly config = inject(CK_CONFIG);\n private readonly allTabs = contentChildren(CkTab, { descendants: true });\n private readonly allPanels = contentChildren(CkTabPanel, { descendants: true });\n\n protected readonly modifierClasses = computed(\n () => `ck-tabs--${this.size() ?? this.config.size}`,\n );\n\n /** @internal Only this group's own tabs, not those of a group nested in a panel. */\n readonly tabs: Signal<readonly CkTabRef[]> = computed(() =>\n this.allTabs().filter((tab) => tab.group === this),\n );\n private readonly panels: Signal<readonly CkTabPanelRef[]> = computed(() =>\n this.allPanels().filter((panel) => panel.group === this),\n );\n\n /** @internal */\n readonly selectedTab: Signal<CkTabRef | null> = computed(() => {\n const usable = this.tabs().filter((tab) => !tab.disabled());\n const wanted = this.value();\n const named =\n wanted === null ? undefined : usable.find((tab) => Object.is(tab.current(), wanted));\n return named ?? usable[0] ?? null;\n });\n\n /** @internal */\n select(tab: CkTabRef): void {\n if (!tab.disabled()) {\n this.value.set(tab.current() as T);\n }\n }\n\n /** @internal */\n panelIdFor(tab: CkTabRef): string | null {\n const panels = this.panels();\n const own = panels.find((panel) => isValued(panel) && Object.is(panel.value(), tab.current()));\n return (own ?? panels.find((panel) => !isValued(panel)))?.id() ?? null;\n }\n\n /** @internal */\n tabIdFor(panel: CkTabPanelRef): string | null {\n if (!isValued(panel)) {\n return this.selectedTab()?.id() ?? null;\n }\n return (\n this.tabs()\n .find((tab) => Object.is(tab.current(), panel.value()))\n ?.id() ?? null\n );\n }\n\n /** @internal */\n isShown(panel: CkTabPanelRef): boolean {\n const selected = this.selectedTab();\n if (selected === null) {\n return false;\n }\n return !isValued(panel) || Object.is(selected.current(), panel.value());\n }\n\n /** @internal */\n hasTab(value: unknown): boolean {\n return this.tabs().some((tab) => Object.is(tab.current(), value));\n }\n}\n","import { CkTab } from './tab';\nimport { CkTabContent } from './tab-content';\nimport { CkTabList } from './tab-list';\nimport { CkTabPanel } from './tab-panel';\nimport { CkTabs } from './tabs';\n\nexport { CkTab } from './tab';\nexport { CkTabContent } from './tab-content';\nexport { CkTabList } from './tab-list';\nexport { CkTabPanel } from './tab-panel';\nexport { CkTabs } from './tabs';\nexport type { CkTabsActivation } from './context';\n\n/** Everything a template needs for tabs: `imports: [CK_TABS_IMPORTS]`. */\nexport const CK_TABS_IMPORTS = [CkTabs, CkTabList, CkTab, CkTabPanel, CkTabContent] as const;\n"],"mappings":";;;;;AAoCA,MAAa,kBAAkB,IAAI,eAA8B,iBAAiB;ACvBlF,MAAM,UAAU,OAAO,SAAS;AAyBhC,IAAa,QAAb,MAAa,MAAK;CACP,QAAQ,MAAM,SAAa,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC3B,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAErD,KAAK,MAAM,WAAW,QAAQ,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAGhC,UAAU,OAAgC,UAAU,CAAC,CAAC;CAEtD,QAAQ,OAAO,eAAe;CAM9B,UAAU,eAAuB;EACxC,IAAI;GACF,OAAO,KAAK,MAAK;EACnB,QAAQ;G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1E;IACJ,OAAO;IACP,WAAW;IACX,+BAA+B;GAChC;GAAA,UACS;GAAgB,QAAA,CAAA,23HAAA;EAAA,CAAA;CAciB,CAAA;CAAA,gBAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,KAAK,GAAA;IAAI,aAAa;IAAM,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC1B,UAAU,GAAA;IAAI,aAAa;IAAM,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AC9ChF,MAAa,kBAAkB;CAAC;CAAQ;CAAW;CAAO;CAAY;AAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckui/core",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.3",
|
|
4
4
|
"description": "Accessible, themeable Angular UI components for phone and desktop.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -50,10 +50,18 @@
|
|
|
50
50
|
"types": "./types/ckui-core-button.d.ts",
|
|
51
51
|
"default": "./fesm2022/ckui-core-button.mjs"
|
|
52
52
|
},
|
|
53
|
+
"./chip": {
|
|
54
|
+
"types": "./types/ckui-core-chip.d.ts",
|
|
55
|
+
"default": "./fesm2022/ckui-core-chip.mjs"
|
|
56
|
+
},
|
|
53
57
|
"./dialog": {
|
|
54
58
|
"types": "./types/ckui-core-dialog.d.ts",
|
|
55
59
|
"default": "./fesm2022/ckui-core-dialog.mjs"
|
|
56
60
|
},
|
|
61
|
+
"./drawer": {
|
|
62
|
+
"types": "./types/ckui-core-drawer.d.ts",
|
|
63
|
+
"default": "./fesm2022/ckui-core-drawer.mjs"
|
|
64
|
+
},
|
|
57
65
|
"./field": {
|
|
58
66
|
"types": "./types/ckui-core-field.d.ts",
|
|
59
67
|
"default": "./fesm2022/ckui-core-field.mjs"
|
|
@@ -62,6 +70,10 @@
|
|
|
62
70
|
"types": "./types/ckui-core-internal.d.ts",
|
|
63
71
|
"default": "./fesm2022/ckui-core-internal.mjs"
|
|
64
72
|
},
|
|
73
|
+
"./internal/dialog": {
|
|
74
|
+
"types": "./types/ckui-core-internal-dialog.d.ts",
|
|
75
|
+
"default": "./fesm2022/ckui-core-internal-dialog.mjs"
|
|
76
|
+
},
|
|
65
77
|
"./internal/overlay": {
|
|
66
78
|
"types": "./types/ckui-core-internal-overlay.d.ts",
|
|
67
79
|
"default": "./fesm2022/ckui-core-internal-overlay.mjs"
|
|
@@ -78,6 +90,14 @@
|
|
|
78
90
|
"types": "./types/ckui-core-stepper.d.ts",
|
|
79
91
|
"default": "./fesm2022/ckui-core-stepper.mjs"
|
|
80
92
|
},
|
|
93
|
+
"./switch": {
|
|
94
|
+
"types": "./types/ckui-core-switch.d.ts",
|
|
95
|
+
"default": "./fesm2022/ckui-core-switch.mjs"
|
|
96
|
+
},
|
|
97
|
+
"./tabs": {
|
|
98
|
+
"types": "./types/ckui-core-tabs.d.ts",
|
|
99
|
+
"default": "./fesm2022/ckui-core-tabs.mjs"
|
|
100
|
+
},
|
|
81
101
|
"./toast": {
|
|
82
102
|
"types": "./types/ckui-core-toast.d.ts",
|
|
83
103
|
"default": "./fesm2022/ckui-core-toast.mjs"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CkSize } from "@ckui/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
type CkChipSize = CkSize;
|
|
4
|
+
/** Marks a projected element (usually an `svg`) as the chip's leading icon. It is decorative. */
|
|
5
|
+
export declare class CkChipIcon {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CkChipIcon, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CkChipIcon, "[ckChipIcon]", never, {}, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A compact toggle button for filters: a native `<button>` with `aria-pressed`. Selected shows a
|
|
11
|
+
* check before the label, so the state is never colour alone. Every native attribute stays
|
|
12
|
+
* yours; `aria-pressed` belongs to the chip.
|
|
13
|
+
*/
|
|
14
|
+
export declare class CkChip {
|
|
15
|
+
/** Whether the chip is on. Use `[(selected)]`. Only a click changes it from inside. */
|
|
16
|
+
readonly selected: import("@angular/core").ModelSignal<boolean>;
|
|
17
|
+
/** `sm`, `md`, `lg` or `xl`. An unknown value falls back to `sm`. */
|
|
18
|
+
readonly size: import("@angular/core").InputSignal<CkSize>;
|
|
19
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
20
|
+
private readonly element;
|
|
21
|
+
private readonly renderer;
|
|
22
|
+
protected readonly modifierClasses: import("@angular/core").Signal<string>;
|
|
23
|
+
/** The consumer's own `disabled` attribute from before the chip wrote one; undefined while the chip writes none. */
|
|
24
|
+
private consumerDisabled;
|
|
25
|
+
constructor();
|
|
26
|
+
protected toggle(): void;
|
|
27
|
+
/** Writes the native `disabled`, and gives the consumer's own value back when it turns off. */
|
|
28
|
+
private writeDisabled;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CkChip, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CkChip, "button[ckChip]", never, {
|
|
31
|
+
"selected": {
|
|
32
|
+
"alias": "selected";
|
|
33
|
+
"required": false;
|
|
34
|
+
"isSignal": true;
|
|
35
|
+
};
|
|
36
|
+
"size": {
|
|
37
|
+
"alias": "size";
|
|
38
|
+
"required": false;
|
|
39
|
+
"isSignal": true;
|
|
40
|
+
};
|
|
41
|
+
"disabled": {
|
|
42
|
+
"alias": "disabled";
|
|
43
|
+
"required": false;
|
|
44
|
+
"isSignal": true;
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
"selected": "selectedChange";
|
|
48
|
+
}, never, ["[ckChipIcon]", "*"], true, never>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A wrapping row of chips. It is a `group` and needs a name: `aria-label` or `aria-labelledby`.
|
|
52
|
+
* The gap between the chips is `--ck-chip-group-gap`.
|
|
53
|
+
*/
|
|
54
|
+
export declare class CkChipGroup {
|
|
55
|
+
private readonly element;
|
|
56
|
+
constructor();
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CkChipGroup, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CkChipGroup, "ck-chip-group", never, {}, {}, never, ["*"], true, never>;
|
|
59
|
+
}
|
|
60
|
+
/** Everything a template needs for chips: `imports: [CK_CHIP_IMPORTS]`. */
|
|
61
|
+
export declare const CK_CHIP_IMPORTS: readonly [typeof CkChip, typeof CkChipIcon, typeof CkChipGroup];
|
|
62
|
+
export type { CkChipSize };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { Injector, TemplateRef } from "@angular/core";
|
|
3
|
+
import { CK_DIALOG_DATA, CkDialogRef, CkDialogRef as CkDialogRef$1 } from "@ckui/core/internal/dialog";
|
|
3
4
|
import { ComponentType } from "@angular/cdk/portal";
|
|
4
5
|
type CkDialogRole = 'dialog' | 'alertdialog';
|
|
5
6
|
/** Largest inline size of a modal dialog: 24, 32 or 48rem. */
|
|
@@ -30,8 +31,6 @@ interface CkDialogConfig<D = unknown> {
|
|
|
30
31
|
/** The accessible name when the content has no `ckDialogTitle`. */
|
|
31
32
|
ariaLabel?: string;
|
|
32
33
|
}
|
|
33
|
-
/** The `data` of the config, for a dialog opened with a component. */
|
|
34
|
-
export declare const CK_DIALOG_DATA: InjectionToken<unknown>;
|
|
35
34
|
/**
|
|
36
35
|
* A dialog declared in a template. Its content is one `<ng-template>` that is only rendered while
|
|
37
36
|
* `open` is true, so nothing in it exists while the dialog is closed. `[(open)]` follows the dialog:
|
|
@@ -163,57 +162,23 @@ export declare class CkDialogInitialFocus {
|
|
|
163
162
|
static ɵfac: i0.ɵɵFactoryDeclaration<CkDialogInitialFocus, never>;
|
|
164
163
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CkDialogInitialFocus, "[ckDialogInitialFocus]", never, {}, {}, never, never, true, never>;
|
|
165
164
|
}
|
|
166
|
-
/** What a `CkDialogRef` calls into; supplied by `CkDialog`, not by consumers. */
|
|
167
|
-
interface CkDialogRefControls<R> {
|
|
168
|
-
readonly closing: Promise<void>;
|
|
169
|
-
readonly closed: Promise<R | undefined>;
|
|
170
|
-
close(result: R | undefined): void;
|
|
171
|
-
}
|
|
172
|
-
/** Controls one open dialog. Returned by `CkDialog.open`, injected by its content; never constructed directly. */
|
|
173
|
-
export declare class CkDialogRef<R = unknown> {
|
|
174
|
-
/**
|
|
175
|
-
* Resolves once, after the dialog has left the screen, with the result of the first `close()`.
|
|
176
|
-
* Escape, a click on the backdrop and a swipe resolve it with `undefined`, and so does destroying
|
|
177
|
-
* the app.
|
|
178
|
-
*/
|
|
179
|
-
readonly closed: Promise<R | undefined>;
|
|
180
|
-
/**
|
|
181
|
-
* Resolves once, the moment the dialog starts to close (before the leave animation), whatever
|
|
182
|
-
* the cause. `closed` follows when it has left the screen.
|
|
183
|
-
*/
|
|
184
|
-
readonly closing: Promise<void>;
|
|
185
|
-
private readonly controls;
|
|
186
|
-
constructor(controls: CkDialogRefControls<R>);
|
|
187
|
-
/** Closes the dialog. Only the first call counts; later ones, with another result too, do nothing. */
|
|
188
|
-
close(result?: R): void;
|
|
189
|
-
}
|
|
190
165
|
/**
|
|
191
166
|
* Opens modal dialogs, which become bottom sheets on a phone. Takes a component or a template as
|
|
192
167
|
* content and returns a `CkDialogRef` that closes it and delivers the result.
|
|
193
168
|
*/
|
|
194
169
|
export declare class CkDialog {
|
|
195
|
-
private readonly
|
|
196
|
-
private readonly checker;
|
|
197
|
-
private readonly injector;
|
|
198
|
-
private readonly active;
|
|
199
|
-
constructor();
|
|
170
|
+
private readonly opener;
|
|
200
171
|
/**
|
|
201
172
|
* Opens a dialog. The content injects `CK_DIALOG_DATA` and `CkDialogRef`; a component sees the
|
|
202
173
|
* app's providers, plus those of `config.injector` when given. On the server nothing is shown and
|
|
203
174
|
* `closed` resolves with `undefined` at once.
|
|
204
175
|
*/
|
|
205
|
-
open<C, D = unknown, R = unknown>(content: ComponentType<C> | TemplateRef<unknown>, config?: CkDialogConfig<D>): CkDialogRef<R>;
|
|
176
|
+
open<C, D = unknown, R = unknown>(content: ComponentType<C> | TemplateRef<unknown>, config?: CkDialogConfig<D>): CkDialogRef$1<R>;
|
|
206
177
|
/** Closes every open dialog as if each one's `close()` had been called without a result. */
|
|
207
178
|
closeAll(): void;
|
|
208
|
-
private setAttribute;
|
|
209
|
-
/**
|
|
210
|
-
* The marked element, else the first tabbable one of the content (the close button comes last in
|
|
211
|
-
* the DOM, and the scrolling body itself is skipped), else the panel.
|
|
212
|
-
*/
|
|
213
|
-
private initialFocus;
|
|
214
179
|
static ɵfac: i0.ɵɵFactoryDeclaration<CkDialog, never>;
|
|
215
180
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
216
181
|
}
|
|
217
182
|
/** Everything a template needs for a dialog: `imports: [CK_DIALOG_IMPORTS]`. */
|
|
218
183
|
export declare const CK_DIALOG_IMPORTS: readonly [typeof CkDialogComponent, typeof CkDialogTitle, typeof CkDialogDescription, typeof CkDialogBody, typeof CkDialogActions, typeof CkDialogClose, typeof CkDialogInitialFocus];
|
|
219
|
-
export type
|
|
184
|
+
export { CK_DIALOG_DATA, type CkDialogConfig, type CkDialogMode, CkDialogRef, type CkDialogRole, type CkDialogWidth };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { CkDialogActions, CkDialogActions as CkDialogActions$1, CkDialogBody, CkDialogBody as CkDialogBody$1, CkDialogClose, CkDialogClose as CkDialogClose$1, CkDialogDescription, CkDialogDescription as CkDialogDescription$1, CkDialogInitialFocus, CkDialogInitialFocus as CkDialogInitialFocus$1, CkDialogRef, CkDialogRole, CkDialogTitle, CkDialogTitle as CkDialogTitle$1 } from "@ckui/core/dialog";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Injector, TemplateRef } from "@angular/core";
|
|
4
|
+
import { ComponentType } from "@angular/cdk/portal";
|
|
5
|
+
/** Inline size of a side panel: 20, 24 or 32rem, never wider than the screen minus a margin. */
|
|
6
|
+
type CkDrawerWidth = 'sm' | 'md' | 'lg';
|
|
7
|
+
/** The edge the panel slides in from. `end` is the right edge in a left-to-right page, the left edge in a right-to-left one. */
|
|
8
|
+
type CkDrawerSide = 'start' | 'end';
|
|
9
|
+
/**
|
|
10
|
+
* `auto` opens a bottom sheet on a narrow screen with a coarse pointer, a full-height side panel
|
|
11
|
+
* otherwise. Decided at the moment the drawer opens.
|
|
12
|
+
*/
|
|
13
|
+
type CkDrawerMode = 'auto' | 'side' | 'sheet';
|
|
14
|
+
interface CkDrawerConfig<D = unknown> {
|
|
15
|
+
/** What the content gets from `inject(CK_DRAWER_DATA)`. */
|
|
16
|
+
data?: D;
|
|
17
|
+
/** `alertdialog` for a message the user has to answer. Default `dialog`. */
|
|
18
|
+
role?: CkDialogRole;
|
|
19
|
+
/** The edge of a side panel. Default `end`. */
|
|
20
|
+
side?: CkDrawerSide;
|
|
21
|
+
/** Default `auto`, decided at the moment the drawer opens. */
|
|
22
|
+
mode?: CkDrawerMode;
|
|
23
|
+
/** Default `md`. As a sheet the drawer is as wide as the screen. */
|
|
24
|
+
width?: CkDrawerWidth;
|
|
25
|
+
/** Escape and a click on the backdrop close the drawer, and a swipe down closes a sheet. Default `true`. */
|
|
26
|
+
dismissible?: boolean;
|
|
27
|
+
/** Shows the close button next to the title. Default `true`. */
|
|
28
|
+
closeButton?: boolean;
|
|
29
|
+
/** A sheet as tall as the screen allows instead of as tall as its content. Default `false`. */
|
|
30
|
+
fullHeight?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The parent injector of a component's content, for providers the app root doesn't have (route
|
|
33
|
+
* level, or the opener's own): pass `inject(Injector)` from the opener. `CK_DRAWER_DATA` and
|
|
34
|
+
* `CkDrawerRef` are provided on top. Template content keeps the injector of its template.
|
|
35
|
+
*/
|
|
36
|
+
injector?: Injector;
|
|
37
|
+
/** The accessible name when the content has no `ckDialogTitle`. */
|
|
38
|
+
ariaLabel?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A drawer declared in a template. Its content is one `<ng-template>` that is only rendered while
|
|
42
|
+
* `open` is true, so nothing in it exists while the drawer is closed. `[(open)]` follows the drawer:
|
|
43
|
+
* Escape, the backdrop, the close button and `[ckDialogClose]` set it back to `false`.
|
|
44
|
+
*/
|
|
45
|
+
export declare class CkDrawerComponent {
|
|
46
|
+
readonly open: import("@angular/core").ModelSignal<boolean>;
|
|
47
|
+
readonly side: import("@angular/core").InputSignal<CkDrawerSide>;
|
|
48
|
+
readonly mode: import("@angular/core").InputSignal<CkDrawerMode>;
|
|
49
|
+
readonly role: import("@angular/core").InputSignal<CkDialogRole>;
|
|
50
|
+
readonly width: import("@angular/core").InputSignal<CkDrawerWidth>;
|
|
51
|
+
readonly dismissible: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
52
|
+
readonly closeButton: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
53
|
+
readonly fullHeight: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
54
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
55
|
+
/** Emits when the drawer has left the screen, with the result of `[ckDialogClose]`, else `undefined`. */
|
|
56
|
+
readonly closed: import("@angular/core").OutputEmitterRef<unknown>;
|
|
57
|
+
private readonly template;
|
|
58
|
+
private readonly drawer;
|
|
59
|
+
private readonly isBrowser;
|
|
60
|
+
private ref;
|
|
61
|
+
private destroyed;
|
|
62
|
+
constructor();
|
|
63
|
+
private sync;
|
|
64
|
+
private show;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CkDrawerComponent, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CkDrawerComponent, "ck-drawer", never, {
|
|
67
|
+
"open": {
|
|
68
|
+
"alias": "open";
|
|
69
|
+
"required": false;
|
|
70
|
+
"isSignal": true;
|
|
71
|
+
};
|
|
72
|
+
"side": {
|
|
73
|
+
"alias": "side";
|
|
74
|
+
"required": false;
|
|
75
|
+
"isSignal": true;
|
|
76
|
+
};
|
|
77
|
+
"mode": {
|
|
78
|
+
"alias": "mode";
|
|
79
|
+
"required": false;
|
|
80
|
+
"isSignal": true;
|
|
81
|
+
};
|
|
82
|
+
"role": {
|
|
83
|
+
"alias": "role";
|
|
84
|
+
"required": false;
|
|
85
|
+
"isSignal": true;
|
|
86
|
+
};
|
|
87
|
+
"width": {
|
|
88
|
+
"alias": "width";
|
|
89
|
+
"required": false;
|
|
90
|
+
"isSignal": true;
|
|
91
|
+
};
|
|
92
|
+
"dismissible": {
|
|
93
|
+
"alias": "dismissible";
|
|
94
|
+
"required": false;
|
|
95
|
+
"isSignal": true;
|
|
96
|
+
};
|
|
97
|
+
"closeButton": {
|
|
98
|
+
"alias": "closeButton";
|
|
99
|
+
"required": false;
|
|
100
|
+
"isSignal": true;
|
|
101
|
+
};
|
|
102
|
+
"fullHeight": {
|
|
103
|
+
"alias": "fullHeight";
|
|
104
|
+
"required": false;
|
|
105
|
+
"isSignal": true;
|
|
106
|
+
};
|
|
107
|
+
"ariaLabel": {
|
|
108
|
+
"alias": "ariaLabel";
|
|
109
|
+
"required": false;
|
|
110
|
+
"isSignal": true;
|
|
111
|
+
};
|
|
112
|
+
}, {
|
|
113
|
+
"open": "openChange";
|
|
114
|
+
"closed": "closed";
|
|
115
|
+
}, ["template"], never, true, never>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* What a component opened with `CkDrawer` injects for its `data`. It is the dialog's data token,
|
|
119
|
+
* so content written for a dialog works unchanged in a drawer.
|
|
120
|
+
*/
|
|
121
|
+
export declare const CK_DRAWER_DATA: import("@angular/core").InjectionToken<unknown>;
|
|
122
|
+
/**
|
|
123
|
+
* The ref of an open drawer: `close(result?)`, `closed` and `closing`. It is the dialog's ref, so
|
|
124
|
+
* `inject(CkDrawerRef)` works inside the drawer's content.
|
|
125
|
+
*/
|
|
126
|
+
export declare const CkDrawerRef: typeof CkDialogRef;
|
|
127
|
+
export type CkDrawerRef<R = unknown> = CkDialogRef<R>;
|
|
128
|
+
/**
|
|
129
|
+
* Opens drawers: a full-height panel that slides in from the side, or a bottom sheet on a phone.
|
|
130
|
+
* Takes a component or a template as content and returns a `CkDrawerRef` (the dialog's ref) that
|
|
131
|
+
* closes it and delivers the result.
|
|
132
|
+
*/
|
|
133
|
+
export declare class CkDrawer {
|
|
134
|
+
private readonly opener;
|
|
135
|
+
private readonly media;
|
|
136
|
+
/**
|
|
137
|
+
* Opens a drawer. The content injects `CK_DRAWER_DATA` and `CkDrawerRef`; a component sees the
|
|
138
|
+
* app's providers, plus those of `config.injector` when given. On the server nothing is shown and
|
|
139
|
+
* `closed` resolves with `undefined` at once.
|
|
140
|
+
*/
|
|
141
|
+
open<C, D = unknown, R = unknown>(content: ComponentType<C> | TemplateRef<unknown>, config?: CkDrawerConfig<D>): CkDrawerRef<R>;
|
|
142
|
+
/** Closes every open drawer as if each one's `close()` had been called without a result. */
|
|
143
|
+
closeAll(): void;
|
|
144
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CkDrawer, never>;
|
|
145
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Everything a template needs for a drawer: `imports: [CK_DRAWER_IMPORTS]`. The building blocks
|
|
149
|
+
* are the dialog's: `ckDialogTitle`, `ckDialogDescription`, `ck-dialog-body`,
|
|
150
|
+
* `ck-dialog-actions`, `ckDialogClose` and `ckDialogInitialFocus`.
|
|
151
|
+
*/
|
|
152
|
+
export declare const CK_DRAWER_IMPORTS: readonly [typeof CkDrawerComponent, typeof CkDialogTitle$1, typeof CkDialogDescription$1, typeof CkDialogBody$1, typeof CkDialogActions$1, typeof CkDialogClose$1, typeof CkDialogInitialFocus$1];
|
|
153
|
+
export { CkDialogActions, CkDialogBody, CkDialogClose, CkDialogDescription, CkDialogInitialFocus, CkDialogTitle, type CkDrawerConfig, type CkDrawerMode, type CkDrawerSide, type CkDrawerWidth };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ComponentRef, EmbeddedViewRef, InjectionToken, Injector, Signal, TemplateRef } from "@angular/core";
|
|
3
|
+
import { ComponentType, Portal } from "@angular/cdk/portal";
|
|
4
|
+
import { CkOverlayMode } from "@ckui/core/internal/overlay";
|
|
5
|
+
/** The ids of every title (or description) in the dialog; the newest one names it. */
|
|
6
|
+
export declare class CkDialogIds {
|
|
7
|
+
private readonly entries;
|
|
8
|
+
readonly current: Signal<string | null>;
|
|
9
|
+
/** Returns the function that takes the entry out again; it leaves the others alone. */
|
|
10
|
+
add(id: Signal<string>): () => void;
|
|
11
|
+
}
|
|
12
|
+
/** What the building blocks inside a dialog tell the dialog: the ids that name it. */
|
|
13
|
+
export declare class CkDialogContext {
|
|
14
|
+
readonly titles: CkDialogIds;
|
|
15
|
+
readonly descriptions: CkDialogIds;
|
|
16
|
+
readonly titleId: Signal<string | null>;
|
|
17
|
+
readonly descriptionId: Signal<string | null>;
|
|
18
|
+
/** Resolved when the dialog opens. */
|
|
19
|
+
readonly mode: import("@angular/core").WritableSignal<"modal" | "sheet" | "side">;
|
|
20
|
+
}
|
|
21
|
+
export declare const CK_DIALOG_CONTEXT: InjectionToken<CkDialogContext>;
|
|
22
|
+
/** What a `CkDialogRef` calls into; supplied by `CkDialog`, not by consumers. */
|
|
23
|
+
interface CkDialogRefControls<R> {
|
|
24
|
+
readonly closing: Promise<void>;
|
|
25
|
+
readonly closed: Promise<R | undefined>;
|
|
26
|
+
close(result: R | undefined): void;
|
|
27
|
+
}
|
|
28
|
+
/** Controls one open dialog or drawer. Returned by `CkDialog.open` and `CkDrawer.open`, injected by its content; never constructed directly. */
|
|
29
|
+
export declare class CkDialogRef<R = unknown> {
|
|
30
|
+
/**
|
|
31
|
+
* Resolves once, after the dialog has left the screen, with the result of the first `close()`.
|
|
32
|
+
* Escape, a click on the backdrop and a swipe resolve it with `undefined`, and so does destroying
|
|
33
|
+
* the app.
|
|
34
|
+
*/
|
|
35
|
+
readonly closed: Promise<R | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* Resolves once, the moment the dialog starts to close (before the leave animation), whatever
|
|
38
|
+
* the cause. `closed` follows when it has left the screen.
|
|
39
|
+
*/
|
|
40
|
+
readonly closing: Promise<void>;
|
|
41
|
+
private readonly controls;
|
|
42
|
+
constructor(controls: CkDialogRefControls<R>);
|
|
43
|
+
/** Closes the dialog. Only the first call counts; later ones, with another result too, do nothing. */
|
|
44
|
+
close(result?: R): void;
|
|
45
|
+
}
|
|
46
|
+
/** What the service hands the container: the consumer's content and the parts of the config it shows. */
|
|
47
|
+
interface CkDialogContainerSetup {
|
|
48
|
+
readonly content: ComponentType<unknown> | TemplateRef<unknown>;
|
|
49
|
+
readonly closeButton: boolean;
|
|
50
|
+
readonly dismissible: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** The dialog's (or drawer's) own element inside the overlay: the padding, the close button and the consumer's content. */
|
|
53
|
+
export declare class CkDialogContainer {
|
|
54
|
+
protected readonly context: import("@ckui/core/internal/dialog").CkDialogContext;
|
|
55
|
+
protected readonly setup: CkDialogContainerSetup;
|
|
56
|
+
protected readonly labels: import("@angular/core").Signal<import("@ckui/core").CkLabels>;
|
|
57
|
+
protected readonly ref: CkDialogRef<any>;
|
|
58
|
+
protected readonly portal: Portal<unknown>;
|
|
59
|
+
constructor();
|
|
60
|
+
/** A component's host element has to be a flex column too, or its body could not scroll. */
|
|
61
|
+
protected onAttached(attached: ComponentRef<unknown> | EmbeddedViewRef<unknown> | null): void;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CkDialogContainer, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CkDialogContainer, "ck-dialog-container", never, {}, {}, never, never, true, never>;
|
|
64
|
+
}
|
|
65
|
+
/** The `data` of the config, for a dialog or drawer opened with a component. */
|
|
66
|
+
export declare const CK_DIALOG_DATA: InjectionToken<unknown>;
|
|
67
|
+
interface CkDialogOpenOptions<D> {
|
|
68
|
+
/** Names the opener in dev warnings. */
|
|
69
|
+
readonly kind: 'CkDialog' | 'CkDrawer';
|
|
70
|
+
readonly mode: CkOverlayMode;
|
|
71
|
+
readonly side?: 'start' | 'end';
|
|
72
|
+
readonly data?: D;
|
|
73
|
+
readonly role: 'dialog' | 'alertdialog';
|
|
74
|
+
readonly dismissible: boolean;
|
|
75
|
+
readonly closeButton: boolean;
|
|
76
|
+
readonly fullHeight: boolean;
|
|
77
|
+
readonly injector?: Injector;
|
|
78
|
+
readonly ariaLabel?: string;
|
|
79
|
+
readonly panelClass: string[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* What dialog and drawer share: the ref, the result promise, the labelling from the building
|
|
83
|
+
* blocks, the initial focus and the teardown. One instance per service, created in its field
|
|
84
|
+
* initialiser (an injection context).
|
|
85
|
+
*/
|
|
86
|
+
export declare class CkDialogOpener {
|
|
87
|
+
private readonly overlay;
|
|
88
|
+
private readonly checker;
|
|
89
|
+
private readonly injector;
|
|
90
|
+
private readonly active;
|
|
91
|
+
constructor();
|
|
92
|
+
open<C, D, R>(content: ComponentType<C> | TemplateRef<unknown>, options: CkDialogOpenOptions<D>): CkDialogRef<R>;
|
|
93
|
+
/** Closes every open one as if each `close()` had been called without a result. */
|
|
94
|
+
closeAll(): void;
|
|
95
|
+
private setAttribute;
|
|
96
|
+
/**
|
|
97
|
+
* The marked element, else the first tabbable one of the content (the close button comes last in
|
|
98
|
+
* the DOM, and the scrolling body itself is skipped), else the panel.
|
|
99
|
+
*/
|
|
100
|
+
private initialFocus;
|
|
101
|
+
}
|
|
102
|
+
export type { CkDialogOpenOptions, CkDialogRefControls };
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { ComponentType } from "@angular/cdk/portal";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { Injector, TemplateRef } from "@angular/core";
|
|
4
|
-
type CkOverlayMode = 'auto' | 'modal' | 'sheet';
|
|
4
|
+
type CkOverlayMode = 'auto' | 'modal' | 'sheet' | 'side';
|
|
5
5
|
type CkOverlayDismissReason = 'escape' | 'backdrop' | 'swipe';
|
|
6
6
|
interface CkOverlayConfig {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* `auto` becomes a sheet when `CkMedia.sheet()` is true at the moment of opening, else a modal;
|
|
9
|
+
* it never becomes `side`. Default `auto`.
|
|
10
|
+
*/
|
|
8
11
|
mode?: CkOverlayMode;
|
|
9
|
-
/**
|
|
12
|
+
/** The edge a `side` panel sits on; `end` is the right edge in a left-to-right page. Resolved when opening. Default `end`. */
|
|
13
|
+
side?: 'start' | 'end';
|
|
14
|
+
/** Escape and a click on the backdrop, and for a sheet a swipe down, may close the overlay. Default `true`. */
|
|
10
15
|
dismissible?: boolean;
|
|
11
16
|
/** A sheet as tall as the viewport allows instead of as tall as its content. */
|
|
12
17
|
fullHeight?: boolean;
|
|
@@ -30,7 +35,7 @@ interface CkOverlayConfig {
|
|
|
30
35
|
}
|
|
31
36
|
interface CkOverlayHandle {
|
|
32
37
|
/** The mode resolved when the overlay opened. */
|
|
33
|
-
readonly mode: 'modal' | 'sheet';
|
|
38
|
+
readonly mode: 'modal' | 'sheet' | 'side';
|
|
34
39
|
/** The element that carries `role`, `aria-modal` and the labels; set `aria-labelledby` here when the title appears later. */
|
|
35
40
|
readonly panel: HTMLElement;
|
|
36
41
|
/** Resolves once the opening animation and the initial focus are done. */
|
|
@@ -41,7 +46,7 @@ interface CkOverlayHandle {
|
|
|
41
46
|
close(): Promise<void>;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
|
-
* Opens modal dialogs
|
|
49
|
+
* Opens modal dialogs, bottom sheets and side panels on the CDK overlay: backdrop, scroll lock, focus trap and
|
|
45
50
|
* restore, `inert` background, Escape / backdrop / swipe dismissal and the open and close animation.
|
|
46
51
|
*/
|
|
47
52
|
export declare class CkOverlayHost {
|
|
@@ -63,6 +68,8 @@ export declare class CkOverlayHost {
|
|
|
63
68
|
open<C>(content: ComponentType<C> | TemplateRef<unknown>, config?: CkOverlayConfig, injector?: Injector): CkOverlayHandle;
|
|
64
69
|
/** Focus did not return to where it came from (opener disabled, inert or gone): find it a home. */
|
|
65
70
|
private restoreFocus;
|
|
71
|
+
/** Full height, flush against the physical left or right edge. */
|
|
72
|
+
private sidePosition;
|
|
66
73
|
private contentPortal;
|
|
67
74
|
/** What the server gets: nothing is rendered, and the overlay counts as closed. */
|
|
68
75
|
private inertHandle;
|