@servicetitan/hammer-token 0.0.0-rc-1.47.0-20251104205759 → 0.0.0-rc-3.0.0-20260114215531
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/CHANGELOG.md +29 -1
- package/README.md +222 -0
- package/build/web/core/component-variables.scss +114 -130
- package/build/web/core/component.d.ts +65 -0
- package/build/web/core/component.js +248 -267
- package/build/web/core/component.scss +63 -69
- package/build/web/core/css-utils/a2-border.css +39 -41
- package/build/web/core/css-utils/a2-color.css +351 -227
- package/build/web/core/css-utils/a2-font.css +0 -2
- package/build/web/core/css-utils/a2-spacing.css +0 -2
- package/build/web/core/css-utils/a2-utils.css +418 -292
- package/build/web/core/css-utils/border.css +39 -41
- package/build/web/core/css-utils/color.css +351 -227
- package/build/web/core/css-utils/font.css +0 -2
- package/build/web/core/css-utils/spacing.css +0 -2
- package/build/web/core/css-utils/utils.css +418 -292
- package/build/web/core/index.d.ts +6 -0
- package/build/web/core/index.js +1 -1
- package/build/web/core/primitive-variables.scss +130 -71
- package/build/web/core/primitive.d.ts +185 -0
- package/build/web/core/primitive.js +328 -72
- package/build/web/core/primitive.scss +183 -124
- package/build/web/core/semantic-variables.scss +287 -220
- package/build/web/core/semantic.d.ts +194 -0
- package/build/web/core/semantic.js +875 -347
- package/build/web/core/semantic.scss +192 -140
- package/build/web/index.d.ts +3 -4
- package/build/web/index.js +0 -1
- package/build/web/types.d.ts +17 -0
- package/config.js +121 -496
- package/package.json +5 -4
- package/src/global/primitive/breakpoint.tokens.json +39 -0
- package/src/global/primitive/color.tokens.json +536 -0
- package/src/global/primitive/duration.tokens.json +32 -0
- package/src/global/primitive/font.tokens.json +103 -0
- package/src/global/primitive/radius.tokens.json +67 -0
- package/src/global/primitive/size.tokens.json +123 -0
- package/src/global/primitive/transition.tokens.json +20 -0
- package/src/theme/core/background.tokens.json +981 -0
- package/src/theme/core/border.tokens.json +148 -0
- package/src/theme/core/charts.tokens.json +802 -0
- package/src/theme/core/component/button.tokens.json +752 -0
- package/src/theme/core/component/checkbox.tokens.json +292 -0
- package/src/theme/core/focus.tokens.json +48 -0
- package/src/theme/core/foreground.tokens.json +288 -0
- package/src/theme/core/shadow.tokens.json +43 -0
- package/src/theme/core/status.tokens.json +70 -0
- package/src/theme/core/typography.tokens.json +100 -0
- package/src/utils/copy-css-utils-cli.js +13 -0
- package/src/utils/css-utils-format-utils.js +98 -1
- package/src/utils/sd-build-configs.js +372 -0
- package/src/utils/sd-formats.js +752 -0
- package/src/utils/sd-transforms.js +126 -0
- package/src/utils/token-helpers.js +555 -0
- package/tsconfig.json +18 -0
- package/.turbo/turbo-build.log +0 -37
- package/build/web/core/raw.js +0 -234
- package/src/global/primitive/breakpoint.js +0 -19
- package/src/global/primitive/color.js +0 -231
- package/src/global/primitive/duration.js +0 -16
- package/src/global/primitive/font.js +0 -60
- package/src/global/primitive/radius.js +0 -31
- package/src/global/primitive/size.js +0 -55
- package/src/global/primitive/transition.js +0 -16
- package/src/theme/core/background.js +0 -170
- package/src/theme/core/border.js +0 -103
- package/src/theme/core/charts.js +0 -464
- package/src/theme/core/component/button.js +0 -708
- package/src/theme/core/component/checkbox.js +0 -405
- package/src/theme/core/focus.js +0 -35
- package/src/theme/core/foreground.js +0 -148
- package/src/theme/core/overlay.js +0 -137
- package/src/theme/core/shadow.js +0 -29
- package/src/theme/core/status.js +0 -49
- package/src/theme/core/typography.js +0 -82
- package/type/types.ts +0 -344
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
# @servicetitan/hammer-token
|
|
2
2
|
|
|
3
|
-
## 0.0.0-rc-
|
|
3
|
+
## 0.0.0-rc-3.0.0-20260114215531
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Expansion of color ramp
|
|
8
|
+
|
|
9
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Renaming of interactive tokens for clarity and better typeahead support
|
|
10
|
+
|
|
11
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Prefix of `a2-` is added for all CSS variables
|
|
12
|
+
|
|
13
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Charts stroke token is now split into StrokeStyle and StrokeColor for clarity
|
|
14
|
+
|
|
15
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] JS import object changed to match DTCG format
|
|
16
|
+
|
|
17
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Prefix all CSS variables with `a2-` to prevent naming collisions (e.g., `--color-primary` becomes `--a2-color-primary`).
|
|
18
|
+
|
|
19
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Renamed types exported for clarity of use
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Add new component tokens for Button.
|
|
24
|
+
|
|
25
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Update Anvil2 token usages
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- [#1734](https://github.com/servicetitan/hammer/pull/1734) [`c960a4c`](https://github.com/servicetitan/hammer/commit/c960a4c88d22c7f508b79ac342c8f00eec46ace9) Thanks [@tounsoo](https://github.com/tounsoo)! - [Tokens] Fix various token configuration, formatting, and SCSS generation issues
|
|
30
|
+
|
|
31
|
+
## 2.5.1
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
6
34
|
|
package/README.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# @servicetitan/hammer-token
|
|
2
|
+
|
|
3
|
+
Design token system for the Hammer design system, built with [Style Dictionary v5](https://styledictionary.com/) and the [Design Tokens Community Group (DTCG) format](https://www.designtokens.org/tr/2025.10/format/).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This package transforms design tokens from JSON source files into multiple output formats for use across web applications. It generates JavaScript modules, SCSS variables, CSS utility classes, and TypeScript definitions to support both runtime and build-time token consumption.
|
|
8
|
+
|
|
9
|
+
## Build Output (`/build/web`)
|
|
10
|
+
|
|
11
|
+
The build process generates files in `/build/web` organized as follows:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
build/web/
|
|
15
|
+
├── index.js # Main entry point
|
|
16
|
+
├── index.d.ts # TypeScript definitions
|
|
17
|
+
├── types.d.ts # Core types (TokenObj, Token)
|
|
18
|
+
└── core/
|
|
19
|
+
├── primitive.js # Primitive tokens (JS)
|
|
20
|
+
├── primitive.scss # Primitive tokens (SCSS)
|
|
21
|
+
├── primitive-variables.scss # Primitive tokens map (SCSS)
|
|
22
|
+
├── primitive.d.ts # Primitive tokens (TypeScript)
|
|
23
|
+
├── semantic.js # Semantic tokens (JS)
|
|
24
|
+
├── semantic.scss # Semantic tokens (SCSS)
|
|
25
|
+
├── semantic-variables.scss # Semantic tokens map (SCSS)
|
|
26
|
+
├── semantic.d.ts # Semantic tokens (TypeScript)
|
|
27
|
+
├── component.js # Component tokens (JS)
|
|
28
|
+
├── component.scss # Component tokens (SCSS)
|
|
29
|
+
├── component-variables.scss # Component tokens map (SCSS)
|
|
30
|
+
├── component.d.ts # Component tokens (TypeScript)
|
|
31
|
+
├── index.js # Core index
|
|
32
|
+
├── index.d.ts # Core TypeScript definitions
|
|
33
|
+
└── css-utils/ # CSS utility classes
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### File Types
|
|
37
|
+
|
|
38
|
+
#### `*-variables.scss` Files
|
|
39
|
+
|
|
40
|
+
These files contain SCSS maps used for mapping in `ThemeProvider.module.scss`. They provide structured token data organized by appearance variants (light/dark) and token categories.
|
|
41
|
+
|
|
42
|
+
#### `*.js` Files
|
|
43
|
+
|
|
44
|
+
JavaScript modules for importing tokens in JavaScript/TypeScript code. Each token is exported as a named constant with its value and appearance extensions.
|
|
45
|
+
|
|
46
|
+
**Example:**
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
import { BackgroundColorPrimary } from "@servicetitan/hammer-token/build/web/core/semantic";
|
|
50
|
+
|
|
51
|
+
// Token structure:
|
|
52
|
+
// {
|
|
53
|
+
// value: "#0265dc",
|
|
54
|
+
// extensions: {
|
|
55
|
+
// appearance: {
|
|
56
|
+
// dark: {
|
|
57
|
+
// value: "#78bbfa"
|
|
58
|
+
// }
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
61
|
+
// }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
> **Caution**: JavaScript tokens return static resolved values at build time. These values are not affected by CSS variable changes at runtime. If you need dynamic theming that responds to CSS variable changes, use the `*.scss` files instead.
|
|
65
|
+
|
|
66
|
+
#### `*.scss` Files
|
|
67
|
+
|
|
68
|
+
SCSS variable files for importing in SCSS stylesheets. Variables use CSS custom properties with fallback values, supporting recursive reference chains and `light-dark()` for dark mode.
|
|
69
|
+
|
|
70
|
+
#### `.d.ts` Files (TypeScript Definitions)
|
|
71
|
+
|
|
72
|
+
Auto-generated TypeScript definition files provide type safety for token imports. We use a unified `TokenObj` type for all exports.
|
|
73
|
+
|
|
74
|
+
**Example generated types:**
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// component.d.ts
|
|
78
|
+
import { TokenObj } from "../types";
|
|
79
|
+
|
|
80
|
+
export declare const ButtonPrimaryBackgroundColor: TokenObj;
|
|
81
|
+
export declare const ButtonPrimaryBorderRadius: TokenObj;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## CSS Variable Prefix
|
|
85
|
+
|
|
86
|
+
All generated CSS variable names include a configurable prefix to avoid naming conflicts with other design systems or libraries. By default, the prefix is `a2-`.
|
|
87
|
+
|
|
88
|
+
## Configuration File (`config.js`)
|
|
89
|
+
|
|
90
|
+
The main configuration file orchestrates the entire build process using [Style Dictionary v5](https://styledictionary.com/).
|
|
91
|
+
|
|
92
|
+
### Build Process
|
|
93
|
+
|
|
94
|
+
The configuration executes three sequential builds:
|
|
95
|
+
|
|
96
|
+
1. **Primitive Tokens Build**: Foundational values (colors, spacing, etc.)
|
|
97
|
+
2. **Theme Tokens Build**: Decision-based tokens (semantic)
|
|
98
|
+
3. **Component Tokens Build**: Component-specific tokens
|
|
99
|
+
|
|
100
|
+
## Utility Files (`src/utils/`)
|
|
101
|
+
|
|
102
|
+
### `token-helpers.js`
|
|
103
|
+
|
|
104
|
+
Core helper functions for working with DTCG format tokens.
|
|
105
|
+
|
|
106
|
+
**Smart Reference Resolution**: Includes logic to automatically resolve references to groups (e.g., `{background.color.primary}`) by falling back to a nested `.$root` token if the exact path isn't found.
|
|
107
|
+
|
|
108
|
+
### `sd-transforms.js`
|
|
109
|
+
|
|
110
|
+
Style Dictionary transform registrations:
|
|
111
|
+
|
|
112
|
+
- **`dtcg/name`**: Transforms token paths to kebab-case names, filtering out `$root` and `$schema`.
|
|
113
|
+
- **`dtcg/value`**: Handles dimension tokens by combining `value` and `unit` properties.
|
|
114
|
+
|
|
115
|
+
## Token Structure
|
|
116
|
+
|
|
117
|
+
Tokens follow the [Design Tokens Community Group (DTCG) format](https://www.designtokens.org/tr/2025.10/format/).
|
|
118
|
+
|
|
119
|
+
### Standard Color Token
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"$type": "color",
|
|
124
|
+
"$value": "#0265dc",
|
|
125
|
+
"$extensions": {
|
|
126
|
+
"appearance": {
|
|
127
|
+
"dark": {
|
|
128
|
+
"$value": "#78bbfa"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Dimension Token
|
|
136
|
+
|
|
137
|
+
Dimension tokens (sizes, radii, breakpoints) use a nested object for the value:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"$type": "dimension",
|
|
142
|
+
"$value": {
|
|
143
|
+
"value": 0.5,
|
|
144
|
+
"unit": "rem"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### The $root Pattern
|
|
150
|
+
|
|
151
|
+
The `$root` pattern is a core convention in our **DTCG format standard**. It solves a fundamental challenge in design token systems: allowing a "group" (a category or semantic concept) to have its own primary value while still acting as a container for related sub-tokens (such as interactive states or functional variants).
|
|
152
|
+
|
|
153
|
+
#### Why we use it
|
|
154
|
+
|
|
155
|
+
In a standard nested structure, if a node has a `$value`, it is treated as a leaf token, and tools often ignore its children. Conversely, a group without a `$value` cannot be referenced directly. The `$root` pattern bridges this gap by explicitly defining the "default" or "base" value of a group.
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
"primary": {
|
|
159
|
+
"$root": {
|
|
160
|
+
"$type": "color",
|
|
161
|
+
"$value": "{color.blue.500}"
|
|
162
|
+
},
|
|
163
|
+
"hover": {
|
|
164
|
+
"$type": "color",
|
|
165
|
+
"$value": "{color.blue.600}"
|
|
166
|
+
},
|
|
167
|
+
"active": {
|
|
168
|
+
"$type": "color",
|
|
169
|
+
"$value": "{color.blue.700}"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
#### Key Benefits & Behavior
|
|
175
|
+
|
|
176
|
+
1. **DTCG Compliance**: By using `$root` (a reserved property starting with `$`), we remain compatible with DTCG parsing logic while clearly distinguishing the base token from its semantic children.
|
|
177
|
+
2. **Cleaner Reference Syntax**: Our build system includes smart resolution that allows you to reference the group name directly (e.g., `{background.color.primary}`). You don't need to append `.$root` in your JSON source files.
|
|
178
|
+
3. **State & Variant Support**: It allows us to keep interactive states like `.hover` and `.active` logically nested within the parent token they modify, rather than flattening them into a messy global list.
|
|
179
|
+
4. **Automatic Naming Cleanup**: During the transformation process, the `$root` segment is automatically stripped from the path. This ensures that the generated CSS variables and JS exports maintain a clean, flat naming convention (e.g., `--a2-background-color-primary` instead of `--a2-background-color-primary-root`).
|
|
180
|
+
|
|
181
|
+
## Token Naming Conventions
|
|
182
|
+
|
|
183
|
+
### Naming Transformation Rules
|
|
184
|
+
|
|
185
|
+
1. **Path to Name**: JSON object paths are converted to PascalCase.
|
|
186
|
+
2. **Special Segments**: `$root` segments are removed from the path (e.g., `background.color.default.$root` → `BackgroundColorDefault`).
|
|
187
|
+
3. **State Suffixes**: State names (hover, active) are capitalized and appended.
|
|
188
|
+
|
|
189
|
+
## Development
|
|
190
|
+
|
|
191
|
+
### Adding New Tokens
|
|
192
|
+
|
|
193
|
+
1. Add token JSON files to `src/global/primitive/` (primitives) or `src/theme/core/` (semantic/component)
|
|
194
|
+
2. Run `pnpm build` to regenerate output files
|
|
195
|
+
3. Import tokens in your code using the generated files
|
|
196
|
+
|
|
197
|
+
### Modifying Build Output
|
|
198
|
+
|
|
199
|
+
- **Transforms**: Edit `src/utils/sd-transforms.js`
|
|
200
|
+
- **Formats**: Edit `src/utils/sd-formats.js`
|
|
201
|
+
- **Build Configs**: Edit `src/utils/sd-build-configs.js`
|
|
202
|
+
- **CSS Utils**: Edit `src/utils/css-utils-format-utils.js`
|
|
203
|
+
|
|
204
|
+
## Troubleshooting
|
|
205
|
+
|
|
206
|
+
### Console Reference Errors
|
|
207
|
+
|
|
208
|
+
During the build process (`pnpm build`), you may see "Reference Errors" in the console, such as:
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
{button.primary.foreground.color.$root} tries to reference {foreground.color.on.primary}, which is not defined.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
#### Why this happens
|
|
215
|
+
|
|
216
|
+
We use a `$root` token pattern to define a default value for a group (e.g., `background.color.primary.$root`). Standard Style Dictionary v5 validation expects references to point to an exact token path. When a component references a group like `{background.color.primary}`, Style Dictionary flags it as "not defined" because it technically points to a group container, not a leaf token.
|
|
217
|
+
|
|
218
|
+
#### Why the build is still correct
|
|
219
|
+
|
|
220
|
+
We have implemented a custom `resolveReference` helper in `src/utils/token-helpers.js`. This helper automatically detects if a reference points to a group and attempts to fall back to the `$root` token (e.g., it converts `{background.color.primary}` to `{background.color.primary.$root}` internally).
|
|
221
|
+
|
|
222
|
+
Because our custom output formats use this helper, the **generated files (JS, SCSS, CSS) are 100% correct**, even if Style Dictionary's internal validator prints warnings. You can safely ignore these specific reference errors as long as the build completes successfully and the output files contain the expected values.
|
|
@@ -1,139 +1,123 @@
|
|
|
1
1
|
$light: (
|
|
2
|
-
button-primary-foreground-color: #ffffff,
|
|
3
|
-
button-primary-foreground-color-hover: #ffffff,
|
|
4
|
-
button-primary-foreground-color-active: #ffffff,
|
|
5
|
-
button-primary-background-color: #
|
|
6
|
-
button-primary-background-color-hover: #
|
|
7
|
-
button-primary-background-color-active: #
|
|
8
|
-
button-primary-border-color:
|
|
9
|
-
button-primary-focus-ring-color: #
|
|
10
|
-
button-secondary-foreground-color: #
|
|
11
|
-
button-secondary-foreground-color-hover: #
|
|
12
|
-
button-secondary-foreground-color-active: #
|
|
13
|
-
button-secondary-background-color: #
|
|
14
|
-
button-secondary-background-color-hover: #
|
|
15
|
-
button-secondary-background-color-active: #
|
|
16
|
-
button-secondary-border-color:
|
|
17
|
-
button-secondary-focus-ring-color: #
|
|
18
|
-
button-ghost-foreground-color: #
|
|
19
|
-
button-ghost-foreground-color-hover: #
|
|
20
|
-
button-ghost-foreground-color-active: #
|
|
21
|
-
button-ghost-background-color:
|
|
22
|
-
button-ghost-background-color-hover: #
|
|
23
|
-
button-ghost-background-color-active: #
|
|
24
|
-
button-ghost-border-color:
|
|
25
|
-
button-ghost-focus-ring-color: #
|
|
26
|
-
button-danger-primary-foreground-color: #ffffff,
|
|
27
|
-
button-danger-primary-foreground-color-hover: #ffffff,
|
|
28
|
-
button-danger-primary-foreground-color-active: #ffffff,
|
|
29
|
-
button-danger-primary-background-color: #
|
|
30
|
-
button-danger-primary-background-color-hover: #
|
|
31
|
-
button-danger-primary-background-color-active: #
|
|
32
|
-
button-danger-primary-border-color:
|
|
33
|
-
button-danger-primary-focus-ring-color: #
|
|
34
|
-
button-danger-secondary-foreground-color: #
|
|
35
|
-
button-danger-secondary-foreground-color-hover: #
|
|
36
|
-
button-danger-secondary-foreground-color-active: #
|
|
37
|
-
button-danger-secondary-background-color: #
|
|
38
|
-
button-danger-secondary-background-color-hover: #
|
|
39
|
-
button-danger-secondary-background-color-active: #
|
|
40
|
-
button-danger-secondary-border-color:
|
|
41
|
-
button-danger-secondary-focus-ring-color: #
|
|
42
|
-
checkbox-
|
|
43
|
-
checkbox-
|
|
44
|
-
checkbox-
|
|
45
|
-
checkbox-
|
|
46
|
-
checkbox-
|
|
47
|
-
checkbox-unchecked-background-color-
|
|
48
|
-
checkbox-
|
|
49
|
-
checkbox-checked-
|
|
50
|
-
checkbox-checked-
|
|
51
|
-
checkbox-checked-
|
|
52
|
-
checkbox-checked-background-color-hover: #
|
|
53
|
-
checkbox-checked-
|
|
54
|
-
checkbox-unchecked-error-
|
|
55
|
-
checkbox-unchecked-error-
|
|
56
|
-
checkbox-unchecked-error-fill-color-active: #bf2a00,
|
|
57
|
-
checkbox-unchecked-error-background-color-default: transparent,
|
|
58
|
-
checkbox-unchecked-error-background-color-hover: #e132120f,
|
|
59
|
-
checkbox-unchecked-error-background-color-active: #e132122e,
|
|
60
|
-
checkbox-checked-error-fill-color-default: #e13212,
|
|
61
|
-
checkbox-checked-error-fill-color-hover: #bf2a00,
|
|
62
|
-
checkbox-checked-error-fill-color-active: #bf2a00,
|
|
63
|
-
checkbox-checked-error-background-color-default: transparent,
|
|
64
|
-
checkbox-checked-error-background-color-hover: #e132120f,
|
|
65
|
-
checkbox-checked-error-background-color-active: #e132122e,
|
|
2
|
+
button-primary-foreground-color: var(--a2-color-neutral-0, #ffffff),
|
|
3
|
+
button-primary-foreground-color-hover: var(--a2-color-neutral-0, #ffffff),
|
|
4
|
+
button-primary-foreground-color-active: var(--a2-color-neutral-0, #ffffff),
|
|
5
|
+
button-primary-background-color: var(--a2-color-blue-500, #1a82ff),
|
|
6
|
+
button-primary-background-color-hover: var(--a2-color-blue-600, #0065de),
|
|
7
|
+
button-primary-background-color-active: var(--a2-color-blue-700, #004da9),
|
|
8
|
+
button-primary-border-color: "rgba(0, 0, 0, 0)",
|
|
9
|
+
button-primary-focus-ring-color: var(--a2-color-blue-500, #1a82ff),
|
|
10
|
+
button-secondary-foreground-color: var(--a2-color-neutral-950, #040404),
|
|
11
|
+
button-secondary-foreground-color-hover: var(--a2-color-neutral-950, #040404),
|
|
12
|
+
button-secondary-foreground-color-active: var(--a2-color-neutral-950, #040404),
|
|
13
|
+
button-secondary-background-color: #0404040F,
|
|
14
|
+
button-secondary-background-color-hover: #04040414,
|
|
15
|
+
button-secondary-background-color-active: #04040429,
|
|
16
|
+
button-secondary-border-color: "rgba(0, 0, 0, 0)",
|
|
17
|
+
button-secondary-focus-ring-color: var(--a2-color-blue-500, #1a82ff),
|
|
18
|
+
button-ghost-foreground-color: var(--a2-color-neutral-950, #040404),
|
|
19
|
+
button-ghost-foreground-color-hover: var(--a2-color-neutral-950, #040404),
|
|
20
|
+
button-ghost-foreground-color-active: var(--a2-color-neutral-950, #040404),
|
|
21
|
+
button-ghost-background-color: "rgba(0, 0, 0, 0)",
|
|
22
|
+
button-ghost-background-color-hover: #8b8b8b14,
|
|
23
|
+
button-ghost-background-color-active: #8b8b8b29,
|
|
24
|
+
button-ghost-border-color: "rgba(0, 0, 0, 0)",
|
|
25
|
+
button-ghost-focus-ring-color: var(--a2-color-blue-500, #1a82ff),
|
|
26
|
+
button-danger-primary-foreground-color: var(--a2-color-neutral-0, #ffffff),
|
|
27
|
+
button-danger-primary-foreground-color-hover: var(--a2-color-neutral-0, #ffffff),
|
|
28
|
+
button-danger-primary-foreground-color-active: var(--a2-color-neutral-0, #ffffff),
|
|
29
|
+
button-danger-primary-background-color: var(--a2-color-red-500, #ff3914),
|
|
30
|
+
button-danger-primary-background-color-hover: var(--a2-color-red-600, #d62100),
|
|
31
|
+
button-danger-primary-background-color-active: var(--a2-color-red-700, #a31900),
|
|
32
|
+
button-danger-primary-border-color: "rgba(0, 0, 0, 0)",
|
|
33
|
+
button-danger-primary-focus-ring-color: var(--a2-color-red-500, #ff3914),
|
|
34
|
+
button-danger-secondary-foreground-color: var(--a2-color-red-600, #d62100),
|
|
35
|
+
button-danger-secondary-foreground-color-hover: var(--a2-color-red-600, #d62100),
|
|
36
|
+
button-danger-secondary-foreground-color-active: var(--a2-color-red-600, #d62100),
|
|
37
|
+
button-danger-secondary-background-color: var(--a2-color-red-100, #ffd4cc),
|
|
38
|
+
button-danger-secondary-background-color-hover: var(--a2-color-red-200, #ffac9e),
|
|
39
|
+
button-danger-secondary-background-color-active: var(--a2-color-red-300, #ff8974),
|
|
40
|
+
button-danger-secondary-border-color: "rgba(0, 0, 0, 0)",
|
|
41
|
+
button-danger-secondary-focus-ring-color: var(--a2-color-red-500, #ff3914),
|
|
42
|
+
checkbox-checked-foreground-color: var(--a2-color-blue-500, #1a82ff),
|
|
43
|
+
checkbox-checked-foreground-color-hover: var(--a2-color-blue-600, #0065de),
|
|
44
|
+
checkbox-checked-foreground-color-active: var(--a2-color-blue-600, #0065de),
|
|
45
|
+
checkbox-checked-background-color-hover: #1a82ff1A,
|
|
46
|
+
checkbox-checked-focus-ring-color: var(--a2-color-blue-500, #1a82ff),
|
|
47
|
+
checkbox-unchecked-background-color-hover: #8b8b8b14,
|
|
48
|
+
checkbox-unchecked-focus-ring-color: var(--a2-color-blue-500, #1a82ff),
|
|
49
|
+
checkbox-checked-error-foreground-color: var(--a2-color-red-500, #ff3914),
|
|
50
|
+
checkbox-checked-error-foreground-color-hover: var(--a2-color-red-600, #d62100),
|
|
51
|
+
checkbox-checked-error-foreground-color-active: var(--a2-color-red-600, #d62100),
|
|
52
|
+
checkbox-checked-error-background-color-hover: #ff39141A,
|
|
53
|
+
checkbox-checked-error-focus-ring-color: var(--a2-color-red-500, #ff3914),
|
|
54
|
+
checkbox-unchecked-error-background-color-hover: #ff39141A,
|
|
55
|
+
checkbox-unchecked-error-focus-ring-color: var(--a2-color-red-500, #ff3914),
|
|
66
56
|
);
|
|
67
57
|
$dark: (
|
|
68
|
-
button-primary-foreground-color: #
|
|
69
|
-
button-primary-foreground-color-hover: #
|
|
70
|
-
button-primary-foreground-color-active: #
|
|
71
|
-
button-primary-background-color: #
|
|
72
|
-
button-primary-background-color-hover: #
|
|
73
|
-
button-primary-background-color-active: #
|
|
74
|
-
button-primary-border-color:
|
|
75
|
-
button-primary-focus-ring-color: #
|
|
76
|
-
button-secondary-foreground-color: #ffffff,
|
|
77
|
-
button-secondary-foreground-color-hover: #ffffff,
|
|
78
|
-
button-secondary-foreground-color-active: #ffffff,
|
|
79
|
-
button-secondary-background-color: #
|
|
80
|
-
button-secondary-background-color-hover: #
|
|
81
|
-
button-secondary-background-color-active: #
|
|
82
|
-
button-secondary-border-color:
|
|
83
|
-
button-secondary-focus-ring-color: #
|
|
84
|
-
button-ghost-foreground-color: #ffffff,
|
|
85
|
-
button-ghost-foreground-color-hover: #ffffff,
|
|
86
|
-
button-ghost-foreground-color-active: #ffffff,
|
|
87
|
-
button-ghost-background-color:
|
|
58
|
+
button-primary-foreground-color: var(--a2-color-neutral-950, #040404),
|
|
59
|
+
button-primary-foreground-color-hover: var(--a2-color-neutral-950, #040404),
|
|
60
|
+
button-primary-foreground-color-active: var(--a2-color-neutral-950, #040404),
|
|
61
|
+
button-primary-background-color: var(--a2-color-blue-300, #70b1ff),
|
|
62
|
+
button-primary-background-color-hover: var(--a2-color-blue-200, #9ecaff),
|
|
63
|
+
button-primary-background-color-active: var(--a2-color-blue-100, #cce3ff),
|
|
64
|
+
button-primary-border-color: rgba(0, 0, 0, 0),
|
|
65
|
+
button-primary-focus-ring-color: var(--a2-color-blue-300, #70b1ff),
|
|
66
|
+
button-secondary-foreground-color: var(--a2-color-neutral-0, #ffffff),
|
|
67
|
+
button-secondary-foreground-color-hover: var(--a2-color-neutral-0, #ffffff),
|
|
68
|
+
button-secondary-foreground-color-active: var(--a2-color-neutral-0, #ffffff),
|
|
69
|
+
button-secondary-background-color: #ffffff0F,
|
|
70
|
+
button-secondary-background-color-hover: #ffffff14,
|
|
71
|
+
button-secondary-background-color-active: #ffffff29,
|
|
72
|
+
button-secondary-border-color: rgba(0, 0, 0, 0),
|
|
73
|
+
button-secondary-focus-ring-color: var(--a2-color-blue-300, #70b1ff),
|
|
74
|
+
button-ghost-foreground-color: var(--a2-color-neutral-0, #ffffff),
|
|
75
|
+
button-ghost-foreground-color-hover: var(--a2-color-neutral-0, #ffffff),
|
|
76
|
+
button-ghost-foreground-color-active: var(--a2-color-neutral-0, #ffffff),
|
|
77
|
+
button-ghost-background-color: rgba(0, 0, 0, 0),
|
|
88
78
|
button-ghost-background-color-hover: #ffffff14,
|
|
89
79
|
button-ghost-background-color-active: #ffffff29,
|
|
90
|
-
button-ghost-border-color:
|
|
91
|
-
button-ghost-focus-ring-color: #
|
|
92
|
-
button-danger-primary-foreground-color: #
|
|
93
|
-
button-danger-primary-foreground-color-hover: #
|
|
94
|
-
button-danger-primary-foreground-color-active: #
|
|
95
|
-
button-danger-primary-background-color: #
|
|
96
|
-
button-danger-primary-background-color-hover: #
|
|
97
|
-
button-danger-primary-background-color-active: #
|
|
98
|
-
button-danger-primary-border-color:
|
|
99
|
-
button-danger-primary-focus-ring-color: #
|
|
100
|
-
button-danger-secondary-foreground-color: #ffffff,
|
|
101
|
-
button-danger-secondary-foreground-color-hover: #
|
|
102
|
-
button-danger-secondary-foreground-color-active: #
|
|
103
|
-
button-danger-secondary-background-color: #
|
|
104
|
-
button-danger-secondary-background-color-hover: #
|
|
105
|
-
button-danger-secondary-background-color-active: #
|
|
106
|
-
button-danger-secondary-border-color:
|
|
107
|
-
button-danger-secondary-focus-ring-color: #
|
|
108
|
-
checkbox-
|
|
109
|
-
checkbox-
|
|
110
|
-
checkbox-
|
|
111
|
-
checkbox-
|
|
80
|
+
button-ghost-border-color: rgba(0, 0, 0, 0),
|
|
81
|
+
button-ghost-focus-ring-color: var(--a2-color-blue-300, #70b1ff),
|
|
82
|
+
button-danger-primary-foreground-color: var(--a2-color-neutral-950, #040404),
|
|
83
|
+
button-danger-primary-foreground-color-hover: var(--a2-color-neutral-950, #040404),
|
|
84
|
+
button-danger-primary-foreground-color-active: var(--a2-color-neutral-950, #040404),
|
|
85
|
+
button-danger-primary-background-color: var(--a2-color-red-100, #ffd4cc),
|
|
86
|
+
button-danger-primary-background-color-hover: var(--a2-color-red-200, #ffac9e),
|
|
87
|
+
button-danger-primary-background-color-active: var(--a2-color-red-100, #ffd4cc),
|
|
88
|
+
button-danger-primary-border-color: rgba(0, 0, 0, 0),
|
|
89
|
+
button-danger-primary-focus-ring-color: var(--a2-color-red-300, #ff8974),
|
|
90
|
+
button-danger-secondary-foreground-color: var(--a2-color-neutral-0, #ffffff),
|
|
91
|
+
button-danger-secondary-foreground-color-hover: var(--a2-color-red-100, #ffd4cc),
|
|
92
|
+
button-danger-secondary-foreground-color-active: var(--a2-color-red-100, #ffd4cc),
|
|
93
|
+
button-danger-secondary-background-color: #ff897433,
|
|
94
|
+
button-danger-secondary-background-color-hover: var(--a2-color-red-600, #d62100),
|
|
95
|
+
button-danger-secondary-background-color-active: var(--a2-color-red-800, #731100),
|
|
96
|
+
button-danger-secondary-border-color: rgba(0, 0, 0, 0),
|
|
97
|
+
button-danger-secondary-focus-ring-color: var(--a2-color-red-300, #ff8974),
|
|
98
|
+
checkbox-checked-foreground-color: var(--a2-color-blue-300, #70b1ff),
|
|
99
|
+
checkbox-checked-foreground-color-hover: var(--a2-color-blue-200, #9ecaff),
|
|
100
|
+
checkbox-checked-foreground-color-active: var(--a2-color-blue-200, #9ecaff),
|
|
101
|
+
checkbox-checked-background-color-hover: #70b1ff1A,
|
|
102
|
+
checkbox-checked-focus-ring-color: var(--a2-color-blue-300, #70b1ff),
|
|
112
103
|
checkbox-unchecked-background-color-hover: #ffffff14,
|
|
113
|
-
checkbox-unchecked-
|
|
114
|
-
checkbox-checked-
|
|
115
|
-
checkbox-checked-
|
|
116
|
-
checkbox-checked-
|
|
117
|
-
checkbox-checked-background-color-
|
|
118
|
-
checkbox-checked-
|
|
119
|
-
checkbox-
|
|
120
|
-
checkbox-unchecked-error-
|
|
121
|
-
checkbox-unchecked-error-fill-color-hover: #ff745f,
|
|
122
|
-
checkbox-unchecked-error-fill-color-active: #ff745f,
|
|
123
|
-
checkbox-unchecked-error-background-color-default: transparent,
|
|
124
|
-
checkbox-unchecked-error-background-color-hover: #f94d321a,
|
|
125
|
-
checkbox-unchecked-error-background-color-active: #f94d3240,
|
|
126
|
-
checkbox-checked-error-fill-color-default: #ff745f,
|
|
127
|
-
checkbox-checked-error-fill-color-hover: #ff745f,
|
|
128
|
-
checkbox-checked-error-fill-color-active: #ff745f,
|
|
129
|
-
checkbox-checked-error-background-color-default: transparent,
|
|
130
|
-
checkbox-checked-error-background-color-hover: #f94d321a,
|
|
131
|
-
checkbox-checked-error-background-color-active: #f94d3240,
|
|
104
|
+
checkbox-unchecked-focus-ring-color: var(--a2-color-blue-300, #70b1ff),
|
|
105
|
+
checkbox-checked-error-foreground-color: var(--a2-color-red-100, #ffd4cc),
|
|
106
|
+
checkbox-checked-error-foreground-color-hover: var(--a2-color-red-100, #ffd4cc),
|
|
107
|
+
checkbox-checked-error-foreground-color-active: var(--a2-color-red-100, #ffd4cc),
|
|
108
|
+
checkbox-checked-error-background-color-hover: #ff89741A,
|
|
109
|
+
checkbox-checked-error-focus-ring-color: var(--a2-color-red-300, #ff8974),
|
|
110
|
+
checkbox-unchecked-error-background-color-hover: #ff89741A,
|
|
111
|
+
checkbox-unchecked-error-focus-ring-color: var(--a2-color-red-300, #ff8974),
|
|
132
112
|
);
|
|
133
113
|
$nonColor: (
|
|
134
|
-
button-primary-border-radius: 0.375rem,
|
|
135
|
-
button-secondary-border-radius: 0.375rem,
|
|
136
|
-
button-ghost-border-radius: 0.375rem,
|
|
137
|
-
button-danger-primary-border-radius: 0.375rem,
|
|
138
|
-
button-danger-secondary-border-radius: 0.375rem,
|
|
114
|
+
button-primary-border-radius: var(--a2-border-radius-medium, var(--a2-radius-2, 0.375rem)),
|
|
115
|
+
button-secondary-border-radius: var(--a2-border-radius-medium, var(--a2-radius-2, 0.375rem)),
|
|
116
|
+
button-ghost-border-radius: var(--a2-border-radius-medium, var(--a2-radius-2, 0.375rem)),
|
|
117
|
+
button-danger-primary-border-radius: var(--a2-border-radius-medium, var(--a2-radius-2, 0.375rem)),
|
|
118
|
+
button-danger-secondary-border-radius: var(--a2-border-radius-medium, var(--a2-radius-2, 0.375rem)),
|
|
119
|
+
checkbox-checked-border-radius: var(--a2-border-radius-small, var(--a2-radius-1, 0.1875rem)),
|
|
120
|
+
checkbox-unchecked-border-radius: var(--a2-border-radius-small, var(--a2-radius-1, 0.1875rem)),
|
|
121
|
+
checkbox-checked-error-border-radius: var(--a2-border-radius-small, var(--a2-radius-1, 0.1875rem)),
|
|
122
|
+
checkbox-unchecked-error-border-radius: var(--a2-border-radius-small, var(--a2-radius-1, 0.1875rem)),
|
|
139
123
|
);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { TokenObj } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare const ButtonPrimaryForegroundColor: TokenObj;
|
|
4
|
+
export declare const ButtonPrimaryForegroundColorHover: TokenObj;
|
|
5
|
+
export declare const ButtonPrimaryForegroundColorActive: TokenObj;
|
|
6
|
+
export declare const ButtonPrimaryBackgroundColor: TokenObj;
|
|
7
|
+
export declare const ButtonPrimaryBackgroundColorHover: TokenObj;
|
|
8
|
+
export declare const ButtonPrimaryBackgroundColorActive: TokenObj;
|
|
9
|
+
export declare const ButtonPrimaryBorderColor: TokenObj;
|
|
10
|
+
export declare const ButtonPrimaryBorderRadius: TokenObj;
|
|
11
|
+
export declare const ButtonPrimaryFocusRingColor: TokenObj;
|
|
12
|
+
export declare const ButtonSecondaryForegroundColor: TokenObj;
|
|
13
|
+
export declare const ButtonSecondaryForegroundColorHover: TokenObj;
|
|
14
|
+
export declare const ButtonSecondaryForegroundColorActive: TokenObj;
|
|
15
|
+
export declare const ButtonSecondaryBackgroundColor: TokenObj;
|
|
16
|
+
export declare const ButtonSecondaryBackgroundColorHover: TokenObj;
|
|
17
|
+
export declare const ButtonSecondaryBackgroundColorActive: TokenObj;
|
|
18
|
+
export declare const ButtonSecondaryBorderColor: TokenObj;
|
|
19
|
+
export declare const ButtonSecondaryBorderRadius: TokenObj;
|
|
20
|
+
export declare const ButtonSecondaryFocusRingColor: TokenObj;
|
|
21
|
+
export declare const ButtonGhostForegroundColor: TokenObj;
|
|
22
|
+
export declare const ButtonGhostForegroundColorHover: TokenObj;
|
|
23
|
+
export declare const ButtonGhostForegroundColorActive: TokenObj;
|
|
24
|
+
export declare const ButtonGhostBackgroundColor: TokenObj;
|
|
25
|
+
export declare const ButtonGhostBackgroundColorHover: TokenObj;
|
|
26
|
+
export declare const ButtonGhostBackgroundColorActive: TokenObj;
|
|
27
|
+
export declare const ButtonGhostBorderColor: TokenObj;
|
|
28
|
+
export declare const ButtonGhostBorderRadius: TokenObj;
|
|
29
|
+
export declare const ButtonGhostFocusRingColor: TokenObj;
|
|
30
|
+
export declare const ButtonDangerPrimaryForegroundColor: TokenObj;
|
|
31
|
+
export declare const ButtonDangerPrimaryForegroundColorHover: TokenObj;
|
|
32
|
+
export declare const ButtonDangerPrimaryForegroundColorActive: TokenObj;
|
|
33
|
+
export declare const ButtonDangerPrimaryBackgroundColor: TokenObj;
|
|
34
|
+
export declare const ButtonDangerPrimaryBackgroundColorHover: TokenObj;
|
|
35
|
+
export declare const ButtonDangerPrimaryBackgroundColorActive: TokenObj;
|
|
36
|
+
export declare const ButtonDangerPrimaryBorderColor: TokenObj;
|
|
37
|
+
export declare const ButtonDangerPrimaryBorderRadius: TokenObj;
|
|
38
|
+
export declare const ButtonDangerPrimaryFocusRingColor: TokenObj;
|
|
39
|
+
export declare const ButtonDangerSecondaryForegroundColor: TokenObj;
|
|
40
|
+
export declare const ButtonDangerSecondaryForegroundColorHover: TokenObj;
|
|
41
|
+
export declare const ButtonDangerSecondaryForegroundColorActive: TokenObj;
|
|
42
|
+
export declare const ButtonDangerSecondaryBackgroundColor: TokenObj;
|
|
43
|
+
export declare const ButtonDangerSecondaryBackgroundColorHover: TokenObj;
|
|
44
|
+
export declare const ButtonDangerSecondaryBackgroundColorActive: TokenObj;
|
|
45
|
+
export declare const ButtonDangerSecondaryBorderColor: TokenObj;
|
|
46
|
+
export declare const ButtonDangerSecondaryBorderRadius: TokenObj;
|
|
47
|
+
export declare const ButtonDangerSecondaryFocusRingColor: TokenObj;
|
|
48
|
+
export declare const CheckboxCheckedForegroundColor: TokenObj;
|
|
49
|
+
export declare const CheckboxCheckedForegroundColorHover: TokenObj;
|
|
50
|
+
export declare const CheckboxCheckedForegroundColorActive: TokenObj;
|
|
51
|
+
export declare const CheckboxCheckedBackgroundColorHover: TokenObj;
|
|
52
|
+
export declare const CheckboxCheckedBorderRadius: TokenObj;
|
|
53
|
+
export declare const CheckboxCheckedFocusRingColor: TokenObj;
|
|
54
|
+
export declare const CheckboxUncheckedBackgroundColorHover: TokenObj;
|
|
55
|
+
export declare const CheckboxUncheckedBorderRadius: TokenObj;
|
|
56
|
+
export declare const CheckboxUncheckedFocusRingColor: TokenObj;
|
|
57
|
+
export declare const CheckboxCheckedErrorForegroundColor: TokenObj;
|
|
58
|
+
export declare const CheckboxCheckedErrorForegroundColorHover: TokenObj;
|
|
59
|
+
export declare const CheckboxCheckedErrorForegroundColorActive: TokenObj;
|
|
60
|
+
export declare const CheckboxCheckedErrorBackgroundColorHover: TokenObj;
|
|
61
|
+
export declare const CheckboxCheckedErrorBorderRadius: TokenObj;
|
|
62
|
+
export declare const CheckboxCheckedErrorFocusRingColor: TokenObj;
|
|
63
|
+
export declare const CheckboxUncheckedErrorBackgroundColorHover: TokenObj;
|
|
64
|
+
export declare const CheckboxUncheckedErrorBorderRadius: TokenObj;
|
|
65
|
+
export declare const CheckboxUncheckedErrorFocusRingColor: TokenObj;
|