@orioncactuscorp/ui 1.6.0 → 1.7.0
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/README.md +22 -3
- package/dist/components/Accordion/Accordion.css +1 -1
- package/dist/components/Accordion/Accordion.js +206 -214
- package/dist/components/ActionArea/ActionArea.css +1 -1
- package/dist/components/ActionArea/ActionAreaLayout.css +1 -1
- package/dist/components/BackgroundIconButton/BackgroundIconButton.css +1 -1
- package/dist/components/Badge/Badge.css +1 -1
- package/dist/components/Badge/Badge.js +13 -13
- package/dist/components/Cell/Cell.css +1 -1
- package/dist/components/IconButton/IconButton.css +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Loading/Loading.css +1 -1
- package/dist/components/Menu/Menu.css +1 -1
- package/dist/components/Menu/Menu.js +156 -140
- package/dist/components/Modal/Modal.css +1 -1
- package/dist/components/Modal/Modal.js +571 -391
- package/dist/components/Modal/Modal.module.scss.js +58 -38
- package/dist/components/Modal/snapPoints.js +59 -35
- package/dist/components/Modal/useModalDrag.js +754 -579
- package/dist/components/Modal.js +7 -6
- package/dist/components/Skeleton/Skeleton.css +1 -0
- package/dist/components/Skeleton/Skeleton.js +55 -0
- package/dist/components/Skeleton/Skeleton.module.scss.js +16 -0
- package/dist/components/Skeleton.d.ts +6 -0
- package/dist/components/Skeleton.js +4 -0
- package/dist/components/TextButton/TextButton.css +1 -1
- package/dist/components/TextButton/TextButton.js +45 -48
- package/dist/components/internal/DisclosureIndicator.js +39 -0
- package/dist/components/internal/Pressable.js +28 -27
- package/dist/foundations/motion.css +1 -1
- package/dist/foundations/space.css +1 -1
- package/dist/foundations.css +2 -2
- package/dist/index.js +90 -87
- package/dist/react/motion.js +79 -74
- package/dist/styles.css +14 -13
- package/dist/ui/src/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/ui/src/components/Menu/Menu.d.ts +1 -1
- package/dist/ui/src/components/Menu/Menu.d.ts.map +1 -1
- package/dist/ui/src/components/Menu/index.d.ts +1 -1
- package/dist/ui/src/components/Menu/index.d.ts.map +1 -1
- package/dist/ui/src/components/Menu/types.d.ts +6 -2
- package/dist/ui/src/components/Menu/types.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/Modal.d.ts +3 -1
- package/dist/ui/src/components/Modal/Modal.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/contexts.d.ts +2 -0
- package/dist/ui/src/components/Modal/contexts.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/index.d.ts +2 -2
- package/dist/ui/src/components/Modal/index.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/snapPoints.d.ts +7 -10
- package/dist/ui/src/components/Modal/snapPoints.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/types.d.ts +17 -0
- package/dist/ui/src/components/Modal/types.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/useModalDrag.d.ts +2 -1
- package/dist/ui/src/components/Modal/useModalDrag.d.ts.map +1 -1
- package/dist/ui/src/components/Skeleton/Skeleton.d.ts +4 -0
- package/dist/ui/src/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/ui/src/components/Skeleton/index.d.ts +3 -0
- package/dist/ui/src/components/Skeleton/index.d.ts.map +1 -0
- package/dist/ui/src/components/Skeleton/types.d.ts +17 -0
- package/dist/ui/src/components/Skeleton/types.d.ts.map +1 -0
- package/dist/ui/src/components/TextButton/TextButton.d.ts.map +1 -1
- package/dist/ui/src/components/TextButton/types.d.ts +4 -2
- package/dist/ui/src/components/TextButton/types.d.ts.map +1 -1
- package/dist/ui/src/components/internal/DisclosureIndicator.d.ts +10 -0
- package/dist/ui/src/components/internal/DisclosureIndicator.d.ts.map +1 -0
- package/dist/ui/src/components/internal/Pressable.d.ts +8 -1
- package/dist/ui/src/components/internal/Pressable.d.ts.map +1 -1
- package/dist/ui/src/index.d.ts +5 -3
- package/dist/ui/src/index.d.ts.map +1 -1
- package/dist/ui/src/react/motion/index.d.ts +3 -1
- package/dist/ui/src/react/motion/index.d.ts.map +1 -1
- package/dist/ui/src/utils/motion.d.ts +2 -2
- package/dist/ui/src/utils/motion.d.ts.map +1 -1
- package/dist/utils/motion.js +24 -18
- package/dist/vscode/oc-ui-vars.css +6 -4
- package/package.json +1 -1
- package/src/scss/foundations/motion.scss +3 -1
- package/src/scss/foundations/responsive.test.ts +22 -0
- package/src/scss/foundations/space.scss +9 -4
- package/src/scss/mixins/_motion.scss +5 -8
- package/src/scss/mixins/_motion.test.ts +20 -0
package/dist/utils/motion.js
CHANGED
|
@@ -9,7 +9,8 @@ const f = [
|
|
|
9
9
|
"expand",
|
|
10
10
|
"move",
|
|
11
11
|
"gesture",
|
|
12
|
-
"ambient"
|
|
12
|
+
"ambient",
|
|
13
|
+
"continuous"
|
|
13
14
|
], w = [
|
|
14
15
|
"change",
|
|
15
16
|
"enter",
|
|
@@ -41,7 +42,8 @@ const f = [
|
|
|
41
42
|
expand: 0.3,
|
|
42
43
|
move: 0.3,
|
|
43
44
|
gesture: 0.2,
|
|
44
|
-
ambient: 1.2
|
|
45
|
+
ambient: 1.2,
|
|
46
|
+
continuous: 2.2
|
|
45
47
|
},
|
|
46
48
|
durationByPhase: {
|
|
47
49
|
disclosure: {
|
|
@@ -71,7 +73,8 @@ const f = [
|
|
|
71
73
|
expand: "ease",
|
|
72
74
|
move: "cubic-bezier(0.32, 0.72, 0, 1)",
|
|
73
75
|
gesture: "ease",
|
|
74
|
-
ambient: "
|
|
76
|
+
ambient: "ease-in-out",
|
|
77
|
+
continuous: "linear"
|
|
75
78
|
},
|
|
76
79
|
timingByPhase: {
|
|
77
80
|
disclosure: {
|
|
@@ -101,7 +104,8 @@ const f = [
|
|
|
101
104
|
expand: "static",
|
|
102
105
|
move: "static",
|
|
103
106
|
gesture: "feedback",
|
|
104
|
-
ambient: "static"
|
|
107
|
+
ambient: "static",
|
|
108
|
+
continuous: "static"
|
|
105
109
|
}, V = /* @__PURE__ */ new Set([
|
|
106
110
|
"opacity",
|
|
107
111
|
"color",
|
|
@@ -137,9 +141,6 @@ const f = [
|
|
|
137
141
|
propertyExtraBounce: { transform: 0.04 }
|
|
138
142
|
},
|
|
139
143
|
exit: null
|
|
140
|
-
},
|
|
141
|
-
ambient: {
|
|
142
|
-
loop: { preset: "smooth" }
|
|
143
144
|
}
|
|
144
145
|
}, U = z, $ = (t, e) => e.includes(t), l = (t, e, r) => {
|
|
145
146
|
if (!$(e, r))
|
|
@@ -267,6 +268,10 @@ function N(t) {
|
|
|
267
268
|
ambient: i(
|
|
268
269
|
n(e, "--oc-motion-duration-ambient"),
|
|
269
270
|
o.durationByIntent.ambient
|
|
271
|
+
),
|
|
272
|
+
continuous: i(
|
|
273
|
+
n(e, "--oc-motion-duration-continuous"),
|
|
274
|
+
o.durationByIntent.continuous
|
|
270
275
|
)
|
|
271
276
|
},
|
|
272
277
|
durationByPhase: {
|
|
@@ -315,7 +320,8 @@ function N(t) {
|
|
|
315
320
|
expand: n(e, "--oc-motion-timing-expand") || o.timingByIntent.expand,
|
|
316
321
|
move: n(e, "--oc-motion-timing-move") || o.timingByIntent.move,
|
|
317
322
|
gesture: n(e, "--oc-motion-timing-gesture") || o.timingByIntent.gesture,
|
|
318
|
-
ambient: n(e, "--oc-motion-timing-ambient") || o.timingByIntent.ambient
|
|
323
|
+
ambient: n(e, "--oc-motion-timing-ambient") || o.timingByIntent.ambient,
|
|
324
|
+
continuous: n(e, "--oc-motion-timing-continuous") || o.timingByIntent.continuous
|
|
319
325
|
},
|
|
320
326
|
timingByPhase: {
|
|
321
327
|
disclosure: {
|
|
@@ -370,37 +376,37 @@ function Q({
|
|
|
370
376
|
reduced: m = "auto",
|
|
371
377
|
reducedMotion: c = !1,
|
|
372
378
|
property: p,
|
|
373
|
-
element:
|
|
379
|
+
element: h,
|
|
374
380
|
tokens: D
|
|
375
381
|
}) {
|
|
376
382
|
l("intent", t, f), l("phase", e, w), l("pace", r, R);
|
|
377
383
|
const x = G(a), P = H(s), u = K(
|
|
378
|
-
D ?? N(
|
|
384
|
+
D ?? N(h)
|
|
379
385
|
), y = T(t, m), b = j({
|
|
380
386
|
property: p,
|
|
381
387
|
reducedMotion: c,
|
|
382
388
|
reducedPolicy: y
|
|
383
|
-
}),
|
|
389
|
+
}), I = c && y === "preserve" ? u.durationFactorPreserve : c ? u.durationFactorReduced : u.durationFactor, F = O(
|
|
384
390
|
u.durationByPhase,
|
|
385
391
|
t,
|
|
386
392
|
e,
|
|
387
393
|
u.durationByIntent[t]
|
|
388
|
-
), v = u.paceFactor[r], g = b ?
|
|
394
|
+
), v = u.paceFactor[r], g = b ? F * I * v * x : 0, M = O(
|
|
389
395
|
u.timingByPhase,
|
|
390
396
|
t,
|
|
391
397
|
e,
|
|
392
398
|
u.timingByIntent[t]
|
|
393
|
-
),
|
|
399
|
+
), B = J(
|
|
394
400
|
t,
|
|
395
401
|
e,
|
|
396
402
|
p,
|
|
397
403
|
P
|
|
398
|
-
), k =
|
|
404
|
+
), k = B !== null;
|
|
399
405
|
if (!k && P !== void 0)
|
|
400
406
|
throw new Error(
|
|
401
407
|
"oc-motion extraBounce is only supported for spring-backed motion."
|
|
402
408
|
);
|
|
403
|
-
const q = g > 0 ? g :
|
|
409
|
+
const q = g > 0 ? g : F;
|
|
404
410
|
return {
|
|
405
411
|
intent: t,
|
|
406
412
|
phase: e,
|
|
@@ -410,15 +416,15 @@ function Q({
|
|
|
410
416
|
reducedMotion: c,
|
|
411
417
|
property: p,
|
|
412
418
|
durationFactor: x,
|
|
413
|
-
durationFactorToken:
|
|
419
|
+
durationFactorToken: I,
|
|
414
420
|
paceFactor: v,
|
|
415
421
|
durationSeconds: g,
|
|
416
422
|
timingFunction: M,
|
|
417
423
|
animate: b,
|
|
418
424
|
springBacked: k,
|
|
419
|
-
spring: A[
|
|
425
|
+
spring: A[B?.preset ?? "smooth"]({
|
|
420
426
|
duration: q,
|
|
421
|
-
extraBounce:
|
|
427
|
+
extraBounce: B?.extraBounce
|
|
422
428
|
})
|
|
423
429
|
};
|
|
424
430
|
}
|
|
@@ -296,6 +296,7 @@
|
|
|
296
296
|
--oc-motion-distance-factor-reject: initial;
|
|
297
297
|
--oc-motion-distance-factor-spatial: initial;
|
|
298
298
|
--oc-motion-duration-ambient: initial;
|
|
299
|
+
--oc-motion-duration-continuous: initial;
|
|
299
300
|
--oc-motion-duration-disclosure: initial;
|
|
300
301
|
--oc-motion-duration-disclosure-exit: initial;
|
|
301
302
|
--oc-motion-duration-expand: initial;
|
|
@@ -321,6 +322,7 @@
|
|
|
321
322
|
--oc-motion-scale-factor-feedback: initial;
|
|
322
323
|
--oc-motion-scale-factor-spatial: initial;
|
|
323
324
|
--oc-motion-timing-ambient: initial;
|
|
325
|
+
--oc-motion-timing-continuous: initial;
|
|
324
326
|
--oc-motion-timing-disclosure: initial;
|
|
325
327
|
--oc-motion-timing-disclosure-exit: initial;
|
|
326
328
|
--oc-motion-timing-expand: initial;
|
|
@@ -360,12 +362,12 @@
|
|
|
360
362
|
--oc-space-section-gap-section: initial;
|
|
361
363
|
--oc-space-section-gap-xlarge: initial;
|
|
362
364
|
--oc-space-section-padding-viewport: initial;
|
|
365
|
+
--oc-space-section-padding-viewport-block-safe-end: initial;
|
|
366
|
+
--oc-space-section-padding-viewport-block-safe-start: initial;
|
|
367
|
+
--oc-space-section-padding-viewport-inline-safe-end: initial;
|
|
368
|
+
--oc-space-section-padding-viewport-inline-safe-start: initial;
|
|
363
369
|
--oc-space-section-padding-viewport-x: initial;
|
|
364
|
-
--oc-space-section-padding-viewport-x-safe-left: initial;
|
|
365
|
-
--oc-space-section-padding-viewport-x-safe-right: initial;
|
|
366
370
|
--oc-space-section-padding-viewport-y: initial;
|
|
367
|
-
--oc-space-section-padding-viewport-y-safe-bottom: initial;
|
|
368
|
-
--oc-space-section-padding-viewport-y-safe-top: initial;
|
|
369
371
|
--oc-spring-bouncy-timing: initial;
|
|
370
372
|
--oc-spring-smooth-duration-scale: initial;
|
|
371
373
|
--oc-spring-smooth-timing: initial;
|
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
--oc-motion-duration-gesture: 0.2s;
|
|
32
32
|
--oc-motion-duration-gesture-release: 0.52s;
|
|
33
33
|
--oc-motion-duration-ambient: 1.2s;
|
|
34
|
+
--oc-motion-duration-continuous: 2.2s;
|
|
34
35
|
--oc-motion-timing-feedback: ease;
|
|
35
36
|
--oc-motion-timing-fade: ease;
|
|
36
37
|
--oc-motion-timing-reject: #{oc-spring-timing(0.32s, smooth, $samples: 64)};
|
|
@@ -46,7 +47,8 @@
|
|
|
46
47
|
--oc-motion-timing-move: cubic-bezier(0.32, 0.72, 0, 1);
|
|
47
48
|
--oc-motion-timing-gesture: ease;
|
|
48
49
|
--oc-motion-timing-gesture-release: cubic-bezier(0.32, 0.72, 0, 1);
|
|
49
|
-
--oc-motion-timing-ambient:
|
|
50
|
+
--oc-motion-timing-ambient: ease-in-out;
|
|
51
|
+
--oc-motion-timing-continuous: linear;
|
|
50
52
|
--oc-spring-smooth-timing: #{oc-spring-timing(0.5s, smooth, $samples: 64)};
|
|
51
53
|
--oc-spring-smooth-duration-scale: #{oc-spring-duration-scale(0.5s, smooth)};
|
|
52
54
|
--oc-spring-snappy-timing: #{oc-spring-timing(0.5s, snappy, $samples: 64)};
|
|
@@ -34,6 +34,28 @@ describe('responsive foundations', () => {
|
|
|
34
34
|
expect(css).toContain('@media screen and (min-width:1921px)');
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
+
it('exposes logical safe-area section padding aliases with rtl inline mapping', () => {
|
|
38
|
+
const css = compileScss(`
|
|
39
|
+
@use 'foundations/space';
|
|
40
|
+
`);
|
|
41
|
+
|
|
42
|
+
expect(css).toContain(
|
|
43
|
+
'--oc-space-section-padding-viewport-inline-safe-start:max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-left, 0px))',
|
|
44
|
+
);
|
|
45
|
+
expect(css).toContain(
|
|
46
|
+
'--oc-space-section-padding-viewport-inline-safe-end:max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-right, 0px))',
|
|
47
|
+
);
|
|
48
|
+
expect(css).toContain(
|
|
49
|
+
'--oc-space-section-padding-viewport-block-safe-start:max(var(--oc-space-section-padding-viewport-y), env(safe-area-inset-top, 0px))',
|
|
50
|
+
);
|
|
51
|
+
expect(css).toContain(
|
|
52
|
+
'--oc-space-section-padding-viewport-block-safe-end:max(var(--oc-space-section-padding-viewport-y), env(safe-area-inset-bottom, 0px))',
|
|
53
|
+
);
|
|
54
|
+
expect(css).toContain(
|
|
55
|
+
':root:dir(rtl){--oc-space-section-padding-viewport-inline-safe-start:max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-right, 0px));--oc-space-section-padding-viewport-inline-safe-end:max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-left, 0px))}',
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
|
|
37
59
|
it('uses one responsive config for typo and space stepped output', () => {
|
|
38
60
|
const css = compileScss(`
|
|
39
61
|
@use 'foundations/responsive.config' with (
|
|
@@ -197,10 +197,15 @@ $oc-space-responsive-segments: (
|
|
|
197
197
|
|
|
198
198
|
:root {
|
|
199
199
|
--oc-space-section-padding-viewport: var(--oc-space-section-padding-viewport-y) var(--oc-space-section-padding-viewport-x);
|
|
200
|
-
--oc-space-section-padding-viewport-
|
|
201
|
-
--oc-space-section-padding-viewport-
|
|
202
|
-
--oc-space-section-padding-viewport-
|
|
203
|
-
--oc-space-section-padding-viewport-
|
|
200
|
+
--oc-space-section-padding-viewport-inline-safe-start: max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-left, 0px));
|
|
201
|
+
--oc-space-section-padding-viewport-inline-safe-end: max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-right, 0px));
|
|
202
|
+
--oc-space-section-padding-viewport-block-safe-start: max(var(--oc-space-section-padding-viewport-y), env(safe-area-inset-top, 0px));
|
|
203
|
+
--oc-space-section-padding-viewport-block-safe-end: max(var(--oc-space-section-padding-viewport-y), env(safe-area-inset-bottom, 0px));
|
|
204
204
|
|
|
205
205
|
@include oc-emit-responsive-tokens('space', $oc-space-stops, $oc-space-responsive-segments, $oc-responsive-space-stops, '$oc-responsive-space-stops', $oc-responsive-space-profile, '$oc-responsive-space-profile');
|
|
206
206
|
}
|
|
207
|
+
|
|
208
|
+
:root:dir(rtl) {
|
|
209
|
+
--oc-space-section-padding-viewport-inline-safe-start: max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-right, 0px));
|
|
210
|
+
--oc-space-section-padding-viewport-inline-safe-end: max(var(--oc-space-section-padding-viewport-x), env(safe-area-inset-left, 0px));
|
|
211
|
+
}
|
|
@@ -16,6 +16,7 @@ $oc-motion-token-duration-by-intent: (
|
|
|
16
16
|
move: var(--oc-motion-duration-move),
|
|
17
17
|
gesture: var(--oc-motion-duration-gesture),
|
|
18
18
|
ambient: var(--oc-motion-duration-ambient),
|
|
19
|
+
continuous: var(--oc-motion-duration-continuous),
|
|
19
20
|
) !default;
|
|
20
21
|
|
|
21
22
|
$oc-motion-token-timing-by-intent: (
|
|
@@ -29,6 +30,7 @@ $oc-motion-token-timing-by-intent: (
|
|
|
29
30
|
move: var(--oc-motion-timing-move),
|
|
30
31
|
gesture: var(--oc-motion-timing-gesture),
|
|
31
32
|
ambient: var(--oc-motion-timing-ambient),
|
|
33
|
+
continuous: var(--oc-motion-timing-continuous),
|
|
32
34
|
) !default;
|
|
33
35
|
|
|
34
36
|
$oc-motion-token-duration-by-phase: (
|
|
@@ -88,6 +90,7 @@ $oc-motion-token-scale-by-intent: (
|
|
|
88
90
|
move: var(--oc-motion-scale-factor-spatial),
|
|
89
91
|
gesture: var(--oc-motion-scale-factor-feedback),
|
|
90
92
|
ambient: var(--oc-motion-scale-factor-feedback),
|
|
93
|
+
continuous: var(--oc-motion-scale-factor-spatial),
|
|
91
94
|
) !default;
|
|
92
95
|
|
|
93
96
|
$oc-motion-token-distance-by-intent: (
|
|
@@ -101,6 +104,7 @@ $oc-motion-token-distance-by-intent: (
|
|
|
101
104
|
move: var(--oc-motion-distance-factor-spatial),
|
|
102
105
|
gesture: var(--oc-motion-distance-factor-reject),
|
|
103
106
|
ambient: var(--oc-motion-distance-factor-spatial),
|
|
107
|
+
continuous: var(--oc-motion-distance-factor-spatial),
|
|
104
108
|
) !default;
|
|
105
109
|
|
|
106
110
|
// Spring profiles need compile-time Sass values because oc-spring() samples timing curves.
|
|
@@ -114,7 +118,6 @@ $oc-motion-spring-duration-by-intent: (
|
|
|
114
118
|
expand: 0.3s,
|
|
115
119
|
move: 0.3s,
|
|
116
120
|
gesture: 0.2s,
|
|
117
|
-
ambient: 1.2s,
|
|
118
121
|
) !default;
|
|
119
122
|
|
|
120
123
|
$oc-motion-spring-duration-by-phase: (
|
|
@@ -199,13 +202,6 @@ $oc-motion-spring-by-intent: (
|
|
|
199
202
|
preset: snappy,
|
|
200
203
|
extra-bounce: 0,
|
|
201
204
|
),
|
|
202
|
-
ambient: (
|
|
203
|
-
phases: (
|
|
204
|
-
loop,
|
|
205
|
-
),
|
|
206
|
-
preset: smooth,
|
|
207
|
-
extra-bounce: 0,
|
|
208
|
-
),
|
|
209
205
|
) !default;
|
|
210
206
|
|
|
211
207
|
$oc-motion-reduced-policy-by-intent: (
|
|
@@ -219,6 +215,7 @@ $oc-motion-reduced-policy-by-intent: (
|
|
|
219
215
|
move: static,
|
|
220
216
|
gesture: feedback,
|
|
221
217
|
ambient: static,
|
|
218
|
+
continuous: static,
|
|
222
219
|
) !default;
|
|
223
220
|
|
|
224
221
|
$oc-motion-feedback-properties: (opacity, color, background-color, border-color, box-shadow, outline-color, fill, stroke) !default;
|
|
@@ -44,6 +44,26 @@ describe('motion utilities', () => {
|
|
|
44
44
|
);
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
+
it('keeps ambient and continuous loop motion on token-backed non-spring paths', () => {
|
|
48
|
+
const result = compileMotion(`
|
|
49
|
+
.ambient {
|
|
50
|
+
transition: oc-motion(opacity, ambient, $phase: loop, $pace: slow);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.continuous {
|
|
54
|
+
animation: spin oc-motion-duration(continuous, loop) oc-motion-timing(continuous, loop) infinite;
|
|
55
|
+
}
|
|
56
|
+
`);
|
|
57
|
+
|
|
58
|
+
expect(result.css).toContain(
|
|
59
|
+
'opacity calc(var(--oc-motion-duration-ambient) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-slow) * 1) var(--oc-motion-timing-ambient)',
|
|
60
|
+
);
|
|
61
|
+
expect(result.css).toContain(
|
|
62
|
+
'animation: spin calc(var(--oc-motion-duration-continuous) * var(--oc-motion-duration-factor) * var(--oc-motion-pace-normal) * 1) var(--oc-motion-timing-continuous) infinite;',
|
|
63
|
+
);
|
|
64
|
+
expect(result.css).not.toContain('linear(');
|
|
65
|
+
});
|
|
66
|
+
|
|
47
67
|
it('emits token-backed fade motion for simple opacity transitions', () => {
|
|
48
68
|
const result = compileMotion(`
|
|
49
69
|
.target {
|