forlogic-core 2.0.0 → 2.0.2

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 (186) hide show
  1. package/README.md +0 -46
  2. package/dist/assets/AccordionDoc-CGNlubG3.js +31 -0
  3. package/dist/assets/ActionButtonDoc-CYtkXR0k.js +47 -0
  4. package/dist/assets/ActionPlanDoc-BSuPRftQ.js +65 -0
  5. package/dist/assets/AlertDoc-Cpvxneqg.js +37 -0
  6. package/dist/assets/AliasUrlDoc-DIpUWf4Y.js +189 -0
  7. package/dist/assets/AppHeaderDoc-DNQErj_t.js +74 -0
  8. package/dist/assets/AppSidebarDoc-DkeQarDu.js +221 -0
  9. package/dist/assets/ApprovalFlowDoc-8YgXbhKJ.js +31 -0
  10. package/dist/assets/AuditLogDoc-BBvNcHIo.js +67 -0
  11. package/dist/assets/AuditTrailDoc-DgFHO-uo.js +17 -0
  12. package/dist/assets/AuthDoc-WIA_Aetl.js +200 -0
  13. package/dist/assets/AvatarDoc-B6go1C1T.js +11 -0
  14. package/dist/assets/BadgeDoc-BONhfqB_.js +36 -0
  15. package/dist/assets/BaseFormDoc-CuyUArcj.js +169 -0
  16. package/dist/assets/BodyContentDoc-CterHC1E.js +83 -0
  17. package/dist/assets/BreadcrumbDoc-Dwn9nLeO.js +75 -0
  18. package/dist/assets/ButtonDoc-BOjRseZT.js +41 -0
  19. package/dist/assets/ButtonGroupDoc-8IS6PPh4.js +7 -0
  20. package/dist/assets/CalendarDoc-CMwIEqgT.js +81 -0
  21. package/dist/assets/CardDoc-BZz1CVg2.js +49 -0
  22. package/dist/assets/ChartDoc-B5vZVtqD.js +76 -0
  23. package/dist/assets/CheckboxDoc-lAbYO9I5.js +55 -0
  24. package/dist/assets/ColorPickerDoc-Dpsprp4N.js +10 -0
  25. package/dist/assets/ColorsFoundationDoc-CCHeSL3p.js +13 -0
  26. package/dist/assets/ComboTreeDoc-D4dTkIt-.js +46 -0
  27. package/dist/assets/ComboboxDoc-CqqZPvZq.js +134 -0
  28. package/dist/assets/ComponentDocTemplate-CQbBhfvZ.js +1 -0
  29. package/dist/assets/ContextMenuDoc-D3jC-MVA.js +182 -0
  30. package/dist/assets/ContextsDoc-XFH0-JdS.js +211 -0
  31. package/dist/assets/CreateCrudPageDoc-CpuiWI-g.js +106 -0
  32. package/dist/assets/CrudActionBarDoc-wuBGXD9Y.js +112 -0
  33. package/dist/assets/CrudGridDoc-BYWqSXBH.js +85 -0
  34. package/dist/assets/CrudOverviewDoc-B_bk2a2t.js +14 -0
  35. package/dist/assets/CrudPrimitivesDoc-CxaTB94A.js +164 -0
  36. package/dist/assets/CrudTableDoc-Dga1VgCu.js +113 -0
  37. package/dist/assets/CustomFormFieldsDoc-C1hwwSl3.js +33 -0
  38. package/dist/assets/DashboardFormDoc-BUDCmrMl.js +49 -0
  39. package/dist/assets/DashboardGeneralViewDoc-Cyg1SIiG.js +71 -0
  40. package/dist/assets/DashboardGridDoc-BavePiRF.js +49 -0
  41. package/dist/assets/DashboardListDoc-CLyMA6UK.js +37 -0
  42. package/dist/assets/DashboardOverviewDoc-DRVvNIF1.js +35 -0
  43. package/dist/assets/DashboardPanelRendererDoc--mfwb8Nc.js +60 -0
  44. package/dist/assets/DashboardPanelsBasicDoc-BQ2V_52D.js +62 -0
  45. package/dist/assets/DashboardPanelsCartesianDoc-sy-hcVQY.js +75 -0
  46. package/dist/assets/DashboardPanelsSpecialDoc-DsIUCRRP.js +83 -0
  47. package/dist/assets/DashboardViewDoc-CtlCNlEF.js +45 -0
  48. package/dist/assets/DataListDoc-DUy88lCQ.js +13 -0
  49. package/dist/assets/DesignSystemHome-DHl9YtbH.js +1 -0
  50. package/dist/assets/DialogDoc-CMQqnTV-.js +981 -0
  51. package/dist/assets/DropdownMenuDoc-S7X9csGt.js +175 -0
  52. package/dist/assets/ElectronicSignatureDialogDoc-BfithaL_.js +57 -0
  53. package/dist/assets/EmptyStateDoc-CHGCiGIk.js +35 -0
  54. package/dist/assets/EnvironmentsDoc-DZHJZ2nm.js +96 -0
  55. package/dist/assets/ErrorBoundaryDoc-DoaAg68p.js +111 -0
  56. package/dist/assets/ExampleActionPlanPage-C0fIMZCD.js +1 -0
  57. package/dist/assets/ExampleAppDoc-DzIU81Fn.js +1 -0
  58. package/dist/assets/ExampleCard-DuLrb3t-.js +1 -0
  59. package/dist/assets/ExampleCrudReportsPage-M0pz6tdM.js +1 -0
  60. package/dist/assets/ExampleDashboardPage-CRG5r3Vw.js +1 -0
  61. package/dist/assets/ExampleIdeasPage-I84ZMLY4.js +1 -0
  62. package/dist/assets/ExampleImportWizardPage-h4YqrrSe.js +1 -0
  63. package/dist/assets/ExampleSettingsPage-CwdWqoaP.js +1 -0
  64. package/dist/assets/FileUploadDoc-9-UujFNX.js +34 -0
  65. package/dist/assets/FilterBar-DDTqqUfZ.js +1 -0
  66. package/dist/assets/FormDoc-CVES6n3d.js +81 -0
  67. package/dist/assets/FoundationOverview-DT0u11Gz.js +1 -0
  68. package/dist/assets/GridDoc-CbHFSILF.js +28 -0
  69. package/dist/assets/HooksDoc-Ctxdk6Wq.js +665 -0
  70. package/dist/assets/HoverCardDoc-8Wkaafdj.js +31 -0
  71. package/dist/assets/I18nDoc-D3Q2m7ik.js +167 -0
  72. package/dist/assets/IconPickerDoc-DZ26Gdpg.js +10 -0
  73. package/dist/assets/IconsFoundationDoc-xOxtC7CW.js +33 -0
  74. package/dist/assets/InputDoc-BhztAiuJ.js +211 -0
  75. package/dist/assets/LabelDoc-A4hmTRRV.js +42 -0
  76. package/dist/assets/LeadershipDoc-CqOSfWsP.js +452 -0
  77. package/dist/assets/MediaDoc-C78gvC8p.js +459 -0
  78. package/dist/assets/MenubarDoc-DCnmd2tO.js +165 -0
  79. package/dist/assets/ModuleAccessDoc-CmD5nHDp.js +153 -0
  80. package/dist/assets/ModulesDialogDoc-DVit1CA-.js +46 -0
  81. package/dist/assets/MultiselectPermissionsDoc-tlJMs04L.js +34 -0
  82. package/dist/assets/NavigationMenuDoc-q1fbc89j.js +116 -0
  83. package/dist/assets/OnboardingDialogDoc-3A3eBYrq.js +55 -0
  84. package/dist/assets/PaginationDoc-B8-bMz5J.js +27 -0
  85. package/dist/assets/PaginationDoc-BkGdxHL3.js +98 -0
  86. package/dist/assets/PlacesDoc-CKPO6ATs.js +226 -0
  87. package/dist/assets/PopoverDoc-CJPU4Ags.js +64 -0
  88. package/dist/assets/ProgressDoc-CpjbTL4o.js +29 -0
  89. package/dist/assets/QualiexUserFieldDoc-DDwumlRw.js +149 -0
  90. package/dist/assets/RadioGroupDoc-D6tSZz8G.js +57 -0
  91. package/dist/assets/RadiusDoc-B4xSnajw.js +7 -0
  92. package/dist/assets/ReportRequestListDoc-C0LIaU8P.js +15 -0
  93. package/dist/assets/RequiredFieldsCounterDoc-COesoSdx.js +58 -0
  94. package/dist/assets/ResizableDoc-CW0-XQuB.js +104 -0
  95. package/dist/assets/RichTextEditorDoc-C8c_XA9P.js +24 -0
  96. package/dist/assets/ScrollAreaDoc-BxtoAPaZ.js +28 -0
  97. package/dist/assets/SecurityDoc-wOVqpg2F.js +204 -0
  98. package/dist/assets/SelectDoc-C75gtY9D.js +80 -0
  99. package/dist/assets/SeparatorDoc-BjQBPB1P.js +4 -0
  100. package/dist/assets/ServicesDoc-CXTctwBl.js +308 -0
  101. package/dist/assets/ShadowsDoc-C6Lw8_x2.js +9 -0
  102. package/dist/assets/SignDoc-Bh5ZUg5x.js +66 -0
  103. package/dist/assets/SkeletonDoc-rTLGK5VE.js +54 -0
  104. package/dist/assets/SliderDoc-JMAMDub7.js +41 -0
  105. package/dist/assets/SpacingDoc-RljOrpwA.js +12 -0
  106. package/dist/assets/SplitButtonDoc-CvShUW3w.js +53 -0
  107. package/dist/assets/StepSelectorDoc-C-nAap9H.js +41 -0
  108. package/dist/assets/SwitchDoc-DLnqmkPr.js +56 -0
  109. package/dist/assets/TableDoc-B8EpWLVg.js +128 -0
  110. package/dist/assets/TabsDoc-DIBtl_uC.js +42 -0
  111. package/dist/assets/TeamSelectorDoc-B7OnCbL7.js +10 -0
  112. package/dist/assets/TermsOfUseDoc-Bb-pw08s.js +16 -0
  113. package/dist/assets/TextareaDoc-DGnqMqEC.js +46 -0
  114. package/dist/assets/ToastDoc-DjYyc7ae.js +157 -0
  115. package/dist/assets/ToggleDoc-C9ZOVjkY.js +51 -0
  116. package/dist/assets/TooltipDoc-BEx4l9-i.js +58 -0
  117. package/dist/assets/TruncatedCellDoc-BbV1bRSY.js +12 -0
  118. package/dist/assets/TypographyFoundationDoc-CUDYjRo9.js +7 -0
  119. package/dist/assets/UpdatesNotificationDoc-7nyjzLMJ.js +29 -0
  120. package/dist/assets/UsersGroupsSelectorDoc-C0KlTAL5.js +18 -0
  121. package/dist/assets/UtilitiesDoc-DGxaHVV1.js +145 -0
  122. package/dist/assets/ViewerDialogsDoc-CnTPTEz0.js +1 -0
  123. package/dist/assets/blocks-B6LrJeAM.js +1 -0
  124. package/dist/assets/building-DeVappnD.js +1 -0
  125. package/dist/assets/calendar-days-BQ0na5kM.js +1 -0
  126. package/dist/assets/check-check-C_-PJCJa.js +1 -0
  127. package/dist/assets/circle-plus-CpIcep-O.js +1 -0
  128. package/dist/assets/circle-x-jPpBPew0.js +1 -0
  129. package/dist/assets/clipboard-list-CXNPdciZ.js +1 -0
  130. package/dist/assets/cloud-upload-BEjzumjl.js +1 -0
  131. package/dist/assets/crown-CqNsQIsm.js +1 -0
  132. package/dist/assets/date-picker-BW3eGOe_.js +1 -0
  133. package/dist/assets/disabled-menu-item-C2YaMvSt.js +1 -0
  134. package/dist/assets/drawer-D5rflIcD.js +3 -0
  135. package/dist/assets/file-braces-DFb5X9so.js +1 -0
  136. package/dist/assets/file-pen-line-CyUGKkEN.js +1 -0
  137. package/dist/assets/git-branch-BcXv9mpp.js +1 -0
  138. package/dist/assets/globe-CpMIWAcv.js +1 -0
  139. package/dist/assets/hash-cQWdKjya.js +1 -0
  140. package/dist/assets/hourglass-BahQ3eDv.js +1 -0
  141. package/dist/assets/hover-card-R66N85sZ.js +1 -0
  142. package/dist/assets/iframe-dialog-V0mW5aBb.js +1 -0
  143. package/dist/assets/index-DkiftrvI.js +352 -0
  144. package/dist/assets/index-nmBjO9Th.css +1 -0
  145. package/dist/assets/life-buoy-ByXiPddz.js +1 -0
  146. package/dist/assets/loading-state-Cb5_t5uE.js +1 -0
  147. package/dist/assets/lucide-react-Cp3Yw3Zm.js +1 -0
  148. package/dist/assets/package-B3-pVvPM.js +1 -0
  149. package/dist/assets/pen-Bi_lmmKT.js +1 -0
  150. package/dist/assets/pin-DVsSl8QA.js +1 -0
  151. package/dist/assets/printer-BnJ8B6m-.js +1 -0
  152. package/dist/assets/radio-group-BHAaNGsm.js +1 -0
  153. package/dist/assets/server-CtzFTfKR.js +1 -0
  154. package/dist/assets/share-2-Dv8Do445.js +1 -0
  155. package/dist/assets/shield-check-CFXjOV_w.js +1 -0
  156. package/dist/assets/shield-x-DJTRfVux.js +1 -0
  157. package/dist/assets/slider-v9tXBSnB.js +1 -0
  158. package/dist/assets/smartphone-BSNR60L7.js +1 -0
  159. package/dist/assets/step-selector-ATTh_9Wa.js +1 -0
  160. package/dist/assets/text-align-start-qE-MbYYw.js +1 -0
  161. package/dist/assets/thumbs-up-D_XIW_uX.js +1 -0
  162. package/dist/assets/trash-DTWQwpwA.js +1 -0
  163. package/dist/assets/trending-up-jip5-leJ.js +1 -0
  164. package/dist/assets/useMockCrud-CN4vjyOZ.js +1 -0
  165. package/dist/assets/user-check-BlH3EDWK.js +1 -0
  166. package/dist/assets/user-plus-BqwXwD-c.js +1 -0
  167. package/dist/components/modules/ModulesContent.d.ts +7 -3
  168. package/dist/components/modules/ModulesFooterCards.d.ts +3 -1
  169. package/dist/components/modules/types.d.ts +3 -1
  170. package/dist/components/ui/button.d.ts +1 -1
  171. package/dist/components/ui/resizable.d.ts +1 -1
  172. package/dist/exports/crud.d.ts +5 -1
  173. package/dist/exports/ui.d.ts +8 -1
  174. package/dist/index.css +1 -1
  175. package/dist/index.css.map +1 -1
  176. package/dist/index.d.ts +1 -0
  177. package/dist/index.esm.js +1 -1
  178. package/dist/index.html +33 -0
  179. package/dist/index.js +1 -1
  180. package/dist/setup/favicon.d.ts +1 -0
  181. package/docs/PUBLISH.md +3 -3
  182. package/package.json +1 -5
  183. package/dist/README.md +0 -1079
  184. package/dist/bin/bootstrap.js +0 -40
  185. package/dist/bin/pull-docs.js +0 -186
  186. package/dist/docs/KNOWLEDGE.md +0 -109
