@clickhouse/click-ui 0.2.0-test.0 → 0.2.1-rc.8
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 +67 -0
- package/dist/cjs/click-ui.css +3861 -0
- package/dist/cjs/components/Assets/Flags/Mexico.cjs +469 -0
- package/dist/cjs/components/Assets/Flags/Mexico.cjs.map +1 -0
- package/dist/cjs/components/Assets/Flags/system/FlagsDark.cjs +2 -0
- package/dist/cjs/components/Assets/Flags/system/FlagsDark.cjs.map +1 -1
- package/dist/cjs/components/Assets/Flags/system/FlagsLight.cjs +2 -0
- package/dist/cjs/components/Assets/Flags/system/FlagsLight.cjs.map +1 -1
- package/dist/cjs/components/Assets/Icons/Collapse-All.cjs +13 -0
- package/dist/cjs/components/Assets/Icons/Collapse-All.cjs.map +1 -0
- package/dist/cjs/components/Assets/Icons/Expand-All.cjs +13 -0
- package/dist/cjs/components/Assets/Icons/Expand-All.cjs.map +1 -0
- package/dist/cjs/components/Assets/Icons/system/IconsLight.cjs +4 -0
- package/dist/cjs/components/Assets/Icons/system/IconsLight.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.css +261 -0
- package/dist/cjs/components/Button/Button.module.css.cjs +38 -0
- package/dist/cjs/components/Button/Button.module.css.cjs.map +1 -0
- package/dist/cjs/components/Button/index.cjs +42 -126
- package/dist/cjs/components/Button/index.cjs.map +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs.map +1 -1
- package/dist/cjs/components/DatePicker/Common.cjs +100 -73
- package/dist/cjs/components/DatePicker/Common.cjs.map +1 -1
- package/dist/cjs/components/DatePicker/DateRangePicker.cjs +24 -24
- package/dist/cjs/components/DatePicker/DateRangePicker.cjs.map +1 -1
- package/dist/cjs/components/DatePicker/DateTimeRangePicker.cjs +96 -50
- package/dist/cjs/components/DatePicker/DateTimeRangePicker.cjs.map +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +33 -18
- package/dist/cjs/components/DatePicker/index.cjs.map +1 -1
- package/dist/cjs/components/DatePicker/utils.cjs +42 -14
- package/dist/cjs/components/DatePicker/utils.cjs.map +1 -1
- package/dist/cjs/components/Dialog/index.cjs +10 -1
- package/dist/cjs/components/Dialog/index.cjs.map +1 -1
- package/dist/cjs/components/GenericMenu/index.cjs +1 -1
- package/dist/cjs/components/GenericMenu/index.cjs.map +1 -1
- package/dist/cjs/components/InputWrapper/index.cjs +1 -1
- package/dist/cjs/components/InputWrapper/index.cjs.map +1 -1
- package/dist/cjs/components/NumberField/index.cjs +15 -2
- package/dist/cjs/components/NumberField/index.cjs.map +1 -1
- package/dist/cjs/lib/cva.cjs +15 -0
- package/dist/cjs/lib/cva.cjs.map +1 -0
- package/dist/cjs/providers/ThemeProvider.cjs +4 -0
- package/dist/cjs/providers/ThemeProvider.cjs.map +1 -1
- package/dist/cjs/theme/styles/tokens-dark.css +1806 -0
- package/dist/cjs/theme/styles/tokens-light.css +1795 -0
- package/dist/cjs/theme/theme.config.json.cjs +12 -0
- package/dist/cjs/theme/theme.config.json.cjs.map +1 -0
- package/dist/cjs/theme/tokens/variables.dark.cjs +2 -4
- package/dist/cjs/theme/tokens/variables.dark.cjs.map +1 -1
- package/dist/cjs/theme/tokens/variables.light.cjs +1 -6
- package/dist/cjs/theme/tokens/variables.light.cjs.map +1 -1
- package/dist/cjs/utils/localStorage.cjs +3 -1
- package/dist/cjs/utils/localStorage.cjs.map +1 -1
- package/dist/esm/click-ui.css +3861 -0
- package/dist/esm/components/Assets/Flags/Mexico.js +465 -0
- package/dist/esm/components/Assets/Flags/Mexico.js.map +1 -0
- package/dist/esm/components/Assets/Flags/system/FlagsDark.js +2 -0
- package/dist/esm/components/Assets/Flags/system/FlagsDark.js.map +1 -1
- package/dist/esm/components/Assets/Flags/system/FlagsLight.js +2 -0
- package/dist/esm/components/Assets/Flags/system/FlagsLight.js.map +1 -1
- package/dist/esm/components/Assets/Icons/Collapse-All.js +9 -0
- package/dist/esm/components/Assets/Icons/Collapse-All.js.map +1 -0
- package/dist/esm/components/Assets/Icons/Expand-All.js +9 -0
- package/dist/esm/components/Assets/Icons/Expand-All.js.map +1 -0
- package/dist/esm/components/Assets/Icons/system/IconsLight.js +4 -0
- package/dist/esm/components/Assets/Icons/system/IconsLight.js.map +1 -1
- package/dist/esm/components/Button/Button.css +261 -0
- package/dist/esm/components/Button/Button.module.css.js +25 -0
- package/dist/esm/components/Button/Button.module.css.js.map +1 -0
- package/dist/esm/components/Button/index.js +42 -126
- package/dist/esm/components/Button/index.js.map +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/ButtonGroup/index.js.map +1 -1
- package/dist/esm/components/DatePicker/Common.js +101 -74
- package/dist/esm/components/DatePicker/Common.js.map +1 -1
- package/dist/esm/components/DatePicker/DateRangePicker.js +25 -25
- package/dist/esm/components/DatePicker/DateRangePicker.js.map +1 -1
- package/dist/esm/components/DatePicker/DateTimeRangePicker.js +97 -51
- package/dist/esm/components/DatePicker/DateTimeRangePicker.js.map +1 -1
- package/dist/esm/components/DatePicker/index.js +34 -19
- package/dist/esm/components/DatePicker/index.js.map +1 -1
- package/dist/esm/components/DatePicker/utils.js +36 -10
- package/dist/esm/components/DatePicker/utils.js.map +1 -1
- package/dist/esm/components/Dialog/index.js +10 -1
- package/dist/esm/components/Dialog/index.js.map +1 -1
- package/dist/esm/components/GenericMenu/index.js +1 -1
- package/dist/esm/components/GenericMenu/index.js.map +1 -1
- package/dist/esm/components/InputWrapper/index.js +1 -1
- package/dist/esm/components/InputWrapper/index.js.map +1 -1
- package/dist/esm/components/NumberField/index.js +17 -4
- package/dist/esm/components/NumberField/index.js.map +1 -1
- package/dist/esm/lib/cva.js +7 -0
- package/dist/esm/lib/cva.js.map +1 -0
- package/dist/esm/providers/ThemeProvider.js +4 -0
- package/dist/esm/providers/ThemeProvider.js.map +1 -1
- package/dist/esm/theme/styles/tokens-dark.css +1806 -0
- package/dist/esm/theme/styles/tokens-light.css +1795 -0
- package/dist/esm/theme/theme.config.json.js +7 -0
- package/dist/esm/theme/theme.config.json.js.map +1 -0
- package/dist/esm/theme/tokens/variables.dark.js +2 -4
- package/dist/esm/theme/tokens/variables.dark.js.map +1 -1
- package/dist/esm/theme/tokens/variables.light.js +1 -6
- package/dist/esm/theme/tokens/variables.light.js.map +1 -1
- package/dist/esm/utils/localStorage.js +3 -1
- package/dist/esm/utils/localStorage.js.map +1 -1
- package/dist/types/components/Assets/Flags/Mexico.d.ts +3 -0
- package/dist/types/components/Assets/Flags/system/types.d.ts +1 -1
- package/dist/types/components/Assets/Icons/Collapse-All.d.ts +3 -0
- package/dist/types/components/Assets/Icons/Expand-All.d.ts +3 -0
- package/dist/types/components/Assets/Icons/system/types.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +25 -2
- package/dist/types/components/DatePicker/Common.d.ts +9 -4
- package/dist/types/components/DatePicker/DatePicker.d.ts +11 -2
- package/dist/types/components/DatePicker/DateRangePicker.d.ts +3 -2
- package/dist/types/components/DatePicker/DateTimeRangePicker.d.ts +7 -3
- package/dist/types/components/DatePicker/index.d.ts +3 -2
- package/dist/types/components/DatePicker/utils.d.ts +10 -8
- package/dist/types/components/Dialog/Dialog.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.types.d.ts +1 -0
- package/dist/types/components/NumberField/NumberField.d.ts +5 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/lib/cva.d.ts +3 -0
- package/dist/types/theme/theme.config.json.d.ts +6 -0
- package/dist/types/theme/theme.core.d.ts +0 -7
- package/dist/types/theme/tokens/variables.dark.d.ts +0 -2
- package/dist/types/theme/tokens/variables.light.d.ts +0 -5
- package/dist/types/utils/dom.d.ts +1 -1
- package/dist/types/utils/localStorage.d.ts +1 -1
- package/package.json +26 -10
- package/dist/types/components/DatePicker/DatePicker.types.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localStorage.js","sources":["../../../src/utils/localStorage.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"localStorage.js","sources":["../../../src/utils/localStorage.ts"],"sourcesContent":["// WARN: The storage key is shared with .scripts/js/generate-token\n// which is a nodejs script. At the moment opted for json instead\n// of adding support for `js` files, but json means importing the\n// whole file (the file shouldn't grow, so should be alright?)\nimport config from '@/theme/theme.config.json' with { type: 'json' };\n\nexport const CUI_THEME_STORAGE_KEY = config.storageKey;\n"],"names":["CUI_THEME_STORAGE_KEY","config","storageKey"],"mappings":";;AAMO,MAAMA,wBAAwBC,MAAAA,CAAOC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SVGAttributes } from 'react';
|
|
2
2
|
import { AssetSize } from '../../../../types';
|
|
3
3
|
import { ThemeName } from '../../../../theme/theme.types';
|
|
4
|
-
export type FlagName = 'australia' | 'brazil' | 'canada' | 'european-union' | 'germany' | 'great-britain' | 'hong-kong' | 'india' | 'indonesia' | 'ireland' | 'israel' | 'japan' | 'netherlands' | 'singapore' | 'south-africa' | 'south-korea' | 'sweden' | 'switzerland' | 'united-arab-emirates' | 'united-kingdom' | 'united-states';
|
|
4
|
+
export type FlagName = 'australia' | 'brazil' | 'canada' | 'european-union' | 'germany' | 'great-britain' | 'hong-kong' | 'india' | 'indonesia' | 'ireland' | 'israel' | 'japan' | 'mexico' | 'netherlands' | 'singapore' | 'south-africa' | 'south-korea' | 'sweden' | 'switzerland' | 'united-arab-emirates' | 'united-kingdom' | 'united-states';
|
|
5
5
|
export interface FlagProps extends SVGAttributes<SVGElement> {
|
|
6
6
|
name: FlagName;
|
|
7
7
|
theme?: ThemeName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SVGAttributes } from 'react';
|
|
2
2
|
import { AssetSize } from '../../../../types';
|
|
3
3
|
import { ThemeName } from '../../../../theme/theme.types';
|
|
4
|
-
export type IconName = 'activity' | 'alarm' | 'arrow-directions' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-triangle' | 'arrow-up' | 'auth-app' | 'auth-sms' | 'backups' | 'bar-chart' | 'bell' | 'beta' | 'blog' | 'bold' | 'book' | 'brackets' | 'briefcase' | 'building' | 'burger-menu' | 'calendar' | 'calendar-with-time' | 'cards' | 'cell-tower' | 'chart-area' | 'chart-bar-horizontal' | 'chart-cloud' | 'chart-donut' | 'chart-heatmap' | 'chart-scatter' | 'chart-square' | 'chart-stacked-horizontal' | 'chart-stacked-vertical' | 'chat' | 'check' | 'check-in-circle' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clock' | 'cloud' | 'cloud-keys' | 'code' | 'code-in-square' | 'connect' | 'connect-alt' | 'console' | 'copy' | 'cpu' | 'credit-card' | 'cross' | 'data' | 'data-lakes' | 'database' | 'disk' | 'display' | 'document' | 'dot' | 'dots-horizontal' | 'dots-triangle' | 'dots-vertical' | 'dots-vertical-double' | 'double-check' | 'download' | 'download-in-circle' | 'email' | 'empty' | 'enter' | 'eye' | 'eye-closed' | 'filter' | 'fire' | 'flag' | 'flash' | 'flask' | 'folder-closed' | 'folder-open' | 'gear' | 'gift' | 'git-merge' | 'globe' | 'hexagon' | 'history' | 'home' | 'horizontal-loading' | 'http' | 'http-monitoring' | 'info-in-circle' | 'information' | 'insert-row' | 'integrations' | 'italic' | 'key' | 'keys' | 'lifebuoy' | 'light-bulb' | 'light-bulb-on' | 'lightening' | 'line-in-circle' | 'list-bulleted' | 'list-numbered' | 'loading' | 'loading-animated' | 'lock' | 'map-pin' | 'mcp' | 'metrics' | 'metrics-alt' | 'minus' | 'moon' | 'no-cloud' | 'pause' | 'payment' | 'pencil' | 'pie-chart' | 'pipe' | 'play' | 'play-in-circle' | 'plug' | 'plus' | 'popout' | 'popover-arrow' | 'puzzle-piece' | 'query' | 'question' | 'refresh' | 'resize-arrows-horizontal' | 'resize-arrows-vertical' | 'rocket' | 'sand-glass' | 'search' | 'secure' | 'server' | 'services' | 'settings' | 'share' | 'share-arrow' | 'share-network' | 'sleep' | 'slide-in' | 'slide-out' | 'sort' | 'sort-alt' | 'sparkle' | 'speaker' | 'speed' | 'square' | 'star' | 'stop' | 'support' | 'table' | 'taxi' | 'text-slash' | 'thumbs-down' | 'thumbs-up' | 'trash' | 'tree-structure' | 'underline' | 'upgrade' | 'upload' | 'url' | 'user' | 'users' | 'warning' | 'waves';
|
|
4
|
+
export type IconName = 'activity' | 'alarm' | 'arrow-directions' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-triangle' | 'arrow-up' | 'auth-app' | 'auth-sms' | 'backups' | 'bar-chart' | 'bell' | 'beta' | 'blog' | 'bold' | 'book' | 'brackets' | 'briefcase' | 'building' | 'burger-menu' | 'calendar' | 'calendar-with-time' | 'cards' | 'cell-tower' | 'chart-area' | 'chart-bar-horizontal' | 'chart-cloud' | 'chart-donut' | 'chart-heatmap' | 'chart-scatter' | 'chart-square' | 'chart-stacked-horizontal' | 'chart-stacked-vertical' | 'chat' | 'check' | 'check-in-circle' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clock' | 'cloud' | 'cloud-keys' | 'code' | 'code-in-square' | 'collapse-all' | 'connect' | 'connect-alt' | 'console' | 'copy' | 'cpu' | 'credit-card' | 'cross' | 'data' | 'data-lakes' | 'database' | 'disk' | 'display' | 'document' | 'dot' | 'dots-horizontal' | 'dots-triangle' | 'dots-vertical' | 'dots-vertical-double' | 'double-check' | 'download' | 'download-in-circle' | 'email' | 'empty' | 'enter' | 'expand-all' | 'eye' | 'eye-closed' | 'filter' | 'fire' | 'flag' | 'flash' | 'flask' | 'folder-closed' | 'folder-open' | 'gear' | 'gift' | 'git-merge' | 'globe' | 'hexagon' | 'history' | 'home' | 'horizontal-loading' | 'http' | 'http-monitoring' | 'info-in-circle' | 'information' | 'insert-row' | 'integrations' | 'italic' | 'key' | 'keys' | 'lifebuoy' | 'light-bulb' | 'light-bulb-on' | 'lightening' | 'line-in-circle' | 'list-bulleted' | 'list-numbered' | 'loading' | 'loading-animated' | 'lock' | 'map-pin' | 'mcp' | 'metrics' | 'metrics-alt' | 'minus' | 'moon' | 'no-cloud' | 'pause' | 'payment' | 'pencil' | 'pie-chart' | 'pipe' | 'play' | 'play-in-circle' | 'plug' | 'plus' | 'popout' | 'popover-arrow' | 'puzzle-piece' | 'query' | 'question' | 'refresh' | 'resize-arrows-horizontal' | 'resize-arrows-vertical' | 'rocket' | 'sand-glass' | 'search' | 'secure' | 'server' | 'services' | 'settings' | 'share' | 'share-arrow' | 'share-network' | 'sleep' | 'slide-in' | 'slide-out' | 'sort' | 'sort-alt' | 'sparkle' | 'speaker' | 'speed' | 'square' | 'star' | 'stop' | 'support' | 'table' | 'taxi' | 'text-slash' | 'thumbs-down' | 'thumbs-up' | 'trash' | 'tree-structure' | 'underline' | 'upgrade' | 'upload' | 'url' | 'user' | 'users' | 'warning' | 'waves';
|
|
5
5
|
export interface IconProps extends SVGAttributes<SVGElement> {
|
|
6
6
|
name: IconName;
|
|
7
7
|
theme?: ThemeName;
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { IconName } from '../Icon';
|
|
2
|
+
export type ButtonType = 'primary' | 'secondary' | 'empty' | 'danger';
|
|
3
|
+
type Alignment = 'center' | 'left';
|
|
4
|
+
export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
/** The visual style variant of the button */
|
|
6
|
+
type?: ButtonType;
|
|
7
|
+
/** Whether the button is disabled */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** The text label to display in the button */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Icon to display on the left side of the label */
|
|
12
|
+
iconLeft?: IconName;
|
|
13
|
+
/** Icon to display on the right side of the label */
|
|
14
|
+
iconRight?: IconName;
|
|
15
|
+
/** Alignment of the button content */
|
|
16
|
+
align?: Alignment;
|
|
17
|
+
/** Whether the button should fill the full width of its container */
|
|
18
|
+
fillWidth?: boolean;
|
|
19
|
+
/** Whether to show a loading state */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/** Whether the button should be focused on mount */
|
|
22
|
+
autoFocus?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { useCalendar, UseCalendarOptions } from '@h6s/calendar';
|
|
3
|
+
import { Timezone } from './utils';
|
|
3
4
|
interface DatePickerInputProps {
|
|
4
5
|
isActive: boolean;
|
|
5
6
|
disabled: boolean;
|
|
@@ -8,8 +9,9 @@ interface DatePickerInputProps {
|
|
|
8
9
|
partialYear?: number;
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
selectedDate?: Date;
|
|
12
|
+
timezone?: Timezone;
|
|
11
13
|
}
|
|
12
|
-
export declare const DatePickerInput: ({ isActive, disabled, id, partialMonth, partialYear, placeholder, selectedDate, }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const DatePickerInput: ({ isActive, disabled, id, partialMonth, partialYear, placeholder, selectedDate, timezone, }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
interface DateRangePickerInputProps {
|
|
14
16
|
isActive: boolean;
|
|
15
17
|
disabled: boolean;
|
|
@@ -17,8 +19,9 @@ interface DateRangePickerInputProps {
|
|
|
17
19
|
placeholder?: string;
|
|
18
20
|
selectedEndDate?: Date;
|
|
19
21
|
selectedStartDate?: Date;
|
|
22
|
+
timezone?: Timezone;
|
|
20
23
|
}
|
|
21
|
-
export declare const DateRangePickerInput: ({ isActive, disabled, id, placeholder, selectedEndDate, selectedStartDate, }: DateRangePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const DateRangePickerInput: ({ isActive, disabled, id, placeholder, selectedEndDate, selectedStartDate, timezone, }: DateRangePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
25
|
interface DateTimeRangePickerInputProps {
|
|
23
26
|
isActive: boolean;
|
|
24
27
|
disabled: boolean;
|
|
@@ -27,8 +30,9 @@ interface DateTimeRangePickerInputProps {
|
|
|
27
30
|
selectedEndDate?: Date;
|
|
28
31
|
selectedStartDate?: Date;
|
|
29
32
|
shouldShowSeconds?: boolean;
|
|
33
|
+
timezone?: Timezone;
|
|
30
34
|
}
|
|
31
|
-
export declare const DateTimeRangePickerInput: ({ isActive, disabled, id, placeholder, selectedEndDate, selectedStartDate, shouldShowSeconds, }: DateTimeRangePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const DateTimeRangePickerInput: ({ isActive, disabled, id, placeholder, selectedEndDate, selectedStartDate, shouldShowSeconds, timezone, }: DateTimeRangePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
36
|
export declare const DateTableCell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {
|
|
33
37
|
$isCurrentMonth?: boolean;
|
|
34
38
|
$isDisabled?: boolean;
|
|
@@ -47,6 +51,7 @@ interface CalendarRendererProps {
|
|
|
47
51
|
onYearSelect?: (year: number) => void;
|
|
48
52
|
onMonthSelect?: (year: number, month: number) => void;
|
|
49
53
|
selectedDate?: Date;
|
|
54
|
+
timezone?: Timezone;
|
|
50
55
|
}
|
|
51
|
-
export declare const CalendarRenderer: ({ calendarOptions, children, allowYearMonthSelection, onYearSelect, onMonthSelect, selectedDate, ...props }: CalendarRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare const CalendarRenderer: ({ calendarOptions, children, allowYearMonthSelection, onYearSelect, onMonthSelect, selectedDate, timezone, ...props }: CalendarRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
57
|
export {};
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { Timezone } from './utils';
|
|
2
|
+
export interface DatePickerProps {
|
|
3
|
+
allowOnlyDatesList?: Array<Date>;
|
|
4
|
+
date?: Date;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
futureDatesDisabled?: boolean;
|
|
7
|
+
onSelectDate: (selectedDate: Date) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
timezone?: Timezone;
|
|
10
|
+
}
|
|
11
|
+
export declare const DatePicker: ({ allowOnlyDatesList, date, disabled, futureDatesDisabled, onSelectDate, placeholder, timezone, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateRange } from './utils';
|
|
1
|
+
import { DateRange, Timezone } from './utils';
|
|
2
2
|
type OpenDirection = 'left' | 'right';
|
|
3
3
|
export interface DateRangePickerProps {
|
|
4
4
|
endDate?: Date;
|
|
@@ -12,6 +12,7 @@ export interface DateRangePickerProps {
|
|
|
12
12
|
maxRangeLength?: number;
|
|
13
13
|
startDate?: Date;
|
|
14
14
|
responsivePositioning?: boolean;
|
|
15
|
+
timezone?: Timezone;
|
|
15
16
|
}
|
|
16
|
-
export declare const DateRangePicker: ({ endDate, startDate, disabled, futureDatesDisabled, futureStartDatesDisabled, maxRangeLength, onSelectDateRange, openDirection, placeholder, predefinedDatesList, responsivePositioning, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const DateRangePicker: ({ endDate, startDate, disabled, futureDatesDisabled, futureStartDatesDisabled, maxRangeLength, onSelectDateRange, openDirection, placeholder, predefinedDatesList, responsivePositioning, timezone, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { DateRangeListItem } from './utils';
|
|
1
|
+
import { DateRangeListItem, Timezone } from './utils';
|
|
2
2
|
type OpenDirection = 'left' | 'right';
|
|
3
|
+
export type Tab = 'startDate' | 'endDate';
|
|
3
4
|
export interface DateTimeRangePickerProps {
|
|
4
|
-
|
|
5
|
+
closeOnDateRangeSelected?: boolean;
|
|
6
|
+
defaultActiveTab?: Tab;
|
|
5
7
|
disabled?: boolean;
|
|
8
|
+
endDate?: Date;
|
|
6
9
|
futureDatesDisabled?: boolean;
|
|
7
10
|
futureStartDatesDisabled?: boolean;
|
|
8
11
|
onSelectDateRange: (selectedStartDate: Date, selectedEndDate: Date) => void;
|
|
@@ -12,6 +15,7 @@ export interface DateTimeRangePickerProps {
|
|
|
12
15
|
maxRangeLength?: number;
|
|
13
16
|
shouldShowSeconds?: boolean;
|
|
14
17
|
startDate?: Date;
|
|
18
|
+
timezone?: Timezone;
|
|
15
19
|
}
|
|
16
|
-
export declare const DateTimeRangePicker: ({
|
|
20
|
+
export declare const DateTimeRangePicker: ({ closeOnDateRangeSelected, defaultActiveTab, disabled, endDate, futureDatesDisabled, futureStartDatesDisabled, maxRangeLength, onSelectDateRange, openDirection, placeholder, predefinedTimesList, shouldShowSeconds, startDate, timezone, }: DateTimeRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
21
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DatePicker } from './DatePicker';
|
|
2
2
|
export { DateRangePicker } from './DateRangePicker';
|
|
3
3
|
export { DateTimeRangePicker } from './DateTimeRangePicker';
|
|
4
|
-
export type { DatePickerProps } from './DatePicker
|
|
4
|
+
export type { DatePickerProps } from './DatePicker';
|
|
5
5
|
export type { DateRangePickerProps } from './DateRangePicker';
|
|
6
|
-
export type { DateTimeRangePickerProps } from './DateTimeRangePicker';
|
|
6
|
+
export type { DateTimeRangePickerProps, Tab } from './DateTimeRangePicker';
|
|
7
|
+
export type { Timezone } from './utils';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type Timezone = 'system' | 'UTC';
|
|
1
2
|
export interface DateRange {
|
|
2
3
|
startDate: Date;
|
|
3
4
|
endDate: Date;
|
|
@@ -11,14 +12,15 @@ export interface DateRangeListItem {
|
|
|
11
12
|
dateRange: DateRange;
|
|
12
13
|
label: string;
|
|
13
14
|
}
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
15
|
+
export declare const formatSelectedDate: (timezone: Timezone, date: Date) => string;
|
|
16
|
+
export declare const formatWeekday: (timezone: Timezone, date: Date) => string;
|
|
17
|
+
export declare const formatSelectedDateTime: (timezone: Timezone, date: Date) => string;
|
|
18
|
+
export declare const formatSelectedDateTimeWithSeconds: (timezone: Timezone, date: Date) => string;
|
|
19
|
+
export declare const formatDateHeader: (timezone: Timezone, date: Date) => string;
|
|
20
|
+
export declare const shiftToTimezone: (date: Date, timezone: Timezone) => Date;
|
|
21
|
+
export declare const shiftFromTimezone: (date: Date, timezone: Timezone) => Date;
|
|
21
22
|
export declare const getPredefinedMonthsForDateRangePicker: (numberOfMonths: number) => DateRange[];
|
|
22
23
|
export declare const getPredefinedTimePeriodsForDateTimePicker: () => DateRangeListItem[];
|
|
24
|
+
export declare const getNextNDatesForDatePickerAllowOnlyList: (numberOfDays: number) => Date[];
|
|
23
25
|
export declare const datesAreWithinMaxRange: (startDate: Date, endDate: Date, maxRangeLength: number) => boolean;
|
|
24
|
-
export declare const isDateRangeTheWholeMonth: ({ startDate, endDate }: DateRange) => boolean;
|
|
26
|
+
export declare const isDateRangeTheWholeMonth: ({ startDate, endDate }: DateRange, timezone?: Timezone) => boolean;
|
|
@@ -11,7 +11,7 @@ export declare const Dialog: {
|
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
Content: {
|
|
14
|
-
({ title, children, showClose, onClose, forceMount, container, showOverlay, reducePadding, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
({ title, description, children, showClose, onClose, forceMount, container, showOverlay, reducePadding, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
@@ -13,6 +13,7 @@ export interface DialogTriggerProps extends React.ComponentPropsWithoutRef<'butt
|
|
|
13
13
|
}
|
|
14
14
|
export interface DialogContentProps extends RadixDialog.DialogContentProps {
|
|
15
15
|
children: ReactNode;
|
|
16
|
+
description?: string;
|
|
16
17
|
showClose?: boolean;
|
|
17
18
|
forceMount?: true;
|
|
18
19
|
container?: HTMLElement | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent, InputHTMLAttributes } from 'react';
|
|
1
|
+
import { ChangeEvent, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { WrapperProps } from '../InputWrapper';
|
|
3
3
|
export interface NumberFieldProps extends Omit<WrapperProps, 'id' | 'children'>, Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'dir'> {
|
|
4
4
|
/** The input type - always number for NumberField */
|
|
@@ -13,5 +13,9 @@ export interface NumberFieldProps extends Omit<WrapperProps, 'id' | 'children'>,
|
|
|
13
13
|
dir?: 'start' | 'end';
|
|
14
14
|
/** Whether to hide the increment/decrement controls */
|
|
15
15
|
hideControls?: boolean;
|
|
16
|
+
/** Additional content to the left of the control */
|
|
17
|
+
startContent?: ReactNode;
|
|
18
|
+
/** Additional content to the right of the control */
|
|
19
|
+
endContent?: ReactNode;
|
|
16
20
|
}
|
|
17
21
|
export declare const NumberField: import('react').ForwardRefExoticComponent<NumberFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export type { DateRangePickerProps } from './components/DatePicker/DateRangePick
|
|
|
51
51
|
export { DateTimeRangePicker } from './components/DatePicker/DateTimeRangePicker';
|
|
52
52
|
export type { DateTimeRangePickerProps } from './components/DatePicker/DateTimeRangePicker';
|
|
53
53
|
export { getPredefinedMonthsForDateRangePicker } from './components/DatePicker/utils';
|
|
54
|
-
export type { DateRange } from './components/DatePicker/utils';
|
|
54
|
+
export type { DateRange, Timezone } from './components/DatePicker/utils';
|
|
55
55
|
export { Dialog } from './components/Dialog';
|
|
56
56
|
export type { DialogContentProps, DialogProps, DialogTriggerProps, } from './components/Dialog';
|
|
57
57
|
export { Dropdown } from './components/Dropdown';
|
|
@@ -1907,7 +1907,6 @@ export declare const themes: {
|
|
|
1907
1907
|
};
|
|
1908
1908
|
stroke: {
|
|
1909
1909
|
default: string;
|
|
1910
|
-
focus: string;
|
|
1911
1910
|
};
|
|
1912
1911
|
};
|
|
1913
1912
|
format: {
|
|
@@ -1938,7 +1937,6 @@ export declare const themes: {
|
|
|
1938
1937
|
};
|
|
1939
1938
|
stroke: {
|
|
1940
1939
|
default: string;
|
|
1941
|
-
focus: string;
|
|
1942
1940
|
};
|
|
1943
1941
|
};
|
|
1944
1942
|
};
|
|
@@ -5709,7 +5707,6 @@ export declare const themes: {
|
|
|
5709
5707
|
};
|
|
5710
5708
|
stroke: {
|
|
5711
5709
|
default: string;
|
|
5712
|
-
focus: string;
|
|
5713
5710
|
};
|
|
5714
5711
|
};
|
|
5715
5712
|
format: {
|
|
@@ -5737,10 +5734,6 @@ export declare const themes: {
|
|
|
5737
5734
|
active: string;
|
|
5738
5735
|
disabled: string;
|
|
5739
5736
|
};
|
|
5740
|
-
stroke: {
|
|
5741
|
-
default: string;
|
|
5742
|
-
focus: string;
|
|
5743
|
-
};
|
|
5744
5737
|
};
|
|
5745
5738
|
};
|
|
5746
5739
|
};
|
|
@@ -1904,7 +1904,6 @@ declare const theme: {
|
|
|
1904
1904
|
};
|
|
1905
1905
|
stroke: {
|
|
1906
1906
|
default: string;
|
|
1907
|
-
focus: string;
|
|
1908
1907
|
};
|
|
1909
1908
|
};
|
|
1910
1909
|
format: {
|
|
@@ -1935,7 +1934,6 @@ declare const theme: {
|
|
|
1935
1934
|
};
|
|
1936
1935
|
stroke: {
|
|
1937
1936
|
default: string;
|
|
1938
|
-
focus: string;
|
|
1939
1937
|
};
|
|
1940
1938
|
};
|
|
1941
1939
|
};
|
|
@@ -1889,7 +1889,6 @@ declare const theme: {
|
|
|
1889
1889
|
};
|
|
1890
1890
|
stroke: {
|
|
1891
1891
|
default: string;
|
|
1892
|
-
focus: string;
|
|
1893
1892
|
};
|
|
1894
1893
|
};
|
|
1895
1894
|
format: {
|
|
@@ -1917,10 +1916,6 @@ declare const theme: {
|
|
|
1917
1916
|
active: string;
|
|
1918
1917
|
disabled: string;
|
|
1919
1918
|
};
|
|
1920
|
-
stroke: {
|
|
1921
|
-
default: string;
|
|
1922
|
-
focus: string;
|
|
1923
|
-
};
|
|
1924
1919
|
};
|
|
1925
1920
|
};
|
|
1926
1921
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeName } from '../theme/theme.types';
|
|
2
|
-
export declare const THEME_ATTRIBUTE
|
|
2
|
+
export declare const THEME_ATTRIBUTE: string;
|
|
3
3
|
export declare const getRootElement: () => HTMLElement | undefined;
|
|
4
4
|
export declare const setRootThemeAttribute: (theme: ThemeName) => void;
|
|
5
5
|
export declare const removeRootThemeAttribute: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CUI_THEME_STORAGE_KEY
|
|
1
|
+
export declare const CUI_THEME_STORAGE_KEY: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickhouse/click-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "v0.2.1-rc.8",
|
|
4
4
|
"description": "Official ClickHouse design system react library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"main": "./dist/cjs/index.cjs",
|
|
11
11
|
"module": "./dist/esm/index.js",
|
|
12
12
|
"types": "./dist/types/index.d.ts",
|
|
13
|
-
"sideEffects":
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"**/*.css"
|
|
15
|
+
],
|
|
14
16
|
"exports": {
|
|
15
17
|
".": {
|
|
16
18
|
"types": "./dist/types/index.d.ts",
|
|
@@ -375,9 +377,13 @@
|
|
|
375
377
|
"format:fix": ".scripts/bash/format --write",
|
|
376
378
|
"generate:exports": ".scripts/js/generate-exports",
|
|
377
379
|
"generate:tokens": "node ./.scripts/js/generate-tokens.js && yarn format:fix src/theme/tokens/**/*.ts",
|
|
378
|
-
"lint": "
|
|
379
|
-
"lint:fix": "
|
|
380
|
-
"
|
|
380
|
+
"lint": "yarn lint:code && yarn lint:css",
|
|
381
|
+
"lint:fix": "yarn lint:code:fix && yarn lint:css:fix",
|
|
382
|
+
"lint:code": "eslint src --report-unused-disable-directives",
|
|
383
|
+
"lint:code:fix": "eslint src --report-unused-disable-directives --fix",
|
|
384
|
+
"lint:css": "stylelint \"src/**/*.css\"",
|
|
385
|
+
"lint:css:fix": "stylelint \"src/**/*.css\" --fix",
|
|
386
|
+
"prepare": "yarn test && yarn format && yarn lint && yarn changeset:verify && yarn circular-dependency:check",
|
|
381
387
|
"prettify": "yarn format:fix",
|
|
382
388
|
"preview": "vite preview",
|
|
383
389
|
"storybook": "storybook dev -p 6006",
|
|
@@ -385,10 +391,10 @@
|
|
|
385
391
|
"storybook:serve": "yarn dlx http-server .storybook/out",
|
|
386
392
|
"test": "vitest",
|
|
387
393
|
"test:chromatic": "yarn dlx chromatic",
|
|
388
|
-
"test:visual": "playwright
|
|
389
|
-
"test:visual:report": "playwright
|
|
390
|
-
"test:visual:ui": "playwright
|
|
391
|
-
"test:visual:update": "playwright
|
|
394
|
+
"test:visual": ".scripts/bash/playwright-docker",
|
|
395
|
+
"test:visual:report": ".scripts/bash/playwright-docker report",
|
|
396
|
+
"test:visual:ui": ".scripts/bash/playwright-docker ui",
|
|
397
|
+
"test:visual:update": ".scripts/bash/playwright-docker update",
|
|
392
398
|
"test:watch": "DEBUG_PRINT_LIMIT=100000 vitest --watch",
|
|
393
399
|
"typecheck": "tsc --noEmit"
|
|
394
400
|
},
|
|
@@ -410,6 +416,8 @@
|
|
|
410
416
|
"@radix-ui/react-tabs": "1.1.1",
|
|
411
417
|
"@radix-ui/react-toast": "1.2.2",
|
|
412
418
|
"@radix-ui/react-tooltip": "1.1.2",
|
|
419
|
+
"class-variance-authority": "^0.7.1",
|
|
420
|
+
"clsx": "^2.1.1",
|
|
413
421
|
"dayjs": "^1.11.19",
|
|
414
422
|
"lodash-es": "^4.17.23",
|
|
415
423
|
"react-sortablejs": "^6.1.4",
|
|
@@ -433,6 +441,7 @@
|
|
|
433
441
|
"@testing-library/user-event": "^14.5.2",
|
|
434
442
|
"@tokens-studio/sd-transforms": "^1.2.0",
|
|
435
443
|
"@types/eslint-plugin-react-refresh": "^0.4.0",
|
|
444
|
+
"@types/fs-extra": "^11.0.4",
|
|
436
445
|
"@types/lodash-es": "^4.17.12",
|
|
437
446
|
"@types/node": "^24.10.1",
|
|
438
447
|
"@types/react": "18.3.1",
|
|
@@ -451,9 +460,12 @@
|
|
|
451
460
|
"eslint-plugin-react-hooks": "^5",
|
|
452
461
|
"eslint-plugin-react-refresh": "0.4.7",
|
|
453
462
|
"eslint-plugin-storybook": "^10.1.10",
|
|
463
|
+
"fs-extra": "^11.3.4",
|
|
464
|
+
"glob": "^13.0.6",
|
|
454
465
|
"globals": "^16.5.0",
|
|
455
|
-
"husky": "^9.1.7",
|
|
456
466
|
"jsdom": "^24.0.0",
|
|
467
|
+
"postcss": "^8.5.8",
|
|
468
|
+
"postcss-modules": "^6.0.1",
|
|
457
469
|
"prettier": "3.7.4",
|
|
458
470
|
"prop-types": "^15.8.1",
|
|
459
471
|
"react": "18.3.1",
|
|
@@ -463,6 +475,10 @@
|
|
|
463
475
|
"storybook": "^10.1.10",
|
|
464
476
|
"storybook-addon-pseudo-states": "^10.1.10",
|
|
465
477
|
"style-dictionary": "^5.0.0",
|
|
478
|
+
"stylelint": "^17.5.0",
|
|
479
|
+
"stylelint-config-standard": "^40.0.0",
|
|
480
|
+
"stylelint-no-unsupported-browser-features": "^8.1.1",
|
|
481
|
+
"stylelint-order": "^8.1.1",
|
|
466
482
|
"stylis": "^4.3.0",
|
|
467
483
|
"ts-node": "^10.9.1",
|
|
468
484
|
"typescript": "^5.5.3",
|