@slotted/angular 0.1.0-beta.36 → 0.1.0-beta.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/docs/button.json +1 -1
  2. package/docs/button.md +1 -90
  3. package/docs/button.props.md +97 -0
  4. package/docs/calendar.json +22 -0
  5. package/docs/calendar.md +4 -1
  6. package/docs/chart.json +1 -1
  7. package/docs/chart.md +1 -1
  8. package/docs/collapsible.json +2 -1
  9. package/docs/collapsible.md +1 -1
  10. package/docs/floating-panel.json +22 -4
  11. package/docs/floating-panel.md +6 -4
  12. package/docs/message.json +7 -0
  13. package/docs/message.md +1 -0
  14. package/docs/page.json +7 -0
  15. package/docs/page.md +1 -0
  16. package/docs/section.json +10 -2
  17. package/docs/section.md +2 -1
  18. package/docs/skills/theme-app/SKILL.md +1 -1
  19. package/docs/table.json +15 -3
  20. package/docs/table.md +4 -3
  21. package/fesm2022/slotted-angular-app-shell.mjs +2 -2
  22. package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
  23. package/fesm2022/slotted-angular-button.mjs +16 -15
  24. package/fesm2022/slotted-angular-button.mjs.map +1 -1
  25. package/fesm2022/slotted-angular-calendar.mjs +249 -137
  26. package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
  27. package/fesm2022/slotted-angular-chart.mjs +11 -5
  28. package/fesm2022/slotted-angular-chart.mjs.map +1 -1
  29. package/fesm2022/slotted-angular-collapsible.mjs +10 -6
  30. package/fesm2022/slotted-angular-collapsible.mjs.map +1 -1
  31. package/fesm2022/slotted-angular-dashboard-grid.mjs +2 -2
  32. package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
  33. package/fesm2022/slotted-angular-date-picker.mjs +1 -1
  34. package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
  35. package/fesm2022/slotted-angular-date-range-picker.mjs +1 -1
  36. package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
  37. package/fesm2022/slotted-angular-datetime-picker.mjs +1 -1
  38. package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
  39. package/fesm2022/slotted-angular-datetime-range-picker.mjs +1 -1
  40. package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
  41. package/fesm2022/slotted-angular-floating-panel.mjs +33 -30
  42. package/fesm2022/slotted-angular-floating-panel.mjs.map +1 -1
  43. package/fesm2022/slotted-angular-message.mjs +18 -8
  44. package/fesm2022/slotted-angular-message.mjs.map +1 -1
  45. package/fesm2022/slotted-angular-page.mjs +2 -2
  46. package/fesm2022/slotted-angular-page.mjs.map +1 -1
  47. package/fesm2022/slotted-angular-section.mjs +20 -3
  48. package/fesm2022/slotted-angular-section.mjs.map +1 -1
  49. package/fesm2022/slotted-angular-split-button.mjs +4 -4
  50. package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
  51. package/fesm2022/slotted-angular-table.mjs +37 -8
  52. package/fesm2022/slotted-angular-table.mjs.map +1 -1
  53. package/package.json +3 -3
  54. package/types/slotted-angular-button.d.ts +2 -1
  55. package/types/slotted-angular-button.d.ts.map +1 -1
  56. package/types/slotted-angular-calendar.d.ts +26 -2
  57. package/types/slotted-angular-calendar.d.ts.map +1 -1
  58. package/types/slotted-angular-chart.d.ts.map +1 -1
  59. package/types/slotted-angular-collapsible.d.ts +4 -1
  60. package/types/slotted-angular-collapsible.d.ts.map +1 -1
  61. package/types/slotted-angular-floating-panel.d.ts +27 -22
  62. package/types/slotted-angular-floating-panel.d.ts.map +1 -1
  63. package/types/slotted-angular-message.d.ts +9 -3
  64. package/types/slotted-angular-message.d.ts.map +1 -1
  65. package/types/slotted-angular-section.d.ts +10 -1
  66. package/types/slotted-angular-section.d.ts.map +1 -1
  67. package/types/slotted-angular-table.d.ts +21 -7
  68. package/types/slotted-angular-table.d.ts.map +1 -1
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, inject, ElementRef, signal, computed, effect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
2
+ import { input, numberAttribute, output, inject, ElementRef, signal, computed, effect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
3
3
  import { injectMessages } from '@slotted/angular/i18n';
4
4
  import { SlGlyph, SlIcon } from '@slotted/angular/icon';
5
- import { stepPlace, cornerPlace, clampPlace } from '@slotted/core/floating-panel';
5
+ import { FLOATING_STEP, FLOATING_LARGE_STEP, stepPlace, clampPlace } from '@slotted/core/floating-panel';
6
6
  import { floatingPanelMessages } from '@slotted/core/i18n';
7
7
 
8
8
  let titles = 0;
@@ -28,11 +28,15 @@ class SlFloatingPanel {
28
28
  /** A controlled place, its top-left corner in viewport pixels; drawn inside the viewport. */
29
29
  place = input(undefined, /* @ts-ignore */
30
30
  ...(ngDevMode ? [{ debugName: "place" }] : /* istanbul ignore next */ []));
31
+ /** Pixels an arrow key on the grip moves the panel. */
32
+ step = input(FLOATING_STEP, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
33
+ /** Pixels an arrow key with Shift moves it. */
34
+ largeStep = input(FLOATING_LARGE_STEP, { ...(ngDevMode ? { debugName: "largeStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
31
35
  messages = input(undefined, /* @ts-ignore */
32
36
  ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
33
37
  /** Asked with `false` on Escape inside the panel and on its close control. */
34
38
  openChange = output();
35
- /** Fired at the end of a move, by pointer or by key, for the application to store. */
39
+ /** Fired once at the end of a move, by pointer or by key, for the application to store. */
36
40
  placeChange = output();
37
41
  t = injectMessages(floatingPanelMessages, this.messages);
38
42
  titleId = `slotted-floating-panel-${String((titles += 1))}`;
@@ -52,9 +56,6 @@ class SlFloatingPanel {
52
56
  const active = this.native.ownerDocument.activeElement;
53
57
  this.opener =
54
58
  active instanceof HTMLElement && active !== active.ownerDocument.body ? active : null;
55
- if (this.place() !== undefined || this.own() !== null)
56
- return;
57
- queueMicrotask(() => this.placeInCorner());
58
59
  });
59
60
  });
60
61
  }
@@ -65,10 +66,8 @@ class SlFloatingPanel {
65
66
  }
66
67
  /** Moves the panel one step for an arrow key, a larger one with Shift. */
67
68
  move(event) {
68
- const shown = this.shown();
69
- if (shown === null)
70
- return;
71
- const next = stepPlace(shown, event.key, event.shiftKey);
69
+ const step = event.shiftKey ? this.largeStep() : this.step();
70
+ const next = stepPlace(this.drawn(), event.key, step);
72
71
  if (next === null)
73
72
  return;
74
73
  event.preventDefault();
@@ -76,27 +75,30 @@ class SlFloatingPanel {
76
75
  }
77
76
  /** Drags the panel from a press on its handle, the pointer captured. */
78
77
  startDrag(event) {
79
- const from = this.shown();
80
- if (event.button !== 0 || from === null)
78
+ if (event.button !== 0)
81
79
  return;
82
80
  if (event.target.closest('[data-part="close"]') !== null)
83
81
  return;
84
82
  const handle = event.currentTarget;
85
- const pointer = { x: event.clientX, y: event.clientY };
83
+ const from = this.drawn();
84
+ const pressed = { x: event.clientX, y: event.clientY };
85
+ let last = null;
86
86
  handle.setPointerCapture(event.pointerId);
87
- const onMove = (move) => this.live.set(this.clamped({
88
- x: from.x + move.clientX - pointer.x,
89
- y: from.y + move.clientY - pointer.y,
90
- }));
91
- const onEnd = (end) => {
92
- onMove(end);
87
+ const onMove = (move) => {
88
+ const by = { x: move.clientX - pressed.x, y: move.clientY - pressed.y };
89
+ if (last === null && by.x === 0 && by.y === 0)
90
+ return;
91
+ last = this.clamped({ x: from.x + by.x, y: from.y + by.y });
92
+ this.live.set(last);
93
+ };
94
+ const onEnd = () => {
93
95
  handle.removeEventListener('pointermove', onMove);
94
96
  handle.removeEventListener('pointerup', onEnd);
95
97
  handle.removeEventListener('pointercancel', onEnd);
96
- const last = this.live();
98
+ if (last === null)
99
+ return;
97
100
  this.live.set(null);
98
- if (last !== null)
99
- this.commit(last);
101
+ this.commit(last);
100
102
  };
101
103
  handle.addEventListener('pointermove', onMove);
102
104
  handle.addEventListener('pointerup', onEnd);
@@ -108,10 +110,6 @@ class SlFloatingPanel {
108
110
  event.stopPropagation();
109
111
  this.close();
110
112
  }
111
- placeInCorner() {
112
- const direction = getComputedStyle(this.native).direction === 'rtl' ? 'rtl' : 'ltr';
113
- this.own.set(cornerPlace(this.defaultPlace(), this.size(), this.viewport(), 16, direction));
114
- }
115
113
  commit(next) {
116
114
  if (this.place() === undefined)
117
115
  this.own.set(next);
@@ -120,6 +118,11 @@ class SlFloatingPanel {
120
118
  clamped(next) {
121
119
  return clampPlace(next, this.size(), this.viewport());
122
120
  }
121
+ /** Where the panel is drawn, which is not its stored place when that lies outside the viewport. */
122
+ drawn() {
123
+ const box = this.native.getBoundingClientRect();
124
+ return { x: box.left, y: box.top };
125
+ }
123
126
  size() {
124
127
  const box = this.native.getBoundingClientRect();
125
128
  return { width: box.width, height: box.height };
@@ -129,7 +132,7 @@ class SlFloatingPanel {
129
132
  return { width: root.clientWidth, height: root.clientHeight };
130
133
  }
131
134
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
132
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlFloatingPanel, isStandalone: true, selector: "[slFloatingPanel]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, defaultPlace: { classPropertyName: "defaultPlace", publicName: "defaultPlace", isSignal: true, isRequired: false, transformFunction: null }, place: { classPropertyName: "place", publicName: "place", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange", placeChange: "placeChange" }, host: { attributes: { "data-ui": "floating-panel", "data-ui-floating-panel": "", "data-part": "root", "data-part-root": "", "role": "region" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.hidden": "open() ? null : ''", "attr.aria-labelledby": "label() === undefined ? titleId : null", "attr.aria-label": "label() ?? null", "attr.data-dragging": "live() === null ? null : ''", "style.--_x": "shown() === null ? null : shown()!.x + 'px'", "style.--_y": "shown() === null ? null : shown()!.y + 'px'", "style.visibility": "shown() === null ? 'hidden' : null" } }, exportAs: ["slFloatingPanel"], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@layer slotted.components{[data-ui-floating-panel][data-part-root]{background-color:var(--slotted-floating-panel-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-border-color, var(--slotted-border-strong, CanvasText));border-radius:var(--slotted-floating-panel-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-floating-panel-shadow, var(--slotted-shadow-lg, none));-webkit-backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);box-sizing:border-box;color:var(--slotted-text, CanvasText);display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, system-ui, sans-serif);font-size:var(--slotted-font-size-sm, .8125rem);inset-block-start:0;inset-inline-start:0;max-block-size:100dvh;max-inline-size:100vw;position:fixed;translate:clamp(0px,var(--_x, 0px),calc(100vw - 100%)) clamp(0px,var(--_y, 0px),calc(100dvh - 100%));z-index:var(--slotted-z-index-popover, 1000)}[data-ui-floating-panel][data-part-root]:dir(rtl){inset-inline-end:0;inset-inline-start:auto}[data-ui-floating-panel]>[data-part-handle]{align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-rule-color, var(--slotted-border-subtle, ButtonBorder));cursor:grab;display:flex;gap:var(--slotted-space-3, .375rem);padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-3, .375rem);touch-action:none;-webkit-user-select:none;user-select:none}[data-ui-floating-panel][data-dragging]>[data-part-handle]{cursor:grabbing}[data-ui-floating-panel]>[data-part-handle]>[data-part-title]{flex:1 1 auto;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, system-ui, sans-serif) );font-size:inherit;font-weight:var(--slotted-font-weight-semibold, 600);margin:0;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]){align-items:center;appearance:none;background-color:transparent;block-size:var(--slotted-control-inner-size-md, 24px);border:0;border-radius:var(--slotted-radius-sm, 4px);color:var(--slotted-text-muted, GrayText);cursor:inherit;display:inline-flex;flex:none;inline-size:var(--slotted-control-inner-size-md, 24px);justify-content:center;padding:0}[data-ui-floating-panel]>[data-part-handle]>[data-part-close]{cursor:pointer}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):hover:not(:disabled){background-color:var(--slotted-tone-secondary-subtle-hover)}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-floating-panel]>[data-part-body]{min-block-size:0;overflow:auto;padding:var(--slotted-space-5, .75rem)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){[data-ui-floating-panel][data-part-root]{-webkit-backdrop-filter:none;backdrop-filter:none}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
135
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlFloatingPanel, isStandalone: true, selector: "[slFloatingPanel]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, defaultPlace: { classPropertyName: "defaultPlace", publicName: "defaultPlace", isSignal: true, isRequired: false, transformFunction: null }, place: { classPropertyName: "place", publicName: "place", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, largeStep: { classPropertyName: "largeStep", publicName: "largeStep", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange", placeChange: "placeChange" }, host: { attributes: { "data-ui": "floating-panel", "data-ui-floating-panel": "", "data-part": "root", "data-part-root": "", "role": "region" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.hidden": "open() ? null : ''", "attr.aria-labelledby": "label() === undefined ? titleId : null", "attr.aria-label": "label() ?? null", "attr.data-corner": "shown() === null ? defaultPlace() : null", "attr.data-dragging": "live() === null ? null : ''", "style.--_x": "shown() === null ? null : shown()!.x + 'px'", "style.--_y": "shown() === null ? null : shown()!.y + 'px'" } }, exportAs: ["slFloatingPanel"], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@layer slotted.components{[data-ui-floating-panel][data-part-root]{--_inset: var(--slotted-floating-panel-inset, var(--slotted-space-6, 16px));background-color:var(--slotted-floating-panel-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-border-color, var(--slotted-border-strong, CanvasText));border-radius:var(--slotted-floating-panel-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-floating-panel-shadow, var(--slotted-shadow-lg, none));-webkit-backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);box-sizing:border-box;color:var(--slotted-text, CanvasText);display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, system-ui, sans-serif);font-size:var(--slotted-font-size-sm, .8125rem);inset-block-start:0;inset-inline-start:0;max-block-size:calc(100dvh - 2 * var(--_inset));max-inline-size:calc(100vw - 2 * var(--_inset));position:fixed;translate:clamp(0px,var(--_x, 0px),calc(100vw - 100%)) clamp(0px,var(--_y, 0px),calc(100dvh - 100%));z-index:var(--slotted-z-index-popover, 1000)}[data-ui-floating-panel][data-part-root]:dir(rtl){inset-inline-end:0;inset-inline-start:auto}[data-ui-floating-panel][data-part-root][data-corner]{inset:auto;translate:none}[data-ui-floating-panel][data-part-root][data-corner^=top]{inset-block-start:var(--_inset)}[data-ui-floating-panel][data-part-root][data-corner^=bottom]{inset-block-end:var(--_inset)}[data-ui-floating-panel][data-part-root][data-corner$=start]{inset-inline-start:var(--_inset)}[data-ui-floating-panel][data-part-root][data-corner$=end]{inset-inline-end:var(--_inset)}[data-ui-floating-panel]>[data-part-handle]{align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-rule-color, var(--slotted-border-subtle, ButtonBorder));cursor:grab;display:flex;gap:var(--slotted-space-3, .375rem);padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-3, .375rem);touch-action:none;-webkit-user-select:none;user-select:none}[data-ui-floating-panel][data-dragging]>[data-part-handle]{cursor:grabbing}[data-ui-floating-panel]>[data-part-handle]>[data-part-title]{flex:1 1 auto;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, system-ui, sans-serif) );font-size:inherit;font-weight:var(--slotted-font-weight-semibold, 600);margin:0;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]){align-items:center;appearance:none;background-color:transparent;block-size:var(--slotted-control-inner-size-md, 24px);border:0;border-radius:var(--slotted-radius-sm, 4px);color:var(--slotted-text-muted, GrayText);cursor:inherit;display:inline-flex;flex:none;inline-size:var(--slotted-control-inner-size-md, 24px);justify-content:center;padding:0}[data-ui-floating-panel]>[data-part-handle]>[data-part-close]{cursor:pointer}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):hover:not(:disabled){background-color:var(--slotted-tone-secondary-subtle-hover)}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-floating-panel]>[data-part-body]{min-block-size:0;overflow:auto;padding:var(--slotted-space-5, .75rem)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){[data-ui-floating-panel][data-part-root]{-webkit-backdrop-filter:none;backdrop-filter:none}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
133
136
  }
134
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanel, decorators: [{
135
138
  type: Component,
@@ -142,13 +145,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
142
145
  '[attr.hidden]': "open() ? null : ''",
143
146
  '[attr.aria-labelledby]': 'label() === undefined ? titleId : null',
144
147
  '[attr.aria-label]': 'label() ?? null',
148
+ '[attr.data-corner]': 'shown() === null ? defaultPlace() : null',
145
149
  '[attr.data-dragging]': "live() === null ? null : ''",
146
150
  '[style.--_x]': "shown() === null ? null : shown()!.x + 'px'",
147
151
  '[style.--_y]': "shown() === null ? null : shown()!.y + 'px'",
148
- '[style.visibility]': "shown() === null ? 'hidden' : null",
149
152
  '(keydown)': 'onKeydown($event)',
150
- }, styles: ["@layer slotted.components{[data-ui-floating-panel][data-part-root]{background-color:var(--slotted-floating-panel-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-border-color, var(--slotted-border-strong, CanvasText));border-radius:var(--slotted-floating-panel-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-floating-panel-shadow, var(--slotted-shadow-lg, none));-webkit-backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);box-sizing:border-box;color:var(--slotted-text, CanvasText);display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, system-ui, sans-serif);font-size:var(--slotted-font-size-sm, .8125rem);inset-block-start:0;inset-inline-start:0;max-block-size:100dvh;max-inline-size:100vw;position:fixed;translate:clamp(0px,var(--_x, 0px),calc(100vw - 100%)) clamp(0px,var(--_y, 0px),calc(100dvh - 100%));z-index:var(--slotted-z-index-popover, 1000)}[data-ui-floating-panel][data-part-root]:dir(rtl){inset-inline-end:0;inset-inline-start:auto}[data-ui-floating-panel]>[data-part-handle]{align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-rule-color, var(--slotted-border-subtle, ButtonBorder));cursor:grab;display:flex;gap:var(--slotted-space-3, .375rem);padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-3, .375rem);touch-action:none;-webkit-user-select:none;user-select:none}[data-ui-floating-panel][data-dragging]>[data-part-handle]{cursor:grabbing}[data-ui-floating-panel]>[data-part-handle]>[data-part-title]{flex:1 1 auto;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, system-ui, sans-serif) );font-size:inherit;font-weight:var(--slotted-font-weight-semibold, 600);margin:0;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]){align-items:center;appearance:none;background-color:transparent;block-size:var(--slotted-control-inner-size-md, 24px);border:0;border-radius:var(--slotted-radius-sm, 4px);color:var(--slotted-text-muted, GrayText);cursor:inherit;display:inline-flex;flex:none;inline-size:var(--slotted-control-inner-size-md, 24px);justify-content:center;padding:0}[data-ui-floating-panel]>[data-part-handle]>[data-part-close]{cursor:pointer}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):hover:not(:disabled){background-color:var(--slotted-tone-secondary-subtle-hover)}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-floating-panel]>[data-part-body]{min-block-size:0;overflow:auto;padding:var(--slotted-space-5, .75rem)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){[data-ui-floating-panel][data-part-root]{-webkit-backdrop-filter:none;backdrop-filter:none}}}\n"] }]
151
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], defaultPlace: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPlace", required: false }] }], place: [{ type: i0.Input, args: [{ isSignal: true, alias: "place", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], openChange: [{ type: i0.Output, args: ["openChange"] }], placeChange: [{ type: i0.Output, args: ["placeChange"] }] } });
153
+ }, styles: ["@layer slotted.components{[data-ui-floating-panel][data-part-root]{--_inset: var(--slotted-floating-panel-inset, var(--slotted-space-6, 16px));background-color:var(--slotted-floating-panel-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-border-color, var(--slotted-border-strong, CanvasText));border-radius:var(--slotted-floating-panel-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-floating-panel-shadow, var(--slotted-shadow-lg, none));-webkit-backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);box-sizing:border-box;color:var(--slotted-text, CanvasText);display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, system-ui, sans-serif);font-size:var(--slotted-font-size-sm, .8125rem);inset-block-start:0;inset-inline-start:0;max-block-size:calc(100dvh - 2 * var(--_inset));max-inline-size:calc(100vw - 2 * var(--_inset));position:fixed;translate:clamp(0px,var(--_x, 0px),calc(100vw - 100%)) clamp(0px,var(--_y, 0px),calc(100dvh - 100%));z-index:var(--slotted-z-index-popover, 1000)}[data-ui-floating-panel][data-part-root]:dir(rtl){inset-inline-end:0;inset-inline-start:auto}[data-ui-floating-panel][data-part-root][data-corner]{inset:auto;translate:none}[data-ui-floating-panel][data-part-root][data-corner^=top]{inset-block-start:var(--_inset)}[data-ui-floating-panel][data-part-root][data-corner^=bottom]{inset-block-end:var(--_inset)}[data-ui-floating-panel][data-part-root][data-corner$=start]{inset-inline-start:var(--_inset)}[data-ui-floating-panel][data-part-root][data-corner$=end]{inset-inline-end:var(--_inset)}[data-ui-floating-panel]>[data-part-handle]{align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-rule-color, var(--slotted-border-subtle, ButtonBorder));cursor:grab;display:flex;gap:var(--slotted-space-3, .375rem);padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-3, .375rem);touch-action:none;-webkit-user-select:none;user-select:none}[data-ui-floating-panel][data-dragging]>[data-part-handle]{cursor:grabbing}[data-ui-floating-panel]>[data-part-handle]>[data-part-title]{flex:1 1 auto;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, system-ui, sans-serif) );font-size:inherit;font-weight:var(--slotted-font-weight-semibold, 600);margin:0;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]){align-items:center;appearance:none;background-color:transparent;block-size:var(--slotted-control-inner-size-md, 24px);border:0;border-radius:var(--slotted-radius-sm, 4px);color:var(--slotted-text-muted, GrayText);cursor:inherit;display:inline-flex;flex:none;inline-size:var(--slotted-control-inner-size-md, 24px);justify-content:center;padding:0}[data-ui-floating-panel]>[data-part-handle]>[data-part-close]{cursor:pointer}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):hover:not(:disabled){background-color:var(--slotted-tone-secondary-subtle-hover)}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-floating-panel]>[data-part-body]{min-block-size:0;overflow:auto;padding:var(--slotted-space-5, .75rem)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){[data-ui-floating-panel][data-part-root]{-webkit-backdrop-filter:none;backdrop-filter:none}}}\n"] }]
154
+ }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], defaultPlace: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPlace", required: false }] }], place: [{ type: i0.Input, args: [{ isSignal: true, alias: "place", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], largeStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "largeStep", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], openChange: [{ type: i0.Output, args: ["openChange"] }], placeChange: [{ type: i0.Output, args: ["placeChange"] }] } });
152
155
  /**
153
156
  * The bar the panel is moved by. A press that moves drags the panel; the grip
154
157
  * at its start takes focus and moves it one step per arrow key, a larger one
@@ -1 +1 @@
1
- {"version":3,"file":"slotted-angular-floating-panel.mjs","sources":["../../floating-panel/src/floating-panel.ts","../../floating-panel/src/slotted-angular-floating-panel.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport { SlGlyph, SlIcon } from '@slotted/angular/icon';\nimport { clampPlace, cornerPlace, stepPlace } from '@slotted/core/floating-panel';\nimport type { FloatingCorner, FloatingPlace } from '@slotted/core/floating-panel';\nimport {\n floatingPanelMessages,\n type FloatingPanelMessages,\n type PartialMessages,\n} from '@slotted/core/i18n';\n\nexport type { FloatingCorner, FloatingPlace } from '@slotted/core/floating-panel';\n\nlet titles = 0;\n\n/**\n * A tool that stays over the page while the page stays usable: a calculator,\n * a notepad, a timer. It is non-modal by definition (no scrim, no focus trap,\n * no inert page) and a named region rather than a dialog, so the shortcuts an\n * application holds back while a dialog is open keep working. The reader moves\n * it by its handle, with the pointer or with the arrow keys on its grip, and\n * it stays whole inside the viewport; Escape inside it closes it and focus\n * returns to the element that held it before it opened.\n */\n@Component({\n selector: '[slFloatingPanel]',\n standalone: true,\n exportAs: 'slFloatingPanel',\n template: '<ng-content />',\n styleUrl: '../../../styles/src/floating-panel/floating-panel.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'floating-panel',\n 'data-ui-floating-panel': '',\n 'data-part': 'root',\n 'data-part-root': '',\n role: 'region',\n '[attr.hidden]': \"open() ? null : ''\",\n '[attr.aria-labelledby]': 'label() === undefined ? titleId : null',\n '[attr.aria-label]': 'label() ?? null',\n '[attr.data-dragging]': \"live() === null ? null : ''\",\n '[style.--_x]': \"shown() === null ? null : shown()!.x + 'px'\",\n '[style.--_y]': \"shown() === null ? null : shown()!.y + 'px'\",\n '[style.visibility]': \"shown() === null ? 'hidden' : null\",\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class SlFloatingPanel {\n /** Whether the panel is drawn. The page under it stays usable either way. */\n readonly open = input(false);\n /** The region's name when no title names it. */\n readonly label = input<string | undefined>(undefined);\n /** The corner the panel first opens in, in the reading direction. */\n readonly defaultPlace = input<FloatingCorner>('bottom-end');\n /** A controlled place, its top-left corner in viewport pixels; drawn inside the viewport. */\n readonly place = input<FloatingPlace | undefined>(undefined);\n readonly messages = input<PartialMessages<FloatingPanelMessages> | undefined>(undefined);\n\n /** Asked with `false` on Escape inside the panel and on its close control. */\n readonly openChange = output<boolean>();\n /** Fired at the end of a move, by pointer or by key, for the application to store. */\n readonly placeChange = output<FloatingPlace>();\n\n readonly t = injectMessages(floatingPanelMessages, this.messages);\n readonly titleId = `slotted-floating-panel-${String((titles += 1))}`;\n\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n private readonly own = signal<FloatingPlace | null>(null);\n protected readonly live = signal<FloatingPlace | null>(null);\n private opener: HTMLElement | null = null;\n\n protected readonly shown = computed(() => this.live() ?? this.place() ?? this.own());\n\n constructor() {\n effect(() => {\n if (!this.open()) return;\n untracked(() => {\n const active = this.native.ownerDocument.activeElement;\n this.opener =\n active instanceof HTMLElement && active !== active.ownerDocument.body ? active : null;\n if (this.place() !== undefined || this.own() !== null) return;\n queueMicrotask(() => this.placeInCorner());\n });\n });\n }\n\n /** Closes the panel and returns focus to the element that held it. */\n close() {\n this.openChange.emit(false);\n this.opener?.focus();\n }\n\n /** Moves the panel one step for an arrow key, a larger one with Shift. */\n move(event: KeyboardEvent) {\n const shown = this.shown();\n if (shown === null) return;\n\n const next = stepPlace(shown, event.key, event.shiftKey);\n if (next === null) return;\n event.preventDefault();\n this.commit(this.clamped(next));\n }\n\n /** Drags the panel from a press on its handle, the pointer captured. */\n startDrag(event: PointerEvent) {\n const from = this.shown();\n if (event.button !== 0 || from === null) return;\n if ((event.target as Element).closest('[data-part=\"close\"]') !== null) return;\n\n const handle = event.currentTarget as HTMLElement;\n const pointer = { x: event.clientX, y: event.clientY };\n handle.setPointerCapture(event.pointerId);\n\n const onMove = (move: PointerEvent) =>\n this.live.set(\n this.clamped({\n x: from.x + move.clientX - pointer.x,\n y: from.y + move.clientY - pointer.y,\n }),\n );\n const onEnd = (end: PointerEvent) => {\n onMove(end);\n handle.removeEventListener('pointermove', onMove);\n handle.removeEventListener('pointerup', onEnd);\n handle.removeEventListener('pointercancel', onEnd);\n const last = this.live();\n this.live.set(null);\n if (last !== null) this.commit(last);\n };\n handle.addEventListener('pointermove', onMove);\n handle.addEventListener('pointerup', onEnd);\n handle.addEventListener('pointercancel', onEnd);\n }\n\n protected onKeydown(event: KeyboardEvent) {\n if (event.defaultPrevented || event.key !== 'Escape') return;\n event.stopPropagation();\n this.close();\n }\n\n private placeInCorner() {\n const direction = getComputedStyle(this.native).direction === 'rtl' ? 'rtl' : 'ltr';\n this.own.set(cornerPlace(this.defaultPlace(), this.size(), this.viewport(), 16, direction));\n }\n\n private commit(next: FloatingPlace) {\n if (this.place() === undefined) this.own.set(next);\n this.placeChange.emit(next);\n }\n\n private clamped(next: FloatingPlace) {\n return clampPlace(next, this.size(), this.viewport());\n }\n\n private size() {\n const box = this.native.getBoundingClientRect();\n\n return { width: box.width, height: box.height };\n }\n\n private viewport() {\n const root = this.native.ownerDocument.documentElement;\n\n return { width: root.clientWidth, height: root.clientHeight };\n }\n}\n\n/**\n * The bar the panel is moved by. A press that moves drags the panel; the grip\n * at its start takes focus and moves it one step per arrow key, a larger one\n * with Shift.\n */\n@Component({\n selector: '[slFloatingPanelHandle]',\n standalone: true,\n imports: [SlGlyph, SlIcon],\n template: `<button\n type=\"button\"\n data-part=\"grip\"\n data-part-grip=\"\"\n [attr.aria-label]=\"panel.t('move')\"\n (keydown)=\"panel.move($event)\"\n >\n <span slIcon><svg slGlyph name=\"grip-vertical\"></svg></span>\n </button>\n <ng-content />`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'handle',\n 'data-part-handle': '',\n '(pointerdown)': 'panel.startDrag($event)',\n },\n})\nexport class SlFloatingPanelHandle {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** The panel's name, which names the region when no `label` does. */\n@Directive({\n selector: '[slFloatingPanelTitle]',\n standalone: true,\n host: { 'data-part': 'title', 'data-part-title': '', '[attr.id]': 'panel.titleId' },\n})\nexport class SlFloatingPanelTitle {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** Closes the panel; focus returns to the element that held it before it opened. */\n@Component({\n selector: 'button[slFloatingPanelClose]',\n standalone: true,\n imports: [SlGlyph, SlIcon],\n template: `<ng-content\n ><span slIcon><svg slGlyph name=\"x\"></svg></span\n ></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n type: 'button',\n 'data-part': 'close',\n 'data-part-close': '',\n '[attr.aria-label]': \"panel.t('close')\",\n '(click)': 'panel.close()',\n },\n})\nexport class SlFloatingPanelClose {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** What the tool holds. It scrolls when the panel is held shorter than it. */\n@Directive({\n selector: '[slFloatingPanelBody]',\n standalone: true,\n host: { 'data-part': 'body', 'data-part-body': '' },\n})\nexport class SlFloatingPanelBody {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA0BA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;AAQG;MAyBU,eAAe,CAAA;;IAEjB,IAAI,GAAG,KAAK,CAAC,KAAK;6EAAC;;IAEnB,KAAK,GAAG,KAAK,CAAqB,SAAS;8EAAC;;IAE5C,YAAY,GAAG,KAAK,CAAiB,YAAY;qFAAC;;IAElD,KAAK,GAAG,KAAK,CAA4B,SAAS;8EAAC;IACnD,QAAQ,GAAG,KAAK,CAAqD,SAAS;iFAAC;;IAG/E,UAAU,GAAG,MAAM,EAAW;;IAE9B,WAAW,GAAG,MAAM,EAAiB;IAErC,CAAC,GAAG,cAAc,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC;IACxD,OAAO,GAAG,CAAA,uBAAA,EAA0B,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,CAAA,CAAE;AAEnD,IAAA,MAAM,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;IACtD,GAAG,GAAG,MAAM,CAAuB,IAAI;4EAAC;IACtC,IAAI,GAAG,MAAM,CAAuB,IAAI;6EAAC;IACpD,MAAM,GAAuB,IAAI;AAEtB,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE;8EAAC;AAEpF,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBAAE;YAClB,SAAS,CAAC,MAAK;g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AmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,MAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;oBAChB,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,EAAE;AACpD,iBAAA;;;ACzPD;;AAEG;;"}
1
+ {"version":3,"file":"slotted-angular-floating-panel.mjs","sources":["../../floating-panel/src/floating-panel.ts","../../floating-panel/src/slotted-angular-floating-panel.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport { SlGlyph, SlIcon } from '@slotted/angular/icon';\nimport {\n clampPlace,\n FLOATING_LARGE_STEP,\n FLOATING_STEP,\n stepPlace,\n} from '@slotted/core/floating-panel';\nimport type { FloatingCorner, FloatingPlace } from '@slotted/core/floating-panel';\nimport {\n floatingPanelMessages,\n type FloatingPanelMessages,\n type PartialMessages,\n} from '@slotted/core/i18n';\n\nexport type { FloatingCorner, FloatingPlace } from '@slotted/core/floating-panel';\n\nlet titles = 0;\n\n/**\n * A tool that stays over the page while the page stays usable: a calculator,\n * a notepad, a timer. It is non-modal by definition (no scrim, no focus trap,\n * no inert page) and a named region rather than a dialog, so the shortcuts an\n * application holds back while a dialog is open keep working. The reader moves\n * it by its handle, with the pointer or with the arrow keys on its grip, and\n * it stays whole inside the viewport; Escape inside it closes it and focus\n * returns to the element that held it before it opened.\n */\n@Component({\n selector: '[slFloatingPanel]',\n standalone: true,\n exportAs: 'slFloatingPanel',\n template: '<ng-content />',\n styleUrl: '../../../styles/src/floating-panel/floating-panel.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'floating-panel',\n 'data-ui-floating-panel': '',\n 'data-part': 'root',\n 'data-part-root': '',\n role: 'region',\n '[attr.hidden]': \"open() ? null : ''\",\n '[attr.aria-labelledby]': 'label() === undefined ? titleId : null',\n '[attr.aria-label]': 'label() ?? null',\n '[attr.data-corner]': 'shown() === null ? defaultPlace() : null',\n '[attr.data-dragging]': \"live() === null ? null : ''\",\n '[style.--_x]': \"shown() === null ? null : shown()!.x + 'px'\",\n '[style.--_y]': \"shown() === null ? null : shown()!.y + 'px'\",\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class SlFloatingPanel {\n /** Whether the panel is drawn. The page under it stays usable either way. */\n readonly open = input(false);\n /** The region's name when no title names it. */\n readonly label = input<string | undefined>(undefined);\n /** The corner the panel first opens in, in the reading direction. */\n readonly defaultPlace = input<FloatingCorner>('bottom-end');\n /** A controlled place, its top-left corner in viewport pixels; drawn inside the viewport. */\n readonly place = input<FloatingPlace | undefined>(undefined);\n /** Pixels an arrow key on the grip moves the panel. */\n readonly step = input(FLOATING_STEP, { transform: numberAttribute });\n /** Pixels an arrow key with Shift moves it. */\n readonly largeStep = input(FLOATING_LARGE_STEP, { transform: numberAttribute });\n readonly messages = input<PartialMessages<FloatingPanelMessages> | undefined>(undefined);\n\n /** Asked with `false` on Escape inside the panel and on its close control. */\n readonly openChange = output<boolean>();\n /** Fired once at the end of a move, by pointer or by key, for the application to store. */\n readonly placeChange = output<FloatingPlace>();\n\n readonly t = injectMessages(floatingPanelMessages, this.messages);\n readonly titleId = `slotted-floating-panel-${String((titles += 1))}`;\n\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n private readonly own = signal<FloatingPlace | null>(null);\n protected readonly live = signal<FloatingPlace | null>(null);\n private opener: HTMLElement | null = null;\n\n protected readonly shown = computed(() => this.live() ?? this.place() ?? this.own());\n\n constructor() {\n effect(() => {\n if (!this.open()) return;\n untracked(() => {\n const active = this.native.ownerDocument.activeElement;\n this.opener =\n active instanceof HTMLElement && active !== active.ownerDocument.body ? active : null;\n });\n });\n }\n\n /** Closes the panel and returns focus to the element that held it. */\n close() {\n this.openChange.emit(false);\n this.opener?.focus();\n }\n\n /** Moves the panel one step for an arrow key, a larger one with Shift. */\n move(event: KeyboardEvent) {\n const step = event.shiftKey ? this.largeStep() : this.step();\n const next = stepPlace(this.drawn(), event.key, step);\n if (next === null) return;\n\n event.preventDefault();\n this.commit(this.clamped(next));\n }\n\n /** Drags the panel from a press on its handle, the pointer captured. */\n startDrag(event: PointerEvent) {\n if (event.button !== 0) return;\n if ((event.target as Element).closest('[data-part=\"close\"]') !== null) return;\n\n const handle = event.currentTarget as HTMLElement;\n const from = this.drawn();\n const pressed = { x: event.clientX, y: event.clientY };\n let last: FloatingPlace | null = null;\n handle.setPointerCapture(event.pointerId);\n\n const onMove = (move: PointerEvent) => {\n const by = { x: move.clientX - pressed.x, y: move.clientY - pressed.y };\n if (last === null && by.x === 0 && by.y === 0) return;\n\n last = this.clamped({ x: from.x + by.x, y: from.y + by.y });\n this.live.set(last);\n };\n const onEnd = () => {\n handle.removeEventListener('pointermove', onMove);\n handle.removeEventListener('pointerup', onEnd);\n handle.removeEventListener('pointercancel', onEnd);\n if (last === null) return;\n\n this.live.set(null);\n this.commit(last);\n };\n handle.addEventListener('pointermove', onMove);\n handle.addEventListener('pointerup', onEnd);\n handle.addEventListener('pointercancel', onEnd);\n }\n\n protected onKeydown(event: KeyboardEvent) {\n if (event.defaultPrevented || event.key !== 'Escape') return;\n event.stopPropagation();\n this.close();\n }\n\n private commit(next: FloatingPlace) {\n if (this.place() === undefined) this.own.set(next);\n this.placeChange.emit(next);\n }\n\n private clamped(next: FloatingPlace) {\n return clampPlace(next, this.size(), this.viewport());\n }\n\n /** Where the panel is drawn, which is not its stored place when that lies outside the viewport. */\n private drawn(): FloatingPlace {\n const box = this.native.getBoundingClientRect();\n\n return { x: box.left, y: box.top };\n }\n\n private size() {\n const box = this.native.getBoundingClientRect();\n\n return { width: box.width, height: box.height };\n }\n\n private viewport() {\n const root = this.native.ownerDocument.documentElement;\n\n return { width: root.clientWidth, height: root.clientHeight };\n }\n}\n\n/**\n * The bar the panel is moved by. A press that moves drags the panel; the grip\n * at its start takes focus and moves it one step per arrow key, a larger one\n * with Shift.\n */\n@Component({\n selector: '[slFloatingPanelHandle]',\n standalone: true,\n imports: [SlGlyph, SlIcon],\n template: `<button\n type=\"button\"\n data-part=\"grip\"\n data-part-grip=\"\"\n [attr.aria-label]=\"panel.t('move')\"\n (keydown)=\"panel.move($event)\"\n >\n <span slIcon><svg slGlyph name=\"grip-vertical\"></svg></span>\n </button>\n <ng-content />`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'handle',\n 'data-part-handle': '',\n '(pointerdown)': 'panel.startDrag($event)',\n },\n})\nexport class SlFloatingPanelHandle {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** The panel's name, which names the region when no `label` does. */\n@Directive({\n selector: '[slFloatingPanelTitle]',\n standalone: true,\n host: { 'data-part': 'title', 'data-part-title': '', '[attr.id]': 'panel.titleId' },\n})\nexport class SlFloatingPanelTitle {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** Closes the panel; focus returns to the element that held it before it opened. */\n@Component({\n selector: 'button[slFloatingPanelClose]',\n standalone: true,\n imports: [SlGlyph, SlIcon],\n template: `<ng-content\n ><span slIcon><svg slGlyph name=\"x\"></svg></span\n ></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n type: 'button',\n 'data-part': 'close',\n 'data-part-close': '',\n '[attr.aria-label]': \"panel.t('close')\",\n '(click)': 'panel.close()',\n },\n})\nexport class SlFloatingPanelClose {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** What the tool holds. It scrolls when the panel is held shorter than it. */\n@Directive({\n selector: '[slFloatingPanelBody]',\n standalone: true,\n host: { 'data-part': 'body', 'data-part-body': '' },\n})\nexport class SlFloatingPanelBody {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAgCA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;AAQG;MAyBU,eAAe,CAAA;;IAEjB,IAAI,GAAG,KAAK,CAAC,KAAK;6EAAC;;IAEnB,KAAK,GAAG,KAAK,CAAqB,SAAS;8EAAC;;IAE5C,YAAY,GAAG,KAAK,CAAiB,YAAY;qFAAC;;IAElD,KAAK,GAAG,KAAK,CAA4B,SAAS;8EAAC;;IAEnD,IAAI,GAAG,KAAK,CAAC,aAAa,4EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;;IAE3D,SAAS,GAAG,KAAK,CAAC,mBAAmB,iFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;IACtE,QAAQ,GAAG,KAAK,CAAqD,SAAS;iFAAC;;IAG/E,UAAU,GAAG,MAAM,EAAW;;IAE9B,WAAW,GAAG,MAAM,EAAiB;IAErC,CAAC,GAAG,cAAc,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC;IACxD,OAAO,GAAG,CAAA,uBAAA,EAA0B,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,CAAA,CAAE;AAEnD,IAAA,MAAM,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;IACtD,GAAG,GAAG,MAAM,CAAuB,IAAI;4EAAC;IACtC,IAAI,GAAG,MAAM,CAAuB,IAAI;6EAAC;IACpD,MAAM,GAAuB,IAAI;AAEtB,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,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