@raxium/vue-addons-swiper 0.1.1 → 0.1.3

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/Swiper.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createElementBlock, createPropsRestProxy, createSlots, createVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, shallowRef, unref, withCtx } from "vue";
2
- import { cn } from "@raxium/themes/utils";
3
- import { useForwardPropsEmits } from "@raxium/vue-addons-shared";
2
+ import { cn, useForwardPropsEmits } from "@raxium/vue-addons-shared";
4
3
  import { Swiper } from "swiper/vue";
5
4
  import { useSwiperModule } from "./utils.js";
6
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,5 @@
1
1
  import { computed, createElementBlock, createPropsRestProxy, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, renderSlot, unref, useTemplateRef, watch } from "vue";
2
- import { cn } from "@raxium/themes/utils";
3
- import { useForwardProps } from "@raxium/vue-addons-shared";
2
+ import { cn, useForwardProps } from "@raxium/vue-addons-shared";
4
3
  import { merge } from "es-toolkit/compat";
5
4
  import { ChevronRight } from "lucide-vue-next";
6
5
  import { useSwiper } from "swiper/vue";
@@ -1,6 +1,5 @@
1
1
  import { computed, createElementBlock, createPropsRestProxy, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, renderSlot, unref, useTemplateRef, watch } from "vue";
2
- import { cn } from "@raxium/themes/utils";
3
- import { useForwardProps } from "@raxium/vue-addons-shared";
2
+ import { cn, useForwardProps } from "@raxium/vue-addons-shared";
4
3
  import { merge } from "es-toolkit/compat";
5
4
  import { ChevronLeft } from "lucide-vue-next";
6
5
  import { useSwiper } from "swiper/vue";
@@ -1,7 +1,6 @@
1
1
  import { computed, createElementBlock, createPropsRestProxy, defineComponent, nextTick, normalizeClass, openBlock, unref, useTemplateRef, watch } from "vue";
2
2
  import { getNodeCssVar, rem2px } from "@raxium/shared";
3
- import { cn } from "@raxium/themes/utils";
4
- import { useForwardProps } from "@raxium/vue-addons-shared";
3
+ import { cn, useForwardProps } from "@raxium/vue-addons-shared";
5
4
  import { merge } from "es-toolkit/compat";
6
5
  import { useSwiper } from "swiper/vue";
7
6
  import { useRegistSwiperEmits, useSwiperModule } from "./utils.js";
@@ -1,6 +1,5 @@
1
1
  import { computed, createElementBlock, createPropsRestProxy, defineComponent, normalizeClass, openBlock, unref, useTemplateRef, watch } from "vue";
2
- import { cn } from "@raxium/themes/utils";
3
- import { useForwardProps } from "@raxium/vue-addons-shared";
2
+ import { cn, useForwardProps } from "@raxium/vue-addons-shared";
4
3
  import { merge } from "es-toolkit/compat";
5
4
  import { useSwiper } from "swiper/vue";
6
5
  import { useRegistSwiperEmits, useSwiperModule } from "./utils.js";
