@pipe0/react 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +69 -2
- package/dist/components/compound/pipe-catalog/active-filters.d.mts +7 -10
- package/dist/components/compound/pipe-catalog/active-filters.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/active-filters.mjs +22 -18
- package/dist/components/compound/pipe-catalog/active-filters.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/card.d.mts +3 -11
- package/dist/components/compound/pipe-catalog/card.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/card.mjs +30 -25
- package/dist/components/compound/pipe-catalog/card.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/category-filter.d.mts +7 -10
- package/dist/components/compound/pipe-catalog/category-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/category-filter.mjs +18 -9
- package/dist/components/compound/pipe-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/column-filter.d.mts +7 -13
- package/dist/components/compound/pipe-catalog/column-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/column-filter.mjs +13 -7
- package/dist/components/compound/pipe-catalog/column-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/empty.d.mts +5 -10
- package/dist/components/compound/pipe-catalog/empty.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/empty.mjs +12 -14
- package/dist/components/compound/pipe-catalog/empty.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/index.d.mts +1 -1
- package/dist/components/compound/pipe-catalog/input-field-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/input-field-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/input-field-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/list.d.mts +9 -24
- package/dist/components/compound/pipe-catalog/list.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/list.mjs +18 -14
- package/dist/components/compound/pipe-catalog/list.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/output-field-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/output-field-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/provider-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/provider-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/root.d.mts +6 -6
- package/dist/components/compound/pipe-catalog/root.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/root.mjs +2 -2
- package/dist/components/compound/pipe-catalog/root.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/search-filter.d.mts +6 -9
- package/dist/components/compound/pipe-catalog/search-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/search-filter.mjs +10 -9
- package/dist/components/compound/pipe-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/tag-filter.d.mts +3 -3
- package/dist/components/compound/pipe-catalog/tag-filter.d.mts.map +1 -1
- package/dist/components/compound/pipe-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-form/content.d.mts +7 -2
- package/dist/components/compound/pipe-form/content.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/content.mjs +23 -25
- package/dist/components/compound/pipe-form/content.mjs.map +1 -1
- package/dist/components/compound/pipe-form/errors.d.mts +27 -0
- package/dist/components/compound/pipe-form/errors.d.mts.map +1 -0
- package/dist/components/compound/pipe-form/errors.mjs +48 -0
- package/dist/components/compound/pipe-form/errors.mjs.map +1 -0
- package/dist/components/compound/pipe-form/footer.d.mts +7 -7
- package/dist/components/compound/pipe-form/footer.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/footer.mjs +11 -6
- package/dist/components/compound/pipe-form/footer.mjs.map +1 -1
- package/dist/components/compound/pipe-form/header.d.mts +7 -7
- package/dist/components/compound/pipe-form/header.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/header.mjs +11 -6
- package/dist/components/compound/pipe-form/header.mjs.map +1 -1
- package/dist/components/compound/pipe-form/index.d.mts +2 -1
- package/dist/components/compound/pipe-form/root.d.mts +18 -11
- package/dist/components/compound/pipe-form/root.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/root.mjs +21 -27
- package/dist/components/compound/pipe-form/root.mjs.map +1 -1
- package/dist/components/compound/pipe-form/submit-button.d.mts +15 -4
- package/dist/components/compound/pipe-form/submit-button.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/submit-button.mjs +23 -8
- package/dist/components/compound/pipe-form/submit-button.mjs.map +1 -1
- package/dist/components/compound/pipe-form/title.d.mts +9 -8
- package/dist/components/compound/pipe-form/title.d.mts.map +1 -1
- package/dist/components/compound/pipe-form/title.mjs +11 -6
- package/dist/components/compound/pipe-form/title.mjs.map +1 -1
- package/dist/components/compound/search-catalog/active-filters.d.mts +7 -10
- package/dist/components/compound/search-catalog/active-filters.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/active-filters.mjs +22 -18
- package/dist/components/compound/search-catalog/active-filters.mjs.map +1 -1
- package/dist/components/compound/search-catalog/card.d.mts +4 -12
- package/dist/components/compound/search-catalog/card.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/card.mjs +33 -28
- package/dist/components/compound/search-catalog/card.mjs.map +1 -1
- package/dist/components/compound/search-catalog/category-filter.d.mts +8 -10
- package/dist/components/compound/search-catalog/category-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/category-filter.mjs +18 -9
- package/dist/components/compound/search-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/column-filter.d.mts +7 -9
- package/dist/components/compound/search-catalog/column-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/column-filter.mjs +13 -7
- package/dist/components/compound/search-catalog/column-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/empty.d.mts +5 -10
- package/dist/components/compound/search-catalog/empty.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/empty.mjs +12 -14
- package/dist/components/compound/search-catalog/empty.mjs.map +1 -1
- package/dist/components/compound/search-catalog/index.d.mts +1 -1
- package/dist/components/compound/search-catalog/list.d.mts +9 -9
- package/dist/components/compound/search-catalog/list.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/list.mjs +18 -14
- package/dist/components/compound/search-catalog/list.mjs.map +1 -1
- package/dist/components/compound/search-catalog/output-field-filter.d.mts +3 -3
- package/dist/components/compound/search-catalog/output-field-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/provider-filter.d.mts +3 -3
- package/dist/components/compound/search-catalog/provider-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/root.d.mts +6 -6
- package/dist/components/compound/search-catalog/root.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/root.mjs +2 -2
- package/dist/components/compound/search-catalog/root.mjs.map +1 -1
- package/dist/components/compound/search-catalog/search-filter.d.mts +6 -9
- package/dist/components/compound/search-catalog/search-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/search-filter.mjs +10 -9
- package/dist/components/compound/search-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/tag-filter.d.mts +3 -3
- package/dist/components/compound/search-catalog/tag-filter.d.mts.map +1 -1
- package/dist/components/compound/search-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/compound/search-form/content.d.mts +7 -2
- package/dist/components/compound/search-form/content.d.mts.map +1 -1
- package/dist/components/compound/search-form/content.mjs +23 -25
- package/dist/components/compound/search-form/content.mjs.map +1 -1
- package/dist/components/compound/search-form/errors.d.mts +27 -0
- package/dist/components/compound/search-form/errors.d.mts.map +1 -0
- package/dist/components/compound/search-form/errors.mjs +48 -0
- package/dist/components/compound/search-form/errors.mjs.map +1 -0
- package/dist/components/compound/search-form/footer.d.mts +7 -7
- package/dist/components/compound/search-form/footer.d.mts.map +1 -1
- package/dist/components/compound/search-form/footer.mjs +11 -6
- package/dist/components/compound/search-form/footer.mjs.map +1 -1
- package/dist/components/compound/search-form/header.d.mts +7 -7
- package/dist/components/compound/search-form/header.d.mts.map +1 -1
- package/dist/components/compound/search-form/header.mjs +11 -6
- package/dist/components/compound/search-form/header.mjs.map +1 -1
- package/dist/components/compound/search-form/index.d.mts +2 -1
- package/dist/components/compound/search-form/root.d.mts +19 -12
- package/dist/components/compound/search-form/root.d.mts.map +1 -1
- package/dist/components/compound/search-form/root.mjs +21 -27
- package/dist/components/compound/search-form/root.mjs.map +1 -1
- package/dist/components/compound/search-form/submit-button.d.mts +15 -4
- package/dist/components/compound/search-form/submit-button.d.mts.map +1 -1
- package/dist/components/compound/search-form/submit-button.mjs +23 -8
- package/dist/components/compound/search-form/submit-button.mjs.map +1 -1
- package/dist/components/compound/search-form/title.d.mts +9 -8
- package/dist/components/compound/search-form/title.d.mts.map +1 -1
- package/dist/components/compound/search-form/title.mjs +11 -6
- package/dist/components/compound/search-form/title.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/active-filters.d.mts +7 -10
- package/dist/components/compound/searches-catalog/active-filters.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/active-filters.mjs +22 -18
- package/dist/components/compound/searches-catalog/active-filters.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/card.d.mts +6 -6
- package/dist/components/compound/searches-catalog/card.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/card.mjs +40 -28
- package/dist/components/compound/searches-catalog/card.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/category-filter.d.mts +8 -10
- package/dist/components/compound/searches-catalog/category-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/category-filter.mjs +18 -9
- package/dist/components/compound/searches-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/column-filter.d.mts +7 -9
- package/dist/components/compound/searches-catalog/column-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/column-filter.mjs +13 -7
- package/dist/components/compound/searches-catalog/column-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/empty.d.mts +5 -10
- package/dist/components/compound/searches-catalog/empty.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/empty.mjs +12 -14
- package/dist/components/compound/searches-catalog/empty.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/index.d.mts +1 -1
- package/dist/components/compound/searches-catalog/list.d.mts +9 -9
- package/dist/components/compound/searches-catalog/list.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/list.mjs +18 -14
- package/dist/components/compound/searches-catalog/list.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/output-field-filter.d.mts +3 -3
- package/dist/components/compound/searches-catalog/output-field-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/provider-filter.d.mts +3 -3
- package/dist/components/compound/searches-catalog/provider-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/root.d.mts +6 -6
- package/dist/components/compound/searches-catalog/root.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/root.mjs +2 -2
- package/dist/components/compound/searches-catalog/root.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/search-filter.d.mts +6 -9
- package/dist/components/compound/searches-catalog/search-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/search-filter.mjs +10 -9
- package/dist/components/compound/searches-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/searches-catalog/tag-filter.d.mts +3 -3
- package/dist/components/compound/searches-catalog/tag-filter.d.mts.map +1 -1
- package/dist/components/compound/searches-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/defaults/adapters/index.mjs +2 -2
- package/dist/components/defaults/adapters/index.mjs.map +1 -1
- package/dist/components/defaults/adapters/json-extraction-input.mjs +291 -199
- package/dist/components/defaults/adapters/json-extraction-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/{pipes-trigger-input.mjs → pipes-run-if-input.mjs} +32 -32
- package/dist/components/defaults/adapters/pipes-run-if-input.mjs.map +1 -0
- package/dist/components/defaults/adapters/providers-input.mjs +221 -13
- package/dist/components/defaults/adapters/providers-input.mjs.map +1 -1
- package/dist/components/defaults/catalog/card-primitives.d.mts +14 -24
- package/dist/components/defaults/catalog/card-primitives.d.mts.map +1 -1
- package/dist/components/defaults/catalog/card-primitives.mjs +19 -19
- package/dist/components/defaults/catalog/card-primitives.mjs.map +1 -1
- package/dist/components/defaults/catalog/layout.mjs +7 -10
- package/dist/components/defaults/catalog/layout.mjs.map +1 -1
- package/dist/components/defaults/layout/field-wrapper.d.mts +2 -1
- package/dist/components/defaults/layout/field-wrapper.d.mts.map +1 -1
- package/dist/components/defaults/layout/field-wrapper.mjs +7 -2
- package/dist/components/defaults/layout/field-wrapper.mjs.map +1 -1
- package/dist/components/defaults/layout/group.d.mts +6 -3
- package/dist/components/defaults/layout/group.d.mts.map +1 -1
- package/dist/components/defaults/layout/group.mjs +74 -53
- package/dist/components/defaults/layout/group.mjs.map +1 -1
- package/dist/components/defaults/layout/section.d.mts +9 -3
- package/dist/components/defaults/layout/section.d.mts.map +1 -1
- package/dist/components/defaults/layout/section.mjs +13 -11
- package/dist/components/defaults/layout/section.mjs.map +1 -1
- package/dist/components/field-renderer.d.mts.map +1 -1
- package/dist/components/field-renderer.mjs +1 -1
- package/dist/components/field-renderer.mjs.map +1 -1
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs +30 -15
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs.map +1 -1
- package/dist/components/internal/icons.mjs +36 -1
- package/dist/components/internal/icons.mjs.map +1 -1
- package/dist/components/internal/multi-select-popover-trigger.mjs +0 -1
- package/dist/components/internal/multi-select-popover-trigger.mjs.map +1 -1
- package/dist/components/internal/tag-chip-decoration.mjs +15 -0
- package/dist/components/internal/tag-chip-decoration.mjs.map +1 -1
- package/dist/components/ui/badge.mjs +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/combobox.mjs +0 -1
- package/dist/components/ui/combobox.mjs.map +1 -1
- package/dist/context/pipe-catalog-card-context.d.mts +7 -0
- package/dist/context/pipe-catalog-card-context.d.mts.map +1 -1
- package/dist/context/pipe-catalog-card-context.mjs.map +1 -1
- package/dist/context/pipe-form-context.d.mts +17 -3
- package/dist/context/pipe-form-context.d.mts.map +1 -1
- package/dist/context/pipe-form-context.mjs.map +1 -1
- package/dist/context/search-catalog-card-context.d.mts +8 -0
- package/dist/context/search-catalog-card-context.d.mts.map +1 -1
- package/dist/context/search-catalog-card-context.mjs.map +1 -1
- package/dist/context/search-form-context.d.mts +17 -3
- package/dist/context/search-form-context.d.mts.map +1 -1
- package/dist/context/search-form-context.mjs.map +1 -1
- package/dist/context/searches-catalog-card-context.d.mts +8 -0
- package/dist/context/searches-catalog-card-context.d.mts.map +1 -1
- package/dist/context/searches-catalog-card-context.mjs.map +1 -1
- package/dist/hooks/use-field-error.d.mts +2 -2
- package/dist/hooks/use-field-error.d.mts.map +1 -1
- package/dist/hooks/use-field-error.mjs +7 -3
- package/dist/hooks/use-field-error.mjs.map +1 -1
- package/dist/hooks/use-form-core.d.mts +0 -3
- package/dist/hooks/use-form-core.d.mts.map +1 -1
- package/dist/hooks/use-form-core.mjs +36 -2
- package/dist/hooks/use-form-core.mjs.map +1 -1
- package/dist/hooks/use-pipe-catalog-table.d.mts +8 -8
- package/dist/hooks/use-pipe-form.d.mts +11 -0
- package/dist/hooks/use-pipe-form.d.mts.map +1 -1
- package/dist/hooks/use-pipe-form.mjs +35 -6
- package/dist/hooks/use-pipe-form.mjs.map +1 -1
- package/dist/hooks/use-search-catalog-table.d.mts +6 -6
- package/dist/hooks/use-search-form.d.mts +11 -0
- package/dist/hooks/use-search-form.d.mts.map +1 -1
- package/dist/hooks/use-search-form.mjs +35 -6
- package/dist/hooks/use-search-form.mjs.map +1 -1
- package/dist/index.d.mts +9 -8
- package/dist/index.mjs +3 -9
- package/dist/styles/pipe0-form.css +4116 -1
- package/dist/types/adapters.d.mts +6 -5
- package/dist/types/adapters.d.mts.map +1 -1
- package/dist/types/catalog-adapters.d.mts +2 -2
- package/dist/types/field-props.d.mts +4 -16
- package/dist/types/field-props.d.mts.map +1 -1
- package/dist/types/form-handle.d.mts +81 -1
- package/dist/types/form-handle.d.mts.map +1 -1
- package/dist/utils/build-section-handlers.mjs +6 -2
- package/dist/utils/build-section-handlers.mjs.map +1 -1
- package/dist/utils/internal-form.mjs +28 -0
- package/dist/utils/internal-form.mjs.map +1 -0
- package/dist/widgets/avatar-group.d.mts +4 -7
- package/dist/widgets/avatar-group.d.mts.map +1 -1
- package/dist/widgets/avatar-group.mjs +13 -12
- package/dist/widgets/avatar-group.mjs.map +1 -1
- package/package.json +70 -18
- package/dist/components/compound/pipe-catalog/index.mjs +0 -15
- package/dist/components/compound/pipe-form/index.mjs +0 -11
- package/dist/components/compound/search-catalog/index.mjs +0 -14
- package/dist/components/compound/search-form/index.mjs +0 -11
- package/dist/components/compound/searches-catalog/index.mjs +0 -14
- package/dist/components/defaults/adapters/pipes-trigger-input.mjs.map +0 -1
- package/dist/components/defaults/layout/submit-button.d.mts +0 -9
- package/dist/components/defaults/layout/submit-button.d.mts.map +0 -1
- package/dist/components/defaults/layout/submit-button.mjs +0 -23
- package/dist/components/defaults/layout/submit-button.mjs.map +0 -1
- package/dist/components/defaults/toggle-advanced-button.mjs +0 -29
- package/dist/components/defaults/toggle-advanced-button.mjs.map +0 -1
- package/dist/components/ui/input-group.mjs +0 -30
- package/dist/components/ui/input-group.mjs.map +0 -1
- package/dist/context/form-customization-context.d.mts +0 -71
- package/dist/context/form-customization-context.d.mts.map +0 -1
- package/dist/context/form-customization-context.mjs +0 -114
- package/dist/context/form-customization-context.mjs.map +0 -1
- package/dist/hooks/use-disclosure.mjs +0 -35
- package/dist/hooks/use-disclosure.mjs.map +0 -1
- package/dist/utils/render-slot.d.mts +0 -44
- package/dist/utils/render-slot.d.mts.map +0 -1
- package/dist/utils/render-slot.mjs +0 -30
- package/dist/utils/render-slot.mjs.map +0 -1
- package/dist/widgets/index.mjs +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/column-filter.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"column-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/column-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ReactNode } from \"react\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport {\n DefaultFilterSelect,\n type FilterSelectOption,\n} from \"../../defaults/catalog/filter-select.js\";\n\nexport type PipeColumnFilterId = \"inputFields\" | \"outputFields\" | \"providers\" | \"tags\";\n\nexport interface ColumnFilterState {\n value: string;\n setValue: (value: string | null) => void;\n options: ReadonlyArray<FilterSelectOption>;\n isActive: boolean;\n}\n\nexport interface PipeCatalogColumnFilterProps\n extends useRender.ComponentProps<\"div\", ColumnFilterState> {\n id: PipeColumnFilterId;\n placeholder?: ReactNode;\n options?: ReadonlyArray<FilterSelectOption>;\n}\n\nfunction getDefaultOptions(\n id: PipeColumnFilterId,\n ctx: ReturnType<typeof usePipeCatalogContext>,\n): FilterSelectOption[] {\n let entries: ReadonlyArray<readonly [string, unknown]> = [];\n switch (id) {\n case \"inputFields\":\n entries = ctx.sortedInputFieldEntries;\n break;\n case \"outputFields\":\n entries = ctx.sortedOutputFieldEntries;\n break;\n case \"providers\":\n entries = ctx.sortedProviderEntries;\n break;\n case \"tags\":\n entries = ctx.sortedTagEntries;\n break;\n }\n return entries.map(([name]) => ({ label: name, value: name }));\n}\n\n/**\n * Generic column-filter escape hatch. For built-in filters prefer the specific\n * components: `<PipeCatalogInputFieldFilter>`, `<PipeCatalogOutputFieldFilter>`,\n * `<PipeCatalogProviderFilter>`, `<PipeCatalogTagFilter>`.\n */\nexport function PipeCatalogColumnFilter({\n id,\n placeholder,\n options,\n className,\n render,\n ...props\n}: PipeCatalogColumnFilterProps) {\n const ctx = usePipeCatalogContext();\n const value = ctx.getColumnFilterValue(id) || \"\";\n const resolvedOptions = options ?? getDefaultOptions(id, ctx);\n const setValue = (v: string | null) => {\n if (v == null) ctx.removeColumnFilter(id);\n else ctx.addColumnFilter(id, v);\n };\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: { value, setValue, options: resolvedOptions, isActive: !!value },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": `catalog-column-filter-${id}` } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultFilterSelect\n placeholder={placeholder}\n value={value}\n onChange={setValue}\n options={resolvedOptions}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;AAyBA,SAAS,kBACP,IACA,KACsB;CACtB,IAAI,UAAqD,EAAE;AAC3D,SAAQ,IAAR;EACE,KAAK;AACH,aAAU,IAAI;AACd;EACF,KAAK;AACH,aAAU,IAAI;AACd;EACF,KAAK;AACH,aAAU,IAAI;AACd;EACF,KAAK;AACH,aAAU,IAAI;AACd;;AAEJ,QAAO,QAAQ,KAAK,CAAC,WAAW;EAAE,OAAO;EAAM,OAAO;EAAM,EAAE;;;;;;;AAQhE,SAAgB,wBAAwB,EACtC,IACA,aACA,SACA,WACA,QACA,GAAG,SAC4B;CAC/B,MAAM,MAAM,uBAAuB;CACnC,MAAM,QAAQ,IAAI,qBAAqB,GAAG,IAAI;CAC9C,MAAM,kBAAkB,WAAW,kBAAkB,IAAI,IAAI;CAC7D,MAAM,YAAY,MAAqB;AACrC,MAAI,KAAK,KAAM,KAAI,mBAAmB,GAAG;MACpC,KAAI,gBAAgB,IAAI,EAAE;;CAGjC,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAO;GAAU,SAAS;GAAiB,UAAU,CAAC,CAAC;GAAO;EACvE,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GAChB;EACD,OAAO,WACL;GACE;GACM,WAAW,yBAAyB;GAC3C,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,qBAAD;EACe;EACN;EACP,UAAU;EACV,SAAS;EACE;EACX"}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
2
|
import * as _$react from "react";
|
|
3
|
-
import { ComponentProps, ReactNode } from "react";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
3
|
|
|
6
4
|
//#region src/components/compound/pipe-catalog/empty.d.ts
|
|
7
5
|
interface PipeCatalogEmptyState {
|
|
8
6
|
visible: boolean;
|
|
9
7
|
}
|
|
10
|
-
interface PipeCatalogEmptyProps {
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
render?: RenderProp<ComponentProps<"div">, PipeCatalogEmptyState>;
|
|
14
|
-
}
|
|
8
|
+
interface PipeCatalogEmptyProps extends useRender.ComponentProps<"div", PipeCatalogEmptyState> {}
|
|
15
9
|
declare function PipeCatalogEmpty({
|
|
16
10
|
children,
|
|
17
11
|
className,
|
|
18
|
-
render
|
|
19
|
-
|
|
12
|
+
render,
|
|
13
|
+
...props
|
|
14
|
+
}: PipeCatalogEmptyProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | null;
|
|
20
15
|
//#endregion
|
|
21
16
|
export { PipeCatalogEmpty, PipeCatalogEmptyProps, PipeCatalogEmptyState };
|
|
22
17
|
//# sourceMappingURL=empty.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/empty.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/empty.tsx"],"mappings":";;;;UAMiB,qBAAA;EACf,OAAA;AAAA;AAAA,UAGe,qBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,qBAAA;AAAA,iBAE1B,gBAAA,CAAA;EAAmB,QAAA;EAAU,SAAA;EAAW,MAAA;EAAA,GAAW;AAAA,GAAS,qBAAA,GAAqB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
|
|
2
2
|
import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
|
|
3
|
-
import { renderSlot } from "../../../utils/render-slot.mjs";
|
|
4
3
|
import { DefaultEmptyState } from "../../defaults/catalog/empty-state.mjs";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
|
|
7
8
|
//#region src/components/compound/pipe-catalog/empty.tsx
|
|
8
|
-
function PipeCatalogEmpty({ children, className, render }) {
|
|
9
|
+
function PipeCatalogEmpty({ children, className, render, ...props }) {
|
|
9
10
|
const { components } = useCatalogConfig();
|
|
10
11
|
const visible = usePipeCatalogContext().table.getRowModel().rows.length === 0;
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const EmptyState = components?.EmptyState;
|
|
13
|
+
const element = useRender({
|
|
13
14
|
defaultTagName: "div",
|
|
14
15
|
render,
|
|
15
16
|
state: { visible },
|
|
16
|
-
props: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const EmptyState = components?.EmptyState;
|
|
22
|
-
if (EmptyState) return /* @__PURE__ */ jsx(EmptyState, { children });
|
|
23
|
-
return /* @__PURE__ */ jsx(DefaultEmptyState, {
|
|
24
|
-
className,
|
|
25
|
-
children: children ?? "No pipes found. Try adjusting your filters."
|
|
17
|
+
props: mergeProps({
|
|
18
|
+
className,
|
|
19
|
+
children: EmptyState ? /* @__PURE__ */ jsx(EmptyState, { children }) : /* @__PURE__ */ jsx(DefaultEmptyState, { children: children ?? "No pipes found. Try adjusting your filters." }),
|
|
20
|
+
"data-p0": "catalog-empty"
|
|
21
|
+
}, props)
|
|
26
22
|
});
|
|
23
|
+
if (!visible) return null;
|
|
24
|
+
return element;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/empty.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"empty.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/empty.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport { DefaultEmptyState } from \"../../defaults/catalog/empty-state.js\";\n\nexport interface PipeCatalogEmptyState {\n visible: boolean;\n}\n\nexport interface PipeCatalogEmptyProps\n extends useRender.ComponentProps<\"div\", PipeCatalogEmptyState> {}\n\nexport function PipeCatalogEmpty({ children, className, render, ...props }: PipeCatalogEmptyProps) {\n const { components } = useCatalogConfig();\n const ctx = usePipeCatalogContext();\n const visible = ctx.table.getRowModel().rows.length === 0;\n\n const EmptyState = components?.EmptyState;\n const defaultBody = EmptyState ? (\n <EmptyState>{children}</EmptyState>\n ) : (\n <DefaultEmptyState>{children ?? \"No pipes found. Try adjusting your filters.\"}</DefaultEmptyState>\n );\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: { visible },\n props: mergeProps<\"div\">(\n {\n className,\n children: defaultBody,\n ...({ \"data-p0\": \"catalog-empty\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (!visible) return null;\n return element;\n}\n"],"mappings":";;;;;;;;AAaA,SAAgB,iBAAiB,EAAE,UAAU,WAAW,QAAQ,GAAG,SAAgC;CACjG,MAAM,EAAE,eAAe,kBAAkB;CAEzC,MAAM,UADM,uBAAuB,CACf,MAAM,aAAa,CAAC,KAAK,WAAW;CAExD,MAAM,aAAa,YAAY;CAO/B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO,EAAE,SAAS;EAClB,OAAO,WACL;GACE;GACA,UAbc,aAClB,oBAAC,YAAD,EAAa,UAAsB,IAEnC,oBAAC,mBAAD,YAAoB,YAAY,+CAAkE;GAWxF,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,CAAC,QAAS,QAAO;AACrB,QAAO"}
|
|
@@ -8,6 +8,6 @@ import { PipeCatalogInputFieldFilter, PipeCatalogInputFieldFilterProps } from ".
|
|
|
8
8
|
import { PipeCatalogList, PipeCatalogListProps, PipeCatalogListState } from "./list.mjs";
|
|
9
9
|
import { PipeCatalogOutputFieldFilter, PipeCatalogOutputFieldFilterProps } from "./output-field-filter.mjs";
|
|
10
10
|
import { PipeCatalogProviderFilter, PipeCatalogProviderFilterProps } from "./provider-filter.mjs";
|
|
11
|
-
import { PipeCatalog, PipeCatalogInstanceProps,
|
|
11
|
+
import { PipeCatalog, PipeCatalogInstanceProps, PipeCatalogProps, PipeCatalogZeroConfigProps } from "./root.mjs";
|
|
12
12
|
import { PipeCatalogSearchFilter, PipeCatalogSearchFilterProps, PipeCatalogSearchFilterState } from "./search-filter.mjs";
|
|
13
13
|
import { PipeCatalogTagFilter, PipeCatalogTagFilterProps } from "./tag-filter.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
1
|
import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
|
|
3
2
|
import { ColumnFilterState } from "./column-filter.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/compound/pipe-catalog/input-field-filter.d.ts
|
|
@@ -9,7 +9,7 @@ interface PipeCatalogInputFieldFilterProps {
|
|
|
9
9
|
options?: ReadonlyArray<FilterSelectOption>;
|
|
10
10
|
placeholder?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
|
-
render?:
|
|
12
|
+
render?: useRender.ComponentProps<"div", ColumnFilterState>["render"];
|
|
13
13
|
}
|
|
14
14
|
declare function PipeCatalogInputFieldFilter({
|
|
15
15
|
options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/input-field-filter.tsx"],"mappings":";;;;;;;UAMiB,gCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"input-field-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/input-field-filter.tsx"],"mappings":";;;;;;;UAMiB,gCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,2BAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,gCAAA,GAAgC,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/input-field-filter.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"input-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/input-field-filter.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { ArrowUp } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogInputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowUp className=\"pz:size-4\" /> Input fields\n </span>\n);\n\nexport function PipeCatalogInputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogInputFieldFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"inputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,SAAD,EAAS,WAAU,aAAc,mBAC5B;;AAGT,SAAgB,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;AACnC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
|
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
1
|
import { PipeCardData } from "../../../types/catalog-adapters.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import * as _$react from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/compound/pipe-catalog/list.d.ts
|
|
6
6
|
interface PipeCatalogListState {
|
|
7
|
-
cards: PipeCardData
|
|
8
|
-
|
|
9
|
-
interface PipeCatalogListProps {
|
|
10
|
-
/**
|
|
11
|
-
* Optional. Receives `{ cards, ...domProps }` merged into a single object.
|
|
12
|
-
* Destructure `cards` and spread the rest onto your container.
|
|
13
|
-
*
|
|
14
|
-
* When omitted, the default render iterates `cards` and renders a
|
|
15
|
-
* `<PipeCatalogCard>` per card inside a flex column.
|
|
16
|
-
*
|
|
17
|
-
* ```tsx
|
|
18
|
-
* <PipeCatalogList render={({ cards, ...props }) => (
|
|
19
|
-
* <div {...props} className="grid grid-cols-1 gap-3">
|
|
20
|
-
* {cards.map(card => <PipeCatalogCard key={card.pipeId} card={card} />)}
|
|
21
|
-
* </div>
|
|
22
|
-
* )} />
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
render?: RenderProp<ComponentProps<"div">, PipeCatalogListState>;
|
|
26
|
-
className?: string;
|
|
7
|
+
cards: ReadonlyArray<PipeCardData>;
|
|
8
|
+
isEmpty: boolean;
|
|
27
9
|
}
|
|
10
|
+
interface PipeCatalogListProps extends useRender.ComponentProps<"div", PipeCatalogListState> {}
|
|
28
11
|
declare function PipeCatalogList({
|
|
29
12
|
render,
|
|
30
|
-
className
|
|
31
|
-
|
|
13
|
+
className,
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}: PipeCatalogListProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | null;
|
|
32
17
|
//#endregion
|
|
33
18
|
export { PipeCatalogList, PipeCatalogListProps, PipeCatalogListState };
|
|
34
19
|
//# sourceMappingURL=list.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/list.tsx"],"mappings":";;;;;UAOiB,oBAAA;EACf,KAAA,EAAO,YAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"list.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/list.tsx"],"mappings":";;;;;UAOiB,oBAAA;EACf,KAAA,EAAO,aAAA,CAAc,YAAA;EACrB,OAAA;AAAA;AAAA,UAGe,oBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,oBAAA;AAAA,iBAE1B,eAAA,CAAA;EAAkB,MAAA;EAAQ,SAAA;EAAW,QAAA;EAAA,GAAa;AAAA,GAAS,oBAAA,GAAoB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.mjs";
|
|
2
2
|
import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
|
|
3
|
-
import { renderSlot } from "../../../utils/render-slot.mjs";
|
|
4
3
|
import { PipeCatalogCard } from "./card.mjs";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
|
|
7
8
|
//#region src/components/compound/pipe-catalog/list.tsx
|
|
8
|
-
function PipeCatalogList({ render, className }) {
|
|
9
|
+
function PipeCatalogList({ render, className, children, ...props }) {
|
|
9
10
|
const { cards } = usePipeCatalogContext();
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const isEmpty = cards.length === 0;
|
|
12
|
+
const defaultBody = cards.map((card) => /* @__PURE__ */ jsx(PipeCatalogCard, { card }, card.pipeId));
|
|
13
|
+
const element = useRender({
|
|
12
14
|
defaultTagName: "div",
|
|
13
15
|
render,
|
|
14
|
-
state: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
state: {
|
|
17
|
+
cards,
|
|
18
|
+
isEmpty
|
|
19
|
+
},
|
|
20
|
+
stateAttributesMapping: { cards: () => null },
|
|
21
|
+
props: mergeProps({
|
|
22
|
+
className: cn("pz:flex pz:flex-col pz:gap-2", className),
|
|
23
|
+
children: children ?? defaultBody,
|
|
24
|
+
"data-p0": "catalog-list"
|
|
25
|
+
}, props)
|
|
24
26
|
});
|
|
27
|
+
if (isEmpty) return null;
|
|
28
|
+
return element;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/list.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"list.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/list.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { PipeCardData } from \"../../../types/catalog-adapters.js\";\nimport { PipeCatalogCard } from \"./card.js\";\n\nexport interface PipeCatalogListState {\n cards: ReadonlyArray<PipeCardData>;\n isEmpty: boolean;\n}\n\nexport interface PipeCatalogListProps\n extends useRender.ComponentProps<\"div\", PipeCatalogListState> {}\n\nexport function PipeCatalogList({ render, className, children, ...props }: PipeCatalogListProps) {\n const { cards } = usePipeCatalogContext();\n const isEmpty = cards.length === 0;\n\n const defaultBody = cards.map((card) => <PipeCatalogCard key={card.pipeId} card={card} />);\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: { cards, isEmpty },\n stateAttributesMapping: {\n cards: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className: cn(\"pz:flex pz:flex-col pz:gap-2\", className),\n children: children ?? defaultBody,\n ...({ \"data-p0\": \"catalog-list\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (isEmpty) return null;\n return element;\n}\n"],"mappings":";;;;;;;;AAeA,SAAgB,gBAAgB,EAAE,QAAQ,WAAW,UAAU,GAAG,SAA+B;CAC/F,MAAM,EAAE,UAAU,uBAAuB;CACzC,MAAM,UAAU,MAAM,WAAW;CAEjC,MAAM,cAAc,MAAM,KAAK,SAAS,oBAAC,iBAAD,EAAyC,MAAQ,EAA3B,KAAK,OAAsB,CAAC;CAE1F,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GAAE;GAAO;GAAS;EACzB,wBAAwB,EACtB,aAAa,MACd;EACD,OAAO,WACL;GACE,WAAW,GAAG,gCAAgC,UAAU;GACxD,UAAU,YAAY;GAChB,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,QAAS,QAAO;AACpB,QAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
1
|
import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
|
|
3
2
|
import { ColumnFilterState } from "./column-filter.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/compound/pipe-catalog/output-field-filter.d.ts
|
|
@@ -9,7 +9,7 @@ interface PipeCatalogOutputFieldFilterProps {
|
|
|
9
9
|
options?: ReadonlyArray<FilterSelectOption>;
|
|
10
10
|
placeholder?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
|
-
render?:
|
|
12
|
+
render?: useRender.ComponentProps<"div", ColumnFilterState>["render"];
|
|
13
13
|
}
|
|
14
14
|
declare function PipeCatalogOutputFieldFilter({
|
|
15
15
|
options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-field-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/output-field-filter.tsx"],"mappings":";;;;;;;UAMiB,iCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"output-field-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/output-field-filter.tsx"],"mappings":";;;;;;;UAMiB,iCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,4BAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,iCAAA,GAAiC,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/output-field-filter.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/output-field-filter.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { ArrowDown } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogOutputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowDown className=\"pz:size-4\" /> Output fields\n </span>\n);\n\nexport function PipeCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogOutputFieldFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"outputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,oBAC9B;;AAGT,SAAgB,6BAA6B,EAC3C,SACA,cAAc,qBACd,WACA,UACoC;AACpC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
1
|
import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
|
|
3
2
|
import { ColumnFilterState } from "./column-filter.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/compound/pipe-catalog/provider-filter.d.ts
|
|
@@ -9,7 +9,7 @@ interface PipeCatalogProviderFilterProps {
|
|
|
9
9
|
options?: ReadonlyArray<FilterSelectOption>;
|
|
10
10
|
placeholder?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
|
-
render?:
|
|
12
|
+
render?: useRender.ComponentProps<"div", ColumnFilterState>["render"];
|
|
13
13
|
}
|
|
14
14
|
declare function PipeCatalogProviderFilter({
|
|
15
15
|
options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/provider-filter.tsx"],"mappings":";;;;;;;UAQiB,8BAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"provider-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/provider-filter.tsx"],"mappings":";;;;;;;UAQiB,8BAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,yBAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,8BAAA,GAA8B,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/provider-filter.tsx"],"sourcesContent":["import { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { Building2 } from \"lucide-react\";\nimport type {
|
|
1
|
+
{"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/provider-filter.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { Building2 } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogProviderFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Building2 className=\"pz:size-4\" /> Provider\n </span>\n);\n\nexport function PipeCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogProviderFilterProps) {\n const ctx = usePipeCatalogContext();\n // Provider option labels carry the logo image so the default <Select> shows\n // the brand mark — matches what dash users expect from this filter.\n const resolvedOptions =\n options ??\n ctx.sortedProviderEntries.map(([name]) => ({\n label: name,\n value: name,\n imageSrc: getProviderEntry(name as ProviderName)?.logoUrl,\n }));\n\n return (\n <PipeCatalogColumnFilter\n id=\"providers\"\n placeholder={placeholder}\n options={resolvedOptions}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,eAC9B;;AAGT,SAAgB,0BAA0B,EACxC,SACA,cAAc,qBACd,WACA,UACiC;CACjC,MAAM,MAAM,uBAAuB;AAWnC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACb,SAXF,WACA,IAAI,sBAAsB,KAAK,CAAC,WAAW;GACzC,OAAO;GACP,OAAO;GACP,UAAU,iBAAiB,KAAqB,EAAE;GACnD,EAAE;EAOU;EACH;EACR"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
1
|
import { CatalogClassNames, CatalogComponentOverrides, PipeCardData } from "../../../types/catalog-adapters.mjs";
|
|
3
2
|
import { UsePipeCatalogTableReturn } from "../../../hooks/use-pipe-catalog-table.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { ReactNode, SyntheticEvent } from "react";
|
|
5
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
import { CatalogFilter } from "@pipe0/base";
|
|
7
7
|
import { ColumnFilter } from "@tanstack/react-table";
|
|
@@ -12,7 +12,7 @@ interface CustomizationProps {
|
|
|
12
12
|
components?: CatalogComponentOverrides;
|
|
13
13
|
className?: string;
|
|
14
14
|
/** Render slot for the outer wrapper. */
|
|
15
|
-
render?:
|
|
15
|
+
render?: useRender.ComponentProps<"div">["render"];
|
|
16
16
|
}
|
|
17
17
|
interface SelectionProps {
|
|
18
18
|
/** Fires on click / keyboard activation of any `<PipeCatalogCard>`. */
|
|
@@ -23,13 +23,13 @@ interface PipeCatalogInstanceProps extends CustomizationProps, SelectionProps {
|
|
|
23
23
|
context: UsePipeCatalogTableReturn;
|
|
24
24
|
children?: ReactNode;
|
|
25
25
|
}
|
|
26
|
-
interface
|
|
26
|
+
interface PipeCatalogZeroConfigProps extends CustomizationProps, SelectionProps {
|
|
27
27
|
/** Optional whitelist/blacklist applied before the user-facing filters. */
|
|
28
28
|
filter?: CatalogFilter;
|
|
29
29
|
initialColumnFilters?: ColumnFilter[];
|
|
30
30
|
children?: ReactNode;
|
|
31
31
|
}
|
|
32
|
-
type PipeCatalogProps = PipeCatalogInstanceProps |
|
|
32
|
+
type PipeCatalogProps = PipeCatalogInstanceProps | PipeCatalogZeroConfigProps;
|
|
33
33
|
/**
|
|
34
34
|
* Compound root for the pipe catalog.
|
|
35
35
|
*
|
|
@@ -43,5 +43,5 @@ type PipeCatalogProps = PipeCatalogInstanceProps | PipeCatalogLegacyProps;
|
|
|
43
43
|
*/
|
|
44
44
|
declare function PipeCatalog(props: PipeCatalogProps): _$react_jsx_runtime0.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
|
-
export { PipeCatalog, PipeCatalogInstanceProps,
|
|
46
|
+
export { PipeCatalog, PipeCatalogInstanceProps, PipeCatalogProps, PipeCatalogZeroConfigProps };
|
|
47
47
|
//# sourceMappingURL=root.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/root.tsx"],"mappings":";;;;;;;;;UA+BU,kBAAA;EACR,UAAA,GAAa,iBAAA;EACb,UAAA,GAAa,yBAAA;EACb,SAAA;EAH0B;EAK1B,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/root.tsx"],"mappings":";;;;;;;;;UA+BU,kBAAA;EACR,UAAA,GAAa,iBAAA;EACb,UAAA,GAAa,yBAAA;EACb,SAAA;EAH0B;EAK1B,MAAA,GAAS,SAAA,CAAU,cAAA;AAAA;AAAA,UAGX,cAAA;EAHC;EAKT,YAAA,IAAgB,IAAA,EAAM,YAAA,EAAc,CAAA,EAAG,cAAA;AAAA;AAAA,UAGxB,wBAAA,SAAiC,kBAAA,EAAoB,cAAA;EAZvD;EAcb,OAAA,EAAS,yBAAA;EACT,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,0BAAA,SAAmC,kBAAA,EAAoB,cAAA;EAd7D;EAgBT,MAAA,GAAS,aAAA;EACT,oBAAA,GAAuB,YAAA;EACvB,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,gBAAA,GAAmB,wBAAA,GAA2B,0BAAA;;;;;;;;;;AAb1D;;iBA0BgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -25,9 +25,9 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
25
25
|
*/
|
|
26
26
|
function PipeCatalog(props) {
|
|
27
27
|
if ("context" in props) return /* @__PURE__ */ jsx(PipeCatalogWithContext, { ...props });
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
+
return /* @__PURE__ */ jsx(PipeCatalogZeroConfig, { ...props });
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function PipeCatalogZeroConfig({ filter, initialColumnFilters, ...rest }) {
|
|
31
31
|
return /* @__PURE__ */ jsx(PipeCatalogWithContext, {
|
|
32
32
|
context: usePipeCatalogTable({
|
|
33
33
|
filter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/root.tsx"],"sourcesContent":["import type { CatalogFilter } from \"@pipe0/base\";\nimport type { ColumnFilter } from \"@tanstack/react-table\";\nimport type {
|
|
1
|
+
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/root.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport type { CatalogFilter } from \"@pipe0/base\";\nimport type { ColumnFilter } from \"@tanstack/react-table\";\nimport type { ReactNode, SyntheticEvent } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport {\n CatalogProvider,\n CatalogRoot,\n useCatalogConfig,\n} from \"../../../context/catalog-config-context.js\";\nimport {\n PipeCatalogContext,\n type PipeCatalogContextValue,\n} from \"../../../context/pipe-catalog-context.js\";\nimport {\n type UsePipeCatalogTableReturn,\n usePipeCatalogTable,\n} from \"../../../hooks/use-pipe-catalog-table.js\";\nimport type {\n CatalogClassNames,\n CatalogComponentOverrides,\n PipeCardData,\n} from \"../../../types/catalog-adapters.js\";\nimport { DefaultCatalogRoot } from \"../../defaults/catalog/layout.js\";\nimport { PipeCatalogActiveFilters } from \"./active-filters.js\";\nimport { PipeCatalogCategoryFilter } from \"./category-filter.js\";\nimport { PipeCatalogColumnFilters } from \"./column-filters.js\";\nimport { PipeCatalogEmpty } from \"./empty.js\";\nimport { PipeCatalogList } from \"./list.js\";\nimport { PipeCatalogSearchFilter } from \"./search-filter.js\";\n\ninterface CustomizationProps {\n classNames?: CatalogClassNames;\n components?: CatalogComponentOverrides;\n className?: string;\n /** Render slot for the outer wrapper. */\n render?: useRender.ComponentProps<\"div\">[\"render\"];\n}\n\ninterface SelectionProps {\n /** Fires on click / keyboard activation of any `<PipeCatalogCard>`. */\n onSelectPipe?: (pipe: PipeCardData, e: SyntheticEvent) => void;\n}\n\nexport interface PipeCatalogInstanceProps extends CustomizationProps, SelectionProps {\n /** Caller-owned hook return — pass when you need to read state outside the tree. */\n context: UsePipeCatalogTableReturn;\n children?: ReactNode;\n}\n\nexport interface PipeCatalogZeroConfigProps extends CustomizationProps, SelectionProps {\n /** Optional whitelist/blacklist applied before the user-facing filters. */\n filter?: CatalogFilter;\n initialColumnFilters?: ColumnFilter[];\n children?: ReactNode;\n}\n\nexport type PipeCatalogProps = PipeCatalogInstanceProps | PipeCatalogZeroConfigProps;\n\n/**\n * Compound root for the pipe catalog.\n *\n * Two modes:\n * - Caller-owned: `<PipeCatalog context={usePipeCatalogTable()}>...</PipeCatalog>`\n * - Zero-config: `<PipeCatalog filter={...} />` — a fresh hook is created internally.\n *\n * Children are optional. With no children, the default tree renders a\n * functional, neutrally-styled catalog: search filter, category filter,\n * column filters, active-filter pills, list, empty state.\n */\nexport function PipeCatalog(props: PipeCatalogProps) {\n if (\"context\" in props) {\n return <PipeCatalogWithContext {...props} />;\n }\n return <PipeCatalogZeroConfig {...props} />;\n}\n\nfunction PipeCatalogZeroConfig({ filter, initialColumnFilters, ...rest }: PipeCatalogZeroConfigProps) {\n const context = usePipeCatalogTable({ filter, initialColumnFilters });\n return <PipeCatalogWithContext context={context} {...rest} />;\n}\n\nfunction PipeCatalogWithContext({\n context,\n children,\n className,\n classNames,\n components,\n onSelectPipe,\n render,\n}: PipeCatalogInstanceProps) {\n const hasLocalOverrides = classNames || components;\n const [expandedCardId, setExpandedCardId] = useState<string | null>(null);\n\n const value = useMemo<PipeCatalogContextValue>(\n () => ({\n ...context,\n onSelectCard: onSelectPipe,\n expandedCardId,\n setExpandedCardId,\n }),\n [context, onSelectPipe, expandedCardId],\n );\n\n const inner = (\n <PipeCatalogContext.Provider value={value}>\n <PipeCatalogShell className={className} render={render}>\n {children}\n </PipeCatalogShell>\n </PipeCatalogContext.Provider>\n );\n\n if (hasLocalOverrides) {\n return (\n <CatalogRoot>\n <CatalogProvider classNames={classNames} components={components}>\n {inner}\n </CatalogProvider>\n </CatalogRoot>\n );\n }\n return <CatalogRoot>{inner}</CatalogRoot>;\n}\n\nfunction PipeCatalogShell({\n children,\n className,\n render,\n}: {\n children?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\">[\"render\"];\n}) {\n useCatalogConfig();\n const body =\n children !== undefined ? (\n children\n ) : (\n <>\n <PipeCatalogSearchFilter />\n <PipeCatalogCategoryFilter />\n <PipeCatalogColumnFilters />\n <PipeCatalogActiveFilters />\n <PipeCatalogList />\n <PipeCatalogEmpty />\n </>\n );\n return (\n <DefaultCatalogRoot className={className} render={render}>\n {body}\n </DefaultCatalogRoot>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,SAAgB,YAAY,OAAyB;AACnD,KAAI,aAAa,MACf,QAAO,oBAAC,wBAAD,EAAwB,GAAI,OAAS;AAE9C,QAAO,oBAAC,uBAAD,EAAuB,GAAI,OAAS;;AAG7C,SAAS,sBAAsB,EAAE,QAAQ,sBAAsB,GAAG,QAAoC;AAEpG,QAAO,oBAAC,wBAAD;EAAwB,SADf,oBAAoB;GAAE;GAAQ;GAAsB,CAAC;EACpB,GAAI;EAAQ;;AAG/D,SAAS,uBAAuB,EAC9B,SACA,UACA,WACA,YACA,YACA,cACA,UAC2B;CAC3B,MAAM,oBAAoB,cAAc;CACxC,MAAM,CAAC,gBAAgB,qBAAqB,SAAwB,KAAK;CAEzE,MAAM,QAAQ,eACL;EACL,GAAG;EACH,cAAc;EACd;EACA;EACD,GACD;EAAC;EAAS;EAAc;EAAe,CACxC;CAED,MAAM,QACJ,oBAAC,mBAAmB,UAApB;EAAoC;YAClC,oBAAC,kBAAD;GAA6B;GAAmB;GAC7C;GACgB;EACS;AAGhC,KAAI,kBACF,QACE,oBAAC,aAAD,YACE,oBAAC,iBAAD;EAA6B;EAAwB;YAClD;EACe,GACN;AAGlB,QAAO,oBAAC,aAAD,YAAc,OAAoB;;AAG3C,SAAS,iBAAiB,EACxB,UACA,WACA,UAKC;AACD,mBAAkB;AAclB,QACE,oBAAC,oBAAD;EAA+B;EAAmB;YAblD,aAAa,SACX,WAEA;GACE,oBAAC,yBAAD,EAA2B;GAC3B,oBAAC,2BAAD,EAA6B;GAC7B,oBAAC,0BAAD,EAA4B;GAC5B,oBAAC,0BAAD,EAA4B;GAC5B,oBAAC,iBAAD,EAAmB;GACnB,oBAAC,kBAAD,EAAoB;GACnB;EAKgB"}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as _$react from "react";
|
|
3
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
3
|
|
|
6
4
|
//#region src/components/compound/pipe-catalog/search-filter.d.ts
|
|
7
5
|
interface PipeCatalogSearchFilterState {
|
|
8
6
|
value: string;
|
|
9
|
-
setValue: (
|
|
7
|
+
setValue: (value: string) => void;
|
|
10
8
|
isActive: boolean;
|
|
11
9
|
}
|
|
12
|
-
interface PipeCatalogSearchFilterProps {
|
|
10
|
+
interface PipeCatalogSearchFilterProps extends useRender.ComponentProps<"input", PipeCatalogSearchFilterState> {
|
|
13
11
|
placeholder?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
render?: RenderProp<ComponentProps<"input">, PipeCatalogSearchFilterState>;
|
|
16
12
|
}
|
|
17
13
|
declare function PipeCatalogSearchFilter({
|
|
18
14
|
placeholder,
|
|
19
15
|
className,
|
|
20
|
-
render
|
|
21
|
-
|
|
16
|
+
render,
|
|
17
|
+
...props
|
|
18
|
+
}: PipeCatalogSearchFilterProps): _$react_jsx_runtime0.JSX.Element;
|
|
22
19
|
//#endregion
|
|
23
20
|
export { PipeCatalogSearchFilter, PipeCatalogSearchFilterProps, PipeCatalogSearchFilterState };
|
|
24
21
|
//# sourceMappingURL=search-filter.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"mappings":";;;;UASiB,4BAAA;EACf,KAAA;EACA,QAAA,GAAW,KAAA;EACX,QAAA;AAAA;AAAA,UAGe,4BAAA,SACP,SAAA,CAAU,cAAA,UAAwB,4BAAA;EAC1C,WAAA;AAAA;AAAA,iBAGc,uBAAA,CAAA;EACd,WAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,4BAAA,GAA4B,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.mjs";
|
|
2
2
|
import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
|
|
3
3
|
import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
|
|
4
|
-
import { renderSlot } from "../../../utils/render-slot.mjs";
|
|
5
4
|
import { Input } from "../../ui/input.mjs";
|
|
5
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { Search } from "lucide-react";
|
|
8
9
|
|
|
9
10
|
//#region src/components/compound/pipe-catalog/search-filter.tsx
|
|
10
|
-
function PipeCatalogSearchFilter({ placeholder = "Search pipes...", className, render }) {
|
|
11
|
+
function PipeCatalogSearchFilter({ placeholder = "Search pipes...", className, render, ...props }) {
|
|
11
12
|
const { globalFilterInput, setGlobalFilterInput } = usePipeCatalogContext();
|
|
12
13
|
const { classNames } = useCatalogConfig();
|
|
13
|
-
const
|
|
14
|
-
if (render) return renderSlot({
|
|
14
|
+
const inputElement = useRender({
|
|
15
15
|
defaultTagName: "input",
|
|
16
16
|
render,
|
|
17
17
|
state: {
|
|
18
18
|
value: globalFilterInput,
|
|
19
19
|
setValue: setGlobalFilterInput,
|
|
20
|
-
isActive
|
|
20
|
+
isActive: !!globalFilterInput
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
stateAttributesMapping: { setValue: () => null },
|
|
23
|
+
props: mergeProps({
|
|
23
24
|
type: "search",
|
|
24
25
|
placeholder,
|
|
25
26
|
value: globalFilterInput,
|
|
26
27
|
onChange: (e) => setGlobalFilterInput(e.target.value),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
28
|
+
className: render ? cn(classNames?.searchInput, className) : void 0
|
|
29
|
+
}, props)
|
|
30
30
|
});
|
|
31
|
+
if (render) return inputElement;
|
|
31
32
|
return /* @__PURE__ */ jsxs("div", {
|
|
32
33
|
"data-p0": "catalog-search",
|
|
33
34
|
className: cn("pz:relative", classNames?.searchInputContainer),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"sourcesContent":["import { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent
|
|
1
|
+
{"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface PipeCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface PipeCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", PipeCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function PipeCatalogSearchFilter({\n placeholder = \"Search pipes...\",\n className,\n render,\n ...props\n}: PipeCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = usePipeCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,wBAAwB,EACtC,cAAc,mBACd,WACA,QACA,GAAG,SAC4B;CAC/B,MAAM,EAAE,mBAAmB,yBAAyB,uBAAuB;CAC3E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
1
|
import { FilterSelectOption } from "../../defaults/catalog/filter-select.mjs";
|
|
3
2
|
import { ColumnFilterState } from "./column-filter.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/compound/pipe-catalog/tag-filter.d.ts
|
|
@@ -9,7 +9,7 @@ interface PipeCatalogTagFilterProps {
|
|
|
9
9
|
options?: ReadonlyArray<FilterSelectOption>;
|
|
10
10
|
placeholder?: ReactNode;
|
|
11
11
|
className?: string;
|
|
12
|
-
render?:
|
|
12
|
+
render?: useRender.ComponentProps<"div", ColumnFilterState>["render"];
|
|
13
13
|
}
|
|
14
14
|
declare function PipeCatalogTagFilter({
|
|
15
15
|
options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"mappings":";;;;;;;UAMiB,yBAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"tag-filter.d.mts","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"mappings":";;;;;;;UAMiB,yBAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,oBAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,yBAAA,GAAyB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"sourcesContent":["import { useRender } from \"@base-ui/react/use-render\";\nimport { Tag } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function PipeCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogTagFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,qBAAqB,EACnC,SACA,cAAc,qBACd,WACA,UAC4B;AAC5B,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
|