@ama-pt/agora-design-system 1.3.0 → 2.1.0
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/artifacts/dist/index.mjs +5720 -6694
- package/artifacts/dist/index.mjs.map +1 -1
- package/artifacts/dist/index.umd.js +2 -2
- package/artifacts/dist/index.umd.js.map +1 -1
- package/artifacts/dist/style.css +1 -0
- package/artifacts/dist/tailwind.css +40812 -0
- package/artifacts/dist/types/components/button-group/button-group.d.ts +4 -0
- package/artifacts/dist/types/components/cards/card-single/card-single.d.ts +1 -1
- package/artifacts/dist/types/components/dropdown/dropdown.d.ts +1 -1
- package/artifacts/dist/types/components/footer/federated-footer/federated-footer.d.ts +16 -4
- package/artifacts/dist/types/components/footer/public-footer/public-footer-main-plus-card-links.d.ts +3 -0
- package/artifacts/dist/types/components/footer/public-footer/public-footer.d.ts +17 -5
- package/artifacts/dist/types/components/footer/shared-components/footer-caption-partners.d.ts +1 -0
- package/artifacts/dist/types/components/footer/shared-components/footer-social-useful-copyright.d.ts +2 -0
- package/artifacts/dist/types/components/header/general-bar/authenticated/authenticated-header.d.ts +5 -0
- package/artifacts/dist/types/components/header/header.d.ts +28 -67
- package/artifacts/dist/types/components/header/index.d.ts +59 -5
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/header-data-context.d.ts +14 -14
- package/artifacts/dist/types/components/header/internals/context/data-context/header-data-controller.d.ts +3 -0
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/areas-utils.d.ts +3 -3
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/authenticated-utils.d.ts +6 -6
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/brand-utils.d.ts +2 -2
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/general-utils.d.ts +2 -2
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/languages-utils.d.ts +4 -4
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/navigation-utils.d.ts +5 -5
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/search-utils.d.ts +6 -6
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/data-context/utils/unauthenticated-utils.d.ts +4 -4
- package/artifacts/dist/types/components/header/internals/context/external-context/header-external-controller.d.ts +4 -0
- package/artifacts/dist/types/components/{header-v2 → header}/internals/context/menu-context/header-menu-context.d.ts +3 -3
- package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/areas/internal-area.d.ts +1 -1
- package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/authenticated/internal-authenticated.d.ts +3 -3
- package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/languages/internal-languages-layout.d.ts +1 -1
- package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/search/internal-custom-search-layout.d.ts +1 -1
- package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/search/internal-search-layout.d.ts +1 -1
- package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/unauthenticated/internal-unauthenticated-layout.d.ts +1 -1
- package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-burger/internal-navigation-burger-layout.d.ts +1 -1
- package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-list/internal-navigation-link-layout.d.ts +3 -3
- package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-modal/internal-modal-content.d.ts +2 -2
- package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-modal/internal-navigation-modal-layout.d.ts +1 -1
- package/artifacts/dist/types/components/index.d.ts +1 -2
- package/artifacts/dist/types/components/input-time/contexts/time-input-state.context.d.ts +32 -0
- package/artifacts/dist/types/components/input-time/index.d.ts +2 -0
- package/artifacts/dist/types/components/input-time/input-time.d.ts +78 -0
- package/artifacts/dist/types/components/input-time/time-picker-dropdown-body/time-picker-dropdown-body.d.ts +2 -0
- package/artifacts/dist/types/components/input-time/time-picker-dropdown-footer/time-picker-dropdown-footer.d.ts +5 -0
- package/artifacts/dist/types/components/input-time/time-picker-dropdown.d.ts +13 -0
- package/artifacts/dist/types/components/input-time/time-text/time-text.d.ts +8 -0
- package/artifacts/dist/types/components/input-time/utils/format-time.d.ts +24 -0
- package/artifacts/dist/types/components/modal-dialog/modal-config.model.d.ts +9 -1
- package/artifacts/dist/types/components/modal-dialog/modal-context.d.ts +2 -2
- package/artifacts/dist/types/components/ratings/index.d.ts +0 -1
- package/artifacts/dist/types/models/index.d.ts +1 -0
- package/artifacts/dist/types/models/time-period-type.d.ts +1 -0
- package/package.json +23 -23
- package/artifacts/dist/index.css +0 -1
- package/artifacts/dist/types/components/header/models/BackdropRef.d.ts +0 -5
- package/artifacts/dist/types/components/header/models/DrawerContentProps.d.ts +0 -7
- package/artifacts/dist/types/components/header/models/DrawerFooterProps.d.ts +0 -4
- package/artifacts/dist/types/components/header/models/DrawerMenuItemsProps.d.ts +0 -7
- package/artifacts/dist/types/components/header/models/DrawerMenuProps.d.ts +0 -5
- package/artifacts/dist/types/components/header/models/HeaderNavigationType.d.ts +0 -1
- package/artifacts/dist/types/components/header/models/MenuItemGeneralOptionsProps.d.ts +0 -6
- package/artifacts/dist/types/components/header/models/MenuProps.d.ts +0 -10
- package/artifacts/dist/types/components/header/models/SearchContentListLinkProps.d.ts +0 -6
- package/artifacts/dist/types/components/header/models/SubmenuAlignmentType.d.ts +0 -1
- package/artifacts/dist/types/components/header/models/SubmenuItemProps.d.ts +0 -24
- package/artifacts/dist/types/components/header/models/SubmenuSearchContentProps.d.ts +0 -12
- package/artifacts/dist/types/components/header/models/SubmenuType.d.ts +0 -1
- package/artifacts/dist/types/components/header/models/index.d.ts +0 -13
- package/artifacts/dist/types/components/header/shared-components/header-burger-navigation/header-burger-navigation.d.ts +0 -5
- package/artifacts/dist/types/components/header/shared-components/header-burger-navigation/header-burger-primary-navigation.d.ts +0 -15
- package/artifacts/dist/types/components/header/shared-components/header-burger-navigation/header-burger-secondary-navigation.d.ts +0 -17
- package/artifacts/dist/types/components/header/shared-components/header-general-options/header-general-options.d.ts +0 -37
- package/artifacts/dist/types/components/header/shared-components/header-menu-item-options/header-menu-item-options-links.d.ts +0 -7
- package/artifacts/dist/types/components/header/shared-components/header-menu-item-options/header-menu-item-options-search.d.ts +0 -3
- package/artifacts/dist/types/components/header/shared-components/header-menu-item-options/header-menu-item-options.d.ts +0 -20
- package/artifacts/dist/types/components/header/shared-components/header-navigation/header-navigation.d.ts +0 -38
- package/artifacts/dist/types/components/header/utils/close-other-menu.d.ts +0 -1
- package/artifacts/dist/types/components/header/utils/handle-click-menu-item.d.ts +0 -4
- package/artifacts/dist/types/components/header-v2/general-bar/authenticated/authenticated-header.d.ts +0 -5
- package/artifacts/dist/types/components/header-v2/header-v2.d.ts +0 -30
- package/artifacts/dist/types/components/header-v2/index.d.ts +0 -58
- package/artifacts/dist/types/components/header-v2/internals/context/data-context/header-data-controller.d.ts +0 -3
- package/artifacts/dist/types/components/header-v2/internals/context/external-context/header-external-controller.d.ts +0 -4
- package/artifacts/dist/types/components/menu-item/index.d.ts +0 -2
- package/artifacts/dist/types/components/menu-item/menu-item.d.ts +0 -54
- package/artifacts/dist/types/components/ratings/rating-stars/index.d.ts +0 -2
- package/artifacts/dist/types/components/ratings/rating-stars/rating-stars.d.ts +0 -66
- /package/artifacts/dist/types/components/{header-v2 → header}/brand/brand.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/brand/institutional.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/brand/logo.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/areas/area.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/areas/areas.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/authenticated/authenticated-body-link.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/authenticated/authenticated-body.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/authenticated/authenticated-footer-action.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/authenticated/authenticated-footer.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/authenticated/authenticated.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/general-bar.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/languages/language.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/languages/languages.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/custom-search.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/default-search.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/search-input-container.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/search-related-link.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/search-related-links-title.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/search-related-links.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/search-title.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/search/search.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/unauthenticated/unauthenticated-link.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/general-bar/unauthenticated/unauthenticated.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/context/menu-context/header-menu-controller.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/context/menu-context/menu-type.enum.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/areas/internal-areas.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/authenticated/Internal-authenticated-drawer.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/authenticated/internal-authenticated-drawer-body.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/authenticated/internal-authenticated-drawer-footer.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/authenticated/internal-authenticated-drawer-header.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/internal-general-bar.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/languages/internal-language.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/languages/internal-languages.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/search/internal-search.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/general-bar/unauthenticated/internal-unauthenticated.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/internal-header.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/internal-navigation-bar.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/logo/internal-logo.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-burger/internal-navigation-burger-panel.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-burger/internal-navigation-burger.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-list/internal-navigation-list.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-modal/internal-modal-navbar.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/navigation-bar/navigation-modal/internal-navigation-modal.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/custom-header-link/custom-header-link.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/custom-modal/custom-modal-context.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/custom-modal/custom-modal-dialog.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/custom-modal/custom-modal-provider.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/hooks/use-scrolling.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/institutional/internal-institutional.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/modal-menu/modal-menu.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/panel-menu/layout.interface.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/internals/shared/panel-menu/panel-menu.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/navigation-bar/navigation-bar.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/navigation-bar/navigation-link.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/navigation-bar/navigation-root.d.ts +0 -0
- /package/artifacts/dist/types/components/{header-v2 → header}/navigation-bar/related-navigation-link.d.ts +0 -0
|
@@ -17,7 +17,6 @@ export * from './feedback';
|
|
|
17
17
|
export * from './footer';
|
|
18
18
|
export * from './glossary-letters';
|
|
19
19
|
export * from './header';
|
|
20
|
-
export * from './header-v2';
|
|
21
20
|
export * from './icon';
|
|
22
21
|
export * from './input-date';
|
|
23
22
|
export * from './input-email-bar';
|
|
@@ -30,10 +29,10 @@ export * from './input-search-bar';
|
|
|
30
29
|
export * from './input-select';
|
|
31
30
|
export * from './input-text';
|
|
32
31
|
export * from './input-textarea';
|
|
32
|
+
export * from './input-time';
|
|
33
33
|
export * from './link-wrapper';
|
|
34
34
|
export * from './list';
|
|
35
35
|
export * from './loader-dialog';
|
|
36
|
-
export * from './menu-item';
|
|
37
36
|
export * from './modal-dialog';
|
|
38
37
|
export * from './pill';
|
|
39
38
|
export * from './popup-dialog';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { Dispatch, FC, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
import { TimePeriod } from '../../../models';
|
|
3
|
+
export interface Labels {
|
|
4
|
+
cancelLabel: string;
|
|
5
|
+
cancelAriaLabel?: string;
|
|
6
|
+
okLabel: string;
|
|
7
|
+
okAriaLabel?: string;
|
|
8
|
+
timepickerMessageLabel?: string;
|
|
9
|
+
timepickerMessageAriaLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
interface TimePickerStateContextInitialValuesType {
|
|
12
|
+
selectedTime: string;
|
|
13
|
+
cancel: (selectedTime: string) => void;
|
|
14
|
+
labels: Labels;
|
|
15
|
+
}
|
|
16
|
+
interface TimePickerStateContextType extends TimePickerStateContextInitialValuesType {
|
|
17
|
+
selectedHour: string;
|
|
18
|
+
setSelectedHour: Dispatch<SetStateAction<string>>;
|
|
19
|
+
selectedMinute: string;
|
|
20
|
+
setSelectedMinute: Dispatch<SetStateAction<string>>;
|
|
21
|
+
selectedPeriod: TimePeriod;
|
|
22
|
+
setSelectedPeriod: Dispatch<SetStateAction<TimePeriod>>;
|
|
23
|
+
setSelectedTime: Dispatch<SetStateAction<string>>;
|
|
24
|
+
}
|
|
25
|
+
export declare const TimeInputContext: React.Context<TimePickerStateContextType | undefined>;
|
|
26
|
+
export interface TimePickerStateProviderProps {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
initialValues: TimePickerStateContextInitialValuesType;
|
|
29
|
+
}
|
|
30
|
+
export declare const TimeInputContextProvider: FC<TimePickerStateProviderProps>;
|
|
31
|
+
export declare const useTimeInputContext: () => TimePickerStateContextType;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import './input-time.scss';
|
|
3
|
+
import { BooleanProp, FeedbackState } from '../../models';
|
|
4
|
+
export interface InputTimeProps extends ComponentPropsWithRef<'input'> {
|
|
5
|
+
/**
|
|
6
|
+
* Input label text.
|
|
7
|
+
*/
|
|
8
|
+
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Show or hide input label.
|
|
11
|
+
*/
|
|
12
|
+
hideLabel?: BooleanProp;
|
|
13
|
+
/**
|
|
14
|
+
* Sets the input in a error state. This also affects the feedback state.
|
|
15
|
+
*/
|
|
16
|
+
hasError?: BooleanProp;
|
|
17
|
+
/**
|
|
18
|
+
* Show or hide the feedback status text.
|
|
19
|
+
*/
|
|
20
|
+
hasFeedback?: BooleanProp;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the state of the feedback text. This param will change the feedback icon and dye it.
|
|
23
|
+
*/
|
|
24
|
+
feedbackState?: FeedbackState;
|
|
25
|
+
/**
|
|
26
|
+
* Feedback text displayed below input.
|
|
27
|
+
*/
|
|
28
|
+
feedbackText?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Show or hide the leading icon.
|
|
31
|
+
*/
|
|
32
|
+
hasIcon?: BooleanProp;
|
|
33
|
+
/**
|
|
34
|
+
* Name of the icon leading icon to be displayed.
|
|
35
|
+
*/
|
|
36
|
+
icon?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The placeholder to apply in the input minute part
|
|
39
|
+
*/
|
|
40
|
+
minuteInputPlaceholder?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The placeholder to apply in the input hour part
|
|
43
|
+
*/
|
|
44
|
+
hourInputPlaceholder?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Accessible text to apply to the trailing clock icon.
|
|
47
|
+
*/
|
|
48
|
+
clockIconAriaLabel: string;
|
|
49
|
+
/**
|
|
50
|
+
* Label for the timepicker cancel button.
|
|
51
|
+
*/
|
|
52
|
+
cancelLabel: string;
|
|
53
|
+
/**
|
|
54
|
+
* Accessible text for the timepicker cancel button.
|
|
55
|
+
*/
|
|
56
|
+
cancelAriaLabel?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Label for the timepicker ok button.
|
|
59
|
+
*/
|
|
60
|
+
okLabel: string;
|
|
61
|
+
/**
|
|
62
|
+
* Accessible text for the timepicker ok button.
|
|
63
|
+
*/
|
|
64
|
+
okAriaLabel?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Show or hide the timepicker footer message.
|
|
67
|
+
*/
|
|
68
|
+
hasTimepickerMessage?: BooleanProp;
|
|
69
|
+
/**
|
|
70
|
+
* Label for the timepicker footer message.
|
|
71
|
+
*/
|
|
72
|
+
timepickerMessageLabel?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Accessible text for the timepicker footer message.
|
|
75
|
+
*/
|
|
76
|
+
timepickerMessageAriaLabel?: string;
|
|
77
|
+
}
|
|
78
|
+
export declare const InputTime: React.ForwardRefExoticComponent<Omit<InputTimeProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Labels } from './contexts/time-input-state.context';
|
|
3
|
+
import { BooleanProp } from '../../models';
|
|
4
|
+
export interface TimePickerDropdownProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
setInputTextValue: (selectedTime: string) => void;
|
|
7
|
+
onChange: (selectedTime: string) => void;
|
|
8
|
+
onCancel: (selectedTime: string) => void;
|
|
9
|
+
hasTimepickerMessage?: BooleanProp;
|
|
10
|
+
textCurrentValue: string;
|
|
11
|
+
labels: Labels;
|
|
12
|
+
}
|
|
13
|
+
export declare const TimePickerDropdown: FC<TimePickerDropdownProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ComponentPropsWithRef, ForwardRefRenderFunction } from 'react';
|
|
2
|
+
import './time-text.scss';
|
|
3
|
+
export interface TimeTextProps extends ComponentPropsWithRef<'input'> {
|
|
4
|
+
hourInputPlaceholder?: string;
|
|
5
|
+
minuteInputPlaceholder?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const InnerComponent: ForwardRefRenderFunction<HTMLInputElement, TimeTextProps>;
|
|
8
|
+
export declare const TimeText: React.ForwardRefExoticComponent<Omit<TimeTextProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TimePeriod } from '../../../models';
|
|
2
|
+
export declare const FULL_TIME_TEXT_REGEX: RegExp;
|
|
3
|
+
export declare const MIN_HOUR = 1;
|
|
4
|
+
export declare const MAX_HOUR = 12;
|
|
5
|
+
export declare const MIN_MINUTE = 0;
|
|
6
|
+
export declare const MAX_MINUTE = 59;
|
|
7
|
+
export declare const timePeriod: {
|
|
8
|
+
am: string;
|
|
9
|
+
pm: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const startTime: {
|
|
12
|
+
hour: string;
|
|
13
|
+
minute: string;
|
|
14
|
+
period: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const formatHour: (hour: number | string) => string;
|
|
17
|
+
export declare const formatMinute: (minute: number | string) => string;
|
|
18
|
+
export declare const formatFullTime: (selectedHour: number | string, selectedMinute: number | string, selectedPeriod: TimePeriod) => string;
|
|
19
|
+
export declare const parseFullTime: (fullTimeText: string) => {
|
|
20
|
+
selectedHour: string;
|
|
21
|
+
selectedMinute: string;
|
|
22
|
+
selectedPeriod: TimePeriod;
|
|
23
|
+
};
|
|
24
|
+
export declare const isTimeTextValid: (timeText: string | number | undefined) => boolean;
|
|
@@ -6,7 +6,15 @@ export interface ModalConfiguration extends Omit<ComponentPropsWithoutRef<'div'>
|
|
|
6
6
|
*/
|
|
7
7
|
closeButtonLabel: string;
|
|
8
8
|
/**
|
|
9
|
-
* Render
|
|
9
|
+
* Render modal with dark mode styles.
|
|
10
10
|
*/
|
|
11
11
|
darkMode?: BooleanProp;
|
|
12
|
+
/**
|
|
13
|
+
* Callback to run after modal is closed.
|
|
14
|
+
*/
|
|
15
|
+
onHide?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Callback to run after modal is opened.
|
|
18
|
+
*/
|
|
19
|
+
onShow?: () => void;
|
|
12
20
|
}
|
|
@@ -3,13 +3,13 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { ModalConfiguration } from './modal-config.model';
|
|
4
4
|
export interface ModalContextProps {
|
|
5
5
|
/**
|
|
6
|
-
* The visible
|
|
6
|
+
* The visible modal element. If not visible the value is null.
|
|
7
7
|
*/
|
|
8
8
|
current: DialogElement | null;
|
|
9
9
|
/**
|
|
10
10
|
* Tells if a modal is visible or not.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
isVisible: () => boolean;
|
|
13
13
|
/**
|
|
14
14
|
* Shows a new modal with the configurations provided.
|
|
15
15
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TimePeriod = 'am' | 'pm';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-pt/agora-design-system",
|
|
3
3
|
"description": "Ágora Design system",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"main": "artifacts/dist/index.mjs",
|
|
6
6
|
"module": "artifacts/dist/index.umd.js",
|
|
7
7
|
"files": [
|
|
@@ -30,28 +30,28 @@
|
|
|
30
30
|
"@babel/preset-env": "^7.22.10",
|
|
31
31
|
"@babel/preset-react": "^7.22.5",
|
|
32
32
|
"@babel/preset-typescript": "^7.22.5",
|
|
33
|
-
"@mdx-js/react": "^
|
|
33
|
+
"@mdx-js/react": "^3.1.0",
|
|
34
34
|
"@playwright/test": "^1.39.0",
|
|
35
|
-
"@storybook/addon-a11y": "^8.4.
|
|
36
|
-
"@storybook/addon-actions": "^8.4.
|
|
37
|
-
"@storybook/addon-docs": "^8.4.
|
|
38
|
-
"@storybook/addon-essentials": "^8.4.
|
|
39
|
-
"@storybook/addon-interactions": "^8.4.
|
|
40
|
-
"@storybook/addon-links": "^8.4.
|
|
41
|
-
"@storybook/addon-storysource": "^8.4.
|
|
42
|
-
"@storybook/blocks": "^8.4.
|
|
35
|
+
"@storybook/addon-a11y": "^8.4.7",
|
|
36
|
+
"@storybook/addon-actions": "^8.4.7",
|
|
37
|
+
"@storybook/addon-docs": "^8.4.7",
|
|
38
|
+
"@storybook/addon-essentials": "^8.4.7",
|
|
39
|
+
"@storybook/addon-interactions": "^8.4.7",
|
|
40
|
+
"@storybook/addon-links": "^8.4.7",
|
|
41
|
+
"@storybook/addon-storysource": "^8.4.7",
|
|
42
|
+
"@storybook/blocks": "^8.4.7",
|
|
43
43
|
"@storybook/mdx2-csf": "^1.1.0",
|
|
44
44
|
"@storybook/preset-scss": "^1.0.3",
|
|
45
|
-
"@storybook/react": "^8.4.
|
|
46
|
-
"@storybook/react-vite": "^8.4.
|
|
47
|
-
"@storybook/test": "^8.4.
|
|
48
|
-
"@storybook/theming": "^8.4.
|
|
49
|
-
"@storybook/types": "^8.4.
|
|
45
|
+
"@storybook/react": "^8.4.7",
|
|
46
|
+
"@storybook/react-vite": "^8.4.7",
|
|
47
|
+
"@storybook/test": "^8.4.7",
|
|
48
|
+
"@storybook/theming": "^8.4.7",
|
|
49
|
+
"@storybook/types": "^8.4.7",
|
|
50
50
|
"@testing-library/jest-dom": "^6.4.2",
|
|
51
|
-
"@testing-library/react": "^
|
|
51
|
+
"@testing-library/react": "^16.0.1",
|
|
52
52
|
"@testing-library/user-event": "^14.5.1",
|
|
53
53
|
"@types/jest": "^29.5.12",
|
|
54
|
-
"@types/node": "^
|
|
54
|
+
"@types/node": "^22.10.0",
|
|
55
55
|
"@types/prop-types": "^15.7.5",
|
|
56
56
|
"@types/react": "^18.2.20",
|
|
57
57
|
"@types/react-dom": "^18.2.7",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@vitejs/plugin-react-swc": "^3.3.2",
|
|
62
62
|
"autoprefixer": "^10.4.17",
|
|
63
63
|
"babel-jest": "^29.7.0",
|
|
64
|
-
"date-fns": "^
|
|
65
|
-
"del": "^
|
|
64
|
+
"date-fns": "^4.1.0",
|
|
65
|
+
"del": "^8.0.0",
|
|
66
66
|
"eslint": "^8.47.0",
|
|
67
67
|
"eslint-config-airbnb": "^19.0.4",
|
|
68
68
|
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"eslint-plugin-react": "^7.33.2",
|
|
75
75
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
76
76
|
"eslint-plugin-storybook": "^0.11.1",
|
|
77
|
-
"glob": "^
|
|
78
|
-
"gulp": "^
|
|
77
|
+
"glob": "^11.0.0",
|
|
78
|
+
"gulp": "^5.0.0",
|
|
79
79
|
"gulp-clean-css": "^4.3.0",
|
|
80
80
|
"gulp-concat": "^2.6.1",
|
|
81
81
|
"gulp-file": "^0.4.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"react": "^18.2.0",
|
|
91
91
|
"react-dom": "^18.2.0",
|
|
92
92
|
"react-syntax-highlighter": "^15.5.0",
|
|
93
|
-
"storybook": "^8.4.
|
|
93
|
+
"storybook": "^8.4.7",
|
|
94
94
|
"tailwindcss": "^3.4.1",
|
|
95
95
|
"ts-dedent": "^2.2.0",
|
|
96
96
|
"ts-jest": "^29.1.2",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"tsc-alias": "^1.8.8",
|
|
99
99
|
"typescript": "*",
|
|
100
100
|
"vite": "^5.0.10",
|
|
101
|
-
"vite-tsconfig-paths": "^
|
|
101
|
+
"vite-tsconfig-paths": "^5.1.3"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@types/react": "^18.2.0",
|