@clickhouse/click-ui 0.0.227 → 0.0.229

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.
@@ -1,7 +1,7 @@
1
- import { ReactElement, ReactNode } from 'react';
1
+ import { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
2
 
3
3
  type DialogPrimaryAction = "primary" | "danger";
4
- export interface ConfirmationDialogProps {
4
+ export interface ConfirmationDialogProps extends HTMLAttributes<HTMLDivElement> {
5
5
  children?: ReactNode;
6
6
  disabled?: boolean;
7
7
  loading?: boolean;
@@ -1,7 +1,11 @@
1
+ import { TextSize, TextWeight } from '../commonTypes';
2
+
1
3
  export type ArrowPosition = "top" | "right" | "left" | "bottom";
2
4
  export interface DateDetailsProps {
3
5
  date: Date;
4
6
  side?: ArrowPosition;
7
+ size?: TextSize;
5
8
  systemTimeZone?: string;
9
+ weight?: TextWeight;
6
10
  }
7
- export declare const DateDetails: ({ date, side, systemTimeZone }: DateDetailsProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const DateDetails: ({ date, side, size, systemTimeZone, weight, }: DateDetailsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,14 @@
1
- export interface DatePickerProps {
1
+ import { DateRange } from './utils';
2
+
3
+ export interface DateRangePickerProps {
2
4
  endDate?: Date;
3
5
  disabled?: boolean;
4
6
  futureDatesDisabled?: boolean;
7
+ futureStartDatesDisabled?: boolean;
5
8
  onSelectDateRange: (selectedStartDate: Date, selectedEndDate: Date) => void;
6
9
  placeholder?: string;
10
+ predefinedDatesList?: Array<DateRange>;
11
+ maxRangeLength?: number;
7
12
  startDate?: Date;
8
13
  }
9
- export declare const DateRangePicker: ({ endDate, startDate, disabled, futureDatesDisabled, onSelectDateRange, placeholder, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const DateRangePicker: ({ endDate, startDate, disabled, futureDatesDisabled, futureStartDatesDisabled, maxRangeLength, onSelectDateRange, placeholder, predefinedDatesList, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface DateRange {
2
+ startDate: Date;
3
+ endDate: Date;
4
+ }
5
+ export declare const selectedDateFormatter: Intl.DateTimeFormat;
6
+ export declare const weekdayFormatter: Intl.DateTimeFormat;
7
+ export declare const headerDateFormatter: Intl.DateTimeFormat;
8
+ export declare const getPredefinedMonthsForDateRangePicker: (numberOfMonths: number) => Array<DateRange>;
9
+ export declare const datesAreWithinMaxRange: (startDate: Date, endDate: Date, maxRangeLength: number) => boolean;
10
+ export declare const isDateRangeTheWholeMonth: ({ startDate, endDate }: DateRange) => boolean;
@@ -1,4 +1,4 @@
1
- import { HorizontalDirection, IconName } from '..';
1
+ import { HorizontalDirection, IconName } from '../types';
2
2
  import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
3
3
  export declare const Dropdown: {
4
4
  (props: DropdownMenu.DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, ElementType, ReactEventHandler, ReactNode } from 'react';
2
2
  import { IconName } from '..';
3
- import { TextSize, TextWeight } from './common';
3
+ import { TextSize, TextWeight } from '../commonTypes';
4
4
 
5
5
  export interface LinkProps<T extends ElementType = "a"> {
6
6
  size?: TextSize;
@@ -1,5 +1,5 @@
1
- export type TextSize = "xs" | "sm" | "md" | "lg";
2
- export type TextWeight = "normal" | "medium" | "semibold" | "bold";
1
+ import { TextSize, TextWeight } from '../commonTypes';
2
+
3
3
  export type StyledLinkProps = {
4
4
  $size: TextSize;
5
5
  $weight: TextWeight;
@@ -0,0 +1,4 @@
1
+ import { SVGAttributes } from 'react';
2
+
3
+ declare const Cloudflare: (props: SVGAttributes<SVGElement>) => import("react/jsx-runtime").JSX.Element;
4
+ export default Cloudflare;
@@ -0,0 +1,4 @@
1
+ import { SVGAttributes } from 'react';
2
+
3
+ declare const Databricks: (props: SVGAttributes<SVGElement>) => import("react/jsx-runtime").JSX.Element;
4
+ export default Databricks;
@@ -1 +1 @@
1
- export type LogoName = "clickhouse" | "airbyte" | "aws-s3" | "aws-athena" | "aws-kinesis" | "aws-redshift" | "aws-msk" | "kafka" | "digital_ocean" | "feature_database" | "feature_hexagon" | "fivetran" | "confluent" | "hex" | "tableau" | "grafana" | "superset" | "metabase" | "microsoft" | "aws" | "gcp" | "gcs" | "azure" | "azure-blob-storage" | "azure-event-hub" | "dbeaver" | "dbt" | "jdbc" | "mysql" | "postgres" | "google" | "github" | "decodeable" | "golang" | "prequel" | "python" | "deepnote" | "nodejs" | "datagrip" | "vector" | "kubenetes" | "c#" | "redpanda" | "rust" | "hudi" | "deltalake" | "snowflake" | "mongodb" | "bigquery" | "iceberg" | "upstash" | "warpstream";
1
+ export type LogoName = "clickhouse" | "airbyte" | "aws-s3" | "aws-athena" | "aws-kinesis" | "aws-redshift" | "aws-msk" | "kafka" | "digital_ocean" | "feature_database" | "feature_hexagon" | "fivetran" | "confluent" | "hex" | "tableau" | "grafana" | "superset" | "metabase" | "microsoft" | "aws" | "gcp" | "gcs" | "azure" | "azure-blob-storage" | "azure-event-hub" | "dbeaver" | "dbt" | "jdbc" | "mysql" | "postgres" | "google" | "github" | "decodeable" | "golang" | "prequel" | "python" | "deepnote" | "nodejs" | "datagrip" | "vector" | "kubenetes" | "c#" | "redpanda" | "rust" | "hudi" | "deltalake" | "snowflake" | "mongodb" | "bigquery" | "iceberg" | "upstash" | "warpstream" | "cloudflare" | "databricks";
@@ -1,9 +1,8 @@
1
1
  import { ComponentProps, ElementType, ReactNode } from 'react';
2
+ import { TextSize, TextWeight } from '../../commonTypes';
2
3
 
3
4
  export type TextAlignment = "left" | "center" | "right";
4
5
  export type TextColor = "default" | "muted" | "danger" | "disabled";
5
- export type TextSize = "xs" | "sm" | "md" | "lg";
6
- export type TextWeight = "normal" | "medium" | "semibold" | "bold" | "mono";
7
6
  export interface TextProps<T extends ElementType = "p"> {
8
7
  children: ReactNode;
9
8
  align?: TextAlignment;
@@ -0,0 +1,2 @@
1
+ export type TextSize = "xs" | "sm" | "md" | "lg";
2
+ export type TextWeight = "normal" | "medium" | "semibold" | "bold" | "mono";
@@ -23,6 +23,8 @@ export { ContextMenu } from './ContextMenu/ContextMenu';
23
23
  export { Container } from './Container/Container';
24
24
  export { DateDetails } from './DateDetails/DateDetails';
25
25
  export { DatePicker } from './DatePicker/DatePicker';
26
+ export { DateRangePicker } from './DatePicker/DateRangePicker';
27
+ export { getPredefinedMonthsForDateRangePicker } from './DatePicker/utils';
26
28
  export { Dialog } from './Dialog/Dialog';
27
29
  export { EllipsisContent } from './EllipsisContent/EllipsisContent';
28
30
  export { FileUpload } from './FileUpload/FileUpload';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickhouse/click-ui",
3
- "version": "0.0.227",
3
+ "version": "0.0.229",
4
4
  "description": "Official ClickHouse design system react library",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -77,16 +77,10 @@
77
77
  },
78
78
  "devDependencies": {
79
79
  "@radix-ui/react-switch": "^1.0.2",
80
- "@storybook/addon-a11y": "^7.3.2",
81
- "@storybook/addon-essentials": "^7.0.18",
82
- "@storybook/addon-interactions": "^7.0.18",
83
- "@storybook/addon-links": "^7.0.18",
84
- "@storybook/blocks": "^7.0.18",
85
- "@storybook/manager-api": "^7.0.23",
86
- "@storybook/react": "^7.0.18",
87
- "@storybook/react-vite": "^7.0.18",
88
- "@storybook/testing-library": "^0.1.0",
89
- "@storybook/theming": "^7.0.23",
80
+ "@storybook/addon-a11y": "^9.0.18",
81
+ "@storybook/addon-docs": "^9.0.18",
82
+ "@storybook/addon-links": "^9.0.18",
83
+ "@storybook/react-vite": "^9.0.18",
90
84
  "@testing-library/dom": "^10.1.0",
91
85
  "@testing-library/jest-dom": "^6.4.5",
92
86
  "@testing-library/react": "^15.0.7",
@@ -108,11 +102,12 @@
108
102
  "eslint-plugin-prefer-arrow-functions": "^3.3.2",
109
103
  "eslint-plugin-react-hooks": "^4.6.0",
110
104
  "eslint-plugin-react-refresh": "^0.4.7",
111
- "eslint-plugin-storybook": "^0.8.0",
105
+ "eslint-plugin-storybook": "^9.0.18",
112
106
  "jsdom": "^24.0.0",
107
+ "prettier": "^3.6.2",
113
108
  "prop-types": "^15.8.1",
114
- "storybook": "^7.0.18",
115
- "storybook-addon-pseudo-states": "^2.0.1",
109
+ "storybook": "^9.0.18",
110
+ "storybook-addon-pseudo-states": "^9.0.18",
116
111
  "styled-components": "^6.1.11",
117
112
  "stylis": "^4.3.0",
118
113
  "ts-node": "^10.9.1",