@cieloazul310/digital-go-pandacss-plugin 0.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.
@@ -0,0 +1,6 @@
1
+ import libraryConfig from "@repo/eslint-config/library";
2
+
3
+ /**
4
+ * @type {import("eslint").Linter.Config}
5
+ */
6
+ export default [...libraryConfig];
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@cieloazul310/digital-go-pandacss-plugin",
3
+ "version": "0.0.0",
4
+ "license": "MIT",
5
+ "homepage": "https://github.com/cieloazul310/digital-go-design-system-with-panda",
6
+ "author": {
7
+ "name": "cieloazul310",
8
+ "url": "https://cieloazul310.github.io"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/cieloazul310/digital-go-design-system-with-panda.git",
13
+ "directory": "packages/preset-base"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "registry": "https://registry.npmjs.org/"
18
+ },
19
+ "types": "./dist/index.d.ts",
20
+ "main": "./dist/index.js",
21
+ "exports": {
22
+ ".": {
23
+ "source": "./src/index.ts",
24
+ "types": "./dist/index.d.ts",
25
+ "import": {
26
+ "types": "./dist/index.d.mts",
27
+ "default": "./dist/index.mjs"
28
+ },
29
+ "require": "./dist/index.js"
30
+ }
31
+ },
32
+ "scripts": {
33
+ "build": "tsup",
34
+ "dev": "npm run build -- --watch",
35
+ "eslint": "eslint src --fix",
36
+ "format": "prettier --parser typescript --write ."
37
+ },
38
+ "dependencies": {
39
+ "@cieloazul310/digital-go-pandacss-utils": "^0.0.0",
40
+ "@digital-go-jp/design-tokens": "^1.1.0"
41
+ },
42
+ "devDependencies": {
43
+ "@pandacss/dev": "^0.53.7",
44
+ "@repo/eslint-config": "^0.0.0",
45
+ "@repo/typescript-config": "^0.0.0",
46
+ "eslint": "^9.28.0",
47
+ "tsup": "8.5.0",
48
+ "typescript": "5.8.3"
49
+ },
50
+ "lint-staged": {
51
+ "**/*.{js,mjs,cjs,tsx,ts,tsx}": [
52
+ "eslint --fix",
53
+ "prettier --parser typescript --write"
54
+ ]
55
+ }
56
+ }
@@ -0,0 +1,7 @@
1
+ import { defineGlobalStyles } from "@pandacss/dev";
2
+
3
+ export default defineGlobalStyles({
4
+ html: {
5
+ fontSmoothing: "auto",
6
+ },
7
+ });
package/src/index.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { definePreset } from "@pandacss/dev";
2
+ import semanticTokens from "./semanticTokens";
3
+ import textStyles from "./textStyles";
4
+ import tokens from "./tokens";
5
+ import utilities from "./utilities";
6
+ import globalCss from "./globalCss";
7
+
8
+ const preset = definePreset({
9
+ name: "digital-go",
10
+ theme: {
11
+ extend: {
12
+ textStyles,
13
+ semanticTokens,
14
+ tokens,
15
+ },
16
+ },
17
+ utilities,
18
+ globalCss,
19
+ });
20
+
21
+ export default preset;
@@ -0,0 +1,8 @@
1
+ import { createKeyColor } from "@cieloazul310/digital-go-pandacss-utils";
2
+
3
+ const colors = {
4
+ keyColor: createKeyColor("blue"),
5
+ ring: { value: "{colors.yellow.300}" },
6
+ };
7
+
8
+ export default colors;
@@ -0,0 +1,10 @@
1
+ import { defineSemanticTokens } from "@pandacss/dev";
2
+ import colors from "./colors";
3
+
4
+ export default defineSemanticTokens({
5
+ colors,
6
+ fontWeights: {
7
+ N: { value: "{fontWeights.400}", description: "400 (normal)" },
8
+ B: { value: "{fontWeights.700}", description: "700 (bold)" },
9
+ },
10
+ });
@@ -0,0 +1,383 @@
1
+ import { defineTextStyles } from "@pandacss/dev";
2
+
3
+ type TextStylesMap = Record<
4
+ string,
5
+ {
6
+ fontFamily: string;
7
+ description: string;
8
+ variants: {
9
+ fontSize: number;
10
+ fontWeight: string;
11
+ lineHeight: number;
12
+ letterSpacing?: number;
13
+ }[];
14
+ }
15
+ >;
16
+
17
+ const textStylesMap: TextStylesMap = {
18
+ dsp: {
19
+ fontFamily: "body",
20
+ description:
21
+ "Displayテキストは、主に冒頭で大きく掲出されるテキストやメッセージを伝えるヘッドコピーなど、視覚的なインパクトを強く与えたい場合に使用されます。",
22
+ variants: [
23
+ /** Display(Dsp) Bold */
24
+ {
25
+ fontSize: 64,
26
+ fontWeight: "B",
27
+ lineHeight: 140,
28
+ },
29
+ {
30
+ fontSize: 57,
31
+ fontWeight: "B",
32
+ lineHeight: 140,
33
+ },
34
+ {
35
+ fontSize: 48,
36
+ fontWeight: "B",
37
+ lineHeight: 140,
38
+ },
39
+ /** Display(Dsp) Normal */
40
+ {
41
+ fontSize: 64,
42
+ fontWeight: "N",
43
+ lineHeight: 140,
44
+ },
45
+ {
46
+ fontSize: 57,
47
+ fontWeight: "N",
48
+ lineHeight: 140,
49
+ },
50
+ {
51
+ fontSize: 48,
52
+ fontWeight: "N",
53
+ lineHeight: 140,
54
+ },
55
+ ],
56
+ },
57
+ std: {
58
+ fontFamily: "body",
59
+ description:
60
+ "Standardテキストは、ページの文書構造を形成する見出しや本文など、多くの要素において最も使用される普遍的なテキストスタイルです。",
61
+ variants: [
62
+ /** Standard(Std) Bold */
63
+ {
64
+ fontSize: 45,
65
+ fontWeight: "B",
66
+ lineHeight: 140,
67
+ },
68
+ {
69
+ fontSize: 36,
70
+ fontWeight: "B",
71
+ lineHeight: 140,
72
+ letterSpacing: 0.01,
73
+ },
74
+ {
75
+ fontSize: 32,
76
+ fontWeight: "B",
77
+ lineHeight: 150,
78
+ letterSpacing: 0.01,
79
+ },
80
+ {
81
+ fontSize: 28,
82
+ fontWeight: "B",
83
+ lineHeight: 150,
84
+ letterSpacing: 0.01,
85
+ },
86
+ {
87
+ fontSize: 24,
88
+ fontWeight: "B",
89
+ lineHeight: 150,
90
+ letterSpacing: 0.02,
91
+ },
92
+ {
93
+ fontSize: 22,
94
+ fontWeight: "B",
95
+ lineHeight: 150,
96
+ letterSpacing: 0.02,
97
+ },
98
+ {
99
+ fontSize: 20,
100
+ fontWeight: "B",
101
+ lineHeight: 150,
102
+ letterSpacing: 0.02,
103
+ },
104
+ {
105
+ fontSize: 18,
106
+ fontWeight: "B",
107
+ lineHeight: 160,
108
+ letterSpacing: 0.02,
109
+ },
110
+ {
111
+ fontSize: 17,
112
+ fontWeight: "B",
113
+ lineHeight: 170,
114
+ letterSpacing: 0.02,
115
+ },
116
+ {
117
+ fontSize: 16,
118
+ fontWeight: "B",
119
+ lineHeight: 170,
120
+ letterSpacing: 0.02,
121
+ },
122
+ {
123
+ fontSize: 16,
124
+ fontWeight: "B",
125
+ lineHeight: 175,
126
+ letterSpacing: 0.02,
127
+ },
128
+ /** Standard(Std) Normal */
129
+ {
130
+ fontSize: 45,
131
+ fontWeight: "N",
132
+ lineHeight: 140,
133
+ },
134
+ {
135
+ fontSize: 36,
136
+ fontWeight: "N",
137
+ lineHeight: 140,
138
+ letterSpacing: 0.01,
139
+ },
140
+ {
141
+ fontSize: 32,
142
+ fontWeight: "N",
143
+ lineHeight: 150,
144
+ letterSpacing: 0.01,
145
+ },
146
+ {
147
+ fontSize: 28,
148
+ fontWeight: "N",
149
+ lineHeight: 150,
150
+ letterSpacing: 0.01,
151
+ },
152
+ {
153
+ fontSize: 26,
154
+ fontWeight: "N",
155
+ lineHeight: 150,
156
+ letterSpacing: 0.02,
157
+ },
158
+ {
159
+ fontSize: 24,
160
+ fontWeight: "N",
161
+ lineHeight: 150,
162
+ letterSpacing: 0.02,
163
+ },
164
+ {
165
+ fontSize: 22,
166
+ fontWeight: "N",
167
+ lineHeight: 150,
168
+ letterSpacing: 0.02,
169
+ },
170
+ {
171
+ fontSize: 20,
172
+ fontWeight: "N",
173
+ lineHeight: 150,
174
+ letterSpacing: 0.02,
175
+ },
176
+ {
177
+ fontSize: 18,
178
+ fontWeight: "N",
179
+ lineHeight: 160,
180
+ letterSpacing: 0.02,
181
+ },
182
+ {
183
+ fontSize: 17,
184
+ fontWeight: "N",
185
+ lineHeight: 170,
186
+ letterSpacing: 0.02,
187
+ },
188
+ {
189
+ fontSize: 16,
190
+ fontWeight: "N",
191
+ lineHeight: 170,
192
+ letterSpacing: 0.02,
193
+ },
194
+ {
195
+ fontSize: 16,
196
+ fontWeight: "N",
197
+ lineHeight: 175,
198
+ letterSpacing: 0.02,
199
+ },
200
+ ],
201
+ },
202
+ dns: {
203
+ fontFamily: "body",
204
+ description:
205
+ "Denseテキストは管理画面や業務システムなど、限られた画面領域での表示情報量を優先したテキストスタイルです。たとえば、データテーブル内での情報提示など、表示領域に制約がある場合のテキストスタイルとして使用します。",
206
+ variants: [
207
+ /** Dense(Dns) Bold */
208
+ {
209
+ fontSize: 17,
210
+ fontWeight: "B",
211
+ lineHeight: 130,
212
+ },
213
+ {
214
+ fontSize: 17,
215
+ fontWeight: "B",
216
+ lineHeight: 120,
217
+ },
218
+ {
219
+ fontSize: 16,
220
+ fontWeight: "B",
221
+ lineHeight: 130,
222
+ },
223
+ {
224
+ fontSize: 16,
225
+ fontWeight: "B",
226
+ lineHeight: 120,
227
+ },
228
+ {
229
+ fontSize: 14,
230
+ fontWeight: "B",
231
+ lineHeight: 130,
232
+ },
233
+ {
234
+ fontSize: 14,
235
+ fontWeight: "B",
236
+ lineHeight: 120,
237
+ },
238
+ /** Dense(Dns) Normal */
239
+ {
240
+ fontSize: 17,
241
+ fontWeight: "N",
242
+ lineHeight: 130,
243
+ },
244
+ {
245
+ fontSize: 17,
246
+ fontWeight: "N",
247
+ lineHeight: 120,
248
+ },
249
+ {
250
+ fontSize: 16,
251
+ fontWeight: "N",
252
+ lineHeight: 130,
253
+ },
254
+ {
255
+ fontSize: 16,
256
+ fontWeight: "N",
257
+ lineHeight: 120,
258
+ },
259
+ {
260
+ fontSize: 14,
261
+ fontWeight: "N",
262
+ lineHeight: 130,
263
+ },
264
+ {
265
+ fontSize: 14,
266
+ fontWeight: "N",
267
+ lineHeight: 120,
268
+ },
269
+ ],
270
+ },
271
+ oln: {
272
+ fontFamily: "body",
273
+ description:
274
+ "Onelineテキストは1行展開を前提として、主にUI要素への適用を想定したテキストスタイルです。行間の余白を最小限にすることでUIパーツに対するデザイン、及びコーディング実装調整コストの軽減を優先したデキストスタイルとなります。",
275
+ variants: [
276
+ /** Oneline(Oln) Bold */
277
+ {
278
+ fontSize: 17,
279
+ fontWeight: "B",
280
+ lineHeight: 100,
281
+ },
282
+ {
283
+ fontSize: 16,
284
+ fontWeight: "B",
285
+ lineHeight: 100,
286
+ },
287
+ {
288
+ fontSize: 14,
289
+ fontWeight: "B",
290
+ lineHeight: 100,
291
+ },
292
+ /** Oneline(Oln) Normal */
293
+ {
294
+ fontSize: 17,
295
+ fontWeight: "N",
296
+ lineHeight: 100,
297
+ },
298
+ {
299
+ fontSize: 16,
300
+ fontWeight: "N",
301
+ lineHeight: 100,
302
+ },
303
+ {
304
+ fontSize: 14,
305
+ fontWeight: "N",
306
+ lineHeight: 100,
307
+ },
308
+ ],
309
+ },
310
+ mono: {
311
+ fontFamily: "mono",
312
+ description:
313
+ "Monoテキストはコード系コンテンツへの適用を想定したテキストスタイルです。文字・単語レベルの可読性を優先したモノスペース(等幅フォント)を使用します。",
314
+ variants: [
315
+ /** Mono Bold */
316
+ {
317
+ fontSize: 17,
318
+ fontWeight: "B",
319
+ lineHeight: 150,
320
+ },
321
+ {
322
+ fontSize: 16,
323
+ fontWeight: "B",
324
+ lineHeight: 150,
325
+ },
326
+ {
327
+ fontSize: 14,
328
+ fontWeight: "B",
329
+ lineHeight: 150,
330
+ },
331
+ /** Oneline(Oln) Normal */
332
+ {
333
+ fontSize: 17,
334
+ fontWeight: "N",
335
+ lineHeight: 150,
336
+ },
337
+
338
+ {
339
+ fontSize: 16,
340
+ fontWeight: "N",
341
+ lineHeight: 150,
342
+ },
343
+ {
344
+ fontSize: 14,
345
+ fontWeight: "N",
346
+ lineHeight: 150,
347
+ },
348
+ ],
349
+ },
350
+ };
351
+
352
+ const textStyle = Object.entries(textStylesMap);
353
+ const map = new Map<
354
+ string,
355
+ {
356
+ value: {
357
+ deprecated?: boolean;
358
+ fontFamily: string;
359
+ fontSize: number;
360
+ fontWeight: string;
361
+ lineHeight: number;
362
+ letterSpacing?: string;
363
+ };
364
+ description: string;
365
+ }
366
+ >();
367
+
368
+ textStyle.forEach(([key, { fontFamily, description, variants }]) => {
369
+ variants.forEach(({ fontSize, fontWeight, lineHeight, letterSpacing }) => {
370
+ map.set(`${key}-${fontSize}${fontWeight}-${lineHeight}`, {
371
+ value: {
372
+ fontFamily,
373
+ fontSize,
374
+ fontWeight,
375
+ lineHeight,
376
+ letterSpacing: letterSpacing ? `${letterSpacing}em` : undefined,
377
+ },
378
+ description,
379
+ });
380
+ });
381
+ });
382
+
383
+ export default defineTextStyles(Object.fromEntries(map));