@beeq/tailwindcss 1.11.0-beta.2 → 1.11.1

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/index.cjs.js CHANGED
@@ -1933,24 +1933,32 @@ function customFlattenColorPalette(colors) {
1933
1933
  flattenObject(colors, '', result);
1934
1934
  return result;
1935
1935
  }
1936
- function flattenColorPalette$1(colors) {
1936
+ function moduleExists(modulePath) {
1937
+ try {
1938
+ require.resolve(modulePath);
1939
+ return true;
1940
+ } catch (_unused) {
1941
+ return false;
1942
+ }
1943
+ }
1944
+ function flattenColorPalette(colors) {
1945
+ if (!moduleExists('tailwindcss/lib/util/flattenColorPalette')) {
1946
+ return customFlattenColorPalette(colors);
1947
+ }
1937
1948
  try {
1938
1949
  const {
1939
1950
  default: twFlattenColorPalette
1940
1951
  } = require('tailwindcss/lib/util/flattenColorPalette');
1941
1952
  return twFlattenColorPalette(colors);
1942
- } catch (_unused) {
1953
+ } catch (_unused2) {
1943
1954
  return customFlattenColorPalette(colors);
1944
1955
  }
1945
1956
  }
1946
1957
 
1947
- const {
1948
- default: flattenColorPalette
1949
- } = require('tailwindcss/lib/util/flattenColorPalette');
1950
- const ColorMix = plugin(function ({
1958
+ const ColorMix = plugin(({
1951
1959
  matchUtilities,
1952
1960
  theme
1953
- }) {
1961
+ }) => {
1954
1962
  matchUtilities({
1955
1963
  'bg-hover': value => blendColor({
1956
1964
  color: value,
@@ -2039,10 +2047,10 @@ const ColorMix = plugin(function ({
2039
2047
  });
2040
2048
  });
2041
2049
 
2042
- const LogicalProperties = plugin(function ({
2050
+ const LogicalProperties = plugin(({
2043
2051
  matchUtilities,
2044
2052
  theme
2045
- }) {
2053
+ }) => {
2046
2054
  matchUtilities({
2047
2055
  'border-bl': value => ({
2048
2056
  'border-block-width': value
@@ -2085,7 +2093,7 @@ const LogicalProperties = plugin(function ({
2085
2093
  'border-inline-end-color': value
2086
2094
  })
2087
2095
  }, {
2088
- values: flattenColorPalette$1(theme('colors'))
2096
+ values: flattenColorPalette(theme('colors'))
2089
2097
  });
2090
2098
  matchUtilities({
2091
2099
  bs: value => ({
@@ -4304,11 +4312,11 @@ var index = {
4304
4312
  }
4305
4313
  }
4306
4314
  },
4307
- plugins: [plugin(function ({
4315
+ plugins: [plugin(({
4308
4316
  addBase,
4309
4317
  addComponents,
4310
4318
  theme
4311
- }) {
4319
+ }) => {
4312
4320
  addBase(Object.assign({
4313
4321
  ':root, ::backdrop': Object.assign({}, CSS_COLORS)
4314
4322
  }, reset));
package/index.esm.js CHANGED
@@ -1929,24 +1929,32 @@ function customFlattenColorPalette(colors) {
1929
1929
  flattenObject(colors, '', result);
1930
1930
  return result;
1931
1931
  }
1932
- function flattenColorPalette$1(colors) {
1932
+ function moduleExists(modulePath) {
1933
+ try {
1934
+ require.resolve(modulePath);
1935
+ return true;
1936
+ } catch (_unused) {
1937
+ return false;
1938
+ }
1939
+ }
1940
+ function flattenColorPalette(colors) {
1941
+ if (!moduleExists('tailwindcss/lib/util/flattenColorPalette')) {
1942
+ return customFlattenColorPalette(colors);
1943
+ }
1933
1944
  try {
1934
1945
  const {
1935
1946
  default: twFlattenColorPalette
1936
1947
  } = require('tailwindcss/lib/util/flattenColorPalette');
1937
1948
  return twFlattenColorPalette(colors);
1938
- } catch (_unused) {
1949
+ } catch (_unused2) {
1939
1950
  return customFlattenColorPalette(colors);
1940
1951
  }
1941
1952
  }
1942
1953
 
1943
- const {
1944
- default: flattenColorPalette
1945
- } = require('tailwindcss/lib/util/flattenColorPalette');
1946
- const ColorMix = plugin(function ({
1954
+ const ColorMix = plugin(({
1947
1955
  matchUtilities,
1948
1956
  theme
1949
- }) {
1957
+ }) => {
1950
1958
  matchUtilities({
1951
1959
  'bg-hover': value => blendColor({
1952
1960
  color: value,
@@ -2035,10 +2043,10 @@ const ColorMix = plugin(function ({
2035
2043
  });
2036
2044
  });
2037
2045
 
2038
- const LogicalProperties = plugin(function ({
2046
+ const LogicalProperties = plugin(({
2039
2047
  matchUtilities,
2040
2048
  theme
2041
- }) {
2049
+ }) => {
2042
2050
  matchUtilities({
2043
2051
  'border-bl': value => ({
2044
2052
  'border-block-width': value
@@ -2081,7 +2089,7 @@ const LogicalProperties = plugin(function ({
2081
2089
  'border-inline-end-color': value
2082
2090
  })
2083
2091
  }, {
2084
- values: flattenColorPalette$1(theme('colors'))
2092
+ values: flattenColorPalette(theme('colors'))
2085
2093
  });
2086
2094
  matchUtilities({
2087
2095
  bs: value => ({
@@ -4300,11 +4308,11 @@ var index = {
4300
4308
  }
4301
4309
  }
4302
4310
  },
4303
- plugins: [plugin(function ({
4311
+ plugins: [plugin(({
4304
4312
  addBase,
4305
4313
  addComponents,
4306
4314
  theme
4307
- }) {
4315
+ }) => {
4308
4316
  addBase(Object.assign({
4309
4317
  ':root, ::backdrop': Object.assign({}, CSS_COLORS)
4310
4318
  }, reset));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beeq/tailwindcss",
3
- "version": "1.11.0-beta.2",
3
+ "version": "1.11.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "BEEQ's opinionated TailwindCSS configuration",
6
6
  "main": "./index.cjs.js",
@@ -1,10 +1,10 @@
1
- type blendOptions = {
1
+ type BlendOptions = {
2
2
  color: string;
3
3
  base: string;
4
4
  percentage?: number;
5
5
  property?: string;
6
6
  };
7
- export declare const blendColor: ({ color, base, percentage, property }: blendOptions) => {
7
+ export declare const blendColor: ({ color, base, percentage, property }: BlendOptions) => {
8
8
  [x: string]: string;
9
9
  };
10
10
  export {};