@12-apps/ui 6.25.0 → 6.27.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/_internal/components/data-display/Alert/Alert.helpers.js +5 -1
- package/dist/_internal/components/data-display/Alert/Alert.js +5 -5
- package/dist/_internal/components/data-display/Alert/Alert.metrics.js +2 -2
- package/dist/_internal/components/data-display/Alert/Alert.styles.js +4 -4
- package/dist/_internal/components/data-display/Avatar/Avatar.js +3 -3
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.animations.js +3 -3
- package/dist/_internal/components/data-display/Badge/Badge.js +7 -7
- package/dist/_internal/components/data-display/Badge/Badge.metrics.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +5 -5
- package/dist/_internal/components/data-display/Badge/Badge.variants.js +3 -3
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +6 -6
- package/dist/_internal/components/data-display/Banner/Banner.js +4 -4
- package/dist/_internal/components/data-display/Banner/Banner.styles.js +3 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +4 -4
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +6 -6
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +10 -10
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +1 -1
- package/dist/_internal/components/data-display/Carousel/Carousel.js +1 -1
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +1 -1
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +1 -1
- package/dist/_internal/components/data-display/Chart/Chart.js +5 -5
- package/dist/_internal/components/data-display/Chart/SpecChart.js +6 -6
- package/dist/_internal/components/data-display/Chart/chart-context.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-internals.js +1 -1
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +4 -4
- package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +4 -4
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +37 -37
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +55 -54
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +6 -6
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +7 -7
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +12 -11
- package/dist/_internal/components/data-display/DataViews/base-card.js +9 -9
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +12 -12
- package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +8 -8
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +16 -16
- package/dist/_internal/components/data-display/DataViews/card-surface.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +34 -34
- package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +13 -13
- package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +15 -15
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +19 -18
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +14 -14
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +6 -6
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +3 -3
- package/dist/_internal/components/data-display/DataViews/save-view-preview.js +4 -4
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +7 -7
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +4 -4
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +11 -11
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +8 -8
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +13 -13
- package/dist/_internal/components/data-display/FleetMap/FleetRoster.js +2 -2
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +1 -1
- package/dist/_internal/components/data-display/MapPreview/MapDecorations.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.hooks.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +7 -7
- package/dist/_internal/components/data-display/MapPreview/MapTiles.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/StaticMapView.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/useMapPreview.js +3 -3
- package/dist/_internal/components/data-display/Progress/Progress.js +4 -4
- package/dist/_internal/components/data-display/Progress/Progress.metrics.js +2 -2
- package/dist/_internal/components/data-display/Progress/Progress.styles.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +1 -1
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +1 -1
- package/dist/_internal/components/data-display/Table/Table.js +2 -2
- package/dist/_internal/components/data-display/index.js +44 -44
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +4 -4
- package/dist/_internal/components/feedback/index.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +2 -2
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +5 -5
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +2 -2
- package/dist/_internal/components/form/Button/Button.js +3 -3
- package/dist/_internal/components/form/Button/Button.styles.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.hooks.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +1 -1
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +4 -4
- package/dist/_internal/components/form/Checkbox/Checkbox.js +2 -2
- package/dist/_internal/components/form/Command/Command.js +4 -4
- package/dist/_internal/components/form/Command/Command.styles.js +1 -1
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +5 -5
- package/dist/_internal/components/form/Label/Label.js +1 -1
- package/dist/_internal/components/form/Label/Label.styles.js +1 -1
- package/dist/_internal/components/form/Menubar/Menubar.item.js +1 -1
- package/dist/_internal/components/form/Menubar/Menubar.js +1 -1
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +1 -1
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +1 -1
- package/dist/_internal/components/form/PhoneInput/PhoneInput.hooks.js +2 -2
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +3 -3
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/_internal/components/form/Switch/Switch.ids.js +8 -0
- package/dist/_internal/components/form/Switch/Switch.ids.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.js +6 -5
- package/dist/_internal/components/form/Switch/Switch.metrics.js +5 -1
- package/dist/_internal/components/form/Switch/Switch.parts.js +6 -8
- package/dist/_internal/components/form/Switch/Switch.styles.js +5 -3
- package/dist/_internal/components/form/index.js +34 -33
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +5 -5
- package/dist/_internal/components/form/total-form/Fields/index.js +6 -6
- package/dist/_internal/components/form/total-form/SubmitButton.js +4 -4
- package/dist/_internal/components/index.js +83 -82
- package/dist/_internal/components/layout/Box/Box.js +4 -4
- package/dist/_internal/components/layout/Stack/Stack.js +5 -5
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +7 -7
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +1 -1
- package/dist/_internal/components/navigation/index.js +7 -7
- package/dist/_internal/components/typography/Heading/Heading.js +4 -4
- package/dist/_internal/components/typography/Heading/Heading.metrics.js +2 -2
- package/dist/_internal/components/typography/Heading/Heading.styles.js +3 -3
- package/dist/_internal/components/typography/Paragraph/Paragraph.js +2 -2
- package/dist/_internal/components/typography/Text/Text.js +3 -3
- package/dist/_internal/components/typography/Text/Text.metrics.js +2 -2
- package/dist/_internal/components/typography/index.js +7 -7
- package/dist/_internal/icons/Icon.js +4 -4
- package/dist/_internal/provider/UiProvider.js +3 -3
- package/dist/_internal/provider/mui-bridge.js +2 -2
- package/dist/_internal/provider/use-ui-theme.js +3 -3
- package/dist/_internal/social-login-button/social-login-button.js +9 -9
- package/dist/_internal/tokens/theme.js +3 -1
- package/dist/_internal/user-avatar/user-avatar.js +8 -8
- package/dist/charts.js +6 -6
- package/dist/{chunk-2GI7ANEL.js → chunk-22X7TT6Z.js} +4 -4
- package/dist/{chunk-WR5JFDQ5.js → chunk-27BL3DNT.js} +8 -8
- package/dist/{chunk-E55CJV65.js → chunk-2KVQIGVE.js} +2 -2
- package/dist/{chunk-BB2OUERT.js → chunk-2LSCK45B.js} +7 -4
- package/dist/chunk-2LSCK45B.js.map +1 -0
- package/dist/{chunk-W3FAKT3D.js → chunk-2SWQ6HIK.js} +4 -4
- package/dist/{chunk-ISW5K72V.js → chunk-2ZRZTGWP.js} +5 -5
- package/dist/{chunk-I5SBTNV2.js → chunk-3GB6KWHH.js} +2 -2
- package/dist/{chunk-ZEG2LNBY.js → chunk-3PJLT5FX.js} +2 -2
- package/dist/{chunk-57Z2ND3N.js → chunk-3VZT2FAI.js} +4 -4
- package/dist/{chunk-MLCFODJO.js → chunk-3W2IS5RH.js} +5 -1
- package/dist/{chunk-MLCFODJO.js.map → chunk-3W2IS5RH.js.map} +1 -1
- package/dist/{chunk-PFDM2OIP.js → chunk-45OHGD2B.js} +4 -4
- package/dist/{chunk-BH5BXLGI.js → chunk-4A2Q22HO.js} +3 -3
- package/dist/{chunk-46UPILLK.js → chunk-4ETQRBZC.js} +4 -4
- package/dist/{chunk-WM6Y2S6W.js → chunk-5QUSX3TC.js} +5 -5
- package/dist/{chunk-AVGTTWTE.js → chunk-65DLYC4S.js} +4 -4
- package/dist/{chunk-TVPPA4RD.js → chunk-65METCKT.js} +16 -16
- package/dist/{chunk-OQFSYMHJ.js → chunk-67ALTEWH.js} +2 -2
- package/dist/{chunk-OGGHD64H.js → chunk-6SK3MTYJ.js} +2 -2
- package/dist/{chunk-OE2ZVL67.js → chunk-6VHCSPKK.js} +3 -3
- package/dist/{chunk-WAPJ2DL3.js → chunk-72T5PAW7.js} +4 -4
- package/dist/{chunk-SLVQ33AN.js → chunk-77DF5LKI.js} +2 -2
- package/dist/{chunk-7KWBGMQC.js → chunk-77OXG6DH.js} +5 -5
- package/dist/{chunk-Y3KRUT7O.js → chunk-7AIHK2XM.js} +2 -2
- package/dist/{chunk-MHV5Y5MR.js → chunk-7KEGJH3Q.js} +3 -3
- package/dist/{chunk-KMXAPYU2.js → chunk-7NEUPEV5.js} +2 -2
- package/dist/{chunk-67L7HMEP.js → chunk-7Z2AQEC5.js} +2 -2
- package/dist/{chunk-PQECNGDE.js → chunk-AGYGNNOM.js} +2 -2
- package/dist/{chunk-ZTF5C2GA.js → chunk-B5SW7I5W.js} +2 -2
- package/dist/{chunk-TXHJX2NG.js → chunk-BGYLL467.js} +4 -4
- package/dist/{chunk-R7R3LOKW.js → chunk-CA7TA36R.js} +2 -2
- package/dist/{chunk-FPFUXRD2.js → chunk-CKJI7JO5.js} +2 -2
- package/dist/{chunk-HMV4QMXS.js → chunk-CMN26J5Y.js} +4 -4
- package/dist/{chunk-KVEHH4SA.js → chunk-DB2MAYPK.js} +2 -2
- package/dist/{chunk-2ECT4IY2.js → chunk-DIHVWBQV.js} +36 -17
- package/dist/chunk-DIHVWBQV.js.map +1 -0
- package/dist/{chunk-V4FKHLEB.js → chunk-DTIB5KWP.js} +3 -3
- package/dist/{chunk-MESRKY67.js → chunk-DW6GBMLQ.js} +3 -3
- package/dist/{chunk-JO6BBSGY.js → chunk-DWJBOR47.js} +3 -3
- package/dist/{chunk-YW5T6KZ5.js → chunk-DYESJJ3Q.js} +9 -9
- package/dist/{chunk-TZDDL3DR.js → chunk-ECMJ5VPW.js} +2 -2
- package/dist/{chunk-OH3YGJT5.js → chunk-EMNGIYH6.js} +5 -5
- package/dist/{chunk-CZJLWCEG.js → chunk-EPNCYUQ7.js} +4 -4
- package/dist/{chunk-JZXWCEH5.js → chunk-EQA4VQEO.js} +2 -2
- package/dist/{chunk-3N6EK6K5.js → chunk-ERX4XIYC.js} +2 -2
- package/dist/{chunk-TTLI6PF7.js → chunk-FF3R67WD.js} +5 -5
- package/dist/{chunk-WNMYWQ7D.js → chunk-FOF2RAVQ.js} +12 -10
- package/dist/chunk-FOF2RAVQ.js.map +1 -0
- package/dist/{chunk-KLREH4X6.js → chunk-G2JPUHEJ.js} +2 -2
- package/dist/{chunk-4J5EN4FQ.js → chunk-GBX5ACPF.js} +5 -5
- package/dist/{chunk-ZZMZF7PZ.js → chunk-GQJ4NCZ6.js} +3 -3
- package/dist/{chunk-IPVYEPXO.js → chunk-GSTRPZS4.js} +5 -5
- package/dist/{chunk-HFXTAEYY.js → chunk-GTLJYAEG.js} +2 -2
- package/dist/{chunk-M4LFDGI6.js → chunk-GYQT47YZ.js} +2 -2
- package/dist/{chunk-JSH3HFDQ.js → chunk-H3BQFEN5.js} +2 -2
- package/dist/{chunk-OV4WREMW.js → chunk-HKB5C2KY.js} +7 -7
- package/dist/{chunk-BLBOYCOV.js → chunk-HKV4MQ2W.js} +5 -5
- package/dist/{chunk-4MGFUPQT.js → chunk-HOJL2GKW.js} +4 -4
- package/dist/{chunk-HR7YTBR7.js → chunk-IASDP44E.js} +4 -4
- package/dist/{chunk-YMRI5QKG.js → chunk-IV5QQLCS.js} +2 -2
- package/dist/{chunk-JUHUKZGU.js → chunk-JD3D6Y4U.js} +2 -2
- package/dist/{chunk-FR67FG2U.js → chunk-JFRKBSWI.js} +35 -25
- package/dist/chunk-JFRKBSWI.js.map +1 -0
- package/dist/{chunk-AXTLFK4T.js → chunk-KAV63FBG.js} +2 -2
- package/dist/{chunk-2PBGVMM2.js → chunk-KOFO6QZY.js} +2 -2
- package/dist/{chunk-RP5FK3SO.js → chunk-L7LCSZ3H.js} +3 -3
- package/dist/{chunk-MNXVXW4T.js → chunk-L7S6N67X.js} +2 -2
- package/dist/{chunk-N3QUEBNS.js → chunk-L7VH6IMR.js} +14 -1
- package/dist/chunk-L7VH6IMR.js.map +1 -0
- package/dist/{chunk-JXPHU3K5.js → chunk-LGJ2H4AH.js} +5 -5
- package/dist/{chunk-W4YWU7LQ.js → chunk-LO2B7FDQ.js} +2 -2
- package/dist/{chunk-PWR7K5OP.js → chunk-LV4UTYAD.js} +2 -2
- package/dist/{chunk-OG2FP6SE.js → chunk-M4NFXC5R.js} +4 -4
- package/dist/{chunk-ZPIMPOHV.js → chunk-M7E66OSC.js} +4 -4
- package/dist/{chunk-OGGPQVIG.js → chunk-MDTSMJ7C.js} +3 -3
- package/dist/{chunk-YDI6IJ6F.js → chunk-MI2MVH3I.js} +4 -4
- package/dist/{chunk-6ZY5XU4J.js → chunk-MQPT254A.js} +4 -4
- package/dist/{chunk-EWT3WMVY.js → chunk-MYH7VISV.js} +5 -5
- package/dist/{chunk-7NSX7A5H.js → chunk-N5PY7IXI.js} +3 -3
- package/dist/{chunk-BHIGHSXA.js → chunk-NNXZ5RK5.js} +4 -4
- package/dist/{chunk-EQ7PWGBN.js → chunk-O7HLQTB7.js} +3 -3
- package/dist/{chunk-DW5FRWRQ.js → chunk-OAWEUKUC.js} +2 -2
- package/dist/{chunk-O4VCZTK4.js → chunk-OGHW7RQC.js} +2 -2
- package/dist/{chunk-XR6WBW23.js → chunk-OVGASVPW.js} +2 -2
- package/dist/{chunk-HEBQS7QP.js → chunk-OXYR2HVK.js} +3 -3
- package/dist/{chunk-TNVO2DTB.js → chunk-P7FQUGED.js} +5 -5
- package/dist/{chunk-343TTIHD.js → chunk-PENJBKPH.js} +3 -3
- package/dist/{chunk-2RQINU5T.js → chunk-PKFFJAQ6.js} +2 -2
- package/dist/{chunk-M4LQRQFL.js → chunk-PW2WLDX3.js} +2 -2
- package/dist/{chunk-WRDPWEIC.js → chunk-Q3GSDSK2.js} +6 -6
- package/dist/{chunk-SYJMI2NP.js → chunk-Q3OFOOO7.js} +2 -2
- package/dist/{chunk-GGI7GM5O.js → chunk-QE2C35TO.js} +4 -4
- package/dist/{chunk-NQN5Z36J.js → chunk-QLI7ES7Z.js} +10 -1
- package/dist/chunk-QLI7ES7Z.js.map +1 -0
- package/dist/{chunk-CT5K725B.js → chunk-QQLGSMGE.js} +2 -2
- package/dist/{chunk-7MN6I5NK.js → chunk-QXFPTRHB.js} +3 -3
- package/dist/{chunk-CZPU5TW3.js → chunk-RFZU5BTG.js} +2 -2
- package/dist/{chunk-JB67KPGM.js → chunk-RRO2EOJB.js} +4 -4
- package/dist/{chunk-MZQTHSLN.js → chunk-S7HRED4D.js} +2 -2
- package/dist/{chunk-NYEA7JAI.js → chunk-SC72DRTX.js} +6 -6
- package/dist/{chunk-JWW2Z3RH.js → chunk-SMZBGHR2.js} +7 -7
- package/dist/{chunk-EZSEAYYT.js → chunk-SSWZHR46.js} +5 -5
- package/dist/{chunk-NA7MIEG6.js → chunk-SZETT7QV.js} +2 -2
- package/dist/chunk-SZS7VZJN.js +25 -0
- package/dist/chunk-SZS7VZJN.js.map +1 -0
- package/dist/{chunk-2HPP6RVC.js → chunk-TQOPF7LD.js} +2 -2
- package/dist/{chunk-OLVZ6TOV.js → chunk-TUO47RL2.js} +4 -4
- package/dist/{chunk-N5IVVLTH.js → chunk-UG76BO5K.js} +79 -19
- package/dist/chunk-UG76BO5K.js.map +1 -0
- package/dist/{chunk-4IVDVZZ2.js → chunk-UGL6SJN6.js} +3 -3
- package/dist/{chunk-QJRDDVZ2.js → chunk-V5P5Q6HM.js} +3 -3
- package/dist/{chunk-73NJCGQG.js → chunk-VIK3HAUQ.js} +2 -2
- package/dist/{chunk-KM5O4ICK.js → chunk-VK4ULJFH.js} +2 -2
- package/dist/{chunk-QYNCPS5W.js → chunk-WBKWIFXA.js} +6 -6
- package/dist/{chunk-X4Z62ZQY.js → chunk-WETAIIKC.js} +2 -2
- package/dist/{chunk-GMTM6EN7.js → chunk-WKF54CCK.js} +7 -7
- package/dist/{chunk-KT6HWAEN.js → chunk-WZUNBSS7.js} +2 -2
- package/dist/{chunk-Y2B3I3IH.js → chunk-X5RDHO6G.js} +2 -2
- package/dist/{chunk-TXKZEKJN.js → chunk-XNOSTV5F.js} +2 -2
- package/dist/{chunk-7JXLGOM2.js → chunk-Y55ILY2F.js} +3 -3
- package/dist/{chunk-HI2OFZSZ.js → chunk-YPILHGEO.js} +2 -2
- package/dist/{chunk-V3PLFYKO.js → chunk-ZAJO2B75.js} +2 -2
- package/dist/data-display/Alert.js +5 -5
- package/dist/data-display/Avatar.js +3 -3
- package/dist/data-display/Badge.js +7 -7
- package/dist/data-display/Banner.js +4 -4
- package/dist/data-display/CardKit.js +14 -14
- package/dist/data-display/Carousel.js +1 -1
- package/dist/data-display/Chart.js +6 -6
- package/dist/data-display/DataViews.js +69 -68
- package/dist/data-display/DescriptionItem.js +4 -4
- package/dist/data-display/FleetMap.js +13 -13
- package/dist/data-display/Lightbox.js +1 -1
- package/dist/data-display/MapPreview.js +7 -7
- package/dist/data-display/Progress.js +4 -4
- package/dist/data-display/Sheet.js +4 -4
- package/dist/data-display/Table.js +2 -2
- package/dist/feedback/ConfirmAction.js +4 -4
- package/dist/form/AddressAutocomplete.js +5 -5
- package/dist/form/Autocomplete.js +2 -2
- package/dist/form/Button.js +3 -3
- package/dist/form/Calendar.js +3 -3
- package/dist/form/CategorySelect.js +4 -4
- package/dist/form/Checkbox.js +2 -2
- package/dist/form/Command.js +4 -4
- package/dist/form/DateRangePicker.js +10 -10
- package/dist/form/Label.js +1 -1
- package/dist/form/Menubar.js +1 -1
- package/dist/form/PhoneInput.js +3 -3
- package/dist/form/RichTextEditor.js +2 -2
- package/dist/form/Switch.js +6 -5
- package/dist/form/total-form.js +10 -10
- package/dist/icons.js +4 -4
- package/dist/layout/Box.js +4 -4
- package/dist/layout/Stack.js +5 -5
- package/dist/native/chunks/{chunk-2R2R35C5.js → chunk-2SBTJSQE.js} +5 -5
- package/dist/native/chunks/{chunk-WL5LXVCK.js → chunk-6L4UZBQP.js} +3 -3
- package/dist/native/chunks/{chunk-LEMMXZFN.js → chunk-MP3UDWTT.js} +10 -1
- package/dist/native/chunks/{chunk-LEMMXZFN.js.map → chunk-MP3UDWTT.js.map} +1 -1
- package/dist/native/chunks/{chunk-GW7TQ7HO.js → chunk-QEQZ5AF6.js} +3 -3
- package/dist/native/chunks/{chunk-7LTVGW23.js → chunk-UII3IFLP.js} +2 -2
- package/dist/native/chunks/{chunk-75JQYVDZ.js → chunk-UYREIOEM.js} +2 -2
- package/dist/native/chunks/{chunk-GWGIWQO7.js → chunk-XI7HTAVN.js} +2 -2
- package/dist/native/chunks/{chunk-QYUD3S6F.js → chunk-ZOP7UAZK.js} +2 -2
- package/dist/native/data-display/Alert.js +21 -6
- package/dist/native/data-display/Alert.js.map +1 -1
- package/dist/native/data-display/Avatar.js +3 -3
- package/dist/native/data-display/Badge.js +3 -3
- package/dist/native/data-display/Chip.js +3 -3
- package/dist/native/data-display/EmptyState.js +5 -5
- package/dist/native/data-display/ErrorState.js +4 -4
- package/dist/native/data-display/FleetMap.js +6 -6
- package/dist/native/data-display/LoadingState.js +2 -2
- package/dist/native/data-display/Progress.js +2 -2
- package/dist/native/feedback/Dialog.js +3 -3
- package/dist/native/form/Button.js +3 -3
- package/dist/native/form/Checkbox.js +3 -3
- package/dist/native/form/Input.js +3 -3
- package/dist/native/form/Select.js +4 -4
- package/dist/native/form/Switch.js +26 -8
- package/dist/native/form/Switch.js.map +1 -1
- package/dist/native/icons.js +3 -3
- package/dist/native/layout/Box.js +3 -3
- package/dist/native/layout/Card.js +2 -2
- package/dist/native/layout/Container.js +2 -2
- package/dist/native/layout/Skeleton.js +3 -3
- package/dist/native/layout/Spacer.js +2 -2
- package/dist/native/layout/Stack.js +3 -3
- package/dist/native/provider.js +2 -2
- package/dist/native/tokens.js +3 -1
- package/dist/native/typography/Heading.js +2 -2
- package/dist/native/typography/Paragraph.js +2 -2
- package/dist/native/typography/Text.js +2 -2
- package/dist/navigation/AppHeader.js +7 -7
- package/dist/provider.js +4 -4
- package/dist/social-login-button.js +9 -9
- package/dist/tokens.js +3 -1
- package/dist/types/components/data-display/Alert/Alert.base.d.ts +28 -2
- package/dist/types/components/data-display/Alert/Alert.base.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.helpers.d.ts +39 -0
- package/dist/types/components/data-display/Alert/Alert.helpers.d.ts.map +1 -1
- package/dist/types/components/form/Button/Button.styles.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.ids.d.ts +42 -0
- package/dist/types/components/form/Switch/Switch.ids.d.ts.map +1 -0
- package/dist/types/components/form/Switch/Switch.metrics.d.ts +19 -0
- package/dist/types/components/form/Switch/Switch.metrics.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.parts.d.ts +31 -11
- package/dist/types/components/form/Switch/Switch.parts.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.styles.d.ts +6 -0
- package/dist/types/components/form/Switch/Switch.styles.d.ts.map +1 -1
- package/dist/types/tokens/theme.d.ts +38 -0
- package/dist/types/tokens/theme.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Alert/Alert.base.d.ts +28 -2
- package/dist/types-native/components/data-display/Alert/Alert.base.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Alert/Alert.helpers.d.ts +39 -0
- package/dist/types-native/components/data-display/Alert/Alert.helpers.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Alert/Alert.native.d.ts.map +1 -1
- package/dist/types-native/components/form/Switch/Switch.look.native.d.ts +26 -2
- package/dist/types-native/components/form/Switch/Switch.look.native.d.ts.map +1 -1
- package/dist/types-native/components/form/Switch/Switch.metrics.d.ts +19 -0
- package/dist/types-native/components/form/Switch/Switch.metrics.d.ts.map +1 -1
- package/dist/types-native/components/form/Switch/Switch.native.d.ts.map +1 -1
- package/dist/types-native/tokens/theme.d.ts +38 -0
- package/dist/types-native/tokens/theme.d.ts.map +1 -1
- package/dist/typography/Heading.js +4 -4
- package/dist/typography/Paragraph.js +2 -2
- package/dist/typography/Text.js +3 -3
- package/dist/user-avatar.js +8 -8
- package/package.json +1 -1
- package/src/components/data-display/Alert/Alert.base.ts +29 -2
- package/src/components/data-display/Alert/Alert.helpers.ts +50 -0
- package/src/components/data-display/Alert/Alert.md +29 -1
- package/src/components/data-display/Alert/Alert.native.tsx +8 -4
- package/src/components/data-display/Alert/Alert.tsx +5 -5
- package/src/components/form/Button/Button.md +8 -0
- package/src/components/form/Button/Button.styles.ts +24 -3
- package/src/components/form/Switch/Switch.ids.ts +63 -0
- package/src/components/form/Switch/Switch.look.native.ts +45 -2
- package/src/components/form/Switch/Switch.md +34 -9
- package/src/components/form/Switch/Switch.metrics.ts +21 -0
- package/src/components/form/Switch/Switch.native.tsx +19 -6
- package/src/components/form/Switch/Switch.parts.tsx +150 -17
- package/src/components/form/Switch/Switch.styles.ts +59 -6
- package/src/components/form/Switch/Switch.tsx +32 -30
- package/src/tokens/theme.ts +50 -0
- package/dist/chunk-2ECT4IY2.js.map +0 -1
- package/dist/chunk-BB2OUERT.js.map +0 -1
- package/dist/chunk-FR67FG2U.js.map +0 -1
- package/dist/chunk-N3QUEBNS.js.map +0 -1
- package/dist/chunk-N5IVVLTH.js.map +0 -1
- package/dist/chunk-NQN5Z36J.js.map +0 -1
- package/dist/chunk-WNMYWQ7D.js.map +0 -1
- /package/dist/{chunk-2GI7ANEL.js.map → chunk-22X7TT6Z.js.map} +0 -0
- /package/dist/{chunk-WR5JFDQ5.js.map → chunk-27BL3DNT.js.map} +0 -0
- /package/dist/{chunk-E55CJV65.js.map → chunk-2KVQIGVE.js.map} +0 -0
- /package/dist/{chunk-W3FAKT3D.js.map → chunk-2SWQ6HIK.js.map} +0 -0
- /package/dist/{chunk-ISW5K72V.js.map → chunk-2ZRZTGWP.js.map} +0 -0
- /package/dist/{chunk-I5SBTNV2.js.map → chunk-3GB6KWHH.js.map} +0 -0
- /package/dist/{chunk-ZEG2LNBY.js.map → chunk-3PJLT5FX.js.map} +0 -0
- /package/dist/{chunk-57Z2ND3N.js.map → chunk-3VZT2FAI.js.map} +0 -0
- /package/dist/{chunk-PFDM2OIP.js.map → chunk-45OHGD2B.js.map} +0 -0
- /package/dist/{chunk-BH5BXLGI.js.map → chunk-4A2Q22HO.js.map} +0 -0
- /package/dist/{chunk-46UPILLK.js.map → chunk-4ETQRBZC.js.map} +0 -0
- /package/dist/{chunk-WM6Y2S6W.js.map → chunk-5QUSX3TC.js.map} +0 -0
- /package/dist/{chunk-AVGTTWTE.js.map → chunk-65DLYC4S.js.map} +0 -0
- /package/dist/{chunk-TVPPA4RD.js.map → chunk-65METCKT.js.map} +0 -0
- /package/dist/{chunk-OQFSYMHJ.js.map → chunk-67ALTEWH.js.map} +0 -0
- /package/dist/{chunk-OGGHD64H.js.map → chunk-6SK3MTYJ.js.map} +0 -0
- /package/dist/{chunk-OE2ZVL67.js.map → chunk-6VHCSPKK.js.map} +0 -0
- /package/dist/{chunk-WAPJ2DL3.js.map → chunk-72T5PAW7.js.map} +0 -0
- /package/dist/{chunk-SLVQ33AN.js.map → chunk-77DF5LKI.js.map} +0 -0
- /package/dist/{chunk-7KWBGMQC.js.map → chunk-77OXG6DH.js.map} +0 -0
- /package/dist/{chunk-Y3KRUT7O.js.map → chunk-7AIHK2XM.js.map} +0 -0
- /package/dist/{chunk-MHV5Y5MR.js.map → chunk-7KEGJH3Q.js.map} +0 -0
- /package/dist/{chunk-KMXAPYU2.js.map → chunk-7NEUPEV5.js.map} +0 -0
- /package/dist/{chunk-67L7HMEP.js.map → chunk-7Z2AQEC5.js.map} +0 -0
- /package/dist/{chunk-PQECNGDE.js.map → chunk-AGYGNNOM.js.map} +0 -0
- /package/dist/{chunk-ZTF5C2GA.js.map → chunk-B5SW7I5W.js.map} +0 -0
- /package/dist/{chunk-TXHJX2NG.js.map → chunk-BGYLL467.js.map} +0 -0
- /package/dist/{chunk-R7R3LOKW.js.map → chunk-CA7TA36R.js.map} +0 -0
- /package/dist/{chunk-FPFUXRD2.js.map → chunk-CKJI7JO5.js.map} +0 -0
- /package/dist/{chunk-HMV4QMXS.js.map → chunk-CMN26J5Y.js.map} +0 -0
- /package/dist/{chunk-KVEHH4SA.js.map → chunk-DB2MAYPK.js.map} +0 -0
- /package/dist/{chunk-V4FKHLEB.js.map → chunk-DTIB5KWP.js.map} +0 -0
- /package/dist/{chunk-MESRKY67.js.map → chunk-DW6GBMLQ.js.map} +0 -0
- /package/dist/{chunk-JO6BBSGY.js.map → chunk-DWJBOR47.js.map} +0 -0
- /package/dist/{chunk-YW5T6KZ5.js.map → chunk-DYESJJ3Q.js.map} +0 -0
- /package/dist/{chunk-TZDDL3DR.js.map → chunk-ECMJ5VPW.js.map} +0 -0
- /package/dist/{chunk-OH3YGJT5.js.map → chunk-EMNGIYH6.js.map} +0 -0
- /package/dist/{chunk-CZJLWCEG.js.map → chunk-EPNCYUQ7.js.map} +0 -0
- /package/dist/{chunk-JZXWCEH5.js.map → chunk-EQA4VQEO.js.map} +0 -0
- /package/dist/{chunk-3N6EK6K5.js.map → chunk-ERX4XIYC.js.map} +0 -0
- /package/dist/{chunk-TTLI6PF7.js.map → chunk-FF3R67WD.js.map} +0 -0
- /package/dist/{chunk-KLREH4X6.js.map → chunk-G2JPUHEJ.js.map} +0 -0
- /package/dist/{chunk-4J5EN4FQ.js.map → chunk-GBX5ACPF.js.map} +0 -0
- /package/dist/{chunk-ZZMZF7PZ.js.map → chunk-GQJ4NCZ6.js.map} +0 -0
- /package/dist/{chunk-IPVYEPXO.js.map → chunk-GSTRPZS4.js.map} +0 -0
- /package/dist/{chunk-HFXTAEYY.js.map → chunk-GTLJYAEG.js.map} +0 -0
- /package/dist/{chunk-M4LFDGI6.js.map → chunk-GYQT47YZ.js.map} +0 -0
- /package/dist/{chunk-JSH3HFDQ.js.map → chunk-H3BQFEN5.js.map} +0 -0
- /package/dist/{chunk-OV4WREMW.js.map → chunk-HKB5C2KY.js.map} +0 -0
- /package/dist/{chunk-BLBOYCOV.js.map → chunk-HKV4MQ2W.js.map} +0 -0
- /package/dist/{chunk-4MGFUPQT.js.map → chunk-HOJL2GKW.js.map} +0 -0
- /package/dist/{chunk-HR7YTBR7.js.map → chunk-IASDP44E.js.map} +0 -0
- /package/dist/{chunk-YMRI5QKG.js.map → chunk-IV5QQLCS.js.map} +0 -0
- /package/dist/{chunk-JUHUKZGU.js.map → chunk-JD3D6Y4U.js.map} +0 -0
- /package/dist/{chunk-AXTLFK4T.js.map → chunk-KAV63FBG.js.map} +0 -0
- /package/dist/{chunk-2PBGVMM2.js.map → chunk-KOFO6QZY.js.map} +0 -0
- /package/dist/{chunk-RP5FK3SO.js.map → chunk-L7LCSZ3H.js.map} +0 -0
- /package/dist/{chunk-MNXVXW4T.js.map → chunk-L7S6N67X.js.map} +0 -0
- /package/dist/{chunk-JXPHU3K5.js.map → chunk-LGJ2H4AH.js.map} +0 -0
- /package/dist/{chunk-W4YWU7LQ.js.map → chunk-LO2B7FDQ.js.map} +0 -0
- /package/dist/{chunk-PWR7K5OP.js.map → chunk-LV4UTYAD.js.map} +0 -0
- /package/dist/{chunk-OG2FP6SE.js.map → chunk-M4NFXC5R.js.map} +0 -0
- /package/dist/{chunk-ZPIMPOHV.js.map → chunk-M7E66OSC.js.map} +0 -0
- /package/dist/{chunk-OGGPQVIG.js.map → chunk-MDTSMJ7C.js.map} +0 -0
- /package/dist/{chunk-YDI6IJ6F.js.map → chunk-MI2MVH3I.js.map} +0 -0
- /package/dist/{chunk-6ZY5XU4J.js.map → chunk-MQPT254A.js.map} +0 -0
- /package/dist/{chunk-EWT3WMVY.js.map → chunk-MYH7VISV.js.map} +0 -0
- /package/dist/{chunk-7NSX7A5H.js.map → chunk-N5PY7IXI.js.map} +0 -0
- /package/dist/{chunk-BHIGHSXA.js.map → chunk-NNXZ5RK5.js.map} +0 -0
- /package/dist/{chunk-EQ7PWGBN.js.map → chunk-O7HLQTB7.js.map} +0 -0
- /package/dist/{chunk-DW5FRWRQ.js.map → chunk-OAWEUKUC.js.map} +0 -0
- /package/dist/{chunk-O4VCZTK4.js.map → chunk-OGHW7RQC.js.map} +0 -0
- /package/dist/{chunk-XR6WBW23.js.map → chunk-OVGASVPW.js.map} +0 -0
- /package/dist/{chunk-HEBQS7QP.js.map → chunk-OXYR2HVK.js.map} +0 -0
- /package/dist/{chunk-TNVO2DTB.js.map → chunk-P7FQUGED.js.map} +0 -0
- /package/dist/{chunk-343TTIHD.js.map → chunk-PENJBKPH.js.map} +0 -0
- /package/dist/{chunk-2RQINU5T.js.map → chunk-PKFFJAQ6.js.map} +0 -0
- /package/dist/{chunk-M4LQRQFL.js.map → chunk-PW2WLDX3.js.map} +0 -0
- /package/dist/{chunk-WRDPWEIC.js.map → chunk-Q3GSDSK2.js.map} +0 -0
- /package/dist/{chunk-SYJMI2NP.js.map → chunk-Q3OFOOO7.js.map} +0 -0
- /package/dist/{chunk-GGI7GM5O.js.map → chunk-QE2C35TO.js.map} +0 -0
- /package/dist/{chunk-CT5K725B.js.map → chunk-QQLGSMGE.js.map} +0 -0
- /package/dist/{chunk-7MN6I5NK.js.map → chunk-QXFPTRHB.js.map} +0 -0
- /package/dist/{chunk-CZPU5TW3.js.map → chunk-RFZU5BTG.js.map} +0 -0
- /package/dist/{chunk-JB67KPGM.js.map → chunk-RRO2EOJB.js.map} +0 -0
- /package/dist/{chunk-MZQTHSLN.js.map → chunk-S7HRED4D.js.map} +0 -0
- /package/dist/{chunk-NYEA7JAI.js.map → chunk-SC72DRTX.js.map} +0 -0
- /package/dist/{chunk-JWW2Z3RH.js.map → chunk-SMZBGHR2.js.map} +0 -0
- /package/dist/{chunk-EZSEAYYT.js.map → chunk-SSWZHR46.js.map} +0 -0
- /package/dist/{chunk-NA7MIEG6.js.map → chunk-SZETT7QV.js.map} +0 -0
- /package/dist/{chunk-2HPP6RVC.js.map → chunk-TQOPF7LD.js.map} +0 -0
- /package/dist/{chunk-OLVZ6TOV.js.map → chunk-TUO47RL2.js.map} +0 -0
- /package/dist/{chunk-4IVDVZZ2.js.map → chunk-UGL6SJN6.js.map} +0 -0
- /package/dist/{chunk-QJRDDVZ2.js.map → chunk-V5P5Q6HM.js.map} +0 -0
- /package/dist/{chunk-73NJCGQG.js.map → chunk-VIK3HAUQ.js.map} +0 -0
- /package/dist/{chunk-KM5O4ICK.js.map → chunk-VK4ULJFH.js.map} +0 -0
- /package/dist/{chunk-QYNCPS5W.js.map → chunk-WBKWIFXA.js.map} +0 -0
- /package/dist/{chunk-X4Z62ZQY.js.map → chunk-WETAIIKC.js.map} +0 -0
- /package/dist/{chunk-GMTM6EN7.js.map → chunk-WKF54CCK.js.map} +0 -0
- /package/dist/{chunk-KT6HWAEN.js.map → chunk-WZUNBSS7.js.map} +0 -0
- /package/dist/{chunk-Y2B3I3IH.js.map → chunk-X5RDHO6G.js.map} +0 -0
- /package/dist/{chunk-TXKZEKJN.js.map → chunk-XNOSTV5F.js.map} +0 -0
- /package/dist/{chunk-7JXLGOM2.js.map → chunk-Y55ILY2F.js.map} +0 -0
- /package/dist/{chunk-HI2OFZSZ.js.map → chunk-YPILHGEO.js.map} +0 -0
- /package/dist/{chunk-V3PLFYKO.js.map → chunk-ZAJO2B75.js.map} +0 -0
- /package/dist/native/chunks/{chunk-2R2R35C5.js.map → chunk-2SBTJSQE.js.map} +0 -0
- /package/dist/native/chunks/{chunk-WL5LXVCK.js.map → chunk-6L4UZBQP.js.map} +0 -0
- /package/dist/native/chunks/{chunk-GW7TQ7HO.js.map → chunk-QEQZ5AF6.js.map} +0 -0
- /package/dist/native/chunks/{chunk-7LTVGW23.js.map → chunk-UII3IFLP.js.map} +0 -0
- /package/dist/native/chunks/{chunk-75JQYVDZ.js.map → chunk-UYREIOEM.js.map} +0 -0
- /package/dist/native/chunks/{chunk-GWGIWQO7.js.map → chunk-XI7HTAVN.js.map} +0 -0
- /package/dist/native/chunks/{chunk-QYUD3S6F.js.map → chunk-ZOP7UAZK.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.base.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE5F;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC9D;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA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AAE,UAAU,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAElC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC;IAE7C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC"}
|
|
@@ -12,6 +12,45 @@ export type ResolvedAlertProps<P extends AlertBaseFields> = P & Required<Pick<Al
|
|
|
12
12
|
export declare const resolveAlertProps: <P extends AlertBaseFields>(props: P) => ResolvedAlertProps<P>;
|
|
13
13
|
/** `danger` announces itself; everything else waits its turn. */
|
|
14
14
|
export declare const defaultAriaLive: (variant: AlertVariant) => "polite" | "assertive";
|
|
15
|
+
/**
|
|
16
|
+
* The ARIA role each `announce` level is spelled with.
|
|
17
|
+
*
|
|
18
|
+
* Both roles carry an IMPLICIT live setting, and that implicit one is what
|
|
19
|
+
* assistive tech acts on — `alert` is assertive, `status` is polite. Pairing
|
|
20
|
+
* them here is what stops `role` and `aria-live` from contradicting each
|
|
21
|
+
* other, which they do by default: every alert is `role="alert"` regardless of
|
|
22
|
+
* variant, so an `info` alert asks to be polite in one attribute and to
|
|
23
|
+
* interrupt in the other.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ANNOUNCE_ROLE: Record<NonNullable<AlertBaseFields['announce']>, string>;
|
|
26
|
+
/**
|
|
27
|
+
* The two attributes that decide whether an alert interrupts, resolved TOGETHER.
|
|
28
|
+
*
|
|
29
|
+
* Both renderers therefore let `role` and `announce` leave their destructure
|
|
30
|
+
* unused (`_role`, `_announce`) and call this instead — the first because the
|
|
31
|
+
* defaults have already answered it, the second because it must never reach
|
|
32
|
+
* the DOM.
|
|
33
|
+
*
|
|
34
|
+
* Reads the caller's own props rather than the defaulted ones, because the
|
|
35
|
+
* whole question is which of them the caller actually spelled:
|
|
36
|
+
* {@link ALERT_DEFAULTS} supplies `role: 'alert'` for everything, so after the
|
|
37
|
+
* merge there is no longer any difference between an alert that asked to
|
|
38
|
+
* interrupt and one that never mentioned it.
|
|
39
|
+
*
|
|
40
|
+
* Precedence, most specific first — an explicit `role` or `aria-live` beats
|
|
41
|
+
* `announce`, so a call site that already spells either by hand is untouched:
|
|
42
|
+
*
|
|
43
|
+
* 1. `role` / `aria-live` as given;
|
|
44
|
+
* 2. {@link AlertBaseFields.announce}, which supplies both;
|
|
45
|
+
* 3. today's behaviour — `ALERT_DEFAULTS.role` and {@link defaultAriaLive}.
|
|
46
|
+
*
|
|
47
|
+
* With none of the three named, the result is byte-for-byte what it was before
|
|
48
|
+
* `announce` existed.
|
|
49
|
+
*/
|
|
50
|
+
export declare const resolveAnnouncement: (props: Pick<AlertBaseFields, "announce" | "role" | "aria-live">, variant: AlertVariant) => {
|
|
51
|
+
role: string;
|
|
52
|
+
"aria-live": "polite" | "assertive" | "off";
|
|
53
|
+
};
|
|
15
54
|
export declare const testIdFor: (base: string | undefined, suffix: string) => string;
|
|
16
55
|
/**
|
|
17
56
|
* The glyph each semantic variant carries, by the shared icon set's name.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,KAAK,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;AAEzG,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAA;CASnG,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,eAAe,IAAI,CAAC,GAC3D,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAYtD,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,eAAe,EAAE,OAAO,CAAC,KAAG,kBAAkB,CAAC,CAAC,CACP,CAAC;AAEtF,iEAAiE;AACjE,eAAO,MAAM,eAAe,GAAI,SAAS,YAAY,KAAG,QAAQ,GAAG,WACpB,CAAC;AAEhD,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,GAAG,SAAS,EAAE,QAAQ,MAAM,KAAG,MACrB,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,CAKhE,CAAC"}
|
|
1
|
+
{"version":3,"file":"Alert.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.helpers.ts"],"names":[],"mappings":"A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,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,CAKhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EASL,IAAI,EAEL,MAAM,cAAc,CAAC;AActB,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,sBAAsB,CAAC;AA4KrE,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Alert.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EASL,IAAI,EAEL,MAAM,cAAc,CAAC;AActB,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,sBAAsB,CAAC;AA4KrE,eAAO,MAAM,KAAK,yEA0ChB,CAAC"}
|
|
@@ -32,8 +32,32 @@ export type SwitchPaint = Pick<SwitchBaseProps, SwitchFlagKeys>;
|
|
|
32
32
|
* gradient fill — and `glass` its paper wash without the blur.
|
|
33
33
|
*/
|
|
34
34
|
export declare function trackStyle(theme: UiTheme, paint: SwitchPaint, palette: SwitchPalette, geometry: SwitchGeometry, look: SwitchLook, state: SwitchState): ViewStyle;
|
|
35
|
-
/**
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* The ink on the CHECKED track — the thumb, and the `on` wording (FUT-1924).
|
|
37
|
+
*
|
|
38
|
+
* Both halves of the component had a stated `#fff` here, and the checked track
|
|
39
|
+
* is the one surface a tenant chooses: a pale brand got a white knob on a pale
|
|
40
|
+
* bar, which reads as OFF while it is on.
|
|
41
|
+
*
|
|
42
|
+
* **The fills are THIS renderer's, not the web's, and they differ.** The web
|
|
43
|
+
* paints a real three-stop gradient and hands `checkedInk` all three
|
|
44
|
+
* (`Switch.styles.ts`); React Native has no gradient without a dependency, so
|
|
45
|
+
* `trackStyle` shows `gradientFirstStop` — `palette.light`, FLAT — and
|
|
46
|
+
* `NATIVE-NOTES.md` records that as a known divergence. Passing the web's set
|
|
47
|
+
* here would judge the ink against two fills native never draws, and the two
|
|
48
|
+
* renderers then disagree on the same palette: measured on `#00897b`, the web
|
|
49
|
+
* answers white and this answered dark ink, because `main` and `dark` were in
|
|
50
|
+
* the list and only `light` is on screen.
|
|
51
|
+
*
|
|
52
|
+
* So the gradient case is ONE fill, which is the one it paints.
|
|
53
|
+
*/
|
|
54
|
+
export declare function checkedInk(paint: SwitchPaint, palette: SwitchPalette): string;
|
|
55
|
+
/**
|
|
56
|
+
* The knob: round for iOS and the default, squarer for Android and Material.
|
|
57
|
+
* White while resting, the checked track's own ink once on — see
|
|
58
|
+
* {@link RESTING_THUMB} and {@link checkedInk}.
|
|
59
|
+
*/
|
|
60
|
+
export declare function thumbStyle(theme: UiTheme, paint: SwitchPaint, palette: SwitchPalette, geometry: SwitchGeometry, look: SwitchLook, state: SwitchState): ViewStyle;
|
|
37
61
|
/** MUI's `body2` at 500, in the error hue when the row is in error. */
|
|
38
62
|
export declare function labelTextStyle(theme: UiTheme, error: boolean): TextStyle;
|
|
39
63
|
/** MUI's `caption`, 4px under the label. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.look.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Switch/Switch.look.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"Switch.look.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Switch/Switch.look.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,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B,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,WAAW,GACjB,SAAS,CAmBX;AAED,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,CAQxE;AAED,4CAA4C;AAC5C,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,CAQ9E;AAED,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,CAQzE"}
|
|
@@ -159,6 +159,14 @@ export declare const LABEL_GAP_UNITS: {
|
|
|
159
159
|
readonly beside: 2;
|
|
160
160
|
readonly stacked: 1;
|
|
161
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* The minimum height of a touch target, in px (FUT-1905).
|
|
164
|
+
*
|
|
165
|
+
* No entry in {@link SWITCH_SIZES} reaches it — `xl`, the largest, is 34px tall
|
|
166
|
+
* and `md` is 26 — so a consumer cannot buy a legal target by passing a bigger
|
|
167
|
+
* `size`. The label is what clears it: see `SwitchLabel` in `Switch.parts.tsx`.
|
|
168
|
+
*/
|
|
169
|
+
export declare const TAP_TARGET_MIN = 40;
|
|
162
170
|
/**
|
|
163
171
|
* `neutral`'s three greys, and the literals the web falls back to for a theme
|
|
164
172
|
* whose grey ramp omits a step. Same three steps `Button` draws its neutral
|
|
@@ -175,6 +183,17 @@ export declare const NEUTRAL_FALLBACK: {
|
|
|
175
183
|
readonly light: "#9e9e9e";
|
|
176
184
|
};
|
|
177
185
|
export declare const NEUTRAL_CONTRAST = "#fff";
|
|
186
|
+
/**
|
|
187
|
+
* The RESTING thumb — the knob while the switch is off (FUT-1924).
|
|
188
|
+
*
|
|
189
|
+
* It stays white, and the reason is worth stating because the checked thumb no
|
|
190
|
+
* longer is: the resting track is `theme.palette.action.disabled` washed over
|
|
191
|
+
* the page, which no tenant picks, and a white knob on it is the conventional
|
|
192
|
+
* look in both modes. The CHECKED track is `palette.main`, a colour the tenant
|
|
193
|
+
* does pick, and that is where a stated white was a defect. See `checkedInk`
|
|
194
|
+
* in `Switch.styles.ts` and its native twin.
|
|
195
|
+
*/
|
|
196
|
+
export declare const RESTING_THUMB = "#fff";
|
|
178
197
|
/** Hover: the thumb lifts a shade and takes a halo of the hue. */
|
|
179
198
|
export declare const SWITCH_HOVER: {
|
|
180
199
|
readonly thumbScale: 1.05;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.metrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Switch/Switch.metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;;;;;;;GAWG;AAEH,oEAAoE;AACpE,eAAO,MAAM,YAAY,SAAS,CAAC;AAEnC,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE,cAAc,CAM1D,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEpE,eAAO,MAAM,MAAM,GAAI,UAAU,MAAM,KAAG,UAKzC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,UAAU,GAAI,MAAM,SAAS,GAAG,SAAS,EAAE,QAAQ,MAAM,EAAE,SAAS,MAAM,KAAG,cAGzF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAA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C,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;CAAgD,CAAC;AAC1E,eAAO,MAAM,gBAAgB;;;;CAAkE,CAAC;AAChG,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,SAAS,CAAC;AAEpC,kEAAkE;AAClE,eAAO,MAAM,YAAY;;;;;CAAoE,CAAC;AAE9F,wDAAwD;AACxD,eAAO,MAAM,iBAAiB;;;CAAoC,CAAC;AAEnE,uEAAuE;AACvE,eAAO,MAAM,OAAO,GAAI,IAAI,MAAM,KAAG,MAAyB,CAAC;AAE/D,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,GAAI,SAAS,aAAa,GAAG,SAAS,EAAE,SAAS,MAAM,EAAE,UAAU,MAAM,KAAG,OACtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Switch/Switch.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,IAAI,EACJ,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Switch.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Switch/Switch.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,IAAI,EACJ,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AA4QtB;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;;;;;;;8BA4DjB,CAAC"}
|
|
@@ -143,6 +143,44 @@ export declare const DEFAULT_BRAND: Record<UiThemeMode, {
|
|
|
143
143
|
* palette's `text.primary`, which is what made it easy to read backwards.)
|
|
144
144
|
*/
|
|
145
145
|
export declare function contrastText(background: string): string;
|
|
146
|
+
/**
|
|
147
|
+
* The ink that reads on EVERY one of these fills (FUT-1924).
|
|
148
|
+
*
|
|
149
|
+
* {@link contrastText} answers for one fill, which is all MUI's `augmentColor`
|
|
150
|
+
* ever needs: a solid button is a single flat colour. Two components paint the
|
|
151
|
+
* label over something that is not one colour — `Button`'s `gradient` variant
|
|
152
|
+
* runs between two stops, and `Switch`'s thumb travels the whole length of a
|
|
153
|
+
* checked track — and both of them stated `#fff` outright instead, which is
|
|
154
|
+
* white-on-pale the moment a white-labelled host hands the library a pale
|
|
155
|
+
* brand. Audited across the library, those two were the only places a hardcoded
|
|
156
|
+
* white sat over a surface the TENANT chooses.
|
|
157
|
+
*
|
|
158
|
+
* **This deliberately does not follow `contrastText`'s rule.** MUI's is a
|
|
159
|
+
* threshold that PREFERS white — white wherever white clears 3:1 — which is a
|
|
160
|
+
* brand-feel decision, and it is kept for every existing caller so nothing
|
|
161
|
+
* already legible moves. Here the fills can disagree: over MUI's own success
|
|
162
|
+
* pair white is 2.78:1 on `#4caf50` and dark ink 2.66:1 on `#1b5e20`, so
|
|
163
|
+
* neither meets any threshold and asking whether one does is the wrong
|
|
164
|
+
* question. The answer is whichever ink has the better WORST case across the
|
|
165
|
+
* fills — which is also not what either fill says on its own, since
|
|
166
|
+
* `contrastText('#4caf50')` is dark ink.
|
|
167
|
+
*
|
|
168
|
+
* A gradient wide enough that neither ink clears 4.5:1 anywhere is a palette
|
|
169
|
+
* problem this cannot fix — it returns the less bad ink and does not pretend
|
|
170
|
+
* otherwise.
|
|
171
|
+
*
|
|
172
|
+
* `Math.min` is the claim, and it is worth knowing that no test can prove it
|
|
173
|
+
* against `Math.max` today: the two candidate inks sit at opposite ends of the
|
|
174
|
+
* luminance range, so ranking them by their best fill and by their worst gives
|
|
175
|
+
* the same winner for every possible pair (checked exhaustively). Worst case is
|
|
176
|
+
* still what this MEANS, and the moment a third ink or one that is not an
|
|
177
|
+
* extreme is offered, the two stop agreeing.
|
|
178
|
+
*
|
|
179
|
+
* `fallback` is returned when a fill cannot be decomposed: {@link getContrastRatio}
|
|
180
|
+
* throws on a format it does not know, and a throw inside an emotion style
|
|
181
|
+
* function takes the render down with it.
|
|
182
|
+
*/
|
|
183
|
+
export declare function inkOver(fills: readonly string[], fallback: string): string;
|
|
146
184
|
/**
|
|
147
185
|
* MUI's `augmentColor` for a custom colour: derive whatever shade the seed
|
|
148
186
|
* left out. `light` is one tonal offset up, `dark` one and a half down.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/tokens/theme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAElF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QAAE,O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eAAe,qDAA+C,CAAC;AAC5E,eAAO,MAAM,yBAAyB,+DAA2D,CAAC;AAElG;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAsCnE;AAED,wDAAwD;AACxD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3G,eAAO,MAAM,gBAAgB,EAAE,OAAyB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../chunk-6GP2DOOO.js";
|
|
2
2
|
import {
|
|
3
3
|
Heading
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DW6GBMLQ.js";
|
|
5
|
+
import "../chunk-LV4UTYAD.js";
|
|
6
|
+
import "../chunk-ERX4XIYC.js";
|
|
7
7
|
import "../chunk-TYJR4GOF.js";
|
|
8
8
|
import "../chunk-PT6TCWIW.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-QLI7ES7Z.js";
|
|
10
10
|
import "../chunk-AG66JBNH.js";
|
|
11
11
|
import "../chunk-6JAIFIPW.js";
|
|
12
12
|
import "../chunk-FZXKH2ZT.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Paragraph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-GTLJYAEG.js";
|
|
4
4
|
import "../chunk-QKLGH3RZ.js";
|
|
5
5
|
import "../chunk-TYJR4GOF.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-QLI7ES7Z.js";
|
|
7
7
|
import "../chunk-AG66JBNH.js";
|
|
8
8
|
import "../chunk-6JAIFIPW.js";
|
|
9
9
|
import "../chunk-FZXKH2ZT.js";
|
package/dist/typography/Text.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../chunk-VUHLNYAE.js";
|
|
2
2
|
import {
|
|
3
3
|
Text
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-PENJBKPH.js";
|
|
5
|
+
import "../chunk-ZAJO2B75.js";
|
|
6
6
|
import "../chunk-TYJR4GOF.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-QLI7ES7Z.js";
|
|
8
8
|
import "../chunk-AG66JBNH.js";
|
|
9
9
|
import "../chunk-6JAIFIPW.js";
|
|
10
10
|
import "../chunk-FZXKH2ZT.js";
|
package/dist/user-avatar.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UserAvatar,
|
|
3
3
|
UserMenu
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QE2C35TO.js";
|
|
5
5
|
import "./chunk-UDQSIRAP.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-JD3D6Y4U.js";
|
|
7
|
+
import "./chunk-SZETT7QV.js";
|
|
8
8
|
import "./chunk-XRMZMBE3.js";
|
|
9
9
|
import "./chunk-FAITHWIO.js";
|
|
10
10
|
import "./chunk-3ZVUNSFF.js";
|
|
@@ -15,15 +15,15 @@ import "./chunk-BEBLRL5D.js";
|
|
|
15
15
|
import "./chunk-6Q6T3FW5.js";
|
|
16
16
|
import "./chunk-FKUYRQSP.js";
|
|
17
17
|
import "./chunk-BA4RHQ3B.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-77DF5LKI.js";
|
|
19
|
+
import "./chunk-2LSCK45B.js";
|
|
20
20
|
import "./chunk-5LQ7PKMW.js";
|
|
21
21
|
import "./chunk-TAMIZE4Q.js";
|
|
22
22
|
import "./chunk-73BEVJCS.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-PENJBKPH.js";
|
|
24
|
+
import "./chunk-ZAJO2B75.js";
|
|
25
25
|
import "./chunk-TYJR4GOF.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-QLI7ES7Z.js";
|
|
27
27
|
import "./chunk-AG66JBNH.js";
|
|
28
28
|
import "./chunk-6JAIFIPW.js";
|
|
29
29
|
import "./chunk-FZXKH2ZT.js";
|
package/package.json
CHANGED
|
@@ -76,12 +76,39 @@ export interface AlertBaseFields {
|
|
|
76
76
|
animate?: boolean;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Whether this alert INTERRUPTS a screen reader, or waits its turn.
|
|
80
|
+
*
|
|
81
|
+
* Sets `role` and `aria-live` together, which is the whole point of it:
|
|
82
|
+
* those two disagree by default and the disagreement is invisible. An alert
|
|
83
|
+
* gets `role="alert"` from {@link ALERT_DEFAULTS} whatever its variant, and
|
|
84
|
+
* `role="alert"` is IMPLICITLY an assertive live region — so a `polite`
|
|
85
|
+
* `aria-live` beside it is contradicted rather than honoured, and several
|
|
86
|
+
* screen readers interrupt anyway. A caller who wants a quiet announcement
|
|
87
|
+
* has to know that the trick is `role="status"`, which is implicitly polite.
|
|
88
|
+
*
|
|
89
|
+
* `announce` is that knowledge, spelled once:
|
|
90
|
+
*
|
|
91
|
+
* | value | `role` | `aria-live` |
|
|
92
|
+
* |---|---|---|
|
|
93
|
+
* | `'assertive'` | `alert` | `assertive` |
|
|
94
|
+
* | `'polite'` | `status` | `polite` |
|
|
95
|
+
*
|
|
96
|
+
* Unset, nothing changes: the role stays `alert` and the live setting is
|
|
97
|
+
* still derived from the variant ({@link defaultAriaLive}). An explicit
|
|
98
|
+
* `role` or `aria-live` still wins over both, so an existing call site that
|
|
99
|
+
* spells either by hand keeps exactly what it spelled.
|
|
100
|
+
*/
|
|
101
|
+
announce?: 'polite' | 'assertive';
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* ARIA role for the alert. Prefer {@link AlertBaseFields.announce}, which
|
|
105
|
+
* keeps this and `aria-live` consistent; this overrides it.
|
|
80
106
|
*/
|
|
81
107
|
role?: string;
|
|
82
108
|
|
|
83
109
|
/**
|
|
84
|
-
* ARIA live region setting
|
|
110
|
+
* ARIA live region setting. Prefer {@link AlertBaseFields.announce}, which
|
|
111
|
+
* keeps this and `role` consistent; this overrides it.
|
|
85
112
|
*/
|
|
86
113
|
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
87
114
|
|
|
@@ -38,6 +38,56 @@ export const resolveAlertProps = <P extends AlertBaseFields>(props: P): Resolved
|
|
|
38
38
|
export const defaultAriaLive = (variant: AlertVariant): 'polite' | 'assertive' =>
|
|
39
39
|
variant === 'danger' ? 'assertive' : 'polite';
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* The ARIA role each `announce` level is spelled with.
|
|
43
|
+
*
|
|
44
|
+
* Both roles carry an IMPLICIT live setting, and that implicit one is what
|
|
45
|
+
* assistive tech acts on — `alert` is assertive, `status` is polite. Pairing
|
|
46
|
+
* them here is what stops `role` and `aria-live` from contradicting each
|
|
47
|
+
* other, which they do by default: every alert is `role="alert"` regardless of
|
|
48
|
+
* variant, so an `info` alert asks to be polite in one attribute and to
|
|
49
|
+
* interrupt in the other.
|
|
50
|
+
*/
|
|
51
|
+
export const ANNOUNCE_ROLE: Record<NonNullable<AlertBaseFields['announce']>, string> = {
|
|
52
|
+
assertive: 'alert',
|
|
53
|
+
polite: 'status',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The two attributes that decide whether an alert interrupts, resolved TOGETHER.
|
|
58
|
+
*
|
|
59
|
+
* Both renderers therefore let `role` and `announce` leave their destructure
|
|
60
|
+
* unused (`_role`, `_announce`) and call this instead — the first because the
|
|
61
|
+
* defaults have already answered it, the second because it must never reach
|
|
62
|
+
* the DOM.
|
|
63
|
+
*
|
|
64
|
+
* Reads the caller's own props rather than the defaulted ones, because the
|
|
65
|
+
* whole question is which of them the caller actually spelled:
|
|
66
|
+
* {@link ALERT_DEFAULTS} supplies `role: 'alert'` for everything, so after the
|
|
67
|
+
* merge there is no longer any difference between an alert that asked to
|
|
68
|
+
* interrupt and one that never mentioned it.
|
|
69
|
+
*
|
|
70
|
+
* Precedence, most specific first — an explicit `role` or `aria-live` beats
|
|
71
|
+
* `announce`, so a call site that already spells either by hand is untouched:
|
|
72
|
+
*
|
|
73
|
+
* 1. `role` / `aria-live` as given;
|
|
74
|
+
* 2. {@link AlertBaseFields.announce}, which supplies both;
|
|
75
|
+
* 3. today's behaviour — `ALERT_DEFAULTS.role` and {@link defaultAriaLive}.
|
|
76
|
+
*
|
|
77
|
+
* With none of the three named, the result is byte-for-byte what it was before
|
|
78
|
+
* `announce` existed.
|
|
79
|
+
*/
|
|
80
|
+
export const resolveAnnouncement = (
|
|
81
|
+
props: Pick<AlertBaseFields, 'announce' | 'role' | 'aria-live'>,
|
|
82
|
+
variant: AlertVariant,
|
|
83
|
+
): { role: string; 'aria-live': 'polite' | 'assertive' | 'off' } => {
|
|
84
|
+
const announce = props.announce;
|
|
85
|
+
return {
|
|
86
|
+
role: props.role ?? (announce === undefined ? ALERT_DEFAULTS.role : ANNOUNCE_ROLE[announce]),
|
|
87
|
+
'aria-live': props['aria-live'] ?? announce ?? defaultAriaLive(variant),
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
|
|
41
91
|
export const testIdFor = (base: string | undefined, suffix: string): string =>
|
|
42
92
|
base ? `${base}-${suffix}` : `alert-${suffix}`;
|
|
43
93
|
|
|
@@ -33,6 +33,7 @@ A beautiful and versatile Alert component with multiple variants, animations, an
|
|
|
33
33
|
| `glow` | `boolean` | `false` | Add a glowing shadow effect |
|
|
34
34
|
| `pulse` | `boolean` | `false` | Add a pulsing animation effect |
|
|
35
35
|
| `animate` | `boolean` | `true` | Whether to animate the alert on mount |
|
|
36
|
+
| `announce` | `'polite' \| 'assertive'` | - | Sets `role` and `aria-live` together — see [Accessibility](#accessibility) |
|
|
36
37
|
| `className` | `string` | - | Additional CSS classes |
|
|
37
38
|
|
|
38
39
|
## Usage Examples
|
|
@@ -136,12 +137,39 @@ import Star from '@mui/icons-material/Star';
|
|
|
136
137
|
The Alert component implements comprehensive accessibility features:
|
|
137
138
|
|
|
138
139
|
- Uses `role="alert"` for immediate screen reader announcement
|
|
139
|
-
-
|
|
140
|
+
- Derives `aria-live` from the variant: **assertive for `danger`, polite for
|
|
141
|
+
every other variant** (`defaultAriaLive`)
|
|
140
142
|
- Proper focus management for closable alerts
|
|
141
143
|
- Keyboard navigation support (Enter/Space to close)
|
|
142
144
|
- High contrast colors meeting WCAG guidelines
|
|
143
145
|
- Screen reader compatible content structure
|
|
144
146
|
|
|
147
|
+
### `announce` — whether the alert interrupts
|
|
148
|
+
|
|
149
|
+
`role` and `aria-live` are two attributes with one meaning between them, and by
|
|
150
|
+
default they disagree. Every alert gets `role="alert"`, whatever its variant,
|
|
151
|
+
and `role="alert"` is **implicitly an assertive live region** — so an `info`
|
|
152
|
+
alert ships `aria-live="polite"` and an implicitly-assertive role together, and
|
|
153
|
+
a reader that honours the role interrupts anyway. The escape is that
|
|
154
|
+
`role="status"` is implicitly polite, which is knowledge a call site should not
|
|
155
|
+
have to carry.
|
|
156
|
+
|
|
157
|
+
`announce` carries it:
|
|
158
|
+
|
|
159
|
+
| `announce` | `role` | `aria-live` |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| `'assertive'` | `alert` | `assertive` |
|
|
162
|
+
| `'polite'` | `status` | `polite` |
|
|
163
|
+
| unset | `alert` | from the variant, as above |
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
// A sentence worth hearing, that is not worth interrupting for.
|
|
167
|
+
<Alert variant="info" announce="polite" description="Mais 1 pessoa está nesta mesa agora." showIcon={false} />
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
An explicit `role` or `aria-live` still wins over `announce`, so a call site
|
|
171
|
+
that already spells either by hand keeps exactly what it spelled.
|
|
172
|
+
|
|
145
173
|
## Best Practices
|
|
146
174
|
|
|
147
175
|
1. Use appropriate variants for message severity
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
type ViewStyle,
|
|
13
13
|
} from 'react-native';
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { resolveAlertProps, resolveAnnouncement, testIdFor, VARIANT_ICON } from './Alert.helpers';
|
|
16
16
|
import {
|
|
17
17
|
actionSlotStyle,
|
|
18
18
|
alertLook,
|
|
@@ -198,7 +198,10 @@ function useDismiss(onClose: (() => void) | undefined): { open: boolean; gone: b
|
|
|
198
198
|
|
|
199
199
|
export const Alert = React.forwardRef<View, AlertProps>((alertProps, ref) => {
|
|
200
200
|
const {
|
|
201
|
-
variant, color, glow, pulse, icon, showIcon, onClose, title, description, children, animate,
|
|
201
|
+
variant, color, glow, pulse, icon, showIcon, onClose, title, description, children, animate,
|
|
202
|
+
// `role`, `announce` and `aria-live` all leave here and are resolved
|
|
203
|
+
// TOGETHER below, off `alertProps` — see `resolveAnnouncement`.
|
|
204
|
+
role: _role, announce: _announce,
|
|
202
205
|
'aria-atomic': ariaAtomic, 'aria-live': _ariaLive, closable, closeLabel, style, ...others
|
|
203
206
|
} = resolveAlertProps(alertProps);
|
|
204
207
|
const theme = useUiTheme();
|
|
@@ -207,14 +210,15 @@ export const Alert = React.forwardRef<View, AlertProps>((alertProps, ref) => {
|
|
|
207
210
|
const look = alertLook(theme, { variant, color, glow, pulse });
|
|
208
211
|
const fadeIn = useFadeIn(animate);
|
|
209
212
|
const dismiss = useDismiss(onClose);
|
|
213
|
+
const announcement = resolveAnnouncement(alertProps, variant);
|
|
210
214
|
|
|
211
215
|
if (dismiss.gone) return null;
|
|
212
216
|
return (
|
|
213
217
|
<Collapse open={dismiss.open} onCollapsed={dismiss.onCollapsed}>
|
|
214
218
|
<Animated.View
|
|
215
219
|
ref={ref}
|
|
216
|
-
role={role as Role}
|
|
217
|
-
aria-live={
|
|
220
|
+
role={announcement.role as Role}
|
|
221
|
+
aria-live={announcement['aria-live']}
|
|
218
222
|
{...webAria({ 'aria-atomic': ariaAtomic })}
|
|
219
223
|
tabIndex={0}
|
|
220
224
|
testID={testId}
|
|
@@ -8,7 +8,7 @@ import { alpha, styled } from '@mui/material/styles/index.js';
|
|
|
8
8
|
import type { Theme } from '@mui/material/styles/index.js';
|
|
9
9
|
import React from 'react';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { resolveAlertProps, resolveAnnouncement, testIdFor } from './Alert.helpers';
|
|
12
12
|
import type { AlertPalette } from './Alert.metrics';
|
|
13
13
|
import {
|
|
14
14
|
ACTIVE,
|
|
@@ -301,7 +301,7 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
301
301
|
description,
|
|
302
302
|
children,
|
|
303
303
|
animate,
|
|
304
|
-
role,
|
|
304
|
+
role: _role, announce: _announce, // resolved from `alertProps` — see `resolveAnnouncement`
|
|
305
305
|
'aria-atomic': ariaAtomic,
|
|
306
306
|
...others
|
|
307
307
|
} = resolveAlertProps(alertProps);
|
|
@@ -316,7 +316,7 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
316
316
|
const props = withoutAlertOnlyProps(withoutTestIdProps(others));
|
|
317
317
|
|
|
318
318
|
// Depends on `variant`, so it cannot live in the static defaults above.
|
|
319
|
-
const
|
|
319
|
+
const announcement = resolveAnnouncement(alertProps, variant);
|
|
320
320
|
const [open, setOpen] = React.useState(true);
|
|
321
321
|
const [isClosing, setIsClosing] = React.useState(false);
|
|
322
322
|
|
|
@@ -356,8 +356,8 @@ export const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, r
|
|
|
356
356
|
pulse={pulse}
|
|
357
357
|
animate={animate}
|
|
358
358
|
icon={displayIcon}
|
|
359
|
-
role={role}
|
|
360
|
-
aria-live={
|
|
359
|
+
role={announcement.role}
|
|
360
|
+
aria-live={announcement['aria-live']}
|
|
361
361
|
aria-atomic={ariaAtomic}
|
|
362
362
|
tabIndex={0}
|
|
363
363
|
action={dismissButton(alertProps, dataTestId, handleClose)}
|
|
@@ -151,6 +151,14 @@ Gradient background with smooth color transitions.
|
|
|
151
151
|
<Button variant="gradient">Gradient Button</Button>
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
+
Its label takes the ink the palette implies, judged across BOTH ends of the
|
|
155
|
+
gradient rather than against `main` — `primary` runs `primary.main →
|
|
156
|
+
secondary.main`, and an ink that reads on the first says nothing about the
|
|
157
|
+
second. So a pale brand gets dark ink here exactly as it does on `solid`, and
|
|
158
|
+
a palette whose two ends disagree gets whichever ink survives the worse of
|
|
159
|
+
them. It used to be a stated `#fff`, which made this the one button in the
|
|
160
|
+
library a pale-branded store could not read.
|
|
161
|
+
|
|
154
162
|
## Accessibility
|
|
155
163
|
|
|
156
164
|
The Button component follows WCAG 2.1 AA guidelines:
|
|
@@ -2,7 +2,7 @@ import { alpha, darken, keyframes, lighten } from '@mui/material/styles/index.js
|
|
|
2
2
|
import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
3
3
|
|
|
4
4
|
import { BUTTON_SIZES, ICON_ONLY_PADDING as ICON_ONLY_PADDING_PX } from './Button.metrics';
|
|
5
|
-
import { px } from '../../../tokens/theme';
|
|
5
|
+
import { inkOver, px } from '../../../tokens/theme';
|
|
6
6
|
|
|
7
7
|
// Define pulse animation globally
|
|
8
8
|
const pulseAnimation = keyframes`
|
|
@@ -141,11 +141,32 @@ const GRADIENT_PAIRS: Record<string, (theme: Theme) => [string, string]> = {
|
|
|
141
141
|
danger: (theme) => [theme.palette.error.light, theme.palette.error.dark],
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
+
const gradientStops = (theme: Theme, color: string, palette: ColorPalette): [string, string] =>
|
|
145
|
+
GRADIENT_PAIRS[color]?.(theme) ?? [palette.main, palette.dark];
|
|
146
|
+
|
|
144
147
|
const gradientFor = (theme: Theme, color: string, palette: ColorPalette): string => {
|
|
145
|
-
const [from, to] =
|
|
148
|
+
const [from, to] = gradientStops(theme, color, palette);
|
|
146
149
|
return `linear-gradient(135deg, ${from} 0%, ${to} 100%)`;
|
|
147
150
|
};
|
|
148
151
|
|
|
152
|
+
/**
|
|
153
|
+
* The label colour for `gradient`, which used to be `#fff` outright (FUT-1924).
|
|
154
|
+
*
|
|
155
|
+
* Every other filled variant reads `palette.contrastText`, derived from `main`
|
|
156
|
+
* — so a white-labelled host handing the library a pale brand got dark ink on
|
|
157
|
+
* its solid buttons and white ink on its gradient one. That store had exactly
|
|
158
|
+
* one button in the library whose label it could not read, in LIGHT mode,
|
|
159
|
+
* before dark mode existed anywhere.
|
|
160
|
+
*
|
|
161
|
+
* `contrastText` is still not the right thing to read, and that is why this
|
|
162
|
+
* goes through {@link inkOver}: a gradient is TWO fills, the named pairs run
|
|
163
|
+
* light-to-dark, and an ink chosen against `main` says nothing about the end
|
|
164
|
+
* the gradient actually reaches. Both stops go in, and the ink has to survive
|
|
165
|
+
* the worse of them.
|
|
166
|
+
*/
|
|
167
|
+
const gradientInk = (theme: Theme, color: string, palette: ColorPalette): string =>
|
|
168
|
+
inkOver(gradientStops(theme, color, palette), palette.contrastText || '#fff');
|
|
169
|
+
|
|
149
170
|
/**
|
|
150
171
|
* The label colour for the two variants that paint no background of their own.
|
|
151
172
|
*
|
|
@@ -218,7 +239,7 @@ const VARIANT_STYLES: Record<
|
|
|
218
239
|
}),
|
|
219
240
|
gradient: (theme, palette, color) => ({
|
|
220
241
|
background: gradientFor(theme, color, palette),
|
|
221
|
-
color:
|
|
242
|
+
color: gradientInk(theme, color, palette),
|
|
222
243
|
'&:hover': {
|
|
223
244
|
filter: 'brightness(1.1)',
|
|
224
245
|
transform: 'translateY(-2px)',
|