halox-calendar-nav-ts 0.0.1-beta.1
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/components/index.vue.d.ts +19 -0
- package/dist/halox-calendar-nav-ts.css +1 -0
- package/dist/halox-calendar-nav-ts.es.css +0 -0
- package/dist/halox-calendar-nav-ts.es.js +67 -0
- package/dist/halox-calendar-nav-ts.umd.css +0 -0
- package/dist/halox-calendar-nav-ts.umd.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +51 -0
- package/readme.md +62 -0
- package/tsconfig.json +19 -0
- package/vite.config.ts +33 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
size?: string;
|
|
3
|
+
fontSize?: string;
|
|
4
|
+
fontColor?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
date?: string | Date;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
|
+
"update:date": (v: string) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:date"?: ((v: string) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
size: string;
|
|
14
|
+
fontSize: string;
|
|
15
|
+
fontColor: string;
|
|
16
|
+
color: string;
|
|
17
|
+
date: string | Date;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.page-container{display:flex;justify-content:space-around;align-items:center;gap:5px}.calendar-nav-btn{display:inline-block;width:var(--size);aspect-ratio:1/1;background-color:#eee;color:var(--color);border-radius:4px;padding:5px;cursor:pointer}.calendar-nav-btn:hover{background-color:#ddd}.calendar-nav-btn:active{background-color:#ccc}.icon-left-m,.icon-right-m{width:100%;height:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor}.icon-left-m{--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='m15.906 4.78l-10.5 10.5l-.718.72l.718.72l10.5 10.5l1.406-1.44L7.533 16l9.78-9.78l-1.406-1.44zm7 0l-10.5 10.5l-.72.72l.72.72l10.5 10.5l1.407-1.44L14.53 16l9.783-9.78z'/%3E%3C/svg%3E");-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-right-m{--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M9.094 4.78L7.688 6.22l9.78 9.78l-9.78 9.78l1.406 1.44l10.5-10.5l.718-.72l-.718-.72zm7 0l-1.407 1.44L24.47 16l-9.782 9.78l1.406 1.44l10.5-10.5l.718-.72l-.718-.72z'/%3E%3C/svg%3E");-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-left,.icon-right{width:100%;height:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;width:var(--size)}.icon-left{--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='m19.03 4.28l-11 11l-.686.72l.687.72l11 11l1.44-1.44L10.187 16l10.28-10.28z'/%3E%3C/svg%3E");-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-right{width:100%;height:100%;--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='m12.97 4.28l-1.44 1.44L21.814 16L11.53 26.28l1.44 1.44l11-11l.686-.72l-.687-.72l-11-11z'/%3E%3C/svg%3E");-webkit-mask-image:var(--svg);mask-image:var(--svg)}
|
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineComponent as f, createElementBlock as m, openBlock as u, normalizeStyle as i, createElementVNode as e, toDisplayString as c } from "vue";
|
|
2
|
+
const p = /* @__PURE__ */ f({
|
|
3
|
+
__name: "index",
|
|
4
|
+
props: {
|
|
5
|
+
size: { default: "20px" },
|
|
6
|
+
fontSize: { default: "14px" },
|
|
7
|
+
fontColor: { default: "#333" },
|
|
8
|
+
color: { default: "#333" },
|
|
9
|
+
date: { default: "2026-01-01" }
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:date"],
|
|
12
|
+
setup(n, { emit: a }) {
|
|
13
|
+
const d = n, r = a, v = (s) => s.toISOString().split("T")[0], l = (s) => {
|
|
14
|
+
const t = new Date(d.date);
|
|
15
|
+
switch (s) {
|
|
16
|
+
case "m-prev":
|
|
17
|
+
t.setMonth(t.getMonth() - 1);
|
|
18
|
+
break;
|
|
19
|
+
case "m-next":
|
|
20
|
+
t.setMonth(t.getMonth() + 1);
|
|
21
|
+
break;
|
|
22
|
+
case "d-prev":
|
|
23
|
+
t.setDate(t.getDate() - 1);
|
|
24
|
+
break;
|
|
25
|
+
case "d-next":
|
|
26
|
+
t.setDate(t.getDate() + 1);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
r("update:date", v(t));
|
|
30
|
+
};
|
|
31
|
+
return (s, t) => (u(), m("div", {
|
|
32
|
+
style: i({ "--size": n.size, "--color": n.color }),
|
|
33
|
+
class: "page-container"
|
|
34
|
+
}, [
|
|
35
|
+
e("div", {
|
|
36
|
+
class: "calendar-nav-btn",
|
|
37
|
+
onClick: t[0] || (t[0] = (o) => l("m-prev"))
|
|
38
|
+
}, [...t[4] || (t[4] = [
|
|
39
|
+
e("div", { class: "icon-left-m" }, null, -1)
|
|
40
|
+
])]),
|
|
41
|
+
e("div", {
|
|
42
|
+
class: "calendar-nav-btn",
|
|
43
|
+
onClick: t[1] || (t[1] = (o) => l("d-prev"))
|
|
44
|
+
}, [...t[5] || (t[5] = [
|
|
45
|
+
e("div", { class: "icon-left" }, null, -1)
|
|
46
|
+
])]),
|
|
47
|
+
e("div", {
|
|
48
|
+
style: i({ fontSize: n.fontSize, color: n.fontColor })
|
|
49
|
+
}, c(n.date), 5),
|
|
50
|
+
e("div", {
|
|
51
|
+
class: "calendar-nav-btn",
|
|
52
|
+
onClick: t[2] || (t[2] = (o) => l("d-next"))
|
|
53
|
+
}, [...t[6] || (t[6] = [
|
|
54
|
+
e("div", { class: "icon-right" }, null, -1)
|
|
55
|
+
])]),
|
|
56
|
+
e("div", {
|
|
57
|
+
class: "calendar-nav-btn",
|
|
58
|
+
onClick: t[3] || (t[3] = (o) => l("m-next"))
|
|
59
|
+
}, [...t[7] || (t[7] = [
|
|
60
|
+
e("div", { class: "icon-right-m" }, null, -1)
|
|
61
|
+
])])
|
|
62
|
+
], 4));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
export {
|
|
66
|
+
p as vue3CalendarNavUI
|
|
67
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n["halox-calendar-nav-ts"]={},n.Vue))})(this,(function(n,t){"use strict";const d=t.defineComponent({__name:"index",props:{size:{default:"20px"},fontSize:{default:"14px"},fontColor:{default:"#333"},color:{default:"#333"},date:{default:"2026-01-01"}},emits:["update:date"],setup(l,{emit:a}){const r=l,f=a,c=s=>s.toISOString().split("T")[0],o=s=>{const e=new Date(r.date);switch(s){case"m-prev":e.setMonth(e.getMonth()-1);break;case"m-next":e.setMonth(e.getMonth()+1);break;case"d-prev":e.setDate(e.getDate()-1);break;case"d-next":e.setDate(e.getDate()+1);break}f("update:date",c(e))};return(s,e)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle({"--size":l.size,"--color":l.color}),class:"page-container"},[t.createElementVNode("div",{class:"calendar-nav-btn",onClick:e[0]||(e[0]=i=>o("m-prev"))},[...e[4]||(e[4]=[t.createElementVNode("div",{class:"icon-left-m"},null,-1)])]),t.createElementVNode("div",{class:"calendar-nav-btn",onClick:e[1]||(e[1]=i=>o("d-prev"))},[...e[5]||(e[5]=[t.createElementVNode("div",{class:"icon-left"},null,-1)])]),t.createElementVNode("div",{style:t.normalizeStyle({fontSize:l.fontSize,color:l.fontColor})},t.toDisplayString(l.date),5),t.createElementVNode("div",{class:"calendar-nav-btn",onClick:e[2]||(e[2]=i=>o("d-next"))},[...e[6]||(e[6]=[t.createElementVNode("div",{class:"icon-right"},null,-1)])]),t.createElementVNode("div",{class:"calendar-nav-btn",onClick:e[3]||(e[3]=i=>o("m-next"))},[...e[7]||(e[7]=[t.createElementVNode("div",{class:"icon-right-m"},null,-1)])])],4))}});n.vue3CalendarNavUI=d,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/index.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "halox-calendar-nav-ts",
|
|
3
|
+
"version": "0.0.1-beta.1",
|
|
4
|
+
"main": "dist/halox-calendar-nav-ts.umd.js",
|
|
5
|
+
"module": "dist/halox-calendar-nav-ts.es.js",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/shenyunv2021/halox-calendar-nav-ts.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/shenyunv2021/halox-calendar-nav-ts-issues/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/shenyunv2021/halox-calendar-nav-ts-issues#readme",
|
|
15
|
+
"contributors": [
|
|
16
|
+
"simcheolun <shenyunv2021@gamil.com>"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "vite build",
|
|
22
|
+
"build:watch": "if exist dist rd /s /q dist && vite build --watch",
|
|
23
|
+
"lint": "eslint . --ext .ts,.vue",
|
|
24
|
+
"test": "echo \"No test yet\""
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"vue3",
|
|
28
|
+
"typescript",
|
|
29
|
+
"calendar",
|
|
30
|
+
"date",
|
|
31
|
+
"halox",
|
|
32
|
+
"JAYUWARE"
|
|
33
|
+
],
|
|
34
|
+
"author": "HaloX Dev Team",
|
|
35
|
+
"description": "",
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"vue": "^3.5.25"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@vitejs/plugin-vue": "^6.0.2",
|
|
41
|
+
"rollup": "^4.53.3",
|
|
42
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
43
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
44
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
45
|
+
"sass-embedded": "^1.93.3",
|
|
46
|
+
"typescript": "^5.9.3",
|
|
47
|
+
"vite": "^7.2.4",
|
|
48
|
+
"vite-plugin-dts": "^4.5.4",
|
|
49
|
+
"vue-tsc": "^3.1.5"
|
|
50
|
+
}
|
|
51
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Vue3 Typescript CALENDAR NAV UI Guide
|
|
2
|
+
|
|
3
|
+
## 설치
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install halox-calendar-nav-ts
|
|
7
|
+
```
|
|
8
|
+
---
|
|
9
|
+

|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
항상 최신 버전을 유지해주세요.
|
|
15
|
+
|
|
16
|
+
달력/날자 내비게이션 - VUE3 + Typescript
|
|
17
|
+
halox-calendar-nav-ts
|
|
18
|
+
|
|
19
|
+
이전월 이전일 다음일 다음월 변경지원
|
|
20
|
+
캘린더라이브러리 사용을 위한 서브툴
|
|
21
|
+
|
|
22
|
+
필요한 개선 요청은 깃헙 이슈로 남겨주세요.
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Usage Example
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
import 'halox-calendar-nav-ts/dist/halox-calendar-nav-ts.css'
|
|
31
|
+
import { vue3CalendarNavUI } from 'halox-calendar-nav-ts'
|
|
32
|
+
<script lang="ts" setup>
|
|
33
|
+
const ref = ref('2026-01-01')
|
|
34
|
+
...
|
|
35
|
+
</script>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Main Components
|
|
41
|
+
|
|
42
|
+
``` vue
|
|
43
|
+
<vue3CalendarNavUI
|
|
44
|
+
v-model:date="date"
|
|
45
|
+
size="20px"
|
|
46
|
+
font-size="16px"
|
|
47
|
+
color="#333"
|
|
48
|
+
font-color="#ff0000"/>
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
``` javascript
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
---
|
|
55
|
+
## Params
|
|
56
|
+
``` ts
|
|
57
|
+
date: 문자열 '2026-01-01'
|
|
58
|
+
size: 문자열 '20px'
|
|
59
|
+
font-size: 문자열 '16px'
|
|
60
|
+
color: 문자열 '#333'
|
|
61
|
+
font-color: 문자열 '#ff0000'
|
|
62
|
+
```
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Node",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationDir": "dist/types",
|
|
8
|
+
"emitDeclarationOnly": false,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"jsx": "preserve",
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"lib": ["ESNext", "DOM"]
|
|
15
|
+
},
|
|
16
|
+
"include": ["src"],
|
|
17
|
+
"exclude": ["node_modules", "dist", "example"]
|
|
18
|
+
}
|
|
19
|
+
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import vue from '@vitejs/plugin-vue';
|
|
3
|
+
import dts from 'vite-plugin-dts';
|
|
4
|
+
import postcss from 'rollup-plugin-postcss';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
vue(),
|
|
10
|
+
dts({ insertTypesEntry: true }),
|
|
11
|
+
],
|
|
12
|
+
build: {
|
|
13
|
+
lib: {
|
|
14
|
+
entry: path.resolve(__dirname, 'src/index.ts'),
|
|
15
|
+
name: 'halox-calendar-nav-ts',
|
|
16
|
+
fileName: (format) => `halox-calendar-nav-ts.${format}.js`,
|
|
17
|
+
},
|
|
18
|
+
rollupOptions: {
|
|
19
|
+
external: ['vue'],
|
|
20
|
+
output: {
|
|
21
|
+
globals: { vue: 'Vue' },
|
|
22
|
+
},
|
|
23
|
+
plugins: [
|
|
24
|
+
postcss({
|
|
25
|
+
extract: true, // CSS를 별도 파일로 추출
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
css: {
|
|
30
|
+
preprocessorOptions: { scss: {} },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|