@pylerai/design-system 1.2.3 → 2.0.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 (50) hide show
  1. package/README.md +169 -316
  2. package/dist/components/ui/badge.d.ts +2 -1
  3. package/dist/components/ui/badge.js +49 -0
  4. package/dist/components/ui/body.js +52 -0
  5. package/dist/components/ui/button.d.ts +2 -1
  6. package/dist/components/ui/button.js +172 -0
  7. package/dist/components/ui/calendar.js +275 -0
  8. package/dist/components/ui/checkbox.d.ts +7 -0
  9. package/dist/components/ui/checkbox.js +45 -0
  10. package/dist/components/ui/chip.d.ts +4 -3
  11. package/dist/components/ui/chip.js +66 -0
  12. package/dist/components/ui/dropdown.d.ts +8 -2
  13. package/dist/components/ui/dropdown.js +256 -0
  14. package/dist/components/ui/headline.js +50 -0
  15. package/dist/components/ui/input.d.ts +3 -2
  16. package/dist/components/ui/input.js +129 -0
  17. package/dist/components/ui/label.js +43 -0
  18. package/dist/components/ui/loading-bar.d.ts +2 -1
  19. package/dist/components/ui/loading-bar.js +64 -0
  20. package/dist/components/ui/modal.d.ts +3 -2
  21. package/dist/components/ui/modal.js +170 -0
  22. package/dist/components/ui/pagination.d.ts +2 -0
  23. package/dist/components/ui/pagination.js +106 -0
  24. package/dist/components/ui/radio.d.ts +7 -0
  25. package/dist/components/ui/radio.js +42 -0
  26. package/dist/components/ui/search-field.d.ts +3 -2
  27. package/dist/components/ui/search-field.js +98 -0
  28. package/dist/components/ui/table.js +206 -0
  29. package/dist/components/ui/tabs.js +149 -0
  30. package/dist/components/ui/tag.d.ts +2 -1
  31. package/dist/components/ui/tag.js +31 -0
  32. package/dist/components/ui/tips.d.ts +2 -1
  33. package/dist/components/ui/tips.js +25 -0
  34. package/dist/components/ui/toast.js +70 -0
  35. package/dist/components/ui/toggle.d.ts +1 -2
  36. package/dist/components/ui/toggle.js +41 -0
  37. package/dist/components/ui/use-modal.js +94 -0
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.js +75 -5769
  40. package/dist/lib/icons.js +225 -0
  41. package/dist/lib/size.d.ts +8 -0
  42. package/dist/lib/use-dialog-a11y.d.ts +2 -0
  43. package/dist/lib/use-dialog-a11y.js +50 -0
  44. package/dist/lib/utils.js +16 -0
  45. package/dist/style.css +1 -1
  46. package/dist/tokens/pyler-light.js +134 -0
  47. package/dist/tokens/typography.js +84 -0
  48. package/package.json +14 -1
  49. package/pyler-tailwind-colors.cjs +4 -0
  50. package/dist/index.css.d.ts +0 -0
