@react-hive/honey-style 5.2.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -0
- package/dist/css/unwrap-params.d.ts +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.dev.cjs +90 -65
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/mount-style.d.ts +0 -9
- package/dist/utils.d.ts +1 -1
- package/package.json +8 -27
package/dist/index.dev.cjs
CHANGED
|
@@ -392,6 +392,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
392
392
|
/* harmony export */ HONEY_GLOBAL_STYLE_ATTR: () => (/* binding */ HONEY_GLOBAL_STYLE_ATTR),
|
|
393
393
|
/* harmony export */ HONEY_STYLED_COMPONENT_ID_PROP: () => (/* binding */ HONEY_STYLED_COMPONENT_ID_PROP),
|
|
394
394
|
/* harmony export */ HONEY_STYLE_ATTR: () => (/* binding */ HONEY_STYLE_ATTR),
|
|
395
|
+
/* harmony export */ HONEY_STYLE_PRIORITY_ATTR: () => (/* binding */ HONEY_STYLE_PRIORITY_ATTR),
|
|
396
|
+
/* harmony export */ HONEY_STYLE_REGISTRY_SYMBOL: () => (/* binding */ HONEY_STYLE_REGISTRY_SYMBOL),
|
|
395
397
|
/* harmony export */ VALID_DOM_ELEMENT_ATTRS: () => (/* binding */ VALID_DOM_ELEMENT_ATTRS),
|
|
396
398
|
/* harmony export */ __DEV__: () => (/* binding */ __DEV__)
|
|
397
399
|
/* harmony export */ });
|
|
@@ -401,9 +403,11 @@ if (__DEV__) {
|
|
|
401
403
|
console.info('[@react-hive/honey-style]: You are running in development mode. ' +
|
|
402
404
|
'This build is not optimized for production and may include extra checks or logs.');
|
|
403
405
|
}
|
|
406
|
+
const HONEY_STYLE_REGISTRY_SYMBOL = Symbol.for('honey-style-registry');
|
|
404
407
|
const HONEY_STYLED_COMPONENT_ID_PROP = '$$ComponentId';
|
|
405
408
|
const HONEY_GLOBAL_STYLE_ATTR = 'data-honey-global-style';
|
|
406
409
|
const HONEY_STYLE_ATTR = 'data-honey-style';
|
|
410
|
+
const HONEY_STYLE_PRIORITY_ATTR = 'data-priority';
|
|
407
411
|
const HONEY_BREAKPOINTS = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
408
412
|
const VALID_HTML_ATTRS = new Set([
|
|
409
413
|
// Standard Attributes
|
|
@@ -725,7 +729,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
725
729
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
726
730
|
/* harmony export */ mediaQuery: () => (/* binding */ mediaQuery)
|
|
727
731
|
/* harmony export */ });
|
|
728
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
732
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
729
733
|
|
|
730
734
|
/**
|
|
731
735
|
* Constructs a complete `@media` query string from an array of media rule objects.
|
|
@@ -783,7 +787,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
783
787
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
784
788
|
/* harmony export */ compileCss: () => (/* binding */ compileCss)
|
|
785
789
|
/* harmony export */ });
|
|
786
|
-
/* harmony import */ var _react_hive_honey_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-css */ "./node_modules/.pnpm/@react-hive+honey-css@1.
|
|
790
|
+
/* harmony import */ var _react_hive_honey_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-css */ "./node_modules/.pnpm/@react-hive+honey-css@1.17.0/node_modules/@react-hive/honey-css/dist/index.mjs");
|
|
787
791
|
/* harmony import */ var _flatten_css_rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./flatten-css-rules */ "./src/css/flatten-css-rules.ts");
|
|
788
792
|
|
|
789
793
|
|
|
@@ -1054,7 +1058,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1054
1058
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1055
1059
|
/* harmony export */ createSpacingTransformer: () => (/* binding */ createSpacingTransformer)
|
|
1056
1060
|
/* harmony export */ });
|
|
1057
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
1061
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
1058
1062
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/css/constants.ts");
|
|
1059
1063
|
/* harmony import */ var _resolve_spacing_value__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resolve-spacing-value */ "./src/css/resolve-spacing-value.ts");
|
|
1060
1064
|
|
|
@@ -1112,7 +1116,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1112
1116
|
/* harmony export */ createCssRule: () => (/* binding */ createCssRule),
|
|
1113
1117
|
/* harmony export */ css: () => (/* binding */ css)
|
|
1114
1118
|
/* harmony export */ });
|
|
1115
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
1119
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
1116
1120
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./src/constants.ts");
|
|
1117
1121
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./src/utils.ts");
|
|
1118
1122
|
|
|
@@ -1157,7 +1161,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1157
1161
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1158
1162
|
/* harmony export */ flattenCssRules: () => (/* binding */ flattenCssRules)
|
|
1159
1163
|
/* harmony export */ });
|
|
1160
|
-
/* harmony import */ var _react_hive_honey_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-css */ "./node_modules/.pnpm/@react-hive+honey-css@1.
|
|
1164
|
+
/* harmony import */ var _react_hive_honey_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-css */ "./node_modules/.pnpm/@react-hive+honey-css@1.17.0/node_modules/@react-hive/honey-css/dist/index.mjs");
|
|
1161
1165
|
|
|
1162
1166
|
const SELECTOR_CONTEXT_AT_RULES = {
|
|
1163
1167
|
media: true,
|
|
@@ -1262,7 +1266,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1262
1266
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1263
1267
|
/* harmony export */ processCss: () => (/* binding */ processCss)
|
|
1264
1268
|
/* harmony export */ });
|
|
1265
|
-
/* harmony import */ var _react_hive_honey_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-css */ "./node_modules/.pnpm/@react-hive+honey-css@1.
|
|
1269
|
+
/* harmony import */ var _react_hive_honey_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-css */ "./node_modules/.pnpm/@react-hive+honey-css@1.17.0/node_modules/@react-hive/honey-css/dist/index.mjs");
|
|
1266
1270
|
/* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./css */ "./src/css/css.ts");
|
|
1267
1271
|
/* harmony import */ var _compile_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compile-css */ "./src/css/compile-css.ts");
|
|
1268
1272
|
/* harmony import */ var _transform_absolute_fill_at_rule__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./transform-absolute-fill-at-rule */ "./src/css/transform-absolute-fill-at-rule.ts");
|
|
@@ -1599,11 +1603,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1599
1603
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1600
1604
|
/* harmony export */ unwrapParams: () => (/* binding */ unwrapParams)
|
|
1601
1605
|
/* harmony export */ });
|
|
1602
|
-
const unwrapParams = (
|
|
1603
|
-
if (!
|
|
1606
|
+
const unwrapParams = (input) => {
|
|
1607
|
+
if (!input) {
|
|
1604
1608
|
return '';
|
|
1605
1609
|
}
|
|
1606
|
-
const trimmed =
|
|
1610
|
+
const trimmed = input.trim();
|
|
1607
1611
|
if (trimmed.startsWith('(') && trimmed.endsWith(')')) {
|
|
1608
1612
|
return trimmed.slice(1, -1).trim();
|
|
1609
1613
|
}
|
|
@@ -1687,7 +1691,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1687
1691
|
/* harmony export */ });
|
|
1688
1692
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1689
1693
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1690
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
1694
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
1691
1695
|
/* harmony import */ var _contexts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../contexts */ "./src/contexts/index.ts");
|
|
1692
1696
|
|
|
1693
1697
|
|
|
@@ -1713,49 +1717,73 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1713
1717
|
/* harmony export */ });
|
|
1714
1718
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
|
|
1715
1719
|
|
|
1716
|
-
/**
|
|
1717
|
-
* Global style registry, shared across reloads and modules.
|
|
1718
|
-
*/
|
|
1719
1720
|
const getStyleRegistry = () => {
|
|
1720
|
-
|
|
1721
|
-
|
|
1721
|
+
const w = window;
|
|
1722
|
+
if (!w[_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_REGISTRY_SYMBOL]) {
|
|
1723
|
+
w[_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_REGISTRY_SYMBOL] = new Map();
|
|
1722
1724
|
}
|
|
1723
|
-
return
|
|
1725
|
+
return w[_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_REGISTRY_SYMBOL];
|
|
1724
1726
|
};
|
|
1725
1727
|
const styleRegistry = getStyleRegistry();
|
|
1726
|
-
let globalStyleTag = null;
|
|
1727
1728
|
/**
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1730
|
-
* @returns The <style> element.
|
|
1729
|
+
* Cache style tags per priority
|
|
1731
1730
|
*/
|
|
1732
|
-
const
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
if (!globalStyleTag) {
|
|
1736
|
-
globalStyleTag = document.createElement('style');
|
|
1737
|
-
globalStyleTag.setAttribute(_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_ATTR, 'true');
|
|
1738
|
-
document.head.appendChild(globalStyleTag);
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
return globalStyleTag;
|
|
1742
|
-
};
|
|
1731
|
+
const styleTagsByPriority = new Map();
|
|
1732
|
+
const pendingStyleUpdatePriorities = new Set();
|
|
1733
|
+
let isStyleUpdateScheduled = false;
|
|
1743
1734
|
/**
|
|
1744
|
-
*
|
|
1735
|
+
* Ensures a <style> tag exists for a given priority.
|
|
1745
1736
|
*/
|
|
1746
|
-
const
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1737
|
+
const ensureStyleTagForPriority = (priority) => {
|
|
1738
|
+
let styleElement = styleTagsByPriority.get(priority);
|
|
1739
|
+
if (styleElement)
|
|
1740
|
+
return styleElement;
|
|
1741
|
+
styleElement = document.createElement('style');
|
|
1742
|
+
styleElement.setAttribute(_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_ATTR, 'true');
|
|
1743
|
+
styleElement.setAttribute(_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_PRIORITY_ATTR, String(priority));
|
|
1744
|
+
const existing = Array.from(document.querySelectorAll(`style[${_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_ATTR}="true"]`));
|
|
1745
|
+
const insertBefore = existing.find(el => Number(el.getAttribute(_constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_PRIORITY_ATTR)) > priority);
|
|
1746
|
+
if (insertBefore) {
|
|
1747
|
+
document.head.insertBefore(styleElement, insertBefore);
|
|
1748
|
+
}
|
|
1749
|
+
else {
|
|
1750
|
+
document.head.appendChild(styleElement);
|
|
1751
|
+
}
|
|
1752
|
+
styleTagsByPriority.set(priority, styleElement);
|
|
1753
|
+
return styleElement;
|
|
1754
|
+
};
|
|
1755
|
+
const updateStyleTagForPriority = (priority) => {
|
|
1756
|
+
const tag = ensureStyleTagForPriority(priority);
|
|
1757
|
+
const css = Array.from(styleRegistry.values())
|
|
1758
|
+
.filter(entry => entry.priority === priority)
|
|
1759
|
+
.map(entry => entry.css)
|
|
1751
1760
|
.join('\n');
|
|
1752
|
-
|
|
1761
|
+
if (css) {
|
|
1762
|
+
tag.textContent = css;
|
|
1763
|
+
}
|
|
1764
|
+
else {
|
|
1765
|
+
tag.remove();
|
|
1766
|
+
styleTagsByPriority.delete(priority);
|
|
1767
|
+
}
|
|
1768
|
+
};
|
|
1769
|
+
const flushStyleUpdates = () => {
|
|
1770
|
+
for (const priority of pendingStyleUpdatePriorities) {
|
|
1771
|
+
updateStyleTagForPriority(priority);
|
|
1772
|
+
}
|
|
1773
|
+
pendingStyleUpdatePriorities.clear();
|
|
1774
|
+
};
|
|
1775
|
+
const scheduleStyleUpdate = (priority) => {
|
|
1776
|
+
pendingStyleUpdatePriorities.add(priority);
|
|
1777
|
+
if (isStyleUpdateScheduled) {
|
|
1778
|
+
return;
|
|
1779
|
+
}
|
|
1780
|
+
isStyleUpdateScheduled = true;
|
|
1781
|
+
// microtask → no flicker (runs before paint)
|
|
1782
|
+
queueMicrotask(() => {
|
|
1783
|
+
isStyleUpdateScheduled = false;
|
|
1784
|
+
flushStyleUpdates();
|
|
1785
|
+
});
|
|
1753
1786
|
};
|
|
1754
|
-
/**
|
|
1755
|
-
* Creates a cleanup function for a style, which decrements usage count and removes it if unused.
|
|
1756
|
-
*
|
|
1757
|
-
* @param className - The key of the style.
|
|
1758
|
-
*/
|
|
1759
1787
|
const createCleanupFunction = (className) => () => {
|
|
1760
1788
|
const entry = styleRegistry.get(className);
|
|
1761
1789
|
if (!entry) {
|
|
@@ -1764,22 +1792,17 @@ const createCleanupFunction = (className) => () => {
|
|
|
1764
1792
|
entry.usages--;
|
|
1765
1793
|
if (entry.usages <= 0) {
|
|
1766
1794
|
styleRegistry.delete(className);
|
|
1767
|
-
|
|
1795
|
+
scheduleStyleUpdate(entry.priority);
|
|
1768
1796
|
}
|
|
1769
1797
|
};
|
|
1770
|
-
/**
|
|
1771
|
-
* Mounts a CSS string under a given class name. Injects into a global <style> tag and manages its lifecycle.
|
|
1772
|
-
*
|
|
1773
|
-
* @param className - Unique identifier for the style block.
|
|
1774
|
-
* @param css - Full CSS rule string (can include multiple rules, media queries, etc.)
|
|
1775
|
-
* @param priority - Optional number to determine style ordering (lower = earlier = lower specificity)
|
|
1776
|
-
*
|
|
1777
|
-
* @returns A cleanup function to unmount the style when it's no longer needed.
|
|
1778
|
-
*/
|
|
1779
1798
|
const mountStyle = (className, css, priority = 0) => {
|
|
1780
1799
|
const existing = styleRegistry.get(className);
|
|
1781
1800
|
if (existing) {
|
|
1782
1801
|
existing.usages++;
|
|
1802
|
+
if (existing.priority > priority) {
|
|
1803
|
+
existing.priority = priority;
|
|
1804
|
+
updateStyleTagForPriority(priority);
|
|
1805
|
+
}
|
|
1783
1806
|
return createCleanupFunction(className);
|
|
1784
1807
|
}
|
|
1785
1808
|
styleRegistry.set(className, {
|
|
@@ -1787,7 +1810,7 @@ const mountStyle = (className, css, priority = 0) => {
|
|
|
1787
1810
|
priority,
|
|
1788
1811
|
usages: 1,
|
|
1789
1812
|
});
|
|
1790
|
-
|
|
1813
|
+
updateStyleTagForPriority(priority);
|
|
1791
1814
|
return createCleanupFunction(className);
|
|
1792
1815
|
};
|
|
1793
1816
|
|
|
@@ -1855,7 +1878,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1855
1878
|
/* harmony export */ });
|
|
1856
1879
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1857
1880
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1858
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
1881
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
1859
1882
|
/* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./css */ "./src/css/index.ts");
|
|
1860
1883
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
|
|
1861
1884
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils.ts");
|
|
@@ -1904,7 +1927,7 @@ const styled = (target, defaultProps, { omitProps } = {}) => {
|
|
|
1904
1927
|
theme,
|
|
1905
1928
|
};
|
|
1906
1929
|
const rawCss = computeCss(context);
|
|
1907
|
-
const baseClassName = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.
|
|
1930
|
+
const baseClassName = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.buildClassName)(rawCss);
|
|
1908
1931
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect)(() => {
|
|
1909
1932
|
const baseCss = (0,_css__WEBPACK_IMPORTED_MODULE_2__.processCss)(rawCss, {
|
|
1910
1933
|
theme,
|
|
@@ -1914,7 +1937,7 @@ const styled = (target, defaultProps, { omitProps } = {}) => {
|
|
|
1914
1937
|
}, [baseClassName]);
|
|
1915
1938
|
const cssPropRaw = (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.invokeIfFunction)(cssProp, context);
|
|
1916
1939
|
const cssPropString = evaluateDynamicCss(cssPropRaw, context);
|
|
1917
|
-
const cssPropClassName = cssPropString ? (0,_utils__WEBPACK_IMPORTED_MODULE_4__.
|
|
1940
|
+
const cssPropClassName = cssPropString ? (0,_utils__WEBPACK_IMPORTED_MODULE_4__.buildClassName)(cssPropString) : '';
|
|
1918
1941
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect)(() => {
|
|
1919
1942
|
if (cssPropClassName) {
|
|
1920
1943
|
const overrideCss = (0,_css__WEBPACK_IMPORTED_MODULE_2__.processCss)(cssPropString, {
|
|
@@ -2020,19 +2043,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2020
2043
|
|
|
2021
2044
|
__webpack_require__.r(__webpack_exports__);
|
|
2022
2045
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2046
|
+
/* harmony export */ buildClassName: () => (/* binding */ buildClassName),
|
|
2023
2047
|
/* harmony export */ combineClassNames: () => (/* binding */ combineClassNames),
|
|
2024
2048
|
/* harmony export */ filterNonHtmlAttrs: () => (/* binding */ filterNonHtmlAttrs),
|
|
2025
2049
|
/* harmony export */ generateId: () => (/* binding */ generateId),
|
|
2026
2050
|
/* harmony export */ isStyledComponent: () => (/* binding */ isStyledComponent),
|
|
2027
2051
|
/* harmony export */ isThemeColorValue: () => (/* binding */ isThemeColorValue),
|
|
2028
2052
|
/* harmony export */ pxToRem: () => (/* binding */ pxToRem),
|
|
2029
|
-
/* harmony export */ resolveClassName: () => (/* binding */ resolveClassName),
|
|
2030
2053
|
/* harmony export */ resolveColor: () => (/* binding */ resolveColor),
|
|
2031
2054
|
/* harmony export */ resolveDimension: () => (/* binding */ resolveDimension),
|
|
2032
2055
|
/* harmony export */ resolveFont: () => (/* binding */ resolveFont),
|
|
2033
2056
|
/* harmony export */ resolveSpacing: () => (/* binding */ resolveSpacing)
|
|
2034
2057
|
/* harmony export */ });
|
|
2035
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
2058
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
2036
2059
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
|
|
2037
2060
|
/* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./css */ "./src/css/index.ts");
|
|
2038
2061
|
|
|
@@ -2045,7 +2068,7 @@ const generateId = (prefix) => `${prefix}-${(0,_react_hive_honey_utils__WEBPACK_
|
|
|
2045
2068
|
* @param classNames - Array of class names to combine
|
|
2046
2069
|
*/
|
|
2047
2070
|
const combineClassNames = (classNames) => classNames.filter(Boolean).join(' ').trim();
|
|
2048
|
-
const
|
|
2071
|
+
const buildClassName = (css) => `hscn-${(0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__.hashString)(css)}`;
|
|
2049
2072
|
const isStyledComponent = (component) => _constants__WEBPACK_IMPORTED_MODULE_1__.HONEY_STYLED_COMPONENT_ID_PROP in component;
|
|
2050
2073
|
/**
|
|
2051
2074
|
* Filters out non-standard HTML attributes from a props object intended for a native HTML element.
|
|
@@ -2194,9 +2217,9 @@ module.exports = require("react");
|
|
|
2194
2217
|
|
|
2195
2218
|
/***/ },
|
|
2196
2219
|
|
|
2197
|
-
/***/ "./node_modules/.pnpm/@react-hive+honey-css@1.
|
|
2220
|
+
/***/ "./node_modules/.pnpm/@react-hive+honey-css@1.17.0/node_modules/@react-hive/honey-css/dist/index.mjs"
|
|
2198
2221
|
/*!***********************************************************************************************************!*\
|
|
2199
|
-
!*** ./node_modules/.pnpm/@react-hive+honey-css@1.
|
|
2222
|
+
!*** ./node_modules/.pnpm/@react-hive+honey-css@1.17.0/node_modules/@react-hive/honey-css/dist/index.mjs ***!
|
|
2200
2223
|
\***********************************************************************************************************/
|
|
2201
2224
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2202
2225
|
|
|
@@ -2220,9 +2243,9 @@ const e=e=>"{"===e||"}"===e||":"===e||";"===e||"@"===e||"("===e||'"'===e||"'"===
|
|
|
2220
2243
|
|
|
2221
2244
|
/***/ },
|
|
2222
2245
|
|
|
2223
|
-
/***/ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
2246
|
+
/***/ "./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs"
|
|
2224
2247
|
/*!***************************************************************************************************************!*\
|
|
2225
|
-
!*** ./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
2248
|
+
!*** ./node_modules/.pnpm/@react-hive+honey-utils@3.28.0/node_modules/@react-hive/honey-utils/dist/index.mjs ***!
|
|
2226
2249
|
\***************************************************************************************************************/
|
|
2227
2250
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2228
2251
|
|
|
@@ -2419,10 +2442,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2419
2442
|
/* harmony export */ HONEY_GLOBAL_STYLE_ATTR: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_GLOBAL_STYLE_ATTR),
|
|
2420
2443
|
/* harmony export */ HONEY_STYLED_COMPONENT_ID_PROP: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLED_COMPONENT_ID_PROP),
|
|
2421
2444
|
/* harmony export */ HONEY_STYLE_ATTR: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_ATTR),
|
|
2445
|
+
/* harmony export */ HONEY_STYLE_PRIORITY_ATTR: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_PRIORITY_ATTR),
|
|
2446
|
+
/* harmony export */ HONEY_STYLE_REGISTRY_SYMBOL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.HONEY_STYLE_REGISTRY_SYMBOL),
|
|
2422
2447
|
/* harmony export */ HoneyStyleContext: () => (/* reexport safe */ _contexts__WEBPACK_IMPORTED_MODULE_1__.HoneyStyleContext),
|
|
2423
2448
|
/* harmony export */ HoneyStyleProvider: () => (/* reexport safe */ _providers__WEBPACK_IMPORTED_MODULE_2__.HoneyStyleProvider),
|
|
2424
2449
|
/* harmony export */ VALID_DOM_ELEMENT_ATTRS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.VALID_DOM_ELEMENT_ATTRS),
|
|
2425
2450
|
/* harmony export */ __DEV__: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.__DEV__),
|
|
2451
|
+
/* harmony export */ buildClassName: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_8__.buildClassName),
|
|
2426
2452
|
/* harmony export */ combineClassNames: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_8__.combineClassNames),
|
|
2427
2453
|
/* harmony export */ createCssRule: () => (/* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_5__.createCssRule),
|
|
2428
2454
|
/* harmony export */ createGlobalStyle: () => (/* reexport safe */ _global_style__WEBPACK_IMPORTED_MODULE_6__.createGlobalStyle),
|
|
@@ -2434,7 +2460,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2434
2460
|
/* harmony export */ mediaQuery: () => (/* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_5__.mediaQuery),
|
|
2435
2461
|
/* harmony export */ processCss: () => (/* reexport safe */ _css__WEBPACK_IMPORTED_MODULE_5__.processCss),
|
|
2436
2462
|
/* harmony export */ pxToRem: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_8__.pxToRem),
|
|
2437
|
-
/* harmony export */ resolveClassName: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_8__.resolveClassName),
|
|
2438
2463
|
/* harmony export */ resolveColor: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_8__.resolveColor),
|
|
2439
2464
|
/* harmony export */ resolveDimension: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_8__.resolveDimension),
|
|
2440
2465
|
/* harmony export */ resolveFont: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_8__.resolveFont),
|