@1771technologies/lytenyte-pro 0.9.3 → 1.0.0-beta.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/README.md +3 -2
- package/dist/+types.d.ts +5299 -0
- package/dist/+types.js +1 -0
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +2 -0
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +43 -0
- package/dist/cell-selection/are-rects-equal.d.ts +2 -0
- package/dist/cell-selection/are-rects-equal.js +6 -0
- package/dist/cell-selection/bound-selection-rect.d.ts +2 -0
- package/dist/cell-selection/bound-selection-rect.js +17 -0
- package/dist/cell-selection/cell-selection-containers.d.ts +3 -0
- package/dist/cell-selection/cell-selection-containers.js +91 -0
- package/dist/cell-selection/cell-selection-driver.js +272 -0
- package/dist/{types/cell-selection → cell-selection}/cell-style-row.d.ts +2 -2
- package/dist/cell-selection/cell-style-row.js +84 -0
- package/dist/cell-selection/deselect-rect-range.d.ts +2 -0
- package/dist/cell-selection/deselect-rect-range.js +43 -0
- package/dist/cell-selection/expand-cell-selection-down.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-down.js +39 -0
- package/dist/cell-selection/expand-cell-selection-end.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-end.js +40 -0
- package/dist/cell-selection/expand-cell-selection-start.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-start.js +39 -0
- package/dist/cell-selection/expand-cell-selection-up.d.ts +5 -0
- package/dist/cell-selection/expand-cell-selection-up.js +39 -0
- package/dist/cell-selection/full-width-start-end-index.d.ts +2 -0
- package/dist/cell-selection/full-width-start-end-index.js +5 -0
- package/dist/cell-selection/get-root-cell.d.ts +2 -0
- package/dist/cell-selection/get-root-cell.js +86 -0
- package/dist/cell-selection/index.d.ts +19 -0
- package/dist/cell-selection/index.js +19 -0
- package/dist/cell-selection/is-bottom-rect.d.ts +2 -0
- package/dist/cell-selection/is-bottom-rect.js +7 -0
- package/dist/cell-selection/is-center-col-rect.d.ts +5 -0
- package/dist/cell-selection/is-center-col-rect.js +5 -0
- package/dist/cell-selection/is-center-rect.d.ts +2 -0
- package/dist/cell-selection/is-center-rect.js +5 -0
- package/dist/cell-selection/is-end-rect.d.ts +5 -0
- package/dist/cell-selection/is-end-rect.js +4 -0
- package/dist/cell-selection/is-overlapping-rect.d.ts +2 -0
- package/dist/cell-selection/is-overlapping-rect.js +6 -0
- package/dist/cell-selection/is-start-rect.d.ts +5 -0
- package/dist/cell-selection/is-start-rect.js +4 -0
- package/dist/cell-selection/is-top-rect.d.ts +2 -0
- package/dist/cell-selection/is-top-rect.js +4 -0
- package/dist/cell-selection/is-within-selection-rect.d.ts +2 -0
- package/dist/cell-selection/is-within-selection-rect.js +3 -0
- package/dist/cell-selection/split-cell-selection-rect.d.ts +39 -0
- package/dist/cell-selection/split-cell-selection-rect.js +79 -0
- package/dist/cell-selection/update-additive-cell-selection.d.ts +5 -0
- package/dist/cell-selection/update-additive-cell-selection.js +25 -0
- package/dist/cell-selection/use-edge-scroll.d.ts +10 -0
- package/dist/cell-selection/use-edge-scroll.js +66 -0
- package/dist/cells/cell-default.d.ts +2 -0
- package/dist/cells/cell-default.js +8 -0
- package/dist/cells/cell-editor.d.ts +6 -0
- package/dist/cells/cell-editor.js +96 -0
- package/dist/cells/cell.d.ts +7 -0
- package/dist/cells/cell.js +37 -0
- package/dist/column-manager/branch-lookup-context.d.ts +4 -0
- package/dist/column-manager/branch-lookup-context.js +3 -0
- package/dist/column-manager/branch.d.ts +9 -0
- package/dist/column-manager/branch.js +38 -0
- package/dist/column-manager/column-manager.d.ts +15 -0
- package/dist/column-manager/column-manager.js +20 -0
- package/dist/column-manager/context.d.ts +7 -0
- package/dist/column-manager/context.js +3 -0
- package/dist/column-manager/label.d.ts +5 -0
- package/dist/column-manager/label.js +18 -0
- package/dist/column-manager/leaf.d.ts +6 -0
- package/dist/column-manager/leaf.js +40 -0
- package/dist/column-manager/move-handle.d.ts +12 -0
- package/dist/column-manager/move-handle.js +58 -0
- package/dist/column-manager/passive-scroll.d.ts +2 -0
- package/dist/column-manager/passive-scroll.js +2 -0
- package/dist/column-manager/root.d.ts +9 -0
- package/dist/column-manager/root.js +20 -0
- package/dist/column-manager/use-column-manager.d.ts +19 -0
- package/dist/column-manager/use-column-manager.js +24 -0
- package/dist/column-manager/use-columns-from-context.d.ts +3 -0
- package/dist/column-manager/use-columns-from-context.js +23 -0
- package/dist/column-manager/visibility-checkbox.d.ts +9 -0
- package/dist/column-manager/visibility-checkbox.js +30 -0
- package/dist/context.d.ts +10 -0
- package/dist/context.js +4 -0
- package/dist/filter-tree/branch.d.ts +10 -0
- package/dist/filter-tree/branch.js +21 -0
- package/dist/filter-tree/context.d.ts +27 -0
- package/dist/filter-tree/context.js +5 -0
- package/dist/filter-tree/filter-tree.d.ts +14 -0
- package/dist/filter-tree/filter-tree.js +18 -0
- package/dist/filter-tree/hooks/use-filter-tree.d.ts +37 -0
- package/dist/filter-tree/hooks/use-filter-tree.js +96 -0
- package/dist/filter-tree/hooks/use-tree-item.d.ts +8 -0
- package/dist/filter-tree/hooks/use-tree-item.js +116 -0
- package/dist/filter-tree/inclusion-checkbox.d.ts +9 -0
- package/dist/filter-tree/inclusion-checkbox.js +14 -0
- package/dist/filter-tree/label.d.ts +5 -0
- package/dist/filter-tree/label.js +18 -0
- package/dist/filter-tree/leaf.d.ts +6 -0
- package/dist/filter-tree/leaf.js +12 -0
- package/dist/filter-tree/root.d.ts +13 -0
- package/dist/filter-tree/root.js +30 -0
- package/dist/grid-box/+types.d.ts +13 -0
- package/dist/grid-box/+types.js +1 -0
- package/dist/grid-box/context.d.ts +9 -0
- package/dist/grid-box/context.js +3 -0
- package/dist/grid-box/grid-box.d.ts +12 -0
- package/dist/grid-box/grid-box.js +14 -0
- package/dist/grid-box/item.d.ts +7 -0
- package/dist/grid-box/item.js +33 -0
- package/dist/grid-box/panel.d.ts +1 -0
- package/dist/grid-box/panel.js +9 -0
- package/dist/grid-box/root.d.ts +9 -0
- package/dist/grid-box/root.js +8 -0
- package/dist/grid-box/use-aggregation-box-items.d.ts +18 -0
- package/dist/grid-box/use-aggregation-box-items.js +60 -0
- package/dist/grid-box/use-column-box-items.d.ts +31 -0
- package/dist/grid-box/use-column-box-items.js +81 -0
- package/dist/grid-box/use-row-group-box-items.d.ts +18 -0
- package/dist/grid-box/use-row-group-box-items.js +134 -0
- package/dist/grid-provider/context.d.ts +5 -0
- package/dist/grid-provider/context.js +2 -0
- package/dist/grid-provider/provider.d.ts +3 -0
- package/dist/grid-provider/provider.js +2 -0
- package/dist/grid-provider/use-grid.d.ts +3 -0
- package/dist/grid-provider/use-grid.js +3 -0
- package/dist/grid.d.ts +29 -0
- package/dist/grid.js +38 -0
- package/dist/header/header-cell.d.ts +10 -0
- package/dist/header/header-cell.js +24 -0
- package/dist/header/header-group-cell.d.ts +5 -0
- package/dist/header/header-group-cell.js +14 -0
- package/dist/header/header-row.d.ts +4 -0
- package/dist/header/header-row.js +10 -0
- package/dist/header/header.d.ts +1 -0
- package/dist/header/header.js +10 -0
- package/dist/header/resize-handler.d.ts +12 -0
- package/dist/header/resize-handler.js +128 -0
- package/dist/header/use-drag-move.d.ts +14 -0
- package/dist/header/use-drag-move.js +90 -0
- package/dist/header/use-header-cell-renderer.d.ts +4 -0
- package/dist/header/use-header-cell-renderer.js +36 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -3860
- package/dist/license.d.ts +2 -0
- package/dist/license.js +217 -0
- package/dist/listbox/context.d.ts +6 -0
- package/dist/listbox/context.js +3 -0
- package/dist/listbox/item.d.ts +1 -0
- package/dist/listbox/item.js +25 -0
- package/dist/listbox/panel.d.ts +1 -0
- package/dist/listbox/panel.js +50 -0
- package/dist/listbox/root.d.ts +6 -0
- package/dist/listbox/root.js +12 -0
- package/dist/root/dialog-driver.js +21 -0
- package/dist/root/popover-driver.js +21 -0
- package/dist/root/root.d.ts +8 -0
- package/dist/root/root.js +120 -0
- package/dist/row-data-source-client/+constants.d.ts +2 -0
- package/dist/row-data-source-client/+constants.js +2 -0
- package/dist/row-data-source-client/+types.d.ts +27 -0
- package/dist/row-data-source-client/+types.js +1 -0
- package/dist/row-data-source-client/built-ins/avg.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/avg.js +16 -0
- package/dist/row-data-source-client/built-ins/built-ins.d.ts +44 -0
- package/dist/row-data-source-client/built-ins/built-ins.js +44 -0
- package/dist/row-data-source-client/built-ins/count.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/count.js +16 -0
- package/dist/row-data-source-client/built-ins/first.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/first.js +12 -0
- package/dist/row-data-source-client/built-ins/group.d.ts +1 -0
- package/dist/row-data-source-client/built-ins/group.js +3 -0
- package/dist/row-data-source-client/built-ins/last.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/last.js +12 -0
- package/dist/row-data-source-client/built-ins/max.d.ts +11 -0
- package/dist/row-data-source-client/built-ins/max.js +25 -0
- package/dist/row-data-source-client/built-ins/min.d.ts +11 -0
- package/dist/row-data-source-client/built-ins/min.js +25 -0
- package/dist/row-data-source-client/built-ins/sum.d.ts +10 -0
- package/dist/row-data-source-client/built-ins/sum.js +21 -0
- package/dist/row-data-source-client/filter/+types.d.ts +23 -0
- package/dist/row-data-source-client/filter/+types.js +1 -0
- package/dist/row-data-source-client/filter/compute-filtered-rows.d.ts +2 -0
- package/dist/row-data-source-client/filter/compute-filtered-rows.js +109 -0
- package/dist/row-data-source-client/pivots/create-agg-model.d.ts +6 -0
- package/dist/row-data-source-client/pivots/create-agg-model.js +13 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +50 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +22 -0
- package/dist/row-data-source-client/pivots/create-pivot-tree.d.ts +2 -0
- package/dist/row-data-source-client/pivots/create-pivot-tree.js +23 -0
- package/dist/row-data-source-client/tree/client-tree.d.ts +18 -0
- package/dist/row-data-source-client/tree/client-tree.js +76 -0
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +2 -0
- package/dist/row-data-source-client/tree/evaluator-aggregation.js +8 -0
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +2 -0
- package/dist/row-data-source-client/tree/evaluator-group.js +9 -0
- package/dist/row-data-source-client/tree/traverse.d.ts +2 -0
- package/dist/row-data-source-client/tree/traverse.js +22 -0
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +10 -0
- package/dist/row-data-source-client/use-client-data-source-paginated.js +538 -0
- package/dist/row-data-source-client/use-client-data-source.d.ts +10 -0
- package/dist/row-data-source-client/use-client-data-source.js +667 -0
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +9 -0
- package/dist/row-data-source-client/use-client-tree-data-source.js +513 -0
- package/dist/row-data-source-server/async-tree/+constants.async-tree.d.ts +1 -0
- package/dist/row-data-source-server/async-tree/+constants.async-tree.js +1 -0
- package/dist/row-data-source-server/async-tree/+types.async-tree.d.ts +59 -0
- package/dist/row-data-source-server/async-tree/+types.async-tree.js +1 -0
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +27 -0
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/apply-set-action-to-tree.js +36 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-unique.js +24 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-are-valid.js +14 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-keys-fit.js +18 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/check-set-action-item-kinds.js +14 -0
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/get-parent-node-by-path.js +18 -0
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/is-set-action-a-no-op-on-node.js +3 -0
- package/dist/row-data-source-server/async-tree/make-async-tree.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/make-async-tree.js +19 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-parent-remove-self.js +8 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-resize.js +17 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.d.ts +2 -0
- package/dist/row-data-source-server/async-tree/maybe-apply-set-action-items.js +51 -0
- package/dist/row-data-source-server/range-tree/range-tree.d.ts +66 -0
- package/dist/row-data-source-server/range-tree/range-tree.js +102 -0
- package/dist/row-data-source-server/use-server-data-source.d.ts +3 -0
- package/dist/row-data-source-server/use-server-data-source.js +679 -0
- package/dist/row-data-source-server/utils/get-node-depth.d.ts +2 -0
- package/dist/row-data-source-server/utils/get-node-depth.js +9 -0
- package/dist/row-data-source-server/utils/get-node-path.d.ts +2 -0
- package/dist/row-data-source-server/utils/get-node-path.js +9 -0
- package/dist/row-data-source-server/utils/get-request-id.d.ts +1 -0
- package/dist/row-data-source-server/utils/get-request-id.js +6 -0
- package/dist/rows/row/context.d.ts +6 -0
- package/dist/rows/row/context.js +3 -0
- package/dist/rows/row/row.d.ts +7 -0
- package/dist/rows/row/row.js +16 -0
- package/dist/rows/row/use-row-context-value.d.ts +6 -0
- package/dist/rows/row/use-row-context-value.js +29 -0
- package/dist/rows/row-detail-row.d.ts +4 -0
- package/dist/rows/row-detail-row.js +131 -0
- package/dist/rows/row-full-width.d.ts +8 -0
- package/dist/rows/row-full-width.js +17 -0
- package/dist/rows/rows-container.d.ts +1 -0
- package/dist/rows/rows-container.js +9 -0
- package/dist/rows/rows-sections.d.ts +3 -0
- package/dist/rows/rows-sections.js +27 -0
- package/dist/rows/scrollers/native-scroller.d.ts +2 -0
- package/dist/rows/scrollers/native-scroller.js +18 -0
- package/dist/{types/sort-manager/use-sort-state.d.ts → sort-manager/+types.d.ts} +5 -2
- package/dist/sort-manager/+types.js +1 -0
- package/dist/sort-manager/context.d.ts +14 -0
- package/dist/sort-manager/context.js +5 -0
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +15 -0
- package/dist/sort-manager/hooks/use-sort-manager.js +56 -0
- package/dist/{types/sort-manager/sort-manager-container.d.ts → sort-manager/hooks/use-sort-row-item.d.ts} +5 -7
- package/dist/sort-manager/hooks/use-sort-row-item.js +145 -0
- package/dist/sort-manager/hooks/use-sortable-column-items.d.ts +5 -0
- package/dist/sort-manager/hooks/use-sortable-column-items.js +13 -0
- package/dist/sort-manager/root.d.ts +3 -0
- package/dist/sort-manager/root.js +14 -0
- package/dist/sort-manager/sort-add.d.ts +8 -0
- package/dist/sort-manager/sort-add.js +14 -0
- package/dist/sort-manager/sort-apply.d.ts +7 -0
- package/dist/sort-manager/sort-apply.js +24 -0
- package/dist/sort-manager/sort-cancel.d.ts +7 -0
- package/dist/sort-manager/sort-cancel.js +27 -0
- package/dist/sort-manager/sort-clear.d.ts +7 -0
- package/dist/sort-manager/sort-clear.js +22 -0
- package/dist/sort-manager/sort-column-select.d.ts +10 -0
- package/dist/sort-manager/sort-column-select.js +20 -0
- package/dist/sort-manager/sort-direction-select.d.ts +10 -0
- package/dist/sort-manager/sort-direction-select.js +24 -0
- package/dist/sort-manager/sort-manager.d.ts +16 -0
- package/dist/sort-manager/sort-manager.js +26 -0
- package/dist/sort-manager/sort-remove.d.ts +7 -0
- package/dist/sort-manager/sort-remove.js +14 -0
- package/dist/sort-manager/sort-row.d.ts +5 -0
- package/dist/sort-manager/sort-row.js +7 -0
- package/dist/sort-manager/sort-rows.d.ts +1 -0
- package/dist/sort-manager/sort-rows.js +6 -0
- package/dist/sort-manager/sort-value-select.d.ts +11 -0
- package/dist/sort-manager/sort-value-select.js +25 -0
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +3 -0
- package/dist/sort-manager/utils/sort-item-to-sort-model.js +57 -0
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +3 -0
- package/dist/sort-manager/utils/sort-model-to-sort-items.js +49 -0
- package/dist/state/+types.d.ts +34 -0
- package/dist/state/+types.js +1 -0
- package/dist/state/api/column-autosize.d.ts +5 -0
- package/dist/state/api/column-autosize.js +72 -0
- package/dist/state/api/column-by-id.d.ts +2 -0
- package/dist/state/api/column-by-id.js +6 -0
- package/dist/state/api/column-field.d.ts +2 -0
- package/dist/state/api/column-field.js +23 -0
- package/dist/state/api/column-from-index.d.ts +2 -0
- package/dist/state/api/column-from-index.js +6 -0
- package/dist/state/api/column-group-toggle.d.ts +2 -0
- package/dist/state/api/column-group-toggle.js +10 -0
- package/dist/state/api/column-index.d.ts +2 -0
- package/dist/state/api/column-index.js +7 -0
- package/dist/state/api/column-move.d.ts +2 -0
- package/dist/state/api/column-move.js +49 -0
- package/dist/state/api/column-resize.d.ts +2 -0
- package/dist/state/api/column-resize.js +9 -0
- package/dist/state/api/column-update.d.ts +2 -0
- package/dist/state/api/column-update.js +13 -0
- package/dist/state/api/dialog-frame.d.ts +8 -0
- package/dist/state/api/dialog-frame.js +16 -0
- package/dist/state/api/edit-begin.d.ts +5 -0
- package/dist/state/api/edit-begin.js +91 -0
- package/dist/state/api/edit-end.d.ts +5 -0
- package/dist/state/api/edit-end.js +43 -0
- package/dist/state/api/edit-is-cell-active.d.ts +5 -0
- package/dist/state/api/edit-is-cell-active.js +27 -0
- package/dist/state/api/edit-update.d.ts +5 -0
- package/dist/state/api/edit-update.js +88 -0
- package/dist/state/api/event-listeners.d.ts +5 -0
- package/dist/state/api/event-listeners.js +19 -0
- package/dist/state/api/export-csv.d.ts +3 -0
- package/dist/state/api/export-csv.js +40 -0
- package/dist/state/api/export-data-rect.d.ts +2 -0
- package/dist/state/api/export-data-rect.js +24 -0
- package/dist/state/api/focus-cell.d.ts +5 -0
- package/dist/state/api/focus-cell.js +117 -0
- package/dist/state/api/popover-frame.d.ts +8 -0
- package/dist/state/api/popover-frame.js +16 -0
- package/dist/state/api/position-from-element.d.ts +2 -0
- package/dist/state/api/position-from-element.js +9 -0
- package/dist/state/api/row-by-id.d.ts +2 -0
- package/dist/state/api/row-by-id.js +5 -0
- package/dist/state/api/row-by-index.d.ts +2 -0
- package/dist/state/api/row-by-index.js +9 -0
- package/dist/state/api/row-detail-is-expanded.d.ts +2 -0
- package/dist/state/api/row-detail-is-expanded.js +6 -0
- package/dist/state/api/row-detail-rendered-height.d.ts +5 -0
- package/dist/state/api/row-detail-rendered-height.js +14 -0
- package/dist/state/api/row-detail-toggle.d.ts +2 -0
- package/dist/state/api/row-detail-toggle.js +32 -0
- package/dist/state/api/row-group-apply-expansions.d.ts +2 -0
- package/dist/state/api/row-group-apply-expansions.js +20 -0
- package/dist/state/api/row-group-column-index.d.ts +2 -0
- package/dist/state/api/row-group-column-index.js +14 -0
- package/dist/state/api/row-group-is-expanded.d.ts +2 -0
- package/dist/state/api/row-group-is-expanded.js +15 -0
- package/dist/state/api/row-group-toggle.d.ts +2 -0
- package/dist/state/api/row-group-toggle.js +7 -0
- package/dist/state/api/row-handle-select.d.ts +5 -0
- package/dist/state/api/row-handle-select.js +43 -0
- package/dist/state/api/row-select-all.d.ts +2 -0
- package/dist/state/api/row-select-all.js +17 -0
- package/dist/state/api/row-select.d.ts +5 -0
- package/dist/state/api/row-select.js +35 -0
- package/dist/state/api/row-selected.d.ts +2 -0
- package/dist/state/api/row-selected.js +13 -0
- package/dist/state/api/scroll-into-view.d.ts +5 -0
- package/dist/state/api/scroll-into-view.js +50 -0
- package/dist/state/api/sort-for-column.d.ts +2 -0
- package/dist/state/api/sort-for-column.js +9 -0
- package/dist/state/api/use-row-drag.d.ts +2 -0
- package/dist/state/api/use-row-drag.js +27 -0
- package/dist/state/helpers/cell-row-group.d.ts +2 -0
- package/dist/state/helpers/cell-row-group.js +19 -0
- package/dist/state/helpers/column-add-row-group.d.ts +9 -0
- package/dist/state/helpers/column-add-row-group.js +66 -0
- package/dist/state/helpers/column-layout.d.ts +3 -0
- package/dist/state/helpers/column-layout.js +65 -0
- package/dist/state/helpers/column-marker.d.ts +8 -0
- package/dist/state/helpers/column-marker.js +43 -0
- package/dist/state/helpers/column-view.d.ts +21 -0
- package/dist/state/helpers/column-view.js +33 -0
- package/dist/state/helpers/edit-on-change.d.ts +15 -0
- package/dist/state/helpers/edit-on-change.js +26 -0
- package/dist/state/helpers/empty-row-data-source.d.ts +2 -0
- package/dist/state/helpers/empty-row-data-source.js +17 -0
- package/dist/state/helpers/get-data-rect.d.ts +13 -0
- package/dist/state/helpers/get-data-rect.js +65 -0
- package/dist/state/helpers/get-full-width-callback.d.ts +2 -0
- package/dist/state/helpers/get-full-width-callback.js +8 -0
- package/dist/state/helpers/get-span-callback.d.ts +2 -0
- package/dist/state/helpers/get-span-callback.js +20 -0
- package/dist/state/helpers/resolve-column.d.ts +4 -0
- package/dist/state/helpers/resolve-column.js +22 -0
- package/dist/state/helpers/row-layout/get-focus-criteria.d.ts +17 -0
- package/dist/state/helpers/row-layout/get-focus-criteria.js +62 -0
- package/dist/state/helpers/row-layout/row-layout.d.ts +18 -0
- package/dist/state/helpers/row-layout/row-layout.js +414 -0
- package/dist/state/use-lytenyte.d.ts +3 -0
- package/dist/state/use-lytenyte.js +579 -0
- package/dist/tree-view/branch/branch.d.ts +11 -0
- package/dist/tree-view/branch/branch.js +61 -0
- package/dist/tree-view/branch/use-branch-keys.d.ts +2 -0
- package/dist/tree-view/branch/use-branch-keys.js +87 -0
- package/dist/tree-view/context.d.ts +22 -0
- package/dist/tree-view/context.js +3 -0
- package/dist/tree-view/depth-provider.d.ts +2 -0
- package/dist/tree-view/depth-provider.js +3 -0
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +2 -0
- package/dist/tree-view/hooks/use-tree-view-paths.js +9 -0
- package/dist/tree-view/index.d.ts +16 -0
- package/dist/tree-view/index.js +16 -0
- package/dist/tree-view/leaf.d.ts +4 -0
- package/dist/tree-view/leaf.js +27 -0
- package/dist/tree-view/navigation/get-all-ids.d.ts +1 -0
- package/dist/tree-view/navigation/get-all-ids.js +7 -0
- package/dist/tree-view/navigation/get-first-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-first-node.js +7 -0
- package/dist/tree-view/navigation/get-last-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-last-node.js +7 -0
- package/dist/tree-view/navigation/get-next-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-next-node.js +13 -0
- package/dist/tree-view/navigation/get-prev-node.d.ts +1 -0
- package/dist/tree-view/navigation/get-prev-node.js +13 -0
- package/dist/tree-view/panel/make-handle-navigation.d.ts +2 -0
- package/dist/tree-view/panel/make-handle-navigation.js +39 -0
- package/dist/tree-view/panel/make-handle-selection.d.ts +2 -0
- package/dist/tree-view/panel/make-handle-selection.js +92 -0
- package/dist/tree-view/panel/make-handle-typeahead.d.ts +1 -0
- package/dist/tree-view/panel/make-handle-typeahead.js +45 -0
- package/dist/tree-view/panel/panel.d.ts +1 -0
- package/dist/tree-view/panel/panel.js +30 -0
- package/dist/tree-view/panel/use-tree-navigation.d.ts +1 -0
- package/dist/tree-view/panel/use-tree-navigation.js +63 -0
- package/dist/tree-view/root.d.ts +17 -0
- package/dist/tree-view/root.js +63 -0
- package/dist/tree-view/utils/get-focusable-nodes.d.ts +1 -0
- package/dist/tree-view/utils/get-focusable-nodes.js +5 -0
- package/dist/tree-view/utils/get-focused-node.d.ts +1 -0
- package/dist/tree-view/utils/get-focused-node.js +14 -0
- package/dist/tree-view/utils/get-ids-between-nodes.d.ts +1 -0
- package/dist/tree-view/utils/get-ids-between-nodes.js +15 -0
- package/dist/tree-view/utils/get-panel.d.ts +1 -0
- package/dist/tree-view/utils/get-panel.js +7 -0
- package/dist/tree-view/utils/get-parent-node.d.ts +1 -0
- package/dist/tree-view/utils/get-parent-node.js +10 -0
- package/dist/tree-view/utils/get-sibling-branches.d.ts +1 -0
- package/dist/tree-view/utils/get-sibling-branches.js +14 -0
- package/dist/tree-view/utils/get-tree-node-id.d.ts +1 -0
- package/dist/tree-view/utils/get-tree-node-id.js +3 -0
- package/dist/tree-view/utils/is-branch-node.d.ts +1 -0
- package/dist/tree-view/utils/is-branch-node.js +3 -0
- package/dist/tree-view/utils/is-leaf-node.d.ts +1 -0
- package/dist/tree-view/utils/is-leaf-node.js +3 -0
- package/dist/tree-view/utils/is-tree-node-disabled.d.ts +1 -0
- package/dist/tree-view/utils/is-tree-node-disabled.js +3 -0
- package/dist/tree-view/utils/select-node.d.ts +2 -0
- package/dist/tree-view/utils/select-node.js +15 -0
- package/dist/tree-view/utils/toggle-all-selections.d.ts +2 -0
- package/dist/tree-view/utils/toggle-all-selections.js +9 -0
- package/dist/tree-view/utils/toggle-selection.d.ts +2 -0
- package/dist/tree-view/utils/toggle-selection.js +21 -0
- package/dist/tree-view/virtualized/force-sync-scrolling.d.ts +2 -0
- package/dist/tree-view/virtualized/force-sync-scrolling.js +23 -0
- package/dist/tree-view/virtualized/get-virtual-tree-paths.d.ts +2 -0
- package/dist/tree-view/virtualized/get-virtual-tree-paths.js +14 -0
- package/dist/tree-view/virtualized/make-virtual-tree.d.ts +31 -0
- package/dist/tree-view/virtualized/make-virtual-tree.js +90 -0
- package/dist/tree-view/virtualized/use-flattened-tree.d.ts +9 -0
- package/dist/tree-view/virtualized/use-flattened-tree.js +36 -0
- package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +2 -0
- package/dist/tree-view/virtualized/use-row-start-and-end.js +27 -0
- package/dist/tree-view/virtualized/use-virtualized-tree.d.ts +22 -0
- package/dist/tree-view/virtualized/use-virtualized-tree.js +100 -0
- package/dist/types/types.d.ts +8 -13
- package/dist/types/types.js +1 -0
- package/dist/utils/cycle-sorts.d.ts +2 -0
- package/dist/utils/cycle-sorts.js +16 -0
- package/dist/viewport/begin-editing.d.ts +5 -0
- package/dist/viewport/begin-editing.js +15 -0
- package/dist/viewport/viewport.d.ts +1 -0
- package/dist/viewport/viewport.js +77 -0
- package/main.css +315 -0
- package/package.json +31 -79
- package/dist/CompositeList-CGRaS6LQ.js +0 -149
- package/dist/DialogPortalContext-C2WZTqJ3.js +0 -47
- package/dist/DirectionContext-DIPP5cAe.js +0 -15
- package/dist/InternalBackdrop-C4RACVzs.js +0 -324
- package/dist/PopoverPortalContext-BdsDjihw.js +0 -26
- package/dist/anchor-context-Cqr_oiJt.js +0 -11
- package/dist/arrow-down-icon-B-3ldODD.js +0 -27
- package/dist/column-manager.js +0 -1228
- package/dist/column-menu-driver-cG-EZgLa.js +0 -491
- package/dist/cross-icon-CEMLAlFX.js +0 -20
- package/dist/dialog.js +0 -506
- package/dist/drag-store-BMsDBUy_.js +0 -1039
- package/dist/filter-manager.js +0 -1057
- package/dist/getPseudoElementBounds-BSHt6WYm.js +0 -26
- package/dist/grid-container.js +0 -18
- package/dist/icons.js +0 -516
- package/dist/lytenyte-pro.css +0 -2167
- package/dist/manage-columns-icon-D4CElo5H.js +0 -146
- package/dist/menu-lIx6h6Vn.js +0 -1885
- package/dist/menu.js +0 -4
- package/dist/more-dots-icon-CzAH3xHG.js +0 -26
- package/dist/pill-BHBLeJ6k.js +0 -1012
- package/dist/pill-manager.js +0 -737
- package/dist/plus-icon-ToqW5CC-.js +0 -15
- package/dist/popover.js +0 -795
- package/dist/proptypes-BjYr2nFr.js +0 -6472
- package/dist/row-group-icon-DFUMye0v.js +0 -186
- package/dist/search-icon-CcG1lqsn.js +0 -86
- package/dist/select-Db5ksjoS.js +0 -2256
- package/dist/separator-BnPPeAk8.js +0 -21
- package/dist/sort-descending-BMtfaa2L.js +0 -34
- package/dist/sort-manager.js +0 -308
- package/dist/tickmark-icon-CoogRMoO.js +0 -51
- package/dist/types/anchor-context/anchor-context.d.ts +0 -6
- package/dist/types/cell-selection/cell-selection-containers.d.ts +0 -3
- package/dist/types/column-manager/column-manager-context.d.ts +0 -12
- package/dist/types/column-manager/column-manager-drag-box-controls.d.ts +0 -1
- package/dist/types/column-manager/column-manager-drag-box-expander.d.ts +0 -1
- package/dist/types/column-manager/column-manager-drag-box-label.d.ts +0 -5
- package/dist/types/column-manager/column-manager-drag-box.d.ts +0 -13
- package/dist/types/column-manager/column-manager-drag-placeholder.d.ts +0 -5
- package/dist/types/column-manager/column-manager-drop-zone.d.ts +0 -10
- package/dist/types/column-manager/column-manager-impl.d.ts +0 -36
- package/dist/types/column-manager/column-manager-pill.d.ts +0 -4
- package/dist/types/column-manager/column-manager-pivot-mode-toggle.d.ts +0 -1
- package/dist/types/column-manager/column-manager-search.d.ts +0 -1
- package/dist/types/column-manager/column-manager-state.d.ts +0 -8
- package/dist/types/column-manager/column-manager-tree-item.d.ts +0 -6
- package/dist/types/column-manager/column-manager-tree.d.ts +0 -11
- package/dist/types/column-manager/column-manager-types.d.ts +0 -1
- package/dist/types/column-manager/column-manager.d.ts +0 -1
- package/dist/types/column-manager/utils/all-leafs.d.ts +0 -3
- package/dist/types/column-manager/utils/can-hide-item.d.ts +0 -3
- package/dist/types/column-manager/utils/handle-item-hide.d.ts +0 -3
- package/dist/types/components-internal/button/button.d.ts +0 -9
- package/dist/types/components-internal/grid-frame/grid-frame.d.ts +0 -11
- package/dist/types/components-internal/radio/radio.d.ts +0 -5
- package/dist/types/components-internal/separator/separator.d.ts +0 -8
- package/dist/types/components-internal/toggle/toggle.d.ts +0 -7
- package/dist/types/dialog/dialog-impl.d.ts +0 -6
- package/dist/types/dialog/dialog.d.ts +0 -8
- package/dist/types/dialog/use-dialog-class.d.ts +0 -1
- package/dist/types/external.d.ts +0 -2
- package/dist/types/filter-manager/combined-to-flat.d.ts +0 -3
- package/dist/types/filter-manager/components/apply-filter-button.d.ts +0 -1
- package/dist/types/filter-manager/components/clear-filter-button.d.ts +0 -1
- package/dist/types/filter-manager/components/flatten-tree-items.d.ts +0 -4
- package/dist/types/filter-manager/components/get-child-values.d.ts +0 -2
- package/dist/types/filter-manager/components/in-filter-container.d.ts +0 -1
- package/dist/types/filter-manager/components/in-filter-error.d.ts +0 -5
- package/dist/types/filter-manager/components/in-filter-loading.d.ts +0 -1
- package/dist/types/filter-manager/components/in-filter-root.d.ts +0 -11
- package/dist/types/filter-manager/components/in-filter-tree.d.ts +0 -15
- package/dist/types/filter-manager/components/simple-filter-additional-switch.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-operator/date-operator.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-operator/number-operator.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-operator/simple-filter-operator.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-operator/text-operator.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-root.d.ts +0 -9
- package/dist/types/filter-manager/components/simple-filter-value/date-value.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-value/number-value.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-value/simple-filter-value.d.ts +0 -1
- package/dist/types/filter-manager/components/simple-filter-value/text-value.d.ts +0 -1
- package/dist/types/filter-manager/components/use-date-filter-callbacks.d.ts +0 -9
- package/dist/types/filter-manager/components/use-in-filter-item-loader.d.ts +0 -7
- package/dist/types/filter-manager/components/use-number-filter-callbacks.d.ts +0 -8
- package/dist/types/filter-manager/components/use-text-filter-callbacks.d.ts +0 -8
- package/dist/types/filter-manager/filter-manager-impl.d.ts +0 -27
- package/dist/types/filter-manager/filter-manager.d.ts +0 -1
- package/dist/types/filter-manager/filter-state-context.d.ts +0 -16
- package/dist/types/filter-manager/flat-to-combined.d.ts +0 -3
- package/dist/types/filter-manager/flatten-combined-filter.d.ts +0 -3
- package/dist/types/filter-manager/is-filter-complete.d.ts +0 -2
- package/dist/types/filter-manager/types.d.ts +0 -15
- package/dist/types/filter-manager/use-in-filter.d.ts +0 -5
- package/dist/types/filter-manager/use-simple-filters.d.ts +0 -8
- package/dist/types/grid-container/grid-container-impl.d.ts +0 -6
- package/dist/types/grid-container/grid-container.d.ts +0 -2
- package/dist/types/header-cell/header-cell-default.d.ts +0 -2
- package/dist/types/icons.d.ts +0 -1
- package/dist/types/index.d.ts +0 -8
- package/dist/types/license.d.ts +0 -12
- package/dist/types/list-view/list-view-context.d.ts +0 -21
- package/dist/types/list-view/list-view.d.ts +0 -26
- package/dist/types/lytenyte-pro.d.ts +0 -7
- package/dist/types/menu/arrow-svg.d.ts +0 -1
- package/dist/types/menu/column-menu/column-menu-driver.d.ts +0 -4
- package/dist/types/menu/context-menu/context-menu-driver.d.ts +0 -1
- package/dist/types/menu/context-menu/use-context-menu-listener.d.ts +0 -6
- package/dist/types/menu/menu-impl.d.ts +0 -18
- package/dist/types/menu/menu.d.ts +0 -19
- package/dist/types/menu/use-menu-class-name.d.ts +0 -1
- package/dist/types/menu-frame/menu-frame-driver.d.ts +0 -1
- package/dist/types/overlay/load-error-overlay.d.ts +0 -1
- package/dist/types/overlay/loading-overlay.d.ts +0 -1
- package/dist/types/overlay/no-data-overlay.d.ts +0 -1
- package/dist/types/overlay/overlay-driver.d.ts +0 -1
- package/dist/types/pill/pill.d.ts +0 -5
- package/dist/types/pill-manager/pill-manager-agg-menu.d.ts +0 -7
- package/dist/types/pill-manager/pill-manager-controls.d.ts +0 -9
- package/dist/types/pill-manager/pill-manager-drag-placeholder.d.ts +0 -5
- package/dist/types/pill-manager/pill-manager-expander.d.ts +0 -1
- package/dist/types/pill-manager/pill-manager-impl.d.ts +0 -50
- package/dist/types/pill-manager/pill-manager-pill.d.ts +0 -5
- package/dist/types/pill-manager/pill-manager-pills/pill-manager-pills.d.ts +0 -2
- package/dist/types/pill-manager/pill-manager-pills/use-aggregation-source.d.ts +0 -2
- package/dist/types/pill-manager/pill-manager-pills/use-column-pivot-source.d.ts +0 -2
- package/dist/types/pill-manager/pill-manager-pills/use-column-source.d.ts +0 -2
- package/dist/types/pill-manager/pill-manager-pills/use-measures-source.d.ts +0 -2
- package/dist/types/pill-manager/pill-manager-pills/use-row-groups-source.d.ts +0 -2
- package/dist/types/pill-manager/pill-manager-pills/utils.d.ts +0 -3
- package/dist/types/pill-manager/pill-manager-row-label.d.ts +0 -22
- package/dist/types/pill-manager/pill-manager-row.d.ts +0 -12
- package/dist/types/pill-manager/pill-manager-rows.d.ts +0 -1
- package/dist/types/pill-manager/pill-manager-separator.d.ts +0 -1
- package/dist/types/pill-manager/pill-manager-types.d.ts +0 -36
- package/dist/types/pill-manager/pill-manager.d.ts +0 -1
- package/dist/types/popover/popover-impl.d.ts +0 -8
- package/dist/types/popover/popover.d.ts +0 -10
- package/dist/types/popover/use-popover-class.d.ts +0 -1
- package/dist/types/select/select.d.ts +0 -26
- package/dist/types/sort-manager/sort-adder.d.ts +0 -4
- package/dist/types/sort-manager/sort-apply.d.ts +0 -1
- package/dist/types/sort-manager/sort-cancel.d.ts +0 -1
- package/dist/types/sort-manager/sort-clear.d.ts +0 -1
- package/dist/types/sort-manager/sort-column-select.d.ts +0 -6
- package/dist/types/sort-manager/sort-direction-select.d.ts +0 -6
- package/dist/types/sort-manager/sort-items-to-sort-model.d.ts +0 -3
- package/dist/types/sort-manager/sort-manager-context.d.ts +0 -4
- package/dist/types/sort-manager/sort-manager-impl.d.ts +0 -32
- package/dist/types/sort-manager/sort-manager.d.ts +0 -1
- package/dist/types/sort-manager/sort-model-to-sort-items.d.ts +0 -4
- package/dist/types/sort-manager/sort-remove.d.ts +0 -4
- package/dist/types/sort-manager/sort-sort-select.d.ts +0 -6
- package/dist/types/sort-manager/use-sortable-column-items.d.ts +0 -9
- package/dist/types/use-client-data-source.d.ts +0 -6
- package/dist/types/use-edge-scroll.d.ts +0 -7
- package/dist/types/use-grid.d.ts +0 -6
- package/dist/types/use-lytenyte.d.ts +0 -11
- package/dist/types/use-server-data-source.d.ts +0 -3
- package/dist/types/use-tree-data-source.d.ts +0 -3
- package/dist/types/watermark.d.ts +0 -3
- package/dist/types.js +0 -1
- package/dist/useAnchorPositioning-52zK7jlD.js +0 -241
- package/dist/useButton-DWXzFgcr.js +0 -184
- package/dist/useScrollLock-D4UY33Sb.js +0 -425
- /package/dist/{types/cell-selection → cell-selection}/cell-selection-driver.d.ts +0 -0
- /package/dist/{types/dialog → root}/dialog-driver.d.ts +0 -0
- /package/dist/{types/popover → root}/popover-driver.d.ts +0 -0
package/dist/popover.js
DELETED
|
@@ -1,795 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { useMemo, forwardRef } from "react";
|
|
4
|
-
import { clsx } from "@1771technologies/js-utils";
|
|
5
|
-
import { u as useAnchor } from "./anchor-context-Cqr_oiJt.js";
|
|
6
|
-
import { m as mergeProps, P as PropTypes, H as HTMLElementType, r as refType, n as useOpenChangeComplete, D as FloatingFocusManager, d as useEnhancedEffect, j as useEventCallback } from "./proptypes-BjYr2nFr.js";
|
|
7
|
-
import { u as usePopoverRootContext, a as usePopoverPortalContext } from "./PopoverPortalContext-BdsDjihw.js";
|
|
8
|
-
import { u as useForkRef, a as useComponentRenderer, p as popupStateMapping, I as InternalBackdrop, t as transitionStatusMapping, b as useBaseUiId } from "./InternalBackdrop-C4RACVzs.js";
|
|
9
|
-
import { u as useAnchorPositioning } from "./useAnchorPositioning-52zK7jlD.js";
|
|
10
|
-
function usePopoverPositioner(params) {
|
|
11
|
-
const {
|
|
12
|
-
open,
|
|
13
|
-
mounted
|
|
14
|
-
} = usePopoverRootContext();
|
|
15
|
-
const positioning = useAnchorPositioning(params);
|
|
16
|
-
const getPositionerProps = React.useCallback((externalProps = {}) => {
|
|
17
|
-
const hiddenStyles = {};
|
|
18
|
-
if (!open) {
|
|
19
|
-
hiddenStyles.pointerEvents = "none";
|
|
20
|
-
}
|
|
21
|
-
return mergeProps({
|
|
22
|
-
role: "presentation",
|
|
23
|
-
hidden: !mounted,
|
|
24
|
-
style: {
|
|
25
|
-
...positioning.positionerStyles,
|
|
26
|
-
...hiddenStyles
|
|
27
|
-
}
|
|
28
|
-
}, externalProps);
|
|
29
|
-
}, [open, mounted, positioning.positionerStyles]);
|
|
30
|
-
return React.useMemo(() => ({
|
|
31
|
-
getPositionerProps,
|
|
32
|
-
...positioning
|
|
33
|
-
}), [getPositionerProps, positioning]);
|
|
34
|
-
}
|
|
35
|
-
const PopoverPositionerContext = /* @__PURE__ */ React.createContext(void 0);
|
|
36
|
-
if (process.env.NODE_ENV !== "production") {
|
|
37
|
-
PopoverPositionerContext.displayName = "PopoverPositionerContext";
|
|
38
|
-
}
|
|
39
|
-
function usePopoverPositionerContext() {
|
|
40
|
-
const context = React.useContext(PopoverPositionerContext);
|
|
41
|
-
if (context === void 0) {
|
|
42
|
-
throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");
|
|
43
|
-
}
|
|
44
|
-
return context;
|
|
45
|
-
}
|
|
46
|
-
const PopoverPositioner$1 = /* @__PURE__ */ React.forwardRef(function PopoverPositioner(props, forwardedRef) {
|
|
47
|
-
const {
|
|
48
|
-
render,
|
|
49
|
-
className,
|
|
50
|
-
anchor,
|
|
51
|
-
positionMethod = "absolute",
|
|
52
|
-
side = "bottom",
|
|
53
|
-
align = "center",
|
|
54
|
-
sideOffset = 0,
|
|
55
|
-
alignOffset = 0,
|
|
56
|
-
collisionBoundary = "clipping-ancestors",
|
|
57
|
-
collisionPadding = 5,
|
|
58
|
-
arrowPadding = 5,
|
|
59
|
-
sticky = false,
|
|
60
|
-
trackAnchor = true,
|
|
61
|
-
...otherProps
|
|
62
|
-
} = props;
|
|
63
|
-
const {
|
|
64
|
-
floatingRootContext,
|
|
65
|
-
open,
|
|
66
|
-
mounted,
|
|
67
|
-
setPositionerElement,
|
|
68
|
-
modal,
|
|
69
|
-
openReason,
|
|
70
|
-
openMethod
|
|
71
|
-
} = usePopoverRootContext();
|
|
72
|
-
const keepMounted = usePopoverPortalContext();
|
|
73
|
-
const positioner = usePopoverPositioner({
|
|
74
|
-
anchor,
|
|
75
|
-
floatingRootContext,
|
|
76
|
-
positionMethod,
|
|
77
|
-
mounted,
|
|
78
|
-
open,
|
|
79
|
-
side,
|
|
80
|
-
sideOffset,
|
|
81
|
-
align,
|
|
82
|
-
alignOffset,
|
|
83
|
-
arrowPadding,
|
|
84
|
-
collisionBoundary,
|
|
85
|
-
collisionPadding,
|
|
86
|
-
sticky,
|
|
87
|
-
trackAnchor,
|
|
88
|
-
keepMounted
|
|
89
|
-
});
|
|
90
|
-
const state2 = React.useMemo(() => ({
|
|
91
|
-
open,
|
|
92
|
-
side: positioner.side,
|
|
93
|
-
align: positioner.align,
|
|
94
|
-
anchorHidden: positioner.anchorHidden
|
|
95
|
-
}), [open, positioner.side, positioner.align, positioner.anchorHidden]);
|
|
96
|
-
const mergedRef = useForkRef(forwardedRef, setPositionerElement);
|
|
97
|
-
const {
|
|
98
|
-
renderElement
|
|
99
|
-
} = useComponentRenderer({
|
|
100
|
-
propGetter: positioner.getPositionerProps,
|
|
101
|
-
render: render ?? "div",
|
|
102
|
-
className,
|
|
103
|
-
state: state2,
|
|
104
|
-
ref: mergedRef,
|
|
105
|
-
extraProps: otherProps,
|
|
106
|
-
customStyleHookMapping: popupStateMapping
|
|
107
|
-
});
|
|
108
|
-
return /* @__PURE__ */ jsxs(PopoverPositionerContext.Provider, {
|
|
109
|
-
value: positioner,
|
|
110
|
-
children: [mounted && modal && openReason !== "hover" && openMethod !== "touch" && /* @__PURE__ */ jsx(InternalBackdrop, {
|
|
111
|
-
inert: !open
|
|
112
|
-
}), renderElement()]
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
process.env.NODE_ENV !== "production" ? PopoverPositioner$1.propTypes = {
|
|
116
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
117
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
118
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
119
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
120
|
-
/**
|
|
121
|
-
* How to align the popup relative to the specified side.
|
|
122
|
-
* @default 'center'
|
|
123
|
-
*/
|
|
124
|
-
align: PropTypes.oneOf(["center", "end", "start"]),
|
|
125
|
-
/**
|
|
126
|
-
* Additional offset along the alignment axis in pixels.
|
|
127
|
-
* Also accepts a function that returns the offset to read the dimensions of the anchor
|
|
128
|
-
* and positioner elements, along with its side and alignment.
|
|
129
|
-
*
|
|
130
|
-
* - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
|
|
131
|
-
* - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
|
|
132
|
-
* - `data.side`: which side of the anchor element the positioner is aligned against.
|
|
133
|
-
* - `data.align`: how the positioner is aligned relative to the specified side.
|
|
134
|
-
* @default 0
|
|
135
|
-
*/
|
|
136
|
-
alignOffset: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),
|
|
137
|
-
/**
|
|
138
|
-
* An element to position the popup against.
|
|
139
|
-
* By default, the popup will be positioned against the trigger.
|
|
140
|
-
*/
|
|
141
|
-
anchor: PropTypes.oneOfType([HTMLElementType, refType, PropTypes.object, PropTypes.func]),
|
|
142
|
-
/**
|
|
143
|
-
* Minimum distance to maintain between the arrow and the edges of the popup.
|
|
144
|
-
*
|
|
145
|
-
* Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
|
|
146
|
-
* @default 5
|
|
147
|
-
*/
|
|
148
|
-
arrowPadding: PropTypes.number,
|
|
149
|
-
/**
|
|
150
|
-
* @ignore
|
|
151
|
-
*/
|
|
152
|
-
children: PropTypes.node,
|
|
153
|
-
/**
|
|
154
|
-
* CSS class applied to the element, or a function that
|
|
155
|
-
* returns a class based on the component’s state.
|
|
156
|
-
*/
|
|
157
|
-
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
158
|
-
/**
|
|
159
|
-
* An element or a rectangle that delimits the area that the popup is confined to.
|
|
160
|
-
* @default 'clipping-ancestors'
|
|
161
|
-
*/
|
|
162
|
-
collisionBoundary: PropTypes.oneOfType([HTMLElementType, PropTypes.arrayOf(HTMLElementType), PropTypes.string, PropTypes.shape({
|
|
163
|
-
height: PropTypes.number,
|
|
164
|
-
width: PropTypes.number,
|
|
165
|
-
x: PropTypes.number,
|
|
166
|
-
y: PropTypes.number
|
|
167
|
-
})]),
|
|
168
|
-
/**
|
|
169
|
-
* Additional space to maintain from the edge of the collision boundary.
|
|
170
|
-
* @default 5
|
|
171
|
-
*/
|
|
172
|
-
collisionPadding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
173
|
-
bottom: PropTypes.number,
|
|
174
|
-
left: PropTypes.number,
|
|
175
|
-
right: PropTypes.number,
|
|
176
|
-
top: PropTypes.number
|
|
177
|
-
})]),
|
|
178
|
-
/**
|
|
179
|
-
* Determines which CSS `position` property to use.
|
|
180
|
-
* @default 'absolute'
|
|
181
|
-
*/
|
|
182
|
-
positionMethod: PropTypes.oneOf(["absolute", "fixed"]),
|
|
183
|
-
/**
|
|
184
|
-
* Allows you to replace the component’s HTML element
|
|
185
|
-
* with a different tag, or compose it with another component.
|
|
186
|
-
*
|
|
187
|
-
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
188
|
-
*/
|
|
189
|
-
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
190
|
-
/**
|
|
191
|
-
* Which side of the anchor element to align the popup against.
|
|
192
|
-
* May automatically change to avoid collisions.
|
|
193
|
-
* @default 'bottom'
|
|
194
|
-
*/
|
|
195
|
-
side: PropTypes.oneOf(["bottom", "inline-end", "inline-start", "left", "right", "top"]),
|
|
196
|
-
/**
|
|
197
|
-
* Distance between the anchor and the popup in pixels.
|
|
198
|
-
* Also accepts a function that returns the distance to read the dimensions of the anchor
|
|
199
|
-
* and positioner elements, along with its side and alignment.
|
|
200
|
-
*
|
|
201
|
-
* - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
|
|
202
|
-
* - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
|
|
203
|
-
* - `data.side`: which side of the anchor element the positioner is aligned against.
|
|
204
|
-
* - `data.align`: how the positioner is aligned relative to the specified side.
|
|
205
|
-
* @default 0
|
|
206
|
-
*/
|
|
207
|
-
sideOffset: PropTypes.oneOfType([PropTypes.func, PropTypes.number]),
|
|
208
|
-
/**
|
|
209
|
-
* Whether to maintain the popup in the viewport after
|
|
210
|
-
* the anchor element was scrolled out of view.
|
|
211
|
-
* @default false
|
|
212
|
-
*/
|
|
213
|
-
sticky: PropTypes.bool,
|
|
214
|
-
/**
|
|
215
|
-
* Whether the popup tracks any layout shift of its positioning anchor.
|
|
216
|
-
* @default true
|
|
217
|
-
*/
|
|
218
|
-
trackAnchor: PropTypes.bool
|
|
219
|
-
} : void 0;
|
|
220
|
-
function usePopoverPopup(params) {
|
|
221
|
-
const {
|
|
222
|
-
getProps,
|
|
223
|
-
titleId,
|
|
224
|
-
descriptionId,
|
|
225
|
-
initialFocus
|
|
226
|
-
} = params;
|
|
227
|
-
const {
|
|
228
|
-
popupRef,
|
|
229
|
-
openMethod
|
|
230
|
-
} = usePopoverRootContext();
|
|
231
|
-
const getPopupProps = React.useCallback((externalProps = {}) => {
|
|
232
|
-
return mergeProps({
|
|
233
|
-
"aria-labelledby": titleId,
|
|
234
|
-
"aria-describedby": descriptionId
|
|
235
|
-
}, getProps(externalProps));
|
|
236
|
-
}, [getProps, titleId, descriptionId]);
|
|
237
|
-
const defaultInitialFocus = React.useCallback((interactionType) => {
|
|
238
|
-
if (interactionType === "touch") {
|
|
239
|
-
return popupRef;
|
|
240
|
-
}
|
|
241
|
-
return 0;
|
|
242
|
-
}, [popupRef]);
|
|
243
|
-
const resolvedInitialFocus = React.useMemo(() => {
|
|
244
|
-
if (initialFocus == null) {
|
|
245
|
-
return defaultInitialFocus(openMethod ?? "");
|
|
246
|
-
}
|
|
247
|
-
if (typeof initialFocus === "function") {
|
|
248
|
-
return initialFocus(openMethod ?? "");
|
|
249
|
-
}
|
|
250
|
-
return initialFocus;
|
|
251
|
-
}, [defaultInitialFocus, initialFocus, openMethod]);
|
|
252
|
-
return React.useMemo(() => ({
|
|
253
|
-
getPopupProps,
|
|
254
|
-
resolvedInitialFocus
|
|
255
|
-
}), [getPopupProps, resolvedInitialFocus]);
|
|
256
|
-
}
|
|
257
|
-
const customStyleHookMapping$1 = {
|
|
258
|
-
...popupStateMapping,
|
|
259
|
-
...transitionStatusMapping
|
|
260
|
-
};
|
|
261
|
-
const PopoverPopup$1 = /* @__PURE__ */ React.forwardRef(function PopoverPopup(props, forwardedRef) {
|
|
262
|
-
const {
|
|
263
|
-
className,
|
|
264
|
-
render,
|
|
265
|
-
initialFocus,
|
|
266
|
-
finalFocus,
|
|
267
|
-
...otherProps
|
|
268
|
-
} = props;
|
|
269
|
-
const {
|
|
270
|
-
open,
|
|
271
|
-
instantType,
|
|
272
|
-
transitionStatus,
|
|
273
|
-
getRootPopupProps,
|
|
274
|
-
titleId,
|
|
275
|
-
descriptionId,
|
|
276
|
-
popupRef,
|
|
277
|
-
mounted,
|
|
278
|
-
openReason,
|
|
279
|
-
onOpenChangeComplete
|
|
280
|
-
} = usePopoverRootContext();
|
|
281
|
-
const positioner = usePopoverPositionerContext();
|
|
282
|
-
useOpenChangeComplete({
|
|
283
|
-
open,
|
|
284
|
-
ref: popupRef,
|
|
285
|
-
onComplete() {
|
|
286
|
-
if (open) {
|
|
287
|
-
onOpenChangeComplete?.(true);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
const {
|
|
292
|
-
getPopupProps,
|
|
293
|
-
resolvedInitialFocus
|
|
294
|
-
} = usePopoverPopup({
|
|
295
|
-
getProps: getRootPopupProps,
|
|
296
|
-
titleId,
|
|
297
|
-
descriptionId,
|
|
298
|
-
initialFocus
|
|
299
|
-
});
|
|
300
|
-
const state2 = React.useMemo(() => ({
|
|
301
|
-
open,
|
|
302
|
-
side: positioner.side,
|
|
303
|
-
align: positioner.align,
|
|
304
|
-
instant: instantType,
|
|
305
|
-
transitionStatus
|
|
306
|
-
}), [open, positioner.side, positioner.align, instantType, transitionStatus]);
|
|
307
|
-
const mergedRef = useForkRef(popupRef, forwardedRef);
|
|
308
|
-
const {
|
|
309
|
-
renderElement
|
|
310
|
-
} = useComponentRenderer({
|
|
311
|
-
propGetter: getPopupProps,
|
|
312
|
-
ref: mergedRef,
|
|
313
|
-
render: render ?? "div",
|
|
314
|
-
className,
|
|
315
|
-
state: state2,
|
|
316
|
-
extraProps: transitionStatus === "starting" ? mergeProps({
|
|
317
|
-
style: {
|
|
318
|
-
transition: "none"
|
|
319
|
-
}
|
|
320
|
-
}, otherProps) : otherProps,
|
|
321
|
-
customStyleHookMapping: customStyleHookMapping$1
|
|
322
|
-
});
|
|
323
|
-
return /* @__PURE__ */ jsx(FloatingFocusManager, {
|
|
324
|
-
context: positioner.context,
|
|
325
|
-
modal: false,
|
|
326
|
-
disabled: !mounted || openReason === "hover",
|
|
327
|
-
initialFocus: resolvedInitialFocus,
|
|
328
|
-
returnFocus: finalFocus,
|
|
329
|
-
children: renderElement()
|
|
330
|
-
});
|
|
331
|
-
});
|
|
332
|
-
process.env.NODE_ENV !== "production" ? PopoverPopup$1.propTypes = {
|
|
333
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
334
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
335
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
336
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
337
|
-
/**
|
|
338
|
-
* @ignore
|
|
339
|
-
*/
|
|
340
|
-
children: PropTypes.node,
|
|
341
|
-
/**
|
|
342
|
-
* CSS class applied to the element, or a function that
|
|
343
|
-
* returns a class based on the component’s state.
|
|
344
|
-
*/
|
|
345
|
-
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
346
|
-
/**
|
|
347
|
-
* Determines the element to focus when the popover is closed.
|
|
348
|
-
* By default, focus returns to the trigger.
|
|
349
|
-
*/
|
|
350
|
-
finalFocus: refType,
|
|
351
|
-
/**
|
|
352
|
-
* Determines the element to focus when the popover is opened.
|
|
353
|
-
* By default, the first focusable element is focused.
|
|
354
|
-
*/
|
|
355
|
-
initialFocus: PropTypes.oneOfType([PropTypes.func, refType]),
|
|
356
|
-
/**
|
|
357
|
-
* Allows you to replace the component’s HTML element
|
|
358
|
-
* with a different tag, or compose it with another component.
|
|
359
|
-
*
|
|
360
|
-
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
361
|
-
*/
|
|
362
|
-
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
|
|
363
|
-
} : void 0;
|
|
364
|
-
const PopoverArrow$1 = /* @__PURE__ */ React.forwardRef(function PopoverArrow(props, forwardedRef) {
|
|
365
|
-
const {
|
|
366
|
-
className,
|
|
367
|
-
render,
|
|
368
|
-
...otherProps
|
|
369
|
-
} = props;
|
|
370
|
-
const {
|
|
371
|
-
open
|
|
372
|
-
} = usePopoverRootContext();
|
|
373
|
-
const {
|
|
374
|
-
arrowRef,
|
|
375
|
-
side,
|
|
376
|
-
align,
|
|
377
|
-
arrowUncentered,
|
|
378
|
-
arrowStyles
|
|
379
|
-
} = usePopoverPositionerContext();
|
|
380
|
-
const getArrowProps = React.useCallback((externalProps = {}) => {
|
|
381
|
-
return mergeProps({
|
|
382
|
-
style: arrowStyles,
|
|
383
|
-
"aria-hidden": true
|
|
384
|
-
}, externalProps);
|
|
385
|
-
}, [arrowStyles]);
|
|
386
|
-
const state2 = React.useMemo(() => ({
|
|
387
|
-
open,
|
|
388
|
-
side,
|
|
389
|
-
align,
|
|
390
|
-
uncentered: arrowUncentered
|
|
391
|
-
}), [open, side, align, arrowUncentered]);
|
|
392
|
-
const mergedRef = useForkRef(arrowRef, forwardedRef);
|
|
393
|
-
const {
|
|
394
|
-
renderElement
|
|
395
|
-
} = useComponentRenderer({
|
|
396
|
-
propGetter: getArrowProps,
|
|
397
|
-
render: render ?? "div",
|
|
398
|
-
className,
|
|
399
|
-
state: state2,
|
|
400
|
-
ref: mergedRef,
|
|
401
|
-
extraProps: otherProps,
|
|
402
|
-
customStyleHookMapping: popupStateMapping
|
|
403
|
-
});
|
|
404
|
-
return renderElement();
|
|
405
|
-
});
|
|
406
|
-
process.env.NODE_ENV !== "production" ? PopoverArrow$1.propTypes = {
|
|
407
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
408
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
409
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
410
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
411
|
-
/**
|
|
412
|
-
* @ignore
|
|
413
|
-
*/
|
|
414
|
-
children: PropTypes.node,
|
|
415
|
-
/**
|
|
416
|
-
* CSS class applied to the element, or a function that
|
|
417
|
-
* returns a class based on the component’s state.
|
|
418
|
-
*/
|
|
419
|
-
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
420
|
-
/**
|
|
421
|
-
* Allows you to replace the component’s HTML element
|
|
422
|
-
* with a different tag, or compose it with another component.
|
|
423
|
-
*
|
|
424
|
-
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
425
|
-
*/
|
|
426
|
-
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
|
|
427
|
-
} : void 0;
|
|
428
|
-
const customStyleHookMapping = {
|
|
429
|
-
...popupStateMapping,
|
|
430
|
-
...transitionStatusMapping
|
|
431
|
-
};
|
|
432
|
-
const PopoverBackdrop$1 = /* @__PURE__ */ React.forwardRef(function PopoverBackdrop(props, forwardedRef) {
|
|
433
|
-
const {
|
|
434
|
-
className,
|
|
435
|
-
render,
|
|
436
|
-
...other
|
|
437
|
-
} = props;
|
|
438
|
-
const {
|
|
439
|
-
open,
|
|
440
|
-
mounted,
|
|
441
|
-
transitionStatus,
|
|
442
|
-
openReason
|
|
443
|
-
} = usePopoverRootContext();
|
|
444
|
-
const state2 = React.useMemo(() => ({
|
|
445
|
-
open,
|
|
446
|
-
transitionStatus
|
|
447
|
-
}), [open, transitionStatus]);
|
|
448
|
-
const {
|
|
449
|
-
renderElement
|
|
450
|
-
} = useComponentRenderer({
|
|
451
|
-
render: render ?? "div",
|
|
452
|
-
className,
|
|
453
|
-
state: state2,
|
|
454
|
-
ref: forwardedRef,
|
|
455
|
-
extraProps: mergeProps({
|
|
456
|
-
role: "presentation",
|
|
457
|
-
hidden: !mounted,
|
|
458
|
-
style: openReason === "hover" ? {
|
|
459
|
-
pointerEvents: "none"
|
|
460
|
-
} : {}
|
|
461
|
-
}, other),
|
|
462
|
-
customStyleHookMapping
|
|
463
|
-
});
|
|
464
|
-
return renderElement();
|
|
465
|
-
});
|
|
466
|
-
process.env.NODE_ENV !== "production" ? PopoverBackdrop$1.propTypes = {
|
|
467
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
468
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
469
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
470
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
471
|
-
/**
|
|
472
|
-
* @ignore
|
|
473
|
-
*/
|
|
474
|
-
children: PropTypes.node,
|
|
475
|
-
/**
|
|
476
|
-
* CSS class applied to the element, or a function that
|
|
477
|
-
* returns a class based on the component’s state.
|
|
478
|
-
*/
|
|
479
|
-
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
480
|
-
/**
|
|
481
|
-
* Allows you to replace the component’s HTML element
|
|
482
|
-
* with a different tag, or compose it with another component.
|
|
483
|
-
*
|
|
484
|
-
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
485
|
-
*/
|
|
486
|
-
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
|
|
487
|
-
} : void 0;
|
|
488
|
-
function usePopoverTitle(params) {
|
|
489
|
-
const {
|
|
490
|
-
titleId,
|
|
491
|
-
setTitleId
|
|
492
|
-
} = params;
|
|
493
|
-
const id = useBaseUiId(titleId);
|
|
494
|
-
const getTitleProps = React.useCallback((externalProps = {}) => {
|
|
495
|
-
return mergeProps({
|
|
496
|
-
id
|
|
497
|
-
}, externalProps);
|
|
498
|
-
}, [id]);
|
|
499
|
-
useEnhancedEffect(() => {
|
|
500
|
-
setTitleId(id);
|
|
501
|
-
return () => {
|
|
502
|
-
setTitleId(void 0);
|
|
503
|
-
};
|
|
504
|
-
}, [setTitleId, id]);
|
|
505
|
-
return React.useMemo(() => ({
|
|
506
|
-
getTitleProps
|
|
507
|
-
}), [getTitleProps]);
|
|
508
|
-
}
|
|
509
|
-
const state$2 = {};
|
|
510
|
-
const PopoverTitle$1 = /* @__PURE__ */ React.forwardRef(function PopoverTitle(props, forwardedRef) {
|
|
511
|
-
const {
|
|
512
|
-
render,
|
|
513
|
-
className,
|
|
514
|
-
...otherProps
|
|
515
|
-
} = props;
|
|
516
|
-
const {
|
|
517
|
-
setTitleId
|
|
518
|
-
} = usePopoverRootContext();
|
|
519
|
-
const {
|
|
520
|
-
getTitleProps
|
|
521
|
-
} = usePopoverTitle({
|
|
522
|
-
titleId: otherProps.id,
|
|
523
|
-
setTitleId
|
|
524
|
-
});
|
|
525
|
-
const {
|
|
526
|
-
renderElement
|
|
527
|
-
} = useComponentRenderer({
|
|
528
|
-
propGetter: getTitleProps,
|
|
529
|
-
render: render ?? "h2",
|
|
530
|
-
className,
|
|
531
|
-
state: state$2,
|
|
532
|
-
ref: forwardedRef,
|
|
533
|
-
extraProps: otherProps
|
|
534
|
-
});
|
|
535
|
-
return renderElement();
|
|
536
|
-
});
|
|
537
|
-
process.env.NODE_ENV !== "production" ? PopoverTitle$1.propTypes = {
|
|
538
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
539
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
540
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
541
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
542
|
-
/**
|
|
543
|
-
* @ignore
|
|
544
|
-
*/
|
|
545
|
-
children: PropTypes.node,
|
|
546
|
-
/**
|
|
547
|
-
* CSS class applied to the element, or a function that
|
|
548
|
-
* returns a class based on the component’s state.
|
|
549
|
-
*/
|
|
550
|
-
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
551
|
-
/**
|
|
552
|
-
* @ignore
|
|
553
|
-
*/
|
|
554
|
-
id: PropTypes.string,
|
|
555
|
-
/**
|
|
556
|
-
* Allows you to replace the component’s HTML element
|
|
557
|
-
* with a different tag, or compose it with another component.
|
|
558
|
-
*
|
|
559
|
-
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
560
|
-
*/
|
|
561
|
-
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
|
|
562
|
-
} : void 0;
|
|
563
|
-
function usePopoverDescription(params) {
|
|
564
|
-
const {
|
|
565
|
-
descriptionId,
|
|
566
|
-
setDescriptionId
|
|
567
|
-
} = params;
|
|
568
|
-
const id = useBaseUiId(descriptionId);
|
|
569
|
-
const getDescriptionProps = React.useCallback((externalProps = {}) => {
|
|
570
|
-
return mergeProps({
|
|
571
|
-
id
|
|
572
|
-
}, externalProps);
|
|
573
|
-
}, [id]);
|
|
574
|
-
useEnhancedEffect(() => {
|
|
575
|
-
setDescriptionId(id);
|
|
576
|
-
return () => {
|
|
577
|
-
setDescriptionId(void 0);
|
|
578
|
-
};
|
|
579
|
-
}, [setDescriptionId, id]);
|
|
580
|
-
return React.useMemo(() => ({
|
|
581
|
-
getDescriptionProps
|
|
582
|
-
}), [getDescriptionProps]);
|
|
583
|
-
}
|
|
584
|
-
const state$1 = {};
|
|
585
|
-
const PopoverDescription$1 = /* @__PURE__ */ React.forwardRef(function PopoverDescription(props, forwardedRef) {
|
|
586
|
-
const {
|
|
587
|
-
render,
|
|
588
|
-
className,
|
|
589
|
-
...otherProps
|
|
590
|
-
} = props;
|
|
591
|
-
const {
|
|
592
|
-
setDescriptionId
|
|
593
|
-
} = usePopoverRootContext();
|
|
594
|
-
const {
|
|
595
|
-
getDescriptionProps
|
|
596
|
-
} = usePopoverDescription({
|
|
597
|
-
descriptionId: otherProps.id,
|
|
598
|
-
setDescriptionId
|
|
599
|
-
});
|
|
600
|
-
const {
|
|
601
|
-
renderElement
|
|
602
|
-
} = useComponentRenderer({
|
|
603
|
-
propGetter: getDescriptionProps,
|
|
604
|
-
render: render ?? "p",
|
|
605
|
-
className,
|
|
606
|
-
state: state$1,
|
|
607
|
-
ref: forwardedRef,
|
|
608
|
-
extraProps: otherProps
|
|
609
|
-
});
|
|
610
|
-
return renderElement();
|
|
611
|
-
});
|
|
612
|
-
process.env.NODE_ENV !== "production" ? PopoverDescription$1.propTypes = {
|
|
613
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
614
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
615
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
616
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
617
|
-
/**
|
|
618
|
-
* @ignore
|
|
619
|
-
*/
|
|
620
|
-
children: PropTypes.node,
|
|
621
|
-
/**
|
|
622
|
-
* CSS class applied to the element, or a function that
|
|
623
|
-
* returns a class based on the component’s state.
|
|
624
|
-
*/
|
|
625
|
-
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
626
|
-
/**
|
|
627
|
-
* @ignore
|
|
628
|
-
*/
|
|
629
|
-
id: PropTypes.string,
|
|
630
|
-
/**
|
|
631
|
-
* Allows you to replace the component’s HTML element
|
|
632
|
-
* with a different tag, or compose it with another component.
|
|
633
|
-
*
|
|
634
|
-
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
635
|
-
*/
|
|
636
|
-
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
|
|
637
|
-
} : void 0;
|
|
638
|
-
function usePopoverClose(params) {
|
|
639
|
-
const {
|
|
640
|
-
onClose: onCloseProp
|
|
641
|
-
} = params;
|
|
642
|
-
const onClose = useEventCallback(onCloseProp);
|
|
643
|
-
const getCloseProps = React.useCallback((externalProps = {}) => {
|
|
644
|
-
return mergeProps({
|
|
645
|
-
onClick: onClose
|
|
646
|
-
}, externalProps);
|
|
647
|
-
}, [onClose]);
|
|
648
|
-
return React.useMemo(() => ({
|
|
649
|
-
getCloseProps
|
|
650
|
-
}), [getCloseProps]);
|
|
651
|
-
}
|
|
652
|
-
const state = {};
|
|
653
|
-
const PopoverClose$1 = /* @__PURE__ */ React.forwardRef(function PopoverClose(props, forwardedRef) {
|
|
654
|
-
const {
|
|
655
|
-
render,
|
|
656
|
-
className,
|
|
657
|
-
...otherProps
|
|
658
|
-
} = props;
|
|
659
|
-
const {
|
|
660
|
-
setOpen
|
|
661
|
-
} = usePopoverRootContext();
|
|
662
|
-
const {
|
|
663
|
-
getCloseProps
|
|
664
|
-
} = usePopoverClose({
|
|
665
|
-
onClose() {
|
|
666
|
-
setOpen(false);
|
|
667
|
-
}
|
|
668
|
-
});
|
|
669
|
-
const {
|
|
670
|
-
renderElement
|
|
671
|
-
} = useComponentRenderer({
|
|
672
|
-
propGetter: getCloseProps,
|
|
673
|
-
render: render ?? "button",
|
|
674
|
-
className,
|
|
675
|
-
state,
|
|
676
|
-
extraProps: otherProps,
|
|
677
|
-
ref: forwardedRef
|
|
678
|
-
});
|
|
679
|
-
return renderElement();
|
|
680
|
-
});
|
|
681
|
-
process.env.NODE_ENV !== "production" ? PopoverClose$1.propTypes = {
|
|
682
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
683
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
684
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
685
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
686
|
-
/**
|
|
687
|
-
* @ignore
|
|
688
|
-
*/
|
|
689
|
-
children: PropTypes.node,
|
|
690
|
-
/**
|
|
691
|
-
* CSS class applied to the element, or a function that
|
|
692
|
-
* returns a class based on the component’s state.
|
|
693
|
-
*/
|
|
694
|
-
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
695
|
-
/**
|
|
696
|
-
* Allows you to replace the component’s HTML element
|
|
697
|
-
* with a different tag, or compose it with another component.
|
|
698
|
-
*
|
|
699
|
-
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
700
|
-
*/
|
|
701
|
-
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
|
|
702
|
-
} : void 0;
|
|
703
|
-
function usePopoverClass(name, className) {
|
|
704
|
-
return useMemo(() => {
|
|
705
|
-
if (typeof className !== "function") return clsx(name, className);
|
|
706
|
-
return (p) => clsx(name, className(p));
|
|
707
|
-
}, [className, name]);
|
|
708
|
-
}
|
|
709
|
-
function ArrowSvg(props) {
|
|
710
|
-
return /* @__PURE__ */ jsxs("svg", { width: "20", height: "10", viewBox: "0 0 20 10", fill: "currentcolor", ...props, children: [
|
|
711
|
-
/* @__PURE__ */ jsx(
|
|
712
|
-
"path",
|
|
713
|
-
{
|
|
714
|
-
fill: "var(--lng1771-gray-05)",
|
|
715
|
-
d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z"
|
|
716
|
-
}
|
|
717
|
-
),
|
|
718
|
-
/* @__PURE__ */ jsx(
|
|
719
|
-
"path",
|
|
720
|
-
{
|
|
721
|
-
fill: "var(--lng1771-gray-05)",
|
|
722
|
-
d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z"
|
|
723
|
-
}
|
|
724
|
-
),
|
|
725
|
-
/* @__PURE__ */ jsx(
|
|
726
|
-
"path",
|
|
727
|
-
{
|
|
728
|
-
fill: "var(--lng1771-gray-30)",
|
|
729
|
-
d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z"
|
|
730
|
-
}
|
|
731
|
-
)
|
|
732
|
-
] });
|
|
733
|
-
}
|
|
734
|
-
const PopoverBackdrop2 = forwardRef(function PopoverBackdrop22({ className, ...props }, ref) {
|
|
735
|
-
const cl = usePopoverClass("lng1771-popover__backdrop", className);
|
|
736
|
-
return /* @__PURE__ */ jsx(PopoverBackdrop$1, { ...props, ref, className: cl });
|
|
737
|
-
});
|
|
738
|
-
const PopoverPopup2 = forwardRef(function PopoverPopup22({ className, ...props }, ref) {
|
|
739
|
-
const cl = usePopoverClass("lng1771-popover", className);
|
|
740
|
-
return /* @__PURE__ */ jsx(PopoverPopup$1, { ...props, ref, className: cl });
|
|
741
|
-
});
|
|
742
|
-
const PopoverTitle2 = forwardRef(function PopoverTitle22({ className, ...props }, ref) {
|
|
743
|
-
const cl = usePopoverClass("lng1771-popover__title", className);
|
|
744
|
-
return /* @__PURE__ */ jsx(PopoverTitle$1, { ...props, ref, className: cl });
|
|
745
|
-
});
|
|
746
|
-
const PopoverDescription2 = forwardRef(function PopoverDescription22({ className, ...props }, ref) {
|
|
747
|
-
const cl = usePopoverClass("lng1771-popover__description", className);
|
|
748
|
-
return /* @__PURE__ */ jsx(PopoverDescription$1, { ...props, ref, className: cl });
|
|
749
|
-
});
|
|
750
|
-
const PopoverClose2 = forwardRef(function PopoverClose22({ className, ...props }, ref) {
|
|
751
|
-
const cl = usePopoverClass("lng1771-popover__close", className);
|
|
752
|
-
return /* @__PURE__ */ jsx(PopoverClose$1, { ...props, ref, className: cl });
|
|
753
|
-
});
|
|
754
|
-
const PopoverPositioner2 = forwardRef(function PopoverPositioner22({ className, ...props }, ref) {
|
|
755
|
-
const target = useAnchor();
|
|
756
|
-
const cl = usePopoverClass("lng1771-popover__positioner", className);
|
|
757
|
-
return /* @__PURE__ */ jsx(
|
|
758
|
-
PopoverPositioner$1,
|
|
759
|
-
{
|
|
760
|
-
anchor: target ? "getBoundingClientRect" in target ? target : {
|
|
761
|
-
getBoundingClientRect: () => ({
|
|
762
|
-
x: target.x,
|
|
763
|
-
y: target.y,
|
|
764
|
-
width: target.width,
|
|
765
|
-
height: target.height,
|
|
766
|
-
top: target.y,
|
|
767
|
-
left: target.x,
|
|
768
|
-
bottom: target.y,
|
|
769
|
-
right: target.x,
|
|
770
|
-
toJSON: () => ""
|
|
771
|
-
})
|
|
772
|
-
} : void 0,
|
|
773
|
-
sideOffset: 8,
|
|
774
|
-
...props,
|
|
775
|
-
ref,
|
|
776
|
-
className: cl
|
|
777
|
-
}
|
|
778
|
-
);
|
|
779
|
-
});
|
|
780
|
-
const PopoverArrow2 = forwardRef(function PopoverArrow22({ className, ...props }, ref) {
|
|
781
|
-
const cl = usePopoverClass("lng1771-popover__arrow", className);
|
|
782
|
-
return /* @__PURE__ */ jsx(PopoverArrow$1, { ...props, ref, className: cl, children: props.children ?? /* @__PURE__ */ jsx(ArrowSvg, {}) });
|
|
783
|
-
});
|
|
784
|
-
const Popover = {
|
|
785
|
-
Arrow: PopoverArrow2,
|
|
786
|
-
Backdrop: PopoverBackdrop2,
|
|
787
|
-
Close: PopoverClose2,
|
|
788
|
-
Description: PopoverDescription2,
|
|
789
|
-
Container: PopoverPopup2,
|
|
790
|
-
Positioner: PopoverPositioner2,
|
|
791
|
-
Title: PopoverTitle2
|
|
792
|
-
};
|
|
793
|
-
export {
|
|
794
|
-
Popover
|
|
795
|
-
};
|