quickit-ui 0.1.10 → 0.1.13
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/dist/quickit-ui.css +1 -1
- package/dist/quickit-ui.d.ts +75 -4
- package/dist/quickit-ui.js +1571 -1258
- package/package.json +1 -1
package/dist/quickit-ui.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
export declare const QUICKIT_SEMANTIC_COLORS: readonly [
|
|
4
4
|
"neutral",
|
|
5
|
+
"slate",
|
|
6
|
+
"zinc",
|
|
5
7
|
"primary",
|
|
6
8
|
"brand",
|
|
7
9
|
"success",
|
|
@@ -10,9 +12,12 @@ export declare const QUICKIT_SEMANTIC_COLORS: readonly [
|
|
|
10
12
|
"info",
|
|
11
13
|
"light",
|
|
12
14
|
"dark",
|
|
15
|
+
"black",
|
|
13
16
|
];
|
|
14
17
|
export declare const QUICKIT_ACCENT_COLORS: readonly [
|
|
15
18
|
"neutral",
|
|
19
|
+
"slate",
|
|
20
|
+
"zinc",
|
|
16
21
|
"primary",
|
|
17
22
|
"brand",
|
|
18
23
|
"success",
|
|
@@ -55,6 +60,13 @@ export declare const QUICKIT_LINK_UNDERLINES: readonly [
|
|
|
55
60
|
"none",
|
|
56
61
|
];
|
|
57
62
|
export declare const QUICKIT_TAB_SIZES: readonly ["xs", "sm", "md", "lg"];
|
|
63
|
+
export declare const QUICKIT_BREAKPOINTS: Readonly<{
|
|
64
|
+
sm: 640;
|
|
65
|
+
md: 768;
|
|
66
|
+
lg: 1024;
|
|
67
|
+
xl: 1280;
|
|
68
|
+
"2xl": 1536;
|
|
69
|
+
}>;
|
|
58
70
|
export declare const QUICKIT_CONTROL_RADIUS_TOKENS: Record<string, string>;
|
|
59
71
|
export declare const QUICKIT_AVATAR_RADIUS_TOKENS: Record<
|
|
60
72
|
string,
|
|
@@ -81,7 +93,15 @@ export type QuickitLinkTextVariant =
|
|
|
81
93
|
export type QuickitLinkUnderline =
|
|
82
94
|
(typeof QUICKIT_LINK_UNDERLINES)[number];
|
|
83
95
|
export type QuickitTabSize = (typeof QUICKIT_TAB_SIZES)[number];
|
|
96
|
+
export type QuickitBreakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
84
97
|
export type QuickitFloatingColor = "default" | QuickitSemanticColor;
|
|
98
|
+
export interface QuickitBreakpoints {
|
|
99
|
+
sm: number;
|
|
100
|
+
md: number;
|
|
101
|
+
lg: number;
|
|
102
|
+
xl: number;
|
|
103
|
+
"2xl": number;
|
|
104
|
+
}
|
|
85
105
|
|
|
86
106
|
export declare function isQuickitTokenValue(
|
|
87
107
|
collection: readonly string[],
|
|
@@ -108,6 +128,29 @@ export declare function QuickitProvider(
|
|
|
108
128
|
props: QuickitProviderProps,
|
|
109
129
|
): React.JSX.Element;
|
|
110
130
|
export declare function useQuickitTheme(): QuickitThemeMode;
|
|
131
|
+
export interface UseBreakpointOptions {
|
|
132
|
+
breakpoints?: Partial<QuickitBreakpoints>;
|
|
133
|
+
}
|
|
134
|
+
export interface UseBreakpointResult {
|
|
135
|
+
breakpoint: QuickitBreakpoint | null;
|
|
136
|
+
breakpoints: QuickitBreakpoints;
|
|
137
|
+
height: number | null;
|
|
138
|
+
isDesktop: boolean;
|
|
139
|
+
isMobile: boolean;
|
|
140
|
+
isTablet: boolean;
|
|
141
|
+
ready: boolean;
|
|
142
|
+
width: number | null;
|
|
143
|
+
}
|
|
144
|
+
export declare function useBreakpoint(
|
|
145
|
+
options?: UseBreakpointOptions,
|
|
146
|
+
): UseBreakpointResult;
|
|
147
|
+
export interface UseMediaQueryOptions {
|
|
148
|
+
defaultValue?: boolean;
|
|
149
|
+
}
|
|
150
|
+
export declare function useMediaQuery(
|
|
151
|
+
query: string,
|
|
152
|
+
options?: UseMediaQueryOptions,
|
|
153
|
+
): boolean;
|
|
111
154
|
|
|
112
155
|
export interface QuickitFormControlContextValue {
|
|
113
156
|
controlId: string;
|
|
@@ -342,11 +385,15 @@ type RadioInputProps = Omit<
|
|
|
342
385
|
>;
|
|
343
386
|
|
|
344
387
|
export interface CheckboxProps extends CheckboxInputProps {
|
|
345
|
-
color?:
|
|
388
|
+
color?: QuickitSemanticColor;
|
|
346
389
|
containerClassName?: string;
|
|
347
390
|
invalid?: boolean;
|
|
348
391
|
label?: React.ReactNode;
|
|
349
392
|
labelClassName?: string;
|
|
393
|
+
onCheckedChange?: (
|
|
394
|
+
checked: boolean,
|
|
395
|
+
event: React.ChangeEvent<HTMLInputElement>,
|
|
396
|
+
) => void;
|
|
350
397
|
required?: boolean;
|
|
351
398
|
size?: QuickitCompactControlSize;
|
|
352
399
|
}
|
|
@@ -355,11 +402,15 @@ export declare const Checkbox: React.ForwardRefExoticComponent<
|
|
|
355
402
|
>;
|
|
356
403
|
|
|
357
404
|
export interface RadioProps extends RadioInputProps {
|
|
358
|
-
color?:
|
|
405
|
+
color?: QuickitSemanticColor;
|
|
359
406
|
containerClassName?: string;
|
|
360
407
|
invalid?: boolean;
|
|
361
408
|
label?: React.ReactNode;
|
|
362
409
|
labelClassName?: string;
|
|
410
|
+
onCheckedChange?: (
|
|
411
|
+
checked: boolean,
|
|
412
|
+
event: React.ChangeEvent<HTMLInputElement>,
|
|
413
|
+
) => void;
|
|
363
414
|
required?: boolean;
|
|
364
415
|
size?: QuickitCompactControlSize;
|
|
365
416
|
}
|
|
@@ -369,18 +420,19 @@ export declare const Radio: React.ForwardRefExoticComponent<
|
|
|
369
420
|
|
|
370
421
|
type SwitchButtonProps = Omit<
|
|
371
422
|
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
372
|
-
"color" | "size" | "value"
|
|
423
|
+
"color" | "onChange" | "size" | "value"
|
|
373
424
|
>;
|
|
374
425
|
|
|
375
426
|
export interface SwitchProps extends SwitchButtonProps {
|
|
376
427
|
checked?: boolean;
|
|
377
|
-
color?:
|
|
428
|
+
color?: QuickitSemanticColor;
|
|
378
429
|
containerClassName?: string;
|
|
379
430
|
defaultChecked?: boolean;
|
|
380
431
|
invalid?: boolean;
|
|
381
432
|
label?: React.ReactNode;
|
|
382
433
|
labelClassName?: string;
|
|
383
434
|
name?: string;
|
|
435
|
+
onChange?: (event: QuickitCheckedChangeEvent) => void;
|
|
384
436
|
onCheckedChange?: (checked: boolean) => void;
|
|
385
437
|
required?: boolean;
|
|
386
438
|
size?: QuickitCompactControlSize;
|
|
@@ -407,6 +459,25 @@ export interface QuickitSelectChangeEvent {
|
|
|
407
459
|
stopPropagation(): void;
|
|
408
460
|
}
|
|
409
461
|
|
|
462
|
+
export interface QuickitCheckedChangeEvent {
|
|
463
|
+
type: "change";
|
|
464
|
+
nativeEvent?: Event;
|
|
465
|
+
target: {
|
|
466
|
+
checked: boolean;
|
|
467
|
+
id?: string;
|
|
468
|
+
name?: string;
|
|
469
|
+
value?: string;
|
|
470
|
+
};
|
|
471
|
+
currentTarget: {
|
|
472
|
+
checked: boolean;
|
|
473
|
+
id?: string;
|
|
474
|
+
name?: string;
|
|
475
|
+
value?: string;
|
|
476
|
+
};
|
|
477
|
+
preventDefault(): void;
|
|
478
|
+
stopPropagation(): void;
|
|
479
|
+
}
|
|
480
|
+
|
|
410
481
|
export interface SelectProps
|
|
411
482
|
extends Omit<React.HTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
412
483
|
children?: React.ReactNode;
|