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