@typestyles/open-props 0.0.0-unstable.b43e2f3d324c → 0.0.0-unstable.b5a2077e79ce
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 +204 -0
- package/README.md +171 -0
- package/dist/index.cjs +25 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +372 -370
- package/dist/index.d.ts +372 -370
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
Copyright 2026 The TypeStyles Authors
|
|
7
|
+
|
|
8
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
9
|
+
|
|
10
|
+
1. Definitions.
|
|
11
|
+
|
|
12
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
13
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
14
|
+
|
|
15
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
16
|
+
the copyright owner that is granting the License.
|
|
17
|
+
|
|
18
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
19
|
+
other entities that control, are controlled by, or are under common
|
|
20
|
+
control with that entity. For the purposes of this definition,
|
|
21
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
22
|
+
direction or management of such entity, whether by contract or
|
|
23
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
24
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
25
|
+
|
|
26
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
27
|
+
exercising permissions granted by this License.
|
|
28
|
+
|
|
29
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
30
|
+
including but not limited to software source code, documentation
|
|
31
|
+
source, and configuration files.
|
|
32
|
+
|
|
33
|
+
"Object" form shall mean any form resulting from mechanical
|
|
34
|
+
transformation or translation of a Source form, including but
|
|
35
|
+
not limited to compiled object code, generated documentation,
|
|
36
|
+
and conversions to other media types.
|
|
37
|
+
|
|
38
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
39
|
+
Object form, made available under the License, as indicated by a
|
|
40
|
+
copyright notice that is included in or attached to the work
|
|
41
|
+
(an example is provided in the Appendix below).
|
|
42
|
+
|
|
43
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
44
|
+
form, that is based on (or derived from) the Work and for which the
|
|
45
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
46
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
47
|
+
of this License, Derivative Works shall not include works that remain
|
|
48
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
49
|
+
the Work and Derivative Works thereof.
|
|
50
|
+
|
|
51
|
+
"Contribution" shall mean any work of authorship, including
|
|
52
|
+
the original version of the Work and any modifications or additions
|
|
53
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
54
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
55
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
56
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
57
|
+
means any form of electronic, verbal, or written communication sent
|
|
58
|
+
to the Licensor or its representatives, including but not limited to
|
|
59
|
+
communication on electronic mailing lists, source code control systems,
|
|
60
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
61
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
62
|
+
excluding communication that is conspicuously marked or otherwise
|
|
63
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
64
|
+
|
|
65
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
66
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
67
|
+
subsequently incorporated within the Work.
|
|
68
|
+
|
|
69
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
70
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
71
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
72
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
73
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
74
|
+
Work and such Derivative Works in Source or Object form.
|
|
75
|
+
|
|
76
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
(except as stated in this section) patent license to make, have made,
|
|
80
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
81
|
+
where such license applies only to those patent claims licensable
|
|
82
|
+
by such Contributor that are necessarily infringed by their
|
|
83
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
84
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
85
|
+
institute patent litigation against any entity (including a
|
|
86
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
87
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
88
|
+
or contributory patent infringement, then any patent licenses
|
|
89
|
+
granted to You under this License for that Work shall terminate
|
|
90
|
+
as of the date such litigation is filed.
|
|
91
|
+
|
|
92
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
93
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
94
|
+
modifications, and in Source or Object form, provided that You
|
|
95
|
+
meet the following conditions:
|
|
96
|
+
|
|
97
|
+
(a) You must give any other recipients of the Work or
|
|
98
|
+
Derivative Works a copy of this License; and
|
|
99
|
+
|
|
100
|
+
(b) You must cause any modified files to carry prominent notices
|
|
101
|
+
stating that You changed the files; and
|
|
102
|
+
|
|
103
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
104
|
+
that You distribute, all copyright, patent, trademark, and
|
|
105
|
+
attribution notices from the Source form of the Work,
|
|
106
|
+
excluding those notices that do not pertain to any part of
|
|
107
|
+
the Derivative Works; and
|
|
108
|
+
|
|
109
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
110
|
+
distribution, then any Derivative Works that You distribute must
|
|
111
|
+
include a readable copy of the attribution notices contained
|
|
112
|
+
within such NOTICE file, excluding those notices that do not
|
|
113
|
+
pertain to any part of the Derivative Works, in at least one
|
|
114
|
+
of the following places: within a NOTICE text file distributed
|
|
115
|
+
as part of the Derivative Works; within the Source form or
|
|
116
|
+
documentation, if provided along with the Derivative Works; or,
|
|
117
|
+
within a display generated by the Derivative Works, if and
|
|
118
|
+
wherever such third-party notices normally appear. The contents
|
|
119
|
+
of the NOTICE file are for informational purposes only and
|
|
120
|
+
do not modify the License. You may add Your own attribution
|
|
121
|
+
notices within Derivative Works that You distribute, alongside
|
|
122
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
123
|
+
that such additional attribution notices cannot be construed
|
|
124
|
+
as modifying the License.
|
|
125
|
+
|
|
126
|
+
You may add Your own copyright statement to Your modifications and
|
|
127
|
+
may provide additional or different license terms and conditions
|
|
128
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
129
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
130
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
131
|
+
the conditions stated in this License.
|
|
132
|
+
|
|
133
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
134
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
135
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
136
|
+
this License, without any additional terms or conditions.
|
|
137
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
138
|
+
the terms of any separate license agreement you may have executed
|
|
139
|
+
with Licensor regarding such Contributions.
|
|
140
|
+
|
|
141
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
142
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
143
|
+
except as required for reasonable and customary use in describing the
|
|
144
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
145
|
+
|
|
146
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
147
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
148
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
149
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
150
|
+
implied, including, without limitation, any warranties or conditions
|
|
151
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
152
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
153
|
+
appropriateness of using or redistributing the Work and assume any
|
|
154
|
+
risks associated with Your exercise of permissions under this License.
|
|
155
|
+
|
|
156
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
157
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
158
|
+
unless required by applicable law (such as deliberate and grossly
|
|
159
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
160
|
+
liable to You for damages, including any direct, indirect, special,
|
|
161
|
+
incidental, or consequential damages of any character arising as a
|
|
162
|
+
result of this License or out of the use or inability to use the
|
|
163
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
164
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
165
|
+
other commercial damages or losses), even if such Contributor
|
|
166
|
+
has been advised of the possibility of such damages.
|
|
167
|
+
|
|
168
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
169
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
170
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
171
|
+
or other liability obligations and/or rights consistent with this
|
|
172
|
+
License. However, in accepting such obligations, You may act only
|
|
173
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
174
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
175
|
+
defend, and hold each Contributor harmless for any liability
|
|
176
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
177
|
+
of your accepting any such warranty or additional liability.
|
|
178
|
+
|
|
179
|
+
END OF TERMS AND CONDITIONS
|
|
180
|
+
|
|
181
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
182
|
+
|
|
183
|
+
To apply the Apache License to your work, attach the following
|
|
184
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
185
|
+
replaced with your own identifying information. (Don't include
|
|
186
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
187
|
+
comment syntax for the file format. We also recommend that a
|
|
188
|
+
file or class name and description of purpose be included on the
|
|
189
|
+
same "printed page" as the copyright notice for easier
|
|
190
|
+
identification within third-party archives.
|
|
191
|
+
|
|
192
|
+
Copyright [yyyy] [name of copyright owner]
|
|
193
|
+
|
|
194
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
|
+
you may not use this file except in compliance with the License.
|
|
196
|
+
You may obtain a copy of the License at
|
|
197
|
+
|
|
198
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
199
|
+
|
|
200
|
+
Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
202
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
See the License for the specific language governing permissions and
|
|
204
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# @typestyles/open-props
|
|
2
|
+
|
|
3
|
+
Type-safe [Open Props](https://open-props.style/) design tokens for [typestyles](https://github.com/type-styles/typestyles).
|
|
4
|
+
|
|
5
|
+
Open Props is a curated set of CSS custom properties for spacing, color, typography, shadows, easings, and more. This package registers every scale through `tokens.create()` so you get **`var(--token-name)` references with full TypeScript autocomplete** — no separate `@import 'open-props'` step, no stringly-typed token names.
|
|
6
|
+
|
|
7
|
+
Full guide: [Open Props integration](https://typestyles.dev/docs/open-props)
|
|
8
|
+
|
|
9
|
+
## Why not raw Open Props?
|
|
10
|
+
|
|
11
|
+
| Raw Open Props | `@typestyles/open-props` |
|
|
12
|
+
| --------------------------------------- | -------------------------------------------------------------- |
|
|
13
|
+
| CSS `@import` + `var(--size-3)` strings | Typed `sizes['3']` → `var(--size-3)` |
|
|
14
|
+
| No autocomplete for token names | Autocomplete for every scale and key |
|
|
15
|
+
| Separate from your component styles | Same token system as `tokens.create` — composable and themable |
|
|
16
|
+
|
|
17
|
+
Tokens register on `:root` when imported, identical to hand-written `tokens.create` calls. They work in plain CSS too: `padding: var(--size-4)`.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @typestyles/open-props typestyles
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
No additional CSS file is required — importing a token module registers the custom properties.
|
|
26
|
+
|
|
27
|
+
## Quick start
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { createTypeStyles } from 'typestyles';
|
|
31
|
+
import { sizes, radius, color, font } from '@typestyles/open-props';
|
|
32
|
+
|
|
33
|
+
const { recipe } = createTypeStyles({ scopeId: 'app' });
|
|
34
|
+
|
|
35
|
+
const card = recipe('card', {
|
|
36
|
+
base: {
|
|
37
|
+
padding: sizes['4'],
|
|
38
|
+
borderRadius: radius['3'],
|
|
39
|
+
backgroundColor: color['gray-2'],
|
|
40
|
+
fontFamily: font['sans'],
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Rendered CSS uses standard custom properties:
|
|
46
|
+
|
|
47
|
+
```css
|
|
48
|
+
.card-base {
|
|
49
|
+
padding: var(--size-4);
|
|
50
|
+
border-radius: var(--radius-3);
|
|
51
|
+
background-color: var(--color-gray-2);
|
|
52
|
+
font-family: var(--font-sans);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Available scales
|
|
57
|
+
|
|
58
|
+
Import only what you need — each export is a separate `tokens.create` registration:
|
|
59
|
+
|
|
60
|
+
| Export | Namespace | Examples |
|
|
61
|
+
| ------------------- | ------------------------ | ------------------------------------------------------------ |
|
|
62
|
+
| `sizes` | `--size-*` | `sizes['4']`, `sizes['fluid-2']`, `sizes['content-1']` |
|
|
63
|
+
| `radius` | `--radius-*` | `radius['3']`, `radius.pill` |
|
|
64
|
+
| `color` | `--color-*` | `color['gray-5']`, `color['blue-6']` — 19 scales × 13 shades |
|
|
65
|
+
| `shadow` | `--shadow-*` | `shadow['2']`, `shadow['inner-1']` |
|
|
66
|
+
| `font` | `--font-*` | `font.sans`, `font.mono`, `font['neo-grotesque']` |
|
|
67
|
+
| `fontSize` | `--font-size-*` | `fontSize['2']`, `fontSize['fluid-1']` |
|
|
68
|
+
| `fontWeight` | `--font-weight-*` | `fontWeight['5']` |
|
|
69
|
+
| `fontLetterspacing` | `--font-letterspacing-*` | |
|
|
70
|
+
| `fontLineheight` | `--font-lineheight-*` | |
|
|
71
|
+
| `easing` | `--ease-*` | `easing['3']`, `easing['elastic-out-3']` |
|
|
72
|
+
| `animation` | `--animation-*` | `animation['fade-in']`, `animation.spin` |
|
|
73
|
+
| `duration` | `--duration-*` | |
|
|
74
|
+
| `gradient` | `--gradient-*` | `gradient['12']` |
|
|
75
|
+
| `media` | `--media-*` | `media.md`, `media.dark` — use in `@media ${media.md}` |
|
|
76
|
+
| `zIndex` | `--zindex-*` | |
|
|
77
|
+
| `ratio` | `--ratio-*` | `ratio.golden`, `ratio.widescreen` |
|
|
78
|
+
| `borderSize` | `--border-size-*` | |
|
|
79
|
+
| `brand` | `--brand-*` | Social/platform brand colors |
|
|
80
|
+
| `palette` | `--palette-*` | OKLCH palette steps |
|
|
81
|
+
| `noise` | `--noise-*` | |
|
|
82
|
+
| `masksEdges` | `--masks-edge-*` | |
|
|
83
|
+
| `masksCornerCuts` | `--masks-corner-cuts-*` | |
|
|
84
|
+
|
|
85
|
+
Bracket notation is required for numeric keys: `sizes['4']`, not `sizes.4`.
|
|
86
|
+
|
|
87
|
+
## Reference tokens defined elsewhere
|
|
88
|
+
|
|
89
|
+
If tokens are registered in a shared design-system package, reference them without re-importing definitions:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { useOpenProps } from '@typestyles/open-props';
|
|
93
|
+
|
|
94
|
+
const spacing = useOpenProps('size');
|
|
95
|
+
spacing['4']; // var(--size-4)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`useOpenProps` is an alias for `tokens.use()` with Open Props typing.
|
|
99
|
+
|
|
100
|
+
## Mix with custom tokens
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import { createTypeStyles } from 'typestyles';
|
|
104
|
+
import { color, sizes } from '@typestyles/open-props';
|
|
105
|
+
|
|
106
|
+
const { recipe, tokens } = createTypeStyles({ scopeId: 'app' });
|
|
107
|
+
|
|
108
|
+
const brand = tokens.create('brand', {
|
|
109
|
+
primary: '#ff6b6b',
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const hero = recipe('hero', {
|
|
113
|
+
base: {
|
|
114
|
+
padding: sizes['6'],
|
|
115
|
+
backgroundColor: brand.primary,
|
|
116
|
+
color: color['gray-0'],
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Theming
|
|
122
|
+
|
|
123
|
+
Open Props tokens are CSS custom properties — override them like any typestyles token:
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import { createTypeStyles } from 'typestyles';
|
|
127
|
+
import { color } from '@typestyles/open-props';
|
|
128
|
+
|
|
129
|
+
const { tokens } = createTypeStyles({ scopeId: 'app' });
|
|
130
|
+
|
|
131
|
+
const dark = tokens.createTheme('dark', {
|
|
132
|
+
base: {
|
|
133
|
+
color: {
|
|
134
|
+
'gray-0': color['gray-10'],
|
|
135
|
+
'gray-1': color['gray-9'],
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
<div className={dark.className}>...</div>;
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
See [Theming](https://typestyles.dev/docs/theming) for `createTheme`, dark mode presets, and `Theme`.
|
|
144
|
+
|
|
145
|
+
## Production builds
|
|
146
|
+
|
|
147
|
+
Import Open Props scales from your [convention entry](https://typestyles.dev/docs/zero-runtime) so token `:root` rules land in the extracted CSS:
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
// src/typestyles-entry.ts
|
|
151
|
+
import { sizes, color, radius } from '@typestyles/open-props';
|
|
152
|
+
import './components';
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Or import scales in the modules that use them — side-effect registration runs at module load.
|
|
156
|
+
|
|
157
|
+
## Related packages
|
|
158
|
+
|
|
159
|
+
| Package | Role |
|
|
160
|
+
| ------------------------------- | ---------------------------------------------- |
|
|
161
|
+
| [`typestyles`](../typestyles) | Core styling API |
|
|
162
|
+
| [`@typestyles/props`](../props) | Build utility props on top of these scales |
|
|
163
|
+
| [`@typestyles/vite`](../vite) | Extract static CSS including token definitions |
|
|
164
|
+
|
|
165
|
+
## Credits
|
|
166
|
+
|
|
167
|
+
Token values are derived from [Open Props](https://open-props.style/) by [Adam Argyle](https://github.com/argyleink). TypeStyles integration maintains naming parity with the upstream `--*` custom properties.
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
Apache-2.0
|
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
var typestyles = require('typestyles');
|
|
4
4
|
|
|
5
5
|
// src/index.ts
|
|
6
|
-
var
|
|
6
|
+
var tokens = typestyles.createTokens();
|
|
7
|
+
var sizes = tokens.create("size", {
|
|
7
8
|
"0": "0",
|
|
8
9
|
"1": "0.25rem",
|
|
9
10
|
"2": "0.5rem",
|
|
@@ -27,7 +28,7 @@ var sizes = typestyles.tokens.create("size", {
|
|
|
27
28
|
"fluid-7": "clamp(8rem, 30vw, 12rem)",
|
|
28
29
|
"fluid-8": "clamp(12rem, 40vw, 20rem)"
|
|
29
30
|
});
|
|
30
|
-
var radius =
|
|
31
|
+
var radius = tokens.create("radius", {
|
|
31
32
|
"0": "0",
|
|
32
33
|
"1": "2px",
|
|
33
34
|
"2": "4px",
|
|
@@ -62,7 +63,7 @@ var radius = typestyles.tokens.create("radius", {
|
|
|
62
63
|
round: "100%",
|
|
63
64
|
pill: "9999px"
|
|
64
65
|
});
|
|
65
|
-
var shadow =
|
|
66
|
+
var shadow = tokens.create("shadow", {
|
|
66
67
|
"1": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
67
68
|
"2": "0 2px 4px 0 rgb(0 0 0 / 0.05), 0 4px 8px 0 rgb(0 0 0 / 0.05)",
|
|
68
69
|
"3": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
@@ -75,7 +76,7 @@ var shadow = typestyles.tokens.create("shadow", {
|
|
|
75
76
|
"inner-4": "inset 0 10px 15px -3px rgb(0 0 0 / 0.1), inset 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
76
77
|
"inner-5": "inset 0 20px 25px -5px rgb(0 0 0 / 0.1), inset 0 8px 10px -6px rgb(0 0 0 / 0.1)"
|
|
77
78
|
});
|
|
78
|
-
var easing =
|
|
79
|
+
var easing = tokens.create("ease", {
|
|
79
80
|
"1": "0.25, 0.1, 0.25, 1",
|
|
80
81
|
"2": "0.42, 0, 1, 1",
|
|
81
82
|
"3": "0, 0, 0.58, 1",
|
|
@@ -117,7 +118,7 @@ var easing = typestyles.tokens.create("ease", {
|
|
|
117
118
|
"bounce-4": "0.45, 0.05, 0.55, 0.95",
|
|
118
119
|
"bounce-5": "0.45, 0.05, 0.55, 0.95"
|
|
119
120
|
});
|
|
120
|
-
var animation =
|
|
121
|
+
var animation = tokens.create("animation", {
|
|
121
122
|
"fade-in": "fade-in 0.5s var(--ease-3)",
|
|
122
123
|
"fade-out": "fade-out 0.5s var(--ease-3)",
|
|
123
124
|
"scale-in": "scale-in 0.2s var(--ease-3)",
|
|
@@ -140,7 +141,7 @@ var animation = typestyles.tokens.create("animation", {
|
|
|
140
141
|
pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
141
142
|
pop: "pop 0.3s var(--ease-out-4)"
|
|
142
143
|
});
|
|
143
|
-
var fontSize =
|
|
144
|
+
var fontSize = tokens.create("font-size", {
|
|
144
145
|
"00": "0.5rem",
|
|
145
146
|
"0": "0.75rem",
|
|
146
147
|
"1": "1rem",
|
|
@@ -156,7 +157,7 @@ var fontSize = typestyles.tokens.create("font-size", {
|
|
|
156
157
|
"fluid-2": "clamp(1.5rem, 6vw, 2.5rem)",
|
|
157
158
|
"fluid-3": "clamp(2rem, 9vw, 3.5rem)"
|
|
158
159
|
});
|
|
159
|
-
var fontWeight =
|
|
160
|
+
var fontWeight = tokens.create("font-weight", {
|
|
160
161
|
"1": "100",
|
|
161
162
|
"2": "200",
|
|
162
163
|
"3": "300",
|
|
@@ -167,7 +168,7 @@ var fontWeight = typestyles.tokens.create("font-weight", {
|
|
|
167
168
|
"8": "800",
|
|
168
169
|
"9": "900"
|
|
169
170
|
});
|
|
170
|
-
var fontLetterspacing =
|
|
171
|
+
var fontLetterspacing = tokens.create("font-letterspacing", {
|
|
171
172
|
"0": "-.05em",
|
|
172
173
|
"1": ".025em",
|
|
173
174
|
"2": ".050em",
|
|
@@ -177,7 +178,7 @@ var fontLetterspacing = typestyles.tokens.create("font-letterspacing", {
|
|
|
177
178
|
"6": ".750em",
|
|
178
179
|
"7": "1em"
|
|
179
180
|
});
|
|
180
|
-
var fontLineheight =
|
|
181
|
+
var fontLineheight = tokens.create("font-lineheight", {
|
|
181
182
|
"00": ".95",
|
|
182
183
|
"0": "1.1",
|
|
183
184
|
"1": "1.25",
|
|
@@ -186,7 +187,7 @@ var fontLineheight = typestyles.tokens.create("font-lineheight", {
|
|
|
186
187
|
"4": "1.75",
|
|
187
188
|
"5": "2"
|
|
188
189
|
});
|
|
189
|
-
var zIndex =
|
|
190
|
+
var zIndex = tokens.create("zindex", {
|
|
190
191
|
"1": "100",
|
|
191
192
|
"2": "200",
|
|
192
193
|
"3": "300",
|
|
@@ -194,7 +195,7 @@ var zIndex = typestyles.tokens.create("zindex", {
|
|
|
194
195
|
"5": "500",
|
|
195
196
|
max: "9999"
|
|
196
197
|
});
|
|
197
|
-
var ratio =
|
|
198
|
+
var ratio = tokens.create("ratio", {
|
|
198
199
|
square: "1",
|
|
199
200
|
landscape: "4/3",
|
|
200
201
|
portrait: "3/4",
|
|
@@ -202,7 +203,7 @@ var ratio = typestyles.tokens.create("ratio", {
|
|
|
202
203
|
ultrawide: "18/5",
|
|
203
204
|
golden: "1.6180/1"
|
|
204
205
|
});
|
|
205
|
-
var gradient =
|
|
206
|
+
var gradient = tokens.create("gradient", {
|
|
206
207
|
"1": "linear-gradient(to bottom right, #e0e7ff, #faf5ff, #f0fdfa)",
|
|
207
208
|
"2": "linear-gradient(to bottom right, #e0e7ff, #f5f3ff, #fdf4ff)",
|
|
208
209
|
"3": "linear-gradient(to bottom right, #e0e7ff, #f5f3ff, #faf5ff)",
|
|
@@ -234,7 +235,7 @@ var gradient = typestyles.tokens.create("gradient", {
|
|
|
234
235
|
"29": "linear-gradient(to bottom right, #030712, #4a044e, #f0abfc)",
|
|
235
236
|
"30": "linear-gradient(to bottom right, #030712, #2e1065, #c4b5fd)"
|
|
236
237
|
});
|
|
237
|
-
var media =
|
|
238
|
+
var media = tokens.create("media", {
|
|
238
239
|
motion: "(prefers-reduced-motion: no-preference)",
|
|
239
240
|
motionReduce: "(prefers-reduced-motion: reduce)",
|
|
240
241
|
dark: "(prefers-color-scheme: dark)",
|
|
@@ -255,7 +256,7 @@ var media = typestyles.tokens.create("media", {
|
|
|
255
256
|
"8xl": "(min-width: 96rem)",
|
|
256
257
|
"9xl": "(min-width: 100rem)"
|
|
257
258
|
});
|
|
258
|
-
var duration =
|
|
259
|
+
var duration = tokens.create("duration", {
|
|
259
260
|
"0": "0s",
|
|
260
261
|
"1": "0.05s",
|
|
261
262
|
"2": "0.1s",
|
|
@@ -263,7 +264,7 @@ var duration = typestyles.tokens.create("duration", {
|
|
|
263
264
|
"4": "0.4s",
|
|
264
265
|
"5": "0.8s"
|
|
265
266
|
});
|
|
266
|
-
var borderSize =
|
|
267
|
+
var borderSize = tokens.create("border-size", {
|
|
267
268
|
"0": "0",
|
|
268
269
|
"1": "1px",
|
|
269
270
|
"2": "2px",
|
|
@@ -271,7 +272,7 @@ var borderSize = typestyles.tokens.create("border-size", {
|
|
|
271
272
|
"4": "8px",
|
|
272
273
|
"5": "16px"
|
|
273
274
|
});
|
|
274
|
-
var noise =
|
|
275
|
+
var noise = tokens.create("noise", {
|
|
275
276
|
"1": 'url("data:image/svg+xml,")',
|
|
276
277
|
"2": 'url("data:image/svg+xml,")',
|
|
277
278
|
"3": 'url("data:image/svg+xml,")',
|
|
@@ -600,8 +601,8 @@ for (const colorName of colors) {
|
|
|
600
601
|
});
|
|
601
602
|
}
|
|
602
603
|
}
|
|
603
|
-
var color =
|
|
604
|
-
var brand =
|
|
604
|
+
var color = tokens.create("color", colorValues);
|
|
605
|
+
var brand = tokens.create("brand", {
|
|
605
606
|
facebook: "#1877f2",
|
|
606
607
|
youtube: "#ff0000",
|
|
607
608
|
twitter: "#1da1f2",
|
|
@@ -633,7 +634,7 @@ var brand = typestyles.tokens.create("brand", {
|
|
|
633
634
|
amazon: "#ff9900",
|
|
634
635
|
twitch: "#9146ff"
|
|
635
636
|
});
|
|
636
|
-
var font =
|
|
637
|
+
var font = tokens.create("font", {
|
|
637
638
|
"system-ui": "system-ui, sans-serif",
|
|
638
639
|
transitional: "Charter, Bitstream Charter, Sitka Text, Cambria, serif",
|
|
639
640
|
"old-style": "Iowan Old Style, Palatino Linotype, URW Palladio L, P052, serif",
|
|
@@ -653,7 +654,7 @@ var font = typestyles.tokens.create("font", {
|
|
|
653
654
|
serif: 'Georgia, Cambria, "Times New Roman", Times, serif',
|
|
654
655
|
mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
|
|
655
656
|
});
|
|
656
|
-
var palette =
|
|
657
|
+
var palette = tokens.create("palette", {
|
|
657
658
|
"1": "oklch(97% .014 260)",
|
|
658
659
|
"2": "oklch(94% .028 261)",
|
|
659
660
|
"3": "oklch(88% .057 261)",
|
|
@@ -671,14 +672,14 @@ var palette = typestyles.tokens.create("palette", {
|
|
|
671
672
|
"15": "oklch(29% .14 259)",
|
|
672
673
|
"16": "oklch(27% .12 259)"
|
|
673
674
|
});
|
|
674
|
-
var masksEdges =
|
|
675
|
+
var masksEdges = tokens.create("masks-edge", {
|
|
675
676
|
"0": "linear-gradient(to right, #000 90%, transparent 90% 100%)",
|
|
676
677
|
"1": "linear-gradient(to right, #000 80%, transparent 80% 100%)",
|
|
677
678
|
"2": "linear-gradient(to right, #000 70%, transparent 70% 100%)",
|
|
678
679
|
"3": "linear-gradient(to right, #000 60%, transparent 60% 100%)",
|
|
679
680
|
"4": "linear-gradient(to right, #000 50%, transparent 50% 100%)"
|
|
680
681
|
});
|
|
681
|
-
var masksCornerCuts =
|
|
682
|
+
var masksCornerCuts = tokens.create("masks-corner-cuts", {
|
|
682
683
|
"1": "polygon(0 8%, 8% 0, 100% 0, 100% 100%, 0 100%)",
|
|
683
684
|
"2": "polygon(0 15%, 15% 0, 100% 0, 100% 100%, 0 100%)",
|
|
684
685
|
"3": "polygon(0 22%, 22% 0, 100% 0, 100% 100%, 0 100%)",
|
|
@@ -687,13 +688,9 @@ var masksCornerCuts = typestyles.tokens.create("masks-corner-cuts", {
|
|
|
687
688
|
"6": "polygon(0 15%, 15% 0, 85% 0, 100% 15%, 100% 100%, 0 100%)"
|
|
688
689
|
});
|
|
689
690
|
function useOpenProps(namespace) {
|
|
690
|
-
return
|
|
691
|
+
return tokens.use(namespace);
|
|
691
692
|
}
|
|
692
693
|
|
|
693
|
-
Object.defineProperty(exports, "tokens", {
|
|
694
|
-
enumerable: true,
|
|
695
|
-
get: function () { return typestyles.tokens; }
|
|
696
|
-
});
|
|
697
694
|
exports.animation = animation;
|
|
698
695
|
exports.borderSize = borderSize;
|
|
699
696
|
exports.brand = brand;
|
|
@@ -715,6 +712,7 @@ exports.radius = radius;
|
|
|
715
712
|
exports.ratio = ratio;
|
|
716
713
|
exports.shadow = shadow;
|
|
717
714
|
exports.sizes = sizes;
|
|
715
|
+
exports.tokens = tokens;
|
|
718
716
|
exports.useOpenProps = useOpenProps;
|
|
719
717
|
exports.zIndex = zIndex;
|
|
720
718
|
//# sourceMappingURL=index.cjs.map
|