@obosbbl/grunnmuren-tailwind 2.0.0-canary.8 → 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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/tailwind-base.cjs +10 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-tailwind",
3
- "version": "2.0.0-canary.8",
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.13"
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(function ({ addBase, addComponents, theme }) {
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(function ({ addBase, addComponents }) {
247
+ plugin(({ addBase, addComponents }) => {
247
248
  const {
248
249
  headingXlText,
249
250
  headingLText,
@@ -355,7 +356,7 @@ module.exports = (options = {}) => {
355
356
  },
356
357
  });
357
358
  }),
358
- plugin(function ({ addBase }) {
359
+ plugin(({ addBase }) => {
359
360
  addBase(
360
361
  Object.entries(fontDeclarations).flatMap(
361
362
  ([fontFamily, fontFamilyDeclarations]) =>
@@ -445,6 +446,8 @@ module.exports = (options = {}) => {
445
446
  fontFallbacks.OBOSDisplay['font-family'],
446
447
  'sans-serif',
447
448
  ],
449
+ // OBOS doesn't have monospaced font, so we keep Tailwind's default here
450
+ mono: defaultTheme.fontFamily.mono,
448
451
  },
449
452
  extend: {
450
453
  maxWidth: {
@@ -570,7 +573,7 @@ module.exports = (options = {}) => {
570
573
  };
571
574
 
572
575
  // These custom components are only used for v1 compat
573
- const button = plugin(function ({ addComponents, theme }) {
576
+ const button = plugin(({ addComponents, theme }) => {
574
577
  const hoverLoadingBgColor = 'rgba(0, 0, 0, 0.1)';
575
578
 
576
579
  addComponents({
@@ -627,7 +630,7 @@ const button = plugin(function ({ addComponents, theme }) {
627
630
  });
628
631
  });
629
632
 
630
- const radio = plugin(function ({ addComponents, theme }) {
633
+ const radio = plugin(({ addComponents, theme }) => {
631
634
  addComponents({
632
635
  '.radio': {
633
636
  // hide the native radio input
@@ -672,7 +675,7 @@ const radio = plugin(function ({ addComponents, theme }) {
672
675
  });
673
676
  });
674
677
 
675
- const checkbox = plugin(function ({ addComponents, theme }) {
678
+ const checkbox = plugin(({ addComponents, theme }) => {
676
679
  addComponents({
677
680
  '.checkbox': {
678
681
  '&::before': {
@@ -693,7 +696,7 @@ const checkbox = plugin(function ({ addComponents, theme }) {
693
696
  });
694
697
  });
695
698
 
696
- const snackbar = plugin(function ({ addComponents, theme }) {
699
+ const snackbar = plugin(({ addComponents, theme }) => {
697
700
  addComponents({
698
701
  '.snackbar': {
699
702
  'grid-template-columns': 'min-content auto',