@patternfly/patternfly-doc-core 1.13.2 → 1.13.3
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/.astro/content-modules.mjs +26 -26
- package/cli/tsDocGen.js +33 -7
- package/dist/cli/tsDocGen.js +26 -6
- package/dist/cli/tsconfig.tsbuildinfo +1 -1
- package/dist/docs/_astro/{LiveExample.B5R4Dzng.js → LiveExample.C43dqXje.js} +1 -1
- package/dist/docs/_astro/Navigation.x46lNg3Y.js +1 -0
- package/dist/docs/_astro/{SectionGallery.B0I2mi5J.js → SectionGallery.C8gQa3w3.js} +1 -1
- package/dist/docs/_astro/index.DF2PWfYV.js +16 -0
- package/dist/docs/_worker.js/_@astrojs-ssr-adapter.mjs +1 -1
- package/dist/docs/_worker.js/_astro-internal_middleware.mjs +3 -3
- package/dist/docs/_worker.js/chunks/{_@astro-renderers_B-gIj2th.mjs → _@astro-renderers_DuN_RQCZ.mjs} +1 -1
- package/dist/docs/_worker.js/chunks/{_@astrojs-ssr-adapter_u4VQ4c24.mjs → _@astrojs-ssr-adapter_BOXzLyxA.mjs} +4 -4
- package/dist/docs/_worker.js/chunks/_astro_assets_COD8WDsm.mjs +1959 -0
- package/dist/docs/_worker.js/chunks/astro/{server_DXtGNXGl.mjs → server_DJAlTAUe.mjs} +1 -1
- package/dist/docs/_worker.js/chunks/{astro-designed-error-pages_Cre3i65F.mjs → astro-designed-error-pages_RucpOaTo.mjs} +51 -21
- package/dist/docs/_worker.js/chunks/consts_47CwkweC.mjs +33 -0
- package/dist/docs/_worker.js/chunks/{index_DkNBuRXQ.mjs → index_CzaW3DU8.mjs} +3 -3
- package/dist/docs/_worker.js/chunks/{noop-middleware_D7Bh5dKA.mjs → noop-middleware_BUlUjpRM.mjs} +1 -1
- package/dist/docs/_worker.js/chunks/{parse_EttCPxrw.mjs → parse_yL_293SP.mjs} +61 -26
- package/dist/docs/_worker.js/chunks/sharp_DdDF6upK.mjs +99 -0
- package/dist/docs/_worker.js/index.js +3 -3
- package/dist/docs/_worker.js/manifest_Cz7n9zdK.mjs +100 -0
- package/dist/docs/_worker.js/pages/_image.astro.mjs +10 -1
- package/dist/docs/_worker.js/pages/props.astro.mjs +1 -1
- package/dist/docs/_worker.js/renderers.mjs +1 -1
- package/dist/docs/components/about-modal/index.html +4 -4
- package/dist/docs/components/about-modal/react/index.html +4 -4
- package/dist/docs/components/accordion/index.html +14 -14
- package/dist/docs/components/accordion/react/index.html +14 -14
- package/dist/docs/components/action-list/index.html +9 -9
- package/dist/docs/components/action-list/react/index.html +9 -9
- package/dist/docs/components/alert/index.html +98 -98
- package/dist/docs/components/alert/react/index.html +98 -98
- package/dist/docs/components/avatar/index.html +10 -10
- package/dist/docs/components/avatar/react/index.html +10 -10
- package/dist/docs/components/back-to-top/index.html +8 -8
- package/dist/docs/components/back-to-top/react/index.html +8 -8
- package/dist/docs/components/backdrop/index.html +6 -6
- package/dist/docs/components/backdrop/react/index.html +6 -6
- package/dist/docs/components/background-image/index.html +6 -6
- package/dist/docs/components/background-image/react/index.html +6 -6
- package/dist/docs/components/badge/index.html +10 -10
- package/dist/docs/components/badge/react/index.html +10 -10
- package/dist/docs/components/banner/index.html +12 -12
- package/dist/docs/components/banner/react/index.html +12 -12
- package/dist/docs/components/brand/index.html +3 -3
- package/dist/docs/components/brand/react/index.html +3 -3
- package/dist/docs/components/breadcrumb/index.html +12 -12
- package/dist/docs/components/breadcrumb/react/index.html +12 -12
- package/dist/docs/components/button/index.html +50 -50
- package/dist/docs/components/button/react/index.html +50 -50
- package/dist/docs/components/calendar-month/index.html +3 -3
- package/dist/docs/components/calendar-month/react/index.html +3 -3
- package/dist/docs/components/card/index.html +87 -87
- package/dist/docs/components/card/react/index.html +87 -87
- package/dist/docs/components/checkbox/index.html +25 -25
- package/dist/docs/components/checkbox/react/index.html +25 -25
- package/dist/docs/components/chip/index.html +5 -5
- package/dist/docs/components/chip/react-deprecated/index.html +5 -5
- package/dist/docs/components/clipboard-copy/index.html +29 -29
- package/dist/docs/components/clipboard-copy/react/index.html +29 -29
- package/dist/docs/components/code-block/index.html +7 -7
- package/dist/docs/components/code-block/react/index.html +7 -7
- package/dist/docs/components/content/index.html +27 -27
- package/dist/docs/components/content/react/index.html +27 -27
- package/dist/docs/components/data-list/index.html +11 -11
- package/dist/docs/components/data-list/react/index.html +11 -11
- package/dist/docs/components/date-picker/index.html +10 -10
- package/dist/docs/components/date-picker/react/index.html +10 -10
- package/dist/docs/components/description-list/index.html +65 -65
- package/dist/docs/components/description-list/react/index.html +65 -65
- package/dist/docs/components/divider/index.html +22 -22
- package/dist/docs/components/divider/react/index.html +22 -22
- package/dist/docs/components/drag-and-drop/index.html +3 -3
- package/dist/docs/components/drag-and-drop/react-deprecated/index.html +3 -3
- package/dist/docs/components/drawer/index.html +20 -20
- package/dist/docs/components/drawer/react/index.html +20 -20
- package/dist/docs/components/dropdown/index.html +5 -5
- package/dist/docs/components/dropdown/react/index.html +5 -5
- package/dist/docs/components/dual-list-selector/index.html +6 -6
- package/dist/docs/components/dual-list-selector/react/index.html +6 -6
- package/dist/docs/components/dual-list-selector/react-deprecated/index.html +8 -8
- package/dist/docs/components/empty-state/index.html +9 -9
- package/dist/docs/components/empty-state/react/index.html +9 -9
- package/dist/docs/components/expandable-section/index.html +25 -25
- package/dist/docs/components/expandable-section/react/index.html +25 -25
- package/dist/docs/components/form/index.html +31 -31
- package/dist/docs/components/form/react/index.html +31 -31
- package/dist/docs/components/form-select/index.html +12 -12
- package/dist/docs/components/form-select/react/index.html +12 -12
- package/dist/docs/components/helper-text/index.html +8 -8
- package/dist/docs/components/helper-text/react/index.html +8 -8
- package/dist/docs/components/hint/index.html +13 -13
- package/dist/docs/components/hint/react/index.html +13 -13
- package/dist/docs/components/icon/index.html +28 -28
- package/dist/docs/components/icon/react/index.html +28 -28
- package/dist/docs/components/input-group/index.html +12 -12
- package/dist/docs/components/input-group/react/index.html +12 -12
- package/dist/docs/components/jump-links/index.html +14 -14
- package/dist/docs/components/jump-links/react/index.html +14 -14
- package/dist/docs/components/label/index.html +37 -37
- package/dist/docs/components/label/react/index.html +37 -37
- package/dist/docs/components/list/index.html +8 -8
- package/dist/docs/components/list/react/index.html +8 -8
- package/dist/docs/components/login-page/index.html +13 -13
- package/dist/docs/components/login-page/react/index.html +13 -13
- package/dist/docs/components/masthead/index.html +25 -25
- package/dist/docs/components/masthead/react/index.html +25 -25
- package/dist/docs/components/menu/index.html +106 -106
- package/dist/docs/components/menu/react/index.html +106 -106
- package/dist/docs/components/menu-toggle/index.html +73 -73
- package/dist/docs/components/menu-toggle/react/index.html +73 -73
- package/dist/docs/components/modal/index.html +16 -16
- package/dist/docs/components/modal/react/index.html +16 -16
- package/dist/docs/components/modal/react-deprecated/index.html +18 -18
- package/dist/docs/components/multiple-file-upload/index.html +27 -27
- package/dist/docs/components/multiple-file-upload/react/index.html +27 -27
- package/dist/docs/components/navigation/index.html +28 -28
- package/dist/docs/components/navigation/react/index.html +28 -28
- package/dist/docs/components/notification-badge/index.html +18 -18
- package/dist/docs/components/notification-badge/react/index.html +18 -18
- package/dist/docs/components/notification-drawer/index.html +4 -4
- package/dist/docs/components/notification-drawer/react/index.html +4 -4
- package/dist/docs/components/number-input/index.html +21 -21
- package/dist/docs/components/number-input/react/index.html +21 -21
- package/dist/docs/components/overflow-menu/index.html +6 -6
- package/dist/docs/components/overflow-menu/react/index.html +6 -6
- package/dist/docs/components/page/index.html +58 -58
- package/dist/docs/components/page/react/index.html +58 -58
- package/dist/docs/components/pagination/index.html +25 -25
- package/dist/docs/components/pagination/react/index.html +25 -25
- package/dist/docs/components/panel/index.html +1 -1
- package/dist/docs/components/panel/react/index.html +1 -1
- package/dist/docs/components/popover/index.html +31 -31
- package/dist/docs/components/popover/react/index.html +31 -31
- package/dist/docs/components/progress/index.html +19 -19
- package/dist/docs/components/progress/react/index.html +19 -19
- package/dist/docs/components/progress-stepper/index.html +20 -20
- package/dist/docs/components/progress-stepper/react/index.html +20 -20
- package/dist/docs/components/radio/index.html +20 -20
- package/dist/docs/components/radio/react/index.html +20 -20
- package/dist/docs/components/search-input/index.html +20 -20
- package/dist/docs/components/search-input/react/index.html +20 -20
- package/dist/docs/components/select/index.html +70 -70
- package/dist/docs/components/select/react/index.html +70 -70
- package/dist/docs/components/sidebar/index.html +22 -22
- package/dist/docs/components/sidebar/react/index.html +22 -22
- package/dist/docs/components/simple-file-upload/index.html +39 -39
- package/dist/docs/components/simple-file-upload/react/index.html +39 -39
- package/dist/docs/components/simple-list/index.html +12 -12
- package/dist/docs/components/simple-list/react/index.html +12 -12
- package/dist/docs/components/skeleton/index.html +14 -14
- package/dist/docs/components/skeleton/react/index.html +14 -14
- package/dist/docs/components/skip-to-content/index.html +6 -6
- package/dist/docs/components/skip-to-content/react/index.html +6 -6
- package/dist/docs/components/slider/index.html +28 -28
- package/dist/docs/components/slider/react/index.html +28 -28
- package/dist/docs/components/spinner/index.html +12 -12
- package/dist/docs/components/spinner/react/index.html +12 -12
- package/dist/docs/components/switch/index.html +17 -17
- package/dist/docs/components/switch/react/index.html +17 -17
- package/dist/docs/components/tabs/index.html +120 -120
- package/dist/docs/components/tabs/react/index.html +120 -120
- package/dist/docs/components/text-area/index.html +21 -21
- package/dist/docs/components/text-area/react/index.html +21 -21
- package/dist/docs/components/text-input/index.html +20 -20
- package/dist/docs/components/text-input/react/index.html +20 -20
- package/dist/docs/components/text-input-group/index.html +20 -20
- package/dist/docs/components/text-input-group/react/index.html +20 -20
- package/dist/docs/components/tile/index.html +32 -32
- package/dist/docs/components/tile/react-deprecated/index.html +32 -32
- package/dist/docs/components/time-picker/index.html +18 -18
- package/dist/docs/components/time-picker/react/index.html +18 -18
- package/dist/docs/components/timestamp/index.html +26 -26
- package/dist/docs/components/timestamp/react/index.html +26 -26
- package/dist/docs/components/title/index.html +5 -5
- package/dist/docs/components/title/react/index.html +5 -5
- package/dist/docs/components/toggle-group/index.html +22 -22
- package/dist/docs/components/toggle-group/react/index.html +22 -22
- package/dist/docs/components/toolbar/index.html +51 -51
- package/dist/docs/components/toolbar/react/index.html +51 -51
- package/dist/docs/components/tooltip/index.html +16 -16
- package/dist/docs/components/tooltip/react/index.html +16 -16
- package/dist/docs/components/tree-view/index.html +33 -33
- package/dist/docs/components/tree-view/react/index.html +33 -33
- package/dist/docs/components/truncate/index.html +10 -10
- package/dist/docs/components/truncate/react/index.html +10 -10
- package/dist/docs/components/wizard/index.html +51 -51
- package/dist/docs/components/wizard/react/index.html +48 -48
- package/dist/docs/components/wizard/react-deprecated/index.html +32 -32
- package/dist/docs/index.html +1 -1
- package/dist/props.json +1 -1
- package/package.json +3 -3
- package/src/components/Navigation.tsx +1 -1
- package/dist/docs/_astro/Navigation.B2RHZcqO.js +0 -1
- package/dist/docs/_astro/index.DGdw5tfb.js +0 -16
- package/dist/docs/_worker.js/chunks/content-modules_CYtYtJTg.mjs +0 -1
- package/dist/docs/_worker.js/chunks/sharp_DVa0kR-8.mjs +0 -1
- package/dist/docs/_worker.js/manifest_CR827M2P.mjs +0 -100
- /package/dist/docs/_worker.js/chunks/{AboutModal_BItn3kin.mjs → AboutModal_Bq3UkWc8.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{AboutModal_CZjdACeW.mjs → AboutModal_DZETQtiE.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Accordion_CYmF0KwJ.mjs → Accordion_ChuDfd26.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Accordion_dgrn0E_o.mjs → Accordion_DRoasdwW.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ActionList_b3_CLZ14.mjs → ActionList_DqDNZT3u.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ActionList_hxinmMC0.mjs → ActionList_pAt5URX0.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Alert_CPMXr4GU.mjs → Alert_CPdL1vUD.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Alert_CjLz1avf.mjs → Alert_DwPYvJAI.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Avatar_BpvZS7Vn.mjs → Avatar_BdN2tI4Z.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Avatar_CJxK-3JY.mjs → Avatar_DjnLfcKy.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{BackToTop_C4eW2L0y.mjs → BackToTop_B7k52guD.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{BackToTop_DcZBtTyL.mjs → BackToTop_CQrkN4vo.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Backdrop_10J0WLph.mjs → Backdrop_Bw8DXuQW.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Backdrop_D8sST9JX.mjs → Backdrop_D5VKp0Pn.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{BackgroundImage_BKA-ulgj.mjs → BackgroundImage_B95WtDtI.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{BackgroundImage_Cz6hAv0v.mjs → BackgroundImage_D25W0eG4.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Badge_Cg9zVGV6.mjs → Badge_9BXEKeIX.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Badge_CmcfMGLy.mjs → Badge_DY7mAZxX.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Banner_B-0nD2-g.mjs → Banner_BBMun_pf.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Banner_D1S93kG4.mjs → Banner_Bzf9E_Yg.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Brand_BbimpMS3.mjs → Brand_BpBKJkui.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Brand_BpKIcHo4.mjs → Brand_BvV48K7K.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Breadcrumb_Ck-Lj1T3.mjs → Breadcrumb_7xVGXyOH.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Breadcrumb_D9KV7rzl.mjs → Breadcrumb_D0B5NecG.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Button_CIRvQZry.mjs → Button_B-jQM-mS.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Button_V8lUSO6X.mjs → Button_D4xV2ZHx.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{CalendarMonth_BFffUIcM.mjs → CalendarMonth_BPH-iWlS.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{CalendarMonth_BQ28v_pg.mjs → CalendarMonth_CtyCDM_4.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Card_C8qkLKEf.mjs → Card_56uPtmT4.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Card_DUK4FmPS.mjs → Card_BL_KFAWY.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Checkbox_Bn--Z5lv.mjs → Checkbox_CM-N3RVv.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Checkbox_qYxKZZGQ.mjs → Checkbox_DaX-zjAc.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Chip_0R4AtDfc.mjs → Chip_BpeES5rc.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Chip_COOLhRtH.mjs → Chip_UaJGmwLY.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ClipboardCopy_CCw7mUNs.mjs → ClipboardCopy_761fbT2Y.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ClipboardCopy_E2VziZOh.mjs → ClipboardCopy_BHFbqYI-.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{CodeBlock_B6MAjfQG.mjs → CodeBlock_CwKrtp-D.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{CodeBlock_E5IUdMeV.mjs → CodeBlock_DOqKbnLY.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Content_BTsW49BT.mjs → Content_0CWGm4rN.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Content_DAKpmQcD.mjs → Content_CLL8cKDM.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DataList_BUnDIzjX.mjs → DataList_BN8khk3S.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DataList_DAx1YA9q.mjs → DataList_CDy650B7.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DatePicker_B7e4HDrD.mjs → DatePicker_BQOndvp6.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DatePicker_BvR2KULb.mjs → DatePicker_DpTevTA0.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DescriptionList_BN8g0mN-.mjs → DescriptionList_BJ6vItOU.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DescriptionList_Ci0wXiOc.mjs → DescriptionList_CtWKTF3e.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Divider_01665LVV.mjs → Divider_CB0eK6ED.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Divider_58GLcmuG.mjs → Divider_CYqs87wx.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DragDrop_D0BsENaH.mjs → DragDrop_CA9eI_rd.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DragDrop_R1Bxn5bG.mjs → DragDrop_hMbQYdDP.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Drawer_CqiPp4tH.mjs → Drawer_DNl2avZP.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Drawer_ar8SYBBZ.mjs → Drawer_QrI_Bnwl.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Dropdown_BxRoNhEO.mjs → Dropdown_DN6hLqJ9.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Dropdown_CGqAffXy.mjs → Dropdown_VLF3XzpL.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DualListSelector_BY0jUhu5.mjs → DualListSelector_BKTQQnIz.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DualListSelector_BtS4RhPL.mjs → DualListSelector_BlKIcmLH.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DualListSelector_DS3XuAyO.mjs → DualListSelector_CLgp74Kh.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{DualListSelector_DpkuRNqO.mjs → DualListSelector_DhE2Hwgc.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{EmptyState_D8pG8NNs.mjs → EmptyState_CyuMXV7z.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{EmptyState_DKnL5Sxb.mjs → EmptyState__skv13AF.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ExpandableSection_BxeRuhxW.mjs → ExpandableSection_CW95SdOW.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ExpandableSection_C-rR4lpq.mjs → ExpandableSection_yNWV4j_1.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{FileUpload_BS2e2_2a.mjs → FileUpload_BB5VBmj8.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{FileUpload_Mp8yctad.mjs → FileUpload_Dz6qx2Au.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{FormSelect_Dh4wqtK-.mjs → FormSelect_CMF2Pw8r.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{FormSelect_Dj_assyG.mjs → FormSelect_ImdHPQ8r.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Form_C6rxCWwv.mjs → Form_BlqSvroo.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Form_LFZpV55d.mjs → Form_Dyfbp-xB.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{HelperText_Cdoh4Xq5.mjs → HelperText_I6gDmQuM.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{HelperText_PKuHc_Y7.mjs → HelperText_iuAAuAAX.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Hint_BdmmUbjS.mjs → Hint_CmH0eX8e.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Hint_DYFKftOG.mjs → Hint_JlGz6qCF.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Icon_B8kEVedr.mjs → Icon_CVgO9TfB.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Icon_BMlPtDQq.mjs → Icon_I_Jxay-o.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{InputGroup_CvQnB4Xi.mjs → InputGroup_C1qnMb39.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{InputGroup_DuMIDv_M.mjs → InputGroup_CO4BbgKK.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{JumpLinks_0RwPXv3d.mjs → JumpLinks_B6V7Oept.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{JumpLinks_C5MZGLAO.mjs → JumpLinks_xK6Xtd_P.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Label_CNsHUBdN.mjs → Label_DDNQOBjJ.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Label_THkE-AFA.mjs → Label_DV6JdsMd.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{List_BXjcB6TX.mjs → List_BXSnNYCk.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{List_CoXnRuT-.mjs → List_D6-bxLhY.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{LoginPage_Cd_Vx4TL.mjs → LoginPage_-uTxWToD.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{LoginPage_Dy-dda7r.mjs → LoginPage_C4Fpi4_3.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Masthead_0dZpDAir.mjs → Masthead_rYGQQQdw.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Masthead_L5uTIDIo.mjs → Masthead_rpdMuWpg.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{MenuToggle_Bb2rO_CM.mjs → MenuToggle_Cij7zNik.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{MenuToggle_D3uQPRxu.mjs → MenuToggle_DVmAV48i.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Menu_CU4-bIwV.mjs → Menu_XN6Bsy-K.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Menu_Drl71efm.mjs → Menu_dxw3tZmM.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Modal_B35nIeQ6.mjs → Modal_BDIrTlau.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Modal_D-zL8r6s.mjs → Modal_BbXa3EV6.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Modal_DDfqMCzs.mjs → Modal_DXt8fdwv.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Modal_DKK66Rag.mjs → Modal_ya4p_Dn4.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{MultipleFileUpload_B_T35Ur4.mjs → MultipleFileUpload_BY7N0d2_.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{MultipleFileUpload_SF3pfPOs.mjs → MultipleFileUpload_CJirO2Tv.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Nav_DWhCiasr.mjs → Nav_B9aNkM3u.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Nav_OmbKpzoZ.mjs → Nav_Cv7y3tKr.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{NotificationBadge_CCC3w-0n.mjs → NotificationBadge_BdyrqrxS.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{NotificationBadge_Du1zJprr.mjs → NotificationBadge_uLLBi7Nf.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{NotificationDrawer_DAuLxL7w.mjs → NotificationDrawer_C2D_vkJA.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{NotificationDrawer_GsX4wbyf.mjs → NotificationDrawer_DsOv-Bc1.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{NumberInput_BTUsP2Dy.mjs → NumberInput_C_v8A68W.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{NumberInput_CEdn1SLL.mjs → NumberInput_M2Arq19A.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{OverflowMenu_Bz0pUIse.mjs → OverflowMenu_CgQ02tet.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{OverflowMenu_eowJo-oA.mjs → OverflowMenu_GhL_Hxhj.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Page_D8wqD5dY.mjs → Page_BmNS_HKl.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Page_D96Z1le0.mjs → Page_BqhHgZEf.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Pagination_-jq13UTb.mjs → Pagination_6zsdJgjo.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Pagination_CQXZNog1.mjs → Pagination_EnfXcy1c.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Panel_83a69pjh.mjs → Panel_Bns9Yczb.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Panel_Cwf130Yb.mjs → Panel_CAl9TttI.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Popover_DVQ8u4Fp.mjs → Popover_Cq5GlG_u.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Popover_DtFhoH3l.mjs → Popover_DNBqVY6K.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ProgressStepper_CMwF8CiX.mjs → ProgressStepper_Bj7xdcVW.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ProgressStepper_Yvcq3pmc.mjs → ProgressStepper_DLwBtQPD.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Progress_DsBSXTmv.mjs → Progress_Bwa6IFCG.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Progress_M0fLgfjf.mjs → Progress_Ct2ZmHWP.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Radio_BmbmoopI.mjs → Radio_BW36RoyQ.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Radio_CjW5TY2C.mjs → Radio_CD1tbLUH.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{SearchInput_BiyBA_eF.mjs → SearchInput_C5t7rgL8.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{SearchInput_Bv6KJYSn.mjs → SearchInput_D5zVWGRR.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Select_B957i7MN.mjs → Select_B7PClV22.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Select_BBTTR43m.mjs → Select_DxSAnryc.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Sidebar_C3c-bPso.mjs → Sidebar_CBHc_qDs.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Sidebar_CHEf7dr0.mjs → Sidebar_CUsSON01.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{SimpleList_BqpkJemM.mjs → SimpleList_A4ZllarK.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{SimpleList_DDfBcEWe.mjs → SimpleList_CA6-eKv7.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Skeleton_B4QE65Ar.mjs → Skeleton_BCcNwA3X.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Skeleton_D5WnGxh0.mjs → Skeleton_ppLKyrxA.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{SkipToContent_BBwU-ZdY.mjs → SkipToContent_BRt-mxN_.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{SkipToContent_DFYTlqla.mjs → SkipToContent_DJ0j9iWN.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Slider_BX6wz0hN.mjs → Slider_C9b3jjeF.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Slider_BlpXbwhH.mjs → Slider_XCexzUeI.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Spinner_C5qilvZp.mjs → Spinner_9AYi3VBw.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Spinner_CuLTR583.mjs → Spinner_CP9Rq_gX.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Switch_BnA8s7Wn.mjs → Switch_DXdLGDOE.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Switch_CvUw0Z4X.mjs → Switch_RNh98qtJ.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Tabs_CyeQBOGa.mjs → Tabs_DT6Yi6be.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Tabs_xDQjU8nW.mjs → Tabs_DlM_bjlT.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TextArea_7cFF77CV.mjs → TextArea_Cf_R8jQK.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TextArea_D7NOOvRK.mjs → TextArea_ovxC_0Ab.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TextInputGroup_DiXNtIIB.mjs → TextInputGroup_080YBtEj.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TextInputGroup_ZNRIWQeP.mjs → TextInputGroup_Br_i0HvU.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TextInput_3Gggoxng.mjs → TextInput_Db5MQT0r.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TextInput_Dg_3P9RM.mjs → TextInput_DmvzGSiB.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Tile_CAcRzWZ9.mjs → Tile_DSLiQefE.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Tile_RHzJKWiw.mjs → Tile_DuVi0Nxx.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TimePicker_DtrDRcMy.mjs → TimePicker_DRkouY7Y.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TimePicker_qxUpEV9n.mjs → TimePicker_qLqDQt66.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Timestamp_2Z94f_Eh.mjs → Timestamp_Bm1TmV0u.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Timestamp_rMinDYzW.mjs → Timestamp_ByppCUVl.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Title_CdyPwQ2b.mjs → Title_CbgR81X9.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Title_Csq8EY4-.mjs → Title_DEeLRIBp.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ToggleGroup_B1Xtdxuy.mjs → ToggleGroup_CLcoYGlf.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{ToggleGroup_GBAc787N.mjs → ToggleGroup_DZfpRXld.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Toolbar_BfRvo9qx.mjs → Toolbar_Ckexja0f.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Toolbar_CmeIzev4.mjs → Toolbar_WEvlPE_Z.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Tooltip_CPduniOG.mjs → Tooltip_ByLTXbvB.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Tooltip_Cdt0oB9I.mjs → Tooltip_C50yThxC.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TreeView_B1tisZRW.mjs → TreeView_BepL2dW_.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{TreeView_CwOQvnLr.mjs → TreeView_CF9fMfij.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Truncate_C6bX3QmA.mjs → Truncate_B5tvwEJU.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Truncate_DGi514H0.mjs → Truncate_fFugxOSE.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Wizard_BOkVt8H-.mjs → Wizard_BZDTr1GR.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Wizard_CEoZM0Yt.mjs → Wizard_Bo1prwt4.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Wizard_CLZDzozE.mjs → Wizard_CUdz0SC3.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{Wizard_OGE-NwoN.mjs → Wizard_CgLDSR4C.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{_astro_assets_RFx5l3a7.mjs → _astro_data-layer-content_aS8_cRFJ.mjs} +0 -0
- /package/dist/docs/_worker.js/chunks/{_astro_data-layer-content_BpG5DifN.mjs → content-modules_BkNrgIXI.mjs} +0 -0
|
@@ -42,88 +42,88 @@
|
|
|
42
42
|
animation-fill-mode: both;
|
|
43
43
|
animation-name: astroFadeIn; }</style><style>[data-astro-transition-scope="astro-2e6ke2uy-4"] { view-transition-name: astro-2e6ke2uy-4; }@layer astro { ::view-transition-old(astro-2e6ke2uy-4) { animation: none; opacity: 0; mix-blend-mode: normal; }::view-transition-new(astro-2e6ke2uy-4) { animation: none; mix-blend-mode: normal; }::view-transition-group(astro-2e6ke2uy-4) { animation: none } }[data-astro-transition-fallback="old"] [data-astro-transition-scope="astro-2e6ke2uy-4"],
|
|
44
44
|
[data-astro-transition-fallback="old"][data-astro-transition-scope="astro-2e6ke2uy-4"] { animation: none; mix-blend-mode: normal; }[data-astro-transition-fallback="new"] [data-astro-transition-scope="astro-2e6ke2uy-4"],
|
|
45
|
-
[data-astro-transition-fallback="new"][data-astro-transition-scope="astro-2e6ke2uy-4"] { animation: none; mix-blend-mode: normal; }</style></head> <body> <div class="pf-v6-c-page"> <script>(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value=="object"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};"requestIdleCallback"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event("astro:idle"));})();</script><header class="pf-v6-c-masthead pf-m-display-inline-on-md"> <div class="pf-v6-c-masthead__main"> <span class="pf-v6-c-masthead__toggle"> <astro-island uid="bamE9" prefix="r5" component-url="/_astro/PageToggle.DBsLIFpI.js" component-export="PageToggle" renderer-url="/_astro/client.DN8ES6L5.js" props="{"data-astro-transition-persist":[0,"astro-u5p5alki-2"]}" ssr client="idle" opts="{"name":"PageToggle","value":true}" data-astro-transition-persist="astro-u5p5alki-2" await-children><button id="nav-toggle" aria-expanded="true" aria-label="Global navigation" class="pf-v6-c-button pf-m-plain" type="button" data-ouia-component-type="PF6/Button" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Button-plain-421"><span class="pf-v6-c-button__text"><svg class="pf-v6-svg" viewBox="0 0 448 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg></span></button><!--astro:end--></astro-island> </span> <div class="pf-v6-c-masthead__brand"> <a class="pf-v6-c-masthead__logo" tabindex="0" href="/"> <img class="pf-v6-c-brand" style="--pf-v6-c-brand--Height:36px" src="/PF-HorizontalLogo-Color.svg" alt="PatternFly"/> </a> </div> </div> <div class="pf-v6-c-masthead__content"> <astro-island uid="1l6Vke" prefix="r7" component-url="/_astro/Toolbar.BNjGRsAQ.js" component-export="Toolbar" renderer-url="/_astro/client.DN8ES6L5.js" props="{}" ssr client="idle" opts="{"name":"ReactToolbar","value":true}" await-children><div class="pf-v6-c-toolbar pf-m-static" id="toolbar" data-ouia-component-type="PF6/Toolbar" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Toolbar-141"><div class="pf-v6-c-toolbar__content"><div class="pf-v6-c-toolbar__content-section"><div class="pf-v6-c-toolbar__group pf-m-action-group-plain pf-m-align-end pf-m-gap-none pf-m-gap-md-on-md"><div class="pf-v6-c-toolbar__item"></div><div class="pf-v6-c-toolbar__item"><div class="pf-v6-c-input-group ws-global-search"><div class="pf-v6-c-input-group__item"><button aria-expanded="false" aria-label="Expandable search input toggle" class="pf-v6-c-button pf-m-plain" type="button" data-ouia-component-type="PF6/Button" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Button-plain-422"><span class="pf-v6-c-button__icon"><svg class="pf-v6-svg" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg></span></button></div></div></div><div class="pf-v6-c-toolbar__item"><a href="//github.com/patternfly" target="top" aria-label="PatternFly GitHub page" class="pf-v6-c-button pf-m-plain" data-ouia-component-type="PF6/Button" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Button-plain-423"><span class="pf-v6-c-button__text"><svg class="pf-v6-svg" viewBox="0 0 496 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a></div><div class="pf-v6-c-toolbar__item"><button class="pf-v6-c-menu-toggle" type="button" aria-expanded="false" data-ouia-component-type="PF6/MenuToggle" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-MenuToggle-141"><span class="pf-v6-c-menu-toggle__text">Release 6.1.0</span><span class="pf-v6-c-menu-toggle__controls"><span class="pf-v6-c-menu-toggle__toggle-icon"><svg class="pf-v6-svg" viewBox="0 0 320 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"></path></svg></span></span></button></div></div></div></div><div class="pf-v6-c-toolbar__content pf-m-hidden" hidden=""><div class="pf-v6-c-toolbar__group"></div></div></div><!--astro:end--></astro-island> </div> </header> <astro-island uid="193Wv7" component-url="/_astro/Navigation.B2RHZcqO.js" component-export="Navigation" renderer-url="/_astro/client.DN8ES6L5.js" props="{"navData":[1,[[1,[[0,{"id":[0,"src/components/aboutmodal/examples/aboutmodal"],"data":[0,{"id":[0,"About modal"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/accordion/examples/accordion"],"data":[0,{"id":[0,"Accordion"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/actionlist/examples/actionlist"],"data":[0,{"id":[0,"Action list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/alert/examples/alert"],"data":[0,{"id":[0,"Alert"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/avatar/examples/avatar"],"data":[0,{"id":[0,"Avatar"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/backtotop/examples/backtotop"],"data":[0,{"id":[0,"Back to top"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/backdrop/examples/backdrop"],"data":[0,{"id":[0,"Backdrop"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/backgroundimage/examples/backgroundimage"],"data":[0,{"id":[0,"Background image"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/badge/examples/badge"],"data":[0,{"id":[0,"Badge"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/banner/examples/banner"],"data":[0,{"id":[0,"Banner"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/brand/examples/brand"],"data":[0,{"id":[0,"Brand"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/breadcrumb/examples/breadcrumb"],"data":[0,{"id":[0,"Breadcrumb"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/button/examples/button"],"data":[0,{"id":[0,"Button"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/calendarmonth/examples/calendarmonth"],"data":[0,{"id":[0,"Calendar month"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/card/examples/card"],"data":[0,{"id":[0,"Card"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/checkbox/examples/checkbox"],"data":[0,{"id":[0,"Checkbox"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/deprecated/components/chip/examples/chip"],"data":[0,{"id":[0,"Chip"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/clipboardcopy/examples/clipboardcopy"],"data":[0,{"id":[0,"Clipboard copy"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/codeblock/examples/codeblock"],"data":[0,{"id":[0,"Code block"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/content/examples/content"],"data":[0,{"id":[0,"Content"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/datalist/examples/datalist"],"data":[0,{"id":[0,"Data list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/datepicker/examples/datepicker"],"data":[0,{"id":[0,"Date picker"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/descriptionlist/examples/descriptionlist"],"data":[0,{"id":[0,"Description list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/divider/examples/divider"],"data":[0,{"id":[0,"Divider"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/deprecated/components/dragdrop/examples/dragdrop"],"data":[0,{"id":[0,"Drag and drop"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/drawer/examples/drawer"],"data":[0,{"id":[0,"Drawer"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/dropdown/examples/dropdown"],"data":[0,{"id":[0,"Dropdown"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/duallistselector/examples/duallistselector"],"data":[0,{"id":[0,"Dual list selector"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/emptystate/examples/emptystate"],"data":[0,{"id":[0,"Empty state"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/expandablesection/examples/expandablesection"],"data":[0,{"id":[0,"Expandable section"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/form/examples/form"],"data":[0,{"id":[0,"Form"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/formselect/examples/formselect"],"data":[0,{"id":[0,"Form select"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/helpertext/examples/helpertext"],"data":[0,{"id":[0,"Helper text"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/hint/examples/hint"],"data":[0,{"id":[0,"Hint"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/icon/examples/icon"],"data":[0,{"id":[0,"Icon"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/inputgroup/examples/inputgroup"],"data":[0,{"id":[0,"Input group"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/jumplinks/examples/jumplinks"],"data":[0,{"id":[0,"Jump links"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/label/examples/label"],"data":[0,{"id":[0,"Label"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/list/examples/list"],"data":[0,{"id":[0,"List"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/loginpage/examples/loginpage"],"data":[0,{"id":[0,"Login page"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/masthead/examples/masthead"],"data":[0,{"id":[0,"Masthead"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/menu/examples/menu"],"data":[0,{"id":[0,"Menu"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/menutoggle/examples/menutoggle"],"data":[0,{"id":[0,"Menu toggle"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/modal/examples/modal"],"data":[0,{"id":[0,"Modal"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/multiplefileupload/examples/multiplefileupload"],"data":[0,{"id":[0,"Multiple file upload"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/nav/examples/nav"],"data":[0,{"id":[0,"Navigation"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/notificationbadge/examples/notificationbadge"],"data":[0,{"id":[0,"Notification badge"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/notificationdrawer/examples/notificationdrawer"],"data":[0,{"id":[0,"Notification drawer"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/numberinput/examples/numberinput"],"data":[0,{"id":[0,"Number input"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/overflowmenu/examples/overflowmenu"],"data":[0,{"id":[0,"Overflow menu"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/page/examples/page"],"data":[0,{"id":[0,"Page"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/pagination/examples/pagination"],"data":[0,{"id":[0,"Pagination"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/panel/examples/panel"],"data":[0,{"id":[0,"Panel"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/popover/examples/popover"],"data":[0,{"id":[0,"Popover"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/progress/examples/progress"],"data":[0,{"id":[0,"Progress"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/progressstepper/examples/progressstepper"],"data":[0,{"id":[0,"Progress stepper"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/radio/examples/radio"],"data":[0,{"id":[0,"Radio"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/searchinput/examples/searchinput"],"data":[0,{"id":[0,"Search input"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/select/examples/select"],"data":[0,{"id":[0,"Select"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/sidebar/examples/sidebar"],"data":[0,{"id":[0,"Sidebar"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/fileupload/examples/fileupload"],"data":[0,{"id":[0,"Simple file upload"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/simplelist/examples/simplelist"],"data":[0,{"id":[0,"Simple list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/skeleton/examples/skeleton"],"data":[0,{"id":[0,"Skeleton"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/skiptocontent/examples/skiptocontent"],"data":[0,{"id":[0,"Skip to content"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/slider/examples/slider"],"data":[0,{"id":[0,"Slider"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/spinner/examples/spinner"],"data":[0,{"id":[0,"Spinner"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/switch/examples/switch"],"data":[0,{"id":[0,"Switch"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/tabs/examples/tabs"],"data":[0,{"id":[0,"Tabs"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/textarea/examples/textarea"],"data":[0,{"id":[0,"Text area"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/textinput/examples/textinput"],"data":[0,{"id":[0,"Text input"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/textinputgroup/examples/textinputgroup"],"data":[0,{"id":[0,"Text input group"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/deprecated/components/tile/examples/tile"],"data":[0,{"id":[0,"Tile"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/timepicker/examples/timepicker"],"data":[0,{"id":[0,"Time picker"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/timestamp/examples/timestamp"],"data":[0,{"id":[0,"Timestamp"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/title/examples/title"],"data":[0,{"id":[0,"Title"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/togglegroup/examples/togglegroup"],"data":[0,{"id":[0,"Toggle group"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/toolbar/examples/toolbar"],"data":[0,{"id":[0,"Toolbar"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/tooltip/examples/tooltip"],"data":[0,{"id":[0,"Tooltip"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/treeview/examples/treeview"],"data":[0,{"id":[0,"Tree view"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/truncate/examples/truncate"],"data":[0,{"id":[0,"Truncate"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/wizard/examples/wizard"],"data":[0,{"id":[0,"Wizard"],"section":[0,"components"],"sortValue":[0]}]}]]]]],"data-astro-transition-scope":[0,"astro-xikxfxwm-3"]}" ssr client="only" opts="{"name":"ReactNav","value":"react"}" data-astro-transition-scope="astro-xikxfxwm-3"></astro-island> <div class="pf-v6-c-page__main-container"> <main class="pf-v6-c-page__main"> <section class="pf-v6-c-page__main-section"><div class="pf-v6-c-page__main-body"> <section id="ws-sticky-nav-tabs" class="pf-v6-c-page__main-tabs pf-m-sticky-top"><div class="pf-v6-c-page__main-body"> <div class="pf-v6-c-tabs pf-m-page-insets pf-m-no-border-bottom"> <ul class="pf-v6-c-tabs__list"> <li class="pf-v6-c-tabs__item pf-m-current"> <a class="pf-v6-c-tabs__link" href="/components/select/react"> React </a> </li> </ul> </div> </div></section><section id="main-content" class="pf-v6-c-page__main-section pf-m-fill"><div class="pf-v6-c-page__main-body"> <h2 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2634" data-pf-content="true" class="pf-v6-c-content--h2">Examples</h2>
|
|
46
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
47
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
48
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
49
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
50
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
51
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
45
|
+
[data-astro-transition-fallback="new"][data-astro-transition-scope="astro-2e6ke2uy-4"] { animation: none; mix-blend-mode: normal; }</style></head> <body> <div class="pf-v6-c-page"> <script>(()=>{var l=(n,t)=>{let i=async()=>{await(await n())()},e=typeof t.value=="object"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};"requestIdleCallback"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event("astro:idle"));})();</script><header class="pf-v6-c-masthead pf-m-display-inline-on-md"> <div class="pf-v6-c-masthead__main"> <span class="pf-v6-c-masthead__toggle"> <astro-island uid="p82mt" prefix="r5" component-url="/_astro/PageToggle.DBsLIFpI.js" component-export="PageToggle" renderer-url="/_astro/client.DN8ES6L5.js" props="{"data-astro-transition-persist":[0,"astro-u5p5alki-2"]}" ssr client="idle" opts="{"name":"PageToggle","value":true}" data-astro-transition-persist="astro-u5p5alki-2" await-children><button id="nav-toggle" aria-expanded="true" aria-label="Global navigation" class="pf-v6-c-button pf-m-plain" type="button" data-ouia-component-type="PF6/Button" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Button-plain-427"><span class="pf-v6-c-button__text"><svg class="pf-v6-svg" viewBox="0 0 448 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg></span></button><!--astro:end--></astro-island> </span> <div class="pf-v6-c-masthead__brand"> <a class="pf-v6-c-masthead__logo" tabindex="0" href="/"> <img class="pf-v6-c-brand" style="--pf-v6-c-brand--Height:36px" src="/PF-HorizontalLogo-Color.svg" alt="PatternFly"/> </a> </div> </div> <div class="pf-v6-c-masthead__content"> <astro-island uid="h7AyB" prefix="r7" component-url="/_astro/Toolbar.BNjGRsAQ.js" component-export="Toolbar" renderer-url="/_astro/client.DN8ES6L5.js" props="{}" ssr client="idle" opts="{"name":"ReactToolbar","value":true}" await-children><div class="pf-v6-c-toolbar pf-m-static" id="toolbar" data-ouia-component-type="PF6/Toolbar" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Toolbar-143"><div class="pf-v6-c-toolbar__content"><div class="pf-v6-c-toolbar__content-section"><div class="pf-v6-c-toolbar__group pf-m-action-group-plain pf-m-align-end pf-m-gap-none pf-m-gap-md-on-md"><div class="pf-v6-c-toolbar__item"></div><div class="pf-v6-c-toolbar__item"><div class="pf-v6-c-input-group ws-global-search"><div class="pf-v6-c-input-group__item"><button aria-expanded="false" aria-label="Expandable search input toggle" class="pf-v6-c-button pf-m-plain" type="button" data-ouia-component-type="PF6/Button" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Button-plain-428"><span class="pf-v6-c-button__icon"><svg class="pf-v6-svg" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg></span></button></div></div></div><div class="pf-v6-c-toolbar__item"><a href="//github.com/patternfly" target="top" aria-label="PatternFly GitHub page" class="pf-v6-c-button pf-m-plain" data-ouia-component-type="PF6/Button" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Button-plain-429"><span class="pf-v6-c-button__text"><svg class="pf-v6-svg" viewBox="0 0 496 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></span></a></div><div class="pf-v6-c-toolbar__item"><button class="pf-v6-c-menu-toggle" type="button" aria-expanded="false" data-ouia-component-type="PF6/MenuToggle" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-MenuToggle-143"><span class="pf-v6-c-menu-toggle__text">Release 6.1.0</span><span class="pf-v6-c-menu-toggle__controls"><span class="pf-v6-c-menu-toggle__toggle-icon"><svg class="pf-v6-svg" viewBox="0 0 320 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"></path></svg></span></span></button></div></div></div></div><div class="pf-v6-c-toolbar__content pf-m-hidden" hidden=""><div class="pf-v6-c-toolbar__group"></div></div></div><!--astro:end--></astro-island> </div> </header> <astro-island uid="193Wv7" component-url="/_astro/Navigation.x46lNg3Y.js" component-export="Navigation" renderer-url="/_astro/client.DN8ES6L5.js" props="{"navData":[1,[[1,[[0,{"id":[0,"src/components/aboutmodal/examples/aboutmodal"],"data":[0,{"id":[0,"About modal"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/accordion/examples/accordion"],"data":[0,{"id":[0,"Accordion"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/actionlist/examples/actionlist"],"data":[0,{"id":[0,"Action list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/alert/examples/alert"],"data":[0,{"id":[0,"Alert"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/avatar/examples/avatar"],"data":[0,{"id":[0,"Avatar"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/backtotop/examples/backtotop"],"data":[0,{"id":[0,"Back to top"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/backdrop/examples/backdrop"],"data":[0,{"id":[0,"Backdrop"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/backgroundimage/examples/backgroundimage"],"data":[0,{"id":[0,"Background image"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/badge/examples/badge"],"data":[0,{"id":[0,"Badge"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/banner/examples/banner"],"data":[0,{"id":[0,"Banner"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/brand/examples/brand"],"data":[0,{"id":[0,"Brand"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/breadcrumb/examples/breadcrumb"],"data":[0,{"id":[0,"Breadcrumb"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/button/examples/button"],"data":[0,{"id":[0,"Button"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/calendarmonth/examples/calendarmonth"],"data":[0,{"id":[0,"Calendar month"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/card/examples/card"],"data":[0,{"id":[0,"Card"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/checkbox/examples/checkbox"],"data":[0,{"id":[0,"Checkbox"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/deprecated/components/chip/examples/chip"],"data":[0,{"id":[0,"Chip"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/clipboardcopy/examples/clipboardcopy"],"data":[0,{"id":[0,"Clipboard copy"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/codeblock/examples/codeblock"],"data":[0,{"id":[0,"Code block"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/content/examples/content"],"data":[0,{"id":[0,"Content"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/datalist/examples/datalist"],"data":[0,{"id":[0,"Data list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/datepicker/examples/datepicker"],"data":[0,{"id":[0,"Date picker"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/descriptionlist/examples/descriptionlist"],"data":[0,{"id":[0,"Description list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/divider/examples/divider"],"data":[0,{"id":[0,"Divider"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/deprecated/components/dragdrop/examples/dragdrop"],"data":[0,{"id":[0,"Drag and drop"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/drawer/examples/drawer"],"data":[0,{"id":[0,"Drawer"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/dropdown/examples/dropdown"],"data":[0,{"id":[0,"Dropdown"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/duallistselector/examples/duallistselector"],"data":[0,{"id":[0,"Dual list selector"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/emptystate/examples/emptystate"],"data":[0,{"id":[0,"Empty state"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/expandablesection/examples/expandablesection"],"data":[0,{"id":[0,"Expandable section"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/form/examples/form"],"data":[0,{"id":[0,"Form"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/formselect/examples/formselect"],"data":[0,{"id":[0,"Form select"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/helpertext/examples/helpertext"],"data":[0,{"id":[0,"Helper text"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/hint/examples/hint"],"data":[0,{"id":[0,"Hint"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/icon/examples/icon"],"data":[0,{"id":[0,"Icon"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/inputgroup/examples/inputgroup"],"data":[0,{"id":[0,"Input group"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/jumplinks/examples/jumplinks"],"data":[0,{"id":[0,"Jump links"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/label/examples/label"],"data":[0,{"id":[0,"Label"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/list/examples/list"],"data":[0,{"id":[0,"List"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/loginpage/examples/loginpage"],"data":[0,{"id":[0,"Login page"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/masthead/examples/masthead"],"data":[0,{"id":[0,"Masthead"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/menu/examples/menu"],"data":[0,{"id":[0,"Menu"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/menutoggle/examples/menutoggle"],"data":[0,{"id":[0,"Menu toggle"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/modal/examples/modal"],"data":[0,{"id":[0,"Modal"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/multiplefileupload/examples/multiplefileupload"],"data":[0,{"id":[0,"Multiple file upload"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/nav/examples/nav"],"data":[0,{"id":[0,"Navigation"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/notificationbadge/examples/notificationbadge"],"data":[0,{"id":[0,"Notification badge"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/notificationdrawer/examples/notificationdrawer"],"data":[0,{"id":[0,"Notification drawer"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/numberinput/examples/numberinput"],"data":[0,{"id":[0,"Number input"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/overflowmenu/examples/overflowmenu"],"data":[0,{"id":[0,"Overflow menu"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/page/examples/page"],"data":[0,{"id":[0,"Page"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/pagination/examples/pagination"],"data":[0,{"id":[0,"Pagination"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/panel/examples/panel"],"data":[0,{"id":[0,"Panel"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/popover/examples/popover"],"data":[0,{"id":[0,"Popover"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/progress/examples/progress"],"data":[0,{"id":[0,"Progress"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/progressstepper/examples/progressstepper"],"data":[0,{"id":[0,"Progress stepper"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/radio/examples/radio"],"data":[0,{"id":[0,"Radio"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/searchinput/examples/searchinput"],"data":[0,{"id":[0,"Search input"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/select/examples/select"],"data":[0,{"id":[0,"Select"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/sidebar/examples/sidebar"],"data":[0,{"id":[0,"Sidebar"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/fileupload/examples/fileupload"],"data":[0,{"id":[0,"Simple file upload"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/simplelist/examples/simplelist"],"data":[0,{"id":[0,"Simple list"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/skeleton/examples/skeleton"],"data":[0,{"id":[0,"Skeleton"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/skiptocontent/examples/skiptocontent"],"data":[0,{"id":[0,"Skip to content"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/slider/examples/slider"],"data":[0,{"id":[0,"Slider"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/spinner/examples/spinner"],"data":[0,{"id":[0,"Spinner"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/switch/examples/switch"],"data":[0,{"id":[0,"Switch"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/tabs/examples/tabs"],"data":[0,{"id":[0,"Tabs"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/textarea/examples/textarea"],"data":[0,{"id":[0,"Text area"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/textinput/examples/textinput"],"data":[0,{"id":[0,"Text input"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/textinputgroup/examples/textinputgroup"],"data":[0,{"id":[0,"Text input group"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/deprecated/components/tile/examples/tile"],"data":[0,{"id":[0,"Tile"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/timepicker/examples/timepicker"],"data":[0,{"id":[0,"Time picker"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/timestamp/examples/timestamp"],"data":[0,{"id":[0,"Timestamp"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/title/examples/title"],"data":[0,{"id":[0,"Title"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/togglegroup/examples/togglegroup"],"data":[0,{"id":[0,"Toggle group"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/toolbar/examples/toolbar"],"data":[0,{"id":[0,"Toolbar"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/tooltip/examples/tooltip"],"data":[0,{"id":[0,"Tooltip"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/treeview/examples/treeview"],"data":[0,{"id":[0,"Tree view"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/truncate/examples/truncate"],"data":[0,{"id":[0,"Truncate"],"section":[0,"components"],"sortValue":[0]}]}],[0,{"id":[0,"src/components/wizard/examples/wizard"],"data":[0,{"id":[0,"Wizard"],"section":[0,"components"],"sortValue":[0]}]}]]]]],"data-astro-transition-scope":[0,"astro-xikxfxwm-3"]}" ssr client="only" opts="{"name":"ReactNav","value":"react"}" data-astro-transition-scope="astro-xikxfxwm-3"></astro-island> <div class="pf-v6-c-page__main-container"> <main class="pf-v6-c-page__main"> <section class="pf-v6-c-page__main-section"><div class="pf-v6-c-page__main-body"> <section id="ws-sticky-nav-tabs" class="pf-v6-c-page__main-tabs pf-m-sticky-top"><div class="pf-v6-c-page__main-body"> <div class="pf-v6-c-tabs pf-m-page-insets pf-m-no-border-bottom"> <ul class="pf-v6-c-tabs__list"> <li class="pf-v6-c-tabs__item pf-m-current"> <a class="pf-v6-c-tabs__link" href="/components/select/react"> React </a> </li> </ul> </div> </div></section><section id="main-content" class="pf-v6-c-page__main-section pf-m-fill"><div class="pf-v6-c-page__main-body"> <h2 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2668" data-pf-content="true" class="pf-v6-c-content--h2">Examples</h2>
|
|
46
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2726" data-pf-content="true" class="pf-v6-c-content--p">Select builds off of the menu component suite to adapt commonly used properties and functions to create a select menu. See the <a data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2669" data-pf-content="true" class="pf-v6-c-content--a">menu documentation</a> for a full list of properties that may be used to further customize a select menu. View the <a data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2670" data-pf-content="true" class="pf-v6-c-content--a">custom menu examples</a> to see examples of fully functional select menus.</p>
|
|
47
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2727" data-pf-content="true" class="pf-v6-c-content--p">For use cases that do not require a lot of customization, there are various template components available to use in the <code>@react-templates</code> package. These templates have a streamlined API and logic, making them easier to set up and use, but are limited in scope and flexibility. See the <a data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2671" data-pf-content="true" class="pf-v6-c-content--a">templates page</a> for details.</p>
|
|
48
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2672" data-pf-content="true" class="pf-v6-c-content--h3">Single select</h3>
|
|
49
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2673" data-pf-content="true" class="pf-v6-c-content--p">To let users select a single item from a list, use a single select menu.</p>
|
|
50
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2711" data-pf-content="true" class="pf-v6-c-content--p">You can add multiple <code><SelectOption></code> components to build out a list of menu items. For each select option, pass a relevant option label to the <code>value</code> property.</p>
|
|
51
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2712" data-pf-content="true" class="pf-v6-c-content--p">To disable the select menu toggle, use the <code>isDisabled</code> property. In the following example, select the checkbox to observe this behavior.</p>
|
|
52
52
|
|
|
53
|
-
<style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event("astro:only"));})();</script><script>(()=>{var A=Object.defineProperty;var g=(i,o,a)=>o in i?A(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a;var d=(i,o,a)=>g(i,typeof o!="symbol"?o+"":o,a);{let i={0:t=>m(t),1:t=>a(t),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(a(t)),5:t=>new Set(a(t)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(t),9:t=>new Uint16Array(t),10:t=>new Uint32Array(t),11:t=>1/0*t},o=t=>{let[l,e]=t;return l in i?i[l](e):void 0},a=t=>t.map(o),m=t=>typeof t!="object"||t===null?t:Object.fromEntries(Object.entries(t).map(([l,e])=>[l,o(e)]));class y extends HTMLElement{constructor(){super(...arguments);d(this,"Component");d(this,"hydrator");d(this,"hydrate",async()=>{var b;if(!this.hydrator||!this.isConnected)return;let e=(b=this.parentElement)==null?void 0:b.closest("astro-island[ssr]");if(e){e.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let c=this.querySelectorAll("astro-slot"),n={},h=this.querySelectorAll("template[data-astro-template]");for(let r of h){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("data-astro-template")||"default"]=r.innerHTML,r.remove())}for(let r of c){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("name")||"default"]=r.innerHTML)}let p;try{p=this.hasAttribute("props")?m(JSON.parse(this.getAttribute("props"))):{}}catch(r){let s=this.getAttribute("component-url")||"<unknown>",v=this.getAttribute("component-export");throw v&&(s+=` (export ${v})`),console.error(`[hydrate] Error parsing props for component ${s}`,this.getAttribute("props"),r),r}let u;await this.hydrator(this)(this.Component,p,n,{client:this.getAttribute("client")}),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))});d(this,"unmount",()=>{this.isConnected||this.dispatchEvent(new CustomEvent("astro:unmount"))})}disconnectedCallback(){document.removeEventListener("astro:after-swap",this.unmount),document.addEventListener("astro:after-swap",this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute("await-children")||document.readyState==="interactive"||document.readyState==="complete")this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener("DOMContentLoaded",e),c.disconnect(),this.childrenConnectedCallback()},c=new MutationObserver(()=>{var n;((n=this.lastChild)==null?void 0:n.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue==="astro:end"&&(this.lastChild.remove(),e())});c.observe(this,{childList:!0}),document.addEventListener("DOMContentLoaded",e)}}async childrenConnectedCallback(){let e=this.getAttribute("before-hydration-url");e&&await import(e),this.start()}async start(){let e=JSON.parse(this.getAttribute("opts")),c=this.getAttribute("client");if(Astro[c]===void 0){window.addEventListener(`astro:${c}`,()=>this.start(),{once:!0});return}try{await Astro[c](async()=>{let n=this.getAttribute("renderer-url"),[h,{default:p}]=await Promise.all([import(this.getAttribute("component-url")),n?import(n):()=>()=>{}]),u=this.getAttribute("component-export")||"default";if(!u.includes("."))this.Component=h[u];else{this.Component=h;for(let f of u.split("."))this.Component=this.Component[f]}return this.hydrator=p,this.hydrate},e,this)}catch(n){console.error(`[astro-island] Error hydrating ${this.getAttribute("component-url")}`,n)}}attributeChangedCallback(){this.hydrate()}}d(y,"observedAttributes",["props"]),customElements.get("astro-island")||customElements.define("astro-island",y)}})();</script><astro-island uid="Z2bOoV" component-url="/_astro/LiveExample.
|
|
54
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
55
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
56
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
57
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
58
|
-
<ul data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
59
|
-
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
60
|
-
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
61
|
-
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
62
|
-
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
53
|
+
<style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event("astro:only"));})();</script><script>(()=>{var A=Object.defineProperty;var g=(i,o,a)=>o in i?A(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a;var d=(i,o,a)=>g(i,typeof o!="symbol"?o+"":o,a);{let i={0:t=>m(t),1:t=>a(t),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(a(t)),5:t=>new Set(a(t)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(t),9:t=>new Uint16Array(t),10:t=>new Uint32Array(t),11:t=>1/0*t},o=t=>{let[l,e]=t;return l in i?i[l](e):void 0},a=t=>t.map(o),m=t=>typeof t!="object"||t===null?t:Object.fromEntries(Object.entries(t).map(([l,e])=>[l,o(e)]));class y extends HTMLElement{constructor(){super(...arguments);d(this,"Component");d(this,"hydrator");d(this,"hydrate",async()=>{var b;if(!this.hydrator||!this.isConnected)return;let e=(b=this.parentElement)==null?void 0:b.closest("astro-island[ssr]");if(e){e.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let c=this.querySelectorAll("astro-slot"),n={},h=this.querySelectorAll("template[data-astro-template]");for(let r of h){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("data-astro-template")||"default"]=r.innerHTML,r.remove())}for(let r of c){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("name")||"default"]=r.innerHTML)}let p;try{p=this.hasAttribute("props")?m(JSON.parse(this.getAttribute("props"))):{}}catch(r){let s=this.getAttribute("component-url")||"<unknown>",v=this.getAttribute("component-export");throw v&&(s+=` (export ${v})`),console.error(`[hydrate] Error parsing props for component ${s}`,this.getAttribute("props"),r),r}let u;await this.hydrator(this)(this.Component,p,n,{client:this.getAttribute("client")}),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))});d(this,"unmount",()=>{this.isConnected||this.dispatchEvent(new CustomEvent("astro:unmount"))})}disconnectedCallback(){document.removeEventListener("astro:after-swap",this.unmount),document.addEventListener("astro:after-swap",this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute("await-children")||document.readyState==="interactive"||document.readyState==="complete")this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener("DOMContentLoaded",e),c.disconnect(),this.childrenConnectedCallback()},c=new MutationObserver(()=>{var n;((n=this.lastChild)==null?void 0:n.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue==="astro:end"&&(this.lastChild.remove(),e())});c.observe(this,{childList:!0}),document.addEventListener("DOMContentLoaded",e)}}async childrenConnectedCallback(){let e=this.getAttribute("before-hydration-url");e&&await import(e),this.start()}async start(){let e=JSON.parse(this.getAttribute("opts")),c=this.getAttribute("client");if(Astro[c]===void 0){window.addEventListener(`astro:${c}`,()=>this.start(),{once:!0});return}try{await Astro[c](async()=>{let n=this.getAttribute("renderer-url"),[h,{default:p}]=await Promise.all([import(this.getAttribute("component-url")),n?import(n):()=>()=>{}]),u=this.getAttribute("component-export")||"default";if(!u.includes("."))this.Component=h[u];else{this.Component=h;for(let f of u.split("."))this.Component=this.Component[f]}return this.hydrator=p,this.hydrate},e,this)}catch(n){console.error(`[astro-island] Error hydrating ${this.getAttribute("component-url")}`,n)}}attributeChangedCallback(){this.hydrate()}}d(y,"observedAttributes",["props"]),customElements.get("astro-island")||customElements.define("astro-island",y)}})();</script><astro-island uid="Z2bOoV" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { Fragment, useState } from 'react';\nimport { Select, SelectOption, SelectList, MenuToggle, MenuToggleElement, Checkbox } from '@patternfly/react-core';\n\nexport const SelectBasic: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState<string>('Select a value');\n const [isDisabled, setIsDisabled] = useState<boolean>(false);\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n setSelected(value as string);\n setIsOpen(false);\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n ref={toggleRef}\n onClick={onToggleClick}\n isExpanded={isOpen}\n isDisabled={isDisabled}\n style={\n {\n width: '200px'\n } as React.CSSProperties\n }\n >\n {selected}\n </MenuToggle>\n );\n\n return (\n <Fragment>\n <Checkbox\n id=\"toggle-disabled\"\n label=\"isDisabled\"\n isChecked={isDisabled}\n onChange={(_event, checked) => setIsDisabled(checked)}\n style={{ marginBottom: 20 }}\n />\n <Select\n id=\"single-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={onSelect}\n onOpenChange={(isOpen) => setIsOpen(isOpen)}\n toggle={toggle}\n shouldFocusToggleOnSelect\n >\n <SelectList>\n <SelectOption value=\"Option 1\">Option 1</SelectOption>\n <SelectOption value=\"Option 2\">Option 2</SelectOption>\n <SelectOption value=\"Option 3\">Option 3</SelectOption>\n </SelectList>\n </Select>\n </Fragment>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
54
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2674" data-pf-content="true" class="pf-v6-c-content--h3">Select option variants</h3>
|
|
55
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2675" data-pf-content="true" class="pf-v6-c-content--p">The following example showcases different option variants and customizations that are commonly used in a select menu.</p>
|
|
56
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2713" data-pf-content="true" class="pf-v6-c-content--p">To create these variants, you can pass different properties into a <code><SelectOption></code> component.</p>
|
|
57
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2676" data-pf-content="true" class="pf-v6-c-content--p">This example provides examples of:</p>
|
|
58
|
+
<ul data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2728" data-pf-content="true" class="pf-v6-c-content--ul">
|
|
59
|
+
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2714" data-pf-content="true" class="pf-v6-c-content--li">An option with a description, which is created by using the <code>description</code> property.</li>
|
|
60
|
+
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2715" data-pf-content="true" class="pf-v6-c-content--li">An option with a link, which is created by passing a URL into the <code>to</code> property. For external links, use the <code>isExternalLink</code> property so that the option is styled with an outbound link icon.</li>
|
|
61
|
+
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2716" data-pf-content="true" class="pf-v6-c-content--li">An option with an icon, which is created by using the <code>icon</code> property.</li>
|
|
62
|
+
<li data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2717" data-pf-content="true" class="pf-v6-c-content--li">An option that is disabled by using the <code>isDisabled</code> property.</li>
|
|
63
63
|
</ul>
|
|
64
64
|
|
|
65
|
-
<astro-island uid="ZPTGUu" component-url="/_astro/LiveExample.
|
|
66
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
67
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
65
|
+
<astro-island uid="ZPTGUu" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useState } from 'react';\nimport { Select, SelectOption, SelectList, MenuToggle, MenuToggleElement } from '@patternfly/react-core';\nimport BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';\n\nexport const SelectOptionVariations: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState<string>('Select a value');\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n setSelected(value as string);\n setIsOpen(false);\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n ref={toggleRef}\n onClick={onToggleClick}\n isExpanded={isOpen}\n style={\n {\n width: '200px'\n } as React.CSSProperties\n }\n >\n {selected}\n </MenuToggle>\n );\n\n return (\n <Select\n id=\"option-variations-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={onSelect}\n onOpenChange={(isOpen) => setIsOpen(isOpen)}\n toggle={toggle}\n shouldFocusToggleOnSelect\n >\n <SelectList>\n <SelectOption value=\"Basic option\">Basic option</SelectOption>\n <SelectOption value=\"Option with description\" description=\"This is a description\">\n Option with description\n </SelectOption>\n <SelectOption\n to=\"#\"\n // Prevent default clicking functionality for example purposes only\n onClick={(event) => event.preventDefault()}\n value=\"Option with link\"\n isExternalLink\n >\n Option with link\n </SelectOption>\n <SelectOption value=\"Option with icon\" icon={<BellIcon />}>\n Option with icon\n </SelectOption>\n <SelectOption value=\"Disabled option\" isDisabled>\n Disabled option\n </SelectOption>\n <SelectOption value=\"See Menu for additional variations!\">See Menu for additional variations!</SelectOption>\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
66
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2677" data-pf-content="true" class="pf-v6-c-content--h3">With grouped items</h3>
|
|
67
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2718" data-pf-content="true" class="pf-v6-c-content--p">To group related select options together, use 1 or more <code><SelectGroup></code> components and title each group using the <code>label</code> property.</p>
|
|
68
68
|
|
|
69
|
-
<astro-island uid="1DnT1I" component-url="/_astro/LiveExample.
|
|
70
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
71
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
72
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
69
|
+
<astro-island uid="1DnT1I" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useState } from 'react';\nimport {\n Select,\n SelectOption,\n SelectList,\n SelectGroup,\n MenuToggle,\n MenuToggleElement,\n Divider\n} from '@patternfly/react-core';\n\nexport const SelectGrouped: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState<string>('Select a value');\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n setSelected(value as string);\n setIsOpen(false);\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n ref={toggleRef}\n onClick={onToggleClick}\n isExpanded={isOpen}\n style={\n {\n width: '200px'\n } as React.CSSProperties\n }\n >\n {selected}\n </MenuToggle>\n );\n\n return (\n <Select\n id=\"single-grouped-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={onSelect}\n onOpenChange={(isOpen) => setIsOpen(isOpen)}\n toggle={toggle}\n shouldFocusToggleOnSelect\n >\n <SelectGroup label=\"Group 1\">\n <SelectList>\n <SelectOption value=\"Option 1\">Option 1</SelectOption>\n <SelectOption value=\"Option 2\">Option 2</SelectOption>\n <SelectOption value=\"Option 3\">Option 3</SelectOption>\n </SelectList>\n </SelectGroup>\n <Divider />\n <SelectGroup label=\"Group 2\">\n <SelectList>\n <SelectOption value=\"Option 4\">Option 4</SelectOption>\n <SelectOption value=\"Option 5\">Option 5</SelectOption>\n <SelectOption value=\"Option 6\">Option 6</SelectOption>\n </SelectList>\n </SelectGroup>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
70
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2678" data-pf-content="true" class="pf-v6-c-content--h3">With validation</h3>
|
|
71
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2719" data-pf-content="true" class="pf-v6-c-content--p">To create a toggle with a status, pass in <code>status</code> to the <code>MenuToggle</code>. The default icon associated with each status may be overridden by using the <code>statusIcon</code> property.</p>
|
|
72
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2679" data-pf-content="true" class="pf-v6-c-content--p">When the status value is “warning” or “danger”, you must include helper text that conveys what is causing the warning/error.</p>
|
|
73
73
|
|
|
74
|
-
<astro-island uid="Z1X0z6C" component-url="/_astro/LiveExample.
|
|
75
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
76
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
77
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
78
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
74
|
+
<astro-island uid="Z1X0z6C" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { Fragment, useState } from 'react';\nimport {\n Select,\n SelectOption,\n SelectList,\n MenuToggle,\n MenuToggleElement,\n MenuToggleStatus,\n HelperText,\n HelperTextItem\n} from '@patternfly/react-core';\n\nexport const SelectValidated: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState<string>('Select a value');\n const [status, setStatus] = useState<MenuToggleStatus>();\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n setSelected(value as string);\n setStatus((value as string).toLowerCase() as MenuToggleStatus);\n setIsOpen(false);\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n ref={toggleRef}\n onClick={onToggleClick}\n isExpanded={isOpen}\n style={\n {\n width: '200px'\n } as React.CSSProperties\n }\n status={status}\n >\n {selected}\n </MenuToggle>\n );\n\n return (\n <Fragment>\n <Select\n id=\"single-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={onSelect}\n onOpenChange={(isOpen) => setIsOpen(isOpen)}\n toggle={toggle}\n shouldFocusToggleOnSelect\n >\n <SelectList>\n <SelectOption value=\"Success\">Success</SelectOption>\n <SelectOption value=\"Warning\">Warning</SelectOption>\n <SelectOption value=\"Danger\">Danger</SelectOption>\n </SelectList>\n </Select>\n {(status === MenuToggleStatus.warning || status === MenuToggleStatus.danger) && (\n <HelperText isLiveRegion>\n <HelperTextItem variant={status === MenuToggleStatus.warning ? 'warning' : 'error'}>\n {status === MenuToggleStatus.warning && 'Warning text that explains the issue.'}\n {status === MenuToggleStatus.danger && 'Danger text that explains the issue.'}\n </HelperTextItem>\n </HelperText>\n )}\n </Fragment>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
75
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2680" data-pf-content="true" class="pf-v6-c-content--h3">Checkbox select</h3>
|
|
76
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2681" data-pf-content="true" class="pf-v6-c-content--p">To let users select multiple list options via checkbox input, use a checkbox select.</p>
|
|
77
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2720" data-pf-content="true" class="pf-v6-c-content--p">To create a checkbox select, pass <code>role="menu"</code> to the <code><Select></code>, and <code>hasCheckbox</code> into each <code><SelectOption></code> component. To indicate that an option is selected, use the <code>isSelected</code> property.</p>
|
|
78
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2682" data-pf-content="true" class="pf-v6-c-content--p">By default, the menu toggle will display a badge to indicate the number of items that a user has selected.</p>
|
|
79
79
|
|
|
80
|
-
<astro-island uid="Z1WhMQk" component-url="/_astro/LiveExample.
|
|
81
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
82
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
83
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
84
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
85
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
86
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
80
|
+
<astro-island uid="Z1WhMQk" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useState } from 'react';\nimport { Select, SelectOption, SelectList, MenuToggle, MenuToggleElement, Badge } from '@patternfly/react-core';\n\nexport const SelectCheckbox: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selectedItems, setSelectedItems] = useState<number[]>([]);\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n if (selectedItems.includes(value as number)) {\n setSelectedItems(selectedItems.filter((id) => id !== value));\n } else {\n setSelectedItems([...selectedItems, value as number]);\n }\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n ref={toggleRef}\n onClick={onToggleClick}\n isExpanded={isOpen}\n style={\n {\n width: '200px'\n } as React.CSSProperties\n }\n >\n Filter by status\n {selectedItems.length > 0 && <Badge isRead>{selectedItems.length}</Badge>}\n </MenuToggle>\n );\n\n return (\n <Select\n role=\"menu\"\n id=\"checkbox-select\"\n isOpen={isOpen}\n selected={selectedItems}\n onSelect={onSelect}\n onOpenChange={(nextOpen: boolean) => setIsOpen(nextOpen)}\n toggle={toggle}\n >\n <SelectList>\n <SelectOption hasCheckbox value={0} isSelected={selectedItems.includes(0)}>\n Debug\n </SelectOption>\n <SelectOption hasCheckbox value={1} isSelected={selectedItems.includes(1)}>\n Info\n </SelectOption>\n <SelectOption hasCheckbox value={2} isSelected={selectedItems.includes(2)}>\n Warn\n </SelectOption>\n <SelectOption hasCheckbox isDisabled value={4} isSelected={selectedItems.includes(4)}>\n Error\n </SelectOption>\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
81
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2683" data-pf-content="true" class="pf-v6-c-content--h3">Typeahead</h3>
|
|
82
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2684" data-pf-content="true" class="pf-v6-c-content--p">Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.</p>
|
|
83
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2685" data-pf-content="true" class="pf-v6-c-content--p">Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.</p>
|
|
84
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2721" data-pf-content="true" class="pf-v6-c-content--p">To make a typeahead, pass <code>variant=typeahead</code> into the <code><MenuToggle></code> component and link an <code>onClick</code> function to the <code><TextInputGroupMain></code> component.</p>
|
|
85
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2686" data-pf-content="true" class="pf-v6-c-content--p">Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.</p>
|
|
86
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2722" data-pf-content="true" class="pf-v6-c-content--p">To make a typeahead, pass <code>variant=typeahead</code> into the <code><MenuToggle></code> component and link an <code>onClick</code> function to the <code><TextInputGroupMain></code> component.</p>
|
|
87
87
|
|
|
88
|
-
<astro-island uid="2tClVz" component-url="/_astro/LiveExample.
|
|
89
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
90
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
91
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
92
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
93
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
94
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
95
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
96
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
88
|
+
<astro-island uid="2tClVz" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useEffect, useRef, useState } from 'react';\nimport {\n Select,\n SelectOption,\n SelectList,\n SelectOptionProps,\n MenuToggle,\n MenuToggleElement,\n TextInputGroup,\n TextInputGroupMain,\n TextInputGroupUtilities,\n Button\n} from '@patternfly/react-core';\nimport TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';\n\nconst initialSelectOptions: SelectOptionProps[] = [\n { value: 'Alabama', children: 'Alabama' },\n { value: 'Florida', children: 'Florida' },\n { value: 'New Jersey', children: 'New Jersey' },\n { value: 'New Mexico', children: 'New Mexico' },\n { value: 'New York', children: 'New York' },\n { value: 'North Carolina', children: 'North Carolina' }\n];\n\nexport const SelectTypeahead: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState<string>('');\n const [inputValue, setInputValue] = useState<string>('');\n const [filterValue, setFilterValue] = useState<string>('');\n const [selectOptions, setSelectOptions] = useState<SelectOptionProps[]>(initialSelectOptions);\n const [focusedItemIndex, setFocusedItemIndex] = useState<number | null>(null);\n const [activeItemId, setActiveItemId] = useState<string | null>(null);\n const textInputRef = useRef<HTMLInputElement>(undefined);\n\n const NO_RESULTS = 'no results';\n\n useEffect(() => {\n let newSelectOptions: SelectOptionProps[] = initialSelectOptions;\n\n // Filter menu items based on the text input value when one exists\n if (filterValue) {\n newSelectOptions = initialSelectOptions.filter((menuItem) =>\n String(menuItem.children).toLowerCase().includes(filterValue.toLowerCase())\n );\n\n // When no options are found after filtering, display 'No results found'\n if (!newSelectOptions.length) {\n newSelectOptions = [\n { isAriaDisabled: true, children: `No results found for \"${filterValue}\"`, value: NO_RESULTS }\n ];\n }\n\n // Open the menu when the input value changes and the new value is not empty\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n\n setSelectOptions(newSelectOptions);\n }, [filterValue]);\n\n const createItemId = (value: any) => `select-typeahead-${value.replace(' ', '-')}`;\n\n const setActiveAndFocusedItem = (itemIndex: number) => {\n setFocusedItemIndex(itemIndex);\n const focusedItem = selectOptions[itemIndex];\n setActiveItemId(createItemId(focusedItem.value));\n };\n\n const resetActiveAndFocusedItem = () => {\n setFocusedItemIndex(null);\n setActiveItemId(null);\n };\n\n const closeMenu = () => {\n setIsOpen(false);\n resetActiveAndFocusedItem();\n };\n\n const onInputClick = () => {\n if (!isOpen) {\n setIsOpen(true);\n } else if (!inputValue) {\n closeMenu();\n }\n };\n\n const selectOption = (value: string | number, content: string | number) => {\n // eslint-disable-next-line no-console\n console.log('selected', content);\n\n setInputValue(String(content));\n setFilterValue('');\n setSelected(String(value));\n\n closeMenu();\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n if (value && value !== NO_RESULTS) {\n const optionText = selectOptions.find((option) => option.value === value)?.children;\n selectOption(value, optionText as string);\n }\n };\n\n const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {\n setInputValue(value);\n setFilterValue(value);\n\n resetActiveAndFocusedItem();\n\n if (value !== selected) {\n setSelected('');\n }\n };\n\n const handleMenuArrowKeys = (key: string) => {\n let indexToFocus = 0;\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n if (selectOptions.every((option) => option.isDisabled)) {\n return;\n }\n\n if (key === 'ArrowUp') {\n // When no index is set or at the first index, focus to the last, otherwise decrement focus index\n if (focusedItemIndex === null || focusedItemIndex === 0) {\n indexToFocus = selectOptions.length - 1;\n } else {\n indexToFocus = focusedItemIndex - 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus--;\n if (indexToFocus === -1) {\n indexToFocus = selectOptions.length - 1;\n }\n }\n }\n\n if (key === 'ArrowDown') {\n // When no index is set or at the last index, focus to the first, otherwise increment focus index\n if (focusedItemIndex === null || focusedItemIndex === selectOptions.length - 1) {\n indexToFocus = 0;\n } else {\n indexToFocus = focusedItemIndex + 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus++;\n if (indexToFocus === selectOptions.length) {\n indexToFocus = 0;\n }\n }\n }\n\n setActiveAndFocusedItem(indexToFocus);\n };\n\n const onInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const focusedItem = focusedItemIndex !== null ? selectOptions[focusedItemIndex] : null;\n\n switch (event.key) {\n case 'Enter':\n if (isOpen && focusedItem && focusedItem.value !== NO_RESULTS && !focusedItem.isAriaDisabled) {\n selectOption(focusedItem.value, focusedItem.children as string);\n }\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n handleMenuArrowKeys(event.key);\n break;\n }\n };\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n textInputRef?.current?.focus();\n };\n\n const onClearButtonClick = () => {\n setSelected('');\n setInputValue('');\n setFilterValue('');\n resetActiveAndFocusedItem();\n textInputRef?.current?.focus();\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n ref={toggleRef}\n variant=\"typeahead\"\n aria-label=\"Typeahead menu toggle\"\n onClick={onToggleClick}\n isExpanded={isOpen}\n isFullWidth\n >\n <TextInputGroup isPlain>\n <TextInputGroupMain\n value={inputValue}\n onClick={onInputClick}\n onChange={onTextInputChange}\n onKeyDown={onInputKeyDown}\n id=\"typeahead-select-input\"\n autoComplete=\"off\"\n innerRef={textInputRef}\n placeholder=\"Select a state\"\n {...(activeItemId && { 'aria-activedescendant': activeItemId })}\n role=\"combobox\"\n isExpanded={isOpen}\n aria-controls=\"select-typeahead-listbox\"\n />\n\n <TextInputGroupUtilities {...(!inputValue ? { style: { display: 'none' } } : {})}>\n <Button variant=\"plain\" onClick={onClearButtonClick} aria-label=\"Clear input value\" icon={<TimesIcon />} />\n </TextInputGroupUtilities>\n </TextInputGroup>\n </MenuToggle>\n );\n\n return (\n <Select\n id=\"typeahead-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={onSelect}\n onOpenChange={(isOpen) => {\n !isOpen && closeMenu();\n }}\n toggle={toggle}\n variant=\"typeahead\"\n >\n <SelectList id=\"select-typeahead-listbox\">\n {selectOptions.map((option, index) => (\n <SelectOption\n key={option.value || option.children}\n isFocused={focusedItemIndex === index}\n className={option.className}\n id={createItemId(option.value)}\n {...option}\n ref={null}\n />\n ))}\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
89
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2687" data-pf-content="true" class="pf-v6-c-content--h3">Typeahead with create option</h3>
|
|
90
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2688" data-pf-content="true" class="pf-v6-c-content--p">If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.</p>
|
|
91
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2689" data-pf-content="true" class="pf-v6-c-content--p">If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.</p>
|
|
92
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2723" data-pf-content="true" class="pf-v6-c-content--p">To enable the creation ability, pass a predetermined <code>value</code> into a <code><SelectOption></code> component. You can use the <code>placeholder</code> property to change the default text shown in the text input.</p>
|
|
93
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2690" data-pf-content="true" class="pf-v6-c-content--p">The following example outlines the code implementation required to create a working typeahead menu that allows for creation.</p>
|
|
94
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2691" data-pf-content="true" class="pf-v6-c-content--p">If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.</p>
|
|
95
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2724" data-pf-content="true" class="pf-v6-c-content--p">To enable the creation ability, pass a predetermined <code>value</code> into a <code><SelectOption></code> component. You can use the <code>placeholder</code> property to change the default text shown in the text input.</p>
|
|
96
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2692" data-pf-content="true" class="pf-v6-c-content--p">The following example outlines the code implementation required to create a working typeahead menu that allows for creation.</p>
|
|
97
97
|
|
|
98
|
-
<astro-island uid="CemmO" component-url="/_astro/LiveExample.
|
|
99
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
100
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
101
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
102
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
103
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
104
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
98
|
+
<astro-island uid="CemmO" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useEffect, useRef, useState } from 'react';\nimport {\n Select,\n SelectOption,\n SelectList,\n SelectOptionProps,\n MenuToggle,\n MenuToggleElement,\n TextInputGroup,\n TextInputGroupMain,\n TextInputGroupUtilities,\n Button\n} from '@patternfly/react-core';\nimport TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';\n\nlet initialSelectOptions: SelectOptionProps[] = [\n { value: 'Alabama', children: 'Alabama' },\n { value: 'Florida', children: 'Florida' },\n { value: 'New Jersey', children: 'New Jersey' },\n { value: 'New Mexico', children: 'New Mexico' },\n { value: 'New York', children: 'New York' },\n { value: 'North Carolina', children: 'North Carolina' }\n];\n\nexport const SelectTypeaheadCreatable: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState<string>('');\n const [inputValue, setInputValue] = useState<string>('');\n const [filterValue, setFilterValue] = useState<string>('');\n const [selectOptions, setSelectOptions] = useState<SelectOptionProps[]>(initialSelectOptions);\n const [focusedItemIndex, setFocusedItemIndex] = useState<number | null>(null);\n const [activeItemId, setActiveItemId] = useState<string | null>(null);\n const textInputRef = useRef<HTMLInputElement>(undefined);\n\n const CREATE_NEW = 'create';\n\n useEffect(() => {\n let newSelectOptions: SelectOptionProps[] = initialSelectOptions;\n\n // Filter menu items based on the text input value when one exists\n if (filterValue) {\n newSelectOptions = initialSelectOptions.filter((menuItem) =>\n String(menuItem.children).toLowerCase().includes(filterValue.toLowerCase())\n );\n\n // If no option matches the filter exactly, display creation option\n if (!initialSelectOptions.some((option) => option.value === filterValue)) {\n newSelectOptions = [...newSelectOptions, { children: `Create new option \"${filterValue}\"`, value: CREATE_NEW }];\n }\n\n // Open the menu when the input value changes and the new value is not empty\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n\n setSelectOptions(newSelectOptions);\n }, [filterValue]);\n\n const createItemId = (value: any) => `select-typeahead-${value.replace(' ', '-')}`;\n\n const setActiveAndFocusedItem = (itemIndex: number) => {\n setFocusedItemIndex(itemIndex);\n const focusedItem = selectOptions[itemIndex];\n setActiveItemId(createItemId(focusedItem.value));\n };\n\n const resetActiveAndFocusedItem = () => {\n setFocusedItemIndex(null);\n setActiveItemId(null);\n };\n\n const closeMenu = () => {\n setIsOpen(false);\n resetActiveAndFocusedItem();\n };\n\n const onInputClick = () => {\n if (!isOpen) {\n setIsOpen(true);\n } else if (!inputValue) {\n closeMenu();\n }\n };\n\n const selectOption = (value: string | number, content: string | number) => {\n // eslint-disable-next-line no-console\n console.log('selected', content);\n\n setInputValue(String(content));\n setFilterValue('');\n setSelected(String(value));\n\n closeMenu();\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n if (value) {\n if (value === CREATE_NEW) {\n if (!initialSelectOptions.some((item) => item.children === filterValue)) {\n initialSelectOptions = [...initialSelectOptions, { value: filterValue, children: filterValue }];\n }\n setSelected(filterValue);\n setFilterValue('');\n closeMenu();\n } else {\n const optionText = selectOptions.find((option) => option.value === value)?.children;\n selectOption(value, optionText as string);\n }\n }\n };\n\n const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {\n setInputValue(value);\n setFilterValue(value);\n\n resetActiveAndFocusedItem();\n\n if (value !== selected) {\n setSelected('');\n }\n };\n\n const handleMenuArrowKeys = (key: string) => {\n let indexToFocus = 0;\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n if (selectOptions.every((option) => option.isDisabled)) {\n return;\n }\n\n if (key === 'ArrowUp') {\n // When no index is set or at the first index, focus to the last, otherwise decrement focus index\n if (focusedItemIndex === null || focusedItemIndex === 0) {\n indexToFocus = selectOptions.length - 1;\n } else {\n indexToFocus = focusedItemIndex - 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus--;\n if (indexToFocus === -1) {\n indexToFocus = selectOptions.length - 1;\n }\n }\n }\n\n if (key === 'ArrowDown') {\n // When no index is set or at the last index, focus to the first, otherwise increment focus index\n if (focusedItemIndex === null || focusedItemIndex === selectOptions.length - 1) {\n indexToFocus = 0;\n } else {\n indexToFocus = focusedItemIndex + 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus++;\n if (indexToFocus === selectOptions.length) {\n indexToFocus = 0;\n }\n }\n }\n\n setActiveAndFocusedItem(indexToFocus);\n };\n\n const onInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const focusedItem = focusedItemIndex !== null ? selectOptions[focusedItemIndex] : null;\n\n switch (event.key) {\n case 'Enter':\n if (isOpen && focusedItem && !focusedItem.isAriaDisabled) {\n onSelect(undefined, focusedItem.value as string);\n }\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n handleMenuArrowKeys(event.key);\n break;\n }\n };\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n textInputRef?.current?.focus();\n };\n\n const onClearButtonClick = () => {\n setSelected('');\n setInputValue('');\n setFilterValue('');\n resetActiveAndFocusedItem();\n textInputRef?.current?.focus();\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n ref={toggleRef}\n variant=\"typeahead\"\n aria-label=\"Typeahead creatable menu toggle\"\n onClick={onToggleClick}\n isExpanded={isOpen}\n isFullWidth\n >\n <TextInputGroup isPlain>\n <TextInputGroupMain\n value={inputValue}\n onClick={onInputClick}\n onChange={onTextInputChange}\n onKeyDown={onInputKeyDown}\n id=\"create-typeahead-select-input\"\n autoComplete=\"off\"\n innerRef={textInputRef}\n placeholder=\"Select a state\"\n {...(activeItemId && { 'aria-activedescendant': activeItemId })}\n role=\"combobox\"\n isExpanded={isOpen}\n aria-controls=\"select-create-typeahead-listbox\"\n />\n\n <TextInputGroupUtilities {...(!inputValue ? { style: { display: 'none' } } : {})}>\n <Button variant=\"plain\" onClick={onClearButtonClick} aria-label=\"Clear input value\" icon={<TimesIcon />} />\n </TextInputGroupUtilities>\n </TextInputGroup>\n </MenuToggle>\n );\n\n return (\n <Select\n id=\"create-typeahead-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={onSelect}\n onOpenChange={(isOpen) => {\n !isOpen && closeMenu();\n }}\n toggle={toggle}\n variant=\"typeahead\"\n >\n <SelectList id=\"select-create-typeahead-listbox\">\n {selectOptions.map((option, index) => (\n <SelectOption\n key={option.value || option.children}\n isFocused={focusedItemIndex === index}\n className={option.className}\n id={createItemId(option.value)}\n {...option}\n ref={null}\n />\n ))}\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
99
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2693" data-pf-content="true" class="pf-v6-c-content--h3">Multiple typeahead with chips</h3>
|
|
100
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2694" data-pf-content="true" class="pf-v6-c-content--p">A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.</p>
|
|
101
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2695" data-pf-content="true" class="pf-v6-c-content--p">A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.</p>
|
|
102
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2696" data-pf-content="true" class="pf-v6-c-content--p">When more items than the allowed limit are selected, overflowing items will be hidden under a “more” button. The following example hides items after more than 3 are selected. To show hidden items, select the “more” button. Select “show less” to hide extra items again.</p>
|
|
103
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2697" data-pf-content="true" class="pf-v6-c-content--p">A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.</p>
|
|
104
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2698" data-pf-content="true" class="pf-v6-c-content--p">When more items than the allowed limit are selected, overflowing items will be hidden under a “more” button. The following example hides items after more than 3 are selected. To show hidden items, select the “more” button. Select “show less” to hide extra items again.</p>
|
|
105
105
|
|
|
106
|
-
<astro-island uid="ZsqjkF" component-url="/_astro/LiveExample.
|
|
107
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
108
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
109
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
110
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
106
|
+
<astro-island uid="ZsqjkF" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useEffect, useRef, useState } from 'react';\nimport {\n Select,\n SelectOption,\n SelectList,\n SelectOptionProps,\n MenuToggle,\n MenuToggleElement,\n TextInputGroup,\n TextInputGroupMain,\n TextInputGroupUtilities,\n Label,\n LabelGroup,\n Button\n} from '@patternfly/react-core';\nimport TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';\n\nconst initialSelectOptions: SelectOptionProps[] = [\n { value: 'Alabama', children: 'Alabama' },\n { value: 'Florida', children: 'Florida' },\n { value: 'New Jersey', children: 'New Jersey' },\n { value: 'New Mexico', children: 'New Mexico' },\n { value: 'New York', children: 'New York' },\n { value: 'North Carolina', children: 'North Carolina' }\n];\n\nexport const SelectMultiTypeahead: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [inputValue, setInputValue] = useState<string>('');\n const [selected, setSelected] = useState<string[]>([]);\n const [selectOptions, setSelectOptions] = useState<SelectOptionProps[]>(initialSelectOptions);\n const [focusedItemIndex, setFocusedItemIndex] = useState<number | null>(null);\n const [activeItemId, setActiveItemId] = useState<string | null>(null);\n const textInputRef = useRef<HTMLInputElement>(undefined);\n\n const NO_RESULTS = 'no results';\n\n useEffect(() => {\n let newSelectOptions: SelectOptionProps[] = initialSelectOptions;\n\n // Filter menu items based on the text input value when one exists\n if (inputValue) {\n newSelectOptions = initialSelectOptions.filter((menuItem) =>\n String(menuItem.children).toLowerCase().includes(inputValue.toLowerCase())\n );\n\n // When no options are found after filtering, display 'No results found'\n if (!newSelectOptions.length) {\n newSelectOptions = [\n { isAriaDisabled: true, children: `No results found for \"${inputValue}\"`, value: NO_RESULTS }\n ];\n }\n\n // Open the menu when the input value changes and the new value is not empty\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n\n setSelectOptions(newSelectOptions);\n }, [inputValue]);\n\n const createItemId = (value: any) => `select-multi-typeahead-${value.replace(' ', '-')}`;\n\n const setActiveAndFocusedItem = (itemIndex: number) => {\n setFocusedItemIndex(itemIndex);\n const focusedItem = selectOptions[itemIndex];\n setActiveItemId(createItemId(focusedItem.value));\n };\n\n const resetActiveAndFocusedItem = () => {\n setFocusedItemIndex(null);\n setActiveItemId(null);\n };\n\n const closeMenu = () => {\n setIsOpen(false);\n resetActiveAndFocusedItem();\n };\n\n const onInputClick = () => {\n if (!isOpen) {\n setIsOpen(true);\n } else if (!inputValue) {\n closeMenu();\n }\n };\n\n const onSelect = (value: string) => {\n if (value && value !== NO_RESULTS) {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n setSelected(\n selected.includes(value) ? selected.filter((selection) => selection !== value) : [...selected, value]\n );\n }\n\n textInputRef.current?.focus();\n };\n\n const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {\n setInputValue(value);\n resetActiveAndFocusedItem();\n };\n\n const handleMenuArrowKeys = (key: string) => {\n let indexToFocus = 0;\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n if (selectOptions.every((option) => option.isDisabled)) {\n return;\n }\n\n if (key === 'ArrowUp') {\n // When no index is set or at the first index, focus to the last, otherwise decrement focus index\n if (focusedItemIndex === null || focusedItemIndex === 0) {\n indexToFocus = selectOptions.length - 1;\n } else {\n indexToFocus = focusedItemIndex - 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus--;\n if (indexToFocus === -1) {\n indexToFocus = selectOptions.length - 1;\n }\n }\n }\n\n if (key === 'ArrowDown') {\n // When no index is set or at the last index, focus to the first, otherwise increment focus index\n if (focusedItemIndex === null || focusedItemIndex === selectOptions.length - 1) {\n indexToFocus = 0;\n } else {\n indexToFocus = focusedItemIndex + 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus++;\n if (indexToFocus === selectOptions.length) {\n indexToFocus = 0;\n }\n }\n }\n\n setActiveAndFocusedItem(indexToFocus);\n };\n\n const onInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const focusedItem = focusedItemIndex !== null ? selectOptions[focusedItemIndex] : null;\n\n switch (event.key) {\n case 'Enter':\n if (isOpen && focusedItem && focusedItem.value !== NO_RESULTS && !focusedItem.isAriaDisabled) {\n onSelect(focusedItem.value);\n }\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n handleMenuArrowKeys(event.key);\n break;\n }\n };\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n textInputRef?.current?.focus();\n };\n\n const onClearButtonClick = () => {\n setSelected([]);\n setInputValue('');\n resetActiveAndFocusedItem();\n textInputRef?.current?.focus();\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n variant=\"typeahead\"\n aria-label=\"Multi typeahead menu toggle\"\n onClick={onToggleClick}\n innerRef={toggleRef}\n isExpanded={isOpen}\n isFullWidth\n >\n <TextInputGroup isPlain>\n <TextInputGroupMain\n value={inputValue}\n onClick={onInputClick}\n onChange={onTextInputChange}\n onKeyDown={onInputKeyDown}\n id=\"multi-typeahead-select-input\"\n autoComplete=\"off\"\n innerRef={textInputRef}\n placeholder=\"Select a state\"\n {...(activeItemId && { 'aria-activedescendant': activeItemId })}\n role=\"combobox\"\n isExpanded={isOpen}\n aria-controls=\"select-multi-typeahead-listbox\"\n >\n <LabelGroup aria-label=\"Current selections\">\n {selected.map((selection, index) => (\n <Label\n key={index}\n variant=\"outline\"\n onClose={(ev) => {\n ev.stopPropagation();\n onSelect(selection);\n }}\n >\n {selection}\n </Label>\n ))}\n </LabelGroup>\n </TextInputGroupMain>\n <TextInputGroupUtilities {...(selected.length === 0 ? { style: { display: 'none' } } : {})}>\n <Button variant=\"plain\" onClick={onClearButtonClick} aria-label=\"Clear input value\" icon={<TimesIcon />} />\n </TextInputGroupUtilities>\n </TextInputGroup>\n </MenuToggle>\n );\n\n return (\n <Select\n id=\"multi-typeahead-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={(_event, selection) => onSelect(selection as string)}\n onOpenChange={(isOpen) => {\n !isOpen && closeMenu();\n }}\n toggle={toggle}\n variant=\"typeahead\"\n >\n <SelectList isAriaMultiselectable id=\"select-multi-typeahead-listbox\">\n {selectOptions.map((option, index) => (\n <SelectOption\n key={option.value || option.children}\n isFocused={focusedItemIndex === index}\n className={option.className}\n id={createItemId(option.value)}\n {...option}\n ref={null}\n />\n ))}\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
107
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2699" data-pf-content="true" class="pf-v6-c-content--h3">Multiple typeahead with create option</h3>
|
|
108
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2700" data-pf-content="true" class="pf-v6-c-content--p">If the text that is entered into a typeahead doesn’t match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips.”</p>
|
|
109
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2701" data-pf-content="true" class="pf-v6-c-content--p">If the text that is entered into a typeahead doesn’t match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips.”</p>
|
|
110
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2702" data-pf-content="true" class="pf-v6-c-content--p">If the text that is entered into a typeahead doesn’t match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips.”</p>
|
|
111
111
|
|
|
112
|
-
<astro-island uid="Z16jK9f" component-url="/_astro/LiveExample.
|
|
113
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
114
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
115
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
116
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
112
|
+
<astro-island uid="Z16jK9f" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useEffect, useRef, useState } from 'react';\nimport {\n Select,\n SelectOption,\n SelectList,\n SelectOptionProps,\n MenuToggle,\n MenuToggleElement,\n TextInputGroup,\n TextInputGroupMain,\n TextInputGroupUtilities,\n Label,\n LabelGroup,\n Button\n} from '@patternfly/react-core';\nimport TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';\n\nlet initialSelectOptions: SelectOptionProps[] = [\n { value: 'Alabama', children: 'Alabama' },\n { value: 'Florida', children: 'Florida' },\n { value: 'New Jersey', children: 'New Jersey' },\n { value: 'New Mexico', children: 'New Mexico' },\n { value: 'New York', children: 'New York' },\n { value: 'North Carolina', children: 'North Carolina' }\n];\n\nexport const SelectMultiTypeaheadCreatable: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [inputValue, setInputValue] = useState<string>('');\n const [selected, setSelected] = useState<string[]>([]);\n const [selectOptions, setSelectOptions] = useState<SelectOptionProps[]>(initialSelectOptions);\n const [focusedItemIndex, setFocusedItemIndex] = useState<number | null>(null);\n const [activeItemId, setActiveItemId] = useState<string | null>(null);\n const [onCreation, setOnCreation] = useState<boolean>(false); // Boolean to refresh filter state after new option is created\n const textInputRef = useRef<HTMLInputElement>(undefined);\n\n const CREATE_NEW = 'create';\n\n useEffect(() => {\n let newSelectOptions: SelectOptionProps[] = initialSelectOptions;\n\n // Filter menu items based on the text input value when one exists\n if (inputValue) {\n newSelectOptions = initialSelectOptions.filter((menuItem) =>\n String(menuItem.children).toLowerCase().includes(inputValue.toLowerCase())\n );\n\n // If no option matches the filter exactly, display creation option\n if (!initialSelectOptions.some((option) => option.value === inputValue)) {\n newSelectOptions = [...newSelectOptions, { children: `Create new option \"${inputValue}\"`, value: CREATE_NEW }];\n }\n\n // Open the menu when the input value changes and the new value is not empty\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n\n setSelectOptions(newSelectOptions);\n }, [inputValue, onCreation]);\n\n const createItemId = (value: any) => `select-multi-create-typeahead-${value.replace(' ', '-')}`;\n\n const setActiveAndFocusedItem = (itemIndex: number) => {\n setFocusedItemIndex(itemIndex);\n const focusedItem = selectOptions[itemIndex];\n setActiveItemId(createItemId(focusedItem.value));\n };\n\n const resetActiveAndFocusedItem = () => {\n setFocusedItemIndex(null);\n setActiveItemId(null);\n };\n\n const closeMenu = () => {\n setIsOpen(false);\n resetActiveAndFocusedItem();\n };\n\n const onInputClick = () => {\n if (!isOpen) {\n setIsOpen(true);\n } else if (!inputValue) {\n closeMenu();\n }\n };\n\n const onSelect = (value: string) => {\n if (value) {\n if (value === CREATE_NEW) {\n if (!initialSelectOptions.some((item) => item.value === inputValue)) {\n initialSelectOptions = [...initialSelectOptions, { value: inputValue, children: inputValue }];\n }\n setSelected(\n selected.includes(inputValue)\n ? selected.filter((selection) => selection !== inputValue)\n : [...selected, inputValue]\n );\n setOnCreation(!onCreation);\n resetActiveAndFocusedItem();\n } else {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n setSelected(\n selected.includes(value) ? selected.filter((selection) => selection !== value) : [...selected, value]\n );\n }\n }\n\n textInputRef.current?.focus();\n };\n\n const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {\n setInputValue(value);\n resetActiveAndFocusedItem();\n };\n\n const handleMenuArrowKeys = (key: string) => {\n let indexToFocus = 0;\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n if (selectOptions.every((option) => option.isDisabled)) {\n return;\n }\n\n if (key === 'ArrowUp') {\n // When no index is set or at the first index, focus to the last, otherwise decrement focus index\n if (focusedItemIndex === null || focusedItemIndex === 0) {\n indexToFocus = selectOptions.length - 1;\n } else {\n indexToFocus = focusedItemIndex - 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus--;\n if (indexToFocus === -1) {\n indexToFocus = selectOptions.length - 1;\n }\n }\n }\n\n if (key === 'ArrowDown') {\n // When no index is set or at the last index, focus to the first, otherwise increment focus index\n if (focusedItemIndex === null || focusedItemIndex === selectOptions.length - 1) {\n indexToFocus = 0;\n } else {\n indexToFocus = focusedItemIndex + 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus++;\n if (indexToFocus === selectOptions.length) {\n indexToFocus = 0;\n }\n }\n }\n\n setActiveAndFocusedItem(indexToFocus);\n };\n\n const onInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const focusedItem = focusedItemIndex !== null ? selectOptions[focusedItemIndex] : null;\n\n switch (event.key) {\n case 'Enter':\n if (isOpen && focusedItem && !focusedItem.isAriaDisabled) {\n onSelect(focusedItem.value as string);\n }\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n handleMenuArrowKeys(event.key);\n break;\n }\n };\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n textInputRef?.current?.focus();\n };\n\n const onClearButtonClick = () => {\n setSelected([]);\n setInputValue('');\n resetActiveAndFocusedItem();\n textInputRef?.current?.focus();\n };\n\n const getChildren = (value: string) => initialSelectOptions.find((option) => option.value === value)?.children;\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n variant=\"typeahead\"\n aria-label=\"Multi typeahead creatable menu toggle\"\n onClick={onToggleClick}\n innerRef={toggleRef}\n isExpanded={isOpen}\n isFullWidth\n >\n <TextInputGroup isPlain>\n <TextInputGroupMain\n value={inputValue}\n onClick={onInputClick}\n onChange={onTextInputChange}\n onKeyDown={onInputKeyDown}\n id=\"multi-create-typeahead-select-input\"\n autoComplete=\"off\"\n innerRef={textInputRef}\n placeholder=\"Select a state\"\n {...(activeItemId && { 'aria-activedescendant': activeItemId })}\n role=\"combobox\"\n isExpanded={isOpen}\n aria-controls=\"select-multi-create-typeahead-listbox\"\n >\n <LabelGroup aria-label=\"Current selections\">\n {selected.map((selection, index) => (\n <Label\n key={index}\n variant=\"outline\"\n onClose={(ev) => {\n ev.stopPropagation();\n onSelect(selection);\n }}\n >\n {getChildren(selection)}\n </Label>\n ))}\n </LabelGroup>\n </TextInputGroupMain>\n <TextInputGroupUtilities {...(selected.length === 0 ? { style: { display: 'none' } } : {})}>\n <Button variant=\"plain\" onClick={onClearButtonClick} aria-label=\"Clear input value\" icon={<TimesIcon />} />\n </TextInputGroupUtilities>\n </TextInputGroup>\n </MenuToggle>\n );\n\n return (\n <Select\n id=\"multi-create-typeahead-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={(_event, selection) => onSelect(selection as string)}\n onOpenChange={(isOpen) => {\n !isOpen && closeMenu();\n }}\n toggle={toggle}\n variant=\"typeahead\"\n >\n <SelectList isAriaMultiselectable id=\"select-multi-create-typeahead-listbox\">\n {selectOptions.map((option, index) => (\n <SelectOption\n key={option.value || option.children}\n isFocused={focusedItemIndex === index}\n className={option.className}\n id={createItemId(option.value)}\n {...option}\n ref={null}\n />\n ))}\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
113
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2703" data-pf-content="true" class="pf-v6-c-content--h3">Multiple typeahead with checkboxes</h3>
|
|
114
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2704" data-pf-content="true" class="pf-v6-c-content--p">By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.</p>
|
|
115
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2705" data-pf-content="true" class="pf-v6-c-content--p">By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.</p>
|
|
116
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2706" data-pf-content="true" class="pf-v6-c-content--p">By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.</p>
|
|
117
117
|
|
|
118
|
-
<astro-island uid="sYXnJ" component-url="/_astro/LiveExample.
|
|
119
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
120
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
121
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
118
|
+
<astro-island uid="sYXnJ" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useEffect, useRef, useState } from 'react';\nimport {\n Select,\n SelectOption,\n SelectList,\n SelectOptionProps,\n MenuToggle,\n MenuToggleElement,\n TextInputGroup,\n TextInputGroupMain,\n TextInputGroupUtilities,\n Button\n} from '@patternfly/react-core';\nimport TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';\n\nconst initialSelectOptions: SelectOptionProps[] = [\n { value: 'Alabama', children: 'Alabama' },\n { value: 'Florida', children: 'Florida' },\n { value: 'New Jersey', children: 'New Jersey' },\n { value: 'New Mexico', children: 'New Mexico' },\n { value: 'New York', children: 'New York' },\n { value: 'North Carolina', children: 'North Carolina' }\n];\n\nexport const SelectMultiTypeaheadCheckbox: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [inputValue, setInputValue] = useState<string>('');\n const [selected, setSelected] = useState<string[]>([]);\n const [selectOptions, setSelectOptions] = useState<SelectOptionProps[]>(initialSelectOptions);\n const [focusedItemIndex, setFocusedItemIndex] = useState<number | null>(null);\n const [activeItemId, setActiveItemId] = useState<string | null>(null);\n const [placeholder, setPlaceholder] = useState('0 items selected');\n const textInputRef = useRef<HTMLInputElement>(undefined);\n\n const NO_RESULTS = 'no results';\n\n useEffect(() => {\n let newSelectOptions: SelectOptionProps[] = initialSelectOptions;\n\n // Filter menu items based on the text input value when one exists\n if (inputValue) {\n newSelectOptions = initialSelectOptions.filter((menuItem) =>\n String(menuItem.children).toLowerCase().includes(inputValue.toLowerCase())\n );\n\n // When no options are found after filtering, display 'No results found'\n if (!newSelectOptions.length) {\n newSelectOptions = [\n {\n isAriaDisabled: true,\n children: `No results found for \"${inputValue}\"`,\n value: NO_RESULTS,\n hasCheckbox: false\n }\n ];\n }\n\n // Open the menu when the input value changes and the new value is not empty\n if (!isOpen) {\n setIsOpen(true);\n }\n }\n\n setSelectOptions(newSelectOptions);\n }, [inputValue]);\n\n useEffect(() => {\n setPlaceholder(`${selected.length} item${selected.length !== 1 ? 's' : ''} selected`);\n }, [selected]);\n\n const createItemId = (value: any) => `select-multi-typeahead-${value.replace(' ', '-')}`;\n\n const setActiveAndFocusedItem = (itemIndex: number) => {\n setFocusedItemIndex(itemIndex);\n const focusedItem = selectOptions[itemIndex];\n setActiveItemId(createItemId(focusedItem.value));\n };\n\n const resetActiveAndFocusedItem = () => {\n setFocusedItemIndex(null);\n setActiveItemId(null);\n };\n\n const closeMenu = () => {\n setIsOpen(false);\n resetActiveAndFocusedItem();\n };\n\n const onInputClick = () => {\n if (!isOpen) {\n setIsOpen(true);\n } else if (!inputValue) {\n closeMenu();\n }\n };\n\n const handleMenuArrowKeys = (key: string) => {\n let indexToFocus = 0;\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n if (selectOptions.every((option) => option.isDisabled)) {\n return;\n }\n\n if (key === 'ArrowUp') {\n // When no index is set or at the first index, focus to the last, otherwise decrement focus index\n if (focusedItemIndex === null || focusedItemIndex === 0) {\n indexToFocus = selectOptions.length - 1;\n } else {\n indexToFocus = focusedItemIndex - 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus--;\n if (indexToFocus === -1) {\n indexToFocus = selectOptions.length - 1;\n }\n }\n }\n\n if (key === 'ArrowDown') {\n // When no index is set or at the last index, focus to the first, otherwise increment focus index\n if (focusedItemIndex === null || focusedItemIndex === selectOptions.length - 1) {\n indexToFocus = 0;\n } else {\n indexToFocus = focusedItemIndex + 1;\n }\n\n // Skip disabled options\n while (selectOptions[indexToFocus].isDisabled) {\n indexToFocus++;\n if (indexToFocus === selectOptions.length) {\n indexToFocus = 0;\n }\n }\n }\n\n setActiveAndFocusedItem(indexToFocus);\n };\n\n const onInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const focusedItem = focusedItemIndex !== null ? selectOptions[focusedItemIndex] : null;\n\n switch (event.key) {\n case 'Enter':\n if (isOpen && focusedItem && focusedItem.value !== NO_RESULTS && !focusedItem.isAriaDisabled) {\n onSelect(focusedItem.value);\n }\n\n if (!isOpen) {\n setIsOpen(true);\n }\n\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n handleMenuArrowKeys(event.key);\n break;\n }\n };\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n textInputRef?.current?.focus();\n };\n\n const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {\n setInputValue(value);\n resetActiveAndFocusedItem();\n };\n\n const onSelect = (value: string) => {\n if (value && value !== NO_RESULTS) {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n setSelected(\n selected.includes(value) ? selected.filter((selection) => selection !== value) : [...selected, value]\n );\n }\n\n textInputRef.current?.focus();\n };\n\n const onClearButtonClick = () => {\n setSelected([]);\n setInputValue('');\n resetActiveAndFocusedItem();\n textInputRef?.current?.focus();\n };\n\n const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (\n <MenuToggle\n variant=\"typeahead\"\n aria-label=\"Multi typeahead checkbox menu toggle\"\n onClick={onToggleClick}\n innerRef={toggleRef}\n isExpanded={isOpen}\n isFullWidth\n >\n <TextInputGroup isPlain>\n <TextInputGroupMain\n value={inputValue}\n onClick={onInputClick}\n onChange={onTextInputChange}\n onKeyDown={onInputKeyDown}\n id=\"multi-typeahead-select-checkbox-input\"\n autoComplete=\"off\"\n innerRef={textInputRef}\n placeholder={placeholder}\n {...(activeItemId && { 'aria-activedescendant': activeItemId })}\n role=\"combobox\"\n isExpanded={isOpen}\n aria-controls=\"select-multi-typeahead-checkbox-listbox\"\n />\n <TextInputGroupUtilities {...(selected.length === 0 ? { style: { display: 'none' } } : {})}>\n <Button variant=\"plain\" onClick={onClearButtonClick} aria-label=\"Clear input value\" icon={<TimesIcon />} />\n </TextInputGroupUtilities>\n </TextInputGroup>\n </MenuToggle>\n );\n\n return (\n <Select\n role=\"menu\"\n id=\"multi-typeahead-checkbox-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={(_event, selection) => onSelect(selection as string)}\n onOpenChange={(isOpen) => {\n !isOpen && closeMenu();\n }}\n toggle={toggle}\n variant=\"typeahead\"\n >\n <SelectList isAriaMultiselectable id=\"select-multi-typeahead-checkbox-listbox\">\n {selectOptions.map((option, index) => (\n <SelectOption\n {...(!option.isDisabled && !option.isAriaDisabled && { hasCheckbox: true })}\n isSelected={selected.includes(option.value)}\n key={option.value || option.children}\n isFocused={focusedItemIndex === index}\n className={option.className}\n id={createItemId(option.value)}\n {...option}\n ref={null}\n />\n ))}\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
119
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2707" data-pf-content="true" class="pf-v6-c-content--h3">With view more</h3>
|
|
120
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2708" data-pf-content="true" class="pf-v6-c-content--p">To reduce the processing load for long select lists, you can add a “View more” action to load additional items.</p>
|
|
121
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2709" data-pf-content="true" class="pf-v6-c-content--p">The following example shows 3 items before the “View more” link, but you can adjust the number of visible items for your use case.</p>
|
|
122
122
|
|
|
123
|
-
<astro-island uid="1kNh5f" component-url="/_astro/LiveExample.
|
|
124
|
-
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
125
|
-
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-
|
|
123
|
+
<astro-island uid="1kNh5f" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useEffect, useRef, useState } from 'react';\nimport { Select, SelectOption, SelectList, MenuToggle, Spinner } from '@patternfly/react-core';\n\nexport const SelectViewMore: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState(false);\n const [selected, setSelected] = useState<string>('Select a value');\n const [activeItem, setActiveItem] = useState<number | string>(0);\n const [isLoading, setIsLoading] = useState(false);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [selectOptions, setSelectOptions] = useState([\n <SelectOption key={0} value=\"Option 1\">\n Option 1\n </SelectOption>,\n <SelectOption key={1} value=\"Option 2\">\n Option 2\n </SelectOption>,\n <SelectOption key={2} value=\"Option 3\">\n Option 3\n </SelectOption>,\n <SelectOption key={3} value=\"Option 4\">\n Option 4\n </SelectOption>,\n <SelectOption key={4} value=\"Option 5\">\n Option 5\n </SelectOption>,\n <SelectOption key={5} value=\"Option 6\">\n Option 6\n </SelectOption>,\n <SelectOption key={6} value=\"Option 7\">\n Option 7\n </SelectOption>,\n <SelectOption key={7} value=\"Option 8\">\n Option 8\n </SelectOption>,\n <SelectOption key={8} value=\"Option 9\">\n Option 9\n </SelectOption>,\n <SelectOption key={9} value=\"Final Option 10\">\n Final Option 10\n </SelectOption>\n ]);\n const [numOptions, setNumOptions] = useState(3);\n const [visibleOptions, setVisibleOptions] = useState(selectOptions.slice(0, numOptions));\n const activeItemRef = useRef<HTMLElement>(null);\n const viewMoreRef = useRef<HTMLLIElement>(null);\n const toggleRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n activeItemRef.current?.focus();\n }, [visibleOptions]);\n\n const simulateNetworkCall = (networkCallback: () => void) => {\n setTimeout(networkCallback, 2000);\n };\n\n const getNextValidItem = (startingIndex: number, maxLength: number) => {\n let validItem;\n for (let i = startingIndex; i < maxLength; i++) {\n if (selectOptions[i].props.isDisabled) {\n continue;\n } else {\n validItem = selectOptions[i];\n break;\n }\n }\n return validItem;\n };\n\n const loadMoreOptions = () => {\n const newLength = numOptions + 3 <= selectOptions.length ? numOptions + 3 : selectOptions.length;\n const prevPosition = numOptions;\n const nextValidItem = getNextValidItem(prevPosition, newLength);\n\n setNumOptions(newLength);\n setIsLoading(false);\n setActiveItem(nextValidItem.props.value);\n setVisibleOptions(selectOptions.slice(0, newLength));\n };\n\n const onViewMoreClick = () => {\n setIsLoading(true);\n simulateNetworkCall(() => {\n loadMoreOptions();\n });\n };\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n };\n\n const onSelect = (_event: React.MouseEvent<Element, MouseEvent> | undefined, value: string | number | undefined) => {\n // eslint-disable-next-line no-console\n console.log('selected', value);\n\n if (value !== 'loader') {\n setSelected(value as string);\n setIsOpen(false);\n toggleRef?.current?.focus(); // Only focus the toggle when a non-loader option is selected\n }\n };\n\n const toggle = (\n <MenuToggle\n ref={toggleRef}\n onClick={onToggleClick}\n isExpanded={isOpen}\n style={\n {\n width: '200px'\n } as React.CSSProperties\n }\n >\n {selected}\n </MenuToggle>\n );\n\n return (\n <Select\n id=\"single-view-more-select\"\n isOpen={isOpen}\n selected={selected}\n onSelect={onSelect}\n onOpenChange={(isOpen) => setIsOpen(isOpen)}\n toggle={{ toggleNode: toggle, toggleRef }}\n >\n <SelectList>\n {visibleOptions.map((option) => {\n const props = option.props;\n\n return <SelectOption key={option.key} ref={props.value === activeItem ? activeItemRef : null} {...props} />;\n })}\n {numOptions !== selectOptions.length && (\n <SelectOption\n {...(!isLoading && { isLoadButton: true })}\n {...(isLoading && { isLoading: true })}\n onClick={onViewMoreClick}\n value=\"loader\"\n ref={viewMoreRef}\n >\n {isLoading ? <Spinner size=\"lg\" /> : 'View more'}\n </SelectOption>\n )}\n </SelectList>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island>
|
|
124
|
+
<h3 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2710" data-pf-content="true" class="pf-v6-c-content--h3">With a footer</h3>
|
|
125
|
+
<p data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2725" data-pf-content="true" class="pf-v6-c-content--p">You can add a <code><MenuFooter></code> component to a select menu to hold additional actions that users can take on menu items, through elements such as link buttons. A footer will be placed beneath a divider at the end of the select menu.</p>
|
|
126
126
|
|
|
127
|
-
<astro-island uid="Z1HVlnl" component-url="/_astro/LiveExample.
|
|
127
|
+
<astro-island uid="Z1HVlnl" component-url="/_astro/LiveExample.C43dqXje.js" component-export="LiveExample" renderer-url="/_astro/client.DN8ES6L5.js" props="{"src":[0,"import { useState } from 'react';\nimport { MenuToggle, MenuFooter, Select, SelectList, SelectOption, Button } from '@patternfly/react-core';\n\nexport const SelectFooter: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [selected, setSelected] = useState<string>('Select a value');\n\n const onToggleClick = () => {\n setIsOpen(!isOpen);\n };\n\n const toggle = (toggleRef) => (\n <MenuToggle\n ref={toggleRef}\n onClick={onToggleClick}\n isExpanded={isOpen}\n style={\n {\n width: '200px'\n } as React.CSSProperties\n }\n >\n {selected}\n </MenuToggle>\n );\n\n function onSelect(event: React.MouseEvent | undefined, value: string | number | undefined) {\n if (typeof value === 'undefined') {\n return;\n }\n\n setSelected(value.toString());\n }\n\n return (\n <Select\n isOpen={isOpen}\n onOpenChange={(isOpen) => setIsOpen(isOpen)}\n onOpenChangeKeys={['Escape']}\n toggle={toggle}\n id=\"menu-with-footer\"\n onSelect={onSelect}\n selected={selected}\n >\n <SelectList>\n <SelectOption value=\"Option 1\">Option 1</SelectOption>\n <SelectOption value=\"Option 2\">Option 2</SelectOption>\n <SelectOption value=\"Option 3\">Option 3</SelectOption>\n </SelectList>\n <MenuFooter>\n <Button variant=\"link\" isInline>\n Footer action\n </Button>\n </MenuFooter>\n </Select>\n );\n};\n"],"html":[0]}" ssr client="only" opts="{"name":"LiveExampleBase","value":"react"}"></astro-island> <div class="pf-v6-l-stack pf-m-gutter"><div class="pf-v6-l-stack__item pf-v6-u-mt-md"><astro-island uid="ZTSaXP" component-url="/_astro/PropsTables.YkW1puJk.js" component-export="PropsTables" renderer-url="/_astro/client.DN8ES6L5.js" props="{"propComponents":[1,[[0,"Select"],[0,"SelectOption"],[0,"SelectGroup"],[0,"SelectList"],[0,"MenuToggle"],[0,"SelectToggleProps"],[0,"SelectPopperProps"]]],"url":[7,"http://localhost:4321/components/select/react"]}" ssr client="only" opts="{"name":"PropsTables","value":"react"}"></astro-island></div><div class="pf-v6-l-stack__item"><div class="pf-v6-l-stack pf-m-gutter"><div class="pf-v6-l-stack__item"><div class="pf-v6-l-flex pf-m-space-items-sm pf-m-align-items-center"><div class=""><h2 data-ouia-component-type="PF6/Content" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-Content-2667" id="css-variables" tabindex="-1" data-pf-content="true" class="pf-v6-c-content--h2 pf-m-editorial ws-heading pf-v6-c-content--h2"><a href="#css-variables" class="ws-heading-anchor" tabindex="-1"><svg class="pf-v6-svg ws-heading-anchor-icon" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true" role="img" width="1em" height="1em" style="vertical-align:middle"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"></path></svg></a>
|
|
128
128
|
CSS variables
|
|
129
129
|
</h2></div></div></div><div class="pf-v6-l-stack__item"><astro-island uid="eehAe" component-url="/_astro/CSSTable.-Emc9iTg.js" component-export="CSSTable" renderer-url="/_astro/client.DN8ES6L5.js" props="{"autoLinkHeader":[0,false],"cssPrefix":[0,"pf-v6-c-select"]}" ssr client="only" opts="{"name":"CSSTableComponent","value":"react"}"></astro-island></div></div></div></div> </div></section> </div></section> </main> </div> </div> <script type="module">try{localStorage.getItem("theme-preference")==="dark"&&document.documentElement.classList.add("pf-v6-theme-dark")}catch(e){console.error("Failed to set initial theme:",e)}</script></body></html>
|