@pallamart/pm-design-system 1.0.1 → 2.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.
Files changed (44) hide show
  1. package/dist/constants/color/index.d.ts +1 -0
  2. package/dist/constants/color/index.js +1 -0
  3. package/dist/{color.d.ts → constants/color/pallamart-color.d.ts} +0 -1
  4. package/dist/{color.js → constants/color/pallamart-color.js} +0 -1
  5. package/dist/constants/index.d.ts +4 -0
  6. package/dist/constants/index.js +4 -0
  7. package/dist/constants/presets/index.d.ts +2 -0
  8. package/dist/constants/presets/index.js +2 -0
  9. package/dist/constants/presets/pallamart-external-tailwind-preset.d.ts +2 -0
  10. package/dist/{tailwind-preset.js → constants/presets/pallamart-external-tailwind-preset.js} +2 -2
  11. package/dist/{internal/tailwind-preset.js → constants/presets/pallamart-internal-tailwind-preset.js} +3 -2
  12. package/dist/constants/theme/index.d.ts +4 -0
  13. package/dist/constants/theme/index.js +4 -0
  14. package/dist/constants/theme/pallamart-font-size.d.ts +44 -0
  15. package/dist/constants/theme/pallamart-font-size.js +16 -0
  16. package/dist/{shared-tailwind-theme.d.ts → constants/theme/pallamart-motion.d.ts} +0 -69
  17. package/dist/{shared-tailwind-theme.js → constants/theme/pallamart-motion.js} +0 -33
  18. package/dist/constants/theme/pallamart-screens.d.ts +8 -0
  19. package/dist/constants/theme/pallamart-screens.js +8 -0
  20. package/dist/constants/theme/pallamart-shared-scale.d.ts +17 -0
  21. package/dist/constants/theme/pallamart-shared-scale.js +9 -0
  22. package/dist/constants/z-index/index.d.ts +1 -0
  23. package/dist/constants/z-index/index.js +1 -0
  24. package/dist/{z-index.d.ts → constants/z-index/pallamart-z-index.d.ts} +0 -1
  25. package/dist/{z-index.js → constants/z-index/pallamart-z-index.js} +0 -1
  26. package/dist/external/index.d.ts +3 -3
  27. package/dist/external/index.js +3 -3
  28. package/dist/index.d.ts +2 -3
  29. package/dist/index.js +2 -3
  30. package/dist/internal/index.d.ts +2 -2
  31. package/dist/internal/index.js +2 -2
  32. package/dist/services/index.d.ts +1 -0
  33. package/dist/services/index.js +1 -0
  34. package/dist/services/pallamart-class-name-service.d.ts +4 -0
  35. package/dist/services/pallamart-class-name-service.js +7 -0
  36. package/dist/styles/components/loaders/index.css +1 -0
  37. package/dist/styles/components/loaders/skeleton.css +40 -0
  38. package/package.json +18 -13
  39. package/dist/external/tailwind-preset.d.ts +0 -1
  40. package/dist/external/tailwind-preset.js +0 -1
  41. package/dist/styles/external/index/z-index.ts +0 -8
  42. package/dist/styles/index/z-index.ts +0 -8
  43. package/dist/tailwind-preset.d.ts +0 -2
  44. /package/dist/{internal/tailwind-preset.d.ts → constants/presets/pallamart-internal-tailwind-preset.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ export * from './pallamart-color.js';
@@ -0,0 +1 @@
1
+ export * from './pallamart-color.js';
@@ -16,4 +16,3 @@ export declare enum PallamartColor {
16
16
  Yellow = "#eab308",
17
17
  Green = "#559B60"
18
18
  }
19
- export { PallamartColor as Color };
@@ -17,4 +17,3 @@ export var PallamartColor;
17
17
  PallamartColor["Yellow"] = "#eab308";
18
18
  PallamartColor["Green"] = "#559B60";
19
19
  })(PallamartColor || (PallamartColor = {}));
