@kayord/ui 0.0.9 → 0.0.11

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/index.d.ts CHANGED
@@ -34,3 +34,4 @@ export { Tooltip } from "./components/ui/tooltip";
34
34
  export { Loader } from "./components/custom/loader";
35
35
  export { ThemeSwitch } from "./components/custom/theme-switch";
36
36
  export { kayordPlugin } from "./tailwind";
37
+ export type { ConfigOptions, CustomThemeConfig, ThemeConfig, ThemeProperties } from "./tailwind";
@@ -1 +1,2 @@
1
- export { default as kayordPlugin } from "./plugin";
1
+ export { kayordPlugin } from "./plugin";
2
+ export type { ConfigOptions, CustomThemeConfig, ThemeConfig, ThemeProperties } from "./types";
@@ -1,2 +1,2 @@
1
1
  // export { kayordPlugin } from "./plugin";
2
- export { default as kayordPlugin } from "./plugin";
2
+ export { kayordPlugin } from "./plugin";
@@ -1,5 +1,9 @@
1
+ import type { ConfigOptions } from "./types";
1
2
  declare const kayordPlugin: {
2
- handler: import("tailwindcss/types/config").PluginCreator;
3
- config?: Partial<import("tailwindcss").Config> | undefined;
3
+ (options: ConfigOptions): {
4
+ handler: import("tailwindcss/types/config").PluginCreator;
5
+ config?: Partial<import("tailwindcss").Config> | undefined;
6
+ };
7
+ __isOptionsFunction: true;
4
8
  };
5
- export default kayordPlugin;
9
+ export { kayordPlugin };
@@ -1,9 +1,18 @@
1
1
  import plugin from "tailwindcss/plugin";
