@12-apps/ui 6.19.1 → 6.20.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/NATIVE.md +6 -1
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +8 -7
- package/dist/_internal/components/data-display/Avatar/Avatar.base.js +1 -0
- package/dist/_internal/components/data-display/Avatar/Avatar.base.js.map +1 -0
- package/dist/_internal/components/data-display/Avatar/Avatar.helpers.js +14 -0
- package/dist/_internal/components/data-display/Avatar/Avatar.helpers.js.map +1 -0
- package/dist/_internal/components/data-display/Avatar/Avatar.js +8 -2
- package/dist/_internal/components/data-display/Avatar/Avatar.metrics.js +52 -0
- package/dist/_internal/components/data-display/Avatar/Avatar.metrics.js.map +1 -0
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +6 -1
- package/dist/_internal/components/data-display/Badge/Badge.animations.js +6 -1
- package/dist/_internal/components/data-display/Badge/Badge.base.js +1 -0
- package/dist/_internal/components/data-display/Badge/Badge.base.js.map +1 -0
- package/dist/_internal/components/data-display/Badge/Badge.helpers.js +3 -1
- package/dist/_internal/components/data-display/Badge/Badge.js +12 -6
- package/dist/_internal/components/data-display/Badge/Badge.metrics.js +64 -0
- package/dist/_internal/components/data-display/Badge/Badge.metrics.js.map +1 -0
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +8 -3
- package/dist/_internal/components/data-display/Badge/Badge.variants.js +6 -1
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +9 -4
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +4 -4
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +4 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.js +2 -2
- package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +6 -6
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/Chip/Chip.base.js +1 -0
- package/dist/_internal/components/data-display/Chip/Chip.base.js.map +1 -0
- package/dist/_internal/components/data-display/Chip/Chip.helpers.js +3 -9
- package/dist/_internal/components/data-display/Chip/Chip.js +4 -2
- package/dist/_internal/components/data-display/Chip/Chip.metrics.js +32 -0
- package/dist/_internal/components/data-display/Chip/Chip.metrics.js.map +1 -0
- package/dist/_internal/components/data-display/Chip/Chip.styles.js +16 -0
- package/dist/_internal/components/data-display/Chip/Chip.styles.js.map +1 -0
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +43 -43
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +54 -54
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +5 -5
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +5 -5
- package/dist/_internal/components/data-display/DataViews/base-card.js +4 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +5 -4
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +1 -1
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +7 -6
- package/dist/_internal/components/data-display/DataViews/card-surface.js +7 -2
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +15 -15
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +16 -16
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +40 -40
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +20 -20
- 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-pagination.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +13 -13
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +3 -3
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +1 -1
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +6 -6
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/EmptyState/EmptyState.js +2 -2
- package/dist/_internal/components/data-display/HoverCard/HoverCard.js +3 -3
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +6 -4
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +5 -5
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +5 -4
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +4 -4
- package/dist/_internal/components/data-display/Progress/Progress.base.js +1 -0
- package/dist/_internal/components/data-display/Progress/Progress.base.js.map +1 -0
- package/dist/_internal/components/data-display/Progress/Progress.helpers.js +5 -1
- package/dist/_internal/components/data-display/Progress/Progress.js +8 -3
- package/dist/_internal/components/data-display/Progress/Progress.metrics.js +52 -0
- package/dist/_internal/components/data-display/Progress/Progress.metrics.js.map +1 -0
- package/dist/_internal/components/data-display/Progress/Progress.styles.js +6 -1
- package/dist/_internal/components/data-display/SectionOnboarding/SectionOnboarding.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.js +2 -2
- package/dist/_internal/components/data-display/StatCard/StatCard.js +6 -4
- package/dist/_internal/components/data-display/Table/Table.js +3 -3
- package/dist/_internal/components/data-display/index.js +63 -56
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +3 -3
- package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
- package/dist/_internal/components/feedback/index.js +8 -8
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +3 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +7 -7
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +3 -3
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +2 -2
- package/dist/_internal/components/form/Button/Button.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.js +4 -4
- package/dist/_internal/components/form/Calendar/CalendarDayCell.js +2 -2
- package/dist/_internal/components/form/Calendar/CalendarMonth.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +5 -5
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +10 -10
- package/dist/_internal/components/form/CepField/CepField.js +3 -3
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +7 -7
- package/dist/_internal/components/form/Input/Input.js +2 -2
- package/dist/_internal/components/form/Menubar/Menubar.js +2 -2
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/_internal/components/form/index.js +28 -28
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +11 -11
- package/dist/_internal/components/form/total-form/Fields/CepField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/TextField.js +3 -3
- package/dist/_internal/components/form/total-form/Fields/index.js +21 -21
- package/dist/_internal/components/form/total-form/SubmitButton.js +3 -3
- package/dist/_internal/components/index.js +123 -116
- package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +2 -2
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +4 -4
- package/dist/_internal/components/layout/SettingsLayout/SettingsPanel.js +2 -2
- package/dist/_internal/components/layout/Skeleton/Skeleton.base.js +1 -0
- package/dist/_internal/components/layout/Skeleton/Skeleton.base.js.map +1 -0
- package/dist/_internal/components/layout/Skeleton/Skeleton.helpers.js +5 -3
- package/dist/_internal/components/layout/Skeleton/Skeleton.js +5 -3
- package/dist/_internal/components/layout/Skeleton/Skeleton.metrics.js +36 -0
- package/dist/_internal/components/layout/Skeleton/Skeleton.metrics.js.map +1 -0
- package/dist/_internal/components/layout/Skeleton/Skeleton.styles.js +2 -1
- package/dist/_internal/components/layout/index.js +16 -15
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +5 -5
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +4 -4
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/Pagination/Pagination.js +2 -2
- package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
- package/dist/_internal/components/navigation/index.js +16 -16
- package/dist/_internal/components/utility/InstallPrompt/InstallPrompt.js +2 -2
- package/dist/_internal/components/utility/index.js +2 -2
- package/dist/_internal/icons/Icon.js +2 -2
- package/dist/_internal/icons/paths.generated.js +1 -1
- package/dist/_internal/platform/animation.js +31 -0
- package/dist/_internal/platform/animation.js.map +1 -0
- package/dist/_internal/platform/web-keys.js +10 -0
- package/dist/_internal/platform/web-keys.js.map +1 -0
- package/dist/_internal/social-login-button/social-login-button.js +3 -3
- package/dist/_internal/tokens/mui-type.js +2 -1
- package/dist/_internal/tokens/mui-type.js.map +1 -1
- package/dist/_internal/user-avatar/user-avatar.js +7 -5
- package/dist/charts.js +11 -11
- package/dist/{chunk-P7FQUGED.js → chunk-23FCBIUN.js} +8 -8
- package/dist/{chunk-SL4NFGOL.js → chunk-24BUCMQA.js} +4 -4
- package/dist/{chunk-4SXZSSVV.js → chunk-2EKALM6P.js} +3 -3
- package/dist/{chunk-ZRFRU545.js → chunk-2ZDTGI5V.js} +7 -7
- package/dist/{chunk-HR7YTBR7.js → chunk-3AOOI2NR.js} +4 -4
- package/dist/chunk-3ZVUNSFF.js +32 -0
- package/dist/chunk-3ZVUNSFF.js.map +1 -0
- package/dist/{chunk-KKYW3LU7.js → chunk-47UD6DZ4.js} +2 -2
- package/dist/{chunk-ZOUWHGV3.js → chunk-4MGFUPQT.js} +4 -4
- package/dist/{chunk-LYNJJV2X.js → chunk-4SQFO4GW.js} +58 -40
- package/dist/chunk-4SQFO4GW.js.map +1 -0
- package/dist/{chunk-4FRZDSRD.js → chunk-4WK2RTVY.js} +3 -3
- package/dist/{chunk-HAFE43QJ.js → chunk-5JEOLUWJ.js} +6 -2
- package/dist/chunk-5JEOLUWJ.js.map +1 -0
- package/dist/{chunk-LDE4ELB5.js → chunk-5ZF3VASA.js} +7 -7
- package/dist/{chunk-JE6RZ5L6.js → chunk-5ZOJLYD2.js} +4 -4
- package/dist/{chunk-MMZAGB64.js → chunk-6C5D6O3D.js} +4 -2
- package/dist/chunk-6C5D6O3D.js.map +1 -0
- package/dist/{chunk-E5ZHW4I5.js → chunk-6IUTT6BK.js} +3 -3
- package/dist/{chunk-WPR2HS5B.js → chunk-74EZ565M.js} +8 -8
- package/dist/{chunk-BVZVH3ZN.js → chunk-74OZ5KVR.js} +5 -5
- package/dist/{chunk-PMS3H3OO.js → chunk-76GZ55IC.js} +7 -7
- package/dist/{chunk-QIV73V2X.js → chunk-7BYFC2MR.js} +36 -28
- package/dist/chunk-7BYFC2MR.js.map +1 -0
- package/dist/{chunk-DLFOEXUP.js → chunk-7EESF76V.js} +2 -2
- package/dist/{chunk-HKZHEK3Z.js → chunk-7JWXLDRH.js} +3 -3
- package/dist/{chunk-OR7UH2ZQ.js → chunk-7P2HZLEG.js} +3 -3
- package/dist/{chunk-6DXYCXH4.js → chunk-7RZ4WOQW.js} +2 -2
- package/dist/{chunk-EMNGIYH6.js → chunk-7TZ6OC5T.js} +5 -5
- package/dist/{chunk-HXYXDQ7U.js → chunk-7WDPC46N.js} +4 -2
- package/dist/chunk-7WDPC46N.js.map +1 -0
- package/dist/{chunk-CDJPDZCA.js → chunk-AEGX66N7.js} +2 -2
- package/dist/{chunk-65DLYC4S.js → chunk-AVGTTWTE.js} +4 -4
- package/dist/{chunk-C6XESZ3R.js → chunk-B2A4DG77.js} +6 -6
- package/dist/{chunk-VOOPGAQO.js → chunk-B7BZAIHL.js} +2 -2
- package/dist/{chunk-DZN3JF5E.js → chunk-BBC4KT5G.js} +4 -4
- package/dist/chunk-BF4FYOAR.js +23 -0
- package/dist/chunk-BF4FYOAR.js.map +1 -0
- package/dist/{chunk-FWCUELBU.js → chunk-BILE3A7F.js} +2 -2
- package/dist/{chunk-UEJQQVP2.js → chunk-BLT5ZBVL.js} +4 -4
- package/dist/chunk-BRMGHMYB.js +45 -0
- package/dist/chunk-BRMGHMYB.js.map +1 -0
- package/dist/{chunk-ISSJNFJV.js → chunk-C52BELLW.js} +2 -2
- package/dist/{chunk-BPYPUEM5.js → chunk-CZJLWCEG.js} +2 -2
- package/dist/{chunk-WZUNBSS7.js → chunk-DVUPIVI2.js} +4 -4
- package/dist/chunk-E46PG577.js +78 -0
- package/dist/chunk-E46PG577.js.map +1 -0
- package/dist/{chunk-L6KEVPXN.js → chunk-E4FGKZID.js} +20 -9
- package/dist/chunk-E4FGKZID.js.map +1 -0
- package/dist/{chunk-EXJBPKGW.js → chunk-EGRFMPGD.js} +4 -4
- package/dist/{chunk-XFUNJYFT.js → chunk-EPNUVSNK.js} +7 -7
- package/dist/{chunk-H2EQVMU3.js → chunk-EX3PSZLV.js} +2 -2
- package/dist/{chunk-4Q7HWRR2.js → chunk-EZSEAYYT.js} +52 -72
- package/dist/chunk-EZSEAYYT.js.map +1 -0
- package/dist/{chunk-LIOVN5IM.js → chunk-F2DOTCF3.js} +2 -2
- package/dist/chunk-FAITHWIO.js +73 -0
- package/dist/chunk-FAITHWIO.js.map +1 -0
- package/dist/{chunk-64IEKEMQ.js → chunk-FGLV6BXQ.js} +4 -4
- package/dist/{chunk-L65LF6LN.js → chunk-FP4R47TM.js} +2 -2
- package/dist/{chunk-NQHOHQCY.js → chunk-FPWB5ILF.js} +16 -8
- package/dist/chunk-FPWB5ILF.js.map +1 -0
- package/dist/{chunk-7AR2R7TV.js → chunk-G5ZVD5IJ.js} +4 -4
- package/dist/{chunk-SHQWIDD5.js → chunk-GJQYM3PM.js} +4 -4
- package/dist/{chunk-7WL24VNI.js → chunk-HDNK7BAX.js} +5 -5
- package/dist/{chunk-X5MPHXG5.js → chunk-HEG7JIBM.js} +4 -4
- package/dist/{chunk-HKFMPEXJ.js → chunk-HI2OFZSZ.js} +17 -10
- package/dist/chunk-HI2OFZSZ.js.map +1 -0
- package/dist/{chunk-ZIOCRSHU.js → chunk-HSAH5QUQ.js} +3 -3
- package/dist/{chunk-B443IIQG.js → chunk-IE7ISTLQ.js} +4 -4
- package/dist/{chunk-NFHS77NE.js → chunk-IH4CX43Q.js} +2 -2
- package/dist/{chunk-72UYVJBQ.js → chunk-IJIT5HQP.js} +2 -2
- package/dist/{chunk-KPQAPQH6.js → chunk-J2KSG754.js} +10 -8
- package/dist/chunk-J2KSG754.js.map +1 -0
- package/dist/{chunk-AP4FLCLA.js → chunk-J54WH74M.js} +4 -4
- package/dist/{chunk-5HOJSVQH.js → chunk-JB7JE4QZ.js} +2 -2
- package/dist/{chunk-QJJUTBKZ.js → chunk-KQ74QU55.js} +2 -2
- package/dist/chunk-KU6VHNRV.js +68 -0
- package/dist/chunk-KU6VHNRV.js.map +1 -0
- package/dist/chunk-KVEHH4SA.js +85 -0
- package/dist/chunk-KVEHH4SA.js.map +1 -0
- package/dist/{chunk-YLDS5FOQ.js → chunk-KZSKI2R3.js} +2 -2
- package/dist/{chunk-IIOEQRXX.js → chunk-LAHDFBDE.js} +2 -2
- package/dist/{chunk-BUDXR3EV.js → chunk-LKVIZNUM.js} +5 -5
- package/dist/{chunk-OAXAF4VY.js → chunk-LMJBINWN.js} +12 -12
- package/dist/{chunk-SFAP5EH5.js → chunk-LUMF63BM.js} +4 -4
- package/dist/{chunk-KADJNWTQ.js → chunk-LZRURORY.js} +3 -3
- package/dist/{chunk-CLNTJM3F.js → chunk-M7OHXNLF.js} +2 -2
- package/dist/{chunk-UXQW6ZIN.js → chunk-MBYO2F4Y.js} +5 -5
- package/dist/{chunk-ZHEJLUCX.js → chunk-MHV5Y5MR.js} +30 -17
- package/dist/chunk-MHV5Y5MR.js.map +1 -0
- package/dist/{chunk-MCRIT46W.js → chunk-MY5VNNSP.js} +4 -4
- package/dist/{chunk-XELVDPKL.js → chunk-NFAKRI4S.js} +4 -4
- package/dist/{chunk-KSF7TLXH.js → chunk-NHSMLVNC.js} +6 -6
- package/dist/{chunk-ES2RN7YV.js → chunk-NRUYYGDZ.js} +2 -2
- package/dist/{chunk-ZGEBIC5X.js → chunk-OLVZ6TOV.js} +13 -9
- package/dist/chunk-OLVZ6TOV.js.map +1 -0
- package/dist/{chunk-MQUU2XZB.js → chunk-OQFSYMHJ.js} +2 -2
- package/dist/{chunk-M3RIC6JI.js → chunk-OQXOYHIV.js} +4 -4
- package/dist/{chunk-PC3ZFERM.js → chunk-PC5FFEIY.js} +2 -2
- package/dist/{chunk-SOHDPFOB.js → chunk-PHCSPHDH.js} +2 -2
- package/dist/{chunk-OZWQNFG6.js → chunk-PODGTNXS.js} +3 -3
- package/dist/{chunk-IPE5FFFD.js → chunk-PUBPZOQJ.js} +2 -2
- package/dist/{chunk-GBFGZJB5.js → chunk-Q4NOI2CR.js} +5 -5
- package/dist/{chunk-IRDGC7FK.js → chunk-QZWKC3AP.js} +13 -7
- package/dist/chunk-QZWKC3AP.js.map +1 -0
- package/dist/{chunk-GOWBYHYW.js → chunk-R6SBP5M5.js} +4 -4
- package/dist/{chunk-DTKMBI7B.js → chunk-R7MX5KPJ.js} +4 -4
- package/dist/{chunk-NECUCG2S.js → chunk-RQDN4BN5.js} +14 -14
- package/dist/{chunk-5SYD23V4.js → chunk-SKZHOWTS.js} +4 -4
- package/dist/{chunk-Y6KPZQPI.js → chunk-SOCKK67R.js} +4 -4
- package/dist/{chunk-GCJLMX63.js → chunk-VCTKJHXD.js} +2 -2
- package/dist/{chunk-QZPNQWS2.js → chunk-VEFDL77X.js} +2 -2
- package/dist/{chunk-WEH5TCPE.js → chunk-VJFH2AXT.js} +8 -8
- package/dist/{chunk-S7HRED4D.js → chunk-VLHGBFR6.js} +3 -3
- package/dist/{chunk-RLC46NIW.js → chunk-VMNSGE2G.js} +3 -1
- package/dist/chunk-VMNSGE2G.js.map +1 -0
- package/dist/{chunk-HP2ODXNA.js → chunk-VR5HDUBK.js} +2 -2
- package/dist/{chunk-RBGOGTT2.js → chunk-W2UTDN4T.js} +4 -4
- package/dist/{chunk-N4WANJI3.js → chunk-WBVHRLIS.js} +4 -4
- package/dist/{chunk-XXJRT6BP.js → chunk-WMALDOF5.js} +4 -4
- package/dist/{chunk-MHFJBNDP.js → chunk-WO52KYSU.js} +8 -8
- package/dist/{chunk-ZBOFBRZC.js → chunk-WX7VWW3W.js} +2 -2
- package/dist/{chunk-J4W4TQPC.js → chunk-X24P3ZYW.js} +6 -6
- package/dist/{chunk-X2J6MRJW.js → chunk-YFHIESMD.js} +2 -2
- package/dist/{chunk-72NOM3O2.js → chunk-YK2PETUP.js} +2 -2
- package/dist/{chunk-CRNQVWIT.js → chunk-Z4GWXTZV.js} +4 -4
- package/dist/{chunk-SG6VULKS.js → chunk-ZEBJT5JZ.js} +3 -3
- package/dist/chunk-ZEG2LNBY.js +68 -0
- package/dist/chunk-ZEG2LNBY.js.map +1 -0
- package/dist/{chunk-JZKOJZ6V.js → chunk-ZOW2CCMO.js} +26 -25
- package/dist/chunk-ZOW2CCMO.js.map +1 -0
- package/dist/{chunk-3HWL4AW4.js → chunk-ZTF5C2GA.js} +22 -10
- package/dist/chunk-ZTF5C2GA.js.map +1 -0
- package/dist/data-display/AsyncStateContainer.js +8 -7
- package/dist/data-display/Avatar.js +8 -2
- package/dist/data-display/Badge.js +12 -6
- package/dist/data-display/CardKit.js +7 -7
- package/dist/data-display/Carousel.js +2 -2
- package/dist/data-display/Chart.js +11 -11
- package/dist/data-display/Chip.js +4 -2
- package/dist/data-display/DataGrid.js +3 -3
- package/dist/data-display/DataViews.js +66 -65
- package/dist/data-display/EmptyState.js +2 -2
- package/dist/data-display/HoverCard.js +3 -3
- package/dist/data-display/LazyImage.js +6 -4
- package/dist/data-display/Lightbox.js +5 -5
- package/dist/data-display/LoadingState.js +5 -4
- package/dist/data-display/MapPreview.js +4 -4
- package/dist/data-display/Progress.js +8 -3
- package/dist/data-display/SectionOnboarding.js +3 -3
- package/dist/data-display/Sheet.js +2 -2
- package/dist/data-display/StatCard.js +6 -4
- package/dist/data-display/Table.js +3 -3
- package/dist/feedback/ConfirmAction.js +6 -6
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/form/AddressAutocomplete.js +7 -7
- package/dist/form/Autocomplete.js +2 -2
- package/dist/form/Button.js +2 -2
- package/dist/form/Calendar.js +4 -4
- package/dist/form/CategorySelect.js +10 -10
- package/dist/form/CepField.js +3 -3
- package/dist/form/CodeEditor.js +3 -3
- package/dist/form/DateRangePicker.js +7 -7
- package/dist/form/Input.js +2 -2
- package/dist/form/Menubar.js +2 -2
- package/dist/form/RichTextEditor.js +2 -2
- package/dist/form/total-form.js +30 -30
- package/dist/icons.js +2 -2
- package/dist/layout/ContentToolbar.js +10 -10
- package/dist/layout/ScrollArea.js +2 -2
- package/dist/layout/SettingsLayout.js +6 -6
- package/dist/layout/Skeleton.js +5 -3
- package/dist/native/chunks/{chunk-V4DQTC5L.js → chunk-HSIND52T.js} +3 -2
- package/dist/native/chunks/chunk-HSIND52T.js.map +1 -0
- package/dist/native/chunks/chunk-MLQIOKQZ.js +30 -0
- package/dist/native/chunks/chunk-MLQIOKQZ.js.map +1 -0
- package/dist/native/chunks/{chunk-YQGNMAJN.js → chunk-Q52IDAF2.js} +6 -4
- package/dist/native/chunks/chunk-Q52IDAF2.js.map +1 -0
- package/dist/native/data-display/Alert.js +7 -7
- package/dist/native/data-display/Avatar.js +451 -0
- package/dist/native/data-display/Avatar.js.map +1 -0
- package/dist/native/data-display/Badge.js +418 -0
- package/dist/native/data-display/Badge.js.map +1 -0
- package/dist/native/data-display/Chip.js +374 -0
- package/dist/native/data-display/Chip.js.map +1 -0
- package/dist/native/data-display/EmptyState.js +9 -9
- package/dist/native/data-display/ErrorState.js +9 -9
- package/dist/native/data-display/LoadingState.js +4 -4
- package/dist/native/data-display/Progress.js +432 -0
- package/dist/native/data-display/Progress.js.map +1 -0
- package/dist/native/icons.js +2 -2
- package/dist/native/layout/Skeleton.js +214 -0
- package/dist/native/layout/Skeleton.js.map +1 -0
- package/dist/navigation/AppHeader.js +9 -9
- package/dist/navigation/NavigationMenu.js +4 -4
- package/dist/navigation/Pagination.js +2 -2
- package/dist/navigation/Tabs.js +2 -2
- package/dist/social-login-button.js +3 -3
- package/dist/types/components/data-display/Avatar/Avatar.base.d.ts +87 -0
- package/dist/types/components/data-display/Avatar/Avatar.base.d.ts.map +1 -0
- package/dist/types/components/data-display/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/data-display/Avatar/Avatar.helpers.d.ts +37 -0
- package/dist/types/components/data-display/Avatar/Avatar.helpers.d.ts.map +1 -0
- package/dist/types/components/data-display/Avatar/Avatar.metrics.d.ts +113 -0
- package/dist/types/components/data-display/Avatar/Avatar.metrics.d.ts.map +1 -0
- package/dist/types/components/data-display/Avatar/Avatar.types.d.ts +4 -68
- package/dist/types/components/data-display/Avatar/Avatar.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Avatar/Avatar.view.d.ts +2 -2
- package/dist/types/components/data-display/Avatar/Avatar.view.d.ts.map +1 -1
- package/dist/types/components/data-display/Avatar/index.d.ts +1 -1
- package/dist/types/components/data-display/Avatar/index.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/Badge.animations.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/Badge.base.d.ts +101 -0
- package/dist/types/components/data-display/Badge/Badge.base.d.ts.map +1 -0
- package/dist/types/components/data-display/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/Badge.helpers.d.ts +10 -4
- package/dist/types/components/data-display/Badge/Badge.helpers.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/Badge.metrics.d.ts +111 -0
- package/dist/types/components/data-display/Badge/Badge.metrics.d.ts.map +1 -0
- package/dist/types/components/data-display/Badge/Badge.styles.d.ts +1 -4
- package/dist/types/components/data-display/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/Badge.types.d.ts +4 -81
- package/dist/types/components/data-display/Badge/Badge.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/Badge.variants.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/BadgeContent.d.ts.map +1 -1
- package/dist/types/components/data-display/Badge/index.d.ts +1 -1
- package/dist/types/components/data-display/Badge/index.d.ts.map +1 -1
- package/dist/types/components/data-display/Chip/Chip.base.d.ts +81 -0
- package/dist/types/components/data-display/Chip/Chip.base.d.ts.map +1 -0
- package/dist/types/components/data-display/Chip/Chip.d.ts.map +1 -1
- package/dist/types/components/data-display/Chip/Chip.helpers.d.ts +14 -28
- package/dist/types/components/data-display/Chip/Chip.helpers.d.ts.map +1 -1
- package/dist/types/components/data-display/Chip/Chip.metrics.d.ts +61 -0
- package/dist/types/components/data-display/Chip/Chip.metrics.d.ts.map +1 -0
- package/dist/types/components/data-display/Chip/Chip.styles.d.ts +30 -0
- package/dist/types/components/data-display/Chip/Chip.styles.d.ts.map +1 -0
- package/dist/types/components/data-display/Chip/Chip.types.d.ts +4 -67
- package/dist/types/components/data-display/Chip/Chip.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Chip/index.d.ts +1 -1
- package/dist/types/components/data-display/Chip/index.d.ts.map +1 -1
- package/dist/types/components/data-display/Progress/Progress.base.d.ts +72 -0
- package/dist/types/components/data-display/Progress/Progress.base.d.ts.map +1 -0
- package/dist/types/components/data-display/Progress/Progress.d.ts.map +1 -1
- package/dist/types/components/data-display/Progress/Progress.helpers.d.ts +15 -3
- package/dist/types/components/data-display/Progress/Progress.helpers.d.ts.map +1 -1
- package/dist/types/components/data-display/Progress/Progress.metrics.d.ts +91 -0
- package/dist/types/components/data-display/Progress/Progress.metrics.d.ts.map +1 -0
- package/dist/types/components/data-display/Progress/Progress.styles.d.ts.map +1 -1
- package/dist/types/components/data-display/Progress/Progress.types.d.ts +4 -48
- package/dist/types/components/data-display/Progress/Progress.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Progress/index.d.ts +1 -1
- package/dist/types/components/data-display/Progress/index.d.ts.map +1 -1
- package/dist/types/components/layout/Skeleton/Skeleton.base.d.ts +37 -0
- package/dist/types/components/layout/Skeleton/Skeleton.base.d.ts.map +1 -0
- package/dist/types/components/layout/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/types/components/layout/Skeleton/Skeleton.helpers.d.ts +13 -3
- package/dist/types/components/layout/Skeleton/Skeleton.helpers.d.ts.map +1 -1
- package/dist/types/components/layout/Skeleton/Skeleton.metrics.d.ts +68 -0
- package/dist/types/components/layout/Skeleton/Skeleton.metrics.d.ts.map +1 -0
- package/dist/types/components/layout/Skeleton/Skeleton.styles.d.ts +1 -1
- package/dist/types/components/layout/Skeleton/Skeleton.styles.d.ts.map +1 -1
- package/dist/types/components/layout/Skeleton/Skeleton.types.d.ts +5 -15
- package/dist/types/components/layout/Skeleton/Skeleton.types.d.ts.map +1 -1
- package/dist/types/components/layout/Skeleton/index.d.ts +1 -1
- package/dist/types/components/layout/Skeleton/index.d.ts.map +1 -1
- package/dist/types/icons/paths.generated.d.ts +2 -0
- package/dist/types/icons/paths.generated.d.ts.map +1 -1
- package/dist/types/platform/animation.d.ts +14 -0
- package/dist/types/platform/animation.d.ts.map +1 -0
- package/dist/types/platform/web-keys.d.ts +25 -0
- package/dist/types/platform/web-keys.d.ts.map +1 -0
- package/dist/types/tokens/mui-type.d.ts +1 -1
- package/dist/types/tokens/mui-type.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Avatar/Avatar.base.d.ts +87 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.base.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.helpers.d.ts +37 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.helpers.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.look.native.d.ts +25 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.look.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.metrics.d.ts +113 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.metrics.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.native.d.ts +19 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.parts.native.d.ts +69 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.parts.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.types.native.d.ts +24 -0
- package/dist/types-native/components/data-display/Avatar/Avatar.types.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Avatar/index.native.d.ts +3 -0
- package/dist/types-native/components/data-display/Avatar/index.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/Badge.base.d.ts +101 -0
- package/dist/types-native/components/data-display/Badge/Badge.base.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/Badge.helpers.d.ts +19 -0
- package/dist/types-native/components/data-display/Badge/Badge.helpers.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/Badge.look.native.d.ts +31 -0
- package/dist/types-native/components/data-display/Badge/Badge.look.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/Badge.metrics.d.ts +111 -0
- package/dist/types-native/components/data-display/Badge/Badge.metrics.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/Badge.native.d.ts +10 -0
- package/dist/types-native/components/data-display/Badge/Badge.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/Badge.types.native.d.ts +8 -0
- package/dist/types-native/components/data-display/Badge/Badge.types.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/BadgeContent.native.d.ts +20 -0
- package/dist/types-native/components/data-display/Badge/BadgeContent.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Badge/index.native.d.ts +3 -0
- package/dist/types-native/components/data-display/Badge/index.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Chip/Chip.base.d.ts +81 -0
- package/dist/types-native/components/data-display/Chip/Chip.base.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Chip/Chip.helpers.d.ts +22 -0
- package/dist/types-native/components/data-display/Chip/Chip.helpers.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Chip/Chip.look.native.d.ts +29 -0
- package/dist/types-native/components/data-display/Chip/Chip.look.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts +61 -0
- package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Chip/Chip.native.d.ts +11 -0
- package/dist/types-native/components/data-display/Chip/Chip.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Chip/Chip.types.native.d.ts +20 -0
- package/dist/types-native/components/data-display/Chip/Chip.types.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Chip/index.native.d.ts +3 -0
- package/dist/types-native/components/data-display/Chip/index.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Progress/Progress.base.d.ts +72 -0
- package/dist/types-native/components/data-display/Progress/Progress.base.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Progress/Progress.helpers.d.ts +18 -0
- package/dist/types-native/components/data-display/Progress/Progress.helpers.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Progress/Progress.look.native.d.ts +28 -0
- package/dist/types-native/components/data-display/Progress/Progress.look.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Progress/Progress.metrics.d.ts +91 -0
- package/dist/types-native/components/data-display/Progress/Progress.metrics.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Progress/Progress.native.d.ts +10 -0
- package/dist/types-native/components/data-display/Progress/Progress.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Progress/Progress.types.native.d.ts +8 -0
- package/dist/types-native/components/data-display/Progress/Progress.types.native.d.ts.map +1 -0
- package/dist/types-native/components/data-display/Progress/index.native.d.ts +3 -0
- package/dist/types-native/components/data-display/Progress/index.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.base.d.ts +37 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.base.d.ts.map +1 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.helpers.d.ts +16 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.helpers.d.ts.map +1 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.metrics.d.ts +68 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.metrics.d.ts.map +1 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.native.d.ts +38 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.types.native.d.ts +8 -0
- package/dist/types-native/components/layout/Skeleton/Skeleton.types.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Skeleton/index.native.d.ts +3 -0
- package/dist/types-native/components/layout/Skeleton/index.native.d.ts.map +1 -0
- package/dist/types-native/icons/paths.generated.d.ts +2 -0
- package/dist/types-native/icons/paths.generated.d.ts.map +1 -1
- package/dist/types-native/platform/animation.d.ts +14 -0
- package/dist/types-native/platform/animation.d.ts.map +1 -0
- package/dist/types-native/platform/web-keys.d.ts +25 -0
- package/dist/types-native/platform/web-keys.d.ts.map +1 -0
- package/dist/types-native/tokens/mui-type.d.ts +1 -1
- package/dist/types-native/tokens/mui-type.d.ts.map +1 -1
- package/dist/user-avatar.js +7 -5
- package/dist/utility/InstallPrompt.js +2 -2
- package/package.json +21 -1
- package/src/components/data-display/Avatar/Avatar.base.ts +108 -0
- package/src/components/data-display/Avatar/Avatar.helpers.ts +54 -0
- package/src/components/data-display/Avatar/Avatar.look.native.ts +123 -0
- package/src/components/data-display/Avatar/Avatar.metrics.ts +111 -0
- package/src/components/data-display/Avatar/Avatar.native.tsx +190 -0
- package/src/components/data-display/Avatar/Avatar.parts.native.tsx +243 -0
- package/src/components/data-display/Avatar/Avatar.tsx +34 -36
- package/src/components/data-display/Avatar/Avatar.types.native.ts +39 -0
- package/src/components/data-display/Avatar/Avatar.types.ts +12 -81
- package/src/components/data-display/Avatar/Avatar.view.tsx +61 -41
- package/src/components/data-display/Avatar/NATIVE-NOTES.md +11 -0
- package/src/components/data-display/Avatar/index.native.ts +10 -0
- package/src/components/data-display/Avatar/index.ts +8 -1
- package/src/components/data-display/Badge/Badge.animations.ts +11 -9
- package/src/components/data-display/Badge/Badge.base.ts +138 -0
- package/src/components/data-display/Badge/Badge.helpers.ts +18 -7
- package/src/components/data-display/Badge/Badge.look.native.ts +174 -0
- package/src/components/data-display/Badge/Badge.metrics.ts +116 -0
- package/src/components/data-display/Badge/Badge.native.tsx +212 -0
- package/src/components/data-display/Badge/Badge.styles.ts +63 -74
- package/src/components/data-display/Badge/Badge.tsx +12 -6
- package/src/components/data-display/Badge/Badge.types.native.ts +16 -0
- package/src/components/data-display/Badge/Badge.types.ts +27 -113
- package/src/components/data-display/Badge/Badge.variants.ts +20 -9
- package/src/components/data-display/Badge/BadgeContent.native.tsx +78 -0
- package/src/components/data-display/Badge/BadgeContent.tsx +8 -8
- package/src/components/data-display/Badge/NATIVE-NOTES.md +11 -0
- package/src/components/data-display/Badge/index.native.ts +8 -0
- package/src/components/data-display/Badge/index.ts +7 -1
- package/src/components/data-display/Chip/Chip.base.ts +99 -0
- package/src/components/data-display/Chip/Chip.helpers.ts +49 -0
- package/src/components/data-display/Chip/Chip.look.native.ts +163 -0
- package/src/components/data-display/Chip/Chip.metrics.ts +102 -0
- package/src/components/data-display/Chip/Chip.native.tsx +269 -0
- package/src/components/data-display/Chip/{Chip.helpers.tsx → Chip.styles.tsx} +23 -51
- package/src/components/data-display/Chip/Chip.tsx +10 -11
- package/src/components/data-display/Chip/Chip.types.native.ts +28 -0
- package/src/components/data-display/Chip/Chip.types.ts +5 -84
- package/src/components/data-display/Chip/NATIVE-NOTES.md +10 -0
- package/src/components/data-display/Chip/chip.md +1 -1
- package/src/components/data-display/Chip/index.native.ts +8 -0
- package/src/components/data-display/Chip/index.ts +1 -1
- package/src/components/data-display/Progress/NATIVE-NOTES.md +10 -0
- package/src/components/data-display/Progress/Progress.base.ts +86 -0
- package/src/components/data-display/Progress/Progress.helpers.ts +29 -8
- package/src/components/data-display/Progress/Progress.look.native.ts +111 -0
- package/src/components/data-display/Progress/Progress.metrics.ts +101 -0
- package/src/components/data-display/Progress/Progress.native.tsx +387 -0
- package/src/components/data-display/Progress/Progress.styles.ts +31 -17
- package/src/components/data-display/Progress/Progress.tsx +7 -6
- package/src/components/data-display/Progress/Progress.types.native.ts +11 -0
- package/src/components/data-display/Progress/Progress.types.ts +6 -58
- package/src/components/data-display/Progress/index.native.ts +7 -0
- package/src/components/data-display/Progress/index.ts +6 -1
- package/src/components/layout/Skeleton/NATIVE-NOTES.md +8 -0
- package/src/components/layout/Skeleton/Skeleton.base.ts +37 -0
- package/src/components/layout/Skeleton/Skeleton.helpers.ts +24 -8
- package/src/components/layout/Skeleton/Skeleton.metrics.ts +81 -0
- package/src/components/layout/Skeleton/Skeleton.native.tsx +271 -0
- package/src/components/layout/Skeleton/Skeleton.styles.ts +25 -25
- package/src/components/layout/Skeleton/Skeleton.tsx +9 -5
- package/src/components/layout/Skeleton/Skeleton.types.native.ts +16 -0
- package/src/components/layout/Skeleton/Skeleton.types.ts +13 -16
- package/src/components/layout/Skeleton/index.native.ts +8 -0
- package/src/components/layout/Skeleton/index.ts +7 -1
- package/src/icons/glyphs.json +2 -0
- package/src/icons/paths.generated.ts +2 -0
- package/src/platform/animation.ts +53 -0
- package/src/platform/web-keys.ts +28 -0
- package/src/tokens/mui-type.ts +2 -1
- package/dist/chunk-3HWL4AW4.js.map +0 -1
- package/dist/chunk-4Q7HWRR2.js.map +0 -1
- package/dist/chunk-FS4X3VDA.js +0 -78
- package/dist/chunk-FS4X3VDA.js.map +0 -1
- package/dist/chunk-HAFE43QJ.js.map +0 -1
- package/dist/chunk-HKFMPEXJ.js.map +0 -1
- package/dist/chunk-HXYXDQ7U.js.map +0 -1
- package/dist/chunk-IRDGC7FK.js.map +0 -1
- package/dist/chunk-JZKOJZ6V.js.map +0 -1
- package/dist/chunk-KPQAPQH6.js.map +0 -1
- package/dist/chunk-L6KEVPXN.js.map +0 -1
- package/dist/chunk-LYNJJV2X.js.map +0 -1
- package/dist/chunk-MMZAGB64.js.map +0 -1
- package/dist/chunk-NQHOHQCY.js.map +0 -1
- package/dist/chunk-QIV73V2X.js.map +0 -1
- package/dist/chunk-RLC46NIW.js.map +0 -1
- package/dist/chunk-ZGEBIC5X.js.map +0 -1
- package/dist/chunk-ZHEJLUCX.js.map +0 -1
- package/dist/native/chunks/chunk-V4DQTC5L.js.map +0 -1
- package/dist/native/chunks/chunk-YQGNMAJN.js.map +0 -1
- /package/dist/{chunk-P7FQUGED.js.map → chunk-23FCBIUN.js.map} +0 -0
- /package/dist/{chunk-SL4NFGOL.js.map → chunk-24BUCMQA.js.map} +0 -0
- /package/dist/{chunk-4SXZSSVV.js.map → chunk-2EKALM6P.js.map} +0 -0
- /package/dist/{chunk-ZRFRU545.js.map → chunk-2ZDTGI5V.js.map} +0 -0
- /package/dist/{chunk-HR7YTBR7.js.map → chunk-3AOOI2NR.js.map} +0 -0
- /package/dist/{chunk-KKYW3LU7.js.map → chunk-47UD6DZ4.js.map} +0 -0
- /package/dist/{chunk-ZOUWHGV3.js.map → chunk-4MGFUPQT.js.map} +0 -0
- /package/dist/{chunk-4FRZDSRD.js.map → chunk-4WK2RTVY.js.map} +0 -0
- /package/dist/{chunk-LDE4ELB5.js.map → chunk-5ZF3VASA.js.map} +0 -0
- /package/dist/{chunk-JE6RZ5L6.js.map → chunk-5ZOJLYD2.js.map} +0 -0
- /package/dist/{chunk-E5ZHW4I5.js.map → chunk-6IUTT6BK.js.map} +0 -0
- /package/dist/{chunk-WPR2HS5B.js.map → chunk-74EZ565M.js.map} +0 -0
- /package/dist/{chunk-BVZVH3ZN.js.map → chunk-74OZ5KVR.js.map} +0 -0
- /package/dist/{chunk-PMS3H3OO.js.map → chunk-76GZ55IC.js.map} +0 -0
- /package/dist/{chunk-DLFOEXUP.js.map → chunk-7EESF76V.js.map} +0 -0
- /package/dist/{chunk-HKZHEK3Z.js.map → chunk-7JWXLDRH.js.map} +0 -0
- /package/dist/{chunk-OR7UH2ZQ.js.map → chunk-7P2HZLEG.js.map} +0 -0
- /package/dist/{chunk-6DXYCXH4.js.map → chunk-7RZ4WOQW.js.map} +0 -0
- /package/dist/{chunk-EMNGIYH6.js.map → chunk-7TZ6OC5T.js.map} +0 -0
- /package/dist/{chunk-CDJPDZCA.js.map → chunk-AEGX66N7.js.map} +0 -0
- /package/dist/{chunk-65DLYC4S.js.map → chunk-AVGTTWTE.js.map} +0 -0
- /package/dist/{chunk-C6XESZ3R.js.map → chunk-B2A4DG77.js.map} +0 -0
- /package/dist/{chunk-VOOPGAQO.js.map → chunk-B7BZAIHL.js.map} +0 -0
- /package/dist/{chunk-DZN3JF5E.js.map → chunk-BBC4KT5G.js.map} +0 -0
- /package/dist/{chunk-FWCUELBU.js.map → chunk-BILE3A7F.js.map} +0 -0
- /package/dist/{chunk-UEJQQVP2.js.map → chunk-BLT5ZBVL.js.map} +0 -0
- /package/dist/{chunk-ISSJNFJV.js.map → chunk-C52BELLW.js.map} +0 -0
- /package/dist/{chunk-BPYPUEM5.js.map → chunk-CZJLWCEG.js.map} +0 -0
- /package/dist/{chunk-WZUNBSS7.js.map → chunk-DVUPIVI2.js.map} +0 -0
- /package/dist/{chunk-EXJBPKGW.js.map → chunk-EGRFMPGD.js.map} +0 -0
- /package/dist/{chunk-XFUNJYFT.js.map → chunk-EPNUVSNK.js.map} +0 -0
- /package/dist/{chunk-H2EQVMU3.js.map → chunk-EX3PSZLV.js.map} +0 -0
- /package/dist/{chunk-LIOVN5IM.js.map → chunk-F2DOTCF3.js.map} +0 -0
- /package/dist/{chunk-64IEKEMQ.js.map → chunk-FGLV6BXQ.js.map} +0 -0
- /package/dist/{chunk-L65LF6LN.js.map → chunk-FP4R47TM.js.map} +0 -0
- /package/dist/{chunk-7AR2R7TV.js.map → chunk-G5ZVD5IJ.js.map} +0 -0
- /package/dist/{chunk-SHQWIDD5.js.map → chunk-GJQYM3PM.js.map} +0 -0
- /package/dist/{chunk-7WL24VNI.js.map → chunk-HDNK7BAX.js.map} +0 -0
- /package/dist/{chunk-X5MPHXG5.js.map → chunk-HEG7JIBM.js.map} +0 -0
- /package/dist/{chunk-ZIOCRSHU.js.map → chunk-HSAH5QUQ.js.map} +0 -0
- /package/dist/{chunk-B443IIQG.js.map → chunk-IE7ISTLQ.js.map} +0 -0
- /package/dist/{chunk-NFHS77NE.js.map → chunk-IH4CX43Q.js.map} +0 -0
- /package/dist/{chunk-72UYVJBQ.js.map → chunk-IJIT5HQP.js.map} +0 -0
- /package/dist/{chunk-AP4FLCLA.js.map → chunk-J54WH74M.js.map} +0 -0
- /package/dist/{chunk-5HOJSVQH.js.map → chunk-JB7JE4QZ.js.map} +0 -0
- /package/dist/{chunk-QJJUTBKZ.js.map → chunk-KQ74QU55.js.map} +0 -0
- /package/dist/{chunk-YLDS5FOQ.js.map → chunk-KZSKI2R3.js.map} +0 -0
- /package/dist/{chunk-IIOEQRXX.js.map → chunk-LAHDFBDE.js.map} +0 -0
- /package/dist/{chunk-BUDXR3EV.js.map → chunk-LKVIZNUM.js.map} +0 -0
- /package/dist/{chunk-OAXAF4VY.js.map → chunk-LMJBINWN.js.map} +0 -0
- /package/dist/{chunk-SFAP5EH5.js.map → chunk-LUMF63BM.js.map} +0 -0
- /package/dist/{chunk-KADJNWTQ.js.map → chunk-LZRURORY.js.map} +0 -0
- /package/dist/{chunk-CLNTJM3F.js.map → chunk-M7OHXNLF.js.map} +0 -0
- /package/dist/{chunk-UXQW6ZIN.js.map → chunk-MBYO2F4Y.js.map} +0 -0
- /package/dist/{chunk-MCRIT46W.js.map → chunk-MY5VNNSP.js.map} +0 -0
- /package/dist/{chunk-XELVDPKL.js.map → chunk-NFAKRI4S.js.map} +0 -0
- /package/dist/{chunk-KSF7TLXH.js.map → chunk-NHSMLVNC.js.map} +0 -0
- /package/dist/{chunk-ES2RN7YV.js.map → chunk-NRUYYGDZ.js.map} +0 -0
- /package/dist/{chunk-MQUU2XZB.js.map → chunk-OQFSYMHJ.js.map} +0 -0
- /package/dist/{chunk-M3RIC6JI.js.map → chunk-OQXOYHIV.js.map} +0 -0
- /package/dist/{chunk-PC3ZFERM.js.map → chunk-PC5FFEIY.js.map} +0 -0
- /package/dist/{chunk-SOHDPFOB.js.map → chunk-PHCSPHDH.js.map} +0 -0
- /package/dist/{chunk-OZWQNFG6.js.map → chunk-PODGTNXS.js.map} +0 -0
- /package/dist/{chunk-IPE5FFFD.js.map → chunk-PUBPZOQJ.js.map} +0 -0
- /package/dist/{chunk-GBFGZJB5.js.map → chunk-Q4NOI2CR.js.map} +0 -0
- /package/dist/{chunk-GOWBYHYW.js.map → chunk-R6SBP5M5.js.map} +0 -0
- /package/dist/{chunk-DTKMBI7B.js.map → chunk-R7MX5KPJ.js.map} +0 -0
- /package/dist/{chunk-NECUCG2S.js.map → chunk-RQDN4BN5.js.map} +0 -0
- /package/dist/{chunk-5SYD23V4.js.map → chunk-SKZHOWTS.js.map} +0 -0
- /package/dist/{chunk-Y6KPZQPI.js.map → chunk-SOCKK67R.js.map} +0 -0
- /package/dist/{chunk-GCJLMX63.js.map → chunk-VCTKJHXD.js.map} +0 -0
- /package/dist/{chunk-QZPNQWS2.js.map → chunk-VEFDL77X.js.map} +0 -0
- /package/dist/{chunk-WEH5TCPE.js.map → chunk-VJFH2AXT.js.map} +0 -0
- /package/dist/{chunk-S7HRED4D.js.map → chunk-VLHGBFR6.js.map} +0 -0
- /package/dist/{chunk-HP2ODXNA.js.map → chunk-VR5HDUBK.js.map} +0 -0
- /package/dist/{chunk-RBGOGTT2.js.map → chunk-W2UTDN4T.js.map} +0 -0
- /package/dist/{chunk-N4WANJI3.js.map → chunk-WBVHRLIS.js.map} +0 -0
- /package/dist/{chunk-XXJRT6BP.js.map → chunk-WMALDOF5.js.map} +0 -0
- /package/dist/{chunk-MHFJBNDP.js.map → chunk-WO52KYSU.js.map} +0 -0
- /package/dist/{chunk-ZBOFBRZC.js.map → chunk-WX7VWW3W.js.map} +0 -0
- /package/dist/{chunk-J4W4TQPC.js.map → chunk-X24P3ZYW.js.map} +0 -0
- /package/dist/{chunk-X2J6MRJW.js.map → chunk-YFHIESMD.js.map} +0 -0
- /package/dist/{chunk-72NOM3O2.js.map → chunk-YK2PETUP.js.map} +0 -0
- /package/dist/{chunk-CRNQVWIT.js.map → chunk-Z4GWXTZV.js.map} +0 -0
- /package/dist/{chunk-SG6VULKS.js.map → chunk-ZEBJT5JZ.js.map} +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ChipSize } from './Chip.base';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* THE NUMBERS BOTH `Chip` RENDERERS DRAW WITH.
|
|
5
|
+
*
|
|
6
|
+
* Most of them are MUI's own `Chip` geometry rather than anything this package
|
|
7
|
+
* writes — the 32px pill, the 13px label, the 5px/-6px icon tuck — because the
|
|
8
|
+
* web half hands the drawing to `MuiChip` and the native half has to draw it.
|
|
9
|
+
* Restated here once, read by both, so the two cannot disagree about a chip's
|
|
10
|
+
* height. What THIS package adds (`Chip.styles.tsx`'s hover lift, its shadow
|
|
11
|
+
* and its transition) is at the bottom, and the web derives its CSS from it.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** MUI draws two chip sizes; ours are the house abbreviations for them. */
|
|
15
|
+
export type ChipMuiSize = 'small' | 'medium';
|
|
16
|
+
|
|
17
|
+
export const chipMuiSize = (size: ChipSize): ChipMuiSize =>
|
|
18
|
+
size === 'xs' || size === 'sm' ? 'small' : 'medium';
|
|
19
|
+
|
|
20
|
+
export interface ChipSizeMetrics {
|
|
21
|
+
height: number;
|
|
22
|
+
/** The label's own side padding, filled and outlined (outlined is 1px tighter). */
|
|
23
|
+
labelPadding: number;
|
|
24
|
+
labelPaddingOutlined: number;
|
|
25
|
+
/** The leading icon's box, and how far it tucks under the label. */
|
|
26
|
+
iconSize: number;
|
|
27
|
+
iconMarginLeft: number;
|
|
28
|
+
iconMarginLeftOutlined: number;
|
|
29
|
+
iconMarginRight: number;
|
|
30
|
+
/** The avatar's round box and the type inside it. */
|
|
31
|
+
avatarSize: number;
|
|
32
|
+
avatarFontSize: number;
|
|
33
|
+
avatarMarginLeft: number;
|
|
34
|
+
avatarMarginLeftOutlined: number;
|
|
35
|
+
avatarMarginRight: number;
|
|
36
|
+
/** The delete glyph's box and its own tuck. */
|
|
37
|
+
deleteSize: number;
|
|
38
|
+
deleteMarginLeft: number;
|
|
39
|
+
deleteMarginRight: number;
|
|
40
|
+
deleteMarginRightOutlined: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const CHIP_SIZES: Record<ChipMuiSize, ChipSizeMetrics> = {
|
|
44
|
+
medium: {
|
|
45
|
+
height: 32,
|
|
46
|
+
labelPadding: 12,
|
|
47
|
+
labelPaddingOutlined: 11,
|
|
48
|
+
iconSize: 24,
|
|
49
|
+
iconMarginLeft: 5,
|
|
50
|
+
iconMarginLeftOutlined: 4,
|
|
51
|
+
iconMarginRight: -6,
|
|
52
|
+
avatarSize: 24,
|
|
53
|
+
avatarFontSize: 12,
|
|
54
|
+
avatarMarginLeft: 5,
|
|
55
|
+
avatarMarginLeftOutlined: 4,
|
|
56
|
+
avatarMarginRight: -6,
|
|
57
|
+
deleteSize: 22,
|
|
58
|
+
deleteMarginLeft: -6,
|
|
59
|
+
deleteMarginRight: 5,
|
|
60
|
+
deleteMarginRightOutlined: 5,
|
|
61
|
+
},
|
|
62
|
+
small: {
|
|
63
|
+
height: 24,
|
|
64
|
+
labelPadding: 8,
|
|
65
|
+
labelPaddingOutlined: 7,
|
|
66
|
+
iconSize: 18,
|
|
67
|
+
iconMarginLeft: 4,
|
|
68
|
+
iconMarginLeftOutlined: 2,
|
|
69
|
+
iconMarginRight: -4,
|
|
70
|
+
avatarSize: 18,
|
|
71
|
+
avatarFontSize: 10,
|
|
72
|
+
avatarMarginLeft: 4,
|
|
73
|
+
avatarMarginLeftOutlined: 2,
|
|
74
|
+
avatarMarginRight: -4,
|
|
75
|
+
deleteSize: 16,
|
|
76
|
+
deleteMarginLeft: -4,
|
|
77
|
+
deleteMarginRight: 4,
|
|
78
|
+
deleteMarginRightOutlined: 3,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** MUI's `borderRadius: 32 / 2` — a pill at either height, since the box clamps it. */
|
|
83
|
+
export const CHIP_RADIUS = 16;
|
|
84
|
+
/** The label's type, in px. MUI sets it on the root and the small size keeps it. */
|
|
85
|
+
export const CHIP_FONT_SIZE = 13;
|
|
86
|
+
/** MUI's `palette.action.disabledOpacity`. */
|
|
87
|
+
export const CHIP_DISABLED_OPACITY = 0.38;
|
|
88
|
+
/** An outlined chip's hairline: the hue at 0.7, or the grey ramp for `neutral`. */
|
|
89
|
+
export const OUTLINED_BORDER_ALPHA = 0.7;
|
|
90
|
+
/** The delete glyph over an unaccented chip, and over a coloured one. */
|
|
91
|
+
export const DELETE_ICON_ALPHA = 0.26;
|
|
92
|
+
export const DELETE_ICON_ON_COLOR_ALPHA = 0.7;
|
|
93
|
+
/** MUI's `action.hoverOpacity`, the wash a clickable outlined chip takes. */
|
|
94
|
+
export const OUTLINED_HOVER_ALPHA = 0.04;
|
|
95
|
+
|
|
96
|
+
/* ── What this package adds on top of MUI's chip ──────────────────────────── */
|
|
97
|
+
|
|
98
|
+
/** The lift a clickable chip takes on hover, and the shadow under it. */
|
|
99
|
+
export const HOVER_LIFT_PX = 1;
|
|
100
|
+
export const HOVER_SHADOW = { offsetY: 4, blur: 12, alphaLight: 0.15, alphaDark: 0.3 } as const;
|
|
101
|
+
export const CHIP_TRANSITION_MS = 200;
|
|
102
|
+
export const CHIP_TRANSITION_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Image,
|
|
4
|
+
Pressable,
|
|
5
|
+
Text as RNText,
|
|
6
|
+
View,
|
|
7
|
+
type GestureResponderEvent,
|
|
8
|
+
type StyleProp,
|
|
9
|
+
type ViewStyle,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
|
|
12
|
+
import { chipKeyAction, chipRole, isClickable, makeTestId } from './Chip.helpers';
|
|
13
|
+
import {
|
|
14
|
+
chipAvatarStyle,
|
|
15
|
+
chipContainerStyle,
|
|
16
|
+
chipDeleteSlotStyle,
|
|
17
|
+
chipLabelStyle,
|
|
18
|
+
chipLeadingSlotStyle,
|
|
19
|
+
chipMetrics,
|
|
20
|
+
chipPaint,
|
|
21
|
+
type ChipPaint,
|
|
22
|
+
} from './Chip.look.native';
|
|
23
|
+
import { chipMuiSize, type ChipSizeMetrics } from './Chip.metrics';
|
|
24
|
+
import type { ChipProps, ChipVariant } from './Chip.types.native';
|
|
25
|
+
import { Icon } from '../../../icons/Icon.native';
|
|
26
|
+
import { webKeyDown, type WebKeyHandler } from '../../../platform/web-keys';
|
|
27
|
+
import { useUiTheme } from '../../../provider/use-ui-theme.native';
|
|
28
|
+
|
|
29
|
+
interface SlotArgs {
|
|
30
|
+
metrics: ChipSizeMetrics;
|
|
31
|
+
variant: ChipVariant;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The leading slot. MUI restyles the icon ELEMENT through a class — 24px, or
|
|
36
|
+
* 18px when small — which a native renderer cannot do to an arbitrary node, so
|
|
37
|
+
* the slot carries the margins and the glyph keeps the size it was given.
|
|
38
|
+
*/
|
|
39
|
+
function LeadingSlot({
|
|
40
|
+
metrics,
|
|
41
|
+
variant,
|
|
42
|
+
avatar,
|
|
43
|
+
avatarSrc,
|
|
44
|
+
icon,
|
|
45
|
+
testID,
|
|
46
|
+
}: SlotArgs &
|
|
47
|
+
Pick<ChipProps, 'avatar' | 'avatarSrc' | 'icon'> & { testID: string }): React.JSX.Element | null {
|
|
48
|
+
if (avatar) {
|
|
49
|
+
return <View style={chipLeadingSlotStyle(metrics, variant, 'avatar')}>{avatar}</View>;
|
|
50
|
+
}
|
|
51
|
+
if (avatarSrc) {
|
|
52
|
+
return (
|
|
53
|
+
<View style={chipLeadingSlotStyle(metrics, variant, 'avatar')}>
|
|
54
|
+
<Image
|
|
55
|
+
source={{ uri: avatarSrc }}
|
|
56
|
+
style={chipAvatarStyle(metrics)}
|
|
57
|
+
accessibilityIgnoresInvertColors
|
|
58
|
+
/>
|
|
59
|
+
</View>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
if (icon) {
|
|
63
|
+
return (
|
|
64
|
+
<View style={chipLeadingSlotStyle(metrics, variant, 'icon')} testID={testID}>
|
|
65
|
+
{icon}
|
|
66
|
+
</View>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** MUI's `deleteIcon`: the `Cancel` glyph, pressable, tucked under the label. */
|
|
73
|
+
function DeleteSlot({
|
|
74
|
+
metrics,
|
|
75
|
+
variant,
|
|
76
|
+
color,
|
|
77
|
+
onDelete,
|
|
78
|
+
disabled,
|
|
79
|
+
testID,
|
|
80
|
+
}: SlotArgs & {
|
|
81
|
+
color: string;
|
|
82
|
+
onDelete?: () => void;
|
|
83
|
+
disabled?: boolean;
|
|
84
|
+
testID: string;
|
|
85
|
+
}): React.JSX.Element {
|
|
86
|
+
return (
|
|
87
|
+
<Pressable
|
|
88
|
+
testID={testID}
|
|
89
|
+
role="button"
|
|
90
|
+
aria-label="delete"
|
|
91
|
+
disabled={disabled}
|
|
92
|
+
onPress={onDelete}
|
|
93
|
+
style={chipDeleteSlotStyle(metrics, variant)}
|
|
94
|
+
>
|
|
95
|
+
<Icon name="Cancel" size={metrics.deleteSize} color={color} />
|
|
96
|
+
</Pressable>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface ChipBodyProps extends SlotArgs {
|
|
101
|
+
paint: ChipPaint;
|
|
102
|
+
label: string;
|
|
103
|
+
avatar?: ChipProps['avatar'];
|
|
104
|
+
avatarSrc?: string;
|
|
105
|
+
icon?: ChipProps['icon'];
|
|
106
|
+
deletable?: boolean;
|
|
107
|
+
disabled?: boolean;
|
|
108
|
+
onDelete?: () => void;
|
|
109
|
+
idFor: (suffix: string) => string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Everything inside the pill: the leading slot, the label, the delete button. */
|
|
113
|
+
function ChipBody({
|
|
114
|
+
metrics,
|
|
115
|
+
variant,
|
|
116
|
+
paint,
|
|
117
|
+
label,
|
|
118
|
+
avatar,
|
|
119
|
+
avatarSrc,
|
|
120
|
+
icon,
|
|
121
|
+
deletable,
|
|
122
|
+
disabled,
|
|
123
|
+
onDelete,
|
|
124
|
+
idFor,
|
|
125
|
+
}: ChipBodyProps): React.JSX.Element {
|
|
126
|
+
const theme = useUiTheme();
|
|
127
|
+
return (
|
|
128
|
+
<>
|
|
129
|
+
<LeadingSlot
|
|
130
|
+
metrics={metrics}
|
|
131
|
+
variant={variant}
|
|
132
|
+
avatar={avatar}
|
|
133
|
+
avatarSrc={avatarSrc}
|
|
134
|
+
icon={icon}
|
|
135
|
+
testID={idFor('icon')}
|
|
136
|
+
/>
|
|
137
|
+
<RNText
|
|
138
|
+
testID={idFor('label')}
|
|
139
|
+
numberOfLines={1}
|
|
140
|
+
style={[chipLabelStyle(theme, metrics, variant), paint.label]}
|
|
141
|
+
>
|
|
142
|
+
{label}
|
|
143
|
+
</RNText>
|
|
144
|
+
{deletable ? (
|
|
145
|
+
<DeleteSlot
|
|
146
|
+
metrics={metrics}
|
|
147
|
+
variant={variant}
|
|
148
|
+
color={paint.deleteColor}
|
|
149
|
+
onDelete={onDelete}
|
|
150
|
+
disabled={disabled}
|
|
151
|
+
testID={idFor('delete')}
|
|
152
|
+
/>
|
|
153
|
+
) : null}
|
|
154
|
+
</>
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
interface KeyDownArgs {
|
|
159
|
+
role: 'option' | 'button' | undefined;
|
|
160
|
+
disabled?: boolean;
|
|
161
|
+
deletable?: boolean;
|
|
162
|
+
selectable?: boolean;
|
|
163
|
+
/** Whether the chip acts at all, under either handler spelling. */
|
|
164
|
+
acts?: unknown;
|
|
165
|
+
onClick?: () => void;
|
|
166
|
+
onDelete?: () => void;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The half of the chip's keyboard contract react-native-web does NOT already
|
|
171
|
+
* cover. Its `Pressable` turns Enter into a press on any role, and Space into
|
|
172
|
+
* one only on a `button` role (`isValidKeyPress`) — so a selectable chip, which
|
|
173
|
+
* is an `option`, needs Space wiring here, and Delete/Backspace is never its.
|
|
174
|
+
* On a device none of this is ever called.
|
|
175
|
+
*/
|
|
176
|
+
function makeChipKeyDown(args: KeyDownArgs): WebKeyHandler {
|
|
177
|
+
return (event) => {
|
|
178
|
+
const action = chipKeyAction(event.key, { ...args, onClick: args.acts });
|
|
179
|
+
if (action === null) return;
|
|
180
|
+
if (action === 'delete') {
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
args.onDelete?.();
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (event.key === 'Enter' || args.role === 'button') return;
|
|
186
|
+
event.preventDefault();
|
|
187
|
+
args.onClick?.();
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The native `Chip`: MUI's pill on a `Pressable`, reachable by keyboard only
|
|
193
|
+
* when it acts — which is the same rule MUI applies through `clickable`.
|
|
194
|
+
*/
|
|
195
|
+
export const Chip = React.forwardRef<View, ChipProps>((props, ref) => {
|
|
196
|
+
const {
|
|
197
|
+
label,
|
|
198
|
+
variant = 'filled',
|
|
199
|
+
size = 'md',
|
|
200
|
+
color = 'primary',
|
|
201
|
+
avatarSrc,
|
|
202
|
+
avatar,
|
|
203
|
+
icon,
|
|
204
|
+
selected,
|
|
205
|
+
selectable,
|
|
206
|
+
deletable,
|
|
207
|
+
disabled,
|
|
208
|
+
onClick,
|
|
209
|
+
onPress,
|
|
210
|
+
onDelete,
|
|
211
|
+
dataTestId,
|
|
212
|
+
testID,
|
|
213
|
+
style,
|
|
214
|
+
...rest
|
|
215
|
+
} = props;
|
|
216
|
+
const theme = useUiTheme();
|
|
217
|
+
const chipId = testID ?? dataTestId;
|
|
218
|
+
const metrics = chipMetrics(chipMuiSize(size));
|
|
219
|
+
const paint = chipPaint(theme, variant, color, Boolean(selected));
|
|
220
|
+
const acts = onClick ?? onPress;
|
|
221
|
+
const clickable = isClickable(disabled, acts, selectable);
|
|
222
|
+
const role = chipRole(selectable, acts);
|
|
223
|
+
|
|
224
|
+
const base: StyleProp<ViewStyle> = [
|
|
225
|
+
chipContainerStyle(metrics, Boolean(disabled)),
|
|
226
|
+
paint.container,
|
|
227
|
+
style,
|
|
228
|
+
];
|
|
229
|
+
|
|
230
|
+
const press = (event: GestureResponderEvent): void => {
|
|
231
|
+
onClick?.();
|
|
232
|
+
onPress?.(event);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
return (
|
|
236
|
+
<Pressable
|
|
237
|
+
ref={ref}
|
|
238
|
+
testID={chipId || 'chip'}
|
|
239
|
+
role={role}
|
|
240
|
+
aria-selected={selectable ? selected : undefined}
|
|
241
|
+
disabled={disabled}
|
|
242
|
+
// MUI makes only a clickable chip keyboard-reachable; react-native-web
|
|
243
|
+
// would otherwise give every Pressable a tab stop.
|
|
244
|
+
tabIndex={clickable ? 0 : -1}
|
|
245
|
+
onPress={clickable ? press : undefined}
|
|
246
|
+
{...webKeyDown(
|
|
247
|
+
makeChipKeyDown({ role, disabled, deletable, selectable, acts, onClick, onDelete }),
|
|
248
|
+
)}
|
|
249
|
+
style={(state) => [base, state.pressed && clickable ? paint.pressed : null]}
|
|
250
|
+
{...rest}
|
|
251
|
+
>
|
|
252
|
+
<ChipBody
|
|
253
|
+
metrics={metrics}
|
|
254
|
+
variant={variant}
|
|
255
|
+
paint={paint}
|
|
256
|
+
label={label}
|
|
257
|
+
avatar={avatar}
|
|
258
|
+
avatarSrc={avatarSrc}
|
|
259
|
+
icon={icon}
|
|
260
|
+
deletable={deletable}
|
|
261
|
+
disabled={disabled}
|
|
262
|
+
onDelete={onDelete}
|
|
263
|
+
idFor={makeTestId(chipId)}
|
|
264
|
+
/>
|
|
265
|
+
</Pressable>
|
|
266
|
+
);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
Chip.displayName = 'Chip';
|
|
@@ -3,43 +3,26 @@ import type { SxProps, Theme } from '@mui/material/styles/index.js';
|
|
|
3
3
|
import type { KeyboardEvent, ReactElement } from 'react';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
+
import { chipKeyAction, type ChipKeyArgs } from './Chip.helpers';
|
|
7
|
+
import { CHIP_SIZES, CHIP_TRANSITION_EASING, CHIP_TRANSITION_MS, HOVER_LIFT_PX, HOVER_SHADOW } from './Chip.metrics';
|
|
6
8
|
import type { ChipProps } from './Chip.types';
|
|
7
9
|
|
|
8
|
-
export const makeTestId =
|
|
9
|
-
(dataTestId?: string) =>
|
|
10
|
-
(suffix: string): string =>
|
|
11
|
-
dataTestId ? `${dataTestId}-${suffix}` : `chip-${suffix}`;
|
|
12
|
-
|
|
13
|
-
interface KeyHandlerArgs {
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
deletable?: boolean;
|
|
16
|
-
selectable?: boolean;
|
|
17
|
-
onClick?: () => void;
|
|
18
|
-
onDelete?: () => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const DELETE_KEYS = new Set(['Delete', 'Backspace']);
|
|
22
|
-
const ACTIVATE_KEYS = new Set(['Enter', ' ']);
|
|
23
|
-
|
|
24
10
|
/**
|
|
25
|
-
* A chip is not a native control, so the two keyboard conventions it stands in
|
|
26
|
-
* are wired by hand: Delete/Backspace removes it, Enter/Space activates it.
|
|
11
|
+
* A chip is not a native control, so the two keyboard conventions it stands in
|
|
12
|
+
* for are wired by hand: Delete/Backspace removes it, Enter/Space activates it.
|
|
13
|
+
* The DECISION is `chipKeyAction`, which the native half reads too.
|
|
27
14
|
*/
|
|
28
15
|
export const makeKeyDownHandler =
|
|
29
|
-
(
|
|
16
|
+
(args: ChipKeyArgs & { onClick?: () => void; onDelete?: () => void }) =>
|
|
30
17
|
(event: KeyboardEvent): void => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
onDelete();
|
|
18
|
+
const action = chipKeyAction(event.key, args);
|
|
19
|
+
if (action === null) return;
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
if (action === 'delete') {
|
|
22
|
+
args.onDelete?.();
|
|
36
23
|
return;
|
|
37
24
|
}
|
|
38
|
-
|
|
39
|
-
if (ACTIVATE_KEYS.has(event.key) && (onClick || selectable)) {
|
|
40
|
-
event.preventDefault();
|
|
41
|
-
onClick?.();
|
|
42
|
-
}
|
|
25
|
+
args.onClick?.();
|
|
43
26
|
};
|
|
44
27
|
|
|
45
28
|
export const avatarFor = (
|
|
@@ -50,7 +33,8 @@ export const avatarFor = (
|
|
|
50
33
|
return avatar;
|
|
51
34
|
}
|
|
52
35
|
if (avatarSrc) {
|
|
53
|
-
|
|
36
|
+
const { avatarSize } = CHIP_SIZES.medium;
|
|
37
|
+
return <Avatar src={avatarSrc} sx={{ width: avatarSize, height: avatarSize }} />;
|
|
54
38
|
}
|
|
55
39
|
return undefined;
|
|
56
40
|
};
|
|
@@ -62,6 +46,12 @@ interface ChipStyleArgs {
|
|
|
62
46
|
disabled?: boolean;
|
|
63
47
|
}
|
|
64
48
|
|
|
49
|
+
/** The lift's shadow, per mode — the same numbers the native chip reads. */
|
|
50
|
+
const hoverShadow = (mode: Theme['palette']['mode']): string =>
|
|
51
|
+
`0 ${HOVER_SHADOW.offsetY}px ${HOVER_SHADOW.blur}px rgba(0, 0, 0, ${
|
|
52
|
+
mode === 'dark' ? HOVER_SHADOW.alphaDark : HOVER_SHADOW.alphaLight
|
|
53
|
+
})`;
|
|
54
|
+
|
|
65
55
|
/**
|
|
66
56
|
* Selection styling uses SEMANTIC palette tokens (not hardcoded rgba). A filled
|
|
67
57
|
* selected chip keeps MUI's solid `color.main` + contrast text (clear active
|
|
@@ -89,11 +79,8 @@ export const chipStyles = ({
|
|
|
89
79
|
}),
|
|
90
80
|
'&:hover': {
|
|
91
81
|
...(lifts && {
|
|
92
|
-
transform:
|
|
93
|
-
boxShadow: (theme: Theme) =>
|
|
94
|
-
theme.palette.mode === 'dark'
|
|
95
|
-
? '0 4px 12px rgba(0, 0, 0, 0.3)'
|
|
96
|
-
: '0 4px 12px rgba(0, 0, 0, 0.15)',
|
|
82
|
+
transform: `translateY(-${HOVER_LIFT_PX}px)`,
|
|
83
|
+
boxShadow: (theme: Theme) => hoverShadow(theme.palette.mode),
|
|
97
84
|
}),
|
|
98
85
|
},
|
|
99
86
|
'&:active': {
|
|
@@ -101,25 +88,10 @@ export const chipStyles = ({
|
|
|
101
88
|
transform: 'translateY(0px)',
|
|
102
89
|
}),
|
|
103
90
|
},
|
|
104
|
-
transition:
|
|
91
|
+
transition: `all ${CHIP_TRANSITION_MS / 1000}s ${CHIP_TRANSITION_EASING}`,
|
|
105
92
|
};
|
|
106
93
|
};
|
|
107
94
|
|
|
108
|
-
/** `option` when the chip belongs to a selectable set, `button` when it merely acts. */
|
|
109
|
-
export const chipRole = (
|
|
110
|
-
selectable?: boolean,
|
|
111
|
-
onClick?: () => void,
|
|
112
|
-
): 'option' | 'button' | undefined => {
|
|
113
|
-
if (selectable) return 'option';
|
|
114
|
-
return onClick ? 'button' : undefined;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const isClickable = (
|
|
118
|
-
disabled?: boolean,
|
|
119
|
-
onClick?: () => void,
|
|
120
|
-
selectable?: boolean,
|
|
121
|
-
): boolean => !disabled && (Boolean(onClick) || Boolean(selectable));
|
|
122
|
-
|
|
123
95
|
export const iconWithTestId = (
|
|
124
96
|
icon: ChipProps['icon'],
|
|
125
97
|
testId: string,
|
|
@@ -2,21 +2,16 @@ import CancelIcon from '@mui/icons-material/Cancel';
|
|
|
2
2
|
import MuiChip from '@mui/material/Chip/index.js';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
|
|
5
|
+
import { chipRole, isClickable, makeTestId } from './Chip.helpers';
|
|
6
|
+
import { chipMuiSize } from './Chip.metrics';
|
|
5
7
|
import {
|
|
6
8
|
avatarFor,
|
|
7
|
-
chipRole,
|
|
8
9
|
chipStyles,
|
|
9
10
|
iconWithTestId,
|
|
10
|
-
isClickable,
|
|
11
11
|
makeKeyDownHandler,
|
|
12
|
-
|
|
13
|
-
} from './Chip.helpers';
|
|
12
|
+
} from './Chip.styles';
|
|
14
13
|
import type { ChipProps } from './Chip.types';
|
|
15
14
|
|
|
16
|
-
/** MUI draws two chip sizes; ours are the house abbreviations for them. */
|
|
17
|
-
const muiSizeFor = (size: NonNullable<ChipProps['size']>): 'small' | 'medium' =>
|
|
18
|
-
size === 'xs' || size === 'sm' ? 'small' : 'medium';
|
|
19
|
-
|
|
20
15
|
type MuiChipColor =
|
|
21
16
|
| 'primary'
|
|
22
17
|
| 'secondary'
|
|
@@ -58,9 +53,13 @@ export const Chip = forwardRef<HTMLDivElement, ChipProps>(({
|
|
|
58
53
|
onDelete,
|
|
59
54
|
className,
|
|
60
55
|
dataTestId,
|
|
56
|
+
// React Native's spelling of the same id; it names the component on both
|
|
57
|
+
// sides and must not reach the DOM as an attribute.
|
|
58
|
+
testID,
|
|
61
59
|
...props
|
|
62
60
|
}, ref) => {
|
|
63
|
-
const
|
|
61
|
+
const chipId = testID ?? dataTestId;
|
|
62
|
+
const testId = makeTestId(chipId);
|
|
64
63
|
const clickable = isClickable(disabled, onClick, selectable);
|
|
65
64
|
|
|
66
65
|
return (
|
|
@@ -68,7 +67,7 @@ export const Chip = forwardRef<HTMLDivElement, ChipProps>(({
|
|
|
68
67
|
ref={ref}
|
|
69
68
|
label={<span data-testid={testId('label')}>{label}</span>}
|
|
70
69
|
variant={variant}
|
|
71
|
-
size={
|
|
70
|
+
size={chipMuiSize(size)}
|
|
72
71
|
color={muiColorFor(color)}
|
|
73
72
|
avatar={avatarFor(avatar, avatarSrc)}
|
|
74
73
|
icon={iconWithTestId(icon, testId('icon'))}
|
|
@@ -81,7 +80,7 @@ export const Chip = forwardRef<HTMLDivElement, ChipProps>(({
|
|
|
81
80
|
className={className}
|
|
82
81
|
role={chipRole(selectable, onClick)}
|
|
83
82
|
aria-selected={selectable ? selected : undefined}
|
|
84
|
-
data-testid={
|
|
83
|
+
data-testid={chipId || 'chip'}
|
|
85
84
|
sx={chipStyles({ variant, selected, clickable, disabled })}
|
|
86
85
|
{...props}
|
|
87
86
|
/>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GestureResponderEvent,
|
|
3
|
+
PressableProps,
|
|
4
|
+
StyleProp,
|
|
5
|
+
ViewStyle,
|
|
6
|
+
} from 'react-native';
|
|
7
|
+
|
|
8
|
+
import type { ChipBaseProps } from './Chip.base';
|
|
9
|
+
|
|
10
|
+
export type { ChipBaseProps, ChipColor, ChipSize, ChipVariant } from './Chip.base';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The native `Chip`. `onClick` keeps its web name — a shared screen should not
|
|
14
|
+
* have to know which renderer it is on — and `onPress` is accepted too, because
|
|
15
|
+
* that is what a React Native developer will reach for.
|
|
16
|
+
*
|
|
17
|
+
* A press fires BOTH. A keyboard activation fires only `onClick`: it exists
|
|
18
|
+
* solely under react-native-web, where a selectable chip is an `option` and
|
|
19
|
+
* `Pressable` answers Space only on a `button` role, so the chip synthesizes
|
|
20
|
+
* the activation itself and has no `GestureResponderEvent` to hand `onPress`.
|
|
21
|
+
* That matches the web, whose chip has no `onPress` at all, and costs nothing
|
|
22
|
+
* on a device, which has no keyboard to activate from.
|
|
23
|
+
*/
|
|
24
|
+
export type ChipProps = ChipBaseProps &
|
|
25
|
+
Omit<PressableProps, keyof ChipBaseProps | 'style' | 'onPress'> & {
|
|
26
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
};
|
|
@@ -1,88 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ChipBaseProps } from './Chip.base';
|
|
3
2
|
|
|
4
|
-
export type ChipVariant
|
|
3
|
+
export type { ChipBaseProps, ChipColor, ChipSize, ChipVariant } from './Chip.base';
|
|
5
4
|
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* `Avatar`, `Badge`, `Progress`, `Input`, `Modal` and `Dialog` all use `sm`/`md`;
|
|
10
|
-
* this was `'small' | 'medium'`, MUI's spelling, and the sole outlier in the
|
|
11
|
-
* package. That was not merely inconsistent — callers wrote `size="sm"` because
|
|
12
|
-
* every neighbouring component taught them to, it type-checked against the old
|
|
13
|
-
* `ChipSize` nowhere and reached MUI as an unknown value, and the chip silently
|
|
14
|
-
* rendered at the default `medium`. Twelve of them are doing that today.
|
|
15
|
-
*
|
|
16
|
-
* All five stops, and `Chip.tsx` draws them: MUI gives a chip two heights, so
|
|
17
|
-
* `xs`/`sm` map to small and `md` and up to medium. Offering fewer than five
|
|
18
|
-
* here is what made callers write `size="sm"` against a type that did not have
|
|
19
|
-
* it — the scale is the vocabulary, and a component that speaks a dialect of it
|
|
20
|
-
* is the problem, not the solution.
|
|
21
|
-
*/
|
|
22
|
-
export type ChipSize = SizeValue;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The colours a chip can draw — THE HOUSE VOCABULARY, identical to `ButtonProps`.
|
|
26
|
-
*
|
|
27
|
-
* `danger` and `neutral` are ours; the rest are MUI's own names already. That is
|
|
28
|
-
* the same sentence `Button.tsx` carries, and deliberately so: `Button`, `Alert`,
|
|
29
|
-
* `Text`, `Heading`, `Paragraph` and `Blockquote` all speak this vocabulary, so a
|
|
30
|
-
* chip is the odd one out if it does not.
|
|
31
|
-
*
|
|
32
|
-
* This prop was `string`, and the widening was not free. `danger` — the house
|
|
33
|
-
* word for the destructive meaning, and what every neighbouring component
|
|
34
|
-
* accepts — reached MUI as an unknown value and fell back to the default grey.
|
|
35
|
-
* The chip that most needed emphasis rendered without any, and nothing said so.
|
|
36
|
-
*
|
|
37
|
-
* The fix is NOT to reject `danger`. Rejecting it would punish a caller for
|
|
38
|
-
* using the vocabulary the rest of the system taught them. The fix is for the
|
|
39
|
-
* chip to speak it and translate at the MUI boundary, exactly as `Button` does.
|
|
40
|
-
*/
|
|
41
|
-
export type ChipColor = ColorValue;
|
|
42
|
-
|
|
43
|
-
export interface ChipProps {
|
|
44
|
-
/** Text content displayed in the chip */
|
|
45
|
-
label: string;
|
|
46
|
-
|
|
47
|
-
/** Visual style variant */
|
|
48
|
-
variant?: ChipVariant;
|
|
49
|
-
|
|
50
|
-
/** Size of the chip */
|
|
51
|
-
size?: ChipSize;
|
|
52
|
-
|
|
53
|
-
/** Theme color token. See {@link ChipColor} for why this is a closed set. */
|
|
54
|
-
color?: ChipColor;
|
|
55
|
-
|
|
56
|
-
/** Source URL for avatar image */
|
|
57
|
-
avatarSrc?: string;
|
|
58
|
-
|
|
59
|
-
/** Custom avatar React node (overrides avatarSrc) */
|
|
60
|
-
avatar?: ReactNode;
|
|
61
|
-
|
|
62
|
-
/** Leading icon React node */
|
|
63
|
-
icon?: ReactNode;
|
|
64
|
-
|
|
65
|
-
/** Current selection state */
|
|
66
|
-
selected?: boolean;
|
|
67
|
-
|
|
68
|
-
/** Enables selection toggle capability */
|
|
69
|
-
selectable?: boolean;
|
|
70
|
-
|
|
71
|
-
/** Shows delete button */
|
|
72
|
-
deletable?: boolean;
|
|
73
|
-
|
|
74
|
-
/** Disables all interactions */
|
|
75
|
-
disabled?: boolean;
|
|
76
|
-
|
|
77
|
-
/** Click/selection handler */
|
|
78
|
-
onClick?: () => void;
|
|
79
|
-
|
|
80
|
-
/** Delete action handler */
|
|
81
|
-
onDelete?: () => void;
|
|
82
|
-
|
|
5
|
+
/** The web `Chip`: the shared contract, plus the DOM's own styling hook. */
|
|
6
|
+
export interface ChipProps extends ChipBaseProps {
|
|
83
7
|
/** Additional CSS classes */
|
|
84
8
|
className?: string;
|
|
85
|
-
|
|
86
|
-
/** Test ID for component testing */
|
|
87
|
-
dataTestId?: string;
|
|
88
|
-
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Chip on React Native
|
|
2
|
+
|
|
3
|
+
Known rendering gaps, one bullet each; `pnpm native:ledger` reads them.
|
|
4
|
+
|
|
5
|
+
- Hover has no touch equivalent, so a press stands in for it: the chip takes MUI's hover wash (`palette[color].dark` filled, `alpha(main, 0.04)` outlined) while pressed, but not this package's own 1px lift or the `0 4px 12px` shadow under it, which are `:hover`-only.
|
|
6
|
+
- The keyboard contract — Enter and Space activate, Delete and Backspace remove — is shared (`chipKeyAction`) and answered under react-native-web, half by its `Pressable` and half by the chip's own handler. On a DEVICE none of it runs: React Native delivers no key events to a `View`, so a chip there is pressed and removed by touch.
|
|
7
|
+
- MUI restyles the leading icon ELEMENT through a class — 24px, 18px when small, and `inherit` ink on a coloured chip. A native renderer cannot restyle an arbitrary node, so the slot carries MUI's margins and the glyph keeps the size and colour it was given.
|
|
8
|
+
- An `avatarSrc` is drawn as a round `Image` at MUI's 24px (18px small) box; MUI's own `Avatar` additionally shows an initials fallback and repaints itself in `primary.dark`/`secondary.dark` for those two colours.
|
|
9
|
+
- MUI's `transition: background-color, box-shadow` and this package's `all 0.2s cubic-bezier(0.4, 0, 0.2, 1)` have no equivalent: a colour change is drawn immediately.
|
|
10
|
+
- A keyboard activation (Space on a selectable chip, Delete on a deletable one) fires `onClick` and `onDelete` but not `onPress`: it only exists under react-native-web, where the chip synthesizes the activation `Pressable` will not, and so has no `GestureResponderEvent` to pass. A press on a device fires both.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
interface ChipProps {
|
|
7
7
|
label: string;
|
|
8
8
|
variant?: 'filled' | 'outlined';
|
|
9
|
-
size?: SizeValue
|
|
9
|
+
size?: SizeValue; // all five stops; MUI's two heights, xs/sm small and md up medium
|
|
10
10
|
/**
|
|
11
11
|
* The house vocabulary, identical to Button's. `danger` and `neutral` are
|
|
12
12
|
* ours and are translated at the MUI boundary. See `ColorValue`.
|