@ship-ui/core 0.15.26 → 0.15.29

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
@@ -223,6 +223,7 @@ declare class ShipBlueprintComponent implements AfterViewInit, OnDestroy {
223
223
  }
224
224
 
225
225
  declare class ShipButtonGroupComponent {
226
+ id: string;
226
227
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipButtonGroupComponent, never>;
227
228
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ShipButtonGroupComponent, "sh-button-group", never, {}, {}, never, ["*"], true, never>;
228
229
  }
@@ -757,6 +758,7 @@ declare class ShipTableComponent {
757
758
  }
758
759
 
759
760
  declare class ShipTabsComponent {
761
+ id: string;
760
762
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipTabsComponent, never>;
761
763
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ShipTabsComponent, "sh-tabs", never, {}, {}, never, ["*"], true, never>;
762
764
  }
@@ -829,6 +831,15 @@ declare class ShipFileDragDropDirective {
829
831
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ShipFileDragDropDirective, "[shDragDrop]", never, {}, { "filesDropped": "filesDropped"; }, never, never, true, never>;
830
832
  }
831
833
 
834
+ type MaskingFunction = (cleanValue: string) => string | null;
835
+ declare class ShipInputMaskDirective {
836
+ #private;
837
+ shInputMask: _angular_core.InputSignal<string | MaskingFunction>;
838
+ onInput(event: InputEvent): void;
839
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipInputMaskDirective, never>;
840
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ShipInputMaskDirective, "[shInputMask]", never, { "shInputMask": { "alias": "shInputMask"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
841
+ }
842
+
832
843
  declare class ShipPreventWheelDirective {
833
844
  wheel(event: WheelEvent): void;
834
845
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShipPreventWheelDirective, never>;
@@ -876,5 +887,5 @@ interface ShipConfig {
876
887
  sidenavType?: 'overlay' | 'simple';
877
888
  }
878
889
 
879
- export { GridSortableDirective, SHIP_CONFIG, ShipAlertComponent, ShipAlertContainerComponent, ShipAlertModule, ShipAlertService, ShipBlueprintComponent, ShipButtonComponent, ShipButtonGroupComponent, ShipCardComponent, ShipCheckboxComponent, ShipChipComponent, ShipColorPickerComponent, ShipDatepickerComponent, ShipDatepickerInputComponent, ShipDaterangeInputComponent, ShipDialogComponent, ShipDialogService, ShipDividerComponent, ShipEventCardComponent, ShipFileDragDropDirective, ShipFileUploadComponent, ShipFormFieldComponent, ShipIconComponent, ShipListComponent, ShipMenuComponent, ShipPopoverComponent, ShipPreventWheelDirective, ShipProgressBarComponent, ShipRadioComponent, ShipRangeSliderComponent, ShipResizeDirective, ShipSelectComponent, ShipSidenavComponent, ShipSortDirective, ShipSortableComponent, ShipSortableDirective, ShipSpinnerComponent, ShipStepperComponent, ShipStickyColumnsDirective, ShipTableComponent, ShipTabsComponent, ShipToggleCardComponent, ShipToggleComponent, ShipTooltipComponent, ShipTooltipDirective, ShipTooltipWrapper, ShipVirtualScrollComponent, TEST_NODES, moveIndex, watchHostClass };
890
+ export { GridSortableDirective, SHIP_CONFIG, ShipAlertComponent, ShipAlertContainerComponent, ShipAlertModule, ShipAlertService, ShipBlueprintComponent, ShipButtonComponent, ShipButtonGroupComponent, ShipCardComponent, ShipCheckboxComponent, ShipChipComponent, ShipColorPickerComponent, ShipDatepickerComponent, ShipDatepickerInputComponent, ShipDaterangeInputComponent, ShipDialogComponent, ShipDialogService, ShipDividerComponent, ShipEventCardComponent, ShipFileDragDropDirective, ShipFileUploadComponent, ShipFormFieldComponent, ShipIconComponent, ShipInputMaskDirective, ShipListComponent, ShipMenuComponent, ShipPopoverComponent, ShipPreventWheelDirective, ShipProgressBarComponent, ShipRadioComponent, ShipRangeSliderComponent, ShipResizeDirective, ShipSelectComponent, ShipSidenavComponent, ShipSortDirective, ShipSortableComponent, ShipSortableDirective, ShipSpinnerComponent, ShipStepperComponent, ShipStickyColumnsDirective, ShipTableComponent, ShipTabsComponent, ShipToggleCardComponent, ShipToggleComponent, ShipTooltipComponent, ShipTooltipDirective, ShipTooltipWrapper, ShipVirtualScrollComponent, TEST_NODES, moveIndex, watchHostClass };
880
891
  export type { AfterDropResponse, BlueprintNode, Coordinates, ShipAlertItem, ShipAlertItemInternal, ShipAlertType, ShipDialogOptions, ShipDialogReturn, 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.15.26",
4
+ "version": "0.15.29",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=19",
7
7
  "@angular/core": ">=19"
@@ -4,6 +4,7 @@ $shipButtonGroup: true !default;
4
4
  @if $shipButtonGroup == true {
5
5
  sh-button-group {
6
6
  --btng-bg: var(--base-1);
7
+ --btng-item-bg: var(--base-3);
7
8
  --btng-c: var(--base-12);
8
9
  --btng-ic: var(--base-12);
9
10
  --btng-bc: var(--base-4);
@@ -16,6 +17,7 @@ $shipButtonGroup: true !default;
16
17
  border: 1px solid var(--btng-bc);
17
18
  border-radius: var(--btng-s);
18
19
  height: var(--btng-h);
20
+ background: var(--btng-bg);
19
21
  overflow: hidden;
20
22
 
21
23
  &.small {
@@ -25,8 +27,9 @@ $shipButtonGroup: true !default;
25
27
 
26
28
  &.type-b {
27
29
  --btng-bg: var(--base-3);
30
+ --btng-item-bg: var(--base-1);
31
+ --btng-s-a: var(--shape-2);
28
32
 
29
- background: var(--base-3);
30
33
  padding: p2r(3);
31
34
  gap: p2r(4);
32
35
  border: 0;
@@ -35,16 +38,22 @@ $shipButtonGroup: true !default;
35
38
  border-radius: p2r(6);
36
39
  border: 0;
37
40
 
41
+ @supports not (anchor-name: --anchor) {
42
+ --btng-item-bg: var(--base-3);
43
+ }
44
+
38
45
  &:hover {
39
46
  --btng-bg: var(--base-2);
40
-
41
- box-shadow: var(--box-shadow-10);
42
47
  }
43
48
 
49
+ &:hover,
44
50
  &.active {
45
51
  --btng-bg: var(--base-1);
46
-
47
52
  box-shadow: var(--box-shadow-10);
53
+
54
+ @supports not (anchor-name: --anchor) {
55
+ --btng-item-bg: var(--base-1);
56
+ }
48
57
  }
49
58
  }
50
59
  }
@@ -68,7 +77,7 @@ $shipButtonGroup: true !default;
68
77
  overflow: visible;
69
78
  vertical-align: middle;
70
79
  white-space: nowrap;
71
- background: var(--btng-bg);
80
+ background: transparent;
72
81
  color: var(--btng-c);
73
82
  font: var(--btng-f);
74
83
  border-left: 1px solid var(--btng-bc);
@@ -85,11 +94,54 @@ $shipButtonGroup: true !default;
85
94
  border-left: 0;
86
95
  }
87
96
 
88
- &:hover,
89
- &.active {
90
- --btng-c: var(--base-12);
91
- --btng-ic: var(--base-12);
92
- --btng-bg: var(--base-3);
97
+ @supports not (anchor-name: --anchor) {
98
+ --btng-item-bg: var(--base-1);
99
+ background: var(--btng-item-bg);
100
+
101
+ &:hover,
102
+ &.active {
103
+ --btng-c: var(--base-12);
104
+ --btng-ic: var(--base-12);
105
+ --btng-bg: var(--base-3);
106
+ --btng-item-bg: var(--base-3);
107
+ }
108
+ }
109
+
110
+ @supports (anchor-name: --anchor) {
111
+ z-index: 1;
112
+ &.active {
113
+ position: relative;
114
+ anchor-name: var(--btng-id);
115
+ }
116
+ }
117
+ }
118
+
119
+ @supports (anchor-name: --anchor) {
120
+ &:after {
121
+ content: '';
122
+ background: var(--btng-item-bg);
123
+ pointer-events: none;
124
+ position: absolute;
125
+ z-index: 0;
126
+ top: anchor(top);
127
+ bottom: anchor(bottom);
128
+ left: anchor(left);
129
+ right: anchor(right);
130
+ position-anchor: var(--btng-id);
131
+ transition: all 0.175s ease-out;
132
+ border-radius: var(--btng-s-a);
133
+ }
134
+
135
+ &:not(.type-b):has(button:first-child.active) {
136
+ &:after {
137
+ --btng-s-a: #{p2r(4 0 0 4)};
138
+ }
139
+ }
140
+
141
+ &:not(.type-b):has(button:last-child.active) {
142
+ &:after {
143
+ --btng-s-a: #{p2r(0 4 4 0)};
144
+ }
93
145
  }
94
146
  }
95
147
  }
@@ -15,6 +15,7 @@ $shipTabs: true !default;
15
15
  display: flex;
16
16
  gap: p2r(16);
17
17
  border-bottom: 1px solid var(--base-4);
18
+ position: relative;
18
19
 
19
20
  button,
20
21
  [tab] {
@@ -49,8 +50,15 @@ $shipTabs: true !default;
49
50
  &.active {
50
51
  color: var(--tabs-c-active);
51
52
 
52
- &::after {
53
- display: block;
53
+ @supports (anchor-name: --anchor) {
54
+ position: relative;
55
+ anchor-name: var(--tabs-id);
56
+ }
57
+
58
+ @supports not (anchor-name: --anchor) {
59
+ &::after {
60
+ display: block;
61
+ }
54
62
  }
55
63
  }
56
64
 
@@ -58,11 +66,31 @@ $shipTabs: true !default;
58
66
  content: '';
59
67
  display: none;
60
68
  width: 100%;
61
- height: 2px;
69
+ height: p2r(2);
62
70
  background: var(--tabs-sel-bg);
63
71
  position: absolute;
64
72
  left: 0;
65
73
  bottom: 0;
74
+
75
+ @supports (anchor-name: --anchor) {
76
+ display: none;
77
+ }
78
+ }
79
+ }
80
+
81
+ @supports (anchor-name: --anchor) {
82
+ &:after {
83
+ content: '';
84
+ background: var(--tabs-sel-bg);
85
+ pointer-events: none;
86
+ position: absolute;
87
+ z-index: 10;
88
+ height: p2r(2);
89
+ bottom: anchor(bottom);
90
+ left: anchor(left);
91
+ right: anchor(right);
92
+ position-anchor: var(--tabs-id);
93
+ transition: all 0.175s ease-out;
66
94
  }
67
95
  }
68
96
 
@@ -0,0 +1,44 @@
1
+ @use 'sass:list' as list;
2
+ @use 'sass:map' as map;
3
+
4
+ @mixin scroll-shadows($options) {
5
+ $background: map.get($options, 'background');
6
+ $colorFrom: map.get($options, 'colorFrom');
7
+ $colorTo: map.get($options, 'colorTo');
8
+ $size: map.get($options, 'size');
9
+ $fadeInSize: map.get($options, 'fadeInSize');
10
+
11
+ @if $background == null {
12
+ $background: var(--base1);
13
+ }
14
+
15
+ @if $colorFrom == null {
16
+ $colorFrom: rgb(from var(--base-12) r g b / 10%);
17
+ }
18
+
19
+ @if $colorTo == null {
20
+ $colorTo: rgb(from var(--base-12) r g b / 0%);
21
+ }
22
+
23
+ @if $size == null {
24
+ $size: p2r(14);
25
+ }
26
+
27
+ @if $fadeInSize == null {
28
+ $fadeInSize: p2r(40);
29
+ }
30
+
31
+ background:
32
+ linear-gradient($background 30%, rgba(255, 255, 255, 0)) center top,
33
+ linear-gradient(rgba(255, 255, 255, 0), $background 70%) center bottom,
34
+ radial-gradient(farthest-side at 50% 0, $colorFrom, $colorTo) center top,
35
+ radial-gradient(farthest-side at 50% 100%, $colorFrom, $colorTo) center bottom;
36
+
37
+ background-repeat: no-repeat;
38
+ background-size:
39
+ 100% $fadeInSize,
40
+ 100% $fadeInSize,
41
+ 100% $size,
42
+ 100% $size;
43
+ background-attachment: local, local, scroll, scroll;
44
+ }
@@ -10,4 +10,5 @@
10
10
  @forward './core/helpers/mixins/wrapper';
11
11
  @forward './core/helpers/mixins/ellipsis';
12
12
  @forward './core/helpers/mixins/overflow-scrolling';
13
+ @forward './core/helpers/mixins/scroll-shadows';
13
14
  // @forward './core/helpers/mixins/border-gradient';