loading-dev 0.3.7 → 0.3.8
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/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/steps.d.ts +6 -1
- package/dist/steps.js +11 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ import { Scan } from "./scan.js";
|
|
|
34
34
|
import { Slide } from "./slide.js";
|
|
35
35
|
import { Snake, SnakeProps } from "./snake.js";
|
|
36
36
|
import { Split } from "./split.js";
|
|
37
|
-
import { Steps } from "./steps.js";
|
|
37
|
+
import { DEFAULT_STEPS_ROWS, Steps, StepsProps, StepsRows } from "./steps.js";
|
|
38
38
|
import { Swirl } from "./swirl.js";
|
|
39
39
|
import { Trace, TraceProps } from "./trace.js";
|
|
40
40
|
import { DEFAULT_WAVE_ORIGIN, Wave, WaveOrigin, WaveProps } from "./wave.js";
|
|
41
41
|
import { SPINNERS } from "./spinners.js";
|
|
42
|
-
export { Arc, type ArcProps, Atom, type AtomProps, Blocks, type BlocksProps, type BlocksSweep, BouncingDots, type Cap, type CapProps, Cascade, type CascadeProps, Chevrons, CircularDots, Classic, ClassicV2, Clock, type ClockProps, Comet, type CometProps, Compass, DEFAULT_BLOCKS_SWEEP, DEFAULT_CAP, DEFAULT_EASING, DEFAULT_RIPPLE_DIRECTION, DEFAULT_WAVE_ORIGIN, DURATION_VAR, Dual, type DualProps, type Easing, type EasingProps, Eclipse, Fill, Flip, Gather, Leap, LinearDots, Loading, Loop, type LoopProps, Morph, Orbit, type OrbitProps, PLAY_STATE_VAR, Phases, Pulse, Radar, type RadarProps, Ring, type RingProps, Ripple, type RippleDirection, type RippleProps, SPINNERS, SPINNER_MOTION, Scan, Slide, Snake, type SnakeProps, type SpinnerName, type SpinnerProps, Split, Steps, Swirl, Trace, type TraceProps, Wave, type WaveOrigin, type WaveProps };
|
|
42
|
+
export { Arc, type ArcProps, Atom, type AtomProps, Blocks, type BlocksProps, type BlocksSweep, BouncingDots, type Cap, type CapProps, Cascade, type CascadeProps, Chevrons, CircularDots, Classic, ClassicV2, Clock, type ClockProps, Comet, type CometProps, Compass, DEFAULT_BLOCKS_SWEEP, DEFAULT_CAP, DEFAULT_EASING, DEFAULT_RIPPLE_DIRECTION, DEFAULT_STEPS_ROWS, DEFAULT_WAVE_ORIGIN, DURATION_VAR, Dual, type DualProps, type Easing, type EasingProps, Eclipse, Fill, Flip, Gather, Leap, LinearDots, Loading, Loop, type LoopProps, Morph, Orbit, type OrbitProps, PLAY_STATE_VAR, Phases, Pulse, Radar, type RadarProps, Ring, type RingProps, Ripple, type RippleDirection, type RippleProps, SPINNERS, SPINNER_MOTION, Scan, Slide, Snake, type SnakeProps, type SpinnerName, type SpinnerProps, Split, Steps, type StepsProps, type StepsRows, Swirl, Trace, type TraceProps, Wave, type WaveOrigin, type WaveProps };
|
package/dist/index.js
CHANGED
|
@@ -33,9 +33,9 @@ import { Scan } from "./scan.js";
|
|
|
33
33
|
import { Slide } from "./slide.js";
|
|
34
34
|
import { Snake } from "./snake.js";
|
|
35
35
|
import { Split } from "./split.js";
|
|
36
|
-
import { Steps } from "./steps.js";
|
|
36
|
+
import { DEFAULT_STEPS_ROWS, Steps } from "./steps.js";
|
|
37
37
|
import { Swirl } from "./swirl.js";
|
|
38
38
|
import { Trace } from "./trace.js";
|
|
39
39
|
import { DEFAULT_WAVE_ORIGIN, Wave } from "./wave.js";
|
|
40
40
|
import { SPINNERS } from "./spinners.js";
|
|
41
|
-
export { Arc, Atom, Blocks, BouncingDots, Cascade, Chevrons, CircularDots, Classic, ClassicV2, Clock, Comet, Compass, DEFAULT_BLOCKS_SWEEP, DEFAULT_CAP, DEFAULT_EASING, DEFAULT_RIPPLE_DIRECTION, DEFAULT_WAVE_ORIGIN, DURATION_VAR, Dual, Eclipse, Fill, Flip, Gather, Leap, LinearDots, Loading, Loop, Morph, Orbit, PLAY_STATE_VAR, Phases, Pulse, Radar, Ring, Ripple, SPINNERS, SPINNER_MOTION, Scan, Slide, Snake, Split, Steps, Swirl, Trace, Wave };
|
|
41
|
+
export { Arc, Atom, Blocks, BouncingDots, Cascade, Chevrons, CircularDots, Classic, ClassicV2, Clock, Comet, Compass, DEFAULT_BLOCKS_SWEEP, DEFAULT_CAP, DEFAULT_EASING, DEFAULT_RIPPLE_DIRECTION, DEFAULT_STEPS_ROWS, DEFAULT_WAVE_ORIGIN, DURATION_VAR, Dual, Eclipse, Fill, Flip, Gather, Leap, LinearDots, Loading, Loop, Morph, Orbit, PLAY_STATE_VAR, Phases, Pulse, Radar, Ring, Ripple, SPINNERS, SPINNER_MOTION, Scan, Slide, Snake, Split, Steps, Swirl, Trace, Wave };
|
package/dist/steps.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { t as SpinnerProps } from "./types-D9_cXnjI.js";
|
|
2
|
-
export
|
|
2
|
+
export type StepsRows = "double" | "single";
|
|
3
|
+
export declare const DEFAULT_STEPS_ROWS: StepsRows;
|
|
4
|
+
export interface StepsProps extends SpinnerProps {
|
|
5
|
+
rows?: StepsRows;
|
|
6
|
+
}
|
|
7
|
+
export declare function Steps({ rows, ...rest }: StepsProps): import("react").JSX.Element;
|
package/dist/steps.js
CHANGED
|
@@ -2,12 +2,17 @@ import { STEP_VAR, animation, stagger } from "./motion.js";
|
|
|
2
2
|
import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
// src/steps.tsx
|
|
5
|
+
const DEFAULT_STEPS_ROWS = "single";
|
|
5
6
|
const SEGMENTS = [
|
|
6
7
|
1,
|
|
7
8
|
7,
|
|
8
9
|
13,
|
|
9
10
|
19
|
|
10
11
|
];
|
|
12
|
+
const ROWS = {
|
|
13
|
+
double: [5, 13],
|
|
14
|
+
single: [9]
|
|
15
|
+
};
|
|
11
16
|
const SLOTS = SEGMENTS.length * 2;
|
|
12
17
|
const css = `
|
|
13
18
|
.ld-steps-segment {
|
|
@@ -32,24 +37,24 @@ const css = `
|
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
`;
|
|
35
|
-
function Steps(
|
|
40
|
+
function Steps({ rows = DEFAULT_STEPS_ROWS, ...rest }) {
|
|
36
41
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
37
42
|
name: "steps",
|
|
38
43
|
children: css
|
|
39
44
|
}), /* @__PURE__ */ jsx("svg", {
|
|
40
|
-
...spinnerRoot("steps",
|
|
45
|
+
...spinnerRoot("steps", rest),
|
|
41
46
|
fill: "currentColor",
|
|
42
47
|
role: "presentation",
|
|
43
48
|
viewBox: "0 0 24 24",
|
|
44
|
-
children: SEGMENTS.map((x, index) => /* @__PURE__ */ jsx("rect", {
|
|
49
|
+
children: ROWS[rows].map((y) => SEGMENTS.map((x, index) => /* @__PURE__ */ jsx("rect", {
|
|
45
50
|
className: "ld-steps-segment",
|
|
46
51
|
height: "6",
|
|
47
52
|
rx: "1.25",
|
|
48
53
|
style: step(index),
|
|
49
54
|
width: "4",
|
|
50
55
|
x,
|
|
51
|
-
y
|
|
52
|
-
}, x))
|
|
56
|
+
y
|
|
57
|
+
}, `${x}-${y}`)))
|
|
53
58
|
})] });
|
|
54
59
|
}
|
|
55
|
-
export { Steps };
|
|
60
|
+
export { DEFAULT_STEPS_ROWS, Steps };
|