@obosbbl/grunnmuren-tailwind 2.0.0-canary.7 → 2.0.0-canary.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.
- package/package.json +2 -2
- package/tailwind-base.cjs +30 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-tailwind",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.9",
|
|
4
4
|
"description": "Grunnmuren Tailwind preset",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/code-obos/grunnmuren"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"tailwindcss-animate": "^1.0.7"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"tailwindcss": "3.4.
|
|
23
|
+
"tailwindcss": "3.4.15"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"tailwindcss": "^3.4.0"
|
package/tailwind-base.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
1
2
|
const plugin = require('tailwindcss/plugin');
|
|
2
3
|
const fontFallbacks = require('./fonts/font-fallback');
|
|
3
4
|
|
|
@@ -159,7 +160,7 @@ module.exports = (options = {}) => {
|
|
|
159
160
|
...v1CompatibilityPlugins,
|
|
160
161
|
require('@tailwindcss/typography'),
|
|
161
162
|
require('tailwindcss-animate'),
|
|
162
|
-
plugin(
|
|
163
|
+
plugin(({ addBase, addComponents, theme }) => {
|
|
163
164
|
addBase({
|
|
164
165
|
html: {
|
|
165
166
|
'@apply text-black antialiased font-normal font-text': {},
|
|
@@ -243,7 +244,7 @@ module.exports = (options = {}) => {
|
|
|
243
244
|
});
|
|
244
245
|
}),
|
|
245
246
|
|
|
246
|
-
plugin(
|
|
247
|
+
plugin(({ addBase, addComponents }) => {
|
|
247
248
|
const {
|
|
248
249
|
headingXlText,
|
|
249
250
|
headingLText,
|
|
@@ -333,9 +334,29 @@ module.exports = (options = {}) => {
|
|
|
333
334
|
'.description': {
|
|
334
335
|
[description]: {},
|
|
335
336
|
},
|
|
337
|
+
/** Standard black focus outline */
|
|
338
|
+
'.outline-focus': {
|
|
339
|
+
'@apply outline outline-2 outline-black': {},
|
|
340
|
+
},
|
|
341
|
+
/** Standard black focus outline with offset */
|
|
342
|
+
'.outline-focus-offset': {
|
|
343
|
+
'@apply outline-focus outline-offset-2': {},
|
|
344
|
+
},
|
|
345
|
+
/** Standard black focus outline with negative offset (inset) */
|
|
346
|
+
'.outline-focus-inset': {
|
|
347
|
+
'@apply outline-focus -outline-offset-4': {},
|
|
348
|
+
},
|
|
349
|
+
/** Standard black focus ring */
|
|
350
|
+
'.ring-focus': {
|
|
351
|
+
'@apply ring-2 ring-black': {},
|
|
352
|
+
},
|
|
353
|
+
/** Standard black focus ring with offset */
|
|
354
|
+
'.ring-focus-offset': {
|
|
355
|
+
'@apply ring-focus ring-offset-2': {},
|
|
356
|
+
},
|
|
336
357
|
});
|
|
337
358
|
}),
|
|
338
|
-
plugin(
|
|
359
|
+
plugin(({ addBase }) => {
|
|
339
360
|
addBase(
|
|
340
361
|
Object.entries(fontDeclarations).flatMap(
|
|
341
362
|
([fontFamily, fontFamilyDeclarations]) =>
|
|
@@ -425,6 +446,8 @@ module.exports = (options = {}) => {
|
|
|
425
446
|
fontFallbacks.OBOSDisplay['font-family'],
|
|
426
447
|
'sans-serif',
|
|
427
448
|
],
|
|
449
|
+
// OBOS doesn't have monospaced font, so we keep Tailwind's default here
|
|
450
|
+
mono: defaultTheme.fontFamily.mono,
|
|
428
451
|
},
|
|
429
452
|
extend: {
|
|
430
453
|
maxWidth: {
|
|
@@ -550,7 +573,7 @@ module.exports = (options = {}) => {
|
|
|
550
573
|
};
|
|
551
574
|
|
|
552
575
|
// These custom components are only used for v1 compat
|
|
553
|
-
const button = plugin(
|
|
576
|
+
const button = plugin(({ addComponents, theme }) => {
|
|
554
577
|
const hoverLoadingBgColor = 'rgba(0, 0, 0, 0.1)';
|
|
555
578
|
|
|
556
579
|
addComponents({
|
|
@@ -607,7 +630,7 @@ const button = plugin(function ({ addComponents, theme }) {
|
|
|
607
630
|
});
|
|
608
631
|
});
|
|
609
632
|
|
|
610
|
-
const radio = plugin(
|
|
633
|
+
const radio = plugin(({ addComponents, theme }) => {
|
|
611
634
|
addComponents({
|
|
612
635
|
'.radio': {
|
|
613
636
|
// hide the native radio input
|
|
@@ -652,7 +675,7 @@ const radio = plugin(function ({ addComponents, theme }) {
|
|
|
652
675
|
});
|
|
653
676
|
});
|
|
654
677
|
|
|
655
|
-
const checkbox = plugin(
|
|
678
|
+
const checkbox = plugin(({ addComponents, theme }) => {
|
|
656
679
|
addComponents({
|
|
657
680
|
'.checkbox': {
|
|
658
681
|
'&::before': {
|
|
@@ -673,7 +696,7 @@ const checkbox = plugin(function ({ addComponents, theme }) {
|
|
|
673
696
|
});
|
|
674
697
|
});
|
|
675
698
|
|
|
676
|
-
const snackbar = plugin(
|
|
699
|
+
const snackbar = plugin(({ addComponents, theme }) => {
|
|
677
700
|
addComponents({
|
|
678
701
|
'.snackbar': {
|
|
679
702
|
'grid-template-columns': 'min-content auto',
|