@ship-ui/core 0.22.8 → 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.
@@ -1,12 +1,37 @@
1
1
  [
2
2
  {
3
- "name": "ShipPreventWheel",
4
- "selector": "[shPreventWheel]",
5
- "path": "core/projects/ship-ui/src/lib/directives/ship-prevent-wheel.directive.ts",
3
+ "name": "ChildComponent",
4
+ "selector": "app-child",
5
+ "path": "core/projects/ship-ui/src/lib/utilities/create-input-example.component.ts",
6
6
  "description": "",
7
7
  "keywords": [],
8
8
  "inputs": [],
9
9
  "outputs": [],
10
+ "methods": [
11
+ {
12
+ "name": "toggleTextInput",
13
+ "parameters": "",
14
+ "returnType": "any",
15
+ "description": ""
16
+ }
17
+ ],
18
+ "cssVariables": [],
19
+ "examples": []
20
+ },
21
+ {
22
+ "name": "ShipFileDragDrop",
23
+ "selector": "[shDragDrop]",
24
+ "path": "core/projects/ship-ui/src/lib/directives/ship-file-drag-drop.directive.ts",
25
+ "description": "",
26
+ "keywords": [],
27
+ "inputs": [],
28
+ "outputs": [
29
+ {
30
+ "name": "filesDropped",
31
+ "type": "FileList",
32
+ "description": ""
33
+ }
34
+ ],
10
35
  "methods": [],
11
36
  "cssVariables": [],
12
37
  "examples": []
@@ -43,24 +68,6 @@
43
68
  "cssVariables": [],
44
69
  "examples": []
45
70
  },
46
- {
47
- "name": "ShipFileDragDrop",
48
- "selector": "[shDragDrop]",
49
- "path": "core/projects/ship-ui/src/lib/directives/ship-file-drag-drop.directive.ts",
50
- "description": "",
51
- "keywords": [],
52
- "inputs": [],
53
- "outputs": [
54
- {
55
- "name": "filesDropped",
56
- "type": "FileList",
57
- "description": ""
58
- }
59
- ],
60
- "methods": [],
61
- "cssVariables": [],
62
- "examples": []
63
- },
64
71
  {
65
72
  "name": "ShipTooltipWrapper",
66
73
  "selector": "ship-tooltip-wrapper",
@@ -129,21 +136,14 @@
129
136
  "examples": []
130
137
  },
131
138
  {
132
- "name": "ChildComponent",
133
- "selector": "app-child",
134
- "path": "core/projects/ship-ui/src/lib/utilities/create-input-example.component.ts",
139
+ "name": "ShipPreventWheel",
140
+ "selector": "[shPreventWheel]",
141
+ "path": "core/projects/ship-ui/src/lib/directives/ship-prevent-wheel.directive.ts",
135
142
  "description": "",
136
143
  "keywords": [],
137
144
  "inputs": [],
138
145
  "outputs": [],
139
- "methods": [
140
- {
141
- "name": "toggleTextInput",
142
- "parameters": "",
143
- "returnType": "any",
144
- "description": ""
145
- }
146
- ],
146
+ "methods": [],
147
147
  "cssVariables": [],
148
148
  "examples": []
149
149
  },
Binary file
@@ -89,20 +89,13 @@ class ShipThemeToggle {
89
89
  }
90
90
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipThemeToggle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
91
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
93
- shButton
94
- [color]="color()"
95
- [variant]="variant()"
96
- [size]="size()"
97
- (click)="toggleTheme()"
98
- >
92
+ <button shButton [color]="color()" [variant]="variant()" [size]="size()" (click)="toggleTheme()">
99
93
  @if (theme() === 'dark') {
100
94
  <sh-icon>moon-bold</sh-icon>
101
95
  } @else if (theme() === 'light') {
102
96
  <sh-icon>sun-bold</sh-icon>
103
97
  } @else if (theme() === null) {
104
- <sh-icon class="small-icon">sun-bold</sh-icon>
105
- <sh-icon class="small-icon">moon-bold</sh-icon>
98
+ <sh-icon>circle-half-tilt-bold</sh-icon>
106
99
  }
107
100
  </button>
108
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 }); }
@@ -110,20 +103,13 @@ class ShipThemeToggle {
110
103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ShipThemeToggle, decorators: [{
111
104
  type: Component,
112
105
  args: [{ selector: 'ship-theme-toggle', encapsulation: ViewEncapsulation.None, imports: [ShipIcon, ShipButton], template: `
113
- <button
114
- shButton
115
- [color]="color()"
116
- [variant]="variant()"
117
- [size]="size()"
118
- (click)="toggleTheme()"
119
- >
106
+ <button shButton [color]="color()" [variant]="variant()" [size]="size()" (click)="toggleTheme()">
120
107
  @if (theme() === 'dark') {
121
108
  <sh-icon>moon-bold</sh-icon>
122
109
  } @else if (theme() === 'light') {
123
110
  <sh-icon>sun-bold</sh-icon>
124
111
  } @else if (theme() === null) {
125
- <sh-icon class="small-icon">sun-bold</sh-icon>
126
- <sh-icon class="small-icon">moon-bold</sh-icon>
112
+ <sh-icon>circle-half-tilt-bold</sh-icon>
127
113
  }
128
114
  </button>
129
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"] }]
@@ -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, input, ViewEncapsulation } from '@angular/core';\nimport { ShipButton } from '@ship-ui/core/ship-button';\nimport { ShipIcon } from '@ship-ui/core/ship-icon';\nimport { ShipButtonSize, ShipColor, ShipSheetVariant } from '@ship-ui/core';\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\n shButton\n [color]=\"color()\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n (click)=\"toggleTheme()\"\n >\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 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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-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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A,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAXS,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;;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.8",
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",