@slotted/angular 0.1.0-beta.4 → 0.1.0-beta.6
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/AGENTS.snippet.md +2 -0
- package/docs/app-shell.examples.md +1 -1
- package/docs/app-shell.json +4 -4
- package/docs/app-shell.md +2 -2
- package/docs/guidelines/README.md +2 -2
- package/docs/guidelines/index.md +1 -1
- package/docs/guidelines/own-elements.md +1 -1
- package/docs/page-header.json +1 -0
- package/docs/page-header.md +1 -1
- package/docs/segmented-control.json +7 -11
- package/docs/segmented-control.md +1 -1
- package/docs/skills/build-own-element/SKILL.md +6 -6
- package/docs/skills/compose-screen/SKILL.md +6 -6
- package/docs/skills/review-screen/SKILL.md +6 -6
- package/docs/skills/theme-app/SKILL.md +1 -1
- package/docs/skills/waiting-states/SKILL.md +2 -2
- package/docs/tabs.json +16 -3
- package/docs/tabs.md +3 -2
- package/fesm2022/slotted-angular-app-shell.mjs +15 -9
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +7 -1
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +13 -3
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +4 -6
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +4 -6
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +4 -6
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +4 -6
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +7 -1
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-page-header.mjs +2 -2
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +7 -1
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-scroll-area.mjs +6 -2
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -1
- package/fesm2022/slotted-angular-segmented-control.mjs +2 -2
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +49 -17
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +2 -2
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +11 -4
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tabs.mjs +13 -6
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-picker.mjs +4 -6
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-range-picker.mjs +4 -6
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +7 -1
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-app-shell.d.ts +5 -3
- package/types/slotted-angular-app-shell.d.ts.map +1 -1
- package/types/slotted-angular-cascader.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +1 -0
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-date-picker.d.ts +0 -1
- package/types/slotted-angular-date-picker.d.ts.map +1 -1
- package/types/slotted-angular-date-range-picker.d.ts +0 -1
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-range-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-entity-picker.d.ts.map +1 -1
- package/types/slotted-angular-popover.d.ts.map +1 -1
- package/types/slotted-angular-scroll-area.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +12 -2
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +1 -0
- package/types/slotted-angular-table.d.ts.map +1 -1
- package/types/slotted-angular-tabs.d.ts +3 -4
- package/types/slotted-angular-tabs.d.ts.map +1 -1
- package/types/slotted-angular-time-picker.d.ts +0 -1
- package/types/slotted-angular-time-picker.d.ts.map +1 -1
- package/types/slotted-angular-time-range-picker.d.ts +0 -1
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-tooltip.d.ts.map +1 -1
|
@@ -285,7 +285,7 @@ class SlSegmentedControl {
|
|
|
285
285
|
], exportAs: ["slSegmentedControl"], ngImport: i0, template: `@if (checkedIndex() >= 0) {
|
|
286
286
|
<span data-part="indicator" aria-hidden="true"></span>
|
|
287
287
|
}
|
|
288
|
-
<ng-content />`, isInline: true, styles: ["@layer slotted.components{[data-ui=segmented-control][data-part=root]{--_count: var(--slotted-segmented-control-count, 1);--_index: var(--slotted-segmented-control-index, 0);--_height: var(--slotted-control-height-md, 34px);--_padding-inline: var(--slotted-control-padding-inline-md, 13px);--_font-size: var(--slotted-control-font-size-md, 13px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_gap: var(--slotted-control-gap-md, 8px);--_radius: var(--slotted-segmented-control-radius, var(--slotted-control-radius, 4px));--_border-width: var(--slotted-control-border-width, 1px);--_inset: var(--slotted-segmented-control-inset, var(--slotted-space-1, .125rem));--_inner: calc(var(--_height) - (var(--_inset) + var(--_border-width)) * 2);--_thumb-radius: max(calc(var(--_radius) - var(--_inset)), var(--slotted-radius-xs, 2px));--_travel: var(--slotted-duration-medium);background:var(--slotted-segmented-control-background, var(--slotted-control-surface, Field));border:var(--_border-width) solid var( --slotted-segmented-control-border-color, var(--slotted-control-border-color, ButtonBorder) );border-radius:var(--_radius);box-shadow:var(--slotted-segmented-control-shadow, var(--slotted-control-shadow, none));box-sizing:border-box;display:inline-grid;font-family:var(--slotted-control-font-family, system-ui, sans-serif);font-size:var(--_font-size);grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;isolation:isolate;min-inline-size:0;padding:var(--_inset);position:relative}[data-ui=segmented-control][data-part=root]:empty{display:none}[data-ui=segmented-control][data-part=root][data-size=sm]{--_height: var(--slotted-control-height-sm, 30px);--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_gap: var(--slotted-control-gap-sm, 6px)}[data-ui=segmented-control][data-part=root][data-size=lg]{--_height: var(--slotted-control-height-lg, 38px);--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_gap: var(--slotted-control-gap-lg, 8px)}[data-ui=segmented-control][data-part=root][data-orientation=vertical]{grid-auto-columns:auto;grid-auto-flow:row;grid-auto-rows:minmax(0,1fr)}[data-ui=segmented-control][data-part=root][data-full-width]{display:grid;inline-size:100%}[data-ui=segmented-control][data-part=root][data-condense=icons]{container-name:slotted-segmented-control;container-type:inline-size;display:grid;inline-size:100%}[data-ui=segmented-control] [data-part=item]{align-items:center;block-size:var(--_inner);border-radius:var(--_thumb-radius);box-sizing:border-box;color:var(--slotted-segmented-control-color, var(--slotted-text, ButtonText));cursor:pointer;display:flex;font-weight:var(--slotted-control-font-weight, 600);gap:var(--_gap);justify-content:center;letter-spacing:var(--slotted-control-letter-spacing, 0);line-height:var(--slotted-control-line-height, 1);min-inline-size:max(var(--_inner),var(--slotted-target-min, 24px));padding-inline:var(--_padding-inline);position:relative;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);z-index:1}[data-ui=segmented-control] [data-part=item]:not(:has([data-part=label]:not(:empty))){padding-inline:0}[data-ui=segmented-control] [data-part=label]:empty{display:none}[data-ui=segmented-control] [data-part=item]+[data-part=item]:before{background:var(--slotted-segmented-control-divider-color, var(--slotted-border-subtle));content:\"\";inline-size:var(--_border-width);inset-block:22%;inset-inline-start:0;position:absolute;transition:opacity var(--_travel) var(--slotted-easing-standard)}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=item]+[data-part=item]:before{block-size:var(--_border-width);inline-size:auto;inset-block:auto;inset-block-start:0;inset-inline:22%}[data-ui=segmented-control] [data-part=item][data-checked]:before,[data-ui=segmented-control] [data-part=item][data-checked]+[data-part=item]:before{opacity:0}[data-ui=segmented-control] [data-part=control]{appearance:none;background:none;border:0;border-radius:inherit;cursor:inherit;inset-block:calc(-1 * (var(--_inset) + var(--_border-width)));inset-inline:0;margin:0;opacity:0;padding:0;position:absolute}[data-ui=segmented-control] [data-part=icon]{block-size:var(--_icon-size);display:inline-flex;flex:none;inline-size:var(--_icon-size)}[data-ui=segmented-control] [data-part=label]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui=segmented-control] [data-part=indicator]{background:var( --slotted-segmented-control-indicator-background, var(--slotted-tone-accent-subtle-active, Highlight) );block-size:calc(100% - var(--_inset) * 2);border:var(--_border-width) solid var( --slotted-segmented-control-indicator-border-color, var(--slotted-tone-accent-border, Highlight) );border-radius:var(--_thumb-radius);box-shadow:var(--slotted-control-shadow, none);box-sizing:border-box;inline-size:calc((100% - var(--_inset) * 2) / var(--_count));inset-block-start:var(--_inset);inset-inline-start:var(--_inset);pointer-events:none;position:absolute;transition:opacity var(--slotted-control-transition-duration) var(--slotted-easing-standard),translate var(--_travel) var(--slotted-easing-standard);translate:calc(var(--_index) * 100%);z-index:0}@starting-style{[data-ui=segmented-control] [data-part=indicator]{opacity:0}}[data-ui=segmented-control] [data-part=indicator]:dir(rtl){translate:calc(var(--_index) * -100%)}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=indicator]{block-size:calc((100% - var(--_inset) * 2) / var(--_count));inline-size:calc(100% - var(--_inset) * 2);translate:0 calc(var(--_index) * 100%)}[data-ui=segmented-control] [data-part=item][data-checked]{color:var( --slotted-segmented-control-checked-color, var(--slotted-tone-accent-text, HighlightText) )}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:var( --slotted-segmented-control-hover-background, var(--slotted-tone-secondary-subtle-hover, ButtonFace) )}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:var( --slotted-segmented-control-active-background, var(--slotted-tone-secondary-subtle-active, ButtonFace) );transition-duration:var(--slotted-duration-instant)}[data-ui=segmented-control] [data-part=item]:has([data-part=control]:focus-visible){outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-width, 2px));z-index:2}[data-ui=segmented-control] [data-part=control]:focus-visible{outline:none}[data-ui=segmented-control][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-segmented-control-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) );border-color:var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) );--_invalid-edge-width: var( --slotted-segmented-control-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px) );box-shadow:inset 0 0 0 var(--_invalid-edge-width) var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) )}[data-ui=segmented-control][data-part=root][data-readonly] [data-part=item],[data-ui=segmented-control][data-part=root][data-readonly] [data-part=control]{cursor:default}[data-ui=segmented-control] [data-part=item][data-disabled]{color:var( --slotted-segmented-control-disabled-color, var(--slotted-disabled-foreground, GrayText) );cursor:default}[data-ui=segmented-control] [data-part=control]:disabled{cursor:default}[data-ui=segmented-control][data-part=root][data-disabled]{border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) )}[data-ui=segmented-control][data-part=root][data-disabled] [data-part=indicator]{background:var( --slotted-segmented-control-disabled-indicator-background, var(--slotted-disabled-background, ButtonFace) );border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) );box-shadow:none}[data-ui=segmented-control][data-part=root][data-variant=underline]{--_inner: var(--_height);background:none;border:0;border-radius:0;box-shadow:none;column-gap:var(--slotted-segmented-control-underline-gap, var(--slotted-space-6, 1rem));grid-auto-columns:auto;padding:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=indicator],[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]+[data-part=item]:before{display:none}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]{color:var(--slotted-segmented-control-underline-color, var(--slotted-text-muted, GrayText));font-weight:var(--slotted-font-weight-medium, 500);min-inline-size:var(--slotted-target-min, 24px);padding-inline:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked]{color:var( --slotted-segmented-control-underline-checked-color, var(--slotted-text, CanvasText) )}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked] [data-part=label]{text-decoration-color:currentColor;text-decoration-line:underline;text-decoration-thickness:var(--slotted-border-width-thick, 2px);text-underline-offset:.35em}[data-ui=segmented-control][data-part=root][data-variant=underline][data-invalid] [data-part=item][data-checked] [data-part=label]{text-decoration-color:var(--slotted-tone-danger-border, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled),[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:none;color:var(--slotted-text, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]:has([data-part=control]:focus-visible){outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-disabled]{color:var(--slotted-disabled-foreground, GrayText)}@container slotted-segmented-control (max-inline-size: 20rem){[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]) [data-part=label]{block-size:1px;clip-path:inset(50%);inline-size:1px;overflow:hidden;position:absolute;white-space:nowrap}[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]){padding-inline:0}}@media(forced-colors:active){[data-ui=segmented-control][data-part=root][data-invalid]{outline:var(--_invalid-edge-width) solid CanvasText;outline-offset:calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)))}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
288
|
+
<ng-content />`, isInline: true, styles: ["@layer slotted.components{[data-ui=segmented-control][data-part=root]{--_count: var(--slotted-segmented-control-count, 1);--_index: var(--slotted-segmented-control-index, 0);--_height: var(--slotted-control-height-md, 34px);--_padding-inline: var(--slotted-control-padding-inline-md, 13px);--_font-size: var(--slotted-control-font-size-md, 13px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_gap: var(--slotted-control-gap-md, 8px);--_radius: var(--slotted-segmented-control-radius, var(--slotted-control-radius, 4px));--_border-width: var(--slotted-control-border-width, 1px);--_inset: var(--slotted-segmented-control-inset, var(--slotted-space-1, .125rem));--_inner: calc(var(--_height) - (var(--_inset) + var(--_border-width)) * 2);--_spacing: var(--slotted-segmented-control-gap, var(--_inset));--_thumb-radius: max(calc(var(--_radius) - var(--_inset)), var(--slotted-radius-xs, 2px));--_travel: var(--slotted-duration-medium);background:var( --slotted-segmented-control-background, color-mix(in oklab, var(--slotted-text, CanvasText) 6%, transparent) );border:var(--_border-width) solid var(--slotted-segmented-control-border-color, transparent);border-radius:var(--_radius);box-shadow:var(--slotted-segmented-control-shadow, none);box-sizing:border-box;display:inline-grid;font-family:var(--slotted-control-font-family, system-ui, sans-serif);font-size:var(--_font-size);gap:var(--_spacing);grid-auto-columns:minmax(max(var(--_inner),var(--slotted-target-min, 24px)),1fr);grid-auto-flow:column;isolation:isolate;min-inline-size:0;padding:var(--_inset);position:relative}[data-ui=segmented-control][data-part=root]:empty{display:none}[data-ui=segmented-control][data-part=root][data-size=sm]{--_height: var(--slotted-control-height-sm, 30px);--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_gap: var(--slotted-control-gap-sm, 6px)}[data-ui=segmented-control][data-part=root][data-size=lg]{--_height: var(--slotted-control-height-lg, 38px);--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_gap: var(--slotted-control-gap-lg, 8px)}[data-ui=segmented-control][data-part=root][data-orientation=vertical]{grid-auto-columns:auto;grid-auto-flow:row;grid-auto-rows:minmax(0,1fr)}[data-ui=segmented-control][data-part=root][data-full-width]{display:grid;inline-size:100%}[data-ui=segmented-control][data-part=root][data-condense=icons]{container-name:slotted-segmented-control;container-type:inline-size;display:grid;inline-size:100%}[data-ui=segmented-control] [data-part=item]{align-items:center;block-size:var(--_inner);border-radius:var(--_thumb-radius);box-sizing:border-box;color:var(--slotted-segmented-control-color, var(--slotted-text, ButtonText));cursor:pointer;display:flex;font-weight:var( --slotted-segmented-control-font-weight, var(--slotted-font-weight-medium, 500) );gap:var(--_gap);justify-content:center;letter-spacing:var(--slotted-control-letter-spacing, 0);line-height:var(--slotted-control-line-height, 1);min-inline-size:0;padding-inline:var(--_padding-inline);position:relative;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=segmented-control] [data-part=item]:after{background:transparent;border-radius:inherit;content:\"\";inset:0;position:absolute;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);z-index:-1}[data-ui=segmented-control] [data-part=item]:not(:has([data-part=label]:not(:empty))){padding-inline:0}[data-ui=segmented-control] [data-part=label]:empty{display:none}[data-ui=segmented-control] [data-part=item]+[data-part=item]:before{background:var( --slotted-segmented-control-divider-color, color-mix(in oklab, var(--slotted-text) 14%, transparent) );border-radius:var(--slotted-radius-full, 9999px);content:\"\";inline-size:var(--_border-width);inset-block:25%;inset-inline-start:calc((var(--_spacing) + var(--_border-width)) / -2);position:absolute;transition:opacity var(--_travel) var(--slotted-easing-standard);z-index:-1}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=item]+[data-part=item]:before{block-size:var(--_border-width);inline-size:auto;inset-block:calc((var(--_spacing) + var(--_border-width)) / -2) auto;inset-inline:25%}[data-ui=segmented-control] [data-part=item][data-checked]:before,[data-ui=segmented-control] [data-part=item][data-checked]+[data-part=item]:before,[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:has([data-part=control]:enabled):before,[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:has([data-part=control]:enabled)+[data-part=item]:before{opacity:0}[data-ui=segmented-control] [data-part=control]{appearance:none;background:none;border:0;border-radius:inherit;cursor:inherit;inset-block:calc(-1 * (var(--_inset) + var(--_border-width)));inset-inline:calc(var(--_spacing) / -2);margin:0;opacity:0;padding:0;position:absolute}[data-ui=segmented-control] [data-part=icon]{block-size:var(--_icon-size);display:inline-flex;flex:none;inline-size:var(--_icon-size)}[data-ui=segmented-control] [data-part=label]{min-inline-size:0;overflow-x:clip;text-overflow:ellipsis;white-space:nowrap}[data-ui=segmented-control] [data-part=indicator]{background:var( --slotted-segmented-control-indicator-background, light-dark( var(--slotted-surface-raised, Canvas), color-mix( in oklab, var(--slotted-text, CanvasText) 14%, var(--slotted-surface-raised, Canvas) ) ) );block-size:calc(100% - var(--_inset) * 2);border:var(--_border-width) solid var( --slotted-segmented-control-indicator-border-color, color-mix(in oklab, var(--slotted-text, CanvasText) 10%, transparent) );border-radius:var(--_thumb-radius);box-shadow:var(--slotted-segmented-control-indicator-shadow, var(--slotted-shadow-xs, none));box-sizing:border-box;inline-size:calc((100% - var(--_inset) * 2 - var(--_spacing) * (var(--_count) - 1)) / var(--_count));inset-block-start:var(--_inset);inset-inline-start:var(--_inset);pointer-events:none;position:absolute;transition:opacity var(--slotted-control-transition-duration) var(--slotted-easing-standard),translate var(--_travel) var(--slotted-easing-standard);translate:calc(var(--_index) * (100% + var(--_spacing)));z-index:0}@starting-style{[data-ui=segmented-control] [data-part=indicator]{opacity:0}}[data-ui=segmented-control] [data-part=indicator]:dir(rtl){translate:calc(var(--_index) * (-100% - var(--_spacing)))}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=indicator]{block-size:calc((100% - var(--_inset) * 2 - var(--_spacing) * (var(--_count) - 1)) / var(--_count));inline-size:calc(100% - var(--_inset) * 2);translate:0 calc(var(--_index) * (100% + var(--_spacing)))}[data-ui=segmented-control] [data-part=item][data-checked]{color:var(--slotted-segmented-control-checked-color, var(--slotted-text, CanvasText))}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled):after{background:var( --slotted-segmented-control-hover-background, color-mix(in oklab, var(--slotted-text) 5%, transparent) )}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled):after{background:var( --slotted-segmented-control-active-background, color-mix(in oklab, var(--slotted-text) 9%, transparent) );transition-duration:var(--slotted-duration-instant)}[data-ui=segmented-control] [data-part=item]:has([data-part=control]:focus-visible){outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-width, 2px));z-index:2}[data-ui=segmented-control] [data-part=control]:focus-visible{outline:none}[data-ui=segmented-control][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-segmented-control-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) );border-color:var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) );--_invalid-edge-width: var( --slotted-segmented-control-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px) );box-shadow:inset 0 0 0 var(--_invalid-edge-width) var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) )}[data-ui=segmented-control][data-part=root][data-readonly] [data-part=item],[data-ui=segmented-control][data-part=root][data-readonly] [data-part=control]{cursor:default}[data-ui=segmented-control] [data-part=item][data-disabled]{color:var( --slotted-segmented-control-disabled-color, var(--slotted-disabled-foreground, GrayText) );cursor:default}[data-ui=segmented-control] [data-part=control]:disabled{cursor:default}[data-ui=segmented-control][data-part=root][data-disabled]{border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) )}[data-ui=segmented-control][data-part=root][data-disabled] [data-part=indicator]{background:var( --slotted-segmented-control-disabled-indicator-background, var(--slotted-disabled-background, ButtonFace) );border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) );box-shadow:none}[data-ui=segmented-control][data-part=root][data-variant=underline]{--_inner: var(--_height);background:none;border:0;border-radius:0;box-shadow:none;column-gap:var(--slotted-segmented-control-underline-gap, var(--slotted-space-6, 1rem));grid-auto-columns:auto;padding:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=indicator],[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]+[data-part=item]:before,[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]:after{display:none}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]{color:var(--slotted-segmented-control-underline-color, var(--slotted-text-muted, GrayText));font-weight:var(--slotted-font-weight-medium, 500);min-inline-size:var(--slotted-target-min, 24px);padding-inline:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked]{color:var( --slotted-segmented-control-underline-checked-color, var(--slotted-text, CanvasText) )}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked] [data-part=label]{text-decoration-color:currentColor;text-decoration-line:underline;text-decoration-thickness:var(--slotted-border-width-thick, 2px);text-underline-offset:.35em}[data-ui=segmented-control][data-part=root][data-variant=underline][data-invalid] [data-part=item][data-checked] [data-part=label]{text-decoration-color:var(--slotted-tone-danger-border, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled),[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:none;color:var(--slotted-text, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]:has([data-part=control]:focus-visible){outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-disabled]{color:var(--slotted-disabled-foreground, GrayText)}@container slotted-segmented-control (max-inline-size: 20rem){[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]) [data-part=label]{block-size:1px;clip-path:inset(50%);inline-size:1px;overflow:hidden;position:absolute;white-space:nowrap}[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]){padding-inline:0}}@media(forced-colors:active){[data-ui=segmented-control][data-part=root]:not([data-variant=underline]){border-color:ButtonBorder}[data-ui=segmented-control] [data-part=indicator]{border-color:Highlight}[data-ui=segmented-control][data-part=root][data-invalid]{outline:var(--_invalid-edge-width) solid CanvasText;outline-offset:calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)))}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
289
289
|
}
|
|
290
290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlSegmentedControl, decorators: [{
|
|
291
291
|
type: Component,
|
|
@@ -315,7 +315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
315
315
|
'[attr.aria-orientation]': 'ariaOrientation()',
|
|
316
316
|
'[style.--slotted-segmented-control-count]': 'count()',
|
|
317
317
|
'[style.--slotted-segmented-control-index]': 'indexProperty()',
|
|
318
|
-
}, styles: ["@layer slotted.components{[data-ui=segmented-control][data-part=root]{--_count: var(--slotted-segmented-control-count, 1);--_index: var(--slotted-segmented-control-index, 0);--_height: var(--slotted-control-height-md, 34px);--_padding-inline: var(--slotted-control-padding-inline-md, 13px);--_font-size: var(--slotted-control-font-size-md, 13px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_gap: var(--slotted-control-gap-md, 8px);--_radius: var(--slotted-segmented-control-radius, var(--slotted-control-radius, 4px));--_border-width: var(--slotted-control-border-width, 1px);--_inset: var(--slotted-segmented-control-inset, var(--slotted-space-1, .125rem));--_inner: calc(var(--_height) - (var(--_inset) + var(--_border-width)) * 2);--_thumb-radius: max(calc(var(--_radius) - var(--_inset)), var(--slotted-radius-xs, 2px));--_travel: var(--slotted-duration-medium);background:var(--slotted-segmented-control-background, var(--slotted-control-surface, Field));border:var(--_border-width) solid var( --slotted-segmented-control-border-color, var(--slotted-control-border-color, ButtonBorder) );border-radius:var(--_radius);box-shadow:var(--slotted-segmented-control-shadow, var(--slotted-control-shadow, none));box-sizing:border-box;display:inline-grid;font-family:var(--slotted-control-font-family, system-ui, sans-serif);font-size:var(--_font-size);grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;isolation:isolate;min-inline-size:0;padding:var(--_inset);position:relative}[data-ui=segmented-control][data-part=root]:empty{display:none}[data-ui=segmented-control][data-part=root][data-size=sm]{--_height: var(--slotted-control-height-sm, 30px);--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_gap: var(--slotted-control-gap-sm, 6px)}[data-ui=segmented-control][data-part=root][data-size=lg]{--_height: var(--slotted-control-height-lg, 38px);--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_gap: var(--slotted-control-gap-lg, 8px)}[data-ui=segmented-control][data-part=root][data-orientation=vertical]{grid-auto-columns:auto;grid-auto-flow:row;grid-auto-rows:minmax(0,1fr)}[data-ui=segmented-control][data-part=root][data-full-width]{display:grid;inline-size:100%}[data-ui=segmented-control][data-part=root][data-condense=icons]{container-name:slotted-segmented-control;container-type:inline-size;display:grid;inline-size:100%}[data-ui=segmented-control] [data-part=item]{align-items:center;block-size:var(--_inner);border-radius:var(--_thumb-radius);box-sizing:border-box;color:var(--slotted-segmented-control-color, var(--slotted-text, ButtonText));cursor:pointer;display:flex;font-weight:var(--slotted-control-font-weight, 600);gap:var(--_gap);justify-content:center;letter-spacing:var(--slotted-control-letter-spacing, 0);line-height:var(--slotted-control-line-height, 1);min-inline-size:max(var(--_inner),var(--slotted-target-min, 24px));padding-inline:var(--_padding-inline);position:relative;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);z-index:1}[data-ui=segmented-control] [data-part=item]:not(:has([data-part=label]:not(:empty))){padding-inline:0}[data-ui=segmented-control] [data-part=label]:empty{display:none}[data-ui=segmented-control] [data-part=item]+[data-part=item]:before{background:var(--slotted-segmented-control-divider-color, var(--slotted-border-subtle));content:\"\";inline-size:var(--_border-width);inset-block:22%;inset-inline-start:0;position:absolute;transition:opacity var(--_travel) var(--slotted-easing-standard)}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=item]+[data-part=item]:before{block-size:var(--_border-width);inline-size:auto;inset-block:auto;inset-block-start:0;inset-inline:22%}[data-ui=segmented-control] [data-part=item][data-checked]:before,[data-ui=segmented-control] [data-part=item][data-checked]+[data-part=item]:before{opacity:0}[data-ui=segmented-control] [data-part=control]{appearance:none;background:none;border:0;border-radius:inherit;cursor:inherit;inset-block:calc(-1 * (var(--_inset) + var(--_border-width)));inset-inline:0;margin:0;opacity:0;padding:0;position:absolute}[data-ui=segmented-control] [data-part=icon]{block-size:var(--_icon-size);display:inline-flex;flex:none;inline-size:var(--_icon-size)}[data-ui=segmented-control] [data-part=label]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui=segmented-control] [data-part=indicator]{background:var( --slotted-segmented-control-indicator-background, var(--slotted-tone-accent-subtle-active, Highlight) );block-size:calc(100% - var(--_inset) * 2);border:var(--_border-width) solid var( --slotted-segmented-control-indicator-border-color, var(--slotted-tone-accent-border, Highlight) );border-radius:var(--_thumb-radius);box-shadow:var(--slotted-control-shadow, none);box-sizing:border-box;inline-size:calc((100% - var(--_inset) * 2) / var(--_count));inset-block-start:var(--_inset);inset-inline-start:var(--_inset);pointer-events:none;position:absolute;transition:opacity var(--slotted-control-transition-duration) var(--slotted-easing-standard),translate var(--_travel) var(--slotted-easing-standard);translate:calc(var(--_index) * 100%);z-index:0}@starting-style{[data-ui=segmented-control] [data-part=indicator]{opacity:0}}[data-ui=segmented-control] [data-part=indicator]:dir(rtl){translate:calc(var(--_index) * -100%)}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=indicator]{block-size:calc((100% - var(--_inset) * 2) / var(--_count));inline-size:calc(100% - var(--_inset) * 2);translate:0 calc(var(--_index) * 100%)}[data-ui=segmented-control] [data-part=item][data-checked]{color:var( --slotted-segmented-control-checked-color, var(--slotted-tone-accent-text, HighlightText) )}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:var( --slotted-segmented-control-hover-background, var(--slotted-tone-secondary-subtle-hover, ButtonFace) )}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:var( --slotted-segmented-control-active-background, var(--slotted-tone-secondary-subtle-active, ButtonFace) );transition-duration:var(--slotted-duration-instant)}[data-ui=segmented-control] [data-part=item]:has([data-part=control]:focus-visible){outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-width, 2px));z-index:2}[data-ui=segmented-control] [data-part=control]:focus-visible{outline:none}[data-ui=segmented-control][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-segmented-control-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) );border-color:var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) );--_invalid-edge-width: var( --slotted-segmented-control-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px) );box-shadow:inset 0 0 0 var(--_invalid-edge-width) var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) )}[data-ui=segmented-control][data-part=root][data-readonly] [data-part=item],[data-ui=segmented-control][data-part=root][data-readonly] [data-part=control]{cursor:default}[data-ui=segmented-control] [data-part=item][data-disabled]{color:var( --slotted-segmented-control-disabled-color, var(--slotted-disabled-foreground, GrayText) );cursor:default}[data-ui=segmented-control] [data-part=control]:disabled{cursor:default}[data-ui=segmented-control][data-part=root][data-disabled]{border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) )}[data-ui=segmented-control][data-part=root][data-disabled] [data-part=indicator]{background:var( --slotted-segmented-control-disabled-indicator-background, var(--slotted-disabled-background, ButtonFace) );border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) );box-shadow:none}[data-ui=segmented-control][data-part=root][data-variant=underline]{--_inner: var(--_height);background:none;border:0;border-radius:0;box-shadow:none;column-gap:var(--slotted-segmented-control-underline-gap, var(--slotted-space-6, 1rem));grid-auto-columns:auto;padding:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=indicator],[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]+[data-part=item]:before{display:none}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]{color:var(--slotted-segmented-control-underline-color, var(--slotted-text-muted, GrayText));font-weight:var(--slotted-font-weight-medium, 500);min-inline-size:var(--slotted-target-min, 24px);padding-inline:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked]{color:var( --slotted-segmented-control-underline-checked-color, var(--slotted-text, CanvasText) )}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked] [data-part=label]{text-decoration-color:currentColor;text-decoration-line:underline;text-decoration-thickness:var(--slotted-border-width-thick, 2px);text-underline-offset:.35em}[data-ui=segmented-control][data-part=root][data-variant=underline][data-invalid] [data-part=item][data-checked] [data-part=label]{text-decoration-color:var(--slotted-tone-danger-border, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled),[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:none;color:var(--slotted-text, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]:has([data-part=control]:focus-visible){outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-disabled]{color:var(--slotted-disabled-foreground, GrayText)}@container slotted-segmented-control (max-inline-size: 20rem){[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]) [data-part=label]{block-size:1px;clip-path:inset(50%);inline-size:1px;overflow:hidden;position:absolute;white-space:nowrap}[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]){padding-inline:0}}@media(forced-colors:active){[data-ui=segmented-control][data-part=root][data-invalid]{outline:var(--_invalid-edge-width) solid CanvasText;outline-offset:calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)))}}}\n"] }]
|
|
318
|
+
}, styles: ["@layer slotted.components{[data-ui=segmented-control][data-part=root]{--_count: var(--slotted-segmented-control-count, 1);--_index: var(--slotted-segmented-control-index, 0);--_height: var(--slotted-control-height-md, 34px);--_padding-inline: var(--slotted-control-padding-inline-md, 13px);--_font-size: var(--slotted-control-font-size-md, 13px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_gap: var(--slotted-control-gap-md, 8px);--_radius: var(--slotted-segmented-control-radius, var(--slotted-control-radius, 4px));--_border-width: var(--slotted-control-border-width, 1px);--_inset: var(--slotted-segmented-control-inset, var(--slotted-space-1, .125rem));--_inner: calc(var(--_height) - (var(--_inset) + var(--_border-width)) * 2);--_spacing: var(--slotted-segmented-control-gap, var(--_inset));--_thumb-radius: max(calc(var(--_radius) - var(--_inset)), var(--slotted-radius-xs, 2px));--_travel: var(--slotted-duration-medium);background:var( --slotted-segmented-control-background, color-mix(in oklab, var(--slotted-text, CanvasText) 6%, transparent) );border:var(--_border-width) solid var(--slotted-segmented-control-border-color, transparent);border-radius:var(--_radius);box-shadow:var(--slotted-segmented-control-shadow, none);box-sizing:border-box;display:inline-grid;font-family:var(--slotted-control-font-family, system-ui, sans-serif);font-size:var(--_font-size);gap:var(--_spacing);grid-auto-columns:minmax(max(var(--_inner),var(--slotted-target-min, 24px)),1fr);grid-auto-flow:column;isolation:isolate;min-inline-size:0;padding:var(--_inset);position:relative}[data-ui=segmented-control][data-part=root]:empty{display:none}[data-ui=segmented-control][data-part=root][data-size=sm]{--_height: var(--slotted-control-height-sm, 30px);--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_gap: var(--slotted-control-gap-sm, 6px)}[data-ui=segmented-control][data-part=root][data-size=lg]{--_height: var(--slotted-control-height-lg, 38px);--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_gap: var(--slotted-control-gap-lg, 8px)}[data-ui=segmented-control][data-part=root][data-orientation=vertical]{grid-auto-columns:auto;grid-auto-flow:row;grid-auto-rows:minmax(0,1fr)}[data-ui=segmented-control][data-part=root][data-full-width]{display:grid;inline-size:100%}[data-ui=segmented-control][data-part=root][data-condense=icons]{container-name:slotted-segmented-control;container-type:inline-size;display:grid;inline-size:100%}[data-ui=segmented-control] [data-part=item]{align-items:center;block-size:var(--_inner);border-radius:var(--_thumb-radius);box-sizing:border-box;color:var(--slotted-segmented-control-color, var(--slotted-text, ButtonText));cursor:pointer;display:flex;font-weight:var( --slotted-segmented-control-font-weight, var(--slotted-font-weight-medium, 500) );gap:var(--_gap);justify-content:center;letter-spacing:var(--slotted-control-letter-spacing, 0);line-height:var(--slotted-control-line-height, 1);min-inline-size:0;padding-inline:var(--_padding-inline);position:relative;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=segmented-control] [data-part=item]:after{background:transparent;border-radius:inherit;content:\"\";inset:0;position:absolute;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);z-index:-1}[data-ui=segmented-control] [data-part=item]:not(:has([data-part=label]:not(:empty))){padding-inline:0}[data-ui=segmented-control] [data-part=label]:empty{display:none}[data-ui=segmented-control] [data-part=item]+[data-part=item]:before{background:var( --slotted-segmented-control-divider-color, color-mix(in oklab, var(--slotted-text) 14%, transparent) );border-radius:var(--slotted-radius-full, 9999px);content:\"\";inline-size:var(--_border-width);inset-block:25%;inset-inline-start:calc((var(--_spacing) + var(--_border-width)) / -2);position:absolute;transition:opacity var(--_travel) var(--slotted-easing-standard);z-index:-1}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=item]+[data-part=item]:before{block-size:var(--_border-width);inline-size:auto;inset-block:calc((var(--_spacing) + var(--_border-width)) / -2) auto;inset-inline:25%}[data-ui=segmented-control] [data-part=item][data-checked]:before,[data-ui=segmented-control] [data-part=item][data-checked]+[data-part=item]:before,[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:has([data-part=control]:enabled):before,[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:has([data-part=control]:enabled)+[data-part=item]:before{opacity:0}[data-ui=segmented-control] [data-part=control]{appearance:none;background:none;border:0;border-radius:inherit;cursor:inherit;inset-block:calc(-1 * (var(--_inset) + var(--_border-width)));inset-inline:calc(var(--_spacing) / -2);margin:0;opacity:0;padding:0;position:absolute}[data-ui=segmented-control] [data-part=icon]{block-size:var(--_icon-size);display:inline-flex;flex:none;inline-size:var(--_icon-size)}[data-ui=segmented-control] [data-part=label]{min-inline-size:0;overflow-x:clip;text-overflow:ellipsis;white-space:nowrap}[data-ui=segmented-control] [data-part=indicator]{background:var( --slotted-segmented-control-indicator-background, light-dark( var(--slotted-surface-raised, Canvas), color-mix( in oklab, var(--slotted-text, CanvasText) 14%, var(--slotted-surface-raised, Canvas) ) ) );block-size:calc(100% - var(--_inset) * 2);border:var(--_border-width) solid var( --slotted-segmented-control-indicator-border-color, color-mix(in oklab, var(--slotted-text, CanvasText) 10%, transparent) );border-radius:var(--_thumb-radius);box-shadow:var(--slotted-segmented-control-indicator-shadow, var(--slotted-shadow-xs, none));box-sizing:border-box;inline-size:calc((100% - var(--_inset) * 2 - var(--_spacing) * (var(--_count) - 1)) / var(--_count));inset-block-start:var(--_inset);inset-inline-start:var(--_inset);pointer-events:none;position:absolute;transition:opacity var(--slotted-control-transition-duration) var(--slotted-easing-standard),translate var(--_travel) var(--slotted-easing-standard);translate:calc(var(--_index) * (100% + var(--_spacing)));z-index:0}@starting-style{[data-ui=segmented-control] [data-part=indicator]{opacity:0}}[data-ui=segmented-control] [data-part=indicator]:dir(rtl){translate:calc(var(--_index) * (-100% - var(--_spacing)))}[data-ui=segmented-control][data-part=root][data-orientation=vertical] [data-part=indicator]{block-size:calc((100% - var(--_inset) * 2 - var(--_spacing) * (var(--_count) - 1)) / var(--_count));inline-size:calc(100% - var(--_inset) * 2);translate:0 calc(var(--_index) * (100% + var(--_spacing)))}[data-ui=segmented-control] [data-part=item][data-checked]{color:var(--slotted-segmented-control-checked-color, var(--slotted-text, CanvasText))}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled):after{background:var( --slotted-segmented-control-hover-background, color-mix(in oklab, var(--slotted-text) 5%, transparent) )}[data-ui=segmented-control][data-part=root]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled):after{background:var( --slotted-segmented-control-active-background, color-mix(in oklab, var(--slotted-text) 9%, transparent) );transition-duration:var(--slotted-duration-instant)}[data-ui=segmented-control] [data-part=item]:has([data-part=control]:focus-visible){outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(-1 * var(--slotted-focus-ring-width, 2px));z-index:2}[data-ui=segmented-control] [data-part=control]:focus-visible{outline:none}[data-ui=segmented-control][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-segmented-control-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) );border-color:var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) );--_invalid-edge-width: var( --slotted-segmented-control-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px) );box-shadow:inset 0 0 0 var(--_invalid-edge-width) var( --slotted-segmented-control-invalid-border-color, var(--slotted-tone-danger-border, ButtonBorder) )}[data-ui=segmented-control][data-part=root][data-readonly] [data-part=item],[data-ui=segmented-control][data-part=root][data-readonly] [data-part=control]{cursor:default}[data-ui=segmented-control] [data-part=item][data-disabled]{color:var( --slotted-segmented-control-disabled-color, var(--slotted-disabled-foreground, GrayText) );cursor:default}[data-ui=segmented-control] [data-part=control]:disabled{cursor:default}[data-ui=segmented-control][data-part=root][data-disabled]{border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) )}[data-ui=segmented-control][data-part=root][data-disabled] [data-part=indicator]{background:var( --slotted-segmented-control-disabled-indicator-background, var(--slotted-disabled-background, ButtonFace) );border-color:var( --slotted-segmented-control-disabled-border-color, var(--slotted-disabled-border, GrayText) );box-shadow:none}[data-ui=segmented-control][data-part=root][data-variant=underline]{--_inner: var(--_height);background:none;border:0;border-radius:0;box-shadow:none;column-gap:var(--slotted-segmented-control-underline-gap, var(--slotted-space-6, 1rem));grid-auto-columns:auto;padding:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=indicator],[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]+[data-part=item]:before,[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]:after{display:none}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]{color:var(--slotted-segmented-control-underline-color, var(--slotted-text-muted, GrayText));font-weight:var(--slotted-font-weight-medium, 500);min-inline-size:var(--slotted-target-min, 24px);padding-inline:0}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked]{color:var( --slotted-segmented-control-underline-checked-color, var(--slotted-text, CanvasText) )}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-checked] [data-part=label]{text-decoration-color:currentColor;text-decoration-line:underline;text-decoration-thickness:var(--slotted-border-width-thick, 2px);text-underline-offset:.35em}[data-ui=segmented-control][data-part=root][data-variant=underline][data-invalid] [data-part=item][data-checked] [data-part=label]{text-decoration-color:var(--slotted-tone-danger-border, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:hover:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled),[data-ui=segmented-control][data-part=root][data-variant=underline]:not([data-readonly]) [data-part=item]:active:not([data-disabled]):not([data-checked]):has([data-part=control]:enabled){background:none;color:var(--slotted-text, CanvasText)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item]:has([data-part=control]:focus-visible){outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=segmented-control][data-part=root][data-variant=underline] [data-part=item][data-disabled]{color:var(--slotted-disabled-foreground, GrayText)}@container slotted-segmented-control (max-inline-size: 20rem){[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]) [data-part=label]{block-size:1px;clip-path:inset(50%);inline-size:1px;overflow:hidden;position:absolute;white-space:nowrap}[data-ui=segmented-control][data-part=root][data-condense=icons] [data-part=item]:has([data-part=icon]){padding-inline:0}}@media(forced-colors:active){[data-ui=segmented-control][data-part=root]:not([data-variant=underline]){border-color:ButtonBorder}[data-ui=segmented-control] [data-part=indicator]{border-color:Highlight}[data-ui=segmented-control][data-part=root][data-invalid]{outline:var(--_invalid-edge-width) solid CanvasText;outline-offset:calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)))}}}\n"] }]
|
|
319
319
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], condense: [{ type: i0.Input, args: [{ isSignal: true, alias: "condense", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
320
320
|
|
|
321
321
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotted-angular-segmented-control.mjs","sources":["../../segmented-control/src/segmented-control-defaults.ts","../../segmented-control/src/segmented-control.ts","../../segmented-control/src/segmented-control-parts.ts","../../segmented-control/src/slotted-angular-segmented-control.ts"],"sourcesContent":["import { inject, Injectable, InjectionToken } from '@angular/core';\n\n/** The type step the control and every segment inside it sit at. */\nexport type SegmentedControlSize = 'sm' | 'md' | 'lg';\n\n/** How the segments flow. The thumb travels along the same axis. */\nexport type SegmentedControlOrientation = 'horizontal' | 'vertical';\n\n/**\n * What the control does when it is narrower than its labels need. `icons`\n * keeps the marks and hides the words — hidden, never removed, so the\n * accessible name of every segment is the same at every width.\n */\nexport type SegmentedControlCondense = 'none' | 'icons';\n\n/**\n * How the choice is drawn. `track` is a box with a thumb behind the chosen\n * segment; `underline` is the words alone, the chosen one in the text colour\n * and underlined. The semantics are the same radio group in both.\n */\nexport type SegmentedControlVariant = 'track' | 'underline';\n\nexport interface SegmentedControlDefaults {\n condense: SegmentedControlCondense;\n fullWidth: boolean;\n orientation: SegmentedControlOrientation;\n size: SegmentedControlSize;\n variant: SegmentedControlVariant;\n}\n\nconst FALLBACK: SegmentedControlDefaults = {\n condense: 'none',\n fullWidth: false,\n orientation: 'horizontal',\n size: 'md',\n variant: 'track',\n};\n\nexport const SEGMENTED_CONTROL_DEFAULTS = new InjectionToken<SegmentedControlDefaults>(\n 'slotted segmented control defaults',\n { providedIn: 'root', factory: () => FALLBACK },\n);\n\n/**\n * An application decides once how its segmented controls are drawn, rather\n * than repeating the same inputs on every one of them. A control that states\n * any of them itself still wins, and a field around it outranks this token for\n * `size`.\n */\nexport function provideSegmentedControlDefaults(defaults: Partial<SegmentedControlDefaults>) {\n return {\n provide: SEGMENTED_CONTROL_DEFAULTS,\n useFactory: (): SegmentedControlDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\n/** What a segmented control renders as here, before it states anything of its own. */\nexport function injectSegmentedControlDefaults(): SegmentedControlDefaults {\n return inject(SEGMENTED_CONTROL_DEFAULTS);\n}\n\n/**\n * Application-scoped rather than module-scoped, for the reason `field`\n * records: a module-level counter produces colliding sequences when two\n * applications render in one server process, and the server and the client\n * sequences must match for hydration.\n *\n * It answers for the control's generated `name` as well as for each segment's\n * identifier, because both have to be stable across the two renders.\n */\n@Injectable({ providedIn: 'root' })\nexport class SlSegmentedControlIdFactory {\n private count = 0;\n\n next() {\n this.count += 1;\n return `slotted-segmented-control-${this.count}`;\n }\n}\n","import { createControllable } from '@slotted/core/state';\nimport type { ChangeRequest } from '@slotted/core/state';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { OnInit } from '@angular/core';\nimport { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type {\n AbstractControl,\n ControlValueAccessor,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport { SlField } from '@slotted/angular/field';\nimport { SlFieldGroup } from '@slotted/angular/field-group';\n\nimport {\n injectSegmentedControlDefaults,\n SlSegmentedControlIdFactory,\n} from './segmented-control-defaults';\nimport type {\n SegmentedControlCondense,\n SegmentedControlOrientation,\n SegmentedControlSize,\n SegmentedControlVariant,\n} from './segmented-control-defaults';\n\nexport type {\n SegmentedControlCondense,\n SegmentedControlDefaults,\n SegmentedControlOrientation,\n SegmentedControlSize,\n SegmentedControlVariant,\n} from './segmented-control-defaults';\n\n/** Why the value moved. A segmented control can produce exactly these two. */\nexport type SegmentedControlSelectionReason = 'pointer' | 'keyboard';\n\n/**\n * What the control needs from each segment, and nothing more.\n *\n * A structural type rather than the segment's class, so the control does not\n * import the component that injects it — the cycle `text-field` breaks with an\n * abstract class, broken here with the smaller thing that works.\n */\nexport interface SlSegmentedControlSegment {\n /** What this segment selects. */\n value: () => string;\n /** Writes this segment's element from the control's value. */\n syncElement(): void;\n}\n\n/**\n * One choice out of a few, applied at once, on a track.\n *\n * **The keyboard is the platform's, and that is why the segments share a\n * `name`.** Native radios in one form owner with one name already implement\n * the APG's Radio Group table: Tab lands on the checked segment or on the\n * first, `Space` checks, both arrow axes move focus and the selection\n * together, the set wraps, and disabled segments are skipped — in a\n * right-to-left document too.\n *\n * **The role is conditional, and the condition is the field group.** A\n * `field-group` is a `fieldset` with a `legend`, which is already a named\n * group; a `radiogroup` inside it is the same set announced twice. A `role`\n * the consumer wrote wins over both.\n *\n * **`readOnly` is enforced, because the platform has none.** A radio ignores\n * `readonly`, so the control refuses the change on the segment's own `click` —\n * the one event a pointer and `Space` share — and announces `aria-readonly`.\n *\n * **The thumb's place is the checked index, and the count is how many\n * segments registered.** Both are written as custom properties on the host, so\n * the stylesheet needs no measurement: the thumb is one column wide and moves\n * by its own width times the index.\n */\n@Component({\n selector: '[slSegmentedControl]',\n standalone: true,\n exportAs: 'slSegmentedControl',\n template: `@if (checkedIndex() >= 0) {\n <span data-part=\"indicator\" aria-hidden=\"true\"></span>\n }\n <ng-content />`,\n styleUrl: '../../../styles/src/segmented-control/segmented-control.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlSegmentedControl), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => SlSegmentedControl), multi: true },\n ],\n host: {\n 'data-ui': 'segmented-control',\n 'data-part': 'root',\n '[attr.role]': 'resolvedRole()',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-orientation]': 'resolvedOrientation()',\n '[attr.data-condense]': 'resolvedCondense()',\n '[attr.data-variant]': 'resolvedVariant()',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.data-full-width]': \"resolvedFullWidth() ? '' : null\",\n '[attr.data-disabled]': \"resolvedDisabled() === true ? '' : null\",\n '[attr.data-invalid]': \"resolvedInvalid() === true ? '' : null\",\n '[attr.data-readonly]': \"resolvedReadOnly() === true ? '' : null\",\n '[attr.aria-describedby]': 'describedBy()',\n '[attr.aria-invalid]': 'ariaInvalid()',\n '[attr.aria-readonly]': 'ariaReadOnly()',\n '[attr.aria-required]': 'ariaRequired()',\n '[attr.aria-orientation]': 'ariaOrientation()',\n '[style.--slotted-segmented-control-count]': 'count()',\n '[style.--slotted-segmented-control-index]': 'indexProperty()',\n },\n})\nexport class SlSegmentedControl implements ControlValueAccessor, OnInit, Validator {\n /** Present means the consumer owns the choice. */\n readonly value = input<string | undefined>(undefined);\n /** The value an uncontrolled control starts from, read once. */\n readonly defaultValue = input<string | undefined>(undefined);\n /**\n * The submission name the segments share, and the reason the platform\n * treats them as one radio group. Generated when it is not written, because\n * grouping is by name within the form owner and an unnamed set is not a set.\n */\n readonly name = input<string | undefined>(undefined);\n readonly size = input<SegmentedControlSize | undefined>(undefined);\n readonly orientation = input<SegmentedControlOrientation | undefined>(undefined);\n readonly condense = input<SegmentedControlCondense | undefined>(undefined);\n /** Defaults to the provider, then to `track`. */\n readonly variant = input<SegmentedControlVariant | undefined>(undefined);\n readonly fullWidth = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** Unstated rather than `false`, so the control defers to the field around it. */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n readonly readOnly = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n readonly invalid = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n readonly required = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n\n /**\n * One output for one transition. Its `previous` is `undefined` while nothing\n * has been chosen, which a request typed over `string` alone could not say.\n */\n readonly valueChange = output<ChangeRequest<string | undefined>>();\n\n private readonly field = inject(SlField, { optional: true });\n private readonly fieldGroup = inject(SlFieldGroup, { optional: true });\n private readonly defaults = injectSegmentedControlDefaults();\n private readonly generatedName = inject(SlSegmentedControlIdFactory).next();\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n /* A group has no element a label's for can reach, so inside a field the\n field's label names it where the root owns the role, unless the consumer\n named it themselves. */\n protected readonly labelledBy = computed(\n () =>\n this.writtenLabelledBy ??\n (this.writtenLabel === null && this.resolvedRole() !== null\n ? (this.field?.ids().label ?? null)\n : null),\n );\n private readonly writtenDescribedBy = inject(new HostAttributeToken('aria-describedby'), {\n optional: true,\n });\n\n private readonly segments = signal<readonly SlSegmentedControlSegment[]>([]);\n private readonly own = signal<string | undefined>(undefined);\n private readonly formDisabled = signal<boolean | undefined>(undefined);\n private onChangeFn: (value: string) => void = () => undefined;\n private onTouchedFn: () => void = () => undefined;\n\n readonly selection = computed(() => this.value() ?? this.own());\n readonly resolvedName = computed(() => this.name() ?? this.generatedName);\n\n /** How many segments the track holds, and which of them is checked. */\n readonly count = computed(() => this.segments().length);\n readonly checkedIndex = computed(() => {\n const current = this.selection();\n if (current === undefined) return -1;\n return this.segments().findIndex((segment) => segment.value() === current);\n });\n protected readonly indexProperty = computed(() => {\n const index = this.checkedIndex();\n return index < 0 ? null : index;\n });\n\n readonly resolvedSize = computed(\n () =>\n this.size() ??\n this.field?.resolvedSize() ??\n this.fieldGroup?.resolvedSize() ??\n this.defaults.size,\n );\n readonly resolvedOrientation = computed(() => this.orientation() ?? this.defaults.orientation);\n readonly resolvedCondense = computed(() => this.condense() ?? this.defaults.condense);\n readonly resolvedVariant = computed(() => this.variant() ?? this.defaults.variant);\n readonly resolvedFullWidth = computed(() => this.fullWidth() ?? this.defaults.fullWidth);\n readonly resolvedDisabled = computed(\n () => this.disabled() ?? this.formDisabled() ?? this.field?.resolvedDisabled(),\n );\n readonly resolvedReadOnly = computed(() => this.readOnly() ?? this.field?.resolvedReadOnly());\n readonly resolvedInvalid = computed(() => this.invalid() ?? this.field?.invalid());\n readonly resolvedRequired = computed(\n () => this.required() ?? this.field?.required() ?? this.fieldGroup?.required(),\n );\n\n protected readonly resolvedRole = computed(\n () => this.writtenRole ?? (this.fieldGroup === null ? 'radiogroup' : null),\n );\n protected readonly describedBy = computed(() => {\n const merged = [this.writtenDescribedBy, this.field?.describedBy()].filter(Boolean);\n return merged.length === 0 ? null : merged.join(' ');\n });\n protected readonly ariaInvalid = computed(() =>\n this.resolvedInvalid() === true ? 'true' : null,\n );\n protected readonly ariaReadOnly = computed(() =>\n this.resolvedReadOnly() === true ? 'true' : null,\n );\n protected readonly ariaRequired = computed(() =>\n this.resolvedRequired() === true ? 'true' : null,\n );\n /**\n * Only where the root owns the role, and only when the set flows the way\n * `radiogroup` does not already imply.\n */\n protected readonly ariaOrientation = computed(() =>\n this.resolvedRole() === 'radiogroup' && this.resolvedOrientation() === 'horizontal'\n ? 'horizontal'\n : null,\n );\n\n ngOnInit() {\n if (this.value() === undefined) this.own.set(this.defaultValue());\n }\n\n /** A segment joins the set, in the order the template holds it. */\n register(segment: SlSegmentedControlSegment) {\n this.segments.update((current) => [...current, segment]);\n }\n\n /** A segment leaves the set. */\n unregister(segment: SlSegmentedControlSegment) {\n this.segments.update((current) => current.filter((entry) => entry !== segment));\n }\n\n /**\n * Writes every segment's element from the value.\n *\n * The HTML standard's canceled activation behaviour for a radio restores the\n * *clicked* element and nothing else, so the option that was chosen before\n * the refused click stays unchecked. Angular writes a property binding only\n * when its value changes, and the neighbour's did not — the correction is\n * made here, which is the defect `radio-group` measured first.\n */\n restoreElements() {\n for (const segment of this.segments()) segment.syncElement();\n }\n\n /** Whether one value is the chosen one. Read by every segment in the set. */\n holds(value: string): boolean {\n return this.selection() === value;\n }\n\n /**\n * Asks the control to move to one value. Returns whether the value actually\n * moved — false while a consumer owns it, which is what tells the segment to\n * refuse the activation and let the platform put the element back.\n */\n select(value: string, reason: SegmentedControlSelectionReason, source: Event): boolean {\n if (this.resolvedReadOnly() === true) return false;\n\n let cancelled = false;\n const state = createControllable<string | undefined>({\n controlled: this.value(),\n initial: this.selection(),\n onRequest: (request) => {\n this.valueChange.emit(request);\n cancelled = request.cancelled;\n },\n });\n const moved = state.request(value, reason, source);\n if (cancelled || !moved) return false;\n this.own.set(value);\n this.onChangeFn(value);\n return true;\n }\n\n writeValue(value: string | null | undefined) {\n this.own.set(value ?? undefined);\n }\n\n registerOnChange(fn: (value: string) => void) {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean) {\n this.formDisabled.set(isDisabled);\n }\n\n /** Marks the set touched, which a segment calls when it loses focus. */\n markTouched() {\n this.onTouchedFn();\n }\n\n /**\n * The control owns validity over the set, which no single segment can see:\n * \"choose one\" is a fact about the set and not about any one option.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n if (this.resolvedRequired() !== true) return null;\n const value = control.value as string | null | undefined;\n return value === null || value === undefined || value === '' ? { required: true } : null;\n }\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n HostAttributeToken,\n inject,\n input,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SlSegmentedControl } from './segmented-control';\nimport { SlSegmentedControlIdFactory } from './segmented-control-defaults';\nimport type {\n SegmentedControlSelectionReason,\n SlSegmentedControlSegment,\n} from './segmented-control';\n\n/**\n * The mark a segment is drawn with, on the consumer's own element.\n *\n * A directive rather than a slot, so an `ng-icon`, an inline `svg` or a\n * `span` all work and none of them loses its own semantics. It is hidden from\n * the reading order, because the words beside it — or the `aria-label` on the\n * radio — are what a reader hears.\n */\n@Directive({\n selector: '[slSegmentIcon]',\n standalone: true,\n exportAs: 'slSegmentIcon',\n host: {\n 'data-part': 'icon',\n 'aria-hidden': 'true',\n },\n})\nexport class SlSegmentIcon {}\n\n/**\n * A click synthesised by the keyboard reports no detail; a real one reports\n * the click count. It is why `Space` and a pointer are told apart without a\n * key listener existing anywhere in the family.\n */\nfunction activationReason(event: Event): SegmentedControlSelectionReason {\n return event instanceof MouseEvent && event.detail === 0 ? 'keyboard' : 'pointer';\n}\n\n/**\n * One segment of the track.\n *\n * It is a part of `segmented-control` and not an entry point of its own:\n * outside a control it has no exclusive set to belong to, and the platform's\n * whole keyboard model is defined over the set. `SlSegmentedControl` is\n * injected without `optional`, so a segment written outside one fails at\n * construction rather than silently.\n *\n * The radio is real, visually hidden and left where it is: it covers the\n * segment and reaches the track's own edge, so the hit area is the control's\n * height rather than the thumb's.\n */\n@Component({\n selector: '[slSegment]',\n standalone: true,\n exportAs: 'slSegment',\n template: `<input\n #control\n data-part=\"control\"\n type=\"radio\"\n [attr.id]=\"controlId\"\n [attr.name]=\"control_.resolvedName()\"\n [attr.value]=\"value()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"writtenDescribedBy\"\n [attr.disabled]=\"disabledAttribute()\"\n [checked]=\"checked()\"\n (click)=\"onClick($event)\"\n (blur)=\"onBlur()\"\n />\n <ng-content select=\"[slSegmentIcon]\" />\n <span data-part=\"label\"><ng-content /></span>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'item',\n '[attr.data-checked]': \"checked() ? '' : null\",\n '[attr.data-disabled]': \"resolvedDisabled() === true ? '' : null\",\n },\n})\nexport class SlSegment implements SlSegmentedControlSegment {\n /** What this segment selects. It is what the control's value holds. */\n readonly value = input.required<string>();\n /** Unstated rather than `false`, so the segment defers to the control. */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n\n /**\n * The control the segment belongs to. Injected without `optional`, and\n * public because the template reads the shared name from it and a consumer\n * reaching the segment through `exportAs` may want the resolved step.\n *\n * The trailing underscore keeps the name off `value`, which is the input.\n */\n readonly control_ = inject(SlSegmentedControl);\n\n private readonly writtenId = inject(new HostAttributeToken('id'), { optional: true });\n /**\n * Read from the host and written onto the radio: the name of a segment whose\n * mark is its whole content belongs to the control that holds the focus, and\n * an `aria-label` left on the `label` element would name it twice.\n */\n protected readonly ariaLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n protected readonly writtenDescribedBy = inject(new HostAttributeToken('aria-describedby'), {\n optional: true,\n });\n private readonly element = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** The identifier the radio carries. A consumer's own wins. */\n readonly controlId = this.writtenId ?? inject(SlSegmentedControlIdFactory).next();\n\n readonly checked = computed(() => this.control_.holds(this.value()));\n readonly resolvedDisabled = computed(() => this.disabled() ?? this.control_.resolvedDisabled());\n\n protected readonly disabledAttribute = computed(() =>\n this.resolvedDisabled() === true ? '' : null,\n );\n\n constructor() {\n this.control_.register(this);\n inject(DestroyRef).onDestroy(() => this.control_.unregister(this));\n }\n\n /** Writes this segment's element from the control's value. */\n syncElement() {\n this.element().nativeElement.checked = this.checked();\n }\n\n protected onClick(event: Event) {\n if (this.control_.select(this.value(), activationReason(event), event)) return;\n /* Refused: the platform's own selection is put back, on this element and\n on the neighbour the browser had already unchecked. */\n event.preventDefault();\n this.control_.restoreElements();\n }\n\n protected onBlur() {\n this.control_.markTouched();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,QAAQ,GAA6B;AACzC,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,OAAO,EAAE,OAAO;CACjB;MAEY,0BAA0B,GAAG,IAAI,cAAc,CAC1D,oCAAoC,EACpC,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,EAAE;AAGjD;;;;;AAKG;AACG,SAAU,+BAA+B,CAAC,QAA2C,EAAA;IACzF,OAAO;AACL,QAAA,OAAO,EAAE,0BAA0B;AACnC,QAAA,UAAU,EAAE,OAAiC,EAAE,GAAG,QAAQ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,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;AAesC,iDAAA,CAAA;oBAChD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,qBAAqB,EAAE,uBAAuB;AAC9C,wBAAA,sBAAsB,EAAE,yCAAyC;AAClE,qBAAA;AACF,iBAAA;wRA4B6E,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACtHvF;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"slotted-angular-segmented-control.mjs","sources":["../../segmented-control/src/segmented-control-defaults.ts","../../segmented-control/src/segmented-control.ts","../../segmented-control/src/segmented-control-parts.ts","../../segmented-control/src/slotted-angular-segmented-control.ts"],"sourcesContent":["import { inject, Injectable, InjectionToken } from '@angular/core';\n\n/** The type step the control and every segment inside it sit at. */\nexport type SegmentedControlSize = 'sm' | 'md' | 'lg';\n\n/** How the segments flow. The thumb travels along the same axis. */\nexport type SegmentedControlOrientation = 'horizontal' | 'vertical';\n\n/**\n * What the control does when it is narrower than its labels need. `icons`\n * keeps the marks and hides the words — hidden, never removed, so the\n * accessible name of every segment is the same at every width.\n */\nexport type SegmentedControlCondense = 'none' | 'icons';\n\n/**\n * How the choice is drawn. `track` is a box with a thumb behind the chosen\n * segment; `underline` is the words alone, the chosen one in the text colour\n * and underlined. The semantics are the same radio group in both.\n */\nexport type SegmentedControlVariant = 'track' | 'underline';\n\nexport interface SegmentedControlDefaults {\n condense: SegmentedControlCondense;\n fullWidth: boolean;\n orientation: SegmentedControlOrientation;\n size: SegmentedControlSize;\n variant: SegmentedControlVariant;\n}\n\nconst FALLBACK: SegmentedControlDefaults = {\n condense: 'none',\n fullWidth: false,\n orientation: 'horizontal',\n size: 'md',\n variant: 'track',\n};\n\nexport const SEGMENTED_CONTROL_DEFAULTS = new InjectionToken<SegmentedControlDefaults>(\n 'slotted segmented control defaults',\n { providedIn: 'root', factory: () => FALLBACK },\n);\n\n/**\n * An application decides once how its segmented controls are drawn, rather\n * than repeating the same inputs on every one of them. A control that states\n * any of them itself still wins, and a field around it outranks this token for\n * `size`.\n */\nexport function provideSegmentedControlDefaults(defaults: Partial<SegmentedControlDefaults>) {\n return {\n provide: SEGMENTED_CONTROL_DEFAULTS,\n useFactory: (): SegmentedControlDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\n/** What a segmented control renders as here, before it states anything of its own. */\nexport function injectSegmentedControlDefaults(): SegmentedControlDefaults {\n return inject(SEGMENTED_CONTROL_DEFAULTS);\n}\n\n/**\n * Application-scoped rather than module-scoped, for the reason `field`\n * records: a module-level counter produces colliding sequences when two\n * applications render in one server process, and the server and the client\n * sequences must match for hydration.\n *\n * It answers for the control's generated `name` as well as for each segment's\n * identifier, because both have to be stable across the two renders.\n */\n@Injectable({ providedIn: 'root' })\nexport class SlSegmentedControlIdFactory {\n private count = 0;\n\n next() {\n this.count += 1;\n return `slotted-segmented-control-${this.count}`;\n }\n}\n","import { createControllable } from '@slotted/core/state';\nimport type { ChangeRequest } from '@slotted/core/state';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { OnInit } from '@angular/core';\nimport { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type {\n AbstractControl,\n ControlValueAccessor,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport { SlField } from '@slotted/angular/field';\nimport { SlFieldGroup } from '@slotted/angular/field-group';\n\nimport {\n injectSegmentedControlDefaults,\n SlSegmentedControlIdFactory,\n} from './segmented-control-defaults';\nimport type {\n SegmentedControlCondense,\n SegmentedControlOrientation,\n SegmentedControlSize,\n SegmentedControlVariant,\n} from './segmented-control-defaults';\n\nexport type {\n SegmentedControlCondense,\n SegmentedControlDefaults,\n SegmentedControlOrientation,\n SegmentedControlSize,\n SegmentedControlVariant,\n} from './segmented-control-defaults';\n\n/** Why the value moved. A segmented control can produce exactly these two. */\nexport type SegmentedControlSelectionReason = 'pointer' | 'keyboard';\n\n/**\n * What the control needs from each segment, and nothing more.\n *\n * A structural type rather than the segment's class, so the control does not\n * import the component that injects it — the cycle `text-field` breaks with an\n * abstract class, broken here with the smaller thing that works.\n */\nexport interface SlSegmentedControlSegment {\n /** What this segment selects. */\n value: () => string;\n /** Writes this segment's element from the control's value. */\n syncElement(): void;\n}\n\n/**\n * One choice out of a few, applied at once, on a track.\n *\n * **The keyboard is the platform's, and that is why the segments share a\n * `name`.** Native radios in one form owner with one name already implement\n * the APG's Radio Group table: Tab lands on the checked segment or on the\n * first, `Space` checks, both arrow axes move focus and the selection\n * together, the set wraps, and disabled segments are skipped — in a\n * right-to-left document too.\n *\n * **The role is conditional, and the condition is the field group.** A\n * `field-group` is a `fieldset` with a `legend`, which is already a named\n * group; a `radiogroup` inside it is the same set announced twice. A `role`\n * the consumer wrote wins over both.\n *\n * **`readOnly` is enforced, because the platform has none.** A radio ignores\n * `readonly`, so the control refuses the change on the segment's own `click` —\n * the one event a pointer and `Space` share — and announces `aria-readonly`.\n *\n * **The thumb's place is the checked index, and the count is how many\n * segments registered.** Both are written as custom properties on the host, so\n * the stylesheet needs no measurement: the thumb is one column wide and moves\n * by its own width times the index.\n */\n@Component({\n selector: '[slSegmentedControl]',\n standalone: true,\n exportAs: 'slSegmentedControl',\n template: `@if (checkedIndex() >= 0) {\n <span data-part=\"indicator\" aria-hidden=\"true\"></span>\n }\n <ng-content />`,\n styleUrl: '../../../styles/src/segmented-control/segmented-control.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlSegmentedControl), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => SlSegmentedControl), multi: true },\n ],\n host: {\n 'data-ui': 'segmented-control',\n 'data-part': 'root',\n '[attr.role]': 'resolvedRole()',\n '[attr.data-size]': 'resolvedSize()',\n '[attr.data-orientation]': 'resolvedOrientation()',\n '[attr.data-condense]': 'resolvedCondense()',\n '[attr.data-variant]': 'resolvedVariant()',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.data-full-width]': \"resolvedFullWidth() ? '' : null\",\n '[attr.data-disabled]': \"resolvedDisabled() === true ? '' : null\",\n '[attr.data-invalid]': \"resolvedInvalid() === true ? '' : null\",\n '[attr.data-readonly]': \"resolvedReadOnly() === true ? '' : null\",\n '[attr.aria-describedby]': 'describedBy()',\n '[attr.aria-invalid]': 'ariaInvalid()',\n '[attr.aria-readonly]': 'ariaReadOnly()',\n '[attr.aria-required]': 'ariaRequired()',\n '[attr.aria-orientation]': 'ariaOrientation()',\n '[style.--slotted-segmented-control-count]': 'count()',\n '[style.--slotted-segmented-control-index]': 'indexProperty()',\n },\n})\nexport class SlSegmentedControl implements ControlValueAccessor, OnInit, Validator {\n /** Present means the consumer owns the choice. */\n readonly value = input<string | undefined>(undefined);\n /** The value an uncontrolled control starts from, read once. */\n readonly defaultValue = input<string | undefined>(undefined);\n /**\n * The submission name the segments share, and the reason the platform\n * treats them as one radio group. Generated when it is not written, because\n * grouping is by name within the form owner and an unnamed set is not a set.\n */\n readonly name = input<string | undefined>(undefined);\n readonly size = input<SegmentedControlSize | undefined>(undefined);\n readonly orientation = input<SegmentedControlOrientation | undefined>(undefined);\n readonly condense = input<SegmentedControlCondense | undefined>(undefined);\n /** Defaults to the provider, then to `track`. */\n readonly variant = input<SegmentedControlVariant | undefined>(undefined);\n readonly fullWidth = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n /** Unstated rather than `false`, so the control defers to the field around it. */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n readonly readOnly = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n readonly invalid = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n readonly required = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n\n /**\n * One output for one transition. Its `previous` is `undefined` while nothing\n * has been chosen, which a request typed over `string` alone could not say.\n */\n readonly valueChange = output<ChangeRequest<string | undefined>>();\n\n private readonly field = inject(SlField, { optional: true });\n private readonly fieldGroup = inject(SlFieldGroup, { optional: true });\n private readonly defaults = injectSegmentedControlDefaults();\n private readonly generatedName = inject(SlSegmentedControlIdFactory).next();\n private readonly writtenRole = inject(new HostAttributeToken('role'), { optional: true });\n private readonly writtenLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n private readonly writtenLabelledBy = inject(new HostAttributeToken('aria-labelledby'), {\n optional: true,\n });\n /* A group has no element a label's for can reach, so inside a field the\n field's label names it where the root owns the role, unless the consumer\n named it themselves. */\n protected readonly labelledBy = computed(\n () =>\n this.writtenLabelledBy ??\n (this.writtenLabel === null && this.resolvedRole() !== null\n ? (this.field?.ids().label ?? null)\n : null),\n );\n private readonly writtenDescribedBy = inject(new HostAttributeToken('aria-describedby'), {\n optional: true,\n });\n\n private readonly segments = signal<readonly SlSegmentedControlSegment[]>([]);\n private readonly own = signal<string | undefined>(undefined);\n private readonly formDisabled = signal<boolean | undefined>(undefined);\n private onChangeFn: (value: string) => void = () => undefined;\n private onTouchedFn: () => void = () => undefined;\n\n readonly selection = computed(() => this.value() ?? this.own());\n readonly resolvedName = computed(() => this.name() ?? this.generatedName);\n\n /** How many segments the track holds, and which of them is checked. */\n readonly count = computed(() => this.segments().length);\n readonly checkedIndex = computed(() => {\n const current = this.selection();\n if (current === undefined) return -1;\n return this.segments().findIndex((segment) => segment.value() === current);\n });\n protected readonly indexProperty = computed(() => {\n const index = this.checkedIndex();\n return index < 0 ? null : index;\n });\n\n readonly resolvedSize = computed(\n () =>\n this.size() ??\n this.field?.resolvedSize() ??\n this.fieldGroup?.resolvedSize() ??\n this.defaults.size,\n );\n readonly resolvedOrientation = computed(() => this.orientation() ?? this.defaults.orientation);\n readonly resolvedCondense = computed(() => this.condense() ?? this.defaults.condense);\n readonly resolvedVariant = computed(() => this.variant() ?? this.defaults.variant);\n readonly resolvedFullWidth = computed(() => this.fullWidth() ?? this.defaults.fullWidth);\n readonly resolvedDisabled = computed(\n () => this.disabled() ?? this.formDisabled() ?? this.field?.resolvedDisabled(),\n );\n readonly resolvedReadOnly = computed(() => this.readOnly() ?? this.field?.resolvedReadOnly());\n readonly resolvedInvalid = computed(() => this.invalid() ?? this.field?.invalid());\n readonly resolvedRequired = computed(\n () => this.required() ?? this.field?.required() ?? this.fieldGroup?.required(),\n );\n\n protected readonly resolvedRole = computed(\n () => this.writtenRole ?? (this.fieldGroup === null ? 'radiogroup' : null),\n );\n protected readonly describedBy = computed(() => {\n const merged = [this.writtenDescribedBy, this.field?.describedBy()].filter(Boolean);\n return merged.length === 0 ? null : merged.join(' ');\n });\n protected readonly ariaInvalid = computed(() =>\n this.resolvedInvalid() === true ? 'true' : null,\n );\n protected readonly ariaReadOnly = computed(() =>\n this.resolvedReadOnly() === true ? 'true' : null,\n );\n protected readonly ariaRequired = computed(() =>\n this.resolvedRequired() === true ? 'true' : null,\n );\n /**\n * Only where the root owns the role, and only when the set flows the way\n * `radiogroup` does not already imply.\n */\n protected readonly ariaOrientation = computed(() =>\n this.resolvedRole() === 'radiogroup' && this.resolvedOrientation() === 'horizontal'\n ? 'horizontal'\n : null,\n );\n\n ngOnInit() {\n if (this.value() === undefined) this.own.set(this.defaultValue());\n }\n\n /** A segment joins the set, in the order the template holds it. */\n register(segment: SlSegmentedControlSegment) {\n this.segments.update((current) => [...current, segment]);\n }\n\n /** A segment leaves the set. */\n unregister(segment: SlSegmentedControlSegment) {\n this.segments.update((current) => current.filter((entry) => entry !== segment));\n }\n\n /**\n * Writes every segment's element from the value.\n *\n * The HTML standard's canceled activation behaviour for a radio restores the\n * *clicked* element and nothing else, so the option that was chosen before\n * the refused click stays unchecked. Angular writes a property binding only\n * when its value changes, and the neighbour's did not — the correction is\n * made here, which is the defect `radio-group` measured first.\n */\n restoreElements() {\n for (const segment of this.segments()) segment.syncElement();\n }\n\n /** Whether one value is the chosen one. Read by every segment in the set. */\n holds(value: string): boolean {\n return this.selection() === value;\n }\n\n /**\n * Asks the control to move to one value. Returns whether the value actually\n * moved — false while a consumer owns it, which is what tells the segment to\n * refuse the activation and let the platform put the element back.\n */\n select(value: string, reason: SegmentedControlSelectionReason, source: Event): boolean {\n if (this.resolvedReadOnly() === true) return false;\n\n let cancelled = false;\n const state = createControllable<string | undefined>({\n controlled: this.value(),\n initial: this.selection(),\n onRequest: (request) => {\n this.valueChange.emit(request);\n cancelled = request.cancelled;\n },\n });\n const moved = state.request(value, reason, source);\n if (cancelled || !moved) return false;\n this.own.set(value);\n this.onChangeFn(value);\n return true;\n }\n\n writeValue(value: string | null | undefined) {\n this.own.set(value ?? undefined);\n }\n\n registerOnChange(fn: (value: string) => void) {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void) {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean) {\n this.formDisabled.set(isDisabled);\n }\n\n /** Marks the set touched, which a segment calls when it loses focus. */\n markTouched() {\n this.onTouchedFn();\n }\n\n /**\n * The control owns validity over the set, which no single segment can see:\n * \"choose one\" is a fact about the set and not about any one option.\n */\n validate(control: AbstractControl): ValidationErrors | null {\n if (this.resolvedRequired() !== true) return null;\n const value = control.value as string | null | undefined;\n return value === null || value === undefined || value === '' ? { required: true } : null;\n }\n}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n HostAttributeToken,\n inject,\n input,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SlSegmentedControl } from './segmented-control';\nimport { SlSegmentedControlIdFactory } from './segmented-control-defaults';\nimport type {\n SegmentedControlSelectionReason,\n SlSegmentedControlSegment,\n} from './segmented-control';\n\n/**\n * The mark a segment is drawn with, on the consumer's own element.\n *\n * A directive rather than a slot, so an `ng-icon`, an inline `svg` or a\n * `span` all work and none of them loses its own semantics. It is hidden from\n * the reading order, because the words beside it — or the `aria-label` on the\n * radio — are what a reader hears.\n */\n@Directive({\n selector: '[slSegmentIcon]',\n standalone: true,\n exportAs: 'slSegmentIcon',\n host: {\n 'data-part': 'icon',\n 'aria-hidden': 'true',\n },\n})\nexport class SlSegmentIcon {}\n\n/**\n * A click synthesised by the keyboard reports no detail; a real one reports\n * the click count. It is why `Space` and a pointer are told apart without a\n * key listener existing anywhere in the family.\n */\nfunction activationReason(event: Event): SegmentedControlSelectionReason {\n return event instanceof MouseEvent && event.detail === 0 ? 'keyboard' : 'pointer';\n}\n\n/**\n * One segment of the track.\n *\n * It is a part of `segmented-control` and not an entry point of its own:\n * outside a control it has no exclusive set to belong to, and the platform's\n * whole keyboard model is defined over the set. `SlSegmentedControl` is\n * injected without `optional`, so a segment written outside one fails at\n * construction rather than silently.\n *\n * The radio is real, visually hidden and left where it is: it covers the\n * segment and reaches the track's own edge, so the hit area is the control's\n * height rather than the thumb's.\n */\n@Component({\n selector: '[slSegment]',\n standalone: true,\n exportAs: 'slSegment',\n template: `<input\n #control\n data-part=\"control\"\n type=\"radio\"\n [attr.id]=\"controlId\"\n [attr.name]=\"control_.resolvedName()\"\n [attr.value]=\"value()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"writtenDescribedBy\"\n [attr.disabled]=\"disabledAttribute()\"\n [checked]=\"checked()\"\n (click)=\"onClick($event)\"\n (blur)=\"onBlur()\"\n />\n <ng-content select=\"[slSegmentIcon]\" />\n <span data-part=\"label\"><ng-content /></span>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'item',\n '[attr.data-checked]': \"checked() ? '' : null\",\n '[attr.data-disabled]': \"resolvedDisabled() === true ? '' : null\",\n },\n})\nexport class SlSegment implements SlSegmentedControlSegment {\n /** What this segment selects. It is what the control's value holds. */\n readonly value = input.required<string>();\n /** Unstated rather than `false`, so the segment defers to the control. */\n readonly disabled = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value)),\n });\n\n /**\n * The control the segment belongs to. Injected without `optional`, and\n * public because the template reads the shared name from it and a consumer\n * reaching the segment through `exportAs` may want the resolved step.\n *\n * The trailing underscore keeps the name off `value`, which is the input.\n */\n readonly control_ = inject(SlSegmentedControl);\n\n private readonly writtenId = inject(new HostAttributeToken('id'), { optional: true });\n /**\n * Read from the host and written onto the radio: the name of a segment whose\n * mark is its whole content belongs to the control that holds the focus, and\n * an `aria-label` left on the `label` element would name it twice.\n */\n protected readonly ariaLabel = inject(new HostAttributeToken('aria-label'), { optional: true });\n protected readonly writtenDescribedBy = inject(new HostAttributeToken('aria-describedby'), {\n optional: true,\n });\n private readonly element = viewChild.required<ElementRef<HTMLInputElement>>('control');\n\n /** The identifier the radio carries. A consumer's own wins. */\n readonly controlId = this.writtenId ?? inject(SlSegmentedControlIdFactory).next();\n\n readonly checked = computed(() => this.control_.holds(this.value()));\n readonly resolvedDisabled = computed(() => this.disabled() ?? this.control_.resolvedDisabled());\n\n protected readonly disabledAttribute = computed(() =>\n this.resolvedDisabled() === true ? '' : null,\n );\n\n constructor() {\n this.control_.register(this);\n inject(DestroyRef).onDestroy(() => this.control_.unregister(this));\n }\n\n /** Writes this segment's element from the control's value. */\n syncElement() {\n this.element().nativeElement.checked = this.checked();\n }\n\n protected onClick(event: Event) {\n if (this.control_.select(this.value(), activationReason(event), event)) return;\n /* Refused: the platform's own selection is put back, on this element and\n on the neighbour the browser had already unchecked. */\n event.preventDefault();\n this.control_.restoreElements();\n }\n\n protected onBlur() {\n this.control_.markTouched();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,QAAQ,GAA6B;AACzC,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,OAAO,EAAE,OAAO;CACjB;MAEY,0BAA0B,GAAG,IAAI,cAAc,CAC1D,oCAAoC,EACpC,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,EAAE;AAGjD;;;;;AAKG;AACG,SAAU,+BAA+B,CAAC,QAA2C,EAAA;IACzF,OAAO;AACL,QAAA,OAAO,EAAE,0BAA0B;AACnC,QAAA,UAAU,EAAE,OAAiC,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;KAC3E;AACH;AAEA;SACgB,8BAA8B,GAAA;AAC5C,IAAA,OAAO,MAAM,CAAC,0BAA0B,CAAC;AAC3C;AAEA;;;;;;;;AAQG;MAEU,2BAA2B,CAAA;IAC9B,KAAK,GAAG,CAAC;IAEjB,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,KAAK,IAAI,CAAC;AACf,QAAA,OAAO,CAAA,0BAAA,EAA6B,IAAI,CAAC,KAAK,EAAE;IAClD;uGANW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAA3B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAA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EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,SAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAxBV,CAAA;;;;;;;;;;;;;;;AAesC,iDAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FASrC,SAAS,EAAA,UAAA,EAAA,CAAA;kBA5BrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;AAesC,iDAAA,CAAA;oBAChD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,qBAAqB,EAAE,uBAAuB;AAC9C,wBAAA,sBAAsB,EAAE,yCAAyC;AAClE,qBAAA;AACF,iBAAA;wRA4B6E,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACtHvF;;AAEG;;"}
|
|
@@ -422,6 +422,11 @@ class SlSelect {
|
|
|
422
422
|
constructor() {
|
|
423
423
|
const destroyRef = inject(DestroyRef);
|
|
424
424
|
const host = inject((ElementRef));
|
|
425
|
+
/* Every press resets the record in the capture phase; one on the frame sets it after. */
|
|
426
|
+
const doc = host.nativeElement.ownerDocument;
|
|
427
|
+
const resetPress = () => (this.pressedFrame = false);
|
|
428
|
+
doc.addEventListener('pointerdown', resetPress, true);
|
|
429
|
+
destroyRef.onDestroy(() => doc.removeEventListener('pointerdown', resetPress, true));
|
|
425
430
|
effect(() => {
|
|
426
431
|
const row = this.tags()?.nativeElement ?? null;
|
|
427
432
|
const trigger = this.chipOverflow()?.nativeElement ?? null;
|
|
@@ -516,10 +521,26 @@ class SlSelect {
|
|
|
516
521
|
* Whether a click landed on the control's frame. A click a `label` elsewhere
|
|
517
522
|
* forwards to the button carries the label's coordinates, which lie outside it.
|
|
518
523
|
*/
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
524
|
+
/** The last press went down on the frame; see `onTriggerClick`. */
|
|
525
|
+
pressedFrame = false;
|
|
526
|
+
onFramePointerDown() {
|
|
527
|
+
this.pressedFrame = true;
|
|
528
|
+
this.prepare();
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* The reader is about to open the popup: the control took focus or a press.
|
|
532
|
+
* The portal's layer is made then, because making it reads the trigger's
|
|
533
|
+
* computed style, and a read in the open's own task is a style recalculation
|
|
534
|
+
* the first frame waits for. A press focuses before it clicks, in a task of
|
|
535
|
+
* its own.
|
|
536
|
+
*/
|
|
537
|
+
prepare() {
|
|
538
|
+
if (this.portalRoot !== null)
|
|
539
|
+
return;
|
|
540
|
+
this.portalRoot = createPortalRoot({
|
|
541
|
+
origin: this.triggerRef().nativeElement,
|
|
542
|
+
disabled: this.portal() === false,
|
|
543
|
+
});
|
|
523
544
|
}
|
|
524
545
|
scrollToKey(value) {
|
|
525
546
|
const option = this.options().find((candidate) => candidate.dataset['value'] === value);
|
|
@@ -613,11 +634,16 @@ class SlSelect {
|
|
|
613
634
|
}
|
|
614
635
|
onTriggerClick(event) {
|
|
615
636
|
/* A press on the field's label arrives here as the click the label
|
|
616
|
-
forwards: a pointer click
|
|
617
|
-
It focuses the control and does not open the list — the
|
|
618
|
-
example's label only focuses, and so does a native
|
|
619
|
-
or assistive-technology click carries detail 0 and
|
|
620
|
-
|
|
637
|
+
forwards: a pointer click whose press went down on the label, not on
|
|
638
|
+
the frame. It focuses the control and does not open the list — the
|
|
639
|
+
select-only example's label only focuses, and so does a native
|
|
640
|
+
select's. A keyboard or assistive-technology click carries detail 0 and
|
|
641
|
+
opens. The press is recorded rather than the click's coordinates
|
|
642
|
+
compared with the frame's box: that box is a layout read in the click's
|
|
643
|
+
own task, after the release changed the frame's style. */
|
|
644
|
+
const fromFrame = this.pressedFrame;
|
|
645
|
+
this.pressedFrame = false;
|
|
646
|
+
if (event.detail > 0 && !fromFrame) {
|
|
621
647
|
this.focus();
|
|
622
648
|
return;
|
|
623
649
|
}
|
|
@@ -856,17 +882,14 @@ class SlSelect {
|
|
|
856
882
|
this.view.detectChanges();
|
|
857
883
|
return;
|
|
858
884
|
}
|
|
859
|
-
this.
|
|
860
|
-
origin: this.triggerRef().nativeElement,
|
|
861
|
-
disabled: this.portal() === false,
|
|
862
|
-
});
|
|
885
|
+
this.prepare();
|
|
863
886
|
this.view = this.viewContainer.createEmbeddedView(this.template());
|
|
864
887
|
this.view.detectChanges();
|
|
865
888
|
this.layerNode = this.view.rootNodes.find((node) => node instanceof HTMLElement);
|
|
866
889
|
this.surfaceNode = this.layerNode?.querySelector("[data-part='content']") ?? null;
|
|
867
890
|
if (this.layerNode === null)
|
|
868
891
|
return;
|
|
869
|
-
this.portalRoot
|
|
892
|
+
this.portalRoot?.container?.append(this.layerNode);
|
|
870
893
|
this.presence = createPresence({ present: this.isOpen() });
|
|
871
894
|
this.presence.setNode(this.layerNode);
|
|
872
895
|
this.recount();
|
|
@@ -892,8 +915,15 @@ class SlSelect {
|
|
|
892
915
|
strategy: this.strategy() ?? this.defaults.strategy,
|
|
893
916
|
});
|
|
894
917
|
/* The height that bounds the list arrives with the position, after the
|
|
895
|
-
highlight has landed, so the highlighted row is revealed again
|
|
896
|
-
|
|
918
|
+
highlight has landed, so the highlighted row is revealed again — in the
|
|
919
|
+
next frame, whose layout the browser computes anyway, rather than by a
|
|
920
|
+
read here after the position's writes. */
|
|
921
|
+
void this.positioner.update().then(() => {
|
|
922
|
+
const view = this.layerNode?.ownerDocument.defaultView;
|
|
923
|
+
if (view === null || view === undefined)
|
|
924
|
+
return;
|
|
925
|
+
view.requestAnimationFrame(() => this.reveal(this.highlightedValue()));
|
|
926
|
+
});
|
|
897
927
|
}
|
|
898
928
|
bind() {
|
|
899
929
|
if (this.layerNode === null)
|
|
@@ -1020,7 +1050,7 @@ class SlSelect {
|
|
|
1020
1050
|
return this.selection().length === 0 ? { required: true } : null;
|
|
1021
1051
|
}
|
|
1022
1052
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1023
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlSelect, isStandalone: true, selector: "sl-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, highlightedValue: { classPropertyName: "highlightedValue", publicName: "highlightedValue", isSignal: true, isRequired: false, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, mount: { classPropertyName: "mount", publicName: "mount", isSignal: true, isRequired: false, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null }, alignOffset: { classPropertyName: "alignOffset", publicName: "alignOffset", isSignal: true, isRequired: false, transformFunction: null }, collisionPadding: { classPropertyName: "collisionPadding", publicName: "collisionPadding", isSignal: true, isRequired: false, transformFunction: null }, typeaheadTimeout: { classPropertyName: "typeaheadTimeout", publicName: "typeaheadTimeout", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, highlightMatch: { classPropertyName: "highlightMatch", publicName: "highlightMatch", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsidePress: { classPropertyName: "closeOnOutsidePress", publicName: "closeOnOutsidePress", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "flip", isSignal: true, isRequired: false, transformFunction: null }, shift: { classPropertyName: "shift", publicName: "shift", isSignal: true, isRequired: false, transformFunction: null }, hideWhenDetached: { classPropertyName: "hideWhenDetached", publicName: "hideWhenDetached", isSignal: true, isRequired: false, transformFunction: null }, portal: { classPropertyName: "portal", publicName: "portal", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChangeRequest: "valueChangeRequest", open: "openChange", openChangeRequest: "openChangeRequest", highlightedValue: "highlightedValueChange", highlightedValueChangeRequest: "highlightedValueChangeRequest", searchValue: "searchValueChange", searchValueChangeRequest: "searchValueChangeRequest" }, host: { attributes: { "data-ui": "select", "data-part": "root" }, properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.data-size": "resolvedSize()", "attr.data-variant": "resolvedVariant()", "attr.data-full-width": "resolvedFullWidth() ? '' : null", "attr.data-multiple": "resolvedMultiple() ? '' : null", "attr.data-open": "isOpen() ? '' : null", "attr.data-disabled": "resolvedDisabled() ? '' : null", "attr.data-readonly": "resolvedReadOnly() ? '' : null", "attr.data-invalid": "resolvedInvalid() ? '' : null", "attr.data-required": "resolvedRequired() ? '' : null", "attr.data-loading": "loading() ? '' : null", "attr.data-narrow": "narrow() ? '' : null" } }, providers: [
|
|
1053
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlSelect, isStandalone: true, selector: "sl-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, highlightedValue: { classPropertyName: "highlightedValue", publicName: "highlightedValue", isSignal: true, isRequired: false, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, mount: { classPropertyName: "mount", publicName: "mount", isSignal: true, isRequired: false, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null }, alignOffset: { classPropertyName: "alignOffset", publicName: "alignOffset", isSignal: true, isRequired: false, transformFunction: null }, collisionPadding: { classPropertyName: "collisionPadding", publicName: "collisionPadding", isSignal: true, isRequired: false, transformFunction: null }, typeaheadTimeout: { classPropertyName: "typeaheadTimeout", publicName: "typeaheadTimeout", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, highlightMatch: { classPropertyName: "highlightMatch", publicName: "highlightMatch", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsidePress: { classPropertyName: "closeOnOutsidePress", publicName: "closeOnOutsidePress", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "flip", isSignal: true, isRequired: false, transformFunction: null }, shift: { classPropertyName: "shift", publicName: "shift", isSignal: true, isRequired: false, transformFunction: null }, hideWhenDetached: { classPropertyName: "hideWhenDetached", publicName: "hideWhenDetached", isSignal: true, isRequired: false, transformFunction: null }, portal: { classPropertyName: "portal", publicName: "portal", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChangeRequest: "valueChangeRequest", open: "openChange", openChangeRequest: "openChangeRequest", highlightedValue: "highlightedValueChange", highlightedValueChangeRequest: "highlightedValueChangeRequest", searchValue: "searchValueChange", searchValueChangeRequest: "searchValueChangeRequest" }, host: { attributes: { "data-ui": "select", "data-part": "root" }, listeners: { "pointerdown": "onFramePointerDown()", "focusin": "prepare()" }, properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.data-size": "resolvedSize()", "attr.data-variant": "resolvedVariant()", "attr.data-full-width": "resolvedFullWidth() ? '' : null", "attr.data-multiple": "resolvedMultiple() ? '' : null", "attr.data-open": "isOpen() ? '' : null", "attr.data-disabled": "resolvedDisabled() ? '' : null", "attr.data-readonly": "resolvedReadOnly() ? '' : null", "attr.data-invalid": "resolvedInvalid() ? '' : null", "attr.data-required": "resolvedRequired() ? '' : null", "attr.data-loading": "loading() ? '' : null", "attr.data-narrow": "narrow() ? '' : null" } }, providers: [
|
|
1024
1054
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlSelect), multi: true },
|
|
1025
1055
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => SlSelect), multi: true },
|
|
1026
1056
|
], queries: [{ propertyName: "summaryTemplate", first: true, predicate: SlSelectValue, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "template", first: true, predicate: ["layer"], descendants: true, isSignal: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "tags", first: true, predicate: ["tags"], descendants: true, isSignal: true }, { propertyName: "chipOverflow", first: true, predicate: ["chipOverflow"], descendants: true, isSignal: true }], exportAs: ["slSelect"], ngImport: i0, template: `
|
|
@@ -1305,6 +1335,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
1305
1335
|
'[attr.data-full-width]': "resolvedFullWidth() ? '' : null",
|
|
1306
1336
|
'[attr.data-multiple]': "resolvedMultiple() ? '' : null",
|
|
1307
1337
|
'[attr.data-open]': "isOpen() ? '' : null",
|
|
1338
|
+
'(pointerdown)': 'onFramePointerDown()',
|
|
1339
|
+
'(focusin)': 'prepare()',
|
|
1308
1340
|
'[attr.data-disabled]': "resolvedDisabled() ? '' : null",
|
|
1309
1341
|
'[attr.data-readonly]': "resolvedReadOnly() ? '' : null",
|
|
1310
1342
|
'[attr.data-invalid]': "resolvedInvalid() ? '' : null",
|