Skip to content

Releases: Cratis/Components

Release v2.4.1

12 Jun 12:21
bc49ae1

Choose a tag to compare

Changed

  • Storybook now always opens with the sidebar, toolbar, and addons panel (Controls/Actions/Interactions) visible, regardless of any previous browser localStorage state.

Release v2.4.0

12 Jun 12:00
9ea5b67

Choose a tag to compare

Added

  • Storybook manager UI (sidebar, toolbar) now automatically switches between dark and light themes to match the docs site theme toggle.
  • PrimeReact component themes inside stories also sync with the docs site theme, so components render in the correct light/dark palette when embedded.

Release v2.3.1

12 Jun 08:59
aa89841

Choose a tag to compare

Changed

  • Storybook documentation page now fills the entire content area with Storybook's own story navigation and controls panel visible

Release v2.3.0

04 Jun 17:33
02b7eed

Choose a tag to compare

Added

  • @cratis/eslint-plugin-components: ESLint rules for projects that consume Cratis Components, designed to compose on top of @cratis/eslint-config.
    • no-root-barrel-import (rule) — disallows importing from the @cratis/components root barrel. Use a subpath export (@cratis/components/CommandDialog, @cratis/components/DataPage, @cratis/components/Toolbar, …); the root pulls the whole optional-peer-heavy surface and hides intent. Covers import and re-export … from. Configurable package name and allow-list.
    • no-primereact-dialog (rule) — disallows importing Dialog from primereact/dialog. Use CommandDialog from @cratis/components/CommandDialog, or Dialog from @cratis/components/Dialogs — the wrappers add Arc command binding, overlay/focus fixes, and theming.

Changed

  • Add the ESLint workspace to the repo workspaces.

Notes

  • Named per the ESLint scoped-plugin convention (@scope/eslint-plugin-*). The plugin namespace is @cratis/components, so rule IDs read @cratis/components/no-root-barrel-import.
  • Ships as raw ESM (no build step), declares only eslint as a peer dependency, and exposes meta.version plus per-rule docs URLs. It owns these rules because Components owns its subpath export surface and the dialog wrappers.

🤖 Generated with Claude Code

Release v2.2.0

04 Jun 17:11
02b7eed

Choose a tag to compare

Added

  • @cratis/eslint-plugin-components: ESLint rules for projects that consume Cratis Components, designed to compose on top of @cratis/eslint-config.
    • no-root-barrel-import (rule) — disallows importing from the @cratis/components root barrel. Use a subpath export (@cratis/components/CommandDialog, @cratis/components/DataPage, @cratis/components/Toolbar, …); the root pulls the whole optional-peer-heavy surface and hides intent. Covers import and re-export … from. Configurable package name and allow-list.
    • no-primereact-dialog (rule) — disallows importing Dialog from primereact/dialog. Use CommandDialog from @cratis/components/CommandDialog, or Dialog from @cratis/components/Dialogs — the wrappers add Arc command binding, overlay/focus fixes, and theming.

Changed

  • Add the ESLint workspace to the repo workspaces.

Notes

  • Named per the ESLint scoped-plugin convention (@scope/eslint-plugin-*). The plugin namespace is @cratis/components, so rule IDs read @cratis/components/no-root-barrel-import.
  • Ships as raw ESM (no build step), declares only eslint as a peer dependency, and exposes meta.version plus per-rule docs URLs. It owns these rules because Components owns its subpath export surface and the dialog wrappers.

🤖 Generated with Claude Code

Release v2.1.3

04 Jun 16:43
c3b1dd6

Choose a tag to compare

Summary

Relocated clear button from filter content area to header, positioned next to the active selection count badge. Button is now a round × icon with tooltip, consistent across all filter types.

