forlogic-core 1.20.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.note/memory/patterns/single-scroll-pattern.md +30 -12
- package/dist/action-plans/components/ActionPlanAttachmentsTab.d.ts +18 -0
- package/dist/action-plans/components/ActionPlanCommentsTab.d.ts +18 -0
- package/dist/action-plans/components/ActionPlanCostTab.d.ts +10 -0
- package/dist/action-plans/components/ActionPlanGeneralTab.d.ts +18 -0
- package/dist/action-plans/components/ActionPlanHistoryTab.d.ts +13 -0
- package/dist/action-plans/components/ActionPlanPage.d.ts +25 -0
- package/dist/action-plans/components/ActionPlanPredecessorsTab.d.ts +10 -0
- package/dist/action-plans/components/ActionPlanProgressDialog.d.ts +13 -0
- package/dist/action-plans/components/ActionPlanProgressTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanStatusBadge.d.ts +11 -0
- package/dist/action-plans/constants.d.ts +42 -0
- package/dist/action-plans/hooks/useActionPlan.d.ts +14 -0
- package/dist/action-plans/hooks/useActionPlanProgress.d.ts +15 -0
- package/dist/action-plans/index.d.ts +15 -0
- package/dist/action-plans/types.d.ts +353 -0
- package/dist/action-plans/utils/formatTime.d.ts +15 -0
- package/dist/approval-flow/components/ApprovalSidenav.d.ts +16 -0
- package/dist/approval-flow/components/ApproveDialog.d.ts +13 -0
- package/dist/approval-flow/components/SelectApproverDialog.d.ts +11 -0
- package/dist/approval-flow/index.d.ts +4 -0
- package/dist/approval-flow/types.d.ts +76 -0
- package/dist/assets/index.d.ts +1 -0
- package/dist/audit-trail/components/AuditTrailDetails.d.ts +17 -0
- package/dist/audit-trail/components/AuditTrailFilter.d.ts +19 -0
- package/dist/audit-trail/components/AuditTrailPage.d.ts +30 -0
- package/dist/audit-trail/index.d.ts +9 -0
- package/dist/audit-trail/types.d.ts +151 -0
- package/dist/audit-trail/utils.d.ts +38 -0
- package/dist/components/dashboards/dashboard-form.d.ts +50 -0
- package/dist/components/dashboards/dashboard-general-view.d.ts +109 -0
- package/dist/components/dashboards/dashboard-grid.d.ts +41 -0
- package/dist/components/dashboards/dashboard-list.d.ts +31 -0
- package/dist/components/dashboards/dashboard-panel-renderer.d.ts +21 -0
- package/dist/components/dashboards/dashboard-view.d.ts +38 -0
- package/dist/components/dashboards/helpers.d.ts +47 -0
- package/dist/components/dashboards/index.d.ts +9 -0
- package/dist/components/dashboards/panels/burndown-panel.d.ts +26 -0
- package/dist/components/dashboards/panels/cartesian-panel.d.ts +46 -0
- package/dist/components/dashboards/panels/index.d.ts +14 -0
- package/dist/components/dashboards/panels/list-panel.d.ts +30 -0
- package/dist/components/dashboards/panels/matrix-risk-panel.d.ts +49 -0
- package/dist/components/dashboards/panels/numeric-panel.d.ts +22 -0
- package/dist/components/dashboards/panels/panel-error.d.ts +8 -0
- package/dist/components/dashboards/panels/panel-header.d.ts +17 -0
- package/dist/components/dashboards/panels/panel-loader.d.ts +7 -0
- package/dist/components/dashboards/panels/panel-no-data.d.ts +6 -0
- package/dist/components/dashboards/panels/panel-unavailable.d.ts +6 -0
- package/dist/components/dashboards/panels/pareto-panel.d.ts +20 -0
- package/dist/components/dashboards/panels/performance-panel.d.ts +24 -0
- package/dist/components/dashboards/panels/pie-panel.d.ts +19 -0
- package/dist/components/dashboards/panels/text-panel.d.ts +18 -0
- package/dist/components/dashboards/types.d.ts +525 -0
- package/dist/components/ui/electronic-signature-dialog.d.ts +21 -0
- package/dist/components/ui/export-dialog.d.ts +28 -0
- package/dist/components/ui/iframe-dialog.d.ts +14 -0
- package/dist/components/ui/multiselect-permissions.d.ts +59 -0
- package/dist/components/ui/online-editor-dialog.d.ts +18 -0
- package/dist/components/ui/report-request-list.d.ts +44 -0
- package/dist/components/ui/stimulsoft-viewer.d.ts +20 -0
- package/dist/components/ui/terms-of-use-dialog.d.ts +56 -0
- package/dist/components/ui/timepicker.d.ts +11 -0
- package/dist/components/ui/users-groups-selector.d.ts +44 -0
- package/dist/components/ui/viewer-dialog.d.ts +77 -0
- package/dist/custom-form-fields/components/CustomFormFields.d.ts +8 -0
- package/dist/custom-form-fields/fields/FormDateField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormMultiSelectionField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormNumericField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormQuestionsField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormSingleSelectionField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormTextField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormTimeField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormUrlField.d.ts +6 -0
- package/dist/custom-form-fields/fields/ReadOnlyTextField.d.ts +6 -0
- package/dist/custom-form-fields/index.d.ts +13 -0
- package/dist/custom-form-fields/types.d.ts +143 -0
- package/dist/exports/action-plans.d.ts +16 -0
- package/dist/exports/audit-trail.d.ts +1 -0
- package/dist/exports/custom-form-fields.d.ts +1 -0
- package/dist/exports/file-upload.d.ts +1 -0
- package/dist/exports/ui.d.ts +12 -0
- package/dist/file-upload/components/SingleFileUpload.d.ts +43 -0
- package/dist/file-upload/index.d.ts +6 -0
- package/dist/file-upload/types.d.ts +11 -0
- package/dist/file-upload/utils/formatBytes.d.ts +1 -0
- package/dist/file-upload/utils/getFileExtension.d.ts +1 -0
- package/dist/hooks/useSidebarResize.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/team-selector/components/TeamSelector.d.ts +24 -0
- package/dist/team-selector/index.d.ts +2 -0
- package/dist/team-selector/types.d.ts +10 -0
- package/docs/ICON_MIGRATION_GUIDE.md +177 -0
- package/package.json +1 -1
- package/dist/assets/AccordionDoc-BVPUJk8G.js +0 -31
- package/dist/assets/ActionButtonDoc-DLJ_K9ib.js +0 -47
- package/dist/assets/AlertDoc-CY1ybZeG.js +0 -37
- package/dist/assets/AppHeaderDoc-Crkw4dA9.js +0 -67
- package/dist/assets/AppSidebarDoc-ET-4j6wV.js +0 -204
- package/dist/assets/AuthDoc-B4v4Nci5.js +0 -192
- package/dist/assets/AvatarDoc-BLdMoyJd.js +0 -11
- package/dist/assets/BadgeDoc-CSNM1b6b.js +0 -36
- package/dist/assets/BaseFormDoc-DXiYuN6-.js +0 -169
- package/dist/assets/BodyContentDoc-Bp6YmUWX.js +0 -83
- package/dist/assets/BreadcrumbDoc-D7tqqTvo.js +0 -75
- package/dist/assets/ButtonDoc-C4JwIvU3.js +0 -41
- package/dist/assets/ButtonGroupDoc-QFfjC7Pm.js +0 -7
- package/dist/assets/CalendarDoc-COlEKqmv.js +0 -81
- package/dist/assets/CardDoc-BVhMoC2w.js +0 -49
- package/dist/assets/ChartDoc-BJ14EjI2.js +0 -111
- package/dist/assets/CheckboxDoc-Bcqpln9_.js +0 -55
- package/dist/assets/ColorPickerDoc-CcfmSwyC.js +0 -10
- package/dist/assets/ColorsFoundationDoc-uO6IiJbS.js +0 -13
- package/dist/assets/ComboTreeDoc-R4qE6XwB.js +0 -46
- package/dist/assets/ComboboxDoc-JIo_-gSN.js +0 -134
- package/dist/assets/ComponentDocTemplate-CRbRY-v5.js +0 -1
- package/dist/assets/ContextMenuDoc-C4-_0NLp.js +0 -182
- package/dist/assets/ContextsDoc-Cj9Aaoyo.js +0 -184
- package/dist/assets/CreateCrudPageDoc-D_SnMRJ2.js +0 -106
- package/dist/assets/CrudActionBarDoc-BYqtIabp.js +0 -112
- package/dist/assets/CrudGridDoc-DspxQrq5.js +0 -85
- package/dist/assets/CrudOverviewDoc-DLcOL_HZ.js +0 -14
- package/dist/assets/CrudPrimitivesDoc-BRS86nWg.js +0 -164
- package/dist/assets/CrudTableDoc-Daw8u2G_.js +0 -113
- package/dist/assets/DataListDoc-BrgVNhhR.js +0 -13
- package/dist/assets/DesignSystemHome-BFBNqq1J.js +0 -1
- package/dist/assets/DialogDoc-DCpRy4rg.js +0 -981
- package/dist/assets/DropdownMenuDoc-DT6LBa8Z.js +0 -175
- package/dist/assets/EmptyStateDoc-wydc09gG.js +0 -35
- package/dist/assets/EnvironmentsDoc-amIriwDD.js +0 -96
- package/dist/assets/ErrorBoundaryDoc-BEixy_Gl.js +0 -111
- package/dist/assets/FormDoc-DxoRt6p7.js +0 -81
- package/dist/assets/FoundationOverview-CxSbumIt.js +0 -1
- package/dist/assets/GridDoc-BpQqCMUE.js +0 -28
- package/dist/assets/HooksDoc-JNODhbaF.js +0 -665
- package/dist/assets/HoverCardDoc-CdqiYrIb.js +0 -31
- package/dist/assets/I18nDoc-B6LMXnE3.js +0 -232
- package/dist/assets/IconPickerDoc-BRdy58IC.js +0 -10
- package/dist/assets/IconsFoundationDoc-CrymfxTI.js +0 -33
- package/dist/assets/InputDoc-BK-SdpJ7.js +0 -211
- package/dist/assets/LabelDoc-DHvgzhaJ.js +0 -42
- package/dist/assets/LeadershipDoc-DRiB0spL.js +0 -416
- package/dist/assets/MediaDoc-B_vqnf72.js +0 -459
- package/dist/assets/MenubarDoc-Zvgczxe2.js +0 -165
- package/dist/assets/ModuleAccessDoc-Nuxb4S27.js +0 -153
- package/dist/assets/ModulesDialogDoc-iJWLkOZo.js +0 -46
- package/dist/assets/NavigationMenuDoc-CeWun1VF.js +0 -116
- package/dist/assets/OnboardingDialogDoc-xBL-rXeZ.js +0 -55
- package/dist/assets/PaginationDoc-CfvwxCMe.js +0 -98
- package/dist/assets/PaginationDoc-DqtRgXnF.js +0 -27
- package/dist/assets/PlacesDoc-nckioEzg.js +0 -226
- package/dist/assets/PopoverDoc-C3o2CZCT.js +0 -64
- package/dist/assets/ProgressDoc-BmWBNMPA.js +0 -29
- package/dist/assets/QualiexUserFieldDoc-CE1e4mx6.js +0 -149
- package/dist/assets/RadioGroupDoc-DMZH6NmR.js +0 -57
- package/dist/assets/RadiusDoc-BOZD3gPV.js +0 -7
- package/dist/assets/RequiredFieldsCounterDoc-CG-lmSSy.js +0 -58
- package/dist/assets/ResizableDoc-CqGkv6Cd.js +0 -104
- package/dist/assets/RichTextEditorDoc-m50ll-Od.js +0 -24
- package/dist/assets/ScrollAreaDoc-BzJ-APXo.js +0 -28
- package/dist/assets/SecurityDoc-B34gVeiV.js +0 -204
- package/dist/assets/SelectDoc-DXRv7QHK.js +0 -80
- package/dist/assets/SeparatorDoc-DcNh8k0P.js +0 -4
- package/dist/assets/ServicesDoc-8aXBd6yg.js +0 -308
- package/dist/assets/ShadowsDoc-Brl4hIDI.js +0 -9
- package/dist/assets/SignDoc-BdwerR-2.js +0 -66
- package/dist/assets/SkeletonDoc-BWgqgbDY.js +0 -54
- package/dist/assets/SliderDoc-E-NjbYVk.js +0 -41
- package/dist/assets/SpacingDoc-BzburM-r.js +0 -12
- package/dist/assets/SplitButtonDoc-BYUysmJp.js +0 -53
- package/dist/assets/StepSelectorDoc-PB1k4v7F.js +0 -41
- package/dist/assets/SwitchDoc-BLOG6kfj.js +0 -56
- package/dist/assets/TableDoc-Dwcs-lop.js +0 -128
- package/dist/assets/TabsDoc-Ovkh8ArV.js +0 -42
- package/dist/assets/TextareaDoc-DsBYxmbr.js +0 -46
- package/dist/assets/ToastDoc-BbZaFE_A.js +0 -157
- package/dist/assets/ToggleDoc-C28vbvhp.js +0 -51
- package/dist/assets/TooltipDoc-DL5cnLak.js +0 -58
- package/dist/assets/TruncatedCellDoc-BuDA8QcY.js +0 -12
- package/dist/assets/TypographyFoundationDoc-CPdH4PHa.js +0 -7
- package/dist/assets/UtilitiesDoc-CrQhyEfz.js +0 -145
- package/dist/assets/blocks-DO93nPjs.js +0 -1
- package/dist/assets/calendar-days-cMfwBSZx.js +0 -1
- package/dist/assets/circle-plus-D3NftMzS.js +0 -1
- package/dist/assets/circle-x-BVAVJ_oz.js +0 -1
- package/dist/assets/crown-B2MTZDnM.js +0 -1
- package/dist/assets/date-picker-zhJU-_kM.js +0 -1
- package/dist/assets/disabled-menu-item-C16xsaVs.js +0 -1
- package/dist/assets/drawer-oTqCOtsC.js +0 -3
- package/dist/assets/file-pen-line-CXv-Eye-.js +0 -1
- package/dist/assets/git-branch-V6-h6P9K.js +0 -1
- package/dist/assets/globe-CaUBIJU8.js +0 -1
- package/dist/assets/hash-B4MTXppl.js +0 -1
- package/dist/assets/hover-card-DEuucfxP.js +0 -1
- package/dist/assets/index-CE0k7Rdh.js +0 -312
- package/dist/assets/index-Cx3adT_u.css +0 -1
- package/dist/assets/life-buoy-BRndExxh.js +0 -1
- package/dist/assets/lucide-react-t7dCa4lv.js +0 -1
- package/dist/assets/monitor-Dg3HKTSE.js +0 -1
- package/dist/assets/package-3G45ARQh.js +0 -1
- package/dist/assets/pen-BYSSwjK4.js +0 -1
- package/dist/assets/pin-CMYagNhs.js +0 -1
- package/dist/assets/radio-group-BVun_Tmt.js +0 -1
- package/dist/assets/server-p0Sb0mKI.js +0 -1
- package/dist/assets/share-2-D-ZhCCq2.js +0 -1
- package/dist/assets/shield-x-Q7hAXWsG.js +0 -1
- package/dist/assets/step-selector-DHxgT2FL.js +0 -1
- package/dist/assets/text-align-start-6aYQqbX4.js +0 -1
- package/dist/assets/trash-DveAOiLF.js +0 -1
- package/dist/assets/useMockCrud-GY0KxHXr.js +0 -1
- package/dist/assets/user-check-CoGNBfIk.js +0 -1
- package/dist/assets/user-plus-Bad2xWIT.js +0 -1
- package/dist/index.html +0 -35
- package/dist/leadership/components/LeaderRow.d.ts +0 -9
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import{j as e,e as s,L as d,r}from"./index-CE0k7Rdh.js";import{C as o}from"./ComponentDocTemplate-CRbRY-v5.js";function m(){const[t,l]=r.useState([{id:"task1",label:"Revisar código",checked:!0},{id:"task2",label:"Atualizar documentação",checked:!1},{id:"task3",label:"Fazer deploy",checked:!1}]),i=a=>{l(t.map(c=>c.id===a?{...c,checked:!c.checked}:c))};return e.jsx("div",{className:"space-y-3",children:t.map(a=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:a.id,checked:a.checked,onCheckedChange:()=>i(a.id)}),e.jsx(d,{htmlFor:a.id,className:a.checked?"line-through text-muted-foreground":"",children:a.label})]},a.id))})}function x(){return e.jsx(o,{title:"Checkbox",description:"Um controle que permite ao usuário alternar entre marcado e desmarcado.",component:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"terms"}),e.jsx("label",{htmlFor:"terms",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Accept terms and conditions"})]}),usage:`import { Checkbox } from "forlogic-core"
|
|
2
|
-
|
|
3
|
-
<div className="flex items-center space-x-2">
|
|
4
|
-
<Checkbox id="terms" />
|
|
5
|
-
<label htmlFor="terms">Accept terms and conditions</label>
|
|
6
|
-
</div>`,examples:[{title:"Estados",preview:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"unchecked"}),e.jsx(d,{htmlFor:"unchecked",children:"Unchecked"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"checked",defaultChecked:!0}),e.jsx(d,{htmlFor:"checked",children:"Checked"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"disabled",disabled:!0}),e.jsx(d,{htmlFor:"disabled",className:"text-muted-foreground",children:"Disabled"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"disabled-checked",disabled:!0,defaultChecked:!0}),e.jsx(d,{htmlFor:"disabled-checked",className:"text-muted-foreground",children:"Disabled Checked"})]})]}),code:`<Checkbox id="unchecked" />
|
|
7
|
-
<Checkbox id="checked" defaultChecked />
|
|
8
|
-
<Checkbox id="disabled" disabled />
|
|
9
|
-
<Checkbox id="disabled-checked" disabled defaultChecked />`},{title:"Com Label",preview:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"terms2"}),e.jsx(d,{htmlFor:"terms2",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Accept terms and conditions"})]}),code:`<div className="flex items-center space-x-2">
|
|
10
|
-
<Checkbox id="terms" />
|
|
11
|
-
<Label htmlFor="terms">Accept terms and conditions</Label>
|
|
12
|
-
</div>`},{title:"Casos de Uso - Lista de Tarefas",preview:e.jsx(m,{}),code:`const [tasks, setTasks] = useState([
|
|
13
|
-
{ id: 'task1', label: 'Revisar código', checked: true },
|
|
14
|
-
{ id: 'task2', label: 'Atualizar documentação', checked: false },
|
|
15
|
-
{ id: 'task3', label: 'Fazer deploy', checked: false },
|
|
16
|
-
]);
|
|
17
|
-
|
|
18
|
-
const toggleTask = (id: string) => {
|
|
19
|
-
setTasks(tasks.map(task =>
|
|
20
|
-
task.id === id ? { ...task, checked: !task.checked } : task
|
|
21
|
-
));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className="space-y-3">
|
|
26
|
-
{tasks.map(task => (
|
|
27
|
-
<div key={task.id} className="flex items-center space-x-2">
|
|
28
|
-
<Checkbox
|
|
29
|
-
id={task.id}
|
|
30
|
-
checked={task.checked}
|
|
31
|
-
onCheckedChange={() => toggleTask(task.id)}
|
|
32
|
-
/>
|
|
33
|
-
<Label
|
|
34
|
-
htmlFor={task.id}
|
|
35
|
-
className={task.checked ? 'line-through text-muted-foreground' : ''}
|
|
36
|
-
>
|
|
37
|
-
{task.label}
|
|
38
|
-
</Label>
|
|
39
|
-
</div>
|
|
40
|
-
))}
|
|
41
|
-
</div>
|
|
42
|
-
);`},{title:"Casos de Uso - Formulário de Permissões",preview:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"font-medium",children:"Permissões do Usuário"}),e.jsxs("div",{className:"space-y-2 pl-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"read",defaultChecked:!0}),e.jsx(d,{htmlFor:"read",children:"Leitura"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"write",defaultChecked:!0}),e.jsx(d,{htmlFor:"write",children:"Escrita"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"delete"}),e.jsx(d,{htmlFor:"delete",children:"Deletar"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(s,{id:"admin",disabled:!0}),e.jsx(d,{htmlFor:"admin",className:"text-muted-foreground",children:"Admin (requer aprovação)"})]})]})]}),code:`<div className="space-y-2">
|
|
43
|
-
<div className="flex items-center space-x-2">
|
|
44
|
-
<Checkbox id="read" defaultChecked />
|
|
45
|
-
<Label htmlFor="read">Leitura</Label>
|
|
46
|
-
</div>
|
|
47
|
-
<div className="flex items-center space-x-2">
|
|
48
|
-
<Checkbox id="write" defaultChecked />
|
|
49
|
-
<Label htmlFor="write">Escrita</Label>
|
|
50
|
-
</div>
|
|
51
|
-
<div className="flex items-center space-x-2">
|
|
52
|
-
<Checkbox id="delete" />
|
|
53
|
-
<Label htmlFor="delete">Deletar</Label>
|
|
54
|
-
</div>
|
|
55
|
-
</div>`}],props:[{name:"checked",type:"boolean",default:"false",description:"O estado marcado controlado."},{name:"defaultChecked",type:"boolean",default:"false",description:"O estado marcado padrão."},{name:"disabled",type:"boolean",default:"false",description:"Se o checkbox está desabilitado."},{name:"onCheckedChange",type:"(checked: boolean) => void",default:"-",description:"Manipulador de evento chamado quando o estado marcado muda."}],accessibility:["Suporte completo de teclado","Segue o padrão de design WAI-ARIA","Gerenciamento adequado de foco","Funciona com labels de formulário"]})}export{x as CheckboxDoc};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{r,j as o,cv as t}from"./index-CE0k7Rdh.js";import{C as c}from"./ComponentDocTemplate-CRbRY-v5.js";function i(){const[e,a]=r.useState("#3b82f6");return o.jsx(c,{title:"Color Picker",description:"Seletor de cores com paleta predefinida e seletor customizado.",component:o.jsxs("div",{className:"w-[300px]",children:[o.jsx(t,{value:e,onChange:a,label:"Escolha uma cor"}),o.jsx("div",{className:"mt-4 p-4 rounded-md",style:{backgroundColor:e},children:o.jsxs("p",{className:"text-white font-medium",children:["Cor selecionada: ",e]})})]}),usage:`import { ColorPicker } from "forlogic-core"
|
|
2
|
-
import { useState } from 'react'
|
|
3
|
-
|
|
4
|
-
const [color, setColor] = useState('#3b82f6')
|
|
5
|
-
|
|
6
|
-
<ColorPicker
|
|
7
|
-
value={color}
|
|
8
|
-
onChange={setColor}
|
|
9
|
-
label="Escolha uma cor"
|
|
10
|
-
/>`,props:[{name:"value",type:"string",default:"#3b82f6",description:"Cor atual selecionada (formato hexadecimal)."},{name:"onChange",type:"(color: string) => void",default:"-",description:"Callback quando a cor é alterada."},{name:"label",type:"string",default:"-",description:"Label opcional para o campo."}],accessibility:["Botão com papel semântico correto","Input de cor nativo acessível","Labels descritivos para cores predefinidas","Navegação por teclado completa"]})}export{i as ColorPickerDoc};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{j as s,C as x,a as h,b as p,c as u,d as j,L as N,I as w,e as B,S as F,u as A}from"./index-CE0k7Rdh.js";const S={0:"0 0% 100%",50:"0 0% 98%",100:"0 0% 96%",200:"0 0% 92%",300:"0 0% 88%",400:"0 0% 71%",500:"0 0% 51%",600:"0 0% 38%",700:"0 0% 26%",800:"0 0% 15%",900:"0 0% 9%",950:"0 0% 5%",1e3:"0 0% 0%"},M={50:"217 94% 97%",100:"217 94% 93%",200:"217 94% 87%",300:"217 94% 78%",400:"217 94% 63%",500:"217 94% 49%",600:"217 94% 35%",700:"217 94% 26%",800:"217 94% 19%",900:"217 94% 12%"},E={success:{50:"138 76% 97%",100:"138 76% 93%",200:"138 76% 85%",300:"138 76% 75%",400:"138 76% 60%",500:"138 69% 45%",600:"138 69% 35%",700:"138 69% 28%",800:"138 69% 22%",900:"138 69% 16%"},warning:{50:"48 100% 96%",100:"48 96% 89%",200:"48 97% 77%",300:"48 95% 64%",400:"47 94% 53%",500:"45 93% 47%",600:"43 96% 41%",700:"38 92% 35%",800:"32 88% 28%",900:"25 84% 22%"},danger:{50:"0 86% 97%",100:"0 93% 94%",200:"0 96% 89%",300:"0 94% 82%",400:"0 91% 71%",500:"0 84% 60%",600:"0 72% 51%",700:"0 74% 42%",800:"0 70% 35%",900:"0 63% 31%"},sharp:{50:"78 70% 97%",100:"78 70% 93%",200:"78 70% 85%",300:"78 70% 75%",400:"78 70% 60%",500:"78 70% 52%",600:"78 70% 46%",700:"78 70% 36%",800:"78 70% 28%",900:"78 70% 20%"}};function b(i){const[e,d,a]=i.split(" ").map(k=>parseFloat(k)),r=d/100,m=a/100,c=(1-Math.abs(2*m-1))*r,n=c*(1-Math.abs(e/60%2-1)),g=m-c/2;let o=0,t=0,l=0;e>=0&&e<60?(o=c,t=n,l=0):e>=60&&e<120?(o=n,t=c,l=0):e>=120&&e<180?(o=0,t=c,l=n):e>=180&&e<240?(o=0,t=n,l=c):e>=240&&e<300?(o=n,t=0,l=c):e>=300&&e<360&&(o=c,t=0,l=n);const f=Math.round((o+g)*255),C=Math.round((t+g)*255),y=Math.round((l+g)*255);return`${f}, ${C}, ${y}`}function v(i){const[e,d,a]=i.split(", ").map(r=>parseInt(r));return`#${((1<<24)+(e<<16)+(d<<8)+a).toString(16).slice(1).toUpperCase()}`}function q(){const i=e=>{navigator.clipboard.writeText(e),A.success(`Código ${e} copiado!`)};return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Sistema de Cores"}),s.jsx("p",{className:"text-lg text-muted-foreground mb-6",children:"Sistema de cores profissional completo com escala neutra (0-1000), escala de marca (50-900), e cores funcionais (sucesso, aviso, perigo, sharp). Todas as cores garantem conformidade de contraste WCAG AA."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(x,{children:[s.jsxs(h,{children:[s.jsx(p,{children:"Escala Neutra"}),s.jsx(u,{children:"Paleta de escala de cinza completa do branco puro (0) ao preto puro (1000)"})]}),s.jsx(j,{children:s.jsx("div",{className:"grid grid-cols-5 gap-2",children:Object.entries(S).map(([e,d])=>{const a=b(d),r=v(a);return s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-16 rounded-md border shadow-sm cursor-pointer hover:ring-2 hover:ring-primary transition-all",style:{backgroundColor:`hsl(${d})`},onClick:()=>i(r),title:"Clique para copiar"}),s.jsxs("div",{className:"text-xs font-mono text-center space-y-1",children:[s.jsx("div",{className:"font-semibold",children:e}),s.jsxs("div",{className:"text-muted-foreground text-[10px]",children:["RGB: ",a]}),s.jsx("div",{className:"text-primary text-[10px] font-semibold",children:r})]})]},e)})})})]}),s.jsxs(x,{children:[s.jsxs(h,{children:[s.jsx(p,{children:"Escala de Marca"}),s.jsx(u,{children:"Paleta de cores primárias da marca com gama tonal completa"})]}),s.jsx(j,{children:s.jsx("div",{className:"grid grid-cols-5 gap-2",children:Object.entries(M).map(([e,d])=>{const a=b(d),r=v(a);return s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-16 rounded-md border shadow-sm cursor-pointer hover:ring-2 hover:ring-primary transition-all",style:{backgroundColor:`hsl(${d})`},onClick:()=>i(r),title:"Clique para copiar"}),s.jsxs("div",{className:"text-xs font-mono text-center space-y-1",children:[s.jsx("div",{className:"font-semibold",children:e}),s.jsxs("div",{className:"text-muted-foreground text-[10px]",children:["RGB: ",a]}),s.jsx("div",{className:"text-primary text-[10px] font-semibold",children:r})]})]},e)})})})]}),Object.entries(E).map(([e,d])=>s.jsxs(x,{children:[s.jsxs(h,{children:[s.jsx(p,{className:"capitalize",children:e}),s.jsxs(u,{children:["Escala completa de cores ",e," com conformidade de contraste AA"]})]}),s.jsx(j,{children:s.jsx("div",{className:"grid grid-cols-5 gap-2",children:Object.entries(d).map(([a,r])=>{const m=b(r),c=v(m);return s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-16 rounded-md border shadow-sm cursor-pointer hover:ring-2 hover:ring-primary transition-all",style:{backgroundColor:`hsl(${r})`},onClick:()=>i(c),title:"Clique para copiar"}),s.jsxs("div",{className:"text-xs font-mono text-center space-y-1",children:[s.jsx("div",{className:"font-semibold",children:a}),s.jsxs("div",{className:"text-muted-foreground text-[10px]",children:["RGB: ",m]}),s.jsx("div",{className:"text-primary text-[10px] font-semibold",children:c})]})]},a)})})})]},e))]}),s.jsxs(x,{children:[s.jsxs(h,{children:[s.jsx(p,{children:"Estados de Focus"}),s.jsx(u,{children:"O anel de focus utiliza a cor da marca para reforçar a identidade visual em todos os componentes interativos"})]}),s.jsxs(j,{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Light Mode"}),s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("div",{className:"h-8 w-8 rounded-md border shadow-sm",style:{backgroundColor:"hsl(217 94% 35%)"}}),s.jsxs("div",{className:"text-sm font-mono",children:[s.jsx("div",{className:"font-semibold",children:"Brand 600"}),s.jsx("div",{className:"text-muted-foreground",children:"#0546AD"})]})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Cor principal da marca usada para focus rings em modo claro."})]})}),s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Dark Mode"}),s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("div",{className:"h-8 w-8 rounded-md border shadow-sm",style:{backgroundColor:"hsl(217 94% 63%)"}}),s.jsxs("div",{className:"text-sm font-mono",children:[s.jsx("div",{className:"font-semibold",children:"Brand 400"}),s.jsx("div",{className:"text-muted-foreground",children:"#4B8EF5"})]})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Versão mais clara da marca para melhor contraste no modo escuro."})]})})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-3",children:"Exemplos Interativos"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Clique nos campos abaixo para ver o estado de focus com a cor da marca:"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(N,{htmlFor:"focus-example-input",children:"Input"}),s.jsx(w,{id:"focus-example-input",placeholder:"Clique para ver o focus..."})]}),s.jsxs("div",{className:"flex items-center space-x-3 pt-6",children:[s.jsx(B,{id:"focus-example-checkbox"}),s.jsx(N,{htmlFor:"focus-example-checkbox",children:"Checkbox"})]}),s.jsxs("div",{className:"flex items-center space-x-3 pt-6",children:[s.jsx(F,{id:"focus-example-switch"}),s.jsx(N,{htmlFor:"focus-example-switch",children:"Switch"})]})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"Referência CSS"}),s.jsx("pre",{className:"bg-muted p-3 rounded-md text-xs overflow-x-auto",children:`:root {
|
|
2
|
-
--ring: 217 94% 35%; /* Brand 600 - #0546AD */
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.dark {
|
|
6
|
-
--ring: 217 94% 63%; /* Brand 400 - #4B8EF5 */
|
|
7
|
-
}`})]})]})]}),s.jsxs(x,{children:[s.jsxs(h,{children:[s.jsx(p,{children:"Diretrizes de Uso"}),s.jsx(u,{children:"Melhores práticas para usar o sistema de cores"})]}),s.jsxs(j,{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"✅ Faça"}),s.jsxs("ul",{className:"list-disc list-inside space-y-1 text-sm text-muted-foreground",children:[s.jsxs("li",{children:["Sempre use tokens de cores semânticos (ex: ",s.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"bg-primary"}),")"]}),s.jsx("li",{children:"Garanta taxa de contraste mínima AA (4.5:1 para texto, 3:1 para elementos de UI)"}),s.jsx("li",{children:"Use neutral-500 como ponto de pivô de contraste"}),s.jsx("li",{children:"Use brand-600 como cor padrão da marca"}),s.jsx("li",{children:"Use cores funcionais para estados semânticos (sucesso, aviso, perigo, sharp)"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-2",children:"❌ Não Faça"}),s.jsxs("ul",{className:"list-disc list-inside space-y-1 text-sm text-muted-foreground",children:[s.jsx("li",{children:"Não use valores HSL brutos diretamente em componentes"}),s.jsx("li",{children:"Não use cores de paleta (neutral-200, brand-400) diretamente"}),s.jsx("li",{children:"Não crie cores personalizadas fora do design system"}),s.jsx("li",{children:"Não use cores que falham nos requisitos de contraste AA"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-3",children:"Exemplos de Código"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium mb-2 text-green-600 dark:text-green-400",children:"✅ Correto"}),s.jsx("pre",{className:"bg-muted p-3 rounded-md text-xs overflow-x-auto",children:`<Button variant="primary">Primary Action</Button>
|
|
8
|
-
<div className="bg-background text-foreground">
|
|
9
|
-
<p className="text-muted-foreground">Muted text</p>
|
|
10
|
-
</div>`})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium mb-2 text-red-600 dark:text-red-400",children:"❌ Incorreto"}),s.jsx("pre",{className:"bg-muted p-3 rounded-md text-xs overflow-x-auto",children:`<Button className="bg-[hsl(218,91%,48%)]">Bad</Button>
|
|
11
|
-
<div className="bg-neutral-100 text-neutral-800">
|
|
12
|
-
<p className="text-neutral-500">Wrong</p>
|
|
13
|
-
</div>`})]})]})]})]})]})]})}export{q as ColorsFoundationDoc};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import{cR as le,r as u,j as e,L as q,aF as ie,l as b,b8 as ce,cs as de,ct as ue,B as K,ci as Q,a7 as A,f as me,cu as pe,c0 as he,cS as xe,W as fe,h as ve,ah as be,G as h,bm as w,bl as S,b0 as ge}from"./index-CE0k7Rdh.js";import{C as je}from"./ComponentDocTemplate-CRbRY-v5.js";const T=s=>s.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase();function X(s,t){if(!t)return null;const n=T(t),l=[];for(const i of s){const r=T(i.label).includes(n),o=i.children?X(i.children,t):null,d=o&&o.length>0;(r||d)&&l.push({...i,children:r?i.children:d?o:i.children})}return l}function ye(s,t){const n=new Set,l=T(t);function i(r){if(!r.children||r.children.length===0)return T(r.label).includes(l);let o=!1;for(const d of r.children)i(d)&&(o=!0);return o&&n.add(r.value),o||T(r.label).includes(l)}for(const r of s)i(r);return n}function Y(s,t){for(const n of s){if(n.value===t)return n.label;if(n.children){const l=Y(n.children,t);if(l)return l}}}function Ne({node:s,level:t,expanded:n,onToggleExpand:l,selectedValues:i,onSelect:r}){const o=s.children&&s.children.length>0,d=i.includes(s.value);return e.jsxs("div",{role:"treeitem","aria-expanded":o?n:void 0,"aria-selected":d,className:b("flex items-center gap-1 rounded-sm px-2 py-1.5 text-sm cursor-pointer","hover:bg-accent hover:text-accent-foreground","outline-none"),style:{paddingLeft:`${8+t*20}px`},children:[o?e.jsx("button",{type:"button",className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-sm hover:bg-muted",onClick:f=>{f.stopPropagation(),l(s.value)},tabIndex:-1,"aria-label":n?"Recolher":"Expandir",children:n?e.jsx(A,{className:"h-3.5 w-3.5 text-muted-foreground"}):e.jsx(ve,{className:"h-3.5 w-3.5 text-muted-foreground"})}):e.jsx("span",{className:"w-5 shrink-0"}),e.jsxs("span",{className:"flex flex-1 items-center gap-2 truncate",onClick:f=>{f.stopPropagation(),r(s.value)},children:[e.jsx(be,{className:b("h-4 w-4 shrink-0",d?"opacity-100":"opacity-0")}),(()=>{const f=d?s.iconSelected??(n?s.iconOpen:null)??s.icon:n?s.iconOpen??s.icon:s.icon;return f?e.jsx(f,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):null})(),e.jsx("span",{className:"truncate",children:s.label})]})]})}function G({nodes:s,level:t,expandedIds:n,onToggleExpand:l,selectedValues:i,onSelect:r}){return e.jsx(e.Fragment,{children:s.map(o=>{const d=n.has(o.value);return e.jsxs(fe.Fragment,{children:[e.jsx(Ne,{node:o,level:t,expanded:d,onToggleExpand:l,selectedValues:i,onSelect:r}),d&&o.children&&o.children.length>0&&e.jsx(G,{nodes:o.children,level:t+1,expandedIds:n,onToggleExpand:l,selectedValues:i,onSelect:r})]},o.value)})})}function E({multiple:s=!1,options:t,value:n,onChange:l,placeholder:i,label:r,icon:o,emptyMessage:d,searchPlaceholder:f,disabled:g=!1,required:D=!1,isLoading:U=!1,error:j,className:M,maxDisplayedBadges:y,popoverContainer:P,onOpen:W,onClose:$}){const{t:N}=le(),[k,R]=u.useState(!1),[p,F]=u.useState(""),[J,Z]=u.useState(new Set),L=i||N("select_placeholder","Selecione..."),ee=d||N("no_results","Nenhum resultado encontrado"),se=f||N("search_placeholder","Pesquisar..."),v=u.useMemo(()=>n?Array.isArray(n)?n:[n]:[],[n]),B=u.useMemo(()=>{if(!P)return;let a=P,c=0;try{for(;a&&c<3;){const m=window.getComputedStyle(a),C=m.overflowY||m.overflow;if(C&&C!=="visible"&&C!=="unset"){a=a.parentElement,c++;continue}break}}catch{}return a??void 0},[P]),V=u.useMemo(()=>X(t,p),[t,p])??t,ae=u.useMemo(()=>p?ye(t,p):new Set,[t,p]),ne=p?ae:J,te=u.useCallback(a=>{p||Z(c=>{const m=new Set(c);return m.has(a)?m.delete(a):m.add(a),m})},[p]),x=u.useMemo(()=>v.map(a=>({value:a,label:Y(t,a)||a})),[v,t]),_=a=>{R(a),a?W?.():(F(""),$?.())},oe=u.useCallback(a=>{if(l)if(s){const m=v.includes(a)?v.filter(C=>C!==a):[...v,a];l(m)}else l(a),R(!1)},[l,s,v]),z=(a,c)=>{c.preventDefault(),c.stopPropagation(),l&&l(s?v.filter(m=>m!==a):"")},re=y?x.slice(0,y):x,I=y&&x.length>y?x.length-y:0;if(U)return e.jsxs("div",{className:b("space-y-2",M),children:[r&&e.jsxs(q,{children:[r,D&&e.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),e.jsx(ie,{className:"h-10 w-full"})]});const H=typeof j=="string"?j:j instanceof Error?j.message:j?N("error_loading","Erro ao carregar"):void 0;return H?e.jsxs("div",{className:b("space-y-2",M),children:[r&&e.jsxs(q,{children:[r,D&&e.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),e.jsxs("div",{className:"flex items-center gap-2 p-3 border border-destructive rounded-md bg-destructive/10 text-destructive",children:[e.jsx(ce,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:H})]})]}):e.jsxs("div",{className:b("space-y-2",M),children:[r&&e.jsxs(q,{children:[r,D&&e.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),e.jsxs(de,{open:k,onOpenChange:_,modal:!1,children:[e.jsx(ue,{asChild:!0,children:s?e.jsxs("div",{role:"combobox","aria-expanded":k,"aria-disabled":g,tabIndex:g?-1:0,onKeyDown:a=>{g||(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),_(!k))},className:b("flex w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","min-h-10 h-auto cursor-pointer",g&&"pointer-events-none opacity-50 cursor-not-allowed",x.length===0&&"text-muted-foreground"),children:[x.length===0?e.jsxs("span",{className:"flex items-center gap-2",children:[o&&e.jsx(o,{className:"h-4 w-4"}),L]}):e.jsxs("div",{className:"flex flex-wrap gap-1.5 flex-1 mr-2",children:[re.map(a=>e.jsxs(K,{variant:"secondary",className:"gap-1 pr-1",children:[a.label,e.jsx("button",{type:"button",className:"rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onKeyDown:c=>{c.key==="Enter"&&z(a.value,c)},onMouseDown:c=>{c.preventDefault(),c.stopPropagation()},onClick:c=>z(a.value,c),children:e.jsx(Q,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},a.value)),I>0&&e.jsxs(K,{variant:"outline",className:"gap-1",children:["+",I]})]}),e.jsx(A,{className:"h-4 w-4 shrink-0 opacity-50"})]}):e.jsxs(me,{variant:"outline",role:"combobox","aria-expanded":k,disabled:g,className:b("w-full justify-between min-h-10 h-auto",x.length===0&&"text-muted-foreground"),children:[x.length===0?e.jsxs("span",{className:"flex items-center gap-2",children:[o&&e.jsx(o,{className:"h-4 w-4"}),L]}):e.jsxs("span",{className:"flex items-center gap-2",children:[o&&e.jsx(o,{className:"h-4 w-4"}),x[0]?.label]}),e.jsx(A,{className:"h-4 w-4 shrink-0 opacity-50"})]})}),e.jsxs(pe,{className:"w-full p-0 bg-popover z-[60]",align:"start",container:B,collisionBoundary:B,children:[e.jsxs("div",{className:"flex items-center border-b px-3",children:[e.jsx(he,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),e.jsx("input",{className:"flex h-10 w-full bg-transparent py-3 px-2 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",placeholder:se,value:p,onChange:a=>F(a.target.value)}),p&&e.jsx("button",{type:"button",className:"rounded-sm p-0.5 text-muted-foreground hover:text-foreground",onClick:()=>F(""),children:e.jsx(Q,{className:"h-3.5 w-3.5"})})]}),e.jsx(xe,{className:"max-h-[300px]",children:e.jsx("div",{role:"tree",className:"p-1",children:V.length===0?e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:t.length===0?ee:N("no_search_results","Nenhum resultado encontrado")}):e.jsx(G,{nodes:V,level:0,expandedIds:ne,onToggleExpand:te,selectedValues:v,onSelect:oe})})})]})]})]})}const O=[{value:"quality",label:"Qualidade",icon:S,iconOpen:w,children:[{value:"docs",label:"Documentos",icon:S,iconOpen:w,children:[{value:"docs-templates",label:"Templates",icon:h},{value:"docs-procedures",label:"Procedimentos",icon:h}]},{value:"occurrences",label:"Ocorrências",icon:h},{value:"audits",label:"Auditorias",icon:h}]},{value:"hr",label:"Recursos Humanos",icon:S,iconOpen:w,children:[{value:"hr-training",label:"Treinamentos",icon:h},{value:"hr-recruitment",label:"Recrutamento",icon:h}]},{value:"finance",label:"Financeiro",icon:ge},{value:"it",label:"Tecnologia",icon:S,iconOpen:w,children:[{value:"it-infra",label:"Infraestrutura",icon:h},{value:"it-dev",label:"Desenvolvimento",icon:h},{value:"it-security",label:"Segurança",icon:S,iconOpen:w,children:[{value:"it-sec-network",label:"Rede",icon:h},{value:"it-sec-app",label:"Aplicação",icon:h}]}]}],Ce=`import { ComboTree, type ComboTreeOption } from 'forlogic-core';
|
|
2
|
-
import { Folder, FolderOpen, FileText } from 'lucide-react';
|
|
3
|
-
|
|
4
|
-
const options: ComboTreeOption[] = [
|
|
5
|
-
{
|
|
6
|
-
value: 'quality',
|
|
7
|
-
label: 'Qualidade',
|
|
8
|
-
icon: Folder,
|
|
9
|
-
iconOpen: FolderOpen,
|
|
10
|
-
children: [
|
|
11
|
-
{ value: 'docs', label: 'Documentos', icon: FileText },
|
|
12
|
-
{ value: 'occurrences', label: 'Ocorrências', icon: FileText },
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
{ value: 'hr', label: 'RH' },
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
<ComboTree
|
|
19
|
-
options={options}
|
|
20
|
-
value={selected}
|
|
21
|
-
onChange={setSelected}
|
|
22
|
-
label="Departamento"
|
|
23
|
-
placeholder="Selecione..."
|
|
24
|
-
/>`,we=`<ComboTree
|
|
25
|
-
label="Departamento"
|
|
26
|
-
options={options}
|
|
27
|
-
value={singleValue}
|
|
28
|
-
onChange={(v) => setSingleValue(v as string)}
|
|
29
|
-
placeholder="Selecione um departamento..."
|
|
30
|
-
/>`,Se=`<ComboTree
|
|
31
|
-
multiple
|
|
32
|
-
label="Departamentos"
|
|
33
|
-
options={options}
|
|
34
|
-
value={multiValue}
|
|
35
|
-
onChange={(v) => setMultiValue(v as string[])}
|
|
36
|
-
placeholder="Selecione departamentos..."
|
|
37
|
-
maxDisplayedBadges={3}
|
|
38
|
-
/>`,Te=`// A busca é built-in — basta digitar no campo.
|
|
39
|
-
// A árvore é filtrada recursivamente mantendo nós ancestrais visíveis.
|
|
40
|
-
<ComboTree
|
|
41
|
-
label="Buscar na árvore"
|
|
42
|
-
options={options}
|
|
43
|
-
value=""
|
|
44
|
-
onChange={() => {}}
|
|
45
|
-
placeholder="Busque e veja a filtragem..."
|
|
46
|
-
/>`;function ke(){const[s,t]=u.useState("");return e.jsxs("div",{className:"space-y-2 max-w-sm",children:[e.jsx(E,{label:"Departamento",options:O,value:s,onChange:n=>t(n),placeholder:"Selecione um departamento..."}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Valor: ",e.jsx("code",{className:"bg-muted px-1 rounded",children:s||"(nenhum)"})]})]})}function Ee(){const[s,t]=u.useState([]);return e.jsxs("div",{className:"space-y-2 max-w-sm",children:[e.jsx(E,{multiple:!0,label:"Departamentos",options:O,value:s,onChange:n=>t(n),placeholder:"Selecione departamentos...",maxDisplayedBadges:3}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Valores: ",e.jsx("code",{className:"bg-muted px-1 rounded",children:s.join(", ")||"(nenhum)"})]})]})}function Oe(){return e.jsxs("div",{className:"space-y-2 max-w-sm",children:[e.jsx(E,{label:"Buscar na árvore",options:O,value:"",onChange:()=>{},placeholder:"Busque e veja a filtragem..."}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Experimente buscar ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"rede"})," ou ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"treinamento"}),"."]})]})}function De(){const[s,t]=u.useState("");return e.jsx("div",{className:"max-w-sm",children:e.jsx(E,{label:"Departamento",options:O,value:s,onChange:n=>t(n),placeholder:"Selecione um departamento..."})})}function qe(){return e.jsx(je,{title:"ComboTree",description:"Componente de seleção hierárquica (tree view) com busca recursiva, expansão por chevron e seleção por label.",component:e.jsx(De,{}),usage:Ce,examples:[{title:"Seleção Única",description:"Clique no chevron para expandir/recolher. Clique na label para selecionar.",preview:e.jsx(ke,{}),code:we},{title:"Seleção Múltipla",description:"Permite selecionar vários itens com badges visíveis.",preview:e.jsx(Ee,{}),code:Se},{title:"Busca Recursiva",description:"Ao digitar na busca, a árvore é filtrada mantendo os nós ancestrais visíveis e auto-expandidos.",preview:e.jsx(Oe,{}),code:Te}],props:[{name:"options",type:"ComboTreeOption[]",description:"Itens hierárquicos"},{name:"value",type:"string | string[]",default:"''",description:"Valor(es) selecionado(s)"},{name:"onChange",type:"(value) => void",description:"Callback de seleção"},{name:"multiple",type:"boolean",default:"false",description:"Seleção múltipla"},{name:"placeholder",type:"string",default:"'Selecione...'",description:"Texto quando vazio"},{name:"label",type:"string",description:"Label do campo"},{name:"required",type:"boolean",default:"false",description:"Asterisco obrigatório"},{name:"disabled",type:"boolean",default:"false",description:"Desabilita interação"},{name:"isLoading",type:"boolean",default:"false",description:"Exibe skeleton"},{name:"error",type:"string | Error | boolean",description:"Mensagem de erro"},{name:"iconOpen",type:"React.ComponentType",description:"Ícone quando o nó está expandido (ComboTreeOption)"},{name:"searchPlaceholder",type:"string",default:"'Pesquisar...'",description:"Placeholder da busca"},{name:"maxDisplayedBadges",type:"number",description:"Limite de badges (múltiplo)"},{name:"popoverContainer",type:"HTMLElement",description:"Container para portal (Dialog)"}],accessibility:["Navegação por teclado com Tab e Enter","Aria-expanded indica estado de expansão dos nós","Role tree e treeitem para semântica correta","Busca por texto filtra sem perder contexto hierárquico"],notes:["Use icon e iconSelected em ComboTreeOption para ícones customizados (ex: pasta fechada/aberta)","O popoverContainer é útil quando o ComboTree está dentro de um Dialog para evitar problemas de z-index"]})}export{qe as ComboTreeDoc};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import{r,j as e,cw as b,cs as w,ct as D,f as c,P as m,cu as S,cx as p,cy as u,cz as x,cA as h,cB as g,k as i,ah as y,cC as v,l as N,B as P,n as O,o as E,be as T,p as k,cD as L,cE as j,cF as A,cG as B,cH as I,q as F,cI as V}from"./index-CE0k7Rdh.js";import{C as R}from"./ComponentDocTemplate-CRbRY-v5.js";import{D as G,a as z,b as Q}from"./drawer-oTqCOtsC.js";function q(t){const[n,s]=r.useState(!1);return r.useEffect(()=>{const o=window.matchMedia(t);s(o.matches);const a=l=>{s(l.matches)};return o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[t]),n}const C=[{value:"next.js",label:"Next.js"},{value:"sveltekit",label:"SvelteKit"},{value:"nuxt.js",label:"Nuxt.js"},{value:"remix",label:"Remix"},{value:"astro",label:"Astro"}],d=[{value:"backlog",label:"Backlog",icon:i},{value:"todo",label:"Todo",icon:i},{value:"in-progress",label:"Em Progresso",icon:i},{value:"done",label:"Concluído",icon:y},{value:"canceled",label:"Cancelado",icon:i}],H=["feature","bug","enhancement","documentation","design","question","maintenance"];function K(){const[t,n]=r.useState(!1),[s,o]=r.useState(null);return e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Status"}),e.jsxs(w,{open:t,onOpenChange:n,children:[e.jsx(D,{asChild:!0,children:e.jsx(c,{variant:"outline",size:"sm",className:"w-[150px] justify-start",children:s?e.jsxs(e.Fragment,{children:[e.jsx(s.icon,{className:"mr-2 h-4 w-4 shrink-0"}),s.label]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{className:"mr-2 h-4 w-4"}),"Definir status"]})})}),e.jsx(S,{className:"p-0 bg-popover",side:"right",align:"start",children:e.jsxs(p,{children:[e.jsx(u,{placeholder:"Alterar status..."}),e.jsxs(x,{children:[e.jsx(h,{children:"Nenhum resultado encontrado."}),e.jsx(g,{children:d.map(a=>e.jsxs(v,{value:a.value,onSelect:l=>{o(d.find(M=>M.value===l)||null),n(!1)},children:[e.jsx(a.icon,{className:N("mr-2 h-4 w-4",a.value===s?.value?"opacity-100":"opacity-40")}),e.jsx("span",{children:a.label})]},a.value))})]})]})})]})]})}function W(){const[t,n]=r.useState("feature"),[s,o]=r.useState(!1);return e.jsxs("div",{className:"flex w-full flex-col items-start justify-between rounded-md border px-4 py-3 sm:flex-row sm:items-center",children:[e.jsxs("p",{className:"text-sm font-medium leading-none",children:[e.jsx(P,{className:"mr-2",variant:"secondary",children:t}),e.jsx("span",{className:"text-muted-foreground",children:"Criar um novo projeto"})]}),e.jsxs(O,{open:s,onOpenChange:o,children:[e.jsx(E,{asChild:!0,children:e.jsx(c,{variant:"ghost",size:"sm",children:e.jsx(T,{className:"h-4 w-4"})})}),e.jsxs(k,{align:"end",className:"w-[200px] bg-popover",children:[e.jsx(L,{children:"Ações"}),e.jsx(j,{}),e.jsxs(A,{children:[e.jsx(B,{children:"Aplicar label"}),e.jsx(I,{className:"p-0 bg-popover",children:e.jsxs(p,{children:[e.jsx(u,{placeholder:"Filtrar label...",autoFocus:!0}),e.jsxs(x,{children:[e.jsx(h,{children:"Nenhum label encontrado."}),e.jsx(g,{children:H.map(a=>e.jsx(v,{value:a,onSelect:l=>{n(l),o(!1)},children:a},a))})]})]})})]}),e.jsx(j,{}),e.jsxs(F,{className:"text-destructive",children:["Excluir",e.jsx(V,{children:"⌘⌫"})]})]})]})]})}function U(){const[t,n]=r.useState(!1),s=q("(min-width: 768px)"),[o,a]=r.useState(null);return s?e.jsxs(w,{open:t,onOpenChange:n,children:[e.jsx(D,{asChild:!0,children:e.jsx(c,{variant:"outline",className:"w-[150px] justify-start",children:o?e.jsxs(e.Fragment,{children:[e.jsx(o.icon,{className:"mr-2 h-4 w-4 shrink-0"}),o.label]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{className:"mr-2 h-4 w-4"}),"Definir status"]})})}),e.jsx(S,{className:"w-[200px] p-0 bg-popover",align:"start",children:e.jsx(f,{setOpen:n,setSelectedStatus:a,selectedStatus:o})})]}):e.jsxs(G,{open:t,onOpenChange:n,children:[e.jsx(z,{asChild:!0,children:e.jsx(c,{variant:"outline",className:"w-[150px] justify-start",children:o?e.jsxs(e.Fragment,{children:[e.jsx(o.icon,{className:"mr-2 h-4 w-4 shrink-0"}),o.label]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{className:"mr-2 h-4 w-4"}),"Definir status"]})})}),e.jsx(Q,{children:e.jsx("div",{className:"mt-4 border-t",children:e.jsx(f,{setOpen:n,setSelectedStatus:a,selectedStatus:o})})})]})}function f({setOpen:t,setSelectedStatus:n,selectedStatus:s}){return e.jsxs(p,{children:[e.jsx(u,{placeholder:"Filtrar status..."}),e.jsxs(x,{children:[e.jsx(h,{children:"Nenhum resultado encontrado."}),e.jsx(g,{children:d.map(o=>e.jsxs(v,{value:o.value,onSelect:a=>{n(d.find(l=>l.value===a)||null),t(!1)},children:[e.jsx(o.icon,{className:N("mr-2 h-4 w-4",o.value===s?.value?"opacity-100":"opacity-40")}),e.jsx("span",{children:o.label})]},o.value))})]})]})}function Z(){const[t,n]=r.useState(""),[s,o]=r.useState([]);return e.jsx(R,{title:"Combobox",description:"Componente versátil para seleção única ou múltipla com busca inteligente. Combina Popover e Command para autocomplete. O componente Command é usado internamente para fornecer funcionalidades de busca e navegação por teclado.",component:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Seleção única"}),e.jsx(b,{options:C,value:t,onChange:a=>n(a),placeholder:"Selecione framework...",className:"w-[300px]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Seleção múltipla"}),e.jsx(b,{multiple:!0,options:C,value:s,onChange:a=>o(a),placeholder:"Selecione frameworks...",className:"w-[300px]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Popover"}),e.jsx(K,{})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Dropdown Menu"}),e.jsx(W,{})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Responsivo (Popover no desktop, Drawer no mobile)"}),e.jsx(U,{})]})]}),usage:`import { Combobox } from "forlogic-core"
|
|
2
|
-
|
|
3
|
-
const options = [
|
|
4
|
-
{ value: 'next.js', label: 'Next.js' },
|
|
5
|
-
{ value: 'sveltekit', label: 'SvelteKit' },
|
|
6
|
-
]
|
|
7
|
-
|
|
8
|
-
// Seleção única
|
|
9
|
-
<Combobox
|
|
10
|
-
options={options}
|
|
11
|
-
value={selected}
|
|
12
|
-
onChange={setSelected}
|
|
13
|
-
placeholder="Select..."
|
|
14
|
-
/>
|
|
15
|
-
|
|
16
|
-
// Seleção múltipla
|
|
17
|
-
<Combobox
|
|
18
|
-
multiple
|
|
19
|
-
options={options}
|
|
20
|
-
value={selectedArray}
|
|
21
|
-
onChange={setSelectedArray}
|
|
22
|
-
placeholder="Select multiple..."
|
|
23
|
-
/>
|
|
24
|
-
|
|
25
|
-
// =====================
|
|
26
|
-
// POPOVER COM COMMAND
|
|
27
|
-
// =====================
|
|
28
|
-
import { Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Button } from "forlogic-core"
|
|
29
|
-
|
|
30
|
-
<Popover open={open} onOpenChange={setOpen}>
|
|
31
|
-
<PopoverTrigger asChild>
|
|
32
|
-
<Button variant="outline">
|
|
33
|
-
{selectedStatus ? selectedStatus.label : "+ Definir status"}
|
|
34
|
-
</Button>
|
|
35
|
-
</PopoverTrigger>
|
|
36
|
-
<PopoverContent className="p-0 bg-popover" side="right" align="start">
|
|
37
|
-
<Command>
|
|
38
|
-
<CommandInput placeholder="Alterar status..." />
|
|
39
|
-
<CommandList>
|
|
40
|
-
<CommandEmpty>Nenhum resultado.</CommandEmpty>
|
|
41
|
-
<CommandGroup>
|
|
42
|
-
{statuses.map((status) => (
|
|
43
|
-
<CommandItem
|
|
44
|
-
key={status.value}
|
|
45
|
-
value={status.value}
|
|
46
|
-
onSelect={(value) => {
|
|
47
|
-
setSelectedStatus(statuses.find((s) => s.value === value))
|
|
48
|
-
setOpen(false)
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
{status.label}
|
|
52
|
-
</CommandItem>
|
|
53
|
-
))}
|
|
54
|
-
</CommandGroup>
|
|
55
|
-
</CommandList>
|
|
56
|
-
</Command>
|
|
57
|
-
</PopoverContent>
|
|
58
|
-
</Popover>
|
|
59
|
-
|
|
60
|
-
// =====================
|
|
61
|
-
// DROPDOWN MENU COM COMMAND
|
|
62
|
-
// =====================
|
|
63
|
-
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent } from "forlogic-core"
|
|
64
|
-
|
|
65
|
-
<DropdownMenu open={open} onOpenChange={setOpen}>
|
|
66
|
-
<DropdownMenuTrigger asChild>
|
|
67
|
-
<Button variant="ghost" size="sm">
|
|
68
|
-
<MoreVertical className="h-4 w-4" />
|
|
69
|
-
</Button>
|
|
70
|
-
</DropdownMenuTrigger>
|
|
71
|
-
<DropdownMenuContent align="end" className="w-[200px] bg-popover">
|
|
72
|
-
<DropdownMenuLabel>Ações</DropdownMenuLabel>
|
|
73
|
-
<DropdownMenuSeparator />
|
|
74
|
-
<DropdownMenuSub>
|
|
75
|
-
<DropdownMenuSubTrigger>Aplicar label</DropdownMenuSubTrigger>
|
|
76
|
-
<DropdownMenuSubContent className="p-0 bg-popover">
|
|
77
|
-
<Command>
|
|
78
|
-
<CommandInput placeholder="Filtrar label..." />
|
|
79
|
-
<CommandList>
|
|
80
|
-
<CommandEmpty>Nenhum label encontrado.</CommandEmpty>
|
|
81
|
-
<CommandGroup>
|
|
82
|
-
{labels.map((label) => (
|
|
83
|
-
<CommandItem
|
|
84
|
-
key={label}
|
|
85
|
-
value={label}
|
|
86
|
-
onSelect={(value) => {
|
|
87
|
-
setLabel(value)
|
|
88
|
-
setOpen(false)
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
{label}
|
|
92
|
-
</CommandItem>
|
|
93
|
-
))}
|
|
94
|
-
</CommandGroup>
|
|
95
|
-
</CommandList>
|
|
96
|
-
</Command>
|
|
97
|
-
</DropdownMenuSubContent>
|
|
98
|
-
</DropdownMenuSub>
|
|
99
|
-
</DropdownMenuContent>
|
|
100
|
-
</DropdownMenu>
|
|
101
|
-
|
|
102
|
-
// =====================
|
|
103
|
-
// RESPONSIVO (Popover/Drawer)
|
|
104
|
-
// =====================
|
|
105
|
-
import { useMediaQuery } from "@/design-system/hooks/useMediaQuery"
|
|
106
|
-
import { Drawer, DrawerTrigger, DrawerContent } from "forlogic-core"
|
|
107
|
-
|
|
108
|
-
function ResponsiveCombobox() {
|
|
109
|
-
const isDesktop = useMediaQuery("(min-width: 768px)")
|
|
110
|
-
|
|
111
|
-
if (isDesktop) {
|
|
112
|
-
return (
|
|
113
|
-
<Popover>
|
|
114
|
-
<PopoverTrigger asChild>
|
|
115
|
-
<Button>Definir status</Button>
|
|
116
|
-
</PopoverTrigger>
|
|
117
|
-
<PopoverContent className="p-0 bg-popover">
|
|
118
|
-
<StatusList />
|
|
119
|
-
</PopoverContent>
|
|
120
|
-
</Popover>
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return (
|
|
125
|
-
<Drawer>
|
|
126
|
-
<DrawerTrigger asChild>
|
|
127
|
-
<Button>Definir status</Button>
|
|
128
|
-
</DrawerTrigger>
|
|
129
|
-
<DrawerContent>
|
|
130
|
-
<StatusList />
|
|
131
|
-
</DrawerContent>
|
|
132
|
-
</Drawer>
|
|
133
|
-
)
|
|
134
|
-
}`,props:[{name:"options",type:"T[]",default:"[]",description:"Array de opções disponíveis."},{name:"value",type:"string | string[]",default:"-",description:"Valor(es) selecionado(s)."},{name:"onChange",type:"(value: string | string[]) => void",default:"-",description:"Callback quando seleção muda."},{name:"multiple",type:"boolean",default:"false",description:"Habilita seleção múltipla."},{name:"getOptionValue",type:"(opt: T) => string",default:"opt.value",description:"Extrai valor único do item."},{name:"getOptionLabel",type:"(opt: T) => string",default:"opt.label",description:"Extrai label do item."},{name:"placeholder",type:"string",default:'"Selecione..."',description:"Placeholder quando vazio."},{name:"searchPlaceholder",type:"string",default:'"Buscar..."',description:"Placeholder do campo de busca."},{name:"disabled",type:"boolean",default:"false",description:"Desabilita o componente."},{name:"isLoading",type:"boolean",default:"false",description:"Exibe skeleton loader."},{name:"error",type:"string | boolean | Error",default:"-",description:"Mensagem de erro."},{name:"sortOptions",type:"boolean",default:"true",description:"Ordena opções alfabeticamente."},{name:"popoverContainer",type:"HTMLElement | null",default:"undefined",description:"Container para portal (útil em Dialog)."}],accessibility:["Navegação completa por teclado","Busca inteligente (sem acentos, case-insensitive)","Segue padrão WAI-ARIA combobox","Anúncios para leitores de tela","Badges removíveis com teclado (modo múltiplo)","Versão responsiva com Drawer para mobile"]})}export{Z as ComboboxDoc};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as N,j as e,f as v,ah as y,J as w,cl as C,cm as k,cn as p,t as T,bc as E,co as b,bE as P,cp as j}from"./index-CE0k7Rdh.js";function I({code:a,language:d="tsx",className:t=""}){const[l,c]=N.useState(!1),i=async()=>{await navigator.clipboard.writeText(a),c(!0),setTimeout(()=>c(!1),2e3)};return e.jsxs("div",{className:`relative rounded-lg border bg-muted/50 ${t}`,children:[e.jsxs("div",{className:"flex items-center justify-between border-b bg-muted/50 px-4 py-2",children:[e.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:d}),e.jsx(v,{variant:"ghost",size:"sm",onClick:i,className:"h-7 px-2",children:l?e.jsxs(e.Fragment,{children:[e.jsx(y,{className:"h-3 w-3 mr-1"}),e.jsx("span",{className:"text-xs",children:"Copied"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"h-3 w-3 mr-1"}),e.jsx("span",{className:"text-xs",children:"Copy"})]})})]}),e.jsx("pre",{className:"overflow-x-auto p-4",children:e.jsx("code",{className:"text-sm font-mono",children:a})})]})}function u({title:a,description:d,preview:t,code:l,id:c,language:i="tsx",defaultTab:n="preview",className:o="",previewClassName:x=""}){return e.jsxs("div",{id:c,className:`rounded-lg border bg-card scroll-mt-4 ${o}`,children:[(a||d)&&e.jsxs("div",{className:"border-b px-4 py-3",children:[a&&e.jsx("h3",{className:"font-semibold text-base",children:a}),d&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:d})]}),e.jsxs(C,{defaultValue:n,className:"w-full",children:[e.jsx("div",{className:"border-b px-4",children:e.jsxs(k,{className:"h-10 bg-transparent p-0 gap-4",children:[e.jsxs(p,{value:"preview",className:"gap-2 px-0 pb-3 pt-2 rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",children:[e.jsx(T,{size:16}),"Preview"]}),e.jsxs(p,{value:"code",className:"gap-2 px-0 pb-3 pt-2 rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none",children:[e.jsx(E,{size:16}),"Código"]})]})}),e.jsx(b,{value:"preview",className:"mt-0 p-0",children:e.jsx("div",{className:`p-6 ${x}`,children:t})}),e.jsx(b,{value:"code",className:"mt-0 p-0",children:e.jsx("div",{className:"p-4",children:e.jsx(I,{code:l,language:i})})})]})]})}function z({items:a}){if(a.length===0)return null;const d=t=>{const l=document.getElementById(t);l&&l.scrollIntoView({behavior:"smooth",block:"start"})};return e.jsxs("nav",{className:"mb-8 p-4 rounded-lg border bg-muted/30",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 text-sm font-medium text-muted-foreground",children:[e.jsx(P,{className:"h-4 w-4"}),e.jsx("span",{children:"Nesta página"})]}),e.jsx("ul",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-2",children:a.map(t=>e.jsx("li",{children:e.jsx("button",{onClick:()=>d(t.id),className:"text-sm text-muted-foreground hover:text-foreground hover:underline transition-colors text-left truncate max-w-full",title:t.label,children:t.label})},t.id))})]})}function $({title:a,description:d,component:t,usage:l,installation:c,examples:i=[],props:n=[],accessibility:o=[],notes:x=[],children:g,tocItems:m=[],hideToc:f=!1}){const h=N.useMemo(()=>{const s=[];return c&&s.push({id:"instalacao",label:"Instalação"}),l&&t&&s.push({id:"uso",label:"Uso"}),s.push(...m),i.length>0&&(s.push({id:"exemplos",label:"Exemplos"}),i.forEach(r=>{s.push({id:j(r.title),label:r.title})})),n.length>0&&s.push({id:"props",label:"Props"}),o.length>0&&s.push({id:"acessibilidade",label:"Acessibilidade"}),x.length>0&&s.push({id:"notas",label:"Notas"}),s},[c,l,t,i,n,o,x,m]);return e.jsxs("div",{className:"space-y-10",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-4xl font-bold tracking-tight",children:a}),e.jsx("p",{className:"text-lg text-muted-foreground",children:d})]}),!f&&h.length>0&&e.jsx(z,{items:h}),c&&e.jsxs("div",{id:"instalacao",className:"space-y-4 scroll-mt-4",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight border-b pb-2",children:"Instalação"}),e.jsx("pre",{className:"rounded-lg border bg-muted/50 p-4 overflow-x-auto",children:e.jsx("code",{className:"text-sm font-mono",children:c})})]}),l&&t&&e.jsx("div",{id:"uso",className:"scroll-mt-4",children:e.jsx(u,{preview:t,code:l})}),g,i.length>0&&e.jsxs("div",{id:"exemplos",className:"space-y-6 scroll-mt-4",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight border-b pb-2",children:"Exemplos"}),i.map((s,r)=>e.jsx(u,{id:j(s.title),title:s.title,description:s.description,preview:s.preview,code:s.code},r))]}),n.length>0&&e.jsxs("div",{id:"props",className:"space-y-4 scroll-mt-4",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight border-b pb-2",children:"Props"}),e.jsx("div",{className:"rounded-lg border",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b bg-muted/50",children:[e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold",children:"Prop"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold",children:"Tipo"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold",children:"Padrão"}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold",children:"Descrição"})]})}),e.jsx("tbody",{children:n.map((s,r)=>e.jsxs("tr",{className:"border-b last:border-0",children:[e.jsx("td",{className:"px-4 py-3 font-mono text-sm font-medium",children:s.name}),e.jsx("td",{className:"px-4 py-3 font-mono text-sm text-muted-foreground",children:s.type}),e.jsx("td",{className:"px-4 py-3 font-mono text-sm text-muted-foreground",children:s.default||"-"}),e.jsx("td",{className:"px-4 py-3 text-sm",children:s.description})]},r))})]})})]}),o.length>0&&e.jsxs("div",{id:"acessibilidade",className:"space-y-4 scroll-mt-4",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight border-b pb-2",children:"Acessibilidade"}),e.jsx("ul",{className:"space-y-2 list-disc list-inside",children:o.map((s,r)=>e.jsx("li",{className:"text-sm",children:s},r))})]}),x.length>0&&e.jsxs("div",{id:"notas",className:"space-y-4 scroll-mt-4",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight border-b pb-2",children:"Notas"}),e.jsx("ul",{className:"space-y-2",children:x.map((s,r)=>e.jsx("li",{className:"text-sm",children:s},r))})]})]})}export{$ as C,u as E,I as a};
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import{j as e,r as u,dk as C,dl as c,dm as d,dn as M,dp as o,dq as r,dr as n,ds as h,dt as a,du as t,dv as i,dw as s,dx as x}from"./index-CE0k7Rdh.js";import{C as j}from"./ComponentDocTemplate-CRbRY-v5.js";function I(){return e.jsxs(C,{children:[e.jsx(c,{className:"flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed text-sm",children:"Clique com o botão direito aqui"}),e.jsxs(d,{className:"w-64",children:[e.jsxs(t,{inset:!0,children:["Voltar",e.jsx(n,{children:"⌘["})]}),e.jsxs(t,{inset:!0,disabled:!0,children:["Avançar",e.jsx(n,{children:"⌘]"})]}),e.jsxs(t,{inset:!0,children:["Recarregar",e.jsx(n,{children:"⌘R"})]}),e.jsxs(i,{children:[e.jsx(s,{inset:!0,children:"Mais Ferramentas"}),e.jsxs(x,{className:"w-48",children:[e.jsxs(t,{children:["Salvar Página Como...",e.jsx(n,{children:"⇧⌘S"})]}),e.jsx(t,{children:"Criar Atalho..."}),e.jsx(t,{children:"Nomear Janela..."}),e.jsx(o,{}),e.jsx(t,{children:"Ferramentas do Desenvolvedor"})]})]}),e.jsx(o,{}),e.jsxs(r,{checked:!0,children:["Mostrar Barra de Favoritos",e.jsx(n,{children:"⌘⇧B"})]}),e.jsx(r,{children:"Mostrar URLs Completas"}),e.jsx(o,{}),e.jsxs(h,{value:"pedro",children:[e.jsx(M,{inset:!0,children:"Pessoas"}),e.jsx(a,{value:"pedro",children:"Pedro Duarte"}),e.jsx(a,{value:"colm",children:"Colm Tuite"})]})]})]})}function v(){const[m,l]=u.useState(!0),[p,b]=u.useState(!1),[S,g]=u.useState(!1);return e.jsxs(C,{children:[e.jsx(c,{className:"flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed text-sm",children:"Clique direito para opções de visualização"}),e.jsxs(d,{className:"w-64",children:[e.jsx(M,{inset:!0,children:"Aparência"}),e.jsx(o,{}),e.jsxs(r,{checked:m,onCheckedChange:l,children:["Barra de Status",e.jsx(n,{children:"⌘⇧S"})]}),e.jsx(r,{checked:p,onCheckedChange:b,children:"Barra de Atividades"}),e.jsxs(r,{checked:S,onCheckedChange:g,children:["Painel",e.jsx(n,{children:"⌘J"})]})]})]})}function f(){const[m,l]=u.useState("bottom");return e.jsxs(C,{children:[e.jsx(c,{className:"flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed text-sm",children:"Clique direito para posição do painel"}),e.jsxs(d,{className:"w-48",children:[e.jsx(M,{inset:!0,children:"Posição do Painel"}),e.jsx(o,{}),e.jsxs(h,{value:m,onValueChange:l,children:[e.jsx(a,{value:"top",children:"Superior"}),e.jsx(a,{value:"bottom",children:"Inferior"}),e.jsx(a,{value:"right",children:"Direita"})]})]})]})}function w(){return e.jsxs(C,{children:[e.jsx(c,{className:"flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed text-sm",children:"Clique direito para ver submenus"}),e.jsxs(d,{className:"w-64",children:[e.jsx(t,{inset:!0,children:"Novo Arquivo"}),e.jsx(t,{inset:!0,children:"Nova Pasta"}),e.jsx(o,{}),e.jsxs(i,{children:[e.jsx(s,{inset:!0,children:"Compartilhar"}),e.jsxs(x,{className:"w-48",children:[e.jsx(t,{children:"Email"}),e.jsx(t,{children:"Mensagem"}),e.jsx(t,{children:"Slack"}),e.jsx(o,{}),e.jsxs(i,{children:[e.jsx(s,{children:"Redes Sociais"}),e.jsxs(x,{className:"w-48",children:[e.jsx(t,{children:"Twitter"}),e.jsx(t,{children:"Facebook"}),e.jsx(t,{children:"LinkedIn"})]})]})]})]}),e.jsxs(i,{children:[e.jsx(s,{inset:!0,children:"Exportar"}),e.jsxs(x,{className:"w-48",children:[e.jsx(t,{children:"PDF"}),e.jsx(t,{children:"PNG"}),e.jsx(t,{children:"SVG"})]})]})]})]})}const k=`import {
|
|
2
|
-
ContextMenu,
|
|
3
|
-
ContextMenuContent,
|
|
4
|
-
ContextMenuItem,
|
|
5
|
-
ContextMenuTrigger,
|
|
6
|
-
ContextMenuCheckboxItem,
|
|
7
|
-
ContextMenuRadioGroup,
|
|
8
|
-
ContextMenuRadioItem,
|
|
9
|
-
ContextMenuLabel,
|
|
10
|
-
ContextMenuSeparator,
|
|
11
|
-
ContextMenuShortcut,
|
|
12
|
-
ContextMenuSub,
|
|
13
|
-
ContextMenuSubContent,
|
|
14
|
-
ContextMenuSubTrigger,
|
|
15
|
-
} from "forlogic-core"
|
|
16
|
-
|
|
17
|
-
<ContextMenu>
|
|
18
|
-
<ContextMenuTrigger className="flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed">
|
|
19
|
-
Clique com o botão direito aqui
|
|
20
|
-
</ContextMenuTrigger>
|
|
21
|
-
<ContextMenuContent className="w-64">
|
|
22
|
-
<ContextMenuItem inset>
|
|
23
|
-
Voltar
|
|
24
|
-
<ContextMenuShortcut>⌘[</ContextMenuShortcut>
|
|
25
|
-
</ContextMenuItem>
|
|
26
|
-
<ContextMenuItem inset disabled>
|
|
27
|
-
Avançar
|
|
28
|
-
<ContextMenuShortcut>⌘]</ContextMenuShortcut>
|
|
29
|
-
</ContextMenuItem>
|
|
30
|
-
<ContextMenuItem inset>
|
|
31
|
-
Recarregar
|
|
32
|
-
<ContextMenuShortcut>⌘R</ContextMenuShortcut>
|
|
33
|
-
</ContextMenuItem>
|
|
34
|
-
<ContextMenuSub>
|
|
35
|
-
<ContextMenuSubTrigger inset>Mais Ferramentas</ContextMenuSubTrigger>
|
|
36
|
-
<ContextMenuSubContent className="w-48">
|
|
37
|
-
<ContextMenuItem>
|
|
38
|
-
Salvar Página Como...
|
|
39
|
-
<ContextMenuShortcut>⇧⌘S</ContextMenuShortcut>
|
|
40
|
-
</ContextMenuItem>
|
|
41
|
-
<ContextMenuItem>Criar Atalho...</ContextMenuItem>
|
|
42
|
-
<ContextMenuItem>Nomear Janela...</ContextMenuItem>
|
|
43
|
-
<ContextMenuSeparator />
|
|
44
|
-
<ContextMenuItem>Ferramentas do Desenvolvedor</ContextMenuItem>
|
|
45
|
-
</ContextMenuSubContent>
|
|
46
|
-
</ContextMenuSub>
|
|
47
|
-
<ContextMenuSeparator />
|
|
48
|
-
<ContextMenuCheckboxItem checked>
|
|
49
|
-
Mostrar Barra de Favoritos
|
|
50
|
-
<ContextMenuShortcut>⌘⇧B</ContextMenuShortcut>
|
|
51
|
-
</ContextMenuCheckboxItem>
|
|
52
|
-
<ContextMenuCheckboxItem>Mostrar URLs Completas</ContextMenuCheckboxItem>
|
|
53
|
-
<ContextMenuSeparator />
|
|
54
|
-
<ContextMenuRadioGroup value="pedro">
|
|
55
|
-
<ContextMenuLabel inset>Pessoas</ContextMenuLabel>
|
|
56
|
-
<ContextMenuRadioItem value="pedro">Pedro Duarte</ContextMenuRadioItem>
|
|
57
|
-
<ContextMenuRadioItem value="colm">Colm Tuite</ContextMenuRadioItem>
|
|
58
|
-
</ContextMenuRadioGroup>
|
|
59
|
-
</ContextMenuContent>
|
|
60
|
-
</ContextMenu>`,R=`import { useState } from "react"
|
|
61
|
-
import {
|
|
62
|
-
ContextMenu,
|
|
63
|
-
ContextMenuCheckboxItem,
|
|
64
|
-
ContextMenuContent,
|
|
65
|
-
ContextMenuLabel,
|
|
66
|
-
ContextMenuSeparator,
|
|
67
|
-
ContextMenuShortcut,
|
|
68
|
-
ContextMenuTrigger,
|
|
69
|
-
} from "forlogic-core"
|
|
70
|
-
|
|
71
|
-
function ContextMenuWithCheckbox() {
|
|
72
|
-
const [showStatusBar, setShowStatusBar] = useState(true)
|
|
73
|
-
const [showActivityBar, setShowActivityBar] = useState(false)
|
|
74
|
-
const [showPanel, setShowPanel] = useState(false)
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<ContextMenu>
|
|
78
|
-
<ContextMenuTrigger className="flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed">
|
|
79
|
-
Clique direito para opções de visualização
|
|
80
|
-
</ContextMenuTrigger>
|
|
81
|
-
<ContextMenuContent className="w-64">
|
|
82
|
-
<ContextMenuLabel inset>Aparência</ContextMenuLabel>
|
|
83
|
-
<ContextMenuSeparator />
|
|
84
|
-
<ContextMenuCheckboxItem
|
|
85
|
-
checked={showStatusBar}
|
|
86
|
-
onCheckedChange={setShowStatusBar}
|
|
87
|
-
>
|
|
88
|
-
Barra de Status
|
|
89
|
-
<ContextMenuShortcut>⌘⇧S</ContextMenuShortcut>
|
|
90
|
-
</ContextMenuCheckboxItem>
|
|
91
|
-
<ContextMenuCheckboxItem
|
|
92
|
-
checked={showActivityBar}
|
|
93
|
-
onCheckedChange={setShowActivityBar}
|
|
94
|
-
>
|
|
95
|
-
Barra de Atividades
|
|
96
|
-
</ContextMenuCheckboxItem>
|
|
97
|
-
<ContextMenuCheckboxItem
|
|
98
|
-
checked={showPanel}
|
|
99
|
-
onCheckedChange={setShowPanel}
|
|
100
|
-
>
|
|
101
|
-
Painel
|
|
102
|
-
<ContextMenuShortcut>⌘J</ContextMenuShortcut>
|
|
103
|
-
</ContextMenuCheckboxItem>
|
|
104
|
-
</ContextMenuContent>
|
|
105
|
-
</ContextMenu>
|
|
106
|
-
)
|
|
107
|
-
}`,N=`import { useState } from "react"
|
|
108
|
-
import {
|
|
109
|
-
ContextMenu,
|
|
110
|
-
ContextMenuContent,
|
|
111
|
-
ContextMenuLabel,
|
|
112
|
-
ContextMenuRadioGroup,
|
|
113
|
-
ContextMenuRadioItem,
|
|
114
|
-
ContextMenuSeparator,
|
|
115
|
-
ContextMenuTrigger,
|
|
116
|
-
} from "forlogic-core"
|
|
117
|
-
|
|
118
|
-
function ContextMenuWithRadio() {
|
|
119
|
-
const [position, setPosition] = useState("bottom")
|
|
120
|
-
|
|
121
|
-
return (
|
|
122
|
-
<ContextMenu>
|
|
123
|
-
<ContextMenuTrigger className="flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed">
|
|
124
|
-
Clique direito para posição do painel
|
|
125
|
-
</ContextMenuTrigger>
|
|
126
|
-
<ContextMenuContent className="w-48">
|
|
127
|
-
<ContextMenuLabel inset>Posição do Painel</ContextMenuLabel>
|
|
128
|
-
<ContextMenuSeparator />
|
|
129
|
-
<ContextMenuRadioGroup value={position} onValueChange={setPosition}>
|
|
130
|
-
<ContextMenuRadioItem value="top">Superior</ContextMenuRadioItem>
|
|
131
|
-
<ContextMenuRadioItem value="bottom">Inferior</ContextMenuRadioItem>
|
|
132
|
-
<ContextMenuRadioItem value="right">Direita</ContextMenuRadioItem>
|
|
133
|
-
</ContextMenuRadioGroup>
|
|
134
|
-
</ContextMenuContent>
|
|
135
|
-
</ContextMenu>
|
|
136
|
-
)
|
|
137
|
-
}`,T=`import {
|
|
138
|
-
ContextMenu,
|
|
139
|
-
ContextMenuContent,
|
|
140
|
-
ContextMenuItem,
|
|
141
|
-
ContextMenuSeparator,
|
|
142
|
-
ContextMenuSub,
|
|
143
|
-
ContextMenuSubContent,
|
|
144
|
-
ContextMenuSubTrigger,
|
|
145
|
-
ContextMenuTrigger,
|
|
146
|
-
} from "forlogic-core"
|
|
147
|
-
|
|
148
|
-
<ContextMenu>
|
|
149
|
-
<ContextMenuTrigger className="flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed">
|
|
150
|
-
Clique direito para ver submenus
|
|
151
|
-
</ContextMenuTrigger>
|
|
152
|
-
<ContextMenuContent className="w-64">
|
|
153
|
-
<ContextMenuItem inset>Novo Arquivo</ContextMenuItem>
|
|
154
|
-
<ContextMenuItem inset>Nova Pasta</ContextMenuItem>
|
|
155
|
-
<ContextMenuSeparator />
|
|
156
|
-
<ContextMenuSub>
|
|
157
|
-
<ContextMenuSubTrigger inset>Compartilhar</ContextMenuSubTrigger>
|
|
158
|
-
<ContextMenuSubContent className="w-48">
|
|
159
|
-
<ContextMenuItem>Email</ContextMenuItem>
|
|
160
|
-
<ContextMenuItem>Mensagem</ContextMenuItem>
|
|
161
|
-
<ContextMenuItem>Slack</ContextMenuItem>
|
|
162
|
-
<ContextMenuSeparator />
|
|
163
|
-
<ContextMenuSub>
|
|
164
|
-
<ContextMenuSubTrigger>Redes Sociais</ContextMenuSubTrigger>
|
|
165
|
-
<ContextMenuSubContent className="w-48">
|
|
166
|
-
<ContextMenuItem>Twitter</ContextMenuItem>
|
|
167
|
-
<ContextMenuItem>Facebook</ContextMenuItem>
|
|
168
|
-
<ContextMenuItem>LinkedIn</ContextMenuItem>
|
|
169
|
-
</ContextMenuSubContent>
|
|
170
|
-
</ContextMenuSub>
|
|
171
|
-
</ContextMenuSubContent>
|
|
172
|
-
</ContextMenuSub>
|
|
173
|
-
<ContextMenuSub>
|
|
174
|
-
<ContextMenuSubTrigger inset>Exportar</ContextMenuSubTrigger>
|
|
175
|
-
<ContextMenuSubContent className="w-48">
|
|
176
|
-
<ContextMenuItem>PDF</ContextMenuItem>
|
|
177
|
-
<ContextMenuItem>PNG</ContextMenuItem>
|
|
178
|
-
<ContextMenuItem>SVG</ContextMenuItem>
|
|
179
|
-
</ContextMenuSubContent>
|
|
180
|
-
</ContextMenuSub>
|
|
181
|
-
</ContextMenuContent>
|
|
182
|
-
</ContextMenu>`;function P(){return e.jsx(j,{title:"Context Menu",description:"Exibe um menu ao usuário — como um conjunto de ações ou funções — acionado por um clique com o botão direito do mouse.",component:e.jsx(I,{}),usage:k,examples:[{title:"Com Checkbox Items",description:"Menu de contexto com itens de seleção múltipla usando checkbox.",preview:e.jsx(v,{}),code:R},{title:"Com Radio Items",description:"Menu de contexto com seleção única usando radio buttons.",preview:e.jsx(f,{}),code:N},{title:"Com Submenus",description:"Menu de contexto com submenus aninhados para organizar opções hierarquicamente.",preview:e.jsx(w,{}),code:T}],props:[{name:"ContextMenu",type:"Component",description:"Componente raiz que envolve o trigger e o conteúdo do menu."},{name:"ContextMenuTrigger",type:"Component",description:"Área que detecta o clique com botão direito para abrir o menu. Aceita asChild."},{name:"ContextMenuContent",type:"Component",description:"Container para os itens do menu. Aceita alignOffset, sideOffset e className."},{name:"ContextMenuItem",type:"Component",description:"Item básico do menu. Aceita inset, disabled e onSelect."},{name:"ContextMenuCheckboxItem",type:"Component",description:"Item com checkbox. Aceita checked, onCheckedChange e disabled."},{name:"ContextMenuRadioGroup",type:"Component",description:"Agrupa radio items. Aceita value e onValueChange."},{name:"ContextMenuRadioItem",type:"Component",description:"Item de seleção única dentro de um RadioGroup. Requer value."},{name:"ContextMenuLabel",type:"Component",description:"Rótulo não interativo para agrupar itens. Aceita inset."},{name:"ContextMenuSeparator",type:"Component",description:"Linha divisória visual entre grupos de itens."},{name:"ContextMenuShortcut",type:"Component",description:"Exibe atalho de teclado alinhado à direita do item."},{name:"ContextMenuSub",type:"Component",description:"Container para submenu aninhado."},{name:"ContextMenuSubTrigger",type:"Component",description:"Item que abre um submenu ao hover ou foco. Aceita inset."},{name:"ContextMenuSubContent",type:"Component",description:"Conteúdo do submenu aninhado."},{name:"ContextMenuGroup",type:"Component",description:"Agrupa itens relacionados para organização semântica."}],accessibility:["Abre com clique do botão direito ou tecla de menu de contexto (Shift+F10 ou tecla Menu)","Navegação completa por teclado usando setas direcionais","Enter ou Espaço para selecionar item focado","Escape fecha o menu e retorna foco ao elemento anterior","Suporte completo a WAI-ARIA com roles menu, menuitem, menuitemcheckbox e menuitemradio","Submenus acessíveis via seta direita (abrir) e seta esquerda (fechar)","Type-ahead: digitar caracteres foca no item correspondente","Foco visual claro nos itens durante navegação por teclado"]})}export{P as ContextMenuDoc};
|