cclkit4svelte 0.1.4 → 0.1.6
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 +8 -6
- package/dist/Button.svelte +2 -1
- package/dist/Card.svelte +69 -0
- package/dist/Card.svelte.d.ts +41 -0
- package/dist/Footer.svelte +3 -1
- package/dist/Header.svelte +3 -1
- package/dist/Thumbnail.svelte +23 -0
- package/dist/Thumbnail.svelte.d.ts +32 -0
- package/dist/const/config.d.ts +1 -1
- package/dist/const/config.js +1 -1
- package/dist/const/variables.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +3 -35
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# ccl-component-kit4svelte
|
|
2
|
+
[](https://github.com/reiji1020/ccl-component-kit4svelte/actions/workflows/storybook-release.yaml)
|
|
3
|
+
[](https://github.com/reiji1020/ccl-component-kit4svelte/actions/workflows/publish-package.yaml)
|
|
2
4
|
|
|
3
5
|
CANDY CHUPS Labのサイトで使うコンポーネントのキットです。
|
|
4
6
|
元々Reactコンポーネントで開発していたのをSvelteに移行しました。
|
|
@@ -7,7 +9,7 @@ CANDY CHUPS Labのサイトで使うコンポーネントのキットです。
|
|
|
7
9
|
|
|
8
10
|
## Figma
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
https://www.figma.com/files/project/71337935/CCL_Component?fuid=1036675751093311196>
|
|
11
13
|
|
|
12
14
|
## 利用用途
|
|
13
15
|
|
|
@@ -29,14 +31,14 @@ or
|
|
|
29
31
|
|
|
30
32
|
## 本ライブラリの開発について
|
|
31
33
|
|
|
32
|
-
コンポーネントライブラリの開発には、Node.jsの
|
|
34
|
+
コンポーネントライブラリの開発には、Node.jsのVersion20以降の環境が必要です。パッケージマネージャにはnpmを使用します。詳細なバージョンについては`package.json`に記載をしていますのでご確認ください。
|
|
33
35
|
|
|
34
36
|
Node.jsのバージョン切り替えには[Volta](https://volta.sh/)をおすすめします。
|
|
35
37
|
|
|
36
38
|
```zsh
|
|
37
39
|
volta install node
|
|
38
40
|
# or
|
|
39
|
-
volta install node@
|
|
41
|
+
volta install node@20
|
|
40
42
|
|
|
41
43
|
node -v
|
|
42
44
|
#任意のNodeのバージョンが表示されればOK
|
|
@@ -65,7 +67,7 @@ Everything you need to build a Svelte project, powered by [`create-svelte`](http
|
|
|
65
67
|
|
|
66
68
|
## Figma
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
https://www.figma.com/files/project/71337935/CCL_Component?fuid=1036675751093311196>
|
|
69
71
|
|
|
70
72
|
## Usage
|
|
71
73
|
|
|
@@ -87,14 +89,14 @@ or
|
|
|
87
89
|
|
|
88
90
|
## About the development of this library
|
|
89
91
|
|
|
90
|
-
The development of component libraries requires a Node.js environment with Version
|
|
92
|
+
The development of component libraries requires a Node.js environment with Version 20 or higher. Use npm as the package manager. Please check the `package.json` for detailed version information.
|
|
91
93
|
|
|
92
94
|
We recommend [Volta](https://volta.sh/) for switching Node.js versions.
|
|
93
95
|
|
|
94
96
|
```zsh
|
|
95
97
|
volta install node
|
|
96
98
|
# or
|
|
97
|
-
volta install node@
|
|
99
|
+
volta install node@20
|
|
98
100
|
|
|
99
101
|
node -v
|
|
100
102
|
#Once the desired Node version is displayed, it is OK.
|
package/dist/Button.svelte
CHANGED
|
@@ -3,7 +3,7 @@ export let label;
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<!--汎用ボタン-->
|
|
6
|
-
<button class="buttonWrapper" style="
|
|
6
|
+
<button class="buttonWrapper" style="--bgColor: var({bgColor})"><span class="btLabel">{label}</span></button>
|
|
7
7
|
|
|
8
8
|
<style>
|
|
9
9
|
.buttonWrapper {
|
|
@@ -11,6 +11,7 @@ export let label;
|
|
|
11
11
|
border-radius: 50px;
|
|
12
12
|
border: none;
|
|
13
13
|
padding: 15px 45px;
|
|
14
|
+
background: var(--bgColor);
|
|
14
15
|
}
|
|
15
16
|
.btLabel {
|
|
16
17
|
flex-direction: column;
|
package/dist/Card.svelte
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script>export let borderColor;
|
|
2
|
+
export let bgColor;
|
|
3
|
+
export let src;
|
|
4
|
+
export let altText;
|
|
5
|
+
export let title;
|
|
6
|
+
export let cardText;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div class="CardWrapper" style="--border-color: var({borderColor})">
|
|
10
|
+
<img class="CardImage" src={src} alt={altText} />
|
|
11
|
+
<div class="CardInfo" style="--background-color: var({bgColor});">
|
|
12
|
+
<div class="CardTextWrapper">
|
|
13
|
+
<h2 class="CardTitle">{title}</h2>
|
|
14
|
+
<span class="CardText">{cardText}</span>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
<style>
|
|
21
|
+
.CardWrapper {
|
|
22
|
+
height: 500px;
|
|
23
|
+
width: 300px;
|
|
24
|
+
position: relative;
|
|
25
|
+
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25); border-radius: 25px;
|
|
26
|
+
border: 5px solid var(--border-color);
|
|
27
|
+
z-index: -1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.CardImage {
|
|
31
|
+
height: auto;
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
top: 0;
|
|
34
|
+
position: absolute;
|
|
35
|
+
border-top-left-radius: 20px;
|
|
36
|
+
border-top-right-radius: 20px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.CardInfo {
|
|
40
|
+
height: 195px;
|
|
41
|
+
width: 300px;
|
|
42
|
+
position: absolute;
|
|
43
|
+
background: var(--background-color);
|
|
44
|
+
top: 300px;
|
|
45
|
+
border-bottom-left-radius: 20px;
|
|
46
|
+
border-bottom-right-radius: 20px;
|
|
47
|
+
border-top: 5px solid var(--border-color);
|
|
48
|
+
z-index: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.CardTextWrapper {
|
|
52
|
+
height: auto;
|
|
53
|
+
max-width: 95%;
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: -5%;
|
|
56
|
+
left: 5%;
|
|
57
|
+
overflow-wrap: break-word;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.CardTitle {
|
|
61
|
+
color: var(--border-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.CardText {
|
|
65
|
+
color: var(--wrap-grey);
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
/**
|
|
5
|
+
* 枠線の色
|
|
6
|
+
* @default --strawberry-pink
|
|
7
|
+
* @type string
|
|
8
|
+
*/ borderColor: string;
|
|
9
|
+
/**
|
|
10
|
+
* 説明文の背景色
|
|
11
|
+
* @default --peach-pink
|
|
12
|
+
* @type string
|
|
13
|
+
*/ bgColor: string;
|
|
14
|
+
/**
|
|
15
|
+
* 画像ソース
|
|
16
|
+
* @type string
|
|
17
|
+
*/ src: string;
|
|
18
|
+
/**
|
|
19
|
+
* alt属性に指定する値
|
|
20
|
+
* @type string
|
|
21
|
+
*/ altText: string;
|
|
22
|
+
/**
|
|
23
|
+
* 記事の見出し
|
|
24
|
+
* @type string
|
|
25
|
+
*/ title: string;
|
|
26
|
+
/**
|
|
27
|
+
* カードの詳細テキスト(140字程度推奨)
|
|
28
|
+
* @type string
|
|
29
|
+
*/ cardText: string;
|
|
30
|
+
};
|
|
31
|
+
events: {
|
|
32
|
+
[evt: string]: CustomEvent<any>;
|
|
33
|
+
};
|
|
34
|
+
slots: {};
|
|
35
|
+
};
|
|
36
|
+
export type CardProps = typeof __propDef.props;
|
|
37
|
+
export type CardEvents = typeof __propDef.events;
|
|
38
|
+
export type CardSlots = typeof __propDef.slots;
|
|
39
|
+
export default class Card extends SvelteComponentTyped<CardProps, CardEvents, CardSlots> {
|
|
40
|
+
}
|
|
41
|
+
export {};
|
package/dist/Footer.svelte
CHANGED
|
@@ -5,18 +5,20 @@ const year = date.getFullYear();
|
|
|
5
5
|
|
|
6
6
|
<!--汎用フッター-->
|
|
7
7
|
<footer>
|
|
8
|
-
<div class="wrapper" style="
|
|
8
|
+
<div class="wrapper" style="--bgColor: var({bgColor});">
|
|
9
9
|
<span class="copy">Copyright © 2015-{year} CANDY CHUPS Lab. All Rights Reserved.</span>
|
|
10
10
|
</div>
|
|
11
11
|
</footer>
|
|
12
12
|
|
|
13
13
|
<style>
|
|
14
|
+
|
|
14
15
|
.wrapper {
|
|
15
16
|
display: flex;
|
|
16
17
|
padding: 0 298px;
|
|
17
18
|
height: 30px;
|
|
18
19
|
justify-content: center;
|
|
19
20
|
align-items: center;
|
|
21
|
+
background: var(--bgColor);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.copy {
|
package/dist/Header.svelte
CHANGED
|
@@ -4,7 +4,7 @@ export let height;
|
|
|
4
4
|
|
|
5
5
|
<!--汎用ヘッダー-->
|
|
6
6
|
<header>
|
|
7
|
-
<div class="wrapper" style="
|
|
7
|
+
<div class="wrapper" style="--bgColor: var({bgColor}); --height: var({height})">
|
|
8
8
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1366 768">
|
|
9
9
|
<title>CANDY CHUPS Lab.</title>
|
|
10
10
|
<path class="a"
|
|
@@ -45,6 +45,8 @@ export let height;
|
|
|
45
45
|
padding: 0 298px;
|
|
46
46
|
justify-content: center;
|
|
47
47
|
align-items: center;
|
|
48
|
+
background: var(--bgColor);
|
|
49
|
+
height: var(--height);
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
svg {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script>export let imageSize;
|
|
2
|
+
export let borderColor;
|
|
3
|
+
export let src;
|
|
4
|
+
export let altText;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div class="ThumbnailWrapper" style="--imageSize: {imageSize}">
|
|
8
|
+
<img src={src} alt={altText} class="Thumbnail" style="--borderColor: var({borderColor})" />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<style>
|
|
12
|
+
.ThumbnailWrapper {
|
|
13
|
+
height: var(--imageSize);
|
|
14
|
+
width: var(--imageSize);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.Thumbnail {
|
|
18
|
+
height: var(--imageSize);
|
|
19
|
+
width: var(--imageSize);
|
|
20
|
+
border-radius: 320px;
|
|
21
|
+
border: 5px solid var(--borderColor);
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
/**
|
|
5
|
+
* サムネイル画像の大きさ
|
|
6
|
+
* @type number
|
|
7
|
+
*/ imageSize: string;
|
|
8
|
+
/**
|
|
9
|
+
* 枠線の色
|
|
10
|
+
* @default --strawberry-pink
|
|
11
|
+
* @type string
|
|
12
|
+
*/ borderColor: string;
|
|
13
|
+
/**
|
|
14
|
+
* 画像ソース
|
|
15
|
+
* @type string
|
|
16
|
+
*/ src: string;
|
|
17
|
+
/**
|
|
18
|
+
* alt属性に指定する値
|
|
19
|
+
* @type string
|
|
20
|
+
*/ altText: string;
|
|
21
|
+
};
|
|
22
|
+
events: {
|
|
23
|
+
[evt: string]: CustomEvent<any>;
|
|
24
|
+
};
|
|
25
|
+
slots: {};
|
|
26
|
+
};
|
|
27
|
+
export type ThumbnailProps = typeof __propDef.props;
|
|
28
|
+
export type ThumbnailEvents = typeof __propDef.events;
|
|
29
|
+
export type ThumbnailSlots = typeof __propDef.slots;
|
|
30
|
+
export default class Thumbnail extends SvelteComponentTyped<ThumbnailProps, ThumbnailEvents, ThumbnailSlots> {
|
|
31
|
+
}
|
|
32
|
+
export {};
|
package/dist/const/config.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const CCLVividColor: {
|
|
|
7
7
|
readonly WRAP_GREY: "--wrap-grey";
|
|
8
8
|
};
|
|
9
9
|
export declare const CCLPastelColor: {
|
|
10
|
-
readonly PEACH_PINK: "--peach-
|
|
10
|
+
readonly PEACH_PINK: "--peach-pink";
|
|
11
11
|
readonly LEMON_YELLOW: "--lemon-yellow";
|
|
12
12
|
readonly SUGAR_BLUE: "--sugar-blue";
|
|
13
13
|
readonly MATCHA_GREEN: "--matcha-green";
|
package/dist/const/config.js
CHANGED
package/dist/const/variables.css
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ import './const/variables.css';
|
|
|
2
2
|
export { default as Header } from './Header.svelte';
|
|
3
3
|
export { default as Button } from './Button.svelte';
|
|
4
4
|
export { default as Footer } from './Footer.svelte';
|
|
5
|
+
export { default as Thumbnail } from './Thumbnail.svelte';
|
|
6
|
+
export { default as Card } from './Card.svelte';
|
package/dist/index.js
CHANGED
|
@@ -3,3 +3,5 @@ import './const/variables.css'; // カスタムプロパティ読み込み用
|
|
|
3
3
|
export { default as Header } from './Header.svelte';
|
|
4
4
|
export { default as Button } from './Button.svelte';
|
|
5
5
|
export { default as Footer } from './Footer.svelte';
|
|
6
|
+
export { default as Thumbnail } from './Thumbnail.svelte';
|
|
7
|
+
export { default as Card } from './Card.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cclkit4svelte",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"author": "reiji1020 <sk@reiji1020.info>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,38 +14,6 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/reiji1020/ccl-component-kit4svelte#readme",
|
|
16
16
|
"description": "Component kit for CANDY CHUPS Lab.",
|
|
17
|
-
"release": {
|
|
18
|
-
"plugins": [
|
|
19
|
-
"@semantic-release/commit-analyzer",
|
|
20
|
-
"@semantic-release/release-notes-generator",
|
|
21
|
-
[
|
|
22
|
-
"@semantic-release/changelog",
|
|
23
|
-
{
|
|
24
|
-
"changelogFile": "docs/CHANGELOG.md"
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"@semantic-release/npm",
|
|
28
|
-
[
|
|
29
|
-
"@semantic-release/git",
|
|
30
|
-
{
|
|
31
|
-
"assets": ["docs/CHANGELOG.md"]
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
],
|
|
35
|
-
"main": [
|
|
36
|
-
"main"
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
"commitlint": {
|
|
40
|
-
"extends": [
|
|
41
|
-
"@commitlint/config-conventional"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
"husky": {
|
|
45
|
-
"hooks": {
|
|
46
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
17
|
"scripts": {
|
|
50
18
|
"preinstall": "npx only-allow pnpm",
|
|
51
19
|
"dev": "vite dev",
|
|
@@ -66,8 +34,8 @@
|
|
|
66
34
|
}
|
|
67
35
|
},
|
|
68
36
|
"devDependencies": {
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
37
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
38
|
+
"@semantic-release/git": "^10.0.1",
|
|
71
39
|
"@storybook/addon-actions": "^7.6.10",
|
|
72
40
|
"@storybook/addon-essentials": "^7.6.3",
|
|
73
41
|
"@storybook/addon-interactions": "^7.6.3",
|