@ship-ui/core 0.16.8 → 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/fesm2022/ship-ui-core.mjs +112 -1
- package/fesm2022/ship-ui-core.mjs.map +1 -1
- package/index.d.ts +12 -1
- package/package.json +3 -1
- package/styles/components/ship-menu.scss +1 -8
- 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
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.
|
|
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",
|
|
@@ -164,12 +164,10 @@ $shipMenu: true !default;
|
|
|
164
164
|
|
|
165
165
|
button {
|
|
166
166
|
display: flex;
|
|
167
|
-
// flex-direction: column;
|
|
168
167
|
justify-content: flex-start;
|
|
169
168
|
align-items: center;
|
|
170
|
-
// justify-content: center;
|
|
171
169
|
text-align: left;
|
|
172
|
-
|
|
170
|
+
min-height: p2r(32);
|
|
173
171
|
height: min-content;
|
|
174
172
|
margin: p2r(0 8);
|
|
175
173
|
padding: p2r(4 8);
|
|
@@ -184,11 +182,6 @@ $shipMenu: true !default;
|
|
|
184
182
|
transition: transform 125ms linear;
|
|
185
183
|
transform: scale(1);
|
|
186
184
|
|
|
187
|
-
// &.as-row,
|
|
188
|
-
// &:has([suffix]) {
|
|
189
|
-
// flex-direction: row;
|
|
190
|
-
// }
|
|
191
|
-
|
|
192
185
|
&:active {
|
|
193
186
|
transform: scale(0.98);
|
|
194
187
|
}
|
|
@@ -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
|