@juspay/blend-design-system 0.0.1 → 0.0.5-beta.1
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/assets/main.css +1 -1
- package/dist/components/DateRangePicker/MobileDrawerPresets.d.ts +25 -0
- package/dist/components/DateRangePicker/dateRangePicker.tokens.d.ts +95 -0
- package/dist/components/DateRangePicker/index.d.ts +1 -0
- package/dist/components/DateRangePicker/types.d.ts +2 -0
- package/dist/components/DateRangePicker/utils.d.ts +66 -0
- package/dist/components/Drawer/components/DrawerBase.d.ts +2 -0
- package/dist/components/Drawer/drawer.tokens.d.ts +1 -1
- package/dist/components/Inputs/DropdownInput/DropdownInput.d.ts +1 -1
- package/dist/components/Inputs/DropdownInput/dropdownInput.tokens.d.ts +5 -1
- package/dist/components/Inputs/DropdownInput/types.d.ts +3 -1
- package/dist/components/Inputs/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/Inputs/NumberInput/numberInput.tokens.d.ts +5 -1
- package/dist/components/Inputs/NumberInput/types.d.ts +4 -2
- package/dist/components/Inputs/TextArea/textarea.token.d.ts +5 -1
- package/dist/components/Inputs/TextArea/types.d.ts +1 -1
- package/dist/components/Inputs/TextInput/TextInput.d.ts +1 -1
- package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +5 -1
- package/dist/components/Inputs/TextInput/types.d.ts +3 -1
- package/dist/components/Inputs/UnitInput/UnitInput.d.ts +1 -1
- package/dist/components/Inputs/UnitInput/types.d.ts +3 -1
- package/dist/components/Inputs/UnitInput/unitInput.tokens.d.ts +5 -1
- package/dist/components/Inputs/utils/FloatingLabels/FloatingLabels.d.ts +7 -0
- package/dist/components/MultiSelect/MultiSelectTrigger.d.ts +22 -0
- package/dist/components/MultiSelect/index.d.ts +1 -0
- package/dist/components/MultiSelect/multiSelect.tokens.d.ts +10 -2
- package/dist/components/MultiSelect/types.d.ts +1 -0
- package/dist/components/Primitives/PrimitiveButton/PrimitiveButton.d.ts +4 -0
- package/dist/components/Primitives/PrimitiveInput/PrimitiveInput.d.ts +2 -0
- package/dist/components/Primitives/PrimitiveText/PrimitiveText.d.ts +5 -0
- package/dist/components/Primitives/PrimitiveTextArea.d.ts +2 -0
- package/dist/components/SingleSelect/SingleSelectTrigger.d.ts +21 -0
- package/dist/components/SingleSelect/singleSelect.tokens.d.ts +76 -0
- package/dist/components/SingleSelect/types.d.ts +54 -1
- package/dist/components/Tabs/tabs.token.d.ts +14 -5
- package/dist/components/Tabs/types.d.ts +2 -1
- package/dist/context/ThemeContext.d.ts +16 -14
- package/dist/context/useComponentToken.d.ts +9 -8
- package/dist/global-utils/GlobalUtils.d.ts +1 -0
- package/dist/main.js +17386 -14917
- package/package.json +24 -3
package/dist/assets/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gradient-blur{position:absolute;z-index:2;top:0;right:0;bottom:0;left:0}.gradient-blur>div,.gradient-blur:before,.gradient-blur:after{position:absolute;top:0;right:0;bottom:0;left:0}.gradient-blur:before{content:"";z-index:30;-webkit-backdrop-filter:blur(.5px);backdrop-filter:blur(.5px);mask:linear-gradient(to top,rgba(0,0,0,0) 0%,rgba(0,0,0,1) 12.5%,rgba(0,0,0,1) 25%,rgba(0,0,0,0) 37.5%)}.gradient-blur>div:nth-of-type(1){z-index:32;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);mask:linear-gradient(to top,rgba(0,0,0,0) 12.5%,rgba(0,0,0,1) 25%,rgba(0,0,0,1) 37.5%,rgba(0,0,0,0) 50%)}.gradient-blur>div:nth-of-type(2){z-index:33;-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);mask:linear-gradient(to top,rgba(0,0,0,0) 25%,rgba(0,0,0,1) 37.5%,rgba(0,0,0,1) 50%,rgba(0,0,0,0) 62.5%)}.gradient-blur>div:nth-of-type(3){z-index:34;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);mask:linear-gradient(to top,rgba(0,0,0,0) 37.5%,rgba(0,0,0,1) 50%,rgba(0,0,0,1) 62.5%,rgba(0,0,0,0) 75%)}.gradient-blur>div:nth-of-type(4){z-index:35;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);mask:linear-gradient(to top,rgba(0,0,0,0) 50%,rgba(0,0,0,1) 62.5%,rgba(0,0,0,1) 75%,rgba(0,0,0,0) 87.5%)}.gradient-blur>div:nth-of-type(5){z-index:36;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);mask:linear-gradient(to top,rgba(0,0,0,0) 62.5%,rgba(0,0,0,1) 75%,rgba(0,0,0,1) 87.5%,rgba(0,0,0,0) 100%)}.gradient-blur>div:nth-of-type(6){z-index:37;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);mask:linear-gradient(to top,rgba(0,0,0,0) 75%,rgba(0,0,0,1) 87.5%,rgba(0,0,0,1) 100%)}.gradient-blur:after{content:"";z-index:38;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);mask:linear-gradient(to top,rgba(0,0,0,0) 87.5%,rgba(0,0,0,1) 100%)}
|
|
1
|
+
[data-vaul-drawer][data-vaul-drawer-direction=bottom]:after{display:none}.gradient-blur{position:absolute;z-index:2;top:0;right:0;bottom:0;left:0}.gradient-blur>div,.gradient-blur:before,.gradient-blur:after{position:absolute;top:0;right:0;bottom:0;left:0}.gradient-blur:before{content:"";z-index:30;-webkit-backdrop-filter:blur(.5px);backdrop-filter:blur(.5px);mask:linear-gradient(to top,rgba(0,0,0,0) 0%,rgba(0,0,0,1) 12.5%,rgba(0,0,0,1) 25%,rgba(0,0,0,0) 37.5%)}.gradient-blur>div:nth-of-type(1){z-index:32;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);mask:linear-gradient(to top,rgba(0,0,0,0) 12.5%,rgba(0,0,0,1) 25%,rgba(0,0,0,1) 37.5%,rgba(0,0,0,0) 50%)}.gradient-blur>div:nth-of-type(2){z-index:33;-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);mask:linear-gradient(to top,rgba(0,0,0,0) 25%,rgba(0,0,0,1) 37.5%,rgba(0,0,0,1) 50%,rgba(0,0,0,0) 62.5%)}.gradient-blur>div:nth-of-type(3){z-index:34;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);mask:linear-gradient(to top,rgba(0,0,0,0) 37.5%,rgba(0,0,0,1) 50%,rgba(0,0,0,1) 62.5%,rgba(0,0,0,0) 75%)}.gradient-blur>div:nth-of-type(4){z-index:35;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);mask:linear-gradient(to top,rgba(0,0,0,0) 50%,rgba(0,0,0,1) 62.5%,rgba(0,0,0,1) 75%,rgba(0,0,0,0) 87.5%)}.gradient-blur>div:nth-of-type(5){z-index:36;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);mask:linear-gradient(to top,rgba(0,0,0,0) 62.5%,rgba(0,0,0,1) 75%,rgba(0,0,0,1) 87.5%,rgba(0,0,0,0) 100%)}.gradient-blur>div:nth-of-type(6){z-index:37;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);mask:linear-gradient(to top,rgba(0,0,0,0) 75%,rgba(0,0,0,1) 87.5%,rgba(0,0,0,1) 100%)}.gradient-blur:after{content:"";z-index:38;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);mask:linear-gradient(to top,rgba(0,0,0,0) 87.5%,rgba(0,0,0,1) 100%)}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DateRange, DateRangePreset } from './types';
|
|
3
|
+
type MobileDrawerPresetsProps = {
|
|
4
|
+
drawerOpen: boolean;
|
|
5
|
+
setDrawerOpen: (open: boolean) => void;
|
|
6
|
+
renderTrigger: () => React.ReactNode;
|
|
7
|
+
showPresets: boolean;
|
|
8
|
+
availablePresets: DateRangePreset[];
|
|
9
|
+
activePreset: DateRangePreset;
|
|
10
|
+
selectedRange: DateRange;
|
|
11
|
+
startTime: string;
|
|
12
|
+
endTime: string;
|
|
13
|
+
dateFormat: string;
|
|
14
|
+
handlePresetSelect: (preset: DateRangePreset) => void;
|
|
15
|
+
handleStartTimeChange: (time: string) => void;
|
|
16
|
+
handleEndTimeChange: (time: string) => void;
|
|
17
|
+
setSelectedRange: (range: DateRange) => void;
|
|
18
|
+
setStartDate: (date: string) => void;
|
|
19
|
+
setEndDate: (date: string) => void;
|
|
20
|
+
handleCancel: () => void;
|
|
21
|
+
handleApply: () => void;
|
|
22
|
+
showCustomDropdownOnly?: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare const MobileDrawerPresets: React.FC<MobileDrawerPresetsProps>;
|
|
25
|
+
export default MobileDrawerPresets;
|
|
@@ -47,6 +47,101 @@ export type CalendarTokenType = {
|
|
|
47
47
|
'&[data-highlighted]': CSSObject;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
+
mobileDrawer: {
|
|
51
|
+
picker: {
|
|
52
|
+
itemHeight: CSSObject['height'];
|
|
53
|
+
containerHeight: CSSObject['height'];
|
|
54
|
+
gradients: {
|
|
55
|
+
top: CSSObject['background'];
|
|
56
|
+
bottom: CSSObject['background'];
|
|
57
|
+
};
|
|
58
|
+
divider: {
|
|
59
|
+
width: CSSObject['width'];
|
|
60
|
+
height: CSSObject['height'];
|
|
61
|
+
strokeColor: CSSObject['color'];
|
|
62
|
+
strokeColorEnd: CSSObject['color'];
|
|
63
|
+
};
|
|
64
|
+
text: {
|
|
65
|
+
selected: {
|
|
66
|
+
fontSize: CSSObject['fontSize'];
|
|
67
|
+
fontWeight: CSSObject['fontWeight'];
|
|
68
|
+
color: CSSObject['color'];
|
|
69
|
+
opacity: CSSObject['opacity'];
|
|
70
|
+
};
|
|
71
|
+
unselected: {
|
|
72
|
+
fontSize: CSSObject['fontSize'];
|
|
73
|
+
fontWeight: CSSObject['fontWeight'];
|
|
74
|
+
color: CSSObject['color'];
|
|
75
|
+
opacity: CSSObject['opacity'];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
timeInput: {
|
|
79
|
+
width: CSSObject['width'];
|
|
80
|
+
fontSize: CSSObject['fontSize'];
|
|
81
|
+
fontWeight: CSSObject['fontWeight'];
|
|
82
|
+
color: CSSObject['color'];
|
|
83
|
+
zIndex: CSSObject['zIndex'];
|
|
84
|
+
};
|
|
85
|
+
scrollArea: {
|
|
86
|
+
zIndex: CSSObject['zIndex'];
|
|
87
|
+
opacity: CSSObject['opacity'];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
header: {
|
|
91
|
+
padding: CSSObject['padding'];
|
|
92
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
93
|
+
zIndex: CSSObject['zIndex'];
|
|
94
|
+
text: {
|
|
95
|
+
fontSize: CSSObject['fontSize'];
|
|
96
|
+
fontWeight: CSSObject['fontWeight'];
|
|
97
|
+
color: CSSObject['color'];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
presetItem: {
|
|
101
|
+
padding: CSSObject['padding'];
|
|
102
|
+
borderBottom: CSSObject['borderBottom'];
|
|
103
|
+
text: {
|
|
104
|
+
active: {
|
|
105
|
+
fontWeight: CSSObject['fontWeight'];
|
|
106
|
+
color: CSSObject['color'];
|
|
107
|
+
};
|
|
108
|
+
inactive: {
|
|
109
|
+
fontWeight: CSSObject['fontWeight'];
|
|
110
|
+
color: CSSObject['color'];
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
icon: {
|
|
114
|
+
size: CSSObject['width'];
|
|
115
|
+
color: CSSObject['color'];
|
|
116
|
+
};
|
|
117
|
+
chevron: {
|
|
118
|
+
size: CSSObject['width'];
|
|
119
|
+
color: CSSObject['color'];
|
|
120
|
+
transition: CSSObject['transition'];
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
actionButtons: {
|
|
124
|
+
container: {
|
|
125
|
+
gap: CSSObject['gap'];
|
|
126
|
+
padding: CSSObject['padding'];
|
|
127
|
+
marginTop: CSSObject['marginTop'];
|
|
128
|
+
borderTop: CSSObject['borderTop'];
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
tabs: {
|
|
132
|
+
marginTop: CSSObject['marginTop'];
|
|
133
|
+
content: {
|
|
134
|
+
marginTop: CSSObject['marginTop'];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
datePicker: {
|
|
138
|
+
marginTop: CSSObject['marginTop'];
|
|
139
|
+
container: {
|
|
140
|
+
padding: CSSObject['padding'];
|
|
141
|
+
gap: CSSObject['gap'];
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
50
145
|
trigger: {
|
|
51
146
|
height: CSSObject['height'];
|
|
52
147
|
display: CSSObject['display'];
|
|
@@ -468,3 +468,69 @@ export declare const calculateDayCellProps: (date: Date, selectedRange: DateRang
|
|
|
468
468
|
textColor: string | unknown;
|
|
469
469
|
showTodayIndicator: boolean;
|
|
470
470
|
};
|
|
471
|
+
/**
|
|
472
|
+
* Constants for mobile date picker
|
|
473
|
+
*/
|
|
474
|
+
export declare const MOBILE_PICKER_CONSTANTS: {
|
|
475
|
+
readonly ITEM_HEIGHT: 44;
|
|
476
|
+
readonly VISIBLE_ITEMS: 3;
|
|
477
|
+
readonly SCROLL_DEBOUNCE: 50;
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Validates time input - only allows numbers and colon
|
|
481
|
+
* @param input The input string to validate
|
|
482
|
+
* @returns True if input is valid
|
|
483
|
+
*/
|
|
484
|
+
export declare const isValidTimeInput: (input: string) => boolean;
|
|
485
|
+
/**
|
|
486
|
+
* Formats time input as HH:MM
|
|
487
|
+
* @param input The input string to format
|
|
488
|
+
* @returns Formatted time string
|
|
489
|
+
*/
|
|
490
|
+
export declare const formatTimeInput: (input: string) => string;
|
|
491
|
+
/**
|
|
492
|
+
* Generates picker data for date/time selection
|
|
493
|
+
* @param tabType Whether this is for start or end date
|
|
494
|
+
* @param selectedRange Current selected date range
|
|
495
|
+
* @param startTime Current start time
|
|
496
|
+
* @param endTime Current end time
|
|
497
|
+
* @returns Object with picker data for all columns
|
|
498
|
+
*/
|
|
499
|
+
export declare const generatePickerData: (tabType: "start" | "end", selectedRange: DateRange, startTime: string, endTime: string) => {
|
|
500
|
+
years: {
|
|
501
|
+
items: number[];
|
|
502
|
+
selectedIndex: number;
|
|
503
|
+
};
|
|
504
|
+
months: {
|
|
505
|
+
items: string[];
|
|
506
|
+
selectedIndex: number;
|
|
507
|
+
};
|
|
508
|
+
dates: {
|
|
509
|
+
items: number[];
|
|
510
|
+
selectedIndex: number;
|
|
511
|
+
};
|
|
512
|
+
times: {
|
|
513
|
+
items: string[];
|
|
514
|
+
selectedIndex: number;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* Creates selection handler for picker columns
|
|
519
|
+
* @param tabType Whether this is for start or end date
|
|
520
|
+
* @param type The type of selection (year, month, date, time)
|
|
521
|
+
* @param selectedRange Current selected range
|
|
522
|
+
* @param dateFormat Date format string
|
|
523
|
+
* @param handleStartTimeChange Start time change handler
|
|
524
|
+
* @param handleEndTimeChange End time change handler
|
|
525
|
+
* @param setSelectedRange Range setter function
|
|
526
|
+
* @param setStartDate Start date setter function
|
|
527
|
+
* @param setEndDate End date setter function
|
|
528
|
+
* @returns Selection handler function
|
|
529
|
+
*/
|
|
530
|
+
export declare const createSelectionHandler: (tabType: "start" | "end", type: "year" | "month" | "date" | "time", selectedRange: DateRange, dateFormat: string, handleStartTimeChange: (time: string) => void, handleEndTimeChange: (time: string) => void, setSelectedRange: (range: DateRange) => void, setStartDate: (date: string) => void, setEndDate: (date: string) => void) => (index: number) => void;
|
|
531
|
+
/**
|
|
532
|
+
* Gets preset display label with custom mappings
|
|
533
|
+
* @param preset The preset to get label for
|
|
534
|
+
* @returns Display label for the preset
|
|
535
|
+
*/
|
|
536
|
+
export declare const getPresetDisplayLabel: (preset: DateRangePreset) => string;
|
|
@@ -11,6 +11,7 @@ export declare const DrawerContent: React.ForwardRefExoticComponent<DrawerConten
|
|
|
11
11
|
showHandle?: boolean;
|
|
12
12
|
handle?: React.ReactNode;
|
|
13
13
|
hasSnapPoints?: boolean;
|
|
14
|
+
contentDriven?: boolean;
|
|
14
15
|
mobileOffset?: {
|
|
15
16
|
top?: string;
|
|
16
17
|
bottom?: string;
|
|
@@ -25,6 +26,7 @@ export declare const DrawerBody: React.ForwardRefExoticComponent<{
|
|
|
25
26
|
children: React.ReactNode;
|
|
26
27
|
className?: string;
|
|
27
28
|
overflowY?: "auto" | "hidden" | "scroll" | "visible";
|
|
29
|
+
noPadding?: boolean;
|
|
28
30
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
29
31
|
export declare const DrawerFooter: React.ForwardRefExoticComponent<DrawerFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
32
|
export declare const DrawerClose: React.ForwardRefExoticComponent<DrawerCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -43,8 +43,8 @@ export type DrawerTokensType = {
|
|
|
43
43
|
body: {
|
|
44
44
|
padding: CSSObject['padding'];
|
|
45
45
|
backgroundColor: CSSObject['backgroundColor'];
|
|
46
|
-
maxHeight: CSSObject['maxHeight'];
|
|
47
46
|
overflowY: CSSObject['overflowY'];
|
|
47
|
+
borderRadius: CSSObject['borderRadius'];
|
|
48
48
|
};
|
|
49
49
|
footer: {
|
|
50
50
|
padding: CSSObject['padding'];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DropdownInputProps } from './types';
|
|
2
|
-
declare const DropdownInput: ({ label, sublabel, disabled, helpIconHintText, name, required, error, errorMessage, hintText, value, onChange, slot, size, placeholder, dropDownValue, onDropDownChange, dropDownItems, dropdownName, onDropdownOpen, onDropdownClose, ...rest }: DropdownInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DropdownInput: ({ label, sublabel, disabled, helpIconHintText, name, required, error, errorMessage, hintText, value, onChange, slot, size, placeholder, dropDownValue, onDropDownChange, dropDownItems, dropdownName, onDropdownOpen, onDropdownClose, onBlur, onFocus, ...rest }: DropdownInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DropdownInput;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
3
|
import { DropdownInputSize, DropdownInputState } from './types';
|
|
4
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
4
5
|
export type DropdownInputTokensType = {
|
|
5
6
|
input: {
|
|
6
7
|
gap: CSSObject['gap'];
|
|
@@ -28,6 +29,9 @@ export type DropdownInputTokensType = {
|
|
|
28
29
|
};
|
|
29
30
|
};
|
|
30
31
|
};
|
|
32
|
+
export type ResponsiveDropdownInputTokens = {
|
|
33
|
+
[key in keyof BreakpointType]: DropdownInputTokensType;
|
|
34
|
+
};
|
|
31
35
|
declare const dropdownInputTokens: Readonly<DropdownInputTokensType>;
|
|
32
|
-
export declare const getDropdownInputTokens: (foundationTheme: FoundationTokenType) =>
|
|
36
|
+
export declare const getDropdownInputTokens: (foundationTheme: FoundationTokenType) => ResponsiveDropdownInputTokens;
|
|
33
37
|
export default dropdownInputTokens;
|
|
@@ -28,4 +28,6 @@ export type DropdownInputProps = {
|
|
|
28
28
|
dropdownName?: string;
|
|
29
29
|
onDropdownOpen?: () => void;
|
|
30
30
|
onDropdownClose?: () => void;
|
|
31
|
-
|
|
31
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
32
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
33
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className' | 'onBlur' | 'onFocus'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { NumberInputProps } from './types';
|
|
2
|
-
declare const NumberInput: ({ value, onChange, min, max, step, error, errorMessage, required, disabled, size, placeholder, sublabel, helpIconHintText, label, hintText, name, ...rest }: NumberInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const NumberInput: ({ value, onChange, min, max, step, error, errorMessage, required, disabled, size, placeholder, sublabel, helpIconHintText, label, hintText, name, onBlur, onFocus, ...rest }: NumberInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default NumberInput;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
3
4
|
declare enum TextInputSize {
|
|
4
5
|
MD = "md",
|
|
5
6
|
LG = "lg"
|
|
@@ -39,6 +40,9 @@ export type NumberInputTokensType = {
|
|
|
39
40
|
};
|
|
40
41
|
};
|
|
41
42
|
};
|
|
43
|
+
export type ResponsiveNumberInputTokens = {
|
|
44
|
+
[key in keyof BreakpointType]: NumberInputTokensType;
|
|
45
|
+
};
|
|
42
46
|
declare const numberInputTokens: Readonly<NumberInputTokensType>;
|
|
43
|
-
export declare const getNumberInputTokens: (foundationTheme: FoundationTokenType) =>
|
|
47
|
+
export declare const getNumberInputTokens: (foundationTheme: FoundationTokenType) => ResponsiveNumberInputTokens;
|
|
44
48
|
export default numberInputTokens;
|
|
@@ -3,7 +3,7 @@ export declare enum NumberInputSize {
|
|
|
3
3
|
LARGE = "lg"
|
|
4
4
|
}
|
|
5
5
|
export type NumberInputProps = {
|
|
6
|
-
value: number;
|
|
6
|
+
value: number | undefined;
|
|
7
7
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
8
|
step?: number;
|
|
9
9
|
error?: boolean;
|
|
@@ -13,4 +13,6 @@ export type NumberInputProps = {
|
|
|
13
13
|
sublabel?: string;
|
|
14
14
|
helpIconHintText?: string;
|
|
15
15
|
hintText?: string;
|
|
16
|
-
|
|
16
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
17
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
18
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className' | 'value' | 'onBlur' | 'onFocus'>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
3
4
|
type TextAreaState = 'default' | 'hover' | 'focus' | 'error' | 'disabled';
|
|
4
5
|
export type TextAreaTokensType = {
|
|
5
6
|
fontFamily: CSSObject['fontFamily'];
|
|
@@ -22,6 +23,9 @@ export type TextAreaTokensType = {
|
|
|
22
23
|
[key in TextAreaState]: CSSObject['backgroundColor'];
|
|
23
24
|
};
|
|
24
25
|
};
|
|
26
|
+
export type ResponsiveTextAreaTokens = {
|
|
27
|
+
[key in keyof BreakpointType]: TextAreaTokensType;
|
|
28
|
+
};
|
|
25
29
|
export declare const textAreaTokens: TextAreaTokensType;
|
|
26
|
-
export declare const getTextAreaTokens: (foundationTokens: FoundationTokenType) =>
|
|
30
|
+
export declare const getTextAreaTokens: (foundationTokens: FoundationTokenType) => ResponsiveTextAreaTokens;
|
|
27
31
|
export default textAreaTokens;
|
|
@@ -19,4 +19,4 @@ export type TextAreaProps = {
|
|
|
19
19
|
errorMessage?: string;
|
|
20
20
|
resize?: 'none' | 'both' | 'horizontal' | 'vertical' | 'block' | 'inline';
|
|
21
21
|
wrap?: CSSObject['whiteSpace'];
|
|
22
|
-
} & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size' | 'style' | 'className'>;
|
|
22
|
+
} & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size' | 'style' | 'className' | 'onFocus' | 'onBlur'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TextInputProps } from './types';
|
|
2
|
-
declare const TextInput: ({ size, leftSlot, rightSlot, error, errorMessage, hintText, helpIconHintText, disabled, label, placeholder, sublabel, value, onChange, name, required, ...rest }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TextInput: ({ size, leftSlot, rightSlot, error, errorMessage, hintText, helpIconHintText, disabled, label, placeholder, sublabel, value, onChange, name, required, onBlur, onFocus, ...rest }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TextInput;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
3
3
|
import { TextInputSize, TextInputState } from './types';
|
|
4
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
4
5
|
export type TextInputTokensType = {
|
|
5
6
|
input: {
|
|
6
7
|
gap: CSSObject['gap'];
|
|
@@ -29,5 +30,8 @@ export type TextInputTokensType = {
|
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
32
|
declare const textInputTokens: Readonly<TextInputTokensType>;
|
|
32
|
-
export
|
|
33
|
+
export type ResponsiveTextInputTokens = {
|
|
34
|
+
[key in keyof BreakpointType]: TextInputTokensType;
|
|
35
|
+
};
|
|
36
|
+
export declare const getTextInputTokens: (foundationTheme: FoundationTokenType) => ResponsiveTextInputTokens;
|
|
33
37
|
export default textInputTokens;
|
|
@@ -21,4 +21,6 @@ export type TextInputProps = {
|
|
|
21
21
|
rightSlot?: React.ReactNode;
|
|
22
22
|
value: string;
|
|
23
23
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
-
|
|
24
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
25
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
26
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className' | 'onBlur' | 'onFocus'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UnitInputProps } from './types';
|
|
2
|
-
declare const UnitInput: ({ value, onChange, min, max, step, error, errorMessage, required, disabled, size, placeholder, sublabel, helpIconHintText, label, hintText, leftSlot, rightSlot, unit, unitPosition, name, ...rest }: UnitInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const UnitInput: ({ value, onChange, min, max, step, error, errorMessage, required, disabled, size, placeholder, sublabel, helpIconHintText, label, hintText, leftSlot, rightSlot, unit, unitPosition, name, onFocus, onBlur, ...rest }: UnitInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default UnitInput;
|
|
@@ -7,7 +7,7 @@ export declare enum UnitPosition {
|
|
|
7
7
|
RIGHT = "right"
|
|
8
8
|
}
|
|
9
9
|
export type UnitInputProps = {
|
|
10
|
-
value: number;
|
|
10
|
+
value: number | undefined;
|
|
11
11
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
12
|
step?: number;
|
|
13
13
|
error?: boolean;
|
|
@@ -22,4 +22,6 @@ export type UnitInputProps = {
|
|
|
22
22
|
rightSlot?: React.ReactNode;
|
|
23
23
|
unit: string;
|
|
24
24
|
unitPosition?: UnitPosition;
|
|
25
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
26
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
25
27
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className'>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { UnitInputSize } from './types';
|
|
3
3
|
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
4
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
4
5
|
declare enum UnitInputState {
|
|
5
6
|
DEFAULT = "default",
|
|
6
7
|
HOVER = "hover",
|
|
@@ -36,5 +37,8 @@ export type UnitInputTokensType = {
|
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
declare const unitInputTokens: UnitInputTokensType;
|
|
39
|
-
export
|
|
40
|
+
export type ResponsiveUnitInputTokens = {
|
|
41
|
+
[key in keyof BreakpointType]: UnitInputTokensType;
|
|
42
|
+
};
|
|
43
|
+
export declare const getUnitInputTokens: (foundationTheme: FoundationTokenType) => ResponsiveUnitInputTokens;
|
|
40
44
|
export default unitInputTokens;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MultiSelectTokensType } from './multiSelect.tokens';
|
|
3
|
+
import { MultiSelectMenuSize, MultiSelectSelectionTagType, MultiSelectVariant } from './types';
|
|
4
|
+
export type MultiSelectTriggerProps = {
|
|
5
|
+
selectedValues: string[];
|
|
6
|
+
slot: React.ReactNode;
|
|
7
|
+
variant: MultiSelectVariant;
|
|
8
|
+
size: MultiSelectMenuSize;
|
|
9
|
+
isSmallScreen: boolean;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
name: string;
|
|
12
|
+
label: string;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
selectionTagType: MultiSelectSelectionTagType;
|
|
16
|
+
valueLabelMap: Record<string, string>;
|
|
17
|
+
open: boolean;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
multiSelectTokens: MultiSelectTokensType;
|
|
20
|
+
};
|
|
21
|
+
declare const MultiSelectTrigger: ({ selectedValues, slot, variant, size, isSmallScreen, onChange, name, label, placeholder, required, selectionTagType, valueLabelMap, open, onClick, multiSelectTokens, }: MultiSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default MultiSelectTrigger;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { MultiSelectMenuSize, MultiSelectSelectionTagType, MultiSelectVariant } from './types';
|
|
3
3
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
5
|
type TriggerStates = 'open' | 'closed' | 'hover' | 'focus';
|
|
5
6
|
export type SingleSelectItemStates = 'default' | 'hover' | 'active' | 'focus' | 'focusVisible' | 'disabled' | 'selected';
|
|
6
7
|
export type MultiSelectTokensType = {
|
|
7
8
|
trigger: {
|
|
8
|
-
|
|
9
|
+
height: CSSObject['height'];
|
|
10
|
+
paddingX: {
|
|
11
|
+
[key in MultiSelectMenuSize]: CSSObject['padding'];
|
|
12
|
+
};
|
|
13
|
+
paddingY: {
|
|
9
14
|
[key in MultiSelectMenuSize]: CSSObject['padding'];
|
|
10
15
|
};
|
|
11
16
|
borderRadius: {
|
|
@@ -72,6 +77,9 @@ export type MultiSelectTokensType = {
|
|
|
72
77
|
};
|
|
73
78
|
};
|
|
74
79
|
};
|
|
80
|
+
export type ResponsiveMultiSelectTokens = {
|
|
81
|
+
[key in keyof BreakpointType]: MultiSelectTokensType;
|
|
82
|
+
};
|
|
75
83
|
export declare const multiSelectTokens: MultiSelectTokensType;
|
|
76
|
-
export declare const getMultiSelectTokens: (foundationToken: FoundationTokenType) =>
|
|
84
|
+
export declare const getMultiSelectTokens: (foundationToken: FoundationTokenType) => ResponsiveMultiSelectTokens;
|
|
77
85
|
export {};
|
|
@@ -13,6 +13,8 @@ type PrimitiveButtonProps = StateStyles & {
|
|
|
13
13
|
padding?: CSSObject['padding'];
|
|
14
14
|
paddingX?: CSSObject['padding'];
|
|
15
15
|
paddingY?: CSSObject['padding'];
|
|
16
|
+
paddingTop?: CSSObject['padding'];
|
|
17
|
+
paddingBottom?: CSSObject['padding'];
|
|
16
18
|
margin?: CSSObject['margin'];
|
|
17
19
|
marginX?: CSSObject['margin'];
|
|
18
20
|
marginY?: CSSObject['margin'];
|
|
@@ -73,6 +75,8 @@ declare const PrimitiveButton: React.ForwardRefExoticComponent<StateStyles & {
|
|
|
73
75
|
padding?: CSSObject["padding"];
|
|
74
76
|
paddingX?: CSSObject["padding"];
|
|
75
77
|
paddingY?: CSSObject["padding"];
|
|
78
|
+
paddingTop?: CSSObject["padding"];
|
|
79
|
+
paddingBottom?: CSSObject["padding"];
|
|
76
80
|
margin?: CSSObject["margin"];
|
|
77
81
|
marginX?: CSSObject["margin"];
|
|
78
82
|
marginY?: CSSObject["margin"];
|
|
@@ -12,6 +12,8 @@ type StateStyles = {
|
|
|
12
12
|
};
|
|
13
13
|
type PrimitiveInputProps = StateStyles & {
|
|
14
14
|
color?: CSSObject['color'];
|
|
15
|
+
fontSize?: CSSObject['fontSize'];
|
|
16
|
+
fontWeight?: CSSObject['fontWeight'];
|
|
15
17
|
position?: CSSObject['position'];
|
|
16
18
|
inset?: CSSObject['inset'];
|
|
17
19
|
top?: CSSObject['top'];
|
|
@@ -21,6 +21,11 @@ export type PrimitiveTextProps = {
|
|
|
21
21
|
name?: CSSObject['name'];
|
|
22
22
|
htmlFor?: CSSObject['htmlFor'];
|
|
23
23
|
textTransform?: CSSObject['textTransform'];
|
|
24
|
+
position?: CSSObject['position'];
|
|
25
|
+
top?: CSSObject['top'];
|
|
26
|
+
left?: CSSObject['left'];
|
|
27
|
+
bottom?: CSSObject['bottom'];
|
|
28
|
+
right?: CSSObject['right'];
|
|
24
29
|
};
|
|
25
30
|
export type TextProps = PrimitiveTextProps & Omit<React.HTMLAttributes<HTMLElement>, 'color'> & {
|
|
26
31
|
children: React.ReactNode;
|
|
@@ -82,6 +82,8 @@ type PrimitiveTextareaProps = StateStyles & {
|
|
|
82
82
|
placeholderStyles?: CSSObject;
|
|
83
83
|
resize?: CSSObject['resize'];
|
|
84
84
|
fontFamily?: CSSObject['fontFamily'];
|
|
85
|
+
fontSize?: CSSObject['fontSize'];
|
|
86
|
+
fontWeight?: CSSObject['fontWeight'];
|
|
85
87
|
};
|
|
86
88
|
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & PrimitiveTextareaProps;
|
|
87
89
|
declare const PrimitiveTextarea: React.FC<TextareaProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SelectMenuSize, SelectMenuVariant } from './types';
|
|
3
|
+
import { SingleSelectTokensType } from './singleSelect.tokens';
|
|
4
|
+
export type SingleSelectTriggerProps = {
|
|
5
|
+
size: SelectMenuSize;
|
|
6
|
+
selected: string;
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
valueLabelMap: Record<string, string>;
|
|
12
|
+
open: boolean;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
slot: React.ReactNode;
|
|
15
|
+
variant: SelectMenuVariant;
|
|
16
|
+
isSmallScreenWithLargeSize: boolean;
|
|
17
|
+
isItemSelected: boolean;
|
|
18
|
+
singleSelectTokens: SingleSelectTokensType;
|
|
19
|
+
};
|
|
20
|
+
declare const SingleSelectTrigger: ({ size, selected, label, name, placeholder, required, valueLabelMap, open, onClick, slot, variant, isSmallScreenWithLargeSize, isItemSelected, singleSelectTokens, }: SingleSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default SingleSelectTrigger;
|