@ship-ui/core 0.16.9 → 0.16.10

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/index.d.ts CHANGED
@@ -764,6 +764,17 @@ declare class ShipTabs {
764
764
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ShipTabs, "sh-tabs", never, {}, {}, never, ["*"], true, never>;
765
765
  }
766
766
 
767
+ type ShipThemeOption = 'light' | 'dark' | null;
768
+
769
+ declare class ShipThemeToggle {
770
+ #private;
771
+ theme: _angular_core.Signal<ShipThemeOption>;
772
+ toggleTheme(): void;
773
+ setTheme(theme: ShipThemeOption): void;
774
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipThemeToggle, never>;
775
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ShipThemeToggle, "ship-theme-toggle", never, {}, {}, never, never, true, never>;
776
+ }
777
+
767
778
  declare class ShipToggleCard {
768
779
  isActive: _angular_core.ModelSignal<boolean>;
769
780
  disallowToggle: _angular_core.InputSignal<boolean>;
@@ -870,5 +881,5 @@ interface ShipConfig {
870
881
  sidenavType?: 'overlay' | 'simple';
871
882
  }
872
883
 
873
- export { GridSortable, SHIP_CONFIG, ShipAlert, ShipAlertContainer, ShipAlertModule, ShipAlertService, ShipBlueprint, ShipButton, ShipButtonGroup, ShipCard, ShipCheckbox, ShipChip, ShipColorPicker, ShipDatepicker, ShipDatepickerInput, ShipDaterangeInput, ShipDialog, ShipDialogService, ShipDivider, ShipEventCard, ShipFileDragDrop, ShipFileUpload, ShipFormField, ShipFormFieldExperimental, ShipIcon, ShipInputMask, ShipList, ShipMenu, ShipPopover, ShipPreventWheel, ShipProgressBar, ShipRadio, ShipRangeSlider, ShipResize, ShipSelect, ShipSidenav, ShipSort, ShipSortable, ShipSpinner, ShipStepper, ShipStickyColumns, ShipTable, ShipTabs, ShipToggle, ShipToggleCard, ShipTooltip, ShipTooltipWrapper, ShipVirtualScroll, TEST_NODES, moveIndex, watchHostClass };
884
+ export { GridSortable, SHIP_CONFIG, ShipAlert, ShipAlertContainer, ShipAlertModule, ShipAlertService, ShipBlueprint, ShipButton, ShipButtonGroup, ShipCard, ShipCheckbox, ShipChip, ShipColorPicker, ShipDatepicker, ShipDatepickerInput, ShipDaterangeInput, ShipDialog, ShipDialogService, ShipDivider, ShipEventCard, ShipFileDragDrop, ShipFileUpload, ShipFormField, ShipFormFieldExperimental, ShipIcon, ShipInputMask, ShipList, ShipMenu, ShipPopover, ShipPreventWheel, ShipProgressBar, ShipRadio, ShipRangeSlider, ShipResize, ShipSelect, ShipSidenav, ShipSort, ShipSortable, ShipSpinner, ShipStepper, ShipStickyColumns, ShipTable, ShipTabs, ShipThemeToggle, ShipToggle, ShipToggleCard, ShipTooltip, ShipTooltipWrapper, ShipVirtualScroll, TEST_NODES, moveIndex, watchHostClass };
874
885
  export type { AfterDropResponse, BlueprintNode, ComponentClosedType, ComponentDataType, Coordinates, Exact, ShipAlertItem, ShipAlertItemInternal, ShipAlertType, ShipConfig, ShipDialogInstance, ShipDialogOptions, ShipDialogServiceOptions, ShipPopoverOptions, ShipProgressBarMode, ShipSidenavType };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ship-ui/core",
3
3
  "license": "MIT",
4
- "version": "0.16.9",
4
+ "version": "0.16.10",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=20",
7
7
  "@angular/core": ">=20"
@@ -41,6 +41,8 @@
41
41
  "calendar",
42
42
  "minus-bold",
43
43
  "info",
44
+ "moon-bold",
45
+ "sun-bold",
44
46
  "list",
45
47
  "trash",
46
48
  "tree-structure",
@@ -0,0 +1,41 @@
1
+ @use '../helpers.scss' as *;
2
+
3
+ $shipThemeToggle: true !default;
4
+
5
+ @if $shipThemeToggle == true {
6
+ ship-theme-toggle {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ position: relative;
11
+
12
+ [shButton].small sh-icon.small-icon {
13
+ font-size: p2r(10);
14
+ }
15
+
16
+ &:has(sh-icon.small-icon) {
17
+ [shButton].small {
18
+ gap: 0;
19
+ }
20
+
21
+ sh-icon:first-child {
22
+ transform: translate(p2r(-1), p2r(-4));
23
+ }
24
+
25
+ sh-icon:last-child {
26
+ transform: translate(p2r(1), p2r(4));
27
+ }
28
+
29
+ &:after {
30
+ content: '';
31
+ height: p2r(16);
32
+ width: 1px;
33
+ background: var(--base-12);
34
+ position: absolute;
35
+ inset: 0;
36
+ margin: auto;
37
+ transform: rotate(30deg);
38
+ }
39
+ }
40
+ }
41
+ }
@@ -18,6 +18,8 @@
18
18
  }
19
19
 
20
20
  html {
21
+ color-scheme: light dark;
22
+
21
23
  &.dark {
22
24
  color-scheme: dark;
23
25
  }
package/styles/index.scss CHANGED
@@ -38,6 +38,7 @@ $shipRadio: true !default;
38
38
  $shipButtonGroup: true !default;
39
39
  $shipRangeSlider: true !default;
40
40
  $shipTooltip: true !default;
41
+ $shipThemeToggle: true !default;
41
42
  $shipVirtualScroll: false !default;
42
43
  $shipSelect: true !default;
43
44
  $shipCard: true !default;
@@ -62,6 +63,9 @@ $shipFileUpload: true !default;
62
63
  @use './components/ship-toggle.scss' with (
63
64
  $shipToggle: $shipToggle
64
65
  );
66
+ @use './components/ship-theme-toggle.scss' with (
67
+ $shipThemeToggle: $shipThemeToggle
68
+ );
65
69
  @use './components/ship-button.scss' with (
66
70
  $shipButton: $shipButton,
67
71
  $shipButtonShadow: $shipButtonShadow