@atlaskit/side-nav-items 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/LICENSE.md +11 -0
- package/README.md +5 -0
- package/button-menu-item/package.json +17 -0
- package/container-avatar/package.json +17 -0
- package/dist/cjs/entry-points/button-menu-item.js +19 -0
- package/dist/cjs/entry-points/container-avatar.js +12 -0
- package/dist/cjs/entry-points/drag-and-drop/drag-handle.js +12 -0
- package/dist/cjs/entry-points/drag-and-drop/drag-preview.js +12 -0
- package/dist/cjs/entry-points/drag-and-drop/drop-indicator.js +12 -0
- package/dist/cjs/entry-points/drag-and-drop/group-drop-indicator.js +12 -0
- package/dist/cjs/entry-points/drag-and-drop/hitbox.js +18 -0
- package/dist/cjs/entry-points/drag-and-drop/use-menu-item-drag-and-drop.js +12 -0
- package/dist/cjs/entry-points/expandable-menu-item.js +33 -0
- package/dist/cjs/entry-points/flyout-menu-item.js +54 -0
- package/dist/cjs/entry-points/link-menu-item.js +19 -0
- package/dist/cjs/entry-points/menu-list-item.js +12 -0
- package/dist/cjs/entry-points/menu-list.js +12 -0
- package/dist/cjs/entry-points/menu-section.js +26 -0
- package/dist/cjs/entry-points/top-level-spacer.js +12 -0
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/ui/menu-item/button-menu-item.js +66 -0
- package/dist/cjs/ui/menu-item/constants.js +21 -0
- package/dist/cjs/ui/menu-item/container-avatar.compiled.css +4 -0
- package/dist/cjs/ui/menu-item/container-avatar.js +34 -0
- package/dist/cjs/ui/menu-item/drag-and-drop/drag-preview.compiled.css +9 -0
- package/dist/cjs/ui/menu-item/drag-and-drop/drag-preview.js +65 -0
- package/dist/cjs/ui/menu-item/drag-and-drop/drop-indicator.js +12 -0
- package/dist/cjs/ui/menu-item/drag-and-drop/group-drop-indicator.js +12 -0
- package/dist/cjs/ui/menu-item/drag-and-drop/hitbox.js +18 -0
- package/dist/cjs/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.js +202 -0
- package/dist/cjs/ui/menu-item/drag-handle/drag-handle.compiled.css +9 -0
- package/dist/cjs/ui/menu-item/drag-handle/drag-handle.js +28 -0
- package/dist/cjs/ui/menu-item/drag-handle/lazy-drag-handle.js +20 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-content.compiled.css +2 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-content.js +50 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-context.js +64 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.js +14 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.compiled.css +14 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +150 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item.compiled.css +1 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item.js +69 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/close-button.js +33 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-body.compiled.css +11 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-body.js +38 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-footer.compiled.css +5 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-footer.js +29 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-header.compiled.css +11 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-header.js +54 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-content.compiled.css +8 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +223 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-context.js +58 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.compiled.css +2 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.js +68 -0
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item.js +76 -0
- package/dist/cjs/ui/menu-item/link-menu-item.compiled.css +1 -0
- package/dist/cjs/ui/menu-item/link-menu-item.js +81 -0
- package/dist/cjs/ui/menu-item/list-item.js +30 -0
- package/dist/cjs/ui/menu-item/list.js +40 -0
- package/dist/cjs/ui/menu-item/menu-item-signals.js +11 -0
- package/dist/cjs/ui/menu-item/menu-item.compiled.css +101 -0
- package/dist/cjs/ui/menu-item/menu-item.js +394 -0
- package/dist/cjs/ui/menu-item/menu-list-item.js +18 -0
- package/dist/cjs/ui/menu-item/menu-list.js +14 -0
- package/dist/cjs/ui/menu-item/top-level-spacer.compiled.css +1 -0
- package/dist/cjs/ui/menu-item/top-level-spacer.js +46 -0
- package/dist/cjs/ui/menu-item/types.js +5 -0
- package/dist/cjs/ui/menu-item/use-scroll-menu-item-into-view.js +70 -0
- package/dist/cjs/ui/menu-section/divider.compiled.css +4 -0
- package/dist/cjs/ui/menu-section/divider.js +32 -0
- package/dist/cjs/ui/menu-section/menu-section-context.js +19 -0
- package/dist/cjs/ui/menu-section/menu-section-heading.compiled.css +4 -0
- package/dist/cjs/ui/menu-section/menu-section-heading.js +30 -0
- package/dist/cjs/ui/menu-section/menu-section.js +49 -0
- package/dist/es2019/entry-points/button-menu-item.js +2 -0
- package/dist/es2019/entry-points/container-avatar.js +1 -0
- package/dist/es2019/entry-points/drag-and-drop/drag-handle.js +1 -0
- package/dist/es2019/entry-points/drag-and-drop/drag-preview.js +1 -0
- package/dist/es2019/entry-points/drag-and-drop/drop-indicator.js +1 -0
- package/dist/es2019/entry-points/drag-and-drop/group-drop-indicator.js +1 -0
- package/dist/es2019/entry-points/drag-and-drop/hitbox.js +1 -0
- package/dist/es2019/entry-points/drag-and-drop/use-menu-item-drag-and-drop.js +1 -0
- package/dist/es2019/entry-points/expandable-menu-item.js +4 -0
- package/dist/es2019/entry-points/flyout-menu-item.js +7 -0
- package/dist/es2019/entry-points/link-menu-item.js +2 -0
- package/dist/es2019/entry-points/menu-list-item.js +1 -0
- package/dist/es2019/entry-points/menu-list.js +1 -0
- package/dist/es2019/entry-points/menu-section.js +3 -0
- package/dist/es2019/entry-points/top-level-spacer.js +1 -0
- package/dist/es2019/index.js +3 -0
- package/dist/es2019/ui/menu-item/button-menu-item.js +59 -0
- package/dist/es2019/ui/menu-item/constants.js +15 -0
- package/dist/es2019/ui/menu-item/container-avatar.compiled.css +4 -0
- package/dist/es2019/ui/menu-item/container-avatar.js +25 -0
- package/dist/es2019/ui/menu-item/drag-and-drop/drag-preview.compiled.css +9 -0
- package/dist/es2019/ui/menu-item/drag-and-drop/drag-preview.js +60 -0
- package/dist/es2019/ui/menu-item/drag-and-drop/drop-indicator.js +7 -0
- package/dist/es2019/ui/menu-item/drag-and-drop/group-drop-indicator.js +7 -0
- package/dist/es2019/ui/menu-item/drag-and-drop/hitbox.js +7 -0
- package/dist/es2019/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.js +192 -0
- package/dist/es2019/ui/menu-item/drag-handle/drag-handle.compiled.css +9 -0
- package/dist/es2019/ui/menu-item/drag-handle/drag-handle.js +19 -0
- package/dist/es2019/ui/menu-item/drag-handle/lazy-drag-handle.js +9 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-content.compiled.css +2 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-content.js +43 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-context.js +53 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.js +9 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.compiled.css +14 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +141 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item.compiled.css +1 -0
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item.js +54 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/close-button.js +25 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-body.compiled.css +11 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-body.js +33 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-footer.compiled.css +5 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-footer.js +24 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-header.compiled.css +11 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-header.js +47 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-content.compiled.css +8 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +211 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-context.js +45 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.compiled.css +2 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.js +57 -0
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item.js +61 -0
- package/dist/es2019/ui/menu-item/link-menu-item.compiled.css +1 -0
- package/dist/es2019/ui/menu-item/link-menu-item.js +73 -0
- package/dist/es2019/ui/menu-item/list-item.js +23 -0
- package/dist/es2019/ui/menu-item/list.js +33 -0
- package/dist/es2019/ui/menu-item/menu-item-signals.js +5 -0
- package/dist/es2019/ui/menu-item/menu-item.compiled.css +101 -0
- package/dist/es2019/ui/menu-item/menu-item.js +383 -0
- package/dist/es2019/ui/menu-item/menu-list-item.js +12 -0
- package/dist/es2019/ui/menu-item/menu-list.js +9 -0
- package/dist/es2019/ui/menu-item/top-level-spacer.compiled.css +1 -0
- package/dist/es2019/ui/menu-item/top-level-spacer.js +38 -0
- package/dist/es2019/ui/menu-item/types.js +1 -0
- package/dist/es2019/ui/menu-item/use-scroll-menu-item-into-view.js +64 -0
- package/dist/es2019/ui/menu-section/divider.compiled.css +4 -0
- package/dist/es2019/ui/menu-section/divider.js +22 -0
- package/dist/es2019/ui/menu-section/menu-section-context.js +13 -0
- package/dist/es2019/ui/menu-section/menu-section-heading.compiled.css +4 -0
- package/dist/es2019/ui/menu-section/menu-section-heading.js +23 -0
- package/dist/es2019/ui/menu-section/menu-section.js +42 -0
- package/dist/esm/entry-points/button-menu-item.js +2 -0
- package/dist/esm/entry-points/container-avatar.js +1 -0
- package/dist/esm/entry-points/drag-and-drop/drag-handle.js +1 -0
- package/dist/esm/entry-points/drag-and-drop/drag-preview.js +1 -0
- package/dist/esm/entry-points/drag-and-drop/drop-indicator.js +1 -0
- package/dist/esm/entry-points/drag-and-drop/group-drop-indicator.js +1 -0
- package/dist/esm/entry-points/drag-and-drop/hitbox.js +1 -0
- package/dist/esm/entry-points/drag-and-drop/use-menu-item-drag-and-drop.js +1 -0
- package/dist/esm/entry-points/expandable-menu-item.js +4 -0
- package/dist/esm/entry-points/flyout-menu-item.js +7 -0
- package/dist/esm/entry-points/link-menu-item.js +2 -0
- package/dist/esm/entry-points/menu-list-item.js +1 -0
- package/dist/esm/entry-points/menu-list.js +1 -0
- package/dist/esm/entry-points/menu-section.js +3 -0
- package/dist/esm/entry-points/top-level-spacer.js +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/ui/menu-item/button-menu-item.js +58 -0
- package/dist/esm/ui/menu-item/constants.js +15 -0
- package/dist/esm/ui/menu-item/container-avatar.compiled.css +4 -0
- package/dist/esm/ui/menu-item/container-avatar.js +26 -0
- package/dist/esm/ui/menu-item/drag-and-drop/drag-preview.compiled.css +9 -0
- package/dist/esm/ui/menu-item/drag-and-drop/drag-preview.js +58 -0
- package/dist/esm/ui/menu-item/drag-and-drop/drop-indicator.js +7 -0
- package/dist/esm/ui/menu-item/drag-and-drop/group-drop-indicator.js +7 -0
- package/dist/esm/ui/menu-item/drag-and-drop/hitbox.js +7 -0
- package/dist/esm/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.js +193 -0
- package/dist/esm/ui/menu-item/drag-handle/drag-handle.compiled.css +9 -0
- package/dist/esm/ui/menu-item/drag-handle/drag-handle.js +19 -0
- package/dist/esm/ui/menu-item/drag-handle/lazy-drag-handle.js +11 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-content.compiled.css +2 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-content.js +42 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-context.js +57 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.js +9 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.compiled.css +14 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +141 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item.compiled.css +1 -0
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item.js +60 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/close-button.js +26 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-body.compiled.css +11 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-body.js +31 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-footer.compiled.css +5 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-footer.js +22 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-header.compiled.css +11 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-header.js +45 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-content.compiled.css +8 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +214 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-context.js +51 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.compiled.css +2 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.js +59 -0
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item.js +67 -0
- package/dist/esm/ui/menu-item/link-menu-item.compiled.css +1 -0
- package/dist/esm/ui/menu-item/link-menu-item.js +72 -0
- package/dist/esm/ui/menu-item/list-item.js +22 -0
- package/dist/esm/ui/menu-item/list.js +32 -0
- package/dist/esm/ui/menu-item/menu-item-signals.js +5 -0
- package/dist/esm/ui/menu-item/menu-item.compiled.css +101 -0
- package/dist/esm/ui/menu-item/menu-item.js +385 -0
- package/dist/esm/ui/menu-item/menu-list-item.js +12 -0
- package/dist/esm/ui/menu-item/menu-list.js +9 -0
- package/dist/esm/ui/menu-item/top-level-spacer.compiled.css +1 -0
- package/dist/esm/ui/menu-item/top-level-spacer.js +38 -0
- package/dist/esm/ui/menu-item/types.js +1 -0
- package/dist/esm/ui/menu-item/use-scroll-menu-item-into-view.js +63 -0
- package/dist/esm/ui/menu-section/divider.compiled.css +4 -0
- package/dist/esm/ui/menu-section/divider.js +24 -0
- package/dist/esm/ui/menu-section/menu-section-context.js +13 -0
- package/dist/esm/ui/menu-section/menu-section-heading.compiled.css +4 -0
- package/dist/esm/ui/menu-section/menu-section-heading.js +22 -0
- package/dist/esm/ui/menu-section/menu-section.js +42 -0
- package/dist/types/entry-points/button-menu-item.d.ts +3 -0
- package/dist/types/entry-points/container-avatar.d.ts +1 -0
- package/dist/types/entry-points/drag-and-drop/drag-handle.d.ts +1 -0
- package/dist/types/entry-points/drag-and-drop/drag-preview.d.ts +1 -0
- package/dist/types/entry-points/drag-and-drop/drop-indicator.d.ts +1 -0
- package/dist/types/entry-points/drag-and-drop/group-drop-indicator.d.ts +1 -0
- package/dist/types/entry-points/drag-and-drop/hitbox.d.ts +1 -0
- package/dist/types/entry-points/drag-and-drop/use-menu-item-drag-and-drop.d.ts +1 -0
- package/dist/types/entry-points/expandable-menu-item.d.ts +4 -0
- package/dist/types/entry-points/flyout-menu-item.d.ts +7 -0
- package/dist/types/entry-points/link-menu-item.d.ts +3 -0
- package/dist/types/entry-points/menu-list-item.d.ts +1 -0
- package/dist/types/entry-points/menu-list.d.ts +1 -0
- package/dist/types/entry-points/menu-section.d.ts +3 -0
- package/dist/types/entry-points/top-level-spacer.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ui/menu-item/button-menu-item.d.ts +42 -0
- package/dist/types/ui/menu-item/constants.d.ts +15 -0
- package/dist/types/ui/menu-item/container-avatar.d.ts +18 -0
- package/dist/types/ui/menu-item/drag-and-drop/drag-preview.d.ts +24 -0
- package/dist/types/ui/menu-item/drag-and-drop/drop-indicator.d.ts +6 -0
- package/dist/types/ui/menu-item/drag-and-drop/group-drop-indicator.d.ts +6 -0
- package/dist/types/ui/menu-item/drag-and-drop/hitbox.d.ts +6 -0
- package/dist/types/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.d.ts +62 -0
- package/dist/types/ui/menu-item/drag-handle/drag-handle.d.ts +6 -0
- package/dist/types/ui/menu-item/drag-handle/lazy-drag-handle.d.ts +4 -0
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-content.d.ts +17 -0
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +36 -0
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +4 -0
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +65 -0
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item.d.ts +65 -0
- package/dist/types/ui/menu-item/flyout-menu-item/close-button.d.ts +34 -0
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-body.d.ts +38 -0
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-footer.d.ts +25 -0
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-header.d.ts +35 -0
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-content.d.ts +39 -0
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +38 -0
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +46 -0
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item.d.ts +52 -0
- package/dist/types/ui/menu-item/link-menu-item.d.ts +22 -0
- package/dist/types/ui/menu-item/list-item.d.ts +27 -0
- package/dist/types/ui/menu-item/list.d.ts +28 -0
- package/dist/types/ui/menu-item/menu-item-signals.d.ts +6 -0
- package/dist/types/ui/menu-item/menu-item.d.ts +51 -0
- package/dist/types/ui/menu-item/menu-list-item.d.ts +11 -0
- package/dist/types/ui/menu-item/menu-list.d.ts +8 -0
- package/dist/types/ui/menu-item/top-level-spacer.d.ts +20 -0
- package/dist/types/ui/menu-item/types.d.ts +164 -0
- package/dist/types/ui/menu-item/use-scroll-menu-item-into-view.d.ts +12 -0
- package/dist/types/ui/menu-section/divider.d.ts +6 -0
- package/dist/types/ui/menu-section/menu-section-context.d.ts +6 -0
- package/dist/types/ui/menu-section/menu-section-heading.d.ts +16 -0
- package/dist/types/ui/menu-section/menu-section.d.ts +41 -0
- package/dist/types-ts4.5/entry-points/button-menu-item.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/container-avatar.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/drag-and-drop/drag-handle.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/drag-and-drop/drag-preview.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/drag-and-drop/drop-indicator.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/drag-and-drop/group-drop-indicator.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/drag-and-drop/hitbox.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/drag-and-drop/use-menu-item-drag-and-drop.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/expandable-menu-item.d.ts +4 -0
- package/dist/types-ts4.5/entry-points/flyout-menu-item.d.ts +7 -0
- package/dist/types-ts4.5/entry-points/link-menu-item.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/menu-list-item.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/menu-list.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/menu-section.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/top-level-spacer.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/menu-item/button-menu-item.d.ts +42 -0
- package/dist/types-ts4.5/ui/menu-item/constants.d.ts +15 -0
- package/dist/types-ts4.5/ui/menu-item/container-avatar.d.ts +18 -0
- package/dist/types-ts4.5/ui/menu-item/drag-and-drop/drag-preview.d.ts +24 -0
- package/dist/types-ts4.5/ui/menu-item/drag-and-drop/drop-indicator.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-item/drag-and-drop/group-drop-indicator.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-item/drag-and-drop/hitbox.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.d.ts +62 -0
- package/dist/types-ts4.5/ui/menu-item/drag-handle/drag-handle.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-item/drag-handle/lazy-drag-handle.d.ts +4 -0
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-content.d.ts +17 -0
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +36 -0
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +4 -0
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +65 -0
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item.d.ts +65 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/close-button.d.ts +34 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-body.d.ts +38 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-footer.d.ts +25 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-header.d.ts +35 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-content.d.ts +39 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +38 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +46 -0
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item.d.ts +52 -0
- package/dist/types-ts4.5/ui/menu-item/link-menu-item.d.ts +22 -0
- package/dist/types-ts4.5/ui/menu-item/list-item.d.ts +27 -0
- package/dist/types-ts4.5/ui/menu-item/list.d.ts +28 -0
- package/dist/types-ts4.5/ui/menu-item/menu-item-signals.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-item/menu-item.d.ts +51 -0
- package/dist/types-ts4.5/ui/menu-item/menu-list-item.d.ts +11 -0
- package/dist/types-ts4.5/ui/menu-item/menu-list.d.ts +8 -0
- package/dist/types-ts4.5/ui/menu-item/top-level-spacer.d.ts +20 -0
- package/dist/types-ts4.5/ui/menu-item/types.d.ts +164 -0
- package/dist/types-ts4.5/ui/menu-item/use-scroll-menu-item-into-view.d.ts +12 -0
- package/dist/types-ts4.5/ui/menu-section/divider.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-section/menu-section-context.d.ts +6 -0
- package/dist/types-ts4.5/ui/menu-section/menu-section-heading.d.ts +16 -0
- package/dist/types-ts4.5/ui/menu-section/menu-section.d.ts +41 -0
- package/drag-and-drop/drag-handle/package.json +17 -0
- package/drag-and-drop/drag-preview/package.json +17 -0
- package/drag-and-drop/drop-indicator/package.json +17 -0
- package/drag-and-drop/group-drop-indicator/package.json +17 -0
- package/drag-and-drop/hitbox/package.json +17 -0
- package/drag-and-drop/use-menu-item-drag-and-drop/package.json +17 -0
- package/expandable-menu-item/package.json +17 -0
- package/flyout-menu-item/package.json +17 -0
- package/link-menu-item/package.json +17 -0
- package/menu-list/package.json +17 -0
- package/menu-list-item/package.json +17 -0
- package/menu-section/package.json +17 -0
- package/package.json +121 -0
- package/top-level-spacer/package.json +17 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ExpandableMenuItem, type ExpandableMenuItemProps, } from '../ui/menu-item/expandable-menu-item/expandable-menu-item';
|
|
2
|
+
export { ExpandableMenuItemTrigger, type ExpandableMenuItemTriggerProps, } from '../ui/menu-item/expandable-menu-item/expandable-menu-item-trigger';
|
|
3
|
+
export { ExpandableMenuItemContent, type ExpandableMenuItemContentProps, } from '../ui/menu-item/expandable-menu-item/expandable-menu-item-content';
|
|
4
|
+
export { useIsExpanded } from '../ui/menu-item/expandable-menu-item/expandable-menu-item-context';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { FlyoutMenuItem, type FlyoutMenuItemProps, } from '../ui/menu-item/flyout-menu-item/flyout-menu-item';
|
|
2
|
+
export { FlyoutBody, type FlyoutBodyProps } from '../ui/menu-item/flyout-menu-item/flyout-body';
|
|
3
|
+
export { FlyoutMenuItemContent, type FlyoutMenuItemContentProps, } from '../ui/menu-item/flyout-menu-item/flyout-menu-item-content';
|
|
4
|
+
export { FlyoutFooter, type FlyoutFooterProps, } from '../ui/menu-item/flyout-menu-item/flyout-footer';
|
|
5
|
+
export { FlyoutHeader, type FlyoutHeaderProps, } from '../ui/menu-item/flyout-menu-item/flyout-header';
|
|
6
|
+
export { COLLAPSE_ELEM_BEFORE } from '../ui/menu-item/menu-item-signals';
|
|
7
|
+
export { FlyoutMenuItemTrigger, type FlyoutMenuItemTriggerProps, } from '../ui/menu-item/flyout-menu-item/flyout-menu-item-trigger';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MenuListItem } from '../ui/menu-item/menu-list-item';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MenuList } from '../ui/menu-item/menu-list';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TopLevelSpacer } from '../ui/menu-item/top-level-spacer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MenuItemLinkOrButtonCommonProps, MenuItemOnClick } from './types';
|
|
3
|
+
export type ButtonMenuItemProps = MenuItemLinkOrButtonCommonProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Identifies the popup element that this element controls when it is used as a popup trigger.
|
|
6
|
+
* Should match the `id` of the popup content for screen readers to understand the relationship.
|
|
7
|
+
*/
|
|
8
|
+
'aria-controls'?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Announces to assistive technology whether the popup is currently open or closed,
|
|
11
|
+
* when this element is used as a popup trigger.
|
|
12
|
+
*/
|
|
13
|
+
'aria-expanded'?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Informs assistive technology that this element triggers a popup.
|
|
16
|
+
*/
|
|
17
|
+
'aria-haspopup'?: boolean | 'dialog';
|
|
18
|
+
/**
|
|
19
|
+
* We are not using a discriminated union to enforce that the `actions` and `actionsOnHover`
|
|
20
|
+
* props are not used when `isDisabled` is true due to ergonomic type issues with `boolean`
|
|
21
|
+
* types (as oppposed to literal `true` or `false` types), e.g. if a conditional boolean
|
|
22
|
+
* variable is passed to `isDisabled`.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Whether the menu item is disabled.
|
|
26
|
+
*
|
|
27
|
+
* When disabled, content in the `actions` and `actionsOnHover` props will not be rendered.
|
|
28
|
+
*
|
|
29
|
+
* The menu item will not be interactive and will not respond to hover or focus.
|
|
30
|
+
*/
|
|
31
|
+
isDisabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Called when the user has clicked on the trigger content.
|
|
34
|
+
*/
|
|
35
|
+
onClick?: MenuItemOnClick<HTMLButtonElement>;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* __ButtonMenuItem__
|
|
39
|
+
*
|
|
40
|
+
* A menu item button. It should be used within a `ul`, as it renders a list item.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ButtonMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonMenuItemProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* _Internally_ shared value for the menu item indentation. Used in:
|
|
3
|
+
* - Expandable menu item content, to add padding for each expandable level
|
|
4
|
+
* - The base menu item, to set the negative inset to extend the clickable area of nested menu items
|
|
5
|
+
* to the root level menu items.
|
|
6
|
+
*
|
|
7
|
+
* Internal to the package only. Should not be exported from the package.
|
|
8
|
+
*
|
|
9
|
+
* Note: We're unable to use a token() call here, as Compiled complains about function calls in imported
|
|
10
|
+
* values - it requires statically defined values only.
|
|
11
|
+
*
|
|
12
|
+
* @private
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare const expandableMenuItemIndentation = "12px";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type ContainerAvatarProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The source of the avatar image.
|
|
4
|
+
*/
|
|
5
|
+
src: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* __Container avatar__
|
|
9
|
+
*
|
|
10
|
+
* This component has been introduced specifically for the Nav4 sidebar because the existing Avatar component
|
|
11
|
+
* did not offer the correct sizes to align with the designs. It was necessary to create a new component rather than
|
|
12
|
+
* using the ADS image component because that did not allow the ability to set the border and radius and the desired
|
|
13
|
+
* presentation was not achievable through nesting within another styled component. At some point this component maybe
|
|
14
|
+
* removed if the Avatar component is updated to allow for the desired presentation.
|
|
15
|
+
*
|
|
16
|
+
* A container avatar to be used in sidebar navigation items.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ContainerAvatar: ({ src }: ContainerAvatarProps) => JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxFrag
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
/**
|
|
8
|
+
* A drag preview for sidebar menu items.
|
|
9
|
+
*
|
|
10
|
+
* The limited API corresponds with the limited amount of information we
|
|
11
|
+
* want to show in drag previews.
|
|
12
|
+
*
|
|
13
|
+
* If no `elemBefore` is provided, then the `elemBefore` will automatically collapse.
|
|
14
|
+
* There is no need to pass in `COLLAPSE_ELEM_BEFORE`. We do this as there is no
|
|
15
|
+
* need to maintain vertical side navigation vertical alignment in the drag preview.
|
|
16
|
+
*
|
|
17
|
+
* Please ensure the drag preview is pushed away from the users pointer
|
|
18
|
+
* (with `pointerOutsideOfPreview()` from Pragmatic drag and drop) by our
|
|
19
|
+
* standard amount (`{x: token('space.200'), y: token('space.100')`)
|
|
20
|
+
*/
|
|
21
|
+
export declare function DragPreview({ elemBefore, children, }: {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
elemBefore?: ReactNode;
|
|
24
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These outputs where originally created within nav4, but have since moved out into
|
|
3
|
+
* pragmatic drag and drop itself for broader usage. Now this file simply re-exports
|
|
4
|
+
* the pdnd outputs
|
|
5
|
+
*/
|
|
6
|
+
export { type Instruction, type Operation, DropIndicator, } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/list-item';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These outputs where originally created within nav4, but have since moved out into
|
|
3
|
+
* pragmatic drag and drop itself for broader usage. Now this file simply re-exports
|
|
4
|
+
* the pdnd outputs
|
|
5
|
+
*/
|
|
6
|
+
export { GroupDropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/group';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These outputs where originally created within nav4, but have since moved out into
|
|
3
|
+
* pragmatic drag and drop itself for broader usage. Now this file simply re-exports
|
|
4
|
+
* the pdnd outputs
|
|
5
|
+
*/
|
|
6
|
+
export { type Availability, type Operation, type Instruction, attachInstruction, extractInstruction, } from '@atlaskit/pragmatic-drag-and-drop-hitbox/list-item';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxFrag
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
import { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/list-item';
|
|
8
|
+
import { draggable, dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
9
|
+
import { attachInstruction } from './hitbox';
|
|
10
|
+
type TInternalState = {
|
|
11
|
+
type: 'idle';
|
|
12
|
+
} | {
|
|
13
|
+
container: HTMLElement;
|
|
14
|
+
type: 'preview';
|
|
15
|
+
ui: {
|
|
16
|
+
content: ReactNode;
|
|
17
|
+
elemBefore?: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
type: 'dragging';
|
|
21
|
+
} | {
|
|
22
|
+
instruction: Instruction | null;
|
|
23
|
+
type: 'is-over';
|
|
24
|
+
};
|
|
25
|
+
export type TMenuItemDragAndDropState = Exclude<TInternalState, {
|
|
26
|
+
type: 'preview';
|
|
27
|
+
}> | {
|
|
28
|
+
type: 'preview';
|
|
29
|
+
};
|
|
30
|
+
type TPDNDDraggableArgs = Required<Parameters<typeof draggable>[0]>;
|
|
31
|
+
type TPDNDDropTargetArgs = Required<Parameters<typeof dropTargetForElements>[0]>;
|
|
32
|
+
type TDraggableArgs = {
|
|
33
|
+
canDrag?: TPDNDDraggableArgs['canDrag'];
|
|
34
|
+
getDragPreviewPieces: (args: Parameters<TPDNDDraggableArgs['getInitialData']>[0]) => {
|
|
35
|
+
content: ReactNode;
|
|
36
|
+
elemBefore?: ReactNode;
|
|
37
|
+
};
|
|
38
|
+
getInitialData: (args: Parameters<TPDNDDraggableArgs['getInitialData']>[0]) => Record<string | symbol, unknown>;
|
|
39
|
+
};
|
|
40
|
+
type TDropTargetArgs = {
|
|
41
|
+
canDrop: TPDNDDropTargetArgs['canDrop'];
|
|
42
|
+
getData: TPDNDDropTargetArgs['getData'];
|
|
43
|
+
getOperations: (args: Parameters<TPDNDDropTargetArgs['getData']>[0]) => Parameters<typeof attachInstruction>[1]['operations'];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* A convenience helper for setting up drag and drop for menu items
|
|
47
|
+
*
|
|
48
|
+
* - Don't include the `draggable` property if you don't want the menu item to be a draggable
|
|
49
|
+
* - Don't include the `dropTarget` property if you don't want the menu item to be a drop target
|
|
50
|
+
*/
|
|
51
|
+
export declare function useMenuItemDragAndDrop({ draggable: draggableArgs, dropTarget: dropTargetArgs, }: {
|
|
52
|
+
draggable?: TDraggableArgs;
|
|
53
|
+
dropTarget?: TDropTargetArgs;
|
|
54
|
+
}): {
|
|
55
|
+
state: TMenuItemDragAndDropState;
|
|
56
|
+
draggableButtonRef: import("react").MutableRefObject<HTMLButtonElement | null>;
|
|
57
|
+
dropTargetRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
58
|
+
draggableAnchorRef: import("react").MutableRefObject<HTMLAnchorElement | null>;
|
|
59
|
+
dragPreview: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null;
|
|
60
|
+
dropIndicator: false | JSX.Element | null;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
|
+
export type ExpandableMenuItemContentProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The contents of the expandable menu item.
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* __ExpandableMenuItemContent__
|
|
14
|
+
*
|
|
15
|
+
* The expandable and collapsable section of the expandable menu item. It should contain the nested menu items.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ExpandableMenuItemContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemContentProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
type onExpansionToggle = (isExpanded: boolean) => void;
|
|
2
|
+
/**
|
|
3
|
+
* Whether all ancestor menu items of the current menu item are expanded. Used to know if the current menu item is
|
|
4
|
+
* shown within the menu item tree.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AreAllAncestorsExpandedContext: import("react").Context<boolean | null>;
|
|
7
|
+
/**
|
|
8
|
+
* A context for storing the isExpanded value of the ExpandableMenuItem.
|
|
9
|
+
*/
|
|
10
|
+
export declare const IsExpandedContext: import("react").Context<boolean | null>;
|
|
11
|
+
/**
|
|
12
|
+
* A context for storing a function that sets isExpanded value of the ExpandableMenuItem.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SetIsExpandedContext: import("react").Context<((value: boolean) => void) | null>;
|
|
15
|
+
/**
|
|
16
|
+
* A context for storing a function that triggers when isExpanded value of the ExpandableMenuItem is changed.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OnExpansionToggleContext: import("react").Context<onExpansionToggle | null>;
|
|
19
|
+
/**
|
|
20
|
+
* A context for storing the level value of the ExpandableMenuItem.
|
|
21
|
+
*/
|
|
22
|
+
export declare const LevelContext: import("react").Context<number>;
|
|
23
|
+
export declare const useIsExpanded: () => boolean;
|
|
24
|
+
export declare const useSetIsExpanded: () => ((value: boolean) => void);
|
|
25
|
+
export declare const useOnExpansionToggle: () => onExpansionToggle | null;
|
|
26
|
+
export declare const useLevel: () => number;
|
|
27
|
+
/**
|
|
28
|
+
* Whether all ancestor menu items of the current menu item are expanded. Used to know if the current menu item is
|
|
29
|
+
* shown within the menu item tree.
|
|
30
|
+
*
|
|
31
|
+
* It works by combining (using &&) all the expansion states of the current menu item's ancestors.
|
|
32
|
+
*
|
|
33
|
+
* Using `true` as the fallback for cases when the menu item does not have ancestors.
|
|
34
|
+
*/
|
|
35
|
+
export declare const useAreAllAncestorsExpanded: () => boolean;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxFrag
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
import React, { type ReactNode } from 'react';
|
|
7
|
+
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
|
+
import type { RouterLinkComponentProps } from '@atlaskit/app-provider';
|
|
9
|
+
import type { MenuItemCommonProps, MenuItemSlots } from '../types';
|
|
10
|
+
export type ExpandableMenuItemTriggerProps<RouterLinkConfig extends Record<string, any> = never> = MenuItemCommonProps & Omit<RouterLinkComponentProps<RouterLinkConfig>, 'href'> & Omit<MenuItemSlots, 'actionsOnHover' | 'elemBefore'> & {
|
|
11
|
+
/**
|
|
12
|
+
* `ReactNode` to be placed visually after the `children` and will
|
|
13
|
+
* only be displayed on hover or focus, or when the expandable menu item
|
|
14
|
+
* is expanded.
|
|
15
|
+
*
|
|
16
|
+
* It is intended for additional actions (e.g. IconButtons).
|
|
17
|
+
*
|
|
18
|
+
* This `ReactNode` will replace `elemAfter` on hover/focus or when expanded.
|
|
19
|
+
*
|
|
20
|
+
* This `ReactNode` will be rendered visually on top of the main
|
|
21
|
+
* interactive element for the menu item. If this element does not
|
|
22
|
+
* contain an interactive element (`button` or `a`) then `pointer-events`
|
|
23
|
+
* will be set to `none` on this slot so that users can click through
|
|
24
|
+
* this element onto the main interactive element of the menu item.
|
|
25
|
+
*/
|
|
26
|
+
actionsOnHover?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* The element to display before the content of the menu item.
|
|
29
|
+
*
|
|
30
|
+
* By default, a chevron icon will be displayed in this slot. If a custom `elemBefore`
|
|
31
|
+
* is provided, the custom element will replaced by the chevron icon while the user is
|
|
32
|
+
* hovering or focused on the item.
|
|
33
|
+
*
|
|
34
|
+
* `ExpandableMenuItemTrigger` does not respect `COLLAPSE_ELEM_BEFORE` as a chevron
|
|
35
|
+
* will always be displayed.
|
|
36
|
+
*/
|
|
37
|
+
elemBefore?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* If provided, the chevron icon (expand/collapse symbol) will be rendered within a separate
|
|
40
|
+
* icon button element. Clicking on this icon button will not trigger the `onClick` event. It
|
|
41
|
+
* will only expand or collapse the expandable.
|
|
42
|
+
*
|
|
43
|
+
* If a `href` is not provided, the chevron icon is rendered as part of the element.
|
|
44
|
+
*/
|
|
45
|
+
href?: RouterLinkComponentProps<RouterLinkConfig>['href'];
|
|
46
|
+
/**
|
|
47
|
+
* Called when the user has clicked on the trigger content.
|
|
48
|
+
*
|
|
49
|
+
* __It is not called when the user clicks on the expand/collapse chevron icon button.__
|
|
50
|
+
* This is to differentiate a click that will only "expand" the menu item _without selecting it_,
|
|
51
|
+
* from a click to expand _and_ "select" or navigate to the menu item.
|
|
52
|
+
*
|
|
53
|
+
* If you need a callback for when the user expands or collapses the expandable, use
|
|
54
|
+
* `onExpansionToggle` on the `ExpandableMenuItem` component instead.
|
|
55
|
+
*/
|
|
56
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent, analyticsAttributes: {
|
|
57
|
+
isExpanded: boolean;
|
|
58
|
+
}) => void;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* __ExpandableMenuItemTrigger__
|
|
62
|
+
*
|
|
63
|
+
* The trigger component for an `ExpandableMenuItem`. Interacting with it will expand or collapse the expandable.
|
|
64
|
+
*/
|
|
65
|
+
export declare const ExpandableMenuItemTrigger: <RouterLinkConfig extends Record<string, any> = never>(props: ExpandableMenuItemTriggerProps<RouterLinkConfig> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>) => React.ReactElement | null;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxFrag
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
export type ExpandableMenuItemProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Should contain `ExpandableMenuItemTrigger` and `ExpandableMenuItemContent`.
|
|
10
|
+
*/
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* A slot to render a drop indicator on an entire menu item (trigger + content).
|
|
14
|
+
*
|
|
15
|
+
* This should only be used when the **whole `ExpandableMenuItem` is a drop target**,
|
|
16
|
+
* and not when only the `ExpandableMenuItemTrigger` is a drop target.
|
|
17
|
+
*/
|
|
18
|
+
dropIndicator?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* The default expanded state of the menu item.
|
|
21
|
+
*
|
|
22
|
+
* You can use this to set the default expanded state without needing to entirely control the state.
|
|
23
|
+
*/
|
|
24
|
+
isDefaultExpanded?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The controlled expanded state of the menu item. Allows you to control the expanded state of
|
|
27
|
+
* the menu item externally.
|
|
28
|
+
*
|
|
29
|
+
* If you are controlling the state, you should update your state using `onExpansionToggle`.
|
|
30
|
+
*/
|
|
31
|
+
isExpanded?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Called when the user has interacted with the menu item to expand or collapse it.
|
|
34
|
+
*
|
|
35
|
+
* It is not called when the `isExpanded` controlled state prop is changed.
|
|
36
|
+
*
|
|
37
|
+
* If you are controlling the expanded state, you should use this callback to update your state.
|
|
38
|
+
*/
|
|
39
|
+
onExpansionToggle?: (isExpanded: boolean) => void;
|
|
40
|
+
/**
|
|
41
|
+
* testId for MenuListItem
|
|
42
|
+
*/
|
|
43
|
+
testId?: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* __ExpandableMenuItem__
|
|
47
|
+
*
|
|
48
|
+
* A composable component for nested menu items that can be revealed and hidden by interacting witih the parent menu item.
|
|
49
|
+
*
|
|
50
|
+
* Follows the [disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/).
|
|
51
|
+
*
|
|
52
|
+
* Should be used with `ExpandableMenuItemTrigger` as the parent menu item, and children menu items should be wrapped in a `ExpandableMenuItemContent`.
|
|
53
|
+
*
|
|
54
|
+
* Usage example:
|
|
55
|
+
* ```jsx
|
|
56
|
+
* <ExpandableMenuItem>
|
|
57
|
+
* <ExpandableMenuItemTrigger>Parent menu item</ExpandableMenuItemTrigger>
|
|
58
|
+
* <ExpandableMenuItemContent>
|
|
59
|
+
* <ButtonMenuItem>Item 1</ButtonMenuItem>
|
|
60
|
+
* <ButtonMenuItem>Item 2</ButtonMenuItem>
|
|
61
|
+
* </ExpandableMenuItemContent>
|
|
62
|
+
* </ExpandableMenuItem>
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare const ExpandableMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CloseButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The accessible name to give to the close button.
|
|
5
|
+
*
|
|
6
|
+
* Used as the aria-label for the close button to ensure screen reader
|
|
7
|
+
* accessibility.
|
|
8
|
+
*/
|
|
9
|
+
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* The handler called when the close button is clicked. Typically, this
|
|
12
|
+
* should trigger the same close logic as the top-level flyout menu
|
|
13
|
+
* component.
|
|
14
|
+
*/
|
|
15
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* A unique string that appears as data attribute data-testid in the
|
|
18
|
+
* rendered code, serving as a hook for automated tests.
|
|
19
|
+
*/
|
|
20
|
+
testId?: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* __Close button__
|
|
24
|
+
*
|
|
25
|
+
* The close button is to be used for flyout menu item headers to ensure that
|
|
26
|
+
* all users have an accessible and obvious way to close the flyout menu.
|
|
27
|
+
*
|
|
28
|
+
* Ensure that the close button renders first in the DOM to make sure that
|
|
29
|
+
* users will encounter all elements of the flyout menu, including everything
|
|
30
|
+
* within the flyout menu header. This can be done using a `Flex` primitive as
|
|
31
|
+
* the custom header's container with a flex direction of `row-reverse`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CloseButton: (props: CloseButtonProps) => React.JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface FlyoutBodyProps {
|
|
7
|
+
/**
|
|
8
|
+
* The content to display within the main body of the flyout menu.
|
|
9
|
+
* Typically includes the primary interactive elements.
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Handler for blur capture events.
|
|
14
|
+
*/
|
|
15
|
+
onBlurCapture?: React.FocusEventHandler<HTMLObjectElement>;
|
|
16
|
+
/**
|
|
17
|
+
* Handler for key down events.
|
|
18
|
+
*/
|
|
19
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLObjectElement>;
|
|
20
|
+
/**
|
|
21
|
+
* Handler for key up events.
|
|
22
|
+
*/
|
|
23
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLObjectElement>;
|
|
24
|
+
/**
|
|
25
|
+
* A unique string that appears as data attribute data-testid in the
|
|
26
|
+
* rendered code, serving as a hook for automated tests.
|
|
27
|
+
*/
|
|
28
|
+
testId?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* __Flyout menu item body__
|
|
32
|
+
*
|
|
33
|
+
* The main section of a flyout menu. This component is used to render the
|
|
34
|
+
* primary contents of the flyout menu. This component should be placed between
|
|
35
|
+
* FlyoutHeader and FlyoutFooter (if present), as is scrollable if the content
|
|
36
|
+
* exceeds the available space.
|
|
37
|
+
*/
|
|
38
|
+
export declare const FlyoutBody: React.ForwardRefExoticComponent<FlyoutBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface FlyoutFooterProps {
|
|
7
|
+
/**
|
|
8
|
+
* The content to display within the flyout footer. Typically used for
|
|
9
|
+
* supplementary actions or information.
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* A unique string that appears as data attribute data-testid in the
|
|
14
|
+
* rendered code, serving as a hook for automated tests.
|
|
15
|
+
*/
|
|
16
|
+
testId?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* __Flyout menu item footer__
|
|
20
|
+
*
|
|
21
|
+
* The footer section of a flyout menu. This component can display
|
|
22
|
+
* supplementary actions or information at the bottom of the flyout menu. This
|
|
23
|
+
* component should be placed after FlyoutBody within the FlyoutMenuItemContent.
|
|
24
|
+
*/
|
|
25
|
+
export declare const FlyoutFooter: (props: FlyoutFooterProps) => JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface FlyoutHeaderProps {
|
|
7
|
+
/**
|
|
8
|
+
* The actions to display within the flyout header.
|
|
9
|
+
*/
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The accessible label for the close button in the flyout header.
|
|
13
|
+
*
|
|
14
|
+
* Used as the aria-label for the close button to ensure screen reader
|
|
15
|
+
* accessibility.
|
|
16
|
+
*/
|
|
17
|
+
closeButtonLabel: string;
|
|
18
|
+
/**
|
|
19
|
+
* A unique string that appears as data attribute data-testid in the
|
|
20
|
+
* rendered code, serving as a hook for automated tests.
|
|
21
|
+
*/
|
|
22
|
+
testId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The title of the flyout menu.
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* __FlyoutHeader__
|
|
30
|
+
*
|
|
31
|
+
* The header section of a flyout menu. This component displays the title, and
|
|
32
|
+
* close button, as well as any other provided actions relevant to the menu.
|
|
33
|
+
* This component should be placed first within the FlyoutMenuItemContent.
|
|
34
|
+
*/
|
|
35
|
+
export declare const FlyoutHeader: (props: FlyoutHeaderProps) => JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export type FlyoutCloseSource = 'close-button' | 'escape-key' | 'outside-click' | 'other';
|
|
7
|
+
export type FlyoutMenuItemContentProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Whether the flyout menu should be focused when opened.
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The contents of the flyout menu.
|
|
15
|
+
*/
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* A `testId` that is applied to the container element as the `data-testid` attribute.
|
|
19
|
+
*/
|
|
20
|
+
containerTestId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The maximum height of the flyout menu in pixels.
|
|
23
|
+
*
|
|
24
|
+
* If not provided, defaults to 760px.
|
|
25
|
+
*/
|
|
26
|
+
maxHeight?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Called when the flyout menu is closed.
|
|
29
|
+
*
|
|
30
|
+
* If you are controlling the open state of the flyout menu, use this to update your state.
|
|
31
|
+
*/
|
|
32
|
+
onClose?: () => void;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* __FlyoutMenuItemContent__
|
|
36
|
+
*
|
|
37
|
+
* The content that appears when the flyout menu is open.
|
|
38
|
+
*/
|
|
39
|
+
export declare const FlyoutMenuItemContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<FlyoutMenuItemContentProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FlyoutCloseSource } from './flyout-menu-item-content';
|
|
2
|
+
/**
|
|
3
|
+
* __Is open context__
|
|
4
|
+
*
|
|
5
|
+
* A context for storing the isOpen value of the FlyoutMenuItem.
|
|
6
|
+
*/
|
|
7
|
+
export declare const IsOpenContext: import("react").Context<boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* __Set is open context__
|
|
10
|
+
*
|
|
11
|
+
* A context for storing a function that sets isOpen value of the FlyoutMenuItem.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SetIsOpenContext: import("react").Context<(value: boolean) => void>;
|
|
14
|
+
export declare const useFlyoutMenuOpen: () => boolean;
|
|
15
|
+
export declare const useSetFlyoutMenuOpen: () => (value: boolean) => void;
|
|
16
|
+
/**
|
|
17
|
+
* __On close context__
|
|
18
|
+
*
|
|
19
|
+
* A context for storing a ref to the onClose handler with source information.This
|
|
20
|
+
* is used by FlyoutMenuItemContent, FlyoutMenuItemTrigger and FlyoutHeader to store
|
|
21
|
+
* the on close function and source information for closing the flyout menu.
|
|
22
|
+
*/
|
|
23
|
+
export declare const OnCloseContext: import("react").Context<import("react").MutableRefObject<((event: Event | React.MouseEvent<HTMLButtonElement> | KeyboardEvent | MouseEvent | null, source?: FlyoutCloseSource) => void) | null>>;
|
|
24
|
+
/**
|
|
25
|
+
* __Title id context__
|
|
26
|
+
*
|
|
27
|
+
* A context for storing the title id of the FlyoutMenuItem that is displayed in
|
|
28
|
+
* FlyoutHeader, and used as the aria-labelledby on the FlyoutMenuItemContent
|
|
29
|
+
* container.
|
|
30
|
+
*/
|
|
31
|
+
export declare const TitleIdContext: import("react").Context<string | undefined>;
|
|
32
|
+
export declare const useTitleId: () => string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* __Title id provider__
|
|
35
|
+
*
|
|
36
|
+
* A context provider for supplying the title id to the FlyoutHeader.
|
|
37
|
+
*/
|
|
38
|
+
export declare const TitleIdContextProvider: import("react").Provider<string | undefined>;
|