@1771technologies/lytenyte-pro 2.0.0-dev.0 → 2.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__play__/alpha.play.d.ts +3 -0
- package/dist/__play__/alpha.play.js +56 -0
- package/dist/__play__/basic-server-data/data.d.ts +10 -0
- package/dist/__play__/basic-server-data/data.js +17746 -0
- package/dist/__play__/basic-server-data/server.d.ts +36 -0
- package/dist/__play__/basic-server-data/server.js +105 -0
- package/dist/__play__/buttons.play.d.ts +4 -0
- package/dist/__play__/buttons.play.js +7 -0
- package/dist/__play__/inputs.play.d.ts +3 -0
- package/dist/__play__/inputs.play.js +13 -0
- package/dist/__play__/server.play.d.ts +3 -0
- package/dist/__play__/server.play.js +66 -0
- package/dist/__play__/tree.play.d.ts +3 -0
- package/dist/__play__/tree.play.js +47 -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 +3 -0
- package/dist/cell-selection/bound-selection-rect.js +16 -0
- package/dist/cell-selection/cell-selection-containers.d.ts +3 -0
- package/dist/cell-selection/cell-selection-containers.js +86 -0
- package/dist/cell-selection/cell-selection-driver/cell-selection-driver.d.ts +1 -0
- package/dist/cell-selection/cell-selection-driver/cell-selection-driver.js +279 -0
- package/dist/cell-selection/cell-selection-driver/use-cell-focus-change.d.ts +6 -0
- package/dist/cell-selection/cell-selection-driver/use-cell-focus-change.js +34 -0
- package/dist/cell-selection/cell-style-row.d.ts +8 -0
- package/dist/cell-selection/cell-style-row.js +79 -0
- package/dist/cell-selection/data-rect-from-cell-position.d.ts +3 -0
- package/dist/cell-selection/data-rect-from-cell-position.js +17 -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-selection-down.d.ts +3 -0
- package/dist/cell-selection/expand-selection-down.js +78 -0
- package/dist/cell-selection/expand-selection-end.d.ts +3 -0
- package/dist/cell-selection/expand-selection-end.js +76 -0
- package/dist/cell-selection/expand-selection-start.d.ts +3 -0
- package/dist/cell-selection/expand-selection-start.js +73 -0
- package/dist/cell-selection/expand-selection-up.d.ts +3 -0
- package/dist/cell-selection/expand-selection-up.js +74 -0
- package/dist/cell-selection/full-width-start-end-index.d.ts +2 -0
- package/dist/cell-selection/full-width-start-end-index.js +4 -0
- package/dist/cell-selection/get-root-cell.d.ts +3 -0
- package/dist/cell-selection/get-root-cell.js +6 -0
- package/dist/cell-selection/index.d.ts +13 -0
- package/dist/cell-selection/index.js +13 -0
- package/dist/cell-selection/is-bottom-rect.d.ts +2 -0
- package/dist/cell-selection/is-bottom-rect.js +4 -0
- package/dist/cell-selection/is-center-col-rect.d.ts +5 -0
- package/dist/cell-selection/is-center-col-rect.js +3 -0
- package/dist/cell-selection/is-center-rect.d.ts +2 -0
- package/dist/cell-selection/is-center-rect.js +4 -0
- package/dist/cell-selection/is-end-rect.d.ts +5 -0
- package/dist/cell-selection/is-end-rect.js +3 -0
- package/dist/cell-selection/is-fully-within-rect.d.ts +2 -0
- package/dist/cell-selection/is-fully-within-rect.js +6 -0
- package/dist/cell-selection/is-overlapping-rect.d.ts +2 -0
- package/dist/cell-selection/is-overlapping-rect.js +5 -0
- package/dist/cell-selection/is-start-rect.d.ts +5 -0
- package/dist/cell-selection/is-start-rect.js +3 -0
- package/dist/cell-selection/is-top-rect.d.ts +2 -0
- package/dist/cell-selection/is-top-rect.js +3 -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 +47 -0
- package/dist/cell-selection/split-cell-selection-rect.js +88 -0
- package/dist/cell-selection/split-on-pivot.d.ts +3 -0
- package/dist/cell-selection/split-on-pivot.js +50 -0
- package/dist/cell-selection/update-additive-cell-selection.d.ts +4 -0
- package/dist/cell-selection/update-additive-cell-selection.js +21 -0
- package/dist/cell-selection/use-edge-scroll.d.ts +6 -0
- package/dist/cell-selection/use-edge-scroll.js +71 -0
- package/dist/components/checkbox/checkbox.d.ts +15 -0
- package/dist/components/checkbox/checkbox.js +42 -0
- package/dist/components/checkbox/checkbox.play.d.ts +2 -0
- package/dist/components/checkbox/checkbox.play.js +6 -0
- package/dist/components/column-manager/column-manager.d.ts +13 -0
- package/dist/components/column-manager/column-manager.js +47 -0
- package/dist/components/external/clsx.d.ts +2 -0
- package/dist/components/external/clsx.js +44 -0
- package/dist/components/external/floating-ui.d.ts +268 -0
- package/dist/components/external/floating-ui.js +1802 -0
- package/dist/components/headless/dialog/arrow.d.ts +6 -0
- package/dist/components/headless/dialog/arrow.js +16 -0
- package/dist/components/headless/dialog/close.d.ts +10 -0
- package/dist/components/headless/dialog/close.js +22 -0
- package/dist/components/headless/dialog/container.d.ts +5 -0
- package/dist/components/headless/dialog/container.js +221 -0
- package/dist/components/headless/dialog/context.d.ts +32 -0
- package/dist/components/headless/dialog/context.js +3 -0
- package/dist/components/headless/dialog/description.d.ts +9 -0
- package/dist/components/headless/dialog/description.js +20 -0
- package/dist/components/headless/dialog/index.parts.d.ts +30 -0
- package/dist/components/headless/dialog/index.parts.js +17 -0
- package/dist/components/headless/dialog/root.d.ts +32 -0
- package/dist/components/headless/dialog/root.js +75 -0
- package/dist/components/headless/dialog/title.d.ts +9 -0
- package/dist/components/headless/dialog/title.js +20 -0
- package/dist/components/headless/dialog/transform-origin.d.ts +5 -0
- package/dist/components/headless/dialog/transform-origin.js +38 -0
- package/dist/components/headless/dialog/trigger.d.ts +10 -0
- package/dist/components/headless/dialog/trigger.js +24 -0
- package/dist/components/headless/dialog/use-dialog.d.ts +4 -0
- package/dist/components/headless/dialog/use-dialog.js +12 -0
- package/dist/components/headless/menu/checkbox-item.d.ts +11 -0
- package/dist/components/headless/menu/checkbox-item.js +42 -0
- package/dist/components/headless/menu/combo/combo-checkbox.d.ts +11 -0
- package/dist/components/headless/menu/combo/combo-checkbox.js +38 -0
- package/dist/components/headless/menu/combo/combo-context.d.ts +9 -0
- package/dist/components/headless/menu/combo/combo-context.js +3 -0
- package/dist/components/headless/menu/combo/combo-input.d.ts +7 -0
- package/dist/components/headless/menu/combo/combo-input.js +58 -0
- package/dist/components/headless/menu/combo/combo-menu.d.ts +5 -0
- package/dist/components/headless/menu/combo/combo-menu.js +24 -0
- package/dist/components/headless/menu/combo/combo-option.d.ts +9 -0
- package/dist/components/headless/menu/combo/combo-option.js +37 -0
- package/dist/components/headless/menu/container.d.ts +5 -0
- package/dist/components/headless/menu/container.js +19 -0
- package/dist/components/headless/menu/dom.d.ts +4 -0
- package/dist/components/headless/menu/dom.js +20 -0
- package/dist/components/headless/menu/index.d.ts +54 -0
- package/dist/components/headless/menu/index.js +39 -0
- package/dist/components/headless/menu/item/handle-vertical-navigation.d.ts +2 -0
- package/dist/components/headless/menu/item/handle-vertical-navigation.js +28 -0
- package/dist/components/headless/menu/item/item.d.ts +9 -0
- package/dist/components/headless/menu/item/item.js +45 -0
- package/dist/components/headless/menu/item/use-menu-item-events.d.ts +1 -0
- package/dist/components/headless/menu/item/use-menu-item-events.js +25 -0
- package/dist/components/headless/menu/menu-divider.d.ts +5 -0
- package/dist/components/headless/menu/menu-divider.js +6 -0
- package/dist/components/headless/menu/menu-group.d.ts +5 -0
- package/dist/components/headless/menu/menu-group.js +6 -0
- package/dist/components/headless/menu/menu-header.d.ts +5 -0
- package/dist/components/headless/menu/menu-header.js +6 -0
- package/dist/components/headless/menu/popover.d.ts +5 -0
- package/dist/components/headless/menu/popover.js +7 -0
- package/dist/components/headless/menu/radio-group/context.d.ts +11 -0
- package/dist/components/headless/menu/radio-group/context.js +7 -0
- package/dist/components/headless/menu/radio-group/radio-item.d.ts +10 -0
- package/dist/components/headless/menu/radio-group/radio-item.js +44 -0
- package/dist/components/headless/menu/submenu/submenu-context.d.ts +9 -0
- package/dist/components/headless/menu/submenu/submenu-context.js +3 -0
- package/dist/components/headless/menu/submenu/submenu-trigger.d.ts +7 -0
- package/dist/components/headless/menu/submenu/submenu-trigger.js +70 -0
- package/dist/components/headless/menu/submenu/submenu.d.ts +21 -0
- package/dist/components/headless/menu/submenu/submenu.js +55 -0
- package/dist/components/headless/menu/submenu/use-submenu-position.d.ts +5 -0
- package/dist/components/headless/menu/submenu/use-submenu-position.js +31 -0
- package/dist/components/headless/menu/use-menu.d.ts +1 -0
- package/dist/components/headless/menu/use-menu.js +52 -0
- package/dist/components/headless/popover/container.d.ts +5 -0
- package/dist/components/headless/popover/container.js +7 -0
- package/dist/components/headless/popover/context.d.ts +6 -0
- package/dist/components/headless/popover/context.js +3 -0
- package/dist/components/headless/popover/index.d.ts +30 -0
- package/dist/components/headless/popover/index.js +17 -0
- package/dist/components/headless/popover/root.d.ts +6 -0
- package/dist/components/headless/popover/root.js +8 -0
- package/dist/components/headless/popover/trigger.d.ts +7 -0
- package/dist/components/headless/popover/trigger.js +11 -0
- package/dist/components/pill-manager/container.d.ts +5 -0
- package/dist/components/pill-manager/container.js +127 -0
- package/dist/components/pill-manager/expander.d.ts +9 -0
- package/dist/components/pill-manager/expander.js +21 -0
- package/dist/components/pill-manager/icons.d.ts +12 -0
- package/dist/components/pill-manager/icons.js +35 -0
- package/dist/components/pill-manager/index.d.ts +33 -0
- package/dist/components/pill-manager/index.js +13 -0
- package/dist/components/pill-manager/item.d.ts +10 -0
- package/dist/components/pill-manager/item.js +178 -0
- package/dist/components/pill-manager/label.d.ts +10 -0
- package/dist/components/pill-manager/label.js +31 -0
- package/dist/components/pill-manager/pill-manager.play.d.ts +3 -0
- package/dist/components/pill-manager/pill-manager.play.js +73 -0
- package/dist/components/pill-manager/pill-row.context.d.ts +8 -0
- package/dist/components/pill-manager/pill-row.context.js +4 -0
- package/dist/components/pill-manager/pill-row.d.ts +12 -0
- package/dist/components/pill-manager/pill-row.js +22 -0
- package/dist/components/pill-manager/root.context.d.ts +40 -0
- package/dist/components/pill-manager/root.context.js +4 -0
- package/dist/components/pill-manager/root.d.ts +25 -0
- package/dist/components/pill-manager/root.js +33 -0
- package/dist/components/pill-manager/row-default.d.ts +3 -0
- package/dist/components/pill-manager/row-default.js +14 -0
- package/dist/components/pill-manager/types.d.ts +21 -0
- package/dist/components/pill-manager/types.js +1 -0
- package/dist/components/row-group-cell.d.ts +13 -0
- package/dist/components/row-group-cell.js +40 -0
- package/dist/components/select-all.d.ts +12 -0
- package/dist/components/select-all.js +34 -0
- package/dist/components/smart-select/chip-context.d.ts +8 -0
- package/dist/components/smart-select/chip-context.js +4 -0
- package/dist/components/smart-select/chip-remove.d.ts +1 -0
- package/dist/components/smart-select/chip-remove.js +13 -0
- package/dist/components/smart-select/chip.d.ts +13 -0
- package/dist/components/smart-select/chip.js +79 -0
- package/dist/components/smart-select/container.d.ts +1 -0
- package/dist/components/smart-select/container.js +13 -0
- package/dist/components/smart-select/context.d.ts +31 -0
- package/dist/components/smart-select/context.js +4 -0
- package/dist/components/smart-select/index.d.ts +30 -0
- package/dist/components/smart-select/index.js +19 -0
- package/dist/components/smart-select/option.d.ts +8 -0
- package/dist/components/smart-select/option.js +36 -0
- package/dist/components/smart-select/root.d.ts +17 -0
- package/dist/components/smart-select/root.js +165 -0
- package/dist/components/smart-select/smart-select.play.d.ts +2 -0
- package/dist/components/smart-select/smart-select.play.js +36 -0
- package/dist/components/smart-select/triggers/basic-trigger.d.ts +1 -0
- package/dist/components/smart-select/triggers/basic-trigger.js +18 -0
- package/dist/components/smart-select/triggers/combo-trigger.d.ts +1 -0
- package/dist/components/smart-select/triggers/combo-trigger.js +17 -0
- package/dist/components/smart-select/triggers/is-selectable-option.d.ts +1 -0
- package/dist/components/smart-select/triggers/is-selectable-option.js +3 -0
- package/dist/components/smart-select/triggers/multi-combo-trigger.d.ts +11 -0
- package/dist/components/smart-select/triggers/multi-combo-trigger.js +38 -0
- package/dist/components/smart-select/triggers/multi-trigger.d.ts +6 -0
- package/dist/components/smart-select/triggers/multi-trigger.js +8 -0
- package/dist/components/smart-select/triggers/use-combo-controls.d.ts +9 -0
- package/dist/components/smart-select/triggers/use-combo-controls.js +145 -0
- package/dist/components/smart-select/triggers/use-trigger-controls.d.ts +5 -0
- package/dist/components/smart-select/triggers/use-trigger-controls.js +126 -0
- package/dist/components/smart-select/type.d.ts +44 -0
- package/dist/components/smart-select/type.js +1 -0
- package/dist/components/smart-select/use-async-options.d.ts +8 -0
- package/dist/components/smart-select/use-async-options.js +42 -0
- package/dist/components/tree-view/index.d.ts +4 -0
- package/dist/components/tree-view/index.js +2 -0
- package/dist/components/tree-view/root.d.ts +37 -0
- package/dist/components/tree-view/root.js +139 -0
- package/dist/components/tree-view/select-all.d.ts +7 -0
- package/dist/components/tree-view/select-all.js +22 -0
- package/dist/components/tree-view/tree-children.d.ts +2 -0
- package/dist/components/tree-view/tree-children.js +15 -0
- package/dist/components/tree-view/types.d.ts +31 -0
- package/dist/components/tree-view/types.js +1 -0
- package/dist/components/types.d.ts +4 -0
- package/dist/components/types.js +1 -0
- package/dist/components/virtual-from-coordinates.d.ts +2 -0
- package/dist/components/virtual-from-coordinates.js +15 -0
- package/dist/components.d.ts +16 -0
- package/dist/components.js +11 -0
- package/dist/data-source-client/hooks/get-valid-leafs.d.ts +3 -0
- package/dist/data-source-client/hooks/get-valid-leafs.js +11 -0
- package/dist/data-source-client/hooks/use-controlled-ds-state.d.ts +13 -0
- package/dist/data-source-client/hooks/use-controlled-ds-state.js +39 -0
- package/dist/data-source-client/hooks/use-flattened-data.d.ts +18 -0
- package/dist/data-source-client/hooks/use-flattened-data.js +40 -0
- package/dist/data-source-client/hooks/use-flattened-groups.d.ts +5 -0
- package/dist/data-source-client/hooks/use-flattened-groups.js +63 -0
- package/dist/data-source-client/hooks/use-flattened-piece.d.ts +14 -0
- package/dist/data-source-client/hooks/use-flattened-piece.js +55 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-child.d.ts +2 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-child.js +11 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-last.d.ts +2 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse-last.js +14 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse.d.ts +2 -0
- package/dist/data-source-client/hooks/use-group-tree/collapse.js +17 -0
- package/dist/data-source-client/hooks/use-group-tree/use-group-tree.d.ts +31 -0
- package/dist/data-source-client/hooks/use-group-tree/use-group-tree.js +152 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/apply-reference-column.d.ts +2 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/apply-reference-column.js +22 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/evaluate-label-filter.d.ts +2 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/evaluate-label-filter.js +9 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths-with-totals.d.ts +18 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths-with-totals.js +140 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths.d.ts +4 -0
- package/dist/data-source-client/hooks/use-pivot/auxiliary-functions/pivot-paths.js +31 -0
- package/dist/data-source-client/hooks/use-pivot/use-agg-model.d.ts +4 -0
- package/dist/data-source-client/hooks/use-pivot/use-agg-model.js +45 -0
- package/dist/data-source-client/hooks/use-pivot/use-filtered-data.d.ts +2 -0
- package/dist/data-source-client/hooks/use-pivot/use-filtered-data.js +18 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.d.ts +14 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.js +151 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-data.d.ts +32 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-data.js +83 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-group-fn.d.ts +4 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-group-fn.js +23 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-state.d.ts +16 -0
- package/dist/data-source-client/hooks/use-pivot/use-pivot-state.js +40 -0
- package/dist/data-source-client/use-client-data-source.d.ts +91 -0
- package/dist/data-source-client/use-client-data-source.js +169 -0
- package/dist/data-source-server/async-tree/+constants.async-tree.d.ts +1 -0
- package/dist/data-source-server/async-tree/+constants.async-tree.js +1 -0
- package/dist/data-source-server/async-tree/apply-delete-action-to-tree.d.ts +2 -0
- package/dist/data-source-server/async-tree/apply-delete-action-to-tree.js +27 -0
- package/dist/data-source-server/async-tree/apply-set-action-to-tree.d.ts +2 -0
- package/dist/data-source-server/async-tree/apply-set-action-to-tree.js +26 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-unique.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-unique.js +20 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-valid.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-are-valid.js +12 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-fit.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-keys-fit.js +18 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-kinds.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action-item-kinds.js +12 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action.d.ts +2 -0
- package/dist/data-source-server/async-tree/data-integrity-checks/check-set-action.js +24 -0
- package/dist/data-source-server/async-tree/get-parent-node-by-path.d.ts +2 -0
- package/dist/data-source-server/async-tree/get-parent-node-by-path.js +18 -0
- package/dist/data-source-server/async-tree/is-set-action-a-no-op-on-node.d.ts +2 -0
- package/dist/data-source-server/async-tree/is-set-action-a-no-op-on-node.js +3 -0
- package/dist/data-source-server/async-tree/make-async-tree.d.ts +2 -0
- package/dist/data-source-server/async-tree/make-async-tree.js +64 -0
- package/dist/data-source-server/async-tree/maybe-apply-parent-remove-self.d.ts +2 -0
- package/dist/data-source-server/async-tree/maybe-apply-parent-remove-self.js +8 -0
- package/dist/data-source-server/async-tree/maybe-apply-resize.d.ts +2 -0
- package/dist/data-source-server/async-tree/maybe-apply-resize.js +17 -0
- package/dist/data-source-server/async-tree/maybe-apply-set-action-items.d.ts +2 -0
- package/dist/data-source-server/async-tree/maybe-apply-set-action-items.js +54 -0
- package/dist/data-source-server/async-tree/types.d.ts +70 -0
- package/dist/data-source-server/async-tree/types.js +1 -0
- package/dist/data-source-server/range-tree/range-tree.d.ts +66 -0
- package/dist/data-source-server/range-tree/range-tree.js +102 -0
- package/dist/data-source-server/server-data.d.ts +73 -0
- package/dist/data-source-server/server-data.js +553 -0
- package/dist/data-source-server/source/use-on-rows-updated.d.ts +4 -0
- package/dist/data-source-server/source/use-on-rows-updated.js +29 -0
- package/dist/data-source-server/source/use-on-view-change.d.ts +3 -0
- package/dist/data-source-server/source/use-on-view-change.js +13 -0
- package/dist/data-source-server/source/use-row-add.d.ts +3 -0
- package/dist/data-source-server/source/use-row-add.js +36 -0
- package/dist/data-source-server/source/use-row-by-id.d.ts +2 -0
- package/dist/data-source-server/source/use-row-by-id.js +8 -0
- package/dist/data-source-server/source/use-row-by-index.d.ts +9 -0
- package/dist/data-source-server/source/use-row-by-index.js +89 -0
- package/dist/data-source-server/source/use-row-children.d.ts +2 -0
- package/dist/data-source-server/source/use-row-children.js +16 -0
- package/dist/data-source-server/source/use-row-delete.d.ts +3 -0
- package/dist/data-source-server/source/use-row-delete.js +39 -0
- package/dist/data-source-server/source/use-row-id-to-row-index.d.ts +2 -0
- package/dist/data-source-server/source/use-row-id-to-row-index.js +7 -0
- package/dist/data-source-server/source/use-row-index-to-row-id.d.ts +2 -0
- package/dist/data-source-server/source/use-row-index-to-row-id.js +7 -0
- package/dist/data-source-server/source/use-row-leafs.d.ts +2 -0
- package/dist/data-source-server/source/use-row-leafs.js +20 -0
- package/dist/data-source-server/source/use-row-parents.d.ts +2 -0
- package/dist/data-source-server/source/use-row-parents.js +16 -0
- package/dist/data-source-server/source/use-row-siblings.d.ts +2 -0
- package/dist/data-source-server/source/use-row-siblings.js +15 -0
- package/dist/data-source-server/source/use-rows-between.d.ts +2 -0
- package/dist/data-source-server/source/use-rows-between.js +20 -0
- package/dist/data-source-server/source/use-source-state.d.ts +28 -0
- package/dist/data-source-server/source/use-source-state.js +47 -0
- package/dist/data-source-server/source/use-source.d.ts +5 -0
- package/dist/data-source-server/source/use-source.js +66 -0
- package/dist/data-source-server/types.d.ts +42 -0
- package/dist/data-source-server/types.js +1 -0
- package/dist/data-source-server/use-server-data-source.d.ts +51 -0
- package/dist/data-source-server/use-server-data-source.js +192 -0
- package/dist/data-source-server/utils/get-node-depth.d.ts +2 -0
- package/dist/data-source-server/utils/get-node-depth.js +9 -0
- package/dist/data-source-server/utils/get-node-path.d.ts +2 -0
- package/dist/data-source-server/utils/get-node-path.js +9 -0
- package/dist/data-source-server/utils/get-request-id.d.ts +1 -0
- package/dist/data-source-server/utils/get-request-id.js +6 -0
- package/dist/data-source-tree/source/use-controlled-state.d.ts +8 -0
- package/dist/data-source-tree/source/use-controlled-state.js +21 -0
- package/dist/data-source-tree/source/use-flattened.d.ts +17 -0
- package/dist/data-source-tree/source/use-flattened.js +65 -0
- package/dist/data-source-tree/source/use-on-rows-updated.d.ts +3 -0
- package/dist/data-source-tree/source/use-on-rows-updated.js +49 -0
- package/dist/data-source-tree/source/use-row-by-id.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-by-id.js +7 -0
- package/dist/data-source-tree/source/use-row-children.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-children.js +11 -0
- package/dist/data-source-tree/source/use-row-leafs.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-leafs.js +20 -0
- package/dist/data-source-tree/source/use-row-parents.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-parents.js +16 -0
- package/dist/data-source-tree/source/use-row-siblings.d.ts +2 -0
- package/dist/data-source-tree/source/use-row-siblings.js +12 -0
- package/dist/data-source-tree/source/use-tree.d.ts +3 -0
- package/dist/data-source-tree/source/use-tree.js +59 -0
- package/dist/data-source-tree/types.d.ts +16 -0
- package/dist/data-source-tree/types.js +1 -0
- package/dist/data-source-tree/use-tree-data-source.d.ts +41 -0
- package/dist/data-source-tree/use-tree-data-source.js +101 -0
- package/dist/data-source-tree/utils/is-object.d.ts +1 -0
- package/dist/data-source-tree/utils/is-object.js +3 -0
- package/dist/hooks/use-slot/get-element-ref.d.ts +2 -0
- package/dist/hooks/use-slot/get-element-ref.js +20 -0
- package/dist/hooks/use-slot/index.d.ts +3 -0
- package/dist/hooks/use-slot/index.js +1 -0
- package/dist/hooks/use-slot/merge-props.d.ts +4 -0
- package/dist/hooks/use-slot/merge-props.js +27 -0
- package/dist/hooks/use-slot/react-version.d.ts +3 -0
- package/dist/hooks/use-slot/react-version.js +5 -0
- package/dist/hooks/use-slot/types.d.ts +4 -0
- package/dist/hooks/use-slot/types.js +1 -0
- package/dist/hooks/use-slot/use-slot.d.ts +12 -0
- package/dist/hooks/use-slot/use-slot.js +28 -0
- package/dist/hooks/use-transitioned-open.d.ts +2 -0
- package/dist/hooks/use-transitioned-open.js +50 -0
- package/dist/index.d.ts +121 -0
- package/dist/index.js +23 -0
- package/dist/license/index.d.ts +1 -0
- package/dist/license/index.js +1 -0
- package/dist/license/license.d.ts +3 -0
- package/dist/license/license.js +215 -0
- package/dist/license/md5-hash.d.ts +9 -0
- package/dist/license/md5-hash.js +167 -0
- package/dist/license.d.ts +3 -0
- package/dist/license.js +214 -0
- package/dist/root/context.d.ts +16 -0
- package/dist/root/context.js +4 -0
- package/dist/root/hooks/use-pro-api.d.ts +2 -0
- package/dist/root/hooks/use-pro-api.js +8 -0
- package/dist/root/root.d.ts +15 -0
- package/dist/root/root.js +112 -0
- package/dist/types/api.d.ts +100 -0
- package/dist/types/api.js +1 -0
- package/dist/types/column.d.ts +73 -0
- package/dist/types/column.js +1 -0
- package/dist/types/events.d.ts +56 -0
- package/dist/types/events.js +1 -0
- package/dist/types/grid.d.ts +47 -0
- package/dist/types/grid.js +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js +1 -0
- package/dist/types/props.d.ts +187 -0
- package/dist/types/props.js +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
export declare const CheckboxItem: import("react").ForwardRefExoticComponent<Omit<CheckboxItem.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace CheckboxItem {
|
|
4
|
+
type Props = Omit<JSX.IntrinsicElements["div"], "children"> & {
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly checked: boolean;
|
|
7
|
+
readonly onCheckChange?: (b: boolean) => void;
|
|
8
|
+
readonly children?: ReactNode | ((b: boolean) => ReactNode);
|
|
9
|
+
readonly closeOnAction?: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState } from "react";
|
|
3
|
+
import { useMenuItemEvents } from "./item/use-menu-item-events.js";
|
|
4
|
+
import { handleVerticalNavigation } from "./item/handle-vertical-navigation.js";
|
|
5
|
+
import { useDialogRoot } from "../dialog/context.js";
|
|
6
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
7
|
+
function CheckboxItemImpl({ checked, onCheckChange, closeOnAction, disabled, children, ...props }, ref) {
|
|
8
|
+
const [item, setItem] = useState(null);
|
|
9
|
+
const combinedRefs = useCombinedRefs(ref, setItem);
|
|
10
|
+
const [active, setActive] = useMenuItemEvents(item);
|
|
11
|
+
const Node = typeof children === "function" ? children(checked) : children;
|
|
12
|
+
const d = useDialogRoot();
|
|
13
|
+
return (_jsx("div", { role: "menuitemcheckbox", ...props, ref: combinedRefs, tabIndex: 0, "data-ln-menu-item": true, "data-ln-active": active, "data-ln-checked": checked, "aria-checked": checked, "data-ln-disabled": disabled ? true : undefined, inert: disabled ? true : undefined, onFocus: (ev) => {
|
|
14
|
+
props.onFocus?.(ev);
|
|
15
|
+
if (ev.isPropagationStopped())
|
|
16
|
+
return;
|
|
17
|
+
setActive(true);
|
|
18
|
+
}, onBlur: (ev) => {
|
|
19
|
+
props.onBlur?.(ev);
|
|
20
|
+
if (ev.isPropagationStopped())
|
|
21
|
+
return;
|
|
22
|
+
setActive(false);
|
|
23
|
+
}, onClick: (ev) => {
|
|
24
|
+
props.onClick?.(ev);
|
|
25
|
+
if (ev.isPropagationStopped())
|
|
26
|
+
return;
|
|
27
|
+
onCheckChange?.(!checked);
|
|
28
|
+
if (closeOnAction === false)
|
|
29
|
+
return;
|
|
30
|
+
d?.onOpenChange(false);
|
|
31
|
+
}, onKeyDown: (ev) => {
|
|
32
|
+
if (ev.key === "ArrowUp" || ev.key === "ArrowDown")
|
|
33
|
+
handleVerticalNavigation(ev);
|
|
34
|
+
if (ev.key === " " || ev.key === "Enter") {
|
|
35
|
+
onCheckChange?.(!checked);
|
|
36
|
+
if (closeOnAction === false)
|
|
37
|
+
return;
|
|
38
|
+
d?.onOpenChange(false);
|
|
39
|
+
}
|
|
40
|
+
}, children: Node }));
|
|
41
|
+
}
|
|
42
|
+
export const CheckboxItem = forwardRef(CheckboxItemImpl);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
export declare const ComboCheckbox: import("react").ForwardRefExoticComponent<Omit<ComboCheckbox.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace ComboCheckbox {
|
|
4
|
+
type Props = Omit<JSX.IntrinsicElements["div"], "children"> & {
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly checked: boolean;
|
|
7
|
+
readonly onCheckChange?: (b: boolean) => void;
|
|
8
|
+
readonly children?: ReactNode | ((b: boolean) => ReactNode);
|
|
9
|
+
readonly closeOnAction?: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
3
|
+
import { useComboContext } from "./combo-context.js";
|
|
4
|
+
import { useDialogRoot } from "../../dialog/context.js";
|
|
5
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
+
function ComboCheckboxBase({ checked, onCheckChange, disabled, children, closeOnAction, ...props }, ref) {
|
|
7
|
+
const [item, setItem] = useState(null);
|
|
8
|
+
const ctx = useComboContext();
|
|
9
|
+
const d = useDialogRoot();
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!item)
|
|
12
|
+
return;
|
|
13
|
+
const controller = new AbortController();
|
|
14
|
+
item.addEventListener("ln-action", () => {
|
|
15
|
+
onCheckChange?.(!checked);
|
|
16
|
+
if (closeOnAction === false)
|
|
17
|
+
return;
|
|
18
|
+
d.onOpenChange?.(false);
|
|
19
|
+
}, { signal: controller.signal });
|
|
20
|
+
return () => controller.abort();
|
|
21
|
+
}, [checked, closeOnAction, d, item, onCheckChange]);
|
|
22
|
+
const active = ctx.activeEl === item;
|
|
23
|
+
const Node = typeof children === "function" ? children(checked) : children;
|
|
24
|
+
return (_jsx("div", { ...props, "data-ln-active": active, "data-ln-combomenu-option": true, "data-ln-checked": checked, "data-ln-disabled": disabled ? true : undefined, inert: disabled ? true : undefined, onClick: (ev) => {
|
|
25
|
+
props.onClick?.(ev);
|
|
26
|
+
if (ev.isPropagationStopped())
|
|
27
|
+
return;
|
|
28
|
+
onCheckChange?.(!checked);
|
|
29
|
+
if (closeOnAction === false)
|
|
30
|
+
return;
|
|
31
|
+
d.onOpenChange?.(false);
|
|
32
|
+
}, onMouseEnter: () => {
|
|
33
|
+
ctx.setActiveEl(item);
|
|
34
|
+
}, onMouseLeave: () => {
|
|
35
|
+
ctx.setActiveEl(null);
|
|
36
|
+
}, ref: useCombinedRefs(ref, setItem), children: Node }));
|
|
37
|
+
}
|
|
38
|
+
export const ComboCheckbox = forwardRef(ComboCheckboxBase);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from "react";
|
|
2
|
+
interface ComboContext {
|
|
3
|
+
readonly menu: HTMLDivElement | null;
|
|
4
|
+
readonly activeEl: HTMLDivElement | null;
|
|
5
|
+
readonly setActiveEl: Dispatch<SetStateAction<HTMLDivElement | null>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const comboContext: import("react").Context<ComboContext>;
|
|
8
|
+
export declare const useComboContext: () => ComboContext;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const ComboInput: import("react").ForwardRefExoticComponent<Omit<ComboInput.Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
|
+
export declare namespace ComboInput {
|
|
4
|
+
type Props = Omit<JSX.IntrinsicElements["input"], "children"> & {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useComboContext } from "./combo-context.js";
|
|
4
|
+
import { handleVerticalNavigation } from "../item/handle-vertical-navigation.js";
|
|
5
|
+
const ComboInputImpl = ({ disabled, ...props }, ref) => {
|
|
6
|
+
const ctx = useComboContext();
|
|
7
|
+
return (_jsx("input", { ...props, "data-ln-combomenu-input": true, "data-ln-disabled": disabled ? true : undefined, disabled: disabled ? true : undefined, ref: ref, onBlur: (ev) => {
|
|
8
|
+
props.onBlur?.(ev);
|
|
9
|
+
ctx.setActiveEl(null);
|
|
10
|
+
}, onKeyDown: (ev) => {
|
|
11
|
+
props.onKeyDown?.(ev);
|
|
12
|
+
if (!ctx.menu || ev.isPropagationStopped())
|
|
13
|
+
return;
|
|
14
|
+
const value = ev.currentTarget.value ?? "";
|
|
15
|
+
if (value && ev.key === "ArrowLeft") {
|
|
16
|
+
ev.stopPropagation();
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (ev.key === "Enter") {
|
|
20
|
+
if (ctx.activeEl) {
|
|
21
|
+
ctx.activeEl.dispatchEvent(new Event("ln-action", { bubbles: false }));
|
|
22
|
+
}
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const queryResult = ctx.menu?.querySelectorAll("[data-ln-combomenu-option]");
|
|
26
|
+
if (!queryResult || queryResult.length === 0) {
|
|
27
|
+
return handleVerticalNavigation(ev);
|
|
28
|
+
}
|
|
29
|
+
const options = Array.from(queryResult);
|
|
30
|
+
const index = options.indexOf(ctx.activeEl);
|
|
31
|
+
if (ev.key === "ArrowUp") {
|
|
32
|
+
if (index === 0) {
|
|
33
|
+
handleVerticalNavigation({
|
|
34
|
+
...ev,
|
|
35
|
+
currentTarget: ctx.menu,
|
|
36
|
+
stopPropagation: ev.stopPropagation,
|
|
37
|
+
preventDefault: ev.preventDefault,
|
|
38
|
+
});
|
|
39
|
+
ctx.setActiveEl(null);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const finalIndex = index === -1 ? options.length - 1 : index - 1;
|
|
43
|
+
ctx.setActiveEl(options[finalIndex]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (ev.key === "ArrowDown") {
|
|
47
|
+
if (index === options.length - 1) {
|
|
48
|
+
handleVerticalNavigation(ev);
|
|
49
|
+
ctx.setActiveEl(null);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const finalIndex = index === -1 ? 0 : index + 1;
|
|
53
|
+
ctx.setActiveEl(options[finalIndex]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
} }));
|
|
57
|
+
};
|
|
58
|
+
export const ComboInput = forwardRef(ComboInputImpl);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const ComboMenu: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace ComboMenu {
|
|
4
|
+
type Props = JSX.IntrinsicElements["div"];
|
|
5
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState } from "react";
|
|
3
|
+
import { useMenuItemEvents } from "../item/use-menu-item-events.js";
|
|
4
|
+
import { comboContext } from "./combo-context.js";
|
|
5
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
+
function ComboMenuImpl(props, ref) {
|
|
7
|
+
const [item, setItem] = useState(null);
|
|
8
|
+
const combinedRefs = useCombinedRefs(ref, setItem);
|
|
9
|
+
const [active] = useMenuItemEvents(item, undefined, () => {
|
|
10
|
+
const input = item?.querySelector('[data-ln-combomenu-input="true"]');
|
|
11
|
+
if (input)
|
|
12
|
+
input.blur();
|
|
13
|
+
});
|
|
14
|
+
const [activeEl, setActiveEl] = useState(null);
|
|
15
|
+
return (_jsx(comboContext.Provider, { value: { activeEl, setActiveEl, menu: item }, children: _jsx("div", { role: "menuitem", ...props, ref: combinedRefs, tabIndex: 0, "data-ln-menu-item": true, "data-ln-combo": true, "data-ln-active": active, onFocus: (ev) => {
|
|
16
|
+
props.onFocus?.(ev);
|
|
17
|
+
if (ev.isPropagationStopped())
|
|
18
|
+
return;
|
|
19
|
+
const input = ev.currentTarget.querySelector('[data-ln-combomenu-input="true"]');
|
|
20
|
+
if (input)
|
|
21
|
+
input.focus();
|
|
22
|
+
} }) }));
|
|
23
|
+
}
|
|
24
|
+
export const ComboMenu = forwardRef(ComboMenuImpl);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const ComboOption: import("react").ForwardRefExoticComponent<Omit<ComboOption.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace ComboOption {
|
|
4
|
+
type Props = JSX.IntrinsicElements["div"] & {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onAction: () => void;
|
|
7
|
+
closeOnAction?: boolean;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
3
|
+
import { useComboContext } from "./combo-context.js";
|
|
4
|
+
import { useDialogRoot } from "../../dialog/context.js";
|
|
5
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
+
function ComboOptionImpl({ disabled, onAction, closeOnAction, ...props }, ref) {
|
|
7
|
+
const [item, setItem] = useState(null);
|
|
8
|
+
const ctx = useComboContext();
|
|
9
|
+
const d = useDialogRoot();
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!item)
|
|
12
|
+
return;
|
|
13
|
+
const controller = new AbortController();
|
|
14
|
+
item.addEventListener("ln-action", () => {
|
|
15
|
+
onAction();
|
|
16
|
+
if (closeOnAction === false)
|
|
17
|
+
return;
|
|
18
|
+
d.onOpenChange?.(false);
|
|
19
|
+
}, { signal: controller.signal });
|
|
20
|
+
return () => controller.abort();
|
|
21
|
+
}, [closeOnAction, d, item, onAction]);
|
|
22
|
+
const active = ctx.activeEl === item;
|
|
23
|
+
return (_jsx("div", { ...props, "data-ln-active": active, "data-ln-combomenu-option": true, "data-ln-disabled": disabled ? true : undefined, inert: disabled ? true : undefined, onClick: (ev) => {
|
|
24
|
+
props.onClick?.(ev);
|
|
25
|
+
if (ev.isPropagationStopped())
|
|
26
|
+
return;
|
|
27
|
+
onAction();
|
|
28
|
+
if (closeOnAction === false)
|
|
29
|
+
return;
|
|
30
|
+
d.onOpenChange?.(false);
|
|
31
|
+
}, onMouseEnter: () => {
|
|
32
|
+
ctx.setActiveEl(item);
|
|
33
|
+
}, onMouseLeave: () => {
|
|
34
|
+
ctx.setActiveEl(null);
|
|
35
|
+
}, ref: useCombinedRefs(ref, setItem) }));
|
|
36
|
+
}
|
|
37
|
+
export const ComboOption = forwardRef(ComboOptionImpl);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const Container: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace Container {
|
|
4
|
+
type Props = JSX.IntrinsicElements["div"];
|
|
5
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState } from "react";
|
|
3
|
+
import { useMenu } from "./use-menu.js";
|
|
4
|
+
import { useSubmenuContext } from "./submenu/submenu-context.js";
|
|
5
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
+
function ContainerImpl(props, ref) {
|
|
7
|
+
const [menuEl, setMenuEl] = useState(null);
|
|
8
|
+
const combinedRefs = useCombinedRefs(ref, setMenuEl);
|
|
9
|
+
const sub = useSubmenuContext();
|
|
10
|
+
const finalRefs = useCombinedRefs(combinedRefs, sub?.submenuRef);
|
|
11
|
+
useMenu(menuEl);
|
|
12
|
+
if (sub && !sub.open)
|
|
13
|
+
return null;
|
|
14
|
+
return (_jsx("div", { ...props, role: "menu", ref: finalRefs, "data-ln-terminal-menu": !sub, "data-ln-submenu": sub ? true : undefined, "data-ln-menu": true, style: {
|
|
15
|
+
...props.style,
|
|
16
|
+
...(sub ? { position: "absolute" } : {}),
|
|
17
|
+
} }));
|
|
18
|
+
}
|
|
19
|
+
export const Container = forwardRef(ContainerImpl);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function dispatchActivate(el: HTMLElement): boolean;
|
|
2
|
+
export declare function dispatchDeactivate(el: HTMLElement): boolean;
|
|
3
|
+
export declare function dispatchClose(el: HTMLElement): boolean;
|
|
4
|
+
export declare function getSubmenuRoots(el: HTMLElement): HTMLElement[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function dispatchActivate(el) {
|
|
2
|
+
return el.dispatchEvent(new Event("ln-activate-mouse", { bubbles: false }));
|
|
3
|
+
}
|
|
4
|
+
export function dispatchDeactivate(el) {
|
|
5
|
+
return el.dispatchEvent(new Event("ln-deactivate-mouse", { bubbles: false }));
|
|
6
|
+
}
|
|
7
|
+
export function dispatchClose(el) {
|
|
8
|
+
return el.dispatchEvent(new Event("ln-close", { bubbles: false }));
|
|
9
|
+
}
|
|
10
|
+
export function getSubmenuRoots(el) {
|
|
11
|
+
let current = el;
|
|
12
|
+
const roots = [];
|
|
13
|
+
while (current && current.getAttribute("data-ln-terminal-menu") !== "true") {
|
|
14
|
+
if (current.getAttribute("data-ln-submenu-root") === "true") {
|
|
15
|
+
roots.push(current);
|
|
16
|
+
}
|
|
17
|
+
current = current.parentElement;
|
|
18
|
+
}
|
|
19
|
+
return roots;
|
|
20
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Popover as P } from "../popover/index.js";
|
|
2
|
+
import { MenuPopover } from "./popover.js";
|
|
3
|
+
import type { PropsWithChildren } from "react";
|
|
4
|
+
import { Item } from "./item/item.js";
|
|
5
|
+
import { Container } from "./container.js";
|
|
6
|
+
import { CheckboxItem } from "./checkbox-item.js";
|
|
7
|
+
import { DialogArrow as Arrow } from "../dialog/arrow.js";
|
|
8
|
+
import { RadioGroup } from "./radio-group/context.js";
|
|
9
|
+
import { RadioItem } from "./radio-group/radio-item.js";
|
|
10
|
+
import { MenuDivider as Divider } from "./menu-divider.js";
|
|
11
|
+
import { MenuGroup as Group } from "./menu-group.js";
|
|
12
|
+
import { MenuHeader as Header } from "./menu-header.js";
|
|
13
|
+
import { Submenu } from "./submenu/submenu.js";
|
|
14
|
+
import { SubmenuTrigger } from "./submenu/submenu-trigger.js";
|
|
15
|
+
export declare const Menu: {
|
|
16
|
+
(props: PropsWithChildren<P.Props>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
Item: import("react").ForwardRefExoticComponent<Omit<Item.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Container: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
CheckboxItem: import("react").ForwardRefExoticComponent<Omit<CheckboxItem.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Arrow: import("react").ForwardRefExoticComponent<Omit<Arrow.Props, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
21
|
+
RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGroup.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
RadioItem: import("react").ForwardRefExoticComponent<Omit<RadioItem.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
Divider: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
+
Group: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
25
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
Submenu: import("react").ForwardRefExoticComponent<Omit<Submenu.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
SubmenuTrigger: import("react").ForwardRefExoticComponent<Omit<SubmenuTrigger.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
SubmenuContainer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
Popover: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
|
|
30
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("../dialog/title.js").DialogTitle.Props, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
31
|
+
Description: import("react").ForwardRefExoticComponent<Omit<import("../dialog/description.js").DialogDescription.Props, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("../dialog/trigger.js").DialogTrigger.Props, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
};
|
|
34
|
+
export declare namespace Menu {
|
|
35
|
+
type Props = P.Props;
|
|
36
|
+
namespace Component {
|
|
37
|
+
type Item = Item.Props;
|
|
38
|
+
type Container = Container.Props;
|
|
39
|
+
type CheckboxItem = CheckboxItem.Props;
|
|
40
|
+
type Arrow = Arrow.Props;
|
|
41
|
+
type RadioGroup = RadioGroup.Props;
|
|
42
|
+
type RadioItem = RadioItem.Props;
|
|
43
|
+
type Divider = Divider.Props;
|
|
44
|
+
type Group = Group.Props;
|
|
45
|
+
type Header = Header.Props;
|
|
46
|
+
type Submenu = Submenu.Props;
|
|
47
|
+
type SubmenuTrigger = SubmenuTrigger.Props;
|
|
48
|
+
type SubmenuContainer = Container.Props;
|
|
49
|
+
type Popover = MenuPopover.Props;
|
|
50
|
+
type Title = P.Component.Title;
|
|
51
|
+
type Description = P.Component.Description;
|
|
52
|
+
type Trigger = P.Component.Trigger;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Popover as P } from "../popover/index.js";
|
|
3
|
+
import { MenuPopover } from "./popover.js";
|
|
4
|
+
import { Item } from "./item/item.js";
|
|
5
|
+
import { Container } from "./container.js";
|
|
6
|
+
import { CheckboxItem } from "./checkbox-item.js";
|
|
7
|
+
import { DialogArrow as Arrow } from "../dialog/arrow.js";
|
|
8
|
+
import { RadioGroup } from "./radio-group/context.js";
|
|
9
|
+
import { RadioItem } from "./radio-group/radio-item.js";
|
|
10
|
+
import { MenuDivider as Divider } from "./menu-divider.js";
|
|
11
|
+
import { MenuGroup as Group } from "./menu-group.js";
|
|
12
|
+
import { MenuHeader as Header } from "./menu-header.js";
|
|
13
|
+
// import { ComboOption } from "./combo/combo-option.js";
|
|
14
|
+
// import { ComboInput } from "./combo/combo-input.js";
|
|
15
|
+
// import { ComboMenu } from "./combo/combo-menu.js";
|
|
16
|
+
// import { ComboCheckbox } from "./combo/combo-checkbox.js";
|
|
17
|
+
import { Submenu } from "./submenu/submenu.js";
|
|
18
|
+
import { SubmenuTrigger } from "./submenu/submenu-trigger.js";
|
|
19
|
+
export const Menu = (props) => _jsx(P, { ...props });
|
|
20
|
+
Menu.Item = Item;
|
|
21
|
+
Menu.Container = Container;
|
|
22
|
+
Menu.CheckboxItem = CheckboxItem;
|
|
23
|
+
Menu.Arrow = Arrow;
|
|
24
|
+
Menu.RadioGroup = RadioGroup;
|
|
25
|
+
Menu.RadioItem = RadioItem;
|
|
26
|
+
Menu.Divider = Divider;
|
|
27
|
+
Menu.Group = Group;
|
|
28
|
+
Menu.Header = Header;
|
|
29
|
+
// Menu.ComboOption = ComboOption;
|
|
30
|
+
// Menu.ComboInput = ComboInput;
|
|
31
|
+
// Menu.ComboMenu = ComboMenu;
|
|
32
|
+
// Menu.ComboCheckbox = ComboCheckbox;
|
|
33
|
+
Menu.Submenu = Submenu;
|
|
34
|
+
Menu.SubmenuTrigger = SubmenuTrigger;
|
|
35
|
+
Menu.SubmenuContainer = Container;
|
|
36
|
+
Menu.Popover = MenuPopover;
|
|
37
|
+
Menu.Title = P.Title;
|
|
38
|
+
Menu.Description = P.Description;
|
|
39
|
+
Menu.Trigger = P.Trigger;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getNearestMatching, getTabbables } from "@1771technologies/lytenyte-shared";
|
|
2
|
+
export function handleVerticalNavigation(ev) {
|
|
3
|
+
const nearestMenu = getNearestMatching(ev.currentTarget, (el) => el.getAttribute("data-ln-menu") === "true");
|
|
4
|
+
if (!nearestMenu)
|
|
5
|
+
return;
|
|
6
|
+
const tabbables = getTabbables(nearestMenu)
|
|
7
|
+
.filter((x) => {
|
|
8
|
+
const nearest = getNearestMatching(x, (el) => el.getAttribute("data-ln-menu") === "true");
|
|
9
|
+
return nearest === nearestMenu;
|
|
10
|
+
})
|
|
11
|
+
.filter((x) => x.getAttribute("data-ln-menu-item") === "true");
|
|
12
|
+
const activeItem = getNearestMatching(ev.currentTarget, (el) => el.getAttribute("data-ln-menu-item") === "true");
|
|
13
|
+
const index = tabbables.indexOf(activeItem);
|
|
14
|
+
if (index === -1)
|
|
15
|
+
return;
|
|
16
|
+
if (ev.key === "ArrowDown") {
|
|
17
|
+
ev.stopPropagation();
|
|
18
|
+
ev.preventDefault();
|
|
19
|
+
const next = tabbables[index + 1];
|
|
20
|
+
next?.focus();
|
|
21
|
+
}
|
|
22
|
+
else if (ev.key === "ArrowUp") {
|
|
23
|
+
ev.stopPropagation();
|
|
24
|
+
ev.preventDefault();
|
|
25
|
+
const prev = tabbables[index - 1];
|
|
26
|
+
prev?.focus();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const Item: import("react").ForwardRefExoticComponent<Omit<Item.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace Item {
|
|
4
|
+
type Props = JSX.IntrinsicElements["div"] & {
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly onAction: () => void;
|
|
7
|
+
readonly closeOnAction?: boolean;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState } from "react";
|
|
3
|
+
import { useMenuItemEvents } from "./use-menu-item-events.js";
|
|
4
|
+
import { handleVerticalNavigation } from "./handle-vertical-navigation.js";
|
|
5
|
+
import { useDialogRoot } from "../../dialog/context.js";
|
|
6
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
7
|
+
function ItemImpl({ onAction, closeOnAction, disabled, ...props }, ref) {
|
|
8
|
+
const [item, setItem] = useState(null);
|
|
9
|
+
const combinedRefs = useCombinedRefs(ref, setItem);
|
|
10
|
+
const [active, setActive] = useMenuItemEvents(item);
|
|
11
|
+
const d = useDialogRoot();
|
|
12
|
+
return (_jsx("div", { role: "menuitem", ...props, ref: combinedRefs, tabIndex: 0, "data-ln-menu-item": true, "data-ln-active": active, "data-ln-disabled": disabled ? true : undefined, inert: disabled ? true : undefined, onFocus: (ev) => {
|
|
13
|
+
props.onFocus?.(ev);
|
|
14
|
+
if (ev.isPropagationStopped())
|
|
15
|
+
return;
|
|
16
|
+
setActive(true);
|
|
17
|
+
}, onBlur: (ev) => {
|
|
18
|
+
props.onBlur?.(ev);
|
|
19
|
+
if (ev.isPropagationStopped())
|
|
20
|
+
return;
|
|
21
|
+
setActive(false);
|
|
22
|
+
}, onClick: (ev) => {
|
|
23
|
+
props.onClick?.(ev);
|
|
24
|
+
if (ev.isPropagationStopped())
|
|
25
|
+
return;
|
|
26
|
+
onAction?.();
|
|
27
|
+
ev.stopPropagation();
|
|
28
|
+
ev.preventDefault();
|
|
29
|
+
if (closeOnAction === false)
|
|
30
|
+
return;
|
|
31
|
+
d?.onOpenChange(false);
|
|
32
|
+
}, onKeyDown: (ev) => {
|
|
33
|
+
if (ev.key === "ArrowUp" || ev.key === "ArrowDown")
|
|
34
|
+
handleVerticalNavigation(ev);
|
|
35
|
+
if (ev.key === " " || ev.key === "Enter") {
|
|
36
|
+
onAction?.();
|
|
37
|
+
ev.stopPropagation();
|
|
38
|
+
ev.preventDefault();
|
|
39
|
+
if (closeOnAction === false)
|
|
40
|
+
return;
|
|
41
|
+
d?.onOpenChange(false);
|
|
42
|
+
}
|
|
43
|
+
} }));
|
|
44
|
+
}
|
|
45
|
+
export const Item = forwardRef(ItemImpl);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMenuItemEvents(el: HTMLElement | null, onActivate?: () => void, onDeactivate?: () => void): readonly [boolean, import("react").Dispatch<import("react").SetStateAction<boolean>>];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
export function useMenuItemEvents(el, onActivate, onDeactivate) {
|
|
3
|
+
const [active, setActive] = useState(false);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
if (!el)
|
|
6
|
+
return;
|
|
7
|
+
const controller = new AbortController();
|
|
8
|
+
const signal = controller.signal;
|
|
9
|
+
el.addEventListener("ln-activate-mouse", () => {
|
|
10
|
+
const elementToFocus = el.getAttribute("data-ln-combo") === "true"
|
|
11
|
+
? (el.querySelector('[data-ln-combomenu-input="true"]') ?? el)
|
|
12
|
+
: el;
|
|
13
|
+
if (elementToFocus === document.activeElement)
|
|
14
|
+
return;
|
|
15
|
+
elementToFocus.focus();
|
|
16
|
+
onActivate?.();
|
|
17
|
+
}, { signal });
|
|
18
|
+
el.addEventListener("ln-deactivate-mouse", () => {
|
|
19
|
+
el.blur();
|
|
20
|
+
onDeactivate?.();
|
|
21
|
+
}, { signal });
|
|
22
|
+
return () => controller.abort();
|
|
23
|
+
}, [el, onActivate, onDeactivate]);
|
|
24
|
+
return [active, setActive];
|
|
25
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const MenuDivider: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace MenuDivider {
|
|
4
|
+
type Props = JSX.IntrinsicElements["div"];
|
|
5
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
const MenuDividerImpl = (props, ref) => {
|
|
4
|
+
return _jsx("div", { ...props, role: "separator", "data-ln-menu-separator": true, ref: ref });
|
|
5
|
+
};
|
|
6
|
+
export const MenuDivider = forwardRef(MenuDividerImpl);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const MenuGroup: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace MenuGroup {
|
|
4
|
+
type Props = JSX.IntrinsicElements["div"];
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export declare const MenuHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare namespace MenuHeader {
|
|
4
|
+
type Props = JSX.IntrinsicElements["div"];
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PopoverContainer as Container } from "../popover/container.js";
|
|
2
|
+
export declare const MenuPopover: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
|
|
3
|
+
export declare namespace MenuPopover {
|
|
4
|
+
type Props = Container.Props;
|
|
5
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { PopoverContainer as Container } from "../popover/container.js";
|
|
4
|
+
const MenuPopoverBase = (props, ref) => {
|
|
5
|
+
return _jsx(Container, { ...props, ref: ref, "data-ln-menu-popover": true });
|
|
6
|
+
};
|
|
7
|
+
export const MenuPopover = forwardRef(MenuPopoverBase);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
interface RadioGroupContext {
|
|
3
|
+
readonly value: string;
|
|
4
|
+
readonly onChange?: (v: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const context: import("react").Context<RadioGroupContext>;
|
|
7
|
+
export declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGroup.Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare namespace RadioGroup {
|
|
9
|
+
type Props = Omit<JSX.IntrinsicElements["div"], "onChange"> & RadioGroupContext;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, forwardRef } from "react";
|
|
3
|
+
export const context = createContext({});
|
|
4
|
+
const RadioGroupBase = ({ value, onChange, ...props }, ref) => {
|
|
5
|
+
return (_jsx(context.Provider, { value: { value: value, onChange: onChange }, children: _jsx("div", { ...props, ref: ref, role: "group", children: props.children }) }));
|
|
6
|
+
};
|
|
7
|
+
export const RadioGroup = forwardRef(RadioGroupBase);
|