@webority/ui-react 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{a.g-C18jtUwi.js → a.g-5LWyM-GC.js} +0 -5
- package/dist/{a.g-CZTA9W7e.js → a.g-B1BBAE2l.js} +0 -5
- package/dist/{a.g-kGcGx7fd.js → a.g-CKE-UVlB.js} +0 -5
- package/dist/{a.g-Cbk5fn95.js → a.g-Cp8GEdyM.js} +0 -5
- package/dist/{a.g-ZlBWCAKB.js → a.g-D1PdkV5E.js} +0 -5
- package/dist/{a.g-DpfOFhWD.js → a.g-KjYETv0g.js} +0 -5
- package/dist/{c.g-CaQyJFC2.js → c.g-DKzspN6u.js} +0 -10
- package/dist/{c.g-gUYn9lOJ.js → c.g-DL8VdtRB.js} +0 -10
- package/dist/{c.g-DwdWRaAj.js → c.g-DiBD244Y.js} +0 -10
- package/dist/{c.g-BhWCEU1M.js → c.g-DqGwABja.js} +0 -10
- package/dist/{c.g-CuRIay5q.js → c.g-PBMUuqTQ.js} +0 -10
- package/dist/{c.g-D3DSTTq_.js → c.g-b4cy8Ev3.js} +0 -10
- package/dist/{d.g-BdyVZvGH.js → d.g-C3NmjrFi.js} +0 -4
- package/dist/{d.g-Bf-Lb4fi.js → d.g-C8KPpY8s.js} +0 -4
- package/dist/{d.g--lkMTyII.js → d.g-CipOBRsw.js} +0 -4
- package/dist/{d.g-BhTI9XTv.js → d.g-Cs9TrwFl.js} +0 -4
- package/dist/{d.g-VrTQYgzg.js → d.g-DVdiUnBR.js} +0 -4
- package/dist/{d.g-BAlKfc5d.js → d.g-Dp8Eazt1.js} +0 -4
- package/dist/{e.g-DijO5df_.js → e.g-2mocZT4k.js} +0 -2
- package/dist/{e.g-DCQ-QbS5.js → e.g-B1bvEARe.js} +0 -2
- package/dist/{e.g-bs8B7iHm.js → e.g-Ce9W1eMC.js} +0 -2
- package/dist/{e.g-DsgORGwU.js → e.g-ChGIrYgq.js} +0 -2
- package/dist/{e.g-BkZwCSrS.js → e.g-DNY2Uh45.js} +0 -2
- package/dist/{e.g-BgB3rY0s.js → e.g-DxMDwDJJ.js} +0 -2
- package/dist/{f.g-iPulN-dK.js → f.g-CIsVyKpG.js} +0 -2
- package/dist/{f.g-pldCNHix.js → f.g-D2SOwc4J.js} +0 -2
- package/dist/{f.g-39k2lGMN.js → f.g-DEKavmMH.js} +0 -2
- package/dist/{f.g-DcX3cJNs.js → f.g-DmHdWgNZ.js} +0 -2
- package/dist/{f.g-DgB1VkVg.js → f.g-YGFA9XSP.js} +0 -2
- package/dist/{f.g-Ch7KGmxC.js → f.g-_qCUZhKl.js} +0 -2
- package/dist/{h.g-DTSl2X5V.js → h.g-C0eQ0GQE.js} +0 -4
- package/dist/{h.g-B9IeFVkD.js → h.g-CgHsGdLb.js} +0 -4
- package/dist/{h.g-DGV-2vB2.js → h.g-Ci-Er6CR.js} +0 -4
- package/dist/{h.g-CBS5JSb9.js → h.g-CzRUdkfn.js} +0 -4
- package/dist/{h.g-BqJc9V7V.js → h.g-Dxw84X7K.js} +0 -4
- package/dist/{h.g-CHL6fyY2.js → h.g-ezEFj2YC.js} +0 -4
- package/dist/{iconVariants.g-9RHllJhB.js → iconVariants.g-BBn9-u3W.js} +250 -0
- package/dist/{k.g-0TSnGaBz.js → k.g-BJ0rj5XB.js} +0 -1
- package/dist/{k.g-DTuhZC0C.js → k.g-Bb2wQ2Ms.js} +0 -1
- package/dist/{k.g-s22XM_I_.js → k.g-BeMlVIgm.js} +0 -1
- package/dist/{k.g-BM6GMeZL.js → k.g-Bq4FcDK3.js} +0 -1
- package/dist/{k.g-_8Csmx78.js → k.g-CifZIVeO.js} +0 -1
- package/dist/{k.g-DjNDf_xl.js → k.g-DSSazL_b.js} +0 -1
- package/dist/{l.g-DxBZUfHe.js → l.g-BMDbVi8H.js} +0 -4
- package/dist/{l.g-CZgfVixN.js → l.g-B_bLp8m2.js} +0 -4
- package/dist/{l.g-CquK2W0X.js → l.g-C_pTRDDL.js} +0 -4
- package/dist/{l.g-CMnh8bsv.js → l.g-DA6nIw_z.js} +0 -4
- package/dist/{l.g-B5dBydo2.js → l.g-DZ1zMM1w.js} +0 -4
- package/dist/{l.g-08nNSvXQ.js → l.g-eEit84D7.js} +0 -4
- package/dist/{m.g-CKm5SWCa.js → m.g-Cj4NTa9B.js} +0 -3
- package/dist/{m.g-C00S90UO.js → m.g-CytECcy1.js} +0 -3
- package/dist/{m.g-w2XDw2B7.js → m.g-DDIUTIAb.js} +0 -3
- package/dist/{m.g-bB77ufTr.js → m.g-DFbdZm5W.js} +0 -3
- package/dist/{m.g-Ct5bYwgR.js → m.g-Dcv_pEO4.js} +0 -3
- package/dist/{m.g-DO4YjrrH.js → m.g-Dgj5H5KY.js} +0 -3
- package/dist/{n.g-DEXqWWzA.js → n.g-BDt_DYat.js} +0 -1
- package/dist/{n.g-Bm5Ymqg8.js → n.g-BIYpVBEb.js} +0 -1
- package/dist/{n.g-B48nwmF2.js → n.g-CM9J_tyR.js} +0 -1
- package/dist/{n.g-B32E83uM.js → n.g-DG8THBSN.js} +0 -1
- package/dist/{n.g-Cka0ElaE.js → n.g-DhZ0Lcm6.js} +0 -1
- package/dist/{n.g-Diu49idy.js → n.g-UvurkmXk.js} +0 -1
- package/dist/{p.g-CcU7IIJg.js → p.g-CXYzEsVb.js} +0 -2
- package/dist/{p.g-CyvwuJ3g.js → p.g-CXg3EaEZ.js} +0 -2
- package/dist/{p.g-j2HBfXwg.js → p.g-D5tA2vwU.js} +0 -2
- package/dist/{p.g-BZuYckSt.js → p.g-DBbjzvfV.js} +0 -2
- package/dist/{p.g-UmU4YOfh.js → p.g-Dt5NMAPz.js} +0 -2
- package/dist/{p.g-B9D5LM7A.js → p.g-HXmphCe0.js} +0 -2
- package/dist/{r.g-Ca61d9Tg.js → r.g-BSSEI7vV.js} +0 -2
- package/dist/{r.g-Bzy-sQAq.js → r.g-C5gZi2H7.js} +0 -2
- package/dist/{r.g-MWcL0Gia.js → r.g-C8yWsdze.js} +0 -2
- package/dist/{r.g-DCBrmaL7.js → r.g-D1cgPNdo.js} +0 -2
- package/dist/{r.g-Cq3_XjN4.js → r.g-DIEF7HkY.js} +0 -2
- package/dist/{r.g-CRV3XqjL.js → r.g-Dus-zLxh.js} +0 -2
- package/dist/{s.g-CgoPHont.js → s.g-5lIn93sd.js} +0 -3
- package/dist/{s.g-BjrgMYYV.js → s.g-BX2BLrIK.js} +0 -3
- package/dist/{s.g-B5pKx8ht.js → s.g-Ccoxarre.js} +0 -3
- package/dist/{s.g-lQ8_30mA.js → s.g-CikU_E1r.js} +0 -3
- package/dist/{s.g-Cogd4fxO.js → s.g-D41EhCR8.js} +0 -3
- package/dist/{s.g-7mcSsXJC.js → s.g-Duv4gf-_.js} +0 -3
- package/dist/{t.g-D6ZRxGQh.js → t.g-9FQPNgd_.js} +0 -4
- package/dist/{t.g-B8ufOY4m.js → t.g-Bxhb2WIA.js} +0 -4
- package/dist/{t.g-HwsD0vhG.js → t.g-C4d7xUwA.js} +0 -4
- package/dist/{t.g-Br1RZdXp.js → t.g-C9DMEGtG.js} +0 -4
- package/dist/{t.g-DaclRMWs.js → t.g-Cvg4dLth.js} +0 -4
- package/dist/{t.g-jjAdW0a0.js → t.g-Dhkar577.js} +0 -4
- package/dist/types/components/AppBarChart.d.ts +31 -0
- package/dist/types/components/AppCalendar.d.ts +45 -0
- package/dist/types/components/AppChart.d.ts +56 -0
- package/dist/types/components/AppChartCard.d.ts +39 -0
- package/dist/types/components/AppChoiceChip.d.ts +25 -10
- package/dist/types/components/AppConfirmDialog.d.ts +14 -45
- package/dist/types/components/AppContextMenu.d.ts +57 -0
- package/dist/types/components/AppDashboardCell.d.ts +14 -0
- package/dist/types/components/AppDashboardGrid.d.ts +22 -0
- package/dist/types/components/AppDataTable.d.ts +5 -1
- package/dist/types/components/AppInput.d.ts +19 -0
- package/dist/types/components/AppKanban.d.ts +82 -0
- package/dist/types/components/AppLineChart.d.ts +50 -0
- package/dist/types/components/AppLogoPicker.d.ts +2 -1
- package/dist/types/components/AppModal.d.ts +4 -3
- package/dist/types/components/AppRichText.d.ts +42 -0
- package/dist/types/components/AppShell.d.ts +150 -22
- package/dist/types/components/AppSortableList.d.ts +32 -0
- package/dist/types/components/AppSparkline.d.ts +24 -0
- package/dist/types/components/AppStatusBadge.d.ts +16 -5
- package/dist/types/components/AppTreeView.d.ts +44 -0
- package/dist/types/components/iconCatalogFull/bold/a.g.d.ts +0 -5
- package/dist/types/components/iconCatalogFull/bold/c.g.d.ts +0 -10
- package/dist/types/components/iconCatalogFull/bold/d.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bold/e.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bold/f.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bold/h.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bold/k.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bold/l.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bold/m.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/bold/n.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bold/p.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bold/r.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bold/s.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/bold/t.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bold/u.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bold/v.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bold/w.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/broken/a.g.d.ts +0 -5
- package/dist/types/components/iconCatalogFull/broken/c.g.d.ts +0 -10
- package/dist/types/components/iconCatalogFull/broken/d.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/broken/e.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/broken/f.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/broken/h.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/broken/k.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/broken/l.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/broken/m.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/broken/n.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/broken/p.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/broken/r.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/broken/s.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/broken/t.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/broken/u.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/broken/v.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/broken/w.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bulk/a.g.d.ts +0 -5
- package/dist/types/components/iconCatalogFull/bulk/c.g.d.ts +0 -10
- package/dist/types/components/iconCatalogFull/bulk/d.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bulk/e.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bulk/f.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bulk/h.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bulk/k.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bulk/l.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bulk/m.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/bulk/n.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bulk/p.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bulk/r.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/bulk/s.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/bulk/t.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/bulk/u.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bulk/v.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/bulk/w.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/linear/a.g.d.ts +0 -5
- package/dist/types/components/iconCatalogFull/linear/c.g.d.ts +0 -10
- package/dist/types/components/iconCatalogFull/linear/d.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/linear/e.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/linear/f.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/linear/h.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/linear/k.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/linear/l.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/linear/m.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/linear/n.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/linear/p.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/linear/r.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/linear/s.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/linear/t.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/linear/u.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/linear/v.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/linear/w.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/outline/a.g.d.ts +0 -5
- package/dist/types/components/iconCatalogFull/outline/c.g.d.ts +0 -10
- package/dist/types/components/iconCatalogFull/outline/d.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/outline/e.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/outline/f.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/outline/h.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/outline/k.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/outline/l.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/outline/m.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/outline/n.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/outline/p.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/outline/r.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/outline/s.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/outline/t.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/outline/u.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/outline/v.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/outline/w.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/twotone/a.g.d.ts +0 -5
- package/dist/types/components/iconCatalogFull/twotone/c.g.d.ts +0 -10
- package/dist/types/components/iconCatalogFull/twotone/d.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/twotone/e.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/twotone/f.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/twotone/h.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/twotone/k.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/twotone/l.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/twotone/m.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/twotone/n.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/twotone/p.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/twotone/r.g.d.ts +0 -2
- package/dist/types/components/iconCatalogFull/twotone/s.g.d.ts +0 -3
- package/dist/types/components/iconCatalogFull/twotone/t.g.d.ts +0 -4
- package/dist/types/components/iconCatalogFull/twotone/u.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/twotone/v.g.d.ts +0 -1
- package/dist/types/components/iconCatalogFull/twotone/w.g.d.ts +0 -1
- package/dist/types/components/iconGlyphs.g.d.ts +50 -0
- package/dist/types/components/iconVariants.g.d.ts +250 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/lib/navMatch.d.ts +15 -0
- package/dist/types/lib/shellCookie.d.ts +6 -0
- package/dist/{u.g-5ScDKXTw.js → u.g-C6mC8OrR.js} +0 -1
- package/dist/{u.g-D6SELEmA.js → u.g-Cl8s3gGa.js} +0 -1
- package/dist/{u.g-DuWEahNS.js → u.g-D7I_vPrG.js} +0 -1
- package/dist/{u.g-C9ikeL2C.js → u.g-D96_3gsv.js} +0 -1
- package/dist/{u.g-CT36EKae.js → u.g-DihXFOEv.js} +0 -1
- package/dist/{u.g-jofx4B7Z.js → u.g-ia-nNvjK.js} +0 -1
- package/dist/ui-react.js +5066 -3142
- package/dist/{v.g-rfXV1KJa.js → v.g-BxRTxjbP.js} +0 -1
- package/dist/{v.g-DKQG7wGs.js → v.g-CF_fpvOP.js} +0 -1
- package/dist/{v.g-Cwhetxcd.js → v.g-Ccd_-2QB.js} +0 -1
- package/dist/{v.g-CGs8SFES.js → v.g-IFr8O1YA.js} +0 -1
- package/dist/{v.g-CJYXr9qr.js → v.g-Yt58dVke.js} +0 -1
- package/dist/{v.g-BA-3saLU.js → v.g-taJ1oC9Z.js} +0 -1
- package/dist/{w.g-BsZUtVOp.js → w.g-7MAxYD_f.js} +0 -1
- package/dist/{w.g-BzY7sskU.js → w.g-BRwJSEbR.js} +0 -1
- package/dist/{w.g-CGXIqJB2.js → w.g-BrAIH76H.js} +0 -1
- package/dist/{w.g-BNX09ubl.js → w.g-DN5a2C4A.js} +0 -1
- package/dist/{w.g-CG1D9SAs.js → w.g-DgdwQxer.js} +0 -1
- package/dist/{w.g-D6R33yKo.js → w.g-DnmMiN_H.js} +0 -1
- package/package.json +5 -5
|
@@ -50,6 +50,25 @@
|
|
|
50
50
|
* `@webority/ui-elements`, so both surfaces validate identically.
|
|
51
51
|
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.requirementsPlacement="auto"] Which side the
|
|
52
52
|
* requirements popover opens; `auto` flips to stay in view.
|
|
53
|
+
* @param {string} [props.mask] Format the value while it is typed. A named mask
|
|
54
|
+
* (`phone-in`, `pan`, `gstin`, `aadhaar`, `ifsc`, `pin-code`, `date` as DD-MM-YYYY, `amount` with
|
|
55
|
+
* Indian grouping) or a pattern, where `9` is a digit, `A` a letter, `*` a digit or letter and any
|
|
56
|
+
* other character a literal (`"(999) 999-9999"`). Paste is cleaned and re-formatted, Backspace and
|
|
57
|
+
* Delete step over literals, and the caret stays put; a keyboard that composes text (an Android IME) is
|
|
58
|
+
* left alone until it commits, and a value set from code (react-hook-form `setValue` / `reset`) is
|
|
59
|
+
* laid out too. The behaviour is the one `<app-input mask>` runs, from `@webority/ui-elements`. Use
|
|
60
|
+
* it on a `text`, `tel`, `search`, `url` or `password` field; any other `type` warns, and an unknown
|
|
61
|
+
* mask name warns. A controlled `value` (raw or formatted) is laid out under the mask. `onChange`
|
|
62
|
+
* and `onBlur` get an event whose `target.value` is the POSTED value (the raw characters, or ISO
|
|
63
|
+
* `yyyy-MM-dd` for `date`), so a controlled field and a zod rule see what the server will see;
|
|
64
|
+
* `onInput` sees the field as displayed. react-hook-form's `register` reads the element itself, so
|
|
65
|
+
* pair it with `setValueAs: (v) => postedMasked(mask, v)`. A named mask also marks the field invalid
|
|
66
|
+
* with a curated message while it is incomplete or wrong, shown as the field's error once the field
|
|
67
|
+
* has been left or a submit was tried (an `error` you pass wins).
|
|
68
|
+
* @param {boolean} [props.postFormatted=false] With a `mask`, a native form submit posts the
|
|
69
|
+
* formatted value instead of the raw one (the typed characters without the literals).
|
|
70
|
+
* @param {(raw: string, formatted: string) => void} [props.onMaskChange] Called with the raw and the
|
|
71
|
+
* formatted value whenever the raw value changes.
|
|
53
72
|
* @param {import('react').Ref<HTMLInputElement>} [ref]
|
|
54
73
|
*/
|
|
55
74
|
declare const AppInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import "@webority/ui-elements";
|
|
2
|
+
/**
|
|
3
|
+
* A board of columns whose cards move by drag and drop (mouse, pen, or touch after a long press)
|
|
4
|
+
* or by keyboard (Space picks a card up, Left and Right choose a column, Space drops, Escape
|
|
5
|
+
* cancels), announced to screen readers at every step.
|
|
6
|
+
*
|
|
7
|
+
* Wraps the shared `<wui-kanban>` element in controlled mode: the element runs the drag, the drop
|
|
8
|
+
* rules, the hatched "not allowed" columns, the remembered collapse and the phone column switcher;
|
|
9
|
+
* this component owns the cards. A drop calls `onMove`; while its promise is pending the card shows
|
|
10
|
+
* in its new column with a saving lock, and a rejection puts it back with an error toast (the
|
|
11
|
+
* rejection's message, so write it for the person who dragged). `onMove` must leave `cards` holding
|
|
12
|
+
* the new column by the time it settles, or the card goes back to where `cards` says it is. A drop
|
|
13
|
+
* that needs a decision first (a reason for a lost deal) opens the product's own AppModal from
|
|
14
|
+
* `onMove` and settles the promise with the modal's outcome.
|
|
15
|
+
*
|
|
16
|
+
* Below the md breakpoint the board shows one column per screen with a column switcher above it;
|
|
17
|
+
* the board scrolls inside itself, so the page never scrolls sideways.
|
|
18
|
+
*
|
|
19
|
+
* @param {object} props
|
|
20
|
+
* @param {{ key: string, title: string, tone?: 'neutral'|'primary'|'info'|'success'|'warning'|'danger',
|
|
21
|
+
* href?: string, summary?: import('react').ReactNode | ((cards: object[]) => import('react').ReactNode),
|
|
22
|
+
* acceptFrom?: string[], collapsible?: boolean, collapsed?: boolean, emptyText?: string }[]} props.columns
|
|
23
|
+
* The columns, left to right. `acceptFrom` lists the only columns this one takes cards from;
|
|
24
|
+
* `collapsible` columns fold to a strip, remembered per `boardId`; `collapsed` is the first state.
|
|
25
|
+
* @param {object[]} props.cards Every card on the board.
|
|
26
|
+
* @param {(card: object) => import('react').ReactNode} props.renderCard The card's content.
|
|
27
|
+
* @param {(card: object) => string} [props.getCardKey] Default `card.key ?? card.id`.
|
|
28
|
+
* @param {(card: object) => string} [props.getCardColumn] Default `card.column`.
|
|
29
|
+
* @param {(card: object) => number} [props.getCardValue] The number a computed summary adds up.
|
|
30
|
+
* @param {(card: object) => string} [props.cardLabel] The card's accessible name, used in announcements.
|
|
31
|
+
* @param {(card: object) => boolean} [props.isCardLocked] A locked card cannot be moved.
|
|
32
|
+
* @param {(move: { card: object, key: string, from: string, to: string, index: number }) => void | Promise<unknown>} [props.onMove]
|
|
33
|
+
* @param {(card: object, from: string, to: string) => boolean | string} [props.accept] Refuse a move:
|
|
34
|
+
* false, or a string saying why (shown in the column while the card is carried).
|
|
35
|
+
* @param {(card: object) => boolean} [props.filter] Show only the cards it returns true for; counts follow.
|
|
36
|
+
* @param {string} [props.boardId] Remembers collapsed columns per browser under this id.
|
|
37
|
+
* @param {string} [props.ariaLabel='Board'] Accessible name of the board region.
|
|
38
|
+
* @param {string} [props.emptyText='Nothing here'] Text of an empty column.
|
|
39
|
+
* @param {boolean} [props.readOnly=false] No card can move.
|
|
40
|
+
* @param {'number'|'currency'|'compact'} [props.summaryFormat] Each column's summary becomes the sum
|
|
41
|
+
* of its visible cards' `getCardValue`, in this format.
|
|
42
|
+
* @param {'rupees'|'paise'} [props.summaryUnit='rupees'] The unit of the card values.
|
|
43
|
+
* @param {string} [props.className]
|
|
44
|
+
* @param {string} [props.id] The board's id; the column, body and help ids derive from it. Generated when omitted.
|
|
45
|
+
*/
|
|
46
|
+
export default function AppKanban({ columns, cards, renderCard, getCardKey, getCardColumn, getCardValue, cardLabel, isCardLocked, onMove, accept, filter, boardId, ariaLabel, emptyText, readOnly, summaryFormat, summaryUnit, className, id, ...rest }: {
|
|
47
|
+
columns: {
|
|
48
|
+
key: string;
|
|
49
|
+
title: string;
|
|
50
|
+
tone?: 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
51
|
+
href?: string;
|
|
52
|
+
summary?: import('react').ReactNode | ((cards: object[]) => import('react').ReactNode);
|
|
53
|
+
acceptFrom?: string[];
|
|
54
|
+
collapsible?: boolean;
|
|
55
|
+
collapsed?: boolean;
|
|
56
|
+
emptyText?: string;
|
|
57
|
+
}[];
|
|
58
|
+
cards: object[];
|
|
59
|
+
renderCard: (card: object) => import('react').ReactNode;
|
|
60
|
+
getCardKey?: (card: object) => string;
|
|
61
|
+
getCardColumn?: (card: object) => string;
|
|
62
|
+
getCardValue?: (card: object) => number;
|
|
63
|
+
cardLabel?: (card: object) => string;
|
|
64
|
+
isCardLocked?: (card: object) => boolean;
|
|
65
|
+
onMove?: (move: {
|
|
66
|
+
card: object;
|
|
67
|
+
key: string;
|
|
68
|
+
from: string;
|
|
69
|
+
to: string;
|
|
70
|
+
index: number;
|
|
71
|
+
}) => void | Promise<unknown>;
|
|
72
|
+
accept?: (card: object, from: string, to: string) => boolean | string;
|
|
73
|
+
filter?: (card: object) => boolean;
|
|
74
|
+
boardId?: string;
|
|
75
|
+
ariaLabel?: string;
|
|
76
|
+
emptyText?: string;
|
|
77
|
+
readOnly?: boolean;
|
|
78
|
+
summaryFormat?: 'number' | 'currency' | 'compact';
|
|
79
|
+
summaryUnit?: 'rupees' | 'paise';
|
|
80
|
+
className?: string;
|
|
81
|
+
id?: string;
|
|
82
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A line chart: one numeric series over categorical x labels (months, quarters, attempts).
|
|
3
|
+
* Hand-drawn SVG, no chart library. The x axis is laid out in percentages and the y axis in
|
|
4
|
+
* pixels, so the chart fills any width without a resize observer and without scaling its text.
|
|
5
|
+
* Each point is a focusable button that shows its value on hover and focus; a visually hidden
|
|
6
|
+
* table carries every value, the band and reference labels included, for screen readers.
|
|
7
|
+
*
|
|
8
|
+
* @param {object} props
|
|
9
|
+
* @param {{ label: string, value: number | null }[]} props.data The series, in x order. Labels must
|
|
10
|
+
* be unique. A `null` value leaves a gap in the line.
|
|
11
|
+
* @param {string} [props.name] The series name, read before each point's value ("Score, Mar: 72").
|
|
12
|
+
* @param {number} [props.yMin] Fixes the bottom of the y axis. Omitted: taken from the data,
|
|
13
|
+
* rounded down to a whole tick.
|
|
14
|
+
* @param {number} [props.yMax] Fixes the top of the y axis. Omitted: taken from the data,
|
|
15
|
+
* rounded up to a whole tick.
|
|
16
|
+
* @param {{ from: number, to: number, label?: string, tone?: 'neutral'|'info'|'success'|'warning'|'danger' }[]} [props.bands]
|
|
17
|
+
* Shaded y ranges behind the line, such as rating bands, each labelled at its top right.
|
|
18
|
+
* @param {{ value: number, label?: string }[]} [props.referenceLines] Dashed horizontal lines,
|
|
19
|
+
* such as a target or a threshold, each labelled at its right end.
|
|
20
|
+
* @param {(value: number) => string} [props.formatValue] Formats every value the chart prints:
|
|
21
|
+
* ticks, tooltips, the data table. Defaults to `String(value)`.
|
|
22
|
+
* @param {number} [props.height=240] Height of the plot area in px, x labels excluded.
|
|
23
|
+
* @param {string} [props.title] A visible caption above the chart; also names it for assistive tech.
|
|
24
|
+
* @param {string} [props.ariaLabel] Names the chart when there is no visible `title`.
|
|
25
|
+
* @param {string} [props.className]
|
|
26
|
+
*/
|
|
27
|
+
export default function AppLineChart({ data, name, yMin, yMax, bands, referenceLines, formatValue, height, title, ariaLabel, className, ...rest }: {
|
|
28
|
+
data: {
|
|
29
|
+
label: string;
|
|
30
|
+
value: number | null;
|
|
31
|
+
}[];
|
|
32
|
+
name?: string;
|
|
33
|
+
yMin?: number;
|
|
34
|
+
yMax?: number;
|
|
35
|
+
bands?: {
|
|
36
|
+
from: number;
|
|
37
|
+
to: number;
|
|
38
|
+
label?: string;
|
|
39
|
+
tone?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
40
|
+
}[];
|
|
41
|
+
referenceLines?: {
|
|
42
|
+
value: number;
|
|
43
|
+
label?: string;
|
|
44
|
+
}[];
|
|
45
|
+
formatValue?: (value: number) => string;
|
|
46
|
+
height?: number;
|
|
47
|
+
title?: string;
|
|
48
|
+
ariaLabel?: string;
|
|
49
|
+
className?: string;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
@@ -3,11 +3,12 @@ fallback, // node shown when there's no image (e.g. initials)
|
|
|
3
3
|
name, onPick, // (file) => void — receives a validated File
|
|
4
4
|
onRemove, // () => void — clears the current logo
|
|
5
5
|
loading, // show a spinner + block interaction while the pick is uploading
|
|
6
|
-
disabled, accept, maxSizeMb, overlayIcon, overlayLabel, ariaLabel, label, hint, error, layout, title, subtitle, required, variant, size, shape, className, ...rest }: {
|
|
6
|
+
disabled, accept, maxSizeMb, crop, overlayIcon, overlayLabel, ariaLabel, label, hint, error, layout, title, subtitle, required, variant, size, shape, className, ...rest }: {
|
|
7
7
|
[x: string]: any;
|
|
8
8
|
accept?: string;
|
|
9
9
|
ariaLabel?: string;
|
|
10
10
|
className?: string;
|
|
11
|
+
crop: any;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
error: any;
|
|
13
14
|
fallback: any;
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
* `staticBackdrop` for a forced-choice dialog with no way out but an explicit action.
|
|
14
14
|
* @param {() => void} props.onClose
|
|
15
15
|
* @param {import('react').ReactNode} [props.footer]
|
|
16
|
-
* @param {'sm'|'md'|'lg'|'xl'|number} [props.size='md'] Card width — a preset,
|
|
17
|
-
* max-width in px for a custom size
|
|
16
|
+
* @param {'sm'|'md'|'lg'|'xl'|'fullscreen'|number} [props.size='md'] Card width — a preset, an
|
|
17
|
+
* exact max-width in px for a custom size, or fullscreen (the whole viewport, header and footer
|
|
18
|
+
* pinned).
|
|
18
19
|
* @param {'center'|'top'} [props.placement='center'] Vertical placement of the card —
|
|
19
20
|
* centred (default) or pinned near the top of the viewport.
|
|
20
21
|
* @param {boolean} [props.hideHeader=false]
|
|
@@ -35,7 +36,7 @@ export default function AppModal({ open, eyebrow, title, subtitle, headerIcon, t
|
|
|
35
36
|
dismissible?: boolean;
|
|
36
37
|
onClose: () => void;
|
|
37
38
|
footer?: import('react').ReactNode;
|
|
38
|
-
size?: 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
39
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen' | number;
|
|
39
40
|
placement?: 'center' | 'top';
|
|
40
41
|
hideHeader?: boolean;
|
|
41
42
|
ariaLabel?: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A formatted-text field: a toolbar (bold, italic, inline code, link, headings, lists, quote, code
|
|
3
|
+
* block, undo, redo) over an editable surface, with the usual keyboard shortcuts. The field is the
|
|
4
|
+
* shared `<wui-rich-text>` element, the same one the Razor `<app-rich-text>` uses, with its editing
|
|
5
|
+
* engine loaded the first time an editor mounts: a page without one never downloads it.
|
|
6
|
+
*
|
|
7
|
+
* The value is a string in `format`, HTML by default or Markdown. It is always written out from a
|
|
8
|
+
* fixed set of allowed content (paragraphs, bold, italic, inline code, links, two heading levels,
|
|
9
|
+
* lists, quotes, code blocks), so pasted or seeded markup outside that set never reaches the value:
|
|
10
|
+
* a pasted script, style, class or table has nowhere to land. A link may point at http, https,
|
|
11
|
+
* mailto or tel only. An empty editor is the empty string. Still sanitise on the server: the
|
|
12
|
+
* browser is not a trust boundary.
|
|
13
|
+
*
|
|
14
|
+
* ```jsx
|
|
15
|
+
* <AppRichText label="Notes" value={notes} onChange={setNotes} hint="Shown on the invoice." />
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* `onChange` fires on every edit with the new string. `format` is read when the editor mounts; the
|
|
19
|
+
* wrapper remounts the editor when it changes, so the value you hold must be in the new format.
|
|
20
|
+
*
|
|
21
|
+
* @param {object} props
|
|
22
|
+
* @param {string} [props.value] The content, in `format`.
|
|
23
|
+
* @param {(value: string) => void} [props.onChange] Called with the new string on every edit.
|
|
24
|
+
* @param {'html'|'markdown'} [props.format='html'] What `value` is.
|
|
25
|
+
* @param {string} [props.placeholder] Shown while the editor is empty.
|
|
26
|
+
* @param {string} [props.name] Posted under this name with a form.
|
|
27
|
+
* @param {import('react').ReactNode} [props.label]
|
|
28
|
+
* @param {string} [props.error]
|
|
29
|
+
* @param {string} [props.hint]
|
|
30
|
+
* @param {boolean} [props.required=false] Marks the field required; an empty editor is invalid.
|
|
31
|
+
* @param {boolean} [props.disabled=false] Locks the editor and keeps it out of the form post.
|
|
32
|
+
* @param {boolean} [props.readOnly=false] Locks the editor; the value still posts.
|
|
33
|
+
* @param {string} [props.id]
|
|
34
|
+
* @param {string} [props.ariaLabel] Accessible name for the editor; defaults to a string `label`.
|
|
35
|
+
* @param {string} [props.className] Class on the `<wui-rich-text>` element.
|
|
36
|
+
* @param {string} [props.fieldClassName] Class on the wrapper field div.
|
|
37
|
+
* @param {import('react').ReactNode} [props.help] Help content shown in an info tip beside the label.
|
|
38
|
+
* @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
|
|
39
|
+
* @param {import('react').Ref<HTMLElement>} [ref] The `<wui-rich-text>` element.
|
|
40
|
+
*/
|
|
41
|
+
declare const AppRichText: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
42
|
+
export default AppRichText;
|
|
@@ -20,42 +20,154 @@ export type NavItemShape = {
|
|
|
20
20
|
*/
|
|
21
21
|
trailingIcon?: string | import('react').ReactNode;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Unset: decided from `currentPath`. true / false force it.
|
|
24
24
|
*/
|
|
25
25
|
active?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* How `href` is matched against `currentPath` (default prefix).
|
|
28
|
+
*/
|
|
29
|
+
match?: 'prefix' | 'exact';
|
|
30
|
+
/**
|
|
31
|
+
* Extra path prefixes that also make this item the current page.
|
|
32
|
+
*/
|
|
33
|
+
matchAlso?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Also show this item in the phone bottom tab bar.
|
|
36
|
+
*/
|
|
37
|
+
tab?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* A shorter label for the tab bar.
|
|
40
|
+
*/
|
|
41
|
+
tabLabel?: string;
|
|
26
42
|
/**
|
|
27
43
|
* Sub-items — the row becomes an expandable parent.
|
|
28
44
|
*/
|
|
29
45
|
children?: NavItemShape[];
|
|
30
46
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
export type UserMenuShape = {
|
|
48
|
+
/**
|
|
49
|
+
* The person's full name; the avatar's initials come from it.
|
|
50
|
+
*/
|
|
51
|
+
name: string;
|
|
52
|
+
/**
|
|
53
|
+
* A second line: job title or signed-in role.
|
|
54
|
+
*/
|
|
55
|
+
role?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Profile photo URL.
|
|
58
|
+
*/
|
|
59
|
+
photo?: string;
|
|
60
|
+
profileHref?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Default "My profile".
|
|
63
|
+
*/
|
|
64
|
+
profileLabel?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Sign-out handler (a button).
|
|
67
|
+
*/
|
|
68
|
+
onLogout?: () => void;
|
|
69
|
+
/**
|
|
70
|
+
* Or a URL a sign-out form POSTs to.
|
|
71
|
+
*/
|
|
72
|
+
logoutAction?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Default "Sign out".
|
|
75
|
+
*/
|
|
76
|
+
logoutLabel?: string;
|
|
77
|
+
items?: {
|
|
78
|
+
key: string;
|
|
79
|
+
label?: string;
|
|
80
|
+
icon?: string;
|
|
81
|
+
href?: string;
|
|
82
|
+
onClick?: () => void;
|
|
83
|
+
divider?: true;
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
86
|
+
export type NotificationsShape = {
|
|
87
|
+
/**
|
|
88
|
+
* Unread count on the bell (99+ above 99).
|
|
89
|
+
*/
|
|
90
|
+
unread?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The list; undefined until loaded.
|
|
93
|
+
*/
|
|
94
|
+
items?: {
|
|
95
|
+
id?: string;
|
|
96
|
+
title: string;
|
|
97
|
+
time?: string;
|
|
98
|
+
href?: string;
|
|
99
|
+
read?: boolean;
|
|
100
|
+
icon?: string;
|
|
101
|
+
}[];
|
|
102
|
+
loading?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Called as the panel opens: load or refresh `items` here.
|
|
105
|
+
*/
|
|
106
|
+
onOpen?: () => void;
|
|
107
|
+
/**
|
|
108
|
+
* Shows "Mark all read".
|
|
109
|
+
*/
|
|
110
|
+
onMarkAllRead?: () => void;
|
|
111
|
+
viewAllHref?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Default "Notifications".
|
|
114
|
+
*/
|
|
115
|
+
label?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Default "You are all caught up.".
|
|
118
|
+
*/
|
|
119
|
+
emptyText?: string;
|
|
120
|
+
};
|
|
121
|
+
export type SearchShape = {
|
|
122
|
+
/**
|
|
123
|
+
* Controlled text.
|
|
124
|
+
*/
|
|
125
|
+
value: string;
|
|
126
|
+
onChange: (value: string) => void;
|
|
127
|
+
/**
|
|
128
|
+
* Suggestion groups; null hides the list.
|
|
129
|
+
*/
|
|
130
|
+
results?: {
|
|
131
|
+
label?: string;
|
|
132
|
+
hits: {
|
|
133
|
+
title: string;
|
|
134
|
+
href: string;
|
|
135
|
+
subtitle?: string;
|
|
136
|
+
icon?: string;
|
|
137
|
+
}[];
|
|
138
|
+
}[] | null;
|
|
139
|
+
loading?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* A suggestion was picked; preventDefault the event to route yourself.
|
|
142
|
+
*/
|
|
143
|
+
onSelect?: (hit: object, event: Event) => void;
|
|
144
|
+
/**
|
|
145
|
+
* Enter with no suggestion chosen.
|
|
146
|
+
*/
|
|
147
|
+
onSubmit?: (value: string) => void;
|
|
148
|
+
/**
|
|
149
|
+
* Default "Search"; also the field's accessible name.
|
|
150
|
+
*/
|
|
151
|
+
placeholder?: string;
|
|
152
|
+
};
|
|
44
153
|
/**
|
|
45
154
|
* The persistent frame every authenticated portal sits inside — a sidebar of
|
|
46
|
-
* navigation, a sticky topbar, the routed content,
|
|
155
|
+
* navigation, a sticky topbar, the routed content, an optional footer, and on a phone
|
|
156
|
+
* a bottom tab bar.
|
|
47
157
|
*
|
|
48
158
|
* Slot-based, not copy-own: what every product shares is the *structure* — the
|
|
49
159
|
* breakpoint the sidebar collapses at, the drawer and its scrim, the 72px topbar,
|
|
50
|
-
* the icon rail. What differs is only the content, which arrives as props.
|
|
51
|
-
*
|
|
160
|
+
* the icon rail, the tab bar. What differs is only the content, which arrives as props.
|
|
161
|
+
* The Razor `<app-shell>` renders the same markup and classes.
|
|
52
162
|
*
|
|
53
163
|
* Router-agnostic: pass `linkComponent` (react-router's `Link`) and nav items get
|
|
54
|
-
* `to`; without it they render as plain `<a href>`, which is what Razor emits.
|
|
164
|
+
* `to`; without it they render as plain `<a href>`, which is what Razor emits. Pass
|
|
165
|
+
* `currentPath` (the router location) to let the shell pick the active item; without it
|
|
166
|
+
* each item's `active` decides, as before.
|
|
55
167
|
*
|
|
56
168
|
* @param {object} props
|
|
57
169
|
* @param {{ label?: string, items: NavItemShape[] }[]} props.groups Nav groups, in order.
|
|
58
|
-
* Groups after the first are separated by a rule.
|
|
170
|
+
* Groups after the first are separated by a rule. A group left with no items is not rendered.
|
|
59
171
|
* @param {import('react').ReactNode} [props.brand] The logo row at the top of the sidebar.
|
|
60
172
|
* @param {import('react').ReactNode} [props.sidebarStart] Between the brand row and the nav —
|
|
61
173
|
* a workspace/tenant switcher, an environment badge. Hidden on the collapsed rail.
|
|
@@ -65,16 +177,24 @@ export type NavItemShape = {
|
|
|
65
177
|
* to keep today's behaviour (nothing in that slot when collapsed).
|
|
66
178
|
* @param {import('react').ReactNode} [props.sidebarFooter] Pinned below the scrolling nav.
|
|
67
179
|
* @param {import('react').ReactNode} [props.topbarStart] Leading topbar slot — page title, crumbs.
|
|
68
|
-
* @param {import('react').ReactNode} [props.topbarEnd] Trailing topbar slot —
|
|
180
|
+
* @param {import('react').ReactNode} [props.topbarEnd] Trailing topbar slot — page actions; the bell and account menu follow it.
|
|
69
181
|
* @param {import('react').ReactNode} [props.footer]
|
|
70
182
|
* @param {import('react').ReactNode} props.children The routed page.
|
|
71
183
|
* @param {boolean} [props.collapsed] Controlled rail state. Omit to let the shell own it.
|
|
72
184
|
* @param {(collapsed: boolean) => void} [props.onCollapsedChange]
|
|
73
|
-
* @param {boolean} [props.noSidebar=false] Full-width, no side nav — a focused wizard.
|
|
185
|
+
* @param {boolean} [props.noSidebar=false] Full-width, no side nav — a focused wizard. No tab bar either.
|
|
74
186
|
* @param {string} [props.navLabel='Main navigation']
|
|
187
|
+
* @param {string} [props.currentPath] The current location; items without `active` are matched against it.
|
|
188
|
+
* @param {boolean} [props.rememberCollapsed=false] Remember the uncontrolled rail state in a cookie.
|
|
189
|
+
* @param {string} [props.collapsedCookie='wui-shell-collapsed'] The cookie `rememberCollapsed` uses.
|
|
190
|
+
* @param {string} [props.tabBarLabel='Quick navigation'] Accessible name of the phone tab bar.
|
|
191
|
+
* @param {string} [props.moreLabel='More'] Label of the tab bar button that opens the drawer.
|
|
192
|
+
* @param {UserMenuShape} [props.userMenu] The account menu at the end of the topbar.
|
|
193
|
+
* @param {NotificationsShape} [props.notifications] The notification bell.
|
|
194
|
+
* @param {SearchShape} [props.search] The topbar search.
|
|
75
195
|
* @param {string} [props.className]
|
|
76
196
|
*/
|
|
77
|
-
export default function AppShell({ groups, brand, sidebarStart, sidebarStartCompact, sidebarFooter, topbarStart, topbarEnd, footer, children, collapsed, onCollapsedChange, noSidebar, navLabel, linkComponent: Link, className, ...rest }: {
|
|
197
|
+
export default function AppShell({ groups, brand, sidebarStart, sidebarStartCompact, sidebarFooter, topbarStart, topbarEnd, footer, children, collapsed, onCollapsedChange, noSidebar, navLabel, linkComponent: Link, currentPath, rememberCollapsed, collapsedCookie, tabBarLabel, moreLabel, userMenu, notifications, search, className, ...rest }: {
|
|
78
198
|
groups: {
|
|
79
199
|
label?: string;
|
|
80
200
|
items: NavItemShape[];
|
|
@@ -91,5 +211,13 @@ export default function AppShell({ groups, brand, sidebarStart, sidebarStartComp
|
|
|
91
211
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
92
212
|
noSidebar?: boolean;
|
|
93
213
|
navLabel?: string;
|
|
214
|
+
currentPath?: string;
|
|
215
|
+
rememberCollapsed?: boolean;
|
|
216
|
+
collapsedCookie?: string;
|
|
217
|
+
tabBarLabel?: string;
|
|
218
|
+
moreLabel?: string;
|
|
219
|
+
userMenu?: UserMenuShape;
|
|
220
|
+
notifications?: NotificationsShape;
|
|
221
|
+
search?: SearchShape;
|
|
94
222
|
className?: string;
|
|
95
223
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "@webority/ui-elements";
|
|
2
|
+
/**
|
|
3
|
+
* A list whose items the person reorders: drag with a mouse or a finger (the list scrolls when
|
|
4
|
+
* the pointer nears its edge), or with the keyboard (focus an item's handle, Space to lift,
|
|
5
|
+
* arrow keys to move, Space to drop, Escape to cancel). Every move is announced to screen readers.
|
|
6
|
+
* Thin wrapper over the shared `<wui-sortable>` element; the list is controlled, so `items`
|
|
7
|
+
* is the truth and `onReorder` reports the new order.
|
|
8
|
+
*
|
|
9
|
+
* Lists that share a `group` accept each other's items by pointer drag. Each list then reports
|
|
10
|
+
* its own new order, so the parent moves the item from one `items` array to the other.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} props
|
|
13
|
+
* @param {{ id: string, label: string, content?: import('react').ReactNode, disabled?: boolean }[]} props.items
|
|
14
|
+
* `id` is what `onReorder` reports. `label` names the item to assistive tech (handle label and
|
|
15
|
+
* announcements) and is the visible text unless `content` is given. A `disabled` item cannot
|
|
16
|
+
* be picked up; other items can still move past it.
|
|
17
|
+
* @param {(ids: string[], detail: object) => void} [props.onReorder] Called with this list's new
|
|
18
|
+
* id order after a drop. `detail` is the element's event detail: `{ id, fromIndex, toIndex, from, to }`.
|
|
19
|
+
* @param {string} props.ariaLabel Names the list for assistive tech; also used in announcements
|
|
20
|
+
* when an item moves between lists.
|
|
21
|
+
* @param {boolean} [props.handle=false] Drag only from the handle. Without it an item can also be
|
|
22
|
+
* dragged from its body (links, buttons and inputs inside it keep working).
|
|
23
|
+
* @param {string} [props.group] Name shared by lists that accept each other's items.
|
|
24
|
+
* @param {string} [props.name] Form field name; posts the order as one hidden input per item.
|
|
25
|
+
* @param {boolean} [props.disabled] No item can be picked up.
|
|
26
|
+
* @param {'vertical'|'horizontal'} [props.orientation='vertical'] Direction the items run;
|
|
27
|
+
* horizontal also covers a wrapping row.
|
|
28
|
+
* @param {string} [props.className]
|
|
29
|
+
* @param {import('react').Ref<HTMLElement>} [ref]
|
|
30
|
+
*/
|
|
31
|
+
declare const AppSortableList: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
32
|
+
export default AppSortableList;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small inline trend line: no axes, no tooltip, no chart engine. Drawn as plain SVG, so a
|
|
3
|
+
* table cell or a tile can hold one without loading anything. It is a picture of a trend, so it
|
|
4
|
+
* carries a text alternative that says where the line starts and ends. Pass your own `aria-label` to replace it,
|
|
5
|
+
* or `aria-hidden="true"` when the figure sits beside the trend in text.
|
|
6
|
+
*
|
|
7
|
+
* ```jsx
|
|
8
|
+
* <AppSparkline data={[12, 15, 14, 19]} label="Signups" />
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @param {object} props
|
|
12
|
+
* @param {number[]} props.data The values, in order. A value that is not a finite number (null, NaN, a string) is left out, and a series with none left draws nothing.
|
|
13
|
+
* @param {string} [props.label] What the trend measures; it starts the text alternative ("Signups trend from 12 to 19 across 4 points.").
|
|
14
|
+
* @param {number} [props.width=48] Width in px.
|
|
15
|
+
* @param {number} [props.height=16] Height in px.
|
|
16
|
+
* @param {string} [props.className] Extra classes on the svg.
|
|
17
|
+
*/
|
|
18
|
+
export default function AppSparkline({ data, label, width, height, className, ...rest }: {
|
|
19
|
+
data: number[];
|
|
20
|
+
label?: string;
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
className?: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status pill. Decoupled: the caller supplies the display `label` + `tone` (an app maps
|
|
3
|
+
* its own status enum to these); the library owns only the presentation. Renders an
|
|
4
|
+
* em-dash when there is no label.
|
|
5
|
+
*
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {import('react').ReactNode} [props.label]
|
|
8
|
+
* @param {string} [props.tone] Tone class suffix (e.g. success | warning | danger | info | neutral).
|
|
9
|
+
* @param {string} [props.className]
|
|
10
|
+
* @param {string} [props.tooltip] A collision-aware hover/focus tooltip (via AppTooltip / Popper) — flips to stay on-screen. Useful to spell out a terse status pill's full meaning.
|
|
11
|
+
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement="auto"] Preferred tooltip side; `auto` picks the side with the most room.
|
|
12
|
+
*/
|
|
1
13
|
export default function AppStatusBadge({ label, tone, className, tooltip, tooltipPlacement, ...rest }: {
|
|
2
|
-
|
|
3
|
-
className?: string;
|
|
4
|
-
label: any;
|
|
14
|
+
label?: import('react').ReactNode;
|
|
5
15
|
tone?: string;
|
|
6
|
-
|
|
7
|
-
|
|
16
|
+
className?: string;
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
tooltipPlacement?: "auto" | "top" | "bottom" | "start" | "end";
|
|
8
19
|
}): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import "@webority/ui-elements";
|
|
2
|
+
/**
|
|
3
|
+
* Thin React wrapper over the shared `<wui-tree>` element: a hierarchy in the WAI-ARIA tree
|
|
4
|
+
* pattern (arrow keys, Home/End, typeahead, Enter), with icons and badges, lazy children and an
|
|
5
|
+
* optional single or checkbox selection. The Razor `<app-tree-view>` renders the same element.
|
|
6
|
+
*
|
|
7
|
+
* `nodes` is `{ id, label, icon?, badge?, badgeTone?, children?, hasChildren?, expanded?,
|
|
8
|
+
* checked?, disabled? }[]`. `icon` is a library icon name and `badgeTone` an AppBadge tone. Ids are
|
|
9
|
+
* strings, unique across the whole tree. `children: []` is a leaf; `hasChildren: true` with no
|
|
10
|
+
* `children` is a node whose children are fetched the first time it opens, through `loadChildren`
|
|
11
|
+
* (or `loadUrl`). Labels are plain text. The tree keeps what the user opened and what it
|
|
12
|
+
* fetched when `nodes` is replaced with the same ids.
|
|
13
|
+
*
|
|
14
|
+
* Selection: `single` marks one row selected; `multiple` shows a tri-state checkbox per node (a
|
|
15
|
+
* parent is checked, unchecked or mixed from its children, and checking it checks every loaded
|
|
16
|
+
* child). `checked` is controlled by the ids it lists, parents included.
|
|
17
|
+
*
|
|
18
|
+
* @param {object} props
|
|
19
|
+
* @param {{ id: string, label: string, icon?: string, badge?: string,
|
|
20
|
+
* badgeTone?: 'neutral'|'primary'|'success'|'warning'|'danger'|'info', children?: object[],
|
|
21
|
+
* hasChildren?: boolean, expanded?: boolean, checked?: boolean, disabled?: boolean }[]} props.nodes
|
|
22
|
+
* @param {'none'|'single'|'multiple'} [props.selection='none']
|
|
23
|
+
* @param {string|null} [props.selected] Selected id (single mode, controlled: the tree shows this id
|
|
24
|
+
* whatever the user clicks until you change it; `null` selects nothing, and dropping the prop clears it).
|
|
25
|
+
* @param {(id: string, node: object) => void} [props.onSelect] A row was activated: clicked, or
|
|
26
|
+
* Enter / Space on it. `node` is the object you passed in.
|
|
27
|
+
* @param {string[]} [props.checked] Checked ids (multiple mode, controlled).
|
|
28
|
+
* @param {(ids: string[], detail: { id: string, checked: boolean }) => void} [props.onCheck] A
|
|
29
|
+
* check was toggled; `ids` is every checked id.
|
|
30
|
+
* @param {(node: object) => Promise<object[]>} [props.loadChildren] Fetches a lazy node's children.
|
|
31
|
+
* @param {string} [props.loadUrl] Children endpoint used when `loadChildren` is not set: a GET with
|
|
32
|
+
* `parentId=<id>` added, answering a JSON array of nodes.
|
|
33
|
+
* @param {(id: string, message: string) => void} [props.onLoadError] Children could not be loaded.
|
|
34
|
+
* @param {string} [props.name] Form field name: `multiple` posts one value per checked id, `single`
|
|
35
|
+
* the selected id.
|
|
36
|
+
* @param {string} [props.loadingText='Loading'] Announced while children load.
|
|
37
|
+
* @param {string} [props.errorText='Could not load. Try again.'] Announced when they fail.
|
|
38
|
+
* @param {string} [props.ariaLabel] Accessible name of the tree.
|
|
39
|
+
* @param {string} [props.id]
|
|
40
|
+
* @param {string} [props.className]
|
|
41
|
+
* @param {import('react').Ref<HTMLElement>} [ref]
|
|
42
|
+
*/
|
|
43
|
+
declare const AppTreeView: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
44
|
+
export default AppTreeView;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare const FULL_VARIANT_GLYPHS: {
|
|
2
2
|
aave: string;
|
|
3
|
-
add: string;
|
|
4
|
-
"add-circle": string;
|
|
5
3
|
"add-square": string;
|
|
6
4
|
additem: string;
|
|
7
5
|
airdrop: string;
|
|
@@ -45,9 +43,7 @@ export declare const FULL_VARIANT_GLYPHS: {
|
|
|
45
43
|
"arrow-down-3": string;
|
|
46
44
|
"arrow-forward": string;
|
|
47
45
|
"arrow-forward-square": string;
|
|
48
|
-
"arrow-left-2": string;
|
|
49
46
|
"arrow-left-3": string;
|
|
50
|
-
"arrow-right-2": string;
|
|
51
47
|
"arrow-right-3": string;
|
|
52
48
|
"arrow-rotate-left": string;
|
|
53
49
|
"arrow-rotate-right": string;
|
|
@@ -56,7 +52,6 @@ export declare const FULL_VARIANT_GLYPHS: {
|
|
|
56
52
|
"arrow-square-left": string;
|
|
57
53
|
"arrow-square-right": string;
|
|
58
54
|
"arrow-square-up": string;
|
|
59
|
-
"arrow-swap-horizontal": string;
|
|
60
55
|
"arrow-swap-vertical": string;
|
|
61
56
|
"arrow-up-2": string;
|
|
62
57
|
"arrow-up-3": string;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
export declare const FULL_VARIANT_GLYPHS: {
|
|
2
|
-
cake: string;
|
|
3
|
-
"calendar-1": string;
|
|
4
2
|
"calendar-2": string;
|
|
5
|
-
"calendar-add": string;
|
|
6
3
|
"calendar-circle": string;
|
|
7
4
|
"calendar-edit": string;
|
|
8
5
|
"calendar-remove": string;
|
|
9
6
|
"calendar-search": string;
|
|
10
|
-
"calendar-tick": string;
|
|
11
7
|
call: string;
|
|
12
8
|
"call-add": string;
|
|
13
9
|
"call-calling": string;
|
|
@@ -55,9 +51,6 @@ export declare const FULL_VARIANT_GLYPHS: {
|
|
|
55
51
|
"clipboard-close": string;
|
|
56
52
|
"clipboard-export": string;
|
|
57
53
|
"clipboard-import": string;
|
|
58
|
-
"clipboard-text": string;
|
|
59
|
-
"clipboard-tick": string;
|
|
60
|
-
"close-circle": string;
|
|
61
54
|
"close-square": string;
|
|
62
55
|
"cloud-add": string;
|
|
63
56
|
"cloud-change": string;
|
|
@@ -72,9 +65,7 @@ export declare const FULL_VARIANT_GLYPHS: {
|
|
|
72
65
|
"cloud-remove": string;
|
|
73
66
|
"cloud-snow": string;
|
|
74
67
|
"cloud-sunny": string;
|
|
75
|
-
code: string;
|
|
76
68
|
"code-1": string;
|
|
77
|
-
"code-circle": string;
|
|
78
69
|
coffee: string;
|
|
79
70
|
coin: string;
|
|
80
71
|
"coin-1": string;
|
|
@@ -93,7 +84,6 @@ export declare const FULL_VARIANT_GLYPHS: {
|
|
|
93
84
|
"copy-success": string;
|
|
94
85
|
copyright: string;
|
|
95
86
|
courthouse: string;
|
|
96
|
-
cpu: string;
|
|
97
87
|
"cpu-charge": string;
|
|
98
88
|
"cpu-setting": string;
|
|
99
89
|
"creative-commons": string;
|