@warp-ds/css 1.0.0-alpha.19 → 1.0.0-alpha.9
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as components from './index.js';
|
|
2
2
|
|
|
3
3
|
export const classes = Object.values(components)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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);
|
|
@@ -65,7 +65,7 @@ export const box = {
|
|
|
65
65
|
bordered: 'border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text',
|
|
66
66
|
infoClickable: 'hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover',
|
|
67
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'
|
|
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
69
|
};
|
|
70
70
|
|
|
71
71
|
export const pill = {
|
|
@@ -111,7 +111,7 @@ export const step = {
|
|
|
111
111
|
export const steps = {
|
|
112
112
|
steps: 'w-full',
|
|
113
113
|
stepsHorizontal: 'flex',
|
|
114
|
-
}
|
|
114
|
+
}
|
|
115
115
|
|
|
116
116
|
export const card = {
|
|
117
117
|
card: 'cursor-pointer overflow-hidden relative transition-all',
|
|
@@ -140,7 +140,7 @@ export const switchToggle = {
|
|
|
140
140
|
trackDisabled: 'i-bg-$color-switch-track-background-disabled',
|
|
141
141
|
handle: 'absolute transform-gpu h-16 w-16 top-4 left-4 rounded-full transition-transform',
|
|
142
142
|
handleSelected: 'translate-x-20',
|
|
143
|
-
handleNotDisabled: 'i-bg-$color-switch-handle-background
|
|
143
|
+
handleNotDisabled: 'i-bg-$color-switch-handle-background shadow-s',
|
|
144
144
|
handleDisabled: 'i-bg-$color-switch-handle-background-disabled',
|
|
145
145
|
a11y: 'sr-only',
|
|
146
146
|
};
|
|
@@ -224,25 +224,25 @@ export const expandable = {
|
|
|
224
224
|
export const button = {
|
|
225
225
|
// Buttontypes
|
|
226
226
|
buttonSecondary:
|
|
227
|
-
'py-10 px-14 border-2 font-bold rounded-8
|
|
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
228
|
buttonPrimary:
|
|
229
|
-
'py-12 px-16 border-0 font-bold rounded-8
|
|
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
230
|
buttonFlat:
|
|
231
|
-
'py-12 px-16 border-0! font-bold rounded-8
|
|
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
232
|
buttonDestructive:
|
|
233
|
-
'py-12 px-16 border-0 font-bold rounded-8
|
|
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
234
|
buttonDestructiveFlat:
|
|
235
|
-
'py-12 px-16 border-0 font-bold rounded-8
|
|
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
236
|
buttonUtility:
|
|
237
|
-
'px-[15px] py-[11px] font-bold
|
|
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
238
|
buttonUtilityFlat:
|
|
239
|
-
'py-12 px-16 bg-transparent border-0 font-bold
|
|
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
240
|
buttonPill:
|
|
241
|
-
'font-bold
|
|
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
242
|
buttonLink:
|
|
243
|
-
'leading-[24] max-w-max focusable ease-in-out inline
|
|
244
|
-
//
|
|
245
|
-
buttonSmall: 'px-16 py-6 text-xs', // .button--small
|
|
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
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
247
|
buttonSmallSecondary: 'py-6', // .button--small.button--secondary
|
|
248
248
|
buttonSmallUtility: 'py-7 px-15', // .button--small.button--secondary
|
|
@@ -264,7 +264,7 @@ export const buttonGroup = {
|
|
|
264
264
|
vertical: 'flex-col',
|
|
265
265
|
nonOutlinedVertical: 'divide-y',
|
|
266
266
|
nonOutlinedHorizontal: 'divide-x',
|
|
267
|
-
}
|
|
267
|
+
}
|
|
268
268
|
|
|
269
269
|
export const buttonGroupItem = {
|
|
270
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',
|
|
@@ -275,7 +275,7 @@ export const buttonGroupItem = {
|
|
|
275
275
|
outlinedHorizontalResets: 'py-1 pl-1 last:pr-1 -mr-1 last:mr-0',
|
|
276
276
|
outlinedSelected: 'i-border-$color-buttongroup-utility-border-active',
|
|
277
277
|
selected: 'z-30 i-text-$color-buttongroup-utility-text-active! i-bg-$color-buttongroup-utility-background-active!',
|
|
278
|
-
}
|
|
278
|
+
}
|
|
279
279
|
|
|
280
280
|
export const modal = {
|
|
281
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
|
|
@@ -313,8 +313,8 @@ export const alert = {
|
|
|
313
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
314
|
warningIcon: "i-text-$color-alert-warning-icon",
|
|
315
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
|
-
}
|
|
316
|
+
infoIcon: "i-text-$color-alert-info-icon"
|
|
317
|
+
}
|
|
318
318
|
|
|
319
319
|
export const input = {
|
|
320
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',
|
|
@@ -322,11 +322,11 @@ export const input = {
|
|
|
322
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
323
|
invalid: 'i-border-$color-input-border-error i-text-$color-input-text-error!',
|
|
324
324
|
readOnly: 'pl-0 bg-transparent border-0 pointer-events-none i-text-$color-input-text-read-only',
|
|
325
|
-
placeholder: 'placeholder:
|
|
325
|
+
placeholder: 'placeholder:s-text-placeholder',
|
|
326
326
|
wrapper: 'relative',
|
|
327
327
|
suffix: 'pr-40',
|
|
328
|
-
prefix: 'pl-40'
|
|
329
|
-
}
|
|
328
|
+
prefix: 'pl-40'
|
|
329
|
+
}
|
|
330
330
|
|
|
331
331
|
export const select = {
|
|
332
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',
|
|
@@ -337,19 +337,19 @@ export const select = {
|
|
|
337
337
|
selectWrapper: `relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none `,
|
|
338
338
|
chevron: 'absolute top-[30%] block right-0 bottom-0 w-32 h-full i-text-$color-select-icon',
|
|
339
339
|
chevronDisabled: 'opacity-25',
|
|
340
|
-
}
|
|
340
|
+
}
|
|
341
341
|
|
|
342
342
|
export const label = {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
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
347
|
|
|
348
348
|
export const helpText = {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
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
353
|
|
|
354
354
|
const prefixSuffixWrapperBase =
|
|
355
355
|
'absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] ';
|
|
@@ -374,10 +374,9 @@ export const breadcrumbs = {
|
|
|
374
374
|
link: 'i-text-$color-breadcrumbs-link-text',
|
|
375
375
|
separator: 'select-none i-text-$color-breadcrumbs-icon',
|
|
376
376
|
a11y: 'sr-only',
|
|
377
|
-
}
|
|
377
|
+
}
|
|
378
378
|
|
|
379
379
|
export const toggle = {
|
|
380
|
-
field: 'relative text-m',
|
|
381
380
|
wrapper: 'relative py-1',
|
|
382
381
|
deadToggleWrapper: 'h-20 w-20 pointer-events-none',
|
|
383
382
|
input: 'peer',
|
|
@@ -388,7 +387,7 @@ export const toggle = {
|
|
|
388
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',
|
|
389
388
|
deadToggleLabel: '-mt-2',
|
|
390
389
|
noContent: `before:content-[""]`,
|
|
391
|
-
indeterminate: `
|
|
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`,
|
|
392
391
|
labelDisabled: 'pointer-events-none',
|
|
393
392
|
checkbox: 'before:rounded-2 hover:before:i-border-$color-checkbox-border-hover hover:before:i-bg-$color-checkbox-background-hover',
|
|
394
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',
|
|
@@ -402,7 +401,7 @@ export const toggle = {
|
|
|
402
401
|
labelRadioBorder: 'i-border-$color-radio-border',
|
|
403
402
|
radioButtons: 'inline-flex relative font-bold rounded-8',
|
|
404
403
|
radioButtonsGroup: 'group',
|
|
405
|
-
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
|
|
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',
|
|
406
405
|
radioButtonsJustified: 'flex!',
|
|
407
406
|
radioButtonsGroupJustified: 'grow-1 shrink-0 basis-auto',
|
|
408
407
|
radioButtonsLabelSmall: 'text-xs py-[5px]! px-[8px]!',
|
|
@@ -413,15 +412,15 @@ export const toggle = {
|
|
|
413
412
|
export const clickable = {
|
|
414
413
|
clickable: 'absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset',
|
|
415
414
|
clickableNotToggle: 'inset-0 absolute',
|
|
416
|
-
label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
|
|
417
|
-
}
|
|
415
|
+
label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
|
|
416
|
+
}
|
|
418
417
|
|
|
419
418
|
export const combobox = {
|
|
420
419
|
wrapper: 'relative',
|
|
421
|
-
combobox: 'absolute left-0 right-0 pb-8 rounded-8
|
|
420
|
+
combobox: 'absolute left-0 right-0 pb-8 rounded-8 s-bg-default shadow-m',
|
|
422
421
|
textMatch: 'font-bold',
|
|
423
422
|
listbox: 'm-0 p-0 select-none list-none',
|
|
424
|
-
option: 'block cursor-pointer p-8 hover:
|
|
425
|
-
optionSelected: '
|
|
423
|
+
option: 'block cursor-pointer p-8 hover:s-bg-hover',
|
|
424
|
+
optionSelected: 's-bg-selected',
|
|
426
425
|
a11y: 'sr-only',
|
|
427
|
-
}
|
|
426
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { button } from './index.js';
|
|
2
2
|
|
|
3
3
|
export const buttons = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
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
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-ds/css",
|
|
3
|
-
"
|
|
4
|
-
"version": "1.0.0-alpha.19",
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
5
4
|
"scripts": {
|
|
6
5
|
"build": "pnpm build:tokens && pnpm build:resets && pnpm build:cc",
|
|
7
6
|
"commit": "cz",
|
|
8
7
|
"semantic-release": "semantic-release",
|
|
9
8
|
"build:cc": "cd component-classes && tsc && vite build",
|
|
10
9
|
"build:tokens": "cd tokens && node index.js",
|
|
11
|
-
"build:resets": "cd resets && node index.js"
|
|
12
|
-
"lint:fix": "eslint . --fix",
|
|
13
|
-
"lint:check": "eslint ."
|
|
10
|
+
"build:resets": "cd resets && node index.js"
|
|
14
11
|
},
|
|
15
12
|
"type": "module",
|
|
16
13
|
"exports": {
|
|
@@ -39,17 +36,12 @@
|
|
|
39
36
|
"@semantic-release/exec": "^6.0.3",
|
|
40
37
|
"@semantic-release/git": "^10.0.1",
|
|
41
38
|
"cz-conventional-changelog": "^3.3.0",
|
|
42
|
-
"@warp-ds/eslint-config": "^0.0.1",
|
|
43
|
-
"eslint": "^8.43.0",
|
|
44
39
|
"semantic-release": "^20.1.3",
|
|
45
40
|
"typescript": "^4.9.5",
|
|
46
41
|
"unocss": "^0.53.1",
|
|
47
42
|
"vite": "^4.3.9",
|
|
48
43
|
"vite-plugin-dts": "^2.3.0"
|
|
49
44
|
},
|
|
50
|
-
"eslintConfig": {
|
|
51
|
-
"extends": "@warp-ds"
|
|
52
|
-
},
|
|
53
45
|
"config": {
|
|
54
46
|
"commitizen": {
|
|
55
47
|
"path": "./node_modules/cz-conventional-changelog"
|
|
@@ -62,6 +54,5 @@
|
|
|
62
54
|
"publishConfig": {
|
|
63
55
|
"registry": "https://registry.npmjs.org/",
|
|
64
56
|
"access": "public"
|
|
65
|
-
}
|
|
66
|
-
"license": "Apache-2.0"
|
|
57
|
+
}
|
|
67
58
|
}
|