@ama-pt/agora-design-system 3.4.1 → 3.4.2
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 +3623 -3601
- 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 -1
- package/artifacts/dist/tailwind.css +1 -1
- package/artifacts/dist/types/components/header/index.d.ts +6 -0
- package/artifacts/dist/types/components/input-time/contexts/time-input-state.context.d.ts +6 -1
- package/artifacts/dist/types/components/input-time/input-time.d.ts +5 -1
- package/artifacts/dist/types/components/input-time/utils/format-time.d.ts +7 -10
- package/artifacts/dist/types/models/index.d.ts +1 -0
- package/artifacts/dist/types/models/time-format-type.d.ts +1 -0
- package/artifacts/dist/types/models/time-period-type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -58,3 +58,9 @@ export { NavigationLink } from './navigation-bar/navigation-link';
|
|
|
58
58
|
export type { NavigationLinkProps } from './navigation-bar/navigation-link';
|
|
59
59
|
export { RelatedNavigationLink } from './navigation-bar/related-navigation-link';
|
|
60
60
|
export type { RelatedNavigationLinkProps } from './navigation-bar/related-navigation-link';
|
|
61
|
+
export { EcosystemBar } from './ecosystem-bar/ecosystem-bar';
|
|
62
|
+
export type { EcosystemBarProps } from './ecosystem-bar/ecosystem-bar';
|
|
63
|
+
export { EcosystemBarTitle } from './ecosystem-bar/ecosystem-bar-title';
|
|
64
|
+
export type { EcosystemBarTitleProps } from './ecosystem-bar/ecosystem-bar-title';
|
|
65
|
+
export { EcosystemBarContent } from './ecosystem-bar/ecosystem-bar-content';
|
|
66
|
+
export type { EcosystemBarContentProps } from './ecosystem-bar/ecosystem-bar-content';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Dispatch, FC, ReactNode, SetStateAction } from 'react';
|
|
2
|
-
import { TimePeriod } from '../../../models';
|
|
2
|
+
import { TimeFormat, TimePeriod } from '../../../models';
|
|
3
3
|
export interface Labels {
|
|
4
4
|
cancelLabel: string;
|
|
5
5
|
cancelAriaLabel?: string;
|
|
@@ -9,7 +9,12 @@ export interface Labels {
|
|
|
9
9
|
timepickerMessageAriaLabel?: string;
|
|
10
10
|
}
|
|
11
11
|
interface TimePickerStateContextInitialValuesType {
|
|
12
|
+
selectedFormat: TimeFormat;
|
|
12
13
|
selectedTime: string;
|
|
14
|
+
MIN_HOUR: number;
|
|
15
|
+
MAX_HOUR: number;
|
|
16
|
+
MIN_MINUTE: number;
|
|
17
|
+
MAX_MINUTE: number;
|
|
13
18
|
cancel: (selectedTime: string) => void;
|
|
14
19
|
labels: Labels;
|
|
15
20
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ComponentProps, FC, ReactNode } from 'react';
|
|
2
2
|
import './input-time.css';
|
|
3
|
-
import { BooleanProp, FeedbackState } from '../../models';
|
|
3
|
+
import { BooleanProp, FeedbackState, TimeFormat } from '../../models';
|
|
4
4
|
export interface InputTimeProps extends ComponentProps<'input'> {
|
|
5
|
+
/**
|
|
6
|
+
* Defines the time format that will be used.
|
|
7
|
+
*/
|
|
8
|
+
format?: TimeFormat;
|
|
5
9
|
/**
|
|
6
10
|
* The flag to set if the label and feedback text is in dark mode or light mode.
|
|
7
11
|
*/
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { TimePeriod } from '../../../models';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const MAX_HOUR = 12;
|
|
5
|
-
export declare const MIN_MINUTE = 0;
|
|
6
|
-
export declare const MAX_MINUTE = 59;
|
|
2
|
+
export declare const FULL_TIME_TEXT_REGEX_WITH_PERIOD: RegExp;
|
|
3
|
+
export declare const FULL_TIME_TEXT_REGEX_WITHOUT_PERIOD: RegExp;
|
|
7
4
|
export declare const DEFAULT_PLACEHOLDER: {
|
|
8
5
|
HOUR: string;
|
|
9
6
|
MINUTE: string;
|
|
@@ -18,12 +15,12 @@ export declare const startTime: {
|
|
|
18
15
|
minute: string;
|
|
19
16
|
period: string;
|
|
20
17
|
};
|
|
21
|
-
export declare const formatHour: (hour: number | string) => string;
|
|
22
|
-
export declare const formatMinute: (minute: number | string) => string;
|
|
23
|
-
export declare const formatFullTime: (selectedHour: number | string, selectedMinute: number | string, selectedPeriod: TimePeriod) => string;
|
|
24
|
-
export declare const parseFullTime: (fullTimeText: string) => {
|
|
18
|
+
export declare const formatHour: (hour: number | string, minHour: number, maxHour: number) => string;
|
|
19
|
+
export declare const formatMinute: (minute: number | string, minMinute: number, maxMinute: number) => string;
|
|
20
|
+
export declare const formatFullTime: (hasPeriod: boolean, selectedHour: number | string, selectedMinute: number | string, selectedPeriod: TimePeriod) => string;
|
|
21
|
+
export declare const parseFullTime: (hasPeriod: boolean, fullTimeText: string) => {
|
|
25
22
|
selectedHour: string;
|
|
26
23
|
selectedMinute: string;
|
|
27
24
|
selectedPeriod: TimePeriod;
|
|
28
25
|
};
|
|
29
|
-
export declare const isTimeTextValid: (timeText: string | number | undefined) => boolean;
|
|
26
|
+
export declare const isTimeTextValid: (hasPeriod: boolean, timeText: string | number | undefined, minHour: number, maxHour: number, minMinute: number, maxMinute: number) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TimeFormat = '12' | '24';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TimePeriod = 'am' | 'pm';
|
|
1
|
+
export type TimePeriod = 'am' | 'pm' | undefined;
|