@warp-ds/css 1.0.0-alpha.10

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 ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # WARP CSS
2
+
3
+ This is the CSS package for WARP.
4
+
5
+ The package includes resets, component classes and tokens.
6
+
7
+ ## Usage
8
+
9
+ The CSS files should be used directly from Eik. This is because we can alias releases by major versions.
10
+
11
+
12
+ We publish 2 versions of resets. The minified that can be used in production and non-minified that can be used in development.
13
+
14
+ ```html
15
+ <link href="https://assets.finn.no/pkg/@warp-ds/css/v1/resets.min.css" rel="stylesheet" />
16
+ or
17
+ <link href="https://assets.finn.no/pkg/@warp-ds/css/v1/resets.css" rel="stylesheet" />
18
+ ```
19
+
20
+ ## Usage (npm)
21
+
22
+ Only component classes are published to npm to be used in the component libraries.
23
+
24
+ ```sh
25
+ pnpm install @warp-ds/css
26
+ ```
27
+
28
+ ### Component classes
29
+
30
+ The package includes component classes, such as:
31
+ - attention
32
+ - pageIndicator
33
+ - ribbon
34
+ - slider
35
+ - modal
36
+ - box
37
+ - pill
38
+ - step
39
+ - card
40
+ - switchToggle
41
+ - toaster
42
+ - toast
43
+ - tabs
44
+ - tab
45
+ - expandable
46
+ - suffix
47
+ - prefix
48
+
49
+ And shortcuts, such as:
50
+ - button
51
+ - button--secondary
52
+ - button--default
53
+ - button--small
54
+ - button--link
55
+ - button--primary
56
+ - button--cta
57
+ - button--pill
58
+ - button--utility
59
+ - button--utility-flat
60
+ - button--destructive
61
+ - button--destructive-flat
62
+ - button--flat
63
+
64
+
65
+ ### Tokens
66
+
67
+ Creates brand-css files from tokens.
68
+
69
+ Uses the [Tokenizer](https://github.com/warp-ds/tokenizer) to build css vars. The output
70
+ is css files, one for each support brand. These CSS files are what's actually holding the theme.
71
+
72
+
73
+ #### Usage of tokens
74
+
75
+ If you have new components to add tokens to (if you only want to update existing tokens proceed to step 2):
76
+
77
+ 1. Under applicable brand create a new yml file and preferably name it the same as the new component(e.g. button.yml if it is a button component)
78
+ 2. Update tokens needed.
79
+ 3. Push your changes.
80
+ 4. The CSS files for each brand will be built and published to Eik. Please find your release [here](https://github.com/warp-ds/css/actions/workflows/release.yml) and search for the css urls which were published under `Eik login and publish` step.
81
+ ! Be aware that it takes some time before we update the aliased version on Eik so if you need to test your changes immediately use the full version and not an alias.
82
+
83
+
84
+ ## How to contribute
85
+
86
+ If you'd like to contribute to `@warp-ds/css`, start by reviewing the [contributing guidelines](https://github.com/warp-ds/css/blob/main/CONTRIBUTING.md).
@@ -0,0 +1,8 @@
1
+ import * as components from './index.js';
2
+
3
+ export const classes = Object.values(components)
4
+ .map((e) => {
5
+ if (typeof e === 'object') return Object.values(e).map((e) => e.split(/\s/));
6
+ return e.split(/\s/);
7
+ })
8
+ .flat(Infinity);
@@ -0,0 +1,404 @@
1
+ export namespace attention {
2
+ const base: string;
3
+ const tooltip: string;
4
+ const callout: string;
5
+ const popover: string;
6
+ const arrowBase: string;
7
+ const arrowDirectionLeft: string;
8
+ const arrowDirectionRight: string;
9
+ const arrowDirectionBottom: string;
10
+ const arrowDirectionTop: string;
11
+ const arrowTooltip: string;
12
+ const arrowCallout: string;
13
+ const arrowPopover: string;
14
+ const content: string;
15
+ const notCallout: string;
16
+ }
17
+ export namespace pageIndicator {
18
+ const wrapper: string;
19
+ const dot: string;
20
+ const inactive: string;
21
+ const active: string;
22
+ const hover: string;
23
+ }
24
+ export namespace ribbon {
25
+ const base_1: string;
26
+ export { base_1 as base };
27
+ export const info: string;
28
+ export const success: string;
29
+ export const warning: string;
30
+ export const error: string;
31
+ export const disabled: string;
32
+ export const sponsored: string;
33
+ export const neutral: string;
34
+ export const roundedTopRightBottomLeft: string;
35
+ export const roundedTopLeftBottomRight: string;
36
+ }
37
+ export namespace slider {
38
+ const wrapper_1: string;
39
+ export { wrapper_1 as wrapper };
40
+ export const track: string;
41
+ export const trackDisabled: string;
42
+ export const activeTrack: string;
43
+ export const activeTrackDisabled: string;
44
+ export const thumb: string;
45
+ export const thumbEnabled: string;
46
+ export const thumbDisabled: string;
47
+ }
48
+ export namespace box {
49
+ export const box: string;
50
+ export const bleed: string;
51
+ const info_1: string;
52
+ export { info_1 as info };
53
+ const neutral_1: string;
54
+ export { neutral_1 as neutral };
55
+ export const bordered: string;
56
+ export const infoClickable: string;
57
+ export const neutralClickable: string;
58
+ export const borderedClickable: string;
59
+ }
60
+ export namespace pill {
61
+ const pill: string;
62
+ const button: string;
63
+ const suggestion: string;
64
+ const filter: string;
65
+ const label: string;
66
+ const labelWithoutClose: string;
67
+ const labelWithClose: string;
68
+ const close: string;
69
+ const a11y: string;
70
+ }
71
+ export namespace step {
72
+ export const step: string;
73
+ export const stepVertical: string;
74
+ export const stepVerticalLeft: string;
75
+ export const stepVerticalRight: string;
76
+ export const stepHorizontal: string;
77
+ export const stepDot: string;
78
+ export const stepDotVerticalRight: string;
79
+ export const stepDotHorizontal: string;
80
+ export const stepDotActive: string;
81
+ export const stepDotIncomplete: string;
82
+ export const stepLine: string;
83
+ export const stepLineVertical: string;
84
+ export const stepLineVerticalRight: string;
85
+ export const stepLineHorizontal: string;
86
+ export const stepLineHorizontalRight: string;
87
+ export const stepLineHorizontalLeft: string;
88
+ export const stepLineIncomplete: string;
89
+ export const stepLineComplete: string;
90
+ const content_1: string;
91
+ export { content_1 as content };
92
+ export const contentVertical: string;
93
+ export const contentHorizontal: string;
94
+ }
95
+ export namespace steps {
96
+ const steps: string;
97
+ const stepsHorizontal: string;
98
+ }
99
+ export namespace card {
100
+ export const card: string;
101
+ export const cardShadow: string;
102
+ export const cardFlat: string;
103
+ export const cardFlatUnselected: string;
104
+ export const cardFlatSelected: string;
105
+ export const cardSelected: string;
106
+ export const cardOutline: string;
107
+ export const cardOutlineUnselected: string;
108
+ export const cardOutlineSelected: string;
109
+ const a11y_1: string;
110
+ export { a11y_1 as a11y };
111
+ }
112
+ export namespace switchToggle {
113
+ const _switch: string;
114
+ export { _switch as switch };
115
+ const label_1: string;
116
+ export { label_1 as label };
117
+ export const labelDisabled: string;
118
+ const track_1: string;
119
+ export { track_1 as track };
120
+ export const trackActive: string;
121
+ export const trackInactive: string;
122
+ const trackDisabled_1: string;
123
+ export { trackDisabled_1 as trackDisabled };
124
+ export const handle: string;
125
+ export const handleSelected: string;
126
+ export const handleNotDisabled: string;
127
+ export const handleDisabled: string;
128
+ const a11y_2: string;
129
+ export { a11y_2 as a11y };
130
+ }
131
+ export namespace toaster {
132
+ export const container: string;
133
+ const content_2: string;
134
+ export { content_2 as content };
135
+ export const toaster: string;
136
+ }
137
+ export namespace toast {
138
+ const wrapper_2: string;
139
+ export { wrapper_2 as wrapper };
140
+ export const toast: string;
141
+ export const positive: string;
142
+ const warning_1: string;
143
+ export { warning_1 as warning };
144
+ export const negative: string;
145
+ export const icon: string;
146
+ export const iconPositive: string;
147
+ export const iconWarning: string;
148
+ export const iconNegative: string;
149
+ export const iconLoading: string;
150
+ const content_3: string;
151
+ export { content_3 as content };
152
+ const close_1: string;
153
+ export { close_1 as close };
154
+ }
155
+ export namespace tabs {
156
+ const tabContainer: string;
157
+ const wunderbar: string;
158
+ const wrapperUnderlined: string;
159
+ }
160
+ export namespace tab {
161
+ export const tab: string;
162
+ export const tabActive: string;
163
+ const icon_1: string;
164
+ export { icon_1 as icon };
165
+ export const iconUnderlinedActive: string;
166
+ const content_4: string;
167
+ export { content_4 as content };
168
+ export const contentUnderlined: string;
169
+ export const contentUnderlinedActive: string;
170
+ }
171
+ export namespace gridLayout {
172
+ const cols1: string;
173
+ const cols2: string;
174
+ const cols3: string;
175
+ const cols4: string;
176
+ const cols5: string;
177
+ const cols6: string;
178
+ const cols7: string;
179
+ const cols8: string;
180
+ const cols9: string;
181
+ }
182
+ export const buttonReset: "focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block";
183
+ export namespace expandable {
184
+ export const expandable: string;
185
+ export const expandableTitle: string;
186
+ export const expandableBox: string;
187
+ import expandableBleed = box.bleed;
188
+ export { expandableBleed };
189
+ export const chevron: string;
190
+ export const chevronNonBox: string;
191
+ export const chevronBox: string;
192
+ export const chevronExpanded: string;
193
+ export const expansion: string;
194
+ export const expansionNotExpanded: string;
195
+ const button_1: string;
196
+ export { button_1 as button };
197
+ export const buttonBox: string;
198
+ export const paddingTop: string;
199
+ export const title: string;
200
+ export const titleType: string;
201
+ }
202
+ export namespace button {
203
+ export const buttonSecondary: string;
204
+ export const buttonPrimary: string;
205
+ export const buttonFlat: string;
206
+ export const buttonDestructive: string;
207
+ export const buttonDestructiveFlat: string;
208
+ export const buttonUtility: string;
209
+ export const buttonUtilityFlat: string;
210
+ export const buttonPill: string;
211
+ export const buttonLink: string;
212
+ export const buttonSmall: string;
213
+ export const buttonSmallOverride: string;
214
+ export const buttonSmallSecondary: string;
215
+ export const buttonSmallUtility: string;
216
+ export const buttonSmallButtonPill: string;
217
+ export const buttonSmallButtonLink: string;
218
+ export const buttonIsDisabled: string;
219
+ export const buttonInProgress: string;
220
+ export const linkAsButton: string;
221
+ const a11y_3: string;
222
+ export { a11y_3 as a11y };
223
+ }
224
+ export namespace buttonGroup {
225
+ const wrapper_3: string;
226
+ export { wrapper_3 as wrapper };
227
+ export const raised: string;
228
+ export const vertical: string;
229
+ export const nonOutlinedVertical: string;
230
+ export const nonOutlinedHorizontal: string;
231
+ }
232
+ export namespace buttonGroupItem {
233
+ const wrapper_4: string;
234
+ export { wrapper_4 as wrapper };
235
+ export const outlined: string;
236
+ export const outlinedVertical: string;
237
+ export const outlinedHorizontal: string;
238
+ export const outlinedVerticalResets: string;
239
+ export const outlinedHorizontalResets: string;
240
+ export const outlinedSelected: string;
241
+ export const selected: string;
242
+ }
243
+ export namespace modal {
244
+ export const transparentBg: string;
245
+ export const backdrop: string;
246
+ export const modal: string;
247
+ const content_5: string;
248
+ export { content_5 as content };
249
+ export const footer: string;
250
+ export const transitionTitle: string;
251
+ export const transitionTitleCenter: string;
252
+ export const transitionTitleColSpan: string;
253
+ const title_1: string;
254
+ export { title_1 as title };
255
+ export const titleText: string;
256
+ export const titleButton: string;
257
+ export const titleButtonLeft: string;
258
+ export const titleButtonRight: string;
259
+ export const titleButtonIcon: string;
260
+ export const titleButtonIconRotated: string;
261
+ }
262
+ export namespace alert {
263
+ export const alert: string;
264
+ export const willChangeHeight: string;
265
+ export const textWrapper: string;
266
+ const title_2: string;
267
+ export { title_2 as title };
268
+ const icon_2: string;
269
+ export { icon_2 as icon };
270
+ const negative_1: string;
271
+ export { negative_1 as negative };
272
+ export const negativeIcon: string;
273
+ const positive_1: string;
274
+ export { positive_1 as positive };
275
+ export const positiveIcon: string;
276
+ const warning_2: string;
277
+ export { warning_2 as warning };
278
+ export const warningIcon: string;
279
+ const info_2: string;
280
+ export { info_2 as info };
281
+ export const infoIcon: string;
282
+ }
283
+ export namespace input {
284
+ const _default: string;
285
+ export { _default as default };
286
+ export const textArea: string;
287
+ const disabled_1: string;
288
+ export { disabled_1 as disabled };
289
+ export const invalid: string;
290
+ export const readOnly: string;
291
+ export const placeholder: string;
292
+ const wrapper_5: string;
293
+ export { wrapper_5 as wrapper };
294
+ export const suffix: string;
295
+ export const prefix: string;
296
+ }
297
+ export namespace select {
298
+ const _default_1: string;
299
+ export { _default_1 as default };
300
+ const disabled_2: string;
301
+ export { disabled_2 as disabled };
302
+ const invalid_1: string;
303
+ export { invalid_1 as invalid };
304
+ const readOnly_1: string;
305
+ export { readOnly_1 as readOnly };
306
+ const wrapper_6: string;
307
+ export { wrapper_6 as wrapper };
308
+ export const selectWrapper: string;
309
+ const chevron_1: string;
310
+ export { chevron_1 as chevron };
311
+ export const chevronDisabled: string;
312
+ }
313
+ export namespace label {
314
+ const label_2: string;
315
+ export { label_2 as label };
316
+ export const labelInvalid: string;
317
+ export const optional: string;
318
+ }
319
+ export namespace helpText {
320
+ const helpText: string;
321
+ const helpTextValid: string;
322
+ const helpTextInvalid: string;
323
+ }
324
+ export namespace suffix {
325
+ const wrapper_7: string;
326
+ export { wrapper_7 as wrapper };
327
+ export const wrapperWithLabel: string;
328
+ export const wrapperWithIcon: string;
329
+ const label_3: string;
330
+ export { label_3 as label };
331
+ }
332
+ export namespace prefix {
333
+ const wrapper_8: string;
334
+ export { wrapper_8 as wrapper };
335
+ const wrapperWithLabel_1: string;
336
+ export { wrapperWithLabel_1 as wrapperWithLabel };
337
+ const wrapperWithIcon_1: string;
338
+ export { wrapperWithIcon_1 as wrapperWithIcon };
339
+ const label_4: string;
340
+ export { label_4 as label };
341
+ }
342
+ export namespace breadcrumbs {
343
+ const wrapper_9: string;
344
+ export { wrapper_9 as wrapper };
345
+ export const text: string;
346
+ export const link: string;
347
+ export const separator: string;
348
+ const a11y_4: string;
349
+ export { a11y_4 as a11y };
350
+ }
351
+ export namespace toggle {
352
+ const wrapper_10: string;
353
+ export { wrapper_10 as wrapper };
354
+ export const deadToggleWrapper: string;
355
+ export const input: string;
356
+ export const deadToggleInput: string;
357
+ export const inputDisabled: string;
358
+ export const focusable: string;
359
+ export const focusableWithin: string;
360
+ const label_5: string;
361
+ export { label_5 as label };
362
+ export const deadToggleLabel: string;
363
+ export const noContent: string;
364
+ export const indeterminate: string;
365
+ const labelDisabled_1: string;
366
+ export { labelDisabled_1 as labelDisabled };
367
+ export const checkbox: string;
368
+ export const checkboxChecked: string;
369
+ export const checkboxInvalid: string;
370
+ export const checkboxDisabled: string;
371
+ export const labelCheckboxBorder: string;
372
+ export const radio: string;
373
+ export const radioChecked: string;
374
+ export const radioInvalid: string;
375
+ export const radioDisabled: string;
376
+ export const labelRadioBorder: string;
377
+ export const radioButtons: string;
378
+ export const radioButtonsGroup: string;
379
+ export const radioButtonsLabel: string;
380
+ export const radioButtonsJustified: string;
381
+ export const radioButtonsGroupJustified: string;
382
+ export const radioButtonsLabelSmall: string;
383
+ const icon_3: string;
384
+ export { icon_3 as icon };
385
+ const a11y_5: string;
386
+ export { a11y_5 as a11y };
387
+ }
388
+ export namespace clickable {
389
+ export const clickable: string;
390
+ export const clickableNotToggle: string;
391
+ const label_6: string;
392
+ export { label_6 as label };
393
+ }
394
+ export namespace combobox {
395
+ const wrapper_11: string;
396
+ export { wrapper_11 as wrapper };
397
+ export const combobox: string;
398
+ export const textMatch: string;
399
+ export const listbox: string;
400
+ export const option: string;
401
+ export const optionSelected: string;
402
+ const a11y_6: string;
403
+ export { a11y_6 as a11y };
404
+ }
@@ -0,0 +1,426 @@
1
+ export const attention = {
2
+ base: 'border-2 relative',
3
+ tooltip:
4
+ 'i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8',
5
+ callout: 'i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8',
6
+ popover:
7
+ 'i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m',
8
+ arrowBase:
9
+ 'absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform',
10
+ arrowDirectionLeft: '-left-[8px]',
11
+ arrowDirectionRight: '-right-[8px]',
12
+ arrowDirectionBottom: '-bottom-[8px]',
13
+ arrowDirectionTop: '-top-[8px]',
14
+ arrowTooltip: 'i-bg-$color-tooltip-background i-border-$color-tooltip-background',
15
+ arrowCallout: 'i-bg-$color-callout-background i-border-$color-callout-border',
16
+ arrowPopover: 'i-bg-$color-popover-background i-border-$color-popover-background',
17
+ content: 'last-child:mb-0',
18
+ notCallout: 'absolute z-50',
19
+ };
20
+
21
+ export const pageIndicator = {
22
+ wrapper: 'flex space-x-8 p-8',
23
+ dot: 'h-8 w-8 rounded-full',
24
+ inactive: 'i-bg-$color-pageindicator-background',
25
+ active: 'i-bg-$color-pageindicator-background-active',
26
+ hover: 'i-bg-$color-pageindicator-background-hover',
27
+ };
28
+
29
+ export const ribbon = {
30
+ base: 'py-4 px-8 border rounded-4 inline-flex last:mb-0',
31
+ info: 'i-border-$color-badge-info-background i-bg-$color-badge-info-background i-text-$color-badge-info-text',
32
+ success: 'i-border-$color-badge-positive-background i-bg-$color-badge-positive-background i-text-$color-badge-positive-text',
33
+ warning: 'i-border-$color-badge-warning-background i-bg-$color-badge-warning-background i-text-$color-badge-warning-text',
34
+ error: 'i-border-$color-badge-negative-background i-bg-$color-badge-negative-background i-text-$color-badge-negative-text',
35
+ disabled: 'i-border-$color-badge-disabled-background i-bg-$color-badge-disabled-background i-text-$color-badge-disabled-text',
36
+ sponsored: 'i-border-$color-badge-price-background i-bg-$color-badge-price-background i-text-$color-badge-price-text',
37
+ neutral: 'i-border-$color-badge-neutral-background i-bg-$color-badge-neutral-background i-text-$color-badge-neutral-text',
38
+ roundedTopRightBottomLeft: 'rounded-tr-0 rounded-bl-0',
39
+ roundedTopLeftBottomRight: 'rounded-tl-0 rounded-br-0',
40
+ };
41
+
42
+ export const slider = {
43
+ wrapper: 'touch-pan-y relative w-full h-44 py-2',
44
+ track:
45
+ 'absolute i-bg-$color-slider-track-background h-4 top-20 rounded-4 w-full ',
46
+ trackDisabled:
47
+ 'pointer-events-none i-bg-$color-slider-track-background-disabled',
48
+ activeTrack:
49
+ 'absolute i-bg-$color-slider-track-background-active h-6 top-[19px] rounded-4',
50
+ activeTrackDisabled:
51
+ 'i-bg-$color-slider-track-background-disabled pointer-events-none',
52
+ thumb:
53
+ 'absolute transition-shadow w-24 h-24 bottom-10 rounded-4 outline-none',
54
+ thumbEnabled:
55
+ 'border-2 i-shadow-$shadow-slider cursor-pointer i-bg-$color-slider-handle-background i-border-$color-slider-handle-border hover:i-bg-$color-slider-handle-background-hover hover:i-border-$color-slider-handle-border-hover hover:slider-handle-shadow-hover active:i-bg-$color-slider-handle-background-active active:i-border-$color-slider-handle-border-active active:slider-handle-shadow-active focus:slider-handle-shadow-hover focus:i-border-$color-slider-handle-border-hover focus:i-bg-$color-slider-handle-background-hover',
56
+ thumbDisabled:
57
+ 'i-bg-$color-slider-handle-background-disabled cursor-disabled pointer-events-none',
58
+ };
59
+
60
+ export const box = {
61
+ box: 'group block relative break-words last-child:mb-0 p-16 rounded-8', // Relative here enables w-clickable
62
+ bleed: '-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8', // We target L and R to override the default rounded-8
63
+ info: 'i-bg-$color-box-info-background i-text-$color-box-info-text',
64
+ neutral: 'i-bg-$color-box-neutral-background i-text-$color-box-neutral-text',
65
+ bordered: 'border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text',
66
+ infoClickable: 'hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover',
67
+ neutralClickable: 'hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover',
68
+ borderedClickable: 'hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover'
69
+ };
70
+
71
+ export const pill = {
72
+ pill: 'flex items-center',
73
+ button: 'inline-flex items-center focusable text-xs transition-all',
74
+ suggestion: 'i-bg-$color-pill-suggestion-background hover:i-bg-$color-pill-suggestion-background-hover active:i-bg-$color-pill-suggestion-background-active i-text-$color-pill-suggestion-text font-bold',
75
+ filter: 'i-bg-$color-pill-filter-background hover:i-bg-$color-pill-filter-background-hover active:i-bg-$color-pill-filter-background-active i-text-$color-pill-filter-text',
76
+ label: 'pl-12 py-8 rounded-l-full',
77
+ labelWithoutClose: 'pr-12 rounded-r-full',
78
+ labelWithClose: 'pr-2',
79
+ close: 'pr-12 pl-4 py-10 rounded-r-full',
80
+ a11y: 'sr-only',
81
+ };
82
+
83
+ export const step = {
84
+ step: 'group/step',
85
+ stepVertical: 'group/stepv grid-rows-[20px_auto] grid grid-flow-col gap-x-16',
86
+ stepVerticalLeft: 'grid-cols-[20px_1fr]',
87
+ stepVerticalRight: 'grid-cols-[1fr_20px] text-right',
88
+ stepHorizontal: 'group/steph grid-rows-[auto_20px] grid-cols-[1fr_20px_1fr] flex-1 grid gap-y-16 items-center',
89
+
90
+ stepDot: 'rounded-full border-2 h-20 w-20 transition-colors duration-300 i-text-$color-stepindicator-handle-icon',
91
+ stepDotVerticalRight: 'col-start-2',
92
+ stepDotHorizontal: 'row-start-2 justify-self-end',
93
+ stepDotActive: 'i-border-$color-stepindicator-handle-border-active i-bg-$color-stepindicator-handle-background-active',
94
+ stepDotIncomplete: 'i-border-$color-stepindicator-handle-border i-bg-$color-stepindicator-handle-background',
95
+
96
+ stepLine: 'group-last/stepv:hidden transition-colors duration-300',
97
+ stepLineVertical: 'w-2 h-full justify-self-center',
98
+ stepLineVerticalRight: 'col-start-2',
99
+ stepLineHorizontal: 'h-2 w-full row-start-2',
100
+ stepLineHorizontalRight: 'group-last/steph:bg-transparent',
101
+ stepLineHorizontalLeft: 'group-first/steph:bg-transparent',
102
+
103
+ stepLineIncomplete: 'i-bg-$color-stepindicator-track-background',
104
+ stepLineComplete: 'i-bg-$color-stepindicator-track-background-active',
105
+
106
+ content: 'last:mb-0 group-last/step:last:pb-0',
107
+ contentVertical: 'row-span-2 pb-32',
108
+ contentHorizontal: 'col-span-3 px-16 row-start-1 text-center',
109
+ };
110
+
111
+ export const steps = {
112
+ steps: 'w-full',
113
+ stepsHorizontal: 'flex',
114
+ }
115
+
116
+ export const card = {
117
+ card: 'cursor-pointer overflow-hidden relative transition-all',
118
+ cardShadow: 'rounded-8 i-shadow-$shadow-card hover:i-shadow-$shadow-card-hover hover:i-bg-$color-card-background-hover tap-highlight-transparent',
119
+ cardFlat: 'border-2 rounded-4',
120
+ cardFlatUnselected:
121
+ 'i-bg-$color-card-flat-background i-border-$color-card-flat-border hover:i-bg-$color-card-flat-background-hover hover:i-border-$color-card-flat-border-hover active:i-bg-$color-card-flat-background-active active:i-border-$color-card-flat-border-active',
122
+ cardFlatSelected:
123
+ 'i-border-$color-card-flat-border-active i-bg-$color-card-flat-background-active hover:i-bg-$color-card-flat-background-active-hover hover:i-border-$color-card-flat-border-active-hover active:i-border-$color-card-flat-border-active active:i-bg-$color-card-flat-background-active',
124
+ cardSelected:
125
+ 'i-border-$color-card-border-active i-bg-$color-card-background-active hover:i-border-$color-card-border-active-hover hover:i-bg-$color-card-background-active-hover active:i-border-$color-card-border-active',
126
+ cardOutline:
127
+ 'active:i-border-$color-card-flat-border absolute rounded-8 inset-0 transition-all border-2',
128
+ cardOutlineUnselected: 'i-border-$color-card-border',
129
+ cardOutlineSelected: 'i-border-$color-card-border-active hover:i-border-$color-card-border-active-hover',
130
+ a11y: 'sr-only',
131
+ };
132
+
133
+ export const switchToggle = {
134
+ switch: 'tap-highlight-transparent',
135
+ label: 'block relative h-24 w-44 cursor-pointer group',
136
+ labelDisabled: 'pointer-events-none',
137
+ track: 'absolute top-0 left-0 h-full w-full rounded-full transition-colors',
138
+ trackActive: 'i-bg-$color-switch-track-background-active group-hover:i-bg-$color-switch-track-background-active-hover',
139
+ trackInactive: 'i-bg-$color-switch-track-background group-hover:i-bg-$color-switch-track-background-hover',
140
+ trackDisabled: 'i-bg-$color-switch-track-background-disabled',
141
+ handle: 'absolute transform-gpu h-16 w-16 top-4 left-4 rounded-full transition-transform',
142
+ handleSelected: 'translate-x-20',
143
+ handleNotDisabled: 'i-bg-$color-switch-handle-background shadow-s',
144
+ handleDisabled: 'i-bg-$color-switch-handle-background-disabled',
145
+ a11y: 'sr-only',
146
+ };
147
+
148
+ export const toaster = {
149
+ container:
150
+ 'fixed transform translate-z-0 bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none',
151
+ content: 'w-full',
152
+ toaster:
153
+ 'grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none',
154
+ };
155
+
156
+ export const toast = {
157
+ wrapper: 'relative overflow-hidden w-full',
158
+ toast:
159
+ 'flex group p-8 mt-16 rounded-8 border-2 w-full pointer-events-auto transition-all',
160
+ positive: 'i-bg-$color-toast-positive-background i-border-$color-toast-positive-subtle-border i-text-$color-toast-positive-text',
161
+ warning: 'i-bg-$color-toast-warning-background i-border-$color-toast-warning-subtle-border i-text-$color-toast-warning-text',
162
+ negative: 'i-bg-$color-toast-negative-background i-border-$color-toast-negative-subtle-border i-text-$color-toast-negative-text',
163
+ icon: 'shrink-0 rounded-full w-[16px] h-[16px] m-[8px]',
164
+ iconPositive: 'i-text-$color-toast-positive-icon',
165
+ iconWarning: 'i-text-$color-toast-warning-icon',
166
+ iconNegative: 'i-text-$color-toast-negative-icon',
167
+ iconLoading: 'animate-bounce',
168
+ content: 'self-center mr-8 py-4 last-child:mb-0',
169
+ close: 'bg-transparent ml-auto p-[8px]',
170
+ };
171
+
172
+ export const tabs = {
173
+ tabContainer: 'mx-auto max-w-screen-md w-full grid relative',
174
+ wunderbar:
175
+ 'absolute i-border-$color-tabs-border-active -bottom-0 border-b-4 transition-all',
176
+ wrapperUnderlined:
177
+ 'border-b i-border-$color-tabs-border -mx-16 sm:mx-0 px-4 sm:px-0 mb-32 ',
178
+ };
179
+
180
+ export const tab = {
181
+ tab: 'grid items-center font-bold gap-8 focusable antialias p-16 pb-8 border-b-4 i-text-$color-tabs-text i-border-$color-tabs-border hover:i-text-$color-tabs-text-hover hover:i-border-$color-tabs-border-hover',
182
+ tabActive: 'i-text-$color-tabs-text-active',
183
+ icon: 'mx-auto hover:i-text-$color-tabs-text-hover',
184
+ iconUnderlinedActive: 'i-text-$color-tabs-text-active',
185
+ content: 'flex items-center justify-center gap-8',
186
+ contentUnderlined: 'content-underlined', // content-underlined is a no-op that prevents a quirk in how Vue handles class bindings
187
+ contentUnderlinedActive: 'i-text-$color-tabs-text-active',
188
+ };
189
+
190
+ // Todo: Handle dynamic classnames
191
+ export const gridLayout = {
192
+ cols1: 'grid-cols-1',
193
+ cols2: 'grid-cols-2',
194
+ cols3: 'grid-cols-3',
195
+ cols4: 'grid-cols-4',
196
+ cols5: 'grid-cols-5',
197
+ cols6: 'grid-cols-6',
198
+ cols7: 'grid-cols-7',
199
+ cols8: 'grid-cols-8',
200
+ cols9: 'grid-cols-9',
201
+ };
202
+
203
+ export const buttonReset =
204
+ 'focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block';
205
+
206
+ export const expandable = {
207
+ expandable: 'will-change-height',
208
+ expandableTitle: 'font-bold i-text-$color-expandable-title-text',
209
+ expandableBox: 'i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 ' + box.box,
210
+ expandableBleed: box.bleed,
211
+ chevron: 'inline-block align-middle transform transition-transform transform-gpu i-text-$color-expandable-icon',
212
+ chevronNonBox: 'relative left-8',
213
+ chevronBox: 'absolute right-16',
214
+ chevronExpanded: '-rotate-180',
215
+ expansion: 'overflow-hidden',
216
+ expansionNotExpanded: 'h-0 invisible',
217
+ button: buttonReset + ' hover:underline focus:underline',
218
+ buttonBox: 'w-full text-left relative inline-flex! items-center ' + box.box,
219
+ paddingTop: 'pt-0',
220
+ title: 'flex justify-between items-center',
221
+ titleType: 'h4',
222
+ };
223
+
224
+ export const button = {
225
+ // Buttontypes
226
+ buttonSecondary:
227
+ 'py-10 px-14 border-2 font-bold rounded-8 leading-[24] max-w-max focusable justify-center transition-colors ease-in-out i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active', // .button, .button--secondary, .button--default. using tailwind ease-in-out instead of fabric transition-timing-function: cubic-bezier(0.46, 0.03, 0.52, 0.96)
228
+ buttonPrimary:
229
+ 'py-12 px-16 border-0 font-bold rounded-8 leading-[24] max-w-max focusable justify-center transition-colors ease-in-out i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover! active:i-bg-$color-button-primary-background-active', // .button--primary, .button--cta
230
+ buttonFlat:
231
+ 'py-12 px-16 border-0! font-bold rounded-8 leading-[24] max-w-max focusable justify-center transition-colors ease-in-out i-bg-$color-button-quiet-background! i-text-$color-button-quiet-text! hover:i-bg-$color-button-quiet-background-hover! active:i-bg-$color-button-quiet-background-active!', // .button--quiet, .button--flat
232
+ buttonDestructive:
233
+ 'py-12 px-16 border-0 font-bold rounded-8 leading-[24] max-w-max focusable justify-center transition-colors ease-in-out i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover! active:i-bg-$color-button-negative-background-active!', // .button--destructive
234
+ buttonDestructiveFlat:
235
+ 'py-12 px-16 border-0 font-bold rounded-8 leading-[24] max-w-max focusable justify-center transition-colors ease-in-out i-bg-$color-button-negative-quiet-background! i-text-$color-button-negative-quiet-text! hover:i-bg-$color-button-negative-quiet-background-hover! active:i-bg-$color-button-negative-quiet-background-active!', // .button--destructive-flat
236
+ buttonUtility:
237
+ 'px-[15px] py-[11px] font-bold leading-[24] max-w-max focusable justify-center transition-colors ease-in-out border rounded-4 i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover! active:i-border-$color-button-utility-border-active!', // .button--utility
238
+ buttonUtilityFlat:
239
+ 'py-12 px-16 bg-transparent border-0 font-bold leading-[24] max-w-max focusable justify-center transition-colors ease-in-out i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover rounded-4', // .button--utility-flat
240
+ buttonPill:
241
+ 'font-bold leading-[24] max-w-max focusable justify-center transition-colors ease-in-out rounded-full! min-h-[44px] min-w-[44px] border-0! p-4 i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover acive:i-bg-$color-button-pill-background-active inline-flex items-center justify-center hover:bg-clip-padding', // .button--pill missing: hover:background-color: rgba(var(--f-blue-600-rgb), 0.1) , and: hover:border-color: hsla(0, 0%, 100%, 0.4);
242
+ buttonLink:
243
+ 'leading-[24] max-w-max focusable ease-in-out inline s-text-link active:underline hover:underline', //.button--link /* Buttons pretending to be links, (Should rather inherit the actual link setup in the future?) */
244
+ // Sizestuff
245
+ buttonSmall: 'px-16 py-6 text-xs leading-xs', // .button--small
246
+ buttonSmallOverride: 'py-8', // .button--small.button--primary, .button--small.button--destructive, .button--small.button--destructive-flat, .button--small.button--order, .button--small.button--quiet
247
+ buttonSmallSecondary: 'py-6', // .button--small.button--secondary
248
+ buttonSmallUtility: 'py-7 px-15', // .button--small.button--secondary
249
+ buttonSmallButtonPill: 'p-4 min-h-32 min-w-32', // .button--small.button--pill
250
+ buttonSmallButtonLink: 'p-0', // .button--small.button--link
251
+ // Disabled
252
+ buttonIsDisabled:
253
+ 'py-10 px-14 font-bold leading-[24] max-w-max justify-center transition-colors ease-in-out i-bg-$color-button-disabled-background! i-text-$color-button-disabled-text cursor-default pointer-events-none', // .button:disabled, .button--is-disabled
254
+ // Progress indicator
255
+ buttonInProgress:
256
+ 'py-10 px-14 border-0 font-bold rounded-8 leading-[24] max-w-max focusable justify-center transition-colors ease-in-out animate-inprogress i-text-$color-button-loading-text! pointer-events-none i-bg-$color-button-loading-background!', // .button--in-progress, a.button--in-progress:visited
257
+ linkAsButton: 'inline-block hover:no-underline',
258
+ a11y: 'sr-only',
259
+ };
260
+
261
+ export const buttonGroup = {
262
+ wrapper: 'inline-flex rounded-4 overflow-hidden',
263
+ raised: 'i-shadow-$shadow-buttongroup',
264
+ vertical: 'flex-col',
265
+ nonOutlinedVertical: 'divide-y',
266
+ nonOutlinedHorizontal: 'divide-x',
267
+ }
268
+
269
+ export const buttonGroupItem = {
270
+ wrapper: 'relative i-text-$color-buttongroup-utility-text i-bg-$color-buttongroup-utility-background hover:i-bg-$color-buttongroup-utility-background-hover active:i-text-$color-buttongroup-utility-text-active active:i-bg-$color-buttongroup-utility-background-active',
271
+ outlined: 'border hover:z-30 i-border-$color-buttongroup-utility-border active:i-border-$color-buttongroup-utility-border-active',
272
+ outlinedVertical: '-mb-1 last:mb-0 first:rounded-lt-4 first:rounded-rt-4 last:rounded-lb-4 last:rounded-rb-4',
273
+ outlinedHorizontal: '-mr-1 last:mr-0 first:rounded-lt-4 first:rounded-lb-4 last:rounded-rt-4 last:rounded-rb-4',
274
+ outlinedVerticalResets: 'px-1 pt-1 last:pb-1 -mb-1 last:mb-0',
275
+ outlinedHorizontalResets: 'py-1 pl-1 last:pr-1 -mr-1 last:mr-0',
276
+ outlinedSelected: 'i-border-$color-buttongroup-utility-border-active',
277
+ selected: 'z-30 i-text-$color-buttongroup-utility-text-active! i-bg-$color-buttongroup-utility-background-active!',
278
+ }
279
+
280
+ export const modal = {
281
+ //TODO: this class can be removed when we have the solution for opacity and we can add rgba values to the background of the backdrop
282
+ transparentBg: `before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25`,
283
+ backdrop:
284
+ 'fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]',
285
+ modal:
286
+ 'pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8',
287
+ content:
288
+ 'block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative',
289
+ footer: 'flex justify-end shrink-0 px-16 sm:px-32',
290
+ transitionTitle: 'transition-all duration-300',
291
+ transitionTitleCenter: 'justify-self-center',
292
+ transitionTitleColSpan: 'col-span-2',
293
+ title:
294
+ '-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0',
295
+ titleText: 'mb-0 h4 sm:h3',
296
+ titleButton: button.buttonPill + ' sm:min-h-[32px] sm:min-w-[32px]',
297
+ titleButtonLeft: '-ml-8 sm:-ml-12 justify-self-start',
298
+ titleButtonRight: '-mr-8 sm:-mr-12 justify-self-end',
299
+ titleButtonIcon: 'h-16 w-16 sm:h-24 sm:w-24',
300
+ titleButtonIconRotated: 'transform rotate-90',
301
+ };
302
+
303
+ export const alert = {
304
+ alert: "flex p-16 border border-l-4 rounded-4",
305
+ willChangeHeight: "will-change-height",
306
+ textWrapper: "last-child:mb-0 text-s",
307
+ title: "font-bold",
308
+ icon: "w-16 mr-8 min-w-16",
309
+ negative: "i-border-$color-alert-negative-subtle-border i-bg-$color-alert-negative-background i-text-$color-alert-negative-text i-border-l-$color-alert-negative-border",
310
+ negativeIcon: "i-text-$color-alert-negative-icon",
311
+ positive: "i-border-$color-alert-positive-subtle-border i-bg-$color-alert-positive-background i-text-$color-alert-positive-text i-border-l-$color-alert-positive-border",
312
+ positiveIcon: "i-text-$color-alert-positive-icon",
313
+ warning: "i-border-$color-alert-warning-subtle-border i-bg-$color-alert-warning-background i-text-$color-alert-warning-text i-border-l-$color-alert-warning-border",
314
+ warningIcon: "i-text-$color-alert-warning-icon",
315
+ info: "i-border-$color-alert-info-subtle-border i-bg-$color-alert-info-background i-text-$color-alert-info-text i-border-l-$color-alert-info-border",
316
+ infoIcon: "i-text-$color-alert-info-icon"
317
+ }
318
+
319
+ export const input = {
320
+ default: 'block text-m mb-0 leading-m i-text-$color-input-text-filled i-bg-$color-input-background i-border-$color-input-border hover:i-border-$color-input-border-hover active:i-border-$color-input-border-active rounded-4 py-12 px-8 block border-1 w-full focusable focus:[--w-outline-offset:-2px] caret-current',
321
+ textArea: 'min-h-[42] sm:min-h-[45]',
322
+ disabled: 'i-bg-$color-input-background-disabled i-border-$color-input-border-disabled hover:i-border-$color-input-border-disabled! i-text-$color-input-text-disabled pointer-events-none',
323
+ invalid: 'i-border-$color-input-border-error i-text-$color-input-text-error!',
324
+ readOnly: 'pl-0 bg-transparent border-0 pointer-events-none i-text-$color-input-text-read-only',
325
+ placeholder: 'placeholder:s-text-placeholder',
326
+ wrapper: 'relative',
327
+ suffix: 'pr-40',
328
+ prefix: 'pl-40'
329
+ }
330
+
331
+ export const select = {
332
+ default: 'block text-m mb-0 leading-m i-text-$color-select-text i-bg-$color-select-background i-border-$color-select-border hover:i-border-$color-select-border-hover active:i-border-$color-select-border-active rounded-4 py-12 px-8 block border-1 w-full focusable focus:[--w-outline-offset:-2px] appearance-none pr-32 cursor-pointer caret-current',
333
+ disabled: 'i-bg-$color-select-background-disabled i-border-$color-select-border-disabled hover:i-border-$color-select-border-disabled! active:i-border-$color-select-border-disabled! i-text-$color-select-text-disabled pointer-events-none',
334
+ invalid: 'i-border-$color-select-border-negative',
335
+ readOnly: 'pl-0 bg-transparent border-0 pointer-events-none before:hidden',
336
+ wrapper: 'relative',
337
+ selectWrapper: `relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none `,
338
+ chevron: 'absolute top-[30%] block right-0 bottom-0 w-32 h-full i-text-$color-select-icon',
339
+ chevronDisabled: 'opacity-25',
340
+ }
341
+
342
+ export const label = {
343
+ label: 'antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text',
344
+ labelInvalid: 'i-text-$color-label-text-negative',
345
+ optional: 'pl-8 font-normal text-s i-text-$color-label-optional-text',
346
+ }
347
+
348
+ export const helpText = {
349
+ helpText: 'text-xs mt-4 block i-text-$color-helptext-text',
350
+ helpTextValid: 'i-text-$color-helptext-text-positive',
351
+ helpTextInvalid: 'i-text-$color-helptext-text-negative'
352
+ }
353
+
354
+ const prefixSuffixWrapperBase =
355
+ 'absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] ';
356
+
357
+ export const suffix = {
358
+ wrapper: prefixSuffixWrapperBase + 'right-0',
359
+ wrapperWithLabel: 'w-max pr-12',
360
+ wrapperWithIcon: 'w-40',
361
+ label: `${label.label} pb-0! text-xs!`,
362
+ };
363
+
364
+ export const prefix = {
365
+ wrapper: prefixSuffixWrapperBase + 'left-0',
366
+ wrapperWithLabel: 'w-max pl-12',
367
+ wrapperWithIcon: 'w-40',
368
+ label: `${label.label} pb-0! text-xs!`,
369
+ };
370
+
371
+ export const breadcrumbs = {
372
+ wrapper: 'flex space-x-8',
373
+ text: 'i-text-$color-breadcrumbs-text',
374
+ link: 'i-text-$color-breadcrumbs-link-text',
375
+ separator: 'select-none i-text-$color-breadcrumbs-icon',
376
+ a11y: 'sr-only',
377
+ }
378
+
379
+ export const toggle = {
380
+ wrapper: 'relative py-1',
381
+ deadToggleWrapper: 'h-20 w-20 pointer-events-none',
382
+ input: 'peer',
383
+ deadToggleInput: 'hidden',
384
+ inputDisabled: 'pointer-events-none',
385
+ focusable: 'peer-focus:focusable',
386
+ focusableWithin: 'focus-within:focusable',
387
+ label: 'cursor-pointer text-m i-text-$color-label-text py-2 pl-28 select-none relative block before:block before:border before:absolute before:transition-all before:left-0 before:w-20 before:h-20 before:top-2',
388
+ deadToggleLabel: '-mt-2',
389
+ noContent: `before:content-[""]`,
390
+ indeterminate: `leading-[11] before:s-text-inverted before:text-center before:font-bold before:content-["-"] peer-indeterminate:before:i-border-$color-checkbox-border-active peer-indeterminate:before:i-bg-$color-checkbox-background-active peer-indeterminate:hover:before:i-border-$color-checkbox-border-hover peer-indeterminate:hover:before:i-bg-$color-checkbox-background-active-hover`,
391
+ labelDisabled: 'pointer-events-none',
392
+ checkbox: 'before:rounded-2 hover:before:i-border-$color-checkbox-border-hover hover:before:i-bg-$color-checkbox-background-hover',
393
+ checkboxChecked: 'peer-checked:before:i-border-$color-checkbox-border-active peer-checked:before:i-bg-$color-checkbox-background-active peer-checked:peer-hover:before:i-border-$color-checkbox-border-active-hover peer-checked:peer-hover:before:i-bg-$color-checkbox-background-active-hover',
394
+ checkboxInvalid: 'before:i-bg-$color-checkbox-negative-background hover:before:i-bg-$color-checkbox-negative-background-hover peer-checked:before:i-border-$color-checkbox-negative-border-active hover:before:i-border-$color-checkbox-negative-border-hover peer-checked:before:i-bg-$color-checkbox-negative-background-active peer-checked:peer-hover:before:i-bg-$color-checkbox-negative-background-active-hover peer-checked:peer-hover:before:i-border-$color-checkbox-negative-border-active-hover',
395
+ checkboxDisabled: 'before:i-bg-$color-checkbox-background-disabled before:i-border-$color-checkbox-border-disabled peer-checked:before:i-border-$color-checkbox-border-active-disabled peer-checked:before:i-bg-$color-checkbox-background-active-disabled',
396
+ labelCheckboxBorder: 'i-border-$color-checkbox-border',
397
+ radio: 'before:rounded-full peer-checked:before:border-[6] peer-checked:peer-hover:before:i-border-$color-radio-border-active-hover peer-hover:before:i-border-$color-radio-border-hover peer-hover:before:i-bg-$color-radio-background-hover',
398
+ radioChecked: 'peer-checked:before:i-border-$color-radio-border-active',
399
+ radioInvalid: 'before:i-bg-$color-radio-negative-background peer-hover:before:i-bg-$color-radio-negative-background-hover before:i-border-$color-radio-negative-border peer-hover:before:i-border-$color-radio-negative-border-hover peer-checked:before:i-border-$color-radio-negative-border-active peer-checked:peer-hover:before:i-border-$color-radio-negative-border-active-hover ',
400
+ radioDisabled: 'before:i-bg-$color-radio-background-disabled before:i-border-$color-radio-border-disabled peer-checked:before:i-border-$color-radio-border-active-disabled',
401
+ labelRadioBorder: 'i-border-$color-radio-border',
402
+ radioButtons: 'inline-flex relative font-bold rounded-8',
403
+ radioButtonsGroup: 'group',
404
+ radioButtonsLabel: 'peer-hover:peer-not-checked:i-bg-$color-buttongroup-primary-background-hover peer-checked:i-text-$color-buttongroup-primary-text-active peer-checked:i-bg-$color-buttongroup-primary-background-active peer-checked:i-border-$color-buttongroup-primary-border-active block relative text-s font-bold cursor-pointer i-text-$color-buttongroup-primary-text text-center s-bg-default border-2 i-border-$color-buttongroup-primary-border py-8 pl-12 pr-14 group-first-of-type:rounded-tl-8 group-first-of-type:rounded-bl-8 group-last-of-type:rounded-tr-8 group-last-of-type:rounded-br-8 group-not-last-of-type:border-r-0 peer-checked:z-10 group-not-first:-ml-2',
405
+ radioButtonsJustified: 'flex!',
406
+ radioButtonsGroupJustified: 'grow-1 shrink-0 basis-auto',
407
+ radioButtonsLabelSmall: 'text-xs py-[5px]! px-[8px]!',
408
+ icon: `peer-checked:before:bg-center before:bg-[url(var(--w-form-check-mark))]`,
409
+ a11y: 'sr-only',
410
+ };
411
+
412
+ export const clickable = {
413
+ clickable: 'absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset',
414
+ clickableNotToggle: 'inset-0 absolute',
415
+ label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
416
+ }
417
+
418
+ export const combobox = {
419
+ wrapper: 'relative',
420
+ combobox: 'absolute left-0 right-0 pb-8 rounded-8 s-bg-default shadow-m',
421
+ textMatch: 'font-bold',
422
+ listbox: 'm-0 p-0 select-none list-none',
423
+ option: 'block cursor-pointer p-8 hover:s-bg-hover',
424
+ optionSelected: 's-bg-selected',
425
+ a11y: 'sr-only',
426
+ }
@@ -0,0 +1,17 @@
1
+ import { button } from './index.js';
2
+
3
+ export const buttons = {
4
+ 'button': button.buttonSecondary,
5
+ 'button--secondary': button.buttonSecondary,
6
+ 'button--default': button.buttonSecondary,
7
+ 'button--small': button.buttonSmall,
8
+ 'button--link': button.buttonLink,
9
+ 'button--primary': button.buttonPrimary,
10
+ 'button--cta': button.buttonPrimary,
11
+ 'button--pill': button.buttonPill,
12
+ 'button--utility': button.buttonUtility,
13
+ 'button--utility-flat': button.buttonUtilityFlat,
14
+ 'button--destructive': button.buttonDestructive,
15
+ 'button--destructive-flat': button.buttonDestructiveFlat,
16
+ 'button--flat': button.buttonFlat,
17
+ }
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@warp-ds/css",
3
+ "version": "1.0.0-alpha.10",
4
+ "scripts": {
5
+ "build": "pnpm build:tokens && pnpm build:resets && pnpm build:cc",
6
+ "commit": "cz",
7
+ "semantic-release": "semantic-release",
8
+ "build:cc": "cd component-classes && tsc && vite build",
9
+ "build:tokens": "cd tokens && node index.js",
10
+ "build:resets": "cd resets && node index.js"
11
+ },
12
+ "type": "module",
13
+ "exports": {
14
+ "./component-classes": "./component-classes/index.js",
15
+ "./components": "./dist/components.css",
16
+ "./component-classes/classes": "./component-classes/classes.js",
17
+ "./component-classes/shortcuts": "./component-classes/shortcuts.js"
18
+ },
19
+ "types": "./component-classes/index.d.ts",
20
+ "files": [
21
+ "./component-classes/index.js",
22
+ "./component-classes/classes.js",
23
+ "./component-classes/shortcuts.js",
24
+ "./component-classes/index.d.ts"
25
+ ],
26
+ "dependencies": {
27
+ "drnm": "^0.9.0",
28
+ "lightningcss": "^1.19.0",
29
+ "@sindresorhus/slugify": "^2.2.0",
30
+ "@warp-ds/tokenizer": "^0.0.2",
31
+ "@warp-ds/uno": "^1.0.0-alpha.49"
32
+ },
33
+ "devDependencies": {
34
+ "@eik/cli": "^2.0.22",
35
+ "@semantic-release/changelog": "^6.0.2",
36
+ "@semantic-release/exec": "^6.0.3",
37
+ "@semantic-release/git": "^10.0.1",
38
+ "cz-conventional-changelog": "^3.3.0",
39
+ "semantic-release": "^20.1.3",
40
+ "typescript": "^4.9.5",
41
+ "unocss": "^0.53.1",
42
+ "vite": "^4.3.9",
43
+ "vite-plugin-dts": "^2.3.0"
44
+ },
45
+ "config": {
46
+ "commitizen": {
47
+ "path": "./node_modules/cz-conventional-changelog"
48
+ }
49
+ },
50
+ "eik": {
51
+ "server": "https://assets.finn.no",
52
+ "files": "./dist"
53
+ },
54
+ "publishConfig": {
55
+ "registry": "https://registry.npmjs.org/",
56
+ "access": "public"
57
+ }
58
+ }