@shelf/global-renderer 1.9.2 → 1.9.3
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.
|
@@ -717,7 +717,7 @@
|
|
|
717
717
|
${e=>e.$tabStyles}
|
|
718
718
|
`,Em=(0,s.Ay)(wm)`
|
|
719
719
|
${e=>e.$contentStyles}
|
|
720
|
-
`,_m=(0,i.forwardRef)(((e,t)=>{var n;const{tab:r,items:i,onChange:a,className:s,activeTabId:l,defaultTabId:c,contentStyles:u,underlineColor:d,withUnderline:f=!0,emptyText:p="No content here"}=e,h=c||(null==(n=i[0])?void 0:n.id);return(0,o.jsxs)(bm,{ref:t,value:l,className:s,defaultValue:h,onValueChange:e=>null==a?void 0:a(e),children:[(0,o.jsx)(Cm,{$withUnderline:f,$underlineColor:d,children:i.map((e=>(0,o.jsx)(km,{value:e.id,disabled:null==e?void 0:e.disabled,$tabStyles:null==r?void 0:r.styles,$labelColor:null==r?void 0:r.labelColor,$tabLineColor:null==r?void 0:r.tabLineColor,$disabledColor:null==r?void 0:r.disabledColor,$activeTextColor:null==r?void 0:r.activeTextColor,children:e.label},e.id)))}),i.map((e=>(0,o.jsx)(Em,{value:e.id,$contentStyles:u,children:(null==e?void 0:e.content)??p},e.id)))]})}));function Sm(e){const t=(0,i.useRef)({value:e,previous:e});return(0,i.useMemo)((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Tm(e){const[t,n]=(0,i.useState)(void 0);return Ng((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}_m.displayName="ExperimentalTabs";const Am="Checkbox",[Om,Lm]=wg(Am),[Nm,Mm]=Om(Am),Pm=(0,i.forwardRef)(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,p]=(0,i.useState)(null),h=Eg(t,(e=>p(e))),g=(0,i.useRef)(!1),m=!f||!!f.closest("form"),[v=!1,b]=Fg({prop:o,defaultProp:a,onChange:u}),y=(0,i.useRef)(v);return(0,i.useEffect)((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>b(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),(0,i.createElement)(Nm,{scope:n,state:v,disabled:l},(0,i.createElement)(Ig.button,Lr({type:"button",role:"checkbox","aria-checked":Im(v)?"mixed":v,"aria-required":s,"data-state":Dm(v),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:h,onKeyDown:xg(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:xg(e.onClick,(e=>{b((e=>!!Im(e)||!e)),m&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())}))})),m&&(0,i.createElement)(Rm,{control:f,bubbles:!g.current,name:r,value:c,checked:v,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),Rm=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=(0,i.useRef)(null),s=Sm(n),l=Tm(t);return(0,i.useEffect)((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=Im(n),o.call(e,!Im(n)&&n),e.dispatchEvent(t)}}),[s,n,r]),(0,i.createElement)("input",Lr({type:"checkbox","aria-hidden":!0,defaultChecked:!Im(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Im(e){return"indeterminate"===e}function Dm(e){return Im(e)?"indeterminate":e?"checked":"unchecked"}const jm=Pm,Fm=(Symbol.toStringTag,(0,s.Ay)(jm)`
|
|
720
|
+
`,_m=(0,i.forwardRef)(((e,t)=>{var n;const{tab:r,items:i,onChange:a,className:s,activeTabId:l,defaultTabId:c,contentStyles:u,underlineColor:d,withUnderline:f=!0,emptyText:p="No content here"}=e,h=c||(null==(n=i[0])?void 0:n.id);return(0,o.jsxs)(bm,{ref:t,value:l,className:s,defaultValue:h,onValueChange:e=>null==a?void 0:a(e),children:[(0,o.jsx)(Wi,{hideTracksWhenNotNeeded:!0,autoHeight:!0,autoHide:!0,customModifier:["small"],children:(0,o.jsx)(Cm,{$withUnderline:f,$underlineColor:d,children:i.map((e=>(0,o.jsx)(km,{value:e.id,disabled:null==e?void 0:e.disabled,$tabStyles:null==r?void 0:r.styles,$labelColor:null==r?void 0:r.labelColor,$tabLineColor:null==r?void 0:r.tabLineColor,$disabledColor:null==r?void 0:r.disabledColor,$activeTextColor:null==r?void 0:r.activeTextColor,children:e.label},e.id)))})}),i.map((e=>(0,o.jsx)(Em,{value:e.id,$contentStyles:u,children:(null==e?void 0:e.content)??p},e.id)))]})}));function Sm(e){const t=(0,i.useRef)({value:e,previous:e});return(0,i.useMemo)((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Tm(e){const[t,n]=(0,i.useState)(void 0);return Ng((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}_m.displayName="ExperimentalTabs";const Am="Checkbox",[Om,Lm]=wg(Am),[Nm,Mm]=Om(Am),Pm=(0,i.forwardRef)(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=e,[f,p]=(0,i.useState)(null),h=Eg(t,(e=>p(e))),g=(0,i.useRef)(!1),m=!f||!!f.closest("form"),[v=!1,b]=Fg({prop:o,defaultProp:a,onChange:u}),y=(0,i.useRef)(v);return(0,i.useEffect)((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>b(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),(0,i.createElement)(Nm,{scope:n,state:v,disabled:l},(0,i.createElement)(Ig.button,Lr({type:"button",role:"checkbox","aria-checked":Im(v)?"mixed":v,"aria-required":s,"data-state":Dm(v),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:h,onKeyDown:xg(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:xg(e.onClick,(e=>{b((e=>!!Im(e)||!e)),m&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())}))})),m&&(0,i.createElement)(Rm,{control:f,bubbles:!g.current,name:r,value:c,checked:v,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),Rm=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=(0,i.useRef)(null),s=Sm(n),l=Tm(t);return(0,i.useEffect)((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=Im(n),o.call(e,!Im(n)&&n),e.dispatchEvent(t)}}),[s,n,r]),(0,i.createElement)("input",Lr({type:"checkbox","aria-hidden":!0,defaultChecked:!Im(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Im(e){return"indeterminate"===e}function Dm(e){return Im(e)?"indeterminate":e?"checked":"unchecked"}const jm=Pm,Fm=(Symbol.toStringTag,(0,s.Ay)(jm)`
|
|
721
721
|
border: none;
|
|
722
722
|
padding: 0;
|
|
723
723
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelf/global-renderer",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "The package exposes entrypoints with window's function(-s) to render React component",
|
|
5
5
|
"main": "lib",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@shelf/datetime": "^2.0.0",
|
|
32
32
|
"@shelf/i18n": "13.7.3",
|
|
33
|
-
"@shelf/icons": "^11.6.
|
|
33
|
+
"@shelf/icons": "^11.6.57",
|
|
34
34
|
"react-i18next": "11.8.15"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@shelf/babel-config": "^3.0.0",
|
|
38
|
-
"@shelf/decision-tree-editor-components": "^3.0.
|
|
38
|
+
"@shelf/decision-tree-editor-components": "^3.0.54",
|
|
39
39
|
"@shelf/types": "^51.40.1",
|
|
40
40
|
"@types/react-dom": "18.0.6",
|
|
41
41
|
"babel-loader": "8.2.3",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"react": "18.x.x",
|
|
54
54
|
"styled-components": "^5 || ^6"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "9c386082cb6c249fe03322a2178909d50c9e1592"
|
|
57
57
|
}
|