2
- const kayordPlugin = plugin(function ({ addBase, theme }) {
3
- addBase({
4
- h1: { fontSize: theme("fontSize.2xl") },
5
- h2: { fontSize: theme("fontSize.xl") },
6
- h3: { fontSize: theme("fontSize.lg") },
7
- });
2
+ const coreConfig = {
3
+ theme: {
4
+ extend: {}
5
+ }
6
+ };
7
+ const kayordPlugin = plugin.withOptions(() => {
8
+ return ({ addBase, theme }) => {
9
+ addBase({
10
+ h1: { fontSize: theme("fontSize.2xl") },
11
+ h2: { fontSize: theme("fontSize.xl") },
12
+ h3: { fontSize: theme("fontSize.lg") },
13
+ });
14
+ };
15
+ }, () => {
16
+ return { ...coreConfig };
8
17
  });
9
- export default kayordPlugin;
18
+ export { kayordPlugin };
@@ -0,0 +1,97 @@
1
+ export type ConfigOptions = {
2
+ themes?: ThemeConfig;
3
+ };
4
+ export type ThemeConfig = {
5
+ custom?: Array<CustomThemeConfig>;
6
+ };
7
+ export type CustomThemeConfig = {
8
+ name: string;
9
+ properties: ThemeProperties;
10
+ properties_dark?: Partial<ThemeProperties>;
11
+ };
12
+ export type ThemeProperties = {
13
+ '--theme-font-family-base': string;
14
+ '--theme-font-family-heading': string;
15
+ '--theme-font-color-base': string;
16
+ '--theme-font-color-dark': string;
17
+ '--theme-rounded-base': string;
18
+ '--theme-rounded-container': string;
19
+ '--theme-border-base': string;
20
+ '--on-primary': string;
21
+ '--on-secondary': string;
22
+ '--on-tertiary': string;
23
+ '--on-success': string;
24
+ '--on-warning': string;
25
+ '--on-error': string;
26
+ '--on-surface': string;
27
+ '--color-primary-50': string;
28
+ '--color-primary-100': string;
29
+ '--color-primary-200': string;
30
+ '--color-primary-300': string;
31
+ '--color-primary-400': string;
32
+ '--color-primary-500': string;
33
+ '--color-primary-600': string;
34
+ '--color-primary-700': string;
35
+ '--color-primary-800': string;
36
+ '--color-primary-900': string;
37
+ '--color-secondary-50': string;
38
+ '--color-secondary-100': string;
39
+ '--color-secondary-200': string;
40
+ '--color-secondary-300': string;
41
+ '--color-secondary-400': string;
42
+ '--color-secondary-500': string;
43
+ '--color-secondary-600': string;
44
+ '--color-secondary-700': string;
45
+ '--color-secondary-800': string;
46
+ '--color-secondary-900': string;
47
+ '--color-tertiary-50': string;
48
+ '--color-tertiary-100': string;
49
+ '--color-tertiary-200': string;
50
+ '--color-tertiary-300': string;
51
+ '--color-tertiary-400': string;
52
+ '--color-tertiary-500': string;
53
+ '--color-tertiary-600': string;
54
+ '--color-tertiary-700': string;
55
+ '--color-tertiary-800': string;
56
+ '--color-tertiary-900': string;
57
+ '--color-success-50': string;
58
+ '--color-success-100': string;
59
+ '--color-success-200': string;
60
+ '--color-success-300': string;
61
+ '--color-success-400': string;
62
+ '--color-success-500': string;
63
+ '--color-success-600': string;
64
+ '--color-success-700': string;
65
+ '--color-success-800': string;
66
+ '--color-success-900': string;
67
+ '--color-warning-50': string;
68
+ '--color-warning-100': string;
69
+ '--color-warning-200': string;
70
+ '--color-warning-300': string;
71
+ '--color-warning-400': string;
72
+ '--color-warning-500': string;
73
+ '--color-warning-600': string;
74
+ '--color-warning-700': string;
75
+ '--color-warning-800': string;
76
+ '--color-warning-900': string;
77
+ '--color-error-50': string;
78
+ '--color-error-100': string;
79
+ '--color-error-200': string;
80
+ '--color-error-300': string;
81
+ '--color-error-400': string;
82
+ '--color-error-500': string;
83
+ '--color-error-600': string;
84
+ '--color-error-700': string;
85
+ '--color-error-800': string;
86
+ '--color-error-900': string;
87
+ '--color-surface-50': string;
88
+ '--color-surface-100': string;
89
+ '--color-surface-200': string;
90
+ '--color-surface-300': string;
91
+ '--color-surface-400': string;
92
+ '--color-surface-500': string;
93
+ '--color-surface-600': string;
94
+ '--color-surface-700': string;
95
+ '--color-surface-800': string;
96
+ '--color-surface-900': string;
97
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kayord/ui",
3
3
  "private": false,
4
- "version": "0.0.9",
4
+ "version": "0.0.11",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -22,32 +22,32 @@
22
22
  "formsnap": "^0.1.4",
23
23
  "lucide-svelte": "^0.284.0",
24
24
  "sveltekit-superforms": "^1.8.0",
25
- "zod": "^3.22.4",
26
25
  "tailwind-merge": "^1.14.0",
27
- "tailwind-variants": "^0.1.14"
26
+ "tailwind-variants": "^0.1.14",
27
+ "tailwindcss": "^3.3.3",
28
+ "zod": "^3.22.4"
28
29
  },
29
30
  "devDependencies": {
30
- "@playwright/test": "^1.28.1",
31
- "@sveltejs/adapter-auto": "^2.0.0",
32
- "@sveltejs/kit": "^1.20.4",
33
- "@sveltejs/package": "^2.0.0",
31
+ "@playwright/test": "^1.38.1",
32
+ "@sveltejs/adapter-auto": "^2.1.0",
33
+ "@sveltejs/kit": "^1.25.1",
34
+ "@sveltejs/package": "^2.2.2",
34
35
  "@tailwindcss/forms": "^0.5.6",
35
- "@typescript-eslint/eslint-plugin": "^6.0.0",
36
- "@typescript-eslint/parser": "^6.0.0",
37
- "autoprefixer": "^10.4.14",
38
- "eslint": "^8.28.0",
36
+ "@typescript-eslint/eslint-plugin": "^6.7.4",
37
+ "@typescript-eslint/parser": "^6.7.4",
38
+ "autoprefixer": "^10.4.16",
39
+ "eslint": "^8.50.0",
39
40
  "eslint-config-prettier": "^9.0.0",
40
- "eslint-plugin-svelte": "^2.30.0",
41
- "postcss": "^8.4.24",
41
+ "eslint-plugin-svelte": "^2.34.0",
42
+ "postcss": "^8.4.31",
42
43
  "postcss-load-config": "^4.0.1",
43
44
  "prettier": "^3.0.3",
44
45
  "prettier-plugin-svelte": "^3.0.3",
45
46
  "publint": "^0.2.3",
46
- "svelte": "^4.0.5",
47
- "svelte-check": "^3.4.3",
48
- "tailwindcss": "^3.3.2",
49
- "tslib": "^2.4.1",
50
- "typescript": "^5.0.0",
47
+ "svelte": "^4.2.1",
48
+ "svelte-check": "^3.5.2",
49
+ "tslib": "^2.6.2",
50
+ "typescript": "^5.2.2",
51
51
  "vite": "^4.4.11",
52
52
  "vitest": "^0.34.6"
53
53
  },