@ship-ui/core 0.22.7 → 0.22.9

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.
Binary file
@@ -1,6 +1,6 @@
1
1
  import { isPlatformServer } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, inject, DOCUMENT, PLATFORM_ID, signal, effect, Injectable, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { InjectionToken, inject, DOCUMENT, PLATFORM_ID, signal, effect, Injectable, input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
4
4
  import { ShipButton } from '@ship-ui/core/ship-button';
5
5
  import { ShipIcon } from '@ship-ui/core/ship-icon';
6
6
 
@@ -72,6 +72,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
72
72
  class ShipThemeToggle {
73
73
  constructor() {
74
74
  this.#themeState = inject(ShipThemeState);
75
+ this.color = input(null, /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
77
+ this.variant = input(null, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
79
+ this.size = input('small', /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
75
81
  this.theme = this.#themeState.theme;
76
82
  }
77
83
  #themeState;
@@ -82,15 +88,14 @@ class ShipThemeToggle {
82
88
  this.#themeState.setTheme(theme);
83
89
  }
84
90
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipThemeToggle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
85
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: ShipThemeToggle, isStandalone: true, selector: "ship-theme-toggle", ngImport: i0, template: `
86
- <button shButton size="small" (click)="toggleTheme()">
91
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: ShipThemeToggle, isStandalone: true, selector: "ship-theme-toggle", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
92
+ <button shButton [color]="color()" [variant]="variant()" [size]="size()" (click)="toggleTheme()">
87
93
  @if (theme() === 'dark') {
88
94
  <sh-icon>moon-bold</sh-icon>
89
95
  } @else if (theme() === 'light') {
90
96
  <sh-icon>sun-bold</sh-icon>
91
97
  } @else if (theme() === null) {
92
- <sh-icon class="small-icon">sun-bold</sh-icon>
93
- <sh-icon class="small-icon">moon-bold</sh-icon>
98
+ <sh-icon>circle-half-tilt-bold</sh-icon>
94
99
  }
95
100
  </button>
96
101
  `, isInline: true, styles: ["ship-theme-toggle{display:flex;align-items:center;justify-content:center;position:relative}ship-theme-toggle [shButton].small sh-icon.small-icon{font-size:.625rem}ship-theme-toggle:has(sh-icon.small-icon) [shButton].small{gap:0}ship-theme-toggle:has(sh-icon.small-icon) sh-icon:first-child{transform:translate(-.0625rem,-.25rem)}ship-theme-toggle:has(sh-icon.small-icon) sh-icon:last-child{transform:translate(.0625rem,.25rem)}ship-theme-toggle:has(sh-icon.small-icon):after{content:\"\";height:1rem;width:1px;background:var(--base-12);position:absolute;inset:0;margin:auto;transform:rotate(30deg)}\n"], dependencies: [{ kind: "component", type: ShipIcon, selector: "sh-icon", inputs: ["color", "size"] }, { kind: "component", type: ShipButton, selector: "[shButton]", inputs: ["color", "variant", "size", "readonly", "noBg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
@@ -98,18 +103,17 @@ class ShipThemeToggle {
98
103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipThemeToggle, decorators: [{
99
104
  type: Component,
100
105
  args: [{ selector: 'ship-theme-toggle', encapsulation: ViewEncapsulation.None, imports: [ShipIcon, ShipButton], template: `
101
- <button shButton size="small" (click)="toggleTheme()">
106
+ <button shButton [color]="color()" [variant]="variant()" [size]="size()" (click)="toggleTheme()">
102
107
  @if (theme() === 'dark') {
103
108
  <sh-icon>moon-bold</sh-icon>
104
109
  } @else if (theme() === 'light') {
105
110
  <sh-icon>sun-bold</sh-icon>
106
111
  } @else if (theme() === null) {
107
- <sh-icon class="small-icon">sun-bold</sh-icon>
108
- <sh-icon class="small-icon">moon-bold</sh-icon>
112
+ <sh-icon>circle-half-tilt-bold</sh-icon>
109
113
  }
110
114
  </button>
111
115
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["ship-theme-toggle{display:flex;align-items:center;justify-content:center;position:relative}ship-theme-toggle [shButton].small sh-icon.small-icon{font-size:.625rem}ship-theme-toggle:has(sh-icon.small-icon) [shButton].small{gap:0}ship-theme-toggle:has(sh-icon.small-icon) sh-icon:first-child{transform:translate(-.0625rem,-.25rem)}ship-theme-toggle:has(sh-icon.small-icon) sh-icon:last-child{transform:translate(.0625rem,.25rem)}ship-theme-toggle:has(sh-icon.small-icon):after{content:\"\";height:1rem;width:1px;background:var(--base-12);position:absolute;inset:0;margin:auto;transform:rotate(30deg)}\n"] }]
112
- }] });
116
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
113
117
 
114
118
  /**
115
119
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ship-ui-core-ship-theme-toggle.mjs","sources":["../../../projects/ship-ui/ship-theme-toggle/ship-theme-state.ts","../../../projects/ship-ui/ship-theme-toggle/ship-theme-toggle.ts","../../../projects/ship-ui/ship-theme-toggle/ship-ui-core-ship-theme-toggle.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\nimport { DOCUMENT, effect, inject, Injectable, PLATFORM_ID, signal } from '@angular/core';\n\nexport type ShipThemeOption = 'light' | 'dark' | null;\nexport const THEME_ORDER: ShipThemeOption[] = ['light', 'dark', null];\n\nimport { InjectionToken } from '@angular/core';\n\nexport const WINDOW = new InjectionToken<Window>('WindowToken', {\n providedIn: 'root',\n factory: () => (typeof window !== 'undefined' ? window : ({} as Window)),\n});\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShipThemeState {\n #document = inject(DOCUMENT);\n #window = inject(WINDOW);\n #platformId = inject(PLATFORM_ID);\n #storedDarkMode = this.localStorage()?.getItem('shipTheme') as ShipThemeOption;\n #theme = signal<ShipThemeOption>(this.#storedDarkMode);\n\n theme = this.#theme.asReadonly();\n\n darkModeEffect = effect(() => {\n const theme = this.#theme();\n\n if (theme === null) {\n this.#document.documentElement.classList.remove('dark');\n this.#document.documentElement.classList.remove('light');\n return;\n }\n\n if (theme === 'dark') {\n this.#document.documentElement.classList.add('dark');\n this.#document.documentElement.classList.remove('light');\n } else {\n this.#document.documentElement.classList.add('light');\n this.#document.documentElement.classList.remove('dark');\n }\n });\n\n localStorage() {\n if (isPlatformServer(this.#platformId)) return null;\n\n return this.#window.localStorage;\n }\n\n toggleTheme() {\n const nextTheme = this.#theme() === null ? THEME_ORDER[0] : THEME_ORDER[THEME_ORDER.indexOf(this.#theme()) + 1];\n\n this.setTheme(nextTheme);\n }\n\n setTheme(theme: ShipThemeOption) {\n if (theme === null) {\n this.localStorage()?.removeItem('shipTheme');\n this.#theme.set(null);\n return;\n }\n\n this.localStorage()?.setItem('shipTheme', theme);\n this.#theme.set(theme);\n }\n}\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { ShipButton } from '@ship-ui/core/ship-button';\nimport { ShipIcon } from '@ship-ui/core/ship-icon';\nimport { ShipThemeOption, ShipThemeState } from './ship-theme-state';\n\n@Component({\n selector: 'ship-theme-toggle',\n styleUrl: './ship-theme-toggle.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [ShipIcon, ShipButton],\n template: `\n <button shButton size=\"small\" (click)=\"toggleTheme()\">\n @if (theme() === 'dark') {\n <sh-icon>moon-bold</sh-icon>\n } @else if (theme() === 'light') {\n <sh-icon>sun-bold</sh-icon>\n } @else if (theme() === null) {\n <sh-icon class=\"small-icon\">sun-bold</sh-icon>\n <sh-icon class=\"small-icon\">moon-bold</sh-icon>\n }\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ShipThemeToggle {\n #themeState = inject(ShipThemeState);\n\n theme = this.#themeState.theme;\n\n toggleTheme() {\n this.#themeState.toggleTheme();\n }\n\n setTheme(theme: ShipThemeOption) {\n this.#themeState.setTheme(theme);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,WAAW,GAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI;MAIvD,MAAM,GAAG,IAAI,cAAc,CAAS,aAAa,EAAE;AAC9D,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAI,EAAa,CAAC;AACzE,CAAA;MAKY,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACjC,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,EAAE,OAAO,CAAC,WAAW,CAAoB;AAC9E,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAkB,IAAI,CAAC,eAAe;mFAAC;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C;IAClC;8GAXW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAdhB;;;;;;;;;;;GAWT,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,0lBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAZS,QAAQ,+EAAE,UAAU,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAenB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAnB3B,SAAS;+BACE,mBAAmB,EAAA,aAAA,EAEd,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAA,QAAA,EACrB;;;;;;;;;;;GAWT,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,0lBAAA,CAAA,EAAA;;;ACtBjD;;AAEG;;;;"}
1
+ {"version":3,"file":"ship-ui-core-ship-theme-toggle.mjs","sources":["../../../projects/ship-ui/ship-theme-toggle/ship-theme-state.ts","../../../projects/ship-ui/ship-theme-toggle/ship-theme-toggle.ts","../../../projects/ship-ui/ship-theme-toggle/ship-ui-core-ship-theme-toggle.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\nimport { DOCUMENT, effect, inject, Injectable, PLATFORM_ID, signal } from '@angular/core';\n\nexport type ShipThemeOption = 'light' | 'dark' | null;\nexport const THEME_ORDER: ShipThemeOption[] = ['light', 'dark', null];\n\nimport { InjectionToken } from '@angular/core';\n\nexport const WINDOW = new InjectionToken<Window>('WindowToken', {\n providedIn: 'root',\n factory: () => (typeof window !== 'undefined' ? window : ({} as Window)),\n});\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ShipThemeState {\n #document = inject(DOCUMENT);\n #window = inject(WINDOW);\n #platformId = inject(PLATFORM_ID);\n #storedDarkMode = this.localStorage()?.getItem('shipTheme') as ShipThemeOption;\n #theme = signal<ShipThemeOption>(this.#storedDarkMode);\n\n theme = this.#theme.asReadonly();\n\n darkModeEffect = effect(() => {\n const theme = this.#theme();\n\n if (theme === null) {\n this.#document.documentElement.classList.remove('dark');\n this.#document.documentElement.classList.remove('light');\n return;\n }\n\n if (theme === 'dark') {\n this.#document.documentElement.classList.add('dark');\n this.#document.documentElement.classList.remove('light');\n } else {\n this.#document.documentElement.classList.add('light');\n this.#document.documentElement.classList.remove('dark');\n }\n });\n\n localStorage() {\n if (isPlatformServer(this.#platformId)) return null;\n\n return this.#window.localStorage;\n }\n\n toggleTheme() {\n const nextTheme = this.#theme() === null ? THEME_ORDER[0] : THEME_ORDER[THEME_ORDER.indexOf(this.#theme()) + 1];\n\n this.setTheme(nextTheme);\n }\n\n setTheme(theme: ShipThemeOption) {\n if (theme === null) {\n this.localStorage()?.removeItem('shipTheme');\n this.#theme.set(null);\n return;\n }\n\n this.localStorage()?.setItem('shipTheme', theme);\n this.#theme.set(theme);\n }\n}\n","import { ChangeDetectionStrategy, Component, inject, input, ViewEncapsulation } from '@angular/core';\nimport { ShipButtonSize, ShipColor, ShipSheetVariant } from '@ship-ui/core';\nimport { ShipButton } from '@ship-ui/core/ship-button';\nimport { ShipIcon } from '@ship-ui/core/ship-icon';\nimport { ShipThemeOption, ShipThemeState } from './ship-theme-state';\n\n@Component({\n selector: 'ship-theme-toggle',\n styleUrl: './ship-theme-toggle.scss',\n encapsulation: ViewEncapsulation.None,\n imports: [ShipIcon, ShipButton],\n template: `\n <button shButton [color]=\"color()\" [variant]=\"variant()\" [size]=\"size()\" (click)=\"toggleTheme()\">\n @if (theme() === 'dark') {\n <sh-icon>moon-bold</sh-icon>\n } @else if (theme() === 'light') {\n <sh-icon>sun-bold</sh-icon>\n } @else if (theme() === null) {\n <sh-icon>circle-half-tilt-bold</sh-icon>\n }\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ShipThemeToggle {\n #themeState = inject(ShipThemeState);\n\n color = input<ShipColor | null>(null);\n variant = input<ShipSheetVariant | null>(null);\n size = input<ShipButtonSize | null>('small');\n\n theme = this.#themeState.theme;\n\n toggleTheme() {\n this.#themeState.toggleTheme();\n }\n\n setTheme(theme: ShipThemeOption) {\n this.#themeState.setTheme(theme);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,WAAW,GAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI;MAIvD,MAAM,GAAG,IAAI,cAAc,CAAS,aAAa,EAAE;AAC9D,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAI,EAAa,CAAC;AACzE,CAAA;MAKY,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACjC,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,EAAE,OAAO,CAAC,WAAW,CAA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QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAcnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAlB3B,SAAS;+BACE,mBAAmB,EAAA,aAAA,EAEd,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAA,QAAA,EACrB;;;;;;;;;;GAUT,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,0lBAAA,CAAA,EAAA;;;ACtBjD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ship-ui/core",
3
3
  "license": "MIT",
4
- "version": "0.22.7",
4
+ "version": "0.22.9",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=20",
7
7
  "@angular/core": ">=20",
@@ -47,6 +47,7 @@
47
47
  "info",
48
48
  "moon-bold",
49
49
  "sun-bold",
50
+ "circle-half-tilt-bold",
50
51
  "list",
51
52
  "trash",
52
53
  "tree-structure",
@@ -1,4 +1,4 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
2
  import { InjectionToken } from '@angular/core';
3
3
 
4
4
  type ShipThemeOption = 'light' | 'dark' | null;
@@ -6,22 +6,25 @@ declare const THEME_ORDER: ShipThemeOption[];
6
6
  declare const WINDOW: InjectionToken<Window>;
7
7
  declare class ShipThemeState {
8
8
  #private;
9
- theme: i0.Signal<ShipThemeOption>;
10
- darkModeEffect: i0.EffectRef;
9
+ theme: _angular_core.Signal<ShipThemeOption>;
10
+ darkModeEffect: _angular_core.EffectRef;
11
11
  localStorage(): Storage | null;
12
12
  toggleTheme(): void;
13
13
  setTheme(theme: ShipThemeOption): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ShipThemeState, never>;
15
- static ɵprov: i0.ɵɵInjectableDeclaration<ShipThemeState>;
14
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipThemeState, never>;
15
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ShipThemeState>;
16
16
  }
17
17
 
18
18
  declare class ShipThemeToggle {
19
19
  #private;
20
- theme: i0.Signal<ShipThemeOption>;
20
+ color: _angular_core.InputSignal<"" | "primary" | "accent" | "warn" | "error" | "success" | null>;
21
+ variant: _angular_core.InputSignal<"" | "simple" | "outlined" | "flat" | "raised" | null>;
22
+ size: _angular_core.InputSignal<"" | "small" | "xsmall" | null>;
23
+ theme: _angular_core.Signal<ShipThemeOption>;
21
24
  toggleTheme(): void;
22
25
  setTheme(theme: ShipThemeOption): void;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<ShipThemeToggle, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<ShipThemeToggle, "ship-theme-toggle", never, {}, {}, never, never, true, never>;
26
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipThemeToggle, never>;
27
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ShipThemeToggle, "ship-theme-toggle", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
25
28
  }
26
29
 
27
30
  export { ShipThemeState, ShipThemeToggle, THEME_ORDER, WINDOW };