@rovula/ui 0.0.81 → 0.0.82
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/cjs/bundle.css +1 -2
- package/dist/esm/bundle.css +1 -2
- package/dist/src/theme/global.css +309 -1853
- package/package.json +2 -4
- package/src/components/Button/Button.tsx +7 -7
- package/src/theme/global.css +1 -2
- package/src/theme/themes/xspector/color.css +48 -50
- package/src/theme/themes/xspector/palette.css +121 -141
- package/src/theme/themes/xspector/state.css +78 -83
- package/src/theme/themes/xspector/transparent.css +68 -93
- package/src/theme/THEME_MAPPING.md +0 -231
- package/src/theme/themes/skyller/baseline.css +0 -6
- package/src/theme/themes/skyller/color.css +0 -79
- package/src/theme/themes/skyller/components/action-button.css +0 -81
- package/src/theme/themes/skyller/palette.css +0 -143
- package/src/theme/themes/skyller/state.css +0 -94
- package/src/theme/themes/skyller/transparent.css +0 -94
- package/src/theme/themes/skyller/typography.css +0 -30
- package/src/theme/themes/variable.css +0 -1057
|
@@ -1,93 +1,68 @@
|
|
|
1
|
-
:root[data-theme="xspector"]
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
--main-transparency-primary-
|
|
8
|
-
--main-transparency-
|
|
9
|
-
--main-transparency-
|
|
10
|
-
--main-transparency-
|
|
11
|
-
--main-transparency-
|
|
12
|
-
--main-transparency-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
--main-transparency-
|
|
16
|
-
--main-transparency-
|
|
17
|
-
--main-transparency-
|
|
18
|
-
--main-transparency-
|
|
19
|
-
--main-transparency-
|
|
20
|
-
--
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
--other-transparency-
|
|
32
|
-
--other-transparency-
|
|
33
|
-
--other-transparency-
|
|
34
|
-
--other-transparency-
|
|
35
|
-
--other-transparency-
|
|
36
|
-
--other-transparency-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
--other-transparency-
|
|
40
|
-
--other-transparency-
|
|
41
|
-
--other-transparency-
|
|
42
|
-
--other-transparency-
|
|
43
|
-
--other-transparency-
|
|
44
|
-
--other-transparency-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
--other-transparency-
|
|
48
|
-
--other-transparency-
|
|
49
|
-
--other-transparency-
|
|
50
|
-
--other-transparency-
|
|
51
|
-
--other-transparency-
|
|
52
|
-
--other-transparency-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
--other-transparency-
|
|
56
|
-
--other-transparency-
|
|
57
|
-
--other-transparency-
|
|
58
|
-
--other-transparency-
|
|
59
|
-
--other-transparency-
|
|
60
|
-
--other-transparency-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
--other-transparency-
|
|
64
|
-
--other-transparency-
|
|
65
|
-
--other-transparency-
|
|
66
|
-
--other-transparency-
|
|
67
|
-
--other-transparency-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/* Grey2 (other) */
|
|
71
|
-
--other-transparency-grey2-8: var(--transparency-grey2-8-xspector);
|
|
72
|
-
--other-transparency-grey2-12: var(--transparency-grey2-12-xspector);
|
|
73
|
-
--other-transparency-grey2-16: var(--transparency-grey2-16-xspector);
|
|
74
|
-
--other-transparency-grey2-24: var(--transparency-grey2-24-xspector);
|
|
75
|
-
--other-transparency-grey2-32: var(--transparency-grey2-32-xspector);
|
|
76
|
-
--other-transparency-grey2-48: var(--transparency-grey2-48-xspector);
|
|
77
|
-
|
|
78
|
-
/* White (other) */
|
|
79
|
-
--other-transparency-white-08: var(--transparency-white-8-xspector);
|
|
80
|
-
--other-transparency-white-12: var(--transparency-white-12-xspector);
|
|
81
|
-
--other-transparency-white-16: var(--transparency-white-16-xspector);
|
|
82
|
-
--other-transparency-white-24: var(--transparency-white-24-xspector);
|
|
83
|
-
--other-transparency-white-32: var(--transparency-white-32-xspector);
|
|
84
|
-
--other-transparency-white-48: var(--transparency-white-48-xspector);
|
|
85
|
-
|
|
86
|
-
/* Black (other) */
|
|
87
|
-
--other-transparency-black-08: var(--transparency-black-8-xspector);
|
|
88
|
-
--other-transparency-black-12: var(--transparency-black-12-xspector);
|
|
89
|
-
--other-transparency-black-16: var(--transparency-black-16-xspector);
|
|
90
|
-
--other-transparency-black-24: var(--transparency-black-24-xspector);
|
|
91
|
-
--other-transparency-black-32: var(--transparency-black-32-xspector);
|
|
92
|
-
--other-transparency-black-48: var(--transparency-black-48-xspector);
|
|
93
|
-
}
|
|
1
|
+
:root[data-theme="xspector"]{
|
|
2
|
+
--main-transparency-primary-8: rgba(221 205 0 / 0.08);
|
|
3
|
+
--main-transparency-primary-12: rgba(221 205 0 / 0.12);
|
|
4
|
+
--main-transparency-primary-16: rgba(221 205 0 / 0.16);
|
|
5
|
+
--main-transparency-primary-24: rgba(221 205 0 / 0.24);
|
|
6
|
+
--main-transparency-primary-32: rgba(221 205 0 / 0.32);
|
|
7
|
+
--main-transparency-primary-48: rgba(221 205 0 / 0.48);
|
|
8
|
+
--main-transparency-secondary-8: rgba(158 158 158 / 0.08);
|
|
9
|
+
--main-transparency-secondary-12: rgba(158 158 158 / 0.12);
|
|
10
|
+
--main-transparency-secondary-16: rgba(158 158 158 / 0.16);
|
|
11
|
+
--main-transparency-secondary-24: rgba(158 158 158 / 0.24);
|
|
12
|
+
--main-transparency-secondary-32: rgba(158 158 158 / 0.32);
|
|
13
|
+
--main-transparency-secondary-48: rgba(158 158 158 / 0.48);
|
|
14
|
+
--main-transparency-tertiary-8: rgba(173 202 214 / 0.08);
|
|
15
|
+
--main-transparency-tertiary-12: rgba(173 202 214 / 0.12);
|
|
16
|
+
--main-transparency-tertiary-16: rgba(173 202 214 / 0.16);
|
|
17
|
+
--main-transparency-tertiary-24: rgba(173 202 214 / 0.24);
|
|
18
|
+
--main-transparency-tertiary-32: rgba(173 202 214 / 0.32);
|
|
19
|
+
--main-transparency-tertiary-48: rgba(173 202 214 / 0.48);
|
|
20
|
+
--other-transparency-info-8: rgba(41 152 255 / 0.08);
|
|
21
|
+
--other-transparency-info-12: rgba(41 152 255 / 0.12);
|
|
22
|
+
--other-transparency-info-16: rgba(41 152 255 / 0.16);
|
|
23
|
+
--other-transparency-info-24: rgba(41 152 255 / 0.24);
|
|
24
|
+
--other-transparency-info-32: rgba(41 152 255 / 0.32);
|
|
25
|
+
--other-transparency-info-48: rgba(41 152 255 / 0.48);
|
|
26
|
+
--other-transparency-success-8: rgba(84 214 44 / 0.08);
|
|
27
|
+
--other-transparency-success-12: rgba(84 214 44 / 0.12);
|
|
28
|
+
--other-transparency-success-16: rgba(84 214 44 / 0.16);
|
|
29
|
+
--other-transparency-success-24: rgba(84 214 44 / 0.24);
|
|
30
|
+
--other-transparency-success-32: rgba(84 214 44 / 0.32);
|
|
31
|
+
--other-transparency-success-48: rgba(84 214 44 / 0.48);
|
|
32
|
+
--other-transparency-warning-8: rgba(255 193 7 / 0.08);
|
|
33
|
+
--other-transparency-warning-12: rgba(255 193 7 / 0.12);
|
|
34
|
+
--other-transparency-warning-16: rgba(255 193 7 / 0.16);
|
|
35
|
+
--other-transparency-warning-24: rgba(255 193 7 / 0.24);
|
|
36
|
+
--other-transparency-warning-32: rgba(255 193 7 / 0.32);
|
|
37
|
+
--other-transparency-warning-48: rgba(255 193 7 / 0.48);
|
|
38
|
+
--other-transparency-error-8: rgba(255 72 66 / 0.08);
|
|
39
|
+
--other-transparency-error-12: rgba(255 72 66 / 0.12);
|
|
40
|
+
--other-transparency-error-16: rgba(255 72 66 / 0.16);
|
|
41
|
+
--other-transparency-error-24: rgba(255 72 66 / 0.24);
|
|
42
|
+
--other-transparency-error-32: rgba(255 72 66 / 0.32);
|
|
43
|
+
--other-transparency-error-48: rgba(255 72 66 / 0.48);
|
|
44
|
+
--other-transparency-grey-8: rgba(158 158 158 / 0.08);
|
|
45
|
+
--other-transparency-grey-12: rgba(158 158 158 / 0.12);
|
|
46
|
+
--other-transparency-grey-16: rgba(158 158 158 / 0.16);
|
|
47
|
+
--other-transparency-grey-24: rgba(158 158 158 / 0.24);
|
|
48
|
+
--other-transparency-grey-32: rgba(158 158 158 / 0.32);
|
|
49
|
+
--other-transparency-grey-48: rgba(158 158 158 / 0.48);
|
|
50
|
+
--other-transparency-grey2-8: rgba(145 158 171 / 0.08);
|
|
51
|
+
--other-transparency-grey2-12: rgba(145 158 171 / 0.12);
|
|
52
|
+
--other-transparency-grey2-16: rgba(145 158 171 / 0.16);
|
|
53
|
+
--other-transparency-grey2-24: rgba(145 158 171 / 0.24);
|
|
54
|
+
--other-transparency-grey2-32: rgba(145 158 171 / 0.32);
|
|
55
|
+
--other-transparency-grey2-48: rgba(145 158 171 / 0.48);
|
|
56
|
+
--other-transparency-white-08: rgba(255 255 255 / 0.08);
|
|
57
|
+
--other-transparency-white-12: rgba(255 255 255 / 0.12);
|
|
58
|
+
--other-transparency-white-16: rgba(255 255 255 / 0.16);
|
|
59
|
+
--other-transparency-white-24: rgba(255 255 255 / 0.24);
|
|
60
|
+
--other-transparency-white-32: rgba(255 255 255 / 0.32);
|
|
61
|
+
--other-transparency-white-48: rgba(255 255 255 / 0.48);
|
|
62
|
+
--other-transparency-black-08: rgba(0 0 0 / 0.08);
|
|
63
|
+
--other-transparency-black-12: rgba(0 0 0 / 0.12);
|
|
64
|
+
--other-transparency-black-16: rgba(0 0 0 / 0.16);
|
|
65
|
+
--other-transparency-black-24: rgba(0 0 0 / 0.24);
|
|
66
|
+
--other-transparency-black-32: rgba(0 0 0 / 0.32);
|
|
67
|
+
--other-transparency-black-48: rgba(0 0 0 / 0.48);
|
|
68
|
+
}
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
# Theme Mapping Documentation
|
|
2
|
-
|
|
3
|
-
เอกสาร mapping ระหว่าง Tailwind class, CSS variables ที่ใช้ใน code และ raw CSS ที่ export จาก Figma
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Naming Convention
|
|
8
|
-
|
|
9
|
-
| แหล่ง | Pattern | ตัวอย่าง |
|
|
10
|
-
|------|---------|----------|
|
|
11
|
-
| **Tailwind class** | `{utility}-{token}` | `bg-primary-stroke`, `text-secondary-default` |
|
|
12
|
-
| **Code CSS (runtime)** | `--state-color-{base}-{state}` | `--state-color-secondary-stroke` |
|
|
13
|
-
| **Figma export (variable.css)** | `--{name}-{theme}` | `--state-secondary-stroke-skyller` |
|
|
14
|
-
|
|
15
|
-
> **Note:** Code ใช้ `--state-color-*` (version เก่า), Figma export ใช้ `--state-*` (version ใหม่ ไม่มี "color")
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 2. Tailwind → CSS Variable Mapping
|
|
20
|
-
|
|
21
|
-
### 2.1 generateColorConfig (State + Palette)
|
|
22
|
-
|
|
23
|
-
ใช้กับ: `primary`, `secondary`, `tertiary`, `grey`, `grey2`, `info`, `success`, `warning`, `error`
|
|
24
|
-
|
|
25
|
-
| Tailwind class | CSS variable (code) | Figma path |
|
|
26
|
-
|----------------|-------------------|------------|
|
|
27
|
-
| `{base}` | `--state-color-{base}-default` | `state/{base}/default` |
|
|
28
|
-
| `{base}-default` | `--state-color-{base}-default` | `state/{base}/default` |
|
|
29
|
-
| `{base}-hover` | `--state-color-{base}-hover` | `state/{base}/hover` |
|
|
30
|
-
| `{base}-stroke` | `--state-color-{base}-stroke` | `state/{base}/stroke` |
|
|
31
|
-
| `{base}-hover-bg` | `--state-color-{base}-hover-bg` | `state/{base}/hover-bg` |
|
|
32
|
-
| `{base}-pressed` | `--state-color-{base}-pressed` | `state/{base}/pressed` |
|
|
33
|
-
| `{base}-active` | `--state-color-{base}-active` | `state/{base}/active` |
|
|
34
|
-
| `{base}-text-solid` | `--state-color-{base}-text-solid` | `state/{base}/text-solid` |
|
|
35
|
-
| `{base}-text-outline` | `--state-color-{base}-text-outline` | `state/{base}/text-outline` |
|
|
36
|
-
| `{base}-text-pressed` | `--state-color-{base}-text-pressed` | `state/{base}/text-pressed` |
|
|
37
|
-
| `{base}-text-hover` | ⚠️ ไม่มีใน utils (มีใน state.css) | `state/{base}/text-hover` |
|
|
38
|
-
| `{base}-foreground` | `--{base}-foreground` | - |
|
|
39
|
-
| `{base}-{num}` | `--{variablePrefix}-{num}` | `ramps/{base}/{num}` |
|
|
40
|
-
|
|
41
|
-
**Config ใช้จริง:**
|
|
42
|
-
|
|
43
|
-
| baseName | variablePrefix | range |
|
|
44
|
-
|----------|----------------|-------|
|
|
45
|
-
| primary | primary-ramps-primary | 5,10,20...150 |
|
|
46
|
-
| secondary | secondary-ramps-secondary | 5,10,20...150 |
|
|
47
|
-
| tertiary | tertiary-ramps-tertiary | 5,10,20...150 |
|
|
48
|
-
| grey | grey-grey | 5,10,20...150 |
|
|
49
|
-
| grey2 | grey2-grey2 | 50,100...950 |
|
|
50
|
-
| info | info-info | 50,100...950 |
|
|
51
|
-
| success | success-success | 50,100...950 |
|
|
52
|
-
| warning | warning-warning | 50,100...950 |
|
|
53
|
-
| error | error-error | 50,100...950 |
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
### 2.2 generateTransparentColorConfig
|
|
58
|
-
|
|
59
|
-
| Tailwind class | CSS variable (code) | Figma (variable.css) |
|
|
60
|
-
|----------------|---------------------|----------------------|
|
|
61
|
-
| `{base}-transparent-8` | `--main-transparency-{base}-8` หรือ `--other-transparency-{base}-8` | `--transparency-{base}-8-{theme}` |
|
|
62
|
-
| `{base}-transparent-12` | ... | ... |
|
|
63
|
-
| `{base}-transparent-16` | ... | ... |
|
|
64
|
-
| `{base}-transparent-24` | ... | ... |
|
|
65
|
-
| `{base}-transparent-32` | ... | ... |
|
|
66
|
-
| `{base}-transparent-48` | ... | ... |
|
|
67
|
-
|
|
68
|
-
**Config:** primary/secondary/tertiary ใช้ `main`, อื่นๆ ใช้ `other`
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
### 2.3 generateButtonStyles
|
|
73
|
-
|
|
74
|
-
**Prefix:** `button-{theme}-{mode}` | **Themes:** primary, secondary, tertiary, info, success, warning, error | **Modes:** solid, outline, flat
|
|
75
|
-
|
|
76
|
-
| Tailwind class | CSS variable | ใช้กับ |
|
|
77
|
-
|----------------|--------------|--------|
|
|
78
|
-
| `button-{theme}-{mode}-default` | `--button-{theme}-{mode}-default-{type}` | border, bg, text |
|
|
79
|
-
| `button-{theme}-{mode}-hover` | `--button-{theme}-{mode}-hover-{type}` | border, bg, text |
|
|
80
|
-
| `button-{theme}-{mode}-active` | `--button-{theme}-{mode}-active-{type}` | border, bg, text |
|
|
81
|
-
| `button-{theme}-{mode}-disabled` | `--button-{theme}-{mode}-disabled-{type}` | border, bg, text |
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
### 2.4 generateActionButtonStyles
|
|
86
|
-
|
|
87
|
-
**Prefix:** `action-button-{mode}` | **Modes:** solid, outline, icon
|
|
88
|
-
|
|
89
|
-
| Tailwind class | CSS variable | ใช้กับ |
|
|
90
|
-
|----------------|--------------|--------|
|
|
91
|
-
| `action-button-{mode}-default` | `--action-button-{mode}-default-{type}` | border, bg, text |
|
|
92
|
-
| `action-button-{mode}-hover` | `--action-button-{mode}-hover-{type}` | border, bg, text |
|
|
93
|
-
| `action-button-{mode}-pressed` | `--action-button-{mode}-pressed-{type}` | border, bg, text |
|
|
94
|
-
| `action-button-{mode}-active` | `--action-button-{mode}-active-{type}` | border, bg, text |
|
|
95
|
-
| `action-button-{mode}-active-pressed` | `--action-button-{mode}-active-pressed-{type}` | border, bg, text |
|
|
96
|
-
| `action-button-{mode}-active-hover` | `--action-button-{mode}-active-hover-{type}` | border, bg, text |
|
|
97
|
-
| `action-button-{mode}-disabled` | `--action-button-{mode}-disabled-{type}` | border, bg, text |
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
### 2.5 Manual Mappings (colors.js)
|
|
102
|
-
|
|
103
|
-
#### Text
|
|
104
|
-
| Tailwind | CSS variable | Figma (variable.css) |
|
|
105
|
-
|----------|--------------|----------------------|
|
|
106
|
-
| text-black | --text-black | --text-black-{theme} |
|
|
107
|
-
| text-dark | --text-dark | --text-dark-{theme} |
|
|
108
|
-
| text-medium | --text-medium | --text-medium-{theme} |
|
|
109
|
-
| text-light | --text-light | --text-light-{theme} |
|
|
110
|
-
| text-grey-dark | --text-grey-dark | --text-grey-dark-{theme} |
|
|
111
|
-
| text-grey-medium | --text-grey-medium | --text-grey-medium-{theme} |
|
|
112
|
-
| text-grey-light | --text-grey-light | --text-grey-light-{theme} |
|
|
113
|
-
| text-white | --text-white | --text-white-{theme} |
|
|
114
|
-
|
|
115
|
-
#### State disable
|
|
116
|
-
| Tailwind | CSS variable | Figma |
|
|
117
|
-
|----------|--------------|-------|
|
|
118
|
-
| state-disable-solid | --state-color-disable-solid | --state-disable-solid-{theme} |
|
|
119
|
-
| state-disable-outline | --state-color-disable-outline | --state-disable-outline-{theme} |
|
|
120
|
-
|
|
121
|
-
#### Input
|
|
122
|
-
| Tailwind | CSS variable | Figma |
|
|
123
|
-
|----------|--------------|-------|
|
|
124
|
-
| input-default-text | --input-color-default-text | --input-default-text-{theme} |
|
|
125
|
-
| input-default-stroke | --input-color-default-stroke | --input-default-stroke-{theme} |
|
|
126
|
-
| input-filled-text | --input-color-filled-text | --input-filled-text-{theme} |
|
|
127
|
-
| input-active-stroke | --input-color-active-stroke | --input-active-stroke-{theme} |
|
|
128
|
-
| input-disable-text | --input-color-disable-text | --input-disable-text-{theme} |
|
|
129
|
-
| input-disable-stroke | --input-color-disable-stroke | --input-disable-stroke-{theme} |
|
|
130
|
-
| input-disable-bg | --input-color-disable-bg | --input-disable-bg-{theme} |
|
|
131
|
-
| input-label-bg | --input-color-label-bg | --input-label-bg-{theme} |
|
|
132
|
-
| input-error | --input-color-error | --input-error-{theme} |
|
|
133
|
-
|
|
134
|
-
#### Function
|
|
135
|
-
| Tailwind | CSS variable | Figma |
|
|
136
|
-
|----------|--------------|-------|
|
|
137
|
-
| function-default-solid | --function-default-solid | --function-default-solid-{theme} |
|
|
138
|
-
| function-default-hover | --function-default-hover | --function-default-hover-{theme} |
|
|
139
|
-
| function-default-hover-bg | --function-default-hover-bg | --function-default-hover-bg-{theme} |
|
|
140
|
-
| function-default-stroke | --function-default-stroke | --function-default-stroke-{theme} |
|
|
141
|
-
| function-default-icon | --function-default-icon | --function-default-icon-{theme} |
|
|
142
|
-
| function-default-outline | --function-default-outline-icon | --function-default-outline-icon-{theme} |
|
|
143
|
-
| function-active-solid | --function-active-solid | --function-active-solid-{theme} |
|
|
144
|
-
| function-active-hover | --function-active-hover | --function-active-hover-{theme} |
|
|
145
|
-
| function-active-hover-bg | --function-active-hover-bg | --function-active-hover-bg-{theme} |
|
|
146
|
-
| function-active-stroke | --function-active-stroke | --function-active-stroke-{theme} |
|
|
147
|
-
| function-active-icon | --function-active-icon | --function-active-icon-{theme} |
|
|
148
|
-
|
|
149
|
-
#### Base
|
|
150
|
-
| Tailwind | CSS variable | Figma |
|
|
151
|
-
|----------|--------------|-------|
|
|
152
|
-
| base-bg | --base-color-bg | --base-bg-bg1-{theme} |
|
|
153
|
-
| base-bg2 | --base-color-bg2 | --base-bg-bg2-{theme} |
|
|
154
|
-
| base-bg3 | --base-color-bg3 | --base-bg-bg3-{theme} |
|
|
155
|
-
| base-popup | --base-color-popup | - |
|
|
156
|
-
| base-popup-highlight | --base-color-popup-hightlight *(typo)* | --base-modal-modal-hightlight-{theme} *(typo)* |
|
|
157
|
-
| base-popup-curtain | --base-color-popup-curtain | --base-modal-modal-curtain-{theme} |
|
|
158
|
-
| base-popup-foreground | --base-color-popup-foreground | - |
|
|
159
|
-
| base-stroke | --base-color-workspace-stroke | --base-bg-stroke1-{theme} |
|
|
160
|
-
| base-workspace-stroke | --base-color-workspace-stroke | --base-bg-stroke1-{theme} |
|
|
161
|
-
| base-guideline-stroke | --base-color-guideline-stroke | - |
|
|
162
|
-
|
|
163
|
-
#### Common
|
|
164
|
-
| Tailwind | CSS variable | Figma |
|
|
165
|
-
|----------|--------------|-------|
|
|
166
|
-
| common-white | --common-white | --common-white-{theme} |
|
|
167
|
-
| common-black | --common-black | --common-black-{theme} |
|
|
168
|
-
| surface | --surface | - |
|
|
169
|
-
| surface-foreground | --surface-foreground | - |
|
|
170
|
-
| background | --background | - |
|
|
171
|
-
| foreground | --foreground | - |
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## 3. Figma Export (variable.css) Structure
|
|
176
|
-
|
|
177
|
-
### 3.1 Theme suffixes
|
|
178
|
-
- `xspector`
|
|
179
|
-
- `skyller`
|
|
180
|
-
- `report-xspector-light-mode`
|
|
181
|
-
|
|
182
|
-
### 3.2 Variable categories
|
|
183
|
-
|
|
184
|
-
| Category | Pattern | ตัวอย่าง |
|
|
185
|
-
|----------|---------|----------|
|
|
186
|
-
| **Main** | `--main-{color}-{theme}` | --main-primary-skyller |
|
|
187
|
-
| **Brand** | `--brand-{name}-{theme}` | --brand-midnight-blue-skyller |
|
|
188
|
-
| **Text** | `--text-{variant}-{theme}` | --text-dark-skyller |
|
|
189
|
-
| **State** | `--state-{base}-{state}-{theme}` | --state-primary-default-skyller |
|
|
190
|
-
| **Ramps** | `--ramps-{base}-{num}-{theme}` | --ramps-primary-5-skyller |
|
|
191
|
-
| **Transparency** | `--transparency-{base}-{num}-{theme}` | --transparency-primary-8-skyller |
|
|
192
|
-
| **Base** | `--base-{category}-{name}-{theme}` | --base-bg-bg1-skyller |
|
|
193
|
-
| **Input** | `--input-{state}-{property}-{theme}` | --input-default-text-skyller |
|
|
194
|
-
| **Function** | `--function-{state}-{property}-{theme}` | --function-default-solid-skyller |
|
|
195
|
-
| **Common** | `--common-{color}-{theme}` | --common-white-skyller |
|
|
196
|
-
|
|
197
|
-
### 3.3 Known typos in variable.css
|
|
198
|
-
- `tertiery` → should be `tertiary`
|
|
199
|
-
- `backgroud` → should be `background`
|
|
200
|
-
- `hightlight` → should be `highlight`
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## 4. Quick Reference: Figma → Tailwind
|
|
205
|
-
|
|
206
|
-
เมื่อ designer ส่ง Figma inspect มา ให้ map ดังนี้:
|
|
207
|
-
|
|
208
|
-
| Figma token path | Tailwind class |
|
|
209
|
-
|------------------|----------------|
|
|
210
|
-
| state/secondary/stroke | border-secondary-stroke |
|
|
211
|
-
| state/secondary/text-outline | text-secondary-text-outline |
|
|
212
|
-
| state/primary/default | bg-primary หรือ bg-primary-default |
|
|
213
|
-
| state/primary/hover | bg-primary-hover |
|
|
214
|
-
| ramps/primary/50 | bg-primary-50 |
|
|
215
|
-
| text/dark | text-dark |
|
|
216
|
-
| function/default/solid | bg-function-default-solid |
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
## 5. Files Reference
|
|
221
|
-
|
|
222
|
-
| File | Purpose |
|
|
223
|
-
|------|---------|
|
|
224
|
-
| `utils.js` | Generate Tailwind color config |
|
|
225
|
-
| `presets/colors.js` | Tailwind theme extend |
|
|
226
|
-
| `themes/variable_lasted.css` | **Figma export (source)** — imported in global.css |
|
|
227
|
-
| `themes/variable.css` | Figma export (legacy) |
|
|
228
|
-
| `themes/{theme}/state.css` | Maps --state-color-* → var(--state-*-{theme}) |
|
|
229
|
-
| `themes/{theme}/palette.css` | Maps ramps → var(--ramps-*-{theme}) |
|
|
230
|
-
| `themes/{theme}/color.css` | Maps semantic colors → var(--*-{theme}) |
|
|
231
|
-
| `themes/{theme}/transparent.css` | Maps transparency → var(--transparency-*-{theme}) |
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
:root[data-theme="skyller"] {
|
|
2
|
-
/* ------------------------------------------------------------------ */
|
|
3
|
-
/* Semantic Colors — from variable_lasted.css */
|
|
4
|
-
/* ------------------------------------------------------------------ */
|
|
5
|
-
|
|
6
|
-
/* Input */
|
|
7
|
-
--input-color-default-text: var(--input-default-text-skyller);
|
|
8
|
-
--input-color-default-stroke: var(--input-default-stroke-skyller);
|
|
9
|
-
--input-color-filled-text: var(--input-filled-text-skyller);
|
|
10
|
-
--input-color-active-stroke: var(--input-active-stroke-skyller);
|
|
11
|
-
--input-color-disable-text: var(--input-disable-text-skyller);
|
|
12
|
-
--input-color-disable-stroke: var(--input-disable-stroke-skyller);
|
|
13
|
-
--input-color-disable-bg: var(--input-disable-bg-skyller);
|
|
14
|
-
--input-color-label-bg: var(--input-label-bg-skyller);
|
|
15
|
-
--input-color-error: var(--input-error-skyller);
|
|
16
|
-
|
|
17
|
-
/* Function button */
|
|
18
|
-
--function-default-solid: var(--function-default-solid-skyller);
|
|
19
|
-
--function-default-hover: var(--function-default-hover-skyller);
|
|
20
|
-
--function-default-hover-bg: var(--function-default-hover-bg-skyller);
|
|
21
|
-
--function-default-stroke: var(--function-default-stroke-skyller);
|
|
22
|
-
--function-default-icon: var(--function-default-icon-skyller);
|
|
23
|
-
--function-default-outline-icon: var(--function-default-outline-icon-skyller);
|
|
24
|
-
--function-active-solid: var(--function-active-solid-skyller);
|
|
25
|
-
--function-active-hover: var(--function-active-hover-skyller);
|
|
26
|
-
--function-active-hover-bg: var(--function-active-hover-bg-skyller);
|
|
27
|
-
--function-active-stroke: var(--function-active-stroke-skyller);
|
|
28
|
-
--function-active-icon: var(--function-active-icon-skyller);
|
|
29
|
-
|
|
30
|
-
/* Text */
|
|
31
|
-
--text-black: var(--text-black-skyller);
|
|
32
|
-
--text-dark: var(--text-dark-skyller);
|
|
33
|
-
--text-medium: var(--text-medium-skyller);
|
|
34
|
-
--text-light: var(--text-light-skyller);
|
|
35
|
-
--text-grey-dark: var(--text-grey-dark-skyller);
|
|
36
|
-
--text-grey-medium: var(--text-grey-medium-skyller);
|
|
37
|
-
--text-grey-light: var(--text-grey-light-skyller);
|
|
38
|
-
--text-white: var(--text-white-skyller);
|
|
39
|
-
|
|
40
|
-
/* Base */
|
|
41
|
-
--base-color-bg: var(--base-bg-bg1-skyller);
|
|
42
|
-
--base-color-bg2: var(--base-bg-bg2-skyller);
|
|
43
|
-
--base-color-bg3: var(--base-bg-bg3-skyller);
|
|
44
|
-
--base-color-workspace-stroke: var(--base-bg-stroke1-skyller);
|
|
45
|
-
--base-color-guideline-stroke: var(--base-bg-stroke2-skyller);
|
|
46
|
-
--base-color-popup: var(--base-modal-modal-skyller);
|
|
47
|
-
--base-color-popup-hightlight: var(--base-modal-modal-hightlight-skyller);
|
|
48
|
-
--base-color-popup-curtain: var(--base-modal-modal-curtain-skyller);
|
|
49
|
-
--common-white: var(--common-white-skyller);
|
|
50
|
-
--common-black: var(--common-black-skyller);
|
|
51
|
-
|
|
52
|
-
/* Addon */
|
|
53
|
-
--background: var(--base-color-bg);
|
|
54
|
-
--foreground: var(--common-black);
|
|
55
|
-
|
|
56
|
-
--primary: var(--ramps-primary-100-skyller);
|
|
57
|
-
--secondary: var(--ramps-secondary-100-skyller);
|
|
58
|
-
--tertiary: var(--ramps-tertiary-100-skyller);
|
|
59
|
-
--info: var(--info-info-100);
|
|
60
|
-
--success: var(--success-success-100);
|
|
61
|
-
--warning: var(--warning-warning-100);
|
|
62
|
-
--error: var(--error-error-100);
|
|
63
|
-
--grey: var(--grey-grey-100);
|
|
64
|
-
--grey2: var(--grey2-grey2-100);
|
|
65
|
-
|
|
66
|
-
--primary-foreground: var(--state-color-primary-text-solid);
|
|
67
|
-
--secondary-foreground: var(--state-color-secondary-text-solid);
|
|
68
|
-
--tertiary-foreground: var(--state-color-tertiary-text-solid);
|
|
69
|
-
--info-foreground: var(--state-color-info-text-solid);
|
|
70
|
-
--success-foreground: var(--state-color-success-text-solid);
|
|
71
|
-
--warning-foreground: var(--state-color-warning-text-solid);
|
|
72
|
-
--error-foreground: var(--state-color-error-text-solid);
|
|
73
|
-
--grey-foreground: var(--common-black);
|
|
74
|
-
--grey2-foreground: var(--common-black);
|
|
75
|
-
|
|
76
|
-
--surface: var(--base-color-bg);
|
|
77
|
-
--surface-foreground: var(--common-black);
|
|
78
|
-
--base-color-popup-foreground: var(--text-dark);
|
|
79
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
:root[data-theme="skyller"] {
|
|
2
|
-
/* --------------------------------------------------------------------------------- */
|
|
3
|
-
/* Action Button Component Tokens */
|
|
4
|
-
/* --------------------------------------------------------------------------------- */
|
|
5
|
-
/* Naming Convention: --[component]-[mode]-[state]-[property] */
|
|
6
|
-
/* Mode: [solid, outline, icon] */
|
|
7
|
-
/* States: [default, hover, pressed, active, active-pressed active-hover disabled] */
|
|
8
|
-
/* --------------------------------------------------------------------------------- */
|
|
9
|
-
|
|
10
|
-
/* ------------------------------------------------------------------ */
|
|
11
|
-
/* Solid Mode */
|
|
12
|
-
/* ------------------------------------------------------------------ */
|
|
13
|
-
|
|
14
|
-
--action-button-solid-default-bg: var(--function-default-solid);
|
|
15
|
-
--action-button-solid-default-border: var(--function-default-solid);
|
|
16
|
-
--action-button-solid-default-text: var(--function-default-icon);
|
|
17
|
-
|
|
18
|
-
--action-button-solid-hover-bg: var(--function-default-hover);
|
|
19
|
-
--action-button-solid-hover-border: var(--function-default-hover);
|
|
20
|
-
--action-button-solid-hover-text: var(--function-default-icon);
|
|
21
|
-
|
|
22
|
-
--action-button-solid-pressed-bg: var(--function-default-solid);
|
|
23
|
-
--action-button-solid-pressed-border: var(--function-default-solid);
|
|
24
|
-
--action-button-solid-pressed-text: var(--function-default-icon);
|
|
25
|
-
|
|
26
|
-
--action-button-solid-active-bg: var(--function-active-solid);
|
|
27
|
-
--action-button-solid-active-border: var(--function-active-solid);
|
|
28
|
-
--action-button-solid-active-text: var(--function-active-icon);
|
|
29
|
-
|
|
30
|
-
--action-button-solid-active-hover-bg: var(--function-active-hover);
|
|
31
|
-
--action-button-solid-active-hover-border: var(--function-active-hover);
|
|
32
|
-
--action-button-solid-active-hover-text: var(--function-active-icon);
|
|
33
|
-
|
|
34
|
-
--action-button-solid-active-pressed-bg: var(--function-active-solid);
|
|
35
|
-
--action-button-solid-active-pressed-border: var(--function-active-solid);
|
|
36
|
-
--action-button-solid-active-pressed-text: var(--function-active-icon);
|
|
37
|
-
|
|
38
|
-
/* ------------------------------------------------------------------ */
|
|
39
|
-
/* Outline Mode */
|
|
40
|
-
/* ------------------------------------------------------------------ */
|
|
41
|
-
|
|
42
|
-
--action-button-outline-default-border: var(--function-default-stroke);
|
|
43
|
-
--action-button-outline-default-text: var(--function-default-outline-icon);
|
|
44
|
-
|
|
45
|
-
--action-button-outline-hover-bg: var(--function-default-hover-bg);
|
|
46
|
-
--action-button-outline-hover-border: var(--function-default-hover);
|
|
47
|
-
--action-button-outline-hover-text: var(--function-default-hover);
|
|
48
|
-
|
|
49
|
-
--action-button-outline-pressed-bg: var(--function-default-hover-bg);
|
|
50
|
-
--action-button-outline-pressed-border: var(--function-default-stroke);
|
|
51
|
-
--action-button-outline-pressed-text: var(--function-default-outline-icon);
|
|
52
|
-
|
|
53
|
-
--action-button-outline-active-border: var(--function-active-stroke);
|
|
54
|
-
--action-button-outline-active-text: var(--function-active-solid);
|
|
55
|
-
|
|
56
|
-
--action-button-outline-active-hover-bg: var(--function-active-hover-bg);
|
|
57
|
-
--action-button-outline-active-hover-border: var(--function-active-hover);
|
|
58
|
-
--action-button-outline-active-hover-text: var(--function-active-hover);
|
|
59
|
-
|
|
60
|
-
--action-button-outline-active-pressed-bg: var(--function-active-hover-bg);
|
|
61
|
-
--action-button-outline-active-pressed-border: var(--function-active-stroke);
|
|
62
|
-
--action-button-outline-active-pressed-text: var(--function-active-solid);
|
|
63
|
-
|
|
64
|
-
/* ------------------------------------------------------------------ */
|
|
65
|
-
/* Icon Mode */
|
|
66
|
-
/* ------------------------------------------------------------------ */
|
|
67
|
-
|
|
68
|
-
--action-button-icon-default-text: var(--function-default-outline-icon);
|
|
69
|
-
|
|
70
|
-
--action-button-icon-hover-bg: var(--function-default-hover-bg);
|
|
71
|
-
--action-button-icon-hover-text: var(--function-default-hover);
|
|
72
|
-
|
|
73
|
-
--action-button-icon-pressed-text: var(--function-default-outline-icon);
|
|
74
|
-
|
|
75
|
-
--action-button-icon-active-text: var(--function-active-solid);
|
|
76
|
-
|
|
77
|
-
--action-button-icon-active-hover-bg: var(--function-active-hover-bg);
|
|
78
|
-
--action-button-icon-active-hover-text: var(--function-active-hover);
|
|
79
|
-
|
|
80
|
-
--action-button-icon-active-pressed-text: var(--function-active-solid);
|
|
81
|
-
}
|