@@ -0,0 +1,104 @@
1
+ import{r as d,go as wn,j as m,o as en,dL as En}from"./index-DkiftrvI.js";import{C as Nn}from"./ComponentDocTemplate-CQbBhfvZ.js";import"./ExampleCard-DuLrb3t-.js";const Ce=d.createContext(null);Ce.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Fe=10,ie=d.useLayoutEffect,qe=wn.useId,Cn=typeof qe=="function"?qe:()=>null;let In=0;function Be(e=null){const n=Cn(),t=d.useRef(e||n||null);return t.current===null&&(t.current=""+In++),e??t.current}function nn({children:e,className:n="",collapsedSize:t,collapsible:i,defaultSize:o,forwardedRef:a,id:r,maxSize:l,minSize:s,onCollapse:x,onExpand:w,onResize:p,order:u,style:y,tagName:g="div",...N}){const E=d.useContext(Ce);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:P,expandPanel:L,getPanelSize:j,getPanelStyle:M,groupId:K,isPanelCollapsed:I,reevaluatePanelConstraints:R,registerPanel:V,resizePanel:J,unregisterPanel:B}=E,G=Be(r),k=d.useRef({callbacks:{onCollapse:x,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:i,defaultSize:o,maxSize:l,minSize:s},id:G,idIsFromProps:r!==void 0,order:u});d.useRef({didLogMissingDefaultSizeWarning:!1}),ie(()=>{const{callbacks:_,constraints:$}=k.current,T={...$};k.current.id=G,k.current.idIsFromProps=r!==void 0,k.current.order=u,_.onCollapse=x,_.onExpand=w,_.onResize=p,$.collapsedSize=t,$.collapsible=i,$.defaultSize=o,$.maxSize=l,$.minSize=s,(T.collapsedSize!==$.collapsedSize||T.collapsible!==$.collapsible||T.maxSize!==$.maxSize||T.minSize!==$.minSize)&&R(k.current,T)}),ie(()=>{const _=k.current;return V(_),()=>{B(_)}},[u,G,V,B]),d.useImperativeHandle(a,()=>({collapse:()=>{P(k.current)},expand:_=>{L(k.current,_)},getId(){return G},getSize(){return j(k.current)},isCollapsed(){return I(k.current)},isExpanded(){return!I(k.current)},resize:_=>{J(k.current,_)}}),[P,L,j,I,G,J]);const ne=M(k.current,o);return d.createElement(g,{...N,children:e,className:n,id:G,style:{...ne,...y},[A.groupId]:K,[A.panel]:"",[A.panelCollapsible]:i||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+ne.flexGrow).toFixed(1)})}const tn=d.forwardRef((e,n)=>d.createElement(nn,{...e,forwardedRef:n}));nn.displayName="Panel";tn.displayName="forwardRef(Panel)";let Te=null,Re=-1,Q=null;function Ln(e,n,t){const i=(n&sn)!==0,o=(n&un)!==0,a=(n&cn)!==0,r=(n&dn)!==0;if(n){if(i)return a?"se-resize":r?"ne-resize":"e-resize";if(o)return a?"sw-resize":r?"nw-resize":"w-resize";if(a)return"s-resize";if(r)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Hn(){Q!==null&&(document.head.removeChild(Q),Te=null,Q=null,Re=-1)}function je(e,n,t){var i,o;const a=Ln(e,n);if(Te!==a){if(Te=a,Q===null&&(Q=document.createElement("style"),document.head.appendChild(Q)),Re>=0){var r;(r=Q.sheet)===null||r===void 0||r.removeRule(Re)}Re=(i=(o=Q.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${a} !important;}`))!==null&&i!==void 0?i:-1}}function an(e){return e.type==="keydown"}function on(e){return e.type.startsWith("pointer")}function rn(e){return e.type.startsWith("mouse")}function Ie(e){if(on(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(rn(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function An(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function kn(e,n,t){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function jn(e,n){if(e===n)throw new Error("Cannot compare node with itself");const t={a:Xe(e),b:Xe(n)};let i;for(;t.a.at(-1)===t.b.at(-1);)e=t.a.pop(),n=t.b.pop(),i=e;v(i,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Oe(Ke(t.a)),b:Oe(Ke(t.b))};if(o.a===o.b){const a=i.childNodes,r={a:t.a.at(-1),b:t.b.at(-1)};let l=a.length;for(;l--;){const s=a[l];if(s===r.a)return 1;if(s===r.b)return-1}}return Math.sign(o.a-o.b)}const Dn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(e){var n;const t=getComputedStyle((n=ln(e))!==null&&n!==void 0?n:e).display;return t==="flex"||t==="inline-flex"}function $n(e){const n=getComputedStyle(e);return!!(n.position==="fixed"||n.zIndex!=="auto"&&(n.position!=="static"||Mn(e))||+n.opacity<1||"transform"in n&&n.transform!=="none"||"webkitTransform"in n&&n.webkitTransform!=="none"||"mixBlendMode"in n&&n.mixBlendMode!=="normal"||"filter"in n&&n.filter!=="none"||"webkitFilter"in n&&n.webkitFilter!=="none"||"isolation"in n&&n.isolation==="isolate"||Dn.test(n.willChange)||n.webkitOverflowScrolling==="touch")}function Ke(e){let n=e.length;for(;n--;){const t=e[n];if(v(t,"Missing node"),$n(t))return t}return null}function Oe(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Xe(e){const n=[];for(;e;)n.push(e),e=ln(e);return n}function ln(e){const{parentNode:n}=e;return n&&n instanceof ShadowRoot?n.host:n}const sn=1,un=2,cn=4,dn=8,_n=An()==="coarse";let q=[],ue=!1,ee=new Map,Le=new Map;const ge=new Set;function Gn(e,n,t,i,o){var a;const{ownerDocument:r}=n,l={direction:t,element:n,hitAreaMargins:i,setResizeHandlerState:o},s=(a=ee.get(r))!==null&&a!==void 0?a:0;return ee.set(r,s+1),ge.add(l),we(),function(){var w;Le.delete(e),ge.delete(l);const p=(w=ee.get(r))!==null&&w!==void 0?w:1;if(ee.set(r,p-1),we(),p===1&&ee.delete(r),q.includes(l)){const u=q.indexOf(l);u>=0&&q.splice(u,1),He(),o("up",!0,null)}}}function Tn(e){const{target:n}=e,{x:t,y:i}=Ie(e);ue=!0,Ue({target:n,x:t,y:i}),we(),q.length>0&&(Ee("down",e),He(),e.preventDefault(),fn(n)||e.stopImmediatePropagation())}function De(e){const{x:n,y:t}=Ie(e);if(ue&&e.type!=="pointerleave"&&e.buttons===0&&(ue=!1,Ee("up",e)),!ue){const{target:i}=e;Ue({target:i,x:n,y:t})}Ee("move",e),He(),q.length>0&&e.preventDefault()}function Me(e){const{target:n}=e,{x:t,y:i}=Ie(e);Le.clear(),ue=!1,q.length>0&&(e.preventDefault(),fn(n)||e.stopImmediatePropagation()),Ee("up",e),Ue({target:n,x:t,y:i}),He(),we()}function fn(e){let n=e;for(;n;){if(n.hasAttribute(A.resizeHandle))return!0;n=n.parentElement}return!1}function Ue({target:e,x:n,y:t}){q.splice(0);let i=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(i=e),ge.forEach(o=>{const{element:a,hitAreaMargins:r}=o,l=a.getBoundingClientRect(),{bottom:s,left:x,right:w,top:p}=l,u=_n?r.coarse:r.fine;if(n>=x-u&&n<=w+u&&t>=p-u&&t<=s+u){if(i!==null&&document.contains(i)&&a!==i&&!a.contains(i)&&!i.contains(a)&&jn(i,a)>0){let g=i,N=!1;for(;g&&!g.contains(a);){if(kn(g.getBoundingClientRect(),l)){N=!0;break}g=g.parentElement}if(N)return}q.push(o)}})}function $e(e,n){Le.set(e,n)}function He(){let e=!1,n=!1;q.forEach(i=>{const{direction:o}=i;o==="horizontal"?e=!0:n=!0});let t=0;Le.forEach(i=>{t|=i}),e&&n?je("intersection",t):e?je("horizontal",t):n?je("vertical",t):Hn()}let _e;function we(){var e;(e=_e)===null||e===void 0||e.abort(),_e=new AbortController;const n={capture:!0,signal:_e.signal};ge.size&&(ue?(q.length>0&&ee.forEach((t,i)=>{const{body:o}=i;t>0&&(o.addEventListener("contextmenu",Me,n),o.addEventListener("pointerleave",De,n),o.addEventListener("pointermove",De,n))}),ee.forEach((t,i)=>{const{body:o}=i;o.addEventListener("pointerup",Me,n),o.addEventListener("pointercancel",Me,n)})):ee.forEach((t,i)=>{const{body:o}=i;t>0&&(o.addEventListener("pointerdown",Tn,n),o.addEventListener("pointermove",De,n))}))}function Ee(e,n){ge.forEach(t=>{const{setResizeHandlerState:i}=t,o=q.includes(t);i(e,o,n)})}function Fn(){const[e,n]=d.useState(0);return d.useCallback(()=>n(t=>t+1),[])}function v(e,n){if(!e)throw console.error(n),Error(n)}function ae(e,n,t=Fe){return e.toFixed(t)===n.toFixed(t)?0:e>n?1:-1}function Y(e,n,t=Fe){return ae(e,n,t)===0}function U(e,n,t){return ae(e,n,t)===0}function Bn(e,n,t){if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++){const o=e[i],a=n[i];if(!U(o,a,t))return!1}return!0}function se({panelConstraints:e,panelIndex:n,size:t}){const i=e[n];v(i!=null,`Panel constraints not found for index ${n}`);let{collapsedSize:o=0,collapsible:a,maxSize:r=100,minSize:l=0}=i;if(ae(t,l)<0)if(a){const s=(o+l)/2;ae(t,s)<0?t=o:t=l}else t=l;return t=Math.min(r,t),t=parseFloat(t.toFixed(Fe)),t}function ze({delta:e,initialLayout:n,panelConstraints:t,pivotIndices:i,prevLayout:o,trigger:a}){if(U(e,0))return n;const r=[...n],[l,s]=i;v(l!=null,"Invalid first pivot index"),v(s!=null,"Invalid second pivot index");let x=0;if(a==="keyboard"){{const p=e<0?s:l,u=t[p];v(u,`Panel constraints not found for index ${p}`);const{collapsedSize:y=0,collapsible:g,minSize:N=0}=u;if(g){const E=n[p];if(v(E!=null,`Previous layout not found for panel index ${p}`),U(E,y)){const P=N-E;ae(P,Math.abs(e))>0&&(e=e<0?0-P:P)}}}{const p=e<0?l:s,u=t[p];v(u,`No panel constraints found for index ${p}`);const{collapsedSize:y=0,collapsible:g,minSize:N=0}=u;if(g){const E=n[p];if(v(E!=null,`Previous layout not found for panel index ${p}`),U(E,N)){const P=E-y;ae(P,Math.abs(e))>0&&(e=e<0?0-P:P)}}}}{const p=e<0?1:-1;let u=e<0?s:l,y=0;for(;;){const N=n[u];v(N!=null,`Previous layout not found for panel index ${u}`);const P=se({panelConstraints:t,panelIndex:u,size:100})-N;if(y+=P,u+=p,u<0||u>=t.length)break}const g=Math.min(Math.abs(e),Math.abs(y));e=e<0?0-g:g}{let u=e<0?l:s;for(;u>=0&&u<t.length;){const y=Math.abs(e)-Math.abs(x),g=n[u];v(g!=null,`Previous layout not found for panel index ${u}`);const N=g-y,E=se({panelConstraints:t,panelIndex:u,size:N});if(!U(g,E)&&(x+=g-E,r[u]=E,x.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?u--:u++}}if(Bn(o,r))return o;{const p=e<0?s:l,u=n[p];v(u!=null,`Previous layout not found for panel index ${p}`);const y=u+x,g=se({panelConstraints:t,panelIndex:p,size:y});if(r[p]=g,!U(g,y)){let N=y-g,P=e<0?s:l;for(;P>=0&&P<t.length;){const L=r[P];v(L!=null,`Previous layout not found for panel index ${P}`);const j=L+N,M=se({panelConstraints:t,panelIndex:P,size:j});if(U(L,M)||(N-=M-L,r[P]=M),U(N,0))break;e>0?P--:P++}}}const w=r.reduce((p,u)=>u+p,0);return U(w,100)?r:o}function Un({layout:e,panelsArray:n,pivotIndices:t}){let i=0,o=100,a=0,r=0;const l=t[0];v(l!=null,"No pivot index found"),n.forEach((p,u)=>{const{constraints:y}=p,{maxSize:g=100,minSize:N=0}=y;u===l?(i=N,o=g):(a+=N,r+=g)});const s=Math.min(o,100-a),x=Math.max(i,100-r),w=e[l];return{valueMax:s,valueMin:x,valueNow:w}}function be(e,n=document){return Array.from(n.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${e}"]`))}function pn(e,n,t=document){const o=be(e,t).findIndex(a=>a.getAttribute(A.resizeHandleId)===n);return o??null}function mn(e,n,t){const i=pn(e,n,t);return i!=null?[i,i+1]:[-1,-1]}function Vn(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function hn(e,n=document){if(Vn(n)&&n.dataset.panelGroupId==e)return n;const t=n.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return t||null}function Ae(e,n=document){const t=n.querySelector(`[${A.resizeHandleId}="${e}"]`);return t||null}function Wn(e,n,t,i=document){var o,a,r,l;const s=Ae(n,i),x=be(e,i),w=s?x.indexOf(s):-1,p=(o=(a=t[w])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null,u=(r=(l=t[w+1])===null||l===void 0?void 0:l.id)!==null&&r!==void 0?r:null;return[p,u]}function qn({committedValuesRef:e,eagerValuesRef:n,groupId:t,layout:i,panelDataArray:o,panelGroupElement:a,setLayout:r}){d.useRef({didWarnAboutMissingResizeHandle:!1}),ie(()=>{if(!a)return;const l=be(t,a);for(let s=0;s<o.length-1;s++){const{valueMax:x,valueMin:w,valueNow:p}=Un({layout:i,panelsArray:o,pivotIndices:[s,s+1]}),u=l[s];if(u!=null){const y=o[s];v(y,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",y.id),u.setAttribute("aria-valuemax",""+Math.round(x)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{l.forEach((s,x)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,i,o,a]),d.useEffect(()=>{if(!a)return;const l=n.current;v(l,"Eager values not found");const{panelDataArray:s}=l,x=hn(t,a);v(x!=null,`No group found for id "${t}"`);const w=be(t,a);v(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const y=u.getAttribute(A.resizeHandleId);v(y,"Resize handle element has no handle id attribute");const[g,N]=Wn(t,y,s,a);if(g==null||N==null)return()=>{};const E=P=>{if(!P.defaultPrevented)switch(P.key){case"Enter":{P.preventDefault();const L=s.findIndex(j=>j.id===g);if(L>=0){const j=s[L];v(j,`No panel data found for index ${L}`);const M=i[L],{collapsedSize:K=0,collapsible:I,minSize:R=0}=j.constraints;if(M!=null&&I){const V=ze({delta:U(M,K)?R-K:K-M,initialLayout:i,panelConstraints:s.map(J=>J.constraints),pivotIndices:mn(t,y,a),prevLayout:i,trigger:"keyboard"});i!==V&&r(V)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[a,e,n,t,i,o,r])}function Je(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function zn(e,n){const t=e==="horizontal",{x:i,y:o}=Ie(n);return t?i:o}function Kn(e,n,t,i,o){const a=t==="horizontal",r=Ae(n,o);v(r,`No resize handle element found for id "${n}"`);const l=r.getAttribute(A.groupId);v(l,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=i;const x=zn(t,e),w=hn(l,o);v(w,`No group element found for id "${l}"`);const p=w.getBoundingClientRect(),u=a?p.width:p.height;return(x-s)/u*100}function On(e,n,t,i,o,a){if(an(e)){const r=t==="horizontal";let l=0;e.shiftKey?l=100:o!=null?l=o:l=10;let s=0;switch(e.key){case"ArrowDown":s=r?0:l;break;case"ArrowLeft":s=r?-l:0;break;case"ArrowRight":s=r?l:0;break;case"ArrowUp":s=r?0:-l;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return i==null?0:Kn(e,n,t,i,a)}function Xn({panelDataArray:e}){const n=Array(e.length),t=e.map(a=>a.constraints);let i=0,o=100;for(let a=0;a<e.length;a++){const r=t[a];v(r,`Panel constraints not found for index ${a}`);const{defaultSize:l}=r;l!=null&&(i++,n[a]=l,o-=l)}for(let a=0;a<e.length;a++){const r=t[a];v(r,`Panel constraints not found for index ${a}`);const{defaultSize:l}=r;if(l!=null)continue;const s=e.length-i,x=o/s;i++,n[a]=x,o-=x}return n}function re(e,n,t){n.forEach((i,o)=>{const a=e[o];v(a,`Panel data not found for index ${o}`);const{callbacks:r,constraints:l,id:s}=a,{collapsedSize:x=0,collapsible:w}=l,p=t[s];if(p==null||i!==p){t[s]=i;const{onCollapse:u,onExpand:y,onResize:g}=r;g&&g(i,p),w&&(u||y)&&(y&&(p==null||Y(p,x))&&!Y(i,x)&&y(),u&&(p==null||!Y(p,x))&&Y(i,x)&&u())}})}function Pe(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!=n[t])return!1;return!0}function Jn({defaultSize:e,dragState:n,layout:t,panelData:i,panelIndex:o,precision:a=3}){const r=t[o];let l;return r==null?l=e!=null?e.toFixed(a):"1":i.length===1?l="1":l=r.toFixed(a),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:n!==null?"none":void 0}}function Yn(e,n=10){let t=null;return(...o)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{e(...o)},n)}}function Ye(e){try{if(typeof localStorage<"u")e.getItem=n=>localStorage.getItem(n),e.setItem=(n,t)=>{localStorage.setItem(n,t)};else throw new Error("localStorage not supported in this environment")}catch(n){console.error(n),e.getItem=()=>null,e.setItem=()=>{}}}function xn(e){return`react-resizable-panels:${e}`}function gn(e){return e.map(n=>{const{constraints:t,id:i,idIsFromProps:o,order:a}=n;return o?i:a?`${a}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((n,t)=>n.localeCompare(t)).join(",")}function bn(e,n){try{const t=xn(e),i=n.getItem(t);if(i){const o=JSON.parse(i);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function Zn(e,n,t){var i,o;const a=(i=bn(e,t))!==null&&i!==void 0?i:{},r=gn(n);return(o=a[r])!==null&&o!==void 0?o:null}function Qn(e,n,t,i,o){var a;const r=xn(e),l=gn(n),s=(a=bn(e,o))!==null&&a!==void 0?a:{};s[l]={expandToSizes:Object.fromEntries(t.entries()),layout:i};try{o.setItem(r,JSON.stringify(s))}catch(x){console.error(x)}}function Ze({layout:e,panelConstraints:n}){const t=[...e],i=t.reduce((a,r)=>a+r,0);if(t.length!==n.length)throw Error(`Invalid ${n.length} panel layout: ${t.map(a=>`${a}%`).join(", ")}`);if(!U(i,100)&&t.length>0)for(let a=0;a<n.length;a++){const r=t[a];v(r!=null,`No layout data found for index ${a}`);const l=100/i*r;t[a]=l}let o=0;for(let a=0;a<n.length;a++){const r=t[a];v(r!=null,`No layout data found for index ${a}`);const l=se({panelConstraints:n,panelIndex:a,size:r});r!=l&&(o+=r-l,t[a]=l)}if(!U(o,0))for(let a=0;a<n.length;a++){const r=t[a];v(r!=null,`No layout data found for index ${a}`);const l=r+o,s=se({panelConstraints:n,panelIndex:a,size:l});if(r!==s&&(o-=s-r,t[a]=s,U(o,0)))break}return t}const et=100,xe={getItem:e=>(Ye(xe),xe.getItem(e)),setItem:(e,n)=>{Ye(xe),xe.setItem(e,n)}},Qe={};function vn({autoSaveId:e=null,children:n,className:t="",direction:i,forwardedRef:o,id:a=null,onLayout:r=null,keyboardResizeBy:l=null,storage:s=xe,style:x,tagName:w="div",...p}){const u=Be(a),y=d.useRef(null),[g,N]=d.useState(null),[E,P]=d.useState([]),L=Fn(),j=d.useRef({}),M=d.useRef(new Map),K=d.useRef(0),I=d.useRef({autoSaveId:e,direction:i,dragState:g,id:u,keyboardResizeBy:l,onLayout:r,storage:s}),R=d.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});d.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),d.useImperativeHandle(o,()=>({getId:()=>I.current.id,getLayout:()=>{const{layout:c}=R.current;return c},setLayout:c=>{const{onLayout:z}=I.current,{layout:S,panelDataArray:h}=R.current,f=Ze({layout:c,panelConstraints:h.map(b=>b.constraints)});Je(S,f)||(P(f),R.current.layout=f,z&&z(f),re(h,f,j.current))}}),[]),ie(()=>{I.current.autoSaveId=e,I.current.direction=i,I.current.dragState=g,I.current.id=u,I.current.onLayout=r,I.current.storage=s}),qn({committedValuesRef:I,eagerValuesRef:R,groupId:u,layout:E,panelDataArray:R.current.panelDataArray,setLayout:P,panelGroupElement:y.current}),d.useEffect(()=>{const{panelDataArray:c}=R.current;if(e){if(E.length===0||E.length!==c.length)return;let z=Qe[e];z==null&&(z=Yn(Qn,et),Qe[e]=z);const S=[...c],h=new Map(M.current);z(e,S,h,E,s)}},[e,E,s]),d.useEffect(()=>{});const V=d.useCallback(c=>{const{onLayout:z}=I.current,{layout:S,panelDataArray:h}=R.current;if(c.constraints.collapsible){const f=h.map(O=>O.constraints),{collapsedSize:b=0,panelSize:C,pivotIndices:D}=te(h,c,S);if(v(C!=null,`Panel size not found for panel "${c.id}"`),!Y(C,b)){M.current.set(c.id,C);const X=le(h,c)===h.length-1?C-b:b-C,H=ze({delta:X,initialLayout:S,panelConstraints:f,pivotIndices:D,prevLayout:S,trigger:"imperative-api"});Pe(S,H)||(P(H),R.current.layout=H,z&&z(H),re(h,H,j.current))}}},[]),J=d.useCallback((c,z)=>{const{onLayout:S}=I.current,{layout:h,panelDataArray:f}=R.current;if(c.constraints.collapsible){const b=f.map(W=>W.constraints),{collapsedSize:C=0,panelSize:D=0,minSize:O=0,pivotIndices:X}=te(f,c,h),H=z??O;if(Y(D,C)){const W=M.current.get(c.id),me=W!=null&&W>=H?W:H,ke=le(f,c)===f.length-1?D-me:me-D,F=ze({delta:ke,initialLayout:h,panelConstraints:b,pivotIndices:X,prevLayout:h,trigger:"imperative-api"});Pe(h,F)||(P(F),R.current.layout=F,S&&S(F),re(f,F,j.current))}}},[]),B=d.useCallback(c=>{const{layout:z,panelDataArray:S}=R.current,{panelSize:h}=te(S,c,z);return v(h!=null,`Panel size not found for panel "${c.id}"`),h},[]),G=d.useCallback((c,z)=>{const{panelDataArray:S}=R.current,h=le(S,c);return Jn({defaultSize:z,dragState:g,layout:E,panelData:S,panelIndex:h})},[g,E]),k=d.useCallback(c=>{const{layout:z,panelDataArray:S}=R.current,{collapsedSize:h=0,collapsible:f,panelSize:b}=te(S,c,z);return v(b!=null,`Panel size not found for panel "${c.id}"`),f===!0&&Y(b,h)},[]),ne=d.useCallback(c=>{const{layout:z,panelDataArray:S}=R.current,{collapsedSize:h=0,collapsible:f,panelSize:b}=te(S,c,z);return v(b!=null,`Panel size not found for panel "${c.id}"`),!f||ae(b,h)>0},[]),_=d.useCallback(c=>{const{panelDataArray:z}=R.current;z.push(c),z.sort((S,h)=>{const f=S.order,b=h.order;return f==null&&b==null?0:f==null?-1:b==null?1:f-b}),R.current.panelDataArrayChanged=!0,L()},[L]);ie(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:z,storage:S}=I.current,{layout:h,panelDataArray:f}=R.current;let b=null;if(c){const D=Zn(c,f,S);D&&(M.current=new Map(Object.entries(D.expandToSizes)),b=D.layout)}b==null&&(b=Xn({panelDataArray:f}));const C=Ze({layout:b,panelConstraints:f.map(D=>D.constraints)});Je(h,C)||(P(C),R.current.layout=C,z&&z(C),re(f,C,j.current))}}),ie(()=>{const c=R.current;return()=>{c.layout=[]}},[]);const $=d.useCallback(c=>{let z=!1;const S=y.current;return S&&window.getComputedStyle(S,null).getPropertyValue("direction")==="rtl"&&(z=!0),function(f){f.preventDefault();const b=y.current;if(!b)return()=>null;const{direction:C,dragState:D,id:O,keyboardResizeBy:X,onLayout:H}=I.current,{layout:W,panelDataArray:me}=R.current,{initialLayout:Se}=D??{},ke=mn(O,c,b);let F=On(f,c,C,D,X,b);const Ve=C==="horizontal";Ve&&z&&(F=-F);const Pn=me.map(Rn=>Rn.constraints),he=ze({delta:F,initialLayout:Se??W,panelConstraints:Pn,pivotIndices:ke,prevLayout:W,trigger:an(f)?"keyboard":"mouse-or-touch"}),We=!Pe(W,he);(on(f)||rn(f))&&K.current!=F&&(K.current=F,!We&&F!==0?Ve?$e(c,F<0?sn:un):$e(c,F<0?cn:dn):$e(c,0)),We&&(P(he),R.current.layout=he,H&&H(he),re(me,he,j.current))}},[]),T=d.useCallback((c,z)=>{const{onLayout:S}=I.current,{layout:h,panelDataArray:f}=R.current,b=f.map(W=>W.constraints),{panelSize:C,pivotIndices:D}=te(f,c,h);v(C!=null,`Panel size not found for panel "${c.id}"`);const X=le(f,c)===f.length-1?C-z:z-C,H=ze({delta:X,initialLayout:h,panelConstraints:b,pivotIndices:D,prevLayout:h,trigger:"imperative-api"});Pe(h,H)||(P(H),R.current.layout=H,S&&S(H),re(f,H,j.current))},[]),ce=d.useCallback((c,z)=>{const{layout:S,panelDataArray:h}=R.current,{collapsedSize:f=0,collapsible:b}=z,{collapsedSize:C=0,collapsible:D,maxSize:O=100,minSize:X=0}=c.constraints,{panelSize:H}=te(h,c,S);H!=null&&(b&&D&&Y(H,f)?Y(f,C)||T(c,C):H<X?T(c,X):H>O&&T(c,O))},[T]),de=d.useCallback((c,z)=>{const{direction:S}=I.current,{layout:h}=R.current;if(!y.current)return;const f=Ae(c,y.current);v(f,`Drag handle element not found for id "${c}"`);const b=zn(S,z);N({dragHandleId:c,dragHandleRect:f.getBoundingClientRect(),initialCursorPosition:b,initialLayout:h})},[]),fe=d.useCallback(()=>{N(null)},[]),ye=d.useCallback(c=>{const{panelDataArray:z}=R.current,S=le(z,c);S>=0&&(z.splice(S,1),delete j.current[c.id],R.current.panelDataArrayChanged=!0,L())},[L]),oe=d.useMemo(()=>({collapsePanel:V,direction:i,dragState:g,expandPanel:J,getPanelSize:B,getPanelStyle:G,groupId:u,isPanelCollapsed:k,isPanelExpanded:ne,reevaluatePanelConstraints:ce,registerPanel:_,registerResizeHandle:$,resizePanel:T,startDragging:de,stopDragging:fe,unregisterPanel:ye,panelGroupElement:y.current}),[V,g,i,J,B,G,u,k,ne,ce,_,$,T,de,fe,ye]),pe={display:"flex",flexDirection:i==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return d.createElement(Ce.Provider,{value:oe},d.createElement(w,{...p,children:n,className:t,id:a,ref:y,style:{...pe,...x},[A.group]:"",[A.groupDirection]:i,[A.groupId]:u}))}const yn=d.forwardRef((e,n)=>d.createElement(vn,{...e,forwardedRef:n}));vn.displayName="PanelGroup";yn.displayName="forwardRef(PanelGroup)";function le(e,n){return e.findIndex(t=>t===n||t.id===n.id)}function te(e,n,t){const i=le(e,n),a=i===e.length-1?[i-1,i]:[i,i+1],r=t[i];return{...n.constraints,panelSize:r,pivotIndices:a}}function nt({disabled:e,handleId:n,resizeHandler:t,panelGroupElement:i}){d.useEffect(()=>{if(e||t==null||i==null)return;const o=Ae(n,i);if(o==null)return;const a=r=>{if(!r.defaultPrevented)switch(r.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{r.preventDefault(),t(r);break}case"F6":{r.preventDefault();const l=o.getAttribute(A.groupId);v(l,`No group element found for id "${l}"`);const s=be(l,i),x=pn(l,n,i);v(x!==null,`No resize element found for id "${n}"`);const w=r.shiftKey?x>0?x-1:s.length-1:x+1<s.length?x+1:0;s[w].focus();break}}};return o.addEventListener("keydown",a),()=>{o.removeEventListener("keydown",a)}},[i,e,n,t])}function Sn({children:e=null,className:n="",disabled:t=!1,hitAreaMargins:i,id:o,onBlur:a,onClick:r,onDragging:l,onFocus:s,onPointerDown:x,onPointerUp:w,style:p={},tabIndex:u=0,tagName:y="div",...g}){var N,E;const P=d.useRef(null),L=d.useRef({onClick:r,onDragging:l,onPointerDown:x,onPointerUp:w});d.useEffect(()=>{L.current.onClick=r,L.current.onDragging=l,L.current.onPointerDown=x,L.current.onPointerUp=w});const j=d.useContext(Ce);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:M,groupId:K,registerResizeHandle:I,startDragging:R,stopDragging:V,panelGroupElement:J}=j,B=Be(o),[G,k]=d.useState("inactive"),[ne,_]=d.useState(!1),[$,T]=d.useState(null),ce=d.useRef({state:G});ie(()=>{ce.current.state=G}),d.useEffect(()=>{if(t)T(null);else{const oe=I(B);T(()=>oe)}},[t,B,I]);const de=(N=i?.coarse)!==null&&N!==void 0?N:15,fe=(E=i?.fine)!==null&&E!==void 0?E:5;d.useEffect(()=>{if(t||$==null)return;const oe=P.current;v(oe,"Element ref not attached");let pe=!1;return Gn(B,oe,M,{coarse:de,fine:fe},(z,S,h)=>{if(!S){k("inactive");return}switch(z){case"down":{k("drag"),pe=!1,v(h,'Expected event to be defined for "down" action'),R(B,h);const{onDragging:f,onPointerDown:b}=L.current;f?.(!0),b?.();break}case"move":{const{state:f}=ce.current;pe=!0,f!=="drag"&&k("hover"),v(h,'Expected event to be defined for "move" action'),$(h);break}case"up":{k("hover"),V();const{onClick:f,onDragging:b,onPointerUp:C}=L.current;b?.(!1),C?.(),pe||f?.();break}}})},[de,M,t,fe,I,B,$,R,V]),nt({disabled:t,handleId:B,resizeHandler:$,panelGroupElement:J});const ye={touchAction:"none",userSelect:"none"};return d.createElement(y,{...g,children:e,className:n,id:o,onBlur:()=>{_(!1),a?.()},onFocus:()=>{_(!0),s?.()},ref:P,role:"separator",style:{...ye,...p},tabIndex:u,[A.groupDirection]:M,[A.groupId]:K,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":ne?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:B,[A.resizeHandleState]:G})}Sn.displayName="PanelResizeHandle";const Ne=({className:e,...n})=>m.jsx(yn,{className:en("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...n}),Z=tn,ve=({withHandle:e,className:n,...t})=>m.jsx(Sn,{className:en("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),...t,children:e&&m.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:m.jsx(En,{className:"h-2.5 w-2.5"})})}),tt=`import {
2
+ ResizablePanelGroup,
3
+ ResizablePanel,
4
+ ResizableHandle
5
+ } from 'forlogic-core/modular';
6
+
7
+ function ResizableLayout() {
8
+ return (
9
+ <ResizablePanelGroup direction="horizontal" className="min-h-[200px]">
10
+ <ResizablePanel defaultSize={25}>
11
+ <div className="p-4">Painel Esquerdo</div>
12
+ </ResizablePanel>
13
+ <ResizableHandle withHandle />
14
+ <ResizablePanel defaultSize={75}>
15
+ <div className="p-4">Painel Direito</div>
16
+ </ResizablePanel>
17
+ </ResizablePanelGroup>
18
+ );
19
+ }`,it=`// Layout horizontal (padrão)
20
+ <ResizablePanelGroup direction="horizontal" className="min-h-[200px] border rounded-lg">
21
+ <ResizablePanel defaultSize={30} minSize={20}>
22
+ <div className="h-full bg-muted/50 p-4">
23
+ <h4 className="font-medium">Sidebar</h4>
24
+ <p className="text-sm text-muted-foreground">Largura mínima 20%</p>
25
+ </div>
26
+ </ResizablePanel>
27
+ <ResizableHandle withHandle />
28
+ <ResizablePanel defaultSize={70}>
29
+ <div className="h-full p-4">
30
+ <h4 className="font-medium">Conteúdo Principal</h4>
31
+ <p className="text-sm text-muted-foreground">Área redimensionável</p>
32
+ </div>
33
+ </ResizablePanel>
34
+ </ResizablePanelGroup>`,at=`// Layout vertical
35
+ <ResizablePanelGroup direction="vertical" className="min-h-[400px] border rounded-lg">
36
+ <ResizablePanel defaultSize={25}>
37
+ <div className="h-full bg-muted/50 p-4">
38
+ <h4 className="font-medium">Header</h4>
39
+ </div>
40
+ </ResizablePanel>
41
+ <ResizableHandle withHandle />
42
+ <ResizablePanel defaultSize={50}>
43
+ <div className="h-full p-4">
44
+ <h4 className="font-medium">Conteúdo</h4>
45
+ </div>
46
+ </ResizablePanel>
47
+ <ResizableHandle withHandle />
48
+ <ResizablePanel defaultSize={25}>
49
+ <div className="h-full bg-muted/50 p-4">
50
+ <h4 className="font-medium">Footer</h4>
51
+ </div>
52
+ </ResizablePanel>
53
+ </ResizablePanelGroup>`,ot=`// Layout aninhado (horizontal + vertical)
54
+ <ResizablePanelGroup direction="horizontal" className="min-h-[400px] border rounded-lg">
55
+ <ResizablePanel defaultSize={25} minSize={15}>
56
+ <div className="h-full bg-muted/50 p-4">
57
+ <h4 className="font-medium">Navegação</h4>
58
+ </div>
59
+ </ResizablePanel>
60
+ <ResizableHandle />
61
+ <ResizablePanel defaultSize={75}>
62
+ <ResizablePanelGroup direction="vertical">
63
+ <ResizablePanel defaultSize={70}>
64
+ <div className="h-full p-4">
65
+ <h4 className="font-medium">Editor</h4>
66
+ </div>
67
+ </ResizablePanel>
68
+ <ResizableHandle withHandle />
69
+ <ResizablePanel defaultSize={30}>
70
+ <div className="h-full bg-muted/30 p-4">
71
+ <h4 className="font-medium">Terminal</h4>
72
+ </div>
73
+ </ResizablePanel>
74
+ </ResizablePanelGroup>
75
+ </ResizablePanel>
76
+ </ResizablePanelGroup>`,rt=`// Persistir tamanhos com onLayout
77
+ import { useState, useEffect } from 'react';
78
+
79
+ function PersistentLayout() {
80
+ const [sizes, setSizes] = useState<number[]>(() => {
81
+ const saved = localStorage.getItem('panel-sizes');
82
+ return saved ? JSON.parse(saved) : [25, 75];
83
+ });
84
+
85
+ const handleLayout = (newSizes: number[]) => {
86
+ setSizes(newSizes);
87
+ localStorage.setItem('panel-sizes', JSON.stringify(newSizes));
88
+ };
89
+
90
+ return (
91
+ <ResizablePanelGroup
92
+ direction="horizontal"
93
+ onLayout={handleLayout}
94
+ >
95
+ <ResizablePanel defaultSize={sizes[0]}>
96
+ Painel 1
97
+ </ResizablePanel>
98
+ <ResizableHandle />
99
+ <ResizablePanel defaultSize={sizes[1]}>
100
+ Painel 2
101
+ </ResizablePanel>
102
+ </ResizablePanelGroup>
103
+ );
104
+ }`;function Ge(){return m.jsxs(Ne,{direction:"horizontal",className:"min-h-[200px] border rounded-lg",children:[m.jsx(Z,{defaultSize:30,minSize:20,children:m.jsxs("div",{className:"h-full bg-muted/50 p-4 flex flex-col justify-center",children:[m.jsx("h4",{className:"font-medium text-sm",children:"Sidebar"}),m.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Largura mínima 20%"})]})}),m.jsx(ve,{withHandle:!0}),m.jsx(Z,{defaultSize:70,children:m.jsxs("div",{className:"h-full p-4 flex flex-col justify-center",children:[m.jsx("h4",{className:"font-medium text-sm",children:"Conteúdo Principal"}),m.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Arraste a alça para redimensionar"})]})})]})}function lt(){return m.jsxs(Ne,{direction:"vertical",className:"min-h-[300px] border rounded-lg",children:[m.jsx(Z,{defaultSize:25,children:m.jsx("div",{className:"h-full bg-muted/50 p-4 flex items-center",children:m.jsx("h4",{className:"font-medium text-sm",children:"Header"})})}),m.jsx(ve,{withHandle:!0}),m.jsx(Z,{defaultSize:50,children:m.jsx("div",{className:"h-full p-4 flex items-center",children:m.jsx("h4",{className:"font-medium text-sm",children:"Conteúdo"})})}),m.jsx(ve,{withHandle:!0}),m.jsx(Z,{defaultSize:25,children:m.jsx("div",{className:"h-full bg-muted/50 p-4 flex items-center",children:m.jsx("h4",{className:"font-medium text-sm",children:"Footer"})})})]})}function st(){return m.jsxs(Ne,{direction:"horizontal",className:"min-h-[350px] border rounded-lg",children:[m.jsx(Z,{defaultSize:25,minSize:15,children:m.jsxs("div",{className:"h-full bg-muted/50 p-4",children:[m.jsx("h4",{className:"font-medium text-sm",children:"Navegação"}),m.jsxs("div",{className:"mt-4 space-y-2",children:[m.jsx("div",{className:"text-xs text-muted-foreground p-2 bg-background rounded",children:"Item 1"}),m.jsx("div",{className:"text-xs text-muted-foreground p-2 bg-background rounded",children:"Item 2"}),m.jsx("div",{className:"text-xs text-muted-foreground p-2 bg-background rounded",children:"Item 3"})]})]})}),m.jsx(ve,{}),m.jsx(Z,{defaultSize:75,children:m.jsxs(Ne,{direction:"vertical",children:[m.jsx(Z,{defaultSize:70,children:m.jsxs("div",{className:"h-full p-4",children:[m.jsx("h4",{className:"font-medium text-sm",children:"Editor"}),m.jsx("div",{className:"mt-2 p-2 bg-muted/30 rounded text-xs font-mono text-muted-foreground",children:'const hello = "world";'})]})}),m.jsx(ve,{withHandle:!0}),m.jsx(Z,{defaultSize:30,children:m.jsxs("div",{className:"h-full bg-muted/30 p-4",children:[m.jsx("h4",{className:"font-medium text-sm",children:"Terminal"}),m.jsx("div",{className:"mt-2 text-xs font-mono text-muted-foreground",children:"$ npm run dev"})]})})]})})]})}function ft(){return m.jsx(Nn,{title:"Resizable",description:"Painéis redimensionáveis para criar layouts flexíveis e adaptáveis. Baseado em react-resizable-panels.",usage:tt,component:m.jsx(Ge,{}),examples:[{title:"Layout Horizontal",description:"Disposição lado a lado com alça de redimensionamento.",preview:m.jsx(Ge,{}),code:it},{title:"Layout Vertical",description:"Painéis empilhados verticalmente.",preview:m.jsx(lt,{}),code:at},{title:"Layout Aninhado",description:"Combine layouts horizontais e verticais para interfaces complexas como IDEs.",preview:m.jsx(st,{}),code:ot},{title:"Persistência de Layout",description:"Salve o estado do layout no localStorage usando onLayout.",preview:m.jsx(Ge,{}),code:rt}],props:[{name:"direction",type:'"horizontal" | "vertical"',default:'"horizontal"',description:"Direção do redimensionamento dos painéis."},{name:"onLayout",type:"(sizes: number[]) => void",default:"-",description:"Callback chamado quando o layout muda. Útil para persistência."},{name:"defaultSize",type:"number",default:"-",description:"Tamanho inicial do painel em porcentagem (0-100)."},{name:"minSize",type:"number",default:"10",description:"Tamanho mínimo do painel em porcentagem."},{name:"maxSize",type:"number",default:"100",description:"Tamanho máximo do painel em porcentagem."},{name:"collapsible",type:"boolean",default:"false",description:"Permite colapsar o painel completamente."},{name:"collapsedSize",type:"number",default:"0",description:"Tamanho do painel quando colapsado."},{name:"withHandle",type:"boolean",default:"false",description:"Exibe um indicador visual na alça de redimensionamento."}],accessibility:["Suporte completo a navegação por teclado","Alças de redimensionamento focáveis com Tab","Use setas do teclado para redimensionar quando focado na alça","Focus ring visível para acessibilidade"],notes:["ResizablePanelGroup deve envolver todos os ResizablePanel e ResizableHandle.","Use withHandle no ResizableHandle para melhor UX com indicador visual.","minSize e maxSize são valores percentuais (0-100).","A soma de defaultSize dos painéis deve ser 100.","Combine com hooks de resize (useColumnResize, useSidebarResize) para casos específicos."]})}export{ft as default};
@@ -0,0 +1,24 @@
1
+ import{r as t,j as e,fc as o}from"./index-DkiftrvI.js";import{C as d}from"./ComponentDocTemplate-CQbBhfvZ.js";import"./ExampleCard-DuLrb3t-.js";function u(){const[a,i]=t.useState("<p>Este é um <strong>texto de exemplo</strong> com <em>formatação</em>.</p>"),[s,n]=t.useState(""),[l,r]=t.useState("");return e.jsx(d,{title:"Rich Text Editor",description:"Editor de texto rico construído com Tiptap, suportando formatação visual, edição de código HTML e preview. Ideal para formulários que precisam de conteúdo formatado.",component:e.jsx("div",{className:"w-full",children:e.jsx(o,{value:a,onChange:i,placeholder:"Escreva algo aqui..."})}),usage:`import { RichTextEditor } from "forlogic-core"
2
+
3
+ const [content, setContent] = useState('')
4
+
5
+ <RichTextEditor
6
+ value={content}
7
+ onChange={setContent}
8
+ placeholder="Escreva algo aqui..."
9
+ />`,examples:[{title:"Editor Simples",description:"Editor básico sem dica de variável",preview:e.jsx("div",{className:"w-full",children:e.jsx(o,{value:s,onChange:n,showVariableHint:!1,placeholder:"Digite o conteúdo..."})}),code:`<RichTextEditor
10
+ value={content}
11
+ onChange={setContent}
12
+ showVariableHint={false}
13
+ placeholder="Digite o conteúdo..."
14
+ />`},{title:"Editor Minimal",description:"Apenas o editor visual sem toggle de modos",preview:e.jsx("div",{className:"w-full",children:e.jsx(o,{value:l,onChange:r,showModeToggle:!1,showVariableHint:!1,minHeight:"150px"})}),code:`<RichTextEditor
15
+ value={content}
16
+ onChange={setContent}
17
+ showModeToggle={false}
18
+ showVariableHint={false}
19
+ minHeight="150px"
20
+ />`},{title:"Editor Desabilitado",description:"Editor em modo somente leitura",preview:e.jsx("div",{className:"w-full",children:e.jsx(o,{value:"<p>Este conteúdo <strong>não pode</strong> ser editado.</p>",onChange:()=>{},disabled:!0,showModeToggle:!1,showVariableHint:!1,minHeight:"100px"})}),code:`<RichTextEditor
21
+ value={content}
22
+ onChange={setContent}
23
+ disabled
24
+ />`}],props:[{name:"value",type:"string",default:"-",description:"Conteúdo HTML atual do editor."},{name:"onChange",type:"(value: string) => void",default:"-",description:"Callback chamado quando o conteúdo muda."},{name:"disabled",type:"boolean",default:"false",description:"Desabilita a edição."},{name:"placeholder",type:"string",default:'"Escreva o conteúdo aqui..."',description:"Texto placeholder quando vazio."},{name:"minHeight",type:"string",default:'"300px"',description:"Altura mínima do editor."},{name:"showModeToggle",type:"boolean",default:"true",description:"Mostra botões de alternância Visual/Código/Preview."},{name:"showVariableHint",type:"boolean",default:"true",description:"Mostra dica sobre uso de variáveis {{variavel}}."},{name:"className",type:"string",default:"-",description:"Classes CSS adicionais para o container."}],accessibility:["Toolbar com botões acessíveis via teclado","Títulos com atributos title para tooltips","Suporte a atalhos de teclado (Ctrl+B, Ctrl+I, etc.)","Contraste adequado nos estados ativo/inativo","Focus visível em todos os elementos interativos"]})}export{u as RichTextEditorDoc};
@@ -0,0 +1,28 @@
1
+ import{j as e,aG as l,gp as i,w as t}from"./index-DkiftrvI.js";import{C as s}from"./ComponentDocTemplate-CQbBhfvZ.js";import"./ExampleCard-DuLrb3t-.js";function n(){const o=Array.from({length:50}).map((a,r)=>`Item ${r+1}`);return e.jsx(l,{className:"h-72 w-48 rounded-md border",children:e.jsxs("div",{className:"p-4",children:[e.jsx("h4",{className:"mb-4 text-sm font-medium leading-none",children:"Tags"}),o.map(a=>e.jsxs("div",{children:[e.jsx("div",{className:"text-sm",children:a}),e.jsx(t,{className:"my-2"})]},a))]})})}function c(){const o=Array.from({length:20}).map((a,r)=>`Coluna ${r+1}`);return e.jsxs(l,{className:"w-96 whitespace-nowrap rounded-md border",children:[e.jsx("div",{className:"flex w-max space-x-4 p-4",children:o.map(a=>e.jsxs("div",{className:"w-[150px] shrink-0 rounded-md border p-4",children:[e.jsx("div",{className:"text-sm font-medium",children:a}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Conteúdo de exemplo"})]},a))}),e.jsx(i,{orientation:"horizontal"})]})}function x(){return e.jsx(s,{title:"ScrollArea",description:"Área de rolagem customizada com scrollbars estilizadas, baseada no Radix UI ScrollArea.",component:e.jsx(n,{}),usage:`import { ScrollArea, ScrollBar } from "forlogic-core"
2
+
3
+ <ScrollArea className="h-72 w-48 rounded-md border">
4
+ <div className="p-4">
5
+ {items.map((item) => (
6
+ <div key={item.id}>{item.content}</div>
7
+ ))}
8
+ </div>
9
+ </ScrollArea>
10
+
11
+ // Scroll horizontal:
12
+ <ScrollArea className="w-96 whitespace-nowrap rounded-md border">
13
+ <div className="flex w-max space-x-4 p-4">
14
+ {items.map((item) => (
15
+ <div key={item.id} className="w-[150px] shrink-0">{item.content}</div>
16
+ ))}
17
+ </div>
18
+ <ScrollBar orientation="horizontal" />
19
+ </ScrollArea>`,examples:[{title:"Scroll Horizontal",description:'Use ScrollBar com orientation="horizontal" para rolagem lateral.',preview:e.jsx(c,{}),code:`<ScrollArea className="w-96 whitespace-nowrap rounded-md border">
20
+ <div className="flex w-max space-x-4 p-4">
21
+ {items.map((item) => (
22
+ <div key={item.id} className="w-[150px] shrink-0 rounded-md border p-4">
23
+ {item.content}
24
+ </div>
25
+ ))}
26
+ </div>
27
+ <ScrollBar orientation="horizontal" />
28
+ </ScrollArea>`}],props:[{name:"className",type:"string",default:"-",description:"Classes CSS para o container root."},{name:"children",type:"ReactNode",default:"-",description:"Conteúdo rolável."},{name:"ScrollBar.orientation",type:'"vertical" | "horizontal"',default:'"vertical"',description:"Direção da scrollbar."}],notes:["O ScrollArea vertical é o padrão — não precisa de ScrollBar explícito.",'Para scroll horizontal, adicione <ScrollBar orientation="horizontal" /> como filho direto.',"Usado internamente pela DesignSystemSidebar, AppSidebar, e outros componentes com overflow.","Mantém bordas arredondadas do container pai (rounded-[inherit])."],accessibility:["Scrollbars customizadas mantêm comportamento nativo de rolagem.","Funciona com teclado, trackpad e touch.","Compatível com leitores de tela."]})}export{x as ScrollAreaDoc};
@@ -0,0 +1,204 @@
1
+ import{j as e,a as s,B as r,w as n,aK as c,dw as d,aN as l,a8 as o,dy as p,e0 as m,dE as u}from"./index-DkiftrvI.js";import{C as g}from"./ComponentDocTemplate-CQbBhfvZ.js";import{S as f}from"./server-CtzFTfKR.js";import{G as x}from"./globe-CpMIWAcv.js";import"./ExampleCard-DuLrb3t-.js";function h(){return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[e.jsxs(s,{className:"p-4 border-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 rounded-lg bg-green-500/10",children:e.jsx(o,{className:"h-5 w-5 text-green-500"})}),e.jsx("h4",{className:"font-semibold",children:"CSP"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Content Security Policy para prevenir XSS e injeção de código"})]}),e.jsxs(s,{className:"p-4 border-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 rounded-lg bg-blue-500/10",children:e.jsx(x,{className:"h-5 w-5 text-blue-500"})}),e.jsx("h4",{className:"font-semibold",children:"CORS"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Controle de origens confiáveis sem usar wildcards inseguros"})]}),e.jsxs(s,{className:"p-4 border-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 rounded-lg bg-orange-500/10",children:e.jsx(m,{className:"h-5 w-5 text-orange-500"})}),e.jsx("h4",{className:"font-semibold",children:"HSTS"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Força HTTPS com preload e inclusão de subdomínios"})]}),e.jsxs(s,{className:"p-4 border-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 rounded-lg bg-purple-500/10",children:e.jsx(u,{className:"h-5 w-5 text-purple-500"})}),e.jsx("h4",{className:"font-semibold",children:"Headers OWASP"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Headers recomendados pela OWASP para proteção adicional"})]})]})})}function v(){const i=[{name:"Strict-Transport-Security",value:"max-age=31536000; includeSubDomains; preload",desc:"Força HTTPS por 1 ano"},{name:"X-Content-Type-Options",value:"nosniff",desc:"Previne MIME sniffing"},{name:"X-Frame-Options",value:"DENY",desc:"Bloqueia iframe embedding"},{name:"X-XSS-Protection",value:"1; mode=block",desc:"Filtro XSS do navegador"},{name:"Referrer-Policy",value:"strict-origin-when-cross-origin",desc:"Controla vazamento de referrer"},{name:"Permissions-Policy",value:"camera=(), microphone=()...",desc:"Desabilita APIs sensíveis"}];return e.jsxs(s,{className:"p-4 bg-muted/50",children:[e.jsxs("h4",{className:"font-semibold mb-3 flex items-center gap-2",children:[e.jsx(f,{className:"h-4 w-4"}),"Headers de Segurança Aplicados"]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"text-left py-2 px-3 font-medium",children:"Header"}),e.jsx("th",{className:"text-left py-2 px-3 font-medium",children:"Valor"}),e.jsx("th",{className:"text-left py-2 px-3 font-medium",children:"Proteção"})]})}),e.jsx("tbody",{className:"divide-y",children:i.map((a,t)=>e.jsxs("tr",{children:[e.jsx("td",{className:"py-2 px-3",children:e.jsx("code",{className:"text-xs",children:a.name})}),e.jsx("td",{className:"py-2 px-3 text-muted-foreground text-xs font-mono",children:a.value}),e.jsx("td",{className:"py-2 px-3 text-muted-foreground text-xs",children:a.desc})]},t))})]})})]})}function j(){const i=[{name:"default-src",value:"'self'",prod:!0,dev:!0},{name:"script-src",value:"'self' + CDNs",prod:!0,dev:!0},{name:"style-src",value:"'self' + fonts",prod:!0,dev:!0},{name:"connect-src",value:"'self' + Supabase",prod:!0,dev:!0},{name:"img-src",value:"'self' data: https:",prod:!0,dev:!0},{name:"frame-ancestors",value:"'self' lovable.dev",prod:!0,dev:!0},{name:"upgrade-insecure-requests",value:"(automático)",prod:!0,dev:!1},{name:"require-trusted-types-for",value:"'script'",prod:!0,dev:!1}];return e.jsxs(s,{className:"p-4 space-y-3",children:[e.jsxs("h4",{className:"font-medium flex items-center gap-2",children:[e.jsx(p,{className:"h-4 w-4"}),"Diretivas CSP"]}),e.jsx("div",{className:"space-y-2",children:i.map((a,t)=>e.jsxs("div",{className:"flex items-center justify-between text-sm py-1 border-b last:border-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:a.name}),e.jsx("span",{className:"text-muted-foreground text-xs",children:a.value})]}),e.jsxs("div",{className:"flex gap-1",children:[a.prod&&e.jsx(r,{variant:"secondary",className:"text-[10px]",children:"PROD"}),a.dev&&e.jsx(r,{variant:"outline",className:"text-[10px]",children:"DEV"})]})]},t))})]})}function P(){return e.jsx(g,{title:"Segurança (Vite Config)",description:"Plugin de segurança para Vite que aplica headers OWASP, CSP configurável, CORS seguro e proteções contra ataques comuns. Configuração centralizada para todos os projetos Forlogic.",installation:`// vite.config.ts
2
+ import { defineConfig } from 'vite';
3
+ import react from '@vitejs/plugin-react-swc';
4
+ import path from 'path';
5
+ import { createForlogicViteConfig } from 'forlogic-core/vite';
6
+
7
+ const forlogicConfig = createForlogicViteConfig({
8
+ security: {
9
+ supabaseUrls: ['https://seu-projeto.supabase.co'],
10
+ trustedOrigins: ['https://seu-app.com'],
11
+ },
12
+ });
13
+
14
+ export default defineConfig(({ mode }) => {
15
+ const isDev = mode === 'development';
16
+ const baseConfig = forlogicConfig(isDev);
17
+
18
+ return {
19
+ ...baseConfig,
20
+ plugins: [react(), ...baseConfig.plugins],
21
+ resolve: {
22
+ alias: {
23
+ '@': path.resolve(__dirname, './src'),
24
+ },
25
+ },
26
+ };
27
+ });`,component:e.jsx(h,{}),usage:`// Importar do módulo /vite
28
+ import {
29
+ createForlogicViteConfig,
30
+ createSecurityHeadersPlugin,
31
+ defaultForlogicViteConfig
32
+ } from 'forlogic-core/vite';
33
+
34
+ // Opção 1: Configuração completa (recomendado)
35
+ const forlogicConfig = createForlogicViteConfig({
36
+ security: { ... },
37
+ server: { port: 3000 },
38
+ build: { sourcemap: true },
39
+ });
40
+
41
+ // Opção 2: Apenas plugin de segurança
42
+ const securityPlugin = createSecurityHeadersPlugin(isDev, {
43
+ supabaseUrls: ['https://xyz.supabase.co'],
44
+ });
45
+
46
+ // Opção 3: Configuração padrão mínima
47
+ const baseConfig = defaultForlogicViteConfig(isDev);`,examples:[{title:"Headers de Segurança OWASP",description:"Headers aplicados automaticamente seguindo recomendações OWASP",preview:e.jsx(v,{}),code:`// Headers aplicados automaticamente pelo plugin:
48
+
49
+ // HSTS - Força HTTPS por 1 ano
50
+ 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload'
51
+
52
+ // Previne MIME type sniffing
53
+ 'X-Content-Type-Options': 'nosniff'
54
+
55
+ // Bloqueia embedding em iframes (proteção clickjacking)
56
+ 'X-Frame-Options': 'DENY'
57
+
58
+ // Ativa filtro XSS do navegador
59
+ 'X-XSS-Protection': '1; mode=block'
60
+
61
+ // Controla vazamento de informações via referrer
62
+ 'Referrer-Policy': 'strict-origin-when-cross-origin'
63
+
64
+ // Desabilita APIs potencialmente perigosas
65
+ 'Permissions-Policy': 'camera=(), microphone=(), geolocation=(), fullscreen=(self), payment=(), display-capture=()'`},{title:"Content Security Policy (CSP)",description:"Política de segurança de conteúdo configurável por ambiente",preview:e.jsx(j,{}),code:`// CSP gerado automaticamente baseado no ambiente
66
+
67
+ // DESENVOLVIMENTO: Permite HMR e eval do Vite
68
+ "script-src 'self' https://cdn.gpteng.co 'unsafe-inline' 'unsafe-eval'"
69
+ "style-src 'self' https://fonts.googleapis.com 'unsafe-inline'"
70
+
71
+ // PRODUÇÃO: CSP estrito
72
+ "script-src 'self' https://cdn.gpteng.co"
73
+ "style-src 'self' https://fonts.googleapis.com"
74
+ "require-trusted-types-for 'script'"
75
+ "upgrade-insecure-requests"
76
+
77
+ // Customizar via opções:
78
+ createForlogicViteConfig({
79
+ security: {
80
+ additionalScriptSrc: ['https://cdn.minha-lib.com'],
81
+ additionalStyleSrc: ['https://fonts.custom.com'],
82
+ additionalConnectSrc: ['https://api.terceiros.com'],
83
+ cspReportUri: 'https://meu-app.com/csp-report',
84
+ enableTrustedTypes: true,
85
+ upgradeInsecureRequests: true,
86
+ }
87
+ });`},{title:"CORS Seguro",description:"Controle de origens sem usar wildcards (*) com credenciais",preview:e.jsxs(s,{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Origens Confiáveis Padrão:"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(r,{variant:"secondary",children:"lovableproject.com"}),e.jsx(r,{variant:"secondary",children:"lovable.dev"}),e.jsx(r,{variant:"outline",children:"localhost:* (dev)"})]})]}),e.jsx(n,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Origens Customizadas:"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(r,{children:"seu-app.com"}),e.jsx(r,{children:"admin.seu-app.com"})]})]})]}),code:`// CORS seguro - nunca usa '*' com credenciais
88
+
89
+ createForlogicViteConfig({
90
+ security: {
91
+ trustedOrigins: [
92
+ 'https://seu-app.com',
93
+ 'https://admin.seu-app.com',
94
+ 'https://*.subdominio.com', // Suporte a wildcards
95
+ ],
96
+ }
97
+ });
98
+
99
+ // Headers CORS aplicados quando origem é confiável:
100
+ 'Access-Control-Allow-Origin': origin // Origem específica, nunca '*'
101
+ 'Access-Control-Allow-Credentials': 'true'
102
+ 'Access-Control-Allow-Methods': 'GET, POST, PUT, PATCH, DELETE, OPTIONS'
103
+ 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type, x-csrf-token, x-nonce'
104
+ 'Access-Control-Max-Age': '86400'
105
+ 'Vary': 'Origin'
106
+
107
+ // ⚠️ Origens não confiáveis são bloqueadas e logadas:
108
+ // 🚨 CORS BLOCKED: Untrusted origin attempted access: https://malicious.com`},{title:"Opções Completas de Configuração",description:"Todas as opções disponíveis para personalização",preview:e.jsxs(s,{className:"p-4 space-y-3",children:[e.jsx("h4",{className:"font-medium",children:"ForlogicViteOptions:"}),e.jsxs("div",{className:"text-sm space-y-2",children:[e.jsxs("div",{className:"flex justify-between py-1 border-b",children:[e.jsx("code",{className:"text-xs",children:"security"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"SecurityHeadersOptions"})]}),e.jsxs("div",{className:"flex justify-between py-1 border-b",children:[e.jsx("code",{className:"text-xs",children:"server"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"{ host, port }"})]}),e.jsxs("div",{className:"flex justify-between py-1 border-b",children:[e.jsx("code",{className:"text-xs",children:"build"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"{ chunkSizeWarningLimit, sourcemap }"})]}),e.jsxs("div",{className:"flex justify-between py-1 border-b",children:[e.jsx("code",{className:"text-xs",children:"additionalPlugins"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"VitePlugin[]"})]}),e.jsxs("div",{className:"flex justify-between py-1",children:[e.jsx("code",{className:"text-xs",children:"disableSecurity"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:"boolean (não recomendado)"})]})]})]}),code:`import { createForlogicViteConfig } from 'forlogic-core/vite';
109
+
110
+ const forlogicConfig = createForlogicViteConfig({
111
+ // Configurações de segurança
112
+ security: {
113
+ supabaseUrls: ['https://xyz.supabase.co'],
114
+ trustedOrigins: ['https://meu-app.com'],
115
+ additionalScriptSrc: [],
116
+ additionalStyleSrc: [],
117
+ additionalConnectSrc: ['https://api.terceiros.com'],
118
+ cspReportUri: 'https://meu-app.com/csp-violations',
119
+ enableTrustedTypes: true,
120
+ upgradeInsecureRequests: true,
121
+ },
122
+
123
+ // Configurações do servidor dev
124
+ server: {
125
+ host: '::',
126
+ port: 8080,
127
+ },
128
+
129
+ // Configurações de build
130
+ build: {
131
+ chunkSizeWarningLimit: 4000,
132
+ sourcemap: true,
133
+ },
134
+
135
+ // Plugins Vite adicionais
136
+ additionalPlugins: [],
137
+
138
+ // ⚠️ Desabilitar segurança (NÃO RECOMENDADO)
139
+ disableSecurity: false,
140
+ });`},{title:"Exemplo Completo vite.config.ts",description:"Configuração completa pronta para uso em produção",preview:e.jsxs(c,{children:[e.jsx(d,{className:"h-4 w-4 text-green-500"}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-1 text-sm",children:[e.jsx("p",{className:"font-medium",children:"Configuração pronta para produção:"}),e.jsx("p",{children:"• Headers OWASP aplicados automaticamente"}),e.jsx("p",{children:"• CSP estrito em produção"}),e.jsx("p",{children:"• CORS seguro sem wildcards"}),e.jsx("p",{children:"• Trusted Types habilitado"})]})})]}),code:`// vite.config.ts
141
+ import { defineConfig } from 'vite';
142
+ import react from '@vitejs/plugin-react-swc';
143
+ import path from 'path';
144
+ import { createForlogicViteConfig } from 'forlogic-core/vite';
145
+
146
+ const forlogicConfig = createForlogicViteConfig({
147
+ security: {
148
+ supabaseUrls: [
149
+ 'https://tskpcuganynhsppzoqgj.supabase.co',
150
+ 'https://ccjfvpnndclajkleyqkc.supabase.co',
151
+ ],
152
+ trustedOrigins: [
153
+ 'https://meu-app.lovable.app',
154
+ 'https://meu-dominio.com',
155
+ ],
156
+ additionalConnectSrc: [
157
+ 'https://api.qualiex.com',
158
+ ],
159
+ },
160
+ });
161
+
162
+ export default defineConfig(({ mode }) => {
163
+ const isDev = mode === 'development';
164
+ const baseConfig = forlogicConfig(isDev);
165
+
166
+ return {
167
+ ...baseConfig,
168
+ plugins: [react(), ...baseConfig.plugins],
169
+ resolve: {
170
+ alias: {
171
+ // ⚠️ IMPORTANTE: Usar path.resolve() para caminhos absolutos
172
+ '@': path.resolve(__dirname, './src'),
173
+ },
174
+ },
175
+ // Sobrescrever configurações se necessário
176
+ server: {
177
+ ...baseConfig.server,
178
+ port: 3000, // Porta customizada
179
+ },
180
+ // Forçar re-bundle de dependências
181
+ optimizeDeps: {
182
+ force: true,
183
+ },
184
+ };
185
+ });`},{title:"Apenas Plugin de Segurança",description:"Usar somente o plugin de headers sem a configuração completa",preview:e.jsxs(s,{className:"p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{className:"h-5 w-5 text-green-500"}),e.jsx("span",{className:"font-medium",children:"createSecurityHeadersPlugin"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Use quando você já tem uma configuração Vite e quer adicionar apenas os headers de segurança."})]}),code:`// vite.config.ts existente
186
+ import { defineConfig } from 'vite';
187
+ import react from '@vitejs/plugin-react-swc';
188
+ import { createSecurityHeadersPlugin } from 'forlogic-core/vite';
189
+
190
+ export default defineConfig(({ mode }) => {
191
+ const isDev = mode === 'development';
192
+
193
+ return {
194
+ plugins: [
195
+ react(),
196
+ // Adicionar apenas o plugin de segurança
197
+ createSecurityHeadersPlugin(isDev, {
198
+ supabaseUrls: ['https://xyz.supabase.co'],
199
+ trustedOrigins: ['https://meu-app.com'],
200
+ }),
201
+ ],
202
+ // ... resto da sua configuração
203
+ };
204
+ });`}],props:[{name:"supabaseUrls",type:"string[]",default:"[]",description:"URLs do Supabase para permitir em connect-src."},{name:"trustedOrigins",type:"string[]",default:"[]",description:"Origens confiáveis para CORS (suporta wildcards *.dominio.com)."},{name:"additionalScriptSrc",type:"string[]",default:"[]",description:"CDNs e fontes de script adicionais para CSP."},{name:"additionalStyleSrc",type:"string[]",default:"[]",description:"Fontes de estilo adicionais (fontes, CSS CDNs)."},{name:"additionalConnectSrc",type:"string[]",default:"[]",description:"APIs e WebSockets adicionais para CSP."},{name:"cspReportUri",type:"string",default:"-",description:"URI para receber relatórios de violações CSP."},{name:"enableTrustedTypes",type:"boolean",default:"true",description:"Habilitar Trusted Types em produção (proteção XSS)."},{name:"upgradeInsecureRequests",type:"boolean",default:"true",description:"Atualizar automaticamente HTTP para HTTPS em produção."},{name:"server.host",type:"string",default:'"::"',description:"Host do servidor de desenvolvimento."},{name:"server.port",type:"number",default:"8080",description:"Porta do servidor de desenvolvimento."},{name:"build.sourcemap",type:"boolean",default:"true",description:"Gerar sourcemaps para debug."},{name:"build.chunkSizeWarningLimit",type:"number",default:"4000",description:"Limite de tamanho de chunk (KB) para avisos."},{name:"disableSecurity",type:"boolean",default:"false",description:"Desabilitar plugin de segurança (NÃO recomendado)."}],accessibility:["Os headers de segurança protegem usuários de ataques como XSS, clickjacking e MIME sniffing.","CSP estrito em produção previne execução de scripts maliciosos.","CORS seguro impede vazamento de dados para origens não autorizadas.","Trusted Types fornece proteção adicional contra injeção de DOM."],notes:['**IMPORTANTE**: O alias `@` deve ser configurado com `path.resolve(__dirname, "./src")` - caminhos relativos falham no build.',"Em **desenvolvimento**, CSP permite unsafe-inline e unsafe-eval para suportar HMR do Vite.","Em **produção**, CSP é estrito e inclui Trusted Types e upgrade-insecure-requests.","Origens não confiáveis são **logadas** no console para auditoria de segurança.","Use `cspReportUri` para receber relatórios de violações e monitorar ataques.","O plugin é aplicado apenas ao **servidor de desenvolvimento** - em produção, configure headers no seu servidor/CDN."]})}export{P as SecurityDoc};
@@ -0,0 +1,80 @@
1
+ import{j as e,N as t,O as a,Q as c,R as r,V as l,fd as n,fe as i,J as s}from"./index-DkiftrvI.js";import{C as o}from"./ComponentDocTemplate-CQbBhfvZ.js";import"./ExampleCard-DuLrb3t-.js";function p(){return e.jsx(o,{title:"Select",description:"Exibe uma lista de opções para o usuário escolher—acionada por um botão.",component:e.jsxs(t,{children:[e.jsx(a,{className:"w-[180px]",children:e.jsx(c,{placeholder:"Select a fruit"})}),e.jsxs(r,{children:[e.jsx(l,{value:"apple",children:"Apple"}),e.jsx(l,{value:"banana",children:"Banana"}),e.jsx(l,{value:"orange",children:"Orange"})]})]}),usage:`import {
2
+ Select,
3
+ SelectContent,
4
+ SelectItem,
5
+ SelectTrigger,
6
+ SelectValue,
7
+ } from "forlogic-core"
8
+
9
+ <Select>
10
+ <SelectTrigger className="w-[180px]">
11
+ <SelectValue placeholder="Theme" />
12
+ </SelectTrigger>
13
+ <SelectContent>
14
+ <SelectItem value="light">Light</SelectItem>
15
+ <SelectItem value="dark">Dark</SelectItem>
16
+ </SelectContent>
17
+ </Select>`,examples:[{title:"Select Básico",preview:e.jsxs(t,{children:[e.jsx(a,{className:"w-[280px]",children:e.jsx(c,{placeholder:"Select a fruit"})}),e.jsxs(r,{children:[e.jsx(l,{value:"apple",children:"Apple"}),e.jsx(l,{value:"banana",children:"Banana"}),e.jsx(l,{value:"orange",children:"Orange"}),e.jsx(l,{value:"grape",children:"Grape"})]})]}),code:`<Select>
18
+ <SelectTrigger className="w-[280px]">
19
+ <SelectValue placeholder="Select a fruit" />
20
+ </SelectTrigger>
21
+ <SelectContent>
22
+ <SelectItem value="apple">Apple</SelectItem>
23
+ <SelectItem value="banana">Banana</SelectItem>
24
+ <SelectItem value="orange">Orange</SelectItem>
25
+ </SelectContent>
26
+ </Select>`},{title:"Com Grupos",preview:e.jsxs(t,{children:[e.jsx(a,{className:"w-[280px]",children:e.jsx(c,{placeholder:"Select a timezone"})}),e.jsxs(r,{children:[e.jsxs(n,{children:[e.jsx(i,{children:"North America"}),e.jsx(l,{value:"est",children:"Eastern Standard Time (EST)"}),e.jsx(l,{value:"cst",children:"Central Standard Time (CST)"}),e.jsx(l,{value:"pst",children:"Pacific Standard Time (PST)"})]}),e.jsxs(n,{children:[e.jsx(i,{children:"Europe"}),e.jsx(l,{value:"gmt",children:"Greenwich Mean Time (GMT)"}),e.jsx(l,{value:"cet",children:"Central European Time (CET)"})]})]})]}),code:`<Select>
27
+ <SelectTrigger>
28
+ <SelectValue placeholder="Select a timezone" />
29
+ </SelectTrigger>
30
+ <SelectContent>
31
+ <SelectGroup>
32
+ <SelectLabel>North America</SelectLabel>
33
+ <SelectItem value="est">Eastern Standard Time (EST)</SelectItem>
34
+ <SelectItem value="cst">Central Standard Time (CST)</SelectItem>
35
+ </SelectGroup>
36
+ <SelectGroup>
37
+ <SelectLabel>Europe</SelectLabel>
38
+ <SelectItem value="gmt">Greenwich Mean Time (GMT)</SelectItem>
39
+ </SelectGroup>
40
+ </SelectContent>
41
+ </Select>`},{title:"Estados",preview:e.jsxs("div",{className:"space-y-4",children:[e.jsxs(t,{children:[e.jsx(a,{className:"w-[280px]",children:e.jsx(c,{placeholder:"Normal state"})}),e.jsxs(r,{children:[e.jsx(l,{value:"1",children:"Option 1"}),e.jsx(l,{value:"2",children:"Option 2"})]})]}),e.jsxs(t,{disabled:!0,children:[e.jsx(a,{className:"w-[280px]",children:e.jsx(c,{placeholder:"Disabled state"})}),e.jsx(r,{children:e.jsx(l,{value:"1",children:"Option 1"})})]})]}),code:`<Select>
42
+ <SelectTrigger>
43
+ <SelectValue placeholder="Normal state" />
44
+ </SelectTrigger>
45
+ <SelectContent>
46
+ <SelectItem value="1">Option 1</SelectItem>
47
+ </SelectContent>
48
+ </Select>
49
+
50
+ <Select disabled>
51
+ <SelectTrigger>
52
+ <SelectValue placeholder="Disabled state" />
53
+ </SelectTrigger>
54
+ <SelectContent>
55
+ <SelectItem value="1">Option 1</SelectItem>
56
+ </SelectContent>
57
+ </Select>`},{title:"Com Label",preview:e.jsxs("div",{className:"space-y-2 w-[280px]",children:[e.jsx(s,{htmlFor:"country",children:"Country"}),e.jsxs(t,{children:[e.jsx(a,{id:"country",children:e.jsx(c,{placeholder:"Select your country"})}),e.jsxs(r,{children:[e.jsx(l,{value:"br",children:"Brazil"}),e.jsx(l,{value:"us",children:"United States"}),e.jsx(l,{value:"uk",children:"United Kingdom"}),e.jsx(l,{value:"ca",children:"Canada"})]})]})]}),code:`<div className="space-y-2">
58
+ <Label htmlFor="country">Country</Label>
59
+ <Select>
60
+ <SelectTrigger id="country">
61
+ <SelectValue placeholder="Select your country" />
62
+ </SelectTrigger>
63
+ <SelectContent>
64
+ <SelectItem value="br">Brazil</SelectItem>
65
+ <SelectItem value="us">United States</SelectItem>
66
+ </SelectContent>
67
+ </Select>
68
+ </div>`},{title:"Casos de Uso - Form",preview:e.jsxs("div",{className:"space-y-4 w-[280px]",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s,{htmlFor:"role",children:"User Role"}),e.jsxs(t,{children:[e.jsx(a,{id:"role",children:e.jsx(c,{placeholder:"Select a role"})}),e.jsxs(r,{children:[e.jsx(l,{value:"admin",children:"Administrator"}),e.jsx(l,{value:"user",children:"User"}),e.jsx(l,{value:"guest",children:"Guest"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s,{htmlFor:"status",children:"Status"}),e.jsxs(t,{children:[e.jsx(a,{id:"status",children:e.jsx(c,{placeholder:"Select status"})}),e.jsxs(r,{children:[e.jsx(l,{value:"active",children:"Active"}),e.jsx(l,{value:"inactive",children:"Inactive"}),e.jsx(l,{value:"pending",children:"Pending"})]})]})]})]}),code:`<div className="space-y-2">
69
+ <Label htmlFor="role">User Role</Label>
70
+ <Select>
71
+ <SelectTrigger id="role">
72
+ <SelectValue placeholder="Select a role" />
73
+ </SelectTrigger>
74
+ <SelectContent>
75
+ <SelectItem value="admin">Administrator</SelectItem>
76
+ <SelectItem value="user">User</SelectItem>
77
+ <SelectItem value="guest">Guest</SelectItem>
78
+ </SelectContent>
79
+ </Select>
80
+ </div>`}],props:[{name:"defaultValue",type:"string",default:"-",description:"O valor selecionado padrão."},{name:"value",type:"string",default:"-",description:"O valor selecionado controlado."},{name:"onValueChange",type:"(value: string) => void",default:"-",description:"Manipulador de evento quando o valor muda."},{name:"disabled",type:"boolean",default:"false",description:"Se o select está desabilitado."},{name:"container (SelectContent)",type:"HTMLElement",default:"-",description:"Container HTML para portal (útil dentro de Dialog)."},{name:"collisionBoundary (SelectContent)",type:"HTMLElement",default:"-",description:"Elemento para detecção de colisão de posicionamento."}],accessibility:["Navegação completa por teclado","Busca por digitação antecipada","Segue o padrão de listbox WAI-ARIA","Anúncios para leitores de tela"],notes:["💡 Use `container` e `collisionBoundary` quando o Select estiver dentro de um Dialog para evitar problemas de scroll","💡 Para seleção com busca, considere usar `Combobox` ao invés de `Select`"]})}export{p as SelectDoc};
@@ -0,0 +1,4 @@
1
+ import{j as e,w as t}from"./index-DkiftrvI.js";import{C as a}from"./ComponentDocTemplate-CQbBhfvZ.js";import"./ExampleCard-DuLrb3t-.js";function i(){return e.jsx(a,{title:"Separator",description:"Separa visual ou semanticamente o conteúdo.",component:e.jsxs("div",{className:"space-y-4 w-full max-w-md",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium",children:"Primitivos Radix"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Uma biblioteca de componentes UI de código aberto."})]}),e.jsx(t,{}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium",children:"Recursos"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Acessível, customizável, código aberto."})]})]}),usage:`import { Separator } from "forlogic-core"
2
+
3
+ <Separator />
4
+ <Separator orientation="vertical" />`,examples:[{title:"Horizontal",preview:e.jsxs("div",{className:"w-full max-w-md space-y-2",children:[e.jsx("p",{className:"text-sm",children:"Conteúdo acima"}),e.jsx(t,{}),e.jsx("p",{className:"text-sm",children:"Conteúdo abaixo"})]}),code:"<Separator />"},{title:"Vertical",preview:e.jsxs("div",{className:"flex h-20 items-center gap-4",children:[e.jsx("p",{className:"text-sm",children:"Esquerda"}),e.jsx(t,{orientation:"vertical"}),e.jsx("p",{className:"text-sm",children:"Direita"})]}),code:'<Separator orientation="vertical" />'}],props:[{name:"orientation",type:'"horizontal" | "vertical"',default:'"horizontal"',description:"A orientação do separador."},{name:"decorative",type:"boolean",default:"true",description:"Se o separador é decorativo ou semântico."}],accessibility:["HTML semântico com role adequado","Pode ser decorativo ou estrutural","Atributos ARIA adequados"]})}export{i as SeparatorDoc};