@alauda/ui 6.4.8-beta.48 → 6.4.8-beta.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/ui",
3
- "version": "6.4.8-beta.48",
3
+ "version": "6.4.8-beta.49",
4
4
  "description": "Angular UI components by Alauda Frontend Team.",
5
5
  "repository": "git+https://github.com/alauda/alauda-ui.git",
6
6
  "author": "Alauda Frontend",
@@ -20,5 +20,12 @@
20
20
  }
21
21
 
22
22
  // Animation
23
- $animation-duration: 0.3s;
23
+ $animation-duration-slow: 0.3s; // Modal
24
+ $animation-duration-base: 0.24s; // Tab、Dropdown
25
+ $animation-duration-fast: 0.2s;
26
+
27
+ $ease-out: cubic-bezier(0, 0, 0.2, 1);
28
+ $ease-in: cubic-bezier(0.8, 0, 1, 0.9);
29
+ $ease-in-out: cubic-bezier(0.38, 0, 0.24, 1);
30
+
24
31
  $animation-interpolation: ease;
package/theme/_mixin.scss CHANGED
@@ -133,8 +133,14 @@
133
133
  }
134
134
  }
135
135
 
136
+ @mixin overlay-pane() {
137
+ justify-content: center;
138
+ overflow: auto;
139
+ @include scroll-bar;
140
+ }
141
+
136
142
  @mixin transition($target: all) {
137
- transition: $target $animation-duration $animation-interpolation;
143
+ transition: $target $animation-duration-slow $animation-interpolation;
138
144
  }
139
145
 
140
146
  @mixin absolute-center() {
@@ -299,3 +305,35 @@
299
305
  background-size: 100% 14px;
300
306
  height: 100%;
301
307
  }
308
+
309
+ // Motion
310
+ @mixin motion-common($duration: $animation-duration-base) {
311
+ animation-duration: $duration;
312
+ animation-fill-mode: both;
313
+ animation-play-state: paused;
314
+ }
315
+
316
+ @mixin make-motion(
317
+ $className,
318
+ $keyframeName,
319
+ $duration: $animation-duration-base
320
+ ) {
321
+ .#{$className}-enter,
322
+ .#{$className}-leave {
323
+ @include motion-common($duration);
324
+ }
325
+
326
+ .#{$className}-enter.#{$className}-enter-active,
327
+ .#{$className}-leave.#{$className}-leave-active {
328
+ animation-play-state: running;
329
+ pointer-events: none;
330
+ }
331
+
332
+ .#{$className}-enter.#{$className}-enter-active {
333
+ animation-name: #{$keyframeName}-in;
334
+ }
335
+
336
+ .#{$className}-leave.#{$className}-leave-active {
337
+ animation-name: #{$keyframeName}-out;
338
+ }
339
+ }
package/utils/fn.d.ts CHANGED
@@ -4,3 +4,7 @@ export declare const last: <T>(values: T[]) => T;
4
4
  export declare const isTemplateRef: (label: any) => label is TemplateRef<unknown>;
5
5
  export declare const isString: (label: any) => label is string;
6
6
  export declare const handlePixel: (value: number | string) => string;
7
+ export declare function getElementOffset(elem: HTMLElement): {
8
+ top: number;
9
+ left: number;
10
+ };