@okta/odyssey-contribution-tooling 1.51.0 → 1.52.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/CHANGELOG.md +6 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/appswitcher/admin-app-default.svg +0 -6
- package/dist/appswitcher/admin-app-selected.svg +0 -6
- package/dist/appswitcher/aerial-default.svg +0 -7
- package/dist/appswitcher/aerial-selected.svg +0 -7
- package/dist/appswitcher/okta-dashboard-default.svg +0 -7
- package/dist/appswitcher/okta-dashboard-selected.svg +0 -7
- package/dist/appswitcher/privileged-access-default.svg +0 -4
- package/dist/appswitcher/privileged-access-selected.svg +0 -4
- package/dist/appswitcher/workflows-default.svg +0 -5
- package/dist/appswitcher/workflows-selected.svg +0 -5
- package/dist/assets/Accordion-B6lMitah.js +0 -1
- package/dist/assets/Accordion.stories-jXyeMqKL.js +0 -85
- package/dist/assets/AccordionSummary-Cqqnyfeq.js +0 -1
- package/dist/assets/AddCircle-DYQ5ipEw.js +0 -1
- package/dist/assets/AlertTitle-BdgyvdT3.js +0 -1
- package/dist/assets/AppSwitcher-BP7OhkNx.js +0 -21
- package/dist/assets/AppSwitcher.stories-BX6iWIVF.js +0 -100
- package/dist/assets/AppTile _labs_.stories-D_lkwc9S.js +0 -136
- package/dist/assets/ArrowDropDown-CSyg-khO.js +0 -1
- package/dist/assets/ArrowRight-D4RDomjP.js +0 -1
- package/dist/assets/Autocomplete-CWMUllEE.js +0 -1
- package/dist/assets/Autocomplete-Ce5vsFXe.js +0 -1
- package/dist/assets/Autocomplete.stories-LgPoixE-.js +0 -316
- package/dist/assets/Badge-CgiaxC_M.js +0 -11
- package/dist/assets/Banner-CiZg662S.js +0 -1
- package/dist/assets/Banner.stories-L9TxJM5n.js +0 -96
- package/dist/assets/BaseButton-CPts8Xl1.js +0 -11
- package/dist/assets/BaseMenuButton-Cg0erRE5.js +0 -1
- package/dist/assets/Box-C-xmRxaS.js +0 -1
- package/dist/assets/Box-DS6ZmQE1.js +0 -11
- package/dist/assets/Box-XLjSpNxK.js +0 -1
- package/dist/assets/Box.stories-DlaC0I8z.js +0 -38
- package/dist/assets/Breadcrumb.stories-CU9cbFv5.js +0 -19
- package/dist/assets/BreadcrumbList.stories-BnLz8AbT.js +0 -77
- package/dist/assets/Breadcrumbs-24mVV2FV.js +0 -6
- package/dist/assets/Bug-BREzSHBD.js +0 -1
- package/dist/assets/Button-NJfX6YsF.js +0 -11
- package/dist/assets/Button-dStBbGjZ.js +0 -1
- package/dist/assets/Button.stories-DyHE1lVq.js +0 -271
- package/dist/assets/ButtonBase-Wolvis_2.js +0 -74
- package/dist/assets/Calendar-Cnn3LZfc.js +0 -1
- package/dist/assets/Call-B2-IhRdM.js +0 -1
- package/dist/assets/Callout-CHhRxeIB.js +0 -1
- package/dist/assets/Callout.stories-Cin_Q8VN.js +0 -250
- package/dist/assets/Card-CW2-4q6G.js +0 -1
- package/dist/assets/Card-HHKQqwm3.js +0 -8
- package/dist/assets/Card.stories-BGl8ssIa.js +0 -56
- package/dist/assets/CardActionArea-CmY1RMSI.js +0 -1
- package/dist/assets/CardActions-BOMzzZ-s.js +0 -1
- package/dist/assets/Checkbox-DGd8S5xK.js +0 -1
- package/dist/assets/Checkbox-LVOv88W2.js +0 -1
- package/dist/assets/Checkbox.stories-D6P6eT12.js +0 -113
- package/dist/assets/CheckboxGroup-BbhvyMBP.js +0 -1
- package/dist/assets/CheckboxGroup.stories-C8yW7qIA.js +0 -89
- package/dist/assets/ChevronRight-BEaWGMzi.js +0 -1
- package/dist/assets/ChevronUp-BclvDZ6e.js +0 -1
- package/dist/assets/Chip-p4lq04qX.js +0 -1
- package/dist/assets/CircularProgress-BOLg_ZK_.js +0 -28
- package/dist/assets/CircularProgress-DxmJkz2B.js +0 -1
- package/dist/assets/CircularProgress.stories-BzOGzmX1.js +0 -44
- package/dist/assets/Clock-dOo7_xs2.js +0 -1
- package/dist/assets/Close-DWj_zrWe.js +0 -1
- package/dist/assets/Code Styling Guidelines-CFH47C47.js +0 -14
- package/dist/assets/Collapse-Bf9rwi0n.js +0 -1
- package/dist/assets/Color-YHDXOIA2-XSMM8EzF.js +0 -1
- package/dist/assets/CssBaseline-BGmj7vII.js +0 -191
- package/dist/assets/CssBaseline.stories-CP5iNADe.js +0 -364
- package/dist/assets/Custom Theming-AWFd82gK.js +0 -135
- package/dist/assets/Custom Theming.stories-C1lIShsm.js +0 -95
- package/dist/assets/DataFilters _labs_-CbOuA1XC.js +0 -55
- package/dist/assets/DataFilters _labs_.stories-6lSpygV-.js +0 -31
- package/dist/assets/DataFilters-B56b7pp1.js +0 -1
- package/dist/assets/DataTable _labs_-DhjIky-X.js +0 -41
- package/dist/assets/DataTable _labs_.stories-SmL2caYK.js +0 -21
- package/dist/assets/DataTable-Dufh-85W.js +0 -404
- package/dist/assets/DataTable-OEqPccZc.js +0 -21
- package/dist/assets/DataTable.stories-B6pas1e4.js +0 -438
- package/dist/assets/DataView _labs_-D-jpJC9O.js +0 -332
- package/dist/assets/DataView _labs_.stories-CEQuFgsA.js +0 -438
- package/dist/assets/DataView-Cdrj2-_S.js +0 -91
- package/dist/assets/DataView.stories-C3-uJ4p2.js +0 -954
- package/dist/assets/DatePicker-BxTRZXpL.js +0 -1
- package/dist/assets/DatePicker-CV_LiOVN.js +0 -11
- package/dist/assets/DatePicker.stories-CybR6XBy.js +0 -133
- package/dist/assets/DateTimePicker-DFQrMMgz.js +0 -1
- package/dist/assets/DateTimePicker.stories-Bx4peuGE.js +0 -158
- package/dist/assets/Design Tokens-iEdY5-4y.js +0 -4
- package/dist/assets/Dialog-B5LWaL0C.js +0 -1
- package/dist/assets/Dialog.stories-M1TA90dU.js +0 -207
- package/dist/assets/DialogContent-DBoG8cPo.js +0 -1
- package/dist/assets/DialogTitle-6m4SWKSG.js +0 -1
- package/dist/assets/Divider-CtIp4StC.js +0 -1
- package/dist/assets/Divider.stories-DjRXEk1s.js +0 -5
- package/dist/assets/DocsRenderer-CFRXHY34-P8M6yttG.js +0 -2
- package/dist/assets/Documentation-D90FkF1l.js +0 -1
- package/dist/assets/Download-xLlaDLdW.js +0 -1
- package/dist/assets/Drawer-D3_c8kSj.js +0 -33
- package/dist/assets/Drawer.stories-D5ZaAWIB.js +0 -95
- package/dist/assets/EmptyState-BRinTaKa.js +0 -11
- package/dist/assets/EmptyState.stories-D-MGLqky.js +0 -11
- package/dist/assets/ExampleButton.stories-lZAq-r_i.js +0 -320
- package/dist/assets/Extending Translations-iDMcBEO1.js +0 -148
- package/dist/assets/ExternalLink-C7UPr4SL.js +0 -1
- package/dist/assets/Fade-DSMklDt3.js +0 -1
- package/dist/assets/Field-BVmhMv9m.js +0 -11
- package/dist/assets/FieldHint-BFs7d7f5.js +0 -1
- package/dist/assets/Fieldset-C7cnRgpz.js +0 -11
- package/dist/assets/Fieldset.stories-QZ3FrfNb.js +0 -15
- package/dist/assets/FileUploader.stories-CAXhIDLt.js +0 -58
- package/dist/assets/Filter-DIh5C0Cq.js +0 -1
- package/dist/assets/Folder-DTgm0zQ0.js +0 -1
- package/dist/assets/Form Field Accessibility-C_uLQOBv.js +0 -18
- package/dist/assets/Form-EZzJYIT7.js +0 -11
- package/dist/assets/Form.stories-D9GPQhfS.js +0 -69
- package/dist/assets/FormControlLabel-0yOoM5iA.js +0 -1
- package/dist/assets/FormGroup-B2pOz0HL.js +0 -1
- package/dist/assets/FormHelperText-CZEj6vhF.js +0 -1
- package/dist/assets/FormLabel-C4KesWyd.js +0 -1
- package/dist/assets/FullScreenOverlay-CbLDrzu3.js +0 -11
- package/dist/assets/Generating Icons-BlpStA4N.js +0 -16
- package/dist/assets/Globe-CLLXW_yR.js +0 -1
- package/dist/assets/Grid-CTO70W_E.js +0 -1
- package/dist/assets/Group-BQH7lDPW.js +0 -1
- package/dist/assets/GroupPicker _labs_.stories-D-jPedqU.js +0 -33
- package/dist/assets/Grow-CbLflC0D.js +0 -1
- package/dist/assets/Hide-E3YBylpY.js +0 -1
- package/dist/assets/Hint-qhf1AEE0.js +0 -11
- package/dist/assets/HintLink.stories-CYlMoTFx.js +0 -44
- package/dist/assets/Home-yAl98ghs.js +0 -1
- package/dist/assets/Icon _icons_.stories-D-AWLuB9.js +0 -16
- package/dist/assets/IconButton-DwJqCevw.js +0 -1
- package/dist/assets/IconWithTooltip _icons_.stories-DE5HwN5H.js +0 -19
- package/dist/assets/InformationCircle-By7rXsxW.js +0 -1
- package/dist/assets/InputAdornment-CrT6j38e.js +0 -1
- package/dist/assets/InputBase-Cc2rXj8N.js +0 -2
- package/dist/assets/Installing odyssey-react-mui-BXo5U9tZ.js +0 -216
- package/dist/assets/Introduction-DJ-EDw1b.js +0 -36
- package/dist/assets/Layout-DfnguYJ3.js +0 -11
- package/dist/assets/Layout.stories-DGtK-sb4.js +0 -285
- package/dist/assets/Legacy Migrations-BvJnbBns.js +0 -86
- package/dist/assets/Link-B0jVOXLw.js +0 -1
- package/dist/assets/Link-CaBVKAGj.js +0 -11
- package/dist/assets/Link-LYj8-DeM.js +0 -1
- package/dist/assets/Link-P2sjP-aD.js +0 -1
- package/dist/assets/Link.stories-i53_1Tpy.js +0 -38
- package/dist/assets/List-BcG-NsbC.js +0 -1
- package/dist/assets/List-DFK8p7ZW.js +0 -1
- package/dist/assets/ListItem-Bv1M9lel.js +0 -1
- package/dist/assets/ListSubheader-CBvKBAKL.js +0 -1
- package/dist/assets/ListSubheader.stories-C_l7xOCL.js +0 -5
- package/dist/assets/Menu-g2Uj1mcn.js +0 -1
- package/dist/assets/MenuButton-BAmmLodS.js +0 -11
- package/dist/assets/MenuButton.stories-CQVVoTy1.js +0 -246
- package/dist/assets/MenuContext-DKMyPMNY.js +0 -11
- package/dist/assets/MenuItem-CJ8f1-Gg.js +0 -1
- package/dist/assets/MenuItem-DR63CY7B.js +0 -1
- package/dist/assets/MenuItem.stories-BOWN4pFz.js +0 -38
- package/dist/assets/MenuList-sllDVDo3.js +0 -1
- package/dist/assets/Modal-D0XtQHFw.js +0 -1
- package/dist/assets/More-CXrgFSVS.js +0 -1
- package/dist/assets/MuiPropsContext-DhRylJZk.js +0 -11
- package/dist/assets/NativeSelect.stories-SugLBKz7.js +0 -173
- package/dist/assets/Notification-08pZljJb.js +0 -1
- package/dist/assets/OdysseyProvider-YUKfsUrL.js +0 -76
- package/dist/assets/OdysseyStorybookThemeDecorator-DsQ8XVOG.js +0 -1
- package/dist/assets/OdysseyThemeProvider-uYQ_l8PJ.js +0 -189
- package/dist/assets/PageHeader.stories-Bl-DdoS-.js +0 -364
- package/dist/assets/PageHeader.stories-CloMCl88.js +0 -57
- package/dist/assets/PageTemplate _labs_-Dm7sBdz9.js +0 -8
- package/dist/assets/PageTemplate _labs_.stories-Cz0PIbrs.js +0 -306
- package/dist/assets/PageTemplate-Bst4OydU.js +0 -21
- package/dist/assets/PageTemplate.stories-CeRObmlQ.js +0 -205
- package/dist/assets/PaginatedTable _labs_.stories-UxmUHrH9.js +0 -65
- package/dist/assets/Pagination-iboAjua_.js +0 -11
- package/dist/assets/Pagination.stories-BCbuKsR4.js +0 -17
- package/dist/assets/Paper-BGSgbZC6.js +0 -1
- package/dist/assets/PasswordField.stories-DKFTzpqb.js +0 -121
- package/dist/assets/Picker _labs_.stories-BPfssL8O.js +0 -18
- package/dist/assets/PickerWithOptionAdornment _labs_.stories-rMUH3rtj.js +0 -70
- package/dist/assets/PlaceholderLogo-JfVvgA23.js +0 -11
- package/dist/assets/Popper-vW9B5iyN.js +0 -1
- package/dist/assets/Portal-ev1Y_qJb.js +0 -1
- package/dist/assets/ProgressBar.stories-VEY_ihAE.js +0 -311
- package/dist/assets/Radio-4dniU8ku.js +0 -1
- package/dist/assets/Radio-CnmlQGNx.js +0 -1
- package/dist/assets/Radio.stories-DyJFXoBq.js +0 -63
- package/dist/assets/RadioGroup-C_VrT_hm.js +0 -10
- package/dist/assets/RadioGroup-DxwohQ69.js +0 -1
- package/dist/assets/RadioGroup-GPUhtH5i.js +0 -1
- package/dist/assets/RadioGroup.stories-pF3uSMSb.js +0 -138
- package/dist/assets/Refresh-djvJkW-o.js +0 -1
- package/dist/assets/ResourceAccessPolicyComponentsStorybookThemeDecorator-CmW-AnrB.js +0 -212
- package/dist/assets/Right-to-Left (RTL)-DpiFoQRN.js +0 -62
- package/dist/assets/ScreenReaderText-CQNs2mcT.js +0 -1
- package/dist/assets/ScreenReaderText-DgymQTv2.js +0 -15
- package/dist/assets/ScreenReaderText.stories-DCOADRMP.js +0 -8
- package/dist/assets/Search-BdL9PIj1.js +0 -1
- package/dist/assets/SearchDropdown _labs_.stories-DISXh7bC.js +0 -53
- package/dist/assets/SearchField-C-y7eHW0.js +0 -1
- package/dist/assets/SearchField.stories-7IOflkmE.js +0 -37
- package/dist/assets/Select-BcdWA_SU.js +0 -1
- package/dist/assets/Select-mT9rgyNE.js +0 -15
- package/dist/assets/Select.stories-CBn0BmaJ.js +0 -233
- package/dist/assets/Server-BjJU0LGG.js +0 -1
- package/dist/assets/Settings-CjZSn0DO.js +0 -1
- package/dist/assets/Setup-B9xdxAqK.js +0 -7
- package/dist/assets/Shadow DOM-DQqEg_OE.js +0 -64
- package/dist/assets/Show-Blc9FMhI.js +0 -1
- package/dist/assets/SideNav-VVxkM7xa.js +0 -85
- package/dist/assets/SideNav-a8fqWzAH.js +0 -131
- package/dist/assets/SideNav.stories-C0ROmHeE.js +0 -207
- package/dist/assets/Skeleton-BSJpuJ78.js +0 -51
- package/dist/assets/Snackbar-BY4-2ak2.js +0 -1
- package/dist/assets/Stack-Co_ZNMgX.js +0 -1
- package/dist/assets/Stack-jRk0Yp6q.js +0 -1
- package/dist/assets/Stack.stories-Dt0hIC8B.js +0 -1
- package/dist/assets/StaticTable _labs_.stories-Dwx7A_WU.js +0 -34
- package/dist/assets/Status-BbCnhdhJ.js +0 -1
- package/dist/assets/Status.stories-DW2Kp-Dt.js +0 -66
- package/dist/assets/Stepper.stories-DDaIDnwk.js +0 -564
- package/dist/assets/Surface-Ceuyc0F6.js +0 -1
- package/dist/assets/Switch.stories-bT5JBB7t.js +0 -72
- package/dist/assets/SwitchBase-DDdOwpAs.js +0 -1
- package/dist/assets/Sync-BUHhhjqx.js +0 -1
- package/dist/assets/Tabs-AOq_ZOqc.js +0 -1
- package/dist/assets/Tabs-DAl04bRj.js +0 -23
- package/dist/assets/Tabs.stories-nDuOOblr.js +0 -100
- package/dist/assets/Tag-DPyljaiU.js +0 -11
- package/dist/assets/Tag.stories-dG5LwGHg.js +0 -96
- package/dist/assets/TagList-DcY5amcr.js +0 -1
- package/dist/assets/TextField-DvELiaRt.js +0 -1
- package/dist/assets/TextField.stories-B8dPipzE.js +0 -177
- package/dist/assets/Toast.stories-CU2mbz7X.js +0 -164
- package/dist/assets/ToastManager.stories-CNHdRjYp.js +0 -196
- package/dist/assets/Tooltip-Bx__kQJp.js +0 -11
- package/dist/assets/Tooltip-gH7ETEPn.js +0 -1
- package/dist/assets/Tooltip.stories-Dh10ZcLO.js +0 -68
- package/dist/assets/TopNav-CwC-Hfu7.js +0 -11
- package/dist/assets/TopNav.stories-CHynTSTq.js +0 -13
- package/dist/assets/TransitionGroupContext-DAL84N7p.js +0 -1
- package/dist/assets/Typography-BIFhmR2K.js +0 -1
- package/dist/assets/Typography-Cy2gjnNe.js +0 -1
- package/dist/assets/Typography-Dl4InsuU.js +0 -9
- package/dist/assets/Typography-gfYWxfhb.js +0 -1
- package/dist/assets/Typography.stories-BBqx1A0N.js +0 -139
- package/dist/assets/Typography.stories-CWHWJK4j.js +0 -73
- package/dist/assets/UiShell.stories-DR8ntSCC.js +0 -558
- package/dist/assets/UiShellProvider-Cr2Lr10c.js +0 -31
- package/dist/assets/Upload-BmwJgpFZ.js +0 -1
- package/dist/assets/User-DR3B8-Pw.js +0 -1
- package/dist/assets/UserProfile-Cra6rpT4.js +0 -11
- package/dist/assets/UserProfile.stories-BHXBhH-A.js +0 -14
- package/dist/assets/UserProfileMenuButton.stories-CbIX2qVe.js +0 -30
- package/dist/assets/Video-BrBarEGj.js +0 -1
- package/dist/assets/WorkflowsComponentsStorybookThemeDecorator-dm_9FhMX.js +0 -197
- package/dist/assets/_commonjsHelpers-gnU0ypJ3.js +0 -1
- package/dist/assets/assertThisInitialized-B9jnkVVz.js +0 -1
- package/dist/assets/axe-4JP0vCEZ.js +0 -30
- package/dist/assets/axeRun-B-LchFqf.js +0 -11
- package/dist/assets/chunk-XP5HYGXS-BpfKkqn7.js +0 -1
- package/dist/assets/client-ByW5HbEz.js +0 -1
- package/dist/assets/colorManipulator-BxsGKdcY.js +0 -1
- package/dist/assets/constants-CGUp4oSR.js +0 -11
- package/dist/assets/constants-CyailK6t.js +0 -11
- package/dist/assets/createBox-emhTu6dS.js +0 -1
- package/dist/assets/createChainedFunction-BO_9K8Jh.js +0 -1
- package/dist/assets/createStyled-B09qmfVW.js +0 -1
- package/dist/assets/createSvgIcon-SdTF6s8l.js +0 -1
- package/dist/assets/createUniqueId-BHjR7HQF.js +0 -11
- package/dist/assets/debounce-Be36O1Ab.js +0 -1
- package/dist/assets/dialogActionsClasses-Dyfou6Pj.js +0 -1
- package/dist/assets/dom.esm-B9r8vBgQ.js +0 -65
- package/dist/assets/emotion-react-jsx-runtime.browser.esm-DyRr7bu9.js +0 -1
- package/dist/assets/entry-preview-8rdU1LSP.js +0 -2
- package/dist/assets/entry-preview-docs-BKXv92OK.js +0 -46
- package/dist/assets/fieldComponentPropsMetaData-kU3Yruac.js +0 -11
- package/dist/assets/getReactElementRef-CYW9xr5m.js +0 -1
- package/dist/assets/getScrollbarSize-Bqq2hMjQ.js +0 -1
- package/dist/assets/i18next-7SyOfhCu.js +0 -1
- package/dist/assets/iconUtils-IdK4hqQS.js +0 -11
- package/dist/assets/iframe-B5wE2ay9.js +0 -211
- package/dist/assets/index-B-lxVbXh.js +0 -1
- package/dist/assets/index-B5xazMy1.js +0 -1
- package/dist/assets/index-BJMTVygn.js +0 -240
- package/dist/assets/index-BJTM6NaI.js +0 -192
- package/dist/assets/index-BeeV6X6A.js +0 -1
- package/dist/assets/index-Bg123T1w.js +0 -1
- package/dist/assets/index-CXQShRbs.js +0 -8
- package/dist/assets/index-DI1lVgTb.js +0 -1
- package/dist/assets/index-DiEiQB-f.js +0 -384
- package/dist/assets/index-DieBXP3Z.js +0 -24
- package/dist/assets/index-DrFu-skq.js +0 -6
- package/dist/assets/index-NdkWRN8K.js +0 -9
- package/dist/assets/index.esm-CSagFIBX.js +0 -138
- package/dist/assets/index.esm-CcYwRB5x.js +0 -1
- package/dist/assets/index.modern-CkASn_bb.js +0 -14
- package/dist/assets/inheritsLoose-6wpAF9yl.js +0 -1
- package/dist/assets/inputUtils-Dbi8XkA6.js +0 -11
- package/dist/assets/isHostComponent-DVu5iVWx.js +0 -1
- package/dist/assets/jsx-runtime-CnH95YSl.js +0 -9
- package/dist/assets/matchers-7Z3WT2CE-T3xScrR7.js +0 -14
- package/dist/assets/ownerDocument-DW-IO8s5.js +0 -1
- package/dist/assets/ownerWindow-HkKU3E4x.js +0 -1
- package/dist/assets/personData-D_hHWF6B.js +0 -1
- package/dist/assets/personData-FNT5LNaA.js +0 -11
- package/dist/assets/pickerComponentPropsMetadata-DrOyW8Hu.js +0 -21
- package/dist/assets/popper-BXFsSIrb.js +0 -1
- package/dist/assets/preview-B0Jk1i10.js +0 -11
- package/dist/assets/preview-B8lJiyuQ.js +0 -34
- package/dist/assets/preview-BBWR9nbA.js +0 -1
- package/dist/assets/preview-BWzBA1C2.js +0 -396
- package/dist/assets/preview-BaoH-L4j.js +0 -1
- package/dist/assets/preview-CYp4EYYZ.js +0 -1
- package/dist/assets/preview-CvbIS5ZJ.js +0 -1
- package/dist/assets/preview-DGUiP6tS.js +0 -7
- package/dist/assets/preview-DHQbi4pV.js +0 -1
- package/dist/assets/preview-DtECuC7p.js +0 -2
- package/dist/assets/preview-MBifGIx_.js +0 -1
- package/dist/assets/preview-nv3jWDyz.js +0 -2
- package/dist/assets/pxToRem-BrMhKUxS.js +0 -11
- package/dist/assets/react-18-u8niHpKc.js +0 -1
- package/dist/assets/renderUiShell.stories-uAoeUcRt.js +0 -872
- package/dist/assets/resolveComponentProps-zX2d3UUb.js +0 -1
- package/dist/assets/tableSortLabelClasses-t0B4WNP1.js +0 -1
- package/dist/assets/test-utils-H9lH7T5D.js +0 -9
- package/dist/assets/uiShellSharedConstants-CvCey4L_.js +0 -11
- package/dist/assets/useAutocomplete-CkesXhEs.js +0 -11
- package/dist/assets/useControlled-NQulfz4l.js +0 -1
- package/dist/assets/useFormControl-BMISTZuX.js +0 -1
- package/dist/assets/useIsFocusVisible-DH0qxT5e.js +0 -1
- package/dist/assets/useMobilePicker-DEUQ7oE6.js +0 -6
- package/dist/assets/useMountLifecycleEffect-CjsUCFhB.js +0 -11
- package/dist/assets/useOdysseyDateFields-_3ZdpiPL.js +0 -61
- package/dist/assets/useScrollIndication-DEbEqkqk.js +0 -31
- package/dist/assets/useSlot-bWb1W-uo.js +0 -1
- package/dist/assets/useStoryArgOrLocalState-CRQAGSTX.js +0 -11
- package/dist/assets/useThemeProps-4A-zY4M2.js +0 -1
- package/dist/assets/useThemeProps-DOJ_m4Vc.js +0 -1
- package/dist/assets/useUniqueId-DUzAQ6pl.js +0 -11
- package/dist/assets/utilities.esm-DpQ0TZP_.js +0 -5
- package/dist/assets/utils-iop7lDec.js +0 -1
- package/dist/assets/utils-uddq32f3.js +0 -1
- package/dist/assets/v4-CtRu48qb.js +0 -1
- package/dist/assets/visuallyHidden-Dan1xhjv.js +0 -1
- package/dist/favicon.svg +0 -1
- package/dist/iframe.html +0 -748
- package/dist/index.cjs +0 -231
- package/dist/index.d.ts +0 -233
- package/dist/index.html +0 -203
- package/dist/index.json +0 -1
- package/dist/index.mjs +0 -229
- package/dist/index.scss +0 -549
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/project.json +0 -1
- package/dist/sb-addons/a11y-3/manager-bundle.js +0 -220
- package/dist/sb-addons/docs-1/manager-bundle.js +0 -242
- package/dist/sb-addons/essentials-actions-5/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-backgrounds-6/manager-bundle.js +0 -12
- package/dist/sb-addons/essentials-controls-4/manager-bundle.js +0 -402
- package/dist/sb-addons/essentials-measure-9/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-outline-10/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-toolbars-8/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-viewport-7/manager-bundle.js +0 -3
- package/dist/sb-addons/interactions-11/manager-bundle.js +0 -222
- package/dist/sb-addons/links-2/manager-bundle.js +0 -3
- package/dist/sb-addons/rtl-12/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-13/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-common-assets/favicon.svg +0 -1
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +0 -1052
- package/dist/sb-manager/globals-runtime.js +0 -42127
- package/dist/sb-manager/globals.js +0 -48
- package/dist/sb-manager/runtime.js +0 -12048
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-CnH95YSl.js";import{useMDXComponents as i}from"./index-BeeV6X6A.js";import{M as s}from"./index-DiEiQB-f.js";import"./index-NdkWRN8K.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./iframe-B5wE2ay9.js";import"./index-BJTM6NaI.js";import"./index-B5xazMy1.js";import"./index-DieBXP3Z.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";function n(r){const d={code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{}),`
|
|
2
|
-
`,e.jsx(d.h1,{id:"right-to-left-rtl-language-support",children:"Right-to-Left (RTL) language support"}),`
|
|
3
|
-
`,e.jsxs(d.p,{children:["This document outlines the process and constraints of moving from physical CSS properties (",e.jsx(d.code,{children:"margin-left"}),") to logical CSS properties (",e.jsx(d.code,{children:"margin-inline-start"}),") as an effort to provide RTL support. Folks may recognize this syntax from CSS Grid or Flexbox."]}),`
|
|
4
|
-
`,e.jsxs(d.p,{children:["These property variants key off of the ",e.jsx(d.code,{children:'dir="rtl|ltr"'})," attribute on ",e.jsx(d.code,{children:"html"}),". This allows for a single declaration to provide LTR and RTL support."]}),`
|
|
5
|
-
`,e.jsx(d.h2,{id:"property-and-value-translations",children:"Property and value translations"}),`
|
|
6
|
-
`,e.jsx(d.p,{children:"This table documents the related equivalents in physical and logical CSS, their linter support, and any relevant notes."}),`
|
|
7
|
-
`,e.jsxs(d.p,{children:["For a quick visualization of how these properties are related, see ",e.jsx("a",{href:"https://codepen.io/aardrian/full/bGGxrvM",children:"this CodePen"}),"."]}),`
|
|
8
|
-
`,e.jsx("div",{children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{scope:"column",children:"Type"}),e.jsx("td",{scope:"column",children:"Physical CSS"}),e.jsx("td",{scope:"column",children:"Logical CSS"}),e.jsx("td",{scope:"column",children:"Lint status"}),e.jsx("td",{scope:"column",children:"Notes"})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{scope:"row",rowSpan:"7",children:e.jsx(d.p,{children:"Margin"})}),e.jsx("td",{children:e.jsx("code",{children:"margin"})}),e.jsx("td",{}),e.jsx("td",{children:"no auto-fix"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"margin-top"})}),e.jsx("td",{children:e.jsx("code",{children:"margin-block-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"margin-bottom"})}),e.jsx("td",{children:e.jsx("code",{children:"margin-block-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"margin-left"})}),e.jsx("td",{children:e.jsx("code",{children:"margin-inline-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"margin-right"})}),e.jsx("td",{children:e.jsx("code",{children:"margin-inline-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"margin-block"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets both block margins"})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"margin-inline"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets both inline margins"})]}),e.jsxs("tr",{children:[e.jsx("td",{scope:"row",rowSpan:"7",children:e.jsx(d.p,{children:"Padding"})}),e.jsx("td",{children:e.jsx("code",{children:"padding"})}),e.jsx("td",{}),e.jsx("td",{children:"no auto-fix"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"padding-top"})}),e.jsx("td",{children:e.jsx("code",{children:"padding-block-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"padding-bottom"})}),e.jsx("td",{children:e.jsx("code",{children:"padding-block-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"padding-left"})}),e.jsx("td",{children:e.jsx("code",{children:"padding-inline-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"padding-right"})}),e.jsx("td",{children:e.jsx("code",{children:"padding-inline-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"padding-block"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets both block paddings"})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"padding-inline"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets both inline paddings"})]}),e.jsxs("tr",{children:[e.jsx("td",{scope:"row",rowSpan:"11",children:e.jsx(d.p,{children:"Borders"})}),e.jsx("td",{children:e.jsx("code",{children:"border-top"})}),e.jsx("td",{children:e.jsx("code",{children:"border-block-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["Also applies to ",e.jsx("code",{children:"*-size|style|color"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-bottom"})}),e.jsx("td",{children:e.jsx("code",{children:"border-block-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["Also applies to ",e.jsx("code",{children:"*-size|style|color"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-left"})}),e.jsx("td",{children:e.jsx("code",{children:"border-inline-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["Also applies to ",e.jsx("code",{children:"*-size|style|color"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-right"})}),e.jsx("td",{children:e.jsx("code",{children:"border-inline-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:e.jsxs(d.p,{children:["Also applies to ",e.jsx("code",{children:"*-size|style|color"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"border-block"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets both block borders"})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"border-inline"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets both inline borders"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-radius"})}),e.jsx("td",{}),e.jsx("td",{children:"no auto-fix"}),e.jsx("td",{children:e.jsxs(d.p,{children:["See ",e.jsx("a",{href:"#linting-notes",children:"Linting notes"})]})})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-top-left-radius"})}),e.jsx("td",{children:e.jsx("code",{children:"border-start-start-radius"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-top-right-radius"})}),e.jsx("td",{children:e.jsx("code",{children:"border-start-end-radius"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-bottom-left-radius"})}),e.jsx("td",{children:e.jsx("code",{children:"border-end-start-radius"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"border-bottom-right-radius"})}),e.jsx("td",{children:e.jsx("code",{children:"border-end-end-radius"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{scope:"row",rowSpan:"7",children:e.jsx(d.p,{children:"Position"})}),e.jsx("td",{children:e.jsx("code",{children:"top"})}),e.jsx("td",{children:e.jsx("code",{children:"inset-block-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"bottom"})}),e.jsx("td",{children:e.jsx("code",{children:"inset-block-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"left"})}),e.jsx("td",{children:e.jsx("code",{children:"inset-inline-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"right"})}),e.jsx("td",{children:e.jsx("code",{children:"inset-inline-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"inset"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets all inset values"})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"inset-block"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets block inset values"})]}),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{children:e.jsx("code",{children:"inset-inline"})}),e.jsx("td",{}),e.jsx("td",{children:"Sets inline inset values"})]}),e.jsxs("tr",{children:[e.jsx("td",{scope:"row",rowSpan:"6",children:e.jsx(d.p,{children:"Layout"})}),e.jsx("td",{children:e.jsx("code",{children:"text-align: left"})}),e.jsx("td",{children:e.jsx("code",{children:"text-align: start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"text-align: right"})}),e.jsx("td",{children:e.jsx("code",{children:"text-align: end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"float: left"})}),e.jsx("td",{children:e.jsx("code",{children:"float: inline-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:"Prefer Grid or Flex instead"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"float: right"})}),e.jsx("td",{children:e.jsx("code",{children:"float: inline-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:"Prefer Grid or Flex instead"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"clear: left"})}),e.jsx("td",{children:e.jsx("code",{children:"clear: inline-start"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:"Prefer Grid or Flex instead"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"clear: right"})}),e.jsx("td",{children:e.jsx("code",{children:"clear: inline-end"})}),e.jsx("td",{children:"auto-fixed"}),e.jsx("td",{children:"Prefer Grid or Flex instead"})]})]})]})}),`
|
|
9
|
-
`,e.jsx(d.h3,{id:"linting-notes",children:"Linting notes"}),`
|
|
10
|
-
`,e.jsxs(d.p,{children:["Browsers have not settled on a standard RTL syntax for 4-value shorthands. Currently, using standard 4-value shorthands (",e.jsx(d.code,{children:"margin: 4px 3px 2px 1px"}),") will be parsed as physical CSS by the browser. Stylelint's auto-fix behavior in this regard has a few gaps:"]}),`
|
|
11
|
-
`,e.jsxs(d.ul,{children:[`
|
|
12
|
-
`,e.jsxs(d.li,{children:["When four properties are present, ",e.jsx(d.code,{children:"margin"})," and ",e.jsx(d.code,{children:"padding"})," are collapsed into two forms of shorthand:",`
|
|
13
|
-
`,e.jsxs(d.ul,{children:[`
|
|
14
|
-
`,e.jsxs(d.li,{children:["When all values are the same: ",e.jsx(d.code,{children:"margin: x"})]}),`
|
|
15
|
-
`,e.jsxs(d.li,{children:["When all values are different: ",e.jsx(d.code,{children:"margin: logical p q x y"}),"."]}),`
|
|
16
|
-
`]}),`
|
|
17
|
-
`]}),`
|
|
18
|
-
`,e.jsxs(d.li,{children:["The ",e.jsx(d.code,{children:"logical"})," flag is aligned with the proposed syntax, but it is not supported in most browsers."]}),`
|
|
19
|
-
`,e.jsxs(d.li,{children:[e.jsx(d.code,{children:"border-radius"})," itself goes undetected, as there is no RTL syntax for shorthand. This is safe when the values are the same, but unsafe if they are ever different."]}),`
|
|
20
|
-
`]}),`
|
|
21
|
-
`,e.jsxs(d.p,{children:["For the above reasons, the use of ",e.jsx(d.code,{children:"margin"}),", ",e.jsx(d.code,{children:"padding"}),", and ",e.jsx(d.code,{children:"border-radius"})," shorthands are disallowed in our current config. Please use the associated RTL properties or the ",e.jsx(d.code,{children:"border-radius"})," mixin for broad support."]}),`
|
|
22
|
-
`,e.jsx(d.h3,{id:"unsupported-properties",children:"Unsupported properties"}),`
|
|
23
|
-
`,e.jsxs(d.p,{children:["Of note, ",e.jsx(d.code,{children:"transform"}),", ",e.jsx(d.code,{children:"box-shadow"}),", and ",e.jsx(d.code,{children:"background"})," properties do not have logical equivalents."]}),`
|
|
24
|
-
`,e.jsxs(d.p,{children:["Currently, these properties are always treated as physical. Since the ",e.jsx(d.code,{children:":rtl"})," selector doesn’t have broad support, the recommended solution is to add RTL styles via ",e.jsx(d.code,{children:"[dirl=’rtl’] &"}),"."]}),`
|
|
25
|
-
`,e.jsx(d.pre,{children:e.jsx(d.code,{className:"language-css",children:`.foo {
|
|
26
|
-
transformation: translateX(50%);
|
|
27
|
-
|
|
28
|
-
[dir="rtl"] & {
|
|
29
|
-
transformation: translateX(-50%);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`})}),`
|
|
33
|
-
`,e.jsx(d.h3,{id:"browser-support",children:"Browser support"}),`
|
|
34
|
-
`,e.jsx(d.p,{children:"Firefox and Chrome both have full support for the new properties and values."}),`
|
|
35
|
-
`,e.jsx(d.p,{children:"Safari is currently missing support for logical border-radius properties; however, full support is available in the Safari 15 preview."}),`
|
|
36
|
-
`,e.jsx(d.h3,{id:"unused-logical-properties-and-values",children:"Unused logical properties and values"}),`
|
|
37
|
-
`,e.jsx(d.p,{children:`Our current implementation focuses on providing "automatic" RTL support with the least amount of overhead. For this reason, we haven't implemented properties related to vertical reading/writing. For completeness, the remaining Logical CSS properties are inventoried here:`}),`
|
|
38
|
-
`,e.jsx("div",{children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{scope:"column",children:"Type"}),e.jsx("td",{scope:"column",children:"Physical CSS"}),e.jsx("td",{scope:"column",children:"Logical CSS"}),e.jsx("td",{scope:"column",children:"Lint status"})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{scope:"row",rowSpan:"6",children:e.jsx(d.p,{children:"Box"})}),e.jsx("td",{children:e.jsx("code",{children:"width"})}),e.jsx("td",{children:e.jsx("code",{children:"inline-size"})}),e.jsx("td",{children:"auto-fix available"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"min-width"})}),e.jsx("td",{children:e.jsx("code",{children:"min-inline-size"})}),e.jsx("td",{children:"auto-fix available"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"max-width"})}),e.jsx("td",{children:e.jsx("code",{children:"max-inline-size"})}),e.jsx("td",{children:"auto-fix available"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"height"})}),e.jsx("td",{children:e.jsx("code",{children:"block-size"})}),e.jsx("td",{children:"auto-fix available"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"min-height"})}),e.jsx("td",{children:e.jsx("code",{children:"min-block-size"})}),e.jsx("td",{children:"auto-fix available"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"max-height"})}),e.jsx("td",{children:e.jsx("code",{children:"max-block-size"})}),e.jsx("td",{children:"auto-fix available"})]}),e.jsxs("tr",{children:[e.jsx("td",{scope:"row",rowSpan:"6",children:e.jsx(d.p,{children:"Overflow"})}),e.jsx("td",{children:e.jsx("code",{children:"overflow-y"})}),e.jsx("td",{children:e.jsx("code",{children:"overflow-block"})}),e.jsx("td",{children:"undetected"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"overflow-x"})}),e.jsx("td",{children:e.jsx("code",{children:"overflow-inline"})}),e.jsx("td",{children:"undetected"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"overscroll-behavior-y"})}),e.jsx("td",{children:e.jsx("code",{children:"overscroll-behavior-block"})}),e.jsx("td",{children:"undetected"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"overscroll-behavior-x"})}),e.jsx("td",{children:e.jsx("code",{children:"overscroll-behavior-inline"})}),e.jsx("td",{children:"undetected"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"resize: horizontal"})}),e.jsx("td",{children:e.jsx("code",{children:"resize: inline"})}),e.jsx("td",{children:"undetected"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"resize: vertical"})}),e.jsx("td",{children:e.jsx("code",{children:"resize: block"})}),e.jsx("td",{children:"undetected"})]})]})]})}),`
|
|
39
|
-
`,e.jsx(d.p,{children:`There are limited caveats to utilizing these properties today. However, they are
|
|
40
|
-
not required for RTL support.`}),`
|
|
41
|
-
`,e.jsx(d.p,{children:"Browser support is as above."}),`
|
|
42
|
-
`,e.jsx(d.p,{children:"Box properties are correctly detected and auto-fixed by stylelint-use-logical, but Overflow properties are not."}),`
|
|
43
|
-
`,e.jsx(d.p,{children:"PostCSS supports detection and fallback generation for all of these properties."}),`
|
|
44
|
-
`,e.jsx(d.h2,{id:"non-logical-rtl-typography-concerns",children:"Non-logical, RTL typography concerns"}),`
|
|
45
|
-
`,e.jsxs(d.ul,{children:[`
|
|
46
|
-
`,e.jsxs(d.li,{children:[e.jsx(d.code,{children:"letter-spacing"})," is now set to 0 to ensure non-English scripts are properly ligatured"]}),`
|
|
47
|
-
`,e.jsxs(d.li,{children:[e.jsx(d.code,{children:"text-decoration-skip-ink"})," is now set to ",e.jsx(d.code,{children:"all"})," for maximum non-English script support"]}),`
|
|
48
|
-
`,e.jsx(d.li,{children:"Odyssey does not currently utilize or support transparency in text, as it causes legibility issues in non-English scripts"}),`
|
|
49
|
-
`,e.jsxs(d.li,{children:[e.jsx(d.code,{children:"word-break"})," is disallowed since not all languages support intra-word breakage"]}),`
|
|
50
|
-
`,e.jsx(d.li,{children:"Tables do not swap layout or ordering of numerical data"}),`
|
|
51
|
-
`,e.jsx(d.li,{children:"Noto Sans Arabic is our preferred Arabic font family"}),`
|
|
52
|
-
`,e.jsx(d.li,{children:"Addresses, email addresses, and phone numbers should not swap their display"}),`
|
|
53
|
-
`]}),`
|
|
54
|
-
`,e.jsx(d.h2,{id:"guidance-and-documentation-changes",children:"Guidance and documentation changes"}),`
|
|
55
|
-
`,e.jsx(d.h3,{id:"naming",children:"Naming"}),`
|
|
56
|
-
`,e.jsx(d.p,{children:"In both documentation and code, we have replaced and will strive to continue using logical, RTL-friendly names in place of physical ones."}),`
|
|
57
|
-
`,e.jsxs(d.p,{children:["For classes, this means preferring ",e.jsx(d.code,{children:".is-tooltip-start"})," to ",e.jsx(d.code,{children:".is-tooltip-left"}),`. In documentation, we'll refer to the "upper, ending corner" instead of the "upper, right-hand corner".`]}),`
|
|
58
|
-
`,e.jsx(d.h2,{id:"known-rtl-work-remaining",children:"Known RTL work remaining"}),`
|
|
59
|
-
`,e.jsxs(d.ul,{children:[`
|
|
60
|
-
`,e.jsxs(d.li,{children:["All unsupported cases (",e.jsx(d.code,{children:"transform"}),", ",e.jsx(d.code,{children:"background"}),", and ",e.jsx(d.code,{children:"shadow"}),") need linting to ensure appropriate RTL declarations."]}),`
|
|
61
|
-
`,e.jsx(d.li,{children:"Icons require bi-directional support"}),`
|
|
62
|
-
`]})]})}function f(r={}){const{wrapper:d}={...i(),...r.components};return d?e.jsx(d,{...r,children:e.jsx(n,{...r})}):n(r)}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s}from"./index-NdkWRN8K.js";import{j as a}from"./jsx-runtime-CnH95YSl.js";import{B as m}from"./Box-C-xmRxaS.js";import{v as n}from"./visuallyHidden-Dan1xhjv.js";const i={...n},d=({ariaHidden:e,children:r,id:o,translate:t})=>a.jsx(m,{"aria-hidden":e,component:"span",id:o,sx:i,translate:t,children:r}),p=s.memo(d);p.displayName="ScreenReaderText";export{p as M};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-CnH95YSl.js";import{useMDXComponents as r}from"./index-BeeV6X6A.js";import{M as i,C as s,c}from"./index-DiEiQB-f.js";import{Default as a}from"./ScreenReaderText.stories-DCOADRMP.js";import"./index-NdkWRN8K.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./iframe-B5wE2ay9.js";import"./index-BJTM6NaI.js";import"./index-B5xazMy1.js";import"./index-DieBXP3Z.js";import"./index-CXQShRbs.js";import"./index-DrFu-skq.js";import"./OdysseyStorybookThemeDecorator-DsQ8XVOG.js";import"./OdysseyThemeProvider-uYQ_l8PJ.js";import"./OdysseyProvider-YUKfsUrL.js";import"./ScreenReaderText-CQNs2mcT.js";import"./Box-C-xmRxaS.js";import"./createBox-emhTu6dS.js";import"./visuallyHidden-Dan1xhjv.js";function o(n){const t={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",...r(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{anchor:!0}),`
|
|
2
|
-
`,e.jsx(t.h1,{id:"screenreadertext",children:"ScreenReaderText"}),`
|
|
3
|
-
`,e.jsx(t.p,{children:"The ScreenReaderText component is designed to enhance accessibility by providing text that can be read by screen readers but is not visible to a sighted user."}),`
|
|
4
|
-
`,e.jsx(s,{of:a}),`
|
|
5
|
-
`,e.jsx(t.h2,{id:"usage",children:"Usage"}),`
|
|
6
|
-
`,e.jsx(t.p,{children:"The ScreenReaderText component should be used in conjunction with other visible UI elements to ensure that all users have access to the same information. It is typically used for labeling and providing additional context for form fields, buttons, and other interactive elements on the page."}),`
|
|
7
|
-
`,e.jsx(t.h3,{id:"component-composition",children:"Component composition"}),`
|
|
8
|
-
`,e.jsx(t.p,{children:"ScreenReaderText may be used to provide accessibility when composing custom components."}),`
|
|
9
|
-
`,e.jsxs(t.p,{children:["For example, when communicating the ",e.jsx(t.code,{children:"severity"})," of an Alert:"]}),`
|
|
10
|
-
`,e.jsx(c,{code:`
|
|
11
|
-
<Alert role={role} severity={severity} variant="banner">
|
|
12
|
-
<ScreenReaderText>{severity}:</ScreenReaderText>
|
|
13
|
-
{text}
|
|
14
|
-
</Alert>
|
|
15
|
-
`})]})}function D(n={}){const{wrapper:t}={...r(),...n.components};return t?e.jsx(t,{...n,children:e.jsx(o,{...n})}):o(n)}export{D as default};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./jsx-runtime-CnH95YSl.js";import{O as a}from"./OdysseyStorybookThemeDecorator-DsQ8XVOG.js";import{M as n}from"./ScreenReaderText-CQNs2mcT.js";import"./index-NdkWRN8K.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./OdysseyThemeProvider-uYQ_l8PJ.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-YUKfsUrL.js";import"./Box-C-xmRxaS.js";import"./createBox-emhTu6dS.js";import"./visuallyHidden-Dan1xhjv.js";const S={component:n,decorators:[a],argTypes:{children:{control:"text"}},args:{children:"This text is visually hidden."}},e={render:function(i){return r.jsxs(r.Fragment,{children:["The following text is visually hidden:",r.jsx(n,{...i})]})}};var o,t,s;e.parameters={...e.parameters,docs:{...(o=e.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
|
2
|
-
render: function C(args) {
|
|
3
|
-
return <>
|
|
4
|
-
The following text is visually hidden:
|
|
5
|
-
<ScreenReaderText {...args}></ScreenReaderText>
|
|
6
|
-
</>;
|
|
7
|
-
}
|
|
8
|
-
}`,...(s=(t=e.parameters)==null?void 0:t.docs)==null?void 0:s.source}}};const j=["Default"];export{e as Default,j as __namedExportsOrder,S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./index-NdkWRN8K.js";import{j as r}from"./jsx-runtime-CnH95YSl.js";import{S as t}from"./OdysseyThemeProvider-uYQ_l8PJ.js";const a=e.forwardRef((o,n)=>r.jsx(t,{fill:"none",ref:n,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...o,children:r.jsx(r.Fragment,{children:r.jsx("path",{clipRule:"evenodd",d:"M10.667 6.667a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.754 4.231a5.333 5.333 0 1 1 .948-.938l3.61 3.611-.942.943-3.616-3.616Z",fill:"currentColor",fillRule:"evenodd"})})})),l=e.memo(a);l.displayName="SearchIcon";export{l as M};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-CnH95YSl.js";import{f as V,w as et,u as O,s as k,e as c}from"./index-BJMTVygn.js";import{O as nt}from"./OdysseyStorybookThemeDecorator-DsQ8XVOG.js";import{f as M}from"./fieldComponentPropsMetaData-kU3Yruac.js";import{a as it,O as at,b as rt,c as st,d as lt,e as z,p as pt}from"./pickerComponentPropsMetadata-DrOyW8Hu.js";import{u as ct,h as S}from"./OdysseyThemeProvider-uYQ_l8PJ.js";import{r as u}from"./index-NdkWRN8K.js";import{j as mt}from"./Typography-gfYWxfhb.js";import{M as v}from"./Settings-CjZSn0DO.js";import{M as dt}from"./Folder-DTgm0zQ0.js";import{M as I}from"./Video-BrBarEGj.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-YUKfsUrL.js";import"./useAutocomplete-CkesXhEs.js";import"./index.esm-CcYwRB5x.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-6wpAF9yl.js";import"./Field-BVmhMv9m.js";import"./Box-XLjSpNxK.js";import"./Box-C-xmRxaS.js";import"./createBox-emhTu6dS.js";import"./List-BcG-NsbC.js";import"./ListItem-Bv1M9lel.js";import"./utils-iop7lDec.js";import"./useFormControl-BMISTZuX.js";import"./FormLabel-C4KesWyd.js";import"./useIsFocusVisible-DH0qxT5e.js";import"./isHostComponent-DVu5iVWx.js";import"./ButtonBase-Wolvis_2.js";import"./TransitionGroupContext-DAL84N7p.js";import"./ScreenReaderText-CQNs2mcT.js";import"./visuallyHidden-Dan1xhjv.js";import"./FormHelperText-CZEj6vhF.js";import"./FieldHint-BFs7d7f5.js";import"./useUniqueId-DUzAQ6pl.js";import"./createUniqueId-BHjR7HQF.js";import"./inputUtils-Dbi8XkA6.js";import"./InputBase-Cc2rXj8N.js";import"./ownerWindow-HkKU3E4x.js";import"./ownerDocument-DW-IO8s5.js";import"./debounce-Be36O1Ab.js";import"./Autocomplete-Ce5vsFXe.js";import"./ArrowDropDown-CSyg-khO.js";import"./createSvgIcon-SdTF6s8l.js";import"./Close-DWj_zrWe.js";import"./Paper-BGSgbZC6.js";import"./Popper-vW9B5iyN.js";import"./popper-BXFsSIrb.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./Portal-ev1Y_qJb.js";import"./index-B5xazMy1.js";import"./index-DieBXP3Z.js";import"./getReactElementRef-CYW9xr5m.js";import"./resolveComponentProps-zX2d3UUb.js";import"./useControlled-NQulfz4l.js";import"./Chip-p4lq04qX.js";import"./IconButton-DwJqCevw.js";import"./ListSubheader-CBvKBAKL.js";import"./Typography-BIFhmR2K.js";/*!
|
|
2
|
-
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/const E=S("div",{shouldForwardProp:o=>o!=="odysseyDesignTokens"&&o!=="adornmentSize"&&o!=="isTagContainer"})(({adornmentSize:o="small",isTagContainer:n=!1,odysseyDesignTokens:t,position:i="left"})=>({position:"relative",bottom:"1px",alignSelf:"flex-start",width:t.Spacing5,height:t.Spacing5,overflow:"hidden",...i==="left"&&{marginInlineEnd:t.Spacing3},...i==="right"&&{marginInlineStart:t.Spacing3},svg:{width:"100%",height:"auto"},img:{position:"absolute",top:"50%",left:"50%",width:"100%",transform:"translate(-50%, -50%)"},...o==="large"&&!n&&{bottom:0,width:t.Spacing8,height:t.Spacing8},...n&&{bottom:0,alignSelf:"center",width:t.Spacing4,height:"auto",maxHeight:t.Spacing4,marginInlineEnd:t.Spacing2,svg:{display:"flex",width:"100%",height:"auto"}}})),xt=S("div",{shouldForwardProp:o=>o!=="odysseyDesignTokens"})(()=>({display:"flex",justifyContent:"space-between",width:"100%"})),ut=S("div",{shouldForwardProp:o=>o!=="odysseyDesignTokens"})(()=>({display:"flex"})),gt=({adornment:o,adornmentSize:n,odysseyDesignTokens:t})=>typeof o=="string"?e.jsx(E,{adornmentSize:n,odysseyDesignTokens:t,children:e.jsx("img",{alt:"",role:"presentation",src:o})}):e.jsx(E,{adornmentSize:n,odysseyDesignTokens:t,children:o}),Ct=({content:o,size:n,odysseyDesignTokens:t,onClick:i})=>{const r=u.useCallback(a=>{a.stopPropagation(),i()},[i]);return e.jsx(E,{adornmentSize:n,odysseyDesignTokens:t,onClick:r,children:o})},ht=({adornmentSize:o,muiProps:n,odysseyDesignTokens:t,option:i})=>{const{adornment:r,description:a,label:x,metaData:g,extra:l,onClick:p,isInteractive:s=!0}=i,C=u.useCallback(h=>{if(!s){h.preventDefault();return}h.stopPropagation(),p==null||p()},[p,s]),y=u.useMemo(()=>({...n,onClick:s?C:void 0,"aria-disabled":s?void 0:"true",role:"option"}),[n,s,C]);return e.jsx(at,{hasAdornment:!0,muiProps:y,children:e.jsxs(xt,{odysseyDesignTokens:t,children:[e.jsxs(ut,{odysseyDesignTokens:t,children:[e.jsx(gt,{adornment:r,adornmentSize:o,odysseyDesignTokens:t}),e.jsxs("div",{children:[e.jsxs(rt,{odysseyDesignTokens:t,children:[e.jsx(mt,{component:"p",children:x}),e.jsx(st,{description:a,odysseyDesignTokens:t})]}),g&&e.jsx(lt,{metaData:g,odysseyDesignTokens:t})]})]}),l&&e.jsx(Ct,{content:l.content,odysseyDesignTokens:t,onClick:l.onClick,size:l.size||o})]})})},kt=({adornmentSize:o="small",ariaDescribedBy:n,defaultValue:t,errorMessage:i,errorMessageList:r,getIsOptionEqualToValue:a,groupOptionsBy:x,id:g,inputValue:l,isCustomValueAllowed:p,isDisabled:s,isFullWidth:C=!1,isLoading:y,isOptional:h=!1,isReadOnly:F,isVirtualized:R=!1,hint:U,HintLinkComponent:_,label:q,name:N,onBlur:G,onChange:J,onInputChange:K,onFocus:Q,options:X,value:Y,testId:Z,translate:$})=>{const j=ct(),tt=u.useCallback((ot,B)=>e.jsx(ht,{adornmentSize:o,muiProps:ot,odysseyDesignTokens:j,option:B},B.value),[o,j]);return e.jsx(it,{ariaDescribedBy:n,defaultValue:t,errorMessage:i,errorMessageList:r,getIsOptionEqualToValue:a,groupOptionsBy:x,hint:U,HintLinkComponent:_,id:g,inputValue:l,isCustomValueAllowed:p,isDisabled:s,isFullWidth:C,isLoading:y,isOptional:h,isReadOnly:F,isVirtualized:R,label:q,name:N,onBlur:G,onChange:J,onFocus:Q,onInputChange:K,options:X,renderOption:tt,testId:Z,translate:$,value:Y})},W=u.memo(kt);W.displayName="MemoizedSearchDropdown";const m=V(),d=V(),w=[{value:"an",label:"An Option label",adornment:e.jsx(dt,{}),extra:{content:e.jsx(v,{"data-testid":"option1-extra"}),onClick:d},onClick:m},{value:"another",label:"Another Option label",description:"Some optional descriptive text",adornment:e.jsx(v,{}),extra:{content:e.jsx(I,{}),onClick:d},onClick:m},{value:"unselectable",label:"Unselectable Option",description:"Some optional descriptive text",isInteractive:!1,adornment:e.jsx(v,{"data-testid":"unselectable-extra"}),extra:{content:e.jsx(I,{}),onClick:d},onClick:m}],So={component:W,decorators:[nt],tags:["autodocs"],argTypes:{...pt,adornmentSize:{control:"radio",options:z,description:"Choose the size for the leading adornment. 'small' or 'large'",table:{type:{summary:z.join(" | ")}}},hint:M.hint,HintLinkComponent:M.HintLinkComponent},args:{label:"Picker with option adornment label",hint:"Optional hint text for picker",options:w}},b={args:{options:w},play:async({canvasElement:o,step:n})=>{const i=et(o).getByRole("combobox"),r=()=>{m.mockClear(),d.mockClear()};await n("Click on option triggers option onClick",async()=>{r(),await O.click(i);const a=k.getByText("An Option label");await O.click(a),c(m).toBeCalled(),c(d).not.toBeCalled()}),await n("Click on option extra triggers option.extra onClick",async()=>{r();const a=k.getByTestId("option1-extra");await O.click(a),c(m).not.toBeCalled(),c(d).toBeCalled()}),await n("Click on unselectable option not trigger onClick",()=>{r();const a=k.getByText("Unselectable Option");c(a).toHaveStyle("pointer-events: none");const x=k.getByTestId("unselectable-extra");c(x).toHaveStyle("pointer-events: none")})}},f={args:{adornmentSize:"large",options:w}};var A,T,D;b.parameters={...b.parameters,docs:{...(A=b.parameters)==null?void 0:A.docs,source:{originalSource:`{
|
|
12
|
-
args: {
|
|
13
|
-
options: optionsWithExtra
|
|
14
|
-
},
|
|
15
|
-
play: async ({
|
|
16
|
-
canvasElement,
|
|
17
|
-
step
|
|
18
|
-
}) => {
|
|
19
|
-
const canvas = within(canvasElement);
|
|
20
|
-
const comboBoxElement = canvas.getByRole<HTMLInputElement>("combobox");
|
|
21
|
-
const clearMocks = () => {
|
|
22
|
-
optionOnClick.mockClear();
|
|
23
|
-
optionExtraOnClick.mockClear();
|
|
24
|
-
};
|
|
25
|
-
await step("Click on option triggers option onClick", async () => {
|
|
26
|
-
clearMocks();
|
|
27
|
-
await userEvent.click(comboBoxElement);
|
|
28
|
-
const option = screen.getByText("An Option label");
|
|
29
|
-
await userEvent.click(option);
|
|
30
|
-
expect(optionOnClick).toBeCalled();
|
|
31
|
-
expect(optionExtraOnClick).not.toBeCalled();
|
|
32
|
-
});
|
|
33
|
-
await step("Click on option extra triggers option.extra onClick", async () => {
|
|
34
|
-
clearMocks();
|
|
35
|
-
const optionExtra = screen.getByTestId("option1-extra");
|
|
36
|
-
await userEvent.click(optionExtra);
|
|
37
|
-
expect(optionOnClick).not.toBeCalled();
|
|
38
|
-
expect(optionExtraOnClick).toBeCalled();
|
|
39
|
-
});
|
|
40
|
-
await step("Click on unselectable option not trigger onClick", () => {
|
|
41
|
-
clearMocks();
|
|
42
|
-
const unselectableOption = screen.getByText("Unselectable Option");
|
|
43
|
-
expect(unselectableOption).toHaveStyle("pointer-events: none");
|
|
44
|
-
const optionExtra = screen.getByTestId("unselectable-extra");
|
|
45
|
-
expect(optionExtra).toHaveStyle("pointer-events: none");
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
}`,...(D=(T=b.parameters)==null?void 0:T.docs)==null?void 0:D.source}}};var P,H,L;f.parameters={...f.parameters,docs:{...(P=f.parameters)==null?void 0:P.docs,source:{originalSource:`{
|
|
49
|
-
args: {
|
|
50
|
-
adornmentSize: "large",
|
|
51
|
-
options: optionsWithExtra
|
|
52
|
-
}
|
|
53
|
-
}`,...(L=(H=f.parameters)==null?void 0:H.docs)==null?void 0:L.source}}};const wo=["SmallAdornmentWithExtra","LargeAdornmentWithExtra"];export{f as LargeAdornmentWithExtra,b as SmallAdornmentWithExtra,wo as __namedExportsOrder,So as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as B,L as E,h as V,O as w}from"./OdysseyThemeProvider-uYQ_l8PJ.js";import{r as t}from"./index-NdkWRN8K.js";import{M as L}from"./Field-BVmhMv9m.js";import{g as O,u as W}from"./inputUtils-Dbi8XkA6.js";import{j as e}from"./jsx-runtime-CnH95YSl.js";import{I as g}from"./InputBase-Cc2rXj8N.js";import{I as z}from"./InputAdornment-CrT6j38e.js";import{M as D}from"./Search-BdL9PIj1.js";import{I as K}from"./IconButton-DwJqCevw.js";const P=["outline","filled"],N=V("div")({width:"100%"}),q=t.forwardRef(({ariaDescribedBy:C,autoCompleteType:l,defaultValue:d,hasInitialFocus:n,id:k,isDisabled:r=!1,isFullWidth:R=!1,label:T,name:c,onChange:o,onFocus:m,onBlur:u,onClear:a,placeholder:f,tabIndex:h,testId:x,translate:p,value:j,variant:b="outline"},y)=>{const{t:F}=B(),M=t.useCallback(i=>{o==null||o(i)},[o]),S=t.useCallback(()=>{a==null||a()},[a]),v=t.useRef(O({controlledValue:j,uncontrolledValue:d})),s=W({defaultValue:d,value:j,controlState:v.current}),A=t.useCallback(({ariaDescribedBy:i,id:I})=>e.jsx(g,{...s,"aria-describedby":i,autoComplete:l,autoFocus:n,"data-ods-type":"search","data-ods-variant":b,"data-se":x,endAdornment:((s==null?void 0:s.defaultValue)||(s==null?void 0:s.value))&&e.jsx(z,{position:"end",children:e.jsx(K,{"aria-label":F("clear.text"),disabled:r,onClick:S,size:"small",children:e.jsx(E,{})})}),id:I,inputProps:{tabIndex:h},name:c??I,onBlur:u,onChange:M,onFocus:m,placeholder:f,ref:y,startAdornment:e.jsx(z,{position:"start",children:e.jsx(D,{})}),translate:p,type:"search"}),[l,n,s,r,c,u,M,S,m,f,y,F,h,x,p,b]);return e.jsx(N,{children:e.jsx(w,{children:e.jsx(L,{ariaDescribedBy:C,fieldType:"single",hasVisibleLabel:!1,id:k,isDisabled:r,isFullWidth:R,isOptional:!0,label:T,renderFieldComponent:A})})})}),G=t.memo(q);G.displayName="SearchField";export{G as M,P as s};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as E}from"./jsx-runtime-CnH95YSl.js";import{r as s}from"./index-NdkWRN8K.js";import{O as M}from"./OdysseyStorybookThemeDecorator-DsQ8XVOG.js";import{f as e}from"./fieldComponentPropsMetaData-kU3Yruac.js";import{s as i,M as T}from"./SearchField-C-y7eHW0.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./OdysseyThemeProvider-uYQ_l8PJ.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-YUKfsUrL.js";import"./Field-BVmhMv9m.js";import"./Box-XLjSpNxK.js";import"./Box-C-xmRxaS.js";import"./createBox-emhTu6dS.js";import"./List-BcG-NsbC.js";import"./ListItem-Bv1M9lel.js";import"./utils-iop7lDec.js";import"./useFormControl-BMISTZuX.js";import"./FormLabel-C4KesWyd.js";import"./useIsFocusVisible-DH0qxT5e.js";import"./isHostComponent-DVu5iVWx.js";import"./ButtonBase-Wolvis_2.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-6wpAF9yl.js";import"./TransitionGroupContext-DAL84N7p.js";import"./ScreenReaderText-CQNs2mcT.js";import"./visuallyHidden-Dan1xhjv.js";import"./FormHelperText-CZEj6vhF.js";import"./FieldHint-BFs7d7f5.js";import"./Typography-gfYWxfhb.js";import"./Typography-BIFhmR2K.js";import"./useUniqueId-DUzAQ6pl.js";import"./createUniqueId-BHjR7HQF.js";import"./inputUtils-Dbi8XkA6.js";import"./InputBase-Cc2rXj8N.js";import"./ownerWindow-HkKU3E4x.js";import"./ownerDocument-DW-IO8s5.js";import"./debounce-Be36O1Ab.js";import"./InputAdornment-CrT6j38e.js";import"./Search-BdL9PIj1.js";import"./IconButton-DwJqCevw.js";const Ce={component:T,decorators:[M],tags:["autodocs"],argTypes:{autoCompleteType:{control:"text",description:"This prop helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill)",table:{type:{summary:"string"},defaultValue:{summary:void 0}}},defaultValue:{control:"text",description:"The value of the `input` element. Use when the component is not controlled",table:{type:{summary:"string"},defaultValue:{summary:void 0}}},hasInitialFocus:{control:"boolean",description:"If `true`, the component will receive focus automatically",table:{type:{summary:"boolean"}}},isDisabled:e.isDisabled,isFullWidth:e.isFullWidth,id:e.id,label:{control:"text",description:"This label won't show up visually, but it's required for accessibility",table:{type:{summary:"string"}},type:{required:!0,name:"string"}},name:e.name,onBlur:{description:"Callback fired when the `input` element loses focus",table:{type:{summary:"function"}}},onClear:{description:"Callback fired when the clear button is pressed",table:{type:{summary:"function"}}},onChange:{description:"Callback fired when the value is changed",table:{type:{summary:"function"}}},onFocus:{description:"Callback fired when the `input` element gets focus",table:{type:{summary:"function"}}},placeholder:{control:"text",description:"The short hint displayed in the `input` before the user enters a value",table:{type:{summary:"string"}}},value:{control:"text",description:"The value of the `input` element. Use when the component is controlled",table:{type:{summary:"string"},defaultValue:{summary:void 0}}},variant:{options:i,control:{type:"radio"},description:"The color and style of the button",table:{type:{summary:i.join(" | ")},defaultValue:{summary:"outline"}},type:{required:!0,name:"other",value:"radio"}}},args:{label:"Search",placeholder:"Search planets"}},t={args:{defaultValue:""}},o={args:{defaultValue:"",variant:"filled"}},r={args:{isDisabled:!0}},a={args:{isFullWidth:!0}},n={parameters:{docs:{description:{story:"When the component is controlled, the parent component is responsible for managing the state of `SearchField`. `onChange` should be used to listen for component changes and to update the values in the `value` prop."}}},args:{defaultValue:void 0},render:function(w){const[x,l]=s.useState("Jupiter"),k=s.useCallback(W=>l(W.target.value),[]),D=s.useCallback(()=>{l("")},[]);return E.jsx(T,{...w,onChange:k,onClear:D,value:x})}};var u,p,m;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
|
2
|
-
args: {
|
|
3
|
-
defaultValue: ""
|
|
4
|
-
}
|
|
5
|
-
}`,...(m=(p=t.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var c,d,h;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
|
6
|
-
args: {
|
|
7
|
-
defaultValue: "",
|
|
8
|
-
variant: "filled"
|
|
9
|
-
}
|
|
10
|
-
}`,...(h=(d=o.parameters)==null?void 0:d.docs)==null?void 0:h.source}}};var f,g,b;r.parameters={...r.parameters,docs:{...(f=r.parameters)==null?void 0:f.docs,source:{originalSource:`{
|
|
11
|
-
args: {
|
|
12
|
-
isDisabled: true
|
|
13
|
-
}
|
|
14
|
-
}`,...(b=(g=r.parameters)==null?void 0:g.docs)==null?void 0:b.source}}};var y,C,v;a.parameters={...a.parameters,docs:{...(y=a.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
|
15
|
-
args: {
|
|
16
|
-
isFullWidth: true
|
|
17
|
-
}
|
|
18
|
-
}`,...(v=(C=a.parameters)==null?void 0:C.docs)==null?void 0:v.source}}};var V,S,F;n.parameters={...n.parameters,docs:{...(V=n.parameters)==null?void 0:V.docs,source:{originalSource:`{
|
|
19
|
-
parameters: {
|
|
20
|
-
docs: {
|
|
21
|
-
description: {
|
|
22
|
-
story: "When the component is controlled, the parent component is responsible for managing the state of \`SearchField\`. \`onChange\` should be used to listen for component changes and to update the values in the \`value\` prop."
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
args: {
|
|
27
|
-
defaultValue: undefined
|
|
28
|
-
},
|
|
29
|
-
render: function C(props) {
|
|
30
|
-
const [constrolledValue, setControlledValue] = useState("Jupiter");
|
|
31
|
-
const onChange = useCallback((event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => setControlledValue(event.target.value), []);
|
|
32
|
-
const onClear = useCallback(() => {
|
|
33
|
-
setControlledValue("");
|
|
34
|
-
}, []);
|
|
35
|
-
return <SearchField {...props} onChange={onChange} onClear={onClear} value={constrolledValue} />;
|
|
36
|
-
}
|
|
37
|
-
}`,...(F=(S=n.parameters)==null?void 0:S.docs)==null?void 0:F.source}}};const ve=["Default","FilledVariant","Disabled","FullWidth","ControlledSearch"];export{n as ControlledSearch,t as Default,r as Disabled,o as FilledVariant,a as FullWidth,ve as __namedExportsOrder,Ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as se,_ as W,b as s,a3 as pe,s as h,f as q,r as _,W as We,V as Ee,d as ce,e as le,Q as ot,A as nt,aG as rt}from"./OdysseyThemeProvider-uYQ_l8PJ.js";import{r as p}from"./index-NdkWRN8K.js";import{M as st}from"./Menu-g2Uj1mcn.js";import{j as c}from"./jsx-runtime-CnH95YSl.js";import{i as lt}from"./utils-iop7lDec.js";import{u as we}from"./useControlled-NQulfz4l.js";import{u as Le}from"./useIsFocusVisible-DH0qxT5e.js";import{o as it}from"./ownerDocument-DW-IO8s5.js";import{u as je,f as Ue}from"./useFormControl-BMISTZuX.js";import{g as at,f as U,a as dt,i as K,b as ut,o as M,A as pt}from"./ArrowDropDown-CSyg-khO.js";import{g as ct}from"./getReactElementRef-CYW9xr5m.js";import{I as fe,a as be,r as me,b as ve,i as ge}from"./InputBase-Cc2rXj8N.js";const ft=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],bt=e=>{const{classes:t,disableUnderline:o}=e,l=q({root:["root",!o&&"underline"],input:["input"]},at,t);return s({},t,l)},mt=h(be,{shouldForwardProp:e=>_(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[...me(e,t),!o.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var o;const r=e.palette.mode==="light",l=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",d=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return s({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:d,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a}},[`&.${U.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a},[`&.${U.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(o=(e.vars||e).palette[t.color||"primary"])==null?void 0:o.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${U.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${U.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:l}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${U.disabled}, .${U.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${U.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&s({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),vt=h(ve,{name:"MuiFilledInput",slot:"Input",overridesResolver:ge})(({theme:e,ownerState:t})=>s({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),_e=p.forwardRef(function(t,o){var r,l,a,d;const i=se({props:t,name:"MuiFilledInput"}),{components:C={},componentsProps:I,fullWidth:v=!1,inputComponent:$="input",multiline:b=!1,slotProps:y,slots:R={},type:P="text"}=i,F=W(i,ft),S=s({},i,{fullWidth:v,inputComponent:$,multiline:b,type:P}),x=bt(i),O={root:{ownerState:S},input:{ownerState:S}},f=y??I?pe(O,y??I):O,w=(r=(l=R.root)!=null?l:C.Root)!=null?r:mt,k=(a=(d=R.input)!=null?d:C.Input)!=null?a:vt;return c.jsx(fe,s({slots:{root:w,input:k},componentsProps:f,fullWidth:v,inputComponent:$,multiline:b,ref:o,type:P},F,{classes:x}))});_e.muiName="Input";const gt=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],ht=e=>{const{classes:t,disableUnderline:o}=e,l=q({root:["root",!o&&"underline"],input:["input"]},dt,t);return s({},t,l)},Ct=h(be,{shouldForwardProp:e=>_(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[...me(e,t),!o.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),s({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${K.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${K.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${K.disabled}, .${K.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${K.disabled}:before`]:{borderBottomStyle:"dotted"}})}),xt=h(ve,{name:"MuiInput",slot:"Input",overridesResolver:ge})({}),Ae=p.forwardRef(function(t,o){var r,l,a,d;const i=se({props:t,name:"MuiInput"}),{disableUnderline:C,components:I={},componentsProps:v,fullWidth:$=!1,inputComponent:b="input",multiline:y=!1,slotProps:R,slots:P={},type:F="text"}=i,S=W(i,gt),x=ht(i),f={root:{ownerState:{disableUnderline:C}}},w=R??v?pe(R??v,f):f,k=(r=(l=P.root)!=null?l:I.Root)!=null?r:Ct,B=(a=(d=P.input)!=null?d:I.Input)!=null?a:xt;return c.jsx(fe,s({slots:{root:k,input:B},slotProps:w,fullWidth:$,inputComponent:b,multiline:y,ref:o,type:F},S,{classes:x}))});Ae.muiName="Input";function It(e){return Ee("MuiNativeSelect",e)}const he=We("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),yt=["className","disabled","error","IconComponent","inputRef","variant"],Rt=e=>{const{classes:t,variant:o,disabled:r,multiple:l,open:a,error:d}=e,i={select:["select",o,r&&"disabled",l&&"multiple",d&&"error"],icon:["icon",`icon${le(o)}`,a&&"iconOpen",r&&"disabled"]};return q(i,It,t)},De=({ownerState:e,theme:t})=>s({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":s({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${he.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),St=h("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:_,overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.select,t[o.variant],o.error&&t.error,{[`&.${he.multiple}`]:t.multiple}]}})(De),Te=({ownerState:e,theme:t})=>s({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${he.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),$t=h("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.icon,o.variant&&t[`icon${le(o.variant)}`],o.open&&t.iconOpen]}})(Te),Ot=p.forwardRef(function(t,o){const{className:r,disabled:l,error:a,IconComponent:d,inputRef:i,variant:C="standard"}=t,I=W(t,yt),v=s({},t,{disabled:l,variant:C,error:a}),$=Rt(v);return c.jsxs(p.Fragment,{children:[c.jsx(St,s({ownerState:v,className:ce($.select,r),disabled:l,ref:i||o},I)),t.multiple?null:c.jsx($t,{as:d,ownerState:v,className:$.icon})]})});var Ne;const Pt=["children","classes","className","label","notched"],kt=h("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:_})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Ft=h("legend",{name:"MuiNotchedOutlined",shouldForwardProp:_})(({ownerState:e,theme:t})=>s({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&s({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function wt(e){const{className:t,label:o,notched:r}=e,l=W(e,Pt),a=o!=null&&o!=="",d=s({},e,{notched:r,withLabel:a});return c.jsx(kt,s({"aria-hidden":!0,className:t,ownerState:d},l,{children:c.jsx(Ft,{ownerState:d,children:a?c.jsx("span",{children:o}):Ne||(Ne=c.jsx("span",{className:"notranslate",children:""}))})}))}const Nt=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Bt=e=>{const{classes:t}=e,r=q({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},ut,t);return s({},t,r)},Mt=h(be,{shouldForwardProp:e=>_(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:me})(({theme:e,ownerState:t})=>{const o=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return s({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${M.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${M.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:o}},[`&.${M.focused} .${M.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${M.error} .${M.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${M.disabled} .${M.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&s({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),Wt=h(wt,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Et=h(ve,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:ge})(({theme:e,ownerState:t})=>s({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),ze=p.forwardRef(function(t,o){var r,l,a,d,i;const C=se({props:t,name:"MuiOutlinedInput"}),{components:I={},fullWidth:v=!1,inputComponent:$="input",label:b,multiline:y=!1,notched:R,slots:P={},type:F="text"}=C,S=W(C,Nt),x=Bt(C),O=je(),f=Ue({props:C,muiFormControl:O,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=s({},C,{color:f.color||"primary",disabled:f.disabled,error:f.error,focused:f.focused,formControl:O,fullWidth:v,hiddenLabel:f.hiddenLabel,multiline:y,size:f.size,type:F}),k=(r=(l=P.root)!=null?l:I.Root)!=null?r:Mt,B=(a=(d=P.input)!=null?d:I.Input)!=null?a:Et;return c.jsx(fe,s({slots:{root:k,input:B},renderSuffix:E=>c.jsx(Wt,{ownerState:w,className:x.notchedOutline,label:b!=null&&b!==""&&f.required?i||(i=c.jsxs(p.Fragment,{children:[b," ","*"]})):b,notched:typeof R<"u"?R:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:v,inputComponent:$,multiline:y,ref:o,type:F},S,{classes:s({},x,{notchedOutline:null})}))});ze.muiName="Input";function Lt(e){return Ee("MuiSelect",e)}const X=We("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Be;const jt=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Ut=h("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{[`&.${X.select}`]:t.select},{[`&.${X.select}`]:t[o.variant]},{[`&.${X.error}`]:t.error},{[`&.${X.multiple}`]:t.multiple}]}})(De,{[`&.${X.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),_t=h("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.icon,o.variant&&t[`icon${le(o.variant)}`],o.open&&t.iconOpen]}})(Te),At=h("input",{shouldForwardProp:e=>rt(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Me(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Dt(e){return e==null||typeof e=="string"&&!e.trim()}const Tt=e=>{const{classes:t,variant:o,disabled:r,multiple:l,open:a,error:d}=e,i={select:["select",o,r&&"disabled",l&&"multiple",d&&"error"],icon:["icon",`icon${le(o)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return q(i,Lt,t)},zt=p.forwardRef(function(t,o){var r;const{"aria-describedby":l,"aria-label":a,autoFocus:d,autoWidth:i,children:C,className:I,defaultOpen:v,defaultValue:$,disabled:b,displayEmpty:y,error:R=!1,IconComponent:P,inputRef:F,labelId:S,MenuProps:x={},multiple:O,name:f,onBlur:w,onChange:k,onClose:B,onFocus:E,onOpen:H,open:G,readOnly:Q,renderValue:V,SelectDisplayProps:N={},tabIndex:L,value:J,variant:Y="standard"}=t,A=W(t,jt),[m,xe]=we({controlled:J,default:$,name:"Select"}),[Ie,Ve]=we({controlled:G,default:v,name:"Select"}),ye=p.useRef(null),j=p.useRef(null),[D,Ke]=p.useState(null),{current:ie}=p.useRef(G!=null),[Xe,Re]=p.useState(),qe=Le(o,F),He=p.useCallback(n=>{j.current=n,n&&Ke(n)},[]),Z=D==null?void 0:D.parentNode;p.useImperativeHandle(qe,()=>({focus:()=>{j.current.focus()},node:ye.current,value:m}),[m]),p.useEffect(()=>{v&&Ie&&D&&!ie&&(Re(i?null:Z.clientWidth),j.current.focus())},[D,i]),p.useEffect(()=>{d&&j.current.focus()},[d]),p.useEffect(()=>{if(!S)return;const n=it(j.current).getElementById(S);if(n){const u=()=>{getSelection().isCollapsed&&j.current.focus()};return n.addEventListener("click",u),()=>{n.removeEventListener("click",u)}}},[S]);const ee=(n,u)=>{n?H&&H(u):B&&B(u),ie||(Re(i?null:Z.clientWidth),Ve(n))},Ge=n=>{n.button===0&&(n.preventDefault(),j.current.focus(),ee(!0,n))},Qe=n=>{ee(!1,n)},Se=p.Children.toArray(C),Je=n=>{const u=Se.find(g=>g.props.value===n.target.value);u!==void 0&&(xe(u.props.value),k&&k(n,u))},Ye=n=>u=>{let g;if(u.currentTarget.hasAttribute("tabindex")){if(O){g=Array.isArray(m)?m.slice():[];const z=m.indexOf(n.props.value);z===-1?g.push(n.props.value):g.splice(z,1)}else g=n.props.value;if(n.props.onClick&&n.props.onClick(u),m!==g&&(xe(g),k)){const z=u.nativeEvent||u,Fe=new z.constructor(z.type,z);Object.defineProperty(Fe,"target",{writable:!0,value:{value:g,name:f}}),k(Fe,n)}O||ee(!1,u)}},Ze=n=>{Q||[" ","ArrowUp","ArrowDown","Enter"].indexOf(n.key)!==-1&&(n.preventDefault(),ee(!0,n))},te=D!==null&&Ie,et=n=>{!te&&w&&(Object.defineProperty(n,"target",{writable:!0,value:{value:m,name:f}}),w(n))};delete A["aria-invalid"];let T,$e;const oe=[];let ne=!1;(lt({value:m})||y)&&(V?T=V(m):ne=!0);const tt=Se.map(n=>{if(!p.isValidElement(n))return null;let u;if(O){if(!Array.isArray(m))throw new Error(ot(2));u=m.some(g=>Me(g,n.props.value)),u&&ne&&oe.push(n.props.children)}else u=Me(m,n.props.value),u&&ne&&($e=n.props.children);return p.cloneElement(n,{"aria-selected":u?"true":"false",onClick:Ye(n),onKeyUp:g=>{g.key===" "&&g.preventDefault(),n.props.onKeyUp&&n.props.onKeyUp(g)},role:"option",selected:u,value:void 0,"data-value":n.props.value})});ne&&(O?oe.length===0?T=null:T=oe.reduce((n,u,g)=>(n.push(u),g<oe.length-1&&n.push(", "),n),[]):T=$e);let Oe=Xe;!i&&ie&&D&&(Oe=Z.clientWidth);let ae;typeof L<"u"?ae=L:ae=b?null:0;const Pe=N.id||(f?`mui-component-select-${f}`:void 0),re=s({},t,{variant:Y,value:m,open:te,error:R}),de=Tt(re),ue=s({},x.PaperProps,(r=x.slotProps)==null?void 0:r.paper),ke=nt();return c.jsxs(p.Fragment,{children:[c.jsx(Ut,s({ref:He,tabIndex:ae,role:"combobox","aria-controls":ke,"aria-disabled":b?"true":void 0,"aria-expanded":te?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[S,Pe].filter(Boolean).join(" ")||void 0,"aria-describedby":l,onKeyDown:Ze,onMouseDown:b||Q?null:Ge,onBlur:et,onFocus:E},N,{ownerState:re,className:ce(N.className,de.select,I),id:Pe,children:Dt(T)?Be||(Be=c.jsx("span",{className:"notranslate",children:""})):T})),c.jsx(At,s({"aria-invalid":R,value:Array.isArray(m)?m.join(","):m,name:f,ref:ye,"aria-hidden":!0,onChange:Je,tabIndex:-1,disabled:b,className:de.nativeInput,autoFocus:d,ownerState:re},A)),c.jsx(_t,{as:P,className:de.icon,ownerState:re}),c.jsx(st,s({id:`menu-${f||""}`,anchorEl:Z,open:te,onClose:Qe,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},x,{MenuListProps:s({"aria-labelledby":S,role:"listbox","aria-multiselectable":O?"true":void 0,disableListWrap:!0,id:ke},x.MenuListProps),slotProps:s({},x.slotProps,{paper:s({},ue,{style:s({minWidth:Oe},ue!=null?ue.style:null)})}),children:tt}))]})}),Vt=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Kt=["root"],Xt=e=>{const{classes:t}=e;return t},Ce={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>_(e)&&e!=="variant",slot:"Root"},qt=h(Ae,Ce)(""),Ht=h(ze,Ce)(""),Gt=h(_e,Ce)(""),Qt=p.forwardRef(function(t,o){const r=se({name:"MuiSelect",props:t}),{autoWidth:l=!1,children:a,classes:d={},className:i,defaultOpen:C=!1,displayEmpty:I=!1,IconComponent:v=pt,id:$,input:b,inputProps:y,label:R,labelId:P,MenuProps:F,multiple:S=!1,native:x=!1,onClose:O,onOpen:f,open:w,renderValue:k,SelectDisplayProps:B,variant:E="outlined"}=r,H=W(r,Vt),G=x?Ot:zt,Q=je(),V=Ue({props:r,muiFormControl:Q,states:["variant","error"]}),N=V.variant||E,L=s({},r,{variant:N,classes:d}),J=Xt(L),Y=W(J,Kt),A=b||{standard:c.jsx(qt,{ownerState:L}),outlined:c.jsx(Ht,{label:R,ownerState:L}),filled:c.jsx(Gt,{ownerState:L})}[N],m=Le(o,ct(A));return c.jsx(p.Fragment,{children:p.cloneElement(A,s({inputComponent:G,inputProps:s({children:a,error:V.error,IconComponent:v,variant:N,type:void 0,multiple:S},x?{id:$}:{autoWidth:l,defaultOpen:C,displayEmpty:I,labelId:P,MenuProps:F,onClose:O,onOpen:f,open:w,renderValue:k,SelectDisplayProps:s({id:$},B)},y,{classes:y?pe(Y,y.classes):Y},b?b.props.inputProps:{})},(S&&x||I)&&N==="outlined"?{notched:!0}:{},{ref:m,className:ce(A.props.className,i,J.root)},!b&&{variant:N},H))})});Qt.muiName="Select";export{_e as F,Ae as I,ze as O,Qt as S};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{u as Y,h as I,L as N,M as Z}from"./OdysseyThemeProvider-uYQ_l8PJ.js";import{r}from"./index-NdkWRN8K.js";import{M as _}from"./Field-BVmhMv9m.js";import{g as ee,u as te,C as ne}from"./inputUtils-Dbi8XkA6.js";import{j as n}from"./jsx-runtime-CnH95YSl.js";import{C as se}from"./Chip-p4lq04qX.js";import{L as re}from"./ListSubheader-CBvKBAKL.js";import{M as ae}from"./MenuItem-DR63CY7B.js";import{C as le}from"./Checkbox-DGd8S5xK.js";import{L as ie}from"./ListItem-Bv1M9lel.js";import{S as oe}from"./Select-BcdWA_SU.js";import{B as ce}from"./Box-C-xmRxaS.js";/*!
|
|
2
|
-
* Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
-
*
|
|
5
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
10
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/const ue=(...s)=>{const o="-";return s.join(o).replace(/\W+/g,o).toLowerCase()},de=I.div`
|
|
12
|
-
position: relative;
|
|
13
|
-
width: 100%;
|
|
14
|
-
display: flex;
|
|
15
|
-
`,me=I("div",{shouldForwardProp:s=>s!=="odysseyDesignTokens"})(({odysseyDesignTokens:s})=>({alignItems:"center",display:"flex",insetBlockEnd:0,insetBlockStart:0,insetInlineEnd:"25px",insetInlineStart:"4px",marginInlineStart:s.BorderWidthMain,opacity:1,pointerEvents:"none",position:"absolute"})),pe=I(N,{shouldForwardProp:s=>s!=="odysseyDesignTokens"})(({odysseyDesignTokens:s})=>({fontSize:"1em",marginBlockEnd:"-1px",marginInlineEnd:`-${s.Spacing1}`,marginInlineStart:s.Spacing2})),fe=I(ce,{shouldForwardProp:s=>s!=="odysseyDesignTokens"&&s!=="isInteractive"&&s!=="isReadOnly"})(({isInteractive:s,isReadOnly:o,odysseyDesignTokens:p})=>({display:"flex",flexWrap:"wrap",gap:p.Spacing1,marginBlock:`-${p.Spacing2}`,marginInlineEnd:p.Spacing1,minHeight:p.Spacing6,opacity:s||o?1:0,pointerEvents:"none"})),{CONTROLLED:h}=ne,ge=({ariaDescribedBy:s,defaultValue:o,errorMessage:p,errorMessageList:W,hasMultipleChoices:j,hint:P,HintLinkComponent:$,id:K,inputRef:q,isDisabled:v=!1,isFullWidth:G=!1,isMultiSelect:M,isOptional:J=!1,isReadOnly:u=!1,label:Q,name:k,onBlur:E,onChange:y,onFocus:L,options:w,testId:z,translate:F,value:f})=>{const U=r.useRef(null),a=r.useMemo(()=>j===void 0?M:j,[j,M]),d=r.useRef(ee({controlledValue:f,uncontrolledValue:o})),[l,A]=r.useState(d.current===h?f:o),b=r.useRef(null),g=Y();r.useImperativeHandle(q,()=>({focus:()=>{var t;(t=b.current)==null||t.focus()}}),[]),r.useEffect(()=>{d.current===h&&A(f)},[f]);const B=te({defaultValue:o,value:f,controlState:d.current}),S=r.useCallback((t,i)=>{if(u)t.preventDefault();else{const{target:{value:e}}=t;d.current!==h&&A(typeof e=="string"&&a?e.split(","):e),y==null||y(t,i)}},[a,y,u]),[D,V]=r.useMemo(()=>{const t=w.map(e=>{if(typeof e=="object"){const m=(e==null?void 0:e.value)===""?e.value:e.value||e.text;return{text:e.text,value:m,type:e.type==="heading"?"heading":"option",lang:e.language}}return{text:e,value:e,type:"option"}}),i=new Map(t.map(e=>[e.value,e]));return[t,i]},[w]),R=r.useCallback(t=>{if(Array.isArray(l)){const e={target:{value:l.filter(m=>m!==t)}};S(e,null)}},[l,S]),C=r.useCallback(({ariaLabel:t,isInteractive:i,isReadOnly:e})=>{const m=c=>c.stopPropagation(),x=!i&&!e&&d.current===h&&a;return Array.isArray(l)&&n.jsx(fe,{"aria-label":t,isInteractive:i,isReadOnly:e,odysseyDesignTokens:g,role:"list",children:l.map(c=>{var H;return(c==null?void 0:c.length)>0&&n.jsx(se,{deleteIcon:n.jsx(N,{onMouseDown:m,sx:{pointerEvents:"auto"}}),label:n.jsxs(n.Fragment,{children:[(H=V.get(c))==null?void 0:H.text,x&&n.jsx(pe,{odysseyDesignTokens:g})]}),onDelete:i&&d.current===h?()=>R(c):void 0,role:"listitem",tabIndex:-1},c)})})},[d,a,l,g,R,V]),T=r.useMemo(()=>D.map((t,i)=>{if(t.type==="heading")return n.jsxs(re,{children:[" ",t.text," "]},t.text);const e=a?l==null?void 0:l.includes(t.value):l===t.value;return n.jsxs(ae,{"data-empty":!t.text,lang:t.lang,selected:e,value:t.value,children:[a&&n.jsx(le,{checked:e}),t.text,!a&&l===t.value&&n.jsx(ie,{children:n.jsx(Z,{})})]},ue(t.text,i.toString()))}),[a,D,l]),O=r.useCallback(t=>Array.isArray(t)&&n.jsx(C,{isInteractive:!1}),[C]),X=r.useCallback(({ariaDescribedBy:t,errorMessageElementId:i,id:e,labelElementId:m})=>n.jsxs(de,{children:[n.jsx(oe,{...B,"aria-describedby":t,"aria-errormessage":i,displayEmpty:!0,id:e,inputProps:{"data-se":z,"aria-disabled":v||u,readOnly:u},inputRef:x=>{b.current!==x&&(b.current=x),U.current=x},labelId:m,MenuProps:{sx:{".MuiPaper-root":{maxHeight:"50vh"}}},multiple:a,name:k??e,onBlur:E,onChange:S,onFocus:L,renderValue:a?O:void 0,translate:F,children:T}),a&&n.jsx(n.Fragment,{children:n.jsx(me,{odysseyDesignTokens:g,children:n.jsx(C,{ariaLabel:"Selected options",isInteractive:!u,isReadOnly:u})})})]}),[C,B,a,v,u,k,g,E,S,L,T,O,z,F]);return n.jsx(_,{ariaDescribedBy:s,errorMessage:p,errorMessageList:W,fieldType:"single",hasVisibleLabel:!0,hint:P,HintLinkComponent:$,id:K,isDisabled:v,isFullWidth:G,isOptional:J,label:Q,renderFieldComponent:X})},xe=r.memo(ge);xe.displayName="Select";export{xe as M};
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./jsx-runtime-CnH95YSl.js";import{f as R,u as i,s as Te}from"./index-BJMTVygn.js";import{O as Ee}from"./OdysseyStorybookThemeDecorator-DsQ8XVOG.js";import{u as Le}from"./useStoryArgOrLocalState-CRQAGSTX.js";import{f as s}from"./fieldComponentPropsMetaData-kU3Yruac.js";import{M as c}from"./Select-mT9rgyNE.js";import{M as Re}from"./Link-P2sjP-aD.js";import"./index-NdkWRN8K.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./OdysseyThemeProvider-uYQ_l8PJ.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-YUKfsUrL.js";import"./Field-BVmhMv9m.js";import"./Box-XLjSpNxK.js";import"./Box-C-xmRxaS.js";import"./createBox-emhTu6dS.js";import"./List-BcG-NsbC.js";import"./ListItem-Bv1M9lel.js";import"./utils-iop7lDec.js";import"./useFormControl-BMISTZuX.js";import"./FormLabel-C4KesWyd.js";import"./useIsFocusVisible-DH0qxT5e.js";import"./isHostComponent-DVu5iVWx.js";import"./ButtonBase-Wolvis_2.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-6wpAF9yl.js";import"./TransitionGroupContext-DAL84N7p.js";import"./ScreenReaderText-CQNs2mcT.js";import"./visuallyHidden-Dan1xhjv.js";import"./FormHelperText-CZEj6vhF.js";import"./FieldHint-BFs7d7f5.js";import"./Typography-gfYWxfhb.js";import"./Typography-BIFhmR2K.js";import"./useUniqueId-DUzAQ6pl.js";import"./createUniqueId-BHjR7HQF.js";import"./inputUtils-Dbi8XkA6.js";import"./Chip-p4lq04qX.js";import"./createSvgIcon-SdTF6s8l.js";import"./ListSubheader-CBvKBAKL.js";import"./MenuItem-DR63CY7B.js";import"./Checkbox-DGd8S5xK.js";import"./SwitchBase-DDdOwpAs.js";import"./useControlled-NQulfz4l.js";import"./Select-BcdWA_SU.js";import"./Menu-g2Uj1mcn.js";import"./getReactElementRef-CYW9xr5m.js";import"./resolveComponentProps-zX2d3UUb.js";import"./Grow-CbLflC0D.js";import"./utils-uddq32f3.js";import"./index-B5xazMy1.js";import"./index-DieBXP3Z.js";import"./ownerDocument-DW-IO8s5.js";import"./ownerWindow-HkKU3E4x.js";import"./debounce-Be36O1Ab.js";import"./Modal-D0XtQHFw.js";import"./getScrollbarSize-Bqq2hMjQ.js";import"./createChainedFunction-BO_9K8Jh.js";import"./Portal-ev1Y_qJb.js";import"./Fade-DSMklDt3.js";import"./Paper-BGSgbZC6.js";import"./MenuList-sllDVDo3.js";import"./ArrowDropDown-CSyg-khO.js";import"./InputBase-Cc2rXj8N.js";import"./Link-LYj8-DeM.js";import"./ExternalLink-C7UPr4SL.js";const r=["Option A","Option B","Option C","Option D","Option E"],we=["None",...r],Ve=we.reduce((t,o)=>(t[o]=o==="None"?"":o,t),{}),Fe=[{text:"Group 1",type:"heading"},"Option A","Option B","Option C",{text:"Group 2",type:"heading"},"Option D","Option E"],je=[{text:"Object option A",value:"option-a"},{text:"Object option B",value:"option-b"},{text:"Object option C",value:"option-c"}],Be=[{text:"English",value:"en",language:"en"},{text:"Español",value:"es",language:"es"},{text:"Français",value:"fr",language:"fr"},{text:"Deutsch",value:"de",language:"de"},{text:"中文",value:"zh",language:"zh"},{text:"日本語",value:"ja",language:"ja"},{text:"한국어",value:"ko",language:"ko"}],_t={component:c,decorators:[Ee],tags:["autodocs"],argTypes:{ariaDescribedBy:{control:"text",description:"ID of the element that provides additional description for the field",table:{category:"Functional",type:{summary:"string"}}},defaultValue:{control:{type:"text"},description:"If `value` is undefined, the field is uncontrolled and `defaultValue` provides its initial text",table:{category:"Functional",type:{summary:"string | string[]"}}},errorMessage:s.errorMessage,errorMessageList:s.errorMessageList,hasMultipleChoices:{control:"boolean",description:"If `true`, the Select allows multiple selections",table:{readonly:!0,category:"Functional",type:{summary:"boolean"},defaultValue:{summary:"false"}}},hint:s.hint,HintLinkComponent:s.HintLinkComponent,id:s.id,isDisabled:s.isDisabled,isFullWidth:s.isFullWidth,isOptional:s.isOptional,isReadOnly:s.isReadOnly,label:{control:"text",description:"The label text for the select component",table:{category:"Visual",type:{summary:"string"}},type:{name:"string",required:!0}},name:s.name,onBlur:{control:!1,description:"Callback fired when the select component loses focus",table:{category:"Functional",type:{summary:"func"}}},onChange:{control:!1,description:"Callback fired when the value of the select component changes",table:{category:"Functional",type:{summary:"func"}}},onFocus:{control:!1,description:"Callback fired when the select component gains focus",table:{category:"Functional",type:{summary:"func"}}},options:{control:{type:"check"},description:"The options for the select component",options:r,table:{category:"Visual",type:{summary:"(string | SelectOption)[]"}}},testId:{control:"text",description:"Adds `data-se` attribute",table:{category:"Functional",type:{summary:"string"}}},translate:{control:{type:"radio"},options:["yes","no"],description:"Sets the HTML `translate` attribute on the rendered field",table:{category:"Functional",type:{summary:'"yes" | "no"'}}},value:{control:{type:"radio"},options:we,mapping:Ve,description:"If `value` is provided, you control the input externally and must handle updates with `onChange`.",table:{category:"Functional",type:{summary:"string | string[]"}}}},args:{errorMessageList:[],hint:"Hint text",label:"Label",onBlur:R(),onChange:R(),onFocus:R(),options:r,isDisabled:!1,isFullWidth:!1,isOptional:!1,hasMultipleChoices:!1,value:"None"}},n={args:{hasMultipleChoices:!1},render:function(o,a){const e=o,{value:l,setValue:L}=Le({args:e,context:a,argKey:"value",defaultValue:typeof e.value=="string"?e.value:""}),w=E=>{L(E.target.value)};return p.jsx(c,{...e,hasMultipleChoices:!1,onChange:w,value:l})}},V={args:{hasMultipleChoices:!0},render:function(o,a){const e=o,{value:l,setValue:L}=Le({args:e,context:a,argKey:"value",defaultValue:Array.isArray(e.value)?e.value:[]}),w=E=>{L(E.target.value)};return p.jsx(c,{...e,hasMultipleChoices:!0,onChange:w,value:l})}},u={...n,play:async({canvasElement:t,step:o})=>{await o("Select first option",async()=>{const a=t.querySelector('[aria-haspopup="listbox"]');if(!a)return;await i.click(a);const l=Te.getByRole("listbox").children[0];await i.click(l),await i.tab()})},tags:["!autodocs"]},m={...n,args:{isDisabled:!0}},d={...n,args:{errorMessage:"Select an option."}},g={...n,args:{errorMessage:"Select an option.",errorMessageList:["Error A","Error B"]}},y={...n,args:{isFullWidth:!0}},h={...n,args:{HintLinkComponent:p.jsx(Re,{href:"#",children:"Link"})}},b={...n,args:{options:["",...r],value:"None"},argTypes:{options:{control:!1}},parameters:{docs:{description:{story:"Select supports an empty string entry so the first selection renders no visible value"}}}},f={...n,args:{options:je,value:"option-b"},argTypes:{options:{control:!1},value:{control:!1}},parameters:{docs:{description:{story:"Select supports passing option objects with distinct text and value properties"}}}},O={...n,args:{options:Fe},argTypes:{options:{control:!1}},parameters:{docs:{description:{story:'Options marked with `type: "heading"` create non-selectable group labels'}}}},v={...V,args:{hasMultipleChoices:!0,value:[]},argTypes:{value:{control:{type:"check"},options:r}},play:async({canvasElement:t,step:o})=>{await o("Select multiple options",async()=>{const a=t.querySelector('[aria-haspopup="listbox"]');if(!a)return;await i.click(a);const e=Te.getByRole("listbox");await i.click(e.children[0]),await i.click(e.children[1]),await i.tab()})}},S={...n,args:{isReadOnly:!0,value:"Option C"}},x={...V,args:{hasMultipleChoices:!0,isReadOnly:!0,value:["Option A","Option C","Option D"]},argTypes:{value:{control:{type:"check"},options:r}}},M={...V,args:{hasMultipleChoices:!0,isReadOnly:!0,value:["Option B","Option E"]},argTypes:{value:{control:{type:"check"},options:r}}},C={...n,args:{label:"Label",options:Be,value:""},argTypes:{options:{control:!1}},parameters:{docs:{description:{story:"Showcase the Select component with options for multiple different languages"}}}},k={args:{defaultValue:"Option B",value:void 0,label:"Label",options:r},argTypes:{value:{control:!1},defaultValue:{control:{type:"radio"},options:r}},parameters:{docs:{description:{story:"Use the uncontrolled pattern for simple forms where you do not need to react to user selection changes"}}},render:t=>p.jsx(c,{...t})},T={args:{defaultValue:["Option B","Option C"],hasMultipleChoices:!0,value:void 0,label:"Label",options:r},argTypes:{value:{control:!1},defaultValue:{control:{type:"check"},options:r}},render:t=>p.jsx(c,{...t})};var F,j,B;u.parameters={...u.parameters,docs:{...(F=u.parameters)==null?void 0:F.docs,source:{originalSource:`{
|
|
2
|
-
...singleSelectTemplate,
|
|
3
|
-
play: async ({
|
|
4
|
-
canvasElement,
|
|
5
|
-
step
|
|
6
|
-
}) => {
|
|
7
|
-
await step("Select first option", async () => {
|
|
8
|
-
const trigger = canvasElement.querySelector('[aria-haspopup="listbox"]');
|
|
9
|
-
if (!trigger) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
await userEvent.click(trigger);
|
|
13
|
-
const listbox = screen.getByRole("listbox");
|
|
14
|
-
const firstOption = listbox.children[0];
|
|
15
|
-
await userEvent.click(firstOption);
|
|
16
|
-
await userEvent.tab();
|
|
17
|
-
});
|
|
18
|
-
},
|
|
19
|
-
tags: ["!autodocs"]
|
|
20
|
-
}`,...(B=(j=u.parameters)==null?void 0:j.docs)==null?void 0:B.source}}};var D,A,H;m.parameters={...m.parameters,docs:{...(D=m.parameters)==null?void 0:D.docs,source:{originalSource:`{
|
|
21
|
-
...singleSelectTemplate,
|
|
22
|
-
args: {
|
|
23
|
-
isDisabled: true
|
|
24
|
-
}
|
|
25
|
-
}`,...(H=(A=m.parameters)==null?void 0:A.docs)==null?void 0:H.source}}};var W,U,q;d.parameters={...d.parameters,docs:{...(W=d.parameters)==null?void 0:W.docs,source:{originalSource:`{
|
|
26
|
-
...singleSelectTemplate,
|
|
27
|
-
args: {
|
|
28
|
-
errorMessage: "Select an option."
|
|
29
|
-
}
|
|
30
|
-
}`,...(q=(U=d.parameters)==null?void 0:U.docs)==null?void 0:q.source}}};var I,N,z;g.parameters={...g.parameters,docs:{...(I=g.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
|
31
|
-
...singleSelectTemplate,
|
|
32
|
-
args: {
|
|
33
|
-
errorMessage: "Select an option.",
|
|
34
|
-
errorMessageList: ["Error A", "Error B"]
|
|
35
|
-
}
|
|
36
|
-
}`,...(z=(N=g.parameters)==null?void 0:N.docs)==null?void 0:z.source}}};var G,K,_;y.parameters={...y.parameters,docs:{...(G=y.parameters)==null?void 0:G.docs,source:{originalSource:`{
|
|
37
|
-
...singleSelectTemplate,
|
|
38
|
-
args: {
|
|
39
|
-
isFullWidth: true
|
|
40
|
-
}
|
|
41
|
-
}`,...(_=(K=y.parameters)==null?void 0:K.docs)==null?void 0:_.source}}};var P,J,Q;h.parameters={...h.parameters,docs:{...(P=h.parameters)==null?void 0:P.docs,source:{originalSource:`{
|
|
42
|
-
...singleSelectTemplate,
|
|
43
|
-
args: {
|
|
44
|
-
HintLinkComponent: <Link href="#">Link</Link>
|
|
45
|
-
}
|
|
46
|
-
}`,...(Q=(J=h.parameters)==null?void 0:J.docs)==null?void 0:Q.source}}};var X,Y,Z;b.parameters={...b.parameters,docs:{...(X=b.parameters)==null?void 0:X.docs,source:{originalSource:`{
|
|
47
|
-
...singleSelectTemplate,
|
|
48
|
-
args: {
|
|
49
|
-
options: ["", ...baseOptionLabels],
|
|
50
|
-
value: "None"
|
|
51
|
-
},
|
|
52
|
-
argTypes: {
|
|
53
|
-
options: {
|
|
54
|
-
control: false
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
parameters: {
|
|
58
|
-
docs: {
|
|
59
|
-
description: {
|
|
60
|
-
story: "Select supports an empty string entry so the first selection renders no visible value"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}`,...(Z=(Y=b.parameters)==null?void 0:Y.docs)==null?void 0:Z.source}}};var $,ee,te;f.parameters={...f.parameters,docs:{...($=f.parameters)==null?void 0:$.docs,source:{originalSource:`{
|
|
65
|
-
...singleSelectTemplate,
|
|
66
|
-
args: {
|
|
67
|
-
options: objectOptions,
|
|
68
|
-
value: "option-b"
|
|
69
|
-
},
|
|
70
|
-
argTypes: {
|
|
71
|
-
options: {
|
|
72
|
-
control: false
|
|
73
|
-
},
|
|
74
|
-
value: {
|
|
75
|
-
control: false
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
parameters: {
|
|
79
|
-
docs: {
|
|
80
|
-
description: {
|
|
81
|
-
story: "Select supports passing option objects with distinct text and value properties"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}`,...(te=(ee=f.parameters)==null?void 0:ee.docs)==null?void 0:te.source}}};var oe,re,ne;O.parameters={...O.parameters,docs:{...(oe=O.parameters)==null?void 0:oe.docs,source:{originalSource:`{
|
|
86
|
-
...singleSelectTemplate,
|
|
87
|
-
args: {
|
|
88
|
-
options: groupedOptions
|
|
89
|
-
},
|
|
90
|
-
argTypes: {
|
|
91
|
-
options: {
|
|
92
|
-
control: false
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
parameters: {
|
|
96
|
-
docs: {
|
|
97
|
-
description: {
|
|
98
|
-
story: 'Options marked with \`type: "heading"\` create non-selectable group labels'
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}`,...(ne=(re=O.parameters)==null?void 0:re.docs)==null?void 0:ne.source}}};var se,ae,ie;v.parameters={...v.parameters,docs:{...(se=v.parameters)==null?void 0:se.docs,source:{originalSource:`{
|
|
103
|
-
...multiSelectTemplate,
|
|
104
|
-
args: {
|
|
105
|
-
hasMultipleChoices: true,
|
|
106
|
-
value: []
|
|
107
|
-
},
|
|
108
|
-
argTypes: {
|
|
109
|
-
value: {
|
|
110
|
-
control: {
|
|
111
|
-
type: "check"
|
|
112
|
-
},
|
|
113
|
-
options: baseOptionLabels
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
play: async ({
|
|
117
|
-
canvasElement,
|
|
118
|
-
step
|
|
119
|
-
}) => {
|
|
120
|
-
await step("Select multiple options", async () => {
|
|
121
|
-
const trigger = canvasElement.querySelector('[aria-haspopup="listbox"]');
|
|
122
|
-
if (!trigger) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
await userEvent.click(trigger);
|
|
126
|
-
const listbox = screen.getByRole("listbox");
|
|
127
|
-
await userEvent.click(listbox.children[0]);
|
|
128
|
-
await userEvent.click(listbox.children[1]);
|
|
129
|
-
await userEvent.tab();
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}`,...(ie=(ae=v.parameters)==null?void 0:ae.docs)==null?void 0:ie.source}}};var le,pe,ce;S.parameters={...S.parameters,docs:{...(le=S.parameters)==null?void 0:le.docs,source:{originalSource:`{
|
|
133
|
-
...singleSelectTemplate,
|
|
134
|
-
args: {
|
|
135
|
-
isReadOnly: true,
|
|
136
|
-
value: "Option C"
|
|
137
|
-
}
|
|
138
|
-
}`,...(ce=(pe=S.parameters)==null?void 0:pe.docs)==null?void 0:ce.source}}};var ue,me,de;x.parameters={...x.parameters,docs:{...(ue=x.parameters)==null?void 0:ue.docs,source:{originalSource:`{
|
|
139
|
-
...multiSelectTemplate,
|
|
140
|
-
args: {
|
|
141
|
-
hasMultipleChoices: true,
|
|
142
|
-
isReadOnly: true,
|
|
143
|
-
value: ["Option A", "Option C", "Option D"]
|
|
144
|
-
},
|
|
145
|
-
argTypes: {
|
|
146
|
-
value: {
|
|
147
|
-
control: {
|
|
148
|
-
type: "check"
|
|
149
|
-
},
|
|
150
|
-
options: baseOptionLabels
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}`,...(de=(me=x.parameters)==null?void 0:me.docs)==null?void 0:de.source}}};var ge,ye,he;M.parameters={...M.parameters,docs:{...(ge=M.parameters)==null?void 0:ge.docs,source:{originalSource:`{
|
|
154
|
-
...multiSelectTemplate,
|
|
155
|
-
args: {
|
|
156
|
-
hasMultipleChoices: true,
|
|
157
|
-
isReadOnly: true,
|
|
158
|
-
value: ["Option B", "Option E"]
|
|
159
|
-
},
|
|
160
|
-
argTypes: {
|
|
161
|
-
value: {
|
|
162
|
-
control: {
|
|
163
|
-
type: "check"
|
|
164
|
-
},
|
|
165
|
-
options: baseOptionLabels
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}`,...(he=(ye=M.parameters)==null?void 0:ye.docs)==null?void 0:he.source}}};var be,fe,Oe;C.parameters={...C.parameters,docs:{...(be=C.parameters)==null?void 0:be.docs,source:{originalSource:`{
|
|
169
|
-
...singleSelectTemplate,
|
|
170
|
-
args: {
|
|
171
|
-
label: "Label",
|
|
172
|
-
options: languageOptions,
|
|
173
|
-
value: ""
|
|
174
|
-
},
|
|
175
|
-
argTypes: {
|
|
176
|
-
options: {
|
|
177
|
-
control: false
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
parameters: {
|
|
181
|
-
docs: {
|
|
182
|
-
description: {
|
|
183
|
-
story: "Showcase the Select component with options for multiple different languages"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}`,...(Oe=(fe=C.parameters)==null?void 0:fe.docs)==null?void 0:Oe.source}}};var ve,Se,xe;k.parameters={...k.parameters,docs:{...(ve=k.parameters)==null?void 0:ve.docs,source:{originalSource:`{
|
|
188
|
-
args: {
|
|
189
|
-
defaultValue: "Option B",
|
|
190
|
-
value: undefined,
|
|
191
|
-
label: "Label",
|
|
192
|
-
options: baseOptionLabels
|
|
193
|
-
},
|
|
194
|
-
argTypes: {
|
|
195
|
-
value: {
|
|
196
|
-
control: false
|
|
197
|
-
},
|
|
198
|
-
defaultValue: {
|
|
199
|
-
control: {
|
|
200
|
-
type: "radio"
|
|
201
|
-
},
|
|
202
|
-
options: baseOptionLabels
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
parameters: {
|
|
206
|
-
docs: {
|
|
207
|
-
description: {
|
|
208
|
-
story: "Use the uncontrolled pattern for simple forms where you do not need to react to user selection changes"
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
render: args => <Select {...args as SelectStoryArgs} />
|
|
213
|
-
}`,...(xe=(Se=k.parameters)==null?void 0:Se.docs)==null?void 0:xe.source}}};var Me,Ce,ke;T.parameters={...T.parameters,docs:{...(Me=T.parameters)==null?void 0:Me.docs,source:{originalSource:`{
|
|
214
|
-
args: {
|
|
215
|
-
defaultValue: ["Option B", "Option C"],
|
|
216
|
-
hasMultipleChoices: true,
|
|
217
|
-
value: undefined,
|
|
218
|
-
label: "Label",
|
|
219
|
-
options: baseOptionLabels
|
|
220
|
-
},
|
|
221
|
-
argTypes: {
|
|
222
|
-
value: {
|
|
223
|
-
control: false
|
|
224
|
-
},
|
|
225
|
-
defaultValue: {
|
|
226
|
-
control: {
|
|
227
|
-
type: "check"
|
|
228
|
-
},
|
|
229
|
-
options: baseOptionLabels
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
render: args => <Select {...args as SelectStoryArgs} />
|
|
233
|
-
}`,...(ke=(Ce=T.parameters)==null?void 0:Ce.docs)==null?void 0:ke.source}}};const Pt=["Default","Disabled","Error","ErrorsList","FullWidth","HintLink","EmptyOption","OptionsObject","OptionsGrouped","MultiSelect","ReadOnly","ReadOnlyMultiSelect","ReadOnlyMultiSelectValue","MultipleLanguages","Uncontrolled","UncontrolledMultiSelect"];export{u as Default,m as Disabled,b as EmptyOption,d as Error,g as ErrorsList,y as FullWidth,h as HintLink,v as MultiSelect,C as MultipleLanguages,O as OptionsGrouped,f as OptionsObject,S as ReadOnly,x as ReadOnlyMultiSelect,M as ReadOnlyMultiSelectValue,k as Uncontrolled,T as UncontrolledMultiSelect,Pt as __namedExportsOrder,_t as default};
|