@wirekyt/angular 0.0.18 → 0.0.20
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/dist/fesm2022/wirekyt-angular-floating-panel.mjs +679 -0
- package/dist/fesm2022/wirekyt-angular-floating-panel.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-focus-trap.mjs +70 -0
- package/dist/fesm2022/wirekyt-angular-focus-trap.mjs.map +1 -0
- package/dist/package.json +9 -1
- package/dist/types/wirekyt-angular-checkbox.d.ts +1 -1
- package/dist/types/wirekyt-angular-color-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-combobox.d.ts +1 -1
- package/dist/types/wirekyt-angular-date-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-floating-panel.d.ts +216 -0
- package/dist/types/wirekyt-angular-floating-panel.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-focus-trap.d.ts +30 -0
- package/dist/types/wirekyt-angular-focus-trap.d.ts.map +1 -0
- package/package.json +10 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-floating-panel.mjs","sources":["../../src/components/floating-panel/use-context.ts","../../src/components/floating-panel/use.ts","../../src/components/floating-panel/root.ts","../../src/components/floating-panel/root-provider.ts","../../src/components/floating-panel/trigger.ts","../../src/components/floating-panel/positioner.ts","../../src/components/floating-panel/content.ts","../../src/components/floating-panel/control.ts","../../src/components/floating-panel/header.ts","../../src/components/floating-panel/body.ts","../../src/components/floating-panel/title.ts","../../src/components/floating-panel/close-trigger.ts","../../src/components/floating-panel/drag-trigger.ts","../../src/components/floating-panel/resize-trigger.ts","../../src/components/floating-panel/stage-trigger.ts","../../src/components/floating-panel/context.ts","../../src/components/floating-panel/wirekyt-angular-floating-panel.ts"],"sourcesContent":["import type { ContextCarrier } from \"@wirekyt/angular\";\n\nimport { InjectionToken, inject, type Signal } from \"@angular/core\";\n\nimport type { UseFloatingPanelReturn } from \"./use\";\n\nexport const FLOATING_PANEL_CONTEXT = new InjectionToken<UseFloatingPanelReturn>(\n \"WIREKYT.FLOATING_PANEL_CONTEXT\",\n);\n\nexport function injectFloatingPanelContext(): UseFloatingPanelReturn {\n return inject(FLOATING_PANEL_CONTEXT);\n}\n\nexport const FLOATING_PANEL_CONTEXT_CARRIER = new InjectionToken<\n ContextCarrier<UseFloatingPanelReturn>\n>(\"WIREKYT.FLOATING_PANEL_CONTEXT_CARRIER\");\n\nexport function injectFloatingPanelContextCarrier(): ContextCarrier<UseFloatingPanelReturn> {\n return inject(FLOATING_PANEL_CONTEXT_CARRIER);\n}\n\nexport interface FloatingPanelRenderStrategyContext {\n readonly lazyMount: Signal<boolean>;\n readonly unmountOnExit: Signal<boolean>;\n}\n\nexport const FLOATING_PANEL_RENDER_STRATEGY_CONTEXT =\n new InjectionToken<FloatingPanelRenderStrategyContext>(\n \"WIREKYT.FLOATING_PANEL_RENDER_STRATEGY_CONTEXT\",\n );\n\nexport function injectFloatingPanelRenderStrategyContext(): FloatingPanelRenderStrategyContext {\n return inject(FLOATING_PANEL_RENDER_STRATEGY_CONTEXT);\n}\n","import type { Machine } from \"@wirekyt/dom\";\n\nimport {\n createId,\n injectEnvironment,\n injectLocale,\n useMachine,\n type UseMachineReturn,\n} from \"@wirekyt/angular\";\nimport * as floatingPanel from \"@wirekyt/dom/machines/floating-panel\";\n\ntype OptionalId<T extends { id: string }> = Omit<T, \"id\"> & { id?: string };\n\nexport interface UseFloatingPanelProps extends OptionalId<\n Omit<floatingPanel.Props, \"dir\" | \"getRootNode\">\n> {}\n\nexport type UseFloatingPanelReturn = UseMachineReturn<\n floatingPanel.Service[\"state\"],\n floatingPanel.Api,\n floatingPanel.Service\n>;\n\nexport interface UseFloatingPanelOptions {\n context: () => UseFloatingPanelProps;\n}\n\ntype FloatingPanelContext = Record<string, unknown>;\ntype FloatingPanelSchema = floatingPanel.Machine extends Machine<infer TSchema> ? TSchema : never;\n\nexport function useFloatingPanel(options: UseFloatingPanelOptions): UseFloatingPanelReturn {\n const locale = injectLocale();\n const environment = injectEnvironment();\n const fallbackId = createId();\n\n return useMachine<FloatingPanelSchema, floatingPanel.Api>({\n machine: floatingPanel.machine,\n context: () => {\n const props = options.context();\n return {\n ...props,\n dir: locale.dir,\n getRootNode: environment.getRootNode,\n id: props.id ?? fallbackId,\n } as FloatingPanelContext;\n },\n connect: (service, normalize) => floatingPanel.connect(service, normalize),\n });\n}\n","import type { ContextCarrier } from \"@wirekyt/angular\";\nimport type * as floatingPanel from \"@wirekyt/dom/machines/floating-panel\";\n\nimport {\n Directive,\n EnvironmentInjector,\n Injector,\n type ProviderToken,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n model,\n output,\n type InputSignal,\n type InputSignalWithTransform,\n type ModelSignal,\n type OutputEmitterRef,\n type Signal,\n} from \"@angular/core\";\nimport { buildRootCarrier } from \"@wirekyt/angular\";\nimport { PRESENCE_CONTEXT, PresenceBase } from \"@wirekyt/angular/presence\";\n\nimport type {\n FloatingPanelAnchorPositionDetails,\n FloatingPanelElementIds,\n FloatingPanelIntlTranslations,\n FloatingPanelOpenChangeDetails,\n FloatingPanelPoint,\n FloatingPanelPositionChangeDetails,\n FloatingPanelSize,\n FloatingPanelSizeChangeDetails,\n FloatingPanelStageChangeDetails,\n} from \"./types\";\n\nimport { useFloatingPanel, type UseFloatingPanelReturn } from \"./use\";\nimport {\n FLOATING_PANEL_CONTEXT,\n FLOATING_PANEL_CONTEXT_CARRIER,\n FLOATING_PANEL_RENDER_STRATEGY_CONTEXT,\n} from \"./use-context\";\n\nconst arePointsEqual = (left: FloatingPanelPoint | undefined, right: FloatingPanelPoint): boolean =>\n left !== undefined && Object.is(left.x, right.x) && Object.is(left.y, right.y);\n\nconst areSizesEqual = (left: FloatingPanelSize | undefined, right: FloatingPanelSize): boolean =>\n left !== undefined && Object.is(left.width, right.width) && Object.is(left.height, right.height);\n\nconst areDetailsEqual = (left: unknown, right: unknown): boolean =>\n JSON.stringify(left) === JSON.stringify(right);\n\n@Directive({\n selector: \"[floating-panel-root]\",\n standalone: true,\n exportAs: \"floatingPanelRoot\",\n providers: [\n {\n provide: PRESENCE_CONTEXT,\n useFactory: (root: FloatingPanelRoot) => root.presence,\n deps: [forwardRef(() => FloatingPanelRoot)],\n },\n {\n provide: FLOATING_PANEL_RENDER_STRATEGY_CONTEXT,\n useExisting: forwardRef(() => FloatingPanelRoot),\n },\n { provide: FLOATING_PANEL_CONTEXT, useExisting: forwardRef(() => FloatingPanelRoot) },\n {\n provide: FLOATING_PANEL_CONTEXT_CARRIER,\n useFactory: (root: FloatingPanelRoot) => root.getContextCarrier(),\n deps: [forwardRef(() => FloatingPanelRoot)],\n },\n ],\n})\nexport class FloatingPanelRoot extends PresenceBase implements UseFloatingPanelReturn {\n /** The unique identifier of the floating panel. */\n readonly id: InputSignal<string | undefined> = input<string | undefined>(undefined);\n /** The ids of the floating panel elements. Useful for composition. */\n readonly ids: InputSignal<Partial<FloatingPanelElementIds> | undefined> = input<\n Partial<FloatingPanelElementIds> | undefined\n >(undefined);\n /** The controlled open state of the floating panel. */\n readonly open: ModelSignal<boolean | undefined> = model<boolean | undefined>(undefined);\n /** The initial open state of the floating panel when uncontrolled. */\n readonly defaultOpen: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** The controlled position of the floating panel. */\n readonly position: ModelSignal<FloatingPanelPoint | undefined> = model<\n FloatingPanelPoint | undefined\n >(undefined);\n /** The initial position of the floating panel when uncontrolled. */\n readonly defaultPosition: InputSignal<FloatingPanelPoint | undefined> = input<\n FloatingPanelPoint | undefined\n >(undefined);\n /** The controlled size of the floating panel. */\n readonly size: ModelSignal<FloatingPanelSize | undefined> = model<FloatingPanelSize | undefined>(\n undefined,\n );\n /** The initial size of the floating panel when uncontrolled. */\n readonly defaultSize: InputSignal<FloatingPanelSize | undefined> = input<\n FloatingPanelSize | undefined\n >(undefined);\n /** The minimum size of the floating panel. */\n readonly minSize: InputSignal<FloatingPanelSize | undefined> = input<\n FloatingPanelSize | undefined\n >(undefined);\n /** The maximum size of the floating panel. */\n readonly maxSize: InputSignal<FloatingPanelSize | undefined> = input<\n FloatingPanelSize | undefined\n >(undefined);\n /** The positioning strategy to use. */\n readonly strategy: InputSignal<floatingPanel.Props[\"strategy\"]> =\n input<floatingPanel.Props[\"strategy\"]>(\"fixed\");\n /** Whether the panel may overflow the boundary while dragging. */\n readonly allowOverflow: InputSignalWithTransform<boolean, unknown> = input(true, {\n transform: booleanAttribute,\n });\n /** Whether the floating panel is draggable. */\n readonly draggable: InputSignalWithTransform<boolean, unknown> = input(true, {\n transform: booleanAttribute,\n });\n /** Whether the floating panel is resizable. */\n readonly resizable: InputSignalWithTransform<boolean, unknown> = input(true, {\n transform: booleanAttribute,\n });\n /** Whether resizing locks the panel to its aspect ratio. */\n readonly lockAspectRatio: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether the floating panel closes when the escape key is pressed. */\n readonly closeOnEscape: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether focus should be restored when the floating panel closes. */\n readonly restoreFocus: InputSignalWithTransform<boolean, unknown> = input(true, {\n transform: booleanAttribute,\n });\n /** Whether the floating panel is disabled. */\n readonly disabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** Whether size and position should be preserved when the floating panel closes. */\n readonly persistRect: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n /** The snap grid for dragging and keyboard movement. */\n readonly gridSize: InputSignal<number | undefined> = input<number | undefined>(1);\n /** Localized strings for control labels. */\n readonly translations: InputSignal<FloatingPanelIntlTranslations | undefined> = input<\n FloatingPanelIntlTranslations | undefined\n >(undefined);\n /** Function that returns the initial panel position when opened. */\n readonly getAnchorPosition: InputSignal<\n ((details: FloatingPanelAnchorPositionDetails) => FloatingPanelPoint) | undefined\n > = input<((details: FloatingPanelAnchorPositionDetails) => FloatingPanelPoint) | undefined>(\n undefined,\n );\n /** Function that returns the boundary element for dragging and resizing. */\n readonly getBoundaryEl: InputSignal<(() => HTMLElement | null) | undefined> = input<\n (() => HTMLElement | null) | undefined\n >(undefined);\n /** Element to receive focus when the floating panel opens. */\n readonly initialFocusEl: InputSignal<(() => HTMLElement | null) | undefined> = input<\n (() => HTMLElement | null) | undefined\n >(undefined);\n /** Element to receive focus when the floating panel closes. */\n readonly finalFocusEl: InputSignal<(() => HTMLElement | null) | undefined> = input<\n (() => HTMLElement | null) | undefined\n >(undefined);\n\n /** Emits details when the panel open state changes. */\n readonly openChangeDetails: OutputEmitterRef<FloatingPanelOpenChangeDetails> =\n output<FloatingPanelOpenChangeDetails>();\n /** Emits details when the panel position changes via dragging or API calls. */\n readonly positionDetailsChange: OutputEmitterRef<FloatingPanelPositionChangeDetails> =\n output<FloatingPanelPositionChangeDetails>();\n /** Emits details when a position-changing drag interaction ends. */\n readonly positionChangeEnd: OutputEmitterRef<FloatingPanelPositionChangeDetails> =\n output<FloatingPanelPositionChangeDetails>();\n /** Emits details when the panel size changes via resizing or API calls. */\n readonly sizeDetailsChange: OutputEmitterRef<FloatingPanelSizeChangeDetails> =\n output<FloatingPanelSizeChangeDetails>();\n /** Emits details when a size-changing resize interaction ends. */\n readonly sizeChangeEnd: OutputEmitterRef<FloatingPanelSizeChangeDetails> =\n output<FloatingPanelSizeChangeDetails>();\n /** Emits details when the panel stage changes. */\n readonly stageChange: OutputEmitterRef<FloatingPanelStageChangeDetails> =\n output<FloatingPanelStageChangeDetails>();\n\n private lastPositionDetails: FloatingPanelPositionChangeDetails | undefined;\n private lastPositionEndDetails: FloatingPanelPositionChangeDetails | undefined;\n private lastSizeDetails: FloatingPanelSizeChangeDetails | undefined;\n private lastSizeEndDetails: FloatingPanelSizeChangeDetails | undefined;\n private lastStageDetails: FloatingPanelStageChangeDetails | undefined;\n\n private readonly machine = useFloatingPanel({\n context: () => ({\n id: this.id(),\n ids: this.ids(),\n open: this.open(),\n defaultOpen: this.defaultOpen(),\n position: this.position(),\n defaultPosition: this.defaultPosition(),\n size: this.size(),\n defaultSize: this.defaultSize(),\n minSize: this.minSize(),\n maxSize: this.maxSize(),\n strategy: this.strategy(),\n allowOverflow: this.allowOverflow(),\n draggable: this.draggable(),\n resizable: this.resizable(),\n lockAspectRatio: this.lockAspectRatio(),\n closeOnEscape: this.closeOnEscape(),\n restoreFocus: this.restoreFocus(),\n disabled: this.disabled(),\n persistRect: this.persistRect(),\n gridSize: this.gridSize(),\n translations: this.translations(),\n getAnchorPosition: this.getAnchorPosition(),\n getBoundaryEl: this.getBoundaryEl(),\n initialFocusEl: this.initialFocusEl(),\n finalFocusEl: this.finalFocusEl(),\n onOpenChange: (details) => {\n if (this.open() !== details.open) {\n this.open.set(details.open);\n }\n this.openChangeDetails.emit(details);\n },\n onPositionChange: (details) => {\n if (areDetailsEqual(this.lastPositionDetails, details)) return;\n this.lastPositionDetails = details;\n if (!arePointsEqual(this.position(), details.position)) {\n this.position.set({ ...details.position });\n }\n this.positionDetailsChange.emit(details);\n },\n onPositionChangeEnd: (details) => {\n if (areDetailsEqual(this.lastPositionEndDetails, details)) return;\n this.lastPositionEndDetails = details;\n this.positionChangeEnd.emit(details);\n },\n onSizeChange: (details) => {\n if (areDetailsEqual(this.lastSizeDetails, details)) return;\n this.lastSizeDetails = details;\n if (!areSizesEqual(this.size(), details.size)) {\n this.size.set({ ...details.size });\n }\n this.sizeDetailsChange.emit(details);\n },\n onSizeChangeEnd: (details) => {\n if (areDetailsEqual(this.lastSizeEndDetails, details)) return;\n this.lastSizeEndDetails = details;\n this.sizeChangeEnd.emit(details);\n },\n onStageChange: (details) => {\n if (areDetailsEqual(this.lastStageDetails, details)) return;\n this.lastStageDetails = details;\n this.stageChange.emit(details);\n },\n }),\n });\n\n readonly state: Signal<floatingPanel.Service[\"state\"]> = this.machine.state;\n readonly api: Signal<floatingPanel.Api> = this.machine.api;\n readonly service: floatingPanel.Service = this.machine.service;\n readonly send: floatingPanel.Service[\"send\"] = this.machine.send;\n readonly presence = this.createPresence(() => this.api().open);\n\n protected readonly contextCarrier: ContextCarrier<FloatingPanelRoot> =\n buildRootCarrier<FloatingPanelRoot>({\n providers: [\n { provide: PRESENCE_CONTEXT, useValue: this.presence },\n { provide: FLOATING_PANEL_RENDER_STRATEGY_CONTEXT, useValue: this },\n ],\n root: this,\n rootToken: FLOATING_PANEL_CONTEXT as ProviderToken<FloatingPanelRoot>,\n originInjector: inject(Injector),\n environmentInjector: inject(EnvironmentInjector),\n });\n\n /** @internal Exposed for floating panel part directives to consume through portals. */\n getContextCarrier(): ContextCarrier<FloatingPanelRoot> {\n return this.contextCarrier;\n }\n}\n","import type { ContextCarrier } from \"@wirekyt/angular\";\nimport type * as floatingPanel from \"@wirekyt/dom/machines/floating-panel\";\n\nimport {\n Directive,\n EnvironmentInjector,\n Injector,\n type InputSignal,\n type ProviderToken,\n type Signal,\n computed,\n forwardRef,\n inject,\n input,\n} from \"@angular/core\";\nimport { buildRootCarrier } from \"@wirekyt/angular\";\nimport { PRESENCE_CONTEXT, PresenceBase } from \"@wirekyt/angular/presence\";\n\nimport type { UseFloatingPanelReturn } from \"./use\";\n\nimport {\n FLOATING_PANEL_CONTEXT,\n FLOATING_PANEL_CONTEXT_CARRIER,\n FLOATING_PANEL_RENDER_STRATEGY_CONTEXT,\n} from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-root-provider]\",\n standalone: true,\n exportAs: \"floatingPanelRootProvider\",\n providers: [\n {\n provide: PRESENCE_CONTEXT,\n useFactory: (provider: FloatingPanelRootProvider) => provider.presence,\n deps: [forwardRef(() => FloatingPanelRootProvider)],\n },\n {\n provide: FLOATING_PANEL_RENDER_STRATEGY_CONTEXT,\n useExisting: forwardRef(() => FloatingPanelRootProvider),\n },\n {\n provide: FLOATING_PANEL_CONTEXT,\n useExisting: forwardRef(() => FloatingPanelRootProvider),\n },\n {\n provide: FLOATING_PANEL_CONTEXT_CARRIER,\n useFactory: (provider: FloatingPanelRootProvider) => provider.getContextCarrier(),\n deps: [forwardRef(() => FloatingPanelRootProvider)],\n },\n ],\n})\nexport class FloatingPanelRootProvider extends PresenceBase implements UseFloatingPanelReturn {\n /** The floating panel machine returned by useFloatingPanel(). */\n readonly value: InputSignal<UseFloatingPanelReturn> = input.required<UseFloatingPanelReturn>();\n readonly state: Signal<floatingPanel.Service[\"state\"]> = computed(() => this.value().state());\n readonly api: Signal<floatingPanel.Api> = computed(() => this.value().api());\n readonly send: floatingPanel.Service[\"send\"] = (event) => this.value().send(event);\n\n get service(): floatingPanel.Service {\n return this.value().service;\n }\n\n readonly presence = this.createPresence(() => {\n try {\n return this.api().open;\n } catch {\n return false;\n }\n });\n\n protected readonly contextCarrier: ContextCarrier<FloatingPanelRootProvider> =\n buildRootCarrier<FloatingPanelRootProvider>({\n providers: [\n { provide: PRESENCE_CONTEXT, useValue: this.presence },\n { provide: FLOATING_PANEL_RENDER_STRATEGY_CONTEXT, useValue: this },\n ],\n root: this,\n rootToken: FLOATING_PANEL_CONTEXT as ProviderToken<FloatingPanelRootProvider>,\n originInjector: inject(Injector),\n environmentInjector: inject(EnvironmentInjector),\n });\n\n /** @internal Exposed for floating panel part directives to consume through portals. */\n getContextCarrier(): ContextCarrier<FloatingPanelRootProvider> {\n return this.contextCarrier;\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-trigger]\",\n standalone: true,\n exportAs: \"floatingPanelTrigger\",\n})\nexport class FloatingPanelTrigger {\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getTriggerProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n Renderer2,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\nimport { injectPresenceContext } from \"@wirekyt/angular/presence\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-positioner]\",\n standalone: true,\n exportAs: \"floatingPanelPositioner\",\n})\nexport class FloatingPanelPositioner {\n constructor() {\n const context = injectFloatingPanelContext();\n const presence = injectPresenceContext();\n const template = inject(TemplateRef<unknown>, { optional: true });\n const container = inject(ViewContainerRef);\n const host = inject(ElementRef);\n const elementRef = template ? { nativeElement: null as HTMLElement | null } : host;\n let view: EmbeddedViewRef<unknown> | undefined;\n\n effect(() => {\n const unmounted = presence.unmounted();\n if (template) {\n if (unmounted) {\n elementRef.nativeElement = null;\n container.clear();\n view = undefined;\n } else if (!view) {\n view = container.createEmbeddedView(template);\n elementRef.nativeElement =\n view.rootNodes.find((node: Node) => node.nodeType === 1) ?? null;\n }\n }\n });\n\n bindProps({\n elementRef,\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => {\n const unmounted = presence.unmounted();\n return { ...context.api().getPositionerProps(), hidden: unmounted };\n },\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n Renderer2,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n untracked,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\nimport { injectPresenceContext } from \"@wirekyt/angular/presence\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-content]\",\n standalone: true,\n exportAs: \"floatingPanelContent\",\n})\nexport class FloatingPanelContent {\n constructor() {\n const context = injectFloatingPanelContext();\n const presence = injectPresenceContext();\n const template = inject(TemplateRef<unknown>, { optional: true });\n const container = inject(ViewContainerRef);\n const host = inject(ElementRef);\n const elementRef = template ? { nativeElement: null as HTMLElement | null } : host;\n let view: EmbeddedViewRef<unknown> | undefined;\n\n effect(() => {\n const unmounted = presence.unmounted();\n if (template) {\n if (unmounted) {\n elementRef.nativeElement = null;\n container.clear();\n view = undefined;\n } else if (!view) {\n view = container.createEmbeddedView(template);\n elementRef.nativeElement =\n view.rootNodes.find((node: Node) => node.nodeType === 1) ?? null;\n }\n }\n untracked(() => presence.setNode(elementRef.nativeElement));\n });\n\n bindProps({\n elementRef,\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => {\n presence.unmounted();\n return { ...context.api().getContentProps(), ...presence.getPresenceProps() };\n },\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-control]\",\n standalone: true,\n exportAs: \"floatingPanelControl\",\n})\nexport class FloatingPanelControl {\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getControlProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-header]\",\n standalone: true,\n exportAs: \"floatingPanelHeader\",\n})\nexport class FloatingPanelHeader {\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getHeaderProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-body]\",\n standalone: true,\n exportAs: \"floatingPanelBody\",\n})\nexport class FloatingPanelBody {\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getBodyProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-title]\",\n standalone: true,\n exportAs: \"floatingPanelTitle\",\n})\nexport class FloatingPanelTitle {\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getTitleProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-close-trigger]\",\n standalone: true,\n exportAs: \"floatingPanelCloseTrigger\",\n})\nexport class FloatingPanelCloseTrigger {\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getCloseTriggerProps(),\n });\n }\n}\n","import { DestroyRef, Directive, ElementRef, Renderer2, inject } from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-drag-trigger]\",\n standalone: true,\n exportAs: \"floatingPanelDragTrigger\",\n})\nexport class FloatingPanelDragTrigger {\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getDragTriggerProps(),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n inject,\n input,\n type InputSignal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { FloatingPanelResizeTriggerAxis } from \"./types\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-resize-trigger]\",\n standalone: true,\n exportAs: \"floatingPanelResizeTrigger\",\n})\nexport class FloatingPanelResizeTrigger {\n /** The axis of the resize handle. */\n readonly axis: InputSignal<FloatingPanelResizeTriggerAxis> =\n input.required<FloatingPanelResizeTriggerAxis>();\n\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getResizeTriggerProps({ axis: this.axis() }),\n });\n }\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n Renderer2,\n inject,\n input,\n type InputSignal,\n} from \"@angular/core\";\nimport { bindProps } from \"@wirekyt/angular\";\n\nimport type { FloatingPanelStage } from \"./types\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\n@Directive({\n selector: \"[floating-panel-stage-trigger]\",\n standalone: true,\n exportAs: \"floatingPanelStageTrigger\",\n})\nexport class FloatingPanelStageTrigger {\n /** The stage to apply when the trigger is clicked. */\n readonly stage: InputSignal<FloatingPanelStage> = input.required<FloatingPanelStage>();\n\n constructor() {\n const context = injectFloatingPanelContext();\n bindProps({\n elementRef: inject(ElementRef),\n renderer: inject(Renderer2),\n destroyRef: inject(DestroyRef),\n props: () => context.api().getStageTriggerProps({ stage: this.stage() }),\n });\n }\n}\n","import { Directive, TemplateRef, ViewContainerRef, effect, inject } from \"@angular/core\";\n\nimport type { UseFloatingPanelReturn } from \"./use\";\n\nimport { injectFloatingPanelContext } from \"./use-context\";\n\nexport interface FloatingPanelContextTemplate {\n $implicit: UseFloatingPanelReturn[\"api\"];\n api: UseFloatingPanelReturn[\"api\"];\n}\n\n@Directive({\n selector: \"[floating-panel-context]\",\n standalone: true,\n exportAs: \"floatingPanelContext\",\n})\nexport class FloatingPanelContext {\n static ngTemplateContextGuard(\n _directive: FloatingPanelContext,\n context: unknown,\n ): context is FloatingPanelContextTemplate {\n void context;\n return true;\n }\n\n private readonly floatingPanel = injectFloatingPanelContext();\n private readonly templateRef = inject<TemplateRef<FloatingPanelContextTemplate>>(TemplateRef);\n private readonly viewContainer = inject(ViewContainerRef);\n\n constructor() {\n const view = this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: this.floatingPanel.api,\n api: this.floatingPanel.api,\n });\n\n effect(() => {\n this.floatingPanel.api();\n view.detectChanges();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAMa,sBAAsB,GAAG,IAAI,cAAc,CACtD,gCAAgC;SAGlB,0BAA0B,GAAA;AACxC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAC;AACvC;MAEa,8BAA8B,GAAG,IAAI,cAAc,CAE9D,wCAAwC;SAE1B,iCAAiC,GAAA;AAC/C,IAAA,OAAO,MAAM,CAAC,8BAA8B,CAAC;AAC/C;MAOa,sCAAsC,GACjD,IAAI,cAAc,CAChB,gDAAgD;SAGpC,wCAAwC,GAAA;AACtD,IAAA,OAAO,MAAM,CAAC,sCAAsC,CAAC;AACvD;;ACJM,SAAU,gBAAgB,CAAC,OAAgC,EAAA;AAC/D,IAAA,MAAM,MAAM,GAAG,YAAY,EAAE;AAC7B,IAAA,MAAM,WAAW,GAAG,iBAAiB,EAAE;AACvC,IAAA,MAAM,UAAU,GAAG,QAAQ,EAAE;AAE7B,IAAA,OAAO,UAAU,CAAyC;QACxD,OAAO,EAAE,aAAa,CAAC,OAAO;QAC9B,OAAO,EAAE,MAAK;AACZ,YAAA,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE;YAC/B,OAAO;AACL,gBAAA,GAAG,KAAK;gBACR,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,WAAW,EAAE,WAAW,CAAC,WAAW;AACpC,gBAAA,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,UAAU;aACH;QAC3B,CAAC;AACD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a,CAAC,GAAG;AACjC,YAAA,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG;AAC5B,SAAA,CAAC;QAEF,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE;YACxB,IAAI,CAAC,aAAa,EAAE;AACtB,QAAA,CAAC,CAAC;IACJ;uGAvBW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,CAAA,sBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AACjC,iBAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { input, booleanAttribute, output, inject, ElementRef, DestroyRef, PLATFORM_ID, effect, Directive } from '@angular/core';
|
|
4
|
+
import { trapFocus } from '@wirekyt/dom/focus-trap';
|
|
5
|
+
|
|
6
|
+
class FocusTrap {
|
|
7
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8
|
+
initialFocus = input(undefined, /* @ts-ignore */
|
|
9
|
+
...(ngDevMode ? [{ debugName: "initialFocus" }] : /* istanbul ignore next */ []));
|
|
10
|
+
fallbackFocus = input(undefined, /* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [{ debugName: "fallbackFocus" }] : /* istanbul ignore next */ []));
|
|
12
|
+
returnFocusOnDeactivate = input(true, { ...(ngDevMode ? { debugName: "returnFocusOnDeactivate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13
|
+
setReturnFocus = input(undefined, /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "setReturnFocus" }] : /* istanbul ignore next */ []));
|
|
15
|
+
activate = output();
|
|
16
|
+
deactivate = output();
|
|
17
|
+
elementRef = inject(ElementRef);
|
|
18
|
+
destroyRef = inject(DestroyRef);
|
|
19
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
20
|
+
cleanup;
|
|
21
|
+
constructor() {
|
|
22
|
+
effect(() => {
|
|
23
|
+
const disabled = this.disabled();
|
|
24
|
+
const initialFocus = this.initialFocus();
|
|
25
|
+
const fallbackFocus = this.fallbackFocus();
|
|
26
|
+
const returnFocusOnDeactivate = this.returnFocusOnDeactivate();
|
|
27
|
+
const setReturnFocus = this.setReturnFocus();
|
|
28
|
+
this.tearDown();
|
|
29
|
+
if (disabled || !this.isBrowser)
|
|
30
|
+
return;
|
|
31
|
+
const element = this.elementRef.nativeElement;
|
|
32
|
+
const autoFocusNode = element.querySelector("[autofocus], [data-autofocus]");
|
|
33
|
+
this.cleanup = trapFocus(element, {
|
|
34
|
+
initialFocus: initialFocus ?? autoFocusNode ?? undefined,
|
|
35
|
+
fallbackFocus,
|
|
36
|
+
returnFocusOnDeactivate,
|
|
37
|
+
setReturnFocus,
|
|
38
|
+
onActivate: () => this.activate.emit(),
|
|
39
|
+
onDeactivate: () => this.deactivate.emit(),
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
this.destroyRef.onDestroy(() => {
|
|
43
|
+
this.tearDown();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
tearDown() {
|
|
47
|
+
const cleanup = this.cleanup;
|
|
48
|
+
if (cleanup) {
|
|
49
|
+
this.cleanup = undefined;
|
|
50
|
+
cleanup();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FocusTrap, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
54
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: FocusTrap, isStandalone: true, selector: "[focus-trap]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, fallbackFocus: { classPropertyName: "fallbackFocus", publicName: "fallbackFocus", isSignal: true, isRequired: false, transformFunction: null }, returnFocusOnDeactivate: { classPropertyName: "returnFocusOnDeactivate", publicName: "returnFocusOnDeactivate", isSignal: true, isRequired: false, transformFunction: null }, setReturnFocus: { classPropertyName: "setReturnFocus", publicName: "setReturnFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activate: "activate", deactivate: "deactivate" }, exportAs: ["focusTrap"], ngImport: i0 });
|
|
55
|
+
}
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FocusTrap, decorators: [{
|
|
57
|
+
type: Directive,
|
|
58
|
+
args: [{
|
|
59
|
+
selector: "[focus-trap]",
|
|
60
|
+
standalone: true,
|
|
61
|
+
exportAs: "focusTrap",
|
|
62
|
+
}]
|
|
63
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], initialFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocus", required: false }] }], fallbackFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackFocus", required: false }] }], returnFocusOnDeactivate: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnFocusOnDeactivate", required: false }] }], setReturnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "setReturnFocus", required: false }] }], activate: [{ type: i0.Output, args: ["activate"] }], deactivate: [{ type: i0.Output, args: ["deactivate"] }] } });
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Generated bundle index. Do not edit.
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
export { FocusTrap };
|
|
70
|
+
//# sourceMappingURL=wirekyt-angular-focus-trap.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-focus-trap.mjs","sources":["../../src/components/focus-trap/focus-trap.ts","../../src/components/focus-trap/wirekyt-angular-focus-trap.ts"],"sourcesContent":["import type { FocusTrapOptions } from \"@wirekyt/dom/focus-trap\";\n\nimport { isPlatformBrowser } from \"@angular/common\";\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n PLATFORM_ID,\n booleanAttribute,\n effect,\n inject,\n input,\n output,\n} from \"@angular/core\";\nimport { trapFocus } from \"@wirekyt/dom/focus-trap\";\n\nexport interface TrapOptions extends Pick<\n FocusTrapOptions,\n \"initialFocus\" | \"fallbackFocus\" | \"returnFocusOnDeactivate\" | \"setReturnFocus\"\n> {\n disabled?: boolean;\n}\n\nexport interface FocusTrapProps extends TrapOptions {}\n\n@Directive({\n selector: \"[focus-trap]\",\n standalone: true,\n exportAs: \"focusTrap\",\n})\nexport class FocusTrap {\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly initialFocus = input<FocusTrapOptions[\"initialFocus\"]>(undefined);\n readonly fallbackFocus = input<FocusTrapOptions[\"fallbackFocus\"]>(undefined);\n readonly returnFocusOnDeactivate = input(true, { transform: booleanAttribute });\n readonly setReturnFocus = input<FocusTrapOptions[\"setReturnFocus\"]>(undefined);\n\n readonly activate = output<void>();\n readonly deactivate = output<void>();\n\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private cleanup: (() => void) | undefined;\n\n constructor() {\n effect(() => {\n const disabled = this.disabled();\n const initialFocus = this.initialFocus();\n const fallbackFocus = this.fallbackFocus();\n const returnFocusOnDeactivate = this.returnFocusOnDeactivate();\n const setReturnFocus = this.setReturnFocus();\n\n this.tearDown();\n if (disabled || !this.isBrowser) return;\n\n const element = this.elementRef.nativeElement;\n const autoFocusNode = element.querySelector<HTMLElement>(\"[autofocus], [data-autofocus]\");\n\n this.cleanup = trapFocus(element, {\n initialFocus: initialFocus ?? autoFocusNode ?? undefined,\n fallbackFocus,\n returnFocusOnDeactivate,\n setReturnFocus,\n onActivate: () => this.activate.emit(),\n onDeactivate: () => this.deactivate.emit(),\n });\n });\n\n this.destroyRef.onDestroy(() => {\n this.tearDown();\n });\n }\n\n private tearDown(): void {\n const cleanup = this.cleanup;\n if (cleanup) {\n this.cleanup = undefined;\n cleanup();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MA8Ba,SAAS,CAAA;IACX,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,YAAY,GAAG,KAAK,CAAmC,SAAS;qFAAC;IACjE,aAAa,GAAG,KAAK,CAAoC,SAAS;sFAAC;IACnE,uBAAuB,GAAG,KAAK,CAAC,IAAI,+FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACtE,cAAc,GAAG,KAAK,CAAqC,SAAS;uFAAC;IAErE,QAAQ,GAAG,MAAM,EAAQ;IACzB,UAAU,GAAG,MAAM,EAAQ;AAEnB,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAC/B,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC3D,IAAA,OAAO;AAEf,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;AAChC,YAA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
4
4
|
"description": "Angular adapter for Wirekyt",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -87,6 +87,14 @@
|
|
|
87
87
|
"types": "./types/wirekyt-angular-fieldset.d.ts",
|
|
88
88
|
"default": "./fesm2022/wirekyt-angular-fieldset.mjs"
|
|
89
89
|
},
|
|
90
|
+
"./floating-panel": {
|
|
91
|
+
"types": "./types/wirekyt-angular-floating-panel.d.ts",
|
|
92
|
+
"default": "./fesm2022/wirekyt-angular-floating-panel.mjs"
|
|
93
|
+
},
|
|
94
|
+
"./focus-trap": {
|
|
95
|
+
"types": "./types/wirekyt-angular-focus-trap.d.ts",
|
|
96
|
+
"default": "./fesm2022/wirekyt-angular-focus-trap.mjs"
|
|
97
|
+
},
|
|
90
98
|
"./presence": {
|
|
91
99
|
"types": "./types/wirekyt-angular-presence.d.ts",
|
|
92
100
|
"default": "./fesm2022/wirekyt-angular-presence.mjs"
|
|
@@ -7,7 +7,7 @@ import * as i0 from '@angular/core';
|
|
|
7
7
|
import { Signal, InputSignal, ModelSignal, InputSignalWithTransform, OutputEmitterRef, InjectionToken } from '@angular/core';
|
|
8
8
|
import { ControlValueAccessor } from '@angular/forms';
|
|
9
9
|
|
|
10
|
-
declare const checkboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "
|
|
10
|
+
declare const checkboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "control" | "indicator" | "label" | "group">;
|
|
11
11
|
|
|
12
12
|
type OptionalId<T extends {
|
|
13
13
|
id: string;
|
|
@@ -9,7 +9,7 @@ import { PresenceBase } from '@wirekyt/angular/presence';
|
|
|
9
9
|
import { ControlValueAccessor } from '@angular/forms';
|
|
10
10
|
import { ColorStringFormat } from '@wirekyt/dom/color-utils';
|
|
11
11
|
|
|
12
|
-
declare const colorPickerAnatomy: _wirekyt_dom_anatomy.Anatomy<"root" | "
|
|
12
|
+
declare const colorPickerAnatomy: _wirekyt_dom_anatomy.Anatomy<"root" | "control" | "trigger" | "label" | "area" | "positioner" | "content" | "valueText" | "formatSelect" | "areaThumb" | "channelInput" | "channelSliderTrack" | "channelSliderThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderValueText" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger">;
|
|
13
13
|
|
|
14
14
|
declare class ColorPickerArea {
|
|
15
15
|
readonly xChannel: InputSignal<colorPicker.ColorChannel | undefined>;
|
|
@@ -13,7 +13,7 @@ import { PresenceBase } from '@wirekyt/angular/presence';
|
|
|
13
13
|
import { ControlValueAccessor } from '@angular/forms';
|
|
14
14
|
import * as _wirekyt_angular_combobox from '@wirekyt/angular/combobox';
|
|
15
15
|
|
|
16
|
-
declare const comboboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "
|
|
16
|
+
declare const comboboxAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "control" | "trigger" | "input" | "label" | "itemGroup" | "item" | "clearTrigger" | "positioner" | "content" | "list" | "itemText" | "itemIndicator" | "itemGroupLabel" | "empty">;
|
|
17
17
|
|
|
18
18
|
type ComboboxSchema<T extends CollectionItem = CollectionItem> = Machine<T> extends Machine$1<infer S> ? S : never;
|
|
19
19
|
|
|
@@ -9,7 +9,7 @@ import * as _wirekyt_angular_presence from '@wirekyt/angular/presence';
|
|
|
9
9
|
import { PresenceBase } from '@wirekyt/angular/presence';
|
|
10
10
|
import { ControlValueAccessor } from '@angular/forms';
|
|
11
11
|
|
|
12
|
-
declare const datePickerAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "
|
|
12
|
+
declare const datePickerAnatomy: _wirekyt_dom_anatomy.AnatomyInstance<"root" | "control" | "trigger" | "input" | "label" | "nextTrigger" | "prevTrigger" | "table" | "view" | "clearTrigger" | "positioner" | "content" | "monthSelect" | "presetTrigger" | "rangeText" | "tableBody" | "tableCell" | "tableCellTrigger" | "tableHead" | "tableHeader" | "tableRow" | "viewControl" | "viewTrigger" | "yearSelect" | "valueText">;
|
|
13
13
|
|
|
14
14
|
type OptionalId<T extends {
|
|
15
15
|
id?: string | undefined;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import * as floatingPanel from '@wirekyt/dom/machines/floating-panel';
|
|
2
|
+
import { ElementIds, Point, Size, IntlTranslations, AnchorPositionDetails, OpenChangeDetails, PositionChangeDetails, SizeChangeDetails, StageChangeDetails, ResizeTriggerAxis, Stage } from '@wirekyt/dom/machines/floating-panel';
|
|
3
|
+
export { AnchorPositionDetails as FloatingPanelAnchorPositionDetails, Api as FloatingPanelApi, ElementIds as FloatingPanelElementIds, IntlTranslations as FloatingPanelIntlTranslations, Machine as FloatingPanelMachine, Props as FloatingPanelMachineProps, OpenChangeDetails as FloatingPanelOpenChangeDetails, Point as FloatingPanelPoint, PositionChangeDetails as FloatingPanelPositionChangeDetails, ResizeTriggerAxis as FloatingPanelResizeTriggerAxis, ResizeTriggerProps as FloatingPanelResizeTriggerProps, Service as FloatingPanelService, Size as FloatingPanelSize, SizeChangeDetails as FloatingPanelSizeChangeDetails, Stage as FloatingPanelStage, StageChangeDetails as FloatingPanelStageChangeDetails, StageTriggerProps as FloatingPanelStageTriggerProps, anatomy as floatingPanelAnatomy, resizeTriggerAxes } from '@wirekyt/dom/machines/floating-panel';
|
|
4
|
+
import { UseMachineReturn, ContextCarrier } from '@wirekyt/angular';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { InjectionToken, Signal, InputSignal, ModelSignal, InputSignalWithTransform, OutputEmitterRef } from '@angular/core';
|
|
7
|
+
import * as _wirekyt_angular_presence from '@wirekyt/angular/presence';
|
|
8
|
+
import { PresenceBase } from '@wirekyt/angular/presence';
|
|
9
|
+
|
|
10
|
+
type OptionalId<T extends {
|
|
11
|
+
id: string;
|
|
12
|
+
}> = Omit<T, "id"> & {
|
|
13
|
+
id?: string;
|
|
14
|
+
};
|
|
15
|
+
interface UseFloatingPanelProps extends OptionalId<Omit<floatingPanel.Props, "dir" | "getRootNode">> {
|
|
16
|
+
}
|
|
17
|
+
type UseFloatingPanelReturn = UseMachineReturn<floatingPanel.Service["state"], floatingPanel.Api, floatingPanel.Service>;
|
|
18
|
+
interface UseFloatingPanelOptions {
|
|
19
|
+
context: () => UseFloatingPanelProps;
|
|
20
|
+
}
|
|
21
|
+
declare function useFloatingPanel(options: UseFloatingPanelOptions): UseFloatingPanelReturn;
|
|
22
|
+
|
|
23
|
+
declare const FLOATING_PANEL_CONTEXT: InjectionToken<UseFloatingPanelReturn>;
|
|
24
|
+
declare function injectFloatingPanelContext(): UseFloatingPanelReturn;
|
|
25
|
+
declare const FLOATING_PANEL_CONTEXT_CARRIER: InjectionToken<ContextCarrier<UseFloatingPanelReturn>>;
|
|
26
|
+
declare function injectFloatingPanelContextCarrier(): ContextCarrier<UseFloatingPanelReturn>;
|
|
27
|
+
interface FloatingPanelRenderStrategyContext {
|
|
28
|
+
readonly lazyMount: Signal<boolean>;
|
|
29
|
+
readonly unmountOnExit: Signal<boolean>;
|
|
30
|
+
}
|
|
31
|
+
declare const FLOATING_PANEL_RENDER_STRATEGY_CONTEXT: InjectionToken<FloatingPanelRenderStrategyContext>;
|
|
32
|
+
declare function injectFloatingPanelRenderStrategyContext(): FloatingPanelRenderStrategyContext;
|
|
33
|
+
|
|
34
|
+
declare class FloatingPanelRoot extends PresenceBase implements UseFloatingPanelReturn {
|
|
35
|
+
/** The unique identifier of the floating panel. */
|
|
36
|
+
readonly id: InputSignal<string | undefined>;
|
|
37
|
+
/** The ids of the floating panel elements. Useful for composition. */
|
|
38
|
+
readonly ids: InputSignal<Partial<ElementIds> | undefined>;
|
|
39
|
+
/** The controlled open state of the floating panel. */
|
|
40
|
+
readonly open: ModelSignal<boolean | undefined>;
|
|
41
|
+
/** The initial open state of the floating panel when uncontrolled. */
|
|
42
|
+
readonly defaultOpen: InputSignalWithTransform<boolean, unknown>;
|
|
43
|
+
/** The controlled position of the floating panel. */
|
|
44
|
+
readonly position: ModelSignal<Point | undefined>;
|
|
45
|
+
/** The initial position of the floating panel when uncontrolled. */
|
|
46
|
+
readonly defaultPosition: InputSignal<Point | undefined>;
|
|
47
|
+
/** The controlled size of the floating panel. */
|
|
48
|
+
readonly size: ModelSignal<Size | undefined>;
|
|
49
|
+
/** The initial size of the floating panel when uncontrolled. */
|
|
50
|
+
readonly defaultSize: InputSignal<Size | undefined>;
|
|
51
|
+
/** The minimum size of the floating panel. */
|
|
52
|
+
readonly minSize: InputSignal<Size | undefined>;
|
|
53
|
+
/** The maximum size of the floating panel. */
|
|
54
|
+
readonly maxSize: InputSignal<Size | undefined>;
|
|
55
|
+
/** The positioning strategy to use. */
|
|
56
|
+
readonly strategy: InputSignal<floatingPanel.Props["strategy"]>;
|
|
57
|
+
/** Whether the panel may overflow the boundary while dragging. */
|
|
58
|
+
readonly allowOverflow: InputSignalWithTransform<boolean, unknown>;
|
|
59
|
+
/** Whether the floating panel is draggable. */
|
|
60
|
+
readonly draggable: InputSignalWithTransform<boolean, unknown>;
|
|
61
|
+
/** Whether the floating panel is resizable. */
|
|
62
|
+
readonly resizable: InputSignalWithTransform<boolean, unknown>;
|
|
63
|
+
/** Whether resizing locks the panel to its aspect ratio. */
|
|
64
|
+
readonly lockAspectRatio: InputSignalWithTransform<boolean, unknown>;
|
|
65
|
+
/** Whether the floating panel closes when the escape key is pressed. */
|
|
66
|
+
readonly closeOnEscape: InputSignalWithTransform<boolean, unknown>;
|
|
67
|
+
/** Whether focus should be restored when the floating panel closes. */
|
|
68
|
+
readonly restoreFocus: InputSignalWithTransform<boolean, unknown>;
|
|
69
|
+
/** Whether the floating panel is disabled. */
|
|
70
|
+
readonly disabled: InputSignalWithTransform<boolean, unknown>;
|
|
71
|
+
/** Whether size and position should be preserved when the floating panel closes. */
|
|
72
|
+
readonly persistRect: InputSignalWithTransform<boolean, unknown>;
|
|
73
|
+
/** The snap grid for dragging and keyboard movement. */
|
|
74
|
+
readonly gridSize: InputSignal<number | undefined>;
|
|
75
|
+
/** Localized strings for control labels. */
|
|
76
|
+
readonly translations: InputSignal<IntlTranslations | undefined>;
|
|
77
|
+
/** Function that returns the initial panel position when opened. */
|
|
78
|
+
readonly getAnchorPosition: InputSignal<((details: AnchorPositionDetails) => Point) | undefined>;
|
|
79
|
+
/** Function that returns the boundary element for dragging and resizing. */
|
|
80
|
+
readonly getBoundaryEl: InputSignal<(() => HTMLElement | null) | undefined>;
|
|
81
|
+
/** Element to receive focus when the floating panel opens. */
|
|
82
|
+
readonly initialFocusEl: InputSignal<(() => HTMLElement | null) | undefined>;
|
|
83
|
+
/** Element to receive focus when the floating panel closes. */
|
|
84
|
+
readonly finalFocusEl: InputSignal<(() => HTMLElement | null) | undefined>;
|
|
85
|
+
/** Emits details when the panel open state changes. */
|
|
86
|
+
readonly openChangeDetails: OutputEmitterRef<OpenChangeDetails>;
|
|
87
|
+
/** Emits details when the panel position changes via dragging or API calls. */
|
|
88
|
+
readonly positionDetailsChange: OutputEmitterRef<PositionChangeDetails>;
|
|
89
|
+
/** Emits details when a position-changing drag interaction ends. */
|
|
90
|
+
readonly positionChangeEnd: OutputEmitterRef<PositionChangeDetails>;
|
|
91
|
+
/** Emits details when the panel size changes via resizing or API calls. */
|
|
92
|
+
readonly sizeDetailsChange: OutputEmitterRef<SizeChangeDetails>;
|
|
93
|
+
/** Emits details when a size-changing resize interaction ends. */
|
|
94
|
+
readonly sizeChangeEnd: OutputEmitterRef<SizeChangeDetails>;
|
|
95
|
+
/** Emits details when the panel stage changes. */
|
|
96
|
+
readonly stageChange: OutputEmitterRef<StageChangeDetails>;
|
|
97
|
+
private lastPositionDetails;
|
|
98
|
+
private lastPositionEndDetails;
|
|
99
|
+
private lastSizeDetails;
|
|
100
|
+
private lastSizeEndDetails;
|
|
101
|
+
private lastStageDetails;
|
|
102
|
+
private readonly machine;
|
|
103
|
+
readonly state: Signal<floatingPanel.Service["state"]>;
|
|
104
|
+
readonly api: Signal<floatingPanel.Api>;
|
|
105
|
+
readonly service: floatingPanel.Service;
|
|
106
|
+
readonly send: floatingPanel.Service["send"];
|
|
107
|
+
readonly presence: _wirekyt_angular_presence.UsePresenceReturn;
|
|
108
|
+
protected readonly contextCarrier: ContextCarrier<FloatingPanelRoot>;
|
|
109
|
+
/** @internal Exposed for floating panel part directives to consume through portals. */
|
|
110
|
+
getContextCarrier(): ContextCarrier<FloatingPanelRoot>;
|
|
111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelRoot, never>;
|
|
112
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelRoot, "[floating-panel-root]", ["floatingPanelRoot"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "ids": { "alias": "ids"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "defaultPosition": { "alias": "defaultPosition"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "defaultSize": { "alias": "defaultSize"; "required": false; "isSignal": true; }; "minSize": { "alias": "minSize"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "strategy": { "alias": "strategy"; "required": false; "isSignal": true; }; "allowOverflow": { "alias": "allowOverflow"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "lockAspectRatio": { "alias": "lockAspectRatio"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "persistRect": { "alias": "persistRect"; "required": false; "isSignal": true; }; "gridSize": { "alias": "gridSize"; "required": false; "isSignal": true; }; "translations": { "alias": "translations"; "required": false; "isSignal": true; }; "getAnchorPosition": { "alias": "getAnchorPosition"; "required": false; "isSignal": true; }; "getBoundaryEl": { "alias": "getBoundaryEl"; "required": false; "isSignal": true; }; "initialFocusEl": { "alias": "initialFocusEl"; "required": false; "isSignal": true; }; "finalFocusEl": { "alias": "finalFocusEl"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "position": "positionChange"; "size": "sizeChange"; "openChangeDetails": "openChangeDetails"; "positionDetailsChange": "positionDetailsChange"; "positionChangeEnd": "positionChangeEnd"; "sizeDetailsChange": "sizeDetailsChange"; "sizeChangeEnd": "sizeChangeEnd"; "stageChange": "stageChange"; }, never, never, true, never>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
declare class FloatingPanelRootProvider extends PresenceBase implements UseFloatingPanelReturn {
|
|
116
|
+
/** The floating panel machine returned by useFloatingPanel(). */
|
|
117
|
+
readonly value: InputSignal<UseFloatingPanelReturn>;
|
|
118
|
+
readonly state: Signal<floatingPanel.Service["state"]>;
|
|
119
|
+
readonly api: Signal<floatingPanel.Api>;
|
|
120
|
+
readonly send: floatingPanel.Service["send"];
|
|
121
|
+
get service(): floatingPanel.Service;
|
|
122
|
+
readonly presence: _wirekyt_angular_presence.UsePresenceReturn;
|
|
123
|
+
protected readonly contextCarrier: ContextCarrier<FloatingPanelRootProvider>;
|
|
124
|
+
/** @internal Exposed for floating panel part directives to consume through portals. */
|
|
125
|
+
getContextCarrier(): ContextCarrier<FloatingPanelRootProvider>;
|
|
126
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelRootProvider, never>;
|
|
127
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelRootProvider, "[floating-panel-root-provider]", ["floatingPanelRootProvider"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare class FloatingPanelTrigger {
|
|
131
|
+
constructor();
|
|
132
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelTrigger, never>;
|
|
133
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelTrigger, "[floating-panel-trigger]", ["floatingPanelTrigger"], {}, {}, never, never, true, never>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare class FloatingPanelPositioner {
|
|
137
|
+
constructor();
|
|
138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelPositioner, never>;
|
|
139
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelPositioner, "[floating-panel-positioner]", ["floatingPanelPositioner"], {}, {}, never, never, true, never>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare class FloatingPanelContent {
|
|
143
|
+
constructor();
|
|
144
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelContent, never>;
|
|
145
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelContent, "[floating-panel-content]", ["floatingPanelContent"], {}, {}, never, never, true, never>;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare class FloatingPanelControl {
|
|
149
|
+
constructor();
|
|
150
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelControl, never>;
|
|
151
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelControl, "[floating-panel-control]", ["floatingPanelControl"], {}, {}, never, never, true, never>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
declare class FloatingPanelHeader {
|
|
155
|
+
constructor();
|
|
156
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelHeader, never>;
|
|
157
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelHeader, "[floating-panel-header]", ["floatingPanelHeader"], {}, {}, never, never, true, never>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare class FloatingPanelBody {
|
|
161
|
+
constructor();
|
|
162
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelBody, never>;
|
|
163
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelBody, "[floating-panel-body]", ["floatingPanelBody"], {}, {}, never, never, true, never>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
declare class FloatingPanelTitle {
|
|
167
|
+
constructor();
|
|
168
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelTitle, never>;
|
|
169
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelTitle, "[floating-panel-title]", ["floatingPanelTitle"], {}, {}, never, never, true, never>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
declare class FloatingPanelCloseTrigger {
|
|
173
|
+
constructor();
|
|
174
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelCloseTrigger, never>;
|
|
175
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelCloseTrigger, "[floating-panel-close-trigger]", ["floatingPanelCloseTrigger"], {}, {}, never, never, true, never>;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
declare class FloatingPanelDragTrigger {
|
|
179
|
+
constructor();
|
|
180
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelDragTrigger, never>;
|
|
181
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelDragTrigger, "[floating-panel-drag-trigger]", ["floatingPanelDragTrigger"], {}, {}, never, never, true, never>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare class FloatingPanelResizeTrigger {
|
|
185
|
+
/** The axis of the resize handle. */
|
|
186
|
+
readonly axis: InputSignal<ResizeTriggerAxis>;
|
|
187
|
+
constructor();
|
|
188
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelResizeTrigger, never>;
|
|
189
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelResizeTrigger, "[floating-panel-resize-trigger]", ["floatingPanelResizeTrigger"], { "axis": { "alias": "axis"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare class FloatingPanelStageTrigger {
|
|
193
|
+
/** The stage to apply when the trigger is clicked. */
|
|
194
|
+
readonly stage: InputSignal<Stage>;
|
|
195
|
+
constructor();
|
|
196
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelStageTrigger, never>;
|
|
197
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelStageTrigger, "[floating-panel-stage-trigger]", ["floatingPanelStageTrigger"], { "stage": { "alias": "stage"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
interface FloatingPanelContextTemplate {
|
|
201
|
+
$implicit: UseFloatingPanelReturn["api"];
|
|
202
|
+
api: UseFloatingPanelReturn["api"];
|
|
203
|
+
}
|
|
204
|
+
declare class FloatingPanelContext {
|
|
205
|
+
static ngTemplateContextGuard(_directive: FloatingPanelContext, context: unknown): context is FloatingPanelContextTemplate;
|
|
206
|
+
private readonly floatingPanel;
|
|
207
|
+
private readonly templateRef;
|
|
208
|
+
private readonly viewContainer;
|
|
209
|
+
constructor();
|
|
210
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingPanelContext, never>;
|
|
211
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FloatingPanelContext, "[floating-panel-context]", ["floatingPanelContext"], {}, {}, never, never, true, never>;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export { FLOATING_PANEL_CONTEXT, FLOATING_PANEL_CONTEXT_CARRIER, FLOATING_PANEL_RENDER_STRATEGY_CONTEXT, FloatingPanelBody, FloatingPanelCloseTrigger, FloatingPanelContent, FloatingPanelContext, FloatingPanelControl, FloatingPanelDragTrigger, FloatingPanelHeader, FloatingPanelPositioner, FloatingPanelResizeTrigger, FloatingPanelRoot, FloatingPanelRootProvider, FloatingPanelStageTrigger, FloatingPanelTitle, FloatingPanelTrigger, injectFloatingPanelContext, injectFloatingPanelContextCarrier, injectFloatingPanelRenderStrategyContext, useFloatingPanel };
|
|
215
|
+
export type { FloatingPanelContextTemplate, FloatingPanelRenderStrategyContext, UseFloatingPanelOptions, UseFloatingPanelProps, UseFloatingPanelReturn };
|
|
216
|
+
//# sourceMappingURL=wirekyt-angular-floating-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-floating-panel.d.ts","sources":["../../src/components/floating-panel/use.ts","../../src/components/floating-panel/use-context.ts","../../src/components/floating-panel/root.ts","../../src/components/floating-panel/root-provider.ts","../../src/components/floating-panel/trigger.ts","../../src/components/floating-panel/positioner.ts","../../src/components/floating-panel/content.ts","../../src/components/floating-panel/control.ts","../../src/components/floating-panel/header.ts","../../src/components/floating-panel/body.ts","../../src/components/floating-panel/title.ts","../../src/components/floating-panel/close-trigger.ts","../../src/components/floating-panel/drag-trigger.ts","../../src/components/floating-panel/resize-trigger.ts","../../src/components/floating-panel/stage-trigger.ts","../../src/components/floating-panel/context.ts"],"mappings":";;;;;;;;;AAWA,KAAK,UAAU;;AAAyB,KAAI,IAAI;;;AAE1C,UAAW,qBAAsB,SAAQ,UAAU,CACvD,IAAI,CAAC,aAAa,CAAC,KAAK;AACtB;AAEE,KAAM,sBAAsB,GAAG,gBAAgB,CACnD,aAAa,CAAC,OAAO,WACrB,aAAa,CAAC,GAAG,EACjB,aAAa,CAAC,OAAO;UAGN,uBAAuB;mBACvB,qBAAqB;AACrC;AAKD,iBAAgB,gBAAgB,UAAU,uBAAuB,GAAG,sBAAsB;;ACxB1F,cAAa,sBAAsB,EAAA,cAAA,CAAA,sBAAA;AAInC,iBAAgB,0BAA0B,IAAI,sBAAsB;AAIpE,cAAa,8BAA8B,EAAA,cAAA,CAAA,cAAA,CAAA,sBAAA;AAI3C,iBAAgB,iCAAiC,IAAI,cAAc,CAAC,sBAAsB;UAIzE,kCAAkC;AACjD,wBAAoB,MAAM;AAC1B,4BAAwB,MAAM;AAC/B;AAED,cAAa,sCAAsC,EAAA,cAAA,CAAA,kCAA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SAAK,sBAAsB;AAC5B;AAED,cAKa,oBAAoB;AAC/B,8CACc,oBAAoB,gCAEpB,4BAA4B;AAK1C;AACA;AACA;;yCAXW,oBAAoB;2CAApB,oBAAoB;AAwBhC;;;;","names":["FloatingPanelElementIds","FloatingPanelPoint","FloatingPanelSize","FloatingPanelIntlTranslations","FloatingPanelAnchorPositionDetails","FloatingPanelOpenChangeDetails","FloatingPanelPositionChangeDetails","FloatingPanelSizeChangeDetails","FloatingPanelStageChangeDetails","FloatingPanelResizeTriggerAxis","FloatingPanelStage"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { FocusTrapOptions } from '@wirekyt/dom/focus-trap';
|
|
3
|
+
export { FocusTrapOptions, TrapFocusOptions } from '@wirekyt/dom/focus-trap';
|
|
4
|
+
|
|
5
|
+
interface TrapOptions extends Pick<FocusTrapOptions, "initialFocus" | "fallbackFocus" | "returnFocusOnDeactivate" | "setReturnFocus"> {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface FocusTrapProps extends TrapOptions {
|
|
9
|
+
}
|
|
10
|
+
declare class FocusTrap {
|
|
11
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
12
|
+
readonly initialFocus: _angular_core.InputSignal<((false | (string | (HTMLElement | SVGElement))) | (() => false | (string | (HTMLElement | SVGElement)))) | VoidFunction | undefined>;
|
|
13
|
+
readonly fallbackFocus: _angular_core.InputSignal<((string | (HTMLElement | SVGElement)) | (() => string | (HTMLElement | SVGElement))) | undefined>;
|
|
14
|
+
readonly returnFocusOnDeactivate: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
15
|
+
readonly setReturnFocus: _angular_core.InputSignal<(false | (string | (HTMLElement | SVGElement))) | ((nodeFocusedBeforeActivation: HTMLElement | SVGElement) => false | (string | (HTMLElement | SVGElement))) | undefined>;
|
|
16
|
+
readonly activate: _angular_core.OutputEmitterRef<void>;
|
|
17
|
+
readonly deactivate: _angular_core.OutputEmitterRef<void>;
|
|
18
|
+
private readonly elementRef;
|
|
19
|
+
private readonly destroyRef;
|
|
20
|
+
private readonly isBrowser;
|
|
21
|
+
private cleanup;
|
|
22
|
+
constructor();
|
|
23
|
+
private tearDown;
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FocusTrap, never>;
|
|
25
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FocusTrap, "[focus-trap]", ["focusTrap"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "initialFocus": { "alias": "initialFocus"; "required": false; "isSignal": true; }; "fallbackFocus": { "alias": "fallbackFocus"; "required": false; "isSignal": true; }; "returnFocusOnDeactivate": { "alias": "returnFocusOnDeactivate"; "required": false; "isSignal": true; }; "setReturnFocus": { "alias": "setReturnFocus"; "required": false; "isSignal": true; }; }, { "activate": "activate"; "deactivate": "deactivate"; }, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { FocusTrap };
|
|
29
|
+
export type { FocusTrapProps, TrapOptions };
|
|
30
|
+
//# sourceMappingURL=wirekyt-angular-focus-trap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wirekyt-angular-focus-trap.d.ts","sources":["../../src/components/focus-trap/focus-trap.ts"],"mappings":";;;;AAgBM,UAAW,WAAY,SAAQ,IAAI,CACvC,gBAAgB;;AAIjB;AAEK,UAAW,cAAe,SAAQ,WAAW;AAAG;AAEtD,cAKa,SAAS;uBACH,aAAA,CAAA,wBAAA;2BACI,aAAA,CAAA,WAAA,sBAAA,WAAA,GAAA,UAAA,gCAAA,WAAA,GAAA,UAAA,OAAA,YAAA;4BACC,aAAA,CAAA,WAAA,aAAA,WAAA,GAAA,UAAA,sBAAA,WAAA,GAAA,UAAA;sCACU,aAAA,CAAA,wBAAA;6BACT,aAAA,CAAA,WAAA,qBAAA,WAAA,GAAA,UAAA,qCAAA,WAAA,GAAA,UAAA,wBAAA,WAAA,GAAA,UAAA;uBAEN,aAAA,CAAA,gBAAA;yBACE,aAAA,CAAA,gBAAA;AAEnB;AACA;AACA;;;AAgCA;oDA5CW,SAAS;sDAAT,SAAS;AAmDrB;;;;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirekyt/angular",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "Angular adapter for Wirekyt",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -87,6 +87,14 @@
|
|
|
87
87
|
"types": "./dist/types/wirekyt-angular-fieldset.d.ts",
|
|
88
88
|
"default": "./dist/fesm2022/wirekyt-angular-fieldset.mjs"
|
|
89
89
|
},
|
|
90
|
+
"./floating-panel": {
|
|
91
|
+
"types": "./dist/types/wirekyt-angular-floating-panel.d.ts",
|
|
92
|
+
"default": "./dist/fesm2022/wirekyt-angular-floating-panel.mjs"
|
|
93
|
+
},
|
|
94
|
+
"./focus-trap": {
|
|
95
|
+
"types": "./dist/types/wirekyt-angular-focus-trap.d.ts",
|
|
96
|
+
"default": "./dist/fesm2022/wirekyt-angular-focus-trap.mjs"
|
|
97
|
+
},
|
|
90
98
|
"./presence": {
|
|
91
99
|
"types": "./dist/types/wirekyt-angular-presence.d.ts",
|
|
92
100
|
"default": "./dist/fesm2022/wirekyt-angular-presence.mjs"
|
|
@@ -100,7 +108,7 @@
|
|
|
100
108
|
"dependencies": {
|
|
101
109
|
"@internationalized/date": "^3.12.3",
|
|
102
110
|
"@internationalized/number": "^3.6.7",
|
|
103
|
-
"@wirekyt/dom": "0.0.
|
|
111
|
+
"@wirekyt/dom": "0.0.20",
|
|
104
112
|
"tslib": "^2.8.1"
|
|
105
113
|
},
|
|
106
114
|
"peerDependencies": {
|