@react-hive/honey-style 2.10.0 → 2.12.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.
@@ -10,64 +10,75 @@
10
10
 
11
11
  __webpack_require__.r(__webpack_exports__);
12
12
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13
+ /* harmony export */ FOCUSABLE_HTML_TAGS: () => (/* binding */ Q),
13
14
  /* harmony export */ assert: () => (/* binding */ e),
14
- /* harmony export */ calculateEuclideanDistance: () => (/* binding */ J),
15
- /* harmony export */ calculateMovingSpeed: () => (/* binding */ K),
16
- /* harmony export */ calculatePercentage: () => (/* binding */ Q),
17
- /* harmony export */ camelToDashCase: () => (/* binding */ z),
18
- /* harmony export */ chunk: () => (/* binding */ O),
19
- /* harmony export */ cloneBlob: () => (/* binding */ _),
20
- /* harmony export */ compact: () => (/* binding */ P),
21
- /* harmony export */ compose: () => (/* binding */ v),
22
- /* harmony export */ convertBlobToFile: () => (/* binding */ tt),
23
- /* harmony export */ delay: () => (/* binding */ W),
24
- /* harmony export */ difference: () => (/* binding */ Y),
25
- /* harmony export */ everyAsync: () => (/* binding */ E),
26
- /* harmony export */ filterParallel: () => (/* binding */ $),
27
- /* harmony export */ filterSequential: () => (/* binding */ S),
28
- /* harmony export */ findAsync: () => (/* binding */ N),
29
- /* harmony export */ getDOMRectIntersectionRatio: () => (/* binding */ et),
15
+ /* harmony export */ blobToFile: () => (/* binding */ ut),
16
+ /* harmony export */ calculateEuclideanDistance: () => (/* binding */ W),
17
+ /* harmony export */ calculateMovingSpeed: () => (/* binding */ J),
18
+ /* harmony export */ calculatePercentage: () => (/* binding */ K),
19
+ /* harmony export */ camelToDashCase: () => (/* binding */ U),
20
+ /* harmony export */ camelToWords: () => (/* binding */ V),
21
+ /* harmony export */ chunk: () => (/* binding */ P),
22
+ /* harmony export */ cloneBlob: () => (/* binding */ et),
23
+ /* harmony export */ compact: () => (/* binding */ A),
24
+ /* harmony export */ compose: () => (/* binding */ x),
25
+ /* harmony export */ delay: () => (/* binding */ X),
26
+ /* harmony export */ difference: () => (/* binding */ S),
27
+ /* harmony export */ everyAsync: () => (/* binding */ B),
28
+ /* harmony export */ fileListToFiles: () => (/* binding */ ft),
29
+ /* harmony export */ filterParallel: () => (/* binding */ j),
30
+ /* harmony export */ filterSequential: () => (/* binding */ $),
31
+ /* harmony export */ findAsync: () => (/* binding */ I),
32
+ /* harmony export */ getDOMRectIntersectionRatio: () => (/* binding */ nt),
30
33
  /* harmony export */ getElementOffsetRect: () => (/* binding */ rt),
31
- /* harmony export */ hashString: () => (/* binding */ Z),
32
- /* harmony export */ intersection: () => (/* binding */ X),
33
- /* harmony export */ invokeIfFunction: () => (/* binding */ V),
34
- /* harmony export */ isArray: () => (/* binding */ h),
34
+ /* harmony export */ getFocusableHtmlElements: () => (/* binding */ ot),
35
+ /* harmony export */ hashString: () => (/* binding */ H),
36
+ /* harmony export */ intersection: () => (/* binding */ k),
37
+ /* harmony export */ invokeIfFunction: () => (/* binding */ F),
38
+ /* harmony export */ isAnchorHtmlElement: () => (/* binding */ at),
39
+ /* harmony export */ isArray: () => (/* binding */ d),
35
40
  /* harmony export */ isBool: () => (/* binding */ s),
