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