bianic-ui 2.10.0-beta.2 → 2.10.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.
Files changed (75) hide show
  1. package/README.md +49 -49
  2. package/dist/cjs/Empty.svg +12 -0
  3. package/dist/cjs/index.js +556 -3347
  4. package/dist/cjs/lib.css +1 -1
  5. package/dist/cjs/types/components/Forms/Checkbox/index.d.ts +2 -1
  6. package/dist/cjs/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -1
  7. package/dist/cjs/types/components/Sidebar/SidebarCointainer.d.ts +7 -6
  8. package/dist/cjs/types/components/Sidebar/SidebarItem.d.ts +9 -5
  9. package/dist/cjs/types/components/Sidebar/SidebarMenu.d.ts +10 -0
  10. package/dist/cjs/types/components/Sidebar/SidebarProfile.d.ts +17 -0
  11. package/dist/cjs/types/components/Sidebar/config.d.ts +21 -0
  12. package/dist/cjs/types/components/Sidebar/index.d.ts +2 -0
  13. package/dist/cjs/types/components/Table/Table.d.ts +6 -0
  14. package/dist/cjs/types/components/Table/TableBody.d.ts +6 -0
  15. package/dist/cjs/types/components/Table/TableHead.d.ts +6 -0
  16. package/dist/cjs/types/components/Table/TableRow/index.d.ts +6 -0
  17. package/dist/cjs/types/components/Table/TableUtility/BlockLoading.d.ts +6 -0
  18. package/dist/cjs/types/components/Table/TableUtility/EmptyTable.d.ts +7 -0
  19. package/dist/cjs/types/components/Table/TableUtility/TableFooterController.d.ts +12 -0
  20. package/dist/cjs/types/components/Table/TableUtility/TableHeaderController.d.ts +9 -0
  21. package/dist/cjs/types/components/Table/TableUtility/TableSearchInput.d.ts +11 -0
  22. package/dist/cjs/types/components/Table/TableUtility/index.d.ts +5 -0
  23. package/dist/cjs/types/components/Table/index.d.ts +5 -0
  24. package/dist/cjs/types/components/TagLabel/index.d.ts +1 -1
  25. package/dist/cjs/types/components/index.d.ts +3 -2
  26. package/dist/cjs/types/image/index.d.ts +2 -0
  27. package/dist/cjs/types/stories/Form/Checkbox/Checkbox.stories.d.ts +0 -1
  28. package/dist/cjs/types/stories/Form/Checkbox/CheckboxSimulation.stories.d.ts +0 -1
  29. package/dist/cjs/types/stories/Form/Dropdown/DropdownContainer.stories.d.ts +1 -1
  30. package/dist/cjs/types/stories/Sidebar/SidebarContainer.stories.d.ts +1 -2
  31. package/dist/cjs/types/stories/Sidebar/SidebarItem.stories.d.ts +1 -2
  32. package/dist/cjs/types/utility/helper.d.ts +2 -1
  33. package/dist/cjs/types/utility/hooks/useTableDataHandler.d.ts +54 -0
  34. package/dist/esm/Empty.svg +12 -0
  35. package/dist/esm/index.js +545 -3348
  36. package/dist/esm/lib.css +1 -1
  37. package/dist/esm/types/components/Forms/Checkbox/index.d.ts +2 -1
  38. package/dist/esm/types/components/Forms/Dropdown/DropdownContainer.d.ts +1 -1
  39. package/dist/esm/types/components/Sidebar/SidebarCointainer.d.ts +7 -6
  40. package/dist/esm/types/components/Sidebar/SidebarItem.d.ts +9 -5
  41. package/dist/esm/types/components/Sidebar/SidebarMenu.d.ts +10 -0
  42. package/dist/esm/types/components/Sidebar/SidebarProfile.d.ts +17 -0
  43. package/dist/esm/types/components/Sidebar/config.d.ts +21 -0
  44. package/dist/esm/types/components/Sidebar/index.d.ts +2 -0
  45. package/dist/esm/types/components/Table/Table.d.ts +6 -0
  46. package/dist/esm/types/components/Table/TableBody.d.ts +6 -0
  47. package/dist/esm/types/components/Table/TableHead.d.ts +6 -0
  48. package/dist/esm/types/components/Table/TableRow/index.d.ts +6 -0
  49. package/dist/esm/types/components/Table/TableUtility/BlockLoading.d.ts +6 -0
  50. package/dist/esm/types/components/Table/TableUtility/EmptyTable.d.ts +7 -0
  51. package/dist/esm/types/components/Table/TableUtility/TableFooterController.d.ts +12 -0
  52. package/dist/esm/types/components/Table/TableUtility/TableHeaderController.d.ts +9 -0
  53. package/dist/esm/types/components/Table/TableUtility/TableSearchInput.d.ts +11 -0
  54. package/dist/esm/types/components/Table/TableUtility/index.d.ts +5 -0
  55. package/dist/esm/types/components/Table/index.d.ts +5 -0
  56. package/dist/esm/types/components/TagLabel/index.d.ts +1 -1
  57. package/dist/esm/types/components/index.d.ts +3 -2
  58. package/dist/esm/types/image/index.d.ts +2 -0
  59. package/dist/esm/types/stories/Form/Checkbox/Checkbox.stories.d.ts +0 -1
  60. package/dist/esm/types/stories/Form/Checkbox/CheckboxSimulation.stories.d.ts +0 -1
  61. package/dist/esm/types/stories/Form/Dropdown/DropdownContainer.stories.d.ts +1 -1
  62. package/dist/esm/types/stories/Sidebar/SidebarContainer.stories.d.ts +1 -2
  63. package/dist/esm/types/stories/Sidebar/SidebarItem.stories.d.ts +1 -2
  64. package/dist/esm/types/utility/helper.d.ts +2 -1
  65. package/dist/esm/types/utility/hooks/useTableDataHandler.d.ts +54 -0
  66. package/dist/index.d.ts +155 -15
  67. package/package.json +143 -143
  68. package/src/font/SansCode/README.txt +88 -88
  69. package/src/style/color.css +650 -650
  70. package/src/style/scrollbar.css +78 -78
  71. package/tailwind.config.js +574 -574
  72. package/src/font/SansCode/GoogleSansCode-Italic-VariableFont_MONO,wght.ttf:Zone.Identifier +0 -0
  73. package/src/font/SansCode/GoogleSansCode-VariableFont_MONO,wght.ttf:Zone.Identifier +0 -0
  74. package/src/font/SansCode/OFL.txt:Zone.Identifier +0 -0
  75. package/src/font/SansCode/README.txt:Zone.Identifier +0 -0
package/dist/cjs/index.js CHANGED
@@ -101,6 +101,8 @@ function TbCircleFilled (props) {
101
101
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},"child":[]},{"tag":"path","attr":{"d":"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},"child":[]}]})(props);
102
102
  }function TbPlaystationX (props) {
103
103
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M12 21a9 9 0 0 0 9 -9a9 9 0 0 0 -9 -9a9 9 0 0 0 -9 9a9 9 0 0 0 9 9z"},"child":[]},{"tag":"path","attr":{"d":"M8.5 8.5l7 7"},"child":[]},{"tag":"path","attr":{"d":"M8.5 15.5l7 -7"},"child":[]}]})(props);
104
+ }function TbMinus (props) {
105
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M5 12l14 0"},"child":[]}]})(props);
104
106
  }function TbLoader2 (props) {
105
107
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M12 3a9 9 0 1 0 9 9"},"child":[]}]})(props);
106
108
  }function TbEye (props) {
@@ -115,6 +117,8 @@ function TbCircleFilled (props) {
115
117
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M7 7l5 5l-5 5"},"child":[]},{"tag":"path","attr":{"d":"M13 7l5 5l-5 5"},"child":[]}]})(props);
116
118
  }function TbChevronsLeft (props) {
117
119
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M11 7l-5 5l5 5"},"child":[]},{"tag":"path","attr":{"d":"M17 7l-5 5l5 5"},"child":[]}]})(props);
120
+ }function TbChevronsDown (props) {
121
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M7 7l5 5l5 -5"},"child":[]},{"tag":"path","attr":{"d":"M7 13l5 5l5 -5"},"child":[]}]})(props);
118
122
  }function TbChevronUp (props) {
119
123
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M6 15l6 -6l6 6"},"child":[]}]})(props);
120
124
  }function TbChevronRight (props) {
@@ -271,6 +275,13 @@ var childrenElement = function (element) {
271
275
  // if (typeof element === 'object') return '';
272
276
  return element;
273
277
  };
278
+ var cn = function () {
279
+ var classes = [];
280
+ for (var _i = 0; _i < arguments.length; _i++) {
281
+ classes[_i] = arguments[_i];
282
+ }
283
+ return classes.filter(Boolean).join(' ');
284
+ };
274
285
  var validUnion = function (value, union) {
275
286
  return union.includes(value) ? value : union[0];
276
287
  };
@@ -724,8 +735,8 @@ Banner.defaultProps = {
724
735
  };
725
736
 
726
737
  var sizeConfig$d = {
727
- md: 'h-[16px] text-[12px]',
728
- sm: 'h-[15px] text-[10px]',
738
+ md: 'h-[16px] text-[11px]',
739
+ sm: 'h-[14px] text-[9px]',
729
740
  };
730
741
  var colorConfig$3 = {
731
742
  blue: 'bg-bia-blue-light-90 text-bia-blue-dark-10',
@@ -749,10 +760,9 @@ var MonospaceBadge = function (_a) {
749
760
  var text = _a.text, _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.color, color = _c === void 0 ? 'blue' : _c;
750
761
  var sizeClass = sizeConfig$d[size];
751
762
  var colorClass = colorConfig$3[color];
752
- var fontPosition = size === 'sm' ? 'top-[1px]' : '';
753
763
  var variantClass = "".concat(sizeClass, " ").concat(colorClass);
754
- return (React.createElement("span", { className: "relative -top-[1px] inline-flex w-fit items-center justify-center rounded-[2px] px-[3px] ".concat(variantClass) },
755
- React.createElement("span", { className: "font-sans-code relative ".concat(fontPosition) }, text)));
764
+ return (React.createElement("div", { className: "relative -top-[1px] inline-flex w-fit items-center justify-center rounded-[2px] px-[3px] ".concat(variantClass) },
765
+ React.createElement("div", { className: "font-sans-code leading-[0px]" }, text)));
756
766
  };
757
767
 
758
768
  function Biaenergi$6() {
@@ -1735,3294 +1745,6 @@ function Color() {
1735
1745
  }))));
1736
1746
  }
1737
1747
 
