vueless 0.0.398 → 0.0.399

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": "vueless",
3
- "version": "0.0.398",
3
+ "version": "0.0.399",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <svg width="100%" height="100%" viewBox="0 0 40 40" v-bind="stepperSvgAttrs">
2
+ <svg viewBox="0 0 40 40" v-bind="stepperSvgAttrs">
3
3
  <defs>
4
4
  <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="0%" v-bind="stepperGradientAttrs">
5
5
  <stop offset="0%" :stop-color="stepperColor" />
@@ -27,7 +27,7 @@
27
27
  stroke-dashoffset="0"
28
28
  />
29
29
  <g v-bind="stepperCountAttrs">
30
- <text y="45%" transform="translate(0, 2)">
30
+ <text y="45%">
31
31
  <tspan x="50%" text-anchor="middle">{{ value }}</tspan>
32
32
  </text>
33
33
  </g>
@@ -139,7 +139,7 @@ const isSteps = computed(() => Array.isArray(props.max));
139
139
 
140
140
  const realMax = computed(() => {
141
141
  if (isSteps.value) {
142
- return props.max.length;
142
+ return props.max.length - 1;
143
143
  }
144
144
 
145
145
  return Number(props.max);
@@ -162,6 +162,6 @@ const progressPercent = computed(() => {
162
162
  });
163
163
 
164
164
  function isActiveStep(index) {
165
- return index === props.value - 1;
165
+ return index === props.value;
166
166
  }
167
167
  </script>
@@ -4,15 +4,15 @@ export default /*tw*/ {
4
4
  variants: {
5
5
  variant: {
6
6
  progress: "w-full h-auto flex flex-col gap-1.5",
7
- stepper: "flex items-center justify-between",
7
+ stepper: "flex items-center justify-between gap-4",
8
8
  },
9
9
  },
10
10
  },
11
11
  stepper: {
12
- base: "",
12
+ base: "shrink-0 grow-0",
13
13
  variants: {
14
14
  size: {
15
- "2xs": "size-8",
15
+ "2xs": "size-6",
16
16
  xs: "size-8",
17
17
  sm: "size-10",
18
18
  md: "size-12",
@@ -24,8 +24,15 @@ export default /*tw*/ {
24
24
  },
25
25
  stepperSvg: "",
26
26
  stepperGradient: "",
27
- stepperCircle: "stroke-current text-{color}-100",
28
- stepperCount: "text-xl font-bold text-gray-900 translate-y-2 transform",
27
+ stepperCircle: {
28
+ base: "stroke-{color}-100 text-{color}-100",
29
+ variants: {
30
+ color: {
31
+ grayscale: "stroke-gray-100",
32
+ },
33
+ },
34
+ },
35
+ stepperCount: "text-md font-bold text-gray-900 translate-y-2 transform",
29
36
  indicator: {
30
37
  base: "text-{color}-600 flex justify-end w-full min-w-fit font-medium transition",
31
38
  variants: {
@@ -103,6 +110,7 @@ export default /*tw*/ {
103
110
  safelist: (colors) => [
104
111
  { pattern: `text-(${colors})-600` },
105
112
  { pattern: `text-(${colors})-100` },
113
+ { pattern: `stroke-(${colors})-100` },
106
114
  {
107
115
  pattern: `bg-(${colors})-50`,
108
116
  variants: ["[&::-webkit-progress-bar]", "[@supports(selector(&::-moz-progress-bar))]"],
@@ -26,7 +26,7 @@ const DefaultTemplate = (args) => ({
26
26
  args.iterator = args.max ? 1 : 10;
27
27
 
28
28
  function updateProgress() {
29
- args.value = args.value < (args.max?.length || 100) ? args.value + args.iterator : 0;
29
+ args.value = args.value < (args.max?.length - 1 || 100) ? args.value + args.iterator : 0;
30
30
  }
31
31
 
32
32
  return { slots, args, updateProgress };
@@ -68,13 +68,13 @@ export const Default = DefaultTemplate.bind({});
68
68
  Default.args = {};
69
69
 
70
70
  export const VariantStepper = DefaultTemplate.bind({});
71
- VariantStepper.args = { variant: "stepper", max: ["Step 1", "Step 2", "Step 3"] };
71
+ VariantStepper.args = { variant: "stepper", max: ["Step 0", "Step 1", "Step 2"] };
72
72
 
73
73
  export const Indicator = DefaultTemplate.bind({});
74
74
  Indicator.args = { indicator: true };
75
75
 
76
76
  export const Steps = DefaultTemplate.bind({});
77
- Steps.args = { max: ["Step 1", "Step 2", "Step 3"] };
77
+ Steps.args = { max: ["Step 0", "Step 1", "Step 2"] };
78
78
 
79
79
  export const Colors = EnumVariantTemplate.bind({});
80
80
  Colors.args = { enum: "color" };
@@ -97,7 +97,7 @@ IndicatorSlot.args = {
97
97
 
98
98
  export const StepSlot = DefaultTemplate.bind({});
99
99
  StepSlot.args = {
100
- max: ["Step 1", "Step 2", "Step 3"],
100
+ max: ["Step 0", "Step 1", "Step 2"],
101
101
  slotTemplate: `
102
102
  <template #step-0>
103
103
  💻
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.398",
4
+ "version": "0.0.399",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",