@ecohouse/ui 0.1.4 → 0.1.5
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 +33 -13
- package/dist/index.cjs +805 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -10
- package/dist/index.d.ts +113 -10
- package/dist/index.js +802 -151
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.tsx +19 -71
- package/src/components/DatePicker/DatePicker.stories.tsx +172 -0
- package/src/components/DatePicker/DatePicker.tsx +628 -0
- package/src/components/DatePicker/index.ts +7 -0
- package/src/components/index.ts +8 -0
- package/src/icons/CalendarOutline/CalendarOutlineIcon.tsx +25 -0
- package/src/icons/CalendarOutline/CalendarOutlineIcon.web.tsx +31 -0
- package/src/icons/CalendarOutline/calendarOutlinePath.ts +3 -0
- package/src/icons/CalendarOutline/index.ts +1 -0
- package/src/icons/ChevronLeft/ChevronLeftIcon.tsx +21 -0
- package/src/icons/ChevronLeft/ChevronLeftIcon.web.tsx +27 -0
- package/src/icons/ChevronLeft/chevronLeftPath.ts +2 -0
- package/src/icons/ChevronLeft/index.ts +1 -0
- package/src/icons/index.ts +2 -0
- package/src/icons/registry.ts +17 -2
- package/src/index.ts +20 -1
- package/src/primitives/MenuItem/MenuItem.stories.tsx +98 -0
- package/src/primitives/MenuItem/MenuItem.tsx +138 -0
- package/src/primitives/MenuItem/index.ts +2 -0
- package/src/primitives/index.ts +2 -0
- package/src/theme/colors.ts +1 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/typography.ts +40 -0
- package/src/utils/dateUtils.ts +86 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
|
-
import { PressableProps, GestureResponderEvent, StyleProp, ViewStyle, View, TouchableOpacityProps,
|
|
4
|
+
import { PressableProps, GestureResponderEvent, StyleProp, ViewStyle, TextStyle, View, TouchableOpacityProps, ViewProps, TextInputProps, TextInput } from 'react-native';
|
|
5
5
|
|
|
6
|
-
interface
|
|
7
|
-
/**
|
|
8
|
-
key?: string;
|
|
9
|
-
/** Leading icon, e.g. `<CalendarIcon />` — pass it pre-colored. */
|
|
6
|
+
interface MenuItemProps extends Omit<PressableProps, "onPress" | "disabled" | "style" | "children" | "hitSlop"> {
|
|
7
|
+
/** Leading icon, e.g. `<CalendarIcon size={16} />` — pass it pre-colored. */
|
|
10
8
|
icon?: ReactNode;
|
|
11
9
|
label: string;
|
|
12
|
-
onPress:
|
|
10
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
13
11
|
disabled?: boolean;
|
|
14
12
|
/** Row background at rest. Defaults to transparent. */
|
|
15
13
|
backgroundColor?: string;
|
|
16
14
|
/** Row background on hover/press. Defaults to `colors.grey600`. */
|
|
17
15
|
hoverColor?: string;
|
|
16
|
+
style?: StyleProp<ViewStyle>;
|
|
17
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
18
|
+
className?: string;
|
|
19
|
+
hitSlop?: PressableProps["hitSlop"];
|
|
18
20
|
}
|
|
21
|
+
declare const MenuItem: react.ForwardRefExoticComponent<MenuItemProps & react.RefAttributes<View>>;
|
|
22
|
+
|
|
23
|
+
/** Data shape for an Avatar dropdown option — same fields as `MenuItem`. */
|
|
24
|
+
type AvatarMenuItem = Pick<MenuItemProps, "icon" | "label" | "disabled" | "backgroundColor" | "hoverColor"> & {
|
|
25
|
+
/** Stable identity for React keys; falls back to `label`. */
|
|
26
|
+
key?: string;
|
|
27
|
+
onPress: () => void;
|
|
28
|
+
};
|
|
19
29
|
interface AvatarProps extends Omit<PressableProps, "onPress" | "disabled" | "style" | "children" | "hitSlop"> {
|
|
20
30
|
/** Logged-in user's display name. */
|
|
21
31
|
name: string;
|
|
@@ -32,7 +42,7 @@ interface AvatarProps extends Omit<PressableProps, "onPress" | "disabled" | "sty
|
|
|
32
42
|
/**
|
|
33
43
|
* Account-menu options, supplied entirely by the consumer (icon, label,
|
|
34
44
|
* action, and per-item colors). When set, pressing the chip opens a
|
|
35
|
-
* dropdown listing them
|
|
45
|
+
* dropdown listing them via `MenuItem`.
|
|
36
46
|
*/
|
|
37
47
|
menuItems?: AvatarMenuItem[];
|
|
38
48
|
/** Controlled open state for the menu. */
|
|
@@ -81,6 +91,51 @@ interface CheckboxProps extends Omit<PressableProps, "onPress" | "disabled" | "s
|
|
|
81
91
|
}
|
|
82
92
|
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<View>>;
|
|
83
93
|
|
|
94
|
+
type DateRange = {
|
|
95
|
+
start: Date | null;
|
|
96
|
+
end: Date | null;
|
|
97
|
+
};
|
|
98
|
+
type DatePickerBaseProps = Omit<ViewProps, "style" | "children"> & {
|
|
99
|
+
placeholder?: string;
|
|
100
|
+
open?: boolean;
|
|
101
|
+
defaultOpen?: boolean;
|
|
102
|
+
onOpenChange?: (open: boolean) => void;
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* When true (default), the calendar closes after a complete selection —
|
|
106
|
+
* a single date, or both ends of a range. Set false to keep it open.
|
|
107
|
+
*/
|
|
108
|
+
closeOnSelect?: boolean;
|
|
109
|
+
minDate?: Date;
|
|
110
|
+
maxDate?: Date;
|
|
111
|
+
/** First visible month when the calendar opens; defaults to the selected value's month, else today. */
|
|
112
|
+
defaultVisibleMonth?: Date;
|
|
113
|
+
/** Monday-first full month names. Defaults to Armenian. */
|
|
114
|
+
monthNames?: string[];
|
|
115
|
+
/** Weekday abbreviations, ordered starting from `weekStartsOn`. Defaults to Armenian, Monday-first. */
|
|
116
|
+
weekdayLabels?: string[];
|
|
117
|
+
/** Formats a selected date for the trigger and day accessibility labels. Defaults to "DD.MM.YYYY". */
|
|
118
|
+
formatValue?: (date: Date) => string;
|
|
119
|
+
/** First day of the week column (0 = Sunday, 1 = Monday). Defaults to Monday. */
|
|
120
|
+
weekStartsOn?: 0 | 1;
|
|
121
|
+
style?: StyleProp<ViewStyle>;
|
|
122
|
+
className?: string;
|
|
123
|
+
};
|
|
124
|
+
type DatePickerSingleProps = DatePickerBaseProps & {
|
|
125
|
+
range?: false;
|
|
126
|
+
value?: Date | null;
|
|
127
|
+
defaultValue?: Date | null;
|
|
128
|
+
onValueChange?: (value: Date | null) => void;
|
|
129
|
+
};
|
|
130
|
+
type DatePickerRangeProps = DatePickerBaseProps & {
|
|
131
|
+
range: true;
|
|
132
|
+
value?: DateRange;
|
|
133
|
+
defaultValue?: DateRange;
|
|
134
|
+
onValueChange?: (value: DateRange) => void;
|
|
135
|
+
};
|
|
136
|
+
type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
|
|
137
|
+
declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<View>>;
|
|
138
|
+
|
|
84
139
|
type InputSize = "lg" | "sm";
|
|
85
140
|
interface InputProps extends Omit<TextInputProps, "style" | "editable"> {
|
|
86
141
|
label?: string;
|
|
@@ -213,6 +268,9 @@ declare function BuildingIcon({ size, color, strokeWidth }: IconProps): react.JS
|
|
|
213
268
|
/** Native — react-native-svg (peer dependency). */
|
|
214
269
|
declare function CalendarIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
215
270
|
|
|
271
|
+
/** Native — react-native-svg (peer dependency). */
|
|
272
|
+
declare function CalendarOutlineIcon({ size, color, strokeWidth, }: IconProps): react.JSX.Element;
|
|
273
|
+
|
|
216
274
|
declare function CameraIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
217
275
|
|
|
218
276
|
interface CheckIconProps {
|
|
@@ -233,6 +291,9 @@ interface ChevronDownIconProps {
|
|
|
233
291
|
/** Native — react-native-svg (peer dependency). */
|
|
234
292
|
declare function ChevronDownIcon({ size, color, strokeWidth, }: ChevronDownIconProps): react.JSX.Element;
|
|
235
293
|
|
|
294
|
+
/** Native — react-native-svg (peer dependency). */
|
|
295
|
+
declare function ChevronLeftIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
296
|
+
|
|
236
297
|
declare function ClockIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
237
298
|
|
|
238
299
|
declare function FacebookIcon({ size, color }: IconProps): react.JSX.Element;
|
|
@@ -299,10 +360,12 @@ declare const icons: {
|
|
|
299
360
|
readonly bell: typeof BellIcon;
|
|
300
361
|
readonly building: typeof BuildingIcon;
|
|
301
362
|
readonly calendar: typeof CalendarIcon;
|
|
363
|
+
readonly calendarOutline: typeof CalendarOutlineIcon;
|
|
302
364
|
readonly camera: typeof CameraIcon;
|
|
303
365
|
readonly check: typeof CheckIcon;
|
|
304
366
|
readonly checkBadge: typeof CheckBadgeIcon;
|
|
305
367
|
readonly chevronDown: typeof ChevronDownIcon;
|
|
368
|
+
readonly chevronLeft: typeof ChevronLeftIcon;
|
|
306
369
|
readonly clock: typeof ClockIcon;
|
|
307
370
|
readonly facebook: typeof FacebookIcon;
|
|
308
371
|
readonly heart: typeof HeartIcon;
|
|
@@ -325,8 +388,8 @@ declare const icons: {
|
|
|
325
388
|
type IconName = keyof typeof icons;
|
|
326
389
|
declare const iconNames: IconName[];
|
|
327
390
|
declare const iconGroups: {
|
|
328
|
-
readonly navigation: readonly ["arrowRight", "chevronDown", "home", "navigate"];
|
|
329
|
-
readonly actions: readonly ["show", "bell", "camera", "key", "check", "checkBadge", "search", "calendar", "heart"];
|
|
391
|
+
readonly navigation: readonly ["arrowRight", "chevronDown", "chevronLeft", "home", "navigate"];
|
|
392
|
+
readonly actions: readonly ["show", "bell", "camera", "key", "check", "checkBadge", "search", "calendar", "calendarOutline", "heart"];
|
|
330
393
|
readonly objects: readonly ["bag", "building", "clock", "user", "video"];
|
|
331
394
|
readonly communication: readonly ["mail", "phone"];
|
|
332
395
|
readonly social: readonly ["facebook", "instagram", "linkedin"];
|
|
@@ -367,6 +430,7 @@ declare const colors: {
|
|
|
367
430
|
readonly red: "#A63E3E";
|
|
368
431
|
readonly lightGrey: "#B7B7B7";
|
|
369
432
|
readonly primaryMuted: "#B464360F";
|
|
433
|
+
readonly primaryHover: "#B4643633";
|
|
370
434
|
readonly redMuted: "#A63E3E0F";
|
|
371
435
|
readonly redHover: "#A63E3E33";
|
|
372
436
|
readonly grey0: "#767676";
|
|
@@ -478,6 +542,45 @@ declare const avatarTypography: {
|
|
|
478
542
|
readonly letterSpacing: 0;
|
|
479
543
|
};
|
|
480
544
|
};
|
|
545
|
+
/**
|
|
546
|
+
* DatePicker typography — trigger field text plus the calendar-panel type
|
|
547
|
+
* (month heading, weekday header, day-cell numbers). No label/hint chrome —
|
|
548
|
+
* the Figma trigger is a standalone field. Figma didn't spec the month
|
|
549
|
+
* heading / day-cell number sizes, so those reuse the existing type scale
|
|
550
|
+
* for visual consistency with the rest of the kit.
|
|
551
|
+
*/
|
|
552
|
+
declare const datePickerTypography: {
|
|
553
|
+
readonly field: {
|
|
554
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
555
|
+
readonly fontSize: 12;
|
|
556
|
+
readonly fontWeight: "400";
|
|
557
|
+
readonly lineHeight: 12;
|
|
558
|
+
readonly letterSpacing: 0.36;
|
|
559
|
+
};
|
|
560
|
+
/** Calendar month/year heading — Bold, centered, White. */
|
|
561
|
+
readonly monthHeading: {
|
|
562
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
563
|
+
readonly fontSize: 14;
|
|
564
|
+
readonly fontWeight: "700";
|
|
565
|
+
readonly lineHeight: 14;
|
|
566
|
+
readonly letterSpacing: 0;
|
|
567
|
+
};
|
|
568
|
+
/** Weekday header (ԵՐ, ԵՔ, ...) — Regular, uppercase, centered, Grey/300. */
|
|
569
|
+
readonly weekday: {
|
|
570
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
571
|
+
readonly fontSize: 12;
|
|
572
|
+
readonly fontWeight: "400";
|
|
573
|
+
readonly lineHeight: 12;
|
|
574
|
+
readonly letterSpacing: 0;
|
|
575
|
+
};
|
|
576
|
+
readonly day: {
|
|
577
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
578
|
+
readonly fontSize: 14;
|
|
579
|
+
readonly fontWeight: "400";
|
|
580
|
+
readonly lineHeight: 14;
|
|
581
|
+
readonly letterSpacing: 0;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
481
584
|
/** Textarea label / field / hint typography — Medium/Regular 12–14, letter-spacing 3%. */
|
|
482
585
|
declare const textareaTypography: {
|
|
483
586
|
readonly label: {
|
|
@@ -503,4 +606,4 @@ declare const textareaTypography: {
|
|
|
503
606
|
};
|
|
504
607
|
};
|
|
505
608
|
|
|
506
|
-
export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BagIcon, BellIcon, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ClockIcon, FacebookIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, NavigateIcon, PhoneIcon, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, VideoIcon, avatarTypography, buttonTypography, colors, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, selectTypography, textareaTypography };
|
|
609
|
+
export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BagIcon, BellIcon, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockIcon, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuItem, type MenuItemProps, NavigateIcon, PhoneIcon, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, VideoIcon, avatarTypography, buttonTypography, colors, datePickerTypography, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, selectTypography, textareaTypography };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
|
-
import { PressableProps, GestureResponderEvent, StyleProp, ViewStyle, View, TouchableOpacityProps,
|
|
4
|
+
import { PressableProps, GestureResponderEvent, StyleProp, ViewStyle, TextStyle, View, TouchableOpacityProps, ViewProps, TextInputProps, TextInput } from 'react-native';
|
|
5
5
|
|
|
6
|
-
interface
|
|
7
|
-
/**
|
|
8
|
-
key?: string;
|
|
9
|
-
/** Leading icon, e.g. `<CalendarIcon />` — pass it pre-colored. */
|
|
6
|
+
interface MenuItemProps extends Omit<PressableProps, "onPress" | "disabled" | "style" | "children" | "hitSlop"> {
|
|
7
|
+
/** Leading icon, e.g. `<CalendarIcon size={16} />` — pass it pre-colored. */
|
|
10
8
|
icon?: ReactNode;
|
|
11
9
|
label: string;
|
|
12
|
-
onPress:
|
|
10
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
13
11
|
disabled?: boolean;
|
|
14
12
|
/** Row background at rest. Defaults to transparent. */
|
|
15
13
|
backgroundColor?: string;
|
|
16
14
|
/** Row background on hover/press. Defaults to `colors.grey600`. */
|
|
17
15
|
hoverColor?: string;
|
|
16
|
+
style?: StyleProp<ViewStyle>;
|
|
17
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
18
|
+
className?: string;
|
|
19
|
+
hitSlop?: PressableProps["hitSlop"];
|
|
18
20
|
}
|
|
21
|
+
declare const MenuItem: react.ForwardRefExoticComponent<MenuItemProps & react.RefAttributes<View>>;
|
|
22
|
+
|
|
23
|
+
/** Data shape for an Avatar dropdown option — same fields as `MenuItem`. */
|
|
24
|
+
type AvatarMenuItem = Pick<MenuItemProps, "icon" | "label" | "disabled" | "backgroundColor" | "hoverColor"> & {
|
|
25
|
+
/** Stable identity for React keys; falls back to `label`. */
|
|
26
|
+
key?: string;
|
|
27
|
+
onPress: () => void;
|
|
28
|
+
};
|
|
19
29
|
interface AvatarProps extends Omit<PressableProps, "onPress" | "disabled" | "style" | "children" | "hitSlop"> {
|
|
20
30
|
/** Logged-in user's display name. */
|
|
21
31
|
name: string;
|
|
@@ -32,7 +42,7 @@ interface AvatarProps extends Omit<PressableProps, "onPress" | "disabled" | "sty
|
|
|
32
42
|
/**
|
|
33
43
|
* Account-menu options, supplied entirely by the consumer (icon, label,
|
|
34
44
|
* action, and per-item colors). When set, pressing the chip opens a
|
|
35
|
-
* dropdown listing them
|
|
45
|
+
* dropdown listing them via `MenuItem`.
|
|
36
46
|
*/
|
|
37
47
|
menuItems?: AvatarMenuItem[];
|
|
38
48
|
/** Controlled open state for the menu. */
|
|
@@ -81,6 +91,51 @@ interface CheckboxProps extends Omit<PressableProps, "onPress" | "disabled" | "s
|
|
|
81
91
|
}
|
|
82
92
|
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<View>>;
|
|
83
93
|
|
|
94
|
+
type DateRange = {
|
|
95
|
+
start: Date | null;
|
|
96
|
+
end: Date | null;
|
|
97
|
+
};
|
|
98
|
+
type DatePickerBaseProps = Omit<ViewProps, "style" | "children"> & {
|
|
99
|
+
placeholder?: string;
|
|
100
|
+
open?: boolean;
|
|
101
|
+
defaultOpen?: boolean;
|
|
102
|
+
onOpenChange?: (open: boolean) => void;
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* When true (default), the calendar closes after a complete selection —
|
|
106
|
+
* a single date, or both ends of a range. Set false to keep it open.
|
|
107
|
+
*/
|
|
108
|
+
closeOnSelect?: boolean;
|
|
109
|
+
minDate?: Date;
|
|
110
|
+
maxDate?: Date;
|
|
111
|
+
/** First visible month when the calendar opens; defaults to the selected value's month, else today. */
|
|
112
|
+
defaultVisibleMonth?: Date;
|
|
113
|
+
/** Monday-first full month names. Defaults to Armenian. */
|
|
114
|
+
monthNames?: string[];
|
|
115
|
+
/** Weekday abbreviations, ordered starting from `weekStartsOn`. Defaults to Armenian, Monday-first. */
|
|
116
|
+
weekdayLabels?: string[];
|
|
117
|
+
/** Formats a selected date for the trigger and day accessibility labels. Defaults to "DD.MM.YYYY". */
|
|
118
|
+
formatValue?: (date: Date) => string;
|
|
119
|
+
/** First day of the week column (0 = Sunday, 1 = Monday). Defaults to Monday. */
|
|
120
|
+
weekStartsOn?: 0 | 1;
|
|
121
|
+
style?: StyleProp<ViewStyle>;
|
|
122
|
+
className?: string;
|
|
123
|
+
};
|
|
124
|
+
type DatePickerSingleProps = DatePickerBaseProps & {
|
|
125
|
+
range?: false;
|
|
126
|
+
value?: Date | null;
|
|
127
|
+
defaultValue?: Date | null;
|
|
128
|
+
onValueChange?: (value: Date | null) => void;
|
|
129
|
+
};
|
|
130
|
+
type DatePickerRangeProps = DatePickerBaseProps & {
|
|
131
|
+
range: true;
|
|
132
|
+
value?: DateRange;
|
|
133
|
+
defaultValue?: DateRange;
|
|
134
|
+
onValueChange?: (value: DateRange) => void;
|
|
135
|
+
};
|
|
136
|
+
type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
|
|
137
|
+
declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<View>>;
|
|
138
|
+
|
|
84
139
|
type InputSize = "lg" | "sm";
|
|
85
140
|
interface InputProps extends Omit<TextInputProps, "style" | "editable"> {
|
|
86
141
|
label?: string;
|
|
@@ -213,6 +268,9 @@ declare function BuildingIcon({ size, color, strokeWidth }: IconProps): react.JS
|
|
|
213
268
|
/** Native — react-native-svg (peer dependency). */
|
|
214
269
|
declare function CalendarIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
215
270
|
|
|
271
|
+
/** Native — react-native-svg (peer dependency). */
|
|
272
|
+
declare function CalendarOutlineIcon({ size, color, strokeWidth, }: IconProps): react.JSX.Element;
|
|
273
|
+
|
|
216
274
|
declare function CameraIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
217
275
|
|
|
218
276
|
interface CheckIconProps {
|
|
@@ -233,6 +291,9 @@ interface ChevronDownIconProps {
|
|
|
233
291
|
/** Native — react-native-svg (peer dependency). */
|
|
234
292
|
declare function ChevronDownIcon({ size, color, strokeWidth, }: ChevronDownIconProps): react.JSX.Element;
|
|
235
293
|
|
|
294
|
+
/** Native — react-native-svg (peer dependency). */
|
|
295
|
+
declare function ChevronLeftIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
296
|
+
|
|
236
297
|
declare function ClockIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
|
|
237
298
|
|
|
238
299
|
declare function FacebookIcon({ size, color }: IconProps): react.JSX.Element;
|
|
@@ -299,10 +360,12 @@ declare const icons: {
|
|
|
299
360
|
readonly bell: typeof BellIcon;
|
|
300
361
|
readonly building: typeof BuildingIcon;
|
|
301
362
|
readonly calendar: typeof CalendarIcon;
|
|
363
|
+
readonly calendarOutline: typeof CalendarOutlineIcon;
|
|
302
364
|
readonly camera: typeof CameraIcon;
|
|
303
365
|
readonly check: typeof CheckIcon;
|
|
304
366
|
readonly checkBadge: typeof CheckBadgeIcon;
|
|
305
367
|
readonly chevronDown: typeof ChevronDownIcon;
|
|
368
|
+
readonly chevronLeft: typeof ChevronLeftIcon;
|
|
306
369
|
readonly clock: typeof ClockIcon;
|
|
307
370
|
readonly facebook: typeof FacebookIcon;
|
|
308
371
|
readonly heart: typeof HeartIcon;
|
|
@@ -325,8 +388,8 @@ declare const icons: {
|
|
|
325
388
|
type IconName = keyof typeof icons;
|
|
326
389
|
declare const iconNames: IconName[];
|
|
327
390
|
declare const iconGroups: {
|
|
328
|
-
readonly navigation: readonly ["arrowRight", "chevronDown", "home", "navigate"];
|
|
329
|
-
readonly actions: readonly ["show", "bell", "camera", "key", "check", "checkBadge", "search", "calendar", "heart"];
|
|
391
|
+
readonly navigation: readonly ["arrowRight", "chevronDown", "chevronLeft", "home", "navigate"];
|
|
392
|
+
readonly actions: readonly ["show", "bell", "camera", "key", "check", "checkBadge", "search", "calendar", "calendarOutline", "heart"];
|
|
330
393
|
readonly objects: readonly ["bag", "building", "clock", "user", "video"];
|
|
331
394
|
readonly communication: readonly ["mail", "phone"];
|
|
332
395
|
readonly social: readonly ["facebook", "instagram", "linkedin"];
|
|
@@ -367,6 +430,7 @@ declare const colors: {
|
|
|
367
430
|
readonly red: "#A63E3E";
|
|
368
431
|
readonly lightGrey: "#B7B7B7";
|
|
369
432
|
readonly primaryMuted: "#B464360F";
|
|
433
|
+
readonly primaryHover: "#B4643633";
|
|
370
434
|
readonly redMuted: "#A63E3E0F";
|
|
371
435
|
readonly redHover: "#A63E3E33";
|
|
372
436
|
readonly grey0: "#767676";
|
|
@@ -478,6 +542,45 @@ declare const avatarTypography: {
|
|
|
478
542
|
readonly letterSpacing: 0;
|
|
479
543
|
};
|
|
480
544
|
};
|
|
545
|
+
/**
|
|
546
|
+
* DatePicker typography — trigger field text plus the calendar-panel type
|
|
547
|
+
* (month heading, weekday header, day-cell numbers). No label/hint chrome —
|
|
548
|
+
* the Figma trigger is a standalone field. Figma didn't spec the month
|
|
549
|
+
* heading / day-cell number sizes, so those reuse the existing type scale
|
|
550
|
+
* for visual consistency with the rest of the kit.
|
|
551
|
+
*/
|
|
552
|
+
declare const datePickerTypography: {
|
|
553
|
+
readonly field: {
|
|
554
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
555
|
+
readonly fontSize: 12;
|
|
556
|
+
readonly fontWeight: "400";
|
|
557
|
+
readonly lineHeight: 12;
|
|
558
|
+
readonly letterSpacing: 0.36;
|
|
559
|
+
};
|
|
560
|
+
/** Calendar month/year heading — Bold, centered, White. */
|
|
561
|
+
readonly monthHeading: {
|
|
562
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
563
|
+
readonly fontSize: 14;
|
|
564
|
+
readonly fontWeight: "700";
|
|
565
|
+
readonly lineHeight: 14;
|
|
566
|
+
readonly letterSpacing: 0;
|
|
567
|
+
};
|
|
568
|
+
/** Weekday header (ԵՐ, ԵՔ, ...) — Regular, uppercase, centered, Grey/300. */
|
|
569
|
+
readonly weekday: {
|
|
570
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
571
|
+
readonly fontSize: 12;
|
|
572
|
+
readonly fontWeight: "400";
|
|
573
|
+
readonly lineHeight: 12;
|
|
574
|
+
readonly letterSpacing: 0;
|
|
575
|
+
};
|
|
576
|
+
readonly day: {
|
|
577
|
+
readonly fontFamily: "Noto Sans Armenian";
|
|
578
|
+
readonly fontSize: 14;
|
|
579
|
+
readonly fontWeight: "400";
|
|
580
|
+
readonly lineHeight: 14;
|
|
581
|
+
readonly letterSpacing: 0;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
481
584
|
/** Textarea label / field / hint typography — Medium/Regular 12–14, letter-spacing 3%. */
|
|
482
585
|
declare const textareaTypography: {
|
|
483
586
|
readonly label: {
|
|
@@ -503,4 +606,4 @@ declare const textareaTypography: {
|
|
|
503
606
|
};
|
|
504
607
|
};
|
|
505
608
|
|
|
506
|
-
export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BagIcon, BellIcon, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ClockIcon, FacebookIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, NavigateIcon, PhoneIcon, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, VideoIcon, avatarTypography, buttonTypography, colors, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, selectTypography, textareaTypography };
|
|
609
|
+
export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BagIcon, BellIcon, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockIcon, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuItem, type MenuItemProps, NavigateIcon, PhoneIcon, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, VideoIcon, avatarTypography, buttonTypography, colors, datePickerTypography, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, selectTypography, textareaTypography };
|