1738
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
1739
-
1740
- /**
1741
- * Concatenates two arrays faster than the array spread operator.
1742
- */
1743
- const concatArrays = (array1, array2) => {
1744
- // Pre-allocate for better V8 optimization
1745
- const combinedArray = new Array(array1.length + array2.length);
1746
- for (let i = 0; i < array1.length; i++) {
1747
- combinedArray[i] = array1[i];
1748
- }
1749
- for (let i = 0; i < array2.length; i++) {
1750
- combinedArray[array1.length + i] = array2[i];
1751
- }
1752
- return combinedArray;
1753
- };
1754
-
1755
- // Factory function ensures consistent object shapes
1756
- const createClassValidatorObject = (classGroupId, validator) => ({
1757
- classGroupId,
1758
- validator
1759
- });
1760
- // Factory ensures consistent ClassPartObject shape
1761
- const createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({
1762
- nextPart,
1763
- validators,
1764
- classGroupId
1765
- });
1766
- const CLASS_PART_SEPARATOR = '-';
1767
- const EMPTY_CONFLICTS = [];
1768
- // I use two dots here because one dot is used as prefix for class groups in plugins
1769
- const ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';
1770
- const createClassGroupUtils = config => {
1771
- const classMap = createClassMap(config);
1772
- const {
1773
- conflictingClassGroups,
1774
- conflictingClassGroupModifiers
1775
- } = config;
1776
- const getClassGroupId = className => {
1777
- if (className.startsWith('[') && className.endsWith(']')) {
1778
- return getGroupIdForArbitraryProperty(className);
1779
- }
1780
- const classParts = className.split(CLASS_PART_SEPARATOR);
1781
- // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.
1782
- const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;
1783
- return getGroupRecursive(classParts, startIndex, classMap);
1784
- };
1785
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
1786
- if (hasPostfixModifier) {
1787
- const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
1788
- const baseConflicts = conflictingClassGroups[classGroupId];
1789
- if (modifierConflicts) {
1790
- if (baseConflicts) {
1791
- // Merge base conflicts with modifier conflicts
1792
- return concatArrays(baseConflicts, modifierConflicts);
1793
- }
1794
- // Only modifier conflicts
1795
- return modifierConflicts;
1796
- }
1797
- // Fall back to without postfix if no modifier conflicts
1798
- return baseConflicts || EMPTY_CONFLICTS;
1799
- }
1800
- return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
1801
- };
1802
- return {
1803
- getClassGroupId,
1804
- getConflictingClassGroupIds
1805
- };
1806
- };
1807
- const getGroupRecursive = (classParts, startIndex, classPartObject) => {
1808
- const classPathsLength = classParts.length - startIndex;
1809
- if (classPathsLength === 0) {
1810
- return classPartObject.classGroupId;
1811
- }
1812
- const currentClassPart = classParts[startIndex];
1813
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
1814
- if (nextClassPartObject) {
1815
- const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
1816
- if (result) return result;
1817
- }
1818
- const validators = classPartObject.validators;
1819
- if (validators === null) {
1820
- return undefined;
1821
- }
1822
- // Build classRest string efficiently by joining from startIndex onwards
1823
- const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
1824
- const validatorsLength = validators.length;
1825
- for (let i = 0; i < validatorsLength; i++) {
1826
- const validatorObj = validators[i];
1827
- if (validatorObj.validator(classRest)) {
1828
- return validatorObj.classGroupId;
1829
- }
1830
- }
1831
- return undefined;
1832
- };
1833
- /**
1834
- * Get the class group ID for an arbitrary property.
1835
- *
1836
- * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
1837
- */
1838
- const getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {
1839
- const content = className.slice(1, -1);
1840
- const colonIndex = content.indexOf(':');
1841
- const property = content.slice(0, colonIndex);
1842
- return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;
1843
- })();
1844
- /**
1845
- * Exported for testing only
1846
- */
1847
- const createClassMap = config => {
1848
- const {
1849
- theme,
1850
- classGroups
1851
- } = config;
1852
- return processClassGroups(classGroups, theme);
1853
- };
1854
- // Split into separate functions to maintain monomorphic call sites
1855
- const processClassGroups = (classGroups, theme) => {
1856
- const classMap = createClassPartObject();
1857
- for (const classGroupId in classGroups) {
1858
- const group = classGroups[classGroupId];
1859
- processClassesRecursively(group, classMap, classGroupId, theme);
1860
- }
1861
- return classMap;
1862
- };
1863
- const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
1864
- const len = classGroup.length;
1865
- for (let i = 0; i < len; i++) {
1866
- const classDefinition = classGroup[i];
1867
- processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
1868
- }
1869
- };
1870
- // Split into separate functions for each type to maintain monomorphic call sites
1871
- const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
1872
- if (typeof classDefinition === 'string') {
1873
- processStringDefinition(classDefinition, classPartObject, classGroupId);
1874
- return;
1875
- }
1876
- if (typeof classDefinition === 'function') {
1877
- processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
1878
- return;
1879
- }
1880
- processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
1881
- };
1882
- const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
1883
- const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
1884
- classPartObjectToEdit.classGroupId = classGroupId;
1885
- };
1886
- const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
1887
- if (isThemeGetter(classDefinition)) {
1888
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
1889
- return;
1890
- }
1891
- if (classPartObject.validators === null) {
1892
- classPartObject.validators = [];
1893
- }
1894
- classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
1895
- };
1896
- const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
1897
- const entries = Object.entries(classDefinition);
1898
- const len = entries.length;
1899
- for (let i = 0; i < len; i++) {
1900
- const [key, value] = entries[i];
1901
- processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
1902
- }
1903
- };
1904
- const getPart = (classPartObject, path) => {
1905
- let current = classPartObject;
1906
- const parts = path.split(CLASS_PART_SEPARATOR);
1907
- const len = parts.length;
1908
- for (let i = 0; i < len; i++) {
1909
- const part = parts[i];
1910
- let next = current.nextPart.get(part);
1911
- if (!next) {
1912
- next = createClassPartObject();
1913
- current.nextPart.set(part, next);
1914
- }
1915
- current = next;
1916
- }
1917
- return current;
1918
- };
1919
- // Type guard maintains monomorphic check
1920
- const isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;
1921
-
1922
- // LRU cache implementation using plain objects for simplicity
1923
- const createLruCache = maxCacheSize => {
1924
- if (maxCacheSize < 1) {
1925
- return {
1926
- get: () => undefined,
1927
- set: () => {}
1928
- };
1929
- }
1930
- let cacheSize = 0;
1931
- let cache = Object.create(null);
1932
- let previousCache = Object.create(null);
1933
- const update = (key, value) => {
1934
- cache[key] = value;
1935
- cacheSize++;
1936
- if (cacheSize > maxCacheSize) {
1937
- cacheSize = 0;
1938
- previousCache = cache;
1939
- cache = Object.create(null);
1940
- }
1941
- };
1942
- return {
1943
- get(key) {
1944
- let value = cache[key];
1945
- if (value !== undefined) {
1946
- return value;
1947
- }
1948
- if ((value = previousCache[key]) !== undefined) {
1949
- update(key, value);
1950
- return value;
1951
- }
1952
- },
1953
- set(key, value) {
1954
- if (key in cache) {
1955
- cache[key] = value;
1956
- } else {
1957
- update(key, value);
1958
- }
1959
- }
1960
- };
1961
- };
1962
- const IMPORTANT_MODIFIER = '!';
1963
- const MODIFIER_SEPARATOR = ':';
1964
- const EMPTY_MODIFIERS = [];
1965
- // Pre-allocated result object shape for consistency
1966
- const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
1967
- modifiers,
1968
- hasImportantModifier,
1969
- baseClassName,
1970
- maybePostfixModifierPosition,
1971
- isExternal
1972
- });
1973
- const createParseClassName = config => {
1974
- const {
1975
- prefix,
1976
- experimentalParseClassName
1977
- } = config;
1978
- /**
1979
- * Parse class name into parts.
1980
- *
1981
- * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
1982
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
1983
- */
1984
- let parseClassName = className => {
1985
- // Use simple array with push for better performance
1986
- const modifiers = [];
1987
- let bracketDepth = 0;
1988
- let parenDepth = 0;
1989
- let modifierStart = 0;
1990
- let postfixModifierPosition;
1991
- const len = className.length;
1992
- for (let index = 0; index < len; index++) {
1993
- const currentCharacter = className[index];
1994
- if (bracketDepth === 0 && parenDepth === 0) {
1995
- if (currentCharacter === MODIFIER_SEPARATOR) {
1996
- modifiers.push(className.slice(modifierStart, index));
1997
- modifierStart = index + 1;
1998
- continue;
1999
- }
2000
- if (currentCharacter === '/') {
2001
- postfixModifierPosition = index;
2002
- continue;
2003
- }
2004
- }
2005
- if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;
2006
- }
2007
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
2008
- // Inline important modifier check
2009
- let baseClassName = baseClassNameWithImportantModifier;
2010
- let hasImportantModifier = false;
2011
- if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
2012
- baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
2013
- hasImportantModifier = true;
2014
- } else if (
2015
- /**
2016
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
2017
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
2018
- */
2019
- baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
2020
- baseClassName = baseClassNameWithImportantModifier.slice(1);
2021
- hasImportantModifier = true;
2022
- }
2023
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
2024
- return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
2025
- };
2026
- if (prefix) {
2027
- const fullPrefix = prefix + MODIFIER_SEPARATOR;
2028
- const parseClassNameOriginal = parseClassName;
2029
- parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);
2030
- }
2031
- if (experimentalParseClassName) {
2032
- const parseClassNameOriginal = parseClassName;
2033
- parseClassName = className => experimentalParseClassName({
2034
- className,
2035
- parseClassName: parseClassNameOriginal
2036
- });
2037
- }
2038
- return parseClassName;
2039
- };
2040
-
2041
- /**
2042
- * Sorts modifiers according to following schema:
2043
- * - Predefined modifiers are sorted alphabetically
2044
- * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
2045
- */
2046
- const createSortModifiers = config => {
2047
- // Pre-compute weights for all known modifiers for O(1) comparison
2048
- const modifierWeights = new Map();
2049
- // Assign weights to sensitive modifiers (highest priority, but preserve order)
2050
- config.orderSensitiveModifiers.forEach((mod, index) => {
2051
- modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods
2052
- });
2053
- return modifiers => {
2054
- const result = [];
2055
- let currentSegment = [];
2056
- // Process modifiers in one pass
2057
- for (let i = 0; i < modifiers.length; i++) {
2058
- const modifier = modifiers[i];
2059
- // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)
2060
- const isArbitrary = modifier[0] === '[';
2061
- const isOrderSensitive = modifierWeights.has(modifier);
2062
- if (isArbitrary || isOrderSensitive) {
2063
- // Sort and flush current segment alphabetically
2064
- if (currentSegment.length > 0) {
2065
- currentSegment.sort();
2066
- result.push(...currentSegment);
2067
- currentSegment = [];
2068
- }
2069
- result.push(modifier);
2070
- } else {
2071
- // Regular modifier - add to current segment for batch sorting
2072
- currentSegment.push(modifier);
2073
- }
2074
- }
2075
- // Sort and add any remaining segment items
2076
- if (currentSegment.length > 0) {
2077
- currentSegment.sort();
2078
- result.push(...currentSegment);
2079
- }
2080
- return result;
2081
- };
2082
- };
2083
- const createConfigUtils = config => ({
2084
- cache: createLruCache(config.cacheSize),
2085
- parseClassName: createParseClassName(config),
2086
- sortModifiers: createSortModifiers(config),
2087
- postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
2088
- ...createClassGroupUtils(config)
2089
- });
2090
- const createPostfixLookupClassGroupIds = config => {
2091
- const lookup = Object.create(null);
2092
- const classGroupIds = config.postfixLookupClassGroups;
2093
- if (classGroupIds) {
2094
- for (let i = 0; i < classGroupIds.length; i++) {
2095
- lookup[classGroupIds[i]] = true;
2096
- }
2097
- }
2098
- return lookup;
2099
- };
2100
- const SPLIT_CLASSES_REGEX = /\s+/;
2101
- const mergeClassList = (classList, configUtils) => {
2102
- const {
2103
- parseClassName,
2104
- getClassGroupId,
2105
- getConflictingClassGroupIds,
2106
- sortModifiers,
2107
- postfixLookupClassGroupIds
2108
- } = configUtils;
2109
- /**
2110
- * Set of classGroupIds in following format:
2111
- * `{importantModifier}{variantModifiers}{classGroupId}`
2112
- * @example 'float'
2113
- * @example 'hover:focus:bg-color'
2114
- * @example 'md:!pr'
2115
- */
2116
- const classGroupsInConflict = [];
2117
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
2118
- let result = '';
2119
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
2120
- const originalClassName = classNames[index];
2121
- const {
2122
- isExternal,
2123
- modifiers,
2124
- hasImportantModifier,
2125
- baseClassName,
2126
- maybePostfixModifierPosition
2127
- } = parseClassName(originalClassName);
2128
- if (isExternal) {
2129
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
2130
- continue;
2131
- }
2132
- let hasPostfixModifier = !!maybePostfixModifierPosition;
2133
- let classGroupId;
2134
- if (hasPostfixModifier) {
2135
- const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);
2136
- classGroupId = getClassGroupId(baseClassNameWithoutPostfix);
2137
- const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : undefined;
2138
- if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
2139
- classGroupId = classGroupIdWithPostfix;
2140
- hasPostfixModifier = false;
2141
- }
2142
- } else {
2143
- classGroupId = getClassGroupId(baseClassName);
2144
- }
2145
- if (!classGroupId) {
2146
- if (!hasPostfixModifier) {
2147
- // Not a Tailwind class
2148
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
2149
- continue;
2150
- }
2151
- classGroupId = getClassGroupId(baseClassName);
2152
- if (!classGroupId) {
2153
- // Not a Tailwind class
2154
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
2155
- continue;
2156
- }
2157
- hasPostfixModifier = false;
2158
- }
2159
- // Fast path: skip sorting for empty or single modifier
2160
- const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');
2161
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
2162
- const classId = modifierId + classGroupId;
2163
- if (classGroupsInConflict.indexOf(classId) > -1) {
2164
- // Tailwind class omitted due to conflict
2165
- continue;
2166
- }
2167
- classGroupsInConflict.push(classId);
2168
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
2169
- for (let i = 0; i < conflictGroups.length; ++i) {
2170
- const group = conflictGroups[i];
2171
- classGroupsInConflict.push(modifierId + group);
2172
- }
2173
- // Tailwind class not in conflict
2174
- result = originalClassName + (result.length > 0 ? ' ' + result : result);
2175
- }
2176
- return result;
2177
- };
2178
-
2179
- /**
2180
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
2181
- *
2182
- * Specifically:
2183
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
2184
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
2185
- *
2186
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
2187
- */
2188
- const twJoin = (...classLists) => {
2189
- let index = 0;
2190
- let argument;
2191
- let resolvedValue;
2192
- let string = '';
2193
- while (index < classLists.length) {
2194
- if (argument = classLists[index++]) {
2195
- if (resolvedValue = toValue(argument)) {
2196
- string && (string += ' ');
2197
- string += resolvedValue;
2198
- }
2199
- }
2200
- }
2201
- return string;
2202
- };
2203
- const toValue = mix => {
2204
- // Fast path for strings
2205
- if (typeof mix === 'string') {
2206
- return mix;
2207
- }
2208
- let resolvedValue;
2209
- let string = '';
2210
- for (let k = 0; k < mix.length; k++) {
2211
- if (mix[k]) {
2212
- if (resolvedValue = toValue(mix[k])) {
2213
- string && (string += ' ');
2214
- string += resolvedValue;
2215
- }
2216
- }
2217
- }
2218
- return string;
2219
- };
2220
- const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
2221
- let configUtils;
2222
- let cacheGet;
2223
- let cacheSet;
2224
- let functionToCall;
2225
- const initTailwindMerge = classList => {
2226
- const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2227
- configUtils = createConfigUtils(config);
2228
- cacheGet = configUtils.cache.get;
2229
- cacheSet = configUtils.cache.set;
2230
- functionToCall = tailwindMerge;
2231
- return tailwindMerge(classList);
2232
- };
2233
- const tailwindMerge = classList => {
2234
- const cachedResult = cacheGet(classList);
2235
- if (cachedResult) {
2236
- return cachedResult;
2237
- }
2238
- const result = mergeClassList(classList, configUtils);
2239
- cacheSet(classList, result);
2240
- return result;
2241
- };
2242
- functionToCall = initTailwindMerge;
2243
- return (...args) => functionToCall(twJoin(...args));
2244
- };
2245
- const fallbackThemeArr = [];
2246
- const fromTheme = key => {
2247
- const themeGetter = theme => theme[key] || fallbackThemeArr;
2248
- themeGetter.isThemeGetter = true;
2249
- return themeGetter;
2250
- };
2251
- const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
2252
- const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
2253
- const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
2254
- const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
2255
- const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
2256
- const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
2257
- // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
2258
- const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
2259
- const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
2260
- const isFraction = value => fractionRegex.test(value);
2261
- const isNumber = value => !!value && !Number.isNaN(Number(value));
2262
- const isInteger = value => !!value && Number.isInteger(Number(value));
2263
- const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
2264
- const isTshirtSize = value => tshirtUnitRegex.test(value);
2265
- const isAny = () => true;
2266
- const isLengthOnly = value =>
2267
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
2268
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
2269
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
2270
- lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
2271
- const isNever = () => false;
2272
- const isShadow = value => shadowRegex.test(value);
2273
- const isImage = value => imageRegex.test(value);
2274
- const isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);
2275
- const isNamedContainerQuery = value => value.startsWith('@container') && (value[10] === '/' && value[11] !== undefined || value[11] === 's' && value[16] !== undefined && value.startsWith('-size/', 10) || value[11] === 'n' && value[18] !== undefined && value.startsWith('-normal/', 10));
2276
- const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);
2277
- const isArbitraryValue = value => arbitraryValueRegex.test(value);
2278
- const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
2279
- const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
2280
- const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);
2281
- const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);
2282
- const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
2283
- const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
2284
- const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
2285
- const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
2286
- const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
2287
- const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
2288
- const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);
2289
- const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
2290
- const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
2291
- const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
2292
- const isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true);
2293
- // Helpers
2294
- const getIsArbitraryValue = (value, testLabel, testValue) => {
2295
- const result = arbitraryValueRegex.exec(value);
2296
- if (result) {
2297
- if (result[1]) {
2298
- return testLabel(result[1]);
2299
- }
2300
- return testValue(result[2]);
2301
- }
2302
- return false;
2303
- };
2304
- const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
2305
- const result = arbitraryVariableRegex.exec(value);
2306
- if (result) {
2307
- if (result[1]) {
2308
- return testLabel(result[1]);
2309
- }
2310
- return shouldMatchNoLabel;
2311
- }
2312
- return false;
2313
- };
2314
- // Labels
2315
- const isLabelPosition = label => label === 'position' || label === 'percentage';
2316
- const isLabelImage = label => label === 'image' || label === 'url';
2317
- const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';
2318
- const isLabelLength = label => label === 'length';
2319
- const isLabelNumber = label => label === 'number';
2320
- const isLabelFamilyName = label => label === 'family-name';
2321
- const isLabelWeight = label => label === 'number' || label === 'weight';
2322
- const isLabelShadow = label => label === 'shadow';
2323
- const getDefaultConfig = () => {
2324
- /**
2325
- * Theme getters for theme variable namespaces
2326
- * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
2327
- */
2328
- /***/
2329
- const themeColor = fromTheme('color');
2330
- const themeFont = fromTheme('font');
2331
- const themeText = fromTheme('text');
2332
- const themeFontWeight = fromTheme('font-weight');
2333
- const themeTracking = fromTheme('tracking');
2334
- const themeLeading = fromTheme('leading');
2335
- const themeBreakpoint = fromTheme('breakpoint');
2336
- const themeContainer = fromTheme('container');
2337
- const themeSpacing = fromTheme('spacing');
2338
- const themeRadius = fromTheme('radius');
2339
- const themeShadow = fromTheme('shadow');
2340
- const themeInsetShadow = fromTheme('inset-shadow');
2341
- const themeTextShadow = fromTheme('text-shadow');
2342
- const themeDropShadow = fromTheme('drop-shadow');
2343
- const themeBlur = fromTheme('blur');
2344
- const themePerspective = fromTheme('perspective');
2345
- const themeAspect = fromTheme('aspect');
2346
- const themeEase = fromTheme('ease');
2347
- const themeAnimate = fromTheme('animate');
2348
- /**
2349
- * Helpers to avoid repeating the same scales
2350
- *
2351
- * We use functions that create a new array every time they're called instead of static arrays.
2352
- * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
2353
- */
2354
- /***/
2355
- const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
2356
- const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',
2357
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2358
- 'left-top', 'top-right',
2359
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2360
- 'right-top', 'bottom-right',
2361
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2362
- 'right-bottom', 'bottom-left',
2363
- // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2364
- 'left-bottom'];
2365
- const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
2366
- const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
2367
- const scaleOverscroll = () => ['auto', 'contain', 'none'];
2368
- const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
2369
- const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];
2370
- const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];
2371
- const scaleGridColRowStartAndEnd = () => ['auto', {
2372
- span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]
2373
- }, isInteger, isArbitraryVariable, isArbitraryValue];
2374
- const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
2375
- const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
2376
- const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];
2377
- const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
2378
- const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
2379
- const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
2380
- const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
2381
- const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
2382
- const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
2383
- const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
2384
- position: [isArbitraryVariable, isArbitraryValue]
2385
- }];
2386
- const scaleBgRepeat = () => ['no-repeat', {
2387
- repeat: ['', 'x', 'y', 'space', 'round']
2388
- }];
2389
- const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {
2390
- size: [isArbitraryVariable, isArbitraryValue]
2391
- }];
2392
- const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
2393
- const scaleRadius = () => [
2394
- // Deprecated since Tailwind CSS v4.0.0
2395
- '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];
2396
- const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
2397
- const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
2398
- const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
2399
- const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
2400
- const scaleBlur = () => [
2401
- // Deprecated since Tailwind CSS v4.0.0
2402
- '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
2403
- const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
2404
- const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
2405
- const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
2406
- const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];
2407
- return {
2408
- cacheSize: 500,
2409
- theme: {
2410
- animate: ['spin', 'ping', 'pulse', 'bounce'],
2411
- aspect: ['video'],
2412
- blur: [isTshirtSize],
2413
- breakpoint: [isTshirtSize],
2414
- color: [isAny],
2415
- container: [isTshirtSize],
2416
- 'drop-shadow': [isTshirtSize],
2417
- ease: ['in', 'out', 'in-out'],
2418
- font: [isAnyNonArbitrary],
2419
- 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],
2420
- 'inset-shadow': [isTshirtSize],
2421
- leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],
2422
- perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],
2423
- radius: [isTshirtSize],
2424
- shadow: [isTshirtSize],
2425
- spacing: ['px', isNumber],
2426
- text: [isTshirtSize],
2427
- 'text-shadow': [isTshirtSize],
2428
- tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
2429
- },
2430
- classGroups: {
2431
- // --------------
2432
- // --- Layout ---
2433
- // --------------
2434
- /**
2435
- * Aspect Ratio
2436
- * @see https://tailwindcss.com/docs/aspect-ratio
2437
- */
2438
- aspect: [{
2439
- aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
2440
- }],
2441
- /**
2442
- * Container
2443
- * @see https://tailwindcss.com/docs/container
2444
- * @deprecated since Tailwind CSS v4.0.0
2445
- */
2446
- container: ['container'],
2447
- /**
2448
- * Container Type
2449
- * @see https://tailwindcss.com/docs/responsive-design#container-queries
2450
- */
2451
- 'container-type': [{
2452
- '@container': ['', 'normal', 'size', isArbitraryVariable, isArbitraryValue]
2453
- }],
2454
- /**
2455
- * Container Name
2456
- * @see https://tailwindcss.com/docs/responsive-design#named-containers
2457
- */
2458
- 'container-named': [isNamedContainerQuery],
2459
- /**
2460
- * Columns
2461
- * @see https://tailwindcss.com/docs/columns
2462
- */
2463
- columns: [{
2464
- columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
2465
- }],
2466
- /**
2467
- * Break After
2468
- * @see https://tailwindcss.com/docs/break-after
2469
- */
2470
- 'break-after': [{
2471
- 'break-after': scaleBreak()
2472
- }],
2473
- /**
2474
- * Break Before
2475
- * @see https://tailwindcss.com/docs/break-before
2476
- */
2477
- 'break-before': [{
2478
- 'break-before': scaleBreak()
2479
- }],
2480
- /**
2481
- * Break Inside
2482
- * @see https://tailwindcss.com/docs/break-inside
2483
- */
2484
- 'break-inside': [{
2485
- 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']
2486
- }],
2487
- /**
2488
- * Box Decoration Break
2489
- * @see https://tailwindcss.com/docs/box-decoration-break
2490
- */
2491
- 'box-decoration': [{
2492
- 'box-decoration': ['slice', 'clone']
2493
- }],
2494
- /**
2495
- * Box Sizing
2496
- * @see https://tailwindcss.com/docs/box-sizing
2497
- */
2498
- box: [{
2499
- box: ['border', 'content']
2500
- }],
2501
- /**
2502
- * Display
2503
- * @see https://tailwindcss.com/docs/display
2504
- */
2505
- display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],
2506
- /**
2507
- * Screen Reader Only
2508
- * @see https://tailwindcss.com/docs/display#screen-reader-only
2509
- */
2510
- sr: ['sr-only', 'not-sr-only'],
2511
- /**
2512
- * Floats
2513
- * @see https://tailwindcss.com/docs/float
2514
- */
2515
- float: [{
2516
- float: ['right', 'left', 'none', 'start', 'end']
2517
- }],
2518
- /**
2519
- * Clear
2520
- * @see https://tailwindcss.com/docs/clear
2521
- */
2522
- clear: [{
2523
- clear: ['left', 'right', 'both', 'none', 'start', 'end']
2524
- }],
2525
- /**
2526
- * Isolation
2527
- * @see https://tailwindcss.com/docs/isolation
2528
- */
2529
- isolation: ['isolate', 'isolation-auto'],
2530
- /**
2531
- * Object Fit
2532
- * @see https://tailwindcss.com/docs/object-fit
2533
- */
2534
- 'object-fit': [{
2535
- object: ['contain', 'cover', 'fill', 'none', 'scale-down']
2536
- }],
2537
- /**
2538
- * Object Position
2539
- * @see https://tailwindcss.com/docs/object-position
2540
- */
2541
- 'object-position': [{
2542
- object: scalePositionWithArbitrary()
2543
- }],
2544
- /**
2545
- * Overflow
2546
- * @see https://tailwindcss.com/docs/overflow
2547
- */
2548
- overflow: [{
2549
- overflow: scaleOverflow()
2550
- }],
2551
- /**
2552
- * Overflow X
2553
- * @see https://tailwindcss.com/docs/overflow
2554
- */
2555
- 'overflow-x': [{
2556
- 'overflow-x': scaleOverflow()
2557
- }],
2558
- /**
2559
- * Overflow Y
2560
- * @see https://tailwindcss.com/docs/overflow
2561
- */
2562
- 'overflow-y': [{
2563
- 'overflow-y': scaleOverflow()
2564
- }],
2565
- /**
2566
- * Overscroll Behavior
2567
- * @see https://tailwindcss.com/docs/overscroll-behavior
2568
- */
2569
- overscroll: [{
2570
- overscroll: scaleOverscroll()
2571
- }],
2572
- /**
2573
- * Overscroll Behavior X
2574
- * @see https://tailwindcss.com/docs/overscroll-behavior
2575
- */
2576
- 'overscroll-x': [{
2577
- 'overscroll-x': scaleOverscroll()
2578
- }],
2579
- /**
2580
- * Overscroll Behavior Y
2581
- * @see https://tailwindcss.com/docs/overscroll-behavior
2582
- */
2583
- 'overscroll-y': [{
2584
- 'overscroll-y': scaleOverscroll()
2585
- }],
2586
- /**
2587
- * Position
2588
- * @see https://tailwindcss.com/docs/position
2589
- */
2590
- position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
2591
- /**
2592
- * Inset
2593
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2594
- */
2595
- inset: [{
2596
- inset: scaleInset()
2597
- }],
2598
- /**
2599
- * Inset Inline
2600
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2601
- */
2602
- 'inset-x': [{
2603
- 'inset-x': scaleInset()
2604
- }],
2605
- /**
2606
- * Inset Block
2607
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2608
- */
2609
- 'inset-y': [{
2610
- 'inset-y': scaleInset()
2611
- }],
2612
- /**
2613
- * Inset Inline Start
2614
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2615
- * @todo class group will be renamed to `inset-s` in next major release
2616
- */
2617
- start: [{
2618
- 'inset-s': scaleInset(),
2619
- /**
2620
- * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
2621
- * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
2622
- */
2623
- start: scaleInset()
2624
- }],
2625
- /**
2626
- * Inset Inline End
2627
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2628
- * @todo class group will be renamed to `inset-e` in next major release
2629
- */
2630
- end: [{
2631
- 'inset-e': scaleInset(),
2632
- /**
2633
- * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
2634
- * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
2635
- */
2636
- end: scaleInset()
2637
- }],
2638
- /**
2639
- * Inset Block Start
2640
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2641
- */
2642
- 'inset-bs': [{
2643
- 'inset-bs': scaleInset()
2644
- }],
2645
- /**
2646
- * Inset Block End
2647
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2648
- */
2649
- 'inset-be': [{
2650
- 'inset-be': scaleInset()
2651
- }],
2652
- /**
2653
- * Top
2654
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2655
- */
2656
- top: [{
2657
- top: scaleInset()
2658
- }],
2659
- /**
2660
- * Right
2661
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2662
- */
2663
- right: [{
2664
- right: scaleInset()
2665
- }],
2666
- /**
2667
- * Bottom
2668
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2669
- */
2670
- bottom: [{
2671
- bottom: scaleInset()
2672
- }],
2673
- /**
2674
- * Left
2675
- * @see https://tailwindcss.com/docs/top-right-bottom-left
2676
- */
2677
- left: [{
2678
- left: scaleInset()
2679
- }],
2680
- /**
2681
- * Visibility
2682
- * @see https://tailwindcss.com/docs/visibility
2683
- */
2684
- visibility: ['visible', 'invisible', 'collapse'],
2685
- /**
2686
- * Z-Index
2687
- * @see https://tailwindcss.com/docs/z-index
2688
- */
2689
- z: [{
2690
- z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]
2691
- }],
2692
- // ------------------------
2693
- // --- Flexbox and Grid ---
2694
- // ------------------------
2695
- /**
2696
- * Flex Basis
2697
- * @see https://tailwindcss.com/docs/flex-basis
2698
- */
2699
- basis: [{
2700
- basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]
2701
- }],
2702
- /**
2703
- * Flex Direction
2704
- * @see https://tailwindcss.com/docs/flex-direction
2705
- */
2706
- 'flex-direction': [{
2707
- flex: ['row', 'row-reverse', 'col', 'col-reverse']
2708
- }],
2709
- /**
2710
- * Flex Wrap
2711
- * @see https://tailwindcss.com/docs/flex-wrap
2712
- */
2713
- 'flex-wrap': [{
2714
- flex: ['nowrap', 'wrap', 'wrap-reverse']
2715
- }],
2716
- /**
2717
- * Flex
2718
- * @see https://tailwindcss.com/docs/flex
2719
- */
2720
- flex: [{
2721
- flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]
2722
- }],
2723
- /**
2724
- * Flex Grow
2725
- * @see https://tailwindcss.com/docs/flex-grow
2726
- */
2727
- grow: [{
2728
- grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]
2729
- }],
2730
- /**
2731
- * Flex Shrink
2732
- * @see https://tailwindcss.com/docs/flex-shrink
2733
- */
2734
- shrink: [{
2735
- shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]
2736
- }],
2737
- /**
2738
- * Order
2739
- * @see https://tailwindcss.com/docs/order
2740
- */
2741
- order: [{
2742
- order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]
2743
- }],
2744
- /**
2745
- * Grid Template Columns
2746
- * @see https://tailwindcss.com/docs/grid-template-columns
2747
- */
2748
- 'grid-cols': [{
2749
- 'grid-cols': scaleGridTemplateColsRows()
2750
- }],
2751
- /**
2752
- * Grid Column Start / End
2753
- * @see https://tailwindcss.com/docs/grid-column
2754
- */
2755
- 'col-start-end': [{
2756
- col: scaleGridColRowStartAndEnd()
2757
- }],
2758
- /**
2759
- * Grid Column Start
2760
- * @see https://tailwindcss.com/docs/grid-column
2761
- */
2762
- 'col-start': [{
2763
- 'col-start': scaleGridColRowStartOrEnd()
2764
- }],
2765
- /**
2766
- * Grid Column End
2767
- * @see https://tailwindcss.com/docs/grid-column
2768
- */
2769
- 'col-end': [{
2770
- 'col-end': scaleGridColRowStartOrEnd()
2771
- }],
2772
- /**
2773
- * Grid Template Rows
2774
- * @see https://tailwindcss.com/docs/grid-template-rows
2775
- */
2776
- 'grid-rows': [{
2777
- 'grid-rows': scaleGridTemplateColsRows()
2778
- }],
2779
- /**
2780
- * Grid Row Start / End
2781
- * @see https://tailwindcss.com/docs/grid-row
2782
- */
2783
- 'row-start-end': [{
2784
- row: scaleGridColRowStartAndEnd()
2785
- }],
2786
- /**
2787
- * Grid Row Start
2788
- * @see https://tailwindcss.com/docs/grid-row
2789
- */
2790
- 'row-start': [{
2791
- 'row-start': scaleGridColRowStartOrEnd()
2792
- }],
2793
- /**
2794
- * Grid Row End
2795
- * @see https://tailwindcss.com/docs/grid-row
2796
- */
2797
- 'row-end': [{
2798
- 'row-end': scaleGridColRowStartOrEnd()
2799
- }],
2800
- /**
2801
- * Grid Auto Flow
2802
- * @see https://tailwindcss.com/docs/grid-auto-flow
2803
- */
2804
- 'grid-flow': [{
2805
- 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']
2806
- }],
2807
- /**
2808
- * Grid Auto Columns
2809
- * @see https://tailwindcss.com/docs/grid-auto-columns
2810
- */
2811
- 'auto-cols': [{
2812
- 'auto-cols': scaleGridAutoColsRows()
2813
- }],
2814
- /**
2815
- * Grid Auto Rows
2816
- * @see https://tailwindcss.com/docs/grid-auto-rows
2817
- */
2818
- 'auto-rows': [{
2819
- 'auto-rows': scaleGridAutoColsRows()
2820
- }],
2821
- /**
2822
- * Gap
2823
- * @see https://tailwindcss.com/docs/gap
2824
- */
2825
- gap: [{
2826
- gap: scaleUnambiguousSpacing()
2827
- }],
2828
- /**
2829
- * Gap X
2830
- * @see https://tailwindcss.com/docs/gap
2831
- */
2832
- 'gap-x': [{
2833
- 'gap-x': scaleUnambiguousSpacing()
2834
- }],
2835
- /**
2836
- * Gap Y
2837
- * @see https://tailwindcss.com/docs/gap
2838
- */
2839
- 'gap-y': [{
2840
- 'gap-y': scaleUnambiguousSpacing()
2841
- }],
2842
- /**
2843
- * Justify Content
2844
- * @see https://tailwindcss.com/docs/justify-content
2845
- */
2846
- 'justify-content': [{
2847
- justify: [...scaleAlignPrimaryAxis(), 'normal']
2848
- }],
2849
- /**
2850
- * Justify Items
2851
- * @see https://tailwindcss.com/docs/justify-items
2852
- */
2853
- 'justify-items': [{
2854
- 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']
2855
- }],
2856
- /**
2857
- * Justify Self
2858
- * @see https://tailwindcss.com/docs/justify-self
2859
- */
2860
- 'justify-self': [{
2861
- 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]
2862
- }],
2863
- /**
2864
- * Align Content
2865
- * @see https://tailwindcss.com/docs/align-content
2866
- */
2867
- 'align-content': [{
2868
- content: ['normal', ...scaleAlignPrimaryAxis()]
2869
- }],
2870
- /**
2871
- * Align Items
2872
- * @see https://tailwindcss.com/docs/align-items
2873
- */
2874
- 'align-items': [{
2875
- items: [...scaleAlignSecondaryAxis(), {
2876
- baseline: ['', 'last']
2877
- }]
2878
- }],
2879
- /**
2880
- * Align Self
2881
- * @see https://tailwindcss.com/docs/align-self
2882
- */
2883
- 'align-self': [{
2884
- self: ['auto', ...scaleAlignSecondaryAxis(), {
2885
- baseline: ['', 'last']
2886
- }]
2887
- }],
2888
- /**
2889
- * Place Content
2890
- * @see https://tailwindcss.com/docs/place-content
2891
- */
2892
- 'place-content': [{
2893
- 'place-content': scaleAlignPrimaryAxis()
2894
- }],
2895
- /**
2896
- * Place Items
2897
- * @see https://tailwindcss.com/docs/place-items
2898
- */
2899
- 'place-items': [{
2900
- 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']
2901
- }],
2902
- /**
2903
- * Place Self
2904
- * @see https://tailwindcss.com/docs/place-self
2905
- */
2906
- 'place-self': [{
2907
- 'place-self': ['auto', ...scaleAlignSecondaryAxis()]
2908
- }],
2909
- // Spacing
2910
- /**
2911
- * Padding
2912
- * @see https://tailwindcss.com/docs/padding
2913
- */
2914
- p: [{
2915
- p: scaleUnambiguousSpacing()
2916
- }],
2917
- /**
2918
- * Padding Inline
2919
- * @see https://tailwindcss.com/docs/padding
2920
- */
2921
- px: [{
2922
- px: scaleUnambiguousSpacing()
2923
- }],
2924
- /**
2925
- * Padding Block
2926
- * @see https://tailwindcss.com/docs/padding
2927
- */
2928
- py: [{
2929
- py: scaleUnambiguousSpacing()
2930
- }],
2931
- /**
2932
- * Padding Inline Start
2933
- * @see https://tailwindcss.com/docs/padding
2934
- */
2935
- ps: [{
2936
- ps: scaleUnambiguousSpacing()
2937
- }],
2938
- /**
2939
- * Padding Inline End
2940
- * @see https://tailwindcss.com/docs/padding
2941
- */
2942
- pe: [{
2943
- pe: scaleUnambiguousSpacing()
2944
- }],
2945
- /**
2946
- * Padding Block Start
2947
- * @see https://tailwindcss.com/docs/padding
2948
- */
2949
- pbs: [{
2950
- pbs: scaleUnambiguousSpacing()
2951
- }],
2952
- /**
2953
- * Padding Block End
2954
- * @see https://tailwindcss.com/docs/padding
2955
- */
2956
- pbe: [{
2957
- pbe: scaleUnambiguousSpacing()
2958
- }],
2959
- /**
2960
- * Padding Top
2961
- * @see https://tailwindcss.com/docs/padding
2962
- */
2963
- pt: [{
2964
- pt: scaleUnambiguousSpacing()
2965
- }],
2966
- /**
2967
- * Padding Right
2968
- * @see https://tailwindcss.com/docs/padding
2969
- */
2970
- pr: [{
2971
- pr: scaleUnambiguousSpacing()
2972
- }],
2973
- /**
2974
- * Padding Bottom
2975
- * @see https://tailwindcss.com/docs/padding
2976
- */
2977
- pb: [{
2978
- pb: scaleUnambiguousSpacing()
2979
- }],
2980
- /**
2981
- * Padding Left
2982
- * @see https://tailwindcss.com/docs/padding
2983
- */
2984
- pl: [{
2985
- pl: scaleUnambiguousSpacing()
2986
- }],
2987
- /**
2988
- * Margin
2989
- * @see https://tailwindcss.com/docs/margin
2990
- */
2991
- m: [{
2992
- m: scaleMargin()
2993
- }],
2994
- /**
2995
- * Margin Inline
2996
- * @see https://tailwindcss.com/docs/margin
2997
- */
2998
- mx: [{
2999
- mx: scaleMargin()
3000
- }],
3001
- /**
3002
- * Margin Block
3003
- * @see https://tailwindcss.com/docs/margin
3004
- */
3005
- my: [{
3006
- my: scaleMargin()
3007
- }],
3008
- /**
3009
- * Margin Inline Start
3010
- * @see https://tailwindcss.com/docs/margin
3011
- */
3012
- ms: [{
3013
- ms: scaleMargin()
3014
- }],
3015
- /**
3016
- * Margin Inline End
3017
- * @see https://tailwindcss.com/docs/margin
3018
- */
3019
- me: [{
3020
- me: scaleMargin()
3021
- }],
3022
- /**
3023
- * Margin Block Start
3024
- * @see https://tailwindcss.com/docs/margin
3025
- */
3026
- mbs: [{
3027
- mbs: scaleMargin()
3028
- }],
3029
- /**
3030
- * Margin Block End
3031
- * @see https://tailwindcss.com/docs/margin
3032
- */
3033
- mbe: [{
3034
- mbe: scaleMargin()
3035
- }],
3036
- /**
3037
- * Margin Top
3038
- * @see https://tailwindcss.com/docs/margin
3039
- */
3040
- mt: [{
3041
- mt: scaleMargin()
3042
- }],
3043
- /**
3044
- * Margin Right
3045
- * @see https://tailwindcss.com/docs/margin
3046
- */
3047
- mr: [{
3048
- mr: scaleMargin()
3049
- }],
3050
- /**
3051
- * Margin Bottom
3052
- * @see https://tailwindcss.com/docs/margin
3053
- */
3054
- mb: [{
3055
- mb: scaleMargin()
3056
- }],
3057
- /**
3058
- * Margin Left
3059
- * @see https://tailwindcss.com/docs/margin
3060
- */
3061
- ml: [{
3062
- ml: scaleMargin()
3063
- }],
3064
- /**
3065
- * Space Between X
3066
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3067
- */
3068
- 'space-x': [{
3069
- 'space-x': scaleUnambiguousSpacing()
3070
- }],
3071
- /**
3072
- * Space Between X Reverse
3073
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3074
- */
3075
- 'space-x-reverse': ['space-x-reverse'],
3076
- /**
3077
- * Space Between Y
3078
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3079
- */
3080
- 'space-y': [{
3081
- 'space-y': scaleUnambiguousSpacing()
3082
- }],
3083
- /**
3084
- * Space Between Y Reverse
3085
- * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3086
- */
3087
- 'space-y-reverse': ['space-y-reverse'],
3088
- // --------------
3089
- // --- Sizing ---
3090
- // --------------
3091
- /**
3092
- * Size
3093
- * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
3094
- */
3095
- size: [{
3096
- size: scaleSizing()
3097
- }],
3098
- /**
3099
- * Inline Size
3100
- * @see https://tailwindcss.com/docs/width
3101
- */
3102
- 'inline-size': [{
3103
- inline: ['auto', ...scaleSizingInline()]
3104
- }],
3105
- /**
3106
- * Min-Inline Size
3107
- * @see https://tailwindcss.com/docs/min-width
3108
- */
3109
- 'min-inline-size': [{
3110
- 'min-inline': ['auto', ...scaleSizingInline()]
3111
- }],
3112
- /**
3113
- * Max-Inline Size
3114
- * @see https://tailwindcss.com/docs/max-width
3115
- */
3116
- 'max-inline-size': [{
3117
- 'max-inline': ['none', ...scaleSizingInline()]
3118
- }],
3119
- /**
3120
- * Block Size
3121
- * @see https://tailwindcss.com/docs/height
3122
- */
3123
- 'block-size': [{
3124
- block: ['auto', ...scaleSizingBlock()]
3125
- }],
3126
- /**
3127
- * Min-Block Size
3128
- * @see https://tailwindcss.com/docs/min-height
3129
- */
3130
- 'min-block-size': [{
3131
- 'min-block': ['auto', ...scaleSizingBlock()]
3132
- }],
3133
- /**
3134
- * Max-Block Size
3135
- * @see https://tailwindcss.com/docs/max-height
3136
- */
3137
- 'max-block-size': [{
3138
- 'max-block': ['none', ...scaleSizingBlock()]
3139
- }],
3140
- /**
3141
- * Width
3142
- * @see https://tailwindcss.com/docs/width
3143
- */
3144
- w: [{
3145
- w: [themeContainer, 'screen', ...scaleSizing()]
3146
- }],
3147
- /**
3148
- * Min-Width
3149
- * @see https://tailwindcss.com/docs/min-width
3150
- */
3151
- 'min-w': [{
3152
- 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3153
- 'none', ...scaleSizing()]
3154
- }],
3155
- /**
3156
- * Max-Width
3157
- * @see https://tailwindcss.com/docs/max-width
3158
- */
3159
- 'max-w': [{
3160
- 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3161
- 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3162
- {
3163
- screen: [themeBreakpoint]
3164
- }, ...scaleSizing()]
3165
- }],
3166
- /**
3167
- * Height
3168
- * @see https://tailwindcss.com/docs/height
3169
- */
3170
- h: [{
3171
- h: ['screen', 'lh', ...scaleSizing()]
3172
- }],
3173
- /**
3174
- * Min-Height
3175
- * @see https://tailwindcss.com/docs/min-height
3176
- */
3177
- 'min-h': [{
3178
- 'min-h': ['screen', 'lh', 'none', ...scaleSizing()]
3179
- }],
3180
- /**
3181
- * Max-Height
3182
- * @see https://tailwindcss.com/docs/max-height
3183
- */
3184
- 'max-h': [{
3185
- 'max-h': ['screen', 'lh', ...scaleSizing()]
3186
- }],
3187
- // ------------------
3188
- // --- Typography ---
3189
- // ------------------
3190
- /**
3191
- * Font Size
3192
- * @see https://tailwindcss.com/docs/font-size
3193
- */
3194
- 'font-size': [{
3195
- text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]
3196
- }],
3197
- /**
3198
- * Font Smoothing
3199
- * @see https://tailwindcss.com/docs/font-smoothing
3200
- */
3201
- 'font-smoothing': ['antialiased', 'subpixel-antialiased'],
3202
- /**
3203
- * Font Style
3204
- * @see https://tailwindcss.com/docs/font-style
3205
- */
3206
- 'font-style': ['italic', 'not-italic'],
3207
- /**
3208
- * Font Weight
3209
- * @see https://tailwindcss.com/docs/font-weight
3210
- */
3211
- 'font-weight': [{
3212
- font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
3213
- }],
3214
- /**
3215
- * Font Stretch
3216
- * @see https://tailwindcss.com/docs/font-stretch
3217
- */
3218
- 'font-stretch': [{
3219
- 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]
3220
- }],
3221
- /**
3222
- * Font Family
3223
- * @see https://tailwindcss.com/docs/font-family
3224
- */
3225
- 'font-family': [{
3226
- font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
3227
- }],
3228
- /**
3229
- * Font Feature Settings
3230
- * @see https://tailwindcss.com/docs/font-feature-settings
3231
- */
3232
- 'font-features': [{
3233
- 'font-features': [isArbitraryValue]
3234
- }],
3235
- /**
3236
- * Font Variant Numeric
3237
- * @see https://tailwindcss.com/docs/font-variant-numeric
3238
- */
3239
- 'fvn-normal': ['normal-nums'],
3240
- /**
3241
- * Font Variant Numeric
3242
- * @see https://tailwindcss.com/docs/font-variant-numeric
3243
- */
3244
- 'fvn-ordinal': ['ordinal'],
3245
- /**
3246
- * Font Variant Numeric
3247
- * @see https://tailwindcss.com/docs/font-variant-numeric
3248
- */
3249
- 'fvn-slashed-zero': ['slashed-zero'],
3250
- /**
3251
- * Font Variant Numeric
3252
- * @see https://tailwindcss.com/docs/font-variant-numeric
3253
- */
3254
- 'fvn-figure': ['lining-nums', 'oldstyle-nums'],
3255
- /**
3256
- * Font Variant Numeric
3257
- * @see https://tailwindcss.com/docs/font-variant-numeric
3258
- */
3259
- 'fvn-spacing': ['proportional-nums', 'tabular-nums'],
3260
- /**
3261
- * Font Variant Numeric
3262
- * @see https://tailwindcss.com/docs/font-variant-numeric
3263
- */
3264
- 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],
3265
- /**
3266
- * Letter Spacing
3267
- * @see https://tailwindcss.com/docs/letter-spacing
3268
- */
3269
- tracking: [{
3270
- tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
3271
- }],
3272
- /**
3273
- * Line Clamp
3274
- * @see https://tailwindcss.com/docs/line-clamp
3275
- */
3276
- 'line-clamp': [{
3277
- 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]
3278
- }],
3279
- /**
3280
- * Line Height
3281
- * @see https://tailwindcss.com/docs/line-height
3282
- */
3283
- leading: [{
3284
- leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3285
- themeLeading, ...scaleUnambiguousSpacing()]
3286
- }],
3287
- /**
3288
- * List Style Image
3289
- * @see https://tailwindcss.com/docs/list-style-image
3290
- */
3291
- 'list-image': [{
3292
- 'list-image': ['none', isArbitraryVariable, isArbitraryValue]
3293
- }],
3294
- /**
3295
- * List Style Position
3296
- * @see https://tailwindcss.com/docs/list-style-position
3297
- */
3298
- 'list-style-position': [{
3299
- list: ['inside', 'outside']
3300
- }],
3301
- /**
3302
- * List Style Type
3303
- * @see https://tailwindcss.com/docs/list-style-type
3304
- */
3305
- 'list-style-type': [{
3306
- list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]
3307
- }],
3308
- /**
3309
- * Text Alignment
3310
- * @see https://tailwindcss.com/docs/text-align
3311
- */
3312
- 'text-alignment': [{
3313
- text: ['left', 'center', 'right', 'justify', 'start', 'end']
3314
- }],
3315
- /**
3316
- * Placeholder Color
3317
- * @deprecated since Tailwind CSS v3.0.0
3318
- * @see https://v3.tailwindcss.com/docs/placeholder-color
3319
- */
3320
- 'placeholder-color': [{
3321
- placeholder: scaleColor()
3322
- }],
3323
- /**
3324
- * Text Color
3325
- * @see https://tailwindcss.com/docs/text-color
3326
- */
3327
- 'text-color': [{
3328
- text: scaleColor()
3329
- }],
3330
- /**
3331
- * Text Decoration
3332
- * @see https://tailwindcss.com/docs/text-decoration
3333
- */
3334
- 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],
3335
- /**
3336
- * Text Decoration Style
3337
- * @see https://tailwindcss.com/docs/text-decoration-style
3338
- */
3339
- 'text-decoration-style': [{
3340
- decoration: [...scaleLineStyle(), 'wavy']
3341
- }],
3342
- /**
3343
- * Text Decoration Thickness
3344
- * @see https://tailwindcss.com/docs/text-decoration-thickness
3345
- */
3346
- 'text-decoration-thickness': [{
3347
- decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]
3348
- }],
3349
- /**
3350
- * Text Decoration Color
3351
- * @see https://tailwindcss.com/docs/text-decoration-color
3352
- */
3353
- 'text-decoration-color': [{
3354
- decoration: scaleColor()
3355
- }],
3356
- /**
3357
- * Text Underline Offset
3358
- * @see https://tailwindcss.com/docs/text-underline-offset
3359
- */
3360
- 'underline-offset': [{
3361
- 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]
3362
- }],
3363
- /**
3364
- * Text Transform
3365
- * @see https://tailwindcss.com/docs/text-transform
3366
- */
3367
- 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
3368
- /**
3369
- * Text Overflow
3370
- * @see https://tailwindcss.com/docs/text-overflow
3371
- */
3372
- 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],
3373
- /**
3374
- * Text Wrap
3375
- * @see https://tailwindcss.com/docs/text-wrap
3376
- */
3377
- 'text-wrap': [{
3378
- text: ['wrap', 'nowrap', 'balance', 'pretty']
3379
- }],
3380
- /**
3381
- * Text Indent
3382
- * @see https://tailwindcss.com/docs/text-indent
3383
- */
3384
- indent: [{
3385
- indent: scaleUnambiguousSpacing()
3386
- }],
3387
- /**
3388
- * Tab Size
3389
- * @see https://tailwindcss.com/docs/tab-size
3390
- */
3391
- 'tab-size': [{
3392
- tab: [isInteger, isArbitraryVariable, isArbitraryValue]
3393
- }],
3394
- /**
3395
- * Vertical Alignment
3396
- * @see https://tailwindcss.com/docs/vertical-align
3397
- */
3398
- 'vertical-align': [{
3399
- align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]
3400
- }],
3401
- /**
3402
- * Whitespace
3403
- * @see https://tailwindcss.com/docs/whitespace
3404
- */
3405
- whitespace: [{
3406
- whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']
3407
- }],
3408
- /**
3409
- * Word Break
3410
- * @see https://tailwindcss.com/docs/word-break
3411
- */
3412
- break: [{
3413
- break: ['normal', 'words', 'all', 'keep']
3414
- }],
3415
- /**
3416
- * Overflow Wrap
3417
- * @see https://tailwindcss.com/docs/overflow-wrap
3418
- */
3419
- wrap: [{
3420
- wrap: ['break-word', 'anywhere', 'normal']
3421
- }],
3422
- /**
3423
- * Hyphens
3424
- * @see https://tailwindcss.com/docs/hyphens
3425
- */
3426
- hyphens: [{
3427
- hyphens: ['none', 'manual', 'auto']
3428
- }],
3429
- /**
3430
- * Content
3431
- * @see https://tailwindcss.com/docs/content
3432
- */
3433
- content: [{
3434
- content: ['none', isArbitraryVariable, isArbitraryValue]
3435
- }],
3436
- // -------------------
3437
- // --- Backgrounds ---
3438
- // -------------------
3439
- /**
3440
- * Background Attachment
3441
- * @see https://tailwindcss.com/docs/background-attachment
3442
- */
3443
- 'bg-attachment': [{
3444
- bg: ['fixed', 'local', 'scroll']
3445
- }],
3446
- /**
3447
- * Background Clip
3448
- * @see https://tailwindcss.com/docs/background-clip
3449
- */
3450
- 'bg-clip': [{
3451
- 'bg-clip': ['border', 'padding', 'content', 'text']
3452
- }],
3453
- /**
3454
- * Background Origin
3455
- * @see https://tailwindcss.com/docs/background-origin
3456
- */
3457
- 'bg-origin': [{
3458
- 'bg-origin': ['border', 'padding', 'content']
3459
- }],
3460
- /**
3461
- * Background Position
3462
- * @see https://tailwindcss.com/docs/background-position
3463
- */
3464
- 'bg-position': [{
3465
- bg: scaleBgPosition()
3466
- }],
3467
- /**
3468
- * Background Repeat
3469
- * @see https://tailwindcss.com/docs/background-repeat
3470
- */
3471
- 'bg-repeat': [{
3472
- bg: scaleBgRepeat()
3473
- }],
3474
- /**
3475
- * Background Size
3476
- * @see https://tailwindcss.com/docs/background-size
3477
- */
3478
- 'bg-size': [{
3479
- bg: scaleBgSize()
3480
- }],
3481
- /**
3482
- * Background Image
3483
- * @see https://tailwindcss.com/docs/background-image
3484
- */
3485
- 'bg-image': [{
3486
- bg: ['none', {
3487
- linear: [{
3488
- to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']
3489
- }, isInteger, isArbitraryVariable, isArbitraryValue],
3490
- radial: ['', isArbitraryVariable, isArbitraryValue],
3491
- conic: [isInteger, isArbitraryVariable, isArbitraryValue]
3492
- }, isArbitraryVariableImage, isArbitraryImage]
3493
- }],
3494
- /**
3495
- * Background Color
3496
- * @see https://tailwindcss.com/docs/background-color
3497
- */
3498
- 'bg-color': [{
3499
- bg: scaleColor()
3500
- }],
3501
- /**
3502
- * Gradient Color Stops From Position
3503
- * @see https://tailwindcss.com/docs/gradient-color-stops
3504
- */
3505
- 'gradient-from-pos': [{
3506
- from: scaleGradientStopPosition()
3507
- }],
3508
- /**
3509
- * Gradient Color Stops Via Position
3510
- * @see https://tailwindcss.com/docs/gradient-color-stops
3511
- */
3512
- 'gradient-via-pos': [{
3513
- via: scaleGradientStopPosition()
3514
- }],
3515
- /**
3516
- * Gradient Color Stops To Position
3517
- * @see https://tailwindcss.com/docs/gradient-color-stops
3518
- */
3519
- 'gradient-to-pos': [{
3520
- to: scaleGradientStopPosition()
3521
- }],
3522
- /**
3523
- * Gradient Color Stops From
3524
- * @see https://tailwindcss.com/docs/gradient-color-stops
3525
- */
3526
- 'gradient-from': [{
3527
- from: scaleColor()
3528
- }],
3529
- /**
3530
- * Gradient Color Stops Via
3531
- * @see https://tailwindcss.com/docs/gradient-color-stops
3532
- */
3533
- 'gradient-via': [{
3534
- via: scaleColor()
3535
- }],
3536
- /**
3537
- * Gradient Color Stops To
3538
- * @see https://tailwindcss.com/docs/gradient-color-stops
3539
- */
3540
- 'gradient-to': [{
3541
- to: scaleColor()
3542
- }],
3543
- // ---------------
3544
- // --- Borders ---
3545
- // ---------------
3546
- /**
3547
- * Border Radius
3548
- * @see https://tailwindcss.com/docs/border-radius
3549
- */
3550
- rounded: [{
3551
- rounded: scaleRadius()
3552
- }],
3553
- /**
3554
- * Border Radius Start
3555
- * @see https://tailwindcss.com/docs/border-radius
3556
- */
3557
- 'rounded-s': [{
3558
- 'rounded-s': scaleRadius()
3559
- }],
3560
- /**
3561
- * Border Radius End
3562
- * @see https://tailwindcss.com/docs/border-radius
3563
- */
3564
- 'rounded-e': [{
3565
- 'rounded-e': scaleRadius()
3566
- }],
3567
- /**
3568
- * Border Radius Top
3569
- * @see https://tailwindcss.com/docs/border-radius
3570
- */
3571
- 'rounded-t': [{
3572
- 'rounded-t': scaleRadius()
3573
- }],
3574
- /**
3575
- * Border Radius Right
3576
- * @see https://tailwindcss.com/docs/border-radius
3577
- */
3578
- 'rounded-r': [{
3579
- 'rounded-r': scaleRadius()
3580
- }],
3581
- /**
3582
- * Border Radius Bottom
3583
- * @see https://tailwindcss.com/docs/border-radius
3584
- */
3585
- 'rounded-b': [{
3586
- 'rounded-b': scaleRadius()
3587
- }],
3588
- /**
3589
- * Border Radius Left
3590
- * @see https://tailwindcss.com/docs/border-radius
3591
- */
3592
- 'rounded-l': [{
3593
- 'rounded-l': scaleRadius()
3594
- }],
3595
- /**
3596
- * Border Radius Start Start
3597
- * @see https://tailwindcss.com/docs/border-radius
3598
- */
3599
- 'rounded-ss': [{
3600
- 'rounded-ss': scaleRadius()
3601
- }],
3602
- /**
3603
- * Border Radius Start End
3604
- * @see https://tailwindcss.com/docs/border-radius
3605
- */
3606
- 'rounded-se': [{
3607
- 'rounded-se': scaleRadius()
3608
- }],
3609
- /**
3610
- * Border Radius End End
3611
- * @see https://tailwindcss.com/docs/border-radius
3612
- */
3613
- 'rounded-ee': [{
3614
- 'rounded-ee': scaleRadius()
3615
- }],
3616
- /**
3617
- * Border Radius End Start
3618
- * @see https://tailwindcss.com/docs/border-radius
3619
- */
3620
- 'rounded-es': [{
3621
- 'rounded-es': scaleRadius()
3622
- }],
3623
- /**
3624
- * Border Radius Top Left
3625
- * @see https://tailwindcss.com/docs/border-radius
3626
- */
3627
- 'rounded-tl': [{
3628
- 'rounded-tl': scaleRadius()
3629
- }],
3630
- /**
3631
- * Border Radius Top Right
3632
- * @see https://tailwindcss.com/docs/border-radius
3633
- */
3634
- 'rounded-tr': [{
3635
- 'rounded-tr': scaleRadius()
3636
- }],
3637
- /**
3638
- * Border Radius Bottom Right
3639
- * @see https://tailwindcss.com/docs/border-radius
3640
- */
3641
- 'rounded-br': [{
3642
- 'rounded-br': scaleRadius()
3643
- }],
3644
- /**
3645
- * Border Radius Bottom Left
3646
- * @see https://tailwindcss.com/docs/border-radius
3647
- */
3648
- 'rounded-bl': [{
3649
- 'rounded-bl': scaleRadius()
3650
- }],
3651
- /**
3652
- * Border Width
3653
- * @see https://tailwindcss.com/docs/border-width
3654
- */
3655
- 'border-w': [{
3656
- border: scaleBorderWidth()
3657
- }],
3658
- /**
3659
- * Border Width Inline
3660
- * @see https://tailwindcss.com/docs/border-width
3661
- */
3662
- 'border-w-x': [{
3663
- 'border-x': scaleBorderWidth()
3664
- }],
3665
- /**
3666
- * Border Width Block
3667
- * @see https://tailwindcss.com/docs/border-width
3668
- */
3669
- 'border-w-y': [{
3670
- 'border-y': scaleBorderWidth()
3671
- }],
3672
- /**
3673
- * Border Width Inline Start
3674
- * @see https://tailwindcss.com/docs/border-width
3675
- */
3676
- 'border-w-s': [{
3677
- 'border-s': scaleBorderWidth()
3678
- }],
3679
- /**
3680
- * Border Width Inline End
3681
- * @see https://tailwindcss.com/docs/border-width
3682
- */
3683
- 'border-w-e': [{
3684
- 'border-e': scaleBorderWidth()
3685
- }],
3686
- /**
3687
- * Border Width Block Start
3688
- * @see https://tailwindcss.com/docs/border-width
3689
- */
3690
- 'border-w-bs': [{
3691
- 'border-bs': scaleBorderWidth()
3692
- }],
3693
- /**
3694
- * Border Width Block End
3695
- * @see https://tailwindcss.com/docs/border-width
3696
- */
3697
- 'border-w-be': [{
3698
- 'border-be': scaleBorderWidth()
3699
- }],
3700
- /**
3701
- * Border Width Top
3702
- * @see https://tailwindcss.com/docs/border-width
3703
- */
3704
- 'border-w-t': [{
3705
- 'border-t': scaleBorderWidth()
3706
- }],
3707
- /**
3708
- * Border Width Right
3709
- * @see https://tailwindcss.com/docs/border-width
3710
- */
3711
- 'border-w-r': [{
3712
- 'border-r': scaleBorderWidth()
3713
- }],
3714
- /**
3715
- * Border Width Bottom
3716
- * @see https://tailwindcss.com/docs/border-width
3717
- */
3718
- 'border-w-b': [{
3719
- 'border-b': scaleBorderWidth()
3720
- }],
3721
- /**
3722
- * Border Width Left
3723
- * @see https://tailwindcss.com/docs/border-width
3724
- */
3725
- 'border-w-l': [{
3726
- 'border-l': scaleBorderWidth()
3727
- }],
3728
- /**
3729
- * Divide Width X
3730
- * @see https://tailwindcss.com/docs/border-width#between-children
3731
- */
3732
- 'divide-x': [{
3733
- 'divide-x': scaleBorderWidth()
3734
- }],
3735
- /**
3736
- * Divide Width X Reverse
3737
- * @see https://tailwindcss.com/docs/border-width#between-children
3738
- */
3739
- 'divide-x-reverse': ['divide-x-reverse'],
3740
- /**
3741
- * Divide Width Y
3742
- * @see https://tailwindcss.com/docs/border-width#between-children
3743
- */
3744
- 'divide-y': [{
3745
- 'divide-y': scaleBorderWidth()
3746
- }],
3747
- /**
3748
- * Divide Width Y Reverse
3749
- * @see https://tailwindcss.com/docs/border-width#between-children
3750
- */
3751
- 'divide-y-reverse': ['divide-y-reverse'],
3752
- /**
3753
- * Border Style
3754
- * @see https://tailwindcss.com/docs/border-style
3755
- */
3756
- 'border-style': [{
3757
- border: [...scaleLineStyle(), 'hidden', 'none']
3758
- }],
3759
- /**
3760
- * Divide Style
3761
- * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
3762
- */
3763
- 'divide-style': [{
3764
- divide: [...scaleLineStyle(), 'hidden', 'none']
3765
- }],
3766
- /**
3767
- * Border Color
3768
- * @see https://tailwindcss.com/docs/border-color
3769
- */
3770
- 'border-color': [{
3771
- border: scaleColor()
3772
- }],
3773
- /**
3774
- * Border Color Inline
3775
- * @see https://tailwindcss.com/docs/border-color
3776
- */
3777
- 'border-color-x': [{
3778
- 'border-x': scaleColor()
3779
- }],
3780
- /**
3781
- * Border Color Block
3782
- * @see https://tailwindcss.com/docs/border-color
3783
- */
3784
- 'border-color-y': [{
3785
- 'border-y': scaleColor()
3786
- }],
3787
- /**
3788
- * Border Color Inline Start
3789
- * @see https://tailwindcss.com/docs/border-color
3790
- */
3791
- 'border-color-s': [{
3792
- 'border-s': scaleColor()
3793
- }],
3794
- /**
3795
- * Border Color Inline End
3796
- * @see https://tailwindcss.com/docs/border-color
3797
- */
3798
- 'border-color-e': [{
3799
- 'border-e': scaleColor()
3800
- }],
3801
- /**
3802
- * Border Color Block Start
3803
- * @see https://tailwindcss.com/docs/border-color
3804
- */
3805
- 'border-color-bs': [{
3806
- 'border-bs': scaleColor()
3807
- }],
3808
- /**
3809
- * Border Color Block End
3810
- * @see https://tailwindcss.com/docs/border-color
3811
- */
3812
- 'border-color-be': [{
3813
- 'border-be': scaleColor()
3814
- }],
3815
- /**
3816
- * Border Color Top
3817
- * @see https://tailwindcss.com/docs/border-color
3818
- */
3819
- 'border-color-t': [{
3820
- 'border-t': scaleColor()
3821
- }],
3822
- /**
3823
- * Border Color Right
3824
- * @see https://tailwindcss.com/docs/border-color
3825
- */
3826
- 'border-color-r': [{
3827
- 'border-r': scaleColor()
3828
- }],
3829
- /**
3830
- * Border Color Bottom
3831
- * @see https://tailwindcss.com/docs/border-color
3832
- */
3833
- 'border-color-b': [{
3834
- 'border-b': scaleColor()
3835
- }],
3836
- /**
3837
- * Border Color Left
3838
- * @see https://tailwindcss.com/docs/border-color
3839
- */
3840
- 'border-color-l': [{
3841
- 'border-l': scaleColor()
3842
- }],
3843
- /**
3844
- * Divide Color
3845
- * @see https://tailwindcss.com/docs/divide-color
3846
- */
3847
- 'divide-color': [{
3848
- divide: scaleColor()
3849
- }],
3850
- /**
3851
- * Outline Style
3852
- * @see https://tailwindcss.com/docs/outline-style
3853
- */
3854
- 'outline-style': [{
3855
- outline: [...scaleLineStyle(), 'none', 'hidden']
3856
- }],
3857
- /**
3858
- * Outline Offset
3859
- * @see https://tailwindcss.com/docs/outline-offset
3860
- */
3861
- 'outline-offset': [{
3862
- 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]
3863
- }],
3864
- /**
3865
- * Outline Width
3866
- * @see https://tailwindcss.com/docs/outline-width
3867
- */
3868
- 'outline-w': [{
3869
- outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]
3870
- }],
3871
- /**
3872
- * Outline Color
3873
- * @see https://tailwindcss.com/docs/outline-color
3874
- */
3875
- 'outline-color': [{
3876
- outline: scaleColor()
3877
- }],
3878
- // ---------------
3879
- // --- Effects ---
3880
- // ---------------
3881
- /**
3882
- * Box Shadow
3883
- * @see https://tailwindcss.com/docs/box-shadow
3884
- */
3885
- shadow: [{
3886
- shadow: [
3887
- // Deprecated since Tailwind CSS v4.0.0
3888
- '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]
3889
- }],
3890
- /**
3891
- * Box Shadow Color
3892
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
3893
- */
3894
- 'shadow-color': [{
3895
- shadow: scaleColor()
3896
- }],
3897
- /**
3898
- * Inset Box Shadow
3899
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
3900
- */
3901
- 'inset-shadow': [{
3902
- 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
3903
- }],
3904
- /**
3905
- * Inset Box Shadow Color
3906
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
3907
- */
3908
- 'inset-shadow-color': [{
3909
- 'inset-shadow': scaleColor()
3910
- }],
3911
- /**
3912
- * Ring Width
3913
- * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
3914
- */
3915
- 'ring-w': [{
3916
- ring: scaleBorderWidth()
3917
- }],
3918
- /**
3919
- * Ring Width Inset
3920
- * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
3921
- * @deprecated since Tailwind CSS v4.0.0
3922
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3923
- */
3924
- 'ring-w-inset': ['ring-inset'],
3925
- /**
3926
- * Ring Color
3927
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
3928
- */
3929
- 'ring-color': [{
3930
- ring: scaleColor()
3931
- }],
3932
- /**
3933
- * Ring Offset Width
3934
- * @see https://v3.tailwindcss.com/docs/ring-offset-width
3935
- * @deprecated since Tailwind CSS v4.0.0
3936
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3937
- */
3938
- 'ring-offset-w': [{
3939
- 'ring-offset': [isNumber, isArbitraryLength]
3940
- }],
3941
- /**
3942
- * Ring Offset Color
3943
- * @see https://v3.tailwindcss.com/docs/ring-offset-color
3944
- * @deprecated since Tailwind CSS v4.0.0
3945
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3946
- */
3947
- 'ring-offset-color': [{
3948
- 'ring-offset': scaleColor()
3949
- }],
3950
- /**
3951
- * Inset Ring Width
3952
- * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
3953
- */
3954
- 'inset-ring-w': [{
3955
- 'inset-ring': scaleBorderWidth()
3956
- }],
3957
- /**
3958
- * Inset Ring Color
3959
- * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
3960
- */
3961
- 'inset-ring-color': [{
3962
- 'inset-ring': scaleColor()
3963
- }],
3964
- /**
3965
- * Text Shadow
3966
- * @see https://tailwindcss.com/docs/text-shadow
3967
- */
3968
- 'text-shadow': [{
3969
- 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
3970
- }],
3971
- /**
3972
- * Text Shadow Color
3973
- * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
3974
- */
3975
- 'text-shadow-color': [{
3976
- 'text-shadow': scaleColor()
3977
- }],
3978
- /**
3979
- * Opacity
3980
- * @see https://tailwindcss.com/docs/opacity
3981
- */
3982
- opacity: [{
3983
- opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
3984
- }],
3985
- /**
3986
- * Mix Blend Mode
3987
- * @see https://tailwindcss.com/docs/mix-blend-mode
3988
- */
3989
- 'mix-blend': [{
3990
- 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']
3991
- }],
3992
- /**
3993
- * Background Blend Mode
3994
- * @see https://tailwindcss.com/docs/background-blend-mode
3995
- */
3996
- 'bg-blend': [{
3997
- 'bg-blend': scaleBlendMode()
3998
- }],
3999
- /**
4000
- * Mask Clip
4001
- * @see https://tailwindcss.com/docs/mask-clip
4002
- */
4003
- 'mask-clip': [{
4004
- 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
4005
- }, 'mask-no-clip'],
4006
- /**
4007
- * Mask Composite
4008
- * @see https://tailwindcss.com/docs/mask-composite
4009
- */
4010
- 'mask-composite': [{
4011
- mask: ['add', 'subtract', 'intersect', 'exclude']
4012
- }],
4013
- /**
4014
- * Mask Image
4015
- * @see https://tailwindcss.com/docs/mask-image
4016
- */
4017
- 'mask-image-linear-pos': [{
4018
- 'mask-linear': [isNumber]
4019
- }],
4020
- 'mask-image-linear-from-pos': [{
4021
- 'mask-linear-from': scaleMaskImagePosition()
4022
- }],
4023
- 'mask-image-linear-to-pos': [{
4024
- 'mask-linear-to': scaleMaskImagePosition()
4025
- }],
4026
- 'mask-image-linear-from-color': [{
4027
- 'mask-linear-from': scaleColor()
4028
- }],
4029
- 'mask-image-linear-to-color': [{
4030
- 'mask-linear-to': scaleColor()
4031
- }],
4032
- 'mask-image-t-from-pos': [{
4033
- 'mask-t-from': scaleMaskImagePosition()
4034
- }],
4035
- 'mask-image-t-to-pos': [{
4036
- 'mask-t-to': scaleMaskImagePosition()
4037
- }],
4038
- 'mask-image-t-from-color': [{
4039
- 'mask-t-from': scaleColor()
4040
- }],
4041
- 'mask-image-t-to-color': [{
4042
- 'mask-t-to': scaleColor()
4043
- }],
4044
- 'mask-image-r-from-pos': [{
4045
- 'mask-r-from': scaleMaskImagePosition()
4046
- }],
4047
- 'mask-image-r-to-pos': [{
4048
- 'mask-r-to': scaleMaskImagePosition()
4049
- }],
4050
- 'mask-image-r-from-color': [{
4051
- 'mask-r-from': scaleColor()
4052
- }],
4053
- 'mask-image-r-to-color': [{
4054
- 'mask-r-to': scaleColor()
4055
- }],
4056
- 'mask-image-b-from-pos': [{
4057
- 'mask-b-from': scaleMaskImagePosition()
4058
- }],
4059
- 'mask-image-b-to-pos': [{
4060
- 'mask-b-to': scaleMaskImagePosition()
4061
- }],
4062
- 'mask-image-b-from-color': [{
4063
- 'mask-b-from': scaleColor()
4064
- }],
4065
- 'mask-image-b-to-color': [{
4066
- 'mask-b-to': scaleColor()
4067
- }],
4068
- 'mask-image-l-from-pos': [{
4069
- 'mask-l-from': scaleMaskImagePosition()
4070
- }],
4071
- 'mask-image-l-to-pos': [{
4072
- 'mask-l-to': scaleMaskImagePosition()
4073
- }],
4074
- 'mask-image-l-from-color': [{
4075
- 'mask-l-from': scaleColor()
4076
- }],
4077
- 'mask-image-l-to-color': [{
4078
- 'mask-l-to': scaleColor()
4079
- }],
4080
- 'mask-image-x-from-pos': [{
4081
- 'mask-x-from': scaleMaskImagePosition()
4082
- }],
4083
- 'mask-image-x-to-pos': [{
4084
- 'mask-x-to': scaleMaskImagePosition()
4085
- }],
4086
- 'mask-image-x-from-color': [{
4087
- 'mask-x-from': scaleColor()
4088
- }],
4089
- 'mask-image-x-to-color': [{
4090
- 'mask-x-to': scaleColor()
4091
- }],
4092
- 'mask-image-y-from-pos': [{
4093
- 'mask-y-from': scaleMaskImagePosition()
4094
- }],
4095
- 'mask-image-y-to-pos': [{
4096
- 'mask-y-to': scaleMaskImagePosition()
4097
- }],
4098
- 'mask-image-y-from-color': [{
4099
- 'mask-y-from': scaleColor()
4100
- }],
4101
- 'mask-image-y-to-color': [{
4102
- 'mask-y-to': scaleColor()
4103
- }],
4104
- 'mask-image-radial': [{
4105
- 'mask-radial': [isArbitraryVariable, isArbitraryValue]
4106
- }],
4107
- 'mask-image-radial-from-pos': [{
4108
- 'mask-radial-from': scaleMaskImagePosition()
4109
- }],
4110
- 'mask-image-radial-to-pos': [{
4111
- 'mask-radial-to': scaleMaskImagePosition()
4112
- }],
4113
- 'mask-image-radial-from-color': [{
4114
- 'mask-radial-from': scaleColor()
4115
- }],
4116
- 'mask-image-radial-to-color': [{
4117
- 'mask-radial-to': scaleColor()
4118
- }],
4119
- 'mask-image-radial-shape': [{
4120
- 'mask-radial': ['circle', 'ellipse']
4121
- }],
4122
- 'mask-image-radial-size': [{
4123
- 'mask-radial': [{
4124
- closest: ['side', 'corner'],
4125
- farthest: ['side', 'corner']
4126
- }]
4127
- }],
4128
- 'mask-image-radial-pos': [{
4129
- 'mask-radial-at': scalePosition()
4130
- }],
4131
- 'mask-image-conic-pos': [{
4132
- 'mask-conic': [isNumber]
4133
- }],
4134
- 'mask-image-conic-from-pos': [{
4135
- 'mask-conic-from': scaleMaskImagePosition()
4136
- }],
4137
- 'mask-image-conic-to-pos': [{
4138
- 'mask-conic-to': scaleMaskImagePosition()
4139
- }],
4140
- 'mask-image-conic-from-color': [{
4141
- 'mask-conic-from': scaleColor()
4142
- }],
4143
- 'mask-image-conic-to-color': [{
4144
- 'mask-conic-to': scaleColor()
4145
- }],
4146
- /**
4147
- * Mask Mode
4148
- * @see https://tailwindcss.com/docs/mask-mode
4149
- */
4150
- 'mask-mode': [{
4151
- mask: ['alpha', 'luminance', 'match']
4152
- }],
4153
- /**
4154
- * Mask Origin
4155
- * @see https://tailwindcss.com/docs/mask-origin
4156
- */
4157
- 'mask-origin': [{
4158
- 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
4159
- }],
4160
- /**
4161
- * Mask Position
4162
- * @see https://tailwindcss.com/docs/mask-position
4163
- */
4164
- 'mask-position': [{
4165
- mask: scaleBgPosition()
4166
- }],
4167
- /**
4168
- * Mask Repeat
4169
- * @see https://tailwindcss.com/docs/mask-repeat
4170
- */
4171
- 'mask-repeat': [{
4172
- mask: scaleBgRepeat()
4173
- }],
4174
- /**
4175
- * Mask Size
4176
- * @see https://tailwindcss.com/docs/mask-size
4177
- */
4178
- 'mask-size': [{
4179
- mask: scaleBgSize()
4180
- }],
4181
- /**
4182
- * Mask Type
4183
- * @see https://tailwindcss.com/docs/mask-type
4184
- */
4185
- 'mask-type': [{
4186
- 'mask-type': ['alpha', 'luminance']
4187
- }],
4188
- /**
4189
- * Mask Image
4190
- * @see https://tailwindcss.com/docs/mask-image
4191
- */
4192
- 'mask-image': [{
4193
- mask: ['none', isArbitraryVariable, isArbitraryValue]
4194
- }],
4195
- // ---------------
4196
- // --- Filters ---
4197
- // ---------------
4198
- /**
4199
- * Filter
4200
- * @see https://tailwindcss.com/docs/filter
4201
- */
4202
- filter: [{
4203
- filter: [
4204
- // Deprecated since Tailwind CSS v3.0.0
4205
- '', 'none', isArbitraryVariable, isArbitraryValue]
4206
- }],
4207
- /**
4208
- * Blur
4209
- * @see https://tailwindcss.com/docs/blur
4210
- */
4211
- blur: [{
4212
- blur: scaleBlur()
4213
- }],
4214
- /**
4215
- * Brightness
4216
- * @see https://tailwindcss.com/docs/brightness
4217
- */
4218
- brightness: [{
4219
- brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
4220
- }],
4221
- /**
4222
- * Contrast
4223
- * @see https://tailwindcss.com/docs/contrast
4224
- */
4225
- contrast: [{
4226
- contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
4227
- }],
4228
- /**
4229
- * Drop Shadow
4230
- * @see https://tailwindcss.com/docs/drop-shadow
4231
- */
4232
- 'drop-shadow': [{
4233
- 'drop-shadow': [
4234
- // Deprecated since Tailwind CSS v4.0.0
4235
- '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]
4236
- }],
4237
- /**
4238
- * Drop Shadow Color
4239
- * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
4240
- */
4241
- 'drop-shadow-color': [{
4242
- 'drop-shadow': scaleColor()
4243
- }],
4244
- /**
4245
- * Grayscale
4246
- * @see https://tailwindcss.com/docs/grayscale
4247
- */
4248
- grayscale: [{
4249
- grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]
4250
- }],
4251
- /**
4252
- * Hue Rotate
4253
- * @see https://tailwindcss.com/docs/hue-rotate
4254
- */
4255
- 'hue-rotate': [{
4256
- 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
4257
- }],
4258
- /**
4259
- * Invert
4260
- * @see https://tailwindcss.com/docs/invert
4261
- */
4262
- invert: [{
4263
- invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]
4264
- }],
4265
- /**
4266
- * Saturate
4267
- * @see https://tailwindcss.com/docs/saturate
4268
- */
4269
- saturate: [{
4270
- saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
4271
- }],
4272
- /**
4273
- * Sepia
4274
- * @see https://tailwindcss.com/docs/sepia
4275
- */
4276
- sepia: [{
4277
- sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]
4278
- }],
4279
- /**
4280
- * Backdrop Filter
4281
- * @see https://tailwindcss.com/docs/backdrop-filter
4282
- */
4283
- 'backdrop-filter': [{
4284
- 'backdrop-filter': [
4285
- // Deprecated since Tailwind CSS v3.0.0
4286
- '', 'none', isArbitraryVariable, isArbitraryValue]
4287
- }],
4288
- /**
4289
- * Backdrop Blur
4290
- * @see https://tailwindcss.com/docs/backdrop-blur
4291
- */
4292
- 'backdrop-blur': [{
4293
- 'backdrop-blur': scaleBlur()
4294
- }],
4295
- /**
4296
- * Backdrop Brightness
4297
- * @see https://tailwindcss.com/docs/backdrop-brightness
4298
- */
4299
- 'backdrop-brightness': [{
4300
- 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]
4301
- }],
4302
- /**
4303
- * Backdrop Contrast
4304
- * @see https://tailwindcss.com/docs/backdrop-contrast
4305
- */
4306
- 'backdrop-contrast': [{
4307
- 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]
4308
- }],
4309
- /**
4310
- * Backdrop Grayscale
4311
- * @see https://tailwindcss.com/docs/backdrop-grayscale
4312
- */
4313
- 'backdrop-grayscale': [{
4314
- 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]
4315
- }],
4316
- /**
4317
- * Backdrop Hue Rotate
4318
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
4319
- */
4320
- 'backdrop-hue-rotate': [{
4321
- 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]
4322
- }],
4323
- /**
4324
- * Backdrop Invert
4325
- * @see https://tailwindcss.com/docs/backdrop-invert
4326
- */
4327
- 'backdrop-invert': [{
4328
- 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]
4329
- }],
4330
- /**
4331
- * Backdrop Opacity
4332
- * @see https://tailwindcss.com/docs/backdrop-opacity
4333
- */
4334
- 'backdrop-opacity': [{
4335
- 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]
4336
- }],
4337
- /**
4338
- * Backdrop Saturate
4339
- * @see https://tailwindcss.com/docs/backdrop-saturate
4340
- */
4341
- 'backdrop-saturate': [{
4342
- 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]
4343
- }],
4344
- /**
4345
- * Backdrop Sepia
4346
- * @see https://tailwindcss.com/docs/backdrop-sepia
4347
- */
4348
- 'backdrop-sepia': [{
4349
- 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]
4350
- }],
4351
- // --------------
4352
- // --- Tables ---
4353
- // --------------
4354
- /**
4355
- * Border Collapse
4356
- * @see https://tailwindcss.com/docs/border-collapse
4357
- */
4358
- 'border-collapse': [{
4359
- border: ['collapse', 'separate']
4360
- }],
4361
- /**
4362
- * Border Spacing
4363
- * @see https://tailwindcss.com/docs/border-spacing
4364
- */
4365
- 'border-spacing': [{
4366
- 'border-spacing': scaleUnambiguousSpacing()
4367
- }],
4368
- /**
4369
- * Border Spacing X
4370
- * @see https://tailwindcss.com/docs/border-spacing
4371
- */
4372
- 'border-spacing-x': [{
4373
- 'border-spacing-x': scaleUnambiguousSpacing()
4374
- }],
4375
- /**
4376
- * Border Spacing Y
4377
- * @see https://tailwindcss.com/docs/border-spacing
4378
- */
4379
- 'border-spacing-y': [{
4380
- 'border-spacing-y': scaleUnambiguousSpacing()
4381
- }],
4382
- /**
4383
- * Table Layout
4384
- * @see https://tailwindcss.com/docs/table-layout
4385
- */
4386
- 'table-layout': [{
4387
- table: ['auto', 'fixed']
4388
- }],
4389
- /**
4390
- * Caption Side
4391
- * @see https://tailwindcss.com/docs/caption-side
4392
- */
4393
- caption: [{
4394
- caption: ['top', 'bottom']
4395
- }],
4396
- // ---------------------------------
4397
- // --- Transitions and Animation ---
4398
- // ---------------------------------
4399
- /**
4400
- * Transition Property
4401
- * @see https://tailwindcss.com/docs/transition-property
4402
- */
4403
- transition: [{
4404
- transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]
4405
- }],
4406
- /**
4407
- * Transition Behavior
4408
- * @see https://tailwindcss.com/docs/transition-behavior
4409
- */
4410
- 'transition-behavior': [{
4411
- transition: ['normal', 'discrete']
4412
- }],
4413
- /**
4414
- * Transition Duration
4415
- * @see https://tailwindcss.com/docs/transition-duration
4416
- */
4417
- duration: [{
4418
- duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]
4419
- }],
4420
- /**
4421
- * Transition Timing Function
4422
- * @see https://tailwindcss.com/docs/transition-timing-function
4423
- */
4424
- ease: [{
4425
- ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]
4426
- }],
4427
- /**
4428
- * Transition Delay
4429
- * @see https://tailwindcss.com/docs/transition-delay
4430
- */
4431
- delay: [{
4432
- delay: [isNumber, isArbitraryVariable, isArbitraryValue]
4433
- }],
4434
- /**
4435
- * Animation
4436
- * @see https://tailwindcss.com/docs/animation
4437
- */
4438
- animate: [{
4439
- animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]
4440
- }],
4441
- // ------------------
4442
- // --- Transforms ---
4443
- // ------------------
4444
- /**
4445
- * Backface Visibility
4446
- * @see https://tailwindcss.com/docs/backface-visibility
4447
- */
4448
- backface: [{
4449
- backface: ['hidden', 'visible']
4450
- }],
4451
- /**
4452
- * Perspective
4453
- * @see https://tailwindcss.com/docs/perspective
4454
- */
4455
- perspective: [{
4456
- perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
4457
- }],
4458
- /**
4459
- * Perspective Origin
4460
- * @see https://tailwindcss.com/docs/perspective-origin
4461
- */
4462
- 'perspective-origin': [{
4463
- 'perspective-origin': scalePositionWithArbitrary()
4464
- }],
4465
- /**
4466
- * Rotate
4467
- * @see https://tailwindcss.com/docs/rotate
4468
- */
4469
- rotate: [{
4470
- rotate: scaleRotate()
4471
- }],
4472
- /**
4473
- * Rotate X
4474
- * @see https://tailwindcss.com/docs/rotate
4475
- */
4476
- 'rotate-x': [{
4477
- 'rotate-x': scaleRotate()
4478
- }],
4479
- /**
4480
- * Rotate Y
4481
- * @see https://tailwindcss.com/docs/rotate
4482
- */
4483
- 'rotate-y': [{
4484
- 'rotate-y': scaleRotate()
4485
- }],
4486
- /**
4487
- * Rotate Z
4488
- * @see https://tailwindcss.com/docs/rotate
4489
- */
4490
- 'rotate-z': [{
4491
- 'rotate-z': scaleRotate()
4492
- }],
4493
- /**
4494
- * Scale
4495
- * @see https://tailwindcss.com/docs/scale
4496
- */
4497
- scale: [{
4498
- scale: scaleScale()
4499
- }],
4500
- /**
4501
- * Scale X
4502
- * @see https://tailwindcss.com/docs/scale
4503
- */
4504
- 'scale-x': [{
4505
- 'scale-x': scaleScale()
4506
- }],
4507
- /**
4508
- * Scale Y
4509
- * @see https://tailwindcss.com/docs/scale
4510
- */
4511
- 'scale-y': [{
4512
- 'scale-y': scaleScale()
4513
- }],
4514
- /**
4515
- * Scale Z
4516
- * @see https://tailwindcss.com/docs/scale
4517
- */
4518
- 'scale-z': [{
4519
- 'scale-z': scaleScale()
4520
- }],
4521
- /**
4522
- * Scale 3D
4523
- * @see https://tailwindcss.com/docs/scale
4524
- */
4525
- 'scale-3d': ['scale-3d'],
4526
- /**
4527
- * Skew
4528
- * @see https://tailwindcss.com/docs/skew
4529
- */
4530
- skew: [{
4531
- skew: scaleSkew()
4532
- }],
4533
- /**
4534
- * Skew X
4535
- * @see https://tailwindcss.com/docs/skew
4536
- */
4537
- 'skew-x': [{
4538
- 'skew-x': scaleSkew()
4539
- }],
4540
- /**
4541
- * Skew Y
4542
- * @see https://tailwindcss.com/docs/skew
4543
- */
4544
- 'skew-y': [{
4545
- 'skew-y': scaleSkew()
4546
- }],
4547
- /**
4548
- * Transform
4549
- * @see https://tailwindcss.com/docs/transform
4550
- */
4551
- transform: [{
4552
- transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']
4553
- }],
4554
- /**
4555
- * Transform Origin
4556
- * @see https://tailwindcss.com/docs/transform-origin
4557
- */
4558
- 'transform-origin': [{
4559
- origin: scalePositionWithArbitrary()
4560
- }],
4561
- /**
4562
- * Transform Style
4563
- * @see https://tailwindcss.com/docs/transform-style
4564
- */
4565
- 'transform-style': [{
4566
- transform: ['3d', 'flat']
4567
- }],
4568
- /**
4569
- * Translate
4570
- * @see https://tailwindcss.com/docs/translate
4571
- */
4572
- translate: [{
4573
- translate: scaleTranslate()
4574
- }],
4575
- /**
4576
- * Translate X
4577
- * @see https://tailwindcss.com/docs/translate
4578
- */
4579
- 'translate-x': [{
4580
- 'translate-x': scaleTranslate()
4581
- }],
4582
- /**
4583
- * Translate Y
4584
- * @see https://tailwindcss.com/docs/translate
4585
- */
4586
- 'translate-y': [{
4587
- 'translate-y': scaleTranslate()
4588
- }],
4589
- /**
4590
- * Translate Z
4591
- * @see https://tailwindcss.com/docs/translate
4592
- */
4593
- 'translate-z': [{
4594
- 'translate-z': scaleTranslate()
4595
- }],
4596
- /**
4597
- * Translate None
4598
- * @see https://tailwindcss.com/docs/translate
4599
- */
4600
- 'translate-none': ['translate-none'],
4601
- /**
4602
- * Zoom
4603
- * @see https://tailwindcss.com/docs/zoom
4604
- */
4605
- zoom: [{
4606
- zoom: [isInteger, isArbitraryVariable, isArbitraryValue]
4607
- }],
4608
- // ---------------------
4609
- // --- Interactivity ---
4610
- // ---------------------
4611
- /**
4612
- * Accent Color
4613
- * @see https://tailwindcss.com/docs/accent-color
4614
- */
4615
- accent: [{
4616
- accent: scaleColor()
4617
- }],
4618
- /**
4619
- * Appearance
4620
- * @see https://tailwindcss.com/docs/appearance
4621
- */
4622
- appearance: [{
4623
- appearance: ['none', 'auto']
4624
- }],
4625
- /**
4626
- * Caret Color
4627
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
4628
- */
4629
- 'caret-color': [{
4630
- caret: scaleColor()
4631
- }],
4632
- /**
4633
- * Color Scheme
4634
- * @see https://tailwindcss.com/docs/color-scheme
4635
- */
4636
- 'color-scheme': [{
4637
- scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']
4638
- }],
4639
- /**
4640
- * Cursor
4641
- * @see https://tailwindcss.com/docs/cursor
4642
- */
4643
- cursor: [{
4644
- cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]
4645
- }],
4646
- /**
4647
- * Field Sizing
4648
- * @see https://tailwindcss.com/docs/field-sizing
4649
- */
4650
- 'field-sizing': [{
4651
- 'field-sizing': ['fixed', 'content']
4652
- }],
4653
- /**
4654
- * Pointer Events
4655
- * @see https://tailwindcss.com/docs/pointer-events
4656
- */
4657
- 'pointer-events': [{
4658
- 'pointer-events': ['auto', 'none']
4659
- }],
4660
- /**
4661
- * Resize
4662
- * @see https://tailwindcss.com/docs/resize
4663
- */
4664
- resize: [{
4665
- resize: ['none', '', 'y', 'x']
4666
- }],
4667
- /**
4668
- * Scroll Behavior
4669
- * @see https://tailwindcss.com/docs/scroll-behavior
4670
- */
4671
- 'scroll-behavior': [{
4672
- scroll: ['auto', 'smooth']
4673
- }],
4674
- /**
4675
- * Scrollbar Thumb Color
4676
- * @see https://tailwindcss.com/docs/scrollbar-color
4677
- */
4678
- 'scrollbar-thumb-color': [{
4679
- 'scrollbar-thumb': scaleColor()
4680
- }],
4681
- /**
4682
- * Scrollbar Track Color
4683
- * @see https://tailwindcss.com/docs/scrollbar-color
4684
- */
4685
- 'scrollbar-track-color': [{
4686
- 'scrollbar-track': scaleColor()
4687
- }],
4688
- /**
4689
- * Scrollbar Gutter
4690
- * @see https://tailwindcss.com/docs/scrollbar-gutter
4691
- */
4692
- 'scrollbar-gutter': [{
4693
- 'scrollbar-gutter': ['auto', 'stable', 'both']
4694
- }],
4695
- /**
4696
- * Scrollbar Width
4697
- * @see https://tailwindcss.com/docs/scrollbar-width
4698
- */
4699
- 'scrollbar-w': [{
4700
- scrollbar: ['auto', 'thin', 'none']
4701
- }],
4702
- /**
4703
- * Scroll Margin
4704
- * @see https://tailwindcss.com/docs/scroll-margin
4705
- */
4706
- 'scroll-m': [{
4707
- 'scroll-m': scaleUnambiguousSpacing()
4708
- }],
4709
- /**
4710
- * Scroll Margin Inline
4711
- * @see https://tailwindcss.com/docs/scroll-margin
4712
- */
4713
- 'scroll-mx': [{
4714
- 'scroll-mx': scaleUnambiguousSpacing()
4715
- }],
4716
- /**
4717
- * Scroll Margin Block
4718
- * @see https://tailwindcss.com/docs/scroll-margin
4719
- */
4720
- 'scroll-my': [{
4721
- 'scroll-my': scaleUnambiguousSpacing()
4722
- }],
4723
- /**
4724
- * Scroll Margin Inline Start
4725
- * @see https://tailwindcss.com/docs/scroll-margin
4726
- */
4727
- 'scroll-ms': [{
4728
- 'scroll-ms': scaleUnambiguousSpacing()
4729
- }],
4730
- /**
4731
- * Scroll Margin Inline End
4732
- * @see https://tailwindcss.com/docs/scroll-margin
4733
- */
4734
- 'scroll-me': [{
4735
- 'scroll-me': scaleUnambiguousSpacing()
4736
- }],
4737
- /**
4738
- * Scroll Margin Block Start
4739
- * @see https://tailwindcss.com/docs/scroll-margin
4740
- */
4741
- 'scroll-mbs': [{
4742
- 'scroll-mbs': scaleUnambiguousSpacing()
4743
- }],
4744
- /**
4745
- * Scroll Margin Block End
4746
- * @see https://tailwindcss.com/docs/scroll-margin
4747
- */
4748
- 'scroll-mbe': [{
4749
- 'scroll-mbe': scaleUnambiguousSpacing()
4750
- }],
4751
- /**
4752
- * Scroll Margin Top
4753
- * @see https://tailwindcss.com/docs/scroll-margin
4754
- */
4755
- 'scroll-mt': [{
4756
- 'scroll-mt': scaleUnambiguousSpacing()
4757
- }],
4758
- /**
4759
- * Scroll Margin Right
4760
- * @see https://tailwindcss.com/docs/scroll-margin
4761
- */
4762
- 'scroll-mr': [{
4763
- 'scroll-mr': scaleUnambiguousSpacing()
4764
- }],
4765
- /**
4766
- * Scroll Margin Bottom
4767
- * @see https://tailwindcss.com/docs/scroll-margin
4768
- */
4769
- 'scroll-mb': [{
4770
- 'scroll-mb': scaleUnambiguousSpacing()
4771
- }],
4772
- /**
4773
- * Scroll Margin Left
4774
- * @see https://tailwindcss.com/docs/scroll-margin
4775
- */
4776
- 'scroll-ml': [{
4777
- 'scroll-ml': scaleUnambiguousSpacing()
4778
- }],
4779
- /**
4780
- * Scroll Padding
4781
- * @see https://tailwindcss.com/docs/scroll-padding
4782
- */
4783
- 'scroll-p': [{
4784
- 'scroll-p': scaleUnambiguousSpacing()
4785
- }],
4786
- /**
4787
- * Scroll Padding Inline
4788
- * @see https://tailwindcss.com/docs/scroll-padding
4789
- */
4790
- 'scroll-px': [{
4791
- 'scroll-px': scaleUnambiguousSpacing()
4792
- }],
4793
- /**
4794
- * Scroll Padding Block
4795
- * @see https://tailwindcss.com/docs/scroll-padding
4796
- */
4797
- 'scroll-py': [{
4798
- 'scroll-py': scaleUnambiguousSpacing()
4799
- }],
4800
- /**
4801
- * Scroll Padding Inline Start
4802
- * @see https://tailwindcss.com/docs/scroll-padding
4803
- */
4804
- 'scroll-ps': [{
4805
- 'scroll-ps': scaleUnambiguousSpacing()
4806
- }],
4807
- /**
4808
- * Scroll Padding Inline End
4809
- * @see https://tailwindcss.com/docs/scroll-padding
4810
- */
4811
- 'scroll-pe': [{
4812
- 'scroll-pe': scaleUnambiguousSpacing()
4813
- }],
4814
- /**
4815
- * Scroll Padding Block Start
4816
- * @see https://tailwindcss.com/docs/scroll-padding
4817
- */
4818
- 'scroll-pbs': [{
4819
- 'scroll-pbs': scaleUnambiguousSpacing()
4820
- }],
4821
- /**
4822
- * Scroll Padding Block End
4823
- * @see https://tailwindcss.com/docs/scroll-padding
4824
- */
4825
- 'scroll-pbe': [{
4826
- 'scroll-pbe': scaleUnambiguousSpacing()
4827
- }],
4828
- /**
4829
- * Scroll Padding Top
4830
- * @see https://tailwindcss.com/docs/scroll-padding
4831
- */
4832
- 'scroll-pt': [{
4833
- 'scroll-pt': scaleUnambiguousSpacing()
4834
- }],
4835
- /**
4836
- * Scroll Padding Right
4837
- * @see https://tailwindcss.com/docs/scroll-padding
4838
- */
4839
- 'scroll-pr': [{
4840
- 'scroll-pr': scaleUnambiguousSpacing()
4841
- }],
4842
- /**
4843
- * Scroll Padding Bottom
4844
- * @see https://tailwindcss.com/docs/scroll-padding
4845
- */
4846
- 'scroll-pb': [{
4847
- 'scroll-pb': scaleUnambiguousSpacing()
4848
- }],
4849
- /**
4850
- * Scroll Padding Left
4851
- * @see https://tailwindcss.com/docs/scroll-padding
4852
- */
4853
- 'scroll-pl': [{
4854
- 'scroll-pl': scaleUnambiguousSpacing()
4855
- }],
4856
- /**
4857
- * Scroll Snap Align
4858
- * @see https://tailwindcss.com/docs/scroll-snap-align
4859
- */
4860
- 'snap-align': [{
4861
- snap: ['start', 'end', 'center', 'align-none']
4862
- }],
4863
- /**
4864
- * Scroll Snap Stop
4865
- * @see https://tailwindcss.com/docs/scroll-snap-stop
4866
- */
4867
- 'snap-stop': [{
4868
- snap: ['normal', 'always']
4869
- }],
4870
- /**
4871
- * Scroll Snap Type
4872
- * @see https://tailwindcss.com/docs/scroll-snap-type
4873
- */
4874
- 'snap-type': [{
4875
- snap: ['none', 'x', 'y', 'both']
4876
- }],
4877
- /**
4878
- * Scroll Snap Type Strictness
4879
- * @see https://tailwindcss.com/docs/scroll-snap-type
4880
- */
4881
- 'snap-strictness': [{
4882
- snap: ['mandatory', 'proximity']
4883
- }],
4884
- /**
4885
- * Touch Action
4886
- * @see https://tailwindcss.com/docs/touch-action
4887
- */
4888
- touch: [{
4889
- touch: ['auto', 'none', 'manipulation']
4890
- }],
4891
- /**
4892
- * Touch Action X
4893
- * @see https://tailwindcss.com/docs/touch-action
4894
- */
4895
- 'touch-x': [{
4896
- 'touch-pan': ['x', 'left', 'right']
4897
- }],
4898
- /**
4899
- * Touch Action Y
4900
- * @see https://tailwindcss.com/docs/touch-action
4901
- */
4902
- 'touch-y': [{
4903
- 'touch-pan': ['y', 'up', 'down']
4904
- }],
4905
- /**
4906
- * Touch Action Pinch Zoom
4907
- * @see https://tailwindcss.com/docs/touch-action
4908
- */
4909
- 'touch-pz': ['touch-pinch-zoom'],
4910
- /**
4911
- * User Select
4912
- * @see https://tailwindcss.com/docs/user-select
4913
- */
4914
- select: [{
4915
- select: ['none', 'text', 'all', 'auto']
4916
- }],
4917
- /**
4918
- * Will Change
4919
- * @see https://tailwindcss.com/docs/will-change
4920
- */
4921
- 'will-change': [{
4922
- 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]
4923
- }],
4924
- // -----------
4925
- // --- SVG ---
4926
- // -----------
4927
- /**
4928
- * Fill
4929
- * @see https://tailwindcss.com/docs/fill
4930
- */
4931
- fill: [{
4932
- fill: ['none', ...scaleColor()]
4933
- }],
4934
- /**
4935
- * Stroke Width
4936
- * @see https://tailwindcss.com/docs/stroke-width
4937
- */
4938
- 'stroke-w': [{
4939
- stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
4940
- }],
4941
- /**
4942
- * Stroke
4943
- * @see https://tailwindcss.com/docs/stroke
4944
- */
4945
- stroke: [{
4946
- stroke: ['none', ...scaleColor()]
4947
- }],
4948
- // ---------------------
4949
- // --- Accessibility ---
4950
- // ---------------------
4951
- /**
4952
- * Forced Color Adjust
4953
- * @see https://tailwindcss.com/docs/forced-color-adjust
4954
- */
4955
- 'forced-color-adjust': [{
4956
- 'forced-color-adjust': ['auto', 'none']
4957
- }]
4958
- },
4959
- conflictingClassGroups: {
4960
- 'container-named': ['container-type'],
4961
- overflow: ['overflow-x', 'overflow-y'],
4962
- overscroll: ['overscroll-x', 'overscroll-y'],
4963
- inset: ['inset-x', 'inset-y', 'inset-bs', 'inset-be', 'start', 'end', 'top', 'right', 'bottom', 'left'],
4964
- 'inset-x': ['right', 'left'],
4965
- 'inset-y': ['top', 'bottom'],
4966
- flex: ['basis', 'grow', 'shrink'],
4967
- gap: ['gap-x', 'gap-y'],
4968
- p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],
4969
- px: ['pr', 'pl'],
4970
- py: ['pt', 'pb'],
4971
- m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml'],
4972
- mx: ['mr', 'ml'],
4973
- my: ['mt', 'mb'],
4974
- size: ['w', 'h'],
4975
- 'font-size': ['leading'],
4976
- 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],
4977
- 'fvn-ordinal': ['fvn-normal'],
4978
- 'fvn-slashed-zero': ['fvn-normal'],
4979
- 'fvn-figure': ['fvn-normal'],
4980
- 'fvn-spacing': ['fvn-normal'],
4981
- 'fvn-fraction': ['fvn-normal'],
4982
- 'line-clamp': ['display', 'overflow'],
4983
- rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],
4984
- 'rounded-s': ['rounded-ss', 'rounded-es'],
4985
- 'rounded-e': ['rounded-se', 'rounded-ee'],
4986
- 'rounded-t': ['rounded-tl', 'rounded-tr'],
4987
- 'rounded-r': ['rounded-tr', 'rounded-br'],
4988
- 'rounded-b': ['rounded-br', 'rounded-bl'],
4989
- 'rounded-l': ['rounded-tl', 'rounded-bl'],
4990
- 'border-spacing': ['border-spacing-x', 'border-spacing-y'],
4991
- 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-bs', 'border-w-be', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
4992
- 'border-w-x': ['border-w-r', 'border-w-l'],
4993
- 'border-w-y': ['border-w-t', 'border-w-b'],
4994
- 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-bs', 'border-color-be', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
4995
- 'border-color-x': ['border-color-r', 'border-color-l'],
4996
- 'border-color-y': ['border-color-t', 'border-color-b'],
4997
- translate: ['translate-x', 'translate-y', 'translate-none'],
4998
- 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
4999
- 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
5000
- 'scroll-mx': ['scroll-mr', 'scroll-ml'],
5001
- 'scroll-my': ['scroll-mt', 'scroll-mb'],
5002
- 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pbs', 'scroll-pbe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
5003
- 'scroll-px': ['scroll-pr', 'scroll-pl'],
5004
- 'scroll-py': ['scroll-pt', 'scroll-pb'],
5005
- touch: ['touch-x', 'touch-y', 'touch-pz'],
5006
- 'touch-x': ['touch'],
5007
- 'touch-y': ['touch'],
5008
- 'touch-pz': ['touch']
5009
- },
5010
- conflictingClassGroupModifiers: {
5011
- 'font-size': ['leading']
5012
- },
5013
- postfixLookupClassGroups: ['container-type'],
5014
- orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']
5015
- };
5016
- };
5017
- const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
5018
-
5019
- function cn() {
5020
- var inputs = [];
5021
- for (var _i = 0; _i < arguments.length; _i++) {
5022
- inputs[_i] = arguments[_i];
5023
- }
5024
- return twMerge(clsx(inputs));
5025
- }
5026
1748
  var BORDER_COLOR = {
5027
1749
  countdown: 'border-bia-blue',
5028
1750
  success: 'border-bia-green',
@@ -5797,14 +2519,15 @@ var sizeConfig$9 = {
5797
2519
 
5798
2520
  var sizeUnion$3 = ['md', 'sm', 'tn'];
5799
2521
  function Checkbox(_a) {
5800
- var _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, props = __rest(_a, ["disabled", "id", "size", "label", "onChange"]);
5801
- var _e = sizeConfig$9[validUnion(size, sizeUnion$3)], checkClass = _e.checkClass, labelClass = _e.labelClass;
2522
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, id = _a.id, _c = _a.size, size = _c === void 0 ? 'md' : _c, label = _a.label, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, _e = _a.isIndeterminate, isIndeterminate = _e === void 0 ? false : _e, props = __rest(_a, ["disabled", "id", "size", "label", "onChange", "isIndeterminate"]);
2523
+ var _f = sizeConfig$9[validUnion(size, sizeUnion$3)], checkClass = _f.checkClass, labelClass = _f.labelClass;
2524
+ var isValidIndeterminate = isIndeterminate && props.checked && !disabled;
2525
+ var backgroundClass = size === 'tn' && props.checked ? 'bg-bia-blue' : 'bg-bia-white';
2526
+ var peerCheckedClass = size === 'tn' ? '' : 'peer-checked:border-2';
5802
2527
  return (React.createElement("div", { className: "flex items-center" },
5803
- React.createElement("div", { className: "relative flex flex-shrink-0 items-center justify-center rounded-full bg-white ".concat(checkClass) },
2528
+ React.createElement("div", { className: "relative flex flex-shrink-0 items-center justify-center rounded-full ".concat(backgroundClass, " ").concat(checkClass) },
5804
2529
  React.createElement("input", __assign({ id: id, type: "checkbox", className: "checkbox peer absolute box-content h-full w-full cursor-pointer appearance-none rounded-full border-2 border-bia-coolgrey-light-50 checked:border-bia-blue hover:border-bia-blue-hover focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-bia-blue focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:border-bia-coolgrey-light-50 disabled:checked:border-bia-blue-light-50", onChange: function (e) { return onChange(e); }, disabled: disabled }, props)),
5805
- React.createElement("div", { className: "check-icon z-1 group flex h-full w-full justify-center rounded-full text-bia-grey outline-2 outline-bia-blue peer-checked:border-2 peer-checked:border-primary-white peer-checked:bg-bia-blue peer-checked:hover:border-bia-blue-hover peer-checked:hover:outline-bia-blue-hover peer-checked:peer-hover:bg-bia-blue-hover peer-disabled:bg-bia-grey-light-80 peer-disabled:peer-checked:bg-bia-blue-light-50 peer-disabled:peer-checked:outline-bia-blue-light-50" },
5806
- React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: " fill-bia-grey-dark-10 peer-checked:group-[]:fill-primary-white peer-hover:group-[]:fill-bia-blue-hover peer-checked:peer-hover:group-[]:fill-primary-white peer-disabled:group-[]:fill-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:fill-primary-white", viewBox: "-5 -7 24 24", width: "24" },
5807
- React.createElement("path", { d: "M5.486 9.73a.997.997 0 0 1-.707-.292L.537 5.195A1 1 0 1 1 1.95 3.78l3.535 3.535L11.85.952a1 1 0 0 1 1.415 1.414L6.193 9.438a.997.997 0 0 1-.707.292z" })))),
2530
+ React.createElement("div", { className: "check-icon z-1 group flex h-full w-full items-center justify-center rounded-full text-bia-grey outline-2 outline-bia-blue peer-checked:border-primary-white peer-checked:bg-bia-blue peer-checked:hover:border-bia-blue-hover peer-checked:hover:outline-bia-blue-hover peer-checked:peer-hover:bg-bia-blue-hover peer-disabled:bg-bia-grey-light-80 peer-disabled:peer-checked:bg-bia-blue-light-50 peer-disabled:peer-checked:outline-bia-blue-light-50 ".concat(peerCheckedClass) }, isValidIndeterminate ? (React.createElement(TbMinus, { className: "stroke-[3px] text-bia-grey-dark-10 peer-checked:group-[]:text-bia-white peer-hover:group-[]:text-bia-blue-hover peer-checked:peer-hover:group-[]:text-bia-white peer-disabled:group-[]:text-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:text-bia-white", size: 14 })) : (React.createElement(TbCheck, { className: "stroke-[3px] text-bia-grey-dark-10 peer-checked:group-[]:text-bia-white peer-hover:group-[]:text-bia-blue-hover peer-checked:peer-hover:group-[]:text-bia-white peer-disabled:group-[]:text-bia-grey-dark-10 peer-disabled:peer-checked:group-[]:text-bia-white", size: 14 })))),
5808
2531
  React.createElement("label", { htmlFor: id, className: "ml-2 leading-4 text-primary-black ".concat(labelClass), style: { color: disabled ? '#8C8CA6' : '' } }, childrenElement(label))));
5809
2532
  }