36
- /* harmony export */ isDate: () => (/* binding */ w),
37
- /* harmony export */ isDefined: () => (/* binding */ o),
38
- /* harmony export */ isEmptyArray: () => (/* binding */ u),
39
- /* harmony export */ isEmptyObject: () => (/* binding */ f),
40
- /* harmony export */ isFiniteNumber: () => (/* binding */ A),
41
- /* harmony export */ isFunction: () => (/* binding */ y),
42
- /* harmony export */ isInteger: () => (/* binding */ k),
43
- /* harmony export */ isMap: () => (/* binding */ b),
44
- /* harmony export */ isNil: () => (/* binding */ n),
45
- /* harmony export */ isNilOrEmptyString: () => (/* binding */ a),
46
- /* harmony export */ isNull: () => (/* binding */ r),
41
+ /* harmony export */ isContentEditableHtmlElement: () => (/* binding */ it),
42
+ /* harmony export */ isDate: () => (/* binding */ c),
43
+ /* harmony export */ isDefined: () => (/* binding */ a),
44
+ /* harmony export */ isEmptyArray: () => (/* binding */ b),
45
+ /* harmony export */ isEmptyObject: () => (/* binding */ l),
46
+ /* harmony export */ isFile: () => (/* binding */ lt),
47
+ /* harmony export */ isFiniteNumber: () => (/* binding */ m),
48
+ /* harmony export */ isFunction: () => (/* binding */ E),
49
+ /* harmony export */ isHtmlElementFocusable: () => (/* binding */ st),
50
+ /* harmony export */ isInteger: () => (/* binding */ g),
51
+ /* harmony export */ isMap: () => (/* binding */ h),
52
+ /* harmony export */ isNil: () => (/* binding */ r),
53
+ /* harmony export */ isNilOrEmptyString: () => (/* binding */ _),
54
+ /* harmony export */ isNull: () => (/* binding */ n),
47
55
  /* harmony export */ isNumber: () => (/* binding */ i),
48
- /* harmony export */ isObject: () => (/* binding */ c),
49
- /* harmony export */ isPromise: () => (/* binding */ p),
50
- /* harmony export */ isRegExp: () => (/* binding */ m),
51
- /* harmony export */ isSet: () => (/* binding */ d),
52
- /* harmony export */ isString: () => (/* binding */ l),
53
- /* harmony export */ isSymbol: () => (/* binding */ M),
54
- /* harmony export */ isUndefined: () => (/* binding */ x),
55
- /* harmony export */ isValidDate: () => (/* binding */ g),
56
- /* harmony export */ noop: () => (/* binding */ H),
57
- /* harmony export */ not: () => (/* binding */ I),
58
- /* harmony export */ parse2DMatrix: () => (/* binding */ U),
59
- /* harmony export */ pipe: () => (/* binding */ j),
60
- /* harmony export */ reduceAsync: () => (/* binding */ F),
61
- /* harmony export */ retry: () => (/* binding */ G),
62
- /* harmony export */ runParallel: () => (/* binding */ R),
63
- /* harmony export */ runSequential: () => (/* binding */ L),
64
- /* harmony export */ someAsync: () => (/* binding */ B),
65
- /* harmony export */ splitStringIntoWords: () => (/* binding */ D),
66
- /* harmony export */ timeout: () => (/* binding */ q),
67
- /* harmony export */ toKebabCase: () => (/* binding */ T),
68
- /* harmony export */ unique: () => (/* binding */ C)
56
+ /* harmony export */ isObject: () => (/* binding */ o),
57
+ /* harmony export */ isPromise: () => (/* binding */ L),
58
+ /* harmony export */ isRegExp: () => (/* binding */ u),
59
+ /* harmony export */ isSet: () => (/* binding */ y),
60
+ /* harmony export */ isString: () => (/* binding */ Z),
61
+ /* harmony export */ isSymbol: () => (/* binding */ p),
62
+ /* harmony export */ isUndefined: () => (/* binding */ w),
63
+ /* harmony export */ isValidDate: () => (/* binding */ f),
64
+ /* harmony export */ noop: () => (/* binding */ C),
65
+ /* harmony export */ not: () => (/* binding */ O),
66
+ /* harmony export */ parse2DMatrix: () => (/* binding */ tt),
67
+ /* harmony export */ parseFileName: () => (/* binding */ ct),
68
+ /* harmony export */ pipe: () => (/* binding */ T),
69
+ /* harmony export */ readFilesFromDataTransfer: () => (/* binding */ yt),
70
+ /* harmony export */ reduceAsync: () => (/* binding */ z),
71
+ /* harmony export */ retry: () => (/* binding */ N),
72
+ /* harmony export */ runParallel: () => (/* binding */ Y),
73
+ /* harmony export */ runSequential: () => (/* binding */ R),
74
+ /* harmony export */ someAsync: () => (/* binding */ D),
75
+ /* harmony export */ splitStringIntoWords: () => (/* binding */ q),
76
+ /* harmony export */ timeout: () => (/* binding */ v),
77
+ /* harmony export */ toKebabCase: () => (/* binding */ G),
78
+ /* harmony export */ traverseFileSystemDirectory: () => (/* binding */ ht),
79
+ /* harmony export */ unique: () => (/* binding */ M)
69
80
  /* harmony export */ });
