shirkasoft-ui-components 1.14.0 → 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 +4 -8
- 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 +363 -69
- 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 +905 -843
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -1
- 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 -1440
- 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 -300
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +1028 -533
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-knob.mjs +389 -201
- 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 -314
- 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 -327
- 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 -819
- 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 +1916 -1698
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -175
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +175 -49
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -402
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +310 -124
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme.mjs +141 -174
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -203
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +179 -109
- 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 +95 -134
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -165
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components.mjs +0 -9
- package/package.json +5 -5
- 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 +193 -204
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -66
- package/types/shirkasoft-ui-components-date-picker.d.ts +527 -398
- package/types/shirkasoft-ui-components-fieldset.d.ts +135 -60
- package/types/shirkasoft-ui-components-file-upload.d.ts +176 -112
- package/types/shirkasoft-ui-components-icons.d.ts +1302 -1294
- package/types/shirkasoft-ui-components-knob.d.ts +144 -78
- package/types/shirkasoft-ui-components-loading.d.ts +155 -64
- package/types/shirkasoft-ui-components-modal.d.ts +134 -136
- package/types/shirkasoft-ui-components-notification.d.ts +63 -59
- package/types/shirkasoft-ui-components-price-input.d.ts +198 -113
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
- package/types/shirkasoft-ui-components-select.d.ts +301 -196
- package/types/shirkasoft-ui-components-sidebar.d.ts +198 -93
- package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
- package/types/shirkasoft-ui-components-table.d.ts +849 -660
- 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 -127
- package/types/shirkasoft-ui-components-theme-picker.d.ts +92 -58
- package/types/shirkasoft-ui-components-theme.d.ts +56 -64
- package/types/shirkasoft-ui-components-timeline.d.ts +325 -150
- package/types/shirkasoft-ui-components-toggle.d.ts +73 -49
- package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
- package/types/shirkasoft-ui-components-utils.d.ts +15 -16
- package/types/shirkasoft-ui-components-wizard.d.ts +236 -87
- package/types/shirkasoft-ui-components.d.ts +1 -2
- package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
|
@@ -1,36 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { EnvironmentProviders, InjectionToken } from "@angular/core";
|
|
4
6
|
/** Built-in theme packs shipped with the library. */
|
|
5
7
|
type ShkThemeName = 'default' | 'ocean' | 'violet' | 'sunset' | (string & {});
|
|
6
8
|
/** Color scheme selection. `system` follows `prefers-color-scheme`. */
|
|
7
9
|
type ShkColorScheme = 'light' | 'dark' | 'system';
|
|
8
10
|
interface ShkThemeConfig {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
/** Theme applied when nothing is stored yet. Defaults to `default`. */
|
|
12
|
+
defaultTheme?: ShkThemeName;
|
|
13
|
+
/** Scheme applied when nothing is stored yet. Defaults to `system`. */
|
|
14
|
+
defaultScheme?: ShkColorScheme;
|
|
15
|
+
/** Persist the selection in localStorage. Defaults to `true`. */
|
|
16
|
+
persist?: boolean;
|
|
17
|
+
/** localStorage keys. */
|
|
18
|
+
storageKey?: string;
|
|
19
|
+
schemeStorageKey?: string;
|
|
20
|
+
/** Attribute written on <html>. Defaults to `data-shk-theme`. */
|
|
21
|
+
attribute?: string;
|
|
22
|
+
/** Class toggled on <html> for dark mode. Defaults to `dark`. */
|
|
23
|
+
darkClass?: string;
|
|
22
24
|
}
|
|
23
25
|
type ResolvedShkThemeConfig = Required<ShkThemeConfig>;
|
|
24
|
-
declare const SHK_THEMES: readonly ShkThemeName[];
|
|
25
|
-
declare const DEFAULT_SHK_THEME_CONFIG: ResolvedShkThemeConfig;
|
|
26
|
-
declare const SHK_THEME_CONFIG: InjectionToken<Required<ShkThemeConfig>>;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Shirkasoft UI Components.
|
|
30
|
-
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
31
|
-
* Belongs to Shirkasoft.
|
|
32
|
-
*/
|
|
33
|
-
|
|
26
|
+
export declare const SHK_THEMES: readonly ShkThemeName[];
|
|
27
|
+
export declare const DEFAULT_SHK_THEME_CONFIG: ResolvedShkThemeConfig;
|
|
28
|
+
export declare const SHK_THEME_CONFIG: InjectionToken<Required<ShkThemeConfig>>;
|
|
34
29
|
/**
|
|
35
30
|
* Configures the theme system and applies the stored/default theme while the
|
|
36
31
|
* app boots, so it is active even if nothing injects `ShkThemeService`.
|
|
@@ -41,48 +36,45 @@ declare const SHK_THEME_CONFIG: InjectionToken<Required<ShkThemeConfig>>;
|
|
|
41
36
|
* });
|
|
42
37
|
* ```
|
|
43
38
|
*/
|
|
44
|
-
declare function provideShkTheme(config?: ShkThemeConfig): EnvironmentProviders;
|
|
45
|
-
|
|
39
|
+
export declare function provideShkTheme(config?: ShkThemeConfig): EnvironmentProviders;
|
|
46
40
|
/**
|
|
47
41
|
* Applies and persists the color theme.
|
|
48
42
|
*
|
|
49
43
|
* Themes are plain CSS custom properties, so switching a theme is just an
|
|
50
44
|
* attribute change on `<html>` — no component re-render involved.
|
|
51
45
|
*/
|
|
52
|
-
declare class ShkThemeService {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
46
|
+
export declare class ShkThemeService {
|
|
47
|
+
private readonly doc;
|
|
48
|
+
private readonly config;
|
|
49
|
+
private readonly win;
|
|
50
|
+
/** Every theme name the service knows about. */
|
|
51
|
+
readonly availableThemes: readonly ShkThemeName[];
|
|
52
|
+
/** Currently active theme. */
|
|
53
|
+
readonly theme: import("@angular/core").WritableSignal<ShkThemeName>;
|
|
54
|
+
/** Currently selected scheme (`light`, `dark` or `system`). */
|
|
55
|
+
readonly scheme: import("@angular/core").WritableSignal<ShkColorScheme>;
|
|
56
|
+
/** `true` when dark colors are being applied. */
|
|
57
|
+
readonly isDark: import("@angular/core").WritableSignal<boolean>;
|
|
58
|
+
/** Convenience flag for templates. */
|
|
59
|
+
readonly isSystem: import("@angular/core").Signal<boolean>;
|
|
60
|
+
private mediaQuery?;
|
|
61
|
+
constructor();
|
|
62
|
+
/** Switches the active theme pack. */
|
|
63
|
+
setTheme(theme: ShkThemeName): void;
|
|
64
|
+
/** Selects light, dark or system scheme. */
|
|
65
|
+
setScheme(scheme: ShkColorScheme): void;
|
|
66
|
+
/** Flips between light and dark (leaves `system` on the opposite value). */
|
|
67
|
+
toggleDark(): void;
|
|
68
|
+
/** Applies a theme without persisting it (useful for previews). */
|
|
69
|
+
previewTheme(theme: ShkThemeName): void;
|
|
70
|
+
private restore;
|
|
71
|
+
private applyTheme;
|
|
72
|
+
private applyScheme;
|
|
73
|
+
private watchSystem;
|
|
74
|
+
private prefersDark;
|
|
75
|
+
private read;
|
|
76
|
+
private persist;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShkThemeService, never>;
|
|
78
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
85
79
|
}
|
|
86
|
-
|
|
87
|
-
export { DEFAULT_SHK_THEME_CONFIG, SHK_THEMES, SHK_THEME_CONFIG, ShkThemeService, provideShkTheme };
|
|
88
|
-
export type { ResolvedShkThemeConfig, ShkColorScheme, ShkThemeConfig, ShkThemeName };
|
|
80
|
+
export type { ResolvedShkThemeConfig, ShkColorScheme, ShkThemeConfig, ShkThemeName };
|