@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/search-catalog/column-filter.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"column-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-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 { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport {\n DefaultFilterSelect,\n type FilterSelectOption,\n} from \"../../defaults/catalog/filter-select.js\";\n\nexport type SearchColumnFilterId = \"outputFields\" | \"providers\" | \"tags\";\n\n/**\n * Render-prop state shared by every specific column filter component\n * (output/provider/tag) and the generic `<SearchCatalogColumnFilter>`.\n */\nexport interface ColumnFilterState {\n value: string;\n setValue: (value: string | null) => void;\n options: ReadonlyArray<FilterSelectOption>;\n isActive: boolean;\n}\n\nexport interface SearchCatalogColumnFilterProps\n extends useRender.ComponentProps<\"div\", ColumnFilterState> {\n id: SearchColumnFilterId;\n placeholder?: ReactNode;\n options?: ReadonlyArray<FilterSelectOption>;\n}\n\nfunction getDefaultOptions(\n id: SearchColumnFilterId,\n ctx: ReturnType<typeof useSearchCatalogContext>,\n): FilterSelectOption[] {\n let entries: ReadonlyArray<readonly [string, unknown]> = [];\n switch (id) {\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: `<SearchCatalogOutputFieldFilter>`, `<SearchCatalogProviderFilter>`,\n * `<SearchCatalogTagFilter>`.\n */\nexport function SearchCatalogColumnFilter({\n id,\n placeholder,\n options,\n className,\n render,\n ...props\n}: SearchCatalogColumnFilterProps) {\n const ctx = useSearchCatalogContext();\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":";;;;;;;AA6BA,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;;AAEJ,QAAO,QAAQ,KAAK,CAAC,WAAW;EAAE,OAAO;EAAM,OAAO;EAAM,EAAE;;;;;;;AAQhE,SAAgB,0BAA0B,EACxC,IACA,aACA,SACA,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,MAAM,yBAAyB;CACrC,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/search-catalog/empty.d.ts
|
|
7
5
|
interface SearchCatalogEmptyState {
|
|
8
6
|
visible: boolean;
|
|
9
7
|
}
|
|
10
|
-
interface SearchCatalogEmptyProps {
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
className?: string;
|
|
13
|
-
render?: RenderProp<ComponentProps<"div">, SearchCatalogEmptyState>;
|
|
14
|
-
}
|
|
8
|
+
interface SearchCatalogEmptyProps extends useRender.ComponentProps<"div", SearchCatalogEmptyState> {}
|
|
15
9
|
declare function SearchCatalogEmpty({
|
|
16
10
|
children,
|
|
17
11
|
className,
|
|
18
|
-
render
|
|
19
|
-
|
|
12
|
+
render,
|
|
13
|
+
...props
|
|
14
|
+
}: SearchCatalogEmptyProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | null;
|
|
20
15
|
//#endregion
|
|
21
16
|
export { SearchCatalogEmpty, SearchCatalogEmptyProps, SearchCatalogEmptyState };
|
|
22
17
|
//# sourceMappingURL=empty.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/empty.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/empty.tsx"],"mappings":";;;;UAMiB,uBAAA;EACf,OAAA;AAAA;AAAA,UAGe,uBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,uBAAA;AAAA,iBAE1B,kBAAA,CAAA;EACd,QAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,uBAAA,GAAuB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
|
|
2
|
-
import { renderSlot } from "../../../utils/render-slot.mjs";
|
|
3
2
|
import { useSearchCatalogContext } from "../../../context/search-catalog-context.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/search-catalog/empty.tsx
|
|
8
|
-
function SearchCatalogEmpty({ children, className, render }) {
|
|
9
|
+
function SearchCatalogEmpty({ children, className, render, ...props }) {
|
|
9
10
|
const { components } = useCatalogConfig();
|
|
10
11
|
const visible = useSearchCatalogContext().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 searches found. Try adjusting your filters."
|
|
17
|
+
props: mergeProps({
|
|
18
|
+
className,
|
|
19
|
+
children: EmptyState ? /* @__PURE__ */ jsx(EmptyState, { children }) : /* @__PURE__ */ jsx(DefaultEmptyState, { children: children ?? "No searches 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/search-catalog/empty.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"empty.mjs","names":[],"sources":["../../../../src/components/compound/search-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 { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { DefaultEmptyState } from \"../../defaults/catalog/empty-state.js\";\n\nexport interface SearchCatalogEmptyState {\n visible: boolean;\n}\n\nexport interface SearchCatalogEmptyProps\n extends useRender.ComponentProps<\"div\", SearchCatalogEmptyState> {}\n\nexport function SearchCatalogEmpty({\n children,\n className,\n render,\n ...props\n}: SearchCatalogEmptyProps) {\n const { components } = useCatalogConfig();\n const ctx = useSearchCatalogContext();\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>\n {children ?? \"No searches found. Try adjusting your filters.\"}\n </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,mBAAmB,EACjC,UACA,WACA,QACA,GAAG,SACuB;CAC1B,MAAM,EAAE,eAAe,kBAAkB;CAEzC,MAAM,UADM,yBAAyB,CACjB,MAAM,aAAa,CAAC,KAAK,WAAW;CAExD,MAAM,aAAa,YAAY;CAS/B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO,EAAE,SAAS;EAClB,OAAO,WACL;GACE;GACA,UAfc,aAClB,oBAAC,YAAD,EAAa,UAAsB,IAEnC,oBAAC,mBAAD,YACG,YAAY,kDACK;GAWV,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,CAAC,QAAS,QAAO;AACrB,QAAO"}
|
|
@@ -7,6 +7,6 @@ import { SearchCatalogEmpty, SearchCatalogEmptyProps, SearchCatalogEmptyState }
|
|
|
7
7
|
import { SearchCatalogList, SearchCatalogListProps, SearchCatalogListState } from "./list.mjs";
|
|
8
8
|
import { SearchCatalogOutputFieldFilter, SearchCatalogOutputFieldFilterProps } from "./output-field-filter.mjs";
|
|
9
9
|
import { SearchCatalogProviderFilter, SearchCatalogProviderFilterProps } from "./provider-filter.mjs";
|
|
10
|
-
import { SearchCatalog, SearchCatalogInstanceProps,
|
|
10
|
+
import { SearchCatalog, SearchCatalogInstanceProps, SearchCatalogProps, SearchCatalogZeroConfigProps } from "./root.mjs";
|
|
11
11
|
import { SearchCatalogSearchFilter, SearchCatalogSearchFilterProps, SearchCatalogSearchFilterState } from "./search-filter.mjs";
|
|
12
12
|
import { SearchCatalogTagFilter, SearchCatalogTagFilterProps } from "./tag-filter.mjs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { RenderProp } from "../../../utils/render-slot.mjs";
|
|
2
1
|
import { SearchCardData } 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/search-catalog/list.d.ts
|
|
6
6
|
interface SearchCatalogListState {
|
|
7
|
-
cards: SearchCardData
|
|
8
|
-
|
|
9
|
-
interface SearchCatalogListProps {
|
|
10
|
-
render?: RenderProp<ComponentProps<"div">, SearchCatalogListState>;
|
|
11
|
-
className?: string;
|
|
7
|
+
cards: ReadonlyArray<SearchCardData>;
|
|
8
|
+
isEmpty: boolean;
|
|
12
9
|
}
|
|
10
|
+
interface SearchCatalogListProps extends useRender.ComponentProps<"div", SearchCatalogListState> {}
|
|
13
11
|
declare function SearchCatalogList({
|
|
14
12
|
render,
|
|
15
|
-
className
|
|
16
|
-
|
|
13
|
+
className,
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}: SearchCatalogListProps): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | null;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SearchCatalogList, SearchCatalogListProps, SearchCatalogListState };
|
|
19
19
|
//# sourceMappingURL=list.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/list.tsx"],"mappings":";;;;;UAOiB,sBAAA;EACf,KAAA,EAAO,cAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"list.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/list.tsx"],"mappings":";;;;;UAOiB,sBAAA;EACf,KAAA,EAAO,aAAA,CAAc,cAAA;EACrB,OAAA;AAAA;AAAA,UAGe,sBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,sBAAA;AAAA,iBAE1B,iBAAA,CAAA;EACd,MAAA;EACA,SAAA;EACA,QAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.mjs";
|
|
2
|
-
import { renderSlot } from "../../../utils/render-slot.mjs";
|
|
3
2
|
import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
|
|
4
3
|
import { SearchCatalogCard } 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/search-catalog/list.tsx
|
|
8
|
-
function SearchCatalogList({ render, className }) {
|
|
9
|
+
function SearchCatalogList({ render, className, children, ...props }) {
|
|
9
10
|
const { cards } = useSearchCatalogContext();
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const isEmpty = cards.length === 0;
|
|
12
|
+
const defaultBody = cards.map((card, idx) => /* @__PURE__ */ jsx(SearchCatalogCard, { card }, `${card.searchId}-${idx}`));
|
|
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/search-catalog/list.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"list.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/list.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { SearchCardData } from \"../../../types/catalog-adapters.js\";\nimport { SearchCatalogCard } from \"./card.js\";\n\nexport interface SearchCatalogListState {\n cards: ReadonlyArray<SearchCardData>;\n isEmpty: boolean;\n}\n\nexport interface SearchCatalogListProps\n extends useRender.ComponentProps<\"div\", SearchCatalogListState> {}\n\nexport function SearchCatalogList({\n render,\n className,\n children,\n ...props\n}: SearchCatalogListProps) {\n const { cards } = useSearchCatalogContext();\n const isEmpty = cards.length === 0;\n\n const defaultBody = cards.map((card, idx) => (\n <SearchCatalogCard key={`${card.searchId}-${idx}`} card={card} />\n ));\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,kBAAkB,EAChC,QACA,WACA,UACA,GAAG,SACsB;CACzB,MAAM,EAAE,UAAU,yBAAyB;CAC3C,MAAM,UAAU,MAAM,WAAW;CAEjC,MAAM,cAAc,MAAM,KAAK,MAAM,QACnC,oBAAC,mBAAD,EAAyD,MAAQ,EAAzC,GAAG,KAAK,SAAS,GAAG,MAAqB,CACjE;CAEF,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/search-catalog/output-field-filter.d.ts
|
|
@@ -9,7 +9,7 @@ interface SearchCatalogOutputFieldFilterProps {
|
|
|
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 SearchCatalogOutputFieldFilter({
|
|
15
15
|
options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-field-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"mappings":";;;;;;;UAMiB,mCAAA;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/search-catalog/output-field-filter.tsx"],"mappings":";;;;;;;UAMiB,mCAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,8BAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,mCAAA,GAAmC,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-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, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogOutputFieldFilterProps {\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 SearchCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogOutputFieldFilterProps) {\n return (\n <SearchCatalogColumnFilter\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,+BAA+B,EAC7C,SACA,cAAc,qBACd,WACA,UACsC;AACtC,QACE,oBAAC,2BAAD;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/search-catalog/provider-filter.d.ts
|
|
@@ -9,7 +9,7 @@ interface SearchCatalogProviderFilterProps {
|
|
|
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 SearchCatalogProviderFilter({
|
|
15
15
|
options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/provider-filter.tsx"],"mappings":";;;;;;;UAQiB,gCAAA;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/search-catalog/provider-filter.tsx"],"mappings":";;;;;;;UAQiB,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":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-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/search-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 { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogProviderFilterProps {\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 SearchCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogProviderFilterProps) {\n const ctx = useSearchCatalogContext();\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 <SearchCatalogColumnFilter\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,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;CACnC,MAAM,MAAM,yBAAyB;AASrC,QACE,oBAAC,2BAAD;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, SearchCardData } from "../../../types/catalog-adapters.mjs";
|
|
3
2
|
import { UseSearchCatalogTableReturn } from "../../../hooks/use-search-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";
|
|
@@ -11,7 +11,7 @@ interface CustomizationProps {
|
|
|
11
11
|
classNames?: CatalogClassNames;
|
|
12
12
|
components?: CatalogComponentOverrides;
|
|
13
13
|
className?: string;
|
|
14
|
-
render?:
|
|
14
|
+
render?: useRender.ComponentProps<"div">["render"];
|
|
15
15
|
}
|
|
16
16
|
interface SelectionProps {
|
|
17
17
|
/** Fires on click / keyboard activation of any `<SearchCatalogCard>`. */
|
|
@@ -21,13 +21,13 @@ interface SearchCatalogInstanceProps extends CustomizationProps, SelectionProps
|
|
|
21
21
|
context: UseSearchCatalogTableReturn;
|
|
22
22
|
children?: ReactNode;
|
|
23
23
|
}
|
|
24
|
-
interface
|
|
24
|
+
interface SearchCatalogZeroConfigProps extends CustomizationProps, SelectionProps {
|
|
25
25
|
filter?: CatalogFilter;
|
|
26
26
|
initialColumnFilters?: ColumnFilter[];
|
|
27
27
|
children?: ReactNode;
|
|
28
28
|
}
|
|
29
|
-
type SearchCatalogProps = SearchCatalogInstanceProps |
|
|
29
|
+
type SearchCatalogProps = SearchCatalogInstanceProps | SearchCatalogZeroConfigProps;
|
|
30
30
|
declare function SearchCatalog(props: SearchCatalogProps): _$react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { SearchCatalog, SearchCatalogInstanceProps,
|
|
32
|
+
export { SearchCatalog, SearchCatalogInstanceProps, SearchCatalogProps, SearchCatalogZeroConfigProps };
|
|
33
33
|
//# sourceMappingURL=root.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/root.tsx"],"mappings":";;;;;;;;;UA+BU,kBAAA;EACR,UAAA,GAAa,iBAAA;EACb,UAAA,GAAa,yBAAA;EACb,SAAA;EACA,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"root.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/root.tsx"],"mappings":";;;;;;;;;UA+BU,kBAAA;EACR,UAAA,GAAa,iBAAA;EACb,UAAA,GAAa,yBAAA;EACb,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA;AAAA;AAAA,UAGX,cAAA;EALK;EAOb,cAAA,IAAkB,MAAA,EAAQ,cAAA,EAAgB,CAAA,EAAG,cAAA;AAAA;AAAA,UAG9B,0BAAA,SAAmC,kBAAA,EAAoB,cAAA;EACtE,OAAA,EAAS,2BAAA;EACT,QAAA,GAAW,SAAA;AAAA;AAAA,UAGI,4BAAA,SAAqC,kBAAA,EAAoB,cAAA;EACxE,MAAA,GAAS,aAAA;EACT,oBAAA,GAAuB,YAAA;EACvB,QAAA,GAAW,SAAA;AAAA;AAAA,KAGD,kBAAA,GAAqB,0BAAA,GAA6B,4BAAA;AAAA,iBAE9C,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAkB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -14,9 +14,9 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
//#region src/components/compound/search-catalog/root.tsx
|
|
15
15
|
function SearchCatalog(props) {
|
|
16
16
|
if ("context" in props) return /* @__PURE__ */ jsx(SearchCatalogWithContext, { ...props });
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
17
|
+
return /* @__PURE__ */ jsx(SearchCatalogZeroConfig, { ...props });
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function SearchCatalogZeroConfig({ filter, initialColumnFilters, ...rest }) {
|
|
20
20
|
return /* @__PURE__ */ jsx(SearchCatalogWithContext, {
|
|
21
21
|
context: useSearchCatalogTable({
|
|
22
22
|
filter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.mjs","names":[],"sources":["../../../../src/components/compound/search-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/search-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 SearchCatalogContext,\n type SearchCatalogContextValue,\n} from \"../../../context/search-catalog-context.js\";\nimport {\n type UseSearchCatalogTableReturn,\n useSearchCatalogTable,\n} from \"../../../hooks/use-search-catalog-table.js\";\nimport type {\n CatalogClassNames,\n CatalogComponentOverrides,\n SearchCardData,\n} from \"../../../types/catalog-adapters.js\";\nimport { DefaultCatalogRoot } from \"../../defaults/catalog/layout.js\";\nimport { SearchCatalogActiveFilters } from \"./active-filters.js\";\nimport { SearchCatalogCategoryFilter } from \"./category-filter.js\";\nimport { SearchCatalogColumnFilters } from \"./column-filters.js\";\nimport { SearchCatalogEmpty } from \"./empty.js\";\nimport { SearchCatalogList } from \"./list.js\";\nimport { SearchCatalogSearchFilter } from \"./search-filter.js\";\n\ninterface CustomizationProps {\n classNames?: CatalogClassNames;\n components?: CatalogComponentOverrides;\n className?: string;\n render?: useRender.ComponentProps<\"div\">[\"render\"];\n}\n\ninterface SelectionProps {\n /** Fires on click / keyboard activation of any `<SearchCatalogCard>`. */\n onSelectSearch?: (search: SearchCardData, e: SyntheticEvent) => void;\n}\n\nexport interface SearchCatalogInstanceProps extends CustomizationProps, SelectionProps {\n context: UseSearchCatalogTableReturn;\n children?: ReactNode;\n}\n\nexport interface SearchCatalogZeroConfigProps extends CustomizationProps, SelectionProps {\n filter?: CatalogFilter;\n initialColumnFilters?: ColumnFilter[];\n children?: ReactNode;\n}\n\nexport type SearchCatalogProps = SearchCatalogInstanceProps | SearchCatalogZeroConfigProps;\n\nexport function SearchCatalog(props: SearchCatalogProps) {\n if (\"context\" in props) {\n return <SearchCatalogWithContext {...props} />;\n }\n return <SearchCatalogZeroConfig {...props} />;\n}\n\nfunction SearchCatalogZeroConfig({ filter, initialColumnFilters, ...rest }: SearchCatalogZeroConfigProps) {\n const context = useSearchCatalogTable({ filter, initialColumnFilters });\n return <SearchCatalogWithContext context={context} {...rest} />;\n}\n\nfunction SearchCatalogWithContext({\n context,\n children,\n className,\n classNames,\n components,\n onSelectSearch,\n render,\n}: SearchCatalogInstanceProps) {\n const hasLocalOverrides = classNames || components;\n const [expandedCardId, setExpandedCardId] = useState<string | null>(null);\n\n const value = useMemo<SearchCatalogContextValue>(\n () => ({\n ...context,\n onSelectCard: onSelectSearch,\n expandedCardId,\n setExpandedCardId,\n }),\n [context, onSelectSearch, expandedCardId],\n );\n\n const inner = (\n <SearchCatalogContext.Provider value={value}>\n <SearchCatalogShell className={className} render={render}>\n {children}\n </SearchCatalogShell>\n </SearchCatalogContext.Provider>\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 SearchCatalogShell({\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 <SearchCatalogSearchFilter />\n <SearchCatalogCategoryFilter />\n <SearchCatalogColumnFilters />\n <SearchCatalogActiveFilters />\n <SearchCatalogList />\n <SearchCatalogEmpty />\n </>\n );\n return (\n <DefaultCatalogRoot className={className} render={render}>\n {body}\n </DefaultCatalogRoot>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAwDA,SAAgB,cAAc,OAA2B;AACvD,KAAI,aAAa,MACf,QAAO,oBAAC,0BAAD,EAA0B,GAAI,OAAS;AAEhD,QAAO,oBAAC,yBAAD,EAAyB,GAAI,OAAS;;AAG/C,SAAS,wBAAwB,EAAE,QAAQ,sBAAsB,GAAG,QAAsC;AAExG,QAAO,oBAAC,0BAAD;EAA0B,SADjB,sBAAsB;GAAE;GAAQ;GAAsB,CAAC;EACpB,GAAI;EAAQ;;AAGjE,SAAS,yBAAyB,EAChC,SACA,UACA,WACA,YACA,YACA,gBACA,UAC6B;CAC7B,MAAM,oBAAoB,cAAc;CACxC,MAAM,CAAC,gBAAgB,qBAAqB,SAAwB,KAAK;CAEzE,MAAM,QAAQ,eACL;EACL,GAAG;EACH,cAAc;EACd;EACA;EACD,GACD;EAAC;EAAS;EAAgB;EAAe,CAC1C;CAED,MAAM,QACJ,oBAAC,qBAAqB,UAAtB;EAAsC;YACpC,oBAAC,oBAAD;GAA+B;GAAmB;GAC/C;GACkB;EACS;AAElC,KAAI,kBACF,QACE,oBAAC,aAAD,YACE,oBAAC,iBAAD;EAA6B;EAAwB;YAClD;EACe,GACN;AAGlB,QAAO,oBAAC,aAAD,YAAc,OAAoB;;AAG3C,SAAS,mBAAmB,EAC1B,UACA,WACA,UAKC;AACD,mBAAkB;AAclB,QACE,oBAAC,oBAAD;EAA+B;EAAmB;YAblD,aAAa,SACX,WAEA;GACE,oBAAC,2BAAD,EAA6B;GAC7B,oBAAC,6BAAD,EAA+B;GAC/B,oBAAC,4BAAD,EAA8B;GAC9B,oBAAC,4BAAD,EAA8B;GAC9B,oBAAC,mBAAD,EAAqB;GACrB,oBAAC,oBAAD,EAAsB;GACrB;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/search-catalog/search-filter.d.ts
|
|
7
5
|
interface SearchCatalogSearchFilterState {
|
|
8
6
|
value: string;
|
|
9
|
-
setValue: (
|
|
7
|
+
setValue: (value: string) => void;
|
|
10
8
|
isActive: boolean;
|
|
11
9
|
}
|
|
12
|
-
interface SearchCatalogSearchFilterProps {
|
|
10
|
+
interface SearchCatalogSearchFilterProps extends useRender.ComponentProps<"input", SearchCatalogSearchFilterState> {
|
|
13
11
|
placeholder?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
render?: RenderProp<ComponentProps<"input">, SearchCatalogSearchFilterState>;
|
|
16
12
|
}
|
|
17
13
|
declare function SearchCatalogSearchFilter({
|
|
18
14
|
placeholder,
|
|
19
15
|
className,
|
|
20
|
-
render
|
|
21
|
-
|
|
16
|
+
render,
|
|
17
|
+
...props
|
|
18
|
+
}: SearchCatalogSearchFilterProps): _$react_jsx_runtime0.JSX.Element;
|
|
22
19
|
//#endregion
|
|
23
20
|
export { SearchCatalogSearchFilter, SearchCatalogSearchFilterProps, SearchCatalogSearchFilterState };
|
|
24
21
|
//# sourceMappingURL=search-filter.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"mappings":";;;;UASiB,8BAAA;EACf,KAAA;EACA,QAAA,GAAW,KAAA;EACX,QAAA;AAAA;AAAA,UAGe,8BAAA,SACP,SAAA,CAAU,cAAA,UAAwB,8BAAA;EAC1C,WAAA;AAAA;AAAA,iBAGc,yBAAA,CAAA;EACd,WAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,8BAAA,GAA8B,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
|
-
import { renderSlot } from "../../../utils/render-slot.mjs";
|
|
4
3
|
import { useSearchCatalogContext } from "../../../context/search-catalog-context.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/search-catalog/search-filter.tsx
|
|
10
|
-
function SearchCatalogSearchFilter({ placeholder = "Search searches...", className, render }) {
|
|
11
|
+
function SearchCatalogSearchFilter({ placeholder = "Search searches...", className, render, ...props }) {
|
|
11
12
|
const { globalFilterInput, setGlobalFilterInput } = useSearchCatalogContext();
|
|
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/search-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/search-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 { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface SearchCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface SearchCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", SearchCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function SearchCatalogSearchFilter({\n placeholder = \"Search searches...\",\n className,\n render,\n ...props\n}: SearchCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = useSearchCatalogContext();\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,0BAA0B,EACxC,cAAc,sBACd,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,EAAE,mBAAmB,yBAAyB,yBAAyB;CAC7E,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/search-catalog/tag-filter.d.ts
|
|
@@ -9,7 +9,7 @@ interface SearchCatalogTagFilterProps {
|
|
|
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 SearchCatalogTagFilter({
|
|
15
15
|
options,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-filter.d.mts","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"mappings":";;;;;;;UAMiB,2BAAA;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/search-catalog/tag-filter.tsx"],"mappings":";;;;;;;UAMiB,2BAAA;EACf,OAAA,GAAU,aAAA,CAAc,kBAAA;EACxB,WAAA,GAAc,SAAA;EACd,SAAA;EACA,MAAA,GAAS,SAAA,CAAU,cAAA,QAAsB,iBAAA;AAAA;AAAA,iBAS3B,sBAAA,CAAA;EACd,OAAA;EACA,WAAA;EACA,SAAA;EACA;AAAA,GACC,2BAAA,GAA2B,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-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, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogTagFilterProps {\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 SearchCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogTagFilterProps) {\n return (\n <SearchCatalogColumnFilter\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,uBAAuB,EACrC,SACA,cAAc,qBACd,WACA,UAC8B;AAC9B,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { FormSectionHandle } from "../../../types/form-handle.mjs";
|
|
2
|
-
import * as _$react from "react";
|
|
1
|
+
import { FormHandle, FormSectionHandle } from "../../../types/form-handle.mjs";
|
|
3
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
import { SearchPayload } from "@pipe0/base";
|
|
4
5
|
|
|
5
6
|
//#region src/components/compound/search-form/content.d.ts
|
|
6
7
|
interface SearchFormContentState {
|
|
7
8
|
sections: FormSectionHandle[];
|
|
9
|
+
fieldPaths: Set<string>;
|
|
10
|
+
hasFieldLoaderError: boolean;
|
|
11
|
+
isFieldLoaderLoading: boolean;
|
|
12
|
+
form: FormHandle<SearchPayload>;
|
|
8
13
|
}
|
|
9
14
|
interface SearchFormContentProps extends useRender.ComponentProps<"div", SearchFormContentState> {}
|
|
10
15
|
declare function SearchFormContent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/compound/search-form/content.tsx"],"mappings":";;;;;;UAQiB,sBAAA;EACf,QAAA,EAAU,iBAAA;EACV,UAAA,EAAY,GAAA;EACZ,mBAAA;EACA,oBAAA;EACA,IAAA,EAAM,UAAA,CAAW,aAAA;AAAA;AAAA,UAGF,sBAAA,SACP,SAAA,CAAU,cAAA,QAAsB,sBAAA;AAAA,iBAE1B,iBAAA,CAAA;EACd,QAAA;EACA,SAAA;EACA,MAAA;EAAA,GACG;AAAA,GACF,sBAAA,GAAsB,OAAA,CAAA,YAAA,mBAAA,OAAA,CAAA,qBAAA"}
|