@educarehq/solaris-ui 0.5.0 → 0.6.1
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/fesm2022/educarehq-solaris-ui.mjs +419 -85
- package/fesm2022/educarehq-solaris-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_button.scss +8 -26
- package/styles/token/border/_border.scss +1 -0
- package/styles/token/motion/_motion.scss +1 -0
- package/types/educarehq-solaris-ui.d.ts +104 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, PLATFORM_ID, Injectable, Pipe, Directive, signal, DestroyRef, input, computed, ChangeDetectionStrategy, Component, output, ElementRef, HostListener, contentChild, contentChildren,
|
|
2
|
+
import { InjectionToken, inject, PLATFORM_ID, Injectable, Pipe, Directive, signal, DestroyRef, input, computed, ChangeDetectionStrategy, Component, output, ElementRef, EnvironmentInjector, effect, createComponent, HostListener, contentChild, contentChildren, NgZone, TemplateRef, ViewContainerRef, Injector, viewChild, isDevMode, forwardRef, ChangeDetectorRef, booleanAttribute, numberAttribute, afterNextRender, ApplicationRef, model, viewChildren } from '@angular/core';
|
|
3
3
|
import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT } from '@angular/common';
|
|
4
4
|
import { FormControlDirective, FormControlName, NgModel, NG_VALUE_ACCESSOR, NgControl, FormsModule } from '@angular/forms';
|
|
5
5
|
import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
@@ -47,6 +47,9 @@ const SOLARIS_TRANSLATE_DEFAULT_CONFIG = {
|
|
|
47
47
|
translations: {
|
|
48
48
|
'en-US': {
|
|
49
49
|
'solaris.button.loading': 'Loading...',
|
|
50
|
+
'solaris.spinner.loading': 'Loading...',
|
|
51
|
+
'solaris.progress.indeterminate': 'Indeterminate progress',
|
|
52
|
+
'solaris.loadingText.loading': 'Loading...',
|
|
50
53
|
'solaris.stepper.optional': 'Optional',
|
|
51
54
|
'solaris.select.loading': 'Loading...',
|
|
52
55
|
'solaris.select.empty': 'No options available',
|
|
@@ -114,6 +117,9 @@ const SOLARIS_TRANSLATE_DEFAULT_CONFIG = {
|
|
|
114
117
|
},
|
|
115
118
|
'pt-BR': {
|
|
116
119
|
'solaris.button.loading': 'Carregando...',
|
|
120
|
+
'solaris.spinner.loading': 'Carregando...',
|
|
121
|
+
'solaris.progress.indeterminate': 'Progresso indeterminado',
|
|
122
|
+
'solaris.loadingText.loading': 'Carregando...',
|
|
117
123
|
'solaris.stepper.optional': 'Opcional',
|
|
118
124
|
'solaris.select.loading': 'Carregando...',
|
|
119
125
|
'solaris.select.empty': 'Nenhuma opção disponível',
|
|
@@ -1692,9 +1698,164 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1692
1698
|
}]
|
|
1693
1699
|
}] });
|
|
1694
1700
|
|
|
1701
|
+
const VIEW_BOX = 120;
|
|
1702
|
+
const VIEW_CENTER = VIEW_BOX / 2;
|
|
1703
|
+
const STROKE_WIDTH = 15;
|
|
1704
|
+
const RING_RADIUS = 46;
|
|
1705
|
+
const STACKED_BAR_COUNT = 8;
|
|
1706
|
+
const STACKED_ANGLE_STEP = 360 / STACKED_BAR_COUNT;
|
|
1707
|
+
const STACKED_INNER_RADIUS = 28;
|
|
1708
|
+
const STACKED_OUTER_RADIUS = 50;
|
|
1709
|
+
const RING_ARC_PATH = `M ${VIEW_CENTER} ${VIEW_CENTER - RING_RADIUS} A ${RING_RADIUS} ${RING_RADIUS} 0 0 1 ${VIEW_CENTER + RING_RADIUS} ${VIEW_CENTER}`;
|
|
1710
|
+
const SOLARIS_STACKED_BARS = Array.from({ length: STACKED_BAR_COUNT }, (_, index) => {
|
|
1711
|
+
const angle = ((-90 + index * STACKED_ANGLE_STEP) * Math.PI) / 180;
|
|
1712
|
+
const delayFactor = -((STACKED_BAR_COUNT - index) % STACKED_BAR_COUNT) / STACKED_BAR_COUNT;
|
|
1713
|
+
const staticOpacity = 1 - (index / STACKED_BAR_COUNT) * 0.6;
|
|
1714
|
+
return {
|
|
1715
|
+
x1: VIEW_CENTER + STACKED_INNER_RADIUS * Math.cos(angle),
|
|
1716
|
+
y1: VIEW_CENTER + STACKED_INNER_RADIUS * Math.sin(angle),
|
|
1717
|
+
x2: VIEW_CENTER + STACKED_OUTER_RADIUS * Math.cos(angle),
|
|
1718
|
+
y2: VIEW_CENTER + STACKED_OUTER_RADIUS * Math.sin(angle),
|
|
1719
|
+
delayFactor,
|
|
1720
|
+
staticOpacity,
|
|
1721
|
+
};
|
|
1722
|
+
});
|
|
1723
|
+
|
|
1724
|
+
class SolarisSpinnerComponent {
|
|
1725
|
+
variant = input('ring', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
1726
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1727
|
+
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
1728
|
+
speed = input('normal', ...(ngDevMode ? [{ debugName: "speed" }] : /* istanbul ignore next */ []));
|
|
1729
|
+
easing = input('linear', ...(ngDevMode ? [{ debugName: "easing" }] : /* istanbul ignore next */ []));
|
|
1730
|
+
backdrop = input(false, ...(ngDevMode ? [{ debugName: "backdrop" }] : /* istanbul ignore next */ []));
|
|
1731
|
+
ariaHidden = input(false, ...(ngDevMode ? [{ debugName: "ariaHidden" }] : /* istanbul ignore next */ []));
|
|
1732
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1733
|
+
labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : /* istanbul ignore next */ []));
|
|
1734
|
+
ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1735
|
+
ariaLabelKey = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
|
|
1736
|
+
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1737
|
+
showPercent = input(false, ...(ngDevMode ? [{ debugName: "showPercent" }] : /* istanbul ignore next */ []));
|
|
1738
|
+
description = input([], ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
1739
|
+
descriptionKey = input([], ...(ngDevMode ? [{ debugName: "descriptionKey" }] : /* istanbul ignore next */ []));
|
|
1740
|
+
translate = inject(SolarisTranslateService, {
|
|
1741
|
+
optional: true,
|
|
1742
|
+
});
|
|
1743
|
+
isProgress = computed(() => this.variant() === 'progress', ...(ngDevMode ? [{ debugName: "isProgress" }] : /* istanbul ignore next */ []));
|
|
1744
|
+
isStacked = computed(() => this.variant() === 'stacked', ...(ngDevMode ? [{ debugName: "isStacked" }] : /* istanbul ignore next */ []));
|
|
1745
|
+
stackedBars = SOLARIS_STACKED_BARS;
|
|
1746
|
+
ringArcPath = RING_ARC_PATH;
|
|
1747
|
+
hostRole = computed(() => this.isProgress() ? 'progressbar' : 'status', ...(ngDevMode ? [{ debugName: "hostRole" }] : /* istanbul ignore next */ []));
|
|
1748
|
+
hostAriaLive = computed(() => this.isProgress() ? null : 'polite', ...(ngDevMode ? [{ debugName: "hostAriaLive" }] : /* istanbul ignore next */ []));
|
|
1749
|
+
clampedValue = computed(() => {
|
|
1750
|
+
const value = this.value();
|
|
1751
|
+
if (Number.isFinite(value)) {
|
|
1752
|
+
return Math.min(100, Math.max(0, Math.round(value)));
|
|
1753
|
+
}
|
|
1754
|
+
return 0;
|
|
1755
|
+
}, ...(ngDevMode ? [{ debugName: "clampedValue" }] : /* istanbul ignore next */ []));
|
|
1756
|
+
indicatorDashArray = computed(() => {
|
|
1757
|
+
const value = this.clampedValue();
|
|
1758
|
+
return `${value} ${100 - value}`;
|
|
1759
|
+
}, ...(ngDevMode ? [{ debugName: "indicatorDashArray" }] : /* istanbul ignore next */ []));
|
|
1760
|
+
resolvedLabel = computed(() => {
|
|
1761
|
+
const label = this.label();
|
|
1762
|
+
if (label !== undefined) {
|
|
1763
|
+
return label === '' ? null : label;
|
|
1764
|
+
}
|
|
1765
|
+
const key = this.labelKey();
|
|
1766
|
+
if (key && this.translate) {
|
|
1767
|
+
return this.translate.translate(key);
|
|
1768
|
+
}
|
|
1769
|
+
if (this.translate) {
|
|
1770
|
+
return this.translate.translate('solaris.spinner.loading');
|
|
1771
|
+
}
|
|
1772
|
+
return null;
|
|
1773
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedLabel" }] : /* istanbul ignore next */ []));
|
|
1774
|
+
resolvedDescription = computed(() => {
|
|
1775
|
+
const items = this.description();
|
|
1776
|
+
const keys = this.descriptionKey();
|
|
1777
|
+
const result = [];
|
|
1778
|
+
const count = Math.max(items.length, keys.length);
|
|
1779
|
+
for (let index = 0; index < count; index++) {
|
|
1780
|
+
const item = items[index];
|
|
1781
|
+
if (item !== undefined) {
|
|
1782
|
+
if (item !== '') {
|
|
1783
|
+
result.push(item);
|
|
1784
|
+
}
|
|
1785
|
+
continue;
|
|
1786
|
+
}
|
|
1787
|
+
const key = keys[index];
|
|
1788
|
+
if (key && this.translate) {
|
|
1789
|
+
result.push(this.translate.translate(key));
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
return result;
|
|
1793
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedDescription" }] : /* istanbul ignore next */ []));
|
|
1794
|
+
resolvedAriaLabel = computed(() => {
|
|
1795
|
+
const aria = this.ariaLabel();
|
|
1796
|
+
if (aria) {
|
|
1797
|
+
return aria;
|
|
1798
|
+
}
|
|
1799
|
+
const key = this.ariaLabelKey();
|
|
1800
|
+
if (key && this.translate) {
|
|
1801
|
+
return this.translate.translate(key);
|
|
1802
|
+
}
|
|
1803
|
+
const label = this.resolvedLabel();
|
|
1804
|
+
if (label) {
|
|
1805
|
+
return label;
|
|
1806
|
+
}
|
|
1807
|
+
if (this.translate) {
|
|
1808
|
+
return this.translate.translate('solaris.spinner.loading');
|
|
1809
|
+
}
|
|
1810
|
+
return null;
|
|
1811
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
1812
|
+
progressAria = computed(() => {
|
|
1813
|
+
if (!this.isProgress()) {
|
|
1814
|
+
return null;
|
|
1815
|
+
}
|
|
1816
|
+
const percent = this.clampedValue();
|
|
1817
|
+
const label = this.resolvedLabel();
|
|
1818
|
+
const description = this.resolvedDescription();
|
|
1819
|
+
const parts = [];
|
|
1820
|
+
if (label) {
|
|
1821
|
+
parts.push(label);
|
|
1822
|
+
}
|
|
1823
|
+
parts.push(`${percent} percent`, ...description);
|
|
1824
|
+
return {
|
|
1825
|
+
valuemin: 0,
|
|
1826
|
+
valuemax: 100,
|
|
1827
|
+
valuenow: percent,
|
|
1828
|
+
valuetext: parts.join(', '),
|
|
1829
|
+
};
|
|
1830
|
+
}, ...(ngDevMode ? [{ debugName: "progressAria" }] : /* istanbul ignore next */ []));
|
|
1831
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1832
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisSpinnerComponent, isStandalone: true, selector: "solaris-spinner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, easing: { classPropertyName: "easing", publicName: "easing", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "ariaHidden", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelKey: { classPropertyName: "ariaLabelKey", publicName: "ariaLabelKey", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, showPercent: { classPropertyName: "showPercent", publicName: "showPercent", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, descriptionKey: { classPropertyName: "descriptionKey", publicName: "descriptionKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "hostRole()", "attr.aria-live": "hostAriaLive()", "attr.data-size": "size()", "attr.data-speed": "speed()", "attr.data-color": "color()", "attr.data-easing": "easing()", "attr.data-variant": "variant()", "attr.aria-label": "resolvedAriaLabel()", "attr.data-backdrop": "backdrop() ? \"\" : null", "attr.aria-hidden": "ariaHidden() ? \"true\" : null", "attr.aria-valuemin": "progressAria()?.valuemin ?? null", "attr.aria-valuemax": "progressAria()?.valuemax ?? null", "attr.aria-valuenow": "progressAria()?.valuenow ?? null", "attr.aria-valuetext": "progressAria()?.valuetext ?? null" }, classAttribute: "solaris-spinner" }, ngImport: i0, template: "@if (isStacked()) {\n <svg class=\"solaris-spinner__ring\" aria-hidden=\"true\" viewBox=\"0 0 120 120\">\n @for (bar of stackedBars; track bar.x1) {\n <line\n class=\"solaris-spinner__bar\"\n [attr.x1]=\"bar.x1\"\n [attr.y1]=\"bar.y1\"\n [attr.x2]=\"bar.x2\"\n [attr.y2]=\"bar.y2\"\n [style.--solaris-spinner-stacked-step]=\"bar.delayFactor\"\n [style.opacity]=\"bar.staticOpacity\"\n ></line>\n }\n </svg>\n} @else {\n <svg class=\"solaris-spinner__ring\" aria-hidden=\"true\" viewBox=\"0 0 120 120\">\n <circle class=\"solaris-spinner__track\" cx=\"60\" cy=\"60\" r=\"46\"></circle>\n @if (isProgress()) {\n <circle\n class=\"solaris-spinner__indicator solaris-spinner__indicator--progress\"\n cx=\"60\"\n cy=\"60\"\n r=\"46\"\n pathLength=\"100\"\n [attr.stroke-dasharray]=\"indicatorDashArray()\"\n ></circle>\n } @else {\n <g class=\"solaris-spinner__indicator\">\n <path class=\"solaris-spinner__arc\" [attr.d]=\"ringArcPath\"></path>\n </g>\n }\n </svg>\n}\n@if (isProgress()) {\n <span class=\"solaris-spinner__content\">\n <span class=\"solaris-spinner__header\">\n @if (showPercent()) {\n <span class=\"solaris-spinner__percent\">{{ clampedValue() }}%</span>\n }\n @if (resolvedLabel(); as label) {\n <span class=\"solaris-spinner__label\">{{ label }}</span>\n }\n </span>\n @for (line of resolvedDescription(); track $index) {\n <span class=\"solaris-spinner__description\">{{ line }}</span>\n }\n </span>\n} @else if (resolvedLabel(); as label) {\n <span class=\"solaris-spinner__label\">{{ label }}</span>\n}\n", styles: [":host{--solaris-spinner-size: var(--solaris-spacing-6);--solaris-spinner-thickness: 15;--solaris-spinner-color: var(--solaris-primary-base);--solaris-spinner-track-color: var(--solaris-spinner-color);--solaris-spinner-track-opacity: var(--solaris-opacity-20);--solaris-spinner-custom-color: var(--solaris-primary-base);--solaris-spinner-animation-duration: var(--solaris-motion-duration-slow);--solaris-spinner-animation-easing: var(--solaris-motion-easing-linear);--solaris-spinner-stacked-step: 0;--solaris-spinner-stacked-opacity-active: var(--solaris-opacity-100);--solaris-spinner-stacked-opacity-mid: var(--solaris-opacity-50);--solaris-spinner-stacked-opacity-inactive: var(--solaris-opacity-20);display:inline-flex;align-items:center;gap:var(--solaris-spacing-2);box-sizing:border-box;color:var(--solaris-spinner-color);font-family:var(--solaris-font-family-sans)}.solaris-spinner__ring{position:relative;display:block;box-sizing:border-box;flex-shrink:0;width:var(--solaris-spinner-size);height:var(--solaris-spinner-size);overflow:visible;shape-rendering:geometricprecision}.solaris-spinner__track,.solaris-spinner__indicator{fill:none;stroke-linecap:round}.solaris-spinner__track{stroke:var(--solaris-spinner-track-color);stroke-width:var(--solaris-spinner-thickness);opacity:var(--solaris-spinner-track-opacity)}.solaris-spinner__indicator{stroke:var(--solaris-spinner-color);stroke-width:var(--solaris-spinner-thickness)}:host([data-variant=ring]) .solaris-spinner__indicator{transform-box:view-box;transform-origin:50% 50%;animation:solaris-spinner-rotate var(--solaris-spinner-animation-duration) var(--solaris-spinner-animation-easing) infinite}:host([data-variant=progress]) .solaris-spinner__indicator{transform:rotate(-90deg);transform-box:fill-box;transform-origin:center;transition:stroke-dasharray var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}.solaris-spinner__bar{fill:none;stroke:var(--solaris-spinner-color);stroke-width:var(--solaris-spinner-thickness);stroke-linecap:round;animation:solaris-spinner-stacked-bar var(--solaris-spinner-animation-duration) var(--solaris-spinner-animation-easing) infinite;animation-delay:calc(var(--solaris-spinner-animation-duration) * var(--solaris-spinner-stacked-step))}.solaris-spinner__label{font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md)}.solaris-spinner__content{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--solaris-spacing-1)}.solaris-spinner__header{display:inline-flex;align-items:baseline;gap:var(--solaris-spacing-2)}.solaris-spinner__percent{font-size:var(--solaris-font-size-md);font-weight:var(--solaris-font-weight-semibold);line-height:var(--solaris-line-height-md);font-variant-numeric:tabular-nums}.solaris-spinner__description{font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md);color:var(--solaris-text-muted)}:host([data-variant=progress]){align-items:flex-start}:host([data-size=sm]){--solaris-spinner-size: var(--solaris-spacing-4)}:host([data-size=lg]){--solaris-spinner-size: var(--solaris-spacing-8)}:host([data-size=xl]){--solaris-spinner-size: var(--solaris-spacing-16)}:host([data-speed=slow]){--solaris-spinner-animation-duration: var(--solaris-motion-duration-slower)}:host([data-speed=fast]){--solaris-spinner-animation-duration: var(--solaris-motion-duration-normal)}:host([data-easing=ease]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-standard)}:host([data-easing=ease-in]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-accelerate)}:host([data-easing=ease-out]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-decelerate)}:host([data-easing=ease-in-out]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-standard)}:host([data-easing=spring]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-spring)}:host([data-color=neutral]){--solaris-spinner-color: var(--solaris-text-muted)}:host([data-color=primary]){--solaris-spinner-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-spinner-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-spinner-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-spinner-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-spinner-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-spinner-color: var(--solaris-spinner-custom-color)}:host([data-backdrop]){position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:var(--solaris-backdrop);z-index:var(--solaris-z-index-overlay)}:host([data-backdrop]) .solaris-spinner__label{color:var(--solaris-text-inverse)}@media(prefers-reduced-motion:reduce){:host([data-variant=ring]) .solaris-spinner__indicator{animation:none;opacity:var(--solaris-opacity-50)}:host([data-variant=stacked]) .solaris-spinner__bar{animation:none}}[data-reduced-motion=true] solaris-spinner[data-variant=ring] .solaris-spinner__indicator{animation:none;opacity:var(--solaris-opacity-50)}[data-reduced-motion=true] solaris-spinner[data-variant=stacked] .solaris-spinner__bar{animation:none}@keyframes solaris-spinner-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes solaris-spinner-stacked-bar{0%{opacity:var(--solaris-spinner-stacked-opacity-inactive)}20%{opacity:var(--solaris-spinner-stacked-opacity-active)}40%{opacity:var(--solaris-spinner-stacked-opacity-mid)}60%{opacity:var(--solaris-spinner-stacked-opacity-inactive)}to{opacity:var(--solaris-spinner-stacked-opacity-inactive)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1833
|
+
}
|
|
1834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisSpinnerComponent, decorators: [{
|
|
1835
|
+
type: Component,
|
|
1836
|
+
args: [{ selector: 'solaris-spinner', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1837
|
+
class: 'solaris-spinner',
|
|
1838
|
+
'[attr.role]': 'hostRole()',
|
|
1839
|
+
'[attr.aria-live]': 'hostAriaLive()',
|
|
1840
|
+
'[attr.data-size]': 'size()',
|
|
1841
|
+
'[attr.data-speed]': 'speed()',
|
|
1842
|
+
'[attr.data-color]': 'color()',
|
|
1843
|
+
'[attr.data-easing]': 'easing()',
|
|
1844
|
+
'[attr.data-variant]': 'variant()',
|
|
1845
|
+
'[attr.aria-label]': 'resolvedAriaLabel()',
|
|
1846
|
+
'[attr.data-backdrop]': 'backdrop() ? "" : null',
|
|
1847
|
+
'[attr.aria-hidden]': 'ariaHidden() ? "true" : null',
|
|
1848
|
+
'[attr.aria-valuemin]': 'progressAria()?.valuemin ?? null',
|
|
1849
|
+
'[attr.aria-valuemax]': 'progressAria()?.valuemax ?? null',
|
|
1850
|
+
'[attr.aria-valuenow]': 'progressAria()?.valuenow ?? null',
|
|
1851
|
+
'[attr.aria-valuetext]': 'progressAria()?.valuetext ?? null',
|
|
1852
|
+
}, template: "@if (isStacked()) {\n <svg class=\"solaris-spinner__ring\" aria-hidden=\"true\" viewBox=\"0 0 120 120\">\n @for (bar of stackedBars; track bar.x1) {\n <line\n class=\"solaris-spinner__bar\"\n [attr.x1]=\"bar.x1\"\n [attr.y1]=\"bar.y1\"\n [attr.x2]=\"bar.x2\"\n [attr.y2]=\"bar.y2\"\n [style.--solaris-spinner-stacked-step]=\"bar.delayFactor\"\n [style.opacity]=\"bar.staticOpacity\"\n ></line>\n }\n </svg>\n} @else {\n <svg class=\"solaris-spinner__ring\" aria-hidden=\"true\" viewBox=\"0 0 120 120\">\n <circle class=\"solaris-spinner__track\" cx=\"60\" cy=\"60\" r=\"46\"></circle>\n @if (isProgress()) {\n <circle\n class=\"solaris-spinner__indicator solaris-spinner__indicator--progress\"\n cx=\"60\"\n cy=\"60\"\n r=\"46\"\n pathLength=\"100\"\n [attr.stroke-dasharray]=\"indicatorDashArray()\"\n ></circle>\n } @else {\n <g class=\"solaris-spinner__indicator\">\n <path class=\"solaris-spinner__arc\" [attr.d]=\"ringArcPath\"></path>\n </g>\n }\n </svg>\n}\n@if (isProgress()) {\n <span class=\"solaris-spinner__content\">\n <span class=\"solaris-spinner__header\">\n @if (showPercent()) {\n <span class=\"solaris-spinner__percent\">{{ clampedValue() }}%</span>\n }\n @if (resolvedLabel(); as label) {\n <span class=\"solaris-spinner__label\">{{ label }}</span>\n }\n </span>\n @for (line of resolvedDescription(); track $index) {\n <span class=\"solaris-spinner__description\">{{ line }}</span>\n }\n </span>\n} @else if (resolvedLabel(); as label) {\n <span class=\"solaris-spinner__label\">{{ label }}</span>\n}\n", styles: [":host{--solaris-spinner-size: var(--solaris-spacing-6);--solaris-spinner-thickness: 15;--solaris-spinner-color: var(--solaris-primary-base);--solaris-spinner-track-color: var(--solaris-spinner-color);--solaris-spinner-track-opacity: var(--solaris-opacity-20);--solaris-spinner-custom-color: var(--solaris-primary-base);--solaris-spinner-animation-duration: var(--solaris-motion-duration-slow);--solaris-spinner-animation-easing: var(--solaris-motion-easing-linear);--solaris-spinner-stacked-step: 0;--solaris-spinner-stacked-opacity-active: var(--solaris-opacity-100);--solaris-spinner-stacked-opacity-mid: var(--solaris-opacity-50);--solaris-spinner-stacked-opacity-inactive: var(--solaris-opacity-20);display:inline-flex;align-items:center;gap:var(--solaris-spacing-2);box-sizing:border-box;color:var(--solaris-spinner-color);font-family:var(--solaris-font-family-sans)}.solaris-spinner__ring{position:relative;display:block;box-sizing:border-box;flex-shrink:0;width:var(--solaris-spinner-size);height:var(--solaris-spinner-size);overflow:visible;shape-rendering:geometricprecision}.solaris-spinner__track,.solaris-spinner__indicator{fill:none;stroke-linecap:round}.solaris-spinner__track{stroke:var(--solaris-spinner-track-color);stroke-width:var(--solaris-spinner-thickness);opacity:var(--solaris-spinner-track-opacity)}.solaris-spinner__indicator{stroke:var(--solaris-spinner-color);stroke-width:var(--solaris-spinner-thickness)}:host([data-variant=ring]) .solaris-spinner__indicator{transform-box:view-box;transform-origin:50% 50%;animation:solaris-spinner-rotate var(--solaris-spinner-animation-duration) var(--solaris-spinner-animation-easing) infinite}:host([data-variant=progress]) .solaris-spinner__indicator{transform:rotate(-90deg);transform-box:fill-box;transform-origin:center;transition:stroke-dasharray var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}.solaris-spinner__bar{fill:none;stroke:var(--solaris-spinner-color);stroke-width:var(--solaris-spinner-thickness);stroke-linecap:round;animation:solaris-spinner-stacked-bar var(--solaris-spinner-animation-duration) var(--solaris-spinner-animation-easing) infinite;animation-delay:calc(var(--solaris-spinner-animation-duration) * var(--solaris-spinner-stacked-step))}.solaris-spinner__label{font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md)}.solaris-spinner__content{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--solaris-spacing-1)}.solaris-spinner__header{display:inline-flex;align-items:baseline;gap:var(--solaris-spacing-2)}.solaris-spinner__percent{font-size:var(--solaris-font-size-md);font-weight:var(--solaris-font-weight-semibold);line-height:var(--solaris-line-height-md);font-variant-numeric:tabular-nums}.solaris-spinner__description{font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md);color:var(--solaris-text-muted)}:host([data-variant=progress]){align-items:flex-start}:host([data-size=sm]){--solaris-spinner-size: var(--solaris-spacing-4)}:host([data-size=lg]){--solaris-spinner-size: var(--solaris-spacing-8)}:host([data-size=xl]){--solaris-spinner-size: var(--solaris-spacing-16)}:host([data-speed=slow]){--solaris-spinner-animation-duration: var(--solaris-motion-duration-slower)}:host([data-speed=fast]){--solaris-spinner-animation-duration: var(--solaris-motion-duration-normal)}:host([data-easing=ease]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-standard)}:host([data-easing=ease-in]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-accelerate)}:host([data-easing=ease-out]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-decelerate)}:host([data-easing=ease-in-out]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-standard)}:host([data-easing=spring]){--solaris-spinner-animation-easing: var(--solaris-motion-easing-spring)}:host([data-color=neutral]){--solaris-spinner-color: var(--solaris-text-muted)}:host([data-color=primary]){--solaris-spinner-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-spinner-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-spinner-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-spinner-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-spinner-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-spinner-color: var(--solaris-spinner-custom-color)}:host([data-backdrop]){position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:var(--solaris-backdrop);z-index:var(--solaris-z-index-overlay)}:host([data-backdrop]) .solaris-spinner__label{color:var(--solaris-text-inverse)}@media(prefers-reduced-motion:reduce){:host([data-variant=ring]) .solaris-spinner__indicator{animation:none;opacity:var(--solaris-opacity-50)}:host([data-variant=stacked]) .solaris-spinner__bar{animation:none}}[data-reduced-motion=true] solaris-spinner[data-variant=ring] .solaris-spinner__indicator{animation:none;opacity:var(--solaris-opacity-50)}[data-reduced-motion=true] solaris-spinner[data-variant=stacked] .solaris-spinner__bar{animation:none}@keyframes solaris-spinner-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes solaris-spinner-stacked-bar{0%{opacity:var(--solaris-spinner-stacked-opacity-inactive)}20%{opacity:var(--solaris-spinner-stacked-opacity-active)}40%{opacity:var(--solaris-spinner-stacked-opacity-mid)}60%{opacity:var(--solaris-spinner-stacked-opacity-inactive)}to{opacity:var(--solaris-spinner-stacked-opacity-inactive)}}\n"] }]
|
|
1853
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], easing: [{ type: i0.Input, args: [{ isSignal: true, alias: "easing", required: false }] }], backdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdrop", required: false }] }], ariaHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHidden", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], showPercent: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPercent", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], descriptionKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "descriptionKey", required: false }] }] } });
|
|
1854
|
+
|
|
1695
1855
|
// SECURITY_EXCEPTION_FILE: ElementRef.nativeElement.tagName is the standard Angular API to differentiate <button> vs <a> for correct disabled/type behavior.
|
|
1696
1856
|
// SECURITY_EXCEPTION_FILE: ElementRef.nativeElement.getAttribute/setAttribute is the standard Angular approach to handle default button type.
|
|
1697
1857
|
// SECURITY_EXCEPTION_FILE: ElementRef.nativeElement.setAttribute required for default <button> type behavior.
|
|
1858
|
+
// SECURITY_EXCEPTION_FILE: createComponent/insertBefore required to render the spinner component inside a native button host (directive has no template).
|
|
1698
1859
|
class SolarisButtonDirective {
|
|
1699
1860
|
appearance = input('solid', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
1700
1861
|
color = input('neutral', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
@@ -1711,6 +1872,10 @@ class SolarisButtonDirective {
|
|
|
1711
1872
|
translate = inject(SolarisTranslateService, {
|
|
1712
1873
|
optional: true,
|
|
1713
1874
|
});
|
|
1875
|
+
environmentInjector = inject(EnvironmentInjector);
|
|
1876
|
+
platformId = inject(PLATFORM_ID);
|
|
1877
|
+
destroyRef = inject(DestroyRef);
|
|
1878
|
+
spinnerRef = null;
|
|
1714
1879
|
resolvedLoadingLabel = computed(() => {
|
|
1715
1880
|
const label = this.loadingLabel();
|
|
1716
1881
|
if (label) {
|
|
@@ -1732,6 +1897,38 @@ class SolarisButtonDirective {
|
|
|
1732
1897
|
if (this.isButton && initialType === null) {
|
|
1733
1898
|
this.elementRef.nativeElement.setAttribute('type', 'button');
|
|
1734
1899
|
}
|
|
1900
|
+
effect(() => {
|
|
1901
|
+
if (this.loading()) {
|
|
1902
|
+
this.attachSpinner();
|
|
1903
|
+
}
|
|
1904
|
+
else {
|
|
1905
|
+
this.detachSpinner();
|
|
1906
|
+
}
|
|
1907
|
+
});
|
|
1908
|
+
this.destroyRef.onDestroy(() => this.detachSpinner());
|
|
1909
|
+
}
|
|
1910
|
+
attachSpinner() {
|
|
1911
|
+
if (this.spinnerRef || !isPlatformBrowser(this.platformId)) {
|
|
1912
|
+
return;
|
|
1913
|
+
}
|
|
1914
|
+
const spinnerRef = createComponent(SolarisSpinnerComponent, {
|
|
1915
|
+
environmentInjector: this.environmentInjector,
|
|
1916
|
+
});
|
|
1917
|
+
spinnerRef.setInput('size', 'sm');
|
|
1918
|
+
spinnerRef.setInput('color', 'custom');
|
|
1919
|
+
spinnerRef.setInput('label', '');
|
|
1920
|
+
spinnerRef.setInput('ariaHidden', true);
|
|
1921
|
+
spinnerRef.changeDetectorRef.detectChanges();
|
|
1922
|
+
const spinnerEl = spinnerRef.location.nativeElement;
|
|
1923
|
+
this.elementRef.nativeElement.insertBefore(spinnerEl, this.elementRef.nativeElement.firstChild);
|
|
1924
|
+
this.spinnerRef = spinnerRef;
|
|
1925
|
+
}
|
|
1926
|
+
detachSpinner() {
|
|
1927
|
+
if (!this.spinnerRef) {
|
|
1928
|
+
return;
|
|
1929
|
+
}
|
|
1930
|
+
this.spinnerRef.destroy();
|
|
1931
|
+
this.spinnerRef = null;
|
|
1735
1932
|
}
|
|
1736
1933
|
onClick(event) {
|
|
1737
1934
|
if (this.isEffectivelyDisabled() && this.isAnchor) {
|
|
@@ -8388,6 +8585,143 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
8388
8585
|
}, template: "@if (isMultiLine()) {\n @for (width of lineWidths(); track $index) {\n <span class=\"solaris-skeleton-line\" [style.width]=\"width\"></span>\n }\n}\n", styles: [":host{--solaris-skeleton-width: 100%;--solaris-skeleton-gap: var(--solaris-spacing-2);--solaris-skeleton-height: var(--solaris-spacing-4);--solaris-skeleton-radius: var(--solaris-radius-sm);--solaris-skeleton-background: var(--solaris-surface-muted);--solaris-skeleton-highlight: var(--solaris-surface-raised);--solaris-skeleton-animation-easing: var(--solaris-motion-easing-standard);--solaris-skeleton-animation-duration: var(--solaris-motion-duration-slower);min-width:0;min-height:0;display:block;box-sizing:border-box;width:var(--solaris-skeleton-width);height:var(--solaris-skeleton-height);border-radius:var(--solaris-skeleton-radius);background:var(--solaris-skeleton-background)}:host([data-multiline]){display:flex;height:auto;animation:none;background:none;border-radius:var(--solaris-radius-none);overflow:visible;position:static;flex-direction:column;gap:var(--solaris-skeleton-gap)}:host([data-multiline]):after{content:none;animation:none}.solaris-skeleton-line{display:block;box-sizing:border-box;min-width:0;min-height:0;height:var(--solaris-skeleton-height);border-radius:var(--solaris-skeleton-radius);background:var(--solaris-skeleton-background)}:host([data-variant=text]){--solaris-skeleton-height: var(--solaris-spacing-4)}:host([data-variant=rectangular]){--solaris-skeleton-height: var(--solaris-spacing-20)}:host([data-variant=circular]){--solaris-skeleton-height: var(--solaris-spacing-12);--solaris-skeleton-width: var(--solaris-spacing-12)}:host([data-size=sm]){--solaris-skeleton-height: var(--solaris-spacing-3)}:host([data-size=sm][data-variant=rectangular]){--solaris-skeleton-height: 3.75rem}:host([data-size=sm][data-variant=circular]){--solaris-skeleton-width: var(--solaris-spacing-6);--solaris-skeleton-height: var(--solaris-spacing-6)}:host([data-size=lg]){--solaris-skeleton-height: var(--solaris-spacing-5)}:host([data-size=lg][data-variant=rectangular]){--solaris-skeleton-height: 6.25rem}:host([data-size=lg][data-variant=circular]){--solaris-skeleton-width: 2.25rem;--solaris-skeleton-height: 2.25rem}:host([data-density=compact]){--solaris-skeleton-height: .375rem}:host([data-density=compact][data-variant=rectangular]){--solaris-skeleton-height: var(--solaris-spacing-12)}:host([data-density=compact][data-variant=circular]){--solaris-skeleton-width: var(--solaris-spacing-5);--solaris-skeleton-height: var(--solaris-spacing-5)}:host([data-density=comfortable]){--solaris-skeleton-height: var(--solaris-spacing-3)}:host([data-density=comfortable][data-variant=rectangular]){--solaris-skeleton-height: 5.5rem}:host([data-density=comfortable][data-variant=circular]){--solaris-skeleton-width: 2.25rem;--solaris-skeleton-height: 2.25rem}:host([data-radius=none]){--solaris-skeleton-radius: var(--solaris-radius-none)}:host([data-radius=sm]){--solaris-skeleton-radius: var(--solaris-radius-sm)}:host([data-radius=full]){--solaris-skeleton-radius: var(--solaris-radius-full)}:host([data-animation=pulse]){animation:solaris-skeleton-pulse var(--solaris-skeleton-animation-duration) var(--solaris-skeleton-animation-easing) infinite}:host([data-animation=pulse]) .solaris-skeleton-line{animation:solaris-skeleton-pulse var(--solaris-skeleton-animation-duration) var(--solaris-skeleton-animation-easing) infinite}:host([data-animation=wave]){overflow:hidden;position:relative}:host([data-animation=wave]):after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,var(--solaris-skeleton-highlight) 50%,transparent 100%);background-size:200% 100%;animation:solaris-skeleton-wave var(--solaris-skeleton-animation-duration) var(--solaris-skeleton-animation-easing) infinite}:host([data-animation=wave]) .solaris-skeleton-line{overflow:hidden;position:relative}:host([data-animation=wave]) .solaris-skeleton-line:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,var(--solaris-skeleton-highlight) 50%,transparent 100%);background-size:200% 100%;animation:solaris-skeleton-wave var(--solaris-skeleton-animation-duration) var(--solaris-skeleton-animation-easing) infinite}:host([data-animation=wave][data-multiline]){overflow:visible;position:static}:host([data-animation=wave][data-multiline]):after{content:none;animation:none}:host([data-animation=none]){animation:none}:host([data-animation=none]):after{content:none;animation:none}@media(prefers-reduced-motion:reduce){:host([data-animation=pulse]){animation:none}:host([data-animation=pulse]) .solaris-skeleton-line{animation:none}:host([data-animation=wave]):after{animation:none;content:none}:host([data-animation=wave]) .solaris-skeleton-line:after{animation:none;content:none}:host([data-animation=wave][data-multiline]):after{content:none;animation:none}}[data-reduced-motion=true] solaris-skeleton[data-animation=pulse]{animation:none}[data-reduced-motion=true] solaris-skeleton[data-animation=pulse] .solaris-skeleton-line{animation:none}[data-reduced-motion=true] solaris-skeleton[data-animation=wave]:after{animation:none;content:none}[data-reduced-motion=true] solaris-skeleton[data-animation=wave] .solaris-skeleton-line:after{animation:none;content:none}[data-reduced-motion=true] solaris-skeleton[data-animation=wave][data-multiline]:after{content:none;animation:none}@keyframes solaris-skeleton-pulse{0%{opacity:var(--solaris-opacity-100)}50%{opacity:var(--solaris-opacity-50)}to{opacity:var(--solaris-opacity-100)}}@keyframes solaris-skeleton-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"] }]
|
|
8389
8586
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], lines: [{ type: i0.Input, args: [{ isSignal: true, alias: "lines", required: false }] }] } });
|
|
8390
8587
|
|
|
8588
|
+
class SolarisProgressComponent {
|
|
8589
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
8590
|
+
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
8591
|
+
value = input(0, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
8592
|
+
indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
8593
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
8594
|
+
labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : /* istanbul ignore next */ []));
|
|
8595
|
+
showPercent = input(false, ...(ngDevMode ? [{ debugName: "showPercent" }] : /* istanbul ignore next */ []));
|
|
8596
|
+
ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
8597
|
+
ariaLabelKey = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
|
|
8598
|
+
translate = inject(SolarisTranslateService, {
|
|
8599
|
+
optional: true,
|
|
8600
|
+
});
|
|
8601
|
+
clampedValue = computed(() => {
|
|
8602
|
+
const value = this.value();
|
|
8603
|
+
if (Number.isFinite(value)) {
|
|
8604
|
+
return Math.min(100, Math.max(0, Math.round(value)));
|
|
8605
|
+
}
|
|
8606
|
+
return 0;
|
|
8607
|
+
}, ...(ngDevMode ? [{ debugName: "clampedValue" }] : /* istanbul ignore next */ []));
|
|
8608
|
+
percentText = computed(() => {
|
|
8609
|
+
const percent = this.clampedValue();
|
|
8610
|
+
return this.indeterminate() ? 0 : percent;
|
|
8611
|
+
}, ...(ngDevMode ? [{ debugName: "percentText" }] : /* istanbul ignore next */ []));
|
|
8612
|
+
resolvedLabel = computed(() => {
|
|
8613
|
+
const label = this.label();
|
|
8614
|
+
if (label !== undefined) {
|
|
8615
|
+
return label === '' ? null : label;
|
|
8616
|
+
}
|
|
8617
|
+
const key = this.labelKey();
|
|
8618
|
+
if (key && this.translate) {
|
|
8619
|
+
return this.translate.translate(key);
|
|
8620
|
+
}
|
|
8621
|
+
return null;
|
|
8622
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedLabel" }] : /* istanbul ignore next */ []));
|
|
8623
|
+
resolvedAriaLabel = computed(() => {
|
|
8624
|
+
const aria = this.ariaLabel();
|
|
8625
|
+
if (aria) {
|
|
8626
|
+
return aria;
|
|
8627
|
+
}
|
|
8628
|
+
const key = this.ariaLabelKey();
|
|
8629
|
+
if (key && this.translate) {
|
|
8630
|
+
return this.translate.translate(key);
|
|
8631
|
+
}
|
|
8632
|
+
const label = this.resolvedLabel();
|
|
8633
|
+
if (label) {
|
|
8634
|
+
return label;
|
|
8635
|
+
}
|
|
8636
|
+
return null;
|
|
8637
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
8638
|
+
indeterminateText = computed(() => {
|
|
8639
|
+
if (this.translate) {
|
|
8640
|
+
return this.translate.translate('solaris.progress.indeterminate');
|
|
8641
|
+
}
|
|
8642
|
+
return 'Indeterminate progress';
|
|
8643
|
+
}, ...(ngDevMode ? [{ debugName: "indeterminateText" }] : /* istanbul ignore next */ []));
|
|
8644
|
+
resolvedValueText = computed(() => {
|
|
8645
|
+
const label = this.resolvedLabel();
|
|
8646
|
+
if (this.indeterminate()) {
|
|
8647
|
+
return label
|
|
8648
|
+
? `${label}, ${this.indeterminateText()}`
|
|
8649
|
+
: this.indeterminateText();
|
|
8650
|
+
}
|
|
8651
|
+
const percent = `${this.clampedValue()} percent`;
|
|
8652
|
+
return label ? `${label}, ${percent}` : percent;
|
|
8653
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedValueText" }] : /* istanbul ignore next */ []));
|
|
8654
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8655
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SolarisProgressComponent, isStandalone: true, selector: "solaris-progress", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, showPercent: { classPropertyName: "showPercent", publicName: "showPercent", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelKey: { classPropertyName: "ariaLabelKey", publicName: "ariaLabelKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.data-size": "size()", "attr.data-color": "color()", "attr.data-indeterminate": "indeterminate() ? \"\" : null", "attr.aria-valuemin": "indeterminate() ? null : 0", "attr.aria-valuemax": "indeterminate() ? null : 100", "attr.aria-valuenow": "indeterminate() ? null : clampedValue()", "attr.aria-label": "resolvedAriaLabel()", "attr.aria-valuetext": "resolvedValueText()" }, classAttribute: "solaris-progress" }, ngImport: i0, template: "@if (resolvedLabel(); as label) {\n <span class=\"solaris-progress__label\">{{ label }}</span>\n}\n<div class=\"solaris-progress__track\" role=\"presentation\" aria-hidden=\"true\">\n <div\n class=\"solaris-progress__fill\"\n [class.solaris-progress__fill--indeterminate]=\"indeterminate()\"\n [style.--solaris-progress-fill-width.%]=\"percentText()\"\n ></div>\n</div>\n@if (showPercent() && !indeterminate()) {\n <span class=\"solaris-progress__percent\">{{ percentText() }}%</span>\n}\n", styles: [":host{--solaris-progress-height: var(--solaris-spacing-2);--solaris-progress-radius: var(--solaris-radius-full);--solaris-progress-color: var(--solaris-primary-base);--solaris-progress-custom-color: var(--solaris-primary-base);--solaris-progress-track-color: var(--solaris-surface-muted);--solaris-progress-animation-duration: var(--solaris-motion-duration-slower);--solaris-progress-fill-width: 100%;display:flex;align-items:center;gap:var(--solaris-spacing-3);box-sizing:border-box;color:var(--solaris-text-muted);font-family:var(--solaris-font-family-sans)}.solaris-progress__track{position:relative;display:block;flex:1 1 0;overflow:hidden;box-sizing:border-box;width:100%;height:var(--solaris-progress-height);background:var(--solaris-progress-track-color);border-radius:var(--solaris-progress-radius)}.solaris-progress__fill{position:absolute;inset:0 auto 0 0;box-sizing:border-box;width:var(--solaris-progress-fill-width);background:var(--solaris-progress-color);border-radius:inherit;transform-origin:left center;transition:width var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}.solaris-progress__fill--indeterminate{width:40%;animation:solaris-progress-slide var(--solaris-progress-animation-duration) var(--solaris-motion-easing-standard) infinite}.solaris-progress__label,.solaris-progress__percent{font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md);white-space:nowrap}.solaris-progress__percent{font-variant-numeric:tabular-nums}:host([data-size=sm]){--solaris-progress-height: var(--solaris-border-width-xl)}:host([data-size=lg]){--solaris-progress-height: var(--solaris-spacing-3)}:host([data-color=neutral]){--solaris-progress-color: var(--solaris-text-muted)}:host([data-color=primary]){--solaris-progress-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-progress-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-progress-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-progress-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-progress-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-progress-color: var(--solaris-progress-custom-color)}@media(prefers-reduced-motion:reduce){.solaris-progress__fill--indeterminate{animation:none}}[data-reduced-motion=true] solaris-progress .solaris-progress__fill--indeterminate{animation:none}@keyframes solaris-progress-slide{0%{transform:translate(-100%)}to{transform:translate(350%)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8656
|
+
}
|
|
8657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisProgressComponent, decorators: [{
|
|
8658
|
+
type: Component,
|
|
8659
|
+
args: [{ selector: 'solaris-progress', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
8660
|
+
class: 'solaris-progress',
|
|
8661
|
+
role: 'progressbar',
|
|
8662
|
+
'[attr.data-size]': 'size()',
|
|
8663
|
+
'[attr.data-color]': 'color()',
|
|
8664
|
+
'[attr.data-indeterminate]': 'indeterminate() ? "" : null',
|
|
8665
|
+
'[attr.aria-valuemin]': 'indeterminate() ? null : 0',
|
|
8666
|
+
'[attr.aria-valuemax]': 'indeterminate() ? null : 100',
|
|
8667
|
+
'[attr.aria-valuenow]': 'indeterminate() ? null : clampedValue()',
|
|
8668
|
+
'[attr.aria-label]': 'resolvedAriaLabel()',
|
|
8669
|
+
'[attr.aria-valuetext]': 'resolvedValueText()',
|
|
8670
|
+
}, template: "@if (resolvedLabel(); as label) {\n <span class=\"solaris-progress__label\">{{ label }}</span>\n}\n<div class=\"solaris-progress__track\" role=\"presentation\" aria-hidden=\"true\">\n <div\n class=\"solaris-progress__fill\"\n [class.solaris-progress__fill--indeterminate]=\"indeterminate()\"\n [style.--solaris-progress-fill-width.%]=\"percentText()\"\n ></div>\n</div>\n@if (showPercent() && !indeterminate()) {\n <span class=\"solaris-progress__percent\">{{ percentText() }}%</span>\n}\n", styles: [":host{--solaris-progress-height: var(--solaris-spacing-2);--solaris-progress-radius: var(--solaris-radius-full);--solaris-progress-color: var(--solaris-primary-base);--solaris-progress-custom-color: var(--solaris-primary-base);--solaris-progress-track-color: var(--solaris-surface-muted);--solaris-progress-animation-duration: var(--solaris-motion-duration-slower);--solaris-progress-fill-width: 100%;display:flex;align-items:center;gap:var(--solaris-spacing-3);box-sizing:border-box;color:var(--solaris-text-muted);font-family:var(--solaris-font-family-sans)}.solaris-progress__track{position:relative;display:block;flex:1 1 0;overflow:hidden;box-sizing:border-box;width:100%;height:var(--solaris-progress-height);background:var(--solaris-progress-track-color);border-radius:var(--solaris-progress-radius)}.solaris-progress__fill{position:absolute;inset:0 auto 0 0;box-sizing:border-box;width:var(--solaris-progress-fill-width);background:var(--solaris-progress-color);border-radius:inherit;transform-origin:left center;transition:width var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}.solaris-progress__fill--indeterminate{width:40%;animation:solaris-progress-slide var(--solaris-progress-animation-duration) var(--solaris-motion-easing-standard) infinite}.solaris-progress__label,.solaris-progress__percent{font-size:var(--solaris-font-size-sm);line-height:var(--solaris-line-height-md);white-space:nowrap}.solaris-progress__percent{font-variant-numeric:tabular-nums}:host([data-size=sm]){--solaris-progress-height: var(--solaris-border-width-xl)}:host([data-size=lg]){--solaris-progress-height: var(--solaris-spacing-3)}:host([data-color=neutral]){--solaris-progress-color: var(--solaris-text-muted)}:host([data-color=primary]){--solaris-progress-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-progress-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-progress-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-progress-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-progress-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-progress-color: var(--solaris-progress-custom-color)}@media(prefers-reduced-motion:reduce){.solaris-progress__fill--indeterminate{animation:none}}[data-reduced-motion=true] solaris-progress .solaris-progress__fill--indeterminate{animation:none}@keyframes solaris-progress-slide{0%{transform:translate(-100%)}to{transform:translate(350%)}}\n"] }]
|
|
8671
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], showPercent: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPercent", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }] } });
|
|
8672
|
+
|
|
8673
|
+
class SolarisLoadingTextComponent {
|
|
8674
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
8675
|
+
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
8676
|
+
speed = input('normal', ...(ngDevMode ? [{ debugName: "speed" }] : /* istanbul ignore next */ []));
|
|
8677
|
+
text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
8678
|
+
textKey = input(...(ngDevMode ? [undefined, { debugName: "textKey" }] : /* istanbul ignore next */ []));
|
|
8679
|
+
ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
8680
|
+
ariaLabelKey = input(...(ngDevMode ? [undefined, { debugName: "ariaLabelKey" }] : /* istanbul ignore next */ []));
|
|
8681
|
+
translate = inject(SolarisTranslateService, {
|
|
8682
|
+
optional: true,
|
|
8683
|
+
});
|
|
8684
|
+
resolvedText = computed(() => {
|
|
8685
|
+
const text = this.text();
|
|
8686
|
+
if (text !== undefined) {
|
|
8687
|
+
return text === '' ? null : text;
|
|
8688
|
+
}
|
|
8689
|
+
const key = this.textKey();
|
|
8690
|
+
if (key && this.translate) {
|
|
8691
|
+
return this.translate.translate(key);
|
|
8692
|
+
}
|
|
8693
|
+
if (this.translate) {
|
|
8694
|
+
return this.translate.translate('solaris.loadingText.loading');
|
|
8695
|
+
}
|
|
8696
|
+
return null;
|
|
8697
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedText" }] : /* istanbul ignore next */ []));
|
|
8698
|
+
resolvedAriaLabel = computed(() => {
|
|
8699
|
+
const aria = this.ariaLabel();
|
|
8700
|
+
if (aria) {
|
|
8701
|
+
return aria;
|
|
8702
|
+
}
|
|
8703
|
+
const key = this.ariaLabelKey();
|
|
8704
|
+
if (key && this.translate) {
|
|
8705
|
+
return this.translate.translate(key);
|
|
8706
|
+
}
|
|
8707
|
+
return this.resolvedText();
|
|
8708
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
8709
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisLoadingTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8710
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: SolarisLoadingTextComponent, isStandalone: true, selector: "solaris-loading-text", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, speed: { classPropertyName: "speed", publicName: "speed", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, textKey: { classPropertyName: "textKey", publicName: "textKey", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelKey: { classPropertyName: "ariaLabelKey", publicName: "ariaLabelKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status", "aria-live": "polite" }, properties: { "attr.data-size": "size()", "attr.data-color": "color()", "attr.data-speed": "speed()", "attr.aria-label": "resolvedAriaLabel()" }, classAttribute: "solaris-loading-text" }, ngImport: i0, template: "<span class=\"solaris-loading-text__text\" [attr.data-text]=\"resolvedText()\">{{\n resolvedText()\n}}</span>\n", styles: [":host{--solaris-loading-text-color: var(--solaris-text-default);--solaris-loading-text-shimmer-color: var(--solaris-text-inverse);--solaris-loading-text-shimmer-opacity: var(--solaris-opacity-40);--solaris-loading-text-custom-color: var(--solaris-primary-base);--solaris-loading-text-font-size: var(--solaris-font-size-md);--solaris-loading-text-font-weight: var(--solaris-font-weight-medium);--solaris-loading-text-line-height: var(--solaris-line-height-md);--solaris-loading-text-animation-duration: var( --solaris-motion-duration-slower );--solaris-loading-text-animation-easing: var(--solaris-motion-easing-linear);display:inline-block;box-sizing:border-box;max-width:100%;font-family:var(--solaris-font-family-sans);font-size:var(--solaris-loading-text-font-size);font-weight:var(--solaris-loading-text-font-weight);line-height:var(--solaris-loading-text-line-height)}.solaris-loading-text__text{position:relative;display:inline-block;box-sizing:border-box;max-width:100%;color:var(--solaris-loading-text-color)}.solaris-loading-text__text:after{content:attr(data-text);position:absolute;inset:0;overflow:hidden;color:transparent;background-image:linear-gradient(100deg,transparent 20%,var(--solaris-loading-text-shimmer-color) 50%,transparent 80%);background-size:200% 100%;background-repeat:no-repeat;background-clip:text;-webkit-background-clip:text;opacity:var(--solaris-loading-text-shimmer-opacity);animation:solaris-loading-text-shimmer var(--solaris-loading-text-animation-duration) var(--solaris-loading-text-animation-easing) infinite}:host([data-size=sm]){--solaris-loading-text-font-size: var(--solaris-font-size-sm)}:host([data-size=lg]){--solaris-loading-text-font-size: var(--solaris-font-size-lg)}:host([data-size=xl]){--solaris-loading-text-font-size: var(--solaris-font-size-xl)}:host([data-speed=slow]){--solaris-loading-text-animation-duration: var( --solaris-motion-duration-slowest )}:host([data-speed=fast]){--solaris-loading-text-animation-duration: var( --solaris-motion-duration-slow )}:host([data-color=neutral]){--solaris-loading-text-color: var(--solaris-text-muted)}:host([data-color=primary]){--solaris-loading-text-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-loading-text-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-loading-text-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-loading-text-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-loading-text-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-loading-text-color: var(--solaris-loading-text-custom-color)}@media(prefers-reduced-motion:reduce){:host .solaris-loading-text__text:after{animation:none;opacity:var(--solaris-opacity-0)}}[data-reduced-motion=true] solaris-loading-text .solaris-loading-text__text:after{animation:none;opacity:var(--solaris-opacity-0)}@keyframes solaris-loading-text-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8711
|
+
}
|
|
8712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisLoadingTextComponent, decorators: [{
|
|
8713
|
+
type: Component,
|
|
8714
|
+
args: [{ selector: 'solaris-loading-text', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
8715
|
+
class: 'solaris-loading-text',
|
|
8716
|
+
role: 'status',
|
|
8717
|
+
'aria-live': 'polite',
|
|
8718
|
+
'[attr.data-size]': 'size()',
|
|
8719
|
+
'[attr.data-color]': 'color()',
|
|
8720
|
+
'[attr.data-speed]': 'speed()',
|
|
8721
|
+
'[attr.aria-label]': 'resolvedAriaLabel()',
|
|
8722
|
+
}, template: "<span class=\"solaris-loading-text__text\" [attr.data-text]=\"resolvedText()\">{{\n resolvedText()\n}}</span>\n", styles: [":host{--solaris-loading-text-color: var(--solaris-text-default);--solaris-loading-text-shimmer-color: var(--solaris-text-inverse);--solaris-loading-text-shimmer-opacity: var(--solaris-opacity-40);--solaris-loading-text-custom-color: var(--solaris-primary-base);--solaris-loading-text-font-size: var(--solaris-font-size-md);--solaris-loading-text-font-weight: var(--solaris-font-weight-medium);--solaris-loading-text-line-height: var(--solaris-line-height-md);--solaris-loading-text-animation-duration: var( --solaris-motion-duration-slower );--solaris-loading-text-animation-easing: var(--solaris-motion-easing-linear);display:inline-block;box-sizing:border-box;max-width:100%;font-family:var(--solaris-font-family-sans);font-size:var(--solaris-loading-text-font-size);font-weight:var(--solaris-loading-text-font-weight);line-height:var(--solaris-loading-text-line-height)}.solaris-loading-text__text{position:relative;display:inline-block;box-sizing:border-box;max-width:100%;color:var(--solaris-loading-text-color)}.solaris-loading-text__text:after{content:attr(data-text);position:absolute;inset:0;overflow:hidden;color:transparent;background-image:linear-gradient(100deg,transparent 20%,var(--solaris-loading-text-shimmer-color) 50%,transparent 80%);background-size:200% 100%;background-repeat:no-repeat;background-clip:text;-webkit-background-clip:text;opacity:var(--solaris-loading-text-shimmer-opacity);animation:solaris-loading-text-shimmer var(--solaris-loading-text-animation-duration) var(--solaris-loading-text-animation-easing) infinite}:host([data-size=sm]){--solaris-loading-text-font-size: var(--solaris-font-size-sm)}:host([data-size=lg]){--solaris-loading-text-font-size: var(--solaris-font-size-lg)}:host([data-size=xl]){--solaris-loading-text-font-size: var(--solaris-font-size-xl)}:host([data-speed=slow]){--solaris-loading-text-animation-duration: var( --solaris-motion-duration-slowest )}:host([data-speed=fast]){--solaris-loading-text-animation-duration: var( --solaris-motion-duration-slow )}:host([data-color=neutral]){--solaris-loading-text-color: var(--solaris-text-muted)}:host([data-color=primary]){--solaris-loading-text-color: var(--solaris-primary-base)}:host([data-color=success]){--solaris-loading-text-color: var(--solaris-success-base)}:host([data-color=warning]){--solaris-loading-text-color: var(--solaris-warning-base)}:host([data-color=danger]){--solaris-loading-text-color: var(--solaris-danger-base)}:host([data-color=info]){--solaris-loading-text-color: var(--solaris-info-base)}:host([data-color=custom]){--solaris-loading-text-color: var(--solaris-loading-text-custom-color)}@media(prefers-reduced-motion:reduce){:host .solaris-loading-text__text:after{animation:none;opacity:var(--solaris-opacity-0)}}[data-reduced-motion=true] solaris-loading-text .solaris-loading-text__text:after{animation:none;opacity:var(--solaris-opacity-0)}@keyframes solaris-loading-text-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"] }]
|
|
8723
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], textKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "textKey", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }] } });
|
|
8724
|
+
|
|
8391
8725
|
const SOLARIS_TOAST_CONFIG = new InjectionToken('SolarisToastConfig');
|
|
8392
8726
|
const SOLARIS_TOAST_DEFAULT_CONFIG = {
|
|
8393
8727
|
position: 'bottom-center',
|
|
@@ -11947,89 +12281,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
11947
12281
|
|
|
11948
12282
|
const SOLARIS_ACCORDION = new InjectionToken('SolarisAccordion');
|
|
11949
12283
|
|
|
11950
|
-
class SolarisAccordionComponent {
|
|
11951
|
-
appearance = input('boxed', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
11952
|
-
type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
11953
|
-
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
11954
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11955
|
-
allowToggle = input(true, { ...(ngDevMode ? { debugName: "allowToggle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11956
|
-
headingLevel = input(3, ...(ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []));
|
|
11957
|
-
expandIcon = input('chevron-down', ...(ngDevMode ? [{ debugName: "expandIcon" }] : /* istanbul ignore next */ []));
|
|
11958
|
-
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
11959
|
-
items = contentChildren(SolarisCollapsibleComponent, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
11960
|
-
instanceId = nextIdFor('solaris-accordion');
|
|
11961
|
-
resolvedValue = computed(() => {
|
|
11962
|
-
const value = this.value();
|
|
11963
|
-
if (value === undefined) {
|
|
11964
|
-
return this.type() === 'multiple' ? [] : undefined;
|
|
11965
|
-
}
|
|
11966
|
-
if (this.type() === 'multiple') {
|
|
11967
|
-
return Array.isArray(value) ? value : [value];
|
|
11968
|
-
}
|
|
11969
|
-
return Array.isArray(value) ? value[0] : value;
|
|
11970
|
-
}, ...(ngDevMode ? [{ debugName: "resolvedValue" }] : /* istanbul ignore next */ []));
|
|
11971
|
-
isOpen(value) {
|
|
11972
|
-
const resolved = this.resolvedValue();
|
|
11973
|
-
if (Array.isArray(resolved)) {
|
|
11974
|
-
return value !== undefined && resolved.includes(value);
|
|
11975
|
-
}
|
|
11976
|
-
return resolved === value;
|
|
11977
|
-
}
|
|
11978
|
-
toggle(value) {
|
|
11979
|
-
if (this.disabled()) {
|
|
11980
|
-
return;
|
|
11981
|
-
}
|
|
11982
|
-
const resolved = this.resolvedValue();
|
|
11983
|
-
if (this.type() === 'multiple') {
|
|
11984
|
-
const list = Array.isArray(resolved) ? [...resolved] : [];
|
|
11985
|
-
const index = list.indexOf(value);
|
|
11986
|
-
if (index >= 0) {
|
|
11987
|
-
list.splice(index, 1);
|
|
11988
|
-
}
|
|
11989
|
-
else if (value !== undefined) {
|
|
11990
|
-
list.push(value);
|
|
11991
|
-
}
|
|
11992
|
-
this.value.set(list);
|
|
11993
|
-
return;
|
|
11994
|
-
}
|
|
11995
|
-
if (resolved === value) {
|
|
11996
|
-
if (this.allowToggle()) {
|
|
11997
|
-
this.value.set(undefined);
|
|
11998
|
-
}
|
|
11999
|
-
return;
|
|
12000
|
-
}
|
|
12001
|
-
this.value.set(value);
|
|
12002
|
-
}
|
|
12003
|
-
generatePanelId(value) {
|
|
12004
|
-
return `${this.instanceId}-panel-${String(value)}`;
|
|
12005
|
-
}
|
|
12006
|
-
generateTriggerId(value) {
|
|
12007
|
-
return `${this.instanceId}-trigger-${String(value)}`;
|
|
12008
|
-
}
|
|
12009
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12010
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: SolarisAccordionComponent, isStandalone: true, selector: "solaris-accordion", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowToggle: { classPropertyName: "allowToggle", publicName: "allowToggle", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, expandIcon: { classPropertyName: "expandIcon", publicName: "expandIcon", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.data-appearance": "appearance()", "attr.data-type": "type()", "attr.data-size": "size()", "attr.data-disabled": "disabled() ? \"\" : null" }, classAttribute: "solaris-accordion" }, providers: [
|
|
12011
|
-
{
|
|
12012
|
-
provide: SOLARIS_ACCORDION,
|
|
12013
|
-
useExisting: SolarisAccordionComponent,
|
|
12014
|
-
},
|
|
12015
|
-
], queries: [{ propertyName: "items", predicate: SolarisCollapsibleComponent, isSignal: true }], ngImport: i0, template: "<div class=\"solaris-accordion__inner\">\n <ng-content select=\"solaris-collapsible\" />\n</div>\n", styles: [":host{--solaris-accordion-gap: var(--solaris-spacing-2);display:block;box-sizing:border-box}.solaris-accordion__inner{display:flex;flex-direction:column;gap:var(--solaris-accordion-gap)}:host([data-appearance=lined]) .solaris-accordion__inner{gap:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12016
|
-
}
|
|
12017
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisAccordionComponent, decorators: [{
|
|
12018
|
-
type: Component,
|
|
12019
|
-
args: [{ selector: 'solaris-accordion', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
12020
|
-
{
|
|
12021
|
-
provide: SOLARIS_ACCORDION,
|
|
12022
|
-
useExisting: SolarisAccordionComponent,
|
|
12023
|
-
},
|
|
12024
|
-
], host: {
|
|
12025
|
-
class: 'solaris-accordion',
|
|
12026
|
-
'[attr.data-appearance]': 'appearance()',
|
|
12027
|
-
'[attr.data-type]': 'type()',
|
|
12028
|
-
'[attr.data-size]': 'size()',
|
|
12029
|
-
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
12030
|
-
}, template: "<div class=\"solaris-accordion__inner\">\n <ng-content select=\"solaris-collapsible\" />\n</div>\n", styles: [":host{--solaris-accordion-gap: var(--solaris-spacing-2);display:block;box-sizing:border-box}.solaris-accordion__inner{display:flex;flex-direction:column;gap:var(--solaris-accordion-gap)}:host([data-appearance=lined]) .solaris-accordion__inner{gap:0}\n"] }]
|
|
12031
|
-
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowToggle", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], expandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandIcon", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SolarisCollapsibleComponent), { isSignal: true }] }] } });
|
|
12032
|
-
|
|
12033
12284
|
class SolarisCollapsibleComponent {
|
|
12034
12285
|
elementRef = inject(ElementRef);
|
|
12035
12286
|
translateService = inject(SolarisTranslateService, {
|
|
@@ -12130,6 +12381,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
12130
12381
|
}, template: "@if (headingLevel()) {\n @switch (headingLevel()) {\n @case (2) {\n <h2 class=\"solaris-collapsible__header\">\n <ng-container *ngTemplateOutlet=\"triggerContent\" />\n </h2>\n }\n @case (3) {\n <h3 class=\"solaris-collapsible__header\">\n <ng-container *ngTemplateOutlet=\"triggerContent\" />\n </h3>\n }\n @case (4) {\n <h4 class=\"solaris-collapsible__header\">\n <ng-container *ngTemplateOutlet=\"triggerContent\" />\n </h4>\n }\n @case (5) {\n <h5 class=\"solaris-collapsible__header\">\n <ng-container *ngTemplateOutlet=\"triggerContent\" />\n </h5>\n }\n @case (6) {\n <h6 class=\"solaris-collapsible__header\">\n <ng-container *ngTemplateOutlet=\"triggerContent\" />\n </h6>\n }\n @default {\n <h3 class=\"solaris-collapsible__header\">\n <ng-container *ngTemplateOutlet=\"triggerContent\" />\n </h3>\n }\n }\n} @else {\n <div class=\"solaris-collapsible__header\">\n <ng-container *ngTemplateOutlet=\"triggerContent\" />\n </div>\n}\n\n<ng-template #triggerContent>\n <button\n type=\"button\"\n class=\"solaris-collapsible__trigger\"\n [id]=\"triggerId()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"panelId()\"\n [attr.aria-label]=\"effectiveAriaLabel()\"\n [attr.aria-disabled]=\"!canToggleClosed() && isOpen() ? 'true' : null\"\n [disabled]=\"isEffectivelyDisabled()\"\n (click)=\"toggle()\"\n >\n <span class=\"solaris-collapsible__trigger-label\">\n {{ labelText() }}\n </span>\n <solaris-icon\n [name]=\"effectiveIcon()\"\n class=\"solaris-collapsible__trigger-icon\"\n [decorative]=\"true\"\n />\n </button>\n</ng-template>\n\n<div\n class=\"solaris-collapsible__panel\"\n [id]=\"panelId()\"\n role=\"region\"\n [attr.aria-labelledby]=\"triggerId()\"\n [attr.aria-hidden]=\"isOpen() ? null : 'true'\"\n [attr.inert]=\"isOpen() ? null : ''\"\n>\n <div class=\"solaris-collapsible__panel-inner\">\n <ng-content />\n </div>\n</div>\n", styles: [":host{--solaris-collapsible-radius: var(--solaris-radius-md);--solaris-collapsible-icon-size: var(--solaris-spacing-4);--solaris-collapsible-trigger-gap: var(--solaris-spacing-2);--solaris-collapsible-trigger-color: var(--solaris-text-muted);--solaris-collapsible-border-color: var(--solaris-border-subtle);--solaris-collapsible-trigger-font-size: var(--solaris-font-size-md);--solaris-collapsible-trigger-font-weight: var(--solaris-font-weight-medium);--solaris-collapsible-trigger-padding: var(--solaris-spacing-2) var(--solaris-spacing-3);--solaris-collapsible-header-inset-top: var(--solaris-spacing-3);display:block;box-sizing:border-box}.solaris-collapsible__header{margin:0}.solaris-collapsible__trigger{width:100%;border:none;display:flex;cursor:pointer;text-align:start;align-items:center;box-sizing:border-box;background:transparent;justify-content:space-between;gap:var(--solaris-collapsible-trigger-gap);color:var(--solaris-collapsible-trigger-color);padding:var(--solaris-collapsible-trigger-padding);transition:color var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard);font:var(--solaris-collapsible-trigger-font-weight) var(--solaris-collapsible-trigger-font-size)/1.2 var(--solaris-font-family-sans)}.solaris-collapsible__trigger:hover:not(:disabled){color:var(--solaris-text-default)}.solaris-collapsible__trigger:focus-visible{outline-offset:var(--solaris-focus-ring-offset);outline:var(--solaris-focus-ring-width) solid var(--solaris-focus-ring-color)}.solaris-collapsible__trigger:disabled{cursor:not-allowed;opacity:var(--solaris-opacity-50)}.solaris-collapsible__trigger-icon{flex-shrink:0;width:var(--solaris-collapsible-icon-size);height:var(--solaris-collapsible-icon-size);transition:transform var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}:host([data-open]) .solaris-collapsible__trigger-icon{transform:rotate(180deg)}.solaris-collapsible__panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--solaris-motion-duration-normal) var(--solaris-motion-easing-standard)}:host([data-open]) .solaris-collapsible__panel{grid-template-rows:1fr}.solaris-collapsible__panel-inner{min-height:0;overflow:hidden;color:var(--solaris-text-muted);font-size:var(--solaris-font-size-sm);padding:0 var(--solaris-spacing-5) var(--solaris-spacing-3)}:host([data-appearance=boxed]){border-radius:var(--solaris-collapsible-radius);border:var(--solaris-border-width-sm) solid var(--solaris-collapsible-border-color)}:host([data-appearance=boxed]) .solaris-collapsible__header{margin-top:var(--solaris-collapsible-header-inset-top)}:host([data-appearance=lined]) .solaris-collapsible__trigger{border-bottom:var(--solaris-border-width-sm) solid var(--solaris-collapsible-border-color)}:host([data-appearance=lined]):last-child .solaris-collapsible__trigger{border-bottom:none}@media(prefers-reduced-motion:reduce){.solaris-collapsible__trigger,.solaris-collapsible__trigger-icon,.solaris-collapsible__panel{transition:none}}:host-context([data-reduced-motion=true]) .solaris-collapsible__trigger,:host-context([data-reduced-motion=true]) .solaris-collapsible__trigger-icon,:host-context([data-reduced-motion=true]) .solaris-collapsible__panel{transition:none}\n"] }]
|
|
12131
12382
|
}], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelKey", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }] } });
|
|
12132
12383
|
|
|
12384
|
+
class SolarisAccordionComponent {
|
|
12385
|
+
appearance = input('boxed', ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
12386
|
+
type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
12387
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
12388
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12389
|
+
allowToggle = input(true, { ...(ngDevMode ? { debugName: "allowToggle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12390
|
+
headingLevel = input(3, ...(ngDevMode ? [{ debugName: "headingLevel" }] : /* istanbul ignore next */ []));
|
|
12391
|
+
expandIcon = input('chevron-down', ...(ngDevMode ? [{ debugName: "expandIcon" }] : /* istanbul ignore next */ []));
|
|
12392
|
+
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
12393
|
+
items = contentChildren(SolarisCollapsibleComponent, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
12394
|
+
instanceId = nextIdFor('solaris-accordion');
|
|
12395
|
+
resolvedValue = computed(() => {
|
|
12396
|
+
const value = this.value();
|
|
12397
|
+
if (value === undefined) {
|
|
12398
|
+
return this.type() === 'multiple' ? [] : undefined;
|
|
12399
|
+
}
|
|
12400
|
+
if (this.type() === 'multiple') {
|
|
12401
|
+
return Array.isArray(value) ? value : [value];
|
|
12402
|
+
}
|
|
12403
|
+
return Array.isArray(value) ? value[0] : value;
|
|
12404
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedValue" }] : /* istanbul ignore next */ []));
|
|
12405
|
+
isOpen(value) {
|
|
12406
|
+
const resolved = this.resolvedValue();
|
|
12407
|
+
if (Array.isArray(resolved)) {
|
|
12408
|
+
return value !== undefined && resolved.includes(value);
|
|
12409
|
+
}
|
|
12410
|
+
return resolved === value;
|
|
12411
|
+
}
|
|
12412
|
+
toggle(value) {
|
|
12413
|
+
if (this.disabled()) {
|
|
12414
|
+
return;
|
|
12415
|
+
}
|
|
12416
|
+
const resolved = this.resolvedValue();
|
|
12417
|
+
if (this.type() === 'multiple') {
|
|
12418
|
+
const list = Array.isArray(resolved) ? [...resolved] : [];
|
|
12419
|
+
const index = list.indexOf(value);
|
|
12420
|
+
if (index >= 0) {
|
|
12421
|
+
list.splice(index, 1);
|
|
12422
|
+
}
|
|
12423
|
+
else if (value !== undefined) {
|
|
12424
|
+
list.push(value);
|
|
12425
|
+
}
|
|
12426
|
+
this.value.set(list);
|
|
12427
|
+
return;
|
|
12428
|
+
}
|
|
12429
|
+
if (resolved === value) {
|
|
12430
|
+
if (this.allowToggle()) {
|
|
12431
|
+
this.value.set(undefined);
|
|
12432
|
+
}
|
|
12433
|
+
return;
|
|
12434
|
+
}
|
|
12435
|
+
this.value.set(value);
|
|
12436
|
+
}
|
|
12437
|
+
generatePanelId(value) {
|
|
12438
|
+
return `${this.instanceId}-panel-${String(value)}`;
|
|
12439
|
+
}
|
|
12440
|
+
generateTriggerId(value) {
|
|
12441
|
+
return `${this.instanceId}-trigger-${String(value)}`;
|
|
12442
|
+
}
|
|
12443
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12444
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: SolarisAccordionComponent, isStandalone: true, selector: "solaris-accordion", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, allowToggle: { classPropertyName: "allowToggle", publicName: "allowToggle", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, expandIcon: { classPropertyName: "expandIcon", publicName: "expandIcon", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.data-appearance": "appearance()", "attr.data-type": "type()", "attr.data-size": "size()", "attr.data-disabled": "disabled() ? \"\" : null" }, classAttribute: "solaris-accordion" }, providers: [
|
|
12445
|
+
{
|
|
12446
|
+
provide: SOLARIS_ACCORDION,
|
|
12447
|
+
useExisting: SolarisAccordionComponent,
|
|
12448
|
+
},
|
|
12449
|
+
], queries: [{ propertyName: "items", predicate: SolarisCollapsibleComponent, isSignal: true }], ngImport: i0, template: "<div class=\"solaris-accordion__inner\">\n <ng-content select=\"solaris-collapsible\" />\n</div>\n", styles: [":host{--solaris-accordion-gap: var(--solaris-spacing-2);display:block;box-sizing:border-box}.solaris-accordion__inner{display:flex;flex-direction:column;gap:var(--solaris-accordion-gap)}:host([data-appearance=lined]) .solaris-accordion__inner{gap:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12450
|
+
}
|
|
12451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SolarisAccordionComponent, decorators: [{
|
|
12452
|
+
type: Component,
|
|
12453
|
+
args: [{ selector: 'solaris-accordion', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
12454
|
+
{
|
|
12455
|
+
provide: SOLARIS_ACCORDION,
|
|
12456
|
+
useExisting: SolarisAccordionComponent,
|
|
12457
|
+
},
|
|
12458
|
+
], host: {
|
|
12459
|
+
class: 'solaris-accordion',
|
|
12460
|
+
'[attr.data-appearance]': 'appearance()',
|
|
12461
|
+
'[attr.data-type]': 'type()',
|
|
12462
|
+
'[attr.data-size]': 'size()',
|
|
12463
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
12464
|
+
}, template: "<div class=\"solaris-accordion__inner\">\n <ng-content select=\"solaris-collapsible\" />\n</div>\n", styles: [":host{--solaris-accordion-gap: var(--solaris-spacing-2);display:block;box-sizing:border-box}.solaris-accordion__inner{display:flex;flex-direction:column;gap:var(--solaris-accordion-gap)}:host([data-appearance=lined]) .solaris-accordion__inner{gap:0}\n"] }]
|
|
12465
|
+
}], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], allowToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowToggle", required: false }] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], expandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandIcon", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SolarisCollapsibleComponent), { isSignal: true }] }] } });
|
|
12466
|
+
|
|
12133
12467
|
// SECURITY_EXCEPTION_FILE: document.querySelector required to find rename input. SSR-safe via guard.
|
|
12134
12468
|
class SolarisEditableTabsComponent {
|
|
12135
12469
|
translateService = inject(SolarisTranslateService, {
|
|
@@ -12575,5 +12909,5 @@ function provideSolaris(config) {
|
|
|
12575
12909
|
* Generated bundle index. Do not edit.
|
|
12576
12910
|
*/
|
|
12577
12911
|
|
|
12578
|
-
export { SOLARIS_ACCESSIBILITY_CONFIG, SOLARIS_BUILT_IN_ICONS, SOLARIS_DIALOG_CONFIG, SOLARIS_DIALOG_DATA, SOLARIS_DIALOG_REF, SOLARIS_ICONS_CONFIG, SOLARIS_SEGMENTED_CONTROL, SOLARIS_STEPPER, SOLARIS_TABS, SOLARIS_THEME_CONFIG, SOLARIS_TOAST_CONFIG, SOLARIS_TRANSLATE_CONFIG, SolarisAccessibilityService, SolarisAccordionComponent, SolarisAlertActionsComponent, SolarisAlertComponent, SolarisAlertDescriptionDirective, SolarisAlertTitleDirective, SolarisBadgeComponent, SolarisBadgeIconDirective, SolarisBreadcrumbComponent, SolarisButtonDirective, SolarisButtonGroupComponent, SolarisButtonIconDirective, SolarisCardActionsDirective, SolarisCardComponent, SolarisCardContentDirective, SolarisCardDescriptionDirective, SolarisCardFooterDirective, SolarisCardHeaderDirective, SolarisCardMediaDirective, SolarisCardTitleDirective, SolarisCheckboxComponent, SolarisCheckboxGroupComponent, SolarisCollapsibleComponent, SolarisDialogActionsComponent, SolarisDialogComponent, SolarisDialogContainerComponent, SolarisDialogContentComponent, SolarisDialogFlowComponent, SolarisDialogHeaderComponent, SolarisDialogRef, SolarisDialogService, SolarisDialogStepComponent, SolarisDividerComponent, SolarisDividerStackComponent, SolarisDropdownMenuComponent, SolarisDropdownMenuGroupComponent, SolarisDropdownMenuItemComponent, SolarisDropdownMenuLabelComponent, SolarisDropdownMenuTriggerDirective, SolarisDropdownSubmenuComponent, SolarisDropdownSubmenuTriggerComponent, SolarisEditableTabComponent, SolarisEditableTabsComponent, SolarisEmailFieldComponent, SolarisFormErrorComponent, SolarisFormFieldComponent, SolarisFormHintComponent, SolarisFormLabelComponent, SolarisFormPrefixDirective, SolarisFormSuffixDirective, SolarisIconButtonBadgeDirective, SolarisIconButtonDirective, SolarisIconComponent, SolarisIconRegistryService, SolarisInputDirective, SolarisMultiSelectComponent, SolarisOptionComponent, SolarisOptionDescriptionDirective, SolarisOptionGroupComponent, SolarisOptionLabelDirective, SolarisOptionLeadingDirective, SolarisOptionMetaDirective, SolarisOptionTrailingDirective, SolarisPasswordFieldComponent, SolarisPopoverDirective, SolarisPopoverPanelComponent, SolarisPopoverTriggerDirective, SolarisRadioComponent, SolarisRadioGroupComponent, SolarisSegmentedControlComponent, SolarisSegmentedItemComponent, SolarisSelectComponent, SolarisSkeletonComponent, SolarisStepComponent, SolarisStepperActionsComponent, SolarisStepperComponent, SolarisStepperContentComponent, SolarisSwitchComponent, SolarisSwitchGroupComponent, SolarisTabComponent, SolarisTabPanelComponent, SolarisTabsComponent, SolarisTextareaDirective, SolarisThemeService, SolarisToastComponent, SolarisToastContainerComponent, SolarisToastService, SolarisTooltipDirective, SolarisTooltipPanelComponent, SolarisTranslatePipe, SolarisTranslateService, SolarisVisuallyHiddenDirective, configureSolarisTesting, nextIdFor, provideSolaris, provideSolarisAccessibilityTesting, provideSolarisTesting, provideSolarisThemeTesting, provideSolarisTranslateTesting, resolveElementId, solarisAllowedDomainsValidator, solarisBlockedDomainsValidator, solarisEmailValidator, solarisPasswordValidator };
|
|
12912
|
+
export { SOLARIS_ACCESSIBILITY_CONFIG, SOLARIS_BUILT_IN_ICONS, SOLARIS_DIALOG_CONFIG, SOLARIS_DIALOG_DATA, SOLARIS_DIALOG_REF, SOLARIS_ICONS_CONFIG, SOLARIS_SEGMENTED_CONTROL, SOLARIS_STEPPER, SOLARIS_TABS, SOLARIS_THEME_CONFIG, SOLARIS_TOAST_CONFIG, SOLARIS_TRANSLATE_CONFIG, SolarisAccessibilityService, SolarisAccordionComponent, SolarisAlertActionsComponent, SolarisAlertComponent, SolarisAlertDescriptionDirective, SolarisAlertTitleDirective, SolarisBadgeComponent, SolarisBadgeIconDirective, SolarisBreadcrumbComponent, SolarisButtonDirective, SolarisButtonGroupComponent, SolarisButtonIconDirective, SolarisCardActionsDirective, SolarisCardComponent, SolarisCardContentDirective, SolarisCardDescriptionDirective, SolarisCardFooterDirective, SolarisCardHeaderDirective, SolarisCardMediaDirective, SolarisCardTitleDirective, SolarisCheckboxComponent, SolarisCheckboxGroupComponent, SolarisCollapsibleComponent, SolarisDialogActionsComponent, SolarisDialogComponent, SolarisDialogContainerComponent, SolarisDialogContentComponent, SolarisDialogFlowComponent, SolarisDialogHeaderComponent, SolarisDialogRef, SolarisDialogService, SolarisDialogStepComponent, SolarisDividerComponent, SolarisDividerStackComponent, SolarisDropdownMenuComponent, SolarisDropdownMenuGroupComponent, SolarisDropdownMenuItemComponent, SolarisDropdownMenuLabelComponent, SolarisDropdownMenuTriggerDirective, SolarisDropdownSubmenuComponent, SolarisDropdownSubmenuTriggerComponent, SolarisEditableTabComponent, SolarisEditableTabsComponent, SolarisEmailFieldComponent, SolarisFormErrorComponent, SolarisFormFieldComponent, SolarisFormHintComponent, SolarisFormLabelComponent, SolarisFormPrefixDirective, SolarisFormSuffixDirective, SolarisIconButtonBadgeDirective, SolarisIconButtonDirective, SolarisIconComponent, SolarisIconRegistryService, SolarisInputDirective, SolarisLoadingTextComponent, SolarisMultiSelectComponent, SolarisOptionComponent, SolarisOptionDescriptionDirective, SolarisOptionGroupComponent, SolarisOptionLabelDirective, SolarisOptionLeadingDirective, SolarisOptionMetaDirective, SolarisOptionTrailingDirective, SolarisPasswordFieldComponent, SolarisPopoverDirective, SolarisPopoverPanelComponent, SolarisPopoverTriggerDirective, SolarisProgressComponent, SolarisRadioComponent, SolarisRadioGroupComponent, SolarisSegmentedControlComponent, SolarisSegmentedItemComponent, SolarisSelectComponent, SolarisSkeletonComponent, SolarisSpinnerComponent, SolarisStepComponent, SolarisStepperActionsComponent, SolarisStepperComponent, SolarisStepperContentComponent, SolarisSwitchComponent, SolarisSwitchGroupComponent, SolarisTabComponent, SolarisTabPanelComponent, SolarisTabsComponent, SolarisTextareaDirective, SolarisThemeService, SolarisToastComponent, SolarisToastContainerComponent, SolarisToastService, SolarisTooltipDirective, SolarisTooltipPanelComponent, SolarisTranslatePipe, SolarisTranslateService, SolarisVisuallyHiddenDirective, configureSolarisTesting, nextIdFor, provideSolaris, provideSolarisAccessibilityTesting, provideSolarisTesting, provideSolarisThemeTesting, provideSolarisTranslateTesting, resolveElementId, solarisAllowedDomainsValidator, solarisBlockedDomainsValidator, solarisEmailValidator, solarisPasswordValidator };
|
|
12579
12913
|
//# sourceMappingURL=educarehq-solaris-ui.mjs.map
|