Changed

  • Filter clear buttons now appear in header next to count badge/indicator, not at bottom of filter content (#issue)
  • Clear button styled as round icon with × character, hover/active states, and descriptive tooltips (#issue)
  • RangeHistogramFilter no longer renders its own clear button—handled by parent FilterPanel (#issue)
  • Custom filter examples updated to remove inline clear buttons following new pattern (#issue)
  • Documentation updated with clear button behavior for all filter types and guidance for custom editors (#issue)

Implementation

FilterPanel.tsx: Clear buttons conditionally rendered in header for all filter types:

  • String/option filters: next to selection count, calls onFilterClear(filterKey)
  • Range filters: next to "Range" indicator, calls onRangeChange(filterKey, null)
  • Custom filters: next to dot indicator, calls onCustomValueChange(filterKey, undefined)

CSS: .pv-filter-clear-header with circular shape, transitions, and accessibility attributes.

Specs: Four specification files document expected behavior (when buttons appear, what actions they trigger, tooltip text).

Release v2.1.2

03 Jun 16:41

Choose a tag to compare

No release notes

Release v2.1.1

03 Jun 14:43
a6624ab

Choose a tag to compare

Fixed

  • Date range for filters didn't format properly, now it has more options.

Release v2.1.0

03 Jun 13:45
15979d9

Choose a tag to compare

Extracts the filter UI from PivotViewer into a generic, standalone FilterPanel component that can be used independently of any data viewer.

Added

  • Source/Filter/ module: standalone FilterPanel, FilterEditor, RangeHistogramFilter, useFilterState hook, and full TypeScript type definitions (FilterDefinition, FilterEditorProps, FilterEditorSlotProps, FilterValues, RangeValues, CustomFilterValues) (#102)
  • FilterEditor slot component — declares a custom editor for a specific filter group as a declarative child of <FilterPanel>; value tracked separately in customValues (#102)
  • type: 'custom' filter type as an explicit opt-in for fully custom filter editors (#102)
  • 5 Storybook stories for FilterPanel: single-select, multi-select, numeric range/histogram, custom editor, and mixed filter types (#102)
  • ./Filter subpath export in package.json for direct imports via @cratis/components/Filter (#102)
  • Documentation/Filter/index.md — full API reference covering all exported types, FilterPanel props, FilterEditor props, useFilterState hook, and usage examples for every filter type (#102)
  • BDD specs in Source/Filter/for_useFilterState/ covering buildFilterValues and buildRangeValues — 9 tests across 4 spec files (#102)
  • Source/Filter/utils.ts exporting buildFilterValues and buildRangeValues as pure, testable utility functions (#102)

Changed

  • FilterPanel accepts children?: ReactNode — uses React.Children + isValidElement to discover <FilterEditor> slots and render them in the matching filter group (#102)
  • PivotViewer/components/FilterPanel.tsx is now a thin adapter: converts PivotFilter<TItem>[] + computed options into FilterDefinition[], generates <FilterEditor> children from any PivotFilter.renderEditor, and delegates all rendering to the new standalone component — no breaking changes to the public API (#102)
  • PivotFilter<TItem> retains renderEditor? and type: 'custom' so PivotViewer consumers can inject custom filter editors without any workarounds (#102)
  • Source/Filter/useFilterState.ts now imports buildFilterValues and buildRangeValues from ./utils (#102)
  • Documentation/toc.yml updated with Filter entries in both the Storybook section and Common Components section (#102)
  • eslint.config.mjs — added argsIgnorePattern: '^_' to the @typescript-eslint/no-unused-vars rule to honour the _-prefix convention for intentionally unused parameters (#102)

Fixed

  • Storybook static build (storybook build) now completes successfully — fixed a pre-existing [lightningcss minify] Invalid empty selector crash by adding cssMinify: false to the viteFinal config in Source/.storybook/main.ts (#102)
  • CI build failure caused by ESLint flagging _props in FilterEditor.tsx as unused — resolved by adding argsIgnorePattern: '^_' to the ESLint rule config (#102)

Usage — custom editor in standalone context:

import { FilterPanel, FilterEditor, useFilterState } from '@cratis/components/Filter';

const filters: FilterDefinition[] = [
  { key: 'score', label: 'Score', type: 'custom' },
];

function MyView() {
  const state = useFilterState(filters);
  const buttonRef = useRef<HTMLButtonElement>(null);
  return (
    <>
      <button ref={buttonRef}>Filters</button>
      <FilterPanel
        isOpen={open}
        filters={filters}
        anchorRef={buttonRef}
        customValues={state.customValues}
        onCustomValueChange={state.handleCustomValueChange}
        onFilterToggle={state.handleToggleFilter}
        onFilterClear={state.handleClearFilter}
        onRangeChange={state.handleRangeChange}
        onExpandedFilterChange={state.setExpandedFilterKey}
        onClose={() => setOpen(false)}
        {...state}
      >
        <FilterEditor filterKey="score">
          {({ value, onChange }) => (
            <MySlider value={value as number} onChange={onChange} />
          )}
        </FilterEditor>
      </FilterPanel>
    </>
  );
}

Release v2.0.1

01 Jun 13:48
b60f98e

Choose a tag to compare

Changed

  • Move UI runtime libraries (allotment, framer-motion, pixi.js, primeicons, primereact) from peer dependencies to dependencies for package consumers.
  • Keep only framework-level peers (React, Cratis Arc, fundamentals, reflect-metadata, tsyringe) as peer dependencies.

Removed

  • Remove optional peer dependency metadata for libraries now included as runtime dependencies.