@alphakits/ui 2.6.0 → 2.6.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.
@@ -19,7 +19,7 @@ export type AmountInputProps = Omit<InputProps, 'value' | 'onChange' | 'type'> &
19
19
  export declare const AmountInput: React.ForwardRefExoticComponent<Omit<InputProps, "onChange" | "value" | "type"> & {
20
20
  value?: number | undefined | null;
21
21
  type?: AmountValueType | undefined;
22
- suffix?: "CHF" | "EUR" | "RUR" | "RUB" | "USD" | "GBP" | "SEK" | "DKK" | "NOK" | "CZK" | "PLN" | "HUF" | "RSD" | "BGN" | "HRK" | "RON" | "MKD" | "BAM" | "ALL" | "ISK" | "UAH" | "BYN" | "MDL" | "GEL" | "TRY" | "CAD" | "AUD" | "ILS" | undefined;
22
+ suffix?: "CHF" | "EUR" | "RUR" | "RUB" | "USD" | "GBP" | "SEK" | "DKK" | "NOK" | "CZK" | "PLN" | "HUF" | "RSD" | "BGN" | "HRK" | "RON" | "MKD" | "BAM" | "ALL" | "ISK" | "UAH" | "BYN" | "MDL" | "GEL" | "TRY" | "CAD" | "AUD" | "ILS" | "NZD" | "ARS" | "BRL" | "TWD" | "MXN" | "JPY" | "SGD" | undefined;
23
23
  required?: boolean | undefined;
24
24
  integerLength?: number | undefined;
25
25
  minority?: number | undefined;
@@ -1,3 +1,3 @@
1
1
  export * from './component';
2
2
  export * from './types';
3
- export { GALLERY_IMAGE_SIZE, getImageCdnHost, getImageSrc, imageSizes, isEscapenavigatorImage, isRuImageRegion, } from './utils';
3
+ export { DEFAULT_IMAGE_DIMENSIONS, GALLERY_IMAGE_SIZE, getImageCdnHost, getImageSrc, imageSizes, isEscapenavigatorImage, isRuImageRegion, resolveImageDimensions, } from './utils';
@@ -1,13 +1,15 @@
1
- import { Image as a } from "./component.js";
2
- import { textSizes as o } from "./types.js";
3
- import { GALLERY_IMAGE_SIZE as r, getImageCdnHost as i, getImageSrc as I, imageSizes as s, isEscapenavigatorImage as p, isRuImageRegion as x } from "./utils.js";
1
+ import { Image as m } from "./component.js";
2
+ import { textSizes as I } from "./types.js";
3
+ import { DEFAULT_IMAGE_DIMENSIONS as i, GALLERY_IMAGE_SIZE as r, getImageCdnHost as s, getImageSrc as t, imageSizes as E, isEscapenavigatorImage as S, isRuImageRegion as n, resolveImageDimensions as p } from "./utils.js";
4
4
  export {
5
+ i as DEFAULT_IMAGE_DIMENSIONS,
5
6
  r as GALLERY_IMAGE_SIZE,
6
- a as Image,
7
- i as getImageCdnHost,
8
- I as getImageSrc,
9
- s as imageSizes,
10
- p as isEscapenavigatorImage,
11
- x as isRuImageRegion,
12
- o as textSizes
7
+ m as Image,
8
+ s as getImageCdnHost,
9
+ t as getImageSrc,
10
+ E as imageSizes,
11
+ S as isEscapenavigatorImage,
12
+ n as isRuImageRegion,
13
+ p as resolveImageDimensions,
14
+ I as textSizes
13
15
  };
@@ -8,4 +8,6 @@ export declare const isRuImageRegion: () => boolean;
8
8
  export declare const getImageCdnHost: () => string;
9
9
  export declare const extractStoragePath: (src: string) => string | null;
10
10
  export declare const isEscapenavigatorImage: (src: string) => boolean;
11
+ export declare const DEFAULT_IMAGE_DIMENSIONS = "300x300";
12
+ export declare const resolveImageDimensions: (size?: ComponentSizes | string) => string;
11
13
  export declare const getImageSrc: (src?: string, size?: ComponentSizes | string) => string | undefined;
@@ -1,7 +1,7 @@
1
- const g = (t = "NN") => {
1
+ const E = (t = "NN") => {
2
2
  const n = t.split(" ");
3
3
  return n.length >= 2 ? n[0][0] + n[1][0] : n[0][0] + n[0][1];
4
- }, s = "d2z3luly8bezbw.cloudfront.net", a = "picture.escapenavigator.ru", i = "escapenavigator-images.s3", r = [s, a], c = {
4
+ }, s = "d2z3luly8bezbw.cloudfront.net", a = "picture.escapenavigator.ru", r = "escapenavigator-images.s3", c = [s, a], o = {
5
5
  xs: "300x300",
6
6
  s: "300x300",
7
7
  m: "300x300",
@@ -9,22 +9,24 @@ const g = (t = "NN") => {
9
9
  xl: "300x300",
10
10
  xxl: "640x640",
11
11
  auto: "640x640"
12
- }, _ = "1280x1280", u = () => process.env.REACT_APP_REGION === "ru", l = () => u() ? a : s, m = (t) => t.includes("amazonaws.com/") ? t.split("amazonaws.com/")[1]?.split("?")[0] ?? null : t.match(/fit-in\/\d+x\d+\/(.+?)(?:\?|$)/)?.[1] ?? null, x = (t) => t.includes(i) || r.some((n) => t.includes(n)), d = (t, n) => {
12
+ }, I = "1280x1280", u = () => process.env.REACT_APP_REGION === "ru", m = () => u() ? a : s, l = (t) => t.includes("amazonaws.com/") ? t.split("amazonaws.com/")[1]?.split("?")[0] ?? null : t.match(/fit-in\/[^/]+\/(.+?)(?:\?|$)/)?.[1] ?? null, x = (t) => t.includes(r) || c.some((n) => t.includes(n)), g = "300x300", _ = (t) => t ? t in o ? o[t] : t : g, p = (t, n) => {
13
13
  if (!t || t.startsWith("data:")) return t;
14
- const e = typeof n == "string" ? n : n ? c[n] : void 0;
15
- if (!e || !x(t)) return t;
16
- const o = m(t);
17
- return o ? `https://${l()}/fit-in/${e}/${o}` : t;
14
+ const i = _(n);
15
+ if (!x(t)) return t;
16
+ const e = l(t);
17
+ return e ? `https://${m()}/fit-in/${i}/${e}` : t;
18
18
  };
19
19
  export {
20
- _ as GALLERY_IMAGE_SIZE,
20
+ g as DEFAULT_IMAGE_DIMENSIONS,
21
+ I as GALLERY_IMAGE_SIZE,
21
22
  s as IMAGE_CDN_HOST_COM,
22
23
  a as IMAGE_CDN_HOST_RU,
23
- m as extractStoragePath,
24
- g as getCharsFromText,
25
- l as getImageCdnHost,
26
- d as getImageSrc,
27
- c as imageSizes,
24
+ l as extractStoragePath,
25
+ E as getCharsFromText,
26
+ m as getImageCdnHost,
27
+ p as getImageSrc,
28
+ o as imageSizes,
28
29
  x as isEscapenavigatorImage,
29
- u as isRuImageRegion
30
+ u as isRuImageRegion,
31
+ _ as resolveImageDimensions
30
32
  };
package/dist/index.js CHANGED
@@ -6,14 +6,14 @@ import { Badge as i } from "./badge/component.js";
6
6
  import { BaseCard as u } from "./base-card/component.js";
7
7
  import { BottomSheet as d } from "./bottom-sheet/component.js";
8
8
  import { Box as c, Radiuses as I, Spaces as T } from "./box/component.js";
9
- import { Button as h } from "./button/component.js";
9
+ import { Button as A } from "./button/component.js";
10
10
  import { ButtonArrow as g } from "./button-arrow/component.js";
11
- import { Calendar as E } from "./calendar/component.js";
12
- import { useCalendar as k } from "./calendar/use-calendar.js";
13
- import { usePeriod as _ } from "./calendar/use-period.js";
14
- import { DAYS_IN_WEEK as R, MONTHS_IN_YEAR as F, SUNDAY_INDEX as L, dateInLimits as B, limitDate as y, monthName as b, russianWeekDay as w } from "./calendar/utils.js";
15
- import { CalendarInput as Y } from "./calendar-input/component.js";
16
- import { DATE_FORMAT as H, DATE_MASK as N, IS_BROWSER as v, NATIVE_DATE_FORMAT as U, SUPPORTS_INPUT_TYPE_DATE as z, isCompleteDateInput as q, isInputDateSupported as K, parseDateString as V } from "./calendar-input/utils.js";
11
+ import { Calendar as C } from "./calendar/component.js";
12
+ import { useCalendar as M } from "./calendar/use-calendar.js";
13
+ import { usePeriod as k } from "./calendar/use-period.js";
14
+ import { DAYS_IN_WEEK as P, MONTHS_IN_YEAR as R, SUNDAY_INDEX as L, dateInLimits as B, limitDate as y, monthName as N, russianWeekDay as b } from "./calendar/utils.js";
15
+ import { CalendarInput as G } from "./calendar-input/component.js";
16
+ import { DATE_FORMAT as Y, DATE_MASK as v, IS_BROWSER as H, NATIVE_DATE_FORMAT as U, SUPPORTS_INPUT_TYPE_DATE as z, isCompleteDateInput as q, isInputDateSupported as K, parseDateString as V } from "./calendar-input/utils.js";
17
17
  import { Card as J } from "./card/component.js";
18
18
  import { Cell as Z } from "./cell/component.js";
19
19
  import { Checkbox as $ } from "./checkbox/component.js";
@@ -25,17 +25,17 @@ import { ConfirmPopup as so, showAlert as io, showConfirm as no } from "./confir
25
25
  import { CopyButton as lo } from "./copy-button/component.js";
26
26
  import { FormattedDate as co } from "./date/component.js";
27
27
  import { DateSwitcher as To } from "./date-switcher/component.js";
28
- import { DecoratedItem as ho } from "./decorated-item/component.js";
28
+ import { DecoratedItem as Ao } from "./decorated-item/component.js";
29
29
  import { Divider as go } from "./divider/component.js";
30
- import { Dot as Eo } from "./dot/component.js";
31
- import { EmptyPage as ko } from "./empty-page/component.js";
32
- import { FilterTag as _o } from "./filter-tag/component.js";
33
- import { Flex as Ro } from "./flex/component.js";
30
+ import { Dot as Co } from "./dot/component.js";
31
+ import { EmptyPage as Mo } from "./empty-page/component.js";
32
+ import { FilterTag as ko } from "./filter-tag/component.js";
33
+ import { Flex as Po } from "./flex/component.js";
34
34
  import { FlexColumns as Lo } from "./flex-columns/component.js";
35
35
  import { Footer as yo } from "./footer/component.js";
36
- import { FiltersForm as wo } from "./form/templates/filters-form/index.js";
37
- import { FormControl as Yo } from "./form-control/component.js";
38
- import { ErrorMessage as Ho, FastField as No, Field as vo, FieldArray as Uo, Form as zo, Formik as qo, connect as Ko, useField as Vo, useFormik as jo, useFormikContext as Jo, withFormik as Xo } from "formik";
36
+ import { FiltersForm as bo } from "./form/templates/filters-form/index.js";
37
+ import { FormControl as Go } from "./form-control/component.js";
38
+ import { ErrorMessage as Yo, FastField as vo, Field as Ho, FieldArray as Uo, Form as zo, Formik as qo, connect as Ko, useField as Vo, useFormik as jo, useFormikContext as Jo, withFormik as Xo } from "formik";
39
39
  import { Col as Qo, Grid as $o, Row as or } from "./grid/component.js";
40
40
  import { HeaderSearch as er } from "./header-search/component.js";
41
41
  import { useCrudFormRequests as pr } from "./hooks/use-crud-form-requests/index.js";
@@ -46,105 +46,105 @@ import { usePrevious as ur } from "./hooks/usePrevious/index.js";
46
46
  import { IconButton as dr } from "./icon-button/component.js";
47
47
  import { Image as cr } from "./image/component.js";
48
48
  import { textSizes as Tr } from "./image/types.js";
49
- import { GALLERY_IMAGE_SIZE as hr, getImageCdnHost as Ar, getImageSrc as gr, imageSizes as Cr, isEscapenavigatorImage as Er, isRuImageRegion as Dr } from "./image/utils.js";
50
- import { ImageGallery as Mr } from "./image-gallery/component.js";
51
- import { ImageUploader as Pr } from "./image-uploader/component.js";
52
- import { InfoBlockHeader as Fr } from "./info-block-header/component.js";
53
- import { InfoBlockItem as Br } from "./info-block-item/component.js";
54
- import { InfoBlockWrapper as br } from "./info-block-wrapper/component.js";
49
+ import { DEFAULT_IMAGE_DIMENSIONS as Ar, GALLERY_IMAGE_SIZE as hr, getImageCdnHost as gr, getImageSrc as Er, imageSizes as Cr, isEscapenavigatorImage as Dr, isRuImageRegion as Mr, resolveImageDimensions as _r } from "./image/utils.js";
50
+ import { ImageGallery as Fr } from "./image-gallery/component.js";
51
+ import { ImageUploader as Rr } from "./image-uploader/component.js";
52
+ import { InfoBlockHeader as Br } from "./info-block-header/component.js";
53
+ import { InfoBlockItem as Nr } from "./info-block-item/component.js";
54
+ import { InfoBlockWrapper as wr } from "./info-block-wrapper/component.js";
55
55
  import { Input as Wr } from "./input/component.js";
56
- import { InputAutocomplete as Gr } from "./input-autocomplete/component.js";
57
- import { InputGhost as Nr } from "./input-ghost/component.js";
58
- import { Link as Ur } from "./link/component.js";
59
- import { ListAllert as qr } from "./list-allert/component.js";
60
- import { Loader as Vr } from "./loader/component.js";
61
- import { MaskedInput as Jr, PLACEHOLDER_CHAR as Xr } from "./masked-input/component.js";
62
- import { Menu as Qr } from "./menu/component.js";
63
- import { Message as oe } from "./message/component.js";
64
- import { ModalContext as ee, ModalProvider as te } from "./modal/context.js";
65
- import { Mq as me } from "./mq/component.js";
66
- import { useMatchMedia as ae } from "./mq/use-match-media.js";
67
- import { Notification as se } from "./notification/component.js";
68
- import { Padding as ne } from "./padding/component.js";
69
- import { PageContainer as le } from "./page-container/component.js";
70
- import { PageLoading as Se } from "./page-loading/component.js";
71
- import { PageWithControls as Ie } from "./page-with-controls/component.js";
72
- import { LabeledButton as Oe } from "./picker-button/common/labeled-button/index.js";
73
- import { PickerButton as Ae } from "./picker-button/component.js";
74
- import { Popover as Ce } from "./popover/component.js";
75
- import { Portal as De } from "./portal/component.js";
76
- import { ProgressBar as Me } from "./progress-bar/component.js";
77
- import { ProgressIndex as Pe } from "./progress-index/component.js";
78
- import { Radio as Fe } from "./radio/component.js";
79
- import { RadioGroup as Be } from "./radio-group/component.js";
80
- import { RadioGroups as be } from "./radio-groups/component.js";
56
+ import { InputAutocomplete as vr } from "./input-autocomplete/component.js";
57
+ import { InputGhost as Ur } from "./input-ghost/component.js";
58
+ import { Link as qr } from "./link/component.js";
59
+ import { ListAllert as Vr } from "./list-allert/component.js";
60
+ import { Loader as Jr } from "./loader/component.js";
61
+ import { MaskedInput as Zr, PLACEHOLDER_CHAR as Qr } from "./masked-input/component.js";
62
+ import { Menu as oe } from "./menu/component.js";
63
+ import { Message as ee } from "./message/component.js";
64
+ import { ModalContext as pe, ModalProvider as me } from "./modal/context.js";
65
+ import { Mq as ae } from "./mq/component.js";
66
+ import { useMatchMedia as se } from "./mq/use-match-media.js";
67
+ import { Notification as ne } from "./notification/component.js";
68
+ import { Padding as le } from "./padding/component.js";
69
+ import { PageContainer as Se } from "./page-container/component.js";
70
+ import { PageLoading as Ie } from "./page-loading/component.js";
71
+ import { PageWithControls as Oe } from "./page-with-controls/component.js";
72
+ import { LabeledButton as he } from "./picker-button/common/labeled-button/index.js";
73
+ import { PickerButton as Ee } from "./picker-button/component.js";
74
+ import { Popover as De } from "./popover/component.js";
75
+ import { Portal as _e } from "./portal/component.js";
76
+ import { ProgressBar as Fe } from "./progress-bar/component.js";
77
+ import { ProgressIndex as Re } from "./progress-index/component.js";
78
+ import { Radio as Be } from "./radio/component.js";
79
+ import { RadioGroup as Ne } from "./radio-group/component.js";
80
+ import { RadioGroups as we } from "./radio-groups/component.js";
81
81
  import { SectionWrapper as We } from "./section-wrapper/component.js";
82
- import { Select as Ge } from "./select/component.js";
83
- import { Arrow as Ne } from "./select/components/arrow/component.js";
84
- import { BaseSelect as Ue } from "./select/components/base-select/component.js";
85
- import { SelectField as qe } from "./select/components/field/component.js";
86
- import { Optgroup as Ve } from "./select/components/optgroup/component.js";
87
- import { Option as Je } from "./select/components/option/component.js";
88
- import { OptionsList as Ze } from "./select/components/options-list/component.js";
89
- import { VirtualOptionsList as $e } from "./select/components/virtual-options-list/component.js";
90
- import { useLazyLoading as rt } from "./select/presets/use-lazy-loading/index.js";
91
- import { useSelectWithLoading as tt } from "./select/presets/use-select-with-loading/hook.js";
92
- import { convertToOptions as mt, isGroup as ft, isOptionShape as at, joinOptions as xt, lastIndexOf as st, processOptions as it, useVisibleOptions as nt } from "./select/utils.js";
93
- import { SettingsHint as lt } from "./settings-hint/component.js";
94
- import { SettingsInfoBlock as St } from "./settings-info-block/component.js";
95
- import { Sidepanel as It } from "./sidepanel/component.js";
96
- import { SidepanelHeader as Ot } from "./sidepanel-header/component.js";
97
- import { Skeleton as At } from "./skeleton/component.js";
98
- import { Space as Ct } from "./space/component.js";
99
- import { Spinner as Dt } from "./spinner/component.js";
100
- import { Stack as Mt } from "./stack/component.js";
101
- import { StackingContext as Pt, stackingOrder as Rt } from "./stack/context.js";
102
- import { Status as Lt } from "./status/component.js";
103
- import { SteppedProgressBar as yt, useSteps as bt } from "./stepped-progress-bar/index.js";
82
+ import { Select as ve } from "./select/component.js";
83
+ import { Arrow as Ue } from "./select/components/arrow/component.js";
84
+ import { BaseSelect as qe } from "./select/components/base-select/component.js";
85
+ import { SelectField as Ve } from "./select/components/field/component.js";
86
+ import { Optgroup as Je } from "./select/components/optgroup/component.js";
87
+ import { Option as Ze } from "./select/components/option/component.js";
88
+ import { OptionsList as $e } from "./select/components/options-list/component.js";
89
+ import { VirtualOptionsList as rt } from "./select/components/virtual-options-list/component.js";
90
+ import { useLazyLoading as tt } from "./select/presets/use-lazy-loading/index.js";
91
+ import { useSelectWithLoading as mt } from "./select/presets/use-select-with-loading/hook.js";
92
+ import { convertToOptions as at, isGroup as xt, isOptionShape as st, joinOptions as it, lastIndexOf as nt, processOptions as ut, useVisibleOptions as lt } from "./select/utils.js";
93
+ import { SettingsHint as St } from "./settings-hint/component.js";
94
+ import { SettingsInfoBlock as It } from "./settings-info-block/component.js";
95
+ import { Sidepanel as Ot } from "./sidepanel/component.js";
96
+ import { SidepanelHeader as ht } from "./sidepanel-header/component.js";
97
+ import { Skeleton as Et } from "./skeleton/component.js";
98
+ import { Space as Dt } from "./space/component.js";
99
+ import { Spinner as _t } from "./spinner/component.js";
100
+ import { Stack as Ft } from "./stack/component.js";
101
+ import { StackingContext as Rt, stackingOrder as Lt } from "./stack/context.js";
102
+ import { Status as yt } from "./status/component.js";
103
+ import { SteppedProgressBar as bt, useSteps as wt } from "./stepped-progress-bar/index.js";
104
104
  import { Sticker as Wt } from "./sticker/component.js";
105
- import { SuffixInput as Gt } from "./suffix-input/component.js";
106
- import { SuperListHeader as Nt } from "./super-list-header/component.js";
107
- import { SuperListItem as Ut } from "./super-list-item/component.js";
108
- import { Switch as qt } from "./switch/component.js";
109
- import { Table as Vt } from "./table/component.js";
110
- import { TableCell as Jt } from "./table/components/cell/component.js";
111
- import { TableStatus as Zt } from "./table-status/component.js";
112
- import { Tag as $t } from "./tag/component.js";
113
- import { TagsList as rp } from "./tags-list/component.js";
114
- import { Textarea as tp } from "./textarea/component.js";
115
- import { LOACAL_STORAGE_THEME_KEY as mp, STYLE_TAG_ID as fp, THEME as ap, THEME_DATA_ATTR as xp, ThemeProvider as sp, useTheme as ip } from "./theme-provider/component.js";
116
- import { defaultThemes as up } from "./theme-provider/default-themes.js";
117
- import { Toast as dp } from "./toast/component.js";
118
- import { ToastNotifier as cp } from "./toast-notifier/component.js";
119
- import { ToastPlate as Tp } from "./toast-plate/component.js";
120
- import { Tooltip as hp } from "./tooltip/component.js";
121
- import { Typography as gp } from "./typography/component.js";
122
- import { add as Ep, addDays as Dp, addMonths as kp, addYears as Mp, eachDayOfInterval as _p, eachMonthOfInterval as Pp, eachYearOfInterval as Rp, endOfDay as Fp, endOfISOWeek as Lp, endOfWeek as Bp, endOfYear as yp, format as bp, isAfter as wp, isBefore as Wp, isEqual as Yp, isLastDayOfMonth as Gp, isSameDay as Hp, isSameMonth as Np, isSameYear as vp, isThisMonth as Up, isThisYear as zp, isToday as qp, isWithinInterval as Kp, lastDayOfMonth as Vp, max as jp, min as Jp, parse as Xp, parseISO as Zp, startOfDay as Qp, startOfISOWeek as $p, startOfMonth as om, startOfWeek as rm, startOfYear as em, subDays as tm, subMonths as pm, subWeeks as mm, subYears as fm, weekDaysShort as am } from "./utils/date/index.js";
123
- import { debounce as sm } from "./utils/debounce.js";
124
- import { AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR as nm, THINSP as um, formatAmount as lm, isCurrencyFirst as dm } from "./utils/format-amount/util.js";
125
- import { formatDate as cm, locales as Im } from "./utils/format-date/index.js";
126
- import { safeStringify as Om } from "./utils/safe-stringify.js";
127
- import { showCompactSuccess as Am, showError as gm, showSuccess as Cm } from "./utils/show-toast/index.js";
128
- import { splitAmount as Dm } from "./utils/split-amount/util.js";
129
- import { capitalize as Mm } from "./utils/string.js";
130
- import { WelcomeContainer as Pm } from "./welcome-layout/component.js";
131
- import { withSuffix as Fm } from "./with-suffix/component.js";
105
+ import { SuffixInput as vt } from "./suffix-input/component.js";
106
+ import { SuperListHeader as Ut } from "./super-list-header/component.js";
107
+ import { SuperListItem as qt } from "./super-list-item/component.js";
108
+ import { Switch as Vt } from "./switch/component.js";
109
+ import { Table as Jt } from "./table/component.js";
110
+ import { TableCell as Zt } from "./table/components/cell/component.js";
111
+ import { TableStatus as $t } from "./table-status/component.js";
112
+ import { Tag as rp } from "./tag/component.js";
113
+ import { TagsList as tp } from "./tags-list/component.js";
114
+ import { Textarea as mp } from "./textarea/component.js";
115
+ import { LOACAL_STORAGE_THEME_KEY as ap, STYLE_TAG_ID as xp, THEME as sp, THEME_DATA_ATTR as ip, ThemeProvider as np, useTheme as up } from "./theme-provider/component.js";
116
+ import { defaultThemes as dp } from "./theme-provider/default-themes.js";
117
+ import { Toast as cp } from "./toast/component.js";
118
+ import { ToastNotifier as Tp } from "./toast-notifier/component.js";
119
+ import { ToastPlate as Ap } from "./toast-plate/component.js";
120
+ import { Tooltip as gp } from "./tooltip/component.js";
121
+ import { Typography as Cp } from "./typography/component.js";
122
+ import { add as Mp, addDays as _p, addMonths as kp, addYears as Fp, eachDayOfInterval as Pp, eachMonthOfInterval as Rp, eachYearOfInterval as Lp, endOfDay as Bp, endOfISOWeek as yp, endOfWeek as Np, endOfYear as bp, format as wp, isAfter as Gp, isBefore as Wp, isEqual as Yp, isLastDayOfMonth as vp, isSameDay as Hp, isSameMonth as Up, isSameYear as zp, isThisMonth as qp, isThisYear as Kp, isToday as Vp, isWithinInterval as jp, lastDayOfMonth as Jp, max as Xp, min as Zp, parse as Qp, parseISO as $p, startOfDay as om, startOfISOWeek as rm, startOfMonth as em, startOfWeek as tm, startOfYear as pm, subDays as mm, subMonths as fm, subWeeks as am, subYears as xm, weekDaysShort as sm } from "./utils/date/index.js";
123
+ import { debounce as nm } from "./utils/debounce.js";
124
+ import { AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR as lm, THINSP as dm, formatAmount as Sm, isCurrencyFirst as cm } from "./utils/format-amount/util.js";
125
+ import { formatDate as Tm, locales as Om } from "./utils/format-date/index.js";
126
+ import { safeStringify as hm } from "./utils/safe-stringify.js";
127
+ import { showCompactSuccess as Em, showError as Cm, showSuccess as Dm } from "./utils/show-toast/index.js";
128
+ import { splitAmount as _m } from "./utils/split-amount/util.js";
129
+ import { capitalize as Fm } from "./utils/string.js";
130
+ import { WelcomeContainer as Rm } from "./welcome-layout/component.js";
131
+ import { withSuffix as Bm } from "./with-suffix/component.js";
132
132
  export {
133
- nm as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
133
+ lm as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
134
134
  e as Amount,
135
135
  p as AmountInput,
136
- Ne as Arrow,
136
+ Ue as Arrow,
137
137
  f as Avatar,
138
138
  x as BackButton,
139
139
  i as Badge,
140
140
  u as BaseCard,
141
- Ue as BaseSelect,
141
+ qe as BaseSelect,
142
142
  d as BottomSheet,
143
143
  c as Box,
144
- h as Button,
144
+ A as Button,
145
145
  g as ButtonArrow,
146
- E as Calendar,
147
- Y as CalendarInput,
146
+ C as Calendar,
147
+ G as CalendarInput,
148
148
  J as Card,
149
149
  Z as Cell,
150
150
  $ as Checkbox,
@@ -155,186 +155,188 @@ export {
155
155
  ao as Collapse,
156
156
  so as ConfirmPopup,
157
157
  lo as CopyButton,
158
- H as DATE_FORMAT,
159
- N as DATE_MASK,
160
- R as DAYS_IN_WEEK,
158
+ Y as DATE_FORMAT,
159
+ v as DATE_MASK,
160
+ P as DAYS_IN_WEEK,
161
+ Ar as DEFAULT_IMAGE_DIMENSIONS,
161
162
  To as DateSwitcher,
162
- ho as DecoratedItem,
163
+ Ao as DecoratedItem,
163
164
  go as Divider,
164
- Eo as Dot,
165
- ko as EmptyPage,
166
- Ho as ErrorMessage,
167
- No as FastField,
168
- vo as Field,
165
+ Co as Dot,
166
+ Mo as EmptyPage,
167
+ Yo as ErrorMessage,
168
+ vo as FastField,
169
+ Ho as Field,
169
170
  Uo as FieldArray,
170
- _o as FilterTag,
171
- wo as FiltersForm,
172
- Ro as Flex,
171
+ ko as FilterTag,
172
+ bo as FiltersForm,
173
+ Po as Flex,
173
174
  Lo as FlexColumns,
174
175
  yo as Footer,
175
176
  zo as Form,
176
- Yo as FormControl,
177
+ Go as FormControl,
177
178
  co as FormattedDate,
178
179
  qo as Formik,
179
180
  hr as GALLERY_IMAGE_SIZE,
180
181
  $o as Grid,
181
182
  er as HeaderSearch,
182
- v as IS_BROWSER,
183
+ H as IS_BROWSER,
183
184
  dr as IconButton,
184
185
  cr as Image,
185
- Mr as ImageGallery,
186
- Pr as ImageUploader,
187
- Fr as InfoBlockHeader,
188
- Br as InfoBlockItem,
189
- br as InfoBlockWrapper,
186
+ Fr as ImageGallery,
187
+ Rr as ImageUploader,
188
+ Br as InfoBlockHeader,
189
+ Nr as InfoBlockItem,
190
+ wr as InfoBlockWrapper,
190
191
  Wr as Input,
191
- Gr as InputAutocomplete,
192
- Nr as InputGhost,
193
- mp as LOACAL_STORAGE_THEME_KEY,
194
- Oe as LabeledButton,
195
- Ur as Link,
196
- qr as ListAllert,
197
- Vr as Loader,
198
- F as MONTHS_IN_YEAR,
199
- Jr as MaskedInput,
200
- Qr as Menu,
201
- oe as Message,
202
- ee as ModalContext,
203
- te as ModalProvider,
204
- me as Mq,
192
+ vr as InputAutocomplete,
193
+ Ur as InputGhost,
194
+ ap as LOACAL_STORAGE_THEME_KEY,
195
+ he as LabeledButton,
196
+ qr as Link,
197
+ Vr as ListAllert,
198
+ Jr as Loader,
199
+ R as MONTHS_IN_YEAR,
200
+ Zr as MaskedInput,
201
+ oe as Menu,
202
+ ee as Message,
203
+ pe as ModalContext,
204
+ me as ModalProvider,
205
+ ae as Mq,
205
206
  U as NATIVE_DATE_FORMAT,
206
- se as Notification,
207
- Ve as Optgroup,
208
- Je as Option,
209
- Ze as OptionsList,
210
- Xr as PLACEHOLDER_CHAR,
211
- ne as Padding,
212
- le as PageContainer,
213
- Se as PageLoading,
214
- Ie as PageWithControls,
215
- Ae as PickerButton,
216
- Ce as Popover,
217
- De as Portal,
218
- Me as ProgressBar,
219
- Pe as ProgressIndex,
220
- Fe as Radio,
221
- Be as RadioGroup,
222
- be as RadioGroups,
207
+ ne as Notification,
208
+ Je as Optgroup,
209
+ Ze as Option,
210
+ $e as OptionsList,
211
+ Qr as PLACEHOLDER_CHAR,
212
+ le as Padding,
213
+ Se as PageContainer,
214
+ Ie as PageLoading,
215
+ Oe as PageWithControls,
216
+ Ee as PickerButton,
217
+ De as Popover,
218
+ _e as Portal,
219
+ Fe as ProgressBar,
220
+ Re as ProgressIndex,
221
+ Be as Radio,
222
+ Ne as RadioGroup,
223
+ we as RadioGroups,
223
224
  I as Radiuses,
224
225
  or as Row,
225
- fp as STYLE_TAG_ID,
226
+ xp as STYLE_TAG_ID,
226
227
  L as SUNDAY_INDEX,
227
228
  z as SUPPORTS_INPUT_TYPE_DATE,
228
229
  We as SectionWrapper,
229
- Ge as Select,
230
- qe as SelectField,
231
- lt as SettingsHint,
232
- St as SettingsInfoBlock,
233
- It as Sidepanel,
234
- Ot as SidepanelHeader,
235
- At as Skeleton,
236
- Ct as Space,
230
+ ve as Select,
231
+ Ve as SelectField,
232
+ St as SettingsHint,
233
+ It as SettingsInfoBlock,
234
+ Ot as Sidepanel,
235
+ ht as SidepanelHeader,
236
+ Et as Skeleton,
237
+ Dt as Space,
237
238
  T as Spaces,
238
- Dt as Spinner,
239
- Mt as Stack,
240
- Pt as StackingContext,
241
- Lt as Status,
242
- yt as SteppedProgressBar,
239
+ _t as Spinner,
240
+ Ft as Stack,
241
+ Rt as StackingContext,
242
+ yt as Status,
243
+ bt as SteppedProgressBar,
243
244
  Wt as Sticker,
244
- Gt as SuffixInput,
245
- Nt as SuperListHeader,
246
- Ut as SuperListItem,
247
- qt as Switch,
248
- ap as THEME,
249
- xp as THEME_DATA_ATTR,
250
- um as THINSP,
251
- Vt as Table,
252
- Jt as TableCell,
253
- Zt as TableStatus,
254
- $t as Tag,
255
- rp as TagsList,
256
- tp as Textarea,
257
- sp as ThemeProvider,
258
- dp as Toast,
259
- cp as ToastNotifier,
260
- Tp as ToastPlate,
261
- hp as Tooltip,
262
- gp as Typography,
263
- $e as VirtualOptionsList,
264
- Pm as WelcomeContainer,
265
- Ep as add,
266
- Dp as addDays,
245
+ vt as SuffixInput,
246
+ Ut as SuperListHeader,
247
+ qt as SuperListItem,
248
+ Vt as Switch,
249
+ sp as THEME,
250
+ ip as THEME_DATA_ATTR,
251
+ dm as THINSP,
252
+ Jt as Table,
253
+ Zt as TableCell,
254
+ $t as TableStatus,
255
+ rp as Tag,
256
+ tp as TagsList,
257
+ mp as Textarea,
258
+ np as ThemeProvider,
259
+ cp as Toast,
260
+ Tp as ToastNotifier,
261
+ Ap as ToastPlate,
262
+ gp as Tooltip,
263
+ Cp as Typography,
264
+ rt as VirtualOptionsList,
265
+ Rm as WelcomeContainer,
266
+ Mp as add,
267
+ _p as addDays,
267
268
  kp as addMonths,
268
- Mp as addYears,
269
- Mm as capitalize,
269
+ Fp as addYears,
270
+ Fm as capitalize,
270
271
  Ko as connect,
271
- mt as convertToOptions,
272
+ at as convertToOptions,
272
273
  B as dateInLimits,
273
- sm as debounce,
274
- up as defaultThemes,
275
- _p as eachDayOfInterval,
276
- Pp as eachMonthOfInterval,
277
- Rp as eachYearOfInterval,
278
- Fp as endOfDay,
279
- Lp as endOfISOWeek,
280
- Bp as endOfWeek,
281
- yp as endOfYear,
282
- bp as format,
283
- lm as formatAmount,
284
- cm as formatDate,
285
- Ar as getImageCdnHost,
286
- gr as getImageSrc,
274
+ nm as debounce,
275
+ dp as defaultThemes,
276
+ Pp as eachDayOfInterval,
277
+ Rp as eachMonthOfInterval,
278
+ Lp as eachYearOfInterval,
279
+ Bp as endOfDay,
280
+ yp as endOfISOWeek,
281
+ Np as endOfWeek,
282
+ bp as endOfYear,
283
+ wp as format,
284
+ Sm as formatAmount,
285
+ Tm as formatDate,
286
+ gr as getImageCdnHost,
287
+ Er as getImageSrc,
287
288
  Cr as imageSizes,
288
- wp as isAfter,
289
+ Gp as isAfter,
289
290
  Wp as isBefore,
290
291
  q as isCompleteDateInput,
291
- dm as isCurrencyFirst,
292
+ cm as isCurrencyFirst,
292
293
  Yp as isEqual,
293
- Er as isEscapenavigatorImage,
294
- ft as isGroup,
294
+ Dr as isEscapenavigatorImage,
295
+ xt as isGroup,
295
296
  K as isInputDateSupported,
296
- Gp as isLastDayOfMonth,
297
- at as isOptionShape,
298
- Dr as isRuImageRegion,
297
+ vp as isLastDayOfMonth,
298
+ st as isOptionShape,
299
+ Mr as isRuImageRegion,
299
300
  Hp as isSameDay,
300
- Np as isSameMonth,
301
- vp as isSameYear,
302
- Up as isThisMonth,
303
- zp as isThisYear,
304
- qp as isToday,
305
- Kp as isWithinInterval,
306
- xt as joinOptions,
307
- Vp as lastDayOfMonth,
308
- st as lastIndexOf,
301
+ Up as isSameMonth,
302
+ zp as isSameYear,
303
+ qp as isThisMonth,
304
+ Kp as isThisYear,
305
+ Vp as isToday,
306
+ jp as isWithinInterval,
307
+ it as joinOptions,
308
+ Jp as lastDayOfMonth,
309
+ nt as lastIndexOf,
309
310
  y as limitDate,
310
- Im as locales,
311
- jp as max,
312
- Jp as min,
313
- b as monthName,
314
- Xp as parse,
311
+ Om as locales,
312
+ Xp as max,
313
+ Zp as min,
314
+ N as monthName,
315
+ Qp as parse,
315
316
  V as parseDateString,
316
- Zp as parseISO,
317
- it as processOptions,
318
- w as russianWeekDay,
319
- Om as safeStringify,
317
+ $p as parseISO,
318
+ ut as processOptions,
319
+ _r as resolveImageDimensions,
320
+ b as russianWeekDay,
321
+ hm as safeStringify,
320
322
  io as showAlert,
321
- Am as showCompactSuccess,
323
+ Em as showCompactSuccess,
322
324
  no as showConfirm,
323
- gm as showError,
324
- Cm as showSuccess,
325
- Dm as splitAmount,
326
- Rt as stackingOrder,
327
- Qp as startOfDay,
328
- $p as startOfISOWeek,
329
- om as startOfMonth,
330
- rm as startOfWeek,
331
- em as startOfYear,
332
- tm as subDays,
333
- pm as subMonths,
334
- mm as subWeeks,
335
- fm as subYears,
325
+ Cm as showError,
326
+ Dm as showSuccess,
327
+ _m as splitAmount,
328
+ Lt as stackingOrder,
329
+ om as startOfDay,
330
+ rm as startOfISOWeek,
331
+ em as startOfMonth,
332
+ tm as startOfWeek,
333
+ pm as startOfYear,
334
+ mm as subDays,
335
+ fm as subMonths,
336
+ am as subWeeks,
337
+ xm as subYears,
336
338
  Tr as textSizes,
337
- k as useCalendar,
339
+ M as useCalendar,
338
340
  xr as useClickOutside,
339
341
  pr as useCrudFormRequests,
340
342
  Vo as useField,
@@ -342,15 +344,15 @@ export {
342
344
  jo as useFormik,
343
345
  Jo as useFormikContext,
344
346
  fr as useGetOne,
345
- rt as useLazyLoading,
346
- ae as useMatchMedia,
347
- _ as usePeriod,
347
+ tt as useLazyLoading,
348
+ se as useMatchMedia,
349
+ k as usePeriod,
348
350
  ur as usePrevious,
349
- tt as useSelectWithLoading,
350
- bt as useSteps,
351
- ip as useTheme,
352
- nt as useVisibleOptions,
353
- am as weekDaysShort,
351
+ mt as useSelectWithLoading,
352
+ wt as useSteps,
353
+ up as useTheme,
354
+ lt as useVisibleOptions,
355
+ sm as weekDaysShort,
354
356
  Xo as withFormik,
355
- Fm as withSuffix
357
+ Bm as withSuffix
356
358
  };
@@ -27,6 +27,13 @@ declare const CURRENCY_SYMBOLS: {
27
27
  CAD: string;
28
28
  AUD: string;
29
29
  ILS: string;
30
+ NZD: string;
31
+ ARS: string;
32
+ BRL: string;
33
+ TWD: string;
34
+ MXN: string;
35
+ JPY: string;
36
+ SGD: string;
30
37
  };
31
38
  export type CurrencyCodes = keyof typeof CURRENCY_SYMBOLS;
32
39
  export declare const currency: {
@@ -1,4 +1,4 @@
1
- const K = {
1
+ const R = {
2
2
  EUR: "€",
3
3
  RUR: "руб.",
4
4
  RUB: "руб.",
@@ -47,122 +47,18 @@ const K = {
47
47
  // Турецкая лира
48
48
  CAD: "C$",
49
49
  AUD: "$",
50
- ILS: "₪"
51
- // ALL: '\u004c\u0065\u006b',
52
- // AFN: '\u060b',
53
- // ARS: '\u0024',
54
- // AWG: '\u0192',
55
- // AZN: '\u20bc',
56
- // BSD: '\u0024',
57
- // BBD: '\u0024',
58
- // BYN: '\u0042\u0072',
59
- // BZD: '\u0042\u005a\u0024',
60
- // BMD: '\u0024',
61
- // BOB: '\u0024\u0062',
62
- // BAM: '\u004b\u004d',
63
- // BWP: '\u0050',
64
- // BGN: '\u043b\u0432',
65
- // BRL: '\u0052\u0024',
66
- // BND: '\u0024',
67
- // KHR: '\u17db',
68
- // KYD: '\u0024',
69
- // CLP: '\u0024',
70
- // CNY: '\u00a5',
71
- // COP: '\u0024',
72
- // CRC: '\u20a1',
73
- // HRK: '\u006b\u006e',
74
- // CUP: '\u20b1',
75
- // CZK: '\u004b\u010d',
76
- // DKK: '\u006b\u0072',
77
- // DOP: '\u0052\u0044\u0024',
78
- // XCD: '\u0024',
79
- // EGP: '\u00a3',
80
- // SVC: '\u0024',
81
- // EEK: '\u006b\u0072',
82
- // EUR: '\u20ac',
83
- // FKP: '\u00a3',
84
- // FJD: '\u0024',
85
- // FRF: '\u20a3',
86
- // GHC: '\u00a2',
87
- // GIP: '\u00a3',
88
- // GTQ: '\u0051',
89
- // GGP: '\u00a3',
90
- // GYD: '\u0024',
91
- // HNL: '\u004c',
92
- // HKD: '\u0024',
93
- // HUF: '\u0046\u0074',
94
- // ISK: '\u006b\u0072',
95
- // INR: '\u20a8',
96
- // IDR: '\u0052\u0070',
97
- // IRR: '\ufdfc',
98
- // IMP: '\u00a3',
99
- // ILS: '\u20aa',
100
- // JMD: '\u004a\u0024',
101
- // JPY: '\u00a5',
102
- // JEP: '\u00a3',
103
- // KZT: '\u20B8',
104
- // KGS: '\u004B\u0047\u0053',
105
- // LAK: '\u20ad',
106
- // LVL: '\u004c\u0073',
107
- // LBP: '\u00a3',
108
- // LRD: '\u0024',
109
- // LTL: '\u004c\u0074',
110
- // MKD: '\u0434\u0435\u043d',
111
- // MYR: '\u0052\u004d',
112
- // MUR: '\u20a8',
113
- // MXN: '\u0024',
114
- // MNT: '\u20ae',
115
- // MZN: '\u004d\u0054',
116
- // NAD: '\u0024',
117
- // NPR: '\u20a8',
118
- // ANG: '\u0192',
119
- // NZD: '\u0024',
120
- // NIO: '\u0043\u0024',
121
- // NGN: '\u20a6',
122
- // KPW: '\u20a9',
123
- // NOK: '\u006b\u0072',
124
- // OMR: '\ufdfc',
125
- // PKR: '\u20a8',
126
- // PAB: '\u0042\u002f\u002e',
127
- // PYG: '\u0047\u0073',
128
- // PEN: '\u0053\u002f\u002e',
129
- // PHP: '\u20b1',
130
- // PLN: '\u007a\u0142',
131
- // QAR: '\ufdfc',
132
- // RON: '\u006c\u0065\u0069',
133
- // RUR: '\u20bd',
134
- // SHP: '\u00a3',
135
- // SAR: '\ufdfc',
136
- // RSD: '\u0414\u0438\u043d\u002e',
137
- // SCR: '\u20a8',
138
- // SGD: '\u0024',
139
- // SBD: '\u0024',
140
- // SOS: '\u0053',
141
- // ZAR: '\u0052',
142
- // KRW: '\u20a9',
143
- // LKR: '\u20a8',
144
- // SEK: '\u006b\u0072',
145
- // CHF: '\u20a3',
146
- // SRD: '\u0024',
147
- // SYP: '\u00a3',
148
- // TWD: '\u004e\u0054\u0024',
149
- // THB: '\u0e3f',
150
- // TTD: '\u0054\u0054\u0024',
151
- // TRY: '\u20ba',
152
- // TRL: '\u20ba',
153
- // TVD: '\u0024',
154
- // UAH: '\u20b4',
155
- // GBP: '\u00a3',
156
- // USD: '\u0024',
157
- // UYU: '\u0024\u0055',
158
- // UZS: '\u043b\u0432',
159
- // VEF: '\u0042\u0073',
160
- // VND: '\u20ab',
161
- // YER: '\ufdfc',
162
- // ZWD: '\u005a\u0024',
163
- }, R = {
164
- CURRENCY_SYMBOLS: K
50
+ ILS: "₪",
51
+ // Markets we may enable later (countries currently bill in EUR)
52
+ NZD: "$",
53
+ ARS: "$",
54
+ BRL: "R$",
55
+ TWD: "NT$",
56
+ MXN: "$",
57
+ JPY: "¥",
58
+ SGD: "$"
59
+ }, D = {
60
+ CURRENCY_SYMBOLS: R
165
61
  };
166
62
  export {
167
- R as currency
63
+ D as currency
168
64
  };
@@ -11,7 +11,7 @@ function L(t) {
11
11
  const e = new Date(t);
12
12
  return new Date(e.getFullYear(), 11, 31, 23, 59, 59, 999);
13
13
  }
14
- function O(t) {
14
+ function T(t) {
15
15
  const e = new Date(t);
16
16
  return new Date(e.getFullYear(), e.getMonth() + 1, 0, 0, 0, 0, 0);
17
17
  }
@@ -23,12 +23,12 @@ function M(t) {
23
23
  const e = new Date(t);
24
24
  return new Date(e.getFullYear(), e.getMonth(), e.getDate(), 23, 59, 59, 999);
25
25
  }
26
- function p(t) {
26
+ function O(t) {
27
27
  const e = new Date(t.getFullYear(), t.getMonth(), t.getDate()), n = e.getDay(), r = n === 0 ? -6 : 1 - n;
28
28
  return e.setDate(e.getDate() + r), new Date(e.getFullYear(), e.getMonth(), e.getDate(), 0, 0, 0, 0);
29
29
  }
30
30
  function W(t) {
31
- return M(i(p(t), 6));
31
+ return M(i(O(t), 6));
32
32
  }
33
33
  function N(t, e) {
34
34
  const n = e?.weekStartsOn ?? 0, r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), o = (r.getDay() - n + 7) % 7;
@@ -75,7 +75,7 @@ function _(t, e) {
75
75
  function q(t, e) {
76
76
  return i(t, -7 * e);
77
77
  }
78
- function G(t) {
78
+ function C(t) {
79
79
  let e = D(t.start);
80
80
  const n = D(t.end);
81
81
  if (e > n) return [];
@@ -84,7 +84,7 @@ function G(t) {
84
84
  r.push(new Date(e)), e = i(e, 1);
85
85
  return r;
86
86
  }
87
- function R(t) {
87
+ function G(t) {
88
88
  let e = m(t.start);
89
89
  const n = m(t.end);
90
90
  if (e > n) return [];
@@ -93,7 +93,7 @@ function R(t) {
93
93
  r.push(new Date(e)), e = f(e, 1);
94
94
  return r;
95
95
  }
96
- function $(t) {
96
+ function R(t) {
97
97
  const e = l(t.start).getFullYear(), n = l(t.end).getFullYear(), r = Math.min(e, n), a = Math.max(e, n), o = [];
98
98
  for (let s = r; s <= a; s += 1)
99
99
  o.push(new Date(s, 0, 1));
@@ -108,13 +108,13 @@ function S(t, e) {
108
108
  function k(t, e) {
109
109
  return t.getFullYear() === e.getFullYear();
110
110
  }
111
- function j(t, e) {
111
+ function $(t, e) {
112
112
  return t.getTime() < e.getTime();
113
113
  }
114
- function z(t, e) {
114
+ function j(t, e) {
115
115
  return t.getTime() > e.getTime();
116
116
  }
117
- function C(t) {
117
+ function z(t) {
118
118
  return new Date(Math.max(...t.map((e) => new Date(e).getTime())));
119
119
  }
120
120
  function J(t) {
@@ -124,7 +124,7 @@ function K(t, e) {
124
124
  return new Date(t).getTime() === new Date(e).getTime();
125
125
  }
126
126
  function Q(t) {
127
- return t.getDate() === O(t).getDate();
127
+ return t.getDate() === T(t).getDate();
128
128
  }
129
129
  function U(t, e) {
130
130
  const n = t.getTime();
@@ -143,11 +143,13 @@ function v(t) {
143
143
  return new Date(t);
144
144
  }
145
145
  function tt(t) {
146
- const e = new Date(2021, 5, 7, 12, 0, 0, 0);
147
- return Array.from(
148
- { length: 7 },
149
- (n, r) => new Intl.DateTimeFormat(t, { weekday: "short" }).format(i(e, r))
150
- );
146
+ const e = new Date(2021, 5, 7, 12, 0, 0, 0), n = t.toLowerCase().startsWith("pt");
147
+ return Array.from({ length: 7 }, (r, a) => {
148
+ const o = new Intl.DateTimeFormat(t, { weekday: "short" }).format(
149
+ i(e, a)
150
+ );
151
+ return n ? o.replace(/[^\p{L}]/gu, "").slice(0, 3) : o;
152
+ });
151
153
  }
152
154
  function y(t, e, n) {
153
155
  return new Intl.DateTimeFormat(e, { day: "numeric", month: n }).formatToParts(
@@ -171,8 +173,8 @@ function et(t, e, n) {
171
173
  [/yy/g, () => c(a % 100)]
172
174
  ];
173
175
  let g = e;
174
- return d.forEach(([F, T]) => {
175
- g = g.replace(F, T);
176
+ return d.forEach(([F, p]) => {
177
+ g = g.replace(F, p);
176
178
  }), g;
177
179
  }
178
180
  function I(t, e) {
@@ -206,16 +208,16 @@ export {
206
208
  i as addDays,
207
209
  f as addMonths,
208
210
  w as addYears,
209
- G as eachDayOfInterval,
210
- R as eachMonthOfInterval,
211
- $ as eachYearOfInterval,
211
+ C as eachDayOfInterval,
212
+ G as eachMonthOfInterval,
213
+ R as eachYearOfInterval,
212
214
  M as endOfDay,
213
215
  W as endOfISOWeek,
214
216
  P as endOfWeek,
215
217
  L as endOfYear,
216
218
  et as format,
217
- z as isAfter,
218
- j as isBefore,
219
+ j as isAfter,
220
+ $ as isBefore,
219
221
  K as isEqual,
220
222
  Q as isLastDayOfMonth,
221
223
  x as isSameDay,
@@ -225,13 +227,13 @@ export {
225
227
  Z as isThisYear,
226
228
  V as isToday,
227
229
  U as isWithinInterval,
228
- O as lastDayOfMonth,
229
- C as max,
230
+ T as lastDayOfMonth,
231
+ z as max,
230
232
  J as min,
231
233
  H as parse,
232
234
  v as parseISO,
233
235
  D as startOfDay,
234
- p as startOfISOWeek,
236
+ O as startOfISOWeek,
235
237
  m as startOfMonth,
236
238
  N as startOfWeek,
237
239
  l as startOfYear,
@@ -1,45 +1,45 @@
1
- import { currency as M } from "../data/currency-codes.js";
1
+ import { currency as R } from "../data/currency-codes.js";
2
2
  import { getCurrencySymbol as _ } from "../get-currency-symbol/util.js";
3
3
  import { splitAmount as C } from "../split-amount/util.js";
4
- const O = 3, R = 4, T = "−", a = " ", l = ",", S = (t) => t === "USD" || t === "CHF" || t === "GBP" || t === "CAD" || t === "AUD" || t === "TRY" || t === "GEL" || t === "ILS" || t === "UAH", N = (t, r, n) => r ? t ? S(n) ? `${r}${a}${t}` : `${t}${a}${r}` : "" : t, U = (t) => t ? t.length > 2 ? t.slice(0, 2) : t.length < 2 ? `${t}0` : t : "00", h = (t, r, n) => {
5
- const o = U(t);
6
- return !n && o === "00" ? null : !n && o[1] === "0" ? o.slice(0, 1) : o === "00" && !r ? null : o;
7
- }, d = ({
4
+ const O = 3, S = 4, T = "−", a = " ", e = ",", l = (t) => t === "USD" || t === "CHF" || t === "GBP" || t === "CAD" || t === "AUD" || t === "NZD" || t === "ARS" || t === "BRL" || t === "TWD" || t === "MXN" || t === "JPY" || t === "SGD" || t === "TRY" || t === "GEL" || t === "ILS" || t === "UAH", N = (t, o, i) => o ? t ? l(i) ? `${o}${a}${t}` : `${t}${a}${o}` : "" : t, U = (t) => t ? t.length > 2 ? t.slice(0, 2) : t.length < 2 ? `${t}0` : t : "00", h = (t, o, i) => {
5
+ const r = U(t);
6
+ return !i && r === "00" ? null : !i && r[1] === "0" ? r.slice(0, 1) : r === "00" && !o ? null : r;
7
+ }, $ = ({
8
8
  value: t,
9
- currency: r,
10
- showMinorPart: n,
11
- type: o
9
+ currency: o,
10
+ showMinorPart: i,
11
+ type: r
12
12
  }) => {
13
- const e = !!r && !!M.CURRENCY_SYMBOLS[r], i = e ? _(r) : r;
13
+ const m = !!o && !!R.CURRENCY_SYMBOLS[o], n = m ? _(o) : o;
14
14
  if (t === null)
15
15
  return {
16
16
  majorPart: "",
17
17
  minorPart: "",
18
18
  formatted: "",
19
- currencySymbol: i,
19
+ currencySymbol: n,
20
20
  formattedWithCurrency: ""
21
21
  };
22
- const [P, s] = o === "default" ? `${t}`.split(".") : [`${t}`.slice(0, -2), `${t}`.slice(-2)], m = C(
23
- `${Math.abs(+P || 0)}`,
22
+ const [M, s] = r === "default" ? `${t}`.split(".") : [`${t}`.slice(0, -2), `${t}`.slice(-2)], A = C(
23
+ `${Math.abs(+M || 0)}`,
24
24
  O,
25
25
  a,
26
- R
27
- ), f = t < 0 ? T + m : m, A = s ? f + l + s : f;
26
+ S
27
+ ), f = t < 0 ? T + A : A, P = s ? f + e + s : f;
28
28
  return {
29
29
  majorPart: f,
30
- minorPart: h(s, n, e),
31
- currencySymbol: i,
32
- formatted: A,
30
+ minorPart: h(s, i, m),
31
+ currencySymbol: n,
32
+ formatted: P,
33
33
  formattedWithCurrency: N(
34
- A,
35
- i || "",
36
- r
34
+ P,
35
+ n || "",
36
+ o
37
37
  )
38
38
  };
39
39
  };
40
40
  export {
41
- l as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
41
+ e as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
42
42
  a as THINSP,
43
- d as formatAmount,
44
- S as isCurrencyFirst
43
+ $ as formatAmount,
44
+ l as isCurrencyFirst
45
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alphakits/ui",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "files": [
5
5
  "dist"
6
6
  ],