@slotted/angular 0.1.0-beta.35 → 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.
- package/docs/button.json +10 -7
- package/docs/button.md +2 -91
- package/docs/button.props.md +97 -0
- package/docs/calendar.json +22 -0
- package/docs/calendar.md +4 -1
- package/docs/chart.json +1 -1
- package/docs/chart.md +1 -1
- package/docs/collapsible.json +2 -1
- package/docs/collapsible.md +1 -1
- package/docs/command-palette.json +2 -1
- package/docs/command-palette.md +1 -1
- package/docs/dashboard-grid.json +2 -1
- package/docs/dashboard-grid.md +1 -1
- package/docs/entity-picker.json +2 -1
- package/docs/entity-picker.md +1 -1
- package/docs/field-group.json +1 -1
- package/docs/field-group.md +1 -1
- package/docs/floating-panel.json +22 -4
- package/docs/floating-panel.md +6 -4
- package/docs/guidelines/index.md +2 -0
- package/docs/guidelines/own-elements.md +20 -0
- package/docs/index.md +1 -1
- package/docs/list.json +2 -1
- package/docs/list.md +2 -2
- package/docs/message.json +7 -0
- package/docs/message.md +1 -0
- package/docs/page.json +8 -1
- package/docs/page.md +2 -1
- package/docs/progress-indicator.json +1 -39
- package/docs/progress-indicator.md +1 -6
- package/docs/radio-group.json +1 -18
- package/docs/radio-group.md +1 -3
- package/docs/section.json +10 -2
- package/docs/section.md +2 -1
- package/docs/skills/build-own-element/SKILL.md +42 -2
- package/docs/skills/theme-app/SKILL.md +1 -1
- package/docs/sparkline.json +1 -416
- package/docs/sparkline.md +2 -186
- package/docs/table.json +15 -3
- package/docs/table.md +4 -3
- package/docs/tokens.md +12 -0
- package/fesm2022/slotted-angular-app-shell.mjs +2 -2
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
- package/fesm2022/slotted-angular-button.mjs +50 -41
- package/fesm2022/slotted-angular-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-calendar.mjs +249 -137
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +11 -5
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-collapsible.mjs +10 -6
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -1
- package/fesm2022/slotted-angular-command-palette.mjs +2 -2
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
- package/fesm2022/slotted-angular-dashboard-grid.mjs +2 -2
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-list.mjs +2 -2
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +2 -2
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-field-group.mjs +2 -2
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-floating-panel.mjs +33 -30
- package/fesm2022/slotted-angular-floating-panel.mjs.map +1 -1
- package/fesm2022/slotted-angular-list-item.mjs +2 -2
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
- package/fesm2022/slotted-angular-list.mjs +3 -3
- package/fesm2022/slotted-angular-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-loading-overlay.mjs +2 -2
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -1
- package/fesm2022/slotted-angular-message.mjs +18 -8
- package/fesm2022/slotted-angular-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +8 -4
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-progress-indicator.mjs +7 -106
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-radio-group.mjs +12 -45
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +20 -3
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-sparkline.mjs +4 -295
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -1
- package/fesm2022/slotted-angular-split-button.mjs +4 -4
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +39 -10
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +2 -2
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/fesm2022/slotted-angular-upload.mjs +2 -2
- package/fesm2022/slotted-angular-upload.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-button.d.ts +22 -11
- package/types/slotted-angular-button.d.ts.map +1 -1
- package/types/slotted-angular-calendar.d.ts +26 -2
- package/types/slotted-angular-calendar.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +4 -1
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-floating-panel.d.ts +27 -22
- package/types/slotted-angular-floating-panel.d.ts.map +1 -1
- package/types/slotted-angular-list.d.ts +6 -4
- package/types/slotted-angular-list.d.ts.map +1 -1
- package/types/slotted-angular-message.d.ts +9 -3
- package/types/slotted-angular-message.d.ts.map +1 -1
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-progress-indicator.d.ts +2 -46
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -1
- package/types/slotted-angular-radio-group.d.ts +4 -22
- package/types/slotted-angular-radio-group.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +10 -1
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-sparkline.d.ts +4 -86
- package/types/slotted-angular-sparkline.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +21 -7
- package/types/slotted-angular-table.d.ts.map +1 -1
|
@@ -261,7 +261,7 @@ class SlFieldGroup extends SlFieldDefaultsSource {
|
|
|
261
261
|
<ng-content select="[slFieldGroupError]" />
|
|
262
262
|
</p>
|
|
263
263
|
}
|
|
264
|
-
<div data-part="content" data-part-content=""><ng-content /></div>`, isInline: true, styles: ["@layer slotted.components{[data-ui-field-group][data-part-root]{--_font-size: var(--slotted-control-font-size-
|
|
264
|
+
<div data-part="content" data-part-content=""><ng-content /></div>`, isInline: true, styles: ["@layer slotted.components{[data-ui-field-group][data-part-root]{--_font-size: var(--slotted-control-font-size-md, 13px);--_message-gap: var(--slotted-field-group-message-gap, var(--slotted-space-2, .25rem));--_content-gap: var( --slotted-field-group-content-gap, var(--slotted-field-row-gap, var(--slotted-space-3, .375rem)) );--_field-gap: var(--slotted-field-group-field-gap, var(--slotted-space-6, 1rem));border:0;display:block;font-family:var( --slotted-field-group-font-family, var(--slotted-control-font-family, sans-serif) );margin:0;min-inline-size:0;padding:0}[data-ui-field-group][data-part-root]>*+*{margin-block-start:var(--_message-gap)}[data-ui-field-group][data-part-root]>*+[data-ui-inline-message]{margin-block-start:var(--_message-gap)}[data-ui-field-group][data-part-root]>[data-part-content]{margin-block-start:var(--_content-gap)}[data-ui-field-group][data-part-root][data-kind=section]{--_content-gap: var(--slotted-field-group-section-content-gap, var(--slotted-space-7, 1.25rem))}[data-ui-field-group][data-part-root][data-size=sm]{--_font-size: var(--slotted-control-font-size-sm, 12px)}[data-ui-field-group][data-part-root][data-size=md]{--_font-size: var(--slotted-control-font-size-md, 13px)}[data-ui-field-group][data-part-root][data-size=lg]{--_font-size: var(--slotted-control-font-size-lg, 14px)}[data-ui-field-group][data-part-root][data-kind=section]:is([data-size=md],[data-size=lg]){--_font-size: var(--slotted-control-font-size-lg, 14px)}[data-ui-field-group][data-part-root][data-kind=section][data-size=sm]{--_font-size: var(--slotted-control-font-size-md, 13px)}[data-ui-field-group]>[data-part-legend]{color:var(--slotted-field-group-legend-color, var(--slotted-text));display:block;font-size:var(--_font-size);font-weight:var( --slotted-field-group-legend-font-weight, var(--slotted-font-weight-semibold, 600) );line-height:var(--slotted-field-group-line-height, var(--slotted-line-height-sm, 1.45));padding:0;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui-field-group]>[data-part-legend]>[data-part-mark]{color:var(--slotted-field-group-mark-color, var(--slotted-tone-danger-text));margin-inline-start:var(--slotted-field-group-mark-gap, 0);overflow-wrap:normal;unicode-bidi:isolate}[data-ui-field-group]>[data-part-legend]>:is(h1,h2,h3,h4,h5,h6){display:inline;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );margin:0}[data-ui-field-group]:is([data-necessity=optional],[data-necessity=words])>[data-part-legend]>[data-part-mark]{color:var(--slotted-field-group-mark-text-color, var(--slotted-text-muted));font-size:var(--slotted-control-font-size-sm, 12px);font-weight:var(--slotted-font-weight-regular, 400)}[data-ui-field-group]>[data-ui-inline-message]:not([data-reserve]):has([data-part-text]:empty){display:none}[data-ui-field-group][data-part-root]>[data-ui-inline-message]{font-size:var(--slotted-font-size-xs, .75rem)}[data-ui-field-group][data-part-root]>[data-ui-inline-message][data-tone=danger],[data-ui-field-group][data-part-root]>[data-ui-inline-message][data-tone=success]{font-weight:var(--slotted-font-weight-medium, 500)}[data-ui-field-group]>[data-part-content]{display:flex;flex-direction:column;gap:var(--_field-gap);min-inline-size:0}[data-ui-field-group][data-orientation=horizontal]>[data-part-content]{flex-direction:row;flex-wrap:wrap}[data-ui-field-group][data-orientation=horizontal]>[data-part-content]>*{flex:1 1 var(--slotted-field-group-track-min, 14rem);min-inline-size:0}[data-ui-field-group][data-part-root][data-disabled]>[data-part-legend],[data-ui-field-group][data-part-root][data-disabled]>[data-part-legend]>[data-part-mark]{color:var(--slotted-disabled-foreground)}}\n"], dependencies: [{ kind: "component", type: SlInlineMessage, selector: "[slInlineMessage]", inputs: ["tone", "size", "live", "mark", "prefix", "hideIcon", "loading", "disabled", "reserve", "id"], exportAs: ["slInlineMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
265
265
|
}
|
|
266
266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFieldGroup, decorators: [{
|
|
267
267
|
type: Component,
|
|
@@ -311,7 +311,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
311
311
|
'[attr.data-required]': "required() === true ? '' : null",
|
|
312
312
|
'[attr.disabled]': "disabled() === true ? '' : null",
|
|
313
313
|
'[attr.aria-describedby]': 'describedBy()',
|
|
314
|
-
}, styles: ["@layer slotted.components{[data-ui-field-group][data-part-root]{--_font-size: var(--slotted-control-font-size-
|
|
314
|
+
}, styles: ["@layer slotted.components{[data-ui-field-group][data-part-root]{--_font-size: var(--slotted-control-font-size-md, 13px);--_message-gap: var(--slotted-field-group-message-gap, var(--slotted-space-2, .25rem));--_content-gap: var( --slotted-field-group-content-gap, var(--slotted-field-row-gap, var(--slotted-space-3, .375rem)) );--_field-gap: var(--slotted-field-group-field-gap, var(--slotted-space-6, 1rem));border:0;display:block;font-family:var( --slotted-field-group-font-family, var(--slotted-control-font-family, sans-serif) );margin:0;min-inline-size:0;padding:0}[data-ui-field-group][data-part-root]>*+*{margin-block-start:var(--_message-gap)}[data-ui-field-group][data-part-root]>*+[data-ui-inline-message]{margin-block-start:var(--_message-gap)}[data-ui-field-group][data-part-root]>[data-part-content]{margin-block-start:var(--_content-gap)}[data-ui-field-group][data-part-root][data-kind=section]{--_content-gap: var(--slotted-field-group-section-content-gap, var(--slotted-space-7, 1.25rem))}[data-ui-field-group][data-part-root][data-size=sm]{--_font-size: var(--slotted-control-font-size-sm, 12px)}[data-ui-field-group][data-part-root][data-size=md]{--_font-size: var(--slotted-control-font-size-md, 13px)}[data-ui-field-group][data-part-root][data-size=lg]{--_font-size: var(--slotted-control-font-size-lg, 14px)}[data-ui-field-group][data-part-root][data-kind=section]:is([data-size=md],[data-size=lg]){--_font-size: var(--slotted-control-font-size-lg, 14px)}[data-ui-field-group][data-part-root][data-kind=section][data-size=sm]{--_font-size: var(--slotted-control-font-size-md, 13px)}[data-ui-field-group]>[data-part-legend]{color:var(--slotted-field-group-legend-color, var(--slotted-text));display:block;font-size:var(--_font-size);font-weight:var( --slotted-field-group-legend-font-weight, var(--slotted-font-weight-semibold, 600) );line-height:var(--slotted-field-group-line-height, var(--slotted-line-height-sm, 1.45));padding:0;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui-field-group]>[data-part-legend]>[data-part-mark]{color:var(--slotted-field-group-mark-color, var(--slotted-tone-danger-text));margin-inline-start:var(--slotted-field-group-mark-gap, 0);overflow-wrap:normal;unicode-bidi:isolate}[data-ui-field-group]>[data-part-legend]>:is(h1,h2,h3,h4,h5,h6){display:inline;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );margin:0}[data-ui-field-group]:is([data-necessity=optional],[data-necessity=words])>[data-part-legend]>[data-part-mark]{color:var(--slotted-field-group-mark-text-color, var(--slotted-text-muted));font-size:var(--slotted-control-font-size-sm, 12px);font-weight:var(--slotted-font-weight-regular, 400)}[data-ui-field-group]>[data-ui-inline-message]:not([data-reserve]):has([data-part-text]:empty){display:none}[data-ui-field-group][data-part-root]>[data-ui-inline-message]{font-size:var(--slotted-font-size-xs, .75rem)}[data-ui-field-group][data-part-root]>[data-ui-inline-message][data-tone=danger],[data-ui-field-group][data-part-root]>[data-ui-inline-message][data-tone=success]{font-weight:var(--slotted-font-weight-medium, 500)}[data-ui-field-group]>[data-part-content]{display:flex;flex-direction:column;gap:var(--_field-gap);min-inline-size:0}[data-ui-field-group][data-orientation=horizontal]>[data-part-content]{flex-direction:row;flex-wrap:wrap}[data-ui-field-group][data-orientation=horizontal]>[data-part-content]>*{flex:1 1 var(--slotted-field-group-track-min, 14rem);min-inline-size:0}[data-ui-field-group][data-part-root][data-disabled]>[data-part-legend],[data-ui-field-group][data-part-root][data-disabled]>[data-part-legend]>[data-part-mark]{color:var(--slotted-disabled-foreground)}}\n"] }]
|
|
315
315
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], necessity: [{ type: i0.Input, args: [{ isSignal: true, alias: "necessity", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], kind: [{ type: i0.Input, args: [{ isSignal: true, alias: "kind", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], description: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SlFieldGroupDescription), { ...{ descendants: false }, isSignal: true }] }], error: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SlFieldGroupError), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
316
316
|
|
|
317
317
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotted-angular-field-group.mjs","sources":["../../field-group/src/field-group-parts.ts","../../field-group/src/field-group.ts","../../field-group/src/slotted-angular-field-group.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n HostAttributeToken,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { necessityMark, SlFieldMessage } from '@slotted/angular/field';\n\nimport { SlFieldGroup } from './field-group';\n\n/**\n * The name of the set, and whether the set has to be answered.\n *\n * It holds whatever the page puts in it. On a page asking one question GOV.UK\n * recommends the legend contain the page's own heading, so a reader hears the\n * question once rather than twice; the family removes the heading's block break\n * and its margins and leaves its type alone, because a page heading is a page's\n * decision rather than a control's.\n */\n@Component({\n selector: 'legend[slFieldGroupLegend]',\n standalone: true,\n exportAs: 'slFieldGroupLegend',\n template: `<ng-content />\n @if (mark(); as text) {\n <!-- Text rather than a margin, so the accessible name reads \"Note (optional)\". -->\n &ngsp;<span\n data-part=\"mark\"\n data-part-mark=\"\"\n [attr.aria-hidden]=\"markHidden() ? 'true' : null\"\n >{{ text }}</span\n >\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'legend',\n 'data-part-legend': '',\n '[attr.id]': 'legendId()',\n },\n})\nexport class SlFieldGroupLegend {\n private readonly group = inject(SlFieldGroup);\n private readonly writtenId = inject(new HostAttributeToken('id'), { optional: true });\n\n protected readonly legendId = computed(() => this.writtenId ?? this.group.ids().legend);\n private readonly necessity = computed(() =>\n this.group.kind() === 'section'\n ? null\n : necessityMark(this.group.resolvedNecessity(), this.group.required() === true, this.group.t),\n );\n protected readonly markHidden = computed(() => this.necessity()?.hidden === true);\n protected readonly mark = computed(() => this.necessity()?.text ?? null);\n}\n\n/**\n * Help about the whole set, projected into the `inline-message` the group\n * renders before its fields.\n *\n * It is a marker of the group's own rather than the field's, so a description\n * written inside one of the fields is never mistaken for the set's.\n */\n@Directive({\n selector: '[slFieldGroupDescription]',\n standalone: true,\n exportAs: 'slFieldGroupDescription',\n})\nexport class SlFieldGroupDescription extends SlFieldMessage {}\n\n/**\n * What is wrong with the set — the case a single field cannot state, because\n * \"choose at least one\" is a fact about the group rather than about any control\n * in it. GOV.UK's error-message-with-legend example is the same arrangement.\n */\n@Directive({\n selector: '[slFieldGroupError]',\n standalone: true,\n exportAs: 'slFieldGroupError',\n})\nexport class SlFieldGroupError extends SlFieldMessage {}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n injectFieldDefaults,\n SlFieldDefaultsSource,\n SlFieldIdFactory,\n} from '@slotted/angular/field';\nimport type {\n FieldDefaults,\n FieldLabelPlacement,\n FieldNecessity,\n FieldSize,\n} from '@slotted/angular/field';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport { SlInlineMessage } from '@slotted/angular/inline-message';\nimport { fieldMessages, type FieldMessages, type PartialMessages } from '@slotted/core/i18n';\n\nimport { SlFieldGroupDescription, SlFieldGroupError } from './field-group-parts';\n\n/**\n * Whether the group asks something. A `question` (a set of radios) states its\n * own necessity on the legend; a `section` (\"Address\") is a topic, and says\n * nothing about it.\n */\nexport type FieldGroupKind = 'question' | 'section';\n\n/** How the fields inside the group flow. */\nexport type FieldGroupOrientation = 'vertical' | 'horizontal';\n\n/** The three identifiers a group derives from one base. */\nexport interface FieldGroupIds {\n description: string;\n error: string;\n legend: string;\n}\n\n/**\n * A set of fields under one name.\n *\n * **The platform does the work.** The element is a native `fieldset` and the\n * name is a native `legend` — the technique the APG's naming practice calls for\n * under its Rule 3, prefer native techniques — so the `group` role and the\n * accessible name arrive without a single ARIA attribute. `disabled` is the\n * native attribute, and every control inside is disabled by the browser with\n * nothing passed down.\n *\n * **What is said about the set is said before the set.** The description and\n * the error come between the legend and the fields, which is where GOV.UK's\n * fieldset example puts a hint and an error, and the opposite of where a single\n * field puts its own. A message the page did not write is not drawn, which is\n * the DOM React's `FieldGroupDescription` and `FieldGroupError` produce.\n *\n * **`aria-describedby` goes on the fieldset.** A reader entering any control in\n * the group hears the group's hint and its error once, from the element that\n * names them both. A message with no text — a reserved line waiting for its\n * text — keeps its box and is not named until the text arrives.\n *\n * **The group provides for its fields.** It answers `SlFieldDefaultsSource` for\n * its own subtree, so `size`, `labelPlacement`, `necessity`, the necessity\n * words, `disabled` and `readOnly` reach every field inside — the same six an\n * application sets once with `provideFieldDefaults()`. `required` is not among\n * them: it is a fact about one value, and a section cannot know it.\n */\n@Component({\n selector: 'fieldset[slFieldGroup]',\n standalone: true,\n exportAs: 'slFieldGroup',\n imports: [SlInlineMessage],\n template: `<ng-content select=\"[slFieldGroupLegend]\" />\n @if (description(); as message) {\n <p\n slInlineMessage\n [id]=\"ids().description\"\n [size]=\"messageSize()\"\n [mark]=\"message.mark() ?? 'none'\"\n [tone]=\"message.tone() ?? 'secondary'\"\n [live]=\"message.live() ?? 'off'\"\n [hideIcon]=\"message.hideIcon() ?? false\"\n [reserve]=\"message.reserve() ?? false\"\n [prefix]=\"message.prefix()\"\n >\n <ng-content select=\"[slFieldGroupDescription]\" />\n </p>\n }\n @if (error(); as message) {\n <p\n slInlineMessage\n [id]=\"ids().error\"\n [size]=\"messageSize()\"\n [mark]=\"message.mark() ?? 'none'\"\n [tone]=\"message.tone() ?? 'danger'\"\n [live]=\"message.live() ?? 'off'\"\n [hideIcon]=\"message.hideIcon() ?? false\"\n [reserve]=\"message.reserve() ?? false\"\n [prefix]=\"message.prefix()\"\n >\n <ng-content select=\"[slFieldGroupError]\" />\n </p>\n }\n <div data-part=\"content\" data-part-content=\"\"><ng-content /></div>`,\n styleUrl: '../../../styles/src/field-group/field-group.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SlFieldDefaultsSource, useExisting: forwardRef(() => SlFieldGroup) }],\n host: {\n 'data-ui': 'field-group',\n 'data-ui-field-group': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-kind]': 'kind()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-necessity]': 'resolvedNecessity()',\n '[attr.data-disabled]': \"disabled() === true ? '' : null\",\n '[attr.data-invalid]': \"invalid() === true ? '' : null\",\n '[attr.data-readonly]': \"readOnly() === true ? '' : null\",\n '[attr.data-required]': \"required() === true ? '' : null\",\n '[attr.disabled]': \"disabled() === true ? '' : null\",\n '[attr.aria-describedby]': 'describedBy()',\n },\n})\nexport class SlFieldGroup extends SlFieldDefaultsSource {\n /** Provided to every field inside. Defaults to the token, then to `md`. */\n readonly size = input<FieldSize | undefined>(undefined);\n /** How the fields inside flow. */\n readonly orientation = input<FieldGroupOrientation>('vertical');\n /** Provided to every field inside. Defaults to the token, then to `mark`. */\n readonly necessity = input<FieldNecessity | undefined>(undefined);\n /**\n * Words laid over the field catalog of the language in force for the\n * legend's own necessity word (`optional`, `required`). A field inside\n * states its own `messages`.\n */\n readonly messages = input<PartialMessages<FieldMessages> | undefined>(undefined);\n /** Provided to every field inside, unless the field states its own. */\n readonly labelPlacement = input<FieldLabelPlacement | undefined>(undefined);\n\n /**\n * The native attribute on the `fieldset`, which the platform propagates to\n * every control inside with nothing passed down. It is provided to the fields\n * as well, because the platform disables controls and a label is not one.\n */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** A `section` draws no necessity on its legend. */\n readonly kind = input<FieldGroupKind>('question');\n /** Unstated rather than `false`. Writes `data-invalid` on the fieldset. */\n readonly invalid = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** Draws the necessity marker on the legend, and is not provided to the fields. */\n readonly required = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** Provided to every field inside, unless the field states its own. */\n readonly readOnly = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n\n /**\n * The application's own defaults, or an outer group's. A group inside a group\n * answers for the inner one and inherits everything it does not restate.\n */\n private readonly outer = inject(SlFieldDefaultsSource, { optional: true, skipSelf: true });\n private readonly token = injectFieldDefaults();\n private readonly inherited = computed(() => this.outer?.fieldDefaults() ?? this.token);\n\n private readonly base =\n inject(new HostAttributeToken('id'), { optional: true }) ??\n `${inject(SlFieldIdFactory).next()}-group`;\n\n private readonly writtenDescribedBy = inject(new HostAttributeToken('aria-describedby'), {\n optional: true,\n });\n\n readonly ids = computed<FieldGroupIds>(() => ({\n description: `${this.base}-description`,\n error: `${this.base}-error`,\n legend: `${this.base}-legend`,\n }));\n\n /**\n * The group's own markers rather than the field's, and direct content rather\n * than any descendant — so a description written inside one of the fields is\n * never read as the set's.\n */\n protected readonly description = contentChild(SlFieldGroupDescription, { descendants: false });\n protected readonly error = contentChild(SlFieldGroupError, { descendants: false });\n\n readonly resolvedSize = computed(() => this.size() ?? this.inherited().size);\n readonly resolvedNecessity = computed(() => this.necessity() ?? this.inherited().necessity);\n /** The field family's words in the language in force, with the group's `messages` laid over them. */\n readonly t = injectMessages(fieldMessages, this.messages);\n\n /**\n * One step louder than a field's own. `inline-message` defines `md` as the\n * message of a section and `sm` as the message of a field, and what a group\n * says is about the section — held at the field's step, the sentence about a\n * whole set read as the help under the control above it.\n */\n protected readonly messageSize = computed<'sm' | 'md'>(() =>\n this.resolvedSize() === 'sm' ? 'sm' : 'md',\n );\n\n protected readonly describedBy = computed(() => {\n const parts = [\n this.writtenDescribedBy,\n this.description()?.hasContent() ? this.ids().description : undefined,\n this.error()?.hasContent() ? this.ids().error : undefined,\n ].filter(Boolean);\n return parts.length === 0 ? null : parts.join(' ');\n });\n\n /**\n * What every field inside reads instead of the application's own defaults.\n *\n * It is a method rather than a value handed over once, because Angular\n * creates every directive a template declares before it binds any input: a\n * group that provided a snapshot would hand its fields the value its inputs\n * held before the consumer's bindings ran.\n */\n fieldDefaults(): FieldDefaults {\n return {\n disabled: this.disabled() ?? this.inherited().disabled,\n labelPlacement: this.labelPlacement() ?? this.inherited().labelPlacement,\n necessity: this.resolvedNecessity(),\n readOnly: this.readOnly() ?? this.inherited().readOnly,\n size: this.resolvedSize(),\n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AAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,uBAAuB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACrD,iBAAiB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACtMnF;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"slotted-angular-field-group.mjs","sources":["../../field-group/src/field-group-parts.ts","../../field-group/src/field-group.ts","../../field-group/src/slotted-angular-field-group.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n HostAttributeToken,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { necessityMark, SlFieldMessage } from '@slotted/angular/field';\n\nimport { SlFieldGroup } from './field-group';\n\n/**\n * The name of the set, and whether the set has to be answered.\n *\n * It holds whatever the page puts in it. On a page asking one question GOV.UK\n * recommends the legend contain the page's own heading, so a reader hears the\n * question once rather than twice; the family removes the heading's block break\n * and its margins and leaves its type alone, because a page heading is a page's\n * decision rather than a control's.\n */\n@Component({\n selector: 'legend[slFieldGroupLegend]',\n standalone: true,\n exportAs: 'slFieldGroupLegend',\n template: `<ng-content />\n @if (mark(); as text) {\n <!-- Text rather than a margin, so the accessible name reads \"Note (optional)\". -->\n &ngsp;<span\n data-part=\"mark\"\n data-part-mark=\"\"\n [attr.aria-hidden]=\"markHidden() ? 'true' : null\"\n >{{ text }}</span\n >\n }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'legend',\n 'data-part-legend': '',\n '[attr.id]': 'legendId()',\n },\n})\nexport class SlFieldGroupLegend {\n private readonly group = inject(SlFieldGroup);\n private readonly writtenId = inject(new HostAttributeToken('id'), { optional: true });\n\n protected readonly legendId = computed(() => this.writtenId ?? this.group.ids().legend);\n private readonly necessity = computed(() =>\n this.group.kind() === 'section'\n ? null\n : necessityMark(this.group.resolvedNecessity(), this.group.required() === true, this.group.t),\n );\n protected readonly markHidden = computed(() => this.necessity()?.hidden === true);\n protected readonly mark = computed(() => this.necessity()?.text ?? null);\n}\n\n/**\n * Help about the whole set, projected into the `inline-message` the group\n * renders before its fields.\n *\n * It is a marker of the group's own rather than the field's, so a description\n * written inside one of the fields is never mistaken for the set's.\n */\n@Directive({\n selector: '[slFieldGroupDescription]',\n standalone: true,\n exportAs: 'slFieldGroupDescription',\n})\nexport class SlFieldGroupDescription extends SlFieldMessage {}\n\n/**\n * What is wrong with the set — the case a single field cannot state, because\n * \"choose at least one\" is a fact about the group rather than about any control\n * in it. GOV.UK's error-message-with-legend example is the same arrangement.\n */\n@Directive({\n selector: '[slFieldGroupError]',\n standalone: true,\n exportAs: 'slFieldGroupError',\n})\nexport class SlFieldGroupError extends SlFieldMessage {}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n injectFieldDefaults,\n SlFieldDefaultsSource,\n SlFieldIdFactory,\n} from '@slotted/angular/field';\nimport type {\n FieldDefaults,\n FieldLabelPlacement,\n FieldNecessity,\n FieldSize,\n} from '@slotted/angular/field';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport { SlInlineMessage } from '@slotted/angular/inline-message';\nimport { fieldMessages, type FieldMessages, type PartialMessages } from '@slotted/core/i18n';\n\nimport { SlFieldGroupDescription, SlFieldGroupError } from './field-group-parts';\n\n/**\n * Whether the group asks something. A `question` (a set of radios) states its\n * own necessity on the legend; a `section` (\"Address\") is a topic, and says\n * nothing about it.\n */\nexport type FieldGroupKind = 'question' | 'section';\n\n/** How the fields inside the group flow. */\nexport type FieldGroupOrientation = 'vertical' | 'horizontal';\n\n/** The three identifiers a group derives from one base. */\nexport interface FieldGroupIds {\n description: string;\n error: string;\n legend: string;\n}\n\n/**\n * A set of fields under one name.\n *\n * **The platform does the work.** The element is a native `fieldset` and the\n * name is a native `legend` — the technique the APG's naming practice calls for\n * under its Rule 3, prefer native techniques — so the `group` role and the\n * accessible name arrive without a single ARIA attribute. `disabled` is the\n * native attribute, and every control inside is disabled by the browser with\n * nothing passed down.\n *\n * **What is said about the set is said before the set.** The description and\n * the error come between the legend and the fields, which is where GOV.UK's\n * fieldset example puts a hint and an error, and the opposite of where a single\n * field puts its own. A message the page did not write is not drawn, which is\n * the DOM React's `FieldGroupDescription` and `FieldGroupError` produce.\n *\n * **`aria-describedby` goes on the fieldset.** A reader entering any control in\n * the group hears the group's hint and its error once, from the element that\n * names them both. A message with no text — a reserved line waiting for its\n * text — keeps its box and is not named until the text arrives.\n *\n * **The group provides for its fields.** It answers `SlFieldDefaultsSource` for\n * its own subtree, so `size`, `labelPlacement`, `necessity`, the necessity\n * words, `disabled` and `readOnly` reach every field inside — the same six an\n * application sets once with `provideFieldDefaults()`. `required` is not among\n * them: it is a fact about one value, and a section cannot know it.\n */\n@Component({\n selector: 'fieldset[slFieldGroup]',\n standalone: true,\n exportAs: 'slFieldGroup',\n imports: [SlInlineMessage],\n template: `<ng-content select=\"[slFieldGroupLegend]\" />\n @if (description(); as message) {\n <p\n slInlineMessage\n [id]=\"ids().description\"\n [size]=\"messageSize()\"\n [mark]=\"message.mark() ?? 'none'\"\n [tone]=\"message.tone() ?? 'secondary'\"\n [live]=\"message.live() ?? 'off'\"\n [hideIcon]=\"message.hideIcon() ?? false\"\n [reserve]=\"message.reserve() ?? false\"\n [prefix]=\"message.prefix()\"\n >\n <ng-content select=\"[slFieldGroupDescription]\" />\n </p>\n }\n @if (error(); as message) {\n <p\n slInlineMessage\n [id]=\"ids().error\"\n [size]=\"messageSize()\"\n [mark]=\"message.mark() ?? 'none'\"\n [tone]=\"message.tone() ?? 'danger'\"\n [live]=\"message.live() ?? 'off'\"\n [hideIcon]=\"message.hideIcon() ?? false\"\n [reserve]=\"message.reserve() ?? false\"\n [prefix]=\"message.prefix()\"\n >\n <ng-content select=\"[slFieldGroupError]\" />\n </p>\n }\n <div data-part=\"content\" data-part-content=\"\"><ng-content /></div>`,\n styleUrl: '../../../styles/src/field-group/field-group.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SlFieldDefaultsSource, useExisting: forwardRef(() => SlFieldGroup) }],\n host: {\n 'data-ui': 'field-group',\n 'data-ui-field-group': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-kind]': 'kind()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-necessity]': 'resolvedNecessity()',\n '[attr.data-disabled]': \"disabled() === true ? '' : null\",\n '[attr.data-invalid]': \"invalid() === true ? '' : null\",\n '[attr.data-readonly]': \"readOnly() === true ? '' : null\",\n '[attr.data-required]': \"required() === true ? '' : null\",\n '[attr.disabled]': \"disabled() === true ? '' : null\",\n '[attr.aria-describedby]': 'describedBy()',\n },\n})\nexport class SlFieldGroup extends SlFieldDefaultsSource {\n /** Provided to every field inside. Defaults to the token, then to `md`. */\n readonly size = input<FieldSize | undefined>(undefined);\n /** How the fields inside flow. */\n readonly orientation = input<FieldGroupOrientation>('vertical');\n /** Provided to every field inside. Defaults to the token, then to `mark`. */\n readonly necessity = input<FieldNecessity | undefined>(undefined);\n /**\n * Words laid over the field catalog of the language in force for the\n * legend's own necessity word (`optional`, `required`). A field inside\n * states its own `messages`.\n */\n readonly messages = input<PartialMessages<FieldMessages> | undefined>(undefined);\n /** Provided to every field inside, unless the field states its own. */\n readonly labelPlacement = input<FieldLabelPlacement | undefined>(undefined);\n\n /**\n * The native attribute on the `fieldset`, which the platform propagates to\n * every control inside with nothing passed down. It is provided to the fields\n * as well, because the platform disables controls and a label is not one.\n */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** A `section` draws no necessity on its legend. */\n readonly kind = input<FieldGroupKind>('question');\n /** Unstated rather than `false`. Writes `data-invalid` on the fieldset. */\n readonly invalid = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** Draws the necessity marker on the legend, and is not provided to the fields. */\n readonly required = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** Provided to every field inside, unless the field states its own. */\n readonly readOnly = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n\n /**\n * The application's own defaults, or an outer group's. A group inside a group\n * answers for the inner one and inherits everything it does not restate.\n */\n private readonly outer = inject(SlFieldDefaultsSource, { optional: true, skipSelf: true });\n private readonly token = injectFieldDefaults();\n private readonly inherited = computed(() => this.outer?.fieldDefaults() ?? this.token);\n\n private readonly base =\n inject(new HostAttributeToken('id'), { optional: true }) ??\n `${inject(SlFieldIdFactory).next()}-group`;\n\n private readonly writtenDescribedBy = inject(new HostAttributeToken('aria-describedby'), {\n optional: true,\n });\n\n readonly ids = computed<FieldGroupIds>(() => ({\n description: `${this.base}-description`,\n error: `${this.base}-error`,\n legend: `${this.base}-legend`,\n }));\n\n /**\n * The group's own markers rather than the field's, and direct content rather\n * than any descendant — so a description written inside one of the fields is\n * never read as the set's.\n */\n protected readonly description = contentChild(SlFieldGroupDescription, { descendants: false });\n protected readonly error = contentChild(SlFieldGroupError, { descendants: false });\n\n readonly resolvedSize = computed(() => this.size() ?? this.inherited().size);\n readonly resolvedNecessity = computed(() => this.necessity() ?? this.inherited().necessity);\n /** The field family's words in the language in force, with the group's `messages` laid over them. */\n readonly t = injectMessages(fieldMessages, this.messages);\n\n /**\n * One step louder than a field's own. `inline-message` defines `md` as the\n * message of a section and `sm` as the message of a field, and what a group\n * says is about the section — held at the field's step, the sentence about a\n * whole set read as the help under the control above it.\n */\n protected readonly messageSize = computed<'sm' | 'md'>(() =>\n this.resolvedSize() === 'sm' ? 'sm' : 'md',\n );\n\n protected readonly describedBy = computed(() => {\n const parts = [\n this.writtenDescribedBy,\n this.description()?.hasContent() ? this.ids().description : undefined,\n this.error()?.hasContent() ? this.ids().error : undefined,\n ].filter(Boolean);\n return parts.length === 0 ? null : parts.join(' ');\n });\n\n /**\n * What every field inside reads instead of the application's own defaults.\n *\n * It is a method rather than a value handed over once, because Angular\n * creates every directive a template declares before it binds any input: a\n * group that provided a snapshot would hand its fields the value its inputs\n * held before the consumer's bindings ran.\n */\n fieldDefaults(): FieldDefaults {\n return {\n disabled: this.disabled() ?? this.inherited().disabled,\n labelPlacement: this.labelPlacement() ?? this.inherited().labelPlacement,\n necessity: this.resolvedNecessity(),\n readOnly: this.readOnly() ?? this.inherited().readOnly,\n size: this.resolvedSize(),\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAaA;;;;;;;;AAQG;MAuBU,kBAAkB,CAAA;AACZ,IAAA,KAAK,GAAG,MAAM,CAAC,Y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A,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,uBAAuB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACrD,iBAAiB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACtMnF;;AAEG;;"}
|
|
@@ -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 {
|
|
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
|
|
69
|
-
|
|
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
|
-
|
|
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
|
|
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) =>
|
|
88
|
-
x:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
98
|
+
if (last === null)
|
|
99
|
+
return;
|
|
97
100
|
this.live.set(null);
|
|
98
|
-
|
|
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-
|
|
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,YAA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G;;"}
|
|
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,YAA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