70
- var t={};function e(t,e){if(!t)throw new Error(e)}t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const r=t=>null===t,n=t=>null==t,a=t=>""===t||n(t),o=t=>null!=t,l=t=>"string"==typeof t,i=t=>"number"==typeof t,s=t=>"boolean"==typeof t,c=t=>"object"==typeof t,f=t=>c(t)&&!r(t)&&0===Object.keys(t).length,h=t=>Array.isArray(t),u=t=>h(t)&&0===t.length,y=t=>"function"==typeof t,p=t=>y(t?.then),w=t=>t instanceof Date,g=t=>w(t)&&!isNaN(t.getTime()),m=t=>t instanceof RegExp,b=t=>t instanceof Map,d=t=>t instanceof Set,M=t=>"symbol"==typeof t,x=t=>void 0===t,A=t=>i(t)&&isFinite(t),k=t=>i(t)&&Number.isInteger(t),P=t=>t.filter(Boolean),C=t=>[...new Set(t)],O=(t,r)=>(e(r>0,"Chunk size must be greater than 0"),Array.from({length:Math.ceil(t.length/r)},(e,n)=>t.slice(n*r,(n+1)*r))),X=(...t)=>{if(0===t.length)return[];if(1===t.length)return[...t[0]];const[e,...r]=t;return C(e).filter(t=>r.every(e=>e.includes(t)))},Y=(t,e)=>t.filter(t=>!e.includes(t)),j=(...t)=>e=>t.reduce((t,e)=>e(t),e),v=(...t)=>e=>t.reduceRight((t,e)=>e(t),e),L=async(t,e)=>{const r=[];for(let n=0;n<t.length;n++)r.push(await e(t[n],n,t));return r},R=async(t,e)=>Promise.all(t.map(e)),S=async(t,e)=>{const r=[];for(let n=0;n<t.length;n++){const a=t[n];await e(a,n,t)&&r.push(a)}return r},$=async(t,e)=>{const r=await R(t,async(t,r,n)=>!!await e(t,r,n)&&t);return P(r)},B=async(t,e)=>{for(let r=0;r<t.length;r++)if(await e(t[r],r,t))return!0;return!1},E=async(t,e)=>{for(let r=0;r<t.length;r++)if(!await e(t[r],r,t))return!1;return!0},F=async(t,e,r)=>{let n=r;for(let r=0;r<t.length;r++)n=await e(n,t[r],r,t);return n},N=async(t,e)=>{for(let r=0;r<t.length;r++)if(await e(t[r],r,t))return t[r];return null},T=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),z=t=>{const e=t.charAt(0),r=t.slice(1);return e.toLowerCase()+r.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)},D=t=>t.split(" ").filter(Boolean),Z=t=>{let e=5381;for(let r=0;r<t.length;r++)e=33*e^t.charCodeAt(r);return(e>>>0).toString(36)},H=()=>{},I=t=>(...e)=>!t(...e),V=(t,...e)=>"function"==typeof t?t(...e):t,W=t=>new Promise(e=>setTimeout(e,t)),q=async(t,e,r="Operation timed out")=>{try{return await Promise.race([t,W(e).then(()=>Promise.reject(new Error(r)))])}finally{}},G=(t,{maxAttempts:e=3,delayMs:r=300,backoff:n=!0,onRetry:a}={})=>async(...o)=>{let l;for(let i=1;i<=e;i++)try{return await t(...o)}catch(t){if(l=t,i<e){a?.(i,t);const e=n?r*2**(i-1):r;await W(e)}}throw l},J=(t,e,r,n)=>{const a=r-t,o=n-e;return Math.hypot(a,o)},K=(t,e)=>Math.abs(t/e),Q=(t,e)=>t*e/100,U=t=>{const e=window.getComputedStyle(t).getPropertyValue("transform").match(/^matrix\((.+)\)$/);if(!e)return{translateX:0,translateY:0,scaleX:1,scaleY:1,skewX:0,skewY:0};const[r,n,a,o,l,i]=e[1].split(", ").map(parseFloat);return{translateX:l,translateY:i,scaleX:r,scaleY:o,skewX:a,skewY:n}},_=t=>new Blob([t],{type:t.type}),tt=(t,e)=>new File([t],e,{type:t.type}),et=(t,e)=>Math.max(0,Math.min(t.right,e.right)-Math.max(t.left,e.left))*Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top))/(e.width*e.height),rt=t=>new DOMRect(t.offsetLeft,t.offsetTop,t.clientWidth,t.clientHeight);
81
+ var t={};function e(t,e){if(!t)throw new Error(e)}t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const n=t=>null===t,r=t=>null==t,a=t=>null!=t,i=t=>"number"==typeof t,s=t=>"boolean"==typeof t,o=t=>"object"==typeof t,l=t=>o(t)&&!n(t)&&0===Object.keys(t).length,c=t=>t instanceof Date,f=t=>c(t)&&!isNaN(t.getTime()),u=t=>t instanceof RegExp,h=t=>t instanceof Map,y=t=>t instanceof Set,p=t=>"symbol"==typeof t,w=t=>void 0===t,m=t=>i(t)&&isFinite(t),g=t=>i(t)&&Number.isInteger(t),d=t=>Array.isArray(t),b=t=>d(t)&&0===t.length,A=t=>t.filter(Boolean),M=t=>[...new Set(t)],P=(t,n)=>(e(n>0,"Chunk size must be greater than 0"),Array.from({length:Math.ceil(t.length/n)},(e,r)=>t.slice(r*n,(r+1)*n))),k=(...t)=>{if(0===t.length)return[];if(1===t.length)return[...t[0]];const[e,...n]=t;return M(e).filter(t=>n.every(e=>e.includes(t)))},S=(t,e)=>t.filter(t=>!e.includes(t)),T=(...t)=>e=>t.reduce((t,e)=>e(t),e),x=(...t)=>e=>t.reduceRight((t,e)=>e(t),e),C=()=>{},E=t=>"function"==typeof t,O=t=>(...e)=>!t(...e),F=(t,...e)=>"function"==typeof t?t(...e):t,X=t=>new Promise(e=>setTimeout(e,t)),v=async(t,e,n="Operation timed out")=>{try{return await Promise.race([t,X(e).then(()=>Promise.reject(new Error(n)))])}finally{}},N=(t,{maxAttempts:e=3,delayMs:n=300,backoff:r=!0,onRetry:a}={})=>async(...i)=>{let s;for(let o=1;o<=e;o++)try{return await t(...i)}catch(t){if(s=t,o<e){a?.(o,t);const e=r?n*2**(o-1):n;await X(e)}}throw s},L=t=>E(t?.then),R=async(t,e)=>{const n=[];for(let r=0;r<t.length;r++)n.push(await e(t[r],r,t));return n},Y=async(t,e)=>Promise.all(t.map(e)),$=async(t,e)=>{const n=[];for(let r=0;r<t.length;r++){const a=t[r];await e(a,r,t)&&n.push(a)}return n},j=async(t,e)=>{const n=await Y(t,async(t,n,r)=>!!await e(t,n,r)&&t);return A(n)},D=async(t,e)=>{for(let n=0;n<t.length;n++)if(await e(t[n],n,t))return!0;return!1},B=async(t,e)=>{for(let n=0;n<t.length;n++)if(!await e(t[n],n,t))return!1;return!0},z=async(t,e,n)=>{let r=n;for(let n=0;n<t.length;n++)r=await e(r,t[n],n,t);return r},I=async(t,e)=>{for(let n=0;n<t.length;n++)if(await e(t[n],n,t))return t[n];return null},Z=t=>"string"==typeof t,_=t=>""===t||r(t),G=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),U=t=>{const e=t.charAt(0),n=t.slice(1);return e.toLowerCase()+n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)},V=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),q=t=>t.split(" ").filter(Boolean),H=t=>{let e=5381;for(let n=0;n<t.length;n++)e=33*e^t.charCodeAt(n);return(e>>>0).toString(36)},W=(t,e,n,r)=>{const a=n-t,i=r-e;return Math.hypot(a,i)},J=(t,e)=>Math.abs(t/e),K=(t,e)=>t*e/100,Q=["INPUT","SELECT","TEXTAREA","BUTTON","A"],tt=t=>{const e=window.getComputedStyle(t).getPropertyValue("transform").match(/^matrix\((.+)\)$/);if(!e)return{translateX:0,translateY:0,scaleX:1,scaleY:1,skewX:0,skewY:0};const[n,r,a,i,s,o]=e[1].split(", ").map(parseFloat);return{translateX:s,translateY:o,scaleX:n,scaleY:i,skewX:a,skewY:r}},et=t=>new Blob([t],{type:t.type}),nt=(t,e)=>Math.max(0,Math.min(t.right,e.right)-Math.max(t.left,e.left))*Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top))/(e.width*e.height),rt=t=>new DOMRect(t.offsetLeft,t.offsetTop,t.clientWidth,t.clientHeight),at=t=>"A"===t.tagName,it=t=>"true"===t.getAttribute("contenteditable"),st=t=>{if(!t)return!1;const e=window.getComputedStyle(t);if("hidden"===e.visibility||"none"===e.display)return!1;if("disabled"in t&&t.disabled)return!1;const n=t.getAttribute("tabindex");return"-1"!==n&&(Q.includes(t.tagName)?!at(t)||""!==t.href:!!it(t)||null!==n)},ot=t=>Array.from(t.querySelectorAll("*")).filter(st),lt=t=>t instanceof File,ct=t=>{const e=t.lastIndexOf(".");return e<=0||e===t.length-1?[t,""]:[t.slice(0,e),t.slice(e+1).toLowerCase()]},ft=t=>{if(!t)return[];const e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e},ut=(t,e)=>new File([t],e,{type:t.type}),ht=async(t,{skipFiles:e=[".DS_Store","Thumbs.db","desktop.ini","ehthumbs.db",".Spotlight-V100",".Trashes",".fseventsd","__MACOSX"]}={})=>{const n=new Set(e),r=await(async t=>{const e=t.createReader(),n=async()=>new Promise((t,r)=>{e.readEntries(async e=>{if(e.length)try{const r=await n();t([...e,...r])}catch(t){r(t)}else t([])},r)});return n()})(t);return(await Y(r,async t=>t.isDirectory?ht(t,{skipFiles:e}):n.has(t.name)?[]:[await new Promise((e,n)=>{t.file(e,n)})])).flat()},yt=async(t,e={})=>{const n=t?.items;if(!n)return[];const r=[];for(let t=0;t<n.length;t++){const a=n[t];if("webkitGetAsEntry"in a){const t=a.webkitGetAsEntry?.();if(t?.isDirectory){r.push(ht(t,e));continue}if(t?.isFile){r.push(new Promise((e,n)=>t.file(t=>e([t]),n)));continue}}const i=a.getAsFile();i&&r.push(Promise.resolve([i]))}return(await Promise.all(r)).flat()};
71
82
  //# sourceMappingURL=index.mjs.map