5810
2533
  Checkbox.defaultProps = {
@@ -5974,7 +2697,7 @@ var sizeConfig$6 = {
5974
2697
  },
5975
2698
  };
5976
2699
 
5977
- var containerSizeConfig = {
2700
+ var containerSizeConfig$1 = {
5978
2701
  sm: 'min-w-[72px]',
5979
2702
  md: 'min-w-[96px]',
5980
2703
  };
@@ -5990,7 +2713,7 @@ var fontConfig = {
5990
2713
  var DropdownElement = React.forwardRef(function (_a, ref) {
5991
2714
  var isTopFlat = _a.isTopFlat, children = _a.children, className = _a.className, size = _a.size, zIndex = _a.zIndex, style = _a.style, onClose = _a.onClose, onClickItem = _a.onClickItem, restProps = __rest(_a, ["isTopFlat", "children", "className", "size", "zIndex", "style", "onClose", "onClickItem"]);
5992
2715
  var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
5993
- var sizeClass = containerSizeConfig[size] || containerSizeConfig['md'];
2716
+ var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1['md'];
5994
2717
  var containerClass = "".concat(sizeClass, " ").concat(radiusClass, " ").concat(className);
5995
2718
  var handleClickDrpdownItem = function (e, val) {
5996
2719
  onClickItem(e, val);
@@ -6009,8 +2732,6 @@ var DropdownElement = React.forwardRef(function (_a, ref) {
6009
2732
  });
6010
2733
  var DropdownContainer = function (propsComp) {
6011
2734
  var _a = propsComp.isTopFlat, isTopFlat = _a === void 0 ? false : _a, children = propsComp.children, _b = propsComp.open, open = _b === void 0 ? true : _b, _c = propsComp.onClose, onClose = _c === void 0 ? function () { } : _c, _d = propsComp.className, className = _d === void 0 ? '' : _d, _e = propsComp.isWithOverlay, isWithOverlay = _e === void 0 ? true : _e, _f = propsComp.size, size = _f === void 0 ? 'md' : _f, _g = propsComp.onClickItem, onClickItem = _g === void 0 ? function () { } : _g, _h = propsComp.zIndex, zIndex = _h === void 0 ? 100 : _h, anchorRef = propsComp.anchorRef, matchAnchorWidth = propsComp.matchAnchorWidth, restProps = __rest(propsComp, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "size", "onClickItem", "zIndex", "anchorRef", "matchAnchorWidth"]);
6012
- if (!open)
6013
- return null;
6014
2735
  var dropdownRef = React.useRef(null);
6015
2736
  var positionStyle = usePopupPosition(anchorRef, dropdownRef)[0];
6016
2737
  var newStyle = React.useMemo(function () {
@@ -6037,9 +2758,10 @@ var DropdownContainer = function (propsComp) {
6037
2758
  }
6038
2759
  return __assign(__assign({ zIndex: zIndex + 10 }, widthStyle), positionStyle);
6039
2760
  }, [positionStyle]);
6040
- var dropdownElement = (React.createElement(DropdownElement, __assign({ ref: dropdownRef, isTopFlat: isTopFlat, children: children, className: className, size: size, zIndex: zIndex, onClose: onClose, onClickItem: onClickItem, style: newStyle }, restProps)));
2761
+ var displayClass = open ? 'block' : 'hidden';
2762
+ var dropdownElement = (React.createElement(DropdownElement, __assign({ ref: dropdownRef, isTopFlat: isTopFlat, children: children, className: "".concat(className, " ").concat(displayClass), size: size, zIndex: zIndex, onClose: onClose, onClickItem: onClickItem, style: newStyle }, restProps)));
6041
2763
  return (React.createElement(React.Fragment, null,
6042
- isWithOverlay && (React.createElement("div", { className: "bianic-dropdown-overlay fixed left-0 top-0 h-screen w-screen", style: { zIndex: zIndex }, onClick: function () { return onClose(); } })),
2764
+ isWithOverlay && (React.createElement("div", { className: "bianic-dropdown-overlay fixed left-0 top-0 h-screen w-screen ".concat(displayClass), style: { zIndex: zIndex }, onClick: function () { return onClose(); } })),
6043
2765
  (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current)
6044
2766
  ? reactDom.createPortal(dropdownElement, document.body)
6045
2767
  : dropdownElement));
@@ -6051,7 +2773,7 @@ DropdownContainer.defaultProps = {
6051
2773
  var DropdownContNoAnchor = React.forwardRef(function DropdownContNoAnchor(propsComp, ref) {
6052
2774
  var _a = propsComp.isTopFlat, isTopFlat = _a === void 0 ? false : _a, children = propsComp.children, _b = propsComp.open, open = _b === void 0 ? true : _b, _c = propsComp.onClose, onClose = _c === void 0 ? function () { } : _c, _d = propsComp.className, className = _d === void 0 ? '' : _d, _e = propsComp.isWithOverlay, isWithOverlay = _e === void 0 ? true : _e, _f = propsComp.size, size = _f === void 0 ? 'md' : _f, _g = propsComp.onClickItem, onClickItem = _g === void 0 ? function () { } : _g, _h = propsComp.zIndex, zIndex = _h === void 0 ? 100 : _h, restProps = __rest(propsComp, ["isTopFlat", "children", "open", "onClose", "className", "isWithOverlay", "size", "onClickItem", "zIndex"]);
6053
2775
  var radiusClass = "rounded-b-radius-sm ".concat(!isTopFlat && 'rounded-t-radius-sm');
6054
- var sizeClass = containerSizeConfig[size] || containerSizeConfig['md'];
2776
+ var sizeClass = containerSizeConfig$1[size] || containerSizeConfig$1['md'];
6055
2777
  var containerClass = "".concat(sizeClass, " ").concat(radiusClass, " ").concat(className);
6056
2778
  var handleClickDrpdownItem = function (e, val) {
6057
2779
  onClickItem(e, val);
@@ -7794,16 +4516,74 @@ ResizeableDiv.defaultProps = {
7794
4516
  position: 'left',
7795
4517
  };
7796
4518
 
7797
- var SidebarContainer = function (_a) {
7798
- _a.bgColor; var children = _a.children, _c = _a.isMinimized, isMinimized = _c === void 0 ? false : _c; _a.activeItem;
7799
- var minWidth = isMinimized ? 'min-w-0' : 'min-w-[285px]';
7800
- return (React.createElement("div", { className: "sidebar-container flex h-full flex-col justify-start bg-[#64747D] py-[30px] ".concat(minWidth) }, React.Children.map(children, function (child) {
4519
+ var containerSizeConfig = {
4520
+ minimized: 'w-[60px] min-w-[60px]',
4521
+ maximized: 'w-[285px] min-w-[285px]',
4522
+ };
4523
+ var itemConfig = {
4524
+ minimized: 'px-[11px]',
4525
+ maximized: 'pl-[30px] pr-[15px]',
4526
+ };
4527
+ var profileConfig = {
4528
+ minimized: 'px-[5px]',
4529
+ maximized: 'pl-[20px] pr-[15px]',
4530
+ };
4531
+ var overlaySizeConfig = {
4532
+ minimized: 'w-[38px]',
4533
+ maximized: 'w-full',
4534
+ };
4535
+ var buttonConfig = {
4536
+ 0: '',
4537
+ 1: 'pl-[30px]',
4538
+ 2: 'pl-[68px]',
4539
+ };
4540
+
4541
+ var SidebarContainer = React.forwardRef(function (_a, ref) {
4542
+ var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b, children = _a.children, _c = _a.isMinimized, isMinimized = _c === void 0 ? false : _c, _d = _a.activeId, activeId = _d === void 0 ? undefined : _d, _e = _a.setActiveId, setActiveId = _e === void 0 ? function () { } : _e, _f = _a.className, className = _f === void 0 ? '' : _f, restProps = __rest(_a, ["color", "children", "isMinimized", "activeId", "setActiveId", "className"]);
4543
+ var minimizedState = isMinimized ? 'minimized' : 'maximized';
4544
+ var containerClass = cn("bg-bia-".concat(color), containerSizeConfig[minimizedState]);
4545
+ return (React.createElement("div", __assign({ ref: ref, className: cn('sidebar-container flex h-full flex-col justify-start py-[30px] overflow-hidden transition-[width,min-width] delay-200 ease-[cubic-bezier(0.68,-0.1,0.32,1.2)] duration-500', containerClass, className) }, restProps), React.Children.map(children, function (child) {
7801
4546
  return React.isValidElement(child)
7802
4547
  ? React.cloneElement(child, {
7803
4548
  isMinimized: isMinimized,
4549
+ activeId: activeId,
4550
+ setActiveId: setActiveId,
4551
+ color: color,
7804
4552
  })
7805
4553
  : child;
7806
4554
  })));
4555
+ });
4556
+ SidebarContainer.displayName = 'SidebarContainer';
4557
+
4558
+ var SidebarMenu = function (_a) {
4559
+ var _b = _a.color, color = _b === void 0 ? 'margueriteblue-dark-30' : _b, children = _a.children, _c = _a.isMinimized, isMinimized = _c === void 0 ? false : _c, _d = _a.activeId, activeId = _d === void 0 ? undefined : _d, _e = _a.setActiveId, setActiveId = _e === void 0 ? function () { } : _e;
4560
+ var _f = React.useState(false), isAllExpanded = _f[0], setIsAllExpanded = _f[1];
4561
+ var menuClass = "transition-sidebar-menu-menu h-[60px]";
4562
+ var minimizedMenuClass = isMinimized
4563
+ ? 'opacity-100 h-1 w-full delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
4564
+ : 'opacity-0 w-0 duration-200';
4565
+ return (React.createElement("div", null,
4566
+ React.createElement("div", { className: "relative flex w-full text-bia-white ".concat(menuClass) },
4567
+ React.createElement("div", { className: "absolute left-0 top-[27.5px] px-[17px] ".concat(minimizedMenuClass) },
4568
+ React.createElement("div", { className: "h-[1px] w-full bg-white" })),
4569
+ React.createElement("div", { className: "absolute bottom-[11px] flex w-full justify-between pl-[78px] pr-[25px]" },
4570
+ React.createElement(Text, { variant: "small-text", className: cn('truncate text-bia-white delay-[400ms]', isMinimized
4571
+ ? 'opacity-0 duration-300 ease-in-out'
4572
+ : 'opacity-75 delay-1000 duration-700 ease-in-out') }, "Menu"),
4573
+ React.createElement(ContextualButton, { onClick: function () { return setIsAllExpanded(function (prev) { return !prev; }); }, icon: React.createElement(TbChevronsDown, { className: cn('truncate text-bia-white delay-[400ms]', isMinimized
4574
+ ? 'opacity-0 duration-300 ease-in-out'
4575
+ : 'opacity-100 delay-1000 duration-700 ease-in-out'), size: 18 }), className: "ml-auto opacity-50 hover:opacity-100 ".concat(isAllExpanded ? 'rotate-180' : '') }))),
4576
+ React.Children.map(children, function (child) {
4577
+ return React.isValidElement(child)
4578
+ ? React.cloneElement(child, {
4579
+ isMinimized: isMinimized,
4580
+ activeId: activeId,
4581
+ setActiveId: setActiveId,
4582
+ color: color,
4583
+ isExpand: isAllExpanded,
4584
+ })
4585
+ : child;
4586
+ })));
7807
4587
  };
7808
4588
 
7809
4589
  var colorConfig = {
@@ -7860,7 +4640,7 @@ var colorUnion = [
7860
4640
  'custom',
7861
4641
  ];
7862
4642
  var sizeUnion = ['md', 'sm', 'tn'];
7863
- var variantUnion = ['label', 'icon', 'closeable'];
4643
+ var variantUnion = ['label', 'icon', 'closeable', 'monospace'];
7864
4644
  var TagLabel = function (_a) {
7865
4645
  var color = _a.color, _b = _a.size, size = _b === void 0 ? 'md' : _b, variant = _a.variant, closeHandler = _a.closeHandler, open = _a.open, text = _a.text, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon; _a.left; _a.right; var _c = _a.bgColor, bgColor = _c === void 0 ? 'grey-light-50' : _c, _d = _a.textColor, textColor = _d === void 0 ? 'black' : _d, outlineColor = _a.outlineColor, isBlock = _a.isBlock, maxWidth = _a.maxWidth, isDark = _a.isDark; _a.style; var props = __rest(_a, ["color", "size", "variant", "closeHandler", "open", "text", "leftIcon", "rightIcon", "left", "right", "bgColor", "textColor", "outlineColor", "isBlock", "maxWidth", "isDark", "style"]);
7866
4646
  var validatedColor = validUnion(color, colorUnion);
@@ -7896,7 +4676,9 @@ var TagLabel = function (_a) {
7896
4676
  : colorConfig[validatedColor];
7897
4677
  var blockclass = isBlock && validatedVariant !== 'icon' ? 'w-full' : "w-fit";
7898
4678
  var maxWidthStyle = !isBlock ? maxWidth + 'px' : '';
7899
- var textClass = isBlock ? 'text-center' : 'text-left';
4679
+ var alignTextClass = isBlock ? 'text-center' : 'text-left';
4680
+ var fontClass = validatedVariant === 'monospace' ? 'font-sans-code' : 'font-segoe pb-[1px]';
4681
+ var textClass = "".concat(alignTextClass, " ").concat(fontClass);
7900
4682
  var containerClass = "".concat(sizeClass, " ").concat(colorClass, " ").concat(roundedClass, " ").concat(isCloseableClass, " ").concat(blockclass);
7901
4683
  var closeColor = validatedColor === 'custom'
7902
4684
  ? isDark
@@ -7913,7 +4695,7 @@ var TagLabel = function (_a) {
7913
4695
  height: sizeCount + 'px',
7914
4696
  }, className: "flex items-center justify-center", ref: containerRef }, leftIcon ||
7915
4697
  (validatedVariant === 'icon' && (React.createElement(TbCheck, { className: defaultIconSize }))))),
7916
- validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate pb-[1px] ".concat(textClass) }, text)),
4698
+ validatedVariant !== 'icon' && text && (React.createElement("span", { className: "w-full truncate ".concat(textClass) }, text)),
7917
4699
  validatedVariant === 'label' && rightIcon && (React.createElement("div", { className: "block" },
7918
4700
  " ",
7919
4701
  rightIcon,
@@ -7937,45 +4719,250 @@ TagLabel.defaultProps = {
7937
4719
  isDark: false,
7938
4720
  };
7939
4721
 
7940
- var SidebarItem = function (_a) {
7941
- var title = _a.title, icon = _a.icon, _b = _a.active, active = _b === void 0 ? false : _b, onClick = _a.onClick, children = _a.children, _c = _a.isMinimized, isMinimized = _c === void 0 ? false : _c, _d = _a.isExpand, isExpand = _d === void 0 ? false : _d, notificationCount = _a.notificationCount, _e = _a.level, level = _e === void 0 ? 0 : _e;
7942
- var horizontalPadding = isMinimized ? 'px-[11px]' : 'pl-[30px] pr-[15px]';
7943
- var _f = React.useState(isExpand || false), isChildExpanded = _f[0], setIsChildExpanded = _f[1];
7944
- var hasChildren = !!children;
4722
+ var SidebarItem = React.forwardRef(function (_a, ref) {
4723
+ var id = _a.id, title = _a.title, icon = _a.icon; _a.active; var onClick = _a.onClick, children = _a.children, _c = _a.isMinimized, isMinimized = _c === void 0 ? false : _c, _d = _a.isExpand, isExpand = _d === void 0 ? false : _d, notificationCount = _a.notificationCount, _e = _a.level, level = _e === void 0 ? 0 : _e, _f = _a.activeId, activeId = _f === void 0 ? null : _f, _g = _a.setActiveId, setActiveId = _g === void 0 ? function () { } : _g, _h = _a.className, className = _h === void 0 ? '' : _h, _j = _a.color, color = _j === void 0 ? 'blue' : _j, restProps = __rest(_a, ["id", "title", "icon", "active", "onClick", "children", "isMinimized", "isExpand", "notificationCount", "level", "activeId", "setActiveId", "className", "color"]);
4724
+ var childDropdownRef = React.useRef(null);
4725
+ var _k = React.useState(isExpand), isChildExpanded = _k[0], setIsChildExpanded = _k[1];
4726
+ var childrenArray = React.Children.toArray(children);
4727
+ var hasChildren = childrenArray.length > 0;
4728
+ var nextLevel = Math.min(level + 1, 2);
4729
+ var isActive = activeId === id;
4730
+ var containerState = isMinimized ? 'minimized' : 'maximized';
4731
+ React.useEffect(function () {
4732
+ setIsChildExpanded(isExpand);
4733
+ }, [isExpand]);
4734
+ var isSidebarItemElement = function (node) {
4735
+ return React.isValidElement(node) && typeof node.props === 'object';
4736
+ };
4737
+ var collectChildIds = function (nodes) {
4738
+ return React.Children.toArray(nodes).reduce(function (result, node) {
4739
+ if (!isSidebarItemElement(node))
4740
+ return result;
4741
+ if (node.props.id)
4742
+ result.push(String(node.props.id));
4743
+ if (node.props.children)
4744
+ result.push.apply(result, collectChildIds(node.props.children));
4745
+ return result;
4746
+ }, []);
4747
+ };
4748
+ var sumNotificationCounts = function (nodes) {
4749
+ return React.Children.toArray(nodes).reduce(function (sum, node) {
4750
+ var _a;
4751
+ if (!isSidebarItemElement(node))
4752
+ return sum;
4753
+ var childSum = sumNotificationCounts(node.props.children);
4754
+ return sum + ((_a = node.props.notificationCount) !== null && _a !== void 0 ? _a : 0) + childSum;
4755
+ }, 0);
4756
+ };
4757
+ var nestedIds = collectChildIds(children);
4758
+ var isPathActive = nestedIds.some(function (nestedId) { return nestedId === activeId; });
4759
+ var notificationLabel = notificationCount !== undefined
4760
+ ? String(notificationCount)
4761
+ : String(sumNotificationCounts(children));
4762
+ var buttonIcon = React.isValidElement(icon)
4763
+ ? React.cloneElement(icon, {
4764
+ className: 'text-bia-white',
4765
+ size: '18',
4766
+ })
4767
+ : icon;
4768
+ var buttonClass = buttonConfig[level];
7945
4769
  var chevronClass = hasChildren ? 'inline-block' : 'hidden';
7946
- var nextLevel = level + 1;
7947
- var buttonClass = level === 1 ? 'pl-[30px]' : level === 2 ? 'pl-[68px]' : '';
7948
- var isGrandChild = level === 2;
7949
- return (React.createElement(React.Fragment, null,
7950
- React.createElement("div", { className: "sidebar-item relative flex h-fit items-center ".concat(horizontalPadding) },
7951
- isGrandChild && (React.createElement("div", { className: "relative left-[39px] h-full w-[1px] bg-bia-white" })),
4770
+ var itemClass = cn(itemConfig[containerState], isActive || isPathActive ? 'opacity-100' : 'opacity-75 hover:opacity-100', 'transition-sidebar-item');
4771
+ var overlayClass = cn(overlaySizeConfig[containerState], isActive ? 'opacity-15' : 'opacity-0 group-hover:opacity-[0.08]');
4772
+ var colorClass = "bg-bia-".concat(color);
4773
+ var renderChildren = function () {
4774
+ return React.Children.map(children, function (child) {
4775
+ return isSidebarItemElement(child)
4776
+ ? React.cloneElement(child, {
4777
+ level: nextLevel,
4778
+ activeId: activeId,
4779
+ setActiveId: setActiveId,
4780
+ isExpand: isExpand,
4781
+ })
4782
+ : child;
4783
+ });
4784
+ };
4785
+ var renderDropdownItems = function () {
4786
+ return childrenArray.filter(isSidebarItemElement).map(function (child) {
4787
+ var _a, _b, _c;
4788
+ var grandChildren = React.Children.toArray(child.props.children).filter(isSidebarItemElement);
4789
+ var childNotificationCount = grandChildren.length > 0
4790
+ ? sumNotificationCounts(child.props.children)
4791
+ : ((_a = child.props.notificationCount) !== null && _a !== void 0 ? _a : 0);
4792
+ return (React.createElement(DropdownItem, { key: (_b = child.props.id) !== null && _b !== void 0 ? _b : String((_c = child.key) !== null && _c !== void 0 ? _c : ''), content: React.createElement("div", { className: "relative" },
4793
+ child.props.title,
4794
+ isMinimized && childNotificationCount > 0 && (React.createElement("div", { className: "absolute -right-[8px] top-[2px] h-[6px] w-[6px] rounded-radius-full ".concat(colorClass) }))) }, grandChildren.length > 0 &&
4795
+ grandChildren.map(function (grandChild) {
4796
+ var _a, _b;
4797
+ return (React.createElement(DropdownItem, { key: (_a = grandChild.props.id) !== null && _a !== void 0 ? _a : String((_b = grandChild.key) !== null && _b !== void 0 ? _b : ''), content: React.createElement("div", { className: "flex justify-between gap-x-[11px]" },
4798
+ grandChild.props.title,
4799
+ grandChild.props.notificationCount ? (React.createElement(TagLabel, { text: String(grandChild.props.notificationCount), color: "custom", bgColor: color, textColor: "white", size: "tn" })) : null) }));
4800
+ })));
4801
+ });
4802
+ };
4803
+ return (React.createElement("div", { className: "relative" },
4804
+ React.createElement("div", { className: "absolute left-[33px] top-[3px] flex h-5 w-5 items-center justify-center" },
4805
+ React.createElement("div", { className: cn('rounded-radius-full bg-white', isMinimized && notificationCount === undefined
4806
+ ? sumNotificationCounts(children) > 0
4807
+ ? 'h-[6px] w-[6px] delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
4808
+ : 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]'
4809
+ : 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]') })),
4810
+ React.createElement("div", { className: cn('sidebar-item relative flex h-fit items-center', itemClass) },
4811
+ level === 2 && (React.createElement("div", { className: "relative left-[39px] h-full w-[1px] bg-bia-white" })),
7952
4812
  React.createElement("div", { className: "group relative grow" },
7953
- !isMinimized && (React.createElement("button", { onClick: function () {
7954
- if (hasChildren)
4813
+ React.createElement("button", __assign({ ref: ref }, restProps, { onClick: function () {
4814
+ if (hasChildren) {
7955
4815
  setIsChildExpanded(function (prev) { return !prev; });
7956
- else
4816
+ }
4817
+ else {
7957
4818
  onClick === null || onClick === void 0 ? void 0 : onClick();
7958
- }, className: "flex w-full min-w-fit grow items-center gap-x-2.5 p-2.5 ".concat(buttonClass) },
7959
- React.isValidElement(icon)
7960
- ? React.cloneElement(icon, {
7961
- className: 'text-bia-white',
7962
- size: '18',
7963
- })
7964
- : '',
7965
- React.createElement(Text, { variant: "normal-text", className: "text-bia-white" }, title),
7966
- React.createElement("div", { className: "ml-auto flex items-center gap-x-[5px]" },
7967
- notificationCount !== undefined ? (React.createElement(TagLabel, { text: String(notificationCount), color: "white", size: "tn" })) : (''),
7968
- React.createElement("button", { className: chevronClass }, isChildExpanded ? (React.createElement(TbChevronDown, { className: "text-bia-white", size: 18 })) : (React.createElement(TbChevronRight, { className: "text-bia-white", size: 18 })))))),
7969
- isMinimized && (React.createElement("button", { className: "flex items-center justify-center px-2.5 py-[11px] text-bia-white" }, icon)),
7970
- React.createElement("div", { className: "pointer-events-none absolute inset-0 rounded-radius-lg bg-black opacity-0 transition-opacity duration-200 group-hover:opacity-5 group-active:opacity-15" })),
7971
- active && (React.createElement("div", { className: "absolute right-0 ml-auto h-2/3 w-1 rounded-l-radius-md bg-bia-white" }))),
7972
- isChildExpanded &&
7973
- React.Children.map(children, function (child) {
7974
- return React.isValidElement(child)
7975
- ? React.cloneElement(child, { level: nextLevel })
7976
- : child;
4819
+ setActiveId(id);
4820
+ }
4821
+ }, className: cn('flex w-full items-center gap-x-5 p-2.5', buttonClass, className) }),
4822
+ level === 2 && (React.createElement("div", { className: "absolute left-[38px] h-full w-[1px] bg-bia-white" })),
4823
+ buttonIcon,
4824
+ React.createElement(Text, { variant: "normal-text", className: cn('truncate text-bia-white delay-[400ms]', isMinimized
4825
+ ? 'opacity-0 duration-300 ease-in-out'
4826
+ : 'opacity-100 delay-1000 duration-700 ease-in-out') }, title),
4827
+ React.createElement("div", { className: cn('ml-auto flex items-center gap-x-[5px]', isMinimized
4828
+ ? 'opacity-0 delay-200 duration-300 ease-in-out'
4829
+ : 'opacity-100 delay-[550ms] duration-500 ease-in-out') },
4830
+ (notificationCount !== undefined ||
4831
+ (!isChildExpanded &&
4832
+ sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, color: "white", size: "tn" })),
4833
+ React.createElement("div", { className: cn(chevronClass) },
4834
+ React.createElement(TbChevronRight, { className: cn('text-bia-white transition-transform duration-300 ease-in-out', isChildExpanded ? 'rotate-90' : ''), size: 18 })))),
4835
+ React.createElement("div", { className: cn('pointer-events-none absolute inset-0 rounded-radius-lg bg-black transition-opacity duration-200', overlayClass) })),
4836
+ isActive && (React.createElement("div", { className: "absolute right-0 ml-auto h-full w-1 rounded-l-radius-md bg-bia-white" }))),
4837
+ !isMinimized && hasChildren && isChildExpanded && renderChildren(),
4838
+ React.createElement("div", { className: "dropdown-anchor absolute left-[60px] top-0", ref: childDropdownRef }),
4839
+ isMinimized && hasChildren && (React.createElement(DropdownContainer, { open: isChildExpanded, onClose: function () { return setIsChildExpanded(false); }, anchorRef: childDropdownRef }, renderDropdownItems()))));
4840
+ });
4841
+ SidebarItem.displayName = 'SidebarItem';
4842
+
4843
+ var SidebarProfile = React.forwardRef(function (_a, ref) {
4844
+ var id = _a.id, username = _a.username, role = _a.role, avatarImg = _a.avatarImg; _a.active; var onClick = _a.onClick, children = _a.children, _c = _a.isMinimized, isMinimized = _c === void 0 ? false : _c, _d = _a.isExpand, isExpand = _d === void 0 ? false : _d, notificationCount = _a.notificationCount, _e = _a.activeId, activeId = _e === void 0 ? null : _e, _f = _a.setActiveId, setActiveId = _f === void 0 ? function () { } : _f, _g = _a.className, className = _g === void 0 ? '' : _g, _h = _a.color, color = _h === void 0 ? 'blue' : _h, restProps = __rest(_a, ["id", "username", "role", "avatarImg", "active", "onClick", "children", "isMinimized", "isExpand", "notificationCount", "activeId", "setActiveId", "className", "color"]);
4845
+ var childDropdownRef = React.useRef(null);
4846
+ var _j = React.useState(isExpand), isChildExpanded = _j[0], setIsChildExpanded = _j[1];
4847
+ var childrenArray = React.Children.toArray(children);
4848
+ var hasChildren = childrenArray.length > 0;
4849
+ var isActive = activeId === id;
4850
+ var containerState = isMinimized ? 'minimized' : 'maximized';
4851
+ var isSidebarProfileElement = function (node) {
4852
+ return React.isValidElement(node) && typeof node.props === 'object';
4853
+ };
4854
+ var collectChildIds = function (nodes) {
4855
+ return React.Children.toArray(nodes).reduce(function (result, node) {
4856
+ if (!isSidebarProfileElement(node))
4857
+ return result;
4858
+ if (node.props.id)
4859
+ result.push(String(node.props.id));
4860
+ if (node.props.children)
4861
+ result.push.apply(result, collectChildIds(node.props.children));
4862
+ return result;
4863
+ }, []);
4864
+ };
4865
+ var sumNotificationCounts = function (nodes) {
4866
+ return React.Children.toArray(nodes).reduce(function (sum, node) {
4867
+ var _a;
4868
+ if (!isSidebarProfileElement(node))
4869
+ return sum;
4870
+ var childSum = sumNotificationCounts(node.props.children);
4871
+ return sum + ((_a = node.props.notificationCount) !== null && _a !== void 0 ? _a : 0) + childSum;
4872
+ }, 0);
4873
+ };
4874
+ var nestedIds = collectChildIds(children);
4875
+ var isPathActive = nestedIds.some(function (nestedId) { return nestedId === activeId; });
4876
+ var notificationLabel = notificationCount !== undefined
4877
+ ? String(notificationCount)
4878
+ : String(sumNotificationCounts(children));
4879
+ var avatarImage = React.isValidElement(avatarImg)
4880
+ ? React.cloneElement(avatarImg, {
4881
+ className: 'text-bia-white',
4882
+ size: 36,
4883
+ })
4884
+ : avatarImg;
4885
+ var profileSizeConfig = {
4886
+ maximized: 'p-2.5',
4887
+ minimized: 'px-[6px] py-2.5',
4888
+ };
4889
+ var buttonClass = "".concat(buttonConfig[0], " ").concat(profileSizeConfig[containerState]);
4890
+ var chevronClass = hasChildren ? 'inline-block' : 'hidden';
4891
+ var profileClass = cn(profileConfig[containerState], 'transition-sidebar-item');
4892
+ var overlayClass = cn(overlaySizeConfig[containerState], isActive ? 'opacity-15' : 'opacity-0 group-hover:opacity-[0.08]');
4893
+ var colorClass = "bg-bia-".concat(color);
4894
+ var renderChildren = function () {
4895
+ return React.Children.map(children, function (child) {
4896
+ return isSidebarProfileElement(child)
4897
+ ? React.cloneElement(child, {
4898
+ activeId: activeId,
4899
+ setActiveId: setActiveId,
4900
+ })
4901
+ : child;
4902
+ });
4903
+ };
4904
+ var renderDropdownItems = function () {
4905
+ return childrenArray.filter(isSidebarProfileElement).map(function (child) {
4906
+ var _a, _b, _c;
4907
+ var grandChildren = React.Children.toArray(child.props.children).filter(isSidebarProfileElement);
4908
+ var childNotificationCount = grandChildren.length > 0
4909
+ ? sumNotificationCounts(child.props.children)
4910
+ : ((_a = child.props.notificationCount) !== null && _a !== void 0 ? _a : 0);
4911
+ return (React.createElement(DropdownItem, { key: (_b = child.props.id) !== null && _b !== void 0 ? _b : String((_c = child.key) !== null && _c !== void 0 ? _c : ''), content: React.createElement("div", { className: "relative" },
4912
+ child.props.title,
4913
+ isMinimized && childNotificationCount > 0 && (React.createElement("div", { className: "absolute -right-[8px] top-[2px] h-[6px] w-[6px] rounded-radius-full ".concat(colorClass) }))) }, grandChildren.map(function (grandChild) {
4914
+ var _a, _b;
4915
+ return (React.createElement(DropdownItem, { key: (_a = grandChild.props.id) !== null && _a !== void 0 ? _a : String((_b = grandChild.key) !== null && _b !== void 0 ? _b : ''), content: React.createElement("div", { className: "flex justify-between gap-x-[11px]" },
4916
+ grandChild.props.title,
4917
+ grandChild.props.notificationCount ? (React.createElement(TagLabel, { text: String(grandChild.props.notificationCount), color: "custom", bgColor: color, textColor: "white", size: "tn" })) : null) }));
7977
4918
  })));
7978
- };
4919
+ });
4920
+ };
4921
+ return (React.createElement("div", { className: "relative" },
4922
+ React.createElement("div", { className: "absolute left-[33px] top-[3px] flex h-5 w-5 items-center justify-center" },
4923
+ React.createElement("div", { className: cn('rounded-radius-full bg-white', isMinimized && notificationCount === undefined
4924
+ ? sumNotificationCounts(children) > 0
4925
+ ? 'h-[6px] w-[6px] delay-[600ms] duration-300 ease-[cubic-bezier(0.68,-0.1,0.32,2)]'
4926
+ : 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]'
4927
+ : 'h-0 w-0 duration-500 ease-[cubic-bezier(0.32,-1,0.68,1)]') })),
4928
+ React.createElement("div", { className: cn('sidebar-item relative flex h-fit items-center group/profile', profileClass) },
4929
+ React.createElement("div", { className: "group relative grow" },
4930
+ React.createElement("button", __assign({ ref: ref }, restProps, { onClick: function () {
4931
+ if (hasChildren) {
4932
+ setIsChildExpanded(function (prev) { return !prev; });
4933
+ }
4934
+ else {
4935
+ onClick === null || onClick === void 0 ? void 0 : onClick();
4936
+ setActiveId(id);
4937
+ }
4938
+ }, className: cn('cubic-bezier(0.68, -0.1, 0.32, 1.2) flex w-full items-center gap-x-2.5 delay-500 duration-300', buttonClass, className) }),
4939
+ avatarImage,
4940
+ React.createElement("div", { className: "flex flex-col" },
4941
+ React.createElement(Text, { variant: "normal-text", className: cn('truncate text-bia-white delay-[400ms]', isMinimized
4942
+ ? 'opacity-0 duration-300 ease-in-out'
4943
+ : 'opacity-100 delay-1000 duration-700 ease-in-out') }, username),
4944
+ React.createElement(Text, { variant: "small-text", className: cn('truncate text-left text-bia-white delay-[400ms]', isMinimized
4945
+ ? 'opacity-0 duration-300 ease-in-out'
4946
+ : 'opacity-50 delay-1000 duration-700 ease-in-out') }, role)),
4947
+ React.createElement("div", { className: cn('ml-auto flex items-center gap-x-[5px]', isMinimized
4948
+ ? 'opacity-0 delay-200 duration-300 ease-in-out'
4949
+ : 'opacity-100 delay-[550ms] duration-500 ease-in-out') },
4950
+ (notificationCount !== undefined ||
4951
+ (!isChildExpanded &&
4952
+ sumNotificationCounts(children) > 0)) && (React.createElement(TagLabel, { text: notificationLabel, className: isActive || isPathActive
4953
+ ? 'opacity-100'
4954
+ : 'opacity-75 group-hover/profile:opacity-100', color: "white", size: "tn" })),
4955
+ React.createElement("div", { className: cn(chevronClass) },
4956
+ React.createElement(TbChevronRight, { className: cn('text-bia-white transition-transform duration-300 ease-in-out', isChildExpanded ? 'rotate-90' : '', isActive || isPathActive
4957
+ ? 'opacity-100'
4958
+ : 'opacity-75 group-hover/profile:opacity-100'), size: 18 })))),
4959
+ React.createElement("div", { className: cn('pointer-events-none absolute inset-0 rounded-radius-lg bg-black transition-opacity duration-200', overlayClass) })),
4960
+ isActive && (React.createElement("div", { className: "absolute right-0 ml-auto h-full w-1 rounded-l-radius-md bg-bia-white" }))),
4961
+ !isMinimized && hasChildren && isChildExpanded && renderChildren(),
4962
+ React.createElement("div", { className: "dropdown-anchor absolute left-[60px] top-0", ref: childDropdownRef }),
4963
+ isMinimized && hasChildren && (React.createElement(DropdownContainer, { open: isChildExpanded, onClose: function () { return setIsChildExpanded(false); }, anchorRef: childDropdownRef }, renderDropdownItems()))));
4964
+ });
4965
+ SidebarProfile.displayName = 'SidebarProfile';
7979
4966
 
7980
4967
  function Slider(_a) {
7981
4968
  var disabled = _a.disabled;
@@ -8123,6 +5110,16 @@ var TabMenu = React.forwardRef(function (props, ref) {
8123
5110
  });
8124
5111
  TabMenu.displayName = 'TabMenu';
8125
5112
 
5113
+ var Table = function (_a) {
5114
+ var children = _a.children, rest = __rest(_a, ["children"]);
5115
+ return React.createElement("table", __assign({}, rest), children);
5116
+ };
5117
+
5118
+ var TableBody = function (_a) {
5119
+ var children = _a.children, rest = __rest(_a, ["children"]);
5120
+ return React.createElement("tbody", __assign({}, rest), children);
5121
+ };
5122
+
8126
5123
  var sizeConfig = {
8127
5124
  md: 'px-2.5 py-[9px]',
8128
5125
  sm: 'px-2.5 py-[7px]',
@@ -8157,6 +5154,87 @@ TableCell.defaultProps = {
8157
5154
  variant: 'body',
8158
5155
  };
8159
5156
 
5157
+ var TableHead = function (_a) {
5158
+ var children = _a.children, rest = __rest(_a, ["children"]);
5159
+ return React.createElement("thead", __assign({}, rest), children);
5160
+ };
5161
+
5162
+ var TableRow = function (_a) {
5163
+ _a.variant; var children = _a.children, rest = __rest(_a, ["variant", "children"]);
5164
+ return React.createElement("tr", __assign({}, rest), children);
5165
+ };
5166
+
5167
+ var BlockLoading = function (_a) {
5168
+ var _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.backgroundColor, backgroundColor = _c === void 0 ? 'bg-bia-grey-light-80' : _c;
5169
+ return (React.createElement("div", { className: "block-loading flex h-full w-full items-center justify-center ".concat(backgroundColor, " ").concat(className) },
5170
+ React.createElement(Spinner, null)));
5171
+ };
5172
+
5173
+ var EmptyIcon = "Empty.svg";
5174
+
5175
+ var EmptyTable = function (_a) {
5176
+ var content = _a.content, subContent = _a.subContent;
5177
+ [
5178
+ React.createElement(ContextualButton, { key: "refresh", icon: React.createElement(TbRefresh, { size: 18 }), disabled: true }),
5179
+ React.createElement(ContextualButton, { key: "zoom", icon: React.createElement(TbZoom, { size: 18 }), disabled: true }),
5180
+ ];
5181
+ return (React.createElement("div", { className: "h-[368px] w-full rounded-b-radius-lg bg-bia-grey-light-80 pb-[63px]" },
5182
+ React.createElement("div", { className: "mb-[63px] grid h-[30px] w-full grid-cols-7 items-center gap-20 border-b border-bia-grey px-[60px]" },
5183
+ React.createElement("div", { className: "col-span-1 h-2 rounded-radius-sm bg-bia-grey-light-50" }),
5184
+ React.createElement("div", { className: "col-span-2 h-2 rounded-radius-sm bg-bia-grey-light-50" }),
5185
+ React.createElement("div", { className: "col-span-2 h-2 rounded-radius-sm bg-bia-grey-light-50" }),
5186
+ React.createElement("div", { className: "col-span-2 h-2 rounded-radius-sm bg-bia-grey-light-50" })),
5187
+ React.createElement("div", { className: "flex flex-col items-center justify-center rounded-md p-5" },
5188
+ React.createElement("img", { src: EmptyIcon, alt: "Empty State", style: { height: 72, width: 72 } }),
5189
+ React.createElement("div", { className: "mt-5 text-center" },
5190
+ content && (React.createElement(Text, { variant: 'small-text-semibold', extended: "block text-bia-black" }, content)),
5191
+ subContent && (React.createElement(Text, { variant: "small-text", extended: "mt-2 block text-bia-coolgrey'}" }, subContent))))));
5192
+ };
5193
+
5194
+ var tableSizeOption = [10, 20, 50, 100, 999];
5195
+ var TableFooterController = function (_a) {
5196
+ var currentPage = _a.currentPage, totalPages = _a.totalPages, pageSize = _a.pageSize, setCurrentPage = _a.setCurrentPage, setPageSize = _a.setPageSize, isLoading = _a.isLoading;
5197
+ // Table Button
5198
+ var tableSizeRef = React.useRef(null);
5199
+ var _b = React.useState(false), isShownTableSizeDropdown = _b[0], setIsShownTableSizeDropdown = _b[1];
5200
+ var handlePageSizeChange = function (size) {
5201
+ setPageSize(size);
5202
+ setCurrentPage(1);
5203
+ };
5204
+ var pageSizeDisplay = pageSize === 999 ? 'All' : pageSize;
5205
+ var tableSizeDropdown = (React.createElement(DropdownContainer, { open: isShownTableSizeDropdown, anchorRef: tableSizeRef, onClose: function () { return setIsShownTableSizeDropdown(false); }, onClickItem: function (e, val) { return handlePageSizeChange(val); }, size: "sm" }, tableSizeOption.map(function (value) {
5206
+ var displayValue = value === 999 ? 'All' : value;
5207
+ return React.createElement(DropdownItem, { key: value, content: displayValue, value: value });
5208
+ })));
5209
+ return (React.createElement("div", { className: "table-controller-footer flex w-full justify-between gap-[5px] rounded-b-radius-lg border-t border-bia-grey bg-bia-grey-light-80 px-2.5 pb-[7px] pt-2" },
5210
+ React.createElement("div", { className: "action-container flex gap-[5px]" }, totalPages > 0 && (React.createElement(PaginationBar, { size: "sm", currentPage: currentPage, totalPages: totalPages, onPageChange: setCurrentPage, position: 'center' }))),
5211
+ React.createElement(Button, { ref: tableSizeRef, label: pageSizeDisplay, minWidth: 0, size: "sm", iconRight: React.createElement(TbChevronDown, { size: 14 }), onClick: function () { return setIsShownTableSizeDropdown(function (oldState) { return !oldState; }); }, disabled: isLoading, className: "w-fit" }),
5212
+ tableSizeDropdown));
5213
+ };
5214
+
5215
+ var TableHeaderController = function (_a) {
5216
+ var buttonActions = _a.buttonActions, totalData = _a.totalData, firstIndex = _a.firstIndex, lastIndex = _a.lastIndex;
5217
+ var isShowHelperText = totalData || firstIndex || lastIndex;
5218
+ return (React.createElement("div", { className: "table-controller-header flex w-full justify-between rounded-t-radius-lg border-b border-bia-grey bg-bia-grey-light-80 px-2.5 pb-[7px] pt-2" },
5219
+ React.createElement("div", { className: "action-container flex grow gap-[5px] pe-2.5" }, buttonActions && (buttonActions === null || buttonActions === void 0 ? void 0 : buttonActions.map(function (button) { return button; }))),
5220
+ isShowHelperText && (React.createElement("div", { className: "flex max-h-[22px] items-center font-segoe" },
5221
+ React.createElement(Text, { variant: "small-text", className: "text-bia-coolgrey" },
5222
+ "View ",
5223
+ lastIndex === 0 ? 0 : firstIndex,
5224
+ " - ",
5225
+ lastIndex,
5226
+ ' ',
5227
+ totalData ? "of ".concat(totalData) : '')))));
5228
+ };
5229
+
5230
+ var TableSearchInput = function (_a) {
5231
+ var isShow = _a.isShow, value = _a.value, onChange = _a.onChange, _b = _a.placeholder, placeholder = _b === void 0 ? 'Search Data' : _b;
5232
+ if (!isShow)
5233
+ return null;
5234
+ return (React.createElement("div", { className: "flex max-h-[22px] w-full items-center gap-x-1 pb-1 ps-[5px] font-segoe " },
5235
+ React.createElement(TextInput, { size: "sm", variant: "text-transparent", className: "w-full bg-transparent text-size-sm focus:border-bia-grey focus:outline-none focus:ring-0", placeholder: placeholder, value: value, onChange: onChange, autoFocus: true })));
5236
+ };
5237
+
8160
5238
  var colorConfigs = {
8161
5239
  default: 'bg-bia-black',
8162
5240
  info: 'bg-bia-teal',
@@ -8283,6 +5361,125 @@ function getRelativeTime(date) {
8283
5361
  return "".concat(Math.floor(diffMs / year), " years ago");
8284
5362
  }
8285
5363
 
5364
+ /**
5365
+ * A custom hook to handle data processing for tables, managing internal states
5366
+ * for client-side filtering (searching) and sorting. It can also safely yield control
5367
+ * to server-side operations if configured.
5368
+ *
5369
+ * ### Key Features:
5370
+ * - **Automatic Key Detection:** Automatically finds string fields to search if no `searchKeys` are provided.
5371
+ * - **Smart Sorting:** Uses `localeCompare` for strings, standard operators for numbers, and gracefully handles `null`/`undefined` values by moving them to the bottom.
5372
+ * - **Server-Side Ready:** Setting `isServerSide: true` disables internal processing while preserving handlers for external API synchronization.
5373
+ *
5374
+ * @param {any[]} initialData - The raw array of data/rows to be displayed in the table.
5375
+ * @param {UseTableDataOptions} [options={}] - Optional configuration flags and initial states.
5376
+ * * @returns {Object} Table state and control handlers.
5377
+ * @returns {any[]} data - The processed array (filtered and sorted) ready for rendering.
5378
+ * @returns {string} searchTerm - The current text being filtered against.
5379
+ * @returns {string|undefined} sortKey - The current object key being used to sort.
5380
+ * @returns {SortOrder} sortOrder - The current direction of the sort ('asc' or 'desc').
5381
+ * @returns {(value: string) => void} handleSearchChange - Callback to update the search filter string.
5382
+ * @returns {(key: string) => void} handleSortChange - Callback to trigger sorting on a specific column. Toggles direction if called on the same column consecutively.
5383
+ *
5384
+ * @example
5385
+ * const { data, handleSearchChange, handleSortChange } = useTableDataHandler(users, {
5386
+ * searchKeys: ['name', 'email'],
5387
+ * initialSortKey: 'name'
5388
+ * });
5389
+ */
5390
+ var useTableDataHandler = function (initialData, options) {
5391
+ if (options === void 0) { options = {}; }
5392
+ var _a = options.isFilterable, isFilterable = _a === void 0 ? true : _a, _b = options.isSortable, isSortable = _b === void 0 ? true : _b, _c = options.isServerSide, isServerSide = _c === void 0 ? false : _c, configSearchKeys = options.searchKeys, initialSortKey = options.initialSortKey, _d = options.initialSortOrder, initialSortOrder = _d === void 0 ? 'asc' : _d;
5393
+ // ---- STATE ----
5394
+ var _e = React.useState(''), searchTerm = _e[0], setSearchTerm = _e[1];
5395
+ var _f = React.useState(initialSortKey), sortKey = _f[0], setSortKey = _f[1];
5396
+ var _g = React.useState(initialSortOrder), sortOrder = _g[0], setSortOrder = _g[1];
5397
+ var searchKeys = React.useMemo(function () {
5398
+ if (isServerSide || !isFilterable)
5399
+ return [];
5400
+ if (configSearchKeys && configSearchKeys.length > 0)
5401
+ return configSearchKeys;
5402
+ if (initialData && initialData.length > 0) {
5403
+ var allKeys = Object.keys(initialData[0]);
5404
+ return allKeys.filter(function (key) { return typeof initialData[0][key] === 'string'; });
5405
+ }
5406
+ return [];
5407
+ }, [initialData, configSearchKeys, isFilterable, isServerSide]);
5408
+ var processedData = React.useMemo(function () {
5409
+ if (!initialData)
5410
+ return [];
5411
+ if (isServerSide)
5412
+ return initialData;
5413
+ var result = __spreadArray([], initialData, true);
5414
+ // Client-Side Filter
5415
+ if (isFilterable && searchTerm && searchKeys.length > 0) {
5416
+ var keyword_1 = searchTerm.toLowerCase();
5417
+ result = result.filter(function (item) {
5418
+ return searchKeys.some(function (key) {
5419
+ var itemValue = item[key];
5420
+ return (typeof itemValue === 'string' &&
5421
+ itemValue.toLowerCase().includes(keyword_1));
5422
+ });
5423
+ });
5424
+ }
5425
+ // Client-Side Sort
5426
+ if (isSortable && sortKey) {
5427
+ var direction_1 = sortOrder === 'asc' ? 1 : -1;
5428
+ result.sort(function (a, b) {
5429
+ var valueA = a[sortKey];
5430
+ var valueB = b[sortKey];
5431
+ var isNullA = valueA === null || valueA === undefined || valueA === '';
5432
+ var isNullB = valueB === null || valueB === undefined || valueB === '';
5433
+ if (isNullA && isNullB)
5434
+ return 0;
5435
+ if (isNullA)
5436
+ return direction_1 === 1 ? 1 : -1;
5437
+ if (isNullB)
5438
+ return direction_1 === 1 ? -1 : 1;
5439
+ if (typeof valueA === 'string' && typeof valueB === 'string') {
5440
+ return (valueA.localeCompare(valueB, undefined, { sensitivity: 'base' }) *
5441
+ direction_1);
5442
+ }
5443
+ return valueA < valueB ? -1 * direction_1 : 1 * direction_1;
5444
+ });
5445
+ }
5446
+ return result;
5447
+ }, [
5448
+ initialData,
5449
+ searchTerm,
5450
+ searchKeys,
5451
+ sortKey,
5452
+ sortOrder,
5453
+ isFilterable,
5454
+ isSortable,
5455
+ isServerSide,
5456
+ ]);
5457
+ // HANDLERS
5458
+ var handleSearchChange = function (value) {
5459
+ if (isFilterable)
5460
+ setSearchTerm(value);
5461
+ };
5462
+ var handleSortChange = function (key) {
5463
+ if (!isSortable)
5464
+ return;
5465
+ if (sortKey === key) {
5466
+ setSortOrder(function (prev) { return (prev === 'asc' ? 'desc' : 'asc'); });
5467
+ }
5468
+ else {
5469
+ setSortKey(key);
5470
+ setSortOrder('asc');
5471
+ }
5472
+ };
5473
+ return {
5474
+ data: processedData,
5475
+ searchTerm: isFilterable ? searchTerm : '',
5476
+ sortKey: isSortable ? sortKey : undefined,
5477
+ sortOrder: isSortable ? sortOrder : 'asc',
5478
+ handleSearchChange: handleSearchChange,
5479
+ handleSortChange: handleSortChange,
5480
+ };
5481
+ };
5482
+
8286
5483
  exports.Accordions = Accordions;
8287
5484
  exports.Alert = Alert;
8288
5485
  exports.Avatar = Avatar;
@@ -8311,6 +5508,7 @@ exports.BCStack = Stack;
8311
5508
  exports.BCVirtualPort = VirtualPort;
8312
5509
  exports.Badge = Badge;
8313
5510
  exports.Banner = Banner;
5511
+ exports.BlockLoading = BlockLoading;
8314
5512
  exports.Brand = Brand;
8315
5513
  exports.Breadcrumb = Breadcrumb;
8316
5514
  exports.Button = Button;
@@ -8325,6 +5523,7 @@ exports.Display = Display;
8325
5523
  exports.Divider = Divider;
8326
5524
  exports.DropdownContainer = DropdownContainer;
8327
5525
  exports.DropdownItem = DropdownItem;
5526
+ exports.EmptyTable = EmptyTable;
8328
5527
  exports.FileTree = FileTree;
8329
5528
  exports.FormGroup = FormGroup;
8330
5529
  exports.FormGroupButton = FormGroupButton;
@@ -8353,11 +5552,20 @@ exports.SegmentButtonItem = SegmentButtonItem;
8353
5552
  exports.SelectInput = SelectInput;
8354
5553
  exports.SidebarContainer = SidebarContainer;
8355
5554
  exports.SidebarItem = SidebarItem;
5555
+ exports.SidebarMenu = SidebarMenu;
5556
+ exports.SidebarProfile = SidebarProfile;
8356
5557
  exports.Slider = Slider;
8357
5558
  exports.Spinner = Spinner;
8358
5559
  exports.Tab = Tab;
8359
5560
  exports.TabMenu = TabMenu;
5561
+ exports.Table = Table;
5562
+ exports.TableBody = TableBody;
8360
5563
  exports.TableCell = TableCell;
5564
+ exports.TableFooterController = TableFooterController;
5565
+ exports.TableHead = TableHead;
5566
+ exports.TableHeaderController = TableHeaderController;
5567
+ exports.TableRow = TableRow;
5568
+ exports.TableSearchInput = TableSearchInput;
8361
5569
  exports.TagLabel = TagLabel;
8362
5570
  exports.Text = Text;
8363
5571
  exports.TextArea = TextArea;
@@ -8370,3 +5578,4 @@ exports.VerticalStepper = StepperItem;
8370
5578
  exports.Window = Window;
8371
5579
  exports.getRelativeTime = getRelativeTime;
8372
5580
  exports.useFileTree = useFileTree;
5581
+ exports.useTableDataHandler = useTableDataHandler;