@@ -0,0 +1,134 @@
1
+ "use client";
2
+ const g = [
3
+ "primitive",
4
+ "main",
5
+ "background",
6
+ "text",
7
+ "line",
8
+ "surface",
9
+ "primary",
10
+ "category",
11
+ "icon"
12
+ ];
13
+ function c(e) {
14
+ return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
15
+ }
16
+ function a(e) {
17
+ return e.split(".").map(c).join("-");
18
+ }
19
+ function s(e) {
20
+ return `--ds-${a(e)}`;
21
+ }
22
+ function l(e) {
23
+ return `bg-ds-${a(e)}`;
24
+ }
25
+ function F(e) {
26
+ return typeof e == "object" && e !== null && "hex" in e && typeof e.hex == "string";
27
+ }
28
+ function i(e, o, r) {
29
+ if (F(e)) {
30
+ const t = o.join("."), n = o[0];
31
+ return [
32
+ {
33
+ path: t,
34
+ hex: e.hex,
35
+ cssVar: s(t),
36
+ tailwindBg: l(t),
37
+ group: n,
38
+ figmaKey: r == null ? void 0 : r.get(t)
39
+ }
40
+ ];
41
+ }
42
+ return Object.entries(e).flatMap(
43
+ ([t, n]) => i(n, [...o, t], r)
44
+ );
45
+ }
46
+ const h = {
47
+ primitive: {
48
+ black: { hex: "#121212" },
49
+ white: { hex: "#FFFFFF" }
50
+ },
51
+ main: {
52
+ default: { hex: "#2C80F5" }
53
+ },
54
+ background: {
55
+ default: { hex: "#FFFFFF" }
56
+ },
57
+ text: {
58
+ strong: { hex: "#333333" },
59
+ normal: { hex: "#969696" },
60
+ disabled: { hex: "#CCCCCC" }
61
+ },
62
+ line: {
63
+ strong: { hex: "#E2E2E2" },
64
+ normal: { hex: "#EBEBEB" }
65
+ },
66
+ surface: {
67
+ strong: { hex: "#F5F5F5" },
68
+ normal: { hex: "#F7F8F9" },
69
+ alternative: { hex: "#FFFFFF" }
70
+ },
71
+ primary: {
72
+ "blue-normal": { hex: "#2C80F5" },
73
+ "blue-hovered": { hex: "#0B64E2" },
74
+ "blue-disabled": { hex: "#D2E5FD" },
75
+ "blue-muted": { hex: "#F4F9FE" },
76
+ "red-normal": { hex: "#FF4242" },
77
+ "red-hovered": { hex: "#E60D0D" },
78
+ "red-disabled": { hex: "#FFDCDC" },
79
+ "red-muted": { hex: "#FFF7F7" },
80
+ "green-normal": { hex: "#0BC753" },
81
+ "green-hovered": { hex: "#00A13E" },
82
+ "green-disabled": { hex: "#B4ECD1" },
83
+ "green-muted": { hex: "#F4FBF7" }
84
+ },
85
+ category: {
86
+ sexual: { hex: "#FF6355" },
87
+ violence: { hex: "#C06528" },
88
+ hate: { hex: "#6554C0" },
89
+ politics: { hex: "#0B945A" },
90
+ controversy: { hex: "#0098B2" },
91
+ talk: { hex: "#2B70E4" },
92
+ overseas: { hex: "#E63FE1" },
93
+ religion: { hex: "#FFC400" },
94
+ custom: { hex: "#58CF04" },
95
+ sensitive: { hex: "#CC3D00" },
96
+ issue: { hex: "#00B8D9" }
97
+ },
98
+ icon: {
99
+ strong: { hex: "#333333" },
100
+ normal: { hex: "#969696" },
101
+ disabled: { hex: "#CCCCCC" }
102
+ }
103
+ }, x = /* @__PURE__ */ new Map([
104
+ ["category.sexual", "Sexual"],
105
+ ["category.violence", "Violence"],
106
+ ["category.hate", "Hate"],
107
+ ["category.politics", "Politics"],
108
+ ["category.controversy", "Controversy"],
109
+ ["category.talk", "Talk"],
110
+ ["category.overseas", "Overseas"],
111
+ ["category.religion", "Religion"],
112
+ ["category.custom", "Custom"],
113
+ ["category.sensitive", "Sensitive"],
114
+ ["category.issue", "Issue"]
115
+ ]), C = i(
116
+ h,
117
+ [],
118
+ x
119
+ );
120
+ function u(e) {
121
+ return s(e);
122
+ }
123
+ const d = u;
124
+ function b(e) {
125
+ return a(e);
126
+ }
127
+ export {
128
+ h as PYLER_LIGHT_COLOR_TOKENS,
129
+ g as PYLER_LIGHT_GROUP_ORDER,
130
+ C as flatPylerLightTokens,
131
+ b as formatPylerPathForDisplay,
132
+ u as getDsCssVar,
133
+ d as getPylerCssVar
134
+ };
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ const t = {
3
+ title1Sb: {
4
+ fontFamily: "var(--ds-font-sans)",
5
+ fontSize: "var(--ds-type-title-1-sb-font-size)",
6
+ lineHeight: "var(--ds-type-title-1-sb-line-height)",
7
+ fontWeight: "var(--ds-type-title-1-sb-font-weight)"
8
+ },
9
+ title1M: {
10
+ fontFamily: "var(--ds-font-sans)",
11
+ fontSize: "var(--ds-type-title-1-m-font-size)",
12
+ lineHeight: "var(--ds-type-title-1-m-line-height)",
13
+ fontWeight: "var(--ds-type-title-1-m-font-weight)"
14
+ },
15
+ title2Sb: {
16
+ fontFamily: "var(--ds-font-sans)",
17
+ fontSize: "var(--ds-type-title-2-sb-font-size)",
18
+ lineHeight: "var(--ds-type-title-2-sb-line-height)",
19
+ fontWeight: "var(--ds-type-title-2-sb-font-weight)"
20
+ },
21
+ body1M: {
22
+ fontFamily: "var(--ds-font-sans)",
23
+ fontSize: "var(--ds-type-body-1-m-font-size)",
24
+ lineHeight: "var(--ds-type-body-1-m-line-height)",
25
+ fontWeight: "var(--ds-type-body-1-m-font-weight)"
26
+ },
27
+ body1R: {
28
+ fontFamily: "var(--ds-font-sans)",
29
+ fontSize: "var(--ds-type-body-1-r-font-size)",
30
+ lineHeight: "var(--ds-type-body-1-r-line-height)",
31
+ fontWeight: "var(--ds-type-body-1-r-font-weight)"
32
+ },
33
+ body2Sb: {
34
+ fontFamily: "var(--ds-font-sans)",
35
+ fontSize: "var(--ds-type-body-2-sb-font-size)",
36
+ lineHeight: "var(--ds-type-body-2-sb-line-height)",
37
+ fontWeight: "var(--ds-type-body-2-sb-font-weight)"
38
+ },
39
+ body2M: {
40
+ fontFamily: "var(--ds-font-sans)",
41
+ fontSize: "var(--ds-type-body-2-m-font-size)",
42
+ lineHeight: "var(--ds-type-body-2-m-line-height)",
43
+ fontWeight: "var(--ds-type-body-2-m-font-weight)"
44
+ },
45
+ body2R: {
46
+ fontFamily: "var(--ds-font-sans)",
47
+ fontSize: "var(--ds-type-body-2-r-font-size)",
48
+ lineHeight: "var(--ds-type-body-2-r-line-height)",
49
+ fontWeight: "var(--ds-type-body-2-r-font-weight)"
50
+ },
51
+ body3M: {
52
+ fontFamily: "var(--ds-font-sans)",
53
+ fontSize: "var(--ds-type-body-3-m-font-size)",
54
+ lineHeight: "var(--ds-type-body-3-m-line-height)",
55
+ fontWeight: "var(--ds-type-body-3-m-font-weight)"
56
+ },
57
+ body3R: {
58
+ fontFamily: "var(--ds-font-sans)",
59
+ fontSize: "var(--ds-type-body-3-r-font-size)",
60
+ lineHeight: "var(--ds-type-body-3-r-line-height)",
61
+ fontWeight: "var(--ds-type-body-3-r-font-weight)"
62
+ },
63
+ body4M: {
64
+ fontFamily: "var(--ds-font-sans)",
65
+ fontSize: "var(--ds-type-body-4-m-font-size)",
66
+ lineHeight: "var(--ds-type-body-4-m-line-height)",
67
+ fontWeight: "var(--ds-type-body-4-m-font-weight)"
68
+ },
69
+ body4R: {
70
+ fontFamily: "var(--ds-font-sans)",
71
+ fontSize: "var(--ds-type-body-4-r-font-size)",
72
+ lineHeight: "var(--ds-type-body-4-r-line-height)",
73
+ fontWeight: "var(--ds-type-body-4-r-font-weight)"
74
+ },
75
+ label1R: {
76
+ fontFamily: "var(--ds-font-sans)",
77
+ fontSize: "var(--ds-type-label-1-r-font-size)",
78
+ lineHeight: "var(--ds-type-label-1-r-line-height)",
79
+ fontWeight: "var(--ds-type-label-1-r-font-weight)"
80
+ }
81
+ };
82
+ export {
83
+ t as PYLER_TYPOGRAPHY_STYLE
84
+ };
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@pylerai/design-system",
3
- "version": "1.2.3",
3
+ "version": "2.0.0",
4
4
  "description": "design-system for pyler frontend",
