@pagix/carousel 0.1.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 +83 -0
- package/i18n/messages/en.json +82 -0
- package/i18n/messages/ja.json +82 -0
- package/i18n/messages/ko.json +82 -0
- package/i18n/messages/zh.json +82 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# @anvilkit/carousel
|
|
2
|
+
|
|
3
|
+
A Puck-native carousel with two layouts:
|
|
4
|
+
|
|
5
|
+
- **`cards`** — multi-card peek showcase (3-4 cards visible, one centered, others peeking on the sides). Each card can carry its own image + title + subtitle. Small arrows + dot pagination.
|
|
6
|
+
- **`hero`** — single-image hero. One large image dominates, neighbours peek as thin slivers. Large circular arrows on the sides, no dots by default.
|
|
7
|
+
|
|
8
|
+
Carousel mechanics (active index, snap, loop, autoplay, keyboard) are shared; only the rendering per layout differs.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pnpm add @anvilkit/carousel @anvilkit/ui @puckeditor/core
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Styles
|
|
17
|
+
|
|
18
|
+
Import the package stylesheet once at the app entry:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import "@anvilkit/carousel/styles.css";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quickstart
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import "@anvilkit/carousel/styles.css";
|
|
28
|
+
import { Carousel, componentConfig, defaultProps } from "@anvilkit/carousel";
|
|
29
|
+
|
|
30
|
+
const config = {
|
|
31
|
+
components: { Carousel: componentConfig },
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const data = {
|
|
35
|
+
root: { props: {} },
|
|
36
|
+
content: [
|
|
37
|
+
{
|
|
38
|
+
props: {
|
|
39
|
+
...defaultProps,
|
|
40
|
+
layout: "cards",
|
|
41
|
+
items: [
|
|
42
|
+
{ image: "https://...", title: "Card 1", subtitle: "Subtitle" },
|
|
43
|
+
{ image: "https://...", title: "Card 2", subtitle: "Subtitle" },
|
|
44
|
+
{ image: "https://...", title: "Card 3", subtitle: "Subtitle" },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
type: "Carousel",
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Props
|
|
54
|
+
|
|
55
|
+
| Prop | Type | Default | Notes |
|
|
56
|
+
| --- | --- | --- | --- |
|
|
57
|
+
| `layout` | `"cards" \| "hero"` | `"cards"` | Visual layout. |
|
|
58
|
+
| `items` | `CarouselItem[]` | `[]` | Slides. |
|
|
59
|
+
| `perView` | `number` | `3` (cards) / `1` (hero) | How many items visible at once. |
|
|
60
|
+
| `aspect` | `"3:4" \| "16:9" \| "1:1" \| "4:3"` | `3:4` (cards) / `16:9` (hero) | Item aspect ratio. |
|
|
61
|
+
| `showDots` | `boolean` | `true` | Bottom dot pagination (auto-hidden in `hero`). |
|
|
62
|
+
| `showArrows` | `boolean` | `true` | Prev/next navigation. |
|
|
63
|
+
| `arrowStyle` | `"small" \| "large"` | `small` (cards) / `large` (hero) | Visual size of the arrow buttons. |
|
|
64
|
+
| `loop` | `boolean` | `true` | Wrap around at the ends. |
|
|
65
|
+
| `autoplay` | `boolean` | `false` | Auto-advance slides. |
|
|
66
|
+
| `autoplayInterval` | `number` (ms) | `5000` | Autoplay step. |
|
|
67
|
+
| `gap` | `number` (px) | `24` | Gap between items. |
|
|
68
|
+
| `background` | `BackgroundProps` | white | Section background (image / video / color). |
|
|
69
|
+
| `classNames` | `Record<string, string>` | — | Tailwind passthrough per style target. |
|
|
70
|
+
| `animation` | `AnimationProps` | — | Entrance animation. |
|
|
71
|
+
|
|
72
|
+
### `CarouselItem`
|
|
73
|
+
|
|
74
|
+
| Field | Type | Notes |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| `image` | `string` | Background image (URL or data URL). |
|
|
77
|
+
| `title` | `string` | Card title (used in `cards` layout). |
|
|
78
|
+
| `subtitle` | `string` | Card subtitle. |
|
|
79
|
+
| `href` | `string` | Optional clickable link. |
|
|
80
|
+
|
|
81
|
+
## Edit mode
|
|
82
|
+
|
|
83
|
+
All interactive elements (arrows, dots, item links) are disabled in the Puck editor so authors don't trigger navigation while editing.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"carousel.label": "Carousel",
|
|
3
|
+
"carousel.fields.layout.label": "Layout",
|
|
4
|
+
"carousel.fields.layout.options.cards": "Cards (peek showcase)",
|
|
5
|
+
"carousel.fields.layout.options.hero": "Hero (single image)",
|
|
6
|
+
"carousel.fields.items.label": "Slides",
|
|
7
|
+
"carousel.fields.items.fields.image": "Image URL",
|
|
8
|
+
"carousel.fields.items.fields.title": "Title",
|
|
9
|
+
"carousel.fields.items.fields.subtitle": "Subtitle",
|
|
10
|
+
"carousel.fields.items.fields.href": "Link (optional)",
|
|
11
|
+
"carousel.fields.perView.label": "Items per view",
|
|
12
|
+
"carousel.fields.aspect.label": "Aspect ratio",
|
|
13
|
+
"carousel.fields.aspect.options.3:4": "3:4 (portrait)",
|
|
14
|
+
"carousel.fields.aspect.options.16:9": "16:9 (landscape)",
|
|
15
|
+
"carousel.fields.aspect.options.1:1": "1:1 (square)",
|
|
16
|
+
"carousel.fields.aspect.options.4:3": "4:3",
|
|
17
|
+
"carousel.fields.cardSizeRatio.label": "Active card size (×)",
|
|
18
|
+
"carousel.fields.variant.label": "Style",
|
|
19
|
+
"carousel.fields.variant.options.default": "Slide (peek)",
|
|
20
|
+
"carousel.fields.variant.options.coverflow": "Stack (coverflow)",
|
|
21
|
+
"carousel.fields.showDots.label": "Show dots",
|
|
22
|
+
"carousel.fields.showDots.options.true": "Yes",
|
|
23
|
+
"carousel.fields.showDots.options.false": "No",
|
|
24
|
+
"carousel.fields.dotColor.label": "Dot color (inactive)",
|
|
25
|
+
"carousel.fields.dotActiveColor.label": "Dot color (active)",
|
|
26
|
+
"carousel.fields.dotSize.label": "Dot size (px)",
|
|
27
|
+
"carousel.fields.pillBackground.label": "Pill background",
|
|
28
|
+
"carousel.fields.pillPosition.label": "Pill position",
|
|
29
|
+
"carousel.fields.pillPosition.options.bottom": "Bottom",
|
|
30
|
+
"carousel.fields.pillPosition.options.top": "Top",
|
|
31
|
+
"carousel.fields.pillPosition.options.left": "Left",
|
|
32
|
+
"carousel.fields.pillPosition.options.right": "Right",
|
|
33
|
+
"carousel.fields.pillPosition.options.below": "Below (outside card)",
|
|
34
|
+
"carousel.fields.pillOffset.label": "Distance from edge (px)",
|
|
35
|
+
"carousel.fields.pillBorderShow.label": "Show pill border",
|
|
36
|
+
"carousel.fields.pillBorderShow.options.true": "Yes",
|
|
37
|
+
"carousel.fields.pillBorderShow.options.false": "No",
|
|
38
|
+
"carousel.fields.pillBorderColor.label": "Border color",
|
|
39
|
+
"carousel.fields.pillBorderWidth.label": "Border width (px)",
|
|
40
|
+
"carousel.fields.draggable.label": "Drag to swipe",
|
|
41
|
+
"carousel.fields.draggable.options.true": "Yes",
|
|
42
|
+
"carousel.fields.draggable.options.false": "No",
|
|
43
|
+
"carousel.fields.showArrows.label": "Show arrows",
|
|
44
|
+
"carousel.fields.showArrows.options.true": "Yes",
|
|
45
|
+
"carousel.fields.showArrows.options.false": "No",
|
|
46
|
+
"carousel.fields.arrowStyle.label": "Arrow style",
|
|
47
|
+
"carousel.fields.arrowStyle.options.small": "Small",
|
|
48
|
+
"carousel.fields.arrowStyle.options.large": "Large",
|
|
49
|
+
"carousel.fields.loop.label": "Loop at the ends",
|
|
50
|
+
"carousel.fields.loop.options.true": "Yes",
|
|
51
|
+
"carousel.fields.loop.options.false": "No",
|
|
52
|
+
"carousel.fields.autoplay.label": "Autoplay",
|
|
53
|
+
"carousel.fields.autoplay.options.true": "Yes",
|
|
54
|
+
"carousel.fields.autoplay.options.false": "No",
|
|
55
|
+
"carousel.fields.autoplayInterval.label": "Autoplay interval (ms)",
|
|
56
|
+
"carousel.fields.gap.label": "Gap between items (px)",
|
|
57
|
+
"carousel.fields.background.label": "Background",
|
|
58
|
+
"carousel.fields.background.fields.type.label": "Type",
|
|
59
|
+
"carousel.fields.background.fields.type.options.image": "Image",
|
|
60
|
+
"carousel.fields.background.fields.type.options.video": "Video",
|
|
61
|
+
"carousel.fields.background.fields.type.options.color": "Color",
|
|
62
|
+
"carousel.fields.background.fields.imageUrl.label": "Image URL",
|
|
63
|
+
"carousel.fields.background.fields.videoUrl.label": "Video URL",
|
|
64
|
+
"carousel.fields.background.fields.color.label": "Color (CSS)",
|
|
65
|
+
"carousel.fields.classNames.label": "Custom classes",
|
|
66
|
+
"carousel.fields.animation.label": "Animation",
|
|
67
|
+
"carousel.fields.animation.preset": "Preset",
|
|
68
|
+
"carousel.fields.animation.preset.options.none": "None",
|
|
69
|
+
"carousel.fields.animation.preset.options.fade-in": "Fade in",
|
|
70
|
+
"carousel.fields.animation.preset.options.slide-up": "Slide up",
|
|
71
|
+
"carousel.fields.animation.preset.options.slide-down": "Slide down",
|
|
72
|
+
"carousel.fields.animation.preset.options.zoom-in": "Zoom in",
|
|
73
|
+
"carousel.fields.animation.duration": "Duration (ms)",
|
|
74
|
+
"carousel.fields.animation.delay": "Delay (ms)",
|
|
75
|
+
"carousel.fields.animation.easing": "Easing",
|
|
76
|
+
"carousel.targets.root": "Carousel",
|
|
77
|
+
"carousel.targets.track": "Track",
|
|
78
|
+
"carousel.targets.item": "Item",
|
|
79
|
+
"carousel.targets.dots": "Dots",
|
|
80
|
+
"carousel.targets.arrow-prev": "Previous arrow",
|
|
81
|
+
"carousel.targets.arrow-next": "Next arrow"
|
|
82
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"carousel.label": "カルーセル",
|
|
3
|
+
"carousel.fields.layout.label": "レイアウト",
|
|
4
|
+
"carousel.fields.layout.options.cards": "カード(複数表示)",
|
|
5
|
+
"carousel.fields.layout.options.hero": "ヒーロー(メイン画像)",
|
|
6
|
+
"carousel.fields.items.label": "スライド",
|
|
7
|
+
"carousel.fields.items.fields.image": "画像 URL",
|
|
8
|
+
"carousel.fields.items.fields.title": "タイトル",
|
|
9
|
+
"carousel.fields.items.fields.subtitle": "サブタイトル",
|
|
10
|
+
"carousel.fields.items.fields.href": "リンク(任意)",
|
|
11
|
+
"carousel.fields.perView.label": "画面ごとの表示数",
|
|
12
|
+
"carousel.fields.aspect.label": "アスペクト比",
|
|
13
|
+
"carousel.fields.aspect.options.3:4": "3:4 (縦長)",
|
|
14
|
+
"carousel.fields.aspect.options.16:9": "16:9 (横長)",
|
|
15
|
+
"carousel.fields.aspect.options.1:1": "1:1 (正方形)",
|
|
16
|
+
"carousel.fields.aspect.options.4:3": "4:3",
|
|
17
|
+
"carousel.fields.cardSizeRatio.label": "アクティブカードサイズ(×)",
|
|
18
|
+
"carousel.fields.variant.label": "表示スタイル",
|
|
19
|
+
"carousel.fields.variant.options.default": "スライド(peek)",
|
|
20
|
+
"carousel.fields.variant.options.coverflow": "スタック(coverflow)",
|
|
21
|
+
"carousel.fields.showDots.label": "ドットを表示",
|
|
22
|
+
"carousel.fields.showDots.options.true": "はい",
|
|
23
|
+
"carousel.fields.showDots.options.false": "いいえ",
|
|
24
|
+
"carousel.fields.dotColor.label": "ドットの色(非アクティブ)",
|
|
25
|
+
"carousel.fields.dotActiveColor.label": "ドットの色(アクティブ)",
|
|
26
|
+
"carousel.fields.dotSize.label": "ドットサイズ(px)",
|
|
27
|
+
"carousel.fields.pillBackground.label": "ピル背景",
|
|
28
|
+
"carousel.fields.pillPosition.label": "ピル位置",
|
|
29
|
+
"carousel.fields.pillPosition.options.bottom": "下",
|
|
30
|
+
"carousel.fields.pillPosition.options.top": "上",
|
|
31
|
+
"carousel.fields.pillPosition.options.left": "左",
|
|
32
|
+
"carousel.fields.pillPosition.options.right": "右",
|
|
33
|
+
"carousel.fields.pillPosition.options.below": "下(カード外)",
|
|
34
|
+
"carousel.fields.pillOffset.label": "端からの距離(px)",
|
|
35
|
+
"carousel.fields.pillBorderShow.label": "ピル枠線を表示",
|
|
36
|
+
"carousel.fields.pillBorderShow.options.true": "はい",
|
|
37
|
+
"carousel.fields.pillBorderShow.options.false": "いいえ",
|
|
38
|
+
"carousel.fields.pillBorderColor.label": "枠線の色",
|
|
39
|
+
"carousel.fields.pillBorderWidth.label": "枠線の太さ(px)",
|
|
40
|
+
"carousel.fields.draggable.label": "ドラッグで切替",
|
|
41
|
+
"carousel.fields.draggable.options.true": "はい",
|
|
42
|
+
"carousel.fields.draggable.options.false": "いいえ",
|
|
43
|
+
"carousel.fields.showArrows.label": "矢印を表示",
|
|
44
|
+
"carousel.fields.showArrows.options.true": "はい",
|
|
45
|
+
"carousel.fields.showArrows.options.false": "いいえ",
|
|
46
|
+
"carousel.fields.arrowStyle.label": "矢印スタイル",
|
|
47
|
+
"carousel.fields.arrowStyle.options.small": "小",
|
|
48
|
+
"carousel.fields.arrowStyle.options.large": "大",
|
|
49
|
+
"carousel.fields.loop.label": "端でループ",
|
|
50
|
+
"carousel.fields.loop.options.true": "はい",
|
|
51
|
+
"carousel.fields.loop.options.false": "いいえ",
|
|
52
|
+
"carousel.fields.autoplay.label": "自動再生",
|
|
53
|
+
"carousel.fields.autoplay.options.true": "はい",
|
|
54
|
+
"carousel.fields.autoplay.options.false": "いいえ",
|
|
55
|
+
"carousel.fields.autoplayInterval.label": "自動再生間隔(ms)",
|
|
56
|
+
"carousel.fields.gap.label": "カード間隔(px)",
|
|
57
|
+
"carousel.fields.background.label": "背景",
|
|
58
|
+
"carousel.fields.background.fields.type.label": "種類",
|
|
59
|
+
"carousel.fields.background.fields.type.options.image": "画像",
|
|
60
|
+
"carousel.fields.background.fields.type.options.video": "動画",
|
|
61
|
+
"carousel.fields.background.fields.type.options.color": "色",
|
|
62
|
+
"carousel.fields.background.fields.imageUrl.label": "画像 URL",
|
|
63
|
+
"carousel.fields.background.fields.videoUrl.label": "動画 URL",
|
|
64
|
+
"carousel.fields.background.fields.color.label": "色(CSS)",
|
|
65
|
+
"carousel.fields.classNames.label": "カスタムクラス",
|
|
66
|
+
"carousel.fields.animation.label": "アニメーション",
|
|
67
|
+
"carousel.fields.animation.preset": "プリセット",
|
|
68
|
+
"carousel.fields.animation.preset.options.none": "なし",
|
|
69
|
+
"carousel.fields.animation.preset.options.fade-in": "フェードイン",
|
|
70
|
+
"carousel.fields.animation.preset.options.slide-up": "スライドアップ",
|
|
71
|
+
"carousel.fields.animation.preset.options.slide-down": "スライドダウン",
|
|
72
|
+
"carousel.fields.animation.preset.options.zoom-in": "ズームイン",
|
|
73
|
+
"carousel.fields.animation.duration": "時間(ms)",
|
|
74
|
+
"carousel.fields.animation.delay": "遅延(ms)",
|
|
75
|
+
"carousel.fields.animation.easing": "イージング",
|
|
76
|
+
"carousel.targets.root": "カルーセル",
|
|
77
|
+
"carousel.targets.track": "トラック",
|
|
78
|
+
"carousel.targets.item": "アイテム",
|
|
79
|
+
"carousel.targets.dots": "ドット",
|
|
80
|
+
"carousel.targets.arrow-prev": "前へ矢印",
|
|
81
|
+
"carousel.targets.arrow-next": "次へ矢印"
|
|
82
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"carousel.label": "캐러셀",
|
|
3
|
+
"carousel.fields.layout.label": "레이아웃",
|
|
4
|
+
"carousel.fields.layout.options.cards": "카드(멀티 카드)",
|
|
5
|
+
"carousel.fields.layout.options.hero": "히어로(단일 이미지)",
|
|
6
|
+
"carousel.fields.items.label": "슬라이드",
|
|
7
|
+
"carousel.fields.items.fields.image": "이미지 URL",
|
|
8
|
+
"carousel.fields.items.fields.title": "제목",
|
|
9
|
+
"carousel.fields.items.fields.subtitle": "서브타이틀",
|
|
10
|
+
"carousel.fields.items.fields.href": "링크(선택)",
|
|
11
|
+
"carousel.fields.perView.label": "화면당 표시 수",
|
|
12
|
+
"carousel.fields.aspect.label": "종횡비",
|
|
13
|
+
"carousel.fields.aspect.options.3:4": "3:4 (세로)",
|
|
14
|
+
"carousel.fields.aspect.options.16:9": "16:9 (가로)",
|
|
15
|
+
"carousel.fields.aspect.options.1:1": "1:1 (정사각)",
|
|
16
|
+
"carousel.fields.aspect.options.4:3": "4:3",
|
|
17
|
+
"carousel.fields.cardSizeRatio.label": "주요 카드 크기 배수(×)",
|
|
18
|
+
"carousel.fields.variant.label": "표시 스타일",
|
|
19
|
+
"carousel.fields.variant.options.default": "슬라이드(peek)",
|
|
20
|
+
"carousel.fields.variant.options.coverflow": "스택(coverflow)",
|
|
21
|
+
"carousel.fields.showDots.label": "도트 표시",
|
|
22
|
+
"carousel.fields.showDots.options.true": "예",
|
|
23
|
+
"carousel.fields.showDots.options.false": "아니오",
|
|
24
|
+
"carousel.fields.dotColor.label": "도트 색상(비활성)",
|
|
25
|
+
"carousel.fields.dotActiveColor.label": "도트 색상(활성)",
|
|
26
|
+
"carousel.fields.dotSize.label": "도트 크기(px)",
|
|
27
|
+
"carousel.fields.pillBackground.label": "알약 배경",
|
|
28
|
+
"carousel.fields.pillPosition.label": "알약 위치",
|
|
29
|
+
"carousel.fields.pillPosition.options.bottom": "하단",
|
|
30
|
+
"carousel.fields.pillPosition.options.top": "상단",
|
|
31
|
+
"carousel.fields.pillPosition.options.left": "왼쪽",
|
|
32
|
+
"carousel.fields.pillPosition.options.right": "오른쪽",
|
|
33
|
+
"carousel.fields.pillPosition.options.below": "아래(카드 외부)",
|
|
34
|
+
"carousel.fields.pillOffset.label": "가장자리로부터 거리(px)",
|
|
35
|
+
"carousel.fields.pillBorderShow.label": "알약 테두리 표시",
|
|
36
|
+
"carousel.fields.pillBorderShow.options.true": "예",
|
|
37
|
+
"carousel.fields.pillBorderShow.options.false": "아니오",
|
|
38
|
+
"carousel.fields.pillBorderColor.label": "테두리 색상",
|
|
39
|
+
"carousel.fields.pillBorderWidth.label": "테두리 두께(px)",
|
|
40
|
+
"carousel.fields.draggable.label": "드래그로 전환",
|
|
41
|
+
"carousel.fields.draggable.options.true": "예",
|
|
42
|
+
"carousel.fields.draggable.options.false": "아니오",
|
|
43
|
+
"carousel.fields.showArrows.label": "화살표 표시",
|
|
44
|
+
"carousel.fields.showArrows.options.true": "예",
|
|
45
|
+
"carousel.fields.showArrows.options.false": "아니오",
|
|
46
|
+
"carousel.fields.arrowStyle.label": "화살표 스타일",
|
|
47
|
+
"carousel.fields.arrowStyle.options.small": "작게",
|
|
48
|
+
"carousel.fields.arrowStyle.options.large": "크게",
|
|
49
|
+
"carousel.fields.loop.label": "끝에서 순환",
|
|
50
|
+
"carousel.fields.loop.options.true": "예",
|
|
51
|
+
"carousel.fields.loop.options.false": "아니오",
|
|
52
|
+
"carousel.fields.autoplay.label": "자동 재생",
|
|
53
|
+
"carousel.fields.autoplay.options.true": "예",
|
|
54
|
+
"carousel.fields.autoplay.options.false": "아니오",
|
|
55
|
+
"carousel.fields.autoplayInterval.label": "자동 재생 간격(ms)",
|
|
56
|
+
"carousel.fields.gap.label": "카드 간격(px)",
|
|
57
|
+
"carousel.fields.background.label": "배경",
|
|
58
|
+
"carousel.fields.background.fields.type.label": "유형",
|
|
59
|
+
"carousel.fields.background.fields.type.options.image": "이미지",
|
|
60
|
+
"carousel.fields.background.fields.type.options.video": "비디오",
|
|
61
|
+
"carousel.fields.background.fields.type.options.color": "색상",
|
|
62
|
+
"carousel.fields.background.fields.imageUrl.label": "이미지 URL",
|
|
63
|
+
"carousel.fields.background.fields.videoUrl.label": "비디오 URL",
|
|
64
|
+
"carousel.fields.background.fields.color.label": "색상(CSS)",
|
|
65
|
+
"carousel.fields.classNames.label": "사용자 정의 클래스",
|
|
66
|
+
"carousel.fields.animation.label": "애니메이션",
|
|
67
|
+
"carousel.fields.animation.preset": "프리셋",
|
|
68
|
+
"carousel.fields.animation.preset.options.none": "없음",
|
|
69
|
+
"carousel.fields.animation.preset.options.fade-in": "페이드 인",
|
|
70
|
+
"carousel.fields.animation.preset.options.slide-up": "슬라이드 업",
|
|
71
|
+
"carousel.fields.animation.preset.options.slide-down": "슬라이드 다운",
|
|
72
|
+
"carousel.fields.animation.preset.options.zoom-in": "줌 인",
|
|
73
|
+
"carousel.fields.animation.duration": "지속 시간(ms)",
|
|
74
|
+
"carousel.fields.animation.delay": "지연(ms)",
|
|
75
|
+
"carousel.fields.animation.easing": "이징",
|
|
76
|
+
"carousel.targets.root": "캐러셀",
|
|
77
|
+
"carousel.targets.track": "트랙",
|
|
78
|
+
"carousel.targets.item": "아이템",
|
|
79
|
+
"carousel.targets.dots": "도트",
|
|
80
|
+
"carousel.targets.arrow-prev": "이전 화살표",
|
|
81
|
+
"carousel.targets.arrow-next": "다음 화살표"
|
|
82
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"carousel.label": "走马灯",
|
|
3
|
+
"carousel.fields.layout.label": "布局",
|
|
4
|
+
"carousel.fields.layout.options.cards": "卡片(多卡展示)",
|
|
5
|
+
"carousel.fields.layout.options.hero": "主图(单图大图)",
|
|
6
|
+
"carousel.fields.items.label": "幻灯片",
|
|
7
|
+
"carousel.fields.items.fields.image": "图片地址",
|
|
8
|
+
"carousel.fields.items.fields.title": "标题",
|
|
9
|
+
"carousel.fields.items.fields.subtitle": "副标题",
|
|
10
|
+
"carousel.fields.items.fields.href": "链接(可选)",
|
|
11
|
+
"carousel.fields.perView.label": "每屏可见数",
|
|
12
|
+
"carousel.fields.aspect.label": "宽高比",
|
|
13
|
+
"carousel.fields.aspect.options.3:4": "3:4 (竖版)",
|
|
14
|
+
"carousel.fields.aspect.options.16:9": "16:9 (横版)",
|
|
15
|
+
"carousel.fields.aspect.options.1:1": "1:1 (正方形)",
|
|
16
|
+
"carousel.fields.aspect.options.4:3": "4:3",
|
|
17
|
+
"carousel.fields.cardSizeRatio.label": "主卡尺寸倍数(×)",
|
|
18
|
+
"carousel.fields.variant.label": "展示样式",
|
|
19
|
+
"carousel.fields.variant.options.default": "滑动(peek)",
|
|
20
|
+
"carousel.fields.variant.options.coverflow": "堆叠(coverflow)",
|
|
21
|
+
"carousel.fields.showDots.label": "显示圆点分页",
|
|
22
|
+
"carousel.fields.showDots.options.true": "是",
|
|
23
|
+
"carousel.fields.showDots.options.false": "否",
|
|
24
|
+
"carousel.fields.dotColor.label": "圆点颜色(未激活)",
|
|
25
|
+
"carousel.fields.dotActiveColor.label": "圆点颜色(激活)",
|
|
26
|
+
"carousel.fields.dotSize.label": "圆点大小(像素)",
|
|
27
|
+
"carousel.fields.pillBackground.label": "药丸背景",
|
|
28
|
+
"carousel.fields.pillPosition.label": "药丸位置",
|
|
29
|
+
"carousel.fields.pillPosition.options.bottom": "底部",
|
|
30
|
+
"carousel.fields.pillPosition.options.top": "顶部",
|
|
31
|
+
"carousel.fields.pillPosition.options.left": "左侧",
|
|
32
|
+
"carousel.fields.pillPosition.options.right": "右侧",
|
|
33
|
+
"carousel.fields.pillPosition.options.below": "下方(在 card 外)",
|
|
34
|
+
"carousel.fields.pillOffset.label": "到边的距离(像素)",
|
|
35
|
+
"carousel.fields.pillBorderShow.label": "显示药丸边框",
|
|
36
|
+
"carousel.fields.pillBorderShow.options.true": "是",
|
|
37
|
+
"carousel.fields.pillBorderShow.options.false": "否",
|
|
38
|
+
"carousel.fields.pillBorderColor.label": "边框颜色",
|
|
39
|
+
"carousel.fields.pillBorderWidth.label": "边框宽度(像素)",
|
|
40
|
+
"carousel.fields.draggable.label": "拖动切换",
|
|
41
|
+
"carousel.fields.draggable.options.true": "是",
|
|
42
|
+
"carousel.fields.draggable.options.false": "否",
|
|
43
|
+
"carousel.fields.showArrows.label": "显示左右箭头",
|
|
44
|
+
"carousel.fields.showArrows.options.true": "是",
|
|
45
|
+
"carousel.fields.showArrows.options.false": "否",
|
|
46
|
+
"carousel.fields.arrowStyle.label": "箭头样式",
|
|
47
|
+
"carousel.fields.arrowStyle.options.small": "小",
|
|
48
|
+
"carousel.fields.arrowStyle.options.large": "大",
|
|
49
|
+
"carousel.fields.loop.label": "首尾循环",
|
|
50
|
+
"carousel.fields.loop.options.true": "是",
|
|
51
|
+
"carousel.fields.loop.options.false": "否",
|
|
52
|
+
"carousel.fields.autoplay.label": "自动播放",
|
|
53
|
+
"carousel.fields.autoplay.options.true": "是",
|
|
54
|
+
"carousel.fields.autoplay.options.false": "否",
|
|
55
|
+
"carousel.fields.autoplayInterval.label": "自动播放间隔(毫秒)",
|
|
56
|
+
"carousel.fields.gap.label": "卡片间距(像素)",
|
|
57
|
+
"carousel.fields.background.label": "背景",
|
|
58
|
+
"carousel.fields.background.fields.type.label": "类型",
|
|
59
|
+
"carousel.fields.background.fields.type.options.image": "图片",
|
|
60
|
+
"carousel.fields.background.fields.type.options.video": "视频",
|
|
61
|
+
"carousel.fields.background.fields.type.options.color": "颜色",
|
|
62
|
+
"carousel.fields.background.fields.imageUrl.label": "图片地址",
|
|
63
|
+
"carousel.fields.background.fields.videoUrl.label": "视频地址",
|
|
64
|
+
"carousel.fields.background.fields.color.label": "颜色(CSS)",
|
|
65
|
+
"carousel.fields.classNames.label": "自定义类名",
|
|
66
|
+
"carousel.fields.animation.label": "动画",
|
|
67
|
+
"carousel.fields.animation.preset": "预设",
|
|
68
|
+
"carousel.fields.animation.preset.options.none": "无",
|
|
69
|
+
"carousel.fields.animation.preset.options.fade-in": "淡入",
|
|
70
|
+
"carousel.fields.animation.preset.options.slide-up": "上滑",
|
|
71
|
+
"carousel.fields.animation.preset.options.slide-down": "下滑",
|
|
72
|
+
"carousel.fields.animation.preset.options.zoom-in": "缩放进入",
|
|
73
|
+
"carousel.fields.animation.duration": "时长(毫秒)",
|
|
74
|
+
"carousel.fields.animation.delay": "延迟(毫秒)",
|
|
75
|
+
"carousel.fields.animation.easing": "缓动",
|
|
76
|
+
"carousel.targets.root": "走马灯",
|
|
77
|
+
"carousel.targets.track": "滑动轨道",
|
|
78
|
+
"carousel.targets.item": "卡片",
|
|
79
|
+
"carousel.targets.dots": "圆点分页",
|
|
80
|
+
"carousel.targets.arrow-prev": "左箭头",
|
|
81
|
+
"carousel.targets.arrow-next": "右箭头"
|
|
82
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pagix/carousel",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Anvilkit Puck-native carousel with cards / hero layouts.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/cjs/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"./styles.css": "./dist/styles.css",
|
|
21
|
+
"./i18n/en.json": "./i18n/messages/en.json",
|
|
22
|
+
"./i18n/zh.json": "./i18n/messages/zh.json",
|
|
23
|
+
"./i18n/ja.json": "./i18n/messages/ja.json",
|
|
24
|
+
"./i18n/ko.json": "./i18n/messages/ko.json"
|
|
25
|
+
},
|
|
26
|
+
"files": ["dist", "i18n", "README.md"],
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"sideEffects": ["./dist/index.js", "./dist/index.cjs", "**/*.css"],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "rslib build --lib esm && rslib build --lib cjs --no-clean",
|
|
31
|
+
"dev": "rslib build --watch",
|
|
32
|
+
"format": "pnpm exec biome format --write src rslib.config.ts",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"publint": "publint",
|
|
35
|
+
"size": "size-limit"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@anvilkit/ui": "^0.1.5",
|
|
39
|
+
"@puckeditor/core": "^0.23.0",
|
|
40
|
+
"lucide-react": ">=0.300.0",
|
|
41
|
+
"react": ">=19.0.0",
|
|
42
|
+
"react-dom": ">=19.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@anvilkit/tailwind-config": "workspace:*",
|
|
46
|
+
"@anvilkit/ui": "workspace:*",
|
|
47
|
+
"lucide-react": ">=0.300.0"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
}
|
|
52
|
+
}
|