package/dist/index.css CHANGED
@@ -1,115 +1,113 @@
1
- @layer components {
2
- @import 'swiper/css';
3
- @import 'swiper/css/navigation';
4
- @import 'swiper/css/pagination';
5
- @import 'swiper/css/scrollbar';
1
+ @import 'swiper/css';
2
+ @import 'swiper/css/navigation';
3
+ @import 'swiper/css/pagination';
4
+ @import 'swiper/css/scrollbar';
6
5
 
7
- .rui-swiper {
8
- position: relative;
9
- }
6
+ .rui-swiper {
7
+ position: relative;
8
+ }
10
9
 
11
- .rui-swiper-navigation_prev,
12
- .rui-swiper-navigation_next {
13
- position: 'absolute';
14
- height: 3.125rem;
15
- z-index: 10;
16
- top: 50%;
17
- transform: translateY(-50%);
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- border-radius: 0.25rem;
22
- }
23
- .rui-swiper-navigation_prev {
24
- left: 0;
25
- }
26
- .rui-swiper-navigation_next {
27
- right: 0;
28
- }
10
+ .rui-swiper-navigation_prev,
11
+ .rui-swiper-navigation_next {
12
+ position: 'absolute';
13
+ height: 3.125rem;
14
+ z-index: 10;
15
+ top: 50%;
16
+ transform: translateY(-50%);
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ border-radius: 0.25rem;
21
+ }
22
+ .rui-swiper-navigation_prev {
23
+ left: 0;
24
+ }
25
+ .rui-swiper-navigation_next {
26
+ right: 0;
27
+ }
29
28
 
30
- .rui-swiper-pagination {
31
- --swiper-pagination-color: oklch(76.87% 0.2343 141.32);
29
+ .rui-swiper-pagination {
30
+ --swiper-pagination-color: oklch(76.87% 0.2343 141.32);
32
31
 
33
- /* position */
34
- --swiper-pagination-left: auto;
35
- --swiper-pagination-right: 0.5rem;
36
- --swiper-pagination-bottom: 0.5rem;
37
- --swiper-pagination-top: auto;
32
+ /* position */
33
+ --swiper-pagination-left: auto;
34
+ --swiper-pagination-right: 0.5rem;
35
+ --swiper-pagination-bottom: 0.5rem;
36
+ --swiper-pagination-top: auto;
38
37
 
39
- /* fraction */
40
- --swiper-pagination-fraction-color: inherit;
41
- --swiper-pagination-progressbar-bg-color: oklch(0% 0 0 / 25%);
42
- --swiper-pagination-progressbar-size: 4px;
38
+ /* fraction */
39
+ --swiper-pagination-fraction-color: inherit;
40
+ --swiper-pagination-progressbar-bg-color: oklch(0% 0 0 / 25%);
41
+ --swiper-pagination-progressbar-size: 4px;
43
42
 
44
- /* Bullets */
45
- --swiper-pagination-bullet-size: 0.5rem;
46
- --swiper-pagination-bullet-width: 0.5rem;
47
- --swiper-pagination-bullet-height: 0.5rem;
48
- --swiper-pagination-bullet-border-radius: 50%;
49
- --swiper-pagination-bullet-inactive-color: oklch(100% 0 0);
50
- --swiper-pagination-bullet-inactive-opacity: 0.2;
51
- --swiper-pagination-bullet-opacity: 1;
52
- --swiper-pagination-bullet-horizontal-gap: 0.25rem;
53
- --swiper-pagination-bullet-vertical-gap: 0.375rem;
54
- --swiper-pagination-bullet-autoplay-active-bullet-size: 2.5rem;
43
+ /* Bullets */
44
+ --swiper-pagination-bullet-size: 0.5rem;
45
+ --swiper-pagination-bullet-width: 0.5rem;
46
+ --swiper-pagination-bullet-height: 0.5rem;
47
+ --swiper-pagination-bullet-border-radius: 50%;
48
+ --swiper-pagination-bullet-inactive-color: oklch(100% 0 0);
49
+ --swiper-pagination-bullet-inactive-opacity: 0.2;
50
+ --swiper-pagination-bullet-opacity: 1;
51
+ --swiper-pagination-bullet-horizontal-gap: 0.25rem;
52
+ --swiper-pagination-bullet-vertical-gap: 0.375rem;
53
+ --swiper-pagination-bullet-autoplay-active-bullet-size: 2.5rem;
55
54
 
56
- &.swiper-pagination-horizontal[data-type='autoplay-bullets'] {
57
- & .swiper-pagination-bullet-active {
58
- position: relative;
59
- width: var(--swiper-pagination-bullet-autoplay-active-bullet-size);
60
- border-radius: var(--swiper-pagination-bullet-height);
61
- background-color: oklch(100% 0 0 / 20%);
62
- transition: width 0.3s ease-out;
55
+ &.swiper-pagination-horizontal[data-type='autoplay-bullets'] {
56
+ & .swiper-pagination-bullet-active {
57
+ position: relative;
58
+ width: var(--swiper-pagination-bullet-autoplay-active-bullet-size);
59
+ border-radius: var(--swiper-pagination-bullet-height);
60
+ background-color: oklch(100% 0 0 / 20%);
61
+ transition: width 0.3s ease-out;
63
62
 
64
- &:after {
65
- content: " ";
66
- width: var(--autoplay-percentage);
67
- position: absolute;
68
- top: 0;
69
- left: 0;
70
- height: 100%;
71
- background-color: var(--swiper-pagination-color);
72
- border-radius: var(--swiper-pagination-bullet-height);
73
- }
63
+ &:after {
64
+ content: ' ';
65
+ width: var(--autoplay-percentage);
66
+ position: absolute;
67
+ top: 0;
68
+ left: 0;
69
+ height: 100%;
70
+ background-color: var(--swiper-pagination-color);
71
+ border-radius: var(--swiper-pagination-bullet-height);
74
72
  }
75
73
  }
74
+ }
76
75
 
77
- &.swiper-pagination-vertical[data-type='autoplay-bullets'] {
78
- & .swiper-pagination-bullet-active {
79
- position: relative;
80
- height: var(--swiper-pagination-bullet-autoplay-active-bullet-size);
81
- border-radius: var(--swiper-pagination-bullet-width);
82
- background-color: oklch(100% 0 0 / 20%);
83
- transition: height 0.3s ease-out;
76
+ &.swiper-pagination-vertical[data-type='autoplay-bullets'] {
77
+ & .swiper-pagination-bullet-active {
78
+ position: relative;
79
+ height: var(--swiper-pagination-bullet-autoplay-active-bullet-size);
80
+ border-radius: var(--swiper-pagination-bullet-width);
81
+ background-color: oklch(100% 0 0 / 20%);
82
+ transition: height 0.3s ease-out;
84
83
 
85
- &:after {
86
- content: " ";
87
- height: var(--autoplay-percentage);
88
- position: absolute;
89
- top: 0;
90
- left: 0;
91
- width: 100%;
92
- background-color: var(--swiper-pagination-color);
93
- border-radius: var(--swiper-pagination-bullet-width);
94
- }
84
+ &:after {
85
+ content: ' ';
86
+ height: var(--autoplay-percentage);
87
+ position: absolute;
88
+ top: 0;
89
+ left: 0;
90
+ width: 100%;
91
+ background-color: var(--swiper-pagination-color);
92
+ border-radius: var(--swiper-pagination-bullet-width);
95
93
  }
96
94
  }
97
95
  }
98
-
99
- .rui-swiper-scrollbar {
100
- --swiper-scrollbar-border-radius: 0.625rem;
101
- --swiper-scrollbar-top: auto;
102
- --swiper-scrollbar-bottom: 0.25rem;
103
- --swiper-scrollbar-left: auto;
104
- --swiper-scrollbar-right: 0.25rem;
105
- --swiper-scrollbar-sides-offset: 1%;
106
- --swiper-scrollbar-bg-color: rgba(255, 255, 255, 0.1);
107
- --swiper-scrollbar-drag-bg-color: oklch(76.87% 0.2343 141.32);
108
- --swiper-scrollbar-size: 0.25rem;
109
- }
96
+ }
110
97
 
111
- .rui-swiper-next,
112
- .rui-swiper-prev {
113
- width: fit-content;
114
- }
98
+ .rui-swiper-scrollbar {
99
+ --swiper-scrollbar-border-radius: 0.625rem;
100
+ --swiper-scrollbar-top: auto;
101
+ --swiper-scrollbar-bottom: 0.25rem;
102
+ --swiper-scrollbar-left: auto;
103
+ --swiper-scrollbar-right: 0.25rem;
104
+ --swiper-scrollbar-sides-offset: 1%;
105
+ --swiper-scrollbar-bg-color: rgba(255, 255, 255, 0.1);
106
+ --swiper-scrollbar-drag-bg-color: oklch(76.87% 0.2343 141.32);
107
+ --swiper-scrollbar-size: 0.25rem;
108
+ }
109
+
110
+ .rui-swiper-next,
111
+ .rui-swiper-prev {
112
+ width: fit-content;
115
113
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@raxium/vue-addons-swiper",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "description": "Swiper components for Raxium",
6
6
  "author": {
7
7
  "name": "Hwacc",
@@ -35,8 +35,7 @@
35
35
  "lucide-vue-next": "^0.563.0",
36
36
  "swiper": "^12.1.2",
37
37
  "@raxium/shared": "0.1.1",
38
- "@raxium/themes": "0.1.1",
39
- "@raxium/vue-addons-shared": "0.1.1"
38
+ "@raxium/vue-addons-shared": "0.1.2"
40
39
  },
41
40
  "devDependencies": {
42
41
  "@rsbuild/plugin-babel": "^1.0.6",