@ship-ui/core 0.16.9 → 0.16.11
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/fesm2022/ship-ui-core.mjs +260 -149
- package/fesm2022/ship-ui-core.mjs.map +1 -1
- package/package.json +5 -3
- package/styles/components/ship-theme-toggle.scss +41 -0
- package/styles/core/core/variables.scss +2 -0
- package/styles/index.scss +4 -0
- package/{index.d.ts → types/ship-ui-core.d.ts} +14 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ship-ui/core",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.11",
|
|
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",
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
"assets": [
|
|
58
60
|
"./assets/**/*"
|
|
59
61
|
],
|
|
60
|
-
"types": "./
|
|
62
|
+
"types": "./types/ship-ui-core.d.ts",
|
|
61
63
|
"default": "./fesm2022/ship-ui-core.mjs"
|
|
62
64
|
},
|
|
63
65
|
"./package.json": {
|
|
@@ -66,5 +68,5 @@
|
|
|
66
68
|
},
|
|
67
69
|
"sideEffects": false,
|
|
68
70
|
"module": "fesm2022/ship-ui-core.mjs",
|
|
69
|
-
"typings": "
|
|
71
|
+
"typings": "types/ship-ui-core.d.ts"
|
|
70
72
|
}
|
|
@@ -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
|
+
}
|
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
|
|
@@ -198,7 +198,7 @@ declare class ShipBlueprint implements AfterViewInit, OnDestroy {
|
|
|
198
198
|
ngOnDestroy(): void;
|
|
199
199
|
onMouseUp(event: MouseEvent): void;
|
|
200
200
|
onClick(event: MouseEvent): void;
|
|
201
|
-
onEscape(
|
|
201
|
+
onEscape(): void;
|
|
202
202
|
onMouseMove(event: MouseEvent): void;
|
|
203
203
|
onTouchMove(event: TouchEvent): void;
|
|
204
204
|
onDocumentTouchEnd(event: TouchEvent): void;
|
|
@@ -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>;
|
|
@@ -818,7 +829,7 @@ type MaskingFunction = (cleanValue: string) => string | null;
|
|
|
818
829
|
declare class ShipInputMask {
|
|
819
830
|
#private;
|
|
820
831
|
shInputMask: _angular_core.InputSignal<string | MaskingFunction>;
|
|
821
|
-
onInput(event:
|
|
832
|
+
onInput(event: Event): void;
|
|
822
833
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipInputMask, never>;
|
|
823
834
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ShipInputMask, "[shInputMask]", never, { "shInputMask": { "alias": "shInputMask"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
824
835
|
}
|
|
@@ -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 };
|