@1771technologies/lytenyte-pro 2.0.0-dev.0 → 2.0.0-dev.2
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,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useSlot } from "../hooks/use-slot/index.js";
|
|
3
|
+
export const RowGroupCell = ({ api, row, leafLabel, groupLabel, aggLabel, expansionSlot, }) => {
|
|
4
|
+
const label = getRowLabel(row, api, leafLabel, groupLabel, aggLabel);
|
|
5
|
+
const depth = row.depth;
|
|
6
|
+
const slot = useSlot({
|
|
7
|
+
slot: row.kind === "branch" && row.expandable
|
|
8
|
+
? (expansionSlot ?? (_jsxs("button", { "data-ln-component-group-cell-expander": true, "data-ln-component-group-cell-error": !!row.errorGroup, onClick: (e) => {
|
|
9
|
+
e.preventDefault();
|
|
10
|
+
e.stopPropagation();
|
|
11
|
+
if (row.errorGroup) {
|
|
12
|
+
// Retry will be defined on the server data source
|
|
13
|
+
if (api.retry)
|
|
14
|
+
api.retry();
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
api.rowGroupToggle(row.id);
|
|
18
|
+
}
|
|
19
|
+
}, "aria-label": "toggle the row group expansion state", disabled: row.loadingGroup, children: [row.loadingGroup && !row.errorGroup && _jsx(LoadingSpinner, {}), !row.loadingGroup && !row.errorGroup && _jsx(CaretRight, {}), !!row.errorGroup && _jsx(WarningIcon, {})] })))
|
|
20
|
+
: undefined,
|
|
21
|
+
state: { row, api },
|
|
22
|
+
});
|
|
23
|
+
return (_jsxs("div", { "data-ln-component-group-cell": row.kind, "data-ln-component-group-cell-depth": depth, "data-ln-component-group-cell-expanded": api.rowIsGroup(row) && row.expanded, "data-ln-component-group-cell-expandable": api.rowIsGroup(row) ? row.expandable : undefined, style: { "--ln-row-depth": depth }, children: [slot, _jsx("div", { children: label })] }));
|
|
24
|
+
};
|
|
25
|
+
function getRowLabel(row, api, leafLabel, groupLabel, aggLabel) {
|
|
26
|
+
if (row.kind === "leaf")
|
|
27
|
+
return leafLabel?.(row, api) ?? "";
|
|
28
|
+
if (row.kind === "aggregated")
|
|
29
|
+
return aggLabel?.(row, api) ?? (row.id === "ln-pivot-grand-total" ? "Grand Total" : row.id);
|
|
30
|
+
return groupLabel?.(row, api) ?? (!row.key ? "(blank)" : row.key);
|
|
31
|
+
}
|
|
32
|
+
function CaretRight() {
|
|
33
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentcolor", viewBox: "0 0 256 256", children: _jsx("path", { d: "M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z" }) }));
|
|
34
|
+
}
|
|
35
|
+
function LoadingSpinner(props) {
|
|
36
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 24 24", ...props, children: [_jsx("path", { fill: "currentColor", d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z", opacity: 0.25 }), _jsx("path", { fill: "currentColor", d: "M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z", children: _jsx("animateTransform", { attributeName: "transform", dur: "0.75s", repeatCount: "indefinite", type: "rotate", values: "0 12 12;360 12 12" }) })] }));
|
|
37
|
+
}
|
|
38
|
+
function WarningIcon(props) {
|
|
39
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentcolor", viewBox: "0 0 256 256", ...props, children: _jsx("path", { d: "M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z" }) }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SlotComponent } from "../hooks/use-slot/index.js";
|
|
2
|
+
import type { API, GridSpec } from "../types/index.js";
|
|
3
|
+
export interface SelectAllProps {
|
|
4
|
+
readonly slot?: SlotComponent<{
|
|
5
|
+
readonly indeterminate: boolean;
|
|
6
|
+
readonly selected: boolean;
|
|
7
|
+
readonly toggle: (forceState?: boolean) => void;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare function SelectAll<Spec extends GridSpec>({ api, slot, }: SelectAllProps & {
|
|
11
|
+
readonly api: API<Spec>;
|
|
12
|
+
}): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useSlot } from "../hooks/use-slot/index.js";
|
|
4
|
+
import { useEvent } from "@1771technologies/lytenyte-core/internal";
|
|
5
|
+
export function SelectAll({ api, slot, }) {
|
|
6
|
+
const s = api.useSelectionState();
|
|
7
|
+
const selected = useMemo(() => {
|
|
8
|
+
const selected = s.kind === "isolated" ? s.selected && s.exceptions.size === 0 : s.selected && s.children.size === 0;
|
|
9
|
+
return selected;
|
|
10
|
+
}, [s]);
|
|
11
|
+
const indeterminate = useMemo(() => {
|
|
12
|
+
if (s.kind === "isolated")
|
|
13
|
+
return !!s.exceptions.size;
|
|
14
|
+
return Boolean(s.children.size);
|
|
15
|
+
}, [s]);
|
|
16
|
+
const toggle = useEvent((b) => {
|
|
17
|
+
if (b != null)
|
|
18
|
+
return api.rowSelect({ selected: "all", deselect: !b });
|
|
19
|
+
api.rowSelect({ selected: "all", deselect: selected });
|
|
20
|
+
});
|
|
21
|
+
const rendered = useSlot({
|
|
22
|
+
slot: slot ?? (_jsx("input", { "aria-label": "Toggle the selection for all the rows in the grid.", ref: (x) => {
|
|
23
|
+
if (!x)
|
|
24
|
+
return;
|
|
25
|
+
x.indeterminate = indeterminate;
|
|
26
|
+
}, type: "checkbox", checked: selected, onChange: () => toggle() })),
|
|
27
|
+
state: {
|
|
28
|
+
selected,
|
|
29
|
+
indeterminate,
|
|
30
|
+
toggle,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
return rendered;
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ChipContextProvider: import("react").Provider<{
|
|
2
|
+
activeChip: string | null;
|
|
3
|
+
setActiveChip: (s: string | null) => void;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const useChipContext: () => {
|
|
6
|
+
activeChip: string | null;
|
|
7
|
+
setActiveChip: (s: string | null) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ChipRemove: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useChip } from "./chip.js";
|
|
4
|
+
function ChipRemoveBase(props, ref) {
|
|
5
|
+
const remove = useChip();
|
|
6
|
+
return (_jsx("button", { ...props, ref: ref, onClick: (ev) => {
|
|
7
|
+
props.onClick?.(ev);
|
|
8
|
+
if (ev.isPropagationStopped() || ev.defaultPrevented)
|
|
9
|
+
return;
|
|
10
|
+
remove();
|
|
11
|
+
} }));
|
|
12
|
+
}
|
|
13
|
+
export const ChipRemove = forwardRef(ChipRemoveBase);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
import { type SlotComponent } from "../../hooks/use-slot/index.js";
|
|
3
|
+
import type { BaseOption } from "./type.js";
|
|
4
|
+
export type ChipProps<T extends BaseOption> = JSX.IntrinsicElements["div"] & {
|
|
5
|
+
readonly option: T;
|
|
6
|
+
readonly render?: SlotComponent<{
|
|
7
|
+
option: T;
|
|
8
|
+
active: boolean;
|
|
9
|
+
remove: () => void;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare const useChip: () => () => void;
|
|
13
|
+
export declare const Chip: import("react").ForwardRefExoticComponent<Omit<ChipProps<BaseOption>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, forwardRef, useContext } from "react";
|
|
3
|
+
import { useSlot } from "../../hooks/use-slot/index.js";
|
|
4
|
+
import { useChipContext } from "./chip-context.js";
|
|
5
|
+
import { useSmartSelect } from "./context.js";
|
|
6
|
+
import { useEvent } from "@1771technologies/lytenyte-core/internal";
|
|
7
|
+
const context = createContext(null);
|
|
8
|
+
export const useChip = () => useContext(context);
|
|
9
|
+
function ChipBase({ render, option, ...props }, ref) {
|
|
10
|
+
const { activeChip, setActiveChip } = useChipContext();
|
|
11
|
+
const { kindAndValue: { value }, onOptionsChange, preventNextOpen, rtl, trigger, inputRef, } = useSmartSelect();
|
|
12
|
+
const v = value;
|
|
13
|
+
const remove = useEvent(() => {
|
|
14
|
+
onOptionsChange(v.filter((x) => x.id !== option.id));
|
|
15
|
+
preventNextOpen.current = true;
|
|
16
|
+
});
|
|
17
|
+
const r = useSlot({
|
|
18
|
+
props: [
|
|
19
|
+
props,
|
|
20
|
+
{ tabIndex: -1, "data-ln-smart-select-chip": option.id },
|
|
21
|
+
{
|
|
22
|
+
onKeyDown: (ev) => {
|
|
23
|
+
const start = rtl ? "ArrowRight" : "ArrowLeft";
|
|
24
|
+
const end = rtl ? "ArrowLeft" : "ArrowRight";
|
|
25
|
+
const chips = Array.from(trigger.querySelectorAll("[data-ln-smart-select-chip]"));
|
|
26
|
+
const thisIndex = chips.indexOf(ev.currentTarget);
|
|
27
|
+
if (thisIndex === -1)
|
|
28
|
+
return;
|
|
29
|
+
if (ev.key === "Backspace" || ev.key === "Delete") {
|
|
30
|
+
remove();
|
|
31
|
+
const dir = ev.key === "Backspace" ? 1 : -1;
|
|
32
|
+
let next = chips[thisIndex + dir];
|
|
33
|
+
if (!next)
|
|
34
|
+
next = chips[thisIndex - dir];
|
|
35
|
+
if (!next) {
|
|
36
|
+
setActiveChip(null);
|
|
37
|
+
inputRef.current?.focus();
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
next.focus();
|
|
41
|
+
setActiveChip(next.getAttribute("data-ln-smart-select-chip"));
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (ev.key === "Delete" || ev.key === "Backspace") {
|
|
46
|
+
console.log(" i ran");
|
|
47
|
+
}
|
|
48
|
+
if (ev.key === start) {
|
|
49
|
+
const next = chips[thisIndex - 1];
|
|
50
|
+
if (!next)
|
|
51
|
+
return;
|
|
52
|
+
next.focus();
|
|
53
|
+
setActiveChip(next.getAttribute("data-ln-smart-select-chip"));
|
|
54
|
+
}
|
|
55
|
+
else if (ev.key === end) {
|
|
56
|
+
const next = chips[thisIndex + 1];
|
|
57
|
+
if (!next) {
|
|
58
|
+
setActiveChip(null);
|
|
59
|
+
inputRef.current?.focus();
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
next.focus();
|
|
63
|
+
setActiveChip(next.getAttribute("data-ln-smart-select-chip"));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
ref: ref,
|
|
70
|
+
slot: render ?? _jsx("div", {}),
|
|
71
|
+
state: {
|
|
72
|
+
option,
|
|
73
|
+
active: activeChip === option.id,
|
|
74
|
+
remove,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
return _jsx(context.Provider, { value: remove, children: r });
|
|
78
|
+
}
|
|
79
|
+
export const Chip = forwardRef(ChipBase);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SmartSelectContainer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Popover } from "../headless/popover/index.js";
|
|
4
|
+
import { useSmartSelect } from "./context.js";
|
|
5
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
+
function SmartSelectContainerBase(props, ref) {
|
|
7
|
+
const { setContainer } = useSmartSelect();
|
|
8
|
+
const combined = useCombinedRefs(ref, setContainer);
|
|
9
|
+
return (_jsx(Popover.Container, { ...props, onClick: (e) => {
|
|
10
|
+
e.preventDefault();
|
|
11
|
+
}, ref: combined, "data-ln-smart-select-container": true }));
|
|
12
|
+
}
|
|
13
|
+
export const SmartSelectContainer = forwardRef(SmartSelectContainerBase);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Dispatch, type RefObject, type SetStateAction } from "react";
|
|
2
|
+
import type { BaseOption, SmartSelectKinds } from "./type";
|
|
3
|
+
import type { ComboOptionState } from "./use-async-options";
|
|
4
|
+
export interface SmartSelectContext {
|
|
5
|
+
readonly kindAndValue: SmartSelectKinds<BaseOption>;
|
|
6
|
+
readonly open: boolean;
|
|
7
|
+
readonly onOpenChange: (b: boolean) => void;
|
|
8
|
+
readonly openKeys: string[];
|
|
9
|
+
readonly closeKeys: string[];
|
|
10
|
+
readonly options: BaseOption[];
|
|
11
|
+
readonly openOnClick: boolean;
|
|
12
|
+
readonly closeOnSelect: boolean;
|
|
13
|
+
readonly onOptionSelect: (b: BaseOption) => void;
|
|
14
|
+
readonly onOptionsChange: (b: BaseOption[]) => void;
|
|
15
|
+
readonly rtl: boolean;
|
|
16
|
+
readonly inputRef: RefObject<HTMLElement | null>;
|
|
17
|
+
readonly trigger: HTMLElement | null;
|
|
18
|
+
readonly setTrigger: Dispatch<SetStateAction<HTMLElement | null>>;
|
|
19
|
+
readonly activeId: string | null;
|
|
20
|
+
readonly setActiveId: Dispatch<SetStateAction<string | null>>;
|
|
21
|
+
readonly container: HTMLElement | null;
|
|
22
|
+
readonly setContainer: Dispatch<SetStateAction<HTMLElement | null>>;
|
|
23
|
+
readonly query: string;
|
|
24
|
+
readonly onQueryChange: (change: string) => void;
|
|
25
|
+
readonly comboState: ComboOptionState<BaseOption>;
|
|
26
|
+
readonly preventNextOpen: {
|
|
27
|
+
current: boolean;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export declare const SmartSelectProvider: import("react").Provider<SmartSelectContext>;
|
|
31
|
+
export declare const useSmartSelect: () => SmartSelectContext;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { Popover } from "../headless/popover";
|
|
3
|
+
import { type ChipProps } from "./chip.js";
|
|
4
|
+
import type { SmartSelectRootProps } from "./root";
|
|
5
|
+
import { type MultiComboTriggerProps } from "./triggers/multi-combo-trigger.js";
|
|
6
|
+
import { type MultiTriggerProps } from "./triggers/multi-trigger.js";
|
|
7
|
+
import type { BaseOption } from "./type";
|
|
8
|
+
export declare const SmartSelect: {
|
|
9
|
+
<T extends BaseOption>(props: SmartSelectRootProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Container: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
|
|
11
|
+
Chip: import("react").ForwardRefExoticComponent<Omit<ChipProps<BaseOption>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
ChipRemove: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
BasicTrigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
MultiTrigger: import("react").ForwardRefExoticComponent<Omit<MultiTriggerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
ComboTrigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
16
|
+
MultiComboTrigger: import("react").ForwardRefExoticComponent<Omit<MultiComboTriggerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Option: import("react").ForwardRefExoticComponent<Omit<import("./option.js").OptionTriggerProps<BaseOption>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
};
|
|
19
|
+
export declare namespace SmartSelect {
|
|
20
|
+
type Props<T extends BaseOption> = SmartSelectRootProps<T>;
|
|
21
|
+
namespace Component {
|
|
22
|
+
type Container = Popover.Component.Container;
|
|
23
|
+
type Chip<T extends BaseOption> = ChipProps<T>;
|
|
24
|
+
type BasicTrigger = JSX.IntrinsicElements["button"];
|
|
25
|
+
type MultiTrigger = MultiTriggerProps;
|
|
26
|
+
type ComboTrigger = JSX.IntrinsicElements["input"];
|
|
27
|
+
type MultiComboTrigger = MultiComboTriggerProps;
|
|
28
|
+
type ChipRemove = JSX.IntrinsicElements["button"];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Chip } from "./chip.js";
|
|
3
|
+
import { SmartSelectContainer } from "./container.js";
|
|
4
|
+
import { Option } from "./option.js";
|
|
5
|
+
import { SmartSelectRoot } from "./root.js";
|
|
6
|
+
import { BasicSelectTrigger } from "./triggers/basic-trigger.js";
|
|
7
|
+
import { ComboTrigger } from "./triggers/combo-trigger.js";
|
|
8
|
+
import { MultiComboTrigger } from "./triggers/multi-combo-trigger.js";
|
|
9
|
+
import { MultiTrigger } from "./triggers/multi-trigger.js";
|
|
10
|
+
import { ChipRemove } from "./chip-remove.js";
|
|
11
|
+
export const SmartSelect = (props) => (_jsx(SmartSelectRoot, { ...props }));
|
|
12
|
+
SmartSelect.Container = SmartSelectContainer;
|
|
13
|
+
SmartSelect.Chip = Chip;
|
|
14
|
+
SmartSelect.ChipRemove = ChipRemove;
|
|
15
|
+
SmartSelect.BasicTrigger = BasicSelectTrigger;
|
|
16
|
+
SmartSelect.MultiTrigger = MultiTrigger;
|
|
17
|
+
SmartSelect.ComboTrigger = ComboTrigger;
|
|
18
|
+
SmartSelect.MultiComboTrigger = MultiComboTrigger;
|
|
19
|
+
SmartSelect.Option = Option;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
import { type SlotComponent } from "../../hooks/use-slot/index.js";
|
|
3
|
+
import type { BaseOption, OptionRenderProps } from "./type.js";
|
|
4
|
+
export type OptionTriggerProps<T extends BaseOption> = JSX.IntrinsicElements["div"] & {
|
|
5
|
+
readonly render?: SlotComponent<OptionRenderProps<T>>;
|
|
6
|
+
readonly closeOnSelect?: boolean;
|
|
7
|
+
} & OptionRenderProps<T>;
|
|
8
|
+
export declare const Option: import("react").ForwardRefExoticComponent<Omit<OptionTriggerProps<BaseOption>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { useSlot } from "../../hooks/use-slot/index.js";
|
|
3
|
+
import { useSmartSelect } from "./context.js";
|
|
4
|
+
function OptionBase({ render, option, active, selected, closeOnSelect: closeOverride, ...props }, ref) {
|
|
5
|
+
const { onOptionSelect, setActiveId, closeOnSelect, onOpenChange, inputRef } = useSmartSelect();
|
|
6
|
+
const closeOnSelectFinal = closeOverride ?? closeOnSelect;
|
|
7
|
+
const r = useSlot({
|
|
8
|
+
props: [
|
|
9
|
+
{
|
|
10
|
+
"data-ln-selected": selected,
|
|
11
|
+
"data-ln-active": active,
|
|
12
|
+
"data-ln-smart-option": option.id,
|
|
13
|
+
"data-ln-selectable": option.selectable ?? true,
|
|
14
|
+
"data-ln-close-on-select": closeOnSelectFinal,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
onMouseDown: () => {
|
|
18
|
+
onOptionSelect(option);
|
|
19
|
+
},
|
|
20
|
+
onClick: () => {
|
|
21
|
+
inputRef.current?.focus();
|
|
22
|
+
if (closeOnSelectFinal)
|
|
23
|
+
onOpenChange(false);
|
|
24
|
+
},
|
|
25
|
+
onMouseEnter: () => setActiveId(option.id),
|
|
26
|
+
onMouseLeave: () => setActiveId(null),
|
|
27
|
+
},
|
|
28
|
+
props,
|
|
29
|
+
],
|
|
30
|
+
ref,
|
|
31
|
+
slot: render,
|
|
32
|
+
state: { option, selected, active },
|
|
33
|
+
});
|
|
34
|
+
return r;
|
|
35
|
+
}
|
|
36
|
+
export const Option = forwardRef(OptionBase);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type PropsWithChildren, type ReactNode } from "react";
|
|
2
|
+
import type { SlotComponent } from "../../hooks/use-slot/types.js";
|
|
3
|
+
import type { BaseOption, OptionRenderProps, SmartSelectKinds } from "./type.js";
|
|
4
|
+
import { type ComboOptionState } from "./use-async-options.js";
|
|
5
|
+
export type SmartSelectRootProps<T extends BaseOption> = {
|
|
6
|
+
readonly open?: boolean;
|
|
7
|
+
readonly onOpenChange?: (open: boolean) => void;
|
|
8
|
+
readonly onOpenChangeComplete?: (open: boolean) => void;
|
|
9
|
+
readonly openOnClick?: boolean;
|
|
10
|
+
readonly openKeys?: string[];
|
|
11
|
+
readonly closeKeys?: string[];
|
|
12
|
+
readonly trigger: SlotComponent;
|
|
13
|
+
readonly container?: SlotComponent<PropsWithChildren<ComboOptionState<T>>>;
|
|
14
|
+
readonly closeOnSelect?: boolean;
|
|
15
|
+
readonly children?: (params: OptionRenderProps<T>) => ReactNode;
|
|
16
|
+
} & SmartSelectKinds<T>;
|
|
17
|
+
export declare function SmartSelectRoot<T extends BaseOption>(p: SmartSelectRootProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useControlled, useEvent } from "@1771technologies/lytenyte-core/internal";
|
|
3
|
+
import { Fragment, useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
4
|
+
import { SmartSelectProvider } from "./context.js";
|
|
5
|
+
import { Popover } from "../headless/popover/index.js";
|
|
6
|
+
import { useSlot } from "../../hooks/use-slot/use-slot.js";
|
|
7
|
+
import { SmartSelectContainer } from "./container.js";
|
|
8
|
+
import { Option } from "./option.js";
|
|
9
|
+
import { useAsyncOptions } from "./use-async-options.js";
|
|
10
|
+
import { getNearestMatching } from "@1771technologies/lytenyte-shared";
|
|
11
|
+
import { createPortal } from "react-dom";
|
|
12
|
+
export function SmartSelectRoot(p) {
|
|
13
|
+
const [open, setOpen] = useControlled({ controlled: p.open, default: false });
|
|
14
|
+
const [query, setQuery] = useControlled({ controlled: p.query, default: "" });
|
|
15
|
+
const [triggerEl, setTriggerEl] = useState(null);
|
|
16
|
+
const [activeId, setActiveId] = useState(null);
|
|
17
|
+
const [containerEl, setContainerEl] = useState(null);
|
|
18
|
+
const [rtl, setRtl] = useState(false);
|
|
19
|
+
const triggerRef = useCallback((el) => {
|
|
20
|
+
setTriggerEl(el);
|
|
21
|
+
if (!el)
|
|
22
|
+
return;
|
|
23
|
+
const style = getComputedStyle(el);
|
|
24
|
+
setRtl(style.direction === "rtl");
|
|
25
|
+
}, []);
|
|
26
|
+
const onOpenChange = useEvent((b) => {
|
|
27
|
+
setOpen(b);
|
|
28
|
+
p.onOpenChange?.(b);
|
|
29
|
+
});
|
|
30
|
+
const onQueryChange = useEvent((change) => {
|
|
31
|
+
setQuery(change);
|
|
32
|
+
p.onQueryChange?.(change);
|
|
33
|
+
});
|
|
34
|
+
const normalizedValue = useMemo(() => {
|
|
35
|
+
if (p.kind === "basic" || p.kind === "combo")
|
|
36
|
+
return [p.value];
|
|
37
|
+
return p.value;
|
|
38
|
+
}, [p.kind, p.value]);
|
|
39
|
+
const clearOnSelect = p.clearOnSelect ?? true;
|
|
40
|
+
const onOptionSelect = useEvent((change) => {
|
|
41
|
+
if (p.kind === "basic" || p.kind === "combo") {
|
|
42
|
+
const isSelected = p.value?.id === change.id;
|
|
43
|
+
if (isSelected)
|
|
44
|
+
p.onOptionChange(null);
|
|
45
|
+
else
|
|
46
|
+
p.onOptionChange(change);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const isSelected = p.value.find((x) => x.id === change.id);
|
|
50
|
+
const next = isSelected ? p.value.filter((x) => x.id !== change.id) : [...p.value, change];
|
|
51
|
+
p.onOptionChange(next);
|
|
52
|
+
}
|
|
53
|
+
if (clearOnSelect)
|
|
54
|
+
onQueryChange("");
|
|
55
|
+
});
|
|
56
|
+
const onOptionsChange = useEvent((change) => {
|
|
57
|
+
if (p.kind === "basic" || p.kind === "combo")
|
|
58
|
+
return;
|
|
59
|
+
p.onOptionChange(change);
|
|
60
|
+
});
|
|
61
|
+
const optValue = typeof p.options === "function" ? null : p.options;
|
|
62
|
+
const basicSelectOptions = useMemo(() => {
|
|
63
|
+
return optValue ?? [];
|
|
64
|
+
}, [optValue]);
|
|
65
|
+
const comboState = useAsyncOptions(typeof p.options === "function" ? p.options : null, p.clearOnQuery ?? false);
|
|
66
|
+
const options = typeof p.options === "function" ? comboState.options : basicSelectOptions;
|
|
67
|
+
const debounce = p.kind === "multi" || p.kind === "multi-combo"
|
|
68
|
+
? (p.searchDebounceMs ?? 200)
|
|
69
|
+
: 0;
|
|
70
|
+
const loadOptions = comboState.loadOptions;
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (p.kind !== "multi-combo" && p.kind !== "combo")
|
|
73
|
+
return;
|
|
74
|
+
const t = setTimeout(() => {
|
|
75
|
+
loadOptions(query);
|
|
76
|
+
}, debounce);
|
|
77
|
+
return () => clearTimeout(t);
|
|
78
|
+
}, [loadOptions, debounce, p.kind, query]);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (!open)
|
|
81
|
+
return;
|
|
82
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
83
|
+
setActiveId((prev) => {
|
|
84
|
+
const active = prev ? (options.find((x) => x.id === prev) ?? null) : null;
|
|
85
|
+
if (!active)
|
|
86
|
+
queueMicrotask(() => setActiveId(options.at(0)?.id ?? null));
|
|
87
|
+
return prev;
|
|
88
|
+
});
|
|
89
|
+
}, [comboState, open, options]);
|
|
90
|
+
const renderedOptions = useMemo(() => {
|
|
91
|
+
const render = p.children ?? DefaultChildren;
|
|
92
|
+
return options.map((x) => {
|
|
93
|
+
const selected = !!normalizedValue.find((v) => x.id === v?.id);
|
|
94
|
+
const active = x.id === activeId;
|
|
95
|
+
return _jsx(Fragment, { children: render({ option: x, selected, active }) }, x.id);
|
|
96
|
+
});
|
|
97
|
+
}, [activeId, normalizedValue, options, p.children]);
|
|
98
|
+
const trigger = useSlot({ slot: p.trigger });
|
|
99
|
+
const container = useSlot({
|
|
100
|
+
props: [{ children: renderedOptions }],
|
|
101
|
+
slot: p.container ?? _jsx(SmartSelectContainer, {}),
|
|
102
|
+
state: {
|
|
103
|
+
children: renderedOptions,
|
|
104
|
+
...comboState,
|
|
105
|
+
options,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
const inputRef = useRef(null);
|
|
109
|
+
const value = useMemo(() => {
|
|
110
|
+
return {
|
|
111
|
+
onOpenChange,
|
|
112
|
+
open,
|
|
113
|
+
closeOnSelect: p.closeOnSelect ?? true,
|
|
114
|
+
onOptionSelect,
|
|
115
|
+
onOptionsChange,
|
|
116
|
+
kindAndValue: { kind: p.kind, value: p.value },
|
|
117
|
+
options,
|
|
118
|
+
inputRef,
|
|
119
|
+
trigger: triggerEl,
|
|
120
|
+
setTrigger: triggerRef,
|
|
121
|
+
rtl,
|
|
122
|
+
openKeys: p.openKeys ?? [" ", "Enter", "ArrowDown"],
|
|
123
|
+
closeKeys: p.closeKeys ?? ["Escape"],
|
|
124
|
+
activeId: activeId,
|
|
125
|
+
setActiveId: setActiveId,
|
|
126
|
+
container: containerEl,
|
|
127
|
+
setContainer: setContainerEl,
|
|
128
|
+
query,
|
|
129
|
+
onQueryChange,
|
|
130
|
+
openOnClick: p.openOnClick ?? true,
|
|
131
|
+
preventNextOpen: { current: false },
|
|
132
|
+
comboState,
|
|
133
|
+
};
|
|
134
|
+
}, [
|
|
135
|
+
activeId,
|
|
136
|
+
comboState,
|
|
137
|
+
containerEl,
|
|
138
|
+
onOpenChange,
|
|
139
|
+
onOptionSelect,
|
|
140
|
+
onOptionsChange,
|
|
141
|
+
onQueryChange,
|
|
142
|
+
open,
|
|
143
|
+
options,
|
|
144
|
+
p.closeKeys,
|
|
145
|
+
p.closeOnSelect,
|
|
146
|
+
p.kind,
|
|
147
|
+
p.openKeys,
|
|
148
|
+
p.openOnClick,
|
|
149
|
+
p.value,
|
|
150
|
+
query,
|
|
151
|
+
rtl,
|
|
152
|
+
triggerEl,
|
|
153
|
+
triggerRef,
|
|
154
|
+
]);
|
|
155
|
+
const lightDismiss = useCallback((el) => {
|
|
156
|
+
const closest = getNearestMatching(el, (el) => el === triggerEl);
|
|
157
|
+
if (!closest)
|
|
158
|
+
return true;
|
|
159
|
+
return false;
|
|
160
|
+
}, [triggerEl]);
|
|
161
|
+
return (_jsx(SmartSelectProvider, { value: value, children: _jsxs(Popover, { open: open, onOpenChange: onOpenChange, onOpenChangeComplete: p.onOpenChangeComplete, focusTrap: false, modal: false, anchor: triggerEl, lightDismiss: lightDismiss, children: [trigger, triggerEl && createPortal(container, triggerEl)] }) }));
|
|
162
|
+
}
|
|
163
|
+
function DefaultChildren(p) {
|
|
164
|
+
return _jsx(Option, { ...p });
|
|
165
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "../../../css/components.css";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { SmartSelectRoot } from "./root.js";
|
|
5
|
+
import { Option } from "./option.js";
|
|
6
|
+
import { SmartSelectContainer } from "./container.js";
|
|
7
|
+
import { Chip } from "./chip.js";
|
|
8
|
+
import { MultiTrigger } from "./triggers/multi-trigger.js";
|
|
9
|
+
const options = [
|
|
10
|
+
{ id: "js", label: "JavaScript" },
|
|
11
|
+
{ id: "ts", label: "TypeScript" },
|
|
12
|
+
{ id: "py", label: "Python" },
|
|
13
|
+
{ id: "java", label: "Java" },
|
|
14
|
+
{ id: "cpp", label: "C++" },
|
|
15
|
+
{ id: "cs", label: "C#" },
|
|
16
|
+
{ id: "php", label: "PHP" },
|
|
17
|
+
{ id: "ruby", label: "Ruby" },
|
|
18
|
+
{ id: "go", label: "Go" },
|
|
19
|
+
{ id: "rust", label: "Rust" },
|
|
20
|
+
{ id: "swift", label: "Swift" },
|
|
21
|
+
];
|
|
22
|
+
export default function SmartSelect() {
|
|
23
|
+
const [value, setValue] = useState([options[0]]);
|
|
24
|
+
void setValue;
|
|
25
|
+
return (_jsx("div", { style: { display: "flex", justifyContent: "center", padding: 20 }, children: _jsx(SmartSelectRoot, { options: options, value: value, onOptionChange: (v) => {
|
|
26
|
+
if (!v)
|
|
27
|
+
return;
|
|
28
|
+
setValue(v);
|
|
29
|
+
}, closeOnSelect: false, kind: "multi", container: (p) => {
|
|
30
|
+
return (_jsxs(SmartSelectContainer, { children: [p.loading && _jsx("div", { children: "Loading...." }), p.children] }));
|
|
31
|
+
}, trigger: _jsx(MultiTrigger, { render: _jsxs("button", { "data-ln-button": "website", "data-ln-size": "md", children: [_jsx("div", { children: "Select Items" }), _jsx("div", {})] }), className: "flex items-center", children: value.map((x) => {
|
|
32
|
+
return (_jsx(Chip, { option: x, render: (p) => (_jsxs("div", { children: [x.label, p.active && "A"] })) }, x.id));
|
|
33
|
+
}) }), children: (p) => {
|
|
34
|
+
return (_jsxs(Option, { ...p, children: [_jsx("div", { children: p.option.label }), _jsx("div", { children: p.selected && "✔️" })] }));
|
|
35
|
+
} }) }));
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BasicSelectTrigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useSmartSelect } from "../context.js";
|
|
4
|
+
import { mergeProps } from "../../../hooks/use-slot/merge-props.js";
|
|
5
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
+
import { useSelectControls } from "./use-trigger-controls.js";
|
|
7
|
+
const noop = () => { };
|
|
8
|
+
function BasicSelectTriggerBase(props, ref) {
|
|
9
|
+
const { kindAndValue, setTrigger, inputRef, open } = useSmartSelect();
|
|
10
|
+
if (kindAndValue.kind !== "basic") {
|
|
11
|
+
throw new Error(`Cannot use BasicSelectTrigger when SmartSelect kind is not "basic". Found: ${kindAndValue.kind}`);
|
|
12
|
+
}
|
|
13
|
+
const triggerControls = useSelectControls(false, noop);
|
|
14
|
+
const p = mergeProps(props, triggerControls);
|
|
15
|
+
const combined = useCombinedRefs(setTrigger, ref, inputRef);
|
|
16
|
+
return _jsx("button", { ...p, ref: combined, "data-ln-smart-select-trigger": true, "data-ln-open": open });
|
|
17
|
+
}
|
|
18
|
+
export const BasicSelectTrigger = forwardRef(BasicSelectTriggerBase);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ComboTrigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useSmartSelect } from "../context.js";
|
|
4
|
+
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
5
|
+
import { mergeProps } from "../../../hooks/use-slot/merge-props.js";
|
|
6
|
+
import { useComboControls } from "./use-combo-controls.js";
|
|
7
|
+
const noop = () => { };
|
|
8
|
+
function ComboTriggerBase(props, ref) {
|
|
9
|
+
const { kindAndValue, setTrigger, inputRef, open, comboState } = useSmartSelect();
|
|
10
|
+
if (kindAndValue.kind !== "combo") {
|
|
11
|
+
throw new Error(`Cannot use BasicSelectTrigger when SmartSelect kind is not "combo". Found: ${kindAndValue.kind}`);
|
|
12
|
+
}
|
|
13
|
+
const combined = useCombinedRefs(setTrigger, ref, inputRef);
|
|
14
|
+
const p = mergeProps(props, useComboControls(noop, false));
|
|
15
|
+
return (_jsx("input", { ...p, ref: combined, "data-ln-smart-select-trigger": true, "data-ln-open": open, "data-ln-smart-select-loading": comboState.loading, "data-ln-smart-select-error": !!comboState.error }));
|
|
16
|
+
}
|
|
17
|
+
export const ComboTrigger = forwardRef(ComboTriggerBase);
|