72
83
 
73
84
  /***/ }),
@@ -2716,7 +2727,7 @@ const evaluateDynamicCss = (interpolation, context) => {
2716
2727
  // @ts-expect-error
2717
2728
  return (0,_css__WEBPACK_IMPORTED_MODULE_4__.css)([''], [interpolation])(context);
2718
2729
  };
2719
- const styled = (target, defaultProps) => {
2730
+ const styled = (target, defaultProps, { omitProps } = {}) => {
2720
2731
  return (strings, ...interpolations) => {
2721
2732
  const componentId = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.generateId)('hsc');
2722
2733
  const computeCss = (0,_css__WEBPACK_IMPORTED_MODULE_4__.css)(strings, ...interpolations);
@@ -2753,20 +2764,34 @@ const styled = (target, defaultProps) => {
2753
2764
  return (0,_mount_style__WEBPACK_IMPORTED_MODULE_5__.mountStyle)(cssPropClassName, overrideCss, 1);
2754
2765
  }
2755
2766
  }, [cssPropClassName]);
2767
+ const finalClassName = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.combineClassNames)([
2768
+ componentId,
2769
+ baseClassName,
2770
+ className,
2771
+ cssPropClassName,
2772
+ ]);
2756
2773
  const mergedProps = {
2757
2774
  ...resolvedDefaultProps,
2758
2775
  ...cleanedProps,
2759
- className: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.combineClassNames)([componentId, baseClassName, className, cssPropClassName]),
2776
+ className: finalClassName,
2760
2777
  };
2778
+ const finalProps = omitProps
2779
+ ? Object.entries(mergedProps).reduce((result, [propName, propValue]) => omitProps(propName)
2780
+ ? result
2781
+ : {
2782
+ ...result,
2783
+ [propName]: propValue,
2784
+ }, {})
2785
+ : mergedProps;
2761
2786
  const finalComponent = as || target;
2762
2787
  if ((0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.isString)(target)) {
2763
2788
  const filteredProps = (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.isString)(finalComponent)
2764
- ? (0,_utils__WEBPACK_IMPORTED_MODULE_3__.filterNonHtmlAttrs)(mergedProps)
2765
- : mergedProps;
2789
+ ? (0,_utils__WEBPACK_IMPORTED_MODULE_3__.filterNonHtmlAttrs)(finalProps)
2790
+ : finalProps;
2766
2791
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(finalComponent, filteredProps);
2767
2792
  }
2768
2793
  return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(target, {
2769
- ...mergedProps,
2794
+ ...finalProps,
2770
2795
  ...(as && { as }),
2771
2796
  ...((0,_utils__WEBPACK_IMPORTED_MODULE_3__.isStyledComponent)(target) && {
2772
2797
  __compositionDepth: __compositionDepth - 1,