shirkasoft-ui-components 1.13.18 → 2.0.0
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/README.md +415 -42
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +367 -73
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +976 -0
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1400
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -293
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +1141 -0
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-knob.mjs +395 -180
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -303
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -277
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -814
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +1918 -1676
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -177
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +177 -51
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -369
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +466 -0
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs +147 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -215
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +205 -128
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +97 -125
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -166
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components.mjs +0 -9
- package/package.json +37 -7
- package/src/baseline.css +2472 -0
- package/src/theme.css +15 -543
- package/src/themes/ocean.css +56 -0
- package/src/themes/sunset.css +55 -0
- package/src/themes/violet.css +25 -0
- package/src/tokens.css +612 -0
- package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
- package/types/shirkasoft-ui-components-button.d.ts +142 -49
- package/types/shirkasoft-ui-components-chart.d.ts +59 -44
- package/types/shirkasoft-ui-components-config.d.ts +357 -0
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -65
- package/types/shirkasoft-ui-components-date-picker.d.ts +527 -373
- package/types/shirkasoft-ui-components-fieldset.d.ts +135 -59
- package/types/shirkasoft-ui-components-file-upload.d.ts +176 -106
- package/types/shirkasoft-ui-components-icons.d.ts +1430 -0
- package/types/shirkasoft-ui-components-knob.d.ts +151 -64
- package/types/shirkasoft-ui-components-loading.d.ts +155 -64
- package/types/shirkasoft-ui-components-modal.d.ts +134 -132
- package/types/shirkasoft-ui-components-notification.d.ts +63 -58
- package/types/shirkasoft-ui-components-price-input.d.ts +198 -85
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
- package/types/shirkasoft-ui-components-select.d.ts +301 -192
- package/types/shirkasoft-ui-components-sidebar.d.ts +198 -92
- package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
- package/types/shirkasoft-ui-components-table.d.ts +849 -649
- package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
- package/types/shirkasoft-ui-components-tag.d.ts +54 -23
- package/types/shirkasoft-ui-components-text-field.d.ts +231 -111
- package/types/shirkasoft-ui-components-theme-picker.d.ts +117 -0
- package/types/shirkasoft-ui-components-theme.d.ts +80 -0
- package/types/shirkasoft-ui-components-timeline.d.ts +326 -150
- package/types/shirkasoft-ui-components-toggle.d.ts +76 -45
- package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
- package/types/shirkasoft-ui-components-utils.d.ts +26 -17
- package/types/shirkasoft-ui-components-wizard.d.ts +236 -86
- package/types/shirkasoft-ui-components.d.ts +1 -2
- package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-theme-picker.mjs","names":[],"sources":["../../../projects/ui-components/theme-picker/theme-picker.component.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n SHK_THEME_PRESETS,\n SURFACE_PALETTES,\n ShkConfigService,\n} from 'shirkasoft-ui-components/config';\nimport { ShkIconDirective } from 'shirkasoft-ui-components/icons';\nimport { getIcon } from 'shirkasoft-ui-components/utils';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/** A primary color offered by the picker. */\nexport interface ShkPickerColor {\n /** Hex color; it becomes `--shk-primary-600` (`theme.primary`). */\n color: string;\n /** Accessible name / tooltip. */\n label: string;\n}\n\n/**\n * Default primary colors (Tailwind 600 shades). Red and rose are left out on\n * purpose: red is reserved for danger states.\n */\nexport const DEFAULT_PRIMARY_COLORS: readonly ShkPickerColor[] = [\n { color: '#334155', label: 'Noir' },\n { color: '#059669', label: 'Emerald' },\n { color: '#16a34a', label: 'Green' },\n { color: '#65a30d', label: 'Lime' },\n { color: '#ea580c', label: 'Orange' },\n { color: '#d97706', label: 'Amber' },\n { color: '#ca8a04', label: 'Yellow' },\n { color: '#0d9488', label: 'Teal' },\n { color: '#0891b2', label: 'Cyan' },\n { color: '#0284c7', label: 'Sky' },\n { color: '#2563eb', label: 'Blue' },\n { color: '#4f46e5', label: 'Indigo' },\n { color: '#7c3aed', label: 'Violet' },\n { color: '#9333ea', label: 'Purple' },\n { color: '#c026d3', label: 'Fuchsia' },\n { color: '#db2777', label: 'Pink' },\n];\n\nlet pickerCounter = 0;\n\n/**\n * Theme customizer: a palette button that opens a panel to pick the primary\n * color, the surface (neutral) palette and a theme preset at runtime.\n *\n * It edits the `theme.primary`, `theme.surface` and `theme.name` options, so it\n * needs `provideShk(withTheme(...))`; add `withPersistence()` to remember the\n * choice. Without `withTheme()` it renders nothing.\n *\n * ```html\n * <shk-theme-picker />\n * ```\n */\n@Component({\n selector: 'shk-theme-picker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ShkIconDirective],\n host: {\n class: 'shk-theme-picker',\n '(document:pointerdown)': 'onDocumentPointerDown($event)',\n '(document:keydown.escape)': 'onEscape()',\n },\n template: `\n @if (available) {\n <button\n #trigger\n type=\"button\"\n class=\"shk-tp-trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.title]=\"triggerLabel()\"\n (click)=\"toggle()\"\n >\n <svg [shkIcon]=\"paletteIcon\" class=\"shk-tp-trigger-icon\"></svg>\n </button>\n\n @if (open()) {\n <div class=\"shk-tp-panel _shk-bg-panel-raised\" role=\"dialog\" [id]=\"panelId\" [attr.aria-label]=\"triggerLabel()\">\n <div class=\"shk-tp-section\">\n <span class=\"shk-tp-title\" [id]=\"panelId + '-primary'\">{{ primaryLabel() }}</span>\n <div class=\"shk-tp-swatches\" role=\"group\" [attr.aria-labelledby]=\"panelId + '-primary'\">\n @for (item of primaryColors(); track item.color) {\n <button\n type=\"button\"\n class=\"shk-tp-swatch\"\n [style.background-color]=\"item.color\"\n [class.is-selected]=\"item.color.toLowerCase() === activePrimary()\"\n [attr.aria-pressed]=\"item.color.toLowerCase() === activePrimary()\"\n [attr.aria-label]=\"item.label\"\n [attr.title]=\"item.label\"\n (click)=\"setPrimary(item.color)\"\n ></button>\n }\n </div>\n </div>\n\n @if (showSurface()) {\n <div class=\"shk-tp-section\">\n <span class=\"shk-tp-title\" [id]=\"panelId + '-surface'\">{{ surfaceLabel() }}</span>\n <div class=\"shk-tp-swatches\" role=\"group\" [attr.aria-labelledby]=\"panelId + '-surface'\">\n @for (item of surfaces; track item.name) {\n <button\n type=\"button\"\n class=\"shk-tp-swatch\"\n [style.background-color]=\"item.color\"\n [class.is-selected]=\"item.name === activeSurface()\"\n [attr.aria-pressed]=\"item.name === activeSurface()\"\n [attr.aria-label]=\"item.label\"\n [attr.title]=\"item.label\"\n (click)=\"setSurface(item.name)\"\n ></button>\n }\n </div>\n </div>\n }\n\n @if (showPresets() && presets.length > 1) {\n <div class=\"shk-tp-section\">\n <span class=\"shk-tp-title\" [id]=\"panelId + '-presets'\">{{ presetsLabel() }}</span>\n <div class=\"shk-tp-segmented\" role=\"group\" [attr.aria-labelledby]=\"panelId + '-presets'\">\n @for (preset of presets; track preset.name) {\n <button\n type=\"button\"\n class=\"shk-tp-segment\"\n [class.is-active]=\"preset.name === themeName() && isPresetPure()\"\n [attr.aria-pressed]=\"preset.name === themeName() && isPresetPure()\"\n (click)=\"setPreset(preset.name)\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n `,\n styles: [\n `\n :host { position: relative; display: inline-flex; }\n .shk-tp-trigger {\n display: grid; place-items: center; width: 2.25rem; height: 2.25rem;\n border: 0; border-radius: 9999px; cursor: pointer; color: #fff;\n background-color: var(--shk-primary-600); transition: filter 0.15s ease;\n }\n .shk-tp-trigger:hover { filter: brightness(1.1); }\n .shk-tp-trigger:focus-visible { outline: 2px solid var(--shk-primary-600); outline-offset: 2px; }\n .shk-tp-trigger-icon { width: 1.15rem; height: 1.15rem; }\n .shk-tp-panel {\n position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 70;\n width: max-content; max-width: min(19rem, calc(100vw - 1.5rem));\n padding: 0.875rem 1rem 1rem; border-radius: 0.75rem;\n border: 1px solid var(--shk-surface-200);\n box-shadow: 0 10px 30px rgb(0 0 0 / 0.14);\n display: grid; gap: 0.875rem; text-align: left;\n }\n .shk-tp-title { display: block; margin-bottom: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--shk-surface-600); }\n .shk-tp-swatches { display: grid; grid-template-columns: repeat(8, 1.375rem); gap: 0.5rem; }\n .shk-tp-swatch {\n width: 1.375rem; height: 1.375rem; padding: 0; border: 0; border-radius: 9999px; cursor: pointer;\n transition: transform 0.12s ease;\n }\n .shk-tp-swatch:hover { transform: scale(1.12); }\n .shk-tp-swatch:focus-visible, .shk-tp-swatch.is-selected {\n outline: 2px solid var(--shk-surface-800); outline-offset: 2px;\n }\n .shk-tp-segmented {\n display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem;\n border-radius: 0.5rem; background-color: var(--shk-surface-100);\n }\n .shk-tp-segment {\n padding: 0.3rem 0.65rem; border: 0; border-radius: 0.375rem; background: transparent;\n font-size: 0.8125rem; color: var(--shk-surface-600); cursor: pointer;\n }\n .shk-tp-segment:hover { color: var(--shk-surface-800); }\n .shk-tp-segment:focus-visible { outline: 2px solid var(--shk-primary-600); outline-offset: 1px; }\n .shk-tp-segment.is-active {\n background-color: var(--shk-surface-50); color: var(--shk-surface-900);\n font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);\n }\n `,\n ],\n})\nexport class ThemePickerComponent {\n private readonly config = inject(ShkConfigService);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly trigger = viewChild<ElementRef<HTMLButtonElement>>('trigger');\n\n /** Primary colors offered. */\n readonly primaryColors = input<readonly ShkPickerColor[]>(DEFAULT_PRIMARY_COLORS);\n /** Shows the surface (neutral palette) section. */\n readonly showSurface = input<boolean>(true);\n /** Shows the theme presets section (needs more than one preset). */\n readonly showPresets = input<boolean>(true);\n /** Accessible name and tooltip of the button. */\n readonly triggerLabel = input<string>('Personalizar tema');\n readonly primaryLabel = input<string>('Primario');\n readonly surfaceLabel = input<string>('Superficie');\n readonly presetsLabel = input<string>('Temas');\n\n /** `theme.*` options exist only when the app uses `withTheme()`. */\n protected readonly available = this.config.has('theme.primary') && this.config.has('theme.surface');\n protected readonly open = signal(false);\n protected readonly panelId = `shk-theme-picker-${++pickerCounter}`;\n protected readonly paletteIcon = getIcon('palette');\n protected readonly presets = inject(SHK_THEME_PRESETS);\n\n /** Surface palettes, each shown with its 500 shade. */\n protected readonly surfaces = Object.entries(SURFACE_PALETTES).map(([name, palette]) => ({\n name,\n label: palette.label,\n color: palette.scale[5],\n }));\n\n protected readonly themeName = computed(() =>\n this.available ? this.config.get<string>('theme.name')() : '',\n );\n private readonly currentPreset = computed(() =>\n this.presets.find((preset) => preset.name === this.themeName()),\n );\n private readonly primaryOverride = computed(() =>\n this.available ? this.config.get<string>('theme.primary')() : '',\n );\n private readonly surfaceOverride = computed(() =>\n this.available ? this.config.get<string>('theme.surface')() : '',\n );\n\n /** Primary color in use: the override, else the preset's own (lowercase hex). */\n protected readonly activePrimary = computed(() =>\n (this.primaryOverride() || this.currentPreset()?.primary || '').toLowerCase(),\n );\n /** Surface palette in use: the override, else the preset's own. */\n protected readonly activeSurface = computed(\n () => this.surfaceOverride() || this.currentPreset()?.surface || '',\n );\n /** True while no primary/surface override is applied on top of the preset. */\n protected readonly isPresetPure = computed(() => !this.primaryOverride() && !this.surfaceOverride());\n\n protected toggle(): void {\n this.open.update((open) => !open);\n }\n\n protected setPrimary(color: string): void {\n // Picking the preset's own color clears the override instead of pinning it.\n const own = this.currentPreset()?.primary.toLowerCase();\n this.config.set('theme.primary', color.toLowerCase() === own ? '' : color);\n }\n\n protected setSurface(name: string): void {\n this.config.set('theme.surface', name === this.currentPreset()?.surface ? '' : name);\n }\n\n /** Applies a theme pack and clears the primary/surface overrides. */\n protected setPreset(name: string): void {\n this.config.set('theme.name', name);\n this.config.set('theme.primary', '');\n this.config.set('theme.surface', '');\n }\n\n protected onDocumentPointerDown(event: PointerEvent): void {\n if (this.open() && !this.host.nativeElement.contains(event.target as Node)) {\n this.open.set(false);\n }\n }\n\n protected onEscape(): void {\n if (!this.open()) return;\n this.open.set(false);\n this.trigger()?.nativeElement.focus();\n }\n}\n"],"mappings":";;;;;AAoCA,MAAa,yBAAoD;CAC/D;EAAE,OAAO;EAAW,OAAO;CAAM;CACjC;EAAE,OAAO;EAAW,OAAO;CAAS;CACpC;EAAE,OAAO;EAAW,OAAO;CAAO;CAClC;EAAE,OAAO;EAAW,OAAO;CAAM;CACjC;EAAE,OAAO;EAAW,OAAO;CAAQ;CACnC;EAAE,OAAO;EAAW,OAAO;CAAO;CAClC;EAAE,OAAO;EAAW,OAAO;CAAQ;CACnC;EAAE,OAAO;EAAW,OAAO;CAAM;CACjC;EAAE,OAAO;EAAW,OAAO;CAAM;CACjC;EAAE,OAAO;EAAW,OAAO;CAAK;CAChC;EAAE,OAAO;EAAW,OAAO;CAAM;CACjC;EAAE,OAAO;EAAW,OAAO;CAAQ;CACnC;EAAE,OAAO;EAAW,OAAO;CAAQ;CACnC;EAAE,OAAO;EAAW,OAAO;CAAQ;CACnC;EAAE,OAAO;EAAW,OAAO;CAAS;CACpC;EAAE,OAAO;EAAW,OAAO;CAAM;AAClC;AAED,IAAI,gBAAgB;AAmJpB,IAAa,uBAAb,MAAa,qBAAoB;CArIjC,cAAA;EAsImB,KAAA,SAAS,OAAO,gBAAgB;EAChC,KAAA,OAAO,OAAgC,UAAU;EACjD,KAAA,UAAU,UAAyC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAGrE,KAAA,gBAAgB,MAAiC,wBAAuB,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;EAExE,KAAA,cAAc,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAElC,KAAA,cAAc,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,c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;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable, InjectionToken, computed, inject, makeEnvironmentProviders, provideAppInitializer, signal } from "@angular/core";
|
|
3
|
+
import { DOCUMENT } from "@angular/common";
|
|
4
|
+
const SHK_THEMES = [
|
|
5
|
+
"default",
|
|
6
|
+
"ocean",
|
|
7
|
+
"violet",
|
|
8
|
+
"sunset"
|
|
9
|
+
];
|
|
10
|
+
const DEFAULT_SHK_THEME_CONFIG = {
|
|
11
|
+
defaultTheme: "default",
|
|
12
|
+
defaultScheme: "system",
|
|
13
|
+
persist: true,
|
|
14
|
+
storageKey: "shk-theme",
|
|
15
|
+
schemeStorageKey: "shk-scheme",
|
|
16
|
+
attribute: "data-shk-theme",
|
|
17
|
+
darkClass: "dark"
|
|
18
|
+
};
|
|
19
|
+
const SHK_THEME_CONFIG = new InjectionToken("SHK_THEME_CONFIG", {
|
|
20
|
+
providedIn: "root",
|
|
21
|
+
factory: () => DEFAULT_SHK_THEME_CONFIG
|
|
22
|
+
});
|
|
23
|
+
const DARK_QUERY = "(prefers-color-scheme: dark)";
|
|
24
|
+
const RETIRED_THEMES = ["rose"];
|
|
25
|
+
var ShkThemeService = class ShkThemeService {
|
|
26
|
+
constructor() {
|
|
27
|
+
this.doc = inject(DOCUMENT);
|
|
28
|
+
this.config = inject(SHK_THEME_CONFIG);
|
|
29
|
+
this.win = this.doc.defaultView;
|
|
30
|
+
this.availableThemes = SHK_THEMES;
|
|
31
|
+
this.theme = signal(this.config.defaultTheme, ...ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.scheme = signal(this.config.defaultScheme, ...ngDevMode ? [{ debugName: "scheme" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.isDark = signal(false, ...ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.isSystem = computed(() => this.scheme() === "system", ...ngDevMode ? [{ debugName: "isSystem" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.restore();
|
|
36
|
+
this.applyTheme(this.theme());
|
|
37
|
+
this.applyScheme(this.scheme());
|
|
38
|
+
this.watchSystem();
|
|
39
|
+
}
|
|
40
|
+
setTheme(theme) {
|
|
41
|
+
this.theme.set(theme);
|
|
42
|
+
this.applyTheme(theme);
|
|
43
|
+
this.persist(this.config.storageKey, theme);
|
|
44
|
+
}
|
|
45
|
+
setScheme(scheme) {
|
|
46
|
+
this.scheme.set(scheme);
|
|
47
|
+
this.applyScheme(scheme);
|
|
48
|
+
this.persist(this.config.schemeStorageKey, scheme);
|
|
49
|
+
}
|
|
50
|
+
toggleDark() {
|
|
51
|
+
this.setScheme(this.isDark() ? "light" : "dark");
|
|
52
|
+
}
|
|
53
|
+
previewTheme(theme) {
|
|
54
|
+
this.applyTheme(theme);
|
|
55
|
+
}
|
|
56
|
+
restore() {
|
|
57
|
+
if (!this.config.persist) return;
|
|
58
|
+
const storedTheme = this.read(this.config.storageKey);
|
|
59
|
+
if (storedTheme && !RETIRED_THEMES.includes(storedTheme)) this.theme.set(storedTheme);
|
|
60
|
+
const storedScheme = this.read(this.config.schemeStorageKey);
|
|
61
|
+
if (storedScheme === "light" || storedScheme === "dark" || storedScheme === "system") this.scheme.set(storedScheme);
|
|
62
|
+
}
|
|
63
|
+
applyTheme(theme) {
|
|
64
|
+
const root = this.doc?.documentElement;
|
|
65
|
+
if (!root) return;
|
|
66
|
+
if (theme === "default") root.removeAttribute(this.config.attribute);
|
|
67
|
+
else root.setAttribute(this.config.attribute, theme);
|
|
68
|
+
}
|
|
69
|
+
applyScheme(scheme) {
|
|
70
|
+
const root = this.doc?.documentElement;
|
|
71
|
+
if (!root) return;
|
|
72
|
+
const dark = scheme === "dark" || scheme === "system" && this.prefersDark();
|
|
73
|
+
root.classList.toggle(this.config.darkClass, dark);
|
|
74
|
+
root.style.colorScheme = dark ? "dark" : "light";
|
|
75
|
+
this.isDark.set(dark);
|
|
76
|
+
}
|
|
77
|
+
watchSystem() {
|
|
78
|
+
if (!this.win?.matchMedia) return;
|
|
79
|
+
this.mediaQuery ??= this.win.matchMedia(DARK_QUERY);
|
|
80
|
+
const onChange = (event) => {
|
|
81
|
+
if (this.scheme() !== "system") return;
|
|
82
|
+
this.applyScheme(event.matches ? "dark" : "light");
|
|
83
|
+
};
|
|
84
|
+
if (this.mediaQuery.addEventListener) this.mediaQuery.addEventListener("change", onChange);
|
|
85
|
+
else this.mediaQuery.addListener(onChange);
|
|
86
|
+
}
|
|
87
|
+
prefersDark() {
|
|
88
|
+
return this.win?.matchMedia?.(DARK_QUERY).matches ?? false;
|
|
89
|
+
}
|
|
90
|
+
read(key) {
|
|
91
|
+
try {
|
|
92
|
+
return this.win?.localStorage?.getItem(key) ?? null;
|
|
93
|
+
} catch {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
persist(key, value) {
|
|
98
|
+
if (!this.config.persist) return;
|
|
99
|
+
try {
|
|
100
|
+
this.win?.localStorage?.setItem(key, value);
|
|
101
|
+
} catch {}
|
|
102
|
+
}
|
|
103
|
+
static {
|
|
104
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
105
|
+
minVersion: "12.0.0",
|
|
106
|
+
version: "22.3.2",
|
|
107
|
+
ngImport: i0,
|
|
108
|
+
type: ShkThemeService,
|
|
109
|
+
deps: [],
|
|
110
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
static {
|
|
114
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
115
|
+
minVersion: "12.0.0",
|
|
116
|
+
version: "22.3.2",
|
|
117
|
+
ngImport: i0,
|
|
118
|
+
type: ShkThemeService,
|
|
119
|
+
providedIn: "root"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
124
|
+
minVersion: "12.0.0",
|
|
125
|
+
version: "22.3.2",
|
|
126
|
+
ngImport: i0,
|
|
127
|
+
type: ShkThemeService,
|
|
128
|
+
decorators: [{
|
|
129
|
+
type: Injectable,
|
|
130
|
+
args: [{ providedIn: "root" }]
|
|
131
|
+
}],
|
|
132
|
+
ctorParameters: () => []
|
|
133
|
+
});
|
|
134
|
+
function provideShkTheme(config = {}) {
|
|
135
|
+
return makeEnvironmentProviders([{
|
|
136
|
+
provide: SHK_THEME_CONFIG,
|
|
137
|
+
useValue: {
|
|
138
|
+
...DEFAULT_SHK_THEME_CONFIG,
|
|
139
|
+
...config
|
|
140
|
+
}
|
|
141
|
+
}, provideAppInitializer(() => {
|
|
142
|
+
inject(ShkThemeService);
|
|
143
|
+
})]);
|
|
144
|
+
}
|
|
145
|
+
export { DEFAULT_SHK_THEME_CONFIG, SHK_THEMES, SHK_THEME_CONFIG, ShkThemeService, provideShkTheme };
|
|
146
|
+
|
|
147
|
+
//# sourceMappingURL=shirkasoft-ui-components-theme.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-theme.mjs","names":[],"sources":["../../../projects/ui-components/theme/theme.config.ts","../../../projects/ui-components/theme/theme.service.ts","../../../projects/ui-components/theme/theme.providers.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Built-in theme packs shipped with the library. */\nexport type ShkThemeName = 'default' | 'ocean' | 'violet' | 'sunset' | (string & {});\n\n/** Color scheme selection. `system` follows `prefers-color-scheme`. */\nexport type ShkColorScheme = 'light' | 'dark' | 'system';\n\nexport interface ShkThemeConfig {\n /** Theme applied when nothing is stored yet. Defaults to `default`. */\n defaultTheme?: ShkThemeName;\n /** Scheme applied when nothing is stored yet. Defaults to `system`. */\n defaultScheme?: ShkColorScheme;\n /** Persist the selection in localStorage. Defaults to `true`. */\n persist?: boolean;\n /** localStorage keys. */\n storageKey?: string;\n schemeStorageKey?: string;\n /** Attribute written on <html>. Defaults to `data-shk-theme`. */\n attribute?: string;\n /** Class toggled on <html> for dark mode. Defaults to `dark`. */\n darkClass?: string;\n}\n\nexport type ResolvedShkThemeConfig = Required<ShkThemeConfig>;\n\nexport const SHK_THEMES: readonly ShkThemeName[] = ['default', 'ocean', 'violet', 'sunset'];\n\nexport const DEFAULT_SHK_THEME_CONFIG: ResolvedShkThemeConfig = {\n defaultTheme: 'default',\n defaultScheme: 'system',\n persist: true,\n storageKey: 'shk-theme',\n schemeStorageKey: 'shk-scheme',\n attribute: 'data-shk-theme',\n darkClass: 'dark',\n};\n\nexport const SHK_THEME_CONFIG = new InjectionToken<ResolvedShkThemeConfig>('SHK_THEME_CONFIG', {\n providedIn: 'root',\n factory: () => DEFAULT_SHK_THEME_CONFIG,\n});\n","/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\nimport { DOCUMENT } from '@angular/common';\nimport { Injectable, computed, inject, signal } from '@angular/core';\n\nimport {\n SHK_THEMES,\n SHK_THEME_CONFIG,\n ShkColorScheme,\n ShkThemeName,\n} from './theme.config';\n\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\n/** Theme packs removed in previous releases; a stored value falls back to the default. */\nconst RETIRED_THEMES: readonly string[] = ['rose'];\n\n/**\n * Applies and persists the color theme.\n *\n * Themes are plain CSS custom properties, so switching a theme is just an\n * attribute change on `<html>` — no component re-render involved.\n */\n@Injectable({ providedIn: 'root' })\nexport class ShkThemeService {\n private readonly doc = inject(DOCUMENT);\n private readonly config = inject(SHK_THEME_CONFIG);\n private readonly win = this.doc.defaultView;\n\n /** Every theme name the service knows about. */\n readonly availableThemes = SHK_THEMES;\n\n /** Currently active theme. */\n readonly theme = signal<ShkThemeName>(this.config.defaultTheme);\n\n /** Currently selected scheme (`light`, `dark` or `system`). */\n readonly scheme = signal<ShkColorScheme>(this.config.defaultScheme);\n\n /** `true` when dark colors are being applied. */\n readonly isDark = signal(false);\n\n /** Convenience flag for templates. */\n readonly isSystem = computed(() => this.scheme() === 'system');\n\n private mediaQuery?: MediaQueryList;\n\n constructor() {\n this.restore();\n this.applyTheme(this.theme());\n this.applyScheme(this.scheme());\n this.watchSystem();\n }\n\n /** Switches the active theme pack. */\n setTheme(theme: ShkThemeName): void {\n this.theme.set(theme);\n this.applyTheme(theme);\n this.persist(this.config.storageKey, theme);\n }\n\n /** Selects light, dark or system scheme. */\n setScheme(scheme: ShkColorScheme): void {\n this.scheme.set(scheme);\n this.applyScheme(scheme);\n this.persist(this.config.schemeStorageKey, scheme);\n }\n\n /** Flips between light and dark (leaves `system` on the opposite value). */\n toggleDark(): void {\n this.setScheme(this.isDark() ? 'light' : 'dark');\n }\n\n /** Applies a theme without persisting it (useful for previews). */\n previewTheme(theme: ShkThemeName): void {\n this.applyTheme(theme);\n }\n\n private restore(): void {\n if (!this.config.persist) return;\n\n const storedTheme = this.read(this.config.storageKey);\n if (storedTheme && !RETIRED_THEMES.includes(storedTheme)) this.theme.set(storedTheme);\n\n const storedScheme = this.read(this.config.schemeStorageKey) as ShkColorScheme | null;\n if (storedScheme === 'light' || storedScheme === 'dark' || storedScheme === 'system') {\n this.scheme.set(storedScheme);\n }\n }\n\n private applyTheme(theme: ShkThemeName): void {\n const root = this.doc?.documentElement;\n if (!root) return;\n\n if (theme === 'default') {\n root.removeAttribute(this.config.attribute);\n } else {\n root.setAttribute(this.config.attribute, theme);\n }\n }\n\n private applyScheme(scheme: ShkColorScheme): void {\n const root = this.doc?.documentElement;\n if (!root) return;\n\n const dark = scheme === 'dark' || (scheme === 'system' && this.prefersDark());\n root.classList.toggle(this.config.darkClass, dark);\n root.style.colorScheme = dark ? 'dark' : 'light';\n this.isDark.set(dark);\n }\n\n private watchSystem(): void {\n if (!this.win?.matchMedia) return;\n\n this.mediaQuery ??= this.win.matchMedia(DARK_QUERY);\n const onChange = (event: MediaQueryListEvent) => {\n if (this.scheme() !== 'system') return;\n this.applyScheme(event.matches ? 'dark' : 'light');\n };\n\n // Safari < 14 only supports addListener.\n if (this.mediaQuery.addEventListener) {\n this.mediaQuery.addEventListener('change', onChange);\n } else {\n this.mediaQuery.addListener(onChange);\n }\n }\n\n private prefersDark(): boolean {\n return this.win?.matchMedia?.(DARK_QUERY).matches ?? false;\n }\n\n private read(key: string): string | null {\n try {\n return this.win?.localStorage?.getItem(key) ?? null;\n } catch {\n return null;\n }\n }\n\n private persist(key: string, value: string): void {\n if (!this.config.persist) return;\n\n try {\n this.win?.localStorage?.setItem(key, value);\n } catch {\n // Storage can be blocked (private mode, iframe, quota). Theme still applies.\n }\n }\n}\n","/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\nimport {\n EnvironmentProviders,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer,\n} from '@angular/core';\n\nimport { DEFAULT_SHK_THEME_CONFIG, SHK_THEME_CONFIG, ShkThemeConfig } from './theme.config';\nimport { ShkThemeService } from './theme.service';\n\n/**\n * Configures the theme system and applies the stored/default theme while the\n * app boots, so it is active even if nothing injects `ShkThemeService`.\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [provideShkTheme({ defaultTheme: 'ocean', defaultScheme: 'dark' })],\n * });\n * ```\n */\nexport function provideShkTheme(config: ShkThemeConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: SHK_THEME_CONFIG, useValue: { ...DEFAULT_SHK_THEME_CONFIG, ...config } },\n provideAppInitializer(() => {\n inject(ShkTheme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