@vaneui/ui 0.0.4 → 0.0.5
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/complex/index.d.ts +1 -0
- package/dist/components/complex/index.js +135 -0
- package/dist/components/complex/index.js.map +1 -0
- package/dist/components/complex/sharer.d.ts +2 -2
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/chip.d.ts +1 -1
- package/dist/components/ui/divider.d.ts +1 -1
- package/dist/components/ui/layout.d.ts +1 -1
- package/dist/components/ui/settings.d.ts +1 -1
- package/dist/components/ui/typography.d.ts +1 -1
- package/dist/components/{ui/utils.d.ts → utils/componentBuilder.d.ts} +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -36
- package/rollup.config.mjs +40 -17
- package/src/components/complex/index.ts +1 -0
- package/src/components/complex/sharer.tsx +1 -5
- package/src/components/ui/badge.tsx +2 -2
- package/src/components/ui/button.tsx +2 -2
- package/src/components/ui/chip.tsx +2 -2
- package/src/components/ui/divider.tsx +2 -2
- package/src/components/ui/layout.tsx +2 -2
- package/src/components/ui/settings.ts +1 -1
- package/src/components/ui/typography.tsx +2 -2
- package/src/components/{ui/utils.tsx → utils/componentBuilder.tsx} +3 -3
- package/tsconfig.complex.json +11 -0
- package/tsconfig.json +1 -1
- /package/dist/components/ui/{commonValues.d.ts → props/commonValues.d.ts} +0 -0
- /package/dist/components/ui/{props.d.ts → props/props.d.ts} +0 -0
- /package/src/components/ui/{commonValues.ts → props/commonValues.ts} +0 -0
- /package/src/components/ui/{props.ts → props/props.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaneui/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,44 +12,15 @@
|
|
|
12
12
|
"require": "./dist/index.js",
|
|
13
13
|
"types": "./dist/index.d.ts"
|
|
14
14
|
},
|
|
15
|
-
"./
|
|
16
|
-
"import": "./dist/components/
|
|
17
|
-
"require": "./dist/components/
|
|
18
|
-
"types": "./dist/components/
|
|
19
|
-
},
|
|
20
|
-
"./ui/button": {
|
|
21
|
-
"import": "./dist/components/ui/button.js",
|
|
22
|
-
"require": "./dist/components/ui/button.js",
|
|
23
|
-
"types": "./dist/components/ui/button.d.ts"
|
|
24
|
-
},
|
|
25
|
-
"./ui/chip": {
|
|
26
|
-
"import": "./dist/components/ui/chip.js",
|
|
27
|
-
"require": "./dist/components/ui/chip.js",
|
|
28
|
-
"types": "./dist/components/ui/chip.d.ts"
|
|
29
|
-
},
|
|
30
|
-
"./ui/divider": {
|
|
31
|
-
"import": "./dist/components/ui/divider.js",
|
|
32
|
-
"require": "./dist/components/ui/divider.js",
|
|
33
|
-
"types": "./dist/components/ui/divider.d.ts"
|
|
34
|
-
},
|
|
35
|
-
"./ui/layout": {
|
|
36
|
-
"import": "./dist/components/ui/layout.js",
|
|
37
|
-
"require": "./dist/components/ui/layout.js",
|
|
38
|
-
"types": "./dist/components/ui/layout.d.ts"
|
|
39
|
-
},
|
|
40
|
-
"./ui/typography": {
|
|
41
|
-
"import": "./dist/components/ui/typography.js",
|
|
42
|
-
"require": "./dist/components/ui/typography.js",
|
|
43
|
-
"types": "./dist/components/ui/typography.d.ts"
|
|
44
|
-
},
|
|
45
|
-
"./complex/sharer": {
|
|
46
|
-
"import": "./dist/components/complex/sharer.js",
|
|
47
|
-
"require": "./dist/components/complex/sharer.js",
|
|
48
|
-
"types": "./dist/components/complex/sharer.d.ts"
|
|
15
|
+
"./complex": {
|
|
16
|
+
"import": "./dist/components/complex/index.js",
|
|
17
|
+
"require": "./dist/components/complex/index.js",
|
|
18
|
+
"types": "./dist/components/complex/index.d.ts"
|
|
49
19
|
}
|
|
50
20
|
},
|
|
51
21
|
"scripts": {
|
|
52
|
-
"
|
|
22
|
+
"clean": "rimraf dist",
|
|
23
|
+
"build": "npm run clean && rollup -c --bundleConfigAsCjs",
|
|
53
24
|
"prepublishOnly": "npm run build"
|
|
54
25
|
},
|
|
55
26
|
"keywords": [],
|
|
@@ -65,11 +36,13 @@
|
|
|
65
36
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
66
37
|
"@types/react": "^19.0.10",
|
|
67
38
|
"@types/react-dom": "^19.0.4",
|
|
39
|
+
"rimraf": "^5.0.10",
|
|
68
40
|
"rollup": "^4.34.9",
|
|
69
41
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
70
42
|
"typescript": "^5.8.2"
|
|
71
43
|
},
|
|
72
44
|
"dependencies": {
|
|
45
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
73
46
|
"tailwind-merge": "^3.0.2",
|
|
74
47
|
"tslib": "^2.8.1"
|
|
75
48
|
}
|
package/rollup.config.mjs
CHANGED
|
@@ -1,22 +1,45 @@
|
|
|
1
1
|
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
2
2
|
import resolve from "@rollup/plugin-node-resolve";
|
|
3
3
|
import commonjs from "@rollup/plugin-commonjs";
|
|
4
|
-
import typescript from "
|
|
4
|
+
import typescript from "rollup-plugin-typescript2";
|
|
5
5
|
import pkg from "./package.json";
|
|
6
6
|
|
|
7
|
-
export default
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
export default [
|
|
8
|
+
{
|
|
9
|
+
input: "src/index.ts",
|
|
10
|
+
output: [
|
|
11
|
+
{
|
|
12
|
+
file: pkg.main,
|
|
13
|
+
format: "cjs",
|
|
14
|
+
sourcemap: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
file: pkg.module,
|
|
18
|
+
format: "esm",
|
|
19
|
+
sourcemap: true,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
plugins: [
|
|
23
|
+
peerDepsExternal(),
|
|
24
|
+
resolve(),
|
|
25
|
+
commonjs(),
|
|
26
|
+
typescript({ tsconfig: "./tsconfig.json" }),
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
input: "src/components/complex/index.ts",
|
|
31
|
+
output: [
|
|
32
|
+
{
|
|
33
|
+
file: "dist/components/complex/index.js",
|
|
34
|
+
format: "esm",
|
|
35
|
+
sourcemap: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
plugins: [
|
|
39
|
+
peerDepsExternal(),
|
|
40
|
+
resolve(),
|
|
41
|
+
commonjs(),
|
|
42
|
+
typescript({ tsconfig: "./tsconfig.complex.json" }),
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SocialShare } from "./sharer";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
|
|
5
3
|
type Platform = 'fb' | 'li' | 'x' | 'th' | 'em' | 'wa' | 'tg' | 're';
|
|
@@ -64,7 +62,7 @@ const buildQueryString = (
|
|
|
64
62
|
: '';
|
|
65
63
|
};
|
|
66
64
|
|
|
67
|
-
const SocialShare: React.FC<SocialShareProps> = ({
|
|
65
|
+
export const SocialShare: React.FC<SocialShareProps> = ({
|
|
68
66
|
url = window.location.href,
|
|
69
67
|
text = '',
|
|
70
68
|
width = 600,
|
|
@@ -216,5 +214,3 @@ const SocialShare: React.FC<SocialShareProps> = ({
|
|
|
216
214
|
</Container>
|
|
217
215
|
);
|
|
218
216
|
};
|
|
219
|
-
|
|
220
|
-
export default SocialShare;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { componentBuilder } from "
|
|
3
|
-
import { TypographyComponentProps } from "./props";
|
|
2
|
+
import { componentBuilder } from "../utils/componentBuilder";
|
|
3
|
+
import { TypographyComponentProps } from "./props/props";
|
|
4
4
|
|
|
5
5
|
export const Badge: React.FC<TypographyComponentProps> = (props) =>
|
|
6
6
|
componentBuilder(props, "span", "rounded-full w-fit")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { componentBuilder } from "
|
|
3
|
-
import { TypographyComponentProps } from "./props";
|
|
2
|
+
import { componentBuilder } from "../utils/componentBuilder";
|
|
3
|
+
import { TypographyComponentProps } from "./props/props";
|
|
4
4
|
|
|
5
5
|
export const Button: React.FC<TypographyComponentProps> = (props) =>
|
|
6
6
|
componentBuilder(props, "button", "w-fit h-fit cursor-pointer flex justify-center items-center border border-gray-200 transition-all duration-300")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { componentBuilder } from "
|
|
3
|
-
import { TypographyComponentProps } from "./props";
|
|
2
|
+
import { componentBuilder } from "./../utils/componentBuilder";
|
|
3
|
+
import { TypographyComponentProps } from "./props/props";
|
|
4
4
|
|
|
5
5
|
export const Chip: React.FC<TypographyComponentProps> = (props) =>
|
|
6
6
|
componentBuilder(props, "span", "rounded-full w-fit h-fit border")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { componentBuilder } from "
|
|
3
|
-
import { BaseComponentProps } from "./props";
|
|
2
|
+
import { componentBuilder } from "./../utils/componentBuilder";
|
|
3
|
+
import { BaseComponentProps } from "./props/props";
|
|
4
4
|
|
|
5
5
|
export const Divider: React.FC<BaseComponentProps> = (props) =>
|
|
6
6
|
componentBuilder(props, "div", "bg-gray-200 w-full h-px")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GridProps, LayoutComponentProps, ColProps, RowProps } from "./props";
|
|
3
|
-
import { componentBuilder } from "
|
|
2
|
+
import { GridProps, LayoutComponentProps, ColProps, RowProps } from "./props/props";
|
|
3
|
+
import { componentBuilder } from "../utils/componentBuilder";
|
|
4
4
|
|
|
5
5
|
const centeredClasses = {
|
|
6
6
|
centered: "items-center justify-center",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, TextAppearanceProps, TextDecorationProps, TextTransformProps } from "./props";
|
|
1
|
+
import { CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, TextAppearanceProps, TextDecorationProps, TextTransformProps } from "./props/props";
|
|
2
2
|
|
|
3
3
|
export type CommonAppearanceSettings = { [key in keyof CommonAppearanceProps]: boolean; };
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { componentBuilder } from "
|
|
3
|
-
import { TypographyComponentProps } from "./props";
|
|
2
|
+
import { componentBuilder } from "../utils/componentBuilder";
|
|
3
|
+
import { TypographyComponentProps } from "./props/props";
|
|
4
4
|
|
|
5
5
|
export const PageTitle: React.FC<TypographyComponentProps> = (props) =>
|
|
6
6
|
componentBuilder(props, "h1")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { twMerge } from "tailwind-merge";
|
|
2
|
-
import { BaseComponentProps, BreakpointProps, CenteredProps, CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, GapProps, HideProps, PositionProps, ReverseProps, ColProps, RowProps, TextAppearanceProps, TextDecorationProps, TextTransformProps, SizeProps } from "
|
|
3
|
-
import { fontFamilyClasses, fontStyleClasses, fontWeightClasses, textAppearanceClasses, textDecorationClasses, textTransformClasses } from "
|
|
4
|
-
import { CommonAppearanceSettings, FontFamilySettings, FontStyleSettings, FontWeightSettings, TextAppearanceSettings, TextDecorationSettings, TextTransformSettings, TypographySettings } from "
|
|
2
|
+
import { BaseComponentProps, BreakpointProps, CenteredProps, CommonAppearanceProps, FontFamilyProps, FontStyleProps, FontWeightProps, GapProps, HideProps, PositionProps, ReverseProps, ColProps, RowProps, TextAppearanceProps, TextDecorationProps, TextTransformProps, SizeProps } from "../ui/props/props";
|
|
3
|
+
import { fontFamilyClasses, fontStyleClasses, fontWeightClasses, textAppearanceClasses, textDecorationClasses, textTransformClasses } from "../ui/props/commonValues";
|
|
4
|
+
import { CommonAppearanceSettings, FontFamilySettings, FontStyleSettings, FontWeightSettings, TextAppearanceSettings, TextDecorationSettings, TextTransformSettings, TypographySettings } from "../ui/settings";
|
|
5
5
|
|
|
6
6
|
function getBooleanClass<T extends Record<string, boolean | undefined>>(
|
|
7
7
|
props: T,
|
package/tsconfig.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|