@arc-ui/components 12.0.0-beta.18 → 12.0.0-beta.20
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/lib/Alert/Alert.cjs +1 -1
- package/lib/Alert/Alert.mjs +1 -1
- package/lib/Alert/styles.css +1 -1
- package/lib/Align/styles.css +1 -1
- package/lib/AppButton/styles.css +1 -1
- package/lib/Avatar/Avatar.cjs +2 -1
- package/lib/Avatar/Avatar.mjs +2 -1
- package/lib/Avatar/styles.css +1 -1
- package/lib/AvatarGroup/AvatarGroup.cjs +2 -1
- package/lib/AvatarGroup/AvatarGroup.mjs +2 -1
- package/lib/AvatarGroup/styles.css +1 -1
- package/lib/Badge/styles.css +1 -1
- package/lib/Banner/Banner.cjs +2 -3
- package/lib/Banner/Banner.mjs +2 -3
- package/lib/Box/styles.css +1 -1
- package/lib/BrandLogo/styles.css +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.cjs +2 -1
- package/lib/Breadcrumbs/Breadcrumbs.mjs +2 -1
- package/lib/Breadcrumbs/styles.css +1 -1
- package/lib/Button/Button.cjs +2 -2
- package/lib/Button/Button.mjs +2 -2
- package/lib/Button/styles.css +1 -1
- package/lib/ButtonGroup/ButtonGroup.cjs +3 -3
- package/lib/ButtonGroup/ButtonGroup.mjs +3 -3
- package/lib/ButtonGroup/styles.css +1 -1
- package/lib/ButtonV2/ButtonV2.cjs +2 -2
- package/lib/ButtonV2/ButtonV2.mjs +2 -2
- package/lib/ButtonV2/styles.css +1 -1
- package/lib/Calendar/Calendar.cjs +3 -3
- package/lib/Calendar/Calendar.mjs +3 -3
- package/lib/Calendar/styles.css +1 -1
- package/lib/CardFooter/CardFooter.cjs +2 -2
- package/lib/CardFooter/CardFooter.mjs +2 -2
- package/lib/CardFooter/styles.css +1 -1
- package/lib/CardHeading/styles.css +1 -1
- package/lib/Carousel/Carousel.cjs +1 -1
- package/lib/Carousel/Carousel.mjs +1 -1
- package/lib/Carousel/styles.css +1 -1
- package/lib/Checkbox/Checkbox.cjs +2 -2
- package/lib/Checkbox/Checkbox.mjs +2 -2
- package/lib/Checkbox/styles.css +1 -1
- package/lib/Columns/styles.css +1 -1
- package/lib/ComboBox/ComboBox.cjs +3 -3
- package/lib/ComboBox/ComboBox.mjs +3 -3
- package/lib/ComboBox/styles.css +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.cjs +1 -1
- package/lib/ContentSwitcher/ContentSwitcher.mjs +1 -1
- package/lib/ContentSwitcher/styles.css +1 -1
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.cjs +1 -1
- package/lib/ContentSwitcherDropdown/ContentSwitcherDropdown.mjs +1 -1
- package/lib/ContentSwitcherDropdown/styles.css +1 -1
- package/lib/DatePicker/DatePicker.cjs +196 -17
- package/lib/DatePicker/DatePicker.mjs +200 -17
- package/lib/DatePicker/styles.css +1 -1
- package/lib/Disclosure/styles.css +1 -1
- package/lib/DisclosureMini/styles.css +1 -1
- package/lib/Download/styles.css +1 -1
- package/lib/Drawer/Drawer.cjs +46 -323
- package/lib/Drawer/Drawer.mjs +44 -306
- package/lib/Drawer/styles.css +1 -1
- package/lib/Elevation/styles.css +1 -1
- package/lib/Filter/styles.css +1 -1
- package/lib/FormControl/FormControl.cjs +1 -1
- package/lib/FormControl/FormControl.mjs +1 -1
- package/lib/FormControl/styles.css +1 -1
- package/lib/GhostedHeroBanner/GhostedHeroBanner.cjs +1 -1
- package/lib/GhostedHeroBanner/GhostedHeroBanner.mjs +1 -1
- package/lib/GhostedHeroBanner/styles.css +1 -1
- package/lib/GradientPageBackground/GradientPageBackground.cjs +257 -0
- package/lib/GradientPageBackground/GradientPageBackground.mjs +237 -0
- package/lib/GradientPageBackground/styles.css +1 -0
- package/lib/Grid/styles.css +1 -1
- package/lib/Group/styles.css +1 -1
- package/lib/Heading/styles.css +1 -1
- package/lib/HeroBanner/HeroBanner.cjs +2 -3
- package/lib/HeroBanner/HeroBanner.mjs +2 -3
- package/lib/HeroBanner/styles.css +1 -1
- package/lib/HeroButton/HeroButton.cjs +2 -2
- package/lib/HeroButton/HeroButton.mjs +2 -2
- package/lib/HeroButton/styles.css +1 -1
- package/lib/Hidden/styles.css +1 -1
- package/lib/HorizontalCard/HorizontalCard.cjs +3 -2
- package/lib/HorizontalCard/HorizontalCard.mjs +3 -2
- package/lib/HorizontalCard/styles.css +1 -1
- package/lib/Icon/Icon.cjs +1 -1
- package/lib/Icon/Icon.mjs +1 -1
- package/lib/Icon/styles.css +1 -1
- package/lib/Image/styles.css +1 -1
- package/lib/ImpactCard/ImpactCard.cjs +7 -4
- package/lib/ImpactCard/ImpactCard.mjs +7 -4
- package/lib/ImpactCard/styles.css +1 -1
- package/lib/InformationCard/InformationCard.cjs +7 -5
- package/lib/InformationCard/InformationCard.mjs +7 -5
- package/lib/InformationCard/styles.css +1 -1
- package/lib/Link/Link.cjs +1 -1
- package/lib/Link/Link.mjs +1 -1
- package/lib/Link/styles.css +1 -1
- package/lib/Markup/styles.css +1 -1
- package/lib/MediaCard/MediaCard.cjs +3 -5
- package/lib/MediaCard/MediaCard.mjs +3 -5
- package/lib/MediaCard/styles.css +1 -1
- package/lib/Menu/Menu.cjs +35 -48
- package/lib/Menu/Menu.mjs +21 -34
- package/lib/Menu/styles.css +1 -1
- package/lib/Modal/Modal.cjs +2 -2
- package/lib/Modal/Modal.mjs +2 -2
- package/lib/Modal/styles.css +1 -1
- package/lib/Pagination/styles.css +1 -1
- package/lib/PaginationSimple/PaginationSimple.cjs +1 -1
- package/lib/PaginationSimple/PaginationSimple.mjs +1 -1
- package/lib/PaginationSimple/styles.css +1 -1
- package/lib/Popover/styles.css +1 -1
- package/lib/Poster/styles.css +1 -1
- package/lib/ProgressBar/styles.css +1 -1
- package/lib/ProgressStepper/ProgressStepper.cjs +10 -72
- package/lib/ProgressStepper/ProgressStepper.mjs +8 -74
- package/lib/ProgressStepper/styles.css +1 -1
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.cjs +20 -0
- package/lib/ProgressStepperOverflow/ProgressStepperOverflow.mjs +14 -0
- package/lib/ProgressStepperOverflow/styles.css +1 -0
- package/lib/RadioCardGroup/RadioCardGroup.cjs +3 -3
- package/lib/RadioCardGroup/RadioCardGroup.mjs +4 -4
- package/lib/RadioCardGroup/styles.css +1 -1
- package/lib/RadioGroup/RadioGroup.cjs +4 -5
- package/lib/RadioGroup/RadioGroup.mjs +5 -6
- package/lib/RadioGroup/styles.css +1 -1
- package/lib/Rule/styles.css +1 -1
- package/lib/ScrollToTop/ScrollToTop.cjs +5 -2
- package/lib/ScrollToTop/ScrollToTop.mjs +5 -2
- package/lib/ScrollToTop/styles.css +1 -1
- package/lib/Section/styles.css +1 -1
- package/lib/Select/Select.cjs +11 -15
- package/lib/Select/Select.mjs +12 -16
- package/lib/Select/styles.css +1 -1
- package/lib/SiteFooter/SiteFooter.cjs +10 -7
- package/lib/SiteFooter/SiteFooter.mjs +10 -7
- package/lib/SiteFooter/styles.css +1 -1
- package/lib/SiteFooterV2/SiteFooterV2.cjs +19 -22
- package/lib/SiteFooterV2/SiteFooterV2.mjs +19 -22
- package/lib/SiteFooterV2/styles.css +1 -1
- package/lib/SiteHeaderV2/SiteHeaderV2.cjs +4 -4
- package/lib/SiteHeaderV2/SiteHeaderV2.mjs +5 -5
- package/lib/SiteHeaderV2/styles.css +1 -1
- package/lib/Skeleton/styles.css +1 -1
- package/lib/SkipLink/styles.css +1 -1
- package/lib/Spinner/styles.css +1 -1
- package/lib/Surface/styles.css +1 -1
- package/lib/Switch/Switch.cjs +17 -14
- package/lib/Switch/Switch.mjs +17 -14
- package/lib/Switch/styles.css +1 -1
- package/lib/TabbedBanner/TabbedBanner.cjs +9 -6
- package/lib/TabbedBanner/TabbedBanner.mjs +9 -6
- package/lib/TabbedBanner/styles.css +1 -1
- package/lib/Tabs/Tabs.cjs +1 -1
- package/lib/Tabs/Tabs.mjs +1 -1
- package/lib/Tabs/styles.css +1 -1
- package/lib/Tag/Tag.cjs +1 -1
- package/lib/Tag/Tag.mjs +1 -1
- package/lib/Tag/styles.css +1 -1
- package/lib/TemplateBanner/TemplateBanner.cjs +2 -3
- package/lib/TemplateBanner/TemplateBanner.mjs +2 -3
- package/lib/TemplateBanner/styles.css +1 -1
- package/lib/Text/styles.css +1 -1
- package/lib/TextArea/TextArea.cjs +19 -17
- package/lib/TextArea/TextArea.mjs +19 -17
- package/lib/TextArea/styles.css +1 -1
- package/lib/TextInput/TextInput.cjs +2 -2
- package/lib/TextInput/TextInput.mjs +2 -2
- package/lib/TextInput/styles.css +1 -1
- package/lib/Theme/Theme.cjs +1 -1
- package/lib/Theme/Theme.mjs +1 -1
- package/lib/Theme/styles.css +1 -1
- package/lib/ThemeIcon/styles.css +1 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +5 -8
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +5 -8
- package/lib/ThumbnailSignpost/styles.css +1 -1
- package/lib/Toast/styles.css +1 -1
- package/lib/Tooltip/Tooltip.cjs +1 -1
- package/lib/Tooltip/Tooltip.mjs +1 -1
- package/lib/Tooltip/styles.css +1 -1
- package/lib/Truncate/styles.css +1 -1
- package/lib/TypographyCard/TypographyCard.cjs +7 -4
- package/lib/TypographyCard/TypographyCard.mjs +7 -4
- package/lib/TypographyCard/styles.css +1 -1
- package/lib/UniversalHeader/styles.css +1 -1
- package/lib/VerticalSpace/styles.css +1 -1
- package/lib/VideoPlayer/VideoPlayer.cjs +1 -1
- package/lib/VideoPlayer/VideoPlayer.mjs +1 -1
- package/lib/VideoPlayer/styles.css +1 -1
- package/lib/Visible/Visible.cjs +6 -14
- package/lib/Visible/Visible.mjs +4 -16
- package/lib/Visible/styles.css +1 -1
- package/lib/VisuallyHidden/styles.css +1 -1
- package/lib/_shared/cjs/{Avatar-CxbjOB_b.cjs → Avatar-CrUioj_6.cjs} +4 -1
- package/lib/_shared/cjs/{Button-CKTa6bQL.cjs → Button-uD9mR8w-.cjs} +1 -1
- package/lib/_shared/cjs/{ButtonV2-CRNNZ_nd.cjs → ButtonV2-Bta5SVVY.cjs} +2 -2
- package/lib/_shared/cjs/{Calendar-C5C0evEy.cjs → Calendar-D4ZSaHHU.cjs} +3 -3
- package/lib/_shared/cjs/{CardFooter-DwE-u0Om.cjs → CardFooter-ChphRFHe.cjs} +1 -1
- package/lib/_shared/cjs/{Checkbox-D2UQsmiB.cjs → Checkbox-DfZMjO1Y.cjs} +1 -1
- package/lib/_shared/cjs/{ComboBox-BIMxZhJp.cjs → ComboBox-BGUhlqx1.cjs} +2 -2
- package/lib/_shared/cjs/{ContentSwitcherDropdown-CAWaAMZN.cjs → ContentSwitcherDropdown-U5ZTbJTe.cjs} +1 -1
- package/lib/_shared/cjs/{ContentSwitcherList-I7jCZn8C.cjs → ContentSwitcherList-nlxMHXs-.cjs} +3 -2
- package/lib/_shared/cjs/{DatePicker-BgU6iidG.cjs → DatePicker-DS6fAvxD.cjs} +48 -30
- package/lib/_shared/cjs/{FormControl-D3-JbAVb.cjs → FormControl-BPnKQrCm.cjs} +19 -13
- package/lib/_shared/cjs/{HeroButton-CiIygZ16.cjs → HeroButton-CrzkTUwP.cjs} +1 -1
- package/lib/_shared/cjs/{Icon-KMACQ1i3.cjs → Icon-CzhyKqMd.cjs} +1 -1
- package/lib/_shared/cjs/{MediaCard-kcqfmeue.cjs → MediaCard-BEZFbiYO.cjs} +5 -9
- package/lib/_shared/cjs/{MenuSubContent-Bs2_ebS3.cjs → MenuItemMultiLevelContent-vLr6hSBm.cjs} +7 -9
- package/lib/_shared/cjs/ProgressStepper-BL9Y5c4X.cjs +77 -0
- package/lib/_shared/cjs/ProgressStepperOverflow-v-TyS5Sp.cjs +142 -0
- package/lib/_shared/cjs/{RadioCardGroupInput-BmntgyWB.cjs → RadioCardGroupInput-CeUM3yPS.cjs} +1 -1
- package/lib/_shared/cjs/{RadioGroupInput-D3trTxB5.cjs → RadioGroupInput-w2qkfsnG.cjs} +2 -2
- package/lib/_shared/cjs/{SiteHeaderV2NavItemWithSubNav-DgoCW2W3.cjs → SiteHeaderV2NavItemWithSubNav-fQPk0gZU.cjs} +3 -3
- package/lib/_shared/cjs/{TemplateBanner-BMi77IGK.cjs → TemplateBanner-CGtTUy81.cjs} +13 -6
- package/lib/_shared/cjs/{TextInput-DT4hi02U.cjs → TextInput-ByySubi5.cjs} +7 -7
- package/lib/_shared/cjs/Visible-Dx__9oZG.cjs +18 -0
- package/lib/_shared/cjs/{index.es-sqSQUWYg.cjs → index.es-DBEGtWPg.cjs} +1 -1
- package/lib/_shared/esm/{Avatar-B8aoUhmE.mjs → Avatar-Fb1E5MA9.mjs} +4 -1
- package/lib/_shared/esm/{Button-9L4AksQP.mjs → Button-BxuM3_gz.mjs} +1 -1
- package/lib/_shared/esm/{ButtonV2-2U4PvnpS.mjs → ButtonV2-DwYBAojW.mjs} +2 -2
- package/lib/_shared/esm/{Calendar-L6u3D8xb.mjs → Calendar-CjqPM7ta.mjs} +3 -3
- package/lib/_shared/esm/{CardFooter-CgDDDI7Z.mjs → CardFooter-fsAY4cc6.mjs} +1 -1
- package/lib/_shared/esm/{Checkbox-NxnK40uZ.mjs → Checkbox-CwOHzlQF.mjs} +1 -1
- package/lib/_shared/esm/{ComboBox-DUTrEu0N.mjs → ComboBox-CRlJjeev.mjs} +2 -2
- package/lib/_shared/esm/{ContentSwitcherDropdown-dktkyAjY.mjs → ContentSwitcherDropdown-BCkuAfwC.mjs} +1 -1
- package/lib/_shared/esm/{ContentSwitcherList-OnZoE86O.mjs → ContentSwitcherList-DKPD9GfN.mjs} +3 -2
- package/lib/_shared/esm/{DatePicker-CccSfg17.mjs → DatePicker-3sYJ3wGn.mjs} +46 -31
- package/lib/_shared/esm/{FormControl-B9fp1ilz.mjs → FormControl-CWyrVi1u.mjs} +19 -13
- package/lib/_shared/esm/{HeroButton-HYskwyvn.mjs → HeroButton-jdjjV_Gf.mjs} +1 -1
- package/lib/_shared/esm/{Icon-MZfaoOo9.mjs → Icon-CcPOJcQm.mjs} +1 -1
- package/lib/_shared/esm/{MediaCard-CjTDOvmx.mjs → MediaCard-DqMaNWsE.mjs} +5 -9
- package/lib/_shared/esm/{MenuSubContent-Cv9mSn58.mjs → MenuItemMultiLevelContent-JTOHqpzg.mjs} +7 -8
- package/lib/_shared/esm/ProgressStepper-CLBtBNy2.mjs +74 -0
- package/lib/_shared/esm/ProgressStepperOverflow-B9ba8ljs.mjs +140 -0
- package/lib/_shared/esm/{RadioCardGroupInput-Cy1r7M8l.mjs → RadioCardGroupInput-D7W28geB.mjs} +1 -1
- package/lib/_shared/esm/{RadioGroupInput-DiRS2jwQ.mjs → RadioGroupInput-zAWSV29m.mjs} +2 -2
- package/lib/_shared/esm/{SiteHeaderV2NavItemWithSubNav-BLqiSeEC.mjs → SiteHeaderV2NavItemWithSubNav-BMoBdUxK.mjs} +3 -3
- package/lib/_shared/esm/{TemplateBanner-zc4VmeeW.mjs → TemplateBanner-Up6cR-3_.mjs} +14 -7
- package/lib/_shared/esm/{TextInput-Vp_cBbpQ.mjs → TextInput-Dk7qNGoh.mjs} +7 -7
- package/lib/_shared/esm/Visible-C-jVXUWp.mjs +16 -0
- package/lib/_shared/esm/{index.es-C3WGtwrW.mjs → index.es-DCvYtQfu.mjs} +2 -2
- package/lib/index.cjs +1177 -877
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +193 -63
- package/lib/index.d.mts +193 -63
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1167 -872
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +8 -22
- package/package.json +8 -8
- package/lib/GradientBackground/GradientBackground.cjs +0 -19
- package/lib/GradientBackground/GradientBackground.mjs +0 -17
- package/lib/GradientBackground/styles.css +0 -1
|
@@ -1,37 +1,215 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var DatePicker = require('../_shared/cjs/DatePicker-
|
|
5
|
-
require('../_shared/cjs/filter-attrs-eK6E_34o.cjs');
|
|
6
|
-
require('react');
|
|
4
|
+
var DatePicker = require('../_shared/cjs/DatePicker-DS6fAvxD.cjs');
|
|
5
|
+
var filterAttrs = require('../_shared/cjs/filter-attrs-eK6E_34o.cjs');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var index$1 = require('../_shared/cjs/index-CaO6cOF0.cjs');
|
|
8
|
+
var index$2 = require('../_shared/cjs/index-BLRjGROQ.cjs');
|
|
9
|
+
var TextInput = require('../_shared/cjs/TextInput-ByySubi5.cjs');
|
|
10
|
+
var Calendar = require('../_shared/cjs/Calendar-D4ZSaHHU.cjs');
|
|
11
|
+
var index = require('../_shared/cjs/index-DXNM3D1d.cjs');
|
|
7
12
|
require('../_shared/cjs/index-CTlXMLug.cjs');
|
|
8
|
-
require('../_shared/cjs/index-CaO6cOF0.cjs');
|
|
9
13
|
require('../_shared/cjs/Combination-B-rSVLfT.cjs');
|
|
10
|
-
require('../_shared/cjs/index-DXNM3D1d.cjs');
|
|
11
14
|
require('react/jsx-runtime');
|
|
12
15
|
require('react-dom');
|
|
13
16
|
require('../_shared/cjs/index-Bt7hfZBc.cjs');
|
|
14
17
|
require('../_shared/cjs/index-B11wQrRa.cjs');
|
|
15
18
|
require('../_shared/cjs/index-Dv1xvB_E.cjs');
|
|
16
|
-
require('../_shared/cjs/
|
|
17
|
-
require('../_shared/cjs/
|
|
18
|
-
require('../_shared/cjs/index
|
|
19
|
-
require('../_shared/cjs/
|
|
19
|
+
require('../_shared/cjs/FormControl-BPnKQrCm.cjs');
|
|
20
|
+
require('../_shared/cjs/Surface-BFx1yNsq.cjs');
|
|
21
|
+
require('../_shared/cjs/index-DR8Rkav9.cjs');
|
|
22
|
+
require('../_shared/cjs/DisclosureMini-CtvDxVaG.cjs');
|
|
20
23
|
require('../_shared/cjs/Text-Cr5nmYmx.cjs');
|
|
21
24
|
require('../_shared/cjs/suffix-modifier-DLUGR-yG.cjs');
|
|
22
|
-
require('../_shared/cjs/
|
|
23
|
-
require('../_shared/cjs/Surface-BFx1yNsq.cjs');
|
|
25
|
+
require('../_shared/cjs/ThemeIcon-BoxbjTaQ.cjs');
|
|
24
26
|
require('../_shared/cjs/VisuallyHidden-B4XCvPYP.cjs');
|
|
27
|
+
require('../_shared/cjs/Spinner-bbrOwxv2.cjs');
|
|
28
|
+
require('../_shared/cjs/index.es-DBEGtWPg.cjs');
|
|
29
|
+
require('../_shared/cjs/use-media-query-BsUfHjPZ.cjs');
|
|
25
30
|
require('../_shared/cjs/Heading-BEMSkLYR.cjs');
|
|
26
31
|
require('../_shared/cjs/BtIconChevronRightMid-eGxk3ae6.cjs');
|
|
27
|
-
require('../_shared/cjs/Icon-
|
|
28
|
-
require('../_shared/cjs/TextInput-DT4hi02U.cjs');
|
|
29
|
-
require('../_shared/cjs/FormControl-D3-JbAVb.cjs');
|
|
30
|
-
require('../_shared/cjs/DisclosureMini-CtvDxVaG.cjs');
|
|
31
|
-
require('../_shared/cjs/ThemeIcon-BoxbjTaQ.cjs');
|
|
32
|
-
require('../_shared/cjs/Spinner-bbrOwxv2.cjs');
|
|
32
|
+
require('../_shared/cjs/Icon-CzhyKqMd.cjs');
|
|
33
33
|
|
|
34
|
+
var convertRangeStringToDateTuple = function (value) {
|
|
35
|
+
if (value === void 0) { value = ""; }
|
|
36
|
+
var _a = DatePicker.parseRangeString(value), start = _a.start, end = _a.end;
|
|
37
|
+
var startDate = DatePicker.isDateValid(start.date)
|
|
38
|
+
? new Date("".concat(start.year, "-").concat(start.month, "-").concat(start.day))
|
|
39
|
+
: undefined;
|
|
40
|
+
var endDate = DatePicker.isDateValid(end.date)
|
|
41
|
+
? new Date("".concat(end.year, "-").concat(end.month, "-").concat(end.day))
|
|
42
|
+
: undefined;
|
|
43
|
+
return [startDate, endDate];
|
|
44
|
+
};
|
|
34
45
|
|
|
46
|
+
var lowerCaseDateFormat = DatePicker.DATE_FORMAT.toLowerCase();
|
|
47
|
+
var DatePickerRange = function (_a) {
|
|
48
|
+
var _b, _c;
|
|
49
|
+
var inputStart = _a.inputStart, inputEnd = _a.inputEnd, _d = _a.type, type = _d === void 0 ? "month" : _d, minDate = _a.minDate, maxDate = _a.maxDate, disabledDates = _a.disabledDates, onRangeSelect = _a.onRangeSelect;
|
|
50
|
+
// startInput States
|
|
51
|
+
var _e = React.useState("Choose start date"), startAriaLabel = _e[0], setStartAriaLabel = _e[1];
|
|
52
|
+
var startButtonRef = React.useRef(null);
|
|
53
|
+
var startInputRef = React.useRef(null);
|
|
54
|
+
var _f = React.useState((_b = inputStart.value) !== null && _b !== void 0 ? _b : ""), startValue = _f[0], setStartValue = _f[1];
|
|
55
|
+
// endInput States
|
|
56
|
+
var _g = React.useState("Choose end date"), endAriaLabel = _g[0], setEndAriaLabel = _g[1];
|
|
57
|
+
var _h = React.useState((_c = inputEnd.value) !== null && _c !== void 0 ? _c : ""), endValue = _h[0], setEndValue = _h[1];
|
|
58
|
+
var endButtonRef = React.useRef(null);
|
|
59
|
+
var endInputRef = React.useRef(null);
|
|
60
|
+
var previousValidValue = React.useRef("");
|
|
61
|
+
var _j = index.useThemeElement(), themeElement = _j[0], setThemeElement = _j[1];
|
|
62
|
+
var _k = React.useState(false), showCalendar = _k[0], setShowCalendar = _k[1];
|
|
63
|
+
var _l = React.useState(null), activeInput = _l[0], setActiveInput = _l[1];
|
|
64
|
+
var getIsRequired = function (input) { var _a; return (_a = input.isRequired) !== null && _a !== void 0 ? _a : true; };
|
|
65
|
+
var getLabel = function (input, type) { var _a; return (_a = input.label) !== null && _a !== void 0 ? _a : "Select a ".concat(type, " date"); };
|
|
66
|
+
// sync external props with internal value (not typing)
|
|
67
|
+
React.useEffect(function () {
|
|
68
|
+
if (inputStart.value !== undefined && inputStart.value !== startValue) {
|
|
69
|
+
setStartValue(inputStart.value);
|
|
70
|
+
}
|
|
71
|
+
if (inputEnd.value !== undefined && inputEnd.value !== endValue) {
|
|
72
|
+
setEndValue(inputEnd.value);
|
|
73
|
+
}
|
|
74
|
+
}, [inputStart.value, inputEnd.value]);
|
|
75
|
+
var handleIconClick = function (_a) {
|
|
76
|
+
var ref = _a.ref, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, input = _a.input;
|
|
77
|
+
if (ref &&
|
|
78
|
+
!ref.contains(document.activeElement) &&
|
|
79
|
+
!isDisabled &&
|
|
80
|
+
!isReadOnly) {
|
|
81
|
+
setActiveInput(input);
|
|
82
|
+
setShowCalendar(true);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var handleRangeSelect = function (rangeSelection) {
|
|
86
|
+
var start = rangeSelection.start, end = rangeSelection.end, isSelectionComplete = rangeSelection.isSelectionComplete;
|
|
87
|
+
var formattedStart = index$2.format(start, "dd/MM/yyyy");
|
|
88
|
+
var formattedEnd = end ? index$2.format(end, "dd/MM/yyyy") : "";
|
|
89
|
+
onRangeSelect === null || onRangeSelect === void 0 ? void 0 : onRangeSelect(filterAttrs.__assign(filterAttrs.__assign({}, rangeSelection), { formattedStart: formattedStart, formattedEnd: formattedEnd }));
|
|
90
|
+
if (isSelectionComplete) {
|
|
91
|
+
var fullRange = "".concat(formattedStart, " - ").concat(formattedEnd);
|
|
92
|
+
previousValidValue.current = fullRange;
|
|
93
|
+
setShowCalendar(false);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
var handleCalendarClose = function () {
|
|
97
|
+
var _a, _b, _c;
|
|
98
|
+
if (((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === "BODY") {
|
|
99
|
+
(_b = startButtonRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
100
|
+
(_c = endButtonRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var handleIconFocus = function (_a) {
|
|
104
|
+
var input = _a.input;
|
|
105
|
+
if (DatePicker.isRangeValid("".concat(startValue, " - ").concat(endValue))) {
|
|
106
|
+
var _b = DatePicker.convertRangeStringToDates("".concat(startValue, " - ").concat(endValue)), start = _b[0], end = _b[1];
|
|
107
|
+
var label = "Change dates, currently selected dates are ".concat(index$2.format(start, "EEEE do MMMM, yyyy"), " to ").concat(index$2.format(end, "EEEE do MMMM, yyyy"));
|
|
108
|
+
input === "start" ? setStartAriaLabel(label) : setEndAriaLabel(label);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var handleChange = function (e, input) {
|
|
113
|
+
if (input === "start") {
|
|
114
|
+
inputStart.onChange && inputStart.onChange(e);
|
|
115
|
+
setStartValue(e.target.value);
|
|
116
|
+
setActiveInput("start");
|
|
117
|
+
}
|
|
118
|
+
if (input === "end") {
|
|
119
|
+
inputEnd.onChange && inputEnd.onChange(e);
|
|
120
|
+
setEndValue(e.target.value);
|
|
121
|
+
setActiveInput("end");
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
var handleBlur = function (e, input) {
|
|
125
|
+
var value = "".concat(startValue, " - ").concat(endValue);
|
|
126
|
+
if (input === "start") {
|
|
127
|
+
inputStart.onBlur && inputStart.onBlur(e);
|
|
128
|
+
}
|
|
129
|
+
if (input === "end") {
|
|
130
|
+
inputEnd.onBlur && inputEnd.onBlur(e);
|
|
131
|
+
}
|
|
132
|
+
DatePicker.validateRangeOnBlur({
|
|
133
|
+
value: value,
|
|
134
|
+
minDate: minDate,
|
|
135
|
+
maxDate: maxDate,
|
|
136
|
+
disabledDates: disabledDates,
|
|
137
|
+
previousValidValue: previousValidValue.current,
|
|
138
|
+
dispatchChangeEvent: function (e, corrected) {
|
|
139
|
+
var _a, _b;
|
|
140
|
+
var _c = DatePicker.convertRangeStringToDates(corrected), start = _c[0], end = _c[1];
|
|
141
|
+
(_a = inputStart.onChange) === null || _a === void 0 ? void 0 : _a.call(inputStart, filterAttrs.__assign(filterAttrs.__assign({}, e), { target: filterAttrs.__assign(filterAttrs.__assign({}, e.target), { value: DatePicker.formatDate(start) }) }));
|
|
142
|
+
(_b = inputEnd.onChange) === null || _b === void 0 ? void 0 : _b.call(inputEnd, filterAttrs.__assign(filterAttrs.__assign({}, e), { target: filterAttrs.__assign(filterAttrs.__assign({}, e.target), { value: DatePicker.formatDate(end) }) }));
|
|
143
|
+
previousValidValue.current = corrected;
|
|
144
|
+
},
|
|
145
|
+
blurEvent: e,
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
var handleCalendarOpenChange = function (isOpen) {
|
|
149
|
+
if (document.activeElement)
|
|
150
|
+
setShowCalendar(isOpen);
|
|
151
|
+
};
|
|
152
|
+
var handleAutoFocus = function (e) {
|
|
153
|
+
e.preventDefault();
|
|
154
|
+
};
|
|
155
|
+
var setStartInputRef = function (el) {
|
|
156
|
+
startInputRef.current = el;
|
|
157
|
+
};
|
|
158
|
+
var setEndInputRef = function (el) {
|
|
159
|
+
endInputRef.current = el;
|
|
160
|
+
};
|
|
161
|
+
var onCancelClick = function () {
|
|
162
|
+
setShowCalendar(false);
|
|
163
|
+
};
|
|
164
|
+
var getCalendarRange = function () {
|
|
165
|
+
var _a = convertRangeStringToDateTuple("".concat(startValue, " - ").concat(endValue)), start = _a[0], end = _a[1];
|
|
166
|
+
// when inital or one date is set - allow user to pick start / end independently
|
|
167
|
+
if (start && end) {
|
|
168
|
+
if (activeInput === "start") {
|
|
169
|
+
return end ? [end] : [];
|
|
170
|
+
}
|
|
171
|
+
if (activeInput === "end") {
|
|
172
|
+
return start ? [start] : [];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// removes all non date obj
|
|
176
|
+
return [start, end].filter(function (d) { return d instanceof Date; });
|
|
177
|
+
};
|
|
178
|
+
return (React.createElement("div", { className: "arc-DatePickerRange", ref: setThemeElement },
|
|
179
|
+
React.createElement(TextInput.TextInputWithPlaceHolder, filterAttrs.__assign({ ref: setStartInputRef, type: "text", iconButton: {
|
|
180
|
+
onClick: function () {
|
|
181
|
+
return handleIconClick({
|
|
182
|
+
ref: startInputRef.current,
|
|
183
|
+
isDisabled: inputStart.isDisabled,
|
|
184
|
+
isReadOnly: inputStart.isReadOnly,
|
|
185
|
+
input: "start",
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
onFocus: function () { return handleIconFocus({ input: "start" }); },
|
|
189
|
+
icon: "datePickerCalendar",
|
|
190
|
+
label: startAriaLabel,
|
|
191
|
+
ref: startButtonRef,
|
|
192
|
+
}, maxLength: 23, onBlur: function (e) { return handleBlur(e, "start"); }, errorMessage: inputStart.errorMessage, helper: inputStart.helper, id: inputStart.id, isDisabled: inputStart.isDisabled, isReadOnly: inputStart.isReadOnly, isRequired: getIsRequired(inputStart), label: getLabel(inputStart, "start"), hideLabel: inputStart.hideLabel, name: inputStart.name, onClickDisclosure: inputStart.onClickDisclosure, disclosureTitle: inputStart.disclosureTitle, disclosureText: inputStart.disclosureText, placeholder: lowerCaseDateFormat, value: startValue, onChange: function (e) { return handleChange(e, "start"); } }, filterAttrs.filterAttrs(inputStart))),
|
|
193
|
+
React.createElement(TextInput.TextInputWithPlaceHolder, filterAttrs.__assign({ ref: setEndInputRef, type: "text", iconButton: {
|
|
194
|
+
onClick: function () {
|
|
195
|
+
return handleIconClick({
|
|
196
|
+
ref: endInputRef.current,
|
|
197
|
+
isDisabled: inputEnd.isDisabled,
|
|
198
|
+
isReadOnly: inputEnd.isReadOnly,
|
|
199
|
+
input: "end",
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
onFocus: function () { return handleIconFocus({ input: "end" }); },
|
|
203
|
+
icon: "datePickerCalendar",
|
|
204
|
+
label: endAriaLabel,
|
|
205
|
+
ref: endButtonRef,
|
|
206
|
+
}, maxLength: 23, onBlur: function (e) { return handleBlur(e, "end"); }, errorMessage: inputEnd.errorMessage, helper: inputEnd.helper, id: inputEnd.id, isDisabled: inputEnd.isDisabled, isReadOnly: inputEnd.isReadOnly, isRequired: getIsRequired(inputEnd), label: getLabel(inputEnd, "end"), hideLabel: inputStart.hideLabel, name: inputEnd.name, onClickDisclosure: inputEnd.onClickDisclosure, disclosureTitle: inputEnd.disclosureTitle, disclosureText: inputEnd.disclosureText, placeholder: lowerCaseDateFormat, value: endValue, onChange: function (e) { return handleChange(e, "end"); } }, filterAttrs.filterAttrs(inputEnd))),
|
|
207
|
+
React.createElement(index$1.Root2, { open: showCalendar, onOpenChange: handleCalendarOpenChange },
|
|
208
|
+
React.createElement(index$1.Anchor2, null),
|
|
209
|
+
React.createElement(index$1.Portal, { container: themeElement },
|
|
210
|
+
React.createElement(index$1.Content2, { align: "end", "aria-modal": "true", "aria-label": "Choose Date", className: "arc-DatePicker-modal", onOpenAutoFocus: handleAutoFocus, onCloseAutoFocus: handleCalendarClose },
|
|
211
|
+
React.createElement(Calendar.Calendar, { autoFocusOnMount: true, type: type, onCancelClick: onCancelClick, selectionType: "range", selectedRange: getCalendarRange(), disabledDates: disabledDates, minDate: minDate, maxDate: maxDate, onRangeSelect: handleRangeSelect }))))));
|
|
212
|
+
};
|
|
35
213
|
|
|
36
214
|
exports.DATE_FORMAT = DatePicker.DATE_FORMAT;
|
|
37
215
|
exports.DatePicker = DatePicker.DatePicker;
|
|
@@ -39,3 +217,4 @@ exports.isDateValid = DatePicker.isDateValid;
|
|
|
39
217
|
exports.isRangeValid = DatePicker.isRangeValid;
|
|
40
218
|
exports.parseDateString = DatePicker.parseDateString;
|
|
41
219
|
exports.parseRangeString = DatePicker.parseRangeString;
|
|
220
|
+
exports.DatePickerRange = DatePickerRange;
|
|
@@ -1,30 +1,213 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import '
|
|
2
|
+
import { p as parseRangeString, i as isDateValid, D as DATE_FORMAT, a as isRangeValid, c as convertRangeStringToDates, v as validateRangeOnBlur, f as formatDate } from '../_shared/esm/DatePicker-3sYJ3wGn.mjs';
|
|
3
|
+
export { d as DatePicker, b as parseDateString } from '../_shared/esm/DatePicker-3sYJ3wGn.mjs';
|
|
4
|
+
import { a as __assign, f as filterAttrs } from '../_shared/esm/filter-attrs-B6CM-NUr.mjs';
|
|
5
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
6
|
+
import { R as Root2, A as Anchor2, P as Portal, C as Content2 } from '../_shared/esm/index-CxrL7jIX.mjs';
|
|
7
|
+
import { f as format } from '../_shared/esm/index-Cr6KeQLU.mjs';
|
|
8
|
+
import { a as TextInputWithPlaceHolder } from '../_shared/esm/TextInput-Dk7qNGoh.mjs';
|
|
9
|
+
import { C as Calendar } from '../_shared/esm/Calendar-CjqPM7ta.mjs';
|
|
10
|
+
import { e as useThemeElement } from '../_shared/esm/index-Bz2JQq34.mjs';
|
|
5
11
|
import '../_shared/esm/index-5C0-U8cc.mjs';
|
|
6
|
-
import '../_shared/esm/index-CxrL7jIX.mjs';
|
|
7
12
|
import '../_shared/esm/Combination-BpO6XTeS.mjs';
|
|
8
|
-
import '../_shared/esm/index-Bz2JQq34.mjs';
|
|
9
13
|
import 'react/jsx-runtime';
|
|
10
14
|
import 'react-dom';
|
|
11
15
|
import '../_shared/esm/index-DLovItWo.mjs';
|
|
12
16
|
import '../_shared/esm/index-CWHcEz3_.mjs';
|
|
13
17
|
import '../_shared/esm/index-DXTwueLZ.mjs';
|
|
14
|
-
import '../_shared/esm/
|
|
15
|
-
import '../_shared/esm/
|
|
16
|
-
import '../_shared/esm/index
|
|
17
|
-
import '../_shared/esm/
|
|
18
|
+
import '../_shared/esm/FormControl-CWyrVi1u.mjs';
|
|
19
|
+
import '../_shared/esm/Surface-Colbp3Zx.mjs';
|
|
20
|
+
import '../_shared/esm/index-Spae4j7j.mjs';
|
|
21
|
+
import '../_shared/esm/DisclosureMini-B9LzsQC2.mjs';
|
|
18
22
|
import '../_shared/esm/Text-CBlnm5CT.mjs';
|
|
19
23
|
import '../_shared/esm/suffix-modifier-B_pO0UkF.mjs';
|
|
20
|
-
import '../_shared/esm/
|
|
21
|
-
import '../_shared/esm/Surface-Colbp3Zx.mjs';
|
|
24
|
+
import '../_shared/esm/ThemeIcon-CN_Ed5b1.mjs';
|
|
22
25
|
import '../_shared/esm/VisuallyHidden-DqAgoqJo.mjs';
|
|
26
|
+
import '../_shared/esm/Spinner-Cd7LiPTy.mjs';
|
|
27
|
+
import '../_shared/esm/index.es-DCvYtQfu.mjs';
|
|
28
|
+
import '../_shared/esm/use-media-query-DmKuIDEM.mjs';
|
|
23
29
|
import '../_shared/esm/Heading-CxHWefi7.mjs';
|
|
24
30
|
import '../_shared/esm/BtIconChevronRightMid-DE4lmVaG.mjs';
|
|
25
|
-
import '../_shared/esm/Icon-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
import '../_shared/esm/Icon-CcPOJcQm.mjs';
|
|
32
|
+
|
|
33
|
+
var convertRangeStringToDateTuple = function (value) {
|
|
34
|
+
if (value === void 0) { value = ""; }
|
|
35
|
+
var _a = parseRangeString(value), start = _a.start, end = _a.end;
|
|
36
|
+
var startDate = isDateValid(start.date)
|
|
37
|
+
? new Date("".concat(start.year, "-").concat(start.month, "-").concat(start.day))
|
|
38
|
+
: undefined;
|
|
39
|
+
var endDate = isDateValid(end.date)
|
|
40
|
+
? new Date("".concat(end.year, "-").concat(end.month, "-").concat(end.day))
|
|
41
|
+
: undefined;
|
|
42
|
+
return [startDate, endDate];
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var lowerCaseDateFormat = DATE_FORMAT.toLowerCase();
|
|
46
|
+
var DatePickerRange = function (_a) {
|
|
47
|
+
var _b, _c;
|
|
48
|
+
var inputStart = _a.inputStart, inputEnd = _a.inputEnd, _d = _a.type, type = _d === void 0 ? "month" : _d, minDate = _a.minDate, maxDate = _a.maxDate, disabledDates = _a.disabledDates, onRangeSelect = _a.onRangeSelect;
|
|
49
|
+
// startInput States
|
|
50
|
+
var _e = useState("Choose start date"), startAriaLabel = _e[0], setStartAriaLabel = _e[1];
|
|
51
|
+
var startButtonRef = useRef(null);
|
|
52
|
+
var startInputRef = useRef(null);
|
|
53
|
+
var _f = useState((_b = inputStart.value) !== null && _b !== void 0 ? _b : ""), startValue = _f[0], setStartValue = _f[1];
|
|
54
|
+
// endInput States
|
|
55
|
+
var _g = useState("Choose end date"), endAriaLabel = _g[0], setEndAriaLabel = _g[1];
|
|
56
|
+
var _h = useState((_c = inputEnd.value) !== null && _c !== void 0 ? _c : ""), endValue = _h[0], setEndValue = _h[1];
|
|
57
|
+
var endButtonRef = useRef(null);
|
|
58
|
+
var endInputRef = useRef(null);
|
|
59
|
+
var previousValidValue = useRef("");
|
|
60
|
+
var _j = useThemeElement(), themeElement = _j[0], setThemeElement = _j[1];
|
|
61
|
+
var _k = useState(false), showCalendar = _k[0], setShowCalendar = _k[1];
|
|
62
|
+
var _l = useState(null), activeInput = _l[0], setActiveInput = _l[1];
|
|
63
|
+
var getIsRequired = function (input) { var _a; return (_a = input.isRequired) !== null && _a !== void 0 ? _a : true; };
|
|
64
|
+
var getLabel = function (input, type) { var _a; return (_a = input.label) !== null && _a !== void 0 ? _a : "Select a ".concat(type, " date"); };
|
|
65
|
+
// sync external props with internal value (not typing)
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
if (inputStart.value !== undefined && inputStart.value !== startValue) {
|
|
68
|
+
setStartValue(inputStart.value);
|
|
69
|
+
}
|
|
70
|
+
if (inputEnd.value !== undefined && inputEnd.value !== endValue) {
|
|
71
|
+
setEndValue(inputEnd.value);
|
|
72
|
+
}
|
|
73
|
+
}, [inputStart.value, inputEnd.value]);
|
|
74
|
+
var handleIconClick = function (_a) {
|
|
75
|
+
var ref = _a.ref, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, input = _a.input;
|
|
76
|
+
if (ref &&
|
|
77
|
+
!ref.contains(document.activeElement) &&
|
|
78
|
+
!isDisabled &&
|
|
79
|
+
!isReadOnly) {
|
|
80
|
+
setActiveInput(input);
|
|
81
|
+
setShowCalendar(true);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var handleRangeSelect = function (rangeSelection) {
|
|
85
|
+
var start = rangeSelection.start, end = rangeSelection.end, isSelectionComplete = rangeSelection.isSelectionComplete;
|
|
86
|
+
var formattedStart = format(start, "dd/MM/yyyy");
|
|
87
|
+
var formattedEnd = end ? format(end, "dd/MM/yyyy") : "";
|
|
88
|
+
onRangeSelect === null || onRangeSelect === void 0 ? void 0 : onRangeSelect(__assign(__assign({}, rangeSelection), { formattedStart: formattedStart, formattedEnd: formattedEnd }));
|
|
89
|
+
if (isSelectionComplete) {
|
|
90
|
+
var fullRange = "".concat(formattedStart, " - ").concat(formattedEnd);
|
|
91
|
+
previousValidValue.current = fullRange;
|
|
92
|
+
setShowCalendar(false);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var handleCalendarClose = function () {
|
|
96
|
+
var _a, _b, _c;
|
|
97
|
+
if (((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === "BODY") {
|
|
98
|
+
(_b = startButtonRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
99
|
+
(_c = endButtonRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var handleIconFocus = function (_a) {
|
|
103
|
+
var input = _a.input;
|
|
104
|
+
if (isRangeValid("".concat(startValue, " - ").concat(endValue))) {
|
|
105
|
+
var _b = convertRangeStringToDates("".concat(startValue, " - ").concat(endValue)), start = _b[0], end = _b[1];
|
|
106
|
+
var label = "Change dates, currently selected dates are ".concat(format(start, "EEEE do MMMM, yyyy"), " to ").concat(format(end, "EEEE do MMMM, yyyy"));
|
|
107
|
+
input === "start" ? setStartAriaLabel(label) : setEndAriaLabel(label);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var handleChange = function (e, input) {
|
|
112
|
+
if (input === "start") {
|
|
113
|
+
inputStart.onChange && inputStart.onChange(e);
|
|
114
|
+
setStartValue(e.target.value);
|
|
115
|
+
setActiveInput("start");
|
|
116
|
+
}
|
|
117
|
+
if (input === "end") {
|
|
118
|
+
inputEnd.onChange && inputEnd.onChange(e);
|
|
119
|
+
setEndValue(e.target.value);
|
|
120
|
+
setActiveInput("end");
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var handleBlur = function (e, input) {
|
|
124
|
+
var value = "".concat(startValue, " - ").concat(endValue);
|
|
125
|
+
if (input === "start") {
|
|
126
|
+
inputStart.onBlur && inputStart.onBlur(e);
|
|
127
|
+
}
|
|
128
|
+
if (input === "end") {
|
|
129
|
+
inputEnd.onBlur && inputEnd.onBlur(e);
|
|
130
|
+
}
|
|
131
|
+
validateRangeOnBlur({
|
|
132
|
+
value: value,
|
|
133
|
+
minDate: minDate,
|
|
134
|
+
maxDate: maxDate,
|
|
135
|
+
disabledDates: disabledDates,
|
|
136
|
+
previousValidValue: previousValidValue.current,
|
|
137
|
+
dispatchChangeEvent: function (e, corrected) {
|
|
138
|
+
var _a, _b;
|
|
139
|
+
var _c = convertRangeStringToDates(corrected), start = _c[0], end = _c[1];
|
|
140
|
+
(_a = inputStart.onChange) === null || _a === void 0 ? void 0 : _a.call(inputStart, __assign(__assign({}, e), { target: __assign(__assign({}, e.target), { value: formatDate(start) }) }));
|
|
141
|
+
(_b = inputEnd.onChange) === null || _b === void 0 ? void 0 : _b.call(inputEnd, __assign(__assign({}, e), { target: __assign(__assign({}, e.target), { value: formatDate(end) }) }));
|
|
142
|
+
previousValidValue.current = corrected;
|
|
143
|
+
},
|
|
144
|
+
blurEvent: e,
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
var handleCalendarOpenChange = function (isOpen) {
|
|
148
|
+
if (document.activeElement)
|
|
149
|
+
setShowCalendar(isOpen);
|
|
150
|
+
};
|
|
151
|
+
var handleAutoFocus = function (e) {
|
|
152
|
+
e.preventDefault();
|
|
153
|
+
};
|
|
154
|
+
var setStartInputRef = function (el) {
|
|
155
|
+
startInputRef.current = el;
|
|
156
|
+
};
|
|
157
|
+
var setEndInputRef = function (el) {
|
|
158
|
+
endInputRef.current = el;
|
|
159
|
+
};
|
|
160
|
+
var onCancelClick = function () {
|
|
161
|
+
setShowCalendar(false);
|
|
162
|
+
};
|
|
163
|
+
var getCalendarRange = function () {
|
|
164
|
+
var _a = convertRangeStringToDateTuple("".concat(startValue, " - ").concat(endValue)), start = _a[0], end = _a[1];
|
|
165
|
+
// when inital or one date is set - allow user to pick start / end independently
|
|
166
|
+
if (start && end) {
|
|
167
|
+
if (activeInput === "start") {
|
|
168
|
+
return end ? [end] : [];
|
|
169
|
+
}
|
|
170
|
+
if (activeInput === "end") {
|
|
171
|
+
return start ? [start] : [];
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// removes all non date obj
|
|
175
|
+
return [start, end].filter(function (d) { return d instanceof Date; });
|
|
176
|
+
};
|
|
177
|
+
return (React__default.createElement("div", { className: "arc-DatePickerRange", ref: setThemeElement },
|
|
178
|
+
React__default.createElement(TextInputWithPlaceHolder, __assign({ ref: setStartInputRef, type: "text", iconButton: {
|
|
179
|
+
onClick: function () {
|
|
180
|
+
return handleIconClick({
|
|
181
|
+
ref: startInputRef.current,
|
|
182
|
+
isDisabled: inputStart.isDisabled,
|
|
183
|
+
isReadOnly: inputStart.isReadOnly,
|
|
184
|
+
input: "start",
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
onFocus: function () { return handleIconFocus({ input: "start" }); },
|
|
188
|
+
icon: "datePickerCalendar",
|
|
189
|
+
label: startAriaLabel,
|
|
190
|
+
ref: startButtonRef,
|
|
191
|
+
}, maxLength: 23, onBlur: function (e) { return handleBlur(e, "start"); }, errorMessage: inputStart.errorMessage, helper: inputStart.helper, id: inputStart.id, isDisabled: inputStart.isDisabled, isReadOnly: inputStart.isReadOnly, isRequired: getIsRequired(inputStart), label: getLabel(inputStart, "start"), hideLabel: inputStart.hideLabel, name: inputStart.name, onClickDisclosure: inputStart.onClickDisclosure, disclosureTitle: inputStart.disclosureTitle, disclosureText: inputStart.disclosureText, placeholder: lowerCaseDateFormat, value: startValue, onChange: function (e) { return handleChange(e, "start"); } }, filterAttrs(inputStart))),
|
|
192
|
+
React__default.createElement(TextInputWithPlaceHolder, __assign({ ref: setEndInputRef, type: "text", iconButton: {
|
|
193
|
+
onClick: function () {
|
|
194
|
+
return handleIconClick({
|
|
195
|
+
ref: endInputRef.current,
|
|
196
|
+
isDisabled: inputEnd.isDisabled,
|
|
197
|
+
isReadOnly: inputEnd.isReadOnly,
|
|
198
|
+
input: "end",
|
|
199
|
+
});
|
|
200
|
+
},
|
|
201
|
+
onFocus: function () { return handleIconFocus({ input: "end" }); },
|
|
202
|
+
icon: "datePickerCalendar",
|
|
203
|
+
label: endAriaLabel,
|
|
204
|
+
ref: endButtonRef,
|
|
205
|
+
}, maxLength: 23, onBlur: function (e) { return handleBlur(e, "end"); }, errorMessage: inputEnd.errorMessage, helper: inputEnd.helper, id: inputEnd.id, isDisabled: inputEnd.isDisabled, isReadOnly: inputEnd.isReadOnly, isRequired: getIsRequired(inputEnd), label: getLabel(inputEnd, "end"), hideLabel: inputStart.hideLabel, name: inputEnd.name, onClickDisclosure: inputEnd.onClickDisclosure, disclosureTitle: inputEnd.disclosureTitle, disclosureText: inputEnd.disclosureText, placeholder: lowerCaseDateFormat, value: endValue, onChange: function (e) { return handleChange(e, "end"); } }, filterAttrs(inputEnd))),
|
|
206
|
+
React__default.createElement(Root2, { open: showCalendar, onOpenChange: handleCalendarOpenChange },
|
|
207
|
+
React__default.createElement(Anchor2, null),
|
|
208
|
+
React__default.createElement(Portal, { container: themeElement },
|
|
209
|
+
React__default.createElement(Content2, { align: "end", "aria-modal": "true", "aria-label": "Choose Date", className: "arc-DatePicker-modal", onOpenAutoFocus: handleAutoFocus, onCloseAutoFocus: handleCalendarClose },
|
|
210
|
+
React__default.createElement(Calendar, { autoFocusOnMount: true, type: type, onCancelClick: onCancelClick, selectionType: "range", selectedRange: getCalendarRange(), disabledDates: disabledDates, minDate: minDate, maxDate: maxDate, onRangeSelect: handleRangeSelect }))))));
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export { DATE_FORMAT, DatePickerRange, isDateValid, isRangeValid, parseRangeString };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.arc-v12-0-0-beta-
|
|
1
|
+
.arc-v12-0-0-beta-20 .arc .arc-DatePicker--constrained{max-width:384px}.arc-v12-0-0-beta-20 .arc .arc-DatePicker-modal{z-index:101}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.arc-v12-0-0-beta-
|
|
1
|
+
.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary{border-bottom:var(--disclosure-border-weight-s) solid var(--disclosure-colors-light-border-subtle);border-top:var(--disclosure-border-weight-s) solid var(--disclosure-colors-light-border-subtle);color:var(--disclosure-colors-light-text-default);cursor:pointer;display:block;font:var(--disclosure-type-label-l);list-style:none;padding:var(--disclosure-padding-s);position:relative}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary:focus{outline:var(--focus-border-weight-s) solid transparent}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary>*{padding-left:var(--disclosure-padding-l)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure .arc-Disclosure-summary>*{display:inline-block}.arc-v12-0-0-beta-20 .arc .arc-Disclosure--onDarkSurface .arc-Disclosure-summary{border-bottom:var(--disclosure-border-weight-s) solid var(--disclosure-colors-dark-border-subtle);border-top:var(--disclosure-border-weight-s) solid var(--disclosure-colors-dark-border-subtle);color:var(--disclosure-colors-dark-text-default)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary:hover{background:var(--disclosure-colors-light-bg-hover);color:var(--disclosure-colors-light-text-hover)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure+.arc-Disclosure .arc-Disclosure-summary{border-top:0;line-height:29px}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary::-webkit-details-marker{display:none}.arc-v12-0-0-beta-20 .arc .arc-Disclosure--onDarkSurface .arc-Disclosure-summary:hover{background:var(--disclosure-colors-dark-bg-hover);color:var(--disclosure-colors-dark-text-hover)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary:focus::before{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary:focus-visible::before{outline:var(--focus-border-weight-s) solid var(--focus-colors-light-border-subtle)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure--onDarkSurface .arc-Disclosure-summary:focus-visible::before{outline:var(--focus-border-weight-s) solid var(--focus-colors-dark-border-subtle)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-summary>.arc-Disclosure-summary-icon{color:inherit;height:var(--disclosure-size-icon-s);padding-left:0;position:absolute;top:50%;transform:translateY(-50%);width:var(--disclosure-size-icon-s)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure[open] .arc-Disclosure-summary>.arc-Disclosure-summary-icon{transform:rotate(180deg) translateY(50%)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure-details{border-bottom:var(--disclosure-border-weight-s) solid var(--disclosure-colors-light-border-subtle);padding:var(--disclosure-padding-s)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure--indentDetails .arc-Disclosure-details{padding-left:var(--disclosure-padding-xl)}.arc-v12-0-0-beta-20 .arc .arc-Disclosure--onDarkSurface .arc-Disclosure-details{border-bottom:var(--disclosure-border-weight-s) solid var(--disclosure-colors-dark-border-subtle)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.arc-v12-0-0-beta-
|
|
1
|
+
.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary{align-items:center;color:var(--disclosure-mini-colors-light-text-default);cursor:pointer;display:flex;font:var(--sem-type-body-reg-m);list-style:none;position:relative}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary--small{font:var(--sem-type-body-reg-s)}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary:focus{outline:var(--focus-border-weight-s) solid transparent;outline-offset:2px}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini .arc-DisclosureMini-summary>*{display:inline-block}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini--onDarkSurface .arc-DisclosureMini-summary{color:var(--disclosure-mini-colors-dark-text-default)}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary::-webkit-details-marker{display:none}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary:focus::before{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary:focus-visible::before{outline:var(--focus-border-weight-s) solid var(--focus-colors-light-border-subtle);outline-offset:2px}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini--onDarkSurface .arc-DisclosureMini-summary:focus-visible::before{outline:var(--focus-border-weight-s) solid var(--focus-colors-dark-border-subtle);outline-offset:2px}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary>.arc-Text{text-decoration:underline}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary--icon-left>.arc-Text{margin-left:var(--disclosure-mini-gap-m)}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary--icon-right>.arc-Text{margin-right:var(--disclosure-mini-gap-m)}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary--icon-right>.arc-DisclosureMini-summary-icon{order:2}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary>.arc-DisclosureMini-summary-icon{align-items:center;color:inherit;display:flex;flex:0 0 16px;height:var(--disclosure-mini-size-icon-s);justify-content:center;transition:all 0.23s ease-out;width:var(--disclosure-mini-size-icon-s)}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary>.arc-DisclosureMini-summary-icon>svg{height:100%;width:100%}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini[open] .arc-DisclosureMini-summary>.arc-DisclosureMini-summary-icon{transform:rotate(180deg)}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini[open] .arc-DisclosureMini-summary{align-items:center}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-details{margin-top:var(--disclosure-mini-gap-s)}.arc-v12-0-0-beta-20 .arc .arc-DisclosureMini-summary--icon-left~.arc-DisclosureMini-details{margin-left:calc(var(--disclosure-mini-gap-m) + 16px)}
|
package/lib/Download/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.arc-v12-0-0-beta-
|
|
1
|
+
.arc-v12-0-0-beta-20 .arc .arc-Download{align-items:center;background:var(--sem-color-bg-secondary-light-default);border-radius:var(--sem-border-radius-xs);color:var(--sem-color-fg-secondary-light-default);cursor:pointer;display:flex;max-width:100%;outline:var(--sem-border-width-xs) solid var(--sem-color-border-secondary-light-subtle);padding:var(--sem-space-padding-70) var(--sem-space-padding-130) var(--sem-space-padding-70) var(--sem-space-padding-70);text-decoration:none}.arc-v12-0-0-beta-20 .arc .arc-Download--compact{padding:var(--sem-space-padding-60) var(--sem-space-padding-110) var(--sem-space-padding-60) var(--sem-space-padding-60)}.arc-v12-0-0-beta-20 .arc .arc-Download--maxContent{width:-moz-max-content;width:max-content}.arc-v12-0-0-beta-20 .arc .arc-Download-name{color:var(--sem-color-fg-primary-light-default);display:block;font:var(--sem-type-body-reg-l);font-weight:var(--sem-font-weight-bold);text-decoration:underline}.arc-v12-0-0-beta-20 .arc .arc-Download--compact .arc-Download-name{font:var(--sem-type-body-reg-m);font-weight:var(--sem-font-weight-bold)}.arc-v12-0-0-beta-20 .arc .arc-Download:focus-visible{border-radius:var(--sem-border-radius-xs);outline:var(--focus-border-weight-s) solid var(--focus-colors-light-border-subtle)}.arc-v12-0-0-beta-20 .arc .arc-Download:focus:not(:focus-visible){border-radius:var(--sem-border-radius-xs);outline:var(--sem-border-width-xs) solid var(--sem-color-border-secondary-light-subtle);outline-offset:0}.arc-v12-0-0-beta-20 .arc .arc-Download:hover,.arc-v12-0-0-beta-20 .arc .arc-Download:hover:focus:not(:focus-visible){color:var(--sem-color-fg-secondary-light-default);outline:var(--sem-border-width-s) solid var(--sem-color-border-primary-light-strong)}.arc-v12-0-0-beta-20 .arc .arc-Download:hover .arc-Download-name{color:var(--sem-color-fg-primary-light-strong)}.arc-v12-0-0-beta-20 .arc .arc-Download-title{color:var(--sem-color-fg-primary-light-default)}.arc-v12-0-0-beta-20 .arc .arc-Download-iconContainer{flex:0 1 auto}.arc-v12-0-0-beta-20 .arc .arc-Download-contentContainer{flex:1 1 0;padding-left:var(--sem-space-padding-50)}.arc-v12-0-0-beta-20 .arc .arc-Download--compact .arc-Download-contentContainer{padding-left:var(--sem-space-padding-30)}
|