@pushwoosh/dumb-components 3.1.0 → 3.3.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/Calendar/CalendarDropdown/CalendarDropdown.js +3 -1
- package/Calendar/CalendarDropdown/helpers.d.ts +2 -2
- package/Calendar/CalendarDropdown/helpers.js +7 -7
- package/Calendar/CalendarMonth/CalendarMonth.js +6 -1
- package/Calendar/CalendarMonthSlider/CalendarMonthSlider.js +3 -1
- package/Calendar/helpers.d.ts +1 -1
- package/Calendar/helpers.js +2 -2
- package/Calendar/polyglot/messages_ar.js +8 -1
- package/Calendar/polyglot/messages_bn.js +8 -1
- package/Calendar/polyglot/messages_de.js +8 -1
- package/Calendar/polyglot/messages_en.js +8 -1
- package/Calendar/polyglot/messages_es.js +8 -1
- package/Calendar/polyglot/messages_fr.js +8 -1
- package/Calendar/polyglot/messages_he.js +8 -1
- package/Calendar/polyglot/messages_hi.js +8 -1
- package/Calendar/polyglot/messages_ja.js +8 -1
- package/Calendar/polyglot/messages_ko.js +8 -1
- package/Calendar/polyglot/messages_pt.js +8 -1
- package/Calendar/polyglot/messages_ru.js +8 -1
- package/Calendar/polyglot/messages_th.js +8 -1
- package/Calendar/polyglot/messages_zh.js +8 -1
- package/Calendar/polyglot/types.d.ts +7 -0
- package/GetStartedPage/GetStartedPage.d.ts +1 -1
- package/GetStartedPage/GetStartedPage.js +15 -4
- package/GetStartedPage/index.d.ts +1 -1
- package/GetStartedPage/styles.d.ts +15 -0
- package/GetStartedPage/styles.js +25 -5
- package/GetStartedPage/types.d.ts +5 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/polyglot/index.d.ts +1 -1
- package/polyglot/index.js +1 -1
- package/polyglot/react.d.ts +2 -0
- package/polyglot/react.js +2 -0
|
@@ -10,6 +10,7 @@ import { PopoverContent, PresetsContainer } from './styles';
|
|
|
10
10
|
import { Button } from '../../Button';
|
|
11
11
|
import { Chip } from '../../Chip';
|
|
12
12
|
import { useLayer, useOnClickOutside } from '../../hooks';
|
|
13
|
+
import { useLanguage } from '../../polyglot';
|
|
13
14
|
import { CalendarSuperForm } from '../CalendarSuperForm';
|
|
14
15
|
import { Lang, useLang } from '../polyglot';
|
|
15
16
|
/**
|
|
@@ -39,6 +40,7 @@ export const CalendarDropdown = props => {
|
|
|
39
40
|
const [isShaking, setIsShaking] = useState(false);
|
|
40
41
|
const [isOpen, setIsOpen] = useState(false);
|
|
41
42
|
const lang = useLang();
|
|
43
|
+
const language = useLanguage();
|
|
42
44
|
const [value, setValue] = useState(props.value ?? (isRangePicker ? [] : undefined));
|
|
43
45
|
const initialTimezone = calendarProps.timezone || 'UTC';
|
|
44
46
|
const [timezone, setTimezone] = useState(initialTimezone);
|
|
@@ -92,7 +94,7 @@ export const CalendarDropdown = props => {
|
|
|
92
94
|
message: 'DUMB.CALENDAR.SELECT_DATE'
|
|
93
95
|
});
|
|
94
96
|
} else {
|
|
95
|
-
buttonText = stringifyValue(value, withTime, timezone);
|
|
97
|
+
buttonText = stringifyValue(value, withTime, timezone, language);
|
|
96
98
|
}
|
|
97
99
|
return _jsxs(Horizontal, {
|
|
98
100
|
"$justifyContent": "start",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DateStruct, type DateTimeStruct, type RangeValue, type SingleValue } from '../types';
|
|
2
|
-
export declare function formatDate(val: DateStruct | DateTimeStruct, withTime?: boolean): string;
|
|
2
|
+
export declare function formatDate(val: DateStruct | DateTimeStruct, withTime?: boolean, language?: string): string;
|
|
3
3
|
/**
|
|
4
4
|
* Formats a single value or range for display in the {@link CalendarDropdown} button:
|
|
5
5
|
* `"Jan 01, 2026"`, `"Jan 01, 2026 – Jan 05, 2026"`, with time and a short timezone when `withTime`.
|
|
6
6
|
*/
|
|
7
|
-
export declare const stringifyValue: (value: SingleValue<DateStruct | DateTimeStruct> | RangeValue<DateStruct | DateTimeStruct>, withTime: boolean, timezone?: string) => string;
|
|
7
|
+
export declare const stringifyValue: (value: SingleValue<DateStruct | DateTimeStruct> | RangeValue<DateStruct | DateTimeStruct>, withTime: boolean, timezone?: string, language?: string) => string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { formatTimezoneShort } from '../../helpers/timezones';
|
|
2
|
-
export function formatDate(val, withTime = true) {
|
|
2
|
+
export function formatDate(val, withTime = true, language = 'en-US') {
|
|
3
3
|
const date = new Date(val.year, val.month - 1, val.day, 'hour' in val ? val.hour : 0, 'minute' in val ? val.minute : 0);
|
|
4
4
|
if (withTime) {
|
|
5
|
-
return date.toLocaleString(
|
|
5
|
+
return date.toLocaleString(language, {
|
|
6
6
|
month: 'short',
|
|
7
7
|
day: '2-digit',
|
|
8
8
|
year: 'numeric',
|
|
@@ -11,7 +11,7 @@ export function formatDate(val, withTime = true) {
|
|
|
11
11
|
hour12: false
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
return date.toLocaleString(
|
|
14
|
+
return date.toLocaleString(language, {
|
|
15
15
|
month: 'short',
|
|
16
16
|
day: '2-digit',
|
|
17
17
|
year: 'numeric'
|
|
@@ -21,14 +21,14 @@ export function formatDate(val, withTime = true) {
|
|
|
21
21
|
* Formats a single value or range for display in the {@link CalendarDropdown} button:
|
|
22
22
|
* `"Jan 01, 2026"`, `"Jan 01, 2026 – Jan 05, 2026"`, with time and a short timezone when `withTime`.
|
|
23
23
|
*/
|
|
24
|
-
export const stringifyValue = (value, withTime, timezone) => {
|
|
24
|
+
export const stringifyValue = (value, withTime, timezone, language = 'en-US') => {
|
|
25
25
|
let result = '';
|
|
26
26
|
if (Array.isArray(value)) {
|
|
27
27
|
if (value.length === 0) return '';
|
|
28
|
-
if (value.length === 1) result = `${formatDate(value[0], withTime)} - ?`;
|
|
29
|
-
if (value.length === 2) result = `${formatDate(value[0], withTime)} – ${formatDate(value[1], withTime)}`;
|
|
28
|
+
if (value.length === 1) result = `${formatDate(value[0], withTime, language)} - ?`;
|
|
29
|
+
if (value.length === 2) result = `${formatDate(value[0], withTime, language)} – ${formatDate(value[1], withTime, language)}`;
|
|
30
30
|
} else if (value) {
|
|
31
|
-
result = formatDate(value, withTime);
|
|
31
|
+
result = formatDate(value, withTime, language);
|
|
32
32
|
}
|
|
33
33
|
if (withTime) {
|
|
34
34
|
const timezoneShort = formatTimezoneShort(timezone);
|
|
@@ -3,6 +3,8 @@ import { useMemo } from 'react';
|
|
|
3
3
|
import { Columns } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { CellBox, DayHeader } from './styles';
|
|
5
5
|
import { addPeriod, differenceInDays, getLastDayOfMonth, getFirstDayOfWeek, isSamePeriod, compareStructs, pickDateStruct } from '../helpers';
|
|
6
|
+
import { useLang } from '../polyglot';
|
|
7
|
+
const WEEKDAYS = ['SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY'];
|
|
6
8
|
export const CalendarMonth = ({
|
|
7
9
|
month,
|
|
8
10
|
selectedDay,
|
|
@@ -17,6 +19,7 @@ export const CalendarMonth = ({
|
|
|
17
19
|
onDayMouseLeave,
|
|
18
20
|
firstDayOfWeek = 0
|
|
19
21
|
}) => {
|
|
22
|
+
const lang = useLang();
|
|
20
23
|
const [firstDayDate, days] = useMemo(() => {
|
|
21
24
|
const firstDayOfMonth = {
|
|
22
25
|
...month,
|
|
@@ -36,7 +39,9 @@ export const CalendarMonth = ({
|
|
|
36
39
|
day: now.getDate()
|
|
37
40
|
};
|
|
38
41
|
}, []);
|
|
39
|
-
const dayLabels = firstDayOfWeek === 0 ?
|
|
42
|
+
const dayLabels = (firstDayOfWeek === 0 ? WEEKDAYS : [...WEEKDAYS.slice(1), WEEKDAYS[0]]).map(day => lang({
|
|
43
|
+
message: `DUMB.CALENDAR.WEEKDAY_SHORT.${day}`
|
|
44
|
+
}));
|
|
40
45
|
return _jsxs(Columns, {
|
|
41
46
|
"$sizes": 7,
|
|
42
47
|
"$gap": 2,
|
|
@@ -4,6 +4,7 @@ import { Horizontal, usePersistentFunction, Vertical } from '@pushwoosh/kit-help
|
|
|
4
4
|
import { ArrowIcon } from '@pushwoosh/kit-icons';
|
|
5
5
|
import { Root, Viewport, Strip, Panel, NavButtonLeft, NavButtonRight, StyledSelect } from './styles';
|
|
6
6
|
import { Button } from '../../Button';
|
|
7
|
+
import { useLanguage } from '../../polyglot';
|
|
7
8
|
import { CalendarMonth } from '../CalendarMonth/CalendarMonth';
|
|
8
9
|
import { addPeriod, monthName } from '../helpers';
|
|
9
10
|
function makeBaseline(a, count) {
|
|
@@ -34,6 +35,7 @@ export const CalendarMonthSlider = ({
|
|
|
34
35
|
renderAfter,
|
|
35
36
|
...monthProps
|
|
36
37
|
}) => {
|
|
38
|
+
const language = useLanguage();
|
|
37
39
|
const [anchor, setAnchor] = useState(() => ({
|
|
38
40
|
...startMonth,
|
|
39
41
|
day: 1
|
|
@@ -115,7 +117,7 @@ export const CalendarMonthSlider = ({
|
|
|
115
117
|
length: 12
|
|
116
118
|
}, (_, idx) => _jsx("option", {
|
|
117
119
|
value: idx + 1,
|
|
118
|
-
children: monthName(idx + 1, 'long')
|
|
120
|
+
children: monthName(idx + 1, 'long', language)
|
|
119
121
|
}, idx + 1))
|
|
120
122
|
}), _jsx(StyledSelect, {
|
|
121
123
|
value: p.year,
|
package/Calendar/helpers.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const pickDateStruct: (date: DateTimeStruct) => DateStruct;
|
|
|
13
13
|
export declare const setPeriodStruct: <T extends DateTimeStruct | DateStruct>(ds: T, period: Period, value: number) => T;
|
|
14
14
|
export declare const extendPeriodStruct: (struct: DateTimeStruct, extend: Partial<DateTimeStruct>) => DateTimeStruct;
|
|
15
15
|
export declare const differenceInDays: (ds1: DateStruct, ds2: DateStruct) => number;
|
|
16
|
-
export declare const monthName: (month: number, monthFormat?: "short" | "long") => string;
|
|
16
|
+
export declare const monthName: (month: number, monthFormat?: "short" | "long", language?: string) => string;
|
|
17
17
|
export declare const isSamePeriod: <T extends DateTimeStruct | DateStruct>(ds1: T, ds2: T, period: Period) => boolean;
|
|
18
18
|
/** Compares two structs chronologically: `-1` if `ds1 < ds2`, `0` if equal, `1` if `ds1 > ds2`. */
|
|
19
19
|
export declare const compareStructs: <T extends DateTimeStruct | DateStruct>(ds1: T, ds2: T) => 1 | 0 | -1;
|
package/Calendar/helpers.js
CHANGED
|
@@ -86,9 +86,9 @@ export const differenceInDays = (ds1, ds2) => {
|
|
|
86
86
|
const diff = Math.abs(date1.getTime() - date2.getTime());
|
|
87
87
|
return Math.floor(diff / (1000 * 3600 * 24));
|
|
88
88
|
};
|
|
89
|
-
export const monthName = (month, monthFormat = 'long') => {
|
|
89
|
+
export const monthName = (month, monthFormat = 'long', language = 'en-US') => {
|
|
90
90
|
const date = new Date(2023, month - 1, 1);
|
|
91
|
-
return date.toLocaleString(
|
|
91
|
+
return date.toLocaleString(language, {
|
|
92
92
|
month: monthFormat
|
|
93
93
|
});
|
|
94
94
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'توسيع الوقت',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'طي الوقت',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'النطاق الزمني:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'يرجى تحديد {% if isRange == true %}نطاق التواريخ{% else %}التاريخ{% endif %} أولاً لضبط الوقت'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'يرجى تحديد {% if isRange == true %}نطاق التواريخ{% else %}التاريخ{% endif %} أولاً لضبط الوقت',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'ح',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'ن',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'ث',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'ر',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'خ',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'ج',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'س'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'সময় প্রসারিত করুন',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'সময় সংকুচিত করুন',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'সময়সীমা:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'সময় নির্ধারণ করতে অনুগ্রহ করে প্রথমে {% if isRange == true %}তারিখের সীমা{% else %}তারিখ{% endif %} নির্বাচন করুন'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'সময় নির্ধারণ করতে অনুগ্রহ করে প্রথমে {% if isRange == true %}তারিখের সীমা{% else %}তারিখ{% endif %} নির্বাচন করুন',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'রবি',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'সোম',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'মঙ্গল',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'বুধ',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'বৃহঃ',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'শুক্র',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'শনি'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'Zeit ausklappen',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'Zeit einklappen',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'Zeitspanne:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Bitte zuerst {% if isRange == true %}einen Datumsbereich{% else %}ein Datum{% endif %} auswählen, um die Uhrzeit festzulegen'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Bitte zuerst {% if isRange == true %}einen Datumsbereich{% else %}ein Datum{% endif %} auswählen, um die Uhrzeit festzulegen',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'So',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'Mo',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'Di',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'Mi',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'Do',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'Fr',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'Sa'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'Expand time',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'Collapse time',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'Time range:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Please select {% if isRange == true %}date range{% else %}date{% endif %} first to set time'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Please select {% if isRange == true %}date range{% else %}date{% endif %} first to set time',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'Su',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'Mo',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'Tu',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'We',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'Th',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'Fr',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'Sa'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'Expandir hora',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'Contraer hora',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'Rango horario:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Primero selecciona {% if isRange == true %}un rango de fechas{% else %}una fecha{% endif %} para establecer la hora'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Primero selecciona {% if isRange == true %}un rango de fechas{% else %}una fecha{% endif %} para establecer la hora',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'Do',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'Lu',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'Ma',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'Mi',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'Ju',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'Vi',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'Sá'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'Développer l’heure',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'Réduire l’heure',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'Plage horaire :',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Veuillez d’abord sélectionner {% if isRange == true %}une plage de dates{% else %}une date{% endif %} pour définir l’heure'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Veuillez d’abord sélectionner {% if isRange == true %}une plage de dates{% else %}une date{% endif %} pour définir l’heure',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'Di',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'Lu',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'Ma',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'Me',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'Je',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'Ve',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'Sa'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'הרחב שעה',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'כווץ שעה',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'טווח שעות:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'יש לבחור תחילה {% if isRange == true %}טווח תאריכים{% else %}תאריך{% endif %} כדי להגדיר שעה'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'יש לבחור תחילה {% if isRange == true %}טווח תאריכים{% else %}תאריך{% endif %} כדי להגדיר שעה',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'א׳',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'ב׳',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'ג׳',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'ד׳',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'ה׳',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'ו׳',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'ש׳'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'समय विस्तृत करें',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'समय संक्षिप्त करें',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'समय सीमा:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'समय सेट करने के लिए पहले {% if isRange == true %}तारीख़ सीमा{% else %}तारीख़{% endif %} चुनें'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'समय सेट करने के लिए पहले {% if isRange == true %}तारीख़ सीमा{% else %}तारीख़{% endif %} चुनें',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'रवि',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'सोम',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'मंगल',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'बुध',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'गुरु',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'शुक्र',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'शनि'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': '時刻を展開',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': '時刻を折りたたむ',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': '時間範囲:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': '時刻を設定するには、まず{% if isRange == true %}日付範囲{% else %}日付{% endif %}を選択してください'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': '時刻を設定するには、まず{% if isRange == true %}日付範囲{% else %}日付{% endif %}を選択してください',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': '日',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': '月',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': '火',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': '水',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': '木',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': '金',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': '土'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': '시간 펼치기',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': '시간 접기',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': '시간 범위:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': '시간을 설정하려면 먼저 {% if isRange == true %}날짜 범위{% else %}날짜{% endif %}를 선택하세요'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': '시간을 설정하려면 먼저 {% if isRange == true %}날짜 범위{% else %}날짜{% endif %}를 선택하세요',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': '일',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': '월',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': '화',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': '수',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': '목',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': '금',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': '토'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'Expandir hora',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'Recolher hora',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'Intervalo de tempo:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Primeiro selecione {% if isRange == true %}um intervalo de datas{% else %}uma data{% endif %} para definir a hora'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Primeiro selecione {% if isRange == true %}um intervalo de datas{% else %}uma data{% endif %} para definir a hora',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'Dom',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'Seg',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'Ter',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'Qua',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'Qui',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'Sex',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'Sáb'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'Развернуть время',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'Свернуть время',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'Диапазон времени:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Сначала выберите {% if isRange == true %}диапазон дат{% else %}дату{% endif %}, чтобы задать время'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'Сначала выберите {% if isRange == true %}диапазон дат{% else %}дату{% endif %}, чтобы задать время',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'Вс',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'Пн',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'Вт',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'Ср',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'Чт',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'Пт',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'Сб'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': 'ขยายเวลา',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': 'ย่อเวลา',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': 'ช่วงเวลา:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'โปรดเลือก{% if isRange == true %}ช่วงวันที่{% else %}วันที่{% endif %}ก่อนเพื่อตั้งเวลา'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': 'โปรดเลือก{% if isRange == true %}ช่วงวันที่{% else %}วันที่{% endif %}ก่อนเพื่อตั้งเวลา',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': 'อา',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': 'จ',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': 'อ',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': 'พ',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': 'พฤ',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': 'ศ',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': 'ส'
|
|
11
18
|
};
|
|
@@ -7,5 +7,12 @@ export const messages = {
|
|
|
7
7
|
'DUMB.CALENDAR.EXPAND_TIME': '展开时间',
|
|
8
8
|
'DUMB.CALENDAR.COLLAPSE_TIME': '收起时间',
|
|
9
9
|
'DUMB.CALENDAR.TIME_RANGE': '时间范围:',
|
|
10
|
-
'DUMB.CALENDAR.SELECT_FIRST_HINT': '请先选择{% if isRange == true %}日期范围{% else %}日期{% endif %}以设置时间'
|
|
10
|
+
'DUMB.CALENDAR.SELECT_FIRST_HINT': '请先选择{% if isRange == true %}日期范围{% else %}日期{% endif %}以设置时间',
|
|
11
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': '日',
|
|
12
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': '一',
|
|
13
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': '二',
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': '三',
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': '四',
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': '五',
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': '六'
|
|
11
18
|
};
|
|
@@ -11,4 +11,11 @@ export type CalendarMessages = {
|
|
|
11
11
|
'DUMB.CALENDAR.SELECT_FIRST_HINT': {
|
|
12
12
|
isRange: boolean;
|
|
13
13
|
};
|
|
14
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SUNDAY': NoParams;
|
|
15
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.MONDAY': NoParams;
|
|
16
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.TUESDAY': NoParams;
|
|
17
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.WEDNESDAY': NoParams;
|
|
18
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.THURSDAY': NoParams;
|
|
19
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.FRIDAY': NoParams;
|
|
20
|
+
'DUMB.CALENDAR.WEEKDAY_SHORT.SATURDAY': NoParams;
|
|
14
21
|
};
|
|
@@ -2,7 +2,7 @@ import { type ReactElement } from 'react';
|
|
|
2
2
|
import type { GetStartedPageProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Onboarding/empty-state page with a title, description, illustration, optional
|
|
5
|
-
* checklist, help banner and action controls.
|
|
5
|
+
* checklist (check icons or numbered steps), help banner and action controls.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* <GetStartedPage title="Welcome" description="Set up your first app" image={img} actions={<Button color="primary">Start</Button>} />
|
|
@@ -4,10 +4,10 @@ import { Vertical } from '@pushwoosh/kit-helpers';
|
|
|
4
4
|
import { CheckRoundIcon, LockIcon } from '@pushwoosh/kit-icons';
|
|
5
5
|
import { H1, Paragraph } from '@pushwoosh/kit-typography';
|
|
6
6
|
import { Banner } from '../Banner';
|
|
7
|
-
import { GradientBackground, Wrapper, ContentBox, UnorderedList, UnorderedListItem, UnorderedListIcon, UnorderedListText, Image } from './styles';
|
|
7
|
+
import { GradientBackground, Wrapper, ContentBox, UnorderedList, UnorderedListItem, UnorderedListIcon, UnorderedListText, OrderedList, OrderedListItem, StepMarker, StepIndex, StepSeparator, Image } from './styles';
|
|
8
8
|
/**
|
|
9
9
|
* Onboarding/empty-state page with a title, description, illustration, optional
|
|
10
|
-
* checklist, help banner and action controls.
|
|
10
|
+
* checklist (check icons or numbered steps), help banner and action controls.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* <GetStartedPage title="Welcome" description="Set up your first app" image={img} actions={<Button color="primary">Start</Button>} />
|
|
@@ -19,6 +19,7 @@ export function GetStartedPage(props) {
|
|
|
19
19
|
image,
|
|
20
20
|
helpText,
|
|
21
21
|
checkList = [],
|
|
22
|
+
checkListView = 'check',
|
|
22
23
|
actions = null
|
|
23
24
|
} = props;
|
|
24
25
|
return _jsx(GradientBackground, {
|
|
@@ -33,7 +34,17 @@ export function GetStartedPage(props) {
|
|
|
33
34
|
}), _jsx(Paragraph, {
|
|
34
35
|
children: description
|
|
35
36
|
})]
|
|
36
|
-
}), !!checkList.length && _jsx(
|
|
37
|
+
}), !!checkList.length && (checkListView === 'numbered' ? _jsx(OrderedList, {
|
|
38
|
+
children: checkList.map((text, index) => _jsxs(OrderedListItem, {
|
|
39
|
+
children: [_jsxs(StepMarker, {
|
|
40
|
+
children: [_jsx(StepIndex, {
|
|
41
|
+
children: index + 1
|
|
42
|
+
}), index < checkList.length - 1 && _jsx(StepSeparator, {})]
|
|
43
|
+
}), _jsx(Paragraph, {
|
|
44
|
+
children: text
|
|
45
|
+
})]
|
|
46
|
+
}, `step-${text}`))
|
|
47
|
+
}) : _jsx(UnorderedList, {
|
|
37
48
|
children: checkList.map(text => _jsxs(UnorderedListItem, {
|
|
38
49
|
children: [_jsx(UnorderedListIcon, {
|
|
39
50
|
children: _jsx(CheckRoundIcon, {
|
|
@@ -46,7 +57,7 @@ export function GetStartedPage(props) {
|
|
|
46
57
|
children: text
|
|
47
58
|
})]
|
|
48
59
|
}, `item-${text}`))
|
|
49
|
-
})]
|
|
60
|
+
}))]
|
|
50
61
|
}), (helpText || actions) && _jsxs(Vertical, {
|
|
51
62
|
"$gap": 16,
|
|
52
63
|
children: [helpText && _jsx(Banner, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { GetStartedPage } from './GetStartedPage';
|
|
2
|
-
export type { GetStartedPageProps } from './types';
|
|
2
|
+
export type { GetStartedPageCheckListView, GetStartedPageProps } from './types';
|
|
@@ -10,6 +10,21 @@ export declare const ContentBox: import("styled-components/dist/types").IStyledC
|
|
|
10
10
|
export declare const UnorderedList: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "style"> & {
|
|
11
11
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
12
12
|
}> & string;
|
|
13
|
+
export declare const OrderedList: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "style"> & {
|
|
14
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
15
|
+
}> & string;
|
|
16
|
+
export declare const OrderedListItem: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
|
|
17
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
18
|
+
}> & string;
|
|
19
|
+
export declare const StepMarker: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
20
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
21
|
+
}> & string;
|
|
22
|
+
export declare const StepIndex: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
23
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
24
|
+
}> & string;
|
|
25
|
+
export declare const StepSeparator: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
26
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
27
|
+
}> & string;
|
|
13
28
|
export declare const UnorderedListItem: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
|
|
14
29
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
15
30
|
}> & string;
|
package/GetStartedPage/styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { Color, UnitSize } from '@pushwoosh/kit-constants';
|
|
2
|
+
import { Color, FontSize, FontWeight, UnitSize } from '@pushwoosh/kit-constants';
|
|
3
3
|
import { Text } from '@pushwoosh/kit-typography';
|
|
4
4
|
export const GradientBackground = styled.div.withConfig({
|
|
5
5
|
displayName: "GradientBackground",
|
|
@@ -17,19 +17,39 @@ export const UnorderedList = styled.ul.withConfig({
|
|
|
17
17
|
displayName: "UnorderedList",
|
|
18
18
|
componentId: "sc-6jf7u0-3"
|
|
19
19
|
})(["display:flex;flex-direction:column;padding:0;margin:0;list-style:none;gap:8px;"]);
|
|
20
|
+
export const OrderedList = styled.ol.withConfig({
|
|
21
|
+
displayName: "OrderedList",
|
|
22
|
+
componentId: "sc-6jf7u0-4"
|
|
23
|
+
})(["display:flex;flex-direction:column;padding:0;margin:0;list-style:none;gap:4px;"]);
|
|
24
|
+
export const OrderedListItem = styled.li.withConfig({
|
|
25
|
+
displayName: "OrderedListItem",
|
|
26
|
+
componentId: "sc-6jf7u0-5"
|
|
27
|
+
})(["display:grid;grid-template-columns:auto 1fr;column-gap:8px;"]);
|
|
28
|
+
export const StepMarker = styled.div.withConfig({
|
|
29
|
+
displayName: "StepMarker",
|
|
30
|
+
componentId: "sc-6jf7u0-6"
|
|
31
|
+
})(["display:flex;flex-direction:column;align-items:center;gap:4px;"]);
|
|
32
|
+
export const StepIndex = styled.div.withConfig({
|
|
33
|
+
displayName: "StepIndex",
|
|
34
|
+
componentId: "sc-6jf7u0-7"
|
|
35
|
+
})(["display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid ", ";border-radius:50%;background-color:", ";font-size:", ";font-weight:", ";"], Color.DIVIDER, Color.FROZEN, FontSize.SMALL, FontWeight.BOLD);
|
|
36
|
+
export const StepSeparator = styled.div.withConfig({
|
|
37
|
+
displayName: "StepSeparator",
|
|
38
|
+
componentId: "sc-6jf7u0-8"
|
|
39
|
+
})(["height:8px;border-left:1px solid ", ";"], Color.DIVIDER);
|
|
20
40
|
export const UnorderedListItem = styled.li.withConfig({
|
|
21
41
|
displayName: "UnorderedListItem",
|
|
22
|
-
componentId: "sc-6jf7u0-
|
|
42
|
+
componentId: "sc-6jf7u0-9"
|
|
23
43
|
})(["display:flex;gap:8px;"]);
|
|
24
44
|
export const UnorderedListText = styled(Text).withConfig({
|
|
25
45
|
displayName: "UnorderedListText",
|
|
26
|
-
componentId: "sc-6jf7u0-
|
|
46
|
+
componentId: "sc-6jf7u0-10"
|
|
27
47
|
})(["padding:4px 0;"]);
|
|
28
48
|
export const UnorderedListIcon = styled.div.withConfig({
|
|
29
49
|
displayName: "UnorderedListIcon",
|
|
30
|
-
componentId: "sc-6jf7u0-
|
|
50
|
+
componentId: "sc-6jf7u0-11"
|
|
31
51
|
})(["display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:", ";border-radius:50%;padding:4px;"], Color.SUCCESS_LIGHT);
|
|
32
52
|
export const Image = styled.img.withConfig({
|
|
33
53
|
displayName: "Image",
|
|
34
|
-
componentId: "sc-6jf7u0-
|
|
54
|
+
componentId: "sc-6jf7u0-12"
|
|
35
55
|
})(["width:400px;height:400px;object-fit:contain;"]);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
/** Marker of {@link GetStartedPage} checklist items. */
|
|
3
|
+
export type GetStartedPageCheckListView = 'check' | 'numbered';
|
|
2
4
|
/** Props of {@link GetStartedPage}. */
|
|
3
5
|
export interface GetStartedPageProps {
|
|
4
6
|
/** Page title. */
|
|
@@ -9,8 +11,10 @@ export interface GetStartedPageProps {
|
|
|
9
11
|
image: string;
|
|
10
12
|
/** Optional help banner text. */
|
|
11
13
|
helpText?: string;
|
|
12
|
-
/** Checklist items rendered with check icons
|
|
14
|
+
/** Checklist items rendered with check icons, or numbered steps when `checkListView` is `numbered`. */
|
|
13
15
|
checkList?: string[];
|
|
16
|
+
/** Marker of checklist items: check icons (default) or step numbers. */
|
|
17
|
+
checkListView?: GetStartedPageCheckListView;
|
|
14
18
|
/** Call-to-action controls. */
|
|
15
19
|
actions?: ReactNode;
|
|
16
20
|
}
|
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { Divider } from './Divider';
|
|
|
9
9
|
export { Drawer, DrawerHeader, DrawerTitle, DrawerBody, DrawerDocs, useDocs, } from './Drawer';
|
|
10
10
|
export { CalendarSuperForm, CalendarDropdown, addPeriod, compareStructs, dateToStruct, dateToStructTz, getTimezoneOffset, getPeriodEnd, getPeriodStart, structToDate, structToDateTz, stringifyValue, pickDateStruct, type CalendarDropdownProps, type CalendarDropdownRangeDateProps, type CalendarSuperFormProps, type DateStruct, type RangeValue, } from './Calendar';
|
|
11
11
|
export { DropdownMenu, DropdownMenuButton, DropdownMenuSection, DropdownMenuItem, DropdownMenuSubmenu, } from './DropdownMenu';
|
|
12
|
-
export { GetStartedPage } from './GetStartedPage';
|
|
12
|
+
export { GetStartedPage, type GetStartedPageCheckListView, type GetStartedPageProps } from './GetStartedPage';
|
|
13
13
|
export { EditableField } from './EditableField';
|
|
14
14
|
export { EmojiPicker } from './EmojiPicker';
|
|
15
15
|
export { InputFile } from './InputFile';
|
package/package.json
CHANGED
package/polyglot/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { LangMessages, LangProps, UseLangHook, NoParams } from './types';
|
|
2
|
-
export { LangProvider, LangBase, useLangBase, LangLib, useLangLib, createLang, } from './react';
|
|
2
|
+
export { LangProvider, LangBase, useLangBase, useLanguage, LangLib, useLangLib, createLang, } from './react';
|
package/polyglot/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LangProvider, LangBase, useLangBase, LangLib, useLangLib, createLang } from './react';
|
|
1
|
+
export { LangProvider, LangBase, useLangBase, useLanguage, LangLib, useLangLib, createLang } from './react';
|
package/polyglot/react.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export declare const LangProvider: FC<PropsWithChildren<LangProviderProps>>;
|
|
|
18
18
|
export declare const LangBase: FC;
|
|
19
19
|
/** Returns a function that renders a message from the provider's catalogue to a plain string. */
|
|
20
20
|
export declare const useLangBase: () => (allProps: any) => string;
|
|
21
|
+
/** Returns the active language code of the nearest {@link LangProvider} (`en` without one). */
|
|
22
|
+
export declare const useLanguage: () => string;
|
|
21
23
|
type LangLibProps = {
|
|
22
24
|
$languages: LanguagesMap;
|
|
23
25
|
} & Record<string, any>;
|
package/polyglot/react.js
CHANGED
|
@@ -87,6 +87,8 @@ export const LangBase = props => {
|
|
|
87
87
|
};
|
|
88
88
|
/** Returns a function that renders a message from the provider's catalogue to a plain string. */
|
|
89
89
|
export const useLangBase = () => useContext(LangContext).lang;
|
|
90
|
+
/** Returns the active language code of the nearest {@link LangProvider} (`en` without one). */
|
|
91
|
+
export const useLanguage = () => useContext(LangContext).language;
|
|
90
92
|
/** Renders a message from a self-supplied catalogue (`$languages`); registers it on first use. Prefer {@link createLang}. */
|
|
91
93
|
export const LangLib = ({
|
|
92
94
|
$languages,
|