@vidispine/vdt-mui 23.2.0-pre.2 → 23.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_utils/generateBadges.js +1 -0
- package/dist/cjs/_utils/isDefinedValue.js +1 -0
- package/dist/cjs/_utils/omit.js +1 -0
- package/dist/cjs/_utils/showSlot.js +1 -0
- package/dist/cjs/_utils/uuidv4.js +1 -0
- package/dist/cjs/_utils/withOverrides.js +1 -0
- package/dist/cjs/collection/CollectionCard/CollectionCard.js +1 -0
- package/dist/cjs/collection/CollectionCard/components/CollectionCardMedia.js +1 -0
- package/dist/cjs/collection/CollectionCard/index.js +1 -0
- package/dist/cjs/collection/CollectionList/CollectionList.js +1 -0
- package/dist/cjs/collection/CollectionList/index.js +1 -0
- package/dist/cjs/collection/CollectionListItem/CollectionListItem.js +1 -0
- package/dist/cjs/collection/CollectionListItem/index.js +1 -0
- package/dist/cjs/collection/CollectionRepresentativeThumbnail/CollectionRepresentativeThumbnail.js +1 -0
- package/dist/cjs/collection/CollectionRepresentativeThumbnail/index.js +1 -0
- package/dist/cjs/entity/EntityAvatar/EntityAvatar.js +1 -0
- package/dist/cjs/entity/EntityAvatar/index.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardActions.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardBase.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardContent.js +1 -0
- package/dist/cjs/entity/EntityCard/components/EntityCardHeader.js +1 -0
- package/dist/cjs/entity/EntityIcon/EntityIcon.js +1 -0
- package/dist/cjs/entity/EntityIcon/index.js +1 -0
- package/dist/cjs/entity/EntityList/EntityList.js +1 -0
- package/dist/cjs/entity/EntityList/index.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemAvatar.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemButton.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemSecondaryAction.js +1 -0
- package/dist/cjs/entity/EntityListItem/components/EntityListItemText.js +1 -0
- package/dist/cjs/entity/EntityTableRow/components/EntityTableCellAvatar.js +1 -0
- package/dist/cjs/entity/EntityTableRow/components/EntityTableCellCheckbox.js +1 -0
- package/dist/cjs/entity/_utils/getEntityProp.js +1 -0
- package/dist/cjs/entity/_utils/getEntityText.js +1 -0
- package/dist/cjs/general/AvatarMenu/AvatarMenu.js +1 -0
- package/dist/cjs/general/AvatarMenu/components/Avatar.js +1 -0
- package/dist/cjs/general/AvatarMenu/components/MenuItem.js +1 -0
- package/dist/cjs/general/AvatarMenu/index.js +1 -0
- package/dist/cjs/general/BlurredBackground/BlurredBackground.js +1 -0
- package/dist/cjs/general/BlurredBackground/index.js +1 -0
- package/dist/cjs/general/CalendarPicker/CalendarPicker.js +1 -0
- package/dist/cjs/general/CalendarPicker/components/PickersDay.js +1 -0
- package/dist/cjs/general/CalendarPicker/index.js +1 -0
- package/dist/cjs/general/CalendarPicker/utils/index.js +1 -0
- package/dist/cjs/general/CompactBadge/CompactBadge.js +1 -0
- package/dist/cjs/general/CompactBadge/index.js +1 -0
- package/dist/cjs/general/CompactLabel/CompactLabel.js +1 -0
- package/dist/cjs/general/CompactLabel/index.js +1 -0
- package/dist/cjs/general/CornerLabelPlacer/CornerLabelPlacer.js +1 -0
- package/dist/cjs/general/CornerLabelPlacer/index.js +1 -0
- package/dist/cjs/general/ExpandButton/ExpandButton.js +1 -0
- package/dist/cjs/general/ExpandButton/index.js +1 -0
- package/dist/cjs/general/Form/Form.js +1 -0
- package/dist/cjs/general/Form/index.js +1 -0
- package/dist/cjs/general/ImageCollage/ImageCollage.js +1 -0
- package/dist/cjs/general/ImageCollage/index.js +1 -0
- package/dist/cjs/general/MediaIcon/MediaIcon.js +1 -0
- package/dist/cjs/general/MediaIcon/index.js +1 -0
- package/dist/cjs/general/MenuItem/MenuItem.js +1 -0
- package/dist/cjs/general/MenuItem/index.js +1 -0
- package/dist/cjs/general/ScrubLine/ScrubLine.js +1 -0
- package/dist/cjs/general/ScrubLine/index.js +1 -0
- package/dist/cjs/general/Sort/Sort.js +1 -0
- package/dist/cjs/general/Sort/components/ButtonBase.js +1 -0
- package/dist/cjs/general/Sort/components/MenuItem.js +1 -0
- package/dist/cjs/general/Sort/index.js +1 -0
- package/dist/cjs/general/TablePagination/TablePagination.js +1 -0
- package/dist/cjs/general/TablePagination/index.js +1 -0
- package/dist/cjs/general/ThemeContext/ThemeContext.js +1 -0
- package/dist/cjs/inputs/BasicDateTimeInput/BasicDateTimeInput.js +1 -0
- package/dist/cjs/inputs/BasicDateTimeInput/index.js +1 -0
- package/dist/cjs/inputs/BooleanInput/BooleanInput.js +1 -0
- package/dist/cjs/inputs/BooleanInput/index.js +1 -0
- package/dist/cjs/inputs/CheckboxGroupInput/CheckboxGroupInput.js +1 -0
- package/dist/cjs/inputs/CheckboxGroupInput/components/CheckboxGroup.js +1 -0
- package/dist/cjs/inputs/CheckboxGroupInput/index.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/DateRangeInput.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/components/utils/valueManagers.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/index.js +1 -0
- package/dist/cjs/inputs/DateRangeInput/utils/dateHelpers.js +1 -0
- package/dist/cjs/inputs/DateTimeInput/DateTimeInput.js +1 -0
- package/dist/cjs/inputs/DateTimeInput/index.js +1 -0
- package/dist/cjs/inputs/MaskedTextInput/MaskedTextInput.js +1 -0
- package/dist/cjs/inputs/MaskedTextInput/components/MaskedInputComponent.js +1 -0
- package/dist/cjs/inputs/MaskedTextInput/index.js +1 -0
- package/dist/cjs/inputs/NumberInput/NumberInput.js +1 -0
- package/dist/cjs/inputs/NumberInput/index.js +1 -0
- package/dist/cjs/inputs/RadioGroupInput/RadioGroupInput.js +1 -0
- package/dist/cjs/inputs/RadioGroupInput/components/RadioGroup.js +1 -0
- package/dist/cjs/inputs/RadioGroupInput/index.js +1 -0
- package/dist/cjs/inputs/SelectInput/SelectInput.js +1 -0
- package/dist/cjs/inputs/SelectInput/index.js +1 -0
- package/dist/cjs/inputs/SliderInput/SliderInput.js +1 -0
- package/dist/cjs/inputs/SliderInput/components/Slider.js +1 -0
- package/dist/cjs/inputs/SliderInput/index.js +1 -0
- package/dist/cjs/inputs/TagInput/TagInput.js +1 -0
- package/dist/cjs/inputs/TagInput/index.js +1 -0
- package/dist/cjs/inputs/TextInput/TextInput.js +1 -0
- package/dist/cjs/inputs/TextInput/index.js +1 -0
- package/dist/cjs/inputs/_components/FormControlLabel.js +1 -0
- package/dist/cjs/inputs/_components/MenuItem.js +1 -0
- package/dist/cjs/item/ItemCard/ItemCard.js +1 -0
- package/dist/cjs/item/ItemCard/components/ItemCardMedia.js +1 -0
- package/dist/cjs/item/ItemCard/index.js +1 -0
- package/dist/cjs/item/ItemList/ItemList.js +1 -0
- package/dist/cjs/item/ItemList/index.js +1 -0
- package/dist/cjs/item/ItemListItem/ItemListItem.js +1 -0
- package/dist/cjs/item/ItemListItem/index.js +1 -0
- package/dist/cjs/item/ItemPoster/ItemPoster.js +1 -0
- package/dist/cjs/item/ItemPoster/index.js +1 -0
- package/dist/cjs/item/ItemPosterList/ItemPosterList.js +1 -0
- package/dist/cjs/item/ItemPosterList/index.js +1 -0
- package/dist/cjs/item/ItemPosterViewer/ItemPosterViewer.js +1 -0
- package/dist/cjs/item/ItemPosterViewer/components/Toolbar.js +1 -0
- package/dist/cjs/item/ItemPosterViewer/index.js +1 -0
- package/dist/cjs/item/ItemTable/ItemTable.js +1 -0
- package/dist/cjs/item/ItemTable/components/ItemTableHead.js +1 -0
- package/dist/cjs/item/ItemTable/index.js +1 -0
- package/dist/cjs/item/ItemTableRow/ItemTableRow.js +1 -0
- package/dist/cjs/item/ItemTableRow/index.js +1 -0
- package/dist/cjs/item/ItemThumbnail/ItemThumbnail.js +1 -0
- package/dist/cjs/item/ItemThumbnail/index.js +1 -0
- package/dist/cjs/search/SearchFilterForm/SearchFilterForm.js +1 -0
- package/dist/cjs/search/SearchFilterForm/hooks/UseSearchFilterFormInputs.js +1 -0
- package/dist/cjs/search/SearchFilterForm/index.js +1 -0
- package/dist/cjs/search/SearchFilterForm/utils/mapValuesToFilter.js +1 -0
- package/dist/cjs/shape/ShapeMediaBadges/ShapeMediaBadges.js +1 -0
- package/dist/cjs/shape/ShapeMediaBadges/index.js +1 -0
- package/dist/cjs/transcode/TranscodePresetMediaBadges/TranscodePresetMediaBadges.js +1 -0
- package/dist/cjs/transcode/TranscodePresetMediaBadges/index.js +1 -0
- package/dist/es/_utils/generateBadges.js +75 -0
- package/dist/es/_utils/isDefinedValue.js +6 -0
- package/dist/es/_utils/omit.js +9 -0
- package/dist/es/_utils/showSlot.js +4 -0
- package/dist/es/_utils/uuidv4.js +7 -0
- package/dist/es/_utils/withOverrides.js +37 -0
- package/dist/es/collection/CollectionCard/CollectionCard.js +292 -0
- package/dist/es/collection/CollectionCard/components/CollectionCardMedia.js +14 -0
- package/dist/es/collection/CollectionCard/index.js +11 -0
- package/dist/es/collection/CollectionList/CollectionList.js +159 -0
- package/dist/es/collection/CollectionList/index.js +11 -0
- package/dist/es/collection/CollectionListItem/CollectionListItem.js +122 -0
- package/dist/es/collection/CollectionListItem/index.js +11 -0
- package/dist/es/collection/CollectionRepresentativeThumbnail/CollectionRepresentativeThumbnail.js +169 -0
- package/dist/es/collection/CollectionRepresentativeThumbnail/index.js +11 -0
- package/dist/es/entity/EntityAvatar/EntityAvatar.js +102 -0
- package/dist/es/entity/EntityAvatar/index.js +11 -0
- package/dist/es/entity/EntityCard/components/EntityCardActions.js +68 -0
- package/dist/es/entity/EntityCard/components/EntityCardBase.js +43 -0
- package/dist/es/entity/EntityCard/components/EntityCardContent.js +34 -0
- package/dist/es/entity/EntityCard/components/EntityCardHeader.js +115 -0
- package/dist/es/entity/EntityIcon/EntityIcon.js +107 -0
- package/dist/es/entity/EntityIcon/index.js +11 -0
- package/dist/es/entity/EntityList/EntityList.js +211 -0
- package/dist/es/entity/EntityList/index.js +11 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemAvatar.js +26 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemButton.js +27 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemSecondaryAction.js +27 -0
- package/dist/es/entity/EntityListItem/components/EntityListItemText.js +26 -0
- package/dist/es/entity/EntityTableRow/components/EntityTableCellAvatar.js +26 -0
- package/dist/es/entity/EntityTableRow/components/EntityTableCellCheckbox.js +19 -0
- package/dist/es/entity/_utils/getEntityProp.js +11 -0
- package/dist/es/entity/_utils/getEntityText.js +34 -0
- package/dist/es/general/AvatarMenu/AvatarMenu.js +153 -0
- package/dist/es/general/AvatarMenu/components/Avatar.js +30 -0
- package/dist/es/general/AvatarMenu/components/MenuItem.js +29 -0
- package/dist/es/general/AvatarMenu/index.js +11 -0
- package/dist/es/general/BlurredBackground/BlurredBackground.js +85 -0
- package/dist/es/general/BlurredBackground/index.js +11 -0
- package/dist/es/general/CalendarPicker/CalendarPicker.js +397 -0
- package/dist/es/general/CalendarPicker/components/PickersDay.js +71 -0
- package/dist/es/general/CalendarPicker/index.js +11 -0
- package/dist/es/general/CalendarPicker/utils/index.js +17 -0
- package/dist/es/general/CompactBadge/CompactBadge.js +65 -0
- package/dist/es/general/CompactBadge/index.js +11 -0
- package/dist/es/general/CompactLabel/CompactLabel.js +70 -0
- package/dist/es/general/CompactLabel/index.js +11 -0
- package/dist/es/general/CornerLabelPlacer/CornerLabelPlacer.js +105 -0
- package/dist/es/general/CornerLabelPlacer/index.js +11 -0
- package/dist/es/general/ExpandButton/ExpandButton.js +81 -0
- package/dist/es/general/ExpandButton/index.js +11 -0
- package/dist/es/general/Form/Form.js +230 -0
- package/dist/es/general/Form/index.js +11 -0
- package/dist/es/general/ImageCollage/ImageCollage.js +151 -0
- package/dist/es/general/ImageCollage/index.js +11 -0
- package/dist/es/general/MediaIcon/MediaIcon.js +101 -0
- package/dist/es/general/MediaIcon/index.js +11 -0
- package/dist/es/general/MenuItem/MenuItem.js +91 -0
- package/dist/es/general/MenuItem/index.js +11 -0
- package/dist/es/general/ScrubLine/ScrubLine.js +141 -0
- package/dist/es/general/ScrubLine/index.js +11 -0
- package/dist/es/general/Sort/Sort.js +179 -0
- package/dist/es/general/Sort/components/ButtonBase.js +19 -0
- package/dist/es/general/Sort/components/MenuItem.js +15 -0
- package/dist/es/general/Sort/index.js +11 -0
- package/dist/es/general/TablePagination/TablePagination.js +104 -0
- package/dist/es/general/TablePagination/index.js +11 -0
- package/dist/es/general/ThemeContext/ThemeContext.js +96 -0
- package/dist/es/inputs/BasicDateTimeInput/BasicDateTimeInput.js +133 -0
- package/dist/es/inputs/BasicDateTimeInput/index.js +11 -0
- package/dist/es/inputs/BooleanInput/BooleanInput.js +196 -0
- package/dist/es/inputs/BooleanInput/index.js +11 -0
- package/dist/es/inputs/CheckboxGroupInput/CheckboxGroupInput.js +292 -0
- package/dist/es/inputs/CheckboxGroupInput/components/CheckboxGroup.js +81 -0
- package/dist/es/inputs/CheckboxGroupInput/index.js +11 -0
- package/dist/es/inputs/DateRangeInput/DateRangeInput.js +362 -0
- package/dist/es/inputs/DateRangeInput/components/utils/valueManagers.js +20 -0
- package/dist/es/inputs/DateRangeInput/index.js +11 -0
- package/dist/es/inputs/DateRangeInput/utils/dateHelpers.js +31 -0
- package/dist/es/inputs/DateTimeInput/DateTimeInput.js +250 -0
- package/dist/es/inputs/DateTimeInput/index.js +11 -0
- package/dist/es/inputs/MaskedTextInput/MaskedTextInput.js +235 -0
- package/dist/es/inputs/MaskedTextInput/components/MaskedInputComponent.js +13 -0
- package/dist/es/inputs/MaskedTextInput/index.js +11 -0
- package/dist/es/inputs/NumberInput/NumberInput.js +134 -0
- package/dist/es/inputs/NumberInput/index.js +11 -0
- package/dist/es/inputs/RadioGroupInput/RadioGroupInput.js +287 -0
- package/dist/es/inputs/RadioGroupInput/components/RadioGroup.js +72 -0
- package/dist/es/inputs/RadioGroupInput/index.js +11 -0
- package/dist/es/inputs/SelectInput/SelectInput.js +195 -0
- package/dist/es/inputs/SelectInput/index.js +11 -0
- package/dist/es/inputs/SliderInput/SliderInput.js +350 -0
- package/dist/es/inputs/SliderInput/components/Slider.js +124 -0
- package/dist/es/inputs/SliderInput/index.js +11 -0
- package/dist/es/inputs/TagInput/TagInput.js +356 -0
- package/dist/es/inputs/TagInput/index.js +11 -0
- package/dist/es/inputs/TextInput/TextInput.js +154 -0
- package/dist/es/inputs/TextInput/index.js +11 -0
- package/dist/es/inputs/_components/FormControlLabel.js +60 -0
- package/dist/es/inputs/_components/MenuItem.js +23 -0
- package/dist/es/item/ItemCard/ItemCard.js +293 -0
- package/dist/es/item/ItemCard/components/ItemCardMedia.js +20 -0
- package/dist/es/item/ItemCard/index.js +11 -0
- package/dist/es/item/ItemList/ItemList.js +158 -0
- package/dist/es/item/ItemList/index.js +11 -0
- package/dist/es/item/ItemListItem/ItemListItem.js +122 -0
- package/dist/es/item/ItemListItem/index.js +11 -0
- package/dist/es/item/ItemPoster/ItemPoster.js +132 -0
- package/dist/es/item/ItemPoster/index.js +11 -0
- package/dist/es/item/ItemPosterList/ItemPosterList.js +99 -0
- package/dist/es/item/ItemPosterList/index.js +11 -0
- package/dist/es/item/ItemPosterViewer/ItemPosterViewer.js +190 -0
- package/dist/es/item/ItemPosterViewer/components/Toolbar.js +27 -0
- package/dist/es/item/ItemPosterViewer/index.js +11 -0
- package/dist/es/item/ItemTable/ItemTable.js +201 -0
- package/dist/es/item/ItemTable/components/ItemTableHead.js +35 -0
- package/dist/es/item/ItemTable/index.js +11 -0
- package/dist/es/item/ItemTableRow/ItemTableRow.js +150 -0
- package/dist/es/item/ItemTableRow/index.js +11 -0
- package/dist/es/item/ItemThumbnail/ItemThumbnail.js +210 -0
- package/dist/es/item/ItemThumbnail/index.js +11 -0
- package/dist/es/search/SearchFilterForm/SearchFilterForm.js +138 -0
- package/dist/es/search/SearchFilterForm/hooks/UseSearchFilterFormInputs.js +130 -0
- package/dist/es/search/SearchFilterForm/index.js +12 -0
- package/dist/es/search/SearchFilterForm/utils/mapValuesToFilter.js +84 -0
- package/dist/es/shape/ShapeMediaBadges/ShapeMediaBadges.js +78 -0
- package/dist/es/shape/ShapeMediaBadges/index.js +11 -0
- package/dist/es/transcode/TranscodePresetMediaBadges/TranscodePresetMediaBadges.js +78 -0
- package/dist/es/transcode/TranscodePresetMediaBadges/index.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +93 -0
- package/package.json +35 -19
- package/dist/index.js +0 -13109
- package/dist/index.umd.cjs +0 -6
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import o from "prop-types";
|
|
3
|
+
import u from "@mui/material/Box";
|
|
4
|
+
import { styled as l } from "@mui/material/styles";
|
|
5
|
+
const m = l(u, {
|
|
6
|
+
shouldForwardProp: (r) => !["image", "blur", "grayscale"].includes(r)
|
|
7
|
+
})(({
|
|
8
|
+
color: r,
|
|
9
|
+
image: e,
|
|
10
|
+
blur: t,
|
|
11
|
+
grayscale: n
|
|
12
|
+
}) => ({
|
|
13
|
+
height: "100%",
|
|
14
|
+
width: "100%",
|
|
15
|
+
backgroundColor: r,
|
|
16
|
+
backgroundImage: `url(${e})`,
|
|
17
|
+
backgroundSize: "cover",
|
|
18
|
+
backgroundRepeat: "no-repeat",
|
|
19
|
+
backgroundPosition: "center",
|
|
20
|
+
filter: `blur(${Math.max(t, 0)}px) grayscale(${Math.max(n, 0)}%)`
|
|
21
|
+
})), d = {
|
|
22
|
+
Root: m
|
|
23
|
+
};
|
|
24
|
+
function s({
|
|
25
|
+
image: r,
|
|
26
|
+
color: e,
|
|
27
|
+
blur: t,
|
|
28
|
+
grayscale: n,
|
|
29
|
+
components: c,
|
|
30
|
+
componentsProps: a
|
|
31
|
+
}) {
|
|
32
|
+
const {
|
|
33
|
+
Root: p
|
|
34
|
+
} = c;
|
|
35
|
+
return /* @__PURE__ */ i(p, { component: "div", image: r, blur: t, grayscale: n, ...a.root, sx: {
|
|
36
|
+
...!r && {
|
|
37
|
+
backgroundColor: e
|
|
38
|
+
},
|
|
39
|
+
...a.root.sx || {}
|
|
40
|
+
} });
|
|
41
|
+
}
|
|
42
|
+
s.propTypes = {
|
|
43
|
+
/**
|
|
44
|
+
* The image uri to show as blurred
|
|
45
|
+
*/
|
|
46
|
+
image: o.string,
|
|
47
|
+
/**
|
|
48
|
+
* Set a blurred background color (works with a sx theme palette string)
|
|
49
|
+
*
|
|
50
|
+
* Note: `image` has precedence
|
|
51
|
+
*/
|
|
52
|
+
color: o.string,
|
|
53
|
+
/**
|
|
54
|
+
* Set blur amount (in px)
|
|
55
|
+
*/
|
|
56
|
+
blur: o.number,
|
|
57
|
+
/**
|
|
58
|
+
* Set grayscale amount (in percentage)
|
|
59
|
+
*/
|
|
60
|
+
grayscale: o.number,
|
|
61
|
+
// Overrides
|
|
62
|
+
/**
|
|
63
|
+
* Replace internal components
|
|
64
|
+
*/
|
|
65
|
+
components: o.shape({
|
|
66
|
+
Root: o.elementType
|
|
67
|
+
}),
|
|
68
|
+
/**
|
|
69
|
+
* Add internal component props
|
|
70
|
+
*/
|
|
71
|
+
componentsProps: o.shape({
|
|
72
|
+
root: o.instanceOf(Object)
|
|
73
|
+
})
|
|
74
|
+
};
|
|
75
|
+
s.defaultProps = {
|
|
76
|
+
image: void 0,
|
|
77
|
+
color: "primary.main",
|
|
78
|
+
blur: 20,
|
|
79
|
+
grayscale: 50,
|
|
80
|
+
components: d,
|
|
81
|
+
componentsProps: void 0
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
s as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as t } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as n } from "../../_utils/withOverrides.js";
|
|
3
|
+
import d from "./BlurredBackground.js";
|
|
4
|
+
const o = "BlurredBackground", r = `Vdt${o}`, m = n(r)(d), s = t(m, {
|
|
5
|
+
name: r,
|
|
6
|
+
overridesResolver: (i, e) => e.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
s.displayName = o;
|
|
9
|
+
export {
|
|
10
|
+
s as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { jsxs as y, jsx as o, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
+
import { useState as se, useRef as H, useMemo as E, useEffect as ue } from "react";
|
|
3
|
+
import e from "prop-types";
|
|
4
|
+
import me from "@mui/material/Paper";
|
|
5
|
+
import fe from "@mui/material/Divider";
|
|
6
|
+
import z from "@mui/material/Button";
|
|
7
|
+
import he from "@mui/material/Box";
|
|
8
|
+
import ge from "@mui/material/ButtonGroup";
|
|
9
|
+
import { styled as u } from "@mui/material/styles";
|
|
10
|
+
import { CalendarPicker as W, LocalizationProvider as be } from "@mui/x-date-pickers";
|
|
11
|
+
import { AdapterDayjs as G } from "@mui/x-date-pickers/AdapterDayjs";
|
|
12
|
+
import ye from "./components/PickersDay.js";
|
|
13
|
+
import "dayjs/locale/fr";
|
|
14
|
+
import "dayjs/locale/de";
|
|
15
|
+
import "dayjs/locale/sv";
|
|
16
|
+
import "dayjs/locale/en-gb";
|
|
17
|
+
const F = ["en", "en-gb", "de", "sv", "fr"], Ce = u(me)(() => ({
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
width: "min-content",
|
|
21
|
+
margin: "auto",
|
|
22
|
+
minWidth: 300
|
|
23
|
+
})), Pe = u(W, {
|
|
24
|
+
shouldForwardProp: (r) => r !== "showDouble"
|
|
25
|
+
})(({
|
|
26
|
+
showDouble: r,
|
|
27
|
+
views: m
|
|
28
|
+
}) => ({
|
|
29
|
+
margin: 0,
|
|
30
|
+
minWidth: 300,
|
|
31
|
+
maxHeight: "unset",
|
|
32
|
+
"& .MuiDayPicker-weekDayLabel": {
|
|
33
|
+
margin: "0 1px"
|
|
34
|
+
},
|
|
35
|
+
...m.length === 1 && m.includes("day") && {
|
|
36
|
+
"& .MuiPickersCalendarHeader-labelContainer": {
|
|
37
|
+
pointerEvents: "none"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
...r && {
|
|
41
|
+
"& .MuiPickersArrowSwitcher-spacer": {
|
|
42
|
+
display: "none"
|
|
43
|
+
},
|
|
44
|
+
"& .MuiPickersCalendarHeader-root": {
|
|
45
|
+
paddingLeft: 24,
|
|
46
|
+
paddingRight: 24,
|
|
47
|
+
display: "flex",
|
|
48
|
+
flexDirection: "row-reverse",
|
|
49
|
+
"& .MuiPickersCalendarHeader-labelContainer": {
|
|
50
|
+
margin: "auto",
|
|
51
|
+
"& .MuiPickersCalendarHeader-label": {
|
|
52
|
+
margin: 0
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
})), ke = u(W, {
|
|
58
|
+
shouldForwardProp: (r) => r !== "showDouble"
|
|
59
|
+
})(({
|
|
60
|
+
views: r
|
|
61
|
+
}) => ({
|
|
62
|
+
margin: 0,
|
|
63
|
+
minWidth: 300,
|
|
64
|
+
maxHeight: "unset",
|
|
65
|
+
"& .MuiDayPicker-weekDayLabel": {
|
|
66
|
+
margin: "0 1px"
|
|
67
|
+
},
|
|
68
|
+
...r.length === 1 && r.includes("day") && {
|
|
69
|
+
"& .MuiPickersCalendarHeader-labelContainer": {
|
|
70
|
+
pointerEvents: "none"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"& .MuiPickersArrowSwitcher-spacer": {
|
|
74
|
+
display: "none"
|
|
75
|
+
},
|
|
76
|
+
"& .MuiPickersCalendarHeader-root": {
|
|
77
|
+
paddingLeft: 24,
|
|
78
|
+
paddingRight: 24,
|
|
79
|
+
"& .MuiPickersCalendarHeader-labelContainer": {
|
|
80
|
+
margin: "auto",
|
|
81
|
+
"& .MuiPickersCalendarHeader-label": {
|
|
82
|
+
margin: 0
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
})), Te = u(he)(() => ({
|
|
87
|
+
display: "flex"
|
|
88
|
+
})), pe = u(ge)(() => ({
|
|
89
|
+
padding: "3px"
|
|
90
|
+
})), Oe = {
|
|
91
|
+
Root: Ce,
|
|
92
|
+
LocalizationProvider: be,
|
|
93
|
+
Box: Te,
|
|
94
|
+
CalendarPickerLeft: Pe,
|
|
95
|
+
CalendarPickerRight: ke,
|
|
96
|
+
PickersDay: ye,
|
|
97
|
+
Divider: fe,
|
|
98
|
+
ButtonGroup: pe,
|
|
99
|
+
ClearButton: z,
|
|
100
|
+
SubmitButton: z
|
|
101
|
+
};
|
|
102
|
+
function I({
|
|
103
|
+
value: r,
|
|
104
|
+
defaultValue: m,
|
|
105
|
+
range: f,
|
|
106
|
+
monthDate: s,
|
|
107
|
+
rangeValueToChange: C,
|
|
108
|
+
disableHighlightToday: N,
|
|
109
|
+
disablePast: p,
|
|
110
|
+
disableFuture: O,
|
|
111
|
+
minDate: v,
|
|
112
|
+
maxDate: M,
|
|
113
|
+
locale: h,
|
|
114
|
+
showDouble: l,
|
|
115
|
+
submitOnChange: K,
|
|
116
|
+
clearText: _,
|
|
117
|
+
submitText: Y,
|
|
118
|
+
onMonthChange: $,
|
|
119
|
+
onChange: c,
|
|
120
|
+
onReset: q,
|
|
121
|
+
onSubmit: J,
|
|
122
|
+
components: Q,
|
|
123
|
+
componentsProps: a
|
|
124
|
+
}) {
|
|
125
|
+
var j, w;
|
|
126
|
+
const {
|
|
127
|
+
Root: U,
|
|
128
|
+
LocalizationProvider: X,
|
|
129
|
+
Box: Z,
|
|
130
|
+
CalendarPickerLeft: V,
|
|
131
|
+
CalendarPickerRight: ee,
|
|
132
|
+
PickersDay: x,
|
|
133
|
+
Divider: S,
|
|
134
|
+
ClearButton: te,
|
|
135
|
+
SubmitButton: ne,
|
|
136
|
+
ButtonGroup: re
|
|
137
|
+
} = Q, d = new G(), [D, B] = se(s ?? (/* @__PURE__ */ new Date()).toISOString()), g = H(C || "START"), i = H(r || m), n = (f ? (r == null ? void 0 : r.start) !== null && (r == null ? void 0 : r.end) !== null : r !== void 0) ? r : i.current, R = C !== void 0 ? C : g.current, P = d.date(s || D), k = d.date(s || D).add(1, "month"), ie = E(() => l ? P : void 0, [P, l]), ae = E(() => l ? k : void 0, [k, l]), b = (t) => {
|
|
138
|
+
B(d.date(t)), $(null, {
|
|
139
|
+
value: t.toISOString()
|
|
140
|
+
});
|
|
141
|
+
}, L = (t) => {
|
|
142
|
+
i.current = t.toISOString(), c(null, {
|
|
143
|
+
value: i.current
|
|
144
|
+
});
|
|
145
|
+
}, A = (t) => {
|
|
146
|
+
R === "START" ? (!(n != null && n.end) || d.date(n == null ? void 0 : n.end).isBefore(t) ? (i.current = {
|
|
147
|
+
start: t.format(),
|
|
148
|
+
end: void 0
|
|
149
|
+
}, c(null, {
|
|
150
|
+
value: i.current
|
|
151
|
+
})) : (i.current = {
|
|
152
|
+
...n,
|
|
153
|
+
start: t.format()
|
|
154
|
+
}, c(null, {
|
|
155
|
+
value: i.current
|
|
156
|
+
})), g.current = "END") : R === "END" && (!(n != null && n.start) || d.date(n == null ? void 0 : n.start).isAfter(t) ? (i.current = {
|
|
157
|
+
start: void 0,
|
|
158
|
+
end: t.format()
|
|
159
|
+
}, c(null, {
|
|
160
|
+
value: i.current
|
|
161
|
+
})) : (i.current = {
|
|
162
|
+
...n,
|
|
163
|
+
end: t.format()
|
|
164
|
+
}, c(null, {
|
|
165
|
+
value: i.current
|
|
166
|
+
})), g.current = "START");
|
|
167
|
+
}, oe = (t) => {
|
|
168
|
+
i.current = f ? {
|
|
169
|
+
start: void 0,
|
|
170
|
+
end: void 0
|
|
171
|
+
} : "", g.current = "START", b(d.date(/* @__PURE__ */ new Date())), c(t, {
|
|
172
|
+
value: i.current
|
|
173
|
+
}), q();
|
|
174
|
+
}, le = (t) => {
|
|
175
|
+
J(t, {
|
|
176
|
+
value: i.current
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
return ue(() => {
|
|
180
|
+
B(s);
|
|
181
|
+
}, [s]), /* @__PURE__ */ y(U, { ...a.root, children: [
|
|
182
|
+
/* @__PURE__ */ o(X, { dateAdapter: G, adapterLocale: F.includes(h) ? h : "en", ...a.localizationProvider, children: /* @__PURE__ */ y(Z, { ...a.box, children: [
|
|
183
|
+
/* @__PURE__ */ o(
|
|
184
|
+
V,
|
|
185
|
+
{
|
|
186
|
+
defaultCalendarMonth: P,
|
|
187
|
+
disableHighlightToday: N,
|
|
188
|
+
disablePast: p,
|
|
189
|
+
disableFuture: O,
|
|
190
|
+
showDouble: l,
|
|
191
|
+
minDate: v,
|
|
192
|
+
maxDate: M,
|
|
193
|
+
renderDay: (t, de, T) => /* @__PURE__ */ o(x, { date: t, value: n, locale: h, ...T }),
|
|
194
|
+
onMonthChange: (t) => b(t.toDate()),
|
|
195
|
+
onYearChange: b,
|
|
196
|
+
onChange: (t) => f ? A(t) : L(t),
|
|
197
|
+
reduceAnimations: !0,
|
|
198
|
+
views: ["day", "year"],
|
|
199
|
+
...a.calendarPickerLeft,
|
|
200
|
+
components: {
|
|
201
|
+
...l ? {
|
|
202
|
+
RightArrowButton: () => null
|
|
203
|
+
} : {},
|
|
204
|
+
...((j = a.calendarPickerLeft) == null ? void 0 : j.components) || {}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
ie
|
|
208
|
+
),
|
|
209
|
+
l && /* @__PURE__ */ y(ce, { children: [
|
|
210
|
+
/* @__PURE__ */ o(S, { flexItem: !0, orientation: "vertical", sx: {
|
|
211
|
+
borderWidth: 1
|
|
212
|
+
} }),
|
|
213
|
+
/* @__PURE__ */ o(
|
|
214
|
+
ee,
|
|
215
|
+
{
|
|
216
|
+
defaultCalendarMonth: k,
|
|
217
|
+
disablePast: p,
|
|
218
|
+
disableFuture: O,
|
|
219
|
+
minDate: v,
|
|
220
|
+
maxDate: M,
|
|
221
|
+
renderDay: (t, de, T) => /* @__PURE__ */ o(x, { date: t, value: n, locale: h, ...T }),
|
|
222
|
+
onMonthChange: (t) => b(d.date(t).subtract(1, "month")),
|
|
223
|
+
onChange: (t) => f ? A(t) : L(t),
|
|
224
|
+
disableHighlightToday: !0,
|
|
225
|
+
reduceAnimations: !0,
|
|
226
|
+
views: ["day"],
|
|
227
|
+
...a.calendarPickerRight,
|
|
228
|
+
components: {
|
|
229
|
+
LeftArrowButton: () => null,
|
|
230
|
+
...((w = a.calendarPickerRight) == null ? void 0 : w.components) || {}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
ae
|
|
234
|
+
)
|
|
235
|
+
] })
|
|
236
|
+
] }) }),
|
|
237
|
+
/* @__PURE__ */ o(S, { sx: {
|
|
238
|
+
borderWidth: 1
|
|
239
|
+
} }),
|
|
240
|
+
/* @__PURE__ */ y(re, { variant: "text", fullWidth: !0, children: [
|
|
241
|
+
/* @__PURE__ */ o(te, { "data-testid": "clear-btn", onClick: oe, ...a.clearButton, children: _ }),
|
|
242
|
+
!K && /* @__PURE__ */ o(ne, { "data-testid": "submit-btn", onClick: le, disabled: !(n != null && n.start || n != null && n.end), ...a.submitButton, children: Y })
|
|
243
|
+
] })
|
|
244
|
+
] });
|
|
245
|
+
}
|
|
246
|
+
I.propTypes = {
|
|
247
|
+
/**
|
|
248
|
+
* The selected start date for the picker
|
|
249
|
+
*/
|
|
250
|
+
value: e.oneOfType([e.shape({
|
|
251
|
+
start: e.string,
|
|
252
|
+
end: e.string
|
|
253
|
+
}), e.string, e.number]),
|
|
254
|
+
/**
|
|
255
|
+
* The selected end date for the picker
|
|
256
|
+
*/
|
|
257
|
+
defaultValue: e.oneOfType([e.shape({
|
|
258
|
+
start: e.string,
|
|
259
|
+
end: e.string
|
|
260
|
+
}), e.string, e.number]),
|
|
261
|
+
/**
|
|
262
|
+
* Month to display
|
|
263
|
+
*
|
|
264
|
+
* Note: Will set left month if double calendar (right calender will be next month after that)
|
|
265
|
+
*/
|
|
266
|
+
monthDate: e.oneOfType([e.string, e.number]),
|
|
267
|
+
/**
|
|
268
|
+
* Set if it should select start or end
|
|
269
|
+
*/
|
|
270
|
+
range: e.bool,
|
|
271
|
+
/**
|
|
272
|
+
* Used to select if it's start or end you should set
|
|
273
|
+
*
|
|
274
|
+
* Note: Will alternate between start then end if undefined
|
|
275
|
+
*/
|
|
276
|
+
rangeValueToChange: e.oneOf(["START", "END"]),
|
|
277
|
+
/**
|
|
278
|
+
* Set if highlight today's date should be disabled
|
|
279
|
+
*/
|
|
280
|
+
disableHighlightToday: e.bool,
|
|
281
|
+
/**
|
|
282
|
+
* Set past dates in picker
|
|
283
|
+
*/
|
|
284
|
+
disablePast: e.bool,
|
|
285
|
+
/**
|
|
286
|
+
* Set future dates in picker
|
|
287
|
+
*/
|
|
288
|
+
disableFuture: e.bool,
|
|
289
|
+
/**
|
|
290
|
+
* Locale of calendar picker
|
|
291
|
+
*/
|
|
292
|
+
locale: e.oneOf(F),
|
|
293
|
+
/**
|
|
294
|
+
* Set min date to pick
|
|
295
|
+
*/
|
|
296
|
+
minDate: e.oneOfType([e.string, e.number]),
|
|
297
|
+
/**
|
|
298
|
+
* Set max date time to pick
|
|
299
|
+
*/
|
|
300
|
+
maxDate: e.oneOfType([e.string, e.number]),
|
|
301
|
+
/**
|
|
302
|
+
* Render single or double picker
|
|
303
|
+
*/
|
|
304
|
+
showDouble: e.bool,
|
|
305
|
+
/**
|
|
306
|
+
* Set text for clear button
|
|
307
|
+
*/
|
|
308
|
+
clearText: e.string,
|
|
309
|
+
/**
|
|
310
|
+
* Set text for submit button
|
|
311
|
+
*/
|
|
312
|
+
submitText: e.string,
|
|
313
|
+
/**
|
|
314
|
+
* Submit range after selection
|
|
315
|
+
*/
|
|
316
|
+
submitOnChange: e.bool,
|
|
317
|
+
// Callbacks
|
|
318
|
+
/**
|
|
319
|
+
* Callback when value changed
|
|
320
|
+
*
|
|
321
|
+
* Note: Only triggered when changed to a valid date
|
|
322
|
+
*/
|
|
323
|
+
onChange: e.func,
|
|
324
|
+
/**
|
|
325
|
+
* Callback when month is changed
|
|
326
|
+
*
|
|
327
|
+
* Note: will return month from left calender if double
|
|
328
|
+
*/
|
|
329
|
+
onMonthChange: e.func,
|
|
330
|
+
/**
|
|
331
|
+
* Callback when reset button is clicked
|
|
332
|
+
*
|
|
333
|
+
*/
|
|
334
|
+
onReset: e.func,
|
|
335
|
+
/**
|
|
336
|
+
* Callback when submit button is clicked
|
|
337
|
+
*
|
|
338
|
+
*/
|
|
339
|
+
onSubmit: e.func,
|
|
340
|
+
// Overrides
|
|
341
|
+
/**
|
|
342
|
+
* Replace internal components
|
|
343
|
+
*/
|
|
344
|
+
components: e.shape({
|
|
345
|
+
Root: e.elementType,
|
|
346
|
+
LocalizationProvider: e.elementType,
|
|
347
|
+
Box: e.elementType,
|
|
348
|
+
CalendarPickerLeft: e.elementType,
|
|
349
|
+
CalendarPickerRight: e.elementType,
|
|
350
|
+
PickersDay: e.elementType,
|
|
351
|
+
Divider: e.elementType,
|
|
352
|
+
ClearButton: e.elementType,
|
|
353
|
+
SubmitButton: e.elementType,
|
|
354
|
+
ButtonGroup: e.elementType
|
|
355
|
+
}),
|
|
356
|
+
/**
|
|
357
|
+
* Add internal component props
|
|
358
|
+
*/
|
|
359
|
+
componentsProps: e.shape({
|
|
360
|
+
root: e.instanceOf(Object),
|
|
361
|
+
localizationProvider: e.instanceOf(Object),
|
|
362
|
+
box: e.instanceOf(Object),
|
|
363
|
+
calendarPickerLeft: e.instanceOf(Object),
|
|
364
|
+
calendarPickerRight: e.instanceOf(Object),
|
|
365
|
+
pickersDay: e.instanceOf(Object),
|
|
366
|
+
divider: e.instanceOf(Object),
|
|
367
|
+
clearButton: e.instanceOf(Object),
|
|
368
|
+
submitButton: e.instanceOf(Object),
|
|
369
|
+
buttonGroup: e.instanceOf(Object)
|
|
370
|
+
})
|
|
371
|
+
};
|
|
372
|
+
I.defaultProps = {
|
|
373
|
+
value: void 0,
|
|
374
|
+
defaultValue: void 0,
|
|
375
|
+
range: !0,
|
|
376
|
+
rangeValueToChange: void 0,
|
|
377
|
+
monthDate: void 0,
|
|
378
|
+
disableHighlightToday: !1,
|
|
379
|
+
disablePast: !1,
|
|
380
|
+
disableFuture: !1,
|
|
381
|
+
minDate: void 0,
|
|
382
|
+
maxDate: void 0,
|
|
383
|
+
showDouble: !1,
|
|
384
|
+
locale: "en",
|
|
385
|
+
clearText: "Clear",
|
|
386
|
+
submitText: "Submit",
|
|
387
|
+
submitOnChange: !0,
|
|
388
|
+
onChange: () => null,
|
|
389
|
+
onMonthChange: () => null,
|
|
390
|
+
onReset: () => null,
|
|
391
|
+
onSubmit: () => null,
|
|
392
|
+
componentsProps: void 0,
|
|
393
|
+
components: Oe
|
|
394
|
+
};
|
|
395
|
+
export {
|
|
396
|
+
I as default
|
|
397
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import y from "dayjs";
|
|
3
|
+
import u from "@mui/material/Box";
|
|
4
|
+
import { styled as b } from "@mui/material/styles";
|
|
5
|
+
import { PickersDay as F } from "@mui/x-date-pickers";
|
|
6
|
+
import { getFirstDayOfWeek as B, getLastDayOfWeek as L, getLastDayOfMonth as P, differenceInDays as g } from "../utils/index.js";
|
|
7
|
+
const h = "50% 0px 0px 50%", k = "0px 50% 50% 0px", W = b(u, {
|
|
8
|
+
shouldForwardProp: (o) => !["isSelectedDay", "isBetweenSelected", "isSelectedStartEndDay", "borderRadius"].includes(o)
|
|
9
|
+
})(({
|
|
10
|
+
isSelectedDay: o,
|
|
11
|
+
isBetweenSelected: t,
|
|
12
|
+
borderRadius: i
|
|
13
|
+
}) => ({
|
|
14
|
+
borderRadius: i,
|
|
15
|
+
...(o || t) && {
|
|
16
|
+
backgroundColor: "rgba(66, 165, 245, 0.6)"
|
|
17
|
+
}
|
|
18
|
+
})), R = b(F, {
|
|
19
|
+
shouldForwardProp: (o) => !["isSelectedDay", "isBetweenSelected", "isStart", "isEnd"].includes(o)
|
|
20
|
+
})(({
|
|
21
|
+
isSelectedDay: o,
|
|
22
|
+
isBetweenSelected: t,
|
|
23
|
+
isStart: i,
|
|
24
|
+
isEnd: e,
|
|
25
|
+
outsideCurrentMonth: n,
|
|
26
|
+
theme: s
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
palette: {
|
|
30
|
+
mode: c
|
|
31
|
+
}
|
|
32
|
+
} = s;
|
|
33
|
+
return {
|
|
34
|
+
margin: 0,
|
|
35
|
+
height: "38px",
|
|
36
|
+
width: "38px",
|
|
37
|
+
backgroundColor: "transparent",
|
|
38
|
+
...o && {
|
|
39
|
+
backgroundColor: "rgb(25, 118, 210)",
|
|
40
|
+
"&:hover, &:focus": {
|
|
41
|
+
backgroundColor: "rgb(21, 103, 184)"
|
|
42
|
+
},
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
...(i || e) && c === "light" && {
|
|
45
|
+
color: "#fff"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
...(t || n) && {
|
|
49
|
+
backgroundColor: "transparent"
|
|
50
|
+
},
|
|
51
|
+
...n && {
|
|
52
|
+
pointerEvents: "none"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
function U({
|
|
57
|
+
date: o,
|
|
58
|
+
value: t,
|
|
59
|
+
locale: i,
|
|
60
|
+
...e
|
|
61
|
+
}) {
|
|
62
|
+
const n = t != null && t.start ? y(t == null ? void 0 : t.start).toDate() : void 0, s = t != null && t.end ? y(t == null ? void 0 : t.end).toDate() : void 0, c = t && typeof t == "string" ? y(t).toDate() : void 0, r = o.toDate(), x = B({
|
|
63
|
+
locale: i
|
|
64
|
+
}) === r.getDay(), E = L({
|
|
65
|
+
locale: i
|
|
66
|
+
}) === r.getDay(), p = (r == null ? void 0 : r.getDate()) === 1, w = P(r) === (r == null ? void 0 : r.getDate()), S = x || p, m = E || w, O = n && g(r, n) === 0 || s && g(r, s) === 0 || c && g(r, c) === 0, d = +n == +r, f = +s == +r, D = r > n && r < s, C = (() => c || (d || !n) && (f || !s) || S && m && (D || d || f) ? "50%" : S ? f ? "50%" : h : m ? d ? "50%" : k : d ? h : f ? k : D ? "unset" : "50%")();
|
|
67
|
+
return e != null && e.outsideCurrentMonth ? /* @__PURE__ */ a(R, { ...e }) : /* @__PURE__ */ a(W, { isSelectedDay: O, isBetweenSelected: D, borderRadius: C, children: /* @__PURE__ */ a(R, { ...e, isSelectedDay: O, isBetweenSelected: D, isStart: d, isEnd: f }) });
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
U as default
|
|
71
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as t } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as n } from "../../_utils/withOverrides.js";
|
|
3
|
+
import m from "./CalendarPicker.js";
|
|
4
|
+
const e = "CalendarPicker", o = `Vdt${e}`, i = n(o)(m), s = t(i, {
|
|
5
|
+
name: o,
|
|
6
|
+
overridesResolver: (a, r) => r.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
s.displayName = e;
|
|
9
|
+
export {
|
|
10
|
+
s as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "dayjs";
|
|
2
|
+
import o from "dayjs/plugin/localeData";
|
|
3
|
+
t.extend(o);
|
|
4
|
+
const l = (e, a) => (
|
|
5
|
+
// Get difference without accounting for time
|
|
6
|
+
t(e).diff(t(a), "day")
|
|
7
|
+
), n = ({
|
|
8
|
+
locale: e
|
|
9
|
+
}) => t().locale(e).localeData().firstDayOfWeek(), r = ({
|
|
10
|
+
locale: e
|
|
11
|
+
}) => t().locale(e).localeData().firstDayOfWeek() + 6 === 6 ? 6 : 0, f = (e) => new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
|
|
12
|
+
export {
|
|
13
|
+
l as differenceInDays,
|
|
14
|
+
n as getFirstDayOfWeek,
|
|
15
|
+
f as getLastDayOfMonth,
|
|
16
|
+
r as getLastDayOfWeek
|
|
17
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import o from "prop-types";
|
|
3
|
+
import s from "@mui/material/Box";
|
|
4
|
+
import a from "@mui/material/Typography";
|
|
5
|
+
import { styled as m } from "@mui/material/styles";
|
|
6
|
+
const d = m(s)(({
|
|
7
|
+
theme: e
|
|
8
|
+
}) => ({
|
|
9
|
+
height: "1rem",
|
|
10
|
+
borderColor: e.palette.primary.main,
|
|
11
|
+
borderWidth: 1.45,
|
|
12
|
+
borderStyle: "solid",
|
|
13
|
+
backgroundColor: e.palette.mode === "light" ? "unset" : "rgba(0, 0, 0, .15)",
|
|
14
|
+
padding: "0 4px",
|
|
15
|
+
borderRadius: 2.5,
|
|
16
|
+
whiteSpace: "nowrap",
|
|
17
|
+
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
|
|
18
|
+
fontWeight: 900,
|
|
19
|
+
fontSize: "0.7rem",
|
|
20
|
+
letterSpacing: "0.08em",
|
|
21
|
+
textTransform: "uppercase",
|
|
22
|
+
minWidth: 32,
|
|
23
|
+
textAlign: "center",
|
|
24
|
+
userSelect: "none"
|
|
25
|
+
})), c = {
|
|
26
|
+
Root: d,
|
|
27
|
+
Badge: a
|
|
28
|
+
};
|
|
29
|
+
function t({
|
|
30
|
+
text: e,
|
|
31
|
+
components: r,
|
|
32
|
+
componentsProps: n
|
|
33
|
+
}) {
|
|
34
|
+
const {
|
|
35
|
+
Root: p
|
|
36
|
+
} = r;
|
|
37
|
+
return /* @__PURE__ */ i(p, { component: "span", ...n.root, children: e });
|
|
38
|
+
}
|
|
39
|
+
t.propTypes = {
|
|
40
|
+
/**
|
|
41
|
+
* Text to show as badge
|
|
42
|
+
*/
|
|
43
|
+
text: o.string,
|
|
44
|
+
// Overrides
|
|
45
|
+
/**
|
|
46
|
+
* Replace internal components
|
|
47
|
+
*/
|
|
48
|
+
components: o.shape({
|
|
49
|
+
Root: o.elementType
|
|
50
|
+
}),
|
|
51
|
+
/**
|
|
52
|
+
* Add internal component props
|
|
53
|
+
*/
|
|
54
|
+
componentsProps: o.shape({
|
|
55
|
+
root: o.instanceOf(Object)
|
|
56
|
+
})
|
|
57
|
+
};
|
|
58
|
+
t.defaultProps = {
|
|
59
|
+
text: void 0,
|
|
60
|
+
components: c,
|
|
61
|
+
componentsProps: void 0
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
t as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled as r } from "@mui/material/styles";
|
|
2
|
+
import { withOverrides as m } from "../../_utils/withOverrides.js";
|
|
3
|
+
import n from "./CompactBadge.js";
|
|
4
|
+
const o = "CompactBadge", e = `Vdt${o}`, s = m(e)(n), a = r(s, {
|
|
5
|
+
name: e,
|
|
6
|
+
overridesResolver: (d, t) => t.root
|
|
7
|
+
})(() => ({}));
|
|
8
|
+
a.displayName = o;
|
|
9
|
+
export {
|
|
10
|
+
a as default
|
|
11
|
+
};
|