@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,220 @@
1
+ import tokens from "@digital-go-jp/design-tokens";
2
+
3
+ const colors = {
4
+ white: { value: tokens.Color.Neutral.White.$value },
5
+ black: { value: tokens.Color.Neutral.Black.$value },
6
+ blue: {
7
+ 50: { value: tokens.Color.Primitive.Blue[50].$value },
8
+ 100: { value: tokens.Color.Primitive.Blue[100].$value },
9
+ 200: { value: tokens.Color.Primitive.Blue[200].$value },
10
+ 300: { value: tokens.Color.Primitive.Blue[300].$value },
11
+ 400: { value: tokens.Color.Primitive.Blue[400].$value },
12
+ 500: { value: tokens.Color.Primitive.Blue[500].$value },
13
+ 600: { value: tokens.Color.Primitive.Blue[600].$value },
14
+ 700: { value: tokens.Color.Primitive.Blue[700].$value },
15
+ 800: { value: tokens.Color.Primitive.Blue[800].$value },
16
+ 900: { value: tokens.Color.Primitive.Blue[900].$value },
17
+ 1000: { value: tokens.Color.Primitive.Blue[1000].$value },
18
+ 1100: { value: tokens.Color.Primitive.Blue[1100].$value },
19
+ 1200: { value: tokens.Color.Primitive.Blue[1200].$value },
20
+ },
21
+ "light-blue": {
22
+ 50: { value: tokens.Color.Primitive.LightBlue[50].$value },
23
+ 100: { value: tokens.Color.Primitive.LightBlue[100].$value },
24
+ 200: { value: tokens.Color.Primitive.LightBlue[200].$value },
25
+ 300: { value: tokens.Color.Primitive.LightBlue[300].$value },
26
+ 400: { value: tokens.Color.Primitive.LightBlue[400].$value },
27
+ 500: { value: tokens.Color.Primitive.LightBlue[500].$value },
28
+ 600: { value: tokens.Color.Primitive.LightBlue[600].$value },
29
+ 700: { value: tokens.Color.Primitive.LightBlue[700].$value },
30
+ 800: { value: tokens.Color.Primitive.LightBlue[800].$value },
31
+ 900: { value: tokens.Color.Primitive.LightBlue[900].$value },
32
+ 1000: { value: tokens.Color.Primitive.LightBlue[1000].$value },
33
+ 1100: { value: tokens.Color.Primitive.LightBlue[1100].$value },
34
+ 1200: { value: tokens.Color.Primitive.LightBlue[1200].$value },
35
+ },
36
+ cyan: {
37
+ 50: { value: tokens.Color.Primitive.Cyan[50].$value },
38
+ 100: { value: tokens.Color.Primitive.Cyan[100].$value },
39
+ 200: { value: tokens.Color.Primitive.Cyan[200].$value },
40
+ 300: { value: tokens.Color.Primitive.Cyan[300].$value },
41
+ 400: { value: tokens.Color.Primitive.Cyan[400].$value },
42
+ 500: { value: tokens.Color.Primitive.Cyan[500].$value },
43
+ 600: { value: tokens.Color.Primitive.Cyan[600].$value },
44
+ 700: { value: tokens.Color.Primitive.Cyan[700].$value },
45
+ 800: { value: tokens.Color.Primitive.Cyan[800].$value },
46
+ 900: { value: tokens.Color.Primitive.Cyan[900].$value },
47
+ 1000: { value: tokens.Color.Primitive.Cyan[1000].$value },
48
+ 1100: { value: tokens.Color.Primitive.Cyan[1100].$value },
49
+ 1200: { value: tokens.Color.Primitive.Cyan[1200].$value },
50
+ },
51
+ green: {
52
+ 50: { value: tokens.Color.Primitive.Green[50].$value },
53
+ 100: { value: tokens.Color.Primitive.Green[100].$value },
54
+ 200: { value: tokens.Color.Primitive.Green[200].$value },
55
+ 300: { value: tokens.Color.Primitive.Green[300].$value },
56
+ 400: { value: tokens.Color.Primitive.Green[400].$value },
57
+ 500: { value: tokens.Color.Primitive.Green[500].$value },
58
+ 600: { value: tokens.Color.Primitive.Green[600].$value },
59
+ 700: { value: tokens.Color.Primitive.Green[700].$value },
60
+ 800: { value: tokens.Color.Primitive.Green[800].$value },
61
+ 900: { value: tokens.Color.Primitive.Green[900].$value },
62
+ 1000: { value: tokens.Color.Primitive.Green[1000].$value },
63
+ 1100: { value: tokens.Color.Primitive.Green[1100].$value },
64
+ 1200: { value: tokens.Color.Primitive.Green[1200].$value },
65
+ },
66
+ lime: {
67
+ 50: { value: tokens.Color.Primitive.Lime[50].$value },
68
+ 100: { value: tokens.Color.Primitive.Lime[100].$value },
69
+ 200: { value: tokens.Color.Primitive.Lime[200].$value },
70
+ 300: { value: tokens.Color.Primitive.Lime[300].$value },
71
+ 400: { value: tokens.Color.Primitive.Lime[400].$value },
72
+ 500: { value: tokens.Color.Primitive.Lime[500].$value },
73
+ 600: { value: tokens.Color.Primitive.Lime[600].$value },
74
+ 700: { value: tokens.Color.Primitive.Lime[700].$value },
75
+ 800: { value: tokens.Color.Primitive.Lime[800].$value },
76
+ 900: { value: tokens.Color.Primitive.Lime[900].$value },
77
+ 1000: { value: tokens.Color.Primitive.Lime[1000].$value },
78
+ 1100: { value: tokens.Color.Primitive.Lime[1100].$value },
79
+ 1200: { value: tokens.Color.Primitive.Lime[1200].$value },
80
+ },
81
+ yellow: {
82
+ 50: { value: tokens.Color.Primitive.Yellow[50].$value },
83
+ 100: { value: tokens.Color.Primitive.Yellow[100].$value },
84
+ 200: { value: tokens.Color.Primitive.Yellow[200].$value },
85
+ 300: { value: tokens.Color.Primitive.Yellow[300].$value },
86
+ 400: { value: tokens.Color.Primitive.Yellow[400].$value },
87
+ 500: { value: tokens.Color.Primitive.Yellow[500].$value },
88
+ 600: { value: tokens.Color.Primitive.Yellow[600].$value },
89
+ 700: { value: tokens.Color.Primitive.Yellow[700].$value },
90
+ 800: { value: tokens.Color.Primitive.Yellow[800].$value },
91
+ 900: { value: tokens.Color.Primitive.Yellow[900].$value },
92
+ 1000: { value: tokens.Color.Primitive.Yellow[1000].$value },
93
+ 1100: { value: tokens.Color.Primitive.Yellow[1100].$value },
94
+ 1200: { value: tokens.Color.Primitive.Yellow[1200].$value },
95
+ },
96
+ orange: {
97
+ 50: { value: tokens.Color.Primitive.Orange[50].$value },
98
+ 100: { value: tokens.Color.Primitive.Orange[100].$value },
99
+ 200: { value: tokens.Color.Primitive.Orange[200].$value },
100
+ 300: { value: tokens.Color.Primitive.Orange[300].$value },
101
+ 400: { value: tokens.Color.Primitive.Orange[400].$value },
102
+ 500: { value: tokens.Color.Primitive.Orange[500].$value },
103
+ 600: { value: tokens.Color.Primitive.Orange[600].$value },
104
+ 700: { value: tokens.Color.Primitive.Orange[700].$value },
105
+ 800: { value: tokens.Color.Primitive.Orange[800].$value },
106
+ 900: { value: tokens.Color.Primitive.Orange[900].$value },
107
+ 1000: { value: tokens.Color.Primitive.Orange[1000].$value },
108
+ 1100: { value: tokens.Color.Primitive.Orange[1100].$value },
109
+ 1200: { value: tokens.Color.Primitive.Orange[1200].$value },
110
+ },
111
+ red: {
112
+ 50: { value: tokens.Color.Primitive.Red[50].$value },
113
+ 100: { value: tokens.Color.Primitive.Red[100].$value },
114
+ 200: { value: tokens.Color.Primitive.Red[200].$value },
115
+ 300: { value: tokens.Color.Primitive.Red[300].$value },
116
+ 400: { value: tokens.Color.Primitive.Red[400].$value },
117
+ 500: { value: tokens.Color.Primitive.Red[500].$value },
118
+ 600: { value: tokens.Color.Primitive.Red[600].$value },
119
+ 700: { value: tokens.Color.Primitive.Red[700].$value },
120
+ 800: { value: tokens.Color.Primitive.Red[800].$value },
121
+ 900: { value: tokens.Color.Primitive.Red[900].$value },
122
+ 1000: { value: tokens.Color.Primitive.Red[1000].$value },
123
+ 1100: { value: tokens.Color.Primitive.Red[1100].$value },
124
+ 1200: { value: tokens.Color.Primitive.Red[1200].$value },
125
+ },
126
+ magenta: {
127
+ 50: { value: tokens.Color.Primitive.Magenta[50].$value },
128
+ 100: { value: tokens.Color.Primitive.Magenta[100].$value },
129
+ 200: { value: tokens.Color.Primitive.Magenta[200].$value },
130
+ 300: { value: tokens.Color.Primitive.Magenta[300].$value },
131
+ 400: { value: tokens.Color.Primitive.Magenta[400].$value },
132
+ 500: { value: tokens.Color.Primitive.Magenta[500].$value },
133
+ 600: { value: tokens.Color.Primitive.Magenta[600].$value },
134
+ 700: { value: tokens.Color.Primitive.Magenta[700].$value },
135
+ 800: { value: tokens.Color.Primitive.Magenta[800].$value },
136
+ 900: { value: tokens.Color.Primitive.Magenta[900].$value },
137
+ 1000: { value: tokens.Color.Primitive.Magenta[1000].$value },
138
+ 1100: { value: tokens.Color.Primitive.Magenta[1100].$value },
139
+ 1200: { value: tokens.Color.Primitive.Magenta[1200].$value },
140
+ },
141
+ purple: {
142
+ 50: { value: tokens.Color.Primitive.Purple[50].$value },
143
+ 100: { value: tokens.Color.Primitive.Purple[100].$value },
144
+ 200: { value: tokens.Color.Primitive.Purple[200].$value },
145
+ 300: { value: tokens.Color.Primitive.Purple[300].$value },
146
+ 400: { value: tokens.Color.Primitive.Purple[400].$value },
147
+ 500: { value: tokens.Color.Primitive.Purple[500].$value },
148
+ 600: { value: tokens.Color.Primitive.Purple[600].$value },
149
+ 700: { value: tokens.Color.Primitive.Purple[700].$value },
150
+ 800: { value: tokens.Color.Primitive.Purple[800].$value },
151
+ 900: { value: tokens.Color.Primitive.Purple[900].$value },
152
+ 1000: { value: tokens.Color.Primitive.Purple[1000].$value },
153
+ 1100: { value: tokens.Color.Primitive.Purple[1100].$value },
154
+ 1200: { value: tokens.Color.Primitive.Purple[1200].$value },
155
+ },
156
+ "solid-gray": {
157
+ 50: { value: tokens.Color.Neutral.SolidGray[50].$value },
158
+ 100: { value: tokens.Color.Neutral.SolidGray[100].$value },
159
+ 200: { value: tokens.Color.Neutral.SolidGray[200].$value },
160
+ 300: { value: tokens.Color.Neutral.SolidGray[300].$value },
161
+ 400: { value: tokens.Color.Neutral.SolidGray[400].$value },
162
+ 420: { value: tokens.Color.Neutral.SolidGray[420].$value },
163
+ 500: { value: tokens.Color.Neutral.SolidGray[500].$value },
164
+ 536: { value: tokens.Color.Neutral.SolidGray[536].$value },
165
+ 600: { value: tokens.Color.Neutral.SolidGray[600].$value },
166
+ 700: { value: tokens.Color.Neutral.SolidGray[700].$value },
167
+ 800: { value: tokens.Color.Neutral.SolidGray[800].$value },
168
+ 900: { value: tokens.Color.Neutral.SolidGray[900].$value },
169
+ },
170
+ success: {
171
+ 1: {
172
+ value: tokens.Color.Semantic.Success[1].$value,
173
+ description: "成功、安全、完了などを意味するカラー",
174
+ },
175
+ 2: {
176
+ value: tokens.Color.Semantic.Success[2].$value,
177
+ description: "成功、安全、完了などを意味するカラー",
178
+ },
179
+ },
180
+ error: {
181
+ 1: {
182
+ value: tokens.Color.Semantic.Error[1].$value,
183
+ description:
184
+ "失敗やエラーのほか、危険情報や制約条件の提示など注意喚起を意味するカラー",
185
+ },
186
+ 2: {
187
+ value: tokens.Color.Semantic.Error[2].$value,
188
+ description:
189
+ "失敗やエラーのほか、危険情報や制約条件の提示など注意喚起を意味するカラー",
190
+ },
191
+ },
192
+ warning: {
193
+ yellow: {
194
+ 1: {
195
+ value: tokens.Color.Semantic.Warning.Yellow[1].$value,
196
+ description: "警告や禁止事項などを意味するカラー",
197
+ },
198
+ 2: {
199
+ value: tokens.Color.Semantic.Warning.Yellow[2].$value,
200
+ description: "警告や禁止事項などを意味するカラー",
201
+ },
202
+ },
203
+ orange: {
204
+ 1: {
205
+ value: tokens.Color.Semantic.Warning.Orange[1].$value,
206
+ description: "警告や禁止事項などを意味するカラー",
207
+ },
208
+ 2: {
209
+ value: tokens.Color.Semantic.Warning.Orange[2].$value,
210
+ description: "警告や禁止事項などを意味するカラー",
211
+ },
212
+ },
213
+ },
214
+ focus: {
215
+ yellow: { value: tokens.Color.Primitive.Yellow[700].$value },
216
+ blue: { value: tokens.Color.Primitive.LightBlue[700].$value },
217
+ },
218
+ };
219
+
220
+ export default colors;
@@ -0,0 +1,34 @@
1
+ import { defineTokens } from "@pandacss/dev";
2
+ import tokens from "@digital-go-jp/design-tokens";
3
+ import colors from "./colors";
4
+ import { fonts, fontSizes, fontWeights, lineHeights } from "./typography";
5
+
6
+ export default defineTokens({
7
+ colors,
8
+ fonts,
9
+ fontSizes,
10
+ fontWeights,
11
+ lineHeights,
12
+ radii: {
13
+ xs: { value: "0.125rem" },
14
+ sm: { value: "0.25rem" },
15
+ md: { value: "0.375rem" },
16
+ lg: { value: "0.5rem" },
17
+ xl: { value: "0.75rem" },
18
+ "2xl": { value: "1rem" },
19
+ "3xl": { value: "1.5rem" },
20
+ "8": { value: tokens.BorderRadius[8].$value },
21
+ "16": { value: tokens.BorderRadius[16].$value },
22
+ "32": { value: tokens.BorderRadius[32].$value },
23
+ },
24
+ shadows: {
25
+ "1": { value: tokens.Elevation[1].$value },
26
+ "2": { value: tokens.Elevation[2].$value },
27
+ "3": { value: tokens.Elevation[3].$value },
28
+ "4": { value: tokens.Elevation[4].$value },
29
+ "5": { value: tokens.Elevation[5].$value },
30
+ "6": { value: tokens.Elevation[6].$value },
31
+ "7": { value: tokens.Elevation[7].$value },
32
+ "8": { value: tokens.Elevation[8].$value },
33
+ },
34
+ });
@@ -0,0 +1,131 @@
1
+ import tokens from "@digital-go-jp/design-tokens";
2
+
3
+ export const fonts = {
4
+ body: {
5
+ value: [
6
+ "Noto Sans JP",
7
+ "-apple-system",
8
+ "BlinkMacSystemFont",
9
+ "sans-serif",
10
+ ],
11
+ },
12
+ mono: {
13
+ value: ["Noto Sans Mono", "monospace"],
14
+ },
15
+ };
16
+
17
+ export const fontSizes = {
18
+ "64": {
19
+ value: tokens.FontSize[64].$value,
20
+ description: "視覚的なインパクトが必要なデザイン要素としての文字サイズ。",
21
+ },
22
+ "57": {
23
+ value: tokens.FontSize[57].$value,
24
+ description: "視覚的なインパクトが必要なデザイン要素としての文字サイズ。",
25
+ },
26
+ "48": {
27
+ value: tokens.FontSize[48].$value,
28
+ description: "視覚的なインパクトが必要なデザイン要素としての文字サイズ。",
29
+ },
30
+ "45": {
31
+ value: tokens.FontSize[45].$value,
32
+ description:
33
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
34
+ },
35
+ "36": {
36
+ value: tokens.FontSize[36].$value,
37
+ description:
38
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
39
+ },
40
+ "32": {
41
+ value: tokens.FontSize[32].$value,
42
+ description:
43
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
44
+ },
45
+ "28": {
46
+ value: tokens.FontSize[28].$value,
47
+ description:
48
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
49
+ },
50
+ "24": {
51
+ value: tokens.FontSize[24].$value,
52
+ description:
53
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
54
+ },
55
+ "22": {
56
+ value: tokens.FontSize[22].$value,
57
+ description:
58
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
59
+ },
60
+ "20": {
61
+ value: tokens.FontSize[20].$value,
62
+ description:
63
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
64
+ },
65
+ "18": {
66
+ value: tokens.FontSize[18].$value,
67
+ description:
68
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
69
+ },
70
+ "17": {
71
+ value: tokens.FontSize[17].$value,
72
+ description:
73
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
74
+ },
75
+ "16": {
76
+ value: tokens.FontSize[16].$value,
77
+ description:
78
+ "読み物コンテンツ向けに多く使用される見出しや本文を構成する文字サイズ。なお、本文やUIにおいては16 CSS px以上が基準値となります。",
79
+ },
80
+ "14": {
81
+ value: tokens.FontSize[14].$value,
82
+ description:
83
+ "基本的には使用しません。フッター要素などコンテンツに付随する情報や、UIやコンテンツを構成する際の領域的な制約がある場合のように標準的な文字サイズ(16 CSS px以上)の使用が難しいケースにおいてのみ使用される文字サイズです。なお、14 CSS px未満の大きさの使用は原則として許容されません。",
84
+ },
85
+ };
86
+
87
+ export const fontWeights = {
88
+ "400": { value: tokens.FontWeight[400].$value },
89
+ "700": { value: tokens.FontWeight[700].$value },
90
+ };
91
+
92
+ export const lineHeights = {
93
+ "100": {
94
+ value: tokens.LineHeight[100].$value,
95
+ description:
96
+ "主にボタンなど、コンポーネント内で使用されるワンラインのテキストで上下の余白を持っていない行間",
97
+ },
98
+ "120": {
99
+ value: tokens.LineHeight[120].$value,
100
+ description:
101
+ "主に管理画面や業務システムの画面等で、膨大な情報を一覧表示したりなど、限られた画面領域での表示情報量を最優先した行間",
102
+ },
103
+ "130": {
104
+ value: tokens.LineHeight[130].$value,
105
+ description:
106
+ "主に管理画面や業務システムの画面等で使用する、表示情報量を優先した行間",
107
+ },
108
+ "140": {
109
+ value: tokens.LineHeight[140].$value,
110
+ description: "見出しなど、やや大きな文字に使用される行間",
111
+ },
112
+ "150": {
113
+ value: tokens.LineHeight[150].$value,
114
+ description:
115
+ "一般的なウェブサイトの本文や見出しで使用される行間(本文の行間としては最低限度)",
116
+ },
117
+ "160": {
118
+ value: tokens.LineHeight[160].$value,
119
+ description: "一般的なウェブサイトの本文で使用される行間",
120
+ },
121
+ "170": {
122
+ value: tokens.LineHeight[170].$value,
123
+ description:
124
+ "一般的なウェブサイトの本文で使用する、心理的負荷の軽減を考慮した行間",
125
+ },
126
+ "175": {
127
+ value: tokens.LineHeight[175].$value,
128
+ description:
129
+ "一般的なウェブサイトの本文で使用する、心理的負荷の軽減を考慮した行間。採用するグリッド幅やフォントサイズに応じて170%と使い分ける",
130
+ },
131
+ };
@@ -0,0 +1,37 @@
1
+ import { defineUtility } from "@pandacss/dev";
2
+
3
+ const borderInset = defineUtility({
4
+ deprecated: true,
5
+ className: "border-inset",
6
+ values: ["xs", "sm", "md", "lg", "xl"],
7
+ transform(value, { token }) {
8
+ const width = (() => {
9
+ if (value === "xs") return "1px";
10
+ if (value === "sm") return "2px";
11
+ if (value === "lg") return "4px";
12
+ if (value === "xl") return "8px";
13
+ return "3px";
14
+ })();
15
+
16
+ return {
17
+ boxShadow: `inset 0 0 0 ${width} ${token("colors.ring")}`,
18
+ };
19
+ },
20
+ });
21
+
22
+ const focusRing = defineUtility({
23
+ className: "ring",
24
+ values: "borderWidths",
25
+ transform(value, { token }) {
26
+ return {
27
+ boxShadow: `0 0 0 ${value} ${token("colors.ring")}`,
28
+ };
29
+ },
30
+ });
31
+
32
+ const utilities = {
33
+ borderInset,
34
+ focusRing,
35
+ };
36
+
37
+ export default utilities;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "@repo/typescript-config/base.json",
3
+ "include": ["src"]
4
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { defineConfig } from "tsup";
2
+
3
+ export default defineConfig({
4
+ entry: ["src/index.ts"],
5
+ external: ["@pandacss/dev"],
6
+ format: ["esm", "cjs"],
7
+ dts: true,
8
+ clean: true,
9
+ });