@veevarts/design-system 2.15.0 → 2.17.0

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.
@@ -11,7 +11,7 @@ export declare const DEFAULT_SEARCH_WIDTH: Record<AdminToolbarSearchWidth, strin
11
11
  export declare const FRAMED_WIDE_REM = 48;
12
12
  export declare const FRAMED_CLASS: {
13
13
  readonly base: "flex flex-wrap items-center gap-2.5 border-b border-pos-hair px-4 py-[0.875rem]";
14
- readonly narrow: "[&_[data-slot=filter-select]]:!max-w-none [&_[data-slot=filter-select]]:!min-w-[calc(50%-0.3125rem)] [&_[data-slot=filter-select]]:grow [&_[data-slot=filter-select]]:basis-[calc(50%-0.3125rem)]";
14
+ readonly narrow: "[&_[data-slot=filter-select-group]]:flex [&_[data-slot=filter-select-group]]:flex-wrap [&_[data-slot=filter-select-group]]:!max-w-none [&_[data-slot=filter-select]]:!max-w-none [&_[data-slot=filter-select]]:!min-w-[calc(50%-0.3125rem)] [&_[data-slot=filter-select]]:grow [&_[data-slot=filter-select]]:basis-[calc(50%-0.3125rem)]";
15
15
  readonly searchWide: "ml-auto";
16
16
  /** Fill wins over the narrow rule: it already takes the row, and keeps a trailing action beside it until 12.5rem. */
17
17
  readonly searchFill: "min-w-[12.5rem] flex-1";
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { FilterSelectGroupProps } from './types';
3
+ export declare const FilterSelectGroup: React.FC<FilterSelectGroupProps>;
@@ -1,2 +1,3 @@
1
1
  export { FilterSelect } from './FilterSelect';
2
- export type { FilterSelectProps, FilterSelectOption } from './types';
2
+ export { FilterSelectGroup } from './FilterSelectGroup';
3
+ export type { FilterSelectProps, FilterSelectOption, FilterSelectGroupProps } from './types';
@@ -12,4 +12,6 @@ export declare const filterSelectClass: {
12
12
  readonly iconActive: "!text-primary-600";
13
13
  readonly clear: "absolute right-[1.875rem] top-1/2 z-20 inline-flex size-[1.25rem] -translate-y-1/2 items-center justify-center rounded-md text-primary-600 outline-none hover:bg-white/70 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary";
14
14
  readonly clearIcon: "size-[0.8125rem]";
15
+ readonly optionTitle: "whitespace-normal break-words";
15
16
  };
17
+ export declare const filterSelectGroupClass = "grid shrink grow basis-0 grid-flow-col auto-cols-auto gap-2.5 [--filter-select-cap:16rem] max-w-[calc(var(--filter-select-count)*var(--filter-select-cap)+(var(--filter-select-count)-1)*0.625rem)] [&>[data-slot=filter-select]]:max-w-none";
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  export interface FilterSelectOption {
2
3
  value: string;
3
4
  label: string;
@@ -11,3 +12,8 @@ export interface FilterSelectProps {
11
12
  minWidth?: number;
12
13
  'data-testid'?: string;
13
14
  }
15
+ export interface FilterSelectGroupProps {
16
+ children: ReactNode;
17
+ className?: string;
18
+ 'data-testid'?: string;
19
+ }
@@ -130,8 +130,8 @@ export { PinField } from './PinField';
130
130
  export type { PinFieldProps, PinFieldLabels } from './PinField';
131
131
  export { OutcomeView } from './OutcomeView';
132
132
  export type { OutcomeViewProps, OutcomeViewLabels, ReceiptChannel } from './OutcomeView';
133
- export { FilterSelect } from './FilterSelect';
134
- export type { FilterSelectProps, FilterSelectOption } from './FilterSelect';
133
+ export { FilterSelect, FilterSelectGroup } from './FilterSelect';
134
+ export type { FilterSelectProps, FilterSelectOption, FilterSelectGroupProps } from './FilterSelect';
135
135
  export { LoadMoreFooter } from './LoadMoreFooter';
136
136
  export type { LoadMoreFooterProps, LoadMoreStatus } from './LoadMoreFooter';
137
137
  export { CardList } from './CardList';
@@ -0,0 +1,6 @@
1
+ export interface PrefillEdits<T> {
2
+ isUntouched: () => boolean;
3
+ markEdited: (emitted: T) => void;
4
+ }
5
+ export declare const usePrefillEdits: <T>(source: T, isSame?: (a: T, b: T) => boolean) => PrefillEdits<T>;
6
+ export declare const useReplaceWhileUntouched: (isUntouched: () => boolean, replace: (text: string) => void) => import('react').RefObject<HTMLInputElement | null>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "2.15.0",
4
+ "version": "2.17.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",