@serenis/design-tokens 0.21.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.
- package/LICENSE +130 -0
- package/README.md +284 -0
- package/dist/base.css +1 -0
- package/dist/constants/border-radius.d.ts +47 -0
- package/dist/constants/border-radius.js +47 -0
- package/dist/constants/border-width.d.ts +19 -0
- package/dist/constants/border-width.js +19 -0
- package/dist/constants/breakpoint.d.ts +15 -0
- package/dist/constants/breakpoint.js +15 -0
- package/dist/constants/color-serenis-dark.d.ts +278 -0
- package/dist/constants/color-serenis-dark.js +278 -0
- package/dist/constants/color-serenis-light.d.ts +278 -0
- package/dist/constants/color-serenis-light.js +278 -0
- package/dist/constants/color.d.ts +278 -0
- package/dist/constants/color.js +278 -0
- package/dist/constants/container.d.ts +51 -0
- package/dist/constants/container.js +51 -0
- package/dist/constants/elevation-box-shadow-serenis-dark.d.ts +20 -0
- package/dist/constants/elevation-box-shadow-serenis-dark.js +20 -0
- package/dist/constants/elevation-box-shadow-serenis-light.d.ts +20 -0
- package/dist/constants/elevation-box-shadow-serenis-light.js +20 -0
- package/dist/constants/elevation.d.ts +24 -0
- package/dist/constants/elevation.js +24 -0
- package/dist/constants/font-family.d.ts +11 -0
- package/dist/constants/font-family.js +11 -0
- package/dist/constants/font-size.d.ts +51 -0
- package/dist/constants/font-size.js +51 -0
- package/dist/constants/font-weight.d.ts +11 -0
- package/dist/constants/font-weight.js +11 -0
- package/dist/constants/index.d.ts +20 -0
- package/dist/constants/index.js +20 -0
- package/dist/constants/letter-spacing.d.ts +63 -0
- package/dist/constants/letter-spacing.js +63 -0
- package/dist/constants/line-height.d.ts +43 -0
- package/dist/constants/line-height.js +43 -0
- package/dist/constants/media-query.d.ts +39 -0
- package/dist/constants/media-query.js +39 -0
- package/dist/constants/opacity.d.ts +55 -0
- package/dist/constants/opacity.js +55 -0
- package/dist/constants/spacing.d.ts +59 -0
- package/dist/constants/spacing.js +59 -0
- package/dist/constants/time.d.ts +19 -0
- package/dist/constants/time.js +19 -0
- package/dist/constants/typography.d.ts +319 -0
- package/dist/constants/typography.js +319 -0
- package/dist/css-base.d.ts +1 -0
- package/dist/css-serenis-dark.d.ts +1 -0
- package/dist/css-serenis-light.d.ts +1 -0
- package/dist/css.d.ts +1 -0
- package/dist/cssvar/border-radius.d.ts +11 -0
- package/dist/cssvar/border-radius.js +12 -0
- package/dist/cssvar/border-width.d.ts +11 -0
- package/dist/cssvar/border-width.js +12 -0
- package/dist/cssvar/breakpoint.d.ts +11 -0
- package/dist/cssvar/breakpoint.js +12 -0
- package/dist/cssvar/color.d.ts +11 -0
- package/dist/cssvar/color.js +12 -0
- package/dist/cssvar/container.d.ts +11 -0
- package/dist/cssvar/container.js +12 -0
- package/dist/cssvar/elevation.d.ts +11 -0
- package/dist/cssvar/elevation.js +12 -0
- package/dist/cssvar/font-family.d.ts +11 -0
- package/dist/cssvar/font-family.js +12 -0
- package/dist/cssvar/font-size.d.ts +11 -0
- package/dist/cssvar/font-size.js +12 -0
- package/dist/cssvar/font-weight.d.ts +11 -0
- package/dist/cssvar/font-weight.js +12 -0
- package/dist/cssvar/index.d.ts +16 -0
- package/dist/cssvar/index.js +16 -0
- package/dist/cssvar/letter-spacing.d.ts +11 -0
- package/dist/cssvar/letter-spacing.js +12 -0
- package/dist/cssvar/line-height.d.ts +11 -0
- package/dist/cssvar/line-height.js +12 -0
- package/dist/cssvar/media-query.d.ts +11 -0
- package/dist/cssvar/media-query.js +12 -0
- package/dist/cssvar/opacity.d.ts +11 -0
- package/dist/cssvar/opacity.js +12 -0
- package/dist/cssvar/spacing.d.ts +11 -0
- package/dist/cssvar/spacing.js +12 -0
- package/dist/cssvar/time.d.ts +11 -0
- package/dist/cssvar/time.js +12 -0
- package/dist/cssvar/typography.d.ts +30 -0
- package/dist/cssvar/typography.js +23 -0
- package/dist/index.cjs +3769 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/serenis-dark.css +1 -0
- package/dist/serenis-light.css +1 -0
- package/dist/types/border-radius.d.ts +16 -0
- package/dist/types/border-radius.js +14 -0
- package/dist/types/border-width.d.ts +9 -0
- package/dist/types/border-width.js +7 -0
- package/dist/types/breakpoint.d.ts +8 -0
- package/dist/types/breakpoint.js +6 -0
- package/dist/types/color.d.ts +97 -0
- package/dist/types/color.js +95 -0
- package/dist/types/container.d.ts +17 -0
- package/dist/types/container.js +15 -0
- package/dist/types/elevation.d.ts +3 -0
- package/dist/types/elevation.js +1 -0
- package/dist/types/font-family.d.ts +3 -0
- package/dist/types/font-family.js +1 -0
- package/dist/types/font-size.d.ts +17 -0
- package/dist/types/font-size.js +15 -0
- package/dist/types/font-weight.d.ts +3 -0
- package/dist/types/font-weight.js +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.js +17 -0
- package/dist/types/letter-spacing.d.ts +20 -0
- package/dist/types/letter-spacing.js +18 -0
- package/dist/types/line-height.d.ts +15 -0
- package/dist/types/line-height.js +13 -0
- package/dist/types/media-query.d.ts +3 -0
- package/dist/types/media-query.js +1 -0
- package/dist/types/opacity.d.ts +3 -0
- package/dist/types/opacity.js +1 -0
- package/dist/types/spacing.d.ts +19 -0
- package/dist/types/spacing.js +17 -0
- package/dist/types/time.d.ts +3 -0
- package/dist/types/time.js +1 -0
- package/dist/types/typography.d.ts +20 -0
- package/dist/types/typography.js +18 -0
- package/dist/types/utility-class.d.ts +1807 -0
- package/dist/types/utility-class.js +1805 -0
- package/dist/utilities.css +1 -0
- package/dist/utilities.d.ts +1 -0
- package/dist/utils/cssvar.d.ts +7 -0
- package/dist/utils/cssvar.js +15 -0
- package/dist/utils/cx.d.ts +6 -0
- package/dist/utils/cx.js +4 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/package.json +80 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
Required Notice: Copyright (c) 2026 Serenis Health S.r.l.
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree
|
|
10
|
+
to them as both strict obligations and conditions to all
|
|
11
|
+
your licenses.
|
|
12
|
+
|
|
13
|
+
## Copyright License
|
|
14
|
+
|
|
15
|
+
The licensor grants you a copyright license for the
|
|
16
|
+
software to do everything you might do with the software
|
|
17
|
+
that would otherwise infringe the licensor's copyright
|
|
18
|
+
in it for any permitted purpose. However, you may
|
|
19
|
+
only distribute the software according to Distribution
|
|
20
|
+
License and make changes or new works based on the software
|
|
21
|
+
according to Changes and New Works License.
|
|
22
|
+
|
|
23
|
+
## Distribution License
|
|
24
|
+
|
|
25
|
+
The licensor grants you an additional copyright license
|
|
26
|
+
to distribute copies of the software. Your license
|
|
27
|
+
to distribute covers distributing the software with
|
|
28
|
+
changes and new works permitted by Changes and New Works
|
|
29
|
+
License.
|
|
30
|
+
|
|
31
|
+
## Notices
|
|
32
|
+
|
|
33
|
+
You must ensure that anyone who gets a copy of any part of
|
|
34
|
+
the software from you also gets a copy of these terms or the
|
|
35
|
+
URL for them above, as well as copies of any plain-text lines
|
|
36
|
+
beginning with `Required Notice:` that the licensor provided
|
|
37
|
+
with the software.
|
|
38
|
+
|
|
39
|
+
## Changes and New Works License
|
|
40
|
+
|
|
41
|
+
The licensor grants you an additional copyright license to
|
|
42
|
+
make changes and new works based on the software for any
|
|
43
|
+
permitted purpose.
|
|
44
|
+
|
|
45
|
+
## Patent License
|
|
46
|
+
|
|
47
|
+
The licensor grants you a patent license for the software that
|
|
48
|
+
covers patent claims the licensor can license, or becomes able
|
|
49
|
+
to license, that you would infringe by using the software.
|
|
50
|
+
|
|
51
|
+
## Noncommercial Purposes
|
|
52
|
+
|
|
53
|
+
Any noncommercial purpose is a permitted purpose.
|
|
54
|
+
|
|
55
|
+
## Personal Uses
|
|
56
|
+
|
|
57
|
+
Personal use for research, experiment, and testing for
|
|
58
|
+
the benefit of public knowledge, personal study, private
|
|
59
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
60
|
+
observance, without any anticipated commercial application,
|
|
61
|
+
is use for a permitted purpose.
|
|
62
|
+
|
|
63
|
+
## Noncommercial Organizations
|
|
64
|
+
|
|
65
|
+
Use by any charitable organization, educational institution,
|
|
66
|
+
public research organization, public safety or health
|
|
67
|
+
organization, environmental protection organization,
|
|
68
|
+
or government institution is use for a permitted purpose
|
|
69
|
+
regardless of the source of funding or obligations resulting
|
|
70
|
+
from the funding.
|
|
71
|
+
|
|
72
|
+
## Fair Use
|
|
73
|
+
|
|
74
|
+
You may have "fair use" rights for the software under the
|
|
75
|
+
law. These terms do not limit them.
|
|
76
|
+
|
|
77
|
+
## No Other Rights
|
|
78
|
+
|
|
79
|
+
These terms do not allow you to sublicense or transfer any of
|
|
80
|
+
your licenses to anyone else, or prevent the licensor from
|
|
81
|
+
granting licenses to anyone else. These terms do not imply
|
|
82
|
+
any other licenses.
|
|
83
|
+
|
|
84
|
+
## Patent Defense
|
|
85
|
+
|
|
86
|
+
If you make any written claim that the software infringes or
|
|
87
|
+
contributes to infringement of any patent, your patent license
|
|
88
|
+
for the software granted under these terms ends immediately. If
|
|
89
|
+
your company makes such a claim, your patent license ends
|
|
90
|
+
immediately for work on behalf of your company.
|
|
91
|
+
|
|
92
|
+
## Violations
|
|
93
|
+
|
|
94
|
+
The first time you are notified in writing that you have
|
|
95
|
+
violated any of these terms, or done anything with the software
|
|
96
|
+
not covered by your licenses, your licenses can nonetheless
|
|
97
|
+
continue if you come into full compliance with these terms,
|
|
98
|
+
and take practical steps to correct past violations, within
|
|
99
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
100
|
+
end immediately.
|
|
101
|
+
|
|
102
|
+
## No Liability
|
|
103
|
+
|
|
104
|
+
As far as the law allows, the software comes as is, without
|
|
105
|
+
any warranty or condition, and the licensor will not be liable
|
|
106
|
+
to you for any damages arising out of these terms or the use
|
|
107
|
+
or nature of the software, under any kind of legal claim.
|
|
108
|
+
|
|
109
|
+
## Definitions
|
|
110
|
+
|
|
111
|
+
The "licensor" is the individual or entity offering these
|
|
112
|
+
terms, and the "software" is the software the licensor makes
|
|
113
|
+
available under these terms.
|
|
114
|
+
|
|
115
|
+
"You" refers to the individual or entity agreeing to these
|
|
116
|
+
terms.
|
|
117
|
+
|
|
118
|
+
"Your company" is any legal entity, sole proprietorship,
|
|
119
|
+
or other kind of organization that you work for, plus all
|
|
120
|
+
organizations that have control over, are under the control of,
|
|
121
|
+
or are under common control with that organization. "Control"
|
|
122
|
+
means ownership of substantially all the assets of an entity,
|
|
123
|
+
or the power to direct its management and policies by vote,
|
|
124
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
125
|
+
|
|
126
|
+
"Your licenses" are all the licenses granted to you for the
|
|
127
|
+
software under these terms.
|
|
128
|
+
|
|
129
|
+
"Use" means anything you do with the software requiring one
|
|
130
|
+
of your licenses.
|
package/README.md
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# design-tokens
|
|
2
|
+
|
|
3
|
+
Design tokens for the Serenis design system. Generates typed JS constants, CSS custom properties, cssvar accessor helpers, and CSS utility classes — all from a single set of [DTCG](https://tr.designtokens.org/format/) JSON files.
|
|
4
|
+
|
|
5
|
+
See [ADR-0011](../../docs/adr/0011-design-tokens-architecture.md) for architectural decisions.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @serenis/design-tokens
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Peer dependencies (must be installed by the consuming app):
|
|
14
|
+
|
|
15
|
+
- `react` >= 19.0.0 (for Storybook stories only; not required at runtime for CSS/JS constants)
|
|
16
|
+
|
|
17
|
+
Import the CSS bundle in your app entry point:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import '@serenis/design-tokens/css'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Sub-paths for advanced use cases: `@serenis/design-tokens/css/base`, `css/serenis-light`, `css/serenis-dark`, `utilities`.
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Build all outputs (codegen + CSS + JS bundle)
|
|
29
|
+
yarn workspace design-tokens build
|
|
30
|
+
|
|
31
|
+
# Run tests (includes golden snapshot tests)
|
|
32
|
+
yarn workspace design-tokens test
|
|
33
|
+
|
|
34
|
+
# Update golden snapshots after intentional changes
|
|
35
|
+
yarn workspace design-tokens test -- -u
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Directory structure
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
libraries/design-tokens/
|
|
42
|
+
├── tokens/ # DTCG JSON source files
|
|
43
|
+
│ ├── root.json # Base tokens (all types)
|
|
44
|
+
│ ├── serenis-light.json # Light theme overrides
|
|
45
|
+
│ ├── serenis-dark.json # Dark theme overrides
|
|
46
|
+
│ ├── aliases.json # Semantic alias tokens
|
|
47
|
+
│ ├── tablet.json # Responsive overrides (≥601px)
|
|
48
|
+
│ └── desktop.json # Responsive overrides (≥1025px)
|
|
49
|
+
├── src/
|
|
50
|
+
│ ├── stories/ # Storybook stories and documentation (colocated)
|
|
51
|
+
│ │ ├── Breakpoints/
|
|
52
|
+
│ │ ├── Color/ # Color stories + Overview.mdx doc page
|
|
53
|
+
│ │ ├── Dimensions/
|
|
54
|
+
│ │ ├── Effects/
|
|
55
|
+
│ │ ├── Typography/
|
|
56
|
+
│ │ ├── UtilityClasses/
|
|
57
|
+
│ │ ├── components/ # Shared story helper components
|
|
58
|
+
│ │ └── docs/ # Domain-specific doc helpers for MDX pages
|
|
59
|
+
│ │ ├── components/ # Category-specific doc components (ColorPairing, etc.)
|
|
60
|
+
│ │ └── utils/ # Token description extractors (reads $description from JSON)
|
|
61
|
+
│ └── utils/ # Hand-written runtime helpers (compiled → dist/utils/)
|
|
62
|
+
├── scripts/
|
|
63
|
+
│ ├── pipeline/ # Build pipeline entry + Style Dictionary config
|
|
64
|
+
│ ├── codegen/ # TypeScript module generators
|
|
65
|
+
│ ├── cssUtilities/ # CSS utility class generator
|
|
66
|
+
│ └── shared/ # JSON reader, token key sorting
|
|
67
|
+
├── dist/ # Generated JS/DTS modules + CSS (gitignored)
|
|
68
|
+
│ ├── types/ # Token name arrays + union types
|
|
69
|
+
│ ├── constants/ # UPPER_SNAKE_CASE constants (var refs + raw values)
|
|
70
|
+
│ ├── cssvar/ # Typed accessor functions
|
|
71
|
+
│ ├── utils/ # Compiled from src/utils/
|
|
72
|
+
│ └── *.css # CSS custom properties + utility classes
|
|
73
|
+
└── package.json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Documentation pages
|
|
77
|
+
|
|
78
|
+
MDX files under `src/stories/` are picked up by Storybook as doc pages (configured in `apps/design-system/.storybook/main.ts`). These pages use design-token-based typography via `docs-reset.css`, which overrides Storybook's built-in styles.
|
|
79
|
+
|
|
80
|
+
Reusable building blocks for doc pages (`SectionIntro`, `DosDonts`, `Table`/`Row`, `CodeExample`) come from the `storybook-docs` library. Category-specific visual components (e.g. `ColorPairing`) live in `src/stories/docs/components/`. Token `$description` metadata is read by `src/stories/docs/utils/tokenDescriptions.ts`, so doc pages stay in sync with the JSON source automatically.
|
|
81
|
+
|
|
82
|
+
Story sort order puts "Overview" pages first, then "Playground", then everything else.
|
|
83
|
+
|
|
84
|
+
### Writing an Overview page
|
|
85
|
+
|
|
86
|
+
Every token category should have an `Overview.mdx` file that follows a consistent structure. Use `Color/Overview.mdx` as the reference implementation.
|
|
87
|
+
|
|
88
|
+
**Expected sections:**
|
|
89
|
+
|
|
90
|
+
1. **Title + intro** — Category name as `# heading`, one-line summary, then `<SectionIntro>` pulling `$description` from the token JSON source.
|
|
91
|
+
2. **Theme and responsive behavior** — How these tokens behave across themes and viewports. Every Overview page includes this section for consistency.
|
|
92
|
+
3. **Conceptual model** — How the tokens in this category are organized (layers, scales, naming logic). Use `<Table>` for structured breakdowns.
|
|
93
|
+
4. **Token-by-token guide with code examples** — Walk through the main tokens/groups with usage guidance, rendered values, `<CodeExample>` blocks, and `<DosDonts>`. Code examples and guidelines are interleaved within each token subsection rather than gathered at the end.
|
|
94
|
+
5. **Accessibility / pairing notes** (when relevant) — Contrast, motion, sizing, or other a11y considerations for this category. Not every category needs a dedicated section.
|
|
95
|
+
|
|
96
|
+
**Imports:**
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
import { Meta } from '@storybook/addon-docs/blocks'
|
|
100
|
+
import { CodeExample, DosDonts, Row, SectionIntro, Table } from 'storybook-docs'
|
|
101
|
+
import { rootDescriptions } from '../docs'
|
|
102
|
+
// For themed tokens (Color, Effects):
|
|
103
|
+
import { rootDescriptions, lightDescriptions, darkDescriptions } from '../docs'
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Generic building blocks (`SectionIntro`, `DosDonts`, `Table`/`Row`, `CodeExample`) come from the `storybook-docs` library. Category-specific components (e.g. `ColorPairing`) live in `src/stories/docs/components/`. Token descriptions are pre-computed maps in `src/stories/docs/utils/tokenDescriptions.ts` — use `rootDescriptions.spacing`, `lightDescriptions.color`, etc. to get `$description` strings. This keeps docs in sync with the JSON source automatically.
|
|
107
|
+
|
|
108
|
+
## How to consume
|
|
109
|
+
|
|
110
|
+
### 1. JS constants (styled-components)
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
import { COLOR_PRIMARY, SPACING_MD, BORDER_RADIUS_LG } from '@serenis/design-tokens'
|
|
114
|
+
|
|
115
|
+
const Card = styled.div`
|
|
116
|
+
background: ${COLOR_PRIMARY};
|
|
117
|
+
padding: ${SPACING_MD};
|
|
118
|
+
border-radius: ${BORDER_RADIUS_LG};
|
|
119
|
+
`
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Each constant resolves to `var(--srns-spacing-md)`. A `_VALUE` companion holds the raw CSS value:
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
SPACING_MD // "var(--srns-spacing-md)"
|
|
126
|
+
SPACING_MD_VALUE // "16px"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 2. CSS custom properties
|
|
130
|
+
|
|
131
|
+
```css
|
|
132
|
+
@import '@serenis/design-tokens/css'; /* base + both themes + utility classes */
|
|
133
|
+
/* or granular: */
|
|
134
|
+
@import '@serenis/design-tokens/css/base'; /* root + responsive overrides */
|
|
135
|
+
@import '@serenis/design-tokens/css/serenis-light'; /* base + light theme (standalone) */
|
|
136
|
+
@import '@serenis/design-tokens/css/serenis-dark'; /* base + dark theme (standalone) */
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
All variables are prefixed `--srns-` and scoped to `:root` (base) or `.srns-serenis-light` / `.srns-serenis-dark` (themes).
|
|
140
|
+
|
|
141
|
+
### 3. Cssvar accessor helpers
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
import { cssvarSpacing } from '@serenis/design-tokens'
|
|
145
|
+
|
|
146
|
+
cssvarSpacing('md')
|
|
147
|
+
// → { name: 'srns-spacing-md', value: 'var(--srns-spacing-md)' }
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Typed: `cssvarSpacing` only accepts valid `SpacingName` values.
|
|
151
|
+
|
|
152
|
+
### 4. CSS utility classes
|
|
153
|
+
|
|
154
|
+
```css
|
|
155
|
+
/* app.css */
|
|
156
|
+
@import '@serenis/design-tokens/utilities';
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
This gives you utility classes mapped to design tokens: `bg-primary-50`, `p-md`, `px-lg`, `mb-sm`, `rounded-lg`, `elevation-sm`, `font-600`, etc. Typography composites are available as `typography-paragraph`, `typography-public-h1`, etc. Directional spacing uses short Tailwind-style names (`px`/`py`/`pl`/`pr`/`pt`/`pb` for padding, `mx`/`my`/`ml`/`mr`/`mt`/`mb` for margin), mapped to CSS logical properties under the hood. No external CSS framework required; the output is plain CSS compatible with Safari 16+.
|
|
160
|
+
|
|
161
|
+
#### Responsive variants
|
|
162
|
+
|
|
163
|
+
Some utility classes are available with a mobile-first breakpoint prefix, following the pattern `{bp}\:{utility}`. Three breakpoints are supported:
|
|
164
|
+
|
|
165
|
+
| Prefix | Media query |
|
|
166
|
+
| ------ | ------------------- |
|
|
167
|
+
| `md` | `min-width: 601px` |
|
|
168
|
+
| `lg` | `min-width: 1025px` |
|
|
169
|
+
| `xl` | `min-width: 1441px` |
|
|
170
|
+
|
|
171
|
+
For example, `md\:flex` applies `display: flex` when the viewport is at least 601px wide.
|
|
172
|
+
|
|
173
|
+
**Utilities with responsive variants:**
|
|
174
|
+
|
|
175
|
+
- Spacing padding (`p-*`, `px-*`, `py-*`, `pl-*`, `pr-*`, `pt-*`, `pb-*`)
|
|
176
|
+
- Spacing margin (`m-*`, `mx-*`, `my-*`, `ml-*`, `mr-*`, `mt-*`, `mb-*`)
|
|
177
|
+
- Spacing gap (`gap-*`, `gap-x-*`, `gap-y-*`)
|
|
178
|
+
- Display (`flex`, `grid`, `block`, `inline-flex`, `inline-block`, `hidden`)
|
|
179
|
+
- Flex direction (`flex-row`, `flex-col`)
|
|
180
|
+
- Alignment (`items-center`, `items-start`, `items-end`)
|
|
181
|
+
- Justify (`justify-center`, `justify-between`, `justify-start`, `justify-end`)
|
|
182
|
+
|
|
183
|
+
**Utilities without responsive variants:** spacing sizing (`w-*`, `h-*`, `size-*`), border radius (`rounded-*`), colors (`bg-*`, `text-{color}`, `border-{color}`), border width (`border-*`), elevation (`elevation-*`), font weight, font family, opacity (`opacity-*`), typography composites (`typography-*`), position, overflow, text-align, flex-wrap, border-style, and transition.
|
|
184
|
+
|
|
185
|
+
#### `cx` helper
|
|
186
|
+
|
|
187
|
+
The build also generates a `cx()` helper for composing utility classes. It is typed via `UtilityClassName`, so you get autocomplete and compile-time checks. It also accepts object arguments for conditional classes — keys whose value is truthy are included in the output:
|
|
188
|
+
|
|
189
|
+
```tsx
|
|
190
|
+
import { cx } from '@serenis/design-tokens'
|
|
191
|
+
;<div className={cx('p-md', 'bg-primary-50', 'rounded-lg')} />
|
|
192
|
+
;<div className={cx('pt-md', { [cx('pt-0', 'bg-primary-50')]: isLarge })} />
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Linting:** Two ESLint rules enforce `cx()` usage across the monorepo. `enforce-cx-classname` requires `cx()` for all `className` composition (no raw strings or template literals). `cx-classnames-order` enforces a deterministic CSS-property-based ordering of class arguments and removes duplicates — this rule is auto-fixable.
|
|
196
|
+
|
|
197
|
+
## How to add a token
|
|
198
|
+
|
|
199
|
+
1. **Add to JSON**: Edit the appropriate file in `tokens/` (usually `root.json`). Follow the DTCG format:
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"my-branch": {
|
|
204
|
+
"$type": "dimension",
|
|
205
|
+
"$description": "Description of this token group",
|
|
206
|
+
"my-token": { "$value": { "value": 8, "unit": "px" } }
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
2. **Build**: Run `yarn workspace design-tokens build`. The pipeline auto-discovers branches by `$type`.
|
|
212
|
+
|
|
213
|
+
3. **Update snapshots**: Run `yarn workspace design-tokens test -- -u` to update golden snapshots.
|
|
214
|
+
|
|
215
|
+
4. The new token is immediately available as:
|
|
216
|
+
- JS constant: `MY_BRANCH_MY_TOKEN` / `MY_BRANCH_MY_TOKEN_VALUE`
|
|
217
|
+
- CSS variable: `--srns-my-branch-my-token`
|
|
218
|
+
- CSS utility class (e.g. `my-branch-my-token`)
|
|
219
|
+
|
|
220
|
+
## How to add a theme
|
|
221
|
+
|
|
222
|
+
1. Create a new JSON file in `tokens/` with color/elevation overrides.
|
|
223
|
+
2. Register it in `scripts/pipeline/themeTokenRegistry.ts`:
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
{ id: 'my-theme', tokenJsonFileName: 'my-theme.json', colorScheme: 'light' }
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
3. Rebuild. The pipeline produces `dist/my-theme.css` and theme-specific JS constants automatically.
|
|
230
|
+
|
|
231
|
+
## Token types
|
|
232
|
+
|
|
233
|
+
| DTCG `$type` | Token branches | Codegen |
|
|
234
|
+
| ------------ | --------------------------------------------------------------------------------------------------- | ------------------------ |
|
|
235
|
+
| `dimension` | spacing, container, border-radius, border-width, font-size, line-height, letter-spacing, breakpoint | Registry (simple) |
|
|
236
|
+
| `duration` | time | Registry (simple) |
|
|
237
|
+
| `fontFamily` | font-family | Registry (simple) |
|
|
238
|
+
| `fontWeight` | font-weight | Registry (simple) |
|
|
239
|
+
| `number` | opacity | Registry (simple) |
|
|
240
|
+
| `string` | media-query | Registry (simple) |
|
|
241
|
+
| `shadow` | elevation | Dedicated (theme layers) |
|
|
242
|
+
| `color` | color | Dedicated (theme layers) |
|
|
243
|
+
| `typography` | typography, typography.public | Dedicated (composite) |
|
|
244
|
+
|
|
245
|
+
"Registry (simple)" types share a unified codegen path via `SIMPLE_TOKEN_RESOLVERS`. Adding a new simple type means adding one entry to the registry in `scripts/codegen/tokenTypeResolvers.ts`.
|
|
246
|
+
|
|
247
|
+
## Build pipeline
|
|
248
|
+
|
|
249
|
+
```text
|
|
250
|
+
tokens/*.json
|
|
251
|
+
│
|
|
252
|
+
├──▶ Custom codegen ──▶ dist/{types,constants,cssvar,utils}/*.{js,d.ts}
|
|
253
|
+
│ │
|
|
254
|
+
│ └──▶ esbuild CJS bundle ──▶ dist/index.cjs
|
|
255
|
+
│
|
|
256
|
+
├──▶ Style Dictionary ──▶ dist/root.css, dist/{theme}.css, dist/tablet.css, dist/desktop.css
|
|
257
|
+
│ │
|
|
258
|
+
│ └──▶ Minify + assemble ──▶ dist/base.css, dist/serenis-light.css, dist/serenis-dark.css
|
|
259
|
+
│
|
|
260
|
+
├──▶ Style Dictionary (utility classes format) ──▶ dist/utilities.css
|
|
261
|
+
│ │
|
|
262
|
+
│ └──▶ Extract class names ──▶ dist/types/utility-class.{js,d.ts} (UtilityClassName)
|
|
263
|
+
│ + dist/utils/cx.{js,d.ts} (cx helper)
|
|
264
|
+
│
|
|
265
|
+
└──▶ Concat base + themes + utilities + minify ──▶ dist/index.css
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Scripts
|
|
269
|
+
|
|
270
|
+
| Command | Description |
|
|
271
|
+
| ---------------- | ------------------------------------------------------ |
|
|
272
|
+
| `build` | Full build: codegen + Style Dictionary CSS + JS bundle |
|
|
273
|
+
| `test` | Run all tests (includes golden snapshot tests) |
|
|
274
|
+
| `test:watch` | Watch mode |
|
|
275
|
+
| `typecheck` | TypeScript validation |
|
|
276
|
+
| `lint` | ESLint |
|
|
277
|
+
| `lint:fix` | ESLint with auto-fix |
|
|
278
|
+
| `prettify` | Prettier formatting |
|
|
279
|
+
| `prettify:check` | Check Prettier formatting without writing |
|
|
280
|
+
| `clean` | Remove `.turbo`, `build`, `dist`, `node_modules` |
|
|
281
|
+
|
|
282
|
+
## License
|
|
283
|
+
|
|
284
|
+
PolyForm Noncommercial 1.0.0 — see [LICENSE](./LICENSE) for the full text.
|
package/dist/base.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--srns-font-family-degular-display: "Degular Display", degular-display, serif;--srns-font-family-mona-sans: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-font-family-monospace: monospace;--srns-font-size-10: 10px;--srns-font-size-12: 12px;--srns-font-size-14: 14px;--srns-font-size-16: 16px;--srns-font-size-18: 18px;--srns-font-size-20: 20px;--srns-font-size-24: 24px;--srns-font-size-32: 32px;--srns-font-size-40: 40px;--srns-font-size-48: 48px;--srns-font-size-56: 56px;--srns-font-size-64: 64px;--srns-font-size-72: 72px;--srns-line-height-12: 12px;--srns-line-height-14: 14px;--srns-line-height-16: 16px;--srns-line-height-20: 20px;--srns-line-height-24: 24px;--srns-line-height-32: 32px;--srns-line-height-40: 40px;--srns-line-height-48: 48px;--srns-line-height-56: 56px;--srns-line-height-64: 64px;--srns-line-height-72: 72px;--srns-font-weight-400: 400;--srns-font-weight-500: 500;--srns-font-weight-600: 600;--srns-letter-spacing-0: 0;--srns-letter-spacing-112: 1.12px;--srns-letter-spacing-128: 1.28px;--srns-letter-spacing-144: 1.44px;--srns-letter-spacing-020: .2px;--srns-letter-spacing-024: .24px;--srns-letter-spacing-028: .28px;--srns-letter-spacing-032: .32px;--srns-letter-spacing-036: .36px;--srns-letter-spacing-040: .4px;--srns-letter-spacing-048: .48px;--srns-letter-spacing-056: .56px;--srns-letter-spacing-064: .64px;--srns-letter-spacing-072: .72px;--srns-letter-spacing-080: .8px;--srns-letter-spacing-096: .96px;--srns-typography-public-h0-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h0-font-weight: 600;--srns-typography-public-h0-line-height: 56px;--srns-typography-public-h0-font-size: 56px;--srns-typography-public-h0-letter-spacing: 1.12px;--srns-typography-public-h1-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h1-font-weight: 600;--srns-typography-public-h1-line-height: 32px;--srns-typography-public-h1-font-size: 32px;--srns-typography-public-h1-letter-spacing: .64px;--srns-typography-public-h2-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h2-font-weight: 600;--srns-typography-public-h2-line-height: 24px;--srns-typography-public-h2-font-size: 24px;--srns-typography-public-h2-letter-spacing: .48px;--srns-typography-public-h3-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h3-font-weight: 400;--srns-typography-public-h3-line-height: 24px;--srns-typography-public-h3-font-size: 20px;--srns-typography-public-h3-letter-spacing: .4px;--srns-typography-public-paragraph-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-public-paragraph-font-weight: 400;--srns-typography-public-paragraph-line-height: 24px;--srns-typography-public-paragraph-font-size: 16px;--srns-typography-public-paragraph-letter-spacing: 0;--srns-typography-public-caption-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-public-caption-font-weight: 400;--srns-typography-public-caption-line-height: 24px;--srns-typography-public-caption-font-size: 14px;--srns-typography-public-caption-letter-spacing: 0;--srns-typography-public-footnote-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-public-footnote-font-weight: 500;--srns-typography-public-footnote-line-height: 24px;--srns-typography-public-footnote-font-size: 12px;--srns-typography-public-footnote-letter-spacing: 0;--srns-typography-public-micro-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-public-micro-font-weight: 500;--srns-typography-public-micro-line-height: 16px;--srns-typography-public-micro-font-size: 12px;--srns-typography-public-micro-letter-spacing: 0;--srns-typography-h0-font-family: "Degular Display", degular-display, serif;--srns-typography-h0-font-weight: 600;--srns-typography-h0-line-height: 56px;--srns-typography-h0-font-size: 56px;--srns-typography-h0-letter-spacing: 1.12px;--srns-typography-h1-font-family: "Degular Display", degular-display, serif;--srns-typography-h1-font-weight: 600;--srns-typography-h1-line-height: 32px;--srns-typography-h1-font-size: 32px;--srns-typography-h1-letter-spacing: .64px;--srns-typography-h2-font-family: "Degular Display", degular-display, serif;--srns-typography-h2-font-weight: 600;--srns-typography-h2-line-height: 24px;--srns-typography-h2-font-size: 24px;--srns-typography-h2-letter-spacing: .48px;--srns-typography-h3-font-family: "Degular Display", degular-display, serif;--srns-typography-h3-font-weight: 600;--srns-typography-h3-line-height: 24px;--srns-typography-h3-font-size: 20px;--srns-typography-h3-letter-spacing: .4px;--srns-typography-paragraph-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-paragraph-font-weight: 400;--srns-typography-paragraph-line-height: 24px;--srns-typography-paragraph-font-size: 16px;--srns-typography-paragraph-letter-spacing: 0;--srns-typography-caption-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-caption-font-weight: 400;--srns-typography-caption-line-height: 24px;--srns-typography-caption-font-size: 14px;--srns-typography-caption-letter-spacing: 0;--srns-typography-footnote-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-footnote-font-weight: 500;--srns-typography-footnote-line-height: 16px;--srns-typography-footnote-font-size: 12px;--srns-typography-footnote-letter-spacing: 0;--srns-typography-micro-font-family: "Mona Sans", MonaSans, mona-sans, "Mona Sans Fallback", mona-sans-fallback, Arial, system-ui, sans-serif;--srns-typography-micro-font-weight: 500;--srns-typography-micro-line-height: 14px;--srns-typography-micro-font-size: 10px;--srns-typography-micro-letter-spacing: 0;--srns-spacing-0: 0;--srns-spacing-4xs: 2px;--srns-spacing-3xs: 4px;--srns-spacing-2xs: 6px;--srns-spacing-xs: 8px;--srns-spacing-sm: 12px;--srns-spacing-md: 16px;--srns-spacing-lg: 24px;--srns-spacing-xl: 32px;--srns-spacing-2xl: 40px;--srns-spacing-3xl: 48px;--srns-spacing-4xl: 64px;--srns-spacing-5xl: 80px;--srns-spacing-6xl: 96px;--srns-spacing-7xl: 112px;--srns-container-3xs: 256px;--srns-container-2xs: 288px;--srns-container-xs: 320px;--srns-container-sm: 384px;--srns-container-md: 448px;--srns-container-lg: 512px;--srns-container-xl: 576px;--srns-container-2xl: 672px;--srns-container-3xl: 768px;--srns-container-4xl: 896px;--srns-container-5xl: 1024px;--srns-container-6xl: 1152px;--srns-container-7xl: 1280px;--srns-border-radius-0: 0;--srns-border-radius-4xs: 2px;--srns-border-radius-3xs: 4px;--srns-border-radius-2xs: 6px;--srns-border-radius-xs: 8px;--srns-border-radius-sm: 12px;--srns-border-radius-md: 16px;--srns-border-radius-lg: 24px;--srns-border-radius-xl: 32px;--srns-border-radius-2xl: 40px;--srns-border-radius-3xl: 48px;--srns-border-radius-circle: 9999px;--srns-opacity-0: 0;--srns-opacity-8: .08;--srns-opacity-16: .16;--srns-opacity-24: .24;--srns-opacity-32: .32;--srns-opacity-40: .4;--srns-opacity-48: .48;--srns-opacity-56: .56;--srns-opacity-64: .64;--srns-opacity-72: .72;--srns-opacity-80: .8;--srns-opacity-88: .88;--srns-opacity-96: .96;--srns-opacity-100: 1;--srns-time-0: 0ms;--srns-time-150: 150ms;--srns-time-300: 300ms;--srns-time-500: 500ms;--srns-time-700: 700ms;--srns-border-width-0: 0;--srns-border-width-1: 1px;--srns-border-width-2: 2px;--srns-border-width-4: 4px;--srns-border-width-05: .5px;--srns-elevation-0: 0px 0px 0px 0px #00000000;--srns-breakpoint-sm: 0;--srns-breakpoint-md: 601px;--srns-breakpoint-lg: 1025px;--srns-breakpoint-xl: 1441px;--srns-media-query-sm: (max-width: 600px );--srns-media-query-md: (min-width: 600px ) and (max-width: 1024px );--srns-media-query-lg: (min-width: 1024px ) and (max-width: 1440px );--srns-media-query-xl: (min-width: 1440px );--srns-media-query-gt-sm: (min-width: 601px);--srns-media-query-gt-md: (min-width: 1025px);--srns-media-query-gt-lg: (min-width: 1441px);--srns-media-query-lt-md: (max-width: 600px );--srns-media-query-lt-lg: (max-width: 1024px );--srns-media-query-lt-xl: (max-width: 1440px );--srns-color-white: #ffffff;--srns-color-black: #0b0b1e;--srns-color-transparent: rgba(0, 0, 0, 0);--srns-color-grey-10: #ffffff;--srns-color-grey-20: #f6f7fd;--srns-color-grey-30: #ecedf9;--srns-color-grey-40: #d7d7ea;--srns-color-grey-50: #a7a7d2;--srns-color-grey-60: #8686c1;--srns-color-grey-70: #7a7aae;--srns-color-grey-80: #5d5d98;--srns-color-grey-90: #3e3e79;--srns-color-grey-100: #2d2d58;--srns-color-grey-110: #1c1c36;--srns-color-grey-120: #0b0b1e;--srns-color-grey: #7a7aae;--srns-color-minttea-20: #cafacb;--srns-color-minttea-40: #179a92;--srns-color-minttea-60: #003b2e;--srns-color-minttea-80: #061a1d;--srns-color-minttea: #cafacb;--srns-color-medicine-20: #d0f9fd;--srns-color-medicine-40: #6be5f5;--srns-color-medicine-60: #0d99bb;--srns-color-medicine-80: #175d73;--srns-color-medicine: #0d99bb;--srns-color-mental-20: #f1d6ff;--srns-color-mental-40: #ce8ef2;--srns-color-mental-60: #ae4fdd;--srns-color-mental-80: #7a2c9d;--srns-color-mental: #ae4fdd;--srns-color-nutrition-20: #ccf5e0;--srns-color-nutrition-40: #83a8a4;--srns-color-nutrition-60: #225559;--srns-color-nutrition-80: #1f4042;--srns-color-nutrition: #225559}@media(min-width:601px){:root{--srns-typography-public-h0-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h0-font-weight: 600;--srns-typography-public-h0-line-height: 72px;--srns-typography-public-h0-font-size: 72px;--srns-typography-public-h0-letter-spacing: 1.44px;--srns-typography-public-h1-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h1-font-weight: 600;--srns-typography-public-h1-line-height: 48px;--srns-typography-public-h1-font-size: 48px;--srns-typography-public-h1-letter-spacing: .96px;--srns-typography-public-h2-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h2-font-weight: 600;--srns-typography-public-h2-line-height: 40px;--srns-typography-public-h2-font-size: 40px;--srns-typography-public-h2-letter-spacing: .8px}}@media(min-width:1025px){:root{--srns-typography-public-h0-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h0-font-weight: 600;--srns-typography-public-h0-line-height: 72px;--srns-typography-public-h0-font-size: 72px;--srns-typography-public-h0-letter-spacing: 1.44px;--srns-typography-public-h1-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h1-font-weight: 600;--srns-typography-public-h1-line-height: 48px;--srns-typography-public-h1-font-size: 48px;--srns-typography-public-h1-letter-spacing: .96px;--srns-typography-public-h2-font-family: "Degular Display", degular-display, serif;--srns-typography-public-h2-font-weight: 600;--srns-typography-public-h2-line-height: 40px;--srns-typography-public-h2-font-size: 40px;--srns-typography-public-h2-letter-spacing: .8px}}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** `0` */
|
|
2
|
+
export declare const BORDER_RADIUS_0: 'var(--srns-border-radius-0)'
|
|
3
|
+
export declare const BORDER_RADIUS_0_VALUE: '0'
|
|
4
|
+
|
|
5
|
+
/** `2px` */
|
|
6
|
+
export declare const BORDER_RADIUS_4XS: 'var(--srns-border-radius-4xs)'
|
|
7
|
+
export declare const BORDER_RADIUS_4XS_VALUE: '2px'
|
|
8
|
+
|
|
9
|
+
/** `4px` */
|
|
10
|
+
export declare const BORDER_RADIUS_3XS: 'var(--srns-border-radius-3xs)'
|
|
11
|
+
export declare const BORDER_RADIUS_3XS_VALUE: '4px'
|
|
12
|
+
|
|
13
|
+
/** `6px` */
|
|
14
|
+
export declare const BORDER_RADIUS_2XS: 'var(--srns-border-radius-2xs)'
|
|
15
|
+
export declare const BORDER_RADIUS_2XS_VALUE: '6px'
|
|
16
|
+
|
|
17
|
+
/** `8px` */
|
|
18
|
+
export declare const BORDER_RADIUS_XS: 'var(--srns-border-radius-xs)'
|
|
19
|
+
export declare const BORDER_RADIUS_XS_VALUE: '8px'
|
|
20
|
+
|
|
21
|
+
/** `12px` */
|
|
22
|
+
export declare const BORDER_RADIUS_SM: 'var(--srns-border-radius-sm)'
|
|
23
|
+
export declare const BORDER_RADIUS_SM_VALUE: '12px'
|
|
24
|
+
|
|
25
|
+
/** `16px` */
|
|
26
|
+
export declare const BORDER_RADIUS_MD: 'var(--srns-border-radius-md)'
|
|
27
|
+
export declare const BORDER_RADIUS_MD_VALUE: '16px'
|
|
28
|
+
|
|
29
|
+
/** `24px` */
|
|
30
|
+
export declare const BORDER_RADIUS_LG: 'var(--srns-border-radius-lg)'
|
|
31
|
+
export declare const BORDER_RADIUS_LG_VALUE: '24px'
|
|
32
|
+
|
|
33
|
+
/** `32px` */
|
|
34
|
+
export declare const BORDER_RADIUS_XL: 'var(--srns-border-radius-xl)'
|
|
35
|
+
export declare const BORDER_RADIUS_XL_VALUE: '32px'
|
|
36
|
+
|
|
37
|
+
/** `40px` */
|
|
38
|
+
export declare const BORDER_RADIUS_2XL: 'var(--srns-border-radius-2xl)'
|
|
39
|
+
export declare const BORDER_RADIUS_2XL_VALUE: '40px'
|
|
40
|
+
|
|
41
|
+
/** `48px` */
|
|
42
|
+
export declare const BORDER_RADIUS_3XL: 'var(--srns-border-radius-3xl)'
|
|
43
|
+
export declare const BORDER_RADIUS_3XL_VALUE: '48px'
|
|
44
|
+
|
|
45
|
+
/** `9999px` */
|
|
46
|
+
export declare const BORDER_RADIUS_CIRCLE: 'var(--srns-border-radius-circle)'
|
|
47
|
+
export declare const BORDER_RADIUS_CIRCLE_VALUE: '9999px'
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** `0` */
|
|
2
|
+
export const BORDER_RADIUS_0 = 'var(--srns-border-radius-0)'
|
|
3
|
+
export const BORDER_RADIUS_0_VALUE = '0'
|
|
4
|
+
|
|
5
|
+
/** `2px` */
|
|
6
|
+
export const BORDER_RADIUS_4XS = 'var(--srns-border-radius-4xs)'
|
|
7
|
+
export const BORDER_RADIUS_4XS_VALUE = '2px'
|
|
8
|
+
|
|
9
|
+
/** `4px` */
|
|
10
|
+
export const BORDER_RADIUS_3XS = 'var(--srns-border-radius-3xs)'
|
|
11
|
+
export const BORDER_RADIUS_3XS_VALUE = '4px'
|
|
12
|
+
|
|
13
|
+
/** `6px` */
|
|
14
|
+
export const BORDER_RADIUS_2XS = 'var(--srns-border-radius-2xs)'
|
|
15
|
+
export const BORDER_RADIUS_2XS_VALUE = '6px'
|
|
16
|
+
|
|
17
|
+
/** `8px` */
|
|
18
|
+
export const BORDER_RADIUS_XS = 'var(--srns-border-radius-xs)'
|
|
19
|
+
export const BORDER_RADIUS_XS_VALUE = '8px'
|
|
20
|
+
|
|
21
|
+
/** `12px` */
|
|
22
|
+
export const BORDER_RADIUS_SM = 'var(--srns-border-radius-sm)'
|
|
23
|
+
export const BORDER_RADIUS_SM_VALUE = '12px'
|
|
24
|
+
|
|
25
|
+
/** `16px` */
|
|
26
|
+
export const BORDER_RADIUS_MD = 'var(--srns-border-radius-md)'
|
|
27
|
+
export const BORDER_RADIUS_MD_VALUE = '16px'
|
|
28
|
+
|
|
29
|
+
/** `24px` */
|
|
30
|
+
export const BORDER_RADIUS_LG = 'var(--srns-border-radius-lg)'
|
|
31
|
+
export const BORDER_RADIUS_LG_VALUE = '24px'
|
|
32
|
+
|
|
33
|
+
/** `32px` */
|
|
34
|
+
export const BORDER_RADIUS_XL = 'var(--srns-border-radius-xl)'
|
|
35
|
+
export const BORDER_RADIUS_XL_VALUE = '32px'
|
|
36
|
+
|
|
37
|
+
/** `40px` */
|
|
38
|
+
export const BORDER_RADIUS_2XL = 'var(--srns-border-radius-2xl)'
|
|
39
|
+
export const BORDER_RADIUS_2XL_VALUE = '40px'
|
|
40
|
+
|
|
41
|
+
/** `48px` */
|
|
42
|
+
export const BORDER_RADIUS_3XL = 'var(--srns-border-radius-3xl)'
|
|
43
|
+
export const BORDER_RADIUS_3XL_VALUE = '48px'
|
|
44
|
+
|
|
45
|
+
/** `9999px` */
|
|
46
|
+
export const BORDER_RADIUS_CIRCLE = 'var(--srns-border-radius-circle)'
|
|
47
|
+
export const BORDER_RADIUS_CIRCLE_VALUE = '9999px'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** `0` */
|
|
2
|
+
export declare const BORDER_WIDTH_0: 'var(--srns-border-width-0)'
|
|
3
|
+
export declare const BORDER_WIDTH_0_VALUE: '0'
|
|
4
|
+
|
|
5
|
+
/** `0.5px` */
|
|
6
|
+
export declare const BORDER_WIDTH_05: 'var(--srns-border-width-05)'
|
|
7
|
+
export declare const BORDER_WIDTH_05_VALUE: '0.5px'
|
|
8
|
+
|
|
9
|
+
/** `1px` */
|
|
10
|
+
export declare const BORDER_WIDTH_1: 'var(--srns-border-width-1)'
|
|
11
|
+
export declare const BORDER_WIDTH_1_VALUE: '1px'
|
|
12
|
+
|
|
13
|
+
/** `2px` */
|
|
14
|
+
export declare const BORDER_WIDTH_2: 'var(--srns-border-width-2)'
|
|
15
|
+
export declare const BORDER_WIDTH_2_VALUE: '2px'
|
|
16
|
+
|
|
17
|
+
/** `4px` */
|
|
18
|
+
export declare const BORDER_WIDTH_4: 'var(--srns-border-width-4)'
|
|
19
|
+
export declare const BORDER_WIDTH_4_VALUE: '4px'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** `0` */
|
|
2
|
+
export const BORDER_WIDTH_0 = 'var(--srns-border-width-0)'
|
|
3
|
+
export const BORDER_WIDTH_0_VALUE = '0'
|
|
4
|
+
|
|
5
|
+
/** `0.5px` */
|
|
6
|
+
export const BORDER_WIDTH_05 = 'var(--srns-border-width-05)'
|
|
7
|
+
export const BORDER_WIDTH_05_VALUE = '0.5px'
|
|
8
|
+
|
|
9
|
+
/** `1px` */
|
|
10
|
+
export const BORDER_WIDTH_1 = 'var(--srns-border-width-1)'
|
|
11
|
+
export const BORDER_WIDTH_1_VALUE = '1px'
|
|
12
|
+
|
|
13
|
+
/** `2px` */
|
|
14
|
+
export const BORDER_WIDTH_2 = 'var(--srns-border-width-2)'
|
|
15
|
+
export const BORDER_WIDTH_2_VALUE = '2px'
|
|
16
|
+
|
|
17
|
+
/** `4px` */
|
|
18
|
+
export const BORDER_WIDTH_4 = 'var(--srns-border-width-4)'
|
|
19
|
+
export const BORDER_WIDTH_4_VALUE = '4px'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** `0` */
|
|
2
|
+
export declare const BREAKPOINT_SM: 'var(--srns-breakpoint-sm)'
|
|
3
|
+
export declare const BREAKPOINT_SM_VALUE: '0'
|
|
4
|
+
|
|
5
|
+
/** `601px` */
|
|
6
|
+
export declare const BREAKPOINT_MD: 'var(--srns-breakpoint-md)'
|
|
7
|
+
export declare const BREAKPOINT_MD_VALUE: '601px'
|
|
8
|
+
|
|
9
|
+
/** `1025px` */
|
|
10
|
+
export declare const BREAKPOINT_LG: 'var(--srns-breakpoint-lg)'
|
|
11
|
+
export declare const BREAKPOINT_LG_VALUE: '1025px'
|
|
12
|
+
|
|
13
|
+
/** `1441px` */
|
|
14
|
+
export declare const BREAKPOINT_XL: 'var(--srns-breakpoint-xl)'
|
|
15
|
+
export declare const BREAKPOINT_XL_VALUE: '1441px'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** `0` */
|
|
2
|
+
export const BREAKPOINT_SM = 'var(--srns-breakpoint-sm)'
|
|
3
|
+
export const BREAKPOINT_SM_VALUE = '0'
|
|
4
|
+
|
|
5
|
+
/** `601px` */
|
|
6
|
+
export const BREAKPOINT_MD = 'var(--srns-breakpoint-md)'
|
|
7
|
+
export const BREAKPOINT_MD_VALUE = '601px'
|
|
8
|
+
|
|
9
|
+
/** `1025px` */
|
|
10
|
+
export const BREAKPOINT_LG = 'var(--srns-breakpoint-lg)'
|
|
11
|
+
export const BREAKPOINT_LG_VALUE = '1025px'
|
|
12
|
+
|
|
13
|
+
/** `1441px` */
|
|
14
|
+
export const BREAKPOINT_XL = 'var(--srns-breakpoint-xl)'
|
|
15
|
+
export const BREAKPOINT_XL_VALUE = '1441px'
|