@grasp-labs/ds-react-components 0.22.0 → 0.23.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.
package/README.md CHANGED
@@ -50,3 +50,11 @@ Tests run using Storybook's vitest integration, either using the GUI Storybook o
50
50
  ```bash
51
51
  npm run test
52
52
  ```
53
+
54
+ ## Releasing
55
+
56
+ To release a new version of the package:
57
+
58
+ 1. Create a feature branch and make your changes
59
+ 2. After the branch is approved and before merging to `main`, run the `Version and Publish Package` GitHub Action on your feature branch selecting the appropriate version bump (patch, minor, major)
60
+ 3. Once the build succeeds, merge your feature branch to `main`
@@ -1,7 +1,7 @@
1
1
  import { JSX, ReactNode } from 'react';
2
2
  export type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement> & {
3
3
  /** The visible label text for the checkbox */
4
- label: string;
4
+ label?: string;
5
5
  /** Whether the checkbox is currently partially selected */
6
6
  intermediate?: boolean;
7
7
  /** Whether the checkbox is in an error state */
@@ -2,8 +2,12 @@ import { ComponentProps } from 'react';
2
2
  import { DayPicker, Locale } from 'react-day-picker';
3
3
  type DayPickerClassNamesConfig = Pick<ComponentProps<typeof DayPicker>, "classNames" | "modifiersClassNames">;
4
4
  export type DatePickerProps = {
5
- /** Label text displayed nex to the trigger button */
6
- labelText: string;
5
+ /** Optional id (auto-generated if not provided) */
6
+ id?: string;
7
+ /** Name of the input */
8
+ name?: string;
9
+ /** Whether the textbox is disabled */
10
+ disabled?: boolean;
7
11
  /** Date displayed in trigger button, when date is selected */
8
12
  selectedDate: Date | null;
9
13
  /** Locale used to display texts of date-picker in correct language and present date with correct format */
@@ -18,6 +22,8 @@ export type DatePickerProps = {
18
22
  className?: string;
19
23
  /** Config for class names used to override default styles of calendar */
20
24
  dayPickerClassNames?: DayPickerClassNamesConfig;
25
+ /** Determines if input is invalid */
26
+ "aria-invalid"?: boolean;
21
27
  /** Callback function called when the date is changed */
22
28
  onSelectedDateChange: (selectedDate: Date | null) => void;
23
29
  };
@@ -27,5 +33,5 @@ export type DatePickerProps = {
27
33
  * @param props - The props for the DatePicker component
28
34
  * @returns The rendered date-picker
29
35
  */
30
- export declare const DatePicker: ({ labelText, selectedDate, locale, minDate, maxDate, defaultMonth, className, dayPickerClassNames, onSelectedDateChange, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
36
+ export declare const DatePicker: ({ id, name, disabled, selectedDate, locale, minDate, maxDate, defaultMonth, className, dayPickerClassNames, onSelectedDateChange, ...props }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
31
37
  export {};
@@ -1,3 +1,11 @@
1
- import { Node, NodeProps } from '@xyflow/react';
2
- import { FlowData } from './types';
3
- export declare const FlowTile: ({ data, selected }: NodeProps<Node<FlowData>>) => import("react/jsx-runtime").JSX.Element;
1
+ import { Position } from '@xyflow/react';
2
+ import { ReactNode } from 'react';
3
+ export type FlowPosition = Position | "none";
4
+ export type FlowTileProps = {
5
+ children?: ReactNode;
6
+ selected?: boolean;
7
+ className?: string;
8
+ targetPosition?: FlowPosition;
9
+ sourcePosition?: FlowPosition;
10
+ };
11
+ export declare const FlowTile: ({ children, selected, className, targetPosition, sourcePosition, }: FlowTileProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1 @@
1
1
  export * from './FlowTile';
2
- export * from './types';
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export type KeyValueListProps = {
3
+ items: Record<string, ReactNode>;
4
+ columns?: 1 | 2 | 3 | 4;
5
+ className?: string;
6
+ keyClassName?: string;
7
+ valueClassName?: string;
8
+ };
9
+ export declare function KeyValueList({ items, columns, className, keyClassName, valueClassName, }: KeyValueListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './KeyValueList';
@@ -1,2 +1 @@
1
1
  export { useDropdownPosition } from './useDropdownPosition';
2
- export { useViewportCollision } from './useViewportCollision';