20
- export { PallamartColor as Color };
@@ -0,0 +1,4 @@
1
+ export * from './color/index.js';
2
+ export * from './presets/index.js';
3
+ export * from './theme/index.js';
4
+ export * from './z-index/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './color/index.js';
2
+ export * from './presets/index.js';
3
+ export * from './theme/index.js';
4
+ export * from './z-index/index.js';
@@ -0,0 +1,2 @@
1
+ export * from './pallamart-external-tailwind-preset.js';
2
+ export * from './pallamart-internal-tailwind-preset.js';
@@ -0,0 +1,2 @@
1
+ export * from './pallamart-external-tailwind-preset.js';
2
+ export * from './pallamart-internal-tailwind-preset.js';
@@ -0,0 +1,2 @@
1
+ import type { Config } from 'tailwindcss';
2
+ export declare const PallamartExternalTailwindPreset: Partial<Config>;
@@ -1,5 +1,5 @@
1
- import { PallamartFontSize, PallamartMotion, PallamartScreens, PallamartSharedScale, } from './shared-tailwind-theme.js';
2
- export const PallamartTailwindPreset = {
1
+ import { PallamartFontSize, PallamartMotion, PallamartScreens, PallamartSharedScale, } from '../theme/index.js';
2
+ export const PallamartExternalTailwindPreset = {
3
3
  theme: {
4
4
  screens: PallamartScreens,
5
5
  extend: {
@@ -1,4 +1,5 @@
1
- import { PallamartFontSize, PallamartMotion, PallamartScreens, PallamartSharedScale, } from '../shared-tailwind-theme.js';
1
+ import tailwindAnimate from 'tailwindcss-animate';
2
+ import { PallamartFontSize, PallamartMotion, PallamartScreens, PallamartSharedScale, } from '../theme/index.js';
2
3
  export const PallamartInternalTailwindPreset = {
3
4
  theme: {
4
5
  screens: PallamartScreens,
@@ -82,5 +83,5 @@ export const PallamartInternalTailwindPreset = {
82
83
  ...PallamartMotion,
83
84
  },
84
85
  },
85
- plugins: [],
86
+ plugins: [tailwindAnimate],
86
87
  };
@@ -0,0 +1,4 @@
1
+ export * from './pallamart-font-size.js';
2
+ export * from './pallamart-motion.js';
3
+ export * from './pallamart-screens.js';
4
+ export * from './pallamart-shared-scale.js';
@@ -0,0 +1,4 @@
1
+ export * from './pallamart-font-size.js';
2
+ export * from './pallamart-motion.js';
3
+ export * from './pallamart-screens.js';
4
+ export * from './pallamart-shared-scale.js';
@@ -0,0 +1,44 @@
1
+ export declare const PallamartFontSize: {
2
+ 'header-0': [string, {
3
+ fontWeight: number;
4
+ }];
5
+ 'header-1': [string, {
6
+ fontWeight: number;
7
+ }];
8
+ 'header-1-regular': [string, {
9
+ fontWeight: number;
10
+ }];
11
+ 'keyboard-1': [string, {
12
+ fontWeight: number;
13
+ }];
14
+ 'body-1': [string, {
15
+ fontWeight: number;
16
+ }];
17
+ 'header-2': [string, {
18
+ fontWeight: number;
19
+ }];
20
+ 'header-2-regular': [string, {
21
+ fontWeight: number;
22
+ }];
23
+ 'body-2': [string, {
24
+ fontWeight: number;
25
+ }];
26
+ 'header-3': [string, {
27
+ fontWeight: number;
28
+ }];
29
+ 'header-3-regular': [string, {
30
+ fontWeight: number;
31
+ }];
32
+ 'body-3': [string, {
33
+ fontWeight: number;
34
+ }];
35
+ 'header-4': [string, {
36
+ fontWeight: number;
37
+ }];
38
+ 'header-4-regular': [string, {
39
+ fontWeight: number;
40
+ }];
41
+ 'body-4': [string, {
42
+ fontWeight: number;
43
+ }];
44
+ };
@@ -0,0 +1,16 @@
1
+ export const PallamartFontSize = {
2
+ 'header-0': ['86px', { fontWeight: 700 }],
3
+ 'header-1': ['40px', { fontWeight: 700 }],
4
+ 'header-1-regular': ['40px', { fontWeight: 400 }],
5
+ 'keyboard-1': ['21px', { fontWeight: 400 }],
6
+ 'body-1': ['18px', { fontWeight: 400 }],
7
+ 'header-2': ['28px', { fontWeight: 700 }],
8
+ 'header-2-regular': ['28px', { fontWeight: 400 }],
9
+ 'body-2': ['16px', { fontWeight: 400 }],
10
+ 'header-3': ['20px', { fontWeight: 600 }],
11
+ 'header-3-regular': ['20px', { fontWeight: 400 }],
12
+ 'body-3': ['12px', { fontWeight: 400 }],
13
+ 'header-4': ['16px', { fontWeight: 600 }],
14
+ 'header-4-regular': ['16px', { fontWeight: 400 }],
15
+ 'body-4': ['8px', { fontWeight: 400 }],
16
+ };
@@ -1,72 +1,3 @@
1
- export declare const PallamartScreens: {
2
- xs: string;
3
- sm: string;
4
- md: string;
5
- lg: string;
6
- xl: string;
7
- '2xl': string;
8
- };
9
- export declare const PallamartFontSize: {
10
- 'header-0': [string, {
11
- fontWeight: number;
12
- }];
13
- 'header-1': [string, {
14
- fontWeight: number;
15
- }];
16
- 'header-1-regular': [string, {
17
- fontWeight: number;
18
- }];
19
- 'keyboard-1': [string, {
20
- fontWeight: number;
21
- }];
22
- 'body-1': [string, {
23
- fontWeight: number;
24
- }];
25
- 'header-2': [string, {
26
- fontWeight: number;
27
- }];
28
- 'header-2-regular': [string, {
29
- fontWeight: number;
30
- }];
31
- 'body-2': [string, {
32
- fontWeight: number;
33
- }];
34
- 'header-3': [string, {
35
- fontWeight: number;
36
- }];
37
- 'header-3-regular': [string, {
38
- fontWeight: number;
39
- }];
40
- 'body-3': [string, {
41
- fontWeight: number;
42
- }];
43
- 'header-4': [string, {
44
- fontWeight: number;
45
- }];
46
- 'header-4-regular': [string, {
47
- fontWeight: number;
48
- }];
49
- 'body-4': [string, {
50
- fontWeight: number;
51
- }];
52
- };
53
- export declare const PallamartSharedScale: {
54
- height: {
55
- '168': string;
56
- };
57
- width: {
58
- '168': string;
59
- };
60
- maxHeight: {
61
- '168': string;
62
- };
63
- maxWidth: {
64
- '168': string;
65
- };
66
- transitionProperty: {
67
- move: string;
68
- };
69
- };
70
1
  export declare const PallamartMotion: {
71
2
  keyframes: {
72
3
  'fade-in': {
@@ -1,36 +1,3 @@
1
- export const PallamartScreens = {
2
- 'xs': '386px',
3
- 'sm': '480px',
4
- 'md': '768px',
5
- 'lg': '976px',
6
- 'xl': '1128px',
7
- '2xl': '1528px',
8
- };
9
- export const PallamartFontSize = {
10
- 'header-0': ['86px', { fontWeight: 700 }],
11
- 'header-1': ['40px', { fontWeight: 700 }],
12
- 'header-1-regular': ['40px', { fontWeight: 400 }],
13
- 'keyboard-1': ['21px', { fontWeight: 400 }],
14
- 'body-1': ['18px', { fontWeight: 400 }],
15
- 'header-2': ['28px', { fontWeight: 700 }],
16
- 'header-2-regular': ['28px', { fontWeight: 400 }],
17
- 'body-2': ['16px', { fontWeight: 400 }],
18
- 'header-3': ['20px', { fontWeight: 600 }],
19
- 'header-3-regular': ['20px', { fontWeight: 400 }],
20
- 'body-3': ['12px', { fontWeight: 400 }],
21
- 'header-4': ['16px', { fontWeight: 600 }],
22
- 'header-4-regular': ['16px', { fontWeight: 400 }],
23
- 'body-4': ['8px', { fontWeight: 400 }],
24
- };
25
- export const PallamartSharedScale = {
26
- height: { '168': '42rem' },
27
- width: { '168': '42rem' },
28
- maxHeight: { '168': '42rem' },
29
- maxWidth: { '168': '42rem' },
30
- transitionProperty: {
31
- move: 'left, right',
32
- },
33
- };
34
1
  export const PallamartMotion = {
35
2
  keyframes: {
36
3
  'fade-in': {
@@ -0,0 +1,8 @@
1
+ export declare const PallamartScreens: {
2
+ xs: string;
3
+ sm: string;
4
+ md: string;
5
+ lg: string;
6
+ xl: string;
7
+ '2xl': string;
8
+ };
@@ -0,0 +1,8 @@
1
+ export const PallamartScreens = {
2
+ 'xs': '386px',
3
+ 'sm': '480px',
4
+ 'md': '768px',
5
+ 'lg': '976px',
6
+ 'xl': '1128px',
7
+ '2xl': '1528px',
8
+ };
@@ -0,0 +1,17 @@
1
+ export declare const PallamartSharedScale: {
2
+ height: {
3
+ '168': string;
4
+ };
5
+ width: {
6
+ '168': string;
7
+ };
8
+ maxHeight: {
9
+ '168': string;
10
+ };
11
+ maxWidth: {
12
+ '168': string;
13
+ };
14
+ transitionProperty: {
15
+ move: string;
16
+ };
17
+ };
@@ -0,0 +1,9 @@
1
+ export const PallamartSharedScale = {
2
+ height: { '168': '42rem' },
3
+ width: { '168': '42rem' },
4
+ maxHeight: { '168': '42rem' },
5
+ maxWidth: { '168': '42rem' },
6
+ transitionProperty: {
7
+ move: 'left, right',
8
+ },
9
+ };
@@ -0,0 +1 @@
1
+ export * from './pallamart-z-index.js';
@@ -0,0 +1 @@
1
+ export * from './pallamart-z-index.js';
@@ -6,4 +6,3 @@ export declare enum PallamartZIndex {
6
6
  LayerModal = "z-30",
7
7
  ModalOverlay = "z-[39]"
8
8
  }
9
- export { PallamartZIndex as ZIndex };
@@ -7,4 +7,3 @@ export var PallamartZIndex;
7
7
  PallamartZIndex["LayerModal"] = "z-30";
8
8
  PallamartZIndex["ModalOverlay"] = "z-[39]";
9
9
  })(PallamartZIndex || (PallamartZIndex = {}));
10
- export { PallamartZIndex as ZIndex };
@@ -1,3 +1,3 @@
1
- export * from '../color.js';
2
- export * from '../tailwind-preset.js';
3
- export * from '../z-index.js';
1
+ export * from '../constants/color/index.js';
2
+ export * from '../constants/presets/pallamart-external-tailwind-preset.js';
3
+ export * from '../constants/z-index/index.js';
@@ -1,3 +1,3 @@
1
- export * from '../color.js';
2
- export * from '../tailwind-preset.js';
3
- export * from '../z-index.js';
1
+ export * from '../constants/color/index.js';
2
+ export * from '../constants/presets/pallamart-external-tailwind-preset.js';
3
+ export * from '../constants/z-index/index.js';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export * from './color.js';
2
- export * from './tailwind-preset.js';
3
- export * from './z-index.js';
1
+ export * from './constants/index.js';
2
+ export * from './services/index.js';
package/dist/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export * from './color.js';
2
- export * from './tailwind-preset.js';
3
- export * from './z-index.js';
1
+ export * from './constants/index.js';
2
+ export * from './services/index.js';
@@ -1,2 +1,2 @@
1
- export * from '../z-index.js';
2
- export * from './tailwind-preset.js';
1
+ export * from '../constants/presets/pallamart-internal-tailwind-preset.js';
2
+ export * from '../constants/z-index/index.js';
@@ -1,2 +1,2 @@
1
- export * from '../z-index.js';
2
- export * from './tailwind-preset.js';
1
+ export * from '../constants/presets/pallamart-internal-tailwind-preset.js';
2
+ export * from '../constants/z-index/index.js';
@@ -0,0 +1 @@
1
+ export * from './pallamart-class-name-service.js';
@@ -0,0 +1 @@
1
+ export * from './pallamart-class-name-service.js';
@@ -0,0 +1,4 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare class PallamartClassNameService {
3
+ static merge(...classNames: ClassValue[]): string;
4
+ }
@@ -0,0 +1,7 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ export class PallamartClassNameService {
4
+ static merge(...classNames) {
5
+ return twMerge(clsx(classNames));
6
+ }
7
+ }
@@ -1,2 +1,3 @@
1
1
  @import url('dot-loader-dark.css');
2
2
  @import url('dot-loader.css');
3
+ @import url('skeleton.css');
@@ -0,0 +1,40 @@
1
+ .pm-skeleton {
2
+ background: color-mix(in oklch, var(--foreground) 10%, transparent);
3
+ display: block;
4
+ isolation: isolate;
5
+ overflow: hidden;
6
+ position: relative;
7
+ }
8
+
9
+ .pm-skeleton::after {
10
+ animation: pm-skeleton-sweep 1.4s linear infinite;
11
+ background: linear-gradient(
12
+ 90deg,
13
+ transparent 0%,
14
+ color-mix(in oklch, var(--foreground) 12%, transparent) 50%,
15
+ transparent 100%
16
+ );
17
+ content: '';
18
+ inset: 0;
19
+ position: absolute;
20
+ transform: translate3d(-100%, 0, 0);
21
+ will-change: transform;
22
+ }
23
+
24
+ @keyframes pm-skeleton-sweep {
25
+ 0% {
26
+ transform: translate3d(-100%, 0, 0);
27
+ }
28
+
29
+ 100% {
30
+ transform: translate3d(100%, 0, 0);
31
+ }
32
+ }
33
+
34
+ @media (prefers-reduced-motion: reduce) {
35
+ .pm-skeleton::after {
36
+ animation: none;
37
+ opacity: 0.5;
38
+ transform: none;
39
+ }
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pallamart/pm-design-system",
3
- "version": "1.0.1",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,14 +12,14 @@
12
12
  "default": "./dist/index.js"
13
13
  },
14
14
  "./tailwind-preset": {
15
- "types": "./dist/tailwind-preset.d.ts",
16
- "import": "./dist/tailwind-preset.js",
17
- "default": "./dist/tailwind-preset.js"
15
+ "types": "./dist/constants/presets/pallamart-external-tailwind-preset.d.ts",
16
+ "import": "./dist/constants/presets/pallamart-external-tailwind-preset.js",
17
+ "default": "./dist/constants/presets/pallamart-external-tailwind-preset.js"
18
18
  },
19
19
  "./shared-tailwind-theme": {
20
- "types": "./dist/shared-tailwind-theme.d.ts",
21
- "import": "./dist/shared-tailwind-theme.js",
22
- "default": "./dist/shared-tailwind-theme.js"
20
+ "types": "./dist/constants/theme/index.d.ts",
21
+ "import": "./dist/constants/theme/index.js",
22
+ "default": "./dist/constants/theme/index.js"
23
23
  },
24
24
  "./styles.css": "./dist/styles/index.css",
25
25
  "./external": {
@@ -28,9 +28,9 @@
28
28
  "default": "./dist/external/index.js"
29
29
  },
30
30
  "./external/tailwind-preset": {
31
- "types": "./dist/external/tailwind-preset.d.ts",
32
- "import": "./dist/external/tailwind-preset.js",
33
- "default": "./dist/external/tailwind-preset.js"
31
+ "types": "./dist/constants/presets/pallamart-external-tailwind-preset.d.ts",
32
+ "import": "./dist/constants/presets/pallamart-external-tailwind-preset.js",
33
+ "default": "./dist/constants/presets/pallamart-external-tailwind-preset.js"
34
34
  },
35
35
  "./external/styles.css": "./dist/styles/external.css",
36
36
  "./internal": {
@@ -39,9 +39,9 @@
39
39
  "default": "./dist/internal/index.js"
40
40
  },
41
41
  "./internal/tailwind-preset": {
42
- "types": "./dist/internal/tailwind-preset.d.ts",
43
- "import": "./dist/internal/tailwind-preset.js",
44
- "default": "./dist/internal/tailwind-preset.js"
42
+ "types": "./dist/constants/presets/pallamart-internal-tailwind-preset.d.ts",
43
+ "import": "./dist/constants/presets/pallamart-internal-tailwind-preset.js",
44
+ "default": "./dist/constants/presets/pallamart-internal-tailwind-preset.js"
45
45
  },
46
46
  "./internal/styles.css": "./dist/styles/internal.css"
47
47
  },
@@ -99,5 +99,10 @@
99
99
  "repository": {
100
100
  "type": "git",
101
101
  "url": "git+https://github.com/pallamart/pm-design-system.git"
102
+ },
103
+ "dependencies": {
104
+ "clsx": "^2.1.1",
105
+ "tailwind-merge": "^2.6.1",
106
+ "tailwindcss-animate": "^1.0.7"
102
107
  }
103
108
  }
@@ -1 +0,0 @@
1
- export { PallamartTailwindPreset, PallamartTailwindPreset as PallamartExternalTailwindPreset, } from '../tailwind-preset.js';
@@ -1 +0,0 @@
1
- export { PallamartTailwindPreset, PallamartTailwindPreset as PallamartExternalTailwindPreset, } from '../tailwind-preset.js';
@@ -1,8 +0,0 @@
1
- export enum ZIndex {
2
- LayerBase = 'z-0',
3
- LayerUpperBase = 'z-10',
4
- LayerBaseHeader = 'z-20',
5
- BaseOverlay = 'z-[29]',
6
- LayerModal = 'z-30',
7
- ModalOverlay = 'z-[39]',
8
- }
@@ -1,8 +0,0 @@
1
- export enum ZIndex {
2
- LayerBase = 'z-0',
3
- LayerUpperBase = 'z-10',
4
- LayerBaseHeader = 'z-20',
5
- BaseOverlay = 'z-[29]',
6
- LayerModal = 'z-30',
7
- ModalOverlay = 'z-[39]',
8
- }
@@ -1,2 +0,0 @@
1
- import type { Config } from 'tailwindcss';
2
- export declare const PallamartTailwindPreset: Partial<Config>;