@12-apps/ui 6.15.0 → 6.15.1
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/AsyncStateContainer/AsyncStateContainer.js +4 -4
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
- package/dist/_internal/components/data-display/Chart/SpecChart.js +5 -5
- package/dist/_internal/components/data-display/Chart/chart-context.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +1 -1
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +30 -29
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +40 -39
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +4 -4
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +6 -5
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +2 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +11 -10
- 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 +12 -11
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +6 -6
- 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 +27 -26
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +15 -14
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +4 -4
- 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 +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +10 -9
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +3 -3
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +5 -5
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/InteractiveTooltip/InteractiveTooltip.js +2 -2
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +3 -3
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +3 -3
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.hooks.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -4
- package/dist/_internal/components/data-display/StatCard/StatCard.js +3 -3
- package/dist/_internal/components/data-display/index.js +21 -21
- 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 +7 -7
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +10 -9
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +4 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +3 -2
- package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +3 -2
- package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +2 -1
- 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 +7 -6
- package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +3 -2
- package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +3 -2
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +4 -3
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +3 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +9 -8
- package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +2 -1
- package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +3 -2
- package/dist/_internal/components/form/CepField/CepField.js +4 -3
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +2 -1
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +2 -1
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +6 -6
- package/dist/_internal/components/form/Input/Input.js +3 -2
- package/dist/_internal/components/form/Input/Input.styles.js +2 -1
- package/dist/_internal/components/form/InputOTP/InputOTP.js +3 -2
- package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +2 -1
- package/dist/_internal/components/form/PhoneInput/PhoneInput.hooks.js +2 -2
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +4 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.js +4 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +2 -1
- package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +3 -2
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +3 -2
- package/dist/_internal/components/form/Select/Select.js +2 -1
- package/dist/_internal/components/form/Textarea/Textarea.js +3 -2
- package/dist/_internal/components/form/Textarea/Textarea.styles.js +2 -1
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +5 -2
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js.map +1 -1
- package/dist/_internal/components/form/Toggle/Toggle.js +3 -2
- package/dist/_internal/components/form/Toggle/Toggle.styles.js +2 -1
- package/dist/_internal/components/form/index.js +37 -36
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +10 -9
- package/dist/_internal/components/form/total-form/Fields/CepField.js +5 -4
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +3 -2
- package/dist/_internal/components/form/total-form/Fields/TextField.js +4 -3
- package/dist/_internal/components/form/total-form/Fields/index.js +20 -19
- package/dist/_internal/components/form/total-form/SubmitButton.js +3 -3
- package/dist/_internal/components/index.js +69 -68
- package/dist/_internal/components/layout/Skeleton/Skeleton.js +2 -2
- package/dist/_internal/components/layout/index.js +5 -5
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +7 -7
- package/dist/_internal/components/navigation/CommandPalette/CommandPalette.js +2 -2
- package/dist/_internal/components/navigation/index.js +9 -9
- package/dist/_internal/social-login-button/social-login-button.js +3 -3
- package/dist/_internal/tokens/field-edge.js +10 -0
- package/dist/_internal/tokens/field-edge.js.map +1 -0
- package/dist/_internal/user-avatar/user-avatar.js +3 -3
- package/dist/charts.js +5 -5
- package/dist/{chunk-4VPCZFF3.js → chunk-2W4CIWTW.js} +7 -4
- package/dist/chunk-2W4CIWTW.js.map +1 -0
- package/dist/{chunk-BQYIJOKS.js → chunk-2ZDTGI5V.js} +2 -2
- package/dist/{chunk-VLNM4BTH.js → chunk-3LO5JWTC.js} +3 -3
- package/dist/{chunk-MYOFULG4.js → chunk-3ORFVLI3.js} +2 -2
- package/dist/{chunk-J72KWTHC.js → chunk-45N6LXUU.js} +5 -3
- package/dist/chunk-45N6LXUU.js.map +1 -0
- package/dist/{chunk-MJOXIENM.js → chunk-45OIUWGO.js} +7 -7
- package/dist/{chunk-S7CAXRRP.js → chunk-4Y65Q3CR.js} +2 -2
- package/dist/{chunk-XN5AYC5S.js → chunk-5SYD23V4.js} +7 -4
- package/dist/chunk-5SYD23V4.js.map +1 -0
- package/dist/{chunk-ZLNKBKUB.js → chunk-5VVM2PPV.js} +3 -3
- package/dist/{chunk-4KNJQFDJ.js → chunk-64IEKEMQ.js} +5 -2
- package/dist/chunk-64IEKEMQ.js.map +1 -0
- package/dist/{chunk-CRHQN42I.js → chunk-6CBYPMYQ.js} +4 -4
- package/dist/{chunk-WXVHZHSJ.js → chunk-6RFL7HGI.js} +3 -3
- package/dist/{chunk-GDUIT5I6.js → chunk-6TYSEAAT.js} +2 -2
- package/dist/{chunk-FXMZMX5E.js → chunk-6XPNJLXE.js} +6 -2
- package/dist/chunk-6XPNJLXE.js.map +1 -0
- package/dist/{chunk-C34GFGA5.js → chunk-72NOM3O2.js} +2 -2
- package/dist/{chunk-LNQ6QMKG.js → chunk-7DBFEZRC.js} +6 -3
- package/dist/chunk-7DBFEZRC.js.map +1 -0
- package/dist/{chunk-3BR2CLAM.js → chunk-A3KY6NUA.js} +2 -2
- package/dist/{chunk-5QQWAIZO.js → chunk-ACDYA5WC.js} +6 -2
- package/dist/chunk-ACDYA5WC.js.map +1 -0
- package/dist/{chunk-2I5B5NNT.js → chunk-AX7UFG2U.js} +2 -2
- package/dist/{chunk-PXH24VIP.js → chunk-B6IURHSZ.js} +4 -4
- package/dist/{chunk-TXHJX2NG.js → chunk-BGYLL467.js} +4 -4
- package/dist/{chunk-CZJLWCEG.js → chunk-BPYPUEM5.js} +2 -2
- package/dist/{chunk-QISJKBCM.js → chunk-CDJPDZCA.js} +2 -2
- package/dist/{chunk-5VZPVDUF.js → chunk-COSJTD6Z.js} +2 -2
- package/dist/{chunk-Q6KXTTC4.js → chunk-CXA6UNFF.js} +5 -5
- package/dist/{chunk-MNZ2NT5A.js → chunk-DCEMUZJQ.js} +6 -2
- package/dist/chunk-DCEMUZJQ.js.map +1 -0
- package/dist/{chunk-NKCKIGRL.js → chunk-DGMR3IMM.js} +3 -3
- package/dist/{chunk-MUFI3ZXS.js → chunk-DQIQKIEA.js} +2 -2
- package/dist/{chunk-747HBFGH.js → chunk-EE2LBAJH.js} +7 -7
- package/dist/{chunk-RXYSP56G.js → chunk-ELYLG4F7.js} +3 -3
- package/dist/{chunk-6YFMGNSA.js → chunk-ENK4XGKF.js} +2 -2
- package/dist/{chunk-QTPKACVO.js → chunk-EY4LPLIR.js} +2 -2
- package/dist/{chunk-XCT2ZLA6.js → chunk-FCOEJCUP.js} +6 -2
- package/dist/chunk-FCOEJCUP.js.map +1 -0
- package/dist/{chunk-LDMXHDZ5.js → chunk-FF55LRSV.js} +2 -2
- package/dist/{chunk-HGBZZDP6.js → chunk-FJHNNSD3.js} +3 -3
- package/dist/{chunk-ONZPM6FP.js → chunk-G7CFUI4I.js} +2 -2
- package/dist/{chunk-KDIWFARU.js → chunk-GBB6XQ56.js} +2 -2
- package/dist/{chunk-WWNXJMBX.js → chunk-GFBNUWT5.js} +3 -3
- package/dist/{chunk-PLOOVF43.js → chunk-GGE7Y53F.js} +2 -2
- package/dist/{chunk-7SZ3PFZW.js → chunk-HBAPVB7T.js} +2 -2
- package/dist/{chunk-V7TPSQOH.js → chunk-HBZIN6IQ.js} +2 -2
- package/dist/{chunk-LS42VJAI.js → chunk-HEDOL2RV.js} +2 -2
- package/dist/{chunk-3AOOI2NR.js → chunk-HR7YTBR7.js} +4 -4
- package/dist/{chunk-6HLRXICF.js → chunk-IAQFQNBL.js} +4 -4
- package/dist/{chunk-PUBPZOQJ.js → chunk-IPE5FFFD.js} +2 -2
- package/dist/{chunk-NVOQLMYF.js → chunk-IRDGC7FK.js} +4 -4
- package/dist/{chunk-FSMQF5P5.js → chunk-IXZ44HJF.js} +2 -2
- package/dist/{chunk-YVX7GGS4.js → chunk-JPDKRGYI.js} +2 -2
- package/dist/{chunk-LFB4H7Y6.js → chunk-KNNBIXWJ.js} +2 -2
- package/dist/{chunk-47DCYF4G.js → chunk-KSF7TLXH.js} +3 -3
- package/dist/{chunk-I2S2GHEG.js → chunk-LUWATXU4.js} +4 -4
- package/dist/{chunk-J7VY6KNP.js → chunk-M3RIC6JI.js} +2 -2
- package/dist/{chunk-434EDUHY.js → chunk-MHFJBNDP.js} +8 -8
- package/dist/chunk-MLOWPVVW.js +44 -0
- package/dist/chunk-MLOWPVVW.js.map +1 -0
- package/dist/{chunk-5KZESOK6.js → chunk-MUAVYVDJ.js} +6 -6
- package/dist/{chunk-PRAGFBHW.js → chunk-N4WANJI3.js} +2 -2
- package/dist/{chunk-LR2ECQSZ.js → chunk-O3OU2PPT.js} +2 -2
- package/dist/{chunk-YROTCW42.js → chunk-O6J4CKS5.js} +2 -2
- package/dist/{chunk-UPR7F3ML.js → chunk-PKJKA4CU.js} +2 -2
- package/dist/{chunk-NI2ISQZI.js → chunk-PLK7UGO6.js} +3 -3
- package/dist/{chunk-U7SO3N42.js → chunk-PMFW55F5.js} +3 -3
- package/dist/{chunk-GPVB3FQP.js → chunk-PU3AAKRR.js} +2 -2
- package/dist/{chunk-UN5D73A4.js → chunk-QETBO7EC.js} +2 -2
- package/dist/{chunk-OLZTGVBT.js → chunk-REMK55JI.js} +4 -4
- package/dist/{chunk-3AEY5TYV.js → chunk-RMSH2I3O.js} +8 -4
- package/dist/chunk-RMSH2I3O.js.map +1 -0
- package/dist/{chunk-CPNSVIIB.js → chunk-RP3W6IQO.js} +5 -5
- package/dist/{chunk-4QQVIGRG.js → chunk-RQ4EQ5FJ.js} +2 -2
- package/dist/{chunk-QL7L6RHR.js → chunk-RX6DWIIW.js} +2 -2
- package/dist/{chunk-RGBS6N72.js → chunk-SEH7KOVG.js} +2 -2
- package/dist/{chunk-LUMF63BM.js → chunk-SFAP5EH5.js} +4 -4
- package/dist/{chunk-GJQYM3PM.js → chunk-SHQWIDD5.js} +4 -4
- package/dist/{chunk-NQCYVYP3.js → chunk-SLYZMJEL.js} +2 -2
- package/dist/{chunk-HKROKM3Z.js → chunk-SM3NRN7L.js} +2 -2
- package/dist/{chunk-XSJWN3WH.js → chunk-T53L42XW.js} +7 -7
- package/dist/{chunk-NJS4WCHA.js → chunk-TPUIIZN2.js} +10 -10
- package/dist/{chunk-ZPIFVTJA.js → chunk-TUAIPMU7.js} +5 -5
- package/dist/{chunk-SQAU5QUY.js → chunk-UMDXGIRZ.js} +6 -3
- package/dist/chunk-UMDXGIRZ.js.map +1 -0
- package/dist/{chunk-ZYRW7FVY.js → chunk-URWGRPL7.js} +6 -2
- package/dist/chunk-URWGRPL7.js.map +1 -0
- package/dist/{chunk-B5LNUTGZ.js → chunk-VJKRJYZL.js} +2 -2
- package/dist/{chunk-Q6HJMJBH.js → chunk-VSLUFBMT.js} +7 -3
- package/dist/chunk-VSLUFBMT.js.map +1 -0
- package/dist/{chunk-7EGHRNIA.js → chunk-VVXRIPV5.js} +8 -8
- package/dist/{chunk-HOJL2GKW.js → chunk-WC3W36AM.js} +4 -4
- package/dist/{chunk-ARI5ZU75.js → chunk-WEH5TCPE.js} +5 -5
- package/dist/{chunk-CESQKLIR.js → chunk-WFX5GASM.js} +2 -2
- package/dist/{chunk-HIZCBYEP.js → chunk-WR6F6J43.js} +5 -5
- package/dist/{chunk-MHJ52VJE.js → chunk-XSKVBGCZ.js} +5 -5
- package/dist/{chunk-SE4Z3P6D.js → chunk-XULTDO56.js} +2 -2
- package/dist/{chunk-K25MT3GZ.js → chunk-YVW7VPK4.js} +2 -2
- package/dist/{chunk-XQ2BNVXL.js → chunk-ZBNTFWTG.js} +2 -2
- package/dist/data-display/AsyncStateContainer.js +4 -4
- package/dist/data-display/CardKit.js +7 -7
- package/dist/data-display/Chart.js +5 -5
- package/dist/data-display/DataGrid.js +1 -1
- package/dist/data-display/DataViews.js +46 -45
- package/dist/data-display/InteractiveTooltip.js +2 -2
- package/dist/data-display/LazyImage.js +3 -3
- package/dist/data-display/Lightbox.js +3 -3
- package/dist/data-display/LoadingState.js +3 -3
- package/dist/data-display/Sheet.js +4 -4
- package/dist/data-display/StatCard.js +3 -3
- package/dist/feedback/ConfirmAction.js +5 -5
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/form/AddressAutocomplete.js +10 -9
- package/dist/form/Button.js +2 -2
- package/dist/form/Calendar.js +4 -4
- package/dist/form/CategorySelect.js +9 -8
- package/dist/form/CepField.js +4 -3
- package/dist/form/CodeEditor.js +2 -1
- package/dist/form/CreatableSelect.js +2 -1
- package/dist/form/DateRangePicker.js +6 -6
- package/dist/form/Input.js +3 -2
- package/dist/form/InputOTP.js +3 -2
- package/dist/form/PhoneInput.js +4 -3
- package/dist/form/RadioGroup.js +4 -3
- package/dist/form/RichTextEditor.js +3 -2
- package/dist/form/Select.js +2 -1
- package/dist/form/Textarea.js +3 -2
- package/dist/form/Toggle.js +3 -2
- package/dist/form/total-form.js +23 -22
- package/dist/layout/ContentToolbar.js +3 -3
- package/dist/layout/Skeleton.js +2 -2
- package/dist/navigation/AppHeader.js +7 -7
- package/dist/navigation/CommandPalette.js +2 -2
- package/dist/social-login-button.js +3 -3
- package/dist/types/components/form/AddressAutocomplete/AddressTextField.d.ts.map +1 -1
- package/dist/types/components/form/CategorySelect/CategorySelect.styles.d.ts.map +1 -1
- package/dist/types/components/form/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/types/components/form/CreatableSelect/CreatableSelect.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.styles.d.ts.map +1 -1
- package/dist/types/components/form/InputOTP/InputOTP.styles.d.ts.map +1 -1
- package/dist/types/components/form/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/dist/types/components/form/RadioGroup/RadioGroup.styles.d.ts.map +1 -1
- package/dist/types/components/form/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/components/form/Select/Select.d.ts.map +1 -1
- package/dist/types/components/form/Textarea/Textarea.d.ts.map +1 -1
- package/dist/types/components/form/Textarea/Textarea.styles.d.ts.map +1 -1
- package/dist/types/components/form/Textarea/TextareaRichEditor.d.ts.map +1 -1
- package/dist/types/components/form/Toggle/Toggle.styles.d.ts.map +1 -1
- package/dist/types/tokens/field-edge.d.ts +80 -0
- package/dist/types/tokens/field-edge.d.ts.map +1 -0
- package/dist/user-avatar.js +3 -3
- package/package.json +1 -1
- package/src/components/form/AddressAutocomplete/AddressTextField.tsx +3 -1
- package/src/components/form/CategorySelect/CategorySelect.styles.ts +3 -1
- package/src/components/form/CodeEditor/CodeEditor.tsx +3 -1
- package/src/components/form/CreatableSelect/CreatableSelect.tsx +4 -2
- package/src/components/form/Input/Input.styles.ts +5 -3
- package/src/components/form/InputOTP/InputOTP.styles.ts +3 -1
- package/src/components/form/PhoneInput/PhoneInput.tsx +3 -1
- package/src/components/form/RadioGroup/RadioGroup.styles.ts +4 -2
- package/src/components/form/RichTextEditor/RichTextEditor.tsx +3 -1
- package/src/components/form/Select/Select.tsx +4 -2
- package/src/components/form/Textarea/Textarea.styles.ts +3 -1
- package/src/components/form/Textarea/Textarea.tsx +4 -2
- package/src/components/form/Textarea/TextareaRichEditor.tsx +3 -1
- package/src/components/form/Toggle/Toggle.styles.ts +3 -1
- package/src/tokens/field-edge.ts +141 -0
- package/dist/chunk-3AEY5TYV.js.map +0 -1
- package/dist/chunk-4KNJQFDJ.js.map +0 -1
- package/dist/chunk-4VPCZFF3.js.map +0 -1
- package/dist/chunk-5QQWAIZO.js.map +0 -1
- package/dist/chunk-FXMZMX5E.js.map +0 -1
- package/dist/chunk-J72KWTHC.js.map +0 -1
- package/dist/chunk-LNQ6QMKG.js.map +0 -1
- package/dist/chunk-MNZ2NT5A.js.map +0 -1
- package/dist/chunk-Q6HJMJBH.js.map +0 -1
- package/dist/chunk-SQAU5QUY.js.map +0 -1
- package/dist/chunk-XCT2ZLA6.js.map +0 -1
- package/dist/chunk-XN5AYC5S.js.map +0 -1
- package/dist/chunk-ZYRW7FVY.js.map +0 -1
- /package/dist/{chunk-BQYIJOKS.js.map → chunk-2ZDTGI5V.js.map} +0 -0
- /package/dist/{chunk-VLNM4BTH.js.map → chunk-3LO5JWTC.js.map} +0 -0
- /package/dist/{chunk-MYOFULG4.js.map → chunk-3ORFVLI3.js.map} +0 -0
- /package/dist/{chunk-MJOXIENM.js.map → chunk-45OIUWGO.js.map} +0 -0
- /package/dist/{chunk-S7CAXRRP.js.map → chunk-4Y65Q3CR.js.map} +0 -0
- /package/dist/{chunk-ZLNKBKUB.js.map → chunk-5VVM2PPV.js.map} +0 -0
- /package/dist/{chunk-CRHQN42I.js.map → chunk-6CBYPMYQ.js.map} +0 -0
- /package/dist/{chunk-WXVHZHSJ.js.map → chunk-6RFL7HGI.js.map} +0 -0
- /package/dist/{chunk-GDUIT5I6.js.map → chunk-6TYSEAAT.js.map} +0 -0
- /package/dist/{chunk-C34GFGA5.js.map → chunk-72NOM3O2.js.map} +0 -0
- /package/dist/{chunk-3BR2CLAM.js.map → chunk-A3KY6NUA.js.map} +0 -0
- /package/dist/{chunk-2I5B5NNT.js.map → chunk-AX7UFG2U.js.map} +0 -0
- /package/dist/{chunk-PXH24VIP.js.map → chunk-B6IURHSZ.js.map} +0 -0
- /package/dist/{chunk-TXHJX2NG.js.map → chunk-BGYLL467.js.map} +0 -0
- /package/dist/{chunk-CZJLWCEG.js.map → chunk-BPYPUEM5.js.map} +0 -0
- /package/dist/{chunk-QISJKBCM.js.map → chunk-CDJPDZCA.js.map} +0 -0
- /package/dist/{chunk-5VZPVDUF.js.map → chunk-COSJTD6Z.js.map} +0 -0
- /package/dist/{chunk-Q6KXTTC4.js.map → chunk-CXA6UNFF.js.map} +0 -0
- /package/dist/{chunk-NKCKIGRL.js.map → chunk-DGMR3IMM.js.map} +0 -0
- /package/dist/{chunk-MUFI3ZXS.js.map → chunk-DQIQKIEA.js.map} +0 -0
- /package/dist/{chunk-747HBFGH.js.map → chunk-EE2LBAJH.js.map} +0 -0
- /package/dist/{chunk-RXYSP56G.js.map → chunk-ELYLG4F7.js.map} +0 -0
- /package/dist/{chunk-6YFMGNSA.js.map → chunk-ENK4XGKF.js.map} +0 -0
- /package/dist/{chunk-QTPKACVO.js.map → chunk-EY4LPLIR.js.map} +0 -0
- /package/dist/{chunk-LDMXHDZ5.js.map → chunk-FF55LRSV.js.map} +0 -0
- /package/dist/{chunk-HGBZZDP6.js.map → chunk-FJHNNSD3.js.map} +0 -0
- /package/dist/{chunk-ONZPM6FP.js.map → chunk-G7CFUI4I.js.map} +0 -0
- /package/dist/{chunk-KDIWFARU.js.map → chunk-GBB6XQ56.js.map} +0 -0
- /package/dist/{chunk-WWNXJMBX.js.map → chunk-GFBNUWT5.js.map} +0 -0
- /package/dist/{chunk-PLOOVF43.js.map → chunk-GGE7Y53F.js.map} +0 -0
- /package/dist/{chunk-7SZ3PFZW.js.map → chunk-HBAPVB7T.js.map} +0 -0
- /package/dist/{chunk-V7TPSQOH.js.map → chunk-HBZIN6IQ.js.map} +0 -0
- /package/dist/{chunk-LS42VJAI.js.map → chunk-HEDOL2RV.js.map} +0 -0
- /package/dist/{chunk-3AOOI2NR.js.map → chunk-HR7YTBR7.js.map} +0 -0
- /package/dist/{chunk-6HLRXICF.js.map → chunk-IAQFQNBL.js.map} +0 -0
- /package/dist/{chunk-PUBPZOQJ.js.map → chunk-IPE5FFFD.js.map} +0 -0
- /package/dist/{chunk-NVOQLMYF.js.map → chunk-IRDGC7FK.js.map} +0 -0
- /package/dist/{chunk-FSMQF5P5.js.map → chunk-IXZ44HJF.js.map} +0 -0
- /package/dist/{chunk-YVX7GGS4.js.map → chunk-JPDKRGYI.js.map} +0 -0
- /package/dist/{chunk-LFB4H7Y6.js.map → chunk-KNNBIXWJ.js.map} +0 -0
- /package/dist/{chunk-47DCYF4G.js.map → chunk-KSF7TLXH.js.map} +0 -0
- /package/dist/{chunk-I2S2GHEG.js.map → chunk-LUWATXU4.js.map} +0 -0
- /package/dist/{chunk-J7VY6KNP.js.map → chunk-M3RIC6JI.js.map} +0 -0
- /package/dist/{chunk-434EDUHY.js.map → chunk-MHFJBNDP.js.map} +0 -0
- /package/dist/{chunk-5KZESOK6.js.map → chunk-MUAVYVDJ.js.map} +0 -0
- /package/dist/{chunk-PRAGFBHW.js.map → chunk-N4WANJI3.js.map} +0 -0
- /package/dist/{chunk-LR2ECQSZ.js.map → chunk-O3OU2PPT.js.map} +0 -0
- /package/dist/{chunk-YROTCW42.js.map → chunk-O6J4CKS5.js.map} +0 -0
- /package/dist/{chunk-UPR7F3ML.js.map → chunk-PKJKA4CU.js.map} +0 -0
- /package/dist/{chunk-NI2ISQZI.js.map → chunk-PLK7UGO6.js.map} +0 -0
- /package/dist/{chunk-U7SO3N42.js.map → chunk-PMFW55F5.js.map} +0 -0
- /package/dist/{chunk-GPVB3FQP.js.map → chunk-PU3AAKRR.js.map} +0 -0
- /package/dist/{chunk-UN5D73A4.js.map → chunk-QETBO7EC.js.map} +0 -0
- /package/dist/{chunk-OLZTGVBT.js.map → chunk-REMK55JI.js.map} +0 -0
- /package/dist/{chunk-CPNSVIIB.js.map → chunk-RP3W6IQO.js.map} +0 -0
- /package/dist/{chunk-4QQVIGRG.js.map → chunk-RQ4EQ5FJ.js.map} +0 -0
- /package/dist/{chunk-QL7L6RHR.js.map → chunk-RX6DWIIW.js.map} +0 -0
- /package/dist/{chunk-RGBS6N72.js.map → chunk-SEH7KOVG.js.map} +0 -0
- /package/dist/{chunk-LUMF63BM.js.map → chunk-SFAP5EH5.js.map} +0 -0
- /package/dist/{chunk-GJQYM3PM.js.map → chunk-SHQWIDD5.js.map} +0 -0
- /package/dist/{chunk-NQCYVYP3.js.map → chunk-SLYZMJEL.js.map} +0 -0
- /package/dist/{chunk-HKROKM3Z.js.map → chunk-SM3NRN7L.js.map} +0 -0
- /package/dist/{chunk-XSJWN3WH.js.map → chunk-T53L42XW.js.map} +0 -0
- /package/dist/{chunk-NJS4WCHA.js.map → chunk-TPUIIZN2.js.map} +0 -0
- /package/dist/{chunk-ZPIFVTJA.js.map → chunk-TUAIPMU7.js.map} +0 -0
- /package/dist/{chunk-B5LNUTGZ.js.map → chunk-VJKRJYZL.js.map} +0 -0
- /package/dist/{chunk-7EGHRNIA.js.map → chunk-VVXRIPV5.js.map} +0 -0
- /package/dist/{chunk-HOJL2GKW.js.map → chunk-WC3W36AM.js.map} +0 -0
- /package/dist/{chunk-ARI5ZU75.js.map → chunk-WEH5TCPE.js.map} +0 -0
- /package/dist/{chunk-CESQKLIR.js.map → chunk-WFX5GASM.js.map} +0 -0
- /package/dist/{chunk-HIZCBYEP.js.map → chunk-WR6F6J43.js.map} +0 -0
- /package/dist/{chunk-MHJ52VJE.js.map → chunk-XSKVBGCZ.js.map} +0 -0
- /package/dist/{chunk-SE4Z3P6D.js.map → chunk-XULTDO56.js.map} +0 -0
- /package/dist/{chunk-K25MT3GZ.js.map → chunk-YVW7VPK4.js.map} +0 -0
- /package/dist/{chunk-XQ2BNVXL.js.map → chunk-ZBNTFWTG.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,EAAC,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAc,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,EAAC,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAc,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAqRtE,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2E1C,CAAC;AAGF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/RadioGroup/RadioGroup.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/RadioGroup/RadioGroup.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AA2FtE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,QAAQ,OAAO,EAAE,QAAQ,OAAO,KAAG,SAY3E,CAAC;AAuCH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,EAAE,OAAO,YAAY,KAAG,SAwB/D,CAAC;AA6CF,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,EAAE,OAAO,YAAY,KAAG,SAmBjE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,OAAO,KAAK,EACZ,QAAQ,OAAO,EACf,oBAAuB,KACtB,SAcF,CAAC;AAkBF,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,EAAE,OAAO,YAAY,KAAG,SA4BnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,wBAAwB,CAAC;AA4EjF,eAAO,MAAM,cAAc,4FAoE1B,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Select/Select.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Select/Select.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA8KlD,eAAO,MAAM,MAAM,iGAiFlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textarea/Textarea.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAwBxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textarea/Textarea.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAwBxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAoMtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA+E5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textarea/Textarea.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"Textarea.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textarea/Textarea.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AA6BtE,eAAO,MAAM,cAAc;;;;;UAU1B,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA6BF,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,EAAE,OAAO,MAAM,KAAG,eAa/D,CAAC;AAKF,eAAO,MAAM,sBAAsB,GAAI,iDAMpC;IACD,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,KAAG,SAuCH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaRichEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textarea/TextareaRichEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"TextareaRichEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Textarea/TextareaRichEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AA6T3D,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC;IACxC;;;;OAIG;IACH,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAyCA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Toggle/Toggle.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAgB,KAAK,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"Toggle.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Toggle/Toggle.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAgB,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAepF,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAiBD,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,EAAE,OAAO,MAAM,KAAG,aAqB/D,CAAC;AAUF,eAAO,MAAM,UAAU,GACrB,OAAO,KAAK,EACZ,cAAc,aAAa,EAC3B,YAAY,MAAM,KACjB,SAoED,CAAC;AAEH,eAAO,MAAM,aAAa,GACxB,eAAe,MAAM,GAAG,SAAS,EACjC,cAAc,aAAa,KAC1B,SA2BF,CAAC;AAEF,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,EACZ,cAAc,aAAa,EAC3B,2BAA2B,aAAa,KACvC,SA0BD,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Theme } from '@mui/material/styles/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* THE EDGE THAT TELLS YOU WHERE A FIELD IS.
|
|
4
|
+
*
|
|
5
|
+
* Every outlined control in this package drew its resting border from
|
|
6
|
+
* `alpha(theme.palette.divider, 0.23)` — or 0.2, or 0.18, or 0.42 for the
|
|
7
|
+
* underline. On the MUI default theme that expression is harmless, and that is
|
|
8
|
+
* exactly why it survived: MUI's own light `divider` is `rgba(0, 0, 0, 0.12)`,
|
|
9
|
+
* and `alpha()` REPLACES the alpha channel rather than multiplying it, so
|
|
10
|
+
* `alpha(divider, 0.23)` resolves to `rgba(0, 0, 0, 0.23)` — byte for byte the
|
|
11
|
+
* border MUI's own `OutlinedInput` ships. The line reads like a restatement of
|
|
12
|
+
* the default because, against the default, it is one.
|
|
13
|
+
*
|
|
14
|
+
* Give it a theme whose `divider` is an OPAQUE hex and the same expression
|
|
15
|
+
* collapses. A themed divider is already a hairline — a pale warm cream, a pale
|
|
16
|
+
* green-grey — chosen to separate two rows INSIDE a card. Fading that to 23%
|
|
17
|
+
* over the card it sits on leaves a border the same colour as the card:
|
|
18
|
+
*
|
|
19
|
+
* | theme | resolved border | ratio |
|
|
20
|
+
* |--------------------------------|-----------------|-------|
|
|
21
|
+
* | MUI default (`rgba(0,0,0,.12)`)| `#C4C4C4` | 1.74:1|
|
|
22
|
+
* | a warm hairline `#EBD9C7` | `#FAF6F2` | 1.08:1|
|
|
23
|
+
* | a cool hairline `#D7DDD5` | `#EDF0EC` | 1.06:1|
|
|
24
|
+
*
|
|
25
|
+
* 1.06:1 is not a faint border, it is no border: the field is invisible until
|
|
26
|
+
* you click into it. Both failing rows are real adopter themes, and neither
|
|
27
|
+
* adopter did anything wrong — they set `palette.divider`, which is what a theme
|
|
28
|
+
* is for.
|
|
29
|
+
*
|
|
30
|
+
* **So the fault is using `divider` for this at all**, not the alpha on top of
|
|
31
|
+
* it. Even at FULL strength those hairlines are 1.26:1 and 1.27:1 against their
|
|
32
|
+
* own paper. A row separator and a control boundary are different jobs with
|
|
33
|
+
* different floors, and only one of them has a number in the spec.
|
|
34
|
+
*
|
|
35
|
+
* ## The floor, and why it is measured rather than picked
|
|
36
|
+
*
|
|
37
|
+
* WCAG 2.1 SC 1.4.11 (Non-text Contrast) puts a control's own boundary at
|
|
38
|
+
* {@link MIN_UI_CONTRAST}. A hex cannot satisfy that on its own, because the
|
|
39
|
+
* ratio is a fact about a PAIR — the same border is fine on white and gone on a
|
|
40
|
+
* dark card. So {@link fieldEdge} takes the theme's hairline as a SEED and walks
|
|
41
|
+
* it away from the surface until it clears, which means:
|
|
42
|
+
*
|
|
43
|
+
* - a theme whose divider already clears keeps its own colour, untouched;
|
|
44
|
+
* - one that does not gets the nearest tone of ITS OWN hairline that does, so
|
|
45
|
+
* the border still looks like the theme's, just visible;
|
|
46
|
+
* - dark mode needs no second table — the walk lightens on a dark surface for
|
|
47
|
+
* the same reason it darkens on a light one.
|
|
48
|
+
*
|
|
49
|
+
* This is the argument `readableInk` makes for text in `@12-apps/app-shell`,
|
|
50
|
+
* applied to the boundary rather than the ink. It is not imported from there:
|
|
51
|
+
* that package depends on THIS one, so the edge would be a cycle.
|
|
52
|
+
*
|
|
53
|
+
* ## What this does NOT touch
|
|
54
|
+
*
|
|
55
|
+
* Hover and focus, which every control already draws in `primary.main` — a
|
|
56
|
+
* corrected brand colour that clears the floor by construction. The resting
|
|
57
|
+
* state was the only one you could not see, and it is the one that matters,
|
|
58
|
+
* because it is the state a field is in before anyone has found it.
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* WCAG 2.1 SC 1.4.11 — the contrast a control's own boundary owes the surface
|
|
62
|
+
* behind it.
|
|
63
|
+
*
|
|
64
|
+
* 3:1 rather than the 4.5:1 the same spec asks of body text: a border is a
|
|
65
|
+
* shape, not a glyph, so it stays findable at a lower ratio. It is a FLOOR and
|
|
66
|
+
* not a target — {@link fieldEdge} stops at the first tone that clears it, so a
|
|
67
|
+
* theme with a stronger hairline keeps the stronger one.
|
|
68
|
+
*/
|
|
69
|
+
export declare const MIN_UI_CONTRAST = 3;
|
|
70
|
+
/**
|
|
71
|
+
* The resting boundary for a form control on `surface`.
|
|
72
|
+
*
|
|
73
|
+
* `surface` defaults to `background.paper` because that is what a field sits on
|
|
74
|
+
* in the overwhelming majority of cases — a dialog, a card, a form panel. A
|
|
75
|
+
* control on a deliberately different ground (a tinted strip, a glass pane over
|
|
76
|
+
* a photo) should pass the ground it is actually on; the answer is only as good
|
|
77
|
+
* as the pair it is given.
|
|
78
|
+
*/
|
|
79
|
+
export declare function fieldEdge(theme: Theme, surface?: string): string;
|
|
80
|
+
//# sourceMappingURL=field-edge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-edge.d.ts","sourceRoot":"","sources":["../../../src/tokens/field-edge.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,IAAI,CAAC;AAkCjC;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAkBhE"}
|
package/dist/user-avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UserAvatar,
|
|
3
3
|
UserMenu
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DQIQKIEA.js";
|
|
5
5
|
import "./chunk-UDQSIRAP.js";
|
|
6
6
|
import "./chunk-QIV73V2X.js";
|
|
7
7
|
import "./chunk-LYNJJV2X.js";
|
|
@@ -12,9 +12,9 @@ import "./chunk-D2IASECY.js";
|
|
|
12
12
|
import "./chunk-VMF3UXM4.js";
|
|
13
13
|
import "./chunk-RI5JZLZL.js";
|
|
14
14
|
import "./chunk-BA4RHQ3B.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-NYUGX76C.js";
|
|
15
|
+
import "./chunk-IAQFQNBL.js";
|
|
17
16
|
import "./chunk-AUYC5K5K.js";
|
|
17
|
+
import "./chunk-NYUGX76C.js";
|
|
18
18
|
import "./chunk-VRHBJXZ7.js";
|
|
19
19
|
import "./chunk-PZ5AY32C.js";
|
|
20
20
|
export {
|
package/package.json
CHANGED
|
@@ -6,6 +6,8 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import type { AddressAutocompleteProps } from './AddressAutocomplete.types';
|
|
8
8
|
|
|
9
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
10
|
+
|
|
9
11
|
// Kept module-local on purpose: the inferred type of a styled() component cannot
|
|
10
12
|
// be named across a module boundary here (TS2742), so the plain component below
|
|
11
13
|
// is what the rest of the folder imports.
|
|
@@ -14,7 +16,7 @@ const GlassTextField = styled(TextField)(({ theme }) => ({
|
|
|
14
16
|
background: `linear-gradient(135deg, ${alpha(theme.palette.background.paper, 0.8)} 0%, ${alpha(theme.palette.background.paper, 0.6)} 100%)`,
|
|
15
17
|
backdropFilter: 'blur(10px)',
|
|
16
18
|
WebkitBackdropFilter: 'blur(10px)',
|
|
17
|
-
border: `1px solid ${
|
|
19
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
18
20
|
transition: theme.transitions.create(['border-color', 'box-shadow', 'background']),
|
|
19
21
|
'&:hover': {
|
|
20
22
|
background: `linear-gradient(135deg, ${alpha(theme.palette.background.paper, 0.9)} 0%, ${alpha(theme.palette.background.paper, 0.7)} 100%)`,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { alpha, type CSSObject, type Theme } from '@mui/material/styles/index.js';
|
|
2
2
|
|
|
3
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* The prototype's METRICS, verbatim.
|
|
5
7
|
*
|
|
@@ -51,7 +53,7 @@ export const triggerSx = (theme: Theme, selected: boolean, open: boolean): CSSOb
|
|
|
51
53
|
height: METRICS.triggerHeight,
|
|
52
54
|
padding: '0 10px 0 12px',
|
|
53
55
|
borderRadius: `${METRICS.triggerRadius}px`,
|
|
54
|
-
border: `1px solid ${open || selected ? brand.edge : theme
|
|
56
|
+
border: `1px solid ${open || selected ? brand.edge : fieldEdge(theme)}`,
|
|
55
57
|
background: selected ? brand.soft : theme.palette.background.paper,
|
|
56
58
|
color: selected ? brand.ink : theme.palette.text.primary,
|
|
57
59
|
font: 'inherit',
|
|
@@ -12,6 +12,8 @@ import { useCodeEditor } from './CodeEditor.hooks';
|
|
|
12
12
|
import type { CodeEditorProps } from './CodeEditor.types';
|
|
13
13
|
import { EditorToolbar } from './CodeEditorToolbar';
|
|
14
14
|
|
|
15
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
16
|
+
|
|
15
17
|
// Styled components
|
|
16
18
|
const EditorContainer = styled(Paper)(({ theme }) => ({
|
|
17
19
|
display: 'flex',
|
|
@@ -19,7 +21,7 @@ const EditorContainer = styled(Paper)(({ theme }) => ({
|
|
|
19
21
|
background: `linear-gradient(135deg, ${alpha(theme.palette.background.paper, 0.98)} 0%, ${alpha(theme.palette.background.paper, 0.95)} 100%)`,
|
|
20
22
|
backdropFilter: 'blur(10px)',
|
|
21
23
|
WebkitBackdropFilter: 'blur(10px)',
|
|
22
|
-
border: `1px solid ${
|
|
24
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
23
25
|
borderRadius: theme.shape.borderRadius * 2,
|
|
24
26
|
overflow: 'hidden' }));
|
|
25
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { Theme } from '@mui/material/styles/index.js';
|
|
4
4
|
import Autocomplete, { createFilterOptions } from '@mui/material/Autocomplete/index.js';
|
|
5
5
|
import type { AutocompleteRenderInputParams } from '@mui/material/Autocomplete/index.js';
|
|
6
6
|
import CircularProgress from '@mui/material/CircularProgress/index.js';
|
|
@@ -12,6 +12,8 @@ import { FormControl, FormLabel, FormMessage } from '../Form';
|
|
|
12
12
|
import type { CreatableSelectOption, CreatableSelectProps } from './CreatableSelect.types';
|
|
13
13
|
import type { SizeValue } from '../../../tokens/scales';
|
|
14
14
|
|
|
15
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
16
|
+
|
|
15
17
|
/** Internal option shape: a real option, or the synthetic "create new" row. */
|
|
16
18
|
interface InternalOption extends CreatableSelectOption {
|
|
17
19
|
/** True for the synthetic row that triggers {@link CreatableSelectProps.onCreate}. */
|
|
@@ -35,7 +37,7 @@ const MUI_SIZE = { xs: 'small', sm: 'small', md: 'medium', lg: 'medium', xl: 'me
|
|
|
35
37
|
const fieldSx = {
|
|
36
38
|
'& .MuiOutlinedInput-root': {
|
|
37
39
|
'& fieldset': {
|
|
38
|
-
borderColor: (theme:
|
|
40
|
+
borderColor: (theme: Theme) => fieldEdge(theme),
|
|
39
41
|
},
|
|
40
42
|
'&:hover fieldset': { borderColor: 'primary.main' },
|
|
41
43
|
'&.Mui-focused fieldset': { borderColor: 'primary.main', borderWidth: 2 },
|
|
@@ -3,6 +3,8 @@ import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
|
3
3
|
|
|
4
4
|
import type { InputProps } from './Input.types';
|
|
5
5
|
|
|
6
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
7
|
+
|
|
6
8
|
type InputVariant = NonNullable<InputProps['variant']>;
|
|
7
9
|
|
|
8
10
|
// Define pulse animation
|
|
@@ -90,7 +92,7 @@ export const inputBaseStyles = (theme: Theme, variant?: InputVariant): CSSObject
|
|
|
90
92
|
return {
|
|
91
93
|
backgroundColor: alpha(theme.palette.background.paper, 0.1),
|
|
92
94
|
backdropFilter: 'blur(20px)',
|
|
93
|
-
border: `1px solid ${
|
|
95
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
94
96
|
'&:hover': {
|
|
95
97
|
backgroundColor: alpha(theme.palette.background.paper, 0.15),
|
|
96
98
|
borderColor: alpha(theme.palette.primary.main, 0.3),
|
|
@@ -104,7 +106,7 @@ export const inputBaseStyles = (theme: Theme, variant?: InputVariant): CSSObject
|
|
|
104
106
|
case 'underline':
|
|
105
107
|
return {
|
|
106
108
|
'&:before': {
|
|
107
|
-
borderBottomColor:
|
|
109
|
+
borderBottomColor: fieldEdge(theme),
|
|
108
110
|
},
|
|
109
111
|
'&:hover:not(.Mui-disabled):before': {
|
|
110
112
|
borderBottomColor: theme.palette.primary.main,
|
|
@@ -155,7 +157,7 @@ const gradientStyles = (theme: Theme): CSSObject => ({
|
|
|
155
157
|
|
|
156
158
|
export const outlinedStyles = (theme: Theme): CSSObject => ({
|
|
157
159
|
'& fieldset': {
|
|
158
|
-
borderColor:
|
|
160
|
+
borderColor: fieldEdge(theme),
|
|
159
161
|
},
|
|
160
162
|
'&:hover fieldset': {
|
|
161
163
|
borderColor: theme.palette.primary.main,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { alpha } from '@mui/material/styles/index.js';
|
|
2
2
|
import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
3
3
|
|
|
4
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
5
|
+
|
|
4
6
|
interface ColorPalette {
|
|
5
7
|
main: string;
|
|
6
8
|
dark?: string;
|
|
@@ -82,7 +84,7 @@ export const otpSlotSx = (theme: Theme, flags: OtpSlotFlags): CSSObject => {
|
|
|
82
84
|
...(glass && {
|
|
83
85
|
backgroundColor: alpha(theme.palette.background.paper, 0.1),
|
|
84
86
|
backdropFilter: 'blur(20px)',
|
|
85
|
-
'& fieldset': { border: `1px solid ${
|
|
87
|
+
'& fieldset': { border: `1px solid ${fieldEdge(theme)}` },
|
|
86
88
|
}),
|
|
87
89
|
...(gradient && {
|
|
88
90
|
'&.Mui-focused fieldset': {
|
|
@@ -17,6 +17,8 @@ import { usePhoneInput } from './PhoneInput.hooks';
|
|
|
17
17
|
import type { CountryData,PhoneInputProps } from './PhoneInput.types';
|
|
18
18
|
import type { PhoneInputCopy } from '../../../copy';
|
|
19
19
|
|
|
20
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
21
|
+
|
|
20
22
|
// Country data with expanded support
|
|
21
23
|
|
|
22
24
|
// Styled components
|
|
@@ -25,7 +27,7 @@ const GlassTextField = styled(TextField)(({ theme }) => ({
|
|
|
25
27
|
background: `linear-gradient(135deg, ${alpha(theme.palette.background.paper, 0.8)} 0%, ${alpha(theme.palette.background.paper, 0.6)} 100%)`,
|
|
26
28
|
backdropFilter: 'blur(10px)',
|
|
27
29
|
WebkitBackdropFilter: 'blur(10px)',
|
|
28
|
-
border: `1px solid ${
|
|
30
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
29
31
|
transition: theme.transitions.create(['border-color', 'box-shadow', 'background']),
|
|
30
32
|
'&:hover': {
|
|
31
33
|
background: `linear-gradient(135deg, ${alpha(theme.palette.background.paper, 0.9)} 0%, ${alpha(theme.palette.background.paper, 0.7)} 100%)`,
|
|
@@ -3,6 +3,8 @@ import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
|
3
3
|
|
|
4
4
|
import { glowAnimation, rippleAnimation, scaleAnimation, slideAnimation } from './RadioGroup.animations';
|
|
5
5
|
|
|
6
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
7
|
+
|
|
6
8
|
interface ColorPalette {
|
|
7
9
|
main: string;
|
|
8
10
|
dark?: string;
|
|
@@ -119,7 +121,7 @@ const cardBase = (theme: Theme, flags: SurfaceFlags, palette: ColorPalette): CSS
|
|
|
119
121
|
return {
|
|
120
122
|
cursor: 'pointer',
|
|
121
123
|
transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
122
|
-
border: `2px solid ${selected ? palette.main :
|
|
124
|
+
border: `2px solid ${selected ? palette.main : fieldEdge(theme)}`,
|
|
123
125
|
backgroundColor: selected ? alpha(palette.main, 0.05) : theme.palette.background.paper,
|
|
124
126
|
position: 'relative' as const,
|
|
125
127
|
overflow: 'hidden' as const,
|
|
@@ -183,7 +185,7 @@ const buttonBase = (theme: Theme, flags: SurfaceFlags, palette: ColorPalette): C
|
|
|
183
185
|
borderRadius: theme.spacing(1),
|
|
184
186
|
transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
185
187
|
fontWeight: 500,
|
|
186
|
-
border: `2px solid ${selected ? palette.main :
|
|
188
|
+
border: `2px solid ${selected ? palette.main : fieldEdge(theme)}`,
|
|
187
189
|
backgroundColor: selected ? palette.main : 'transparent',
|
|
188
190
|
color: selected ? palette.contrastText || '#fff' : theme.palette.text.primary,
|
|
189
191
|
position: 'relative' as const,
|
|
@@ -8,6 +8,8 @@ import { useRichTextEditor } from './RichTextEditor.hooks';
|
|
|
8
8
|
import type { RichTextEditorProps, ToolbarConfig } from './RichTextEditor.types';
|
|
9
9
|
import { RichTextEditorToolbar } from './RichTextEditorToolbar';
|
|
10
10
|
|
|
11
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
12
|
+
|
|
11
13
|
const DEFAULT_TOOLBAR: Required<Omit<ToolbarConfig, 'customItems'>> & Pick<ToolbarConfig, 'customItems'> = {
|
|
12
14
|
bold: true,
|
|
13
15
|
italic: true,
|
|
@@ -68,7 +70,7 @@ const editorContentSx = (theme: Theme, disabled: boolean, placeholder?: string,
|
|
|
68
70
|
'& a': { color: theme.palette.primary.main, textDecoration: 'underline' } });
|
|
69
71
|
|
|
70
72
|
const shellSx = (theme: Theme, isFocused: boolean, disabled: boolean) => ({
|
|
71
|
-
border: `1px solid ${
|
|
73
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
72
74
|
borderRadius: 1,
|
|
73
75
|
overflow: 'hidden',
|
|
74
76
|
transition: 'border-color 0.2s ease-in-out',
|
|
@@ -8,6 +8,8 @@ import React from 'react';
|
|
|
8
8
|
|
|
9
9
|
import type { SelectProps } from './Select.types';
|
|
10
10
|
|
|
11
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
12
|
+
|
|
11
13
|
// Define pulse animation
|
|
12
14
|
const pulseAnimation = keyframes`
|
|
13
15
|
0% {
|
|
@@ -57,7 +59,7 @@ const pulseStyles = (theme: Theme): CSSObject => ({
|
|
|
57
59
|
const glassVariant = (theme: Theme): CSSObject => ({
|
|
58
60
|
backgroundColor: alpha(theme.palette.background.paper, 0.1),
|
|
59
61
|
backdropFilter: 'blur(20px)',
|
|
60
|
-
border: `1px solid ${
|
|
62
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
61
63
|
'& fieldset': { border: 'none' },
|
|
62
64
|
'&:hover': {
|
|
63
65
|
backgroundColor: alpha(theme.palette.background.paper, 0.15),
|
|
@@ -105,7 +107,7 @@ const gradientVariant = (theme: Theme): CSSObject => ({
|
|
|
105
107
|
|
|
106
108
|
/** `default` variant: standard outlined borders with hover/focus/error states. */
|
|
107
109
|
const defaultVariant = (theme: Theme): CSSObject => ({
|
|
108
|
-
'& fieldset': { borderColor:
|
|
110
|
+
'& fieldset': { borderColor: fieldEdge(theme) },
|
|
109
111
|
'&:hover fieldset': { borderColor: theme.palette.primary.main },
|
|
110
112
|
'&.Mui-focused fieldset': { borderColor: theme.palette.primary.main, borderWidth: 2 },
|
|
111
113
|
'&.Mui-error fieldset': { borderColor: theme.palette.error.main },
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { alpha, keyframes } from '@mui/material/styles/index.js';
|
|
2
2
|
import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
3
3
|
|
|
4
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
5
|
+
|
|
4
6
|
const glowAnimation = keyframes`
|
|
5
7
|
0% {
|
|
6
8
|
box-shadow: 0 0 5px currentColor;
|
|
@@ -107,7 +109,7 @@ const glassStyles = glass
|
|
|
107
109
|
? {
|
|
108
110
|
backgroundColor: alpha(theme.palette.background.paper, 0.1),
|
|
109
111
|
backdropFilter: 'blur(20px)',
|
|
110
|
-
border: `1px solid ${
|
|
112
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
111
113
|
'&:hover': {
|
|
112
114
|
backgroundColor: alpha(theme.palette.background.paper, 0.15),
|
|
113
115
|
backdropFilter: 'blur(25px)',
|
|
@@ -30,6 +30,8 @@ const TextareaRichEditor = lazy(async () => ({
|
|
|
30
30
|
default: (await import('./TextareaRichEditor')).TextareaRichEditor }));
|
|
31
31
|
import type { TextareaProps } from './Textarea.types';
|
|
32
32
|
|
|
33
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
34
|
+
|
|
33
35
|
// Interface for styled component props
|
|
34
36
|
interface StyledTextareaProps {
|
|
35
37
|
customVariant?: string;
|
|
@@ -71,7 +73,7 @@ const StyledTextarea = styled(TextareaAutosize, {
|
|
|
71
73
|
width: '100%',
|
|
72
74
|
fontFamily: theme.typography.fontFamily,
|
|
73
75
|
borderRadius: theme.spacing(1),
|
|
74
|
-
border: `2px solid ${error ? errorColor.main : theme
|
|
76
|
+
border: `2px solid ${error ? errorColor.main : fieldEdge(theme)}`,
|
|
75
77
|
backgroundColor: theme.palette.background.paper,
|
|
76
78
|
color: theme.palette.text.primary,
|
|
77
79
|
transition: 'all 0.3s ease',
|
|
@@ -108,7 +110,7 @@ const StyledLabel = styled(InputLabel, {
|
|
|
108
110
|
backdropFilter: 'blur(10px)',
|
|
109
111
|
padding: '4px 8px',
|
|
110
112
|
borderRadius: '4px',
|
|
111
|
-
border: `1px solid ${
|
|
113
|
+
border: `1px solid ${fieldEdge(theme)}`,
|
|
112
114
|
display: 'inline-block' }) }));
|
|
113
115
|
|
|
114
116
|
// IconWrapper - replaced with inline Box component for better TypeScript compatibility
|
|
@@ -19,6 +19,8 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
19
19
|
import { floatAnimation, getColorFromTheme } from './Textarea.styles';
|
|
20
20
|
import type { RichEditorToolbarCopy } from '../../../copy';
|
|
21
21
|
|
|
22
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
23
|
+
|
|
22
24
|
const RichToolbar = styled(Box)<{ glass?: boolean }>(({ theme, glass }) => ({
|
|
23
25
|
display: 'flex',
|
|
24
26
|
alignItems: 'center',
|
|
@@ -104,7 +106,7 @@ const ContentEditableDiv = styled('div')<{
|
|
|
104
106
|
minHeight: '120px',
|
|
105
107
|
padding: theme.spacing(1.5),
|
|
106
108
|
borderRadius: `0 0 ${theme.spacing(1)} ${theme.spacing(1)}`,
|
|
107
|
-
border: `2px solid ${error ? errorColor.main : focused ? colorPalette.main : theme
|
|
109
|
+
border: `2px solid ${error ? errorColor.main : focused ? colorPalette.main : fieldEdge(theme)}`,
|
|
108
110
|
borderTop: 'none',
|
|
109
111
|
backgroundColor: glass
|
|
110
112
|
? alpha(theme.palette.background.paper, 0.1)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { alpha, keyframes } from '@mui/material/styles/index.js';
|
|
2
2
|
import type { CSSObject, PaletteColor, Theme } from '@mui/material/styles/index.js';
|
|
3
3
|
|
|
4
|
+
import { fieldEdge } from '../../../tokens/field-edge';
|
|
5
|
+
|
|
4
6
|
const glowAnimation = keyframes`
|
|
5
7
|
0% { box-shadow: 0 0 5px currentColor; }
|
|
6
8
|
50% { box-shadow: 0 0 15px currentColor, 0 0 25px currentColor; }
|
|
@@ -74,7 +76,7 @@ export const baseStyles = (
|
|
|
74
76
|
fontWeight: 500,
|
|
75
77
|
borderRadius: theme.spacing(1),
|
|
76
78
|
transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
77
|
-
border: `2px solid ${
|
|
79
|
+
border: `2px solid ${fieldEdge(theme)}`,
|
|
78
80
|
color: theme.palette.text.primary,
|
|
79
81
|
backgroundColor: 'transparent',
|
|
80
82
|
position: 'relative',
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import {
|
|
2
|
+
darken,
|
|
3
|
+
decomposeColor,
|
|
4
|
+
getContrastRatio,
|
|
5
|
+
getLuminance,
|
|
6
|
+
hslToRgb,
|
|
7
|
+
lighten,
|
|
8
|
+
recomposeColor,
|
|
9
|
+
} from '@mui/material/styles/index.js';
|
|
10
|
+
import type { Theme } from '@mui/material/styles/index.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* THE EDGE THAT TELLS YOU WHERE A FIELD IS.
|
|
14
|
+
*
|
|
15
|
+
* Every outlined control in this package drew its resting border from
|
|
16
|
+
* `alpha(theme.palette.divider, 0.23)` — or 0.2, or 0.18, or 0.42 for the
|
|
17
|
+
* underline. On the MUI default theme that expression is harmless, and that is
|
|
18
|
+
* exactly why it survived: MUI's own light `divider` is `rgba(0, 0, 0, 0.12)`,
|
|
19
|
+
* and `alpha()` REPLACES the alpha channel rather than multiplying it, so
|
|
20
|
+
* `alpha(divider, 0.23)` resolves to `rgba(0, 0, 0, 0.23)` — byte for byte the
|
|
21
|
+
* border MUI's own `OutlinedInput` ships. The line reads like a restatement of
|
|
22
|
+
* the default because, against the default, it is one.
|
|
23
|
+
*
|
|
24
|
+
* Give it a theme whose `divider` is an OPAQUE hex and the same expression
|
|
25
|
+
* collapses. A themed divider is already a hairline — a pale warm cream, a pale
|
|
26
|
+
* green-grey — chosen to separate two rows INSIDE a card. Fading that to 23%
|
|
27
|
+
* over the card it sits on leaves a border the same colour as the card:
|
|
28
|
+
*
|
|
29
|
+
* | theme | resolved border | ratio |
|
|
30
|
+
* |--------------------------------|-----------------|-------|
|
|
31
|
+
* | MUI default (`rgba(0,0,0,.12)`)| `#C4C4C4` | 1.74:1|
|
|
32
|
+
* | a warm hairline `#EBD9C7` | `#FAF6F2` | 1.08:1|
|
|
33
|
+
* | a cool hairline `#D7DDD5` | `#EDF0EC` | 1.06:1|
|
|
34
|
+
*
|
|
35
|
+
* 1.06:1 is not a faint border, it is no border: the field is invisible until
|
|
36
|
+
* you click into it. Both failing rows are real adopter themes, and neither
|
|
37
|
+
* adopter did anything wrong — they set `palette.divider`, which is what a theme
|
|
38
|
+
* is for.
|
|
39
|
+
*
|
|
40
|
+
* **So the fault is using `divider` for this at all**, not the alpha on top of
|
|
41
|
+
* it. Even at FULL strength those hairlines are 1.26:1 and 1.27:1 against their
|
|
42
|
+
* own paper. A row separator and a control boundary are different jobs with
|
|
43
|
+
* different floors, and only one of them has a number in the spec.
|
|
44
|
+
*
|
|
45
|
+
* ## The floor, and why it is measured rather than picked
|
|
46
|
+
*
|
|
47
|
+
* WCAG 2.1 SC 1.4.11 (Non-text Contrast) puts a control's own boundary at
|
|
48
|
+
* {@link MIN_UI_CONTRAST}. A hex cannot satisfy that on its own, because the
|
|
49
|
+
* ratio is a fact about a PAIR — the same border is fine on white and gone on a
|
|
50
|
+
* dark card. So {@link fieldEdge} takes the theme's hairline as a SEED and walks
|
|
51
|
+
* it away from the surface until it clears, which means:
|
|
52
|
+
*
|
|
53
|
+
* - a theme whose divider already clears keeps its own colour, untouched;
|
|
54
|
+
* - one that does not gets the nearest tone of ITS OWN hairline that does, so
|
|
55
|
+
* the border still looks like the theme's, just visible;
|
|
56
|
+
* - dark mode needs no second table — the walk lightens on a dark surface for
|
|
57
|
+
* the same reason it darkens on a light one.
|
|
58
|
+
*
|
|
59
|
+
* This is the argument `readableInk` makes for text in `@12-apps/app-shell`,
|
|
60
|
+
* applied to the boundary rather than the ink. It is not imported from there:
|
|
61
|
+
* that package depends on THIS one, so the edge would be a cycle.
|
|
62
|
+
*
|
|
63
|
+
* ## What this does NOT touch
|
|
64
|
+
*
|
|
65
|
+
* Hover and focus, which every control already draws in `primary.main` — a
|
|
66
|
+
* corrected brand colour that clears the floor by construction. The resting
|
|
67
|
+
* state was the only one you could not see, and it is the one that matters,
|
|
68
|
+
* because it is the state a field is in before anyone has found it.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* WCAG 2.1 SC 1.4.11 — the contrast a control's own boundary owes the surface
|
|
73
|
+
* behind it.
|
|
74
|
+
*
|
|
75
|
+
* 3:1 rather than the 4.5:1 the same spec asks of body text: a border is a
|
|
76
|
+
* shape, not a glyph, so it stays findable at a lower ratio. It is a FLOOR and
|
|
77
|
+
* not a target — {@link fieldEdge} stops at the first tone that clears it, so a
|
|
78
|
+
* theme with a stronger hairline keeps the stronger one.
|
|
79
|
+
*/
|
|
80
|
+
export const MIN_UI_CONTRAST = 3;
|
|
81
|
+
|
|
82
|
+
/** How far one step of the walk moves, and how many steps before it gives up. */
|
|
83
|
+
const STEP = 0.05;
|
|
84
|
+
const MAX_STEPS = 20;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* A colour as an opaque `rgb()`, with any translucency resolved against
|
|
88
|
+
* `surface`.
|
|
89
|
+
*
|
|
90
|
+
* Needed because `getContrastRatio` reads the channels it is given and ignores
|
|
91
|
+
* the alpha, so handing it an `rgba()` measures a colour nobody sees. Every
|
|
92
|
+
* failing border above was translucent, so skipping this would compute the ratio
|
|
93
|
+
* of the hairline itself — 1.26:1, still a failure, but the wrong number for the
|
|
94
|
+
* wrong reason.
|
|
95
|
+
*/
|
|
96
|
+
function flatten(colour: string, surface: string): string {
|
|
97
|
+
const decomposed = decomposeColor(colour);
|
|
98
|
+
const rgb = decomposed.type.startsWith('hsl')
|
|
99
|
+
? decomposeColor(hslToRgb(colour))
|
|
100
|
+
: decomposed;
|
|
101
|
+
const [r, g, b] = rgb.values;
|
|
102
|
+
const alpha = rgb.values[3] ?? 1;
|
|
103
|
+
if (alpha >= 1) return recomposeColor({ type: 'rgb', values: [r, g, b] });
|
|
104
|
+
|
|
105
|
+
const behind = decomposeColor(surface);
|
|
106
|
+
const base = behind.type.startsWith('hsl') ? decomposeColor(hslToRgb(surface)) : behind;
|
|
107
|
+
const blend = (fg: number, bg: number): number => Math.round(alpha * fg + (1 - alpha) * bg);
|
|
108
|
+
return recomposeColor({
|
|
109
|
+
type: 'rgb',
|
|
110
|
+
values: [blend(r, base.values[0]), blend(g, base.values[1]), blend(b, base.values[2])],
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The resting boundary for a form control on `surface`.
|
|
116
|
+
*
|
|
117
|
+
* `surface` defaults to `background.paper` because that is what a field sits on
|
|
118
|
+
* in the overwhelming majority of cases — a dialog, a card, a form panel. A
|
|
119
|
+
* control on a deliberately different ground (a tinted strip, a glass pane over
|
|
120
|
+
* a photo) should pass the ground it is actually on; the answer is only as good
|
|
121
|
+
* as the pair it is given.
|
|
122
|
+
*/
|
|
123
|
+
export function fieldEdge(theme: Theme, surface?: string): string {
|
|
124
|
+
const ground = flatten(surface ?? theme.palette.background.paper, '#FFFFFF');
|
|
125
|
+
const seed = flatten(theme.palette.divider, ground);
|
|
126
|
+
if (getContrastRatio(seed, ground) >= MIN_UI_CONTRAST) return seed;
|
|
127
|
+
|
|
128
|
+
// Away from the surface, whichever way that is — so one rule serves both
|
|
129
|
+
// modes, and a dark card in a light theme is still handled by the pair rather
|
|
130
|
+
// than by `palette.mode`.
|
|
131
|
+
const away = getLuminance(ground) > 0.5 ? darken : lighten;
|
|
132
|
+
for (let step = 1; step <= MAX_STEPS; step += 1) {
|
|
133
|
+
// From the SEED each time rather than compounding the previous result, so
|
|
134
|
+
// the walk lands on the nearest passing tone instead of overshooting past it.
|
|
135
|
+
const candidate = away(seed, step * STEP);
|
|
136
|
+
if (getContrastRatio(candidate, ground) >= MIN_UI_CONTRAST) return candidate;
|
|
137
|
+
}
|
|
138
|
+
// Unreachable for any real surface — black clears 21:1 on white and white
|
|
139
|
+
// clears it on black — but a caller must never be handed `undefined`.
|
|
140
|
+
return getLuminance(ground) > 0.5 ? '#000000' : '#FFFFFF';
|
|
141
|
+
}
|