5
5
  "type": "module",
6
+ "sideEffects": [
7
+ "**/*.css"
8
+ ],
6
9
  "main": "./dist/index.js",
7
10
  "types": "./dist/index.d.ts",
8
11
  "exports": {
@@ -27,6 +30,8 @@
27
30
  "build": "vite build",
28
31
  "preview": "vite preview",
29
32
  "test": "vitest run",
33
+ "check:tokens": "node scripts/check-tokens.cjs",
34
+ "lint": "eslint . --max-warnings 0",
30
35
  "storybook": "storybook dev -p 6006",
31
36
  "build-storybook": "storybook build",
32
37
  "publish:npm": "npm run build && npm publish --access public"
@@ -59,6 +64,7 @@
59
64
  },
60
65
  "devDependencies": {
61
66
  "@chromatic-com/storybook": "^4.1.1",
67
+ "@eslint/js": "^9.39.5",
62
68
  "@storybook/addon-a11y": "^9.1.15",
63
69
  "@storybook/addon-docs": "^9.1.15",
64
70
  "@storybook/addon-onboarding": "^9.1.15",
@@ -72,6 +78,12 @@
72
78
  "@vitest/coverage-v8": "^4.0.4",
73
79
  "autoprefixer": "^10.4.16",
74
80
  "dotenv-cli": "^8.0.0",
81
+ "esbuild": "^0.21.5",
82
+ "eslint": "^9.39.5",
83
+ "eslint-plugin-jsx-a11y": "^6.10.2",
84
+ "eslint-plugin-react-hooks": "^5.2.0",
85
+ "eslint-plugin-storybook": "^9.1.20",
86
+ "globals": "^15.15.0",
75
87
  "playwright": "^1.56.1",
76
88
  "postcss": "^8.4.32",
77
89
  "react": "^18.2.0",
@@ -80,6 +92,7 @@
80
92
  "tailwindcss": "^3.4.0",
81
93
  "tailwindcss-animate": "^1.0.7",
82
94
  "typescript": "^5.3.3",
95
+ "typescript-eslint": "^8.66.0",
83
96
  "vite": "^5.0.11",
84
97
  "vite-plugin-dts": "^4.5.4",
85
98
  "vitest": "^4.0.4"
@@ -15,6 +15,10 @@ module.exports = {
15
15
  background: {
16
16
  default: "var(--ds-background-default)",
17
17
  },
18
+ // Figma Foundation/Dim — 값이 rgba라 pyler-light.ts(HEX 전용)에는 없다
19
+ dim: {
20
+ default: "var(--ds-dim-default)",
21
+ },
18
22
  text: {
19
23
  strong: "var(--ds-text-strong)",
20
24
  normal: "var(--ds-text-normal)",
File without changes