pasito 0.1.1 → 0.1.2

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 CHANGED
@@ -13,14 +13,14 @@ npm i pasito
13
13
  ### Quick Start
14
14
 
15
15
  ```tsx
16
- import { PillStepper } from "pasito"; // or "pasito/react"
16
+ import { Stepper } from "pasito"; // or "pasito/react"
17
17
  import "pasito/styles.css";
18
18
 
19
19
  function App() {
20
20
  const [active, setActive] = useState(0);
21
21
 
22
22
  return (
23
- <PillStepper
23
+ <Stepper
24
24
  count={5}
25
25
  active={active}
26
26
  onStepClick={setActive}
@@ -32,7 +32,7 @@ function App() {
32
32
  ### Autoplay
33
33
 
34
34
  ```tsx
35
- import { PillStepper, useAutoPlay } from "pasito";
35
+ import { Stepper, useAutoPlay } from "pasito";
36
36
 
37
37
  function App() {
38
38
  const [active, setActive] = useState(0);
@@ -46,7 +46,7 @@ function App() {
46
46
 
47
47
  return (
48
48
  <>
49
- <PillStepper
49
+ <Stepper
50
50
  count={5}
51
51
  active={active}
52
52
  filling={filling}
@@ -67,14 +67,14 @@ function App() {
67
67
  ```vue
68
68
  <script setup>
69
69
  import { ref } from "vue";
70
- import { PillStepper } from "pasito/vue";
70
+ import { Stepper } from "pasito/vue";
71
71
  import "pasito/styles.css";
72
72
 
73
73
  const active = ref(0);
74
74
  </script>
75
75
 
76
76
  <template>
77
- <PillStepper
77
+ <Stepper
78
78
  :count="5"
79
79
  :active="active"
80
80
  @step-click="active = $event"
@@ -87,7 +87,7 @@ const active = ref(0);
87
87
  ```vue
88
88
  <script setup>
89
89
  import { ref } from "vue";
90
- import { PillStepper, useAutoPlay } from "pasito/vue";
90
+ import { Stepper, useAutoPlay } from "pasito/vue";
91
91
  import "pasito/styles.css";
92
92
 
93
93
  const active = ref(0);
@@ -101,7 +101,7 @@ const { playing, toggle, filling, fillDuration } = useAutoPlay({
101
101
  </script>
102
102
 
103
103
  <template>
104
- <PillStepper
104
+ <Stepper
105
105
  :count="5"
106
106
  :active="active"
107
107
  :filling="filling"
@@ -117,11 +117,11 @@ const { playing, toggle, filling, fillDuration } = useAutoPlay({
117
117
 
118
118
  ```ts
119
119
  // React — default export stays React for backwards compat
120
- import { PillStepper, useAutoPlay } from "pasito";
121
- import { PillStepper, useAutoPlay } from "pasito/react";
120
+ import { Stepper, useAutoPlay } from "pasito";
121
+ import { Stepper, useAutoPlay } from "pasito/react";
122
122
 
123
123
  // Vue
124
- import { PillStepper, useAutoPlay } from "pasito/vue";
124
+ import { Stepper, useAutoPlay } from "pasito/vue";
125
125
 
126
126
  // CSS (both frameworks)
127
127
  import "pasito/styles.css";
@@ -129,7 +129,7 @@ import "pasito/styles.css";
129
129
 
130
130
  ## API
131
131
 
132
- ### `<PillStepper />`
132
+ ### `<Stepper />`
133
133
 
134
134
  | Prop | Type | Default | Description |
135
135
  |------|------|---------|-------------|
@@ -168,7 +168,7 @@ import "pasito/styles.css";
168
168
  | `loop` | `boolean \| Ref<boolean>` | `true` | Loop back to first step after last |
169
169
  | `enabled` | `boolean \| Ref<boolean>` | `true` | Enable/disable autoplay |
170
170
 
171
- Returns `{ playing, toggle, filling, fillDuration }` — pass `filling` and `fillDuration` directly to `<PillStepper />`.
171
+ Returns `{ playing, toggle, filling, fillDuration }` — pass `filling` and `fillDuration` directly to `<Stepper />`.
172
172
 
173
173
  ## Theming
174
174
 
@@ -176,12 +176,12 @@ Override any CSS custom property via a class:
176
176
 
177
177
  ```tsx
178
178
  // React
179
- <PillStepper className="my-stepper" ... />
179
+ <Stepper className="my-stepper" ... />
180
180
  ```
181
181
 
182
182
  ```vue
183
183
  <!-- Vue -->
184
- <PillStepper class="my-stepper" ... />
184
+ <Stepper class="my-stepper" ... />
185
185
  ```
186
186
 
187
187
  | Variable | Default | Description |
@@ -55,9 +55,9 @@ function useAnimatingSteps(count, _duration) {
55
55
  return steps;
56
56
  }
57
57
 
58
- // src/react/PillStep.tsx
58
+ // src/react/Step.tsx
59
59
  import { jsx } from "react/jsx-runtime";
60
- function PillStep({
60
+ function Step({
61
61
  index,
62
62
  isActive,
63
63
  phase,
@@ -93,9 +93,9 @@ function PillStep({
93
93
  );
94
94
  }
95
95
 
96
- // src/react/PillStepper.tsx
96
+ // src/react/Stepper.tsx
97
97
  import { jsx as jsx2 } from "react/jsx-runtime";
98
- function PillStepper({
98
+ function Stepper({
99
99
  count,
100
100
  active,
101
101
  onStepClick,
@@ -144,7 +144,7 @@ function PillStepper({
144
144
  className: "pasito-track",
145
145
  style: { transform: transformValue },
146
146
  children: animatingSteps.map((step) => /* @__PURE__ */ jsx2(
147
- PillStep,
147
+ Step,
148
148
  {
149
149
  index: step.index,
150
150
  isActive: step.index === active,
@@ -218,6 +218,6 @@ function useAutoPlay({
218
218
  }
219
219
 
220
220
  export {
221
- PillStepper,
221
+ Stepper,
222
222
  useAutoPlay
223
223
  };
package/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* src/styles/PillStepper.css */
1
+ /* src/styles/Stepper.css */
2
2
  .pasito-container {
3
3
  --pill-dot-size: 8px;
4
4
  --pill-active-width: 24px;
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as PillStepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-C_ERj5iI.mjs';
1
+ import { S as StepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-BFgSD_7j.mjs';
2
2
 
3
- declare function PillStepper({ count, active, onStepClick, orientation, maxVisible, transitionDuration, easing, className, filling, fillDuration, }: PillStepperProps): React.ReactElement;
3
+ declare function Stepper({ count, active, onStepClick, orientation, maxVisible, transitionDuration, easing, className, filling, fillDuration, }: StepperProps): React.ReactElement;
4
4
 
5
5
  declare function useAutoPlay({ count, active, onStepChange, stepDuration, loop, enabled, }: UseAutoPlayOptions): UseAutoPlayReturn;
6
6
 
7
- export { PillStepper, PillStepperProps, UseAutoPlayOptions, UseAutoPlayReturn, useAutoPlay };
7
+ export { Stepper, StepperProps, UseAutoPlayOptions, UseAutoPlayReturn, useAutoPlay };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { P as PillStepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-C_ERj5iI.js';
1
+ import { S as StepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-BFgSD_7j.js';
2
2
 
3
- declare function PillStepper({ count, active, onStepClick, orientation, maxVisible, transitionDuration, easing, className, filling, fillDuration, }: PillStepperProps): React.ReactElement;
3
+ declare function Stepper({ count, active, onStepClick, orientation, maxVisible, transitionDuration, easing, className, filling, fillDuration, }: StepperProps): React.ReactElement;
4
4
 
5
5
  declare function useAutoPlay({ count, active, onStepChange, stepDuration, loop, enabled, }: UseAutoPlayOptions): UseAutoPlayReturn;
6
6
 
7
- export { PillStepper, PillStepperProps, UseAutoPlayOptions, UseAutoPlayReturn, useAutoPlay };
7
+ export { Stepper, StepperProps, UseAutoPlayOptions, UseAutoPlayReturn, useAutoPlay };
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/react/index.ts
22
22
  var react_exports = {};
23
23
  __export(react_exports, {
24
- PillStepper: () => PillStepper,
24
+ Stepper: () => Stepper,
25
25
  useAutoPlay: () => useAutoPlay
26
26
  });
27
27
  module.exports = __toCommonJS(react_exports);
@@ -161,9 +161,9 @@ function useAnimatingSteps(count, _duration) {
161
161
  return steps;
162
162
  }
163
163
 
164
- // src/react/PillStep.tsx
164
+ // src/react/Step.tsx
165
165
  var import_jsx_runtime = require("react/jsx-runtime");
166
- function PillStep({
166
+ function Step({
167
167
  index,
168
168
  isActive,
169
169
  phase,
@@ -199,9 +199,9 @@ function PillStep({
199
199
  );
200
200
  }
201
201
 
202
- // src/react/PillStepper.tsx
202
+ // src/react/Stepper.tsx
203
203
  var import_jsx_runtime2 = require("react/jsx-runtime");
204
- function PillStepper({
204
+ function Stepper({
205
205
  count,
206
206
  active,
207
207
  onStepClick,
@@ -250,7 +250,7 @@ function PillStepper({
250
250
  className: "pasito-track",
251
251
  style: { transform: transformValue },
252
252
  children: animatingSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
253
- PillStep,
253
+ Step,
254
254
  {
255
255
  index: step.index,
256
256
  isActive: step.index === active,
@@ -337,6 +337,6 @@ function useAutoPlay({
337
337
  }
338
338
  // Annotate the CommonJS export names for ESM import in node:
339
339
  0 && (module.exports = {
340
- PillStepper,
340
+ Stepper,
341
341
  useAutoPlay
342
342
  });
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
- PillStepper,
3
+ Stepper,
4
4
  useAutoPlay
5
- } from "./chunk-HAF3VK2R.mjs";
5
+ } from "./chunk-X5PGKZ7U.mjs";
6
6
  import "./chunk-4JH2WF3D.mjs";
7
7
  export {
8
- PillStepper,
8
+ Stepper,
9
9
  useAutoPlay
10
10
  };
package/dist/react.css CHANGED
@@ -1,4 +1,4 @@
1
- /* src/styles/PillStepper.css */
1
+ /* src/styles/Stepper.css */
2
2
  .pasito-container {
3
3
  --pill-dot-size: 8px;
4
4
  --pill-active-width: 24px;
package/dist/react.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { PillStepper, useAutoPlay } from './index.mjs';
2
- export { P as PillStepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-C_ERj5iI.mjs';
1
+ export { Stepper, useAutoPlay } from './index.mjs';
2
+ export { S as StepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-BFgSD_7j.mjs';
package/dist/react.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { PillStepper, useAutoPlay } from './index.js';
2
- export { P as PillStepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-C_ERj5iI.js';
1
+ export { Stepper, useAutoPlay } from './index.js';
2
+ export { S as StepperProps, U as UseAutoPlayOptions, a as UseAutoPlayReturn } from './types-BFgSD_7j.js';
package/dist/react.js CHANGED
@@ -21,7 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/react/index.ts
22
22
  var react_exports = {};
23
23
  __export(react_exports, {
24
- PillStepper: () => PillStepper,
24
+ Stepper: () => Stepper,
25
25
  useAutoPlay: () => useAutoPlay
26
26
  });
27
27
  module.exports = __toCommonJS(react_exports);
@@ -161,9 +161,9 @@ function useAnimatingSteps(count, _duration) {
161
161
  return steps;
162
162
  }
163
163
 
164
- // src/react/PillStep.tsx
164
+ // src/react/Step.tsx
165
165
  var import_jsx_runtime = require("react/jsx-runtime");
166
- function PillStep({
166
+ function Step({
167
167
  index,
168
168
  isActive,
169
169
  phase,
@@ -199,9 +199,9 @@ function PillStep({
199
199
  );
200
200
  }
201
201
 
202
- // src/react/PillStepper.tsx
202
+ // src/react/Stepper.tsx
203
203
  var import_jsx_runtime2 = require("react/jsx-runtime");
204
- function PillStepper({
204
+ function Stepper({
205
205
  count,
206
206
  active,
207
207
  onStepClick,
@@ -250,7 +250,7 @@ function PillStepper({
250
250
  className: "pasito-track",
251
251
  style: { transform: transformValue },
252
252
  children: animatingSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
253
- PillStep,
253
+ Step,
254
254
  {
255
255
  index: step.index,
256
256
  isActive: step.index === active,
@@ -337,6 +337,6 @@ function useAutoPlay({
337
337
  }
338
338
  // Annotate the CommonJS export names for ESM import in node:
339
339
  0 && (module.exports = {
340
- PillStepper,
340
+ Stepper,
341
341
  useAutoPlay
342
342
  });
package/dist/react.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
- PillStepper,
3
+ Stepper,
4
4
  useAutoPlay
5
- } from "./chunk-HAF3VK2R.mjs";
5
+ } from "./chunk-X5PGKZ7U.mjs";
6
6
  import "./chunk-4JH2WF3D.mjs";
7
7
  export {
8
- PillStepper,
8
+ Stepper,
9
9
  useAutoPlay
10
10
  };
@@ -1,4 +1,4 @@
1
- interface PillStepperProps {
1
+ interface StepperProps {
2
2
  /** Total number of steps */
3
3
  count: number;
4
4
  /** Zero-based active step index */
@@ -41,4 +41,4 @@ interface UseAutoPlayReturn {
41
41
  fillDuration: number;
42
42
  }
43
43
 
44
- export type { AnimatingStep as A, PillStepperProps as P, UseAutoPlayOptions as U, UseAutoPlayReturn as a };
44
+ export type { AnimatingStep as A, StepperProps as S, UseAutoPlayOptions as U, UseAutoPlayReturn as a };
@@ -1,4 +1,4 @@
1
- interface PillStepperProps {
1
+ interface StepperProps {
2
2
  /** Total number of steps */
3
3
  count: number;
4
4
  /** Zero-based active step index */
@@ -41,4 +41,4 @@ interface UseAutoPlayReturn {
41
41
  fillDuration: number;
42
42
  }
43
43
 
44
- export type { AnimatingStep as A, PillStepperProps as P, UseAutoPlayOptions as U, UseAutoPlayReturn as a };
44
+ export type { AnimatingStep as A, StepperProps as S, UseAutoPlayOptions as U, UseAutoPlayReturn as a };
package/dist/vue.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as vue from 'vue';
2
2
  import { PropType, Ref } from 'vue';
3
- export { A as AnimatingStep, a as UseAutoPlayReturn } from './types-C_ERj5iI.mjs';
3
+ export { A as AnimatingStep, a as UseAutoPlayReturn } from './types-BFgSD_7j.mjs';
4
4
 
5
- declare const PillStepper: vue.DefineComponent<vue.ExtractPropTypes<{
5
+ declare const Stepper: vue.DefineComponent<vue.ExtractPropTypes<{
6
6
  count: {
7
7
  type: NumberConstructor;
8
8
  required: true;
@@ -97,4 +97,4 @@ declare function useAutoPlay(options: UseAutoPlayOptions): {
97
97
  fillDuration: vue.ComputedRef<number>;
98
98
  };
99
99
 
100
- export { PillStepper, type UseAutoPlayOptions, useAutoPlay };
100
+ export { Stepper, type UseAutoPlayOptions, useAutoPlay };
package/dist/vue.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as vue from 'vue';
2
2
  import { PropType, Ref } from 'vue';
3
- export { A as AnimatingStep, a as UseAutoPlayReturn } from './types-C_ERj5iI.js';
3
+ export { A as AnimatingStep, a as UseAutoPlayReturn } from './types-BFgSD_7j.js';
4
4
 
5
- declare const PillStepper: vue.DefineComponent<vue.ExtractPropTypes<{
5
+ declare const Stepper: vue.DefineComponent<vue.ExtractPropTypes<{
6
6
  count: {
7
7
  type: NumberConstructor;
8
8
  required: true;
@@ -97,4 +97,4 @@ declare function useAutoPlay(options: UseAutoPlayOptions): {
97
97
  fillDuration: vue.ComputedRef<number>;
98
98
  };
99
99
 
100
- export { PillStepper, type UseAutoPlayOptions, useAutoPlay };
100
+ export { Stepper, type UseAutoPlayOptions, useAutoPlay };
package/dist/vue.js CHANGED
@@ -21,12 +21,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/vue/index.ts
22
22
  var vue_exports = {};
23
23
  __export(vue_exports, {
24
- PillStepper: () => PillStepper,
24
+ Stepper: () => Stepper,
25
25
  useAutoPlay: () => useAutoPlay
26
26
  });
27
27
  module.exports = __toCommonJS(vue_exports);
28
28
 
29
- // src/vue/PillStepper.ts
29
+ // src/vue/Stepper.ts
30
30
  var import_vue4 = require("vue");
31
31
 
32
32
  // src/vue/composables/useStepWindow.ts
@@ -166,10 +166,10 @@ function useAnimatingSteps(count, _duration) {
166
166
  return steps;
167
167
  }
168
168
 
169
- // src/vue/PillStep.ts
169
+ // src/vue/Step.ts
170
170
  var import_vue3 = require("vue");
171
- var PillStep = (0, import_vue3.defineComponent)({
172
- name: "PillStep",
171
+ var Step = (0, import_vue3.defineComponent)({
172
+ name: "Step",
173
173
  props: {
174
174
  index: { type: Number, required: true },
175
175
  isActive: { type: Boolean, required: true },
@@ -210,9 +210,9 @@ var PillStep = (0, import_vue3.defineComponent)({
210
210
  }
211
211
  });
212
212
 
213
- // src/vue/PillStepper.ts
214
- var PillStepper = (0, import_vue4.defineComponent)({
215
- name: "PillStepper",
213
+ // src/vue/Stepper.ts
214
+ var Stepper = (0, import_vue4.defineComponent)({
215
+ name: "Stepper",
216
216
  props: {
217
217
  count: { type: Number, required: true },
218
218
  active: { type: Number, required: true },
@@ -274,7 +274,7 @@ var PillStepper = (0, import_vue4.defineComponent)({
274
274
  style: { transform: transformValue }
275
275
  },
276
276
  steps.value.map(
277
- (step) => (0, import_vue4.h)(PillStep, {
277
+ (step) => (0, import_vue4.h)(Step, {
278
278
  key: step.key,
279
279
  index: step.index,
280
280
  isActive: step.index === props.active,
@@ -346,6 +346,6 @@ function useAutoPlay(options) {
346
346
  }
347
347
  // Annotate the CommonJS export names for ESM import in node:
348
348
  0 && (module.exports = {
349
- PillStepper,
349
+ Stepper,
350
350
  useAutoPlay
351
351
  });
package/dist/vue.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  computeStepWindow
6
6
  } from "./chunk-4JH2WF3D.mjs";
7
7
 
8
- // src/vue/PillStepper.ts
8
+ // src/vue/Stepper.ts
9
9
  import { defineComponent as defineComponent2, toRef, computed as computed3, h as h2 } from "vue";
10
10
 
11
11
  // src/vue/composables/useStepWindow.ts
@@ -60,10 +60,10 @@ function useAnimatingSteps(count, _duration) {
60
60
  return steps;
61
61
  }
62
62
 
63
- // src/vue/PillStep.ts
63
+ // src/vue/Step.ts
64
64
  import { defineComponent, h } from "vue";
65
- var PillStep = defineComponent({
66
- name: "PillStep",
65
+ var Step = defineComponent({
66
+ name: "Step",
67
67
  props: {
68
68
  index: { type: Number, required: true },
69
69
  isActive: { type: Boolean, required: true },
@@ -104,9 +104,9 @@ var PillStep = defineComponent({
104
104
  }
105
105
  });
106
106
 
107
- // src/vue/PillStepper.ts
108
- var PillStepper = defineComponent2({
109
- name: "PillStepper",
107
+ // src/vue/Stepper.ts
108
+ var Stepper = defineComponent2({
109
+ name: "Stepper",
110
110
  props: {
111
111
  count: { type: Number, required: true },
112
112
  active: { type: Number, required: true },
@@ -168,7 +168,7 @@ var PillStepper = defineComponent2({
168
168
  style: { transform: transformValue }
169
169
  },
170
170
  steps.value.map(
171
- (step) => h2(PillStep, {
171
+ (step) => h2(Step, {
172
172
  key: step.key,
173
173
  index: step.index,
174
174
  isActive: step.index === props.active,
@@ -226,6 +226,6 @@ function useAutoPlay(options) {
226
226
  };
227
227
  }
228
228
  export {
229
- PillStepper,
229
+ Stepper,
230
230
  useAutoPlay
231
231
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pasito",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A dependency-free stepper/progress indicator with pure CSS transitions — React & Vue",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",