@zydon/common 2.2.48 → 2.2.50
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/chunk-23GJSDGU.js +10 -0
- package/dist/chunk-2MVQI7NJ.js +8 -0
- package/dist/chunk-3APKMSVD.js +5 -0
- package/dist/chunk-3E5A45HM.js +3 -0
- package/dist/chunk-4CNAGEPZ.js +13 -0
- package/dist/chunk-4INDXVIX.js +5 -0
- package/dist/chunk-56NARAT6.js +11 -0
- package/dist/chunk-5YJTSVA2.js +6 -0
- package/dist/chunk-7F56LFN2.js +17 -0
- package/dist/chunk-7KZ2UT76.js +8 -0
- package/dist/chunk-ANAHA3L6.js +3 -0
- package/dist/chunk-BA43A7R3.js +18 -0
- package/dist/chunk-BUYQKDFG.js +13 -0
- package/dist/chunk-BYAPKKGB.js +7 -0
- package/dist/chunk-CFVUZ4S5.js +5 -0
- package/dist/chunk-CFYNJQGN.js +43 -0
- package/dist/chunk-CQDKXUUX.js +3 -0
- package/dist/chunk-D27ND54J.js +16 -0
- package/dist/chunk-D2VRQ2K3.js +10 -0
- package/dist/chunk-DZ7YW2X6.js +18 -0
- package/dist/chunk-E5MGOPPQ.js +8 -0
- package/dist/chunk-EBTRMUBS.js +7 -0
- package/dist/chunk-EFUFJKJD.js +7 -0
- package/dist/chunk-F7CW3DXN.js +14 -0
- package/dist/chunk-GA4A5P3S.js +6 -0
- package/dist/chunk-GOC7PC2S.js +6 -0
- package/dist/chunk-ILHUUK4X.js +6 -0
- package/dist/chunk-KFZEM7KS.js +5 -0
- package/dist/chunk-KORVZU6L.js +17 -0
- package/dist/chunk-M6QHAL4V.js +7 -0
- package/dist/chunk-MCT77MRN.js +8 -0
- package/dist/chunk-NF42ENKE.js +9 -0
- package/dist/chunk-NHQNAQTD.js +7 -0
- package/dist/chunk-NQ32QBBI.js +7 -0
- package/dist/chunk-ORYAES3Q.js +5 -0
- package/dist/chunk-PMPALWRO.js +9 -0
- package/dist/chunk-QHVL5QNM.js +13 -0
- package/dist/chunk-QNAXGE5H.js +8 -0
- package/dist/chunk-QQB3DGHT.js +3 -0
- package/dist/chunk-RLMWIJKJ.js +10 -0
- package/dist/chunk-SEVJABAI.js +7 -0
- package/dist/chunk-T7I256S6.js +8 -0
- package/dist/chunk-TRI6XGH4.js +7 -0
- package/dist/chunk-TWGGHTU5.js +5 -0
- package/dist/chunk-UGH5FWZQ.js +13 -0
- package/dist/chunk-VTHBHXM2.js +7 -0
- package/dist/chunk-VVMQMROT.js +5 -0
- package/dist/chunk-W3MYAMTH.js +5 -0
- package/dist/chunk-WKD3OXUA.js +6 -0
- package/dist/chunk-YWEB6IAI.js +6 -0
- package/dist/chunk-YYKIC4EK.js +28 -0
- package/dist/chunk-Z2TDWMRU.js +6 -0
- package/dist/chunk-ZDHXW74M.js +5 -0
- package/dist/chunk-ZHP7IRS6.js +7 -0
- package/dist/chunk-ZODC2MGF.js +10 -0
- package/dist/components/ActionButton/index.js +3 -35
- package/dist/components/Autocomplete/index.js +3 -141
- package/dist/components/AutocompleteDetailed/index.js +3 -142
- package/dist/components/BuilderLayout/index.js +12 -26
- package/dist/components/BuilderSidebar/index.js +10 -20
- package/dist/components/ColorPickerInput/index.js +2 -101
- package/dist/components/ColoredLabel/index.js +7 -44
- package/dist/components/Common/index.js +22 -31
- package/dist/components/Confirm/index.js +11 -51
- package/dist/components/CustomAvatar/index.js +1 -62
- package/dist/components/CustomAvatarGroup/index.js +7 -76
- package/dist/components/DashedDivider/index.js +1 -10
- package/dist/components/DataCards/index.js +20 -60
- package/dist/components/DataGrid/index.js +15 -81
- package/dist/components/DatePicker/index.js +7 -42
- package/dist/components/DateRangePicker/index.js +7 -50
- package/dist/components/DateTimePicker/index.js +7 -40
- package/dist/components/Delayed/index.js +5 -17
- package/dist/components/Drawer/index.js +12 -39
- package/dist/components/EmptyContent/index.js +3 -80
- package/dist/components/EmptyView/index.js +2 -34
- package/dist/components/Error/index.js +10 -46
- package/dist/components/ExpandableGroup/index.js +13 -33
- package/dist/components/FixedProgressBar/index.js +1 -22
- package/dist/components/FrameSkeleton/index.js +16 -108
- package/dist/components/HelpButton/index.js +3 -22
- package/dist/components/Icon/index.js +2 -670
- package/dist/components/ImageCrop/index.js +1 -51
- package/dist/components/ImageCropModal/index.js +5 -130
- package/dist/components/Incrementer/index.js +5 -161
- package/dist/components/Label/index.js +9 -74
- package/dist/components/LoadingScreen/index.js +8 -11
- package/dist/components/MaskedInput/index.js +1 -55
- package/dist/components/MenuItem/index.js +11 -24
- package/dist/components/MenuPopover/index.js +1 -48
- package/dist/components/Modal/index.js +3 -33
- package/dist/components/ModalActions/index.js +6 -11
- package/dist/components/MoreMenu/index.js +11 -18
- package/dist/components/NumberInput/index.js +1 -109
- package/dist/components/PasswordRules/index.js +11 -78
- package/dist/components/PopoverSelect/index.js +13 -50
- package/dist/components/Portal/index.js +1 -28
- package/dist/components/Result/index.js +1 -28
- package/dist/components/SavedChanges/index.js +7 -42
- package/dist/components/Scrollbar/index.js +1 -45
- package/dist/components/SearchInput/index.js +3 -73
- package/dist/components/SelectableCards/index.js +8 -144
- package/dist/components/SeoPreview/index.js +13 -167
- package/dist/components/SplashScreen/index.js +8 -107
- package/dist/components/Steps/index.js +14 -71
- package/dist/components/StyledTab/index.js +10 -90
- package/dist/components/StyledTabs/index.js +7 -27
- package/dist/components/Summary/index.js +8 -15
- package/dist/components/SwapList/index.js +22 -249
- package/dist/components/TabPanel/index.js +6 -34
- package/dist/components/TextMaxLine/index.js +2 -49
- package/dist/components/TimePicker/index.js +7 -42
- package/dist/components/ToggleButtonGroup/index.js +7 -10
- package/dist/components/Tooltip/index.js +6 -8
- package/dist/components/WhiteBox/index.js +1 -8
- package/dist/components/animate/index.js +2 -16
- package/dist/components/carousel/index.js +16 -10
- package/dist/components/form/Address/index.js +15 -199
- package/dist/components/form/Autocomplete/index.js +4 -42
- package/dist/components/form/AutocompleteDetailed/index.js +9 -42
- package/dist/components/form/Checkbox/index.js +9 -51
- package/dist/components/form/Codes/index.js +11 -87
- package/dist/components/form/ColorPicker/index.js +8 -52
- package/dist/components/form/DatePicker/index.js +8 -63
- package/dist/components/form/DateRangePicker/index.js +10 -77
- package/dist/components/form/DateTimePicker/index.js +8 -61
- package/dist/components/form/Field/index.js +1 -49
- package/dist/components/form/Form/index.js +7 -29
- package/dist/components/form/Incrementer/index.js +11 -38
- package/dist/components/form/InputTags/index.js +9 -69
- package/dist/components/form/MaskedInput/index.js +2 -45
- package/dist/components/form/MultiCheckbox/index.js +12 -93
- package/dist/components/form/MultiChipField/index.js +8 -49
- package/dist/components/form/NumberInput/index.js +7 -43
- package/dist/components/form/Password/index.js +13 -91
- package/dist/components/form/RadioGroup/index.js +13 -127
- package/dist/components/form/SelectableCards/index.js +14 -22
- package/dist/components/form/Switch/index.js +9 -71
- package/dist/components/form/TimePicker/index.js +8 -64
- package/dist/components/form/UploadAvatarWithCrop/index.js +20 -59
- package/dist/components/form/UploadWithCrop/index.js +23 -59
- package/dist/components/form/Webhook/index.js +19 -146
- package/dist/components/lightbox/index.js +16 -3
- package/dist/components/table/index.js +21 -19
- package/dist/components/upload/index.js +23 -14
- package/dist/hooks/useActiveElement.js +5 -27
- package/dist/hooks/useApiMessage.js +5 -33
- package/dist/hooks/useAutocomplete.js +6 -61
- package/dist/hooks/useCopyToClipboard.js +5 -22
- package/dist/hooks/useDatagrid.js +6 -45
- package/dist/hooks/useDebounceValue.js +5 -18
- package/dist/hooks/useDeepCompareEffect.js +6 -16
- package/dist/hooks/useEventCallback.js +2 -17
- package/dist/hooks/useEventListener.js +1 -24
- package/dist/hooks/useIsMounting.js +5 -13
- package/dist/hooks/useIsomorphicLayoutEffect.js +1 -6
- package/dist/hooks/useLocalStorage.js +8 -88
- package/dist/hooks/useMount.js +5 -9
- package/dist/hooks/useOnClickOutside.js +5 -15
- package/dist/hooks/usePagination.js +5 -40
- package/dist/hooks/usePopover.js +1 -24
- package/dist/hooks/useResponsive.js +1 -35
- package/dist/hooks/useScrollOffSetTop.js +6 -32
- package/dist/hooks/useSnackbar.js +1 -13
- package/dist/hooks/useTabs.js +5 -16
- package/dist/hooks/useToggle.js +1 -11
- package/dist/hooks/useUpload.js +1 -57
- package/dist/hooks/useUploadImage.js +2 -79
- package/dist/index.css +10 -0
- package/dist/index.js +3 -6
- package/dist/locales/all-langs.js +1 -39
- package/dist/theme/core/index.js +3 -6
- package/dist/theme/styles/index.d.ts +1 -1
- package/dist/theme/styles/index.js +1 -3
- package/dist/theme/theme-provider.js +7 -45
- package/dist/theme/with-settings/index.js +4 -2
- package/dist/types/addressProps.js +1 -1
- package/dist/types/api.js +1 -1
- package/dist/types/autoComplete.js +1 -1
- package/dist/types/autoCompleteProps.js +1 -1
- package/dist/types/baseField.js +1 -1
- package/dist/types/dataGridProps.js +1 -1
- package/dist/types/datagrid.js +1 -1
- package/dist/types/datePickerProps.js +1 -1
- package/dist/types/dateRangePickerProps.js +1 -1
- package/dist/types/dateTimePickerProps.js +1 -1
- package/dist/types/fieldProps.js +1 -1
- package/dist/types/icon.js +1 -331
- package/dist/types/iconProps.js +1 -1
- package/dist/types/incrementerProps.js +1 -1
- package/dist/types/item.js +1 -1
- package/dist/types/multiCheckboxProps.js +1 -1
- package/dist/types/numberInputProps.js +1 -1
- package/dist/types/option.js +1 -1
- package/dist/types/radioGroupProps.js +1 -1
- package/dist/types/searchInputProps.js +1 -1
- package/dist/types/sectionProps.js +1 -1
- package/dist/types/switchProps.js +1 -1
- package/dist/types/timePickerProps.js +1 -1
- package/dist/types/upload.js +1 -1
- package/dist/types/webhook.js +3 -51
- package/dist/utils/color.js +1 -6
- package/dist/utils/compare.js +1 -6
- package/dist/utils/date.js +6 -23
- package/dist/utils/formatNumber.js +1 -94
- package/dist/utils/formatTime.js +1 -169
- package/dist/utils/loadable.js +7 -14
- package/dist/utils/mask.js +3 -44
- package/dist/utils/number.js +1 -15
- package/dist/utils/sort.js +3 -24
- package/dist/utils/uuidv4.js +3 -10
- package/dist/utils/validators.js +1 -86
- package/package.json +1 -1
- package/dist/components/ActionButton/index.js.map +0 -1
- package/dist/components/Autocomplete/index.js.map +0 -1
- package/dist/components/AutocompleteDetailed/index.js.map +0 -1
- package/dist/components/BuilderLayout/index.js.map +0 -1
- package/dist/components/BuilderSidebar/index.js.map +0 -1
- package/dist/components/ColorPickerInput/index.js.map +0 -1
- package/dist/components/ColoredLabel/index.js.map +0 -1
- package/dist/components/Common/index.js.map +0 -1
- package/dist/components/Confirm/index.js.map +0 -1
- package/dist/components/CustomAvatar/index.js.map +0 -1
- package/dist/components/CustomAvatarGroup/index.js.map +0 -1
- package/dist/components/DashedDivider/index.js.map +0 -1
- package/dist/components/DataCards/index.js.map +0 -1
- package/dist/components/DataGrid/index.js.map +0 -1
- package/dist/components/DatePicker/index.js.map +0 -1
- package/dist/components/DateRangePicker/index.js.map +0 -1
- package/dist/components/DateTimePicker/index.js.map +0 -1
- package/dist/components/Delayed/index.js.map +0 -1
- package/dist/components/Drawer/index.js.map +0 -1
- package/dist/components/EmptyContent/index.js.map +0 -1
- package/dist/components/EmptyView/index.js.map +0 -1
- package/dist/components/Error/index.js.map +0 -1
- package/dist/components/ExpandableGroup/index.js.map +0 -1
- package/dist/components/FixedProgressBar/index.js.map +0 -1
- package/dist/components/FrameSkeleton/index.js.map +0 -1
- package/dist/components/HelpButton/index.js.map +0 -1
- package/dist/components/Icon/index.js.map +0 -1
- package/dist/components/ImageCrop/index.js.map +0 -1
- package/dist/components/ImageCropModal/index.js.map +0 -1
- package/dist/components/Incrementer/index.js.map +0 -1
- package/dist/components/Label/index.js.map +0 -1
- package/dist/components/LoadingScreen/index.js.map +0 -1
- package/dist/components/MaskedInput/index.js.map +0 -1
- package/dist/components/MenuItem/index.js.map +0 -1
- package/dist/components/MenuPopover/index.js.map +0 -1
- package/dist/components/Modal/index.js.map +0 -1
- package/dist/components/ModalActions/index.js.map +0 -1
- package/dist/components/MoreMenu/index.js.map +0 -1
- package/dist/components/NumberInput/index.js.map +0 -1
- package/dist/components/PasswordRules/index.js.map +0 -1
- package/dist/components/PopoverSelect/index.js.map +0 -1
- package/dist/components/Portal/index.js.map +0 -1
- package/dist/components/Result/index.js.map +0 -1
- package/dist/components/SavedChanges/index.js.map +0 -1
- package/dist/components/Scrollbar/index.js.map +0 -1
- package/dist/components/SearchInput/index.js.map +0 -1
- package/dist/components/SelectableCards/index.js.map +0 -1
- package/dist/components/SeoPreview/index.js.map +0 -1
- package/dist/components/SplashScreen/index.js.map +0 -1
- package/dist/components/Steps/index.js.map +0 -1
- package/dist/components/StyledTab/index.js.map +0 -1
- package/dist/components/StyledTabs/index.js.map +0 -1
- package/dist/components/Summary/index.js.map +0 -1
- package/dist/components/SwapList/index.js.map +0 -1
- package/dist/components/TabPanel/index.js.map +0 -1
- package/dist/components/TextMaxLine/index.js.map +0 -1
- package/dist/components/TimePicker/index.js.map +0 -1
- package/dist/components/ToggleButtonGroup/index.js.map +0 -1
- package/dist/components/Tooltip/index.js.map +0 -1
- package/dist/components/WhiteBox/index.js.map +0 -1
- package/dist/components/animate/index.js.map +0 -1
- package/dist/components/carousel/index.js.map +0 -1
- package/dist/components/form/Address/index.js.map +0 -1
- package/dist/components/form/Autocomplete/index.js.map +0 -1
- package/dist/components/form/AutocompleteDetailed/index.js.map +0 -1
- package/dist/components/form/Checkbox/index.js.map +0 -1
- package/dist/components/form/Codes/index.js.map +0 -1
- package/dist/components/form/ColorPicker/index.js.map +0 -1
- package/dist/components/form/DatePicker/index.js.map +0 -1
- package/dist/components/form/DateRangePicker/index.js.map +0 -1
- package/dist/components/form/DateTimePicker/index.js.map +0 -1
- package/dist/components/form/Field/index.js.map +0 -1
- package/dist/components/form/Form/index.js.map +0 -1
- package/dist/components/form/Incrementer/index.js.map +0 -1
- package/dist/components/form/InputTags/index.js.map +0 -1
- package/dist/components/form/MaskedInput/index.js.map +0 -1
- package/dist/components/form/MultiCheckbox/index.js.map +0 -1
- package/dist/components/form/MultiChipField/index.js.map +0 -1
- package/dist/components/form/NumberInput/index.js.map +0 -1
- package/dist/components/form/Password/index.js.map +0 -1
- package/dist/components/form/RadioGroup/index.js.map +0 -1
- package/dist/components/form/SelectableCards/index.js.map +0 -1
- package/dist/components/form/Switch/index.js.map +0 -1
- package/dist/components/form/TimePicker/index.js.map +0 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js.map +0 -1
- package/dist/components/form/UploadWithCrop/index.js.map +0 -1
- package/dist/components/form/Webhook/index.js.map +0 -1
- package/dist/components/lightbox/index.js.map +0 -1
- package/dist/components/table/index.js.map +0 -1
- package/dist/components/upload/index.js.map +0 -1
- package/dist/hooks/useActiveElement.js.map +0 -1
- package/dist/hooks/useApiMessage.js.map +0 -1
- package/dist/hooks/useAutocomplete.js.map +0 -1
- package/dist/hooks/useCopyToClipboard.js.map +0 -1
- package/dist/hooks/useDatagrid.js.map +0 -1
- package/dist/hooks/useDebounceValue.js.map +0 -1
- package/dist/hooks/useDeepCompareEffect.js.map +0 -1
- package/dist/hooks/useEventCallback.js.map +0 -1
- package/dist/hooks/useEventListener.js.map +0 -1
- package/dist/hooks/useIsMounting.js.map +0 -1
- package/dist/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/dist/hooks/useLocalStorage.js.map +0 -1
- package/dist/hooks/useMount.js.map +0 -1
- package/dist/hooks/useOnClickOutside.js.map +0 -1
- package/dist/hooks/usePagination.js.map +0 -1
- package/dist/hooks/usePopover.js.map +0 -1
- package/dist/hooks/useResponsive.js.map +0 -1
- package/dist/hooks/useScrollOffSetTop.js.map +0 -1
- package/dist/hooks/useSnackbar.js.map +0 -1
- package/dist/hooks/useTabs.js.map +0 -1
- package/dist/hooks/useToggle.js.map +0 -1
- package/dist/hooks/useUpload.js.map +0 -1
- package/dist/hooks/useUploadImage.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/locales/all-langs.js.map +0 -1
- package/dist/theme/core/index.js.map +0 -1
- package/dist/theme/styles/index.js.map +0 -1
- package/dist/theme/theme-provider.js.map +0 -1
- package/dist/theme/with-settings/index.js.map +0 -1
- package/dist/types/addressProps.js.map +0 -1
- package/dist/types/api.js.map +0 -1
- package/dist/types/autoComplete.js.map +0 -1
- package/dist/types/autoCompleteProps.js.map +0 -1
- package/dist/types/baseField.js.map +0 -1
- package/dist/types/dataGridProps.js.map +0 -1
- package/dist/types/datagrid.js.map +0 -1
- package/dist/types/datePickerProps.js.map +0 -1
- package/dist/types/dateRangePickerProps.js.map +0 -1
- package/dist/types/dateTimePickerProps.js.map +0 -1
- package/dist/types/fieldProps.js.map +0 -1
- package/dist/types/icon.js.map +0 -1
- package/dist/types/iconProps.js.map +0 -1
- package/dist/types/incrementerProps.js.map +0 -1
- package/dist/types/item.js.map +0 -1
- package/dist/types/multiCheckboxProps.js.map +0 -1
- package/dist/types/numberInputProps.js.map +0 -1
- package/dist/types/option.js.map +0 -1
- package/dist/types/radioGroupProps.js.map +0 -1
- package/dist/types/searchInputProps.js.map +0 -1
- package/dist/types/sectionProps.js.map +0 -1
- package/dist/types/switchProps.js.map +0 -1
- package/dist/types/timePickerProps.js.map +0 -1
- package/dist/types/upload.js.map +0 -1
- package/dist/types/webhook.js.map +0 -1
- package/dist/utils/color.js.map +0 -1
- package/dist/utils/compare.js.map +0 -1
- package/dist/utils/date.js.map +0 -1
- package/dist/utils/formatNumber.js.map +0 -1
- package/dist/utils/formatTime.js.map +0 -1
- package/dist/utils/loadable.js.map +0 -1
- package/dist/utils/mask.js.map +0 -1
- package/dist/utils/number.js.map +0 -1
- package/dist/utils/sort.js.map +0 -1
- package/dist/utils/uuidv4.js.map +0 -1
- package/dist/utils/validators.js.map +0 -1
|
@@ -1,101 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import IconButton from "@mui/material/IconButton";
|
|
4
|
-
import InputAdornment from "@mui/material/InputAdornment";
|
|
5
|
-
import Popover from "@mui/material/Popover";
|
|
6
|
-
import TextField from "@mui/material/TextField";
|
|
7
|
-
import usePopover from "hooks/usePopover";
|
|
8
|
-
import { ChromePicker } from "./Style";
|
|
9
|
-
const ColorPickerInput = ({
|
|
10
|
-
value,
|
|
11
|
-
onChangeColor,
|
|
12
|
-
tabIndex,
|
|
13
|
-
...other
|
|
14
|
-
}) => {
|
|
15
|
-
const hexValue = value ? "#" + value.replaceAll("#", "") : "";
|
|
16
|
-
const popover = usePopover();
|
|
17
|
-
const handleChangeColor = (v = "") => {
|
|
18
|
-
const hexRegex = /^#[0-9a-fA-F]*$/;
|
|
19
|
-
if (hexRegex.test(v) || v === "" || v === "#") {
|
|
20
|
-
onChangeColor("#" + v.replaceAll("#", ""));
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
-
/* @__PURE__ */ jsx(
|
|
25
|
-
TextField,
|
|
26
|
-
{
|
|
27
|
-
...other,
|
|
28
|
-
value: hexValue,
|
|
29
|
-
onChange: (e) => handleChangeColor(e.target.value),
|
|
30
|
-
InputProps: {
|
|
31
|
-
inputProps: {
|
|
32
|
-
...other.inputProps,
|
|
33
|
-
maxLength: 7,
|
|
34
|
-
tabIndex
|
|
35
|
-
},
|
|
36
|
-
startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", sx: { ml: 2 }, children: /* @__PURE__ */ jsx(
|
|
37
|
-
IconButton,
|
|
38
|
-
{
|
|
39
|
-
edge: "start",
|
|
40
|
-
"aria-label": "Escolher cor",
|
|
41
|
-
onClick: popover.onOpen,
|
|
42
|
-
children: /* @__PURE__ */ jsx(
|
|
43
|
-
Box,
|
|
44
|
-
{
|
|
45
|
-
sx: {
|
|
46
|
-
minWidth: 24,
|
|
47
|
-
minHeight: 24,
|
|
48
|
-
backgroundColor: hexValue,
|
|
49
|
-
borderRadius: 0.5
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
) })
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
59
|
-
Popover,
|
|
60
|
-
{
|
|
61
|
-
open: Boolean(popover.open),
|
|
62
|
-
anchorEl: popover.open,
|
|
63
|
-
onClose: popover.onClose,
|
|
64
|
-
anchorOrigin: {
|
|
65
|
-
vertical: "bottom",
|
|
66
|
-
horizontal: "center"
|
|
67
|
-
},
|
|
68
|
-
transformOrigin: {
|
|
69
|
-
vertical: "center",
|
|
70
|
-
horizontal: "center"
|
|
71
|
-
},
|
|
72
|
-
slotProps: {
|
|
73
|
-
paper: {
|
|
74
|
-
style: { borderRadius: 8 }
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
children: /* @__PURE__ */ jsx(
|
|
78
|
-
ChromePicker,
|
|
79
|
-
{
|
|
80
|
-
color: hexValue,
|
|
81
|
-
onChange: ({ hex }) => onChangeColor(hex),
|
|
82
|
-
styles: {
|
|
83
|
-
default: {
|
|
84
|
-
picker: {
|
|
85
|
-
fontFamily: "inherit",
|
|
86
|
-
boxShadow: "none"
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
disableAlpha: true
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
] });
|
|
96
|
-
};
|
|
97
|
-
var ColorPickerInput_default = ColorPickerInput;
|
|
98
|
-
export {
|
|
99
|
-
ColorPickerInput_default as default
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { a as default } from '../../chunk-BUYQKDFG.js';
|
|
2
|
+
import '../../chunk-ORYAES3Q.js';
|
|
@@ -1,44 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
backgroundColor,
|
|
9
|
-
variant = "ghost",
|
|
10
|
-
startIcon,
|
|
11
|
-
endIcon,
|
|
12
|
-
sx,
|
|
13
|
-
...others
|
|
14
|
-
}) => {
|
|
15
|
-
const theme = useTheme();
|
|
16
|
-
const style = {
|
|
17
|
-
width: 16,
|
|
18
|
-
height: 16,
|
|
19
|
-
"& svg, img": { width: 1, height: 1, objectFit: "cover" }
|
|
20
|
-
};
|
|
21
|
-
return /* @__PURE__ */ jsxs(
|
|
22
|
-
RootStyle,
|
|
23
|
-
{
|
|
24
|
-
ownerState: { color, variant, backgroundColor },
|
|
25
|
-
sx: {
|
|
26
|
-
...startIcon && { pl: 0.75 },
|
|
27
|
-
...endIcon && { pr: 0.75 },
|
|
28
|
-
...sx
|
|
29
|
-
},
|
|
30
|
-
theme,
|
|
31
|
-
...others,
|
|
32
|
-
children: [
|
|
33
|
-
startIcon && /* @__PURE__ */ jsx(Box, { sx: { mr: 0.75, ...style }, children: startIcon }),
|
|
34
|
-
children,
|
|
35
|
-
endIcon && /* @__PURE__ */ jsx(Box, { sx: { ml: 0.75, ...style }, children: endIcon })
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
var ColoredLabel_default = ColoredLabel;
|
|
41
|
-
export {
|
|
42
|
-
ColoredLabel_default as default
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import d from '@mui/material/Box';
|
|
2
|
+
import { styled, lighten, useTheme } from '@mui/material/styles';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var g=styled("span")(({theme:o,ownerState:i})=>{let n=o.palette.mode==="light",{color:e,variant:r,backgroundColor:l}=i,a=t=>({color:t,backgroundColor:l||t}),s=t=>({color:t,backgroundColor:"transparent",border:`1px solid ${t}`}),p=t=>({color:t,backgroundColor:lighten(t,.84)});return {height:22,minWidth:22,lineHeight:0,borderRadius:6,cursor:"default",alignItems:"center",whiteSpace:"nowrap",display:"inline-flex",justifyContent:"center",padding:o.spacing(0,1),color:o.palette.grey[800],fontSize:o.typography.pxToRem(12),fontFamily:o.typography.fontFamily,backgroundColor:o.palette.grey[300],fontWeight:o.typography.fontWeightBold,...e!=="default"?{...r==="filled"&&{...a(e)},...r==="outlined"&&{...s(e)},...r==="ghost"&&{...p(e)}}:{...r==="outlined"&&{backgroundColor:"transparent",color:o.palette.text.primary,border:`1px solid ${o.palette.grey[500]}`},...r==="ghost"&&{color:n?o.palette.text.secondary:o.palette.common.white,backgroundColor:o.palette.grey[500]}}}});var b=({children:o,color:i="#000",backgroundColor:n,variant:e="ghost",startIcon:r,endIcon:l,sx:a,...s})=>{let p=useTheme(),t={width:16,height:16,"& svg, img":{width:1,height:1,objectFit:"cover"}};return jsxs(g,{ownerState:{color:i,variant:e,backgroundColor:n},sx:{...r&&{pl:.75},...l&&{pr:.75},...a},theme:p,...s,children:[r&&jsx(d,{sx:{mr:.75,...t},children:r}),o,l&&jsx(d,{sx:{ml:.75,...t},children:l})]})},L=b;
|
|
6
|
+
|
|
7
|
+
export { L as default };
|
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
] })
|
|
24
|
-
}
|
|
25
|
-
) });
|
|
26
|
-
};
|
|
27
|
-
var Common_default = Common;
|
|
28
|
-
export {
|
|
29
|
-
Common_default as default
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { a } from '../../chunk-UGH5FWZQ.js';
|
|
2
|
+
import '../../chunk-WKD3OXUA.js';
|
|
3
|
+
import '../../chunk-GOC7PC2S.js';
|
|
4
|
+
import '../../chunk-MCT77MRN.js';
|
|
5
|
+
import '../../chunk-CFVUZ4S5.js';
|
|
6
|
+
import '../../chunk-CFYNJQGN.js';
|
|
7
|
+
import { i } from '../../chunk-D27ND54J.js';
|
|
8
|
+
import { a as a$1 } from '../../chunk-PMPALWRO.js';
|
|
9
|
+
import '../../chunk-3E5A45HM.js';
|
|
10
|
+
import { LazyMotion, domMax } from 'framer-motion';
|
|
11
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
|
+
import y from '@mui/material/Portal';
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import { Toaster } from 'sonner';
|
|
15
|
+
import 'dayjs/locale/pt-br';
|
|
16
|
+
import h from 'dayjs';
|
|
17
|
+
import { AdapterDayjs } from '@mui/x-date-pickers-pro/AdapterDayjs';
|
|
18
|
+
import { LocalizationProvider } from '@mui/x-date-pickers-pro/LocalizationProvider';
|
|
19
|
+
|
|
20
|
+
var c=({children:t})=>jsx(LazyMotion,{strict:!0,features:domMax,children:t});var o={root:"toaster__root",toast:"toaster__toast",title:"toaster__title",icon:"toaster__icon",iconSvg:"toaster__icon__svg",content:"toaster__content",description:"toaster__description",actionButton:"toaster__action__button",cancelButton:"toaster__cancel__button",closeButton:"toaster__close_button",loadingIcon:"toaster__loading_icon",default:"toaster__default",error:"toaster__error",success:"toaster__success",warning:"toaster__warning",info:"toaster__info",loader:"sonner-loader",loaderVisible:'&[data-visible="true"]',closeBtnVisible:'[data-close-button="true"]'};var d=styled(Toaster)(({theme:t})=>{let a={toastDefault:{padding:t.spacing(1,1,1,1.5),boxShadow:t.customShadows.z8,color:t.vars.palette.background.paper,backgroundColor:t.vars.palette.text.primary},toastColor:{padding:t.spacing(.5,1,.5,.5),boxShadow:t.customShadows.z8,color:t.vars.palette.text.primary,backgroundColor:t.vars.palette.background.paper},toastLoader:{padding:t.spacing(.5,1,.5,.5),boxShadow:t.customShadows.z8,color:t.vars.palette.text.primary,backgroundColor:t.vars.palette.background.paper}},i$1={top:0,left:0,width:"100%",height:"100%",display:"none",transform:"none",overflow:"hidden",alignItems:"center",position:"relative",borderRadius:"inherit",justifyContent:"center",background:t.vars.palette.background.neutral,[`& .${o.loadingIcon}`]:{zIndex:9,width:24,height:24,borderRadius:"50%",animation:"rotate 3s infinite linear",background:`conic-gradient(${i(t.vars.palette.text.primaryChannel,0)}, ${i(t.vars.palette.text.disabledChannel,.64)})`},[o.loaderVisible]:{display:"flex"}};return {width:300,[`& .${o.toast}`]:{gap:12,width:"100%",minHeight:52,display:"flex",borderRadius:12,alignItems:"center"},[`& .${o.content}`]:{gap:0,flex:"1 1 auto"},[`& .${o.title}`]:{fontSize:t.typography.subtitle2.fontSize},[`& .${o.description}`]:{...t.typography.caption,opacity:.64},[`& .${o.actionButton}`]:{},[`& .${o.cancelButton}`]:{},[`& .${o.closeButton}`]:{top:0,right:0,left:"auto",color:"currentColor",backgroundColor:"transparent",transform:"translate(-6px, 6px)",borderColor:i(t.vars.palette.grey["500Channel"],.16),transition:t.transitions.create(["background-color","border-color"]),"&:hover":{borderColor:i(t.vars.palette.grey["500Channel"],.24),backgroundColor:i(t.vars.palette.grey["500Channel"],.08)}},[`& .${o.icon}`]:{margin:0,width:48,height:48,alignItems:"center",borderRadius:"inherit",justifyContent:"center",alignSelf:"flex-start",[`& .${o.iconSvg}`]:{width:24,height:24,fontSize:0}},"@keyframes rotate":{to:{transform:"rotate(1turn)"}},[`& .${o.default}`]:{...a.toastDefault,[`&:has(${o.closeBtnVisible})`]:{[`& .${o.content}`]:{paddingRight:32}},[`&:has(.${o.loader})`]:a.toastLoader,[`&:has(.${o.loader})`]:a.toastLoader,[`& .${o.loader}`]:i$1},[`& .${o.error}`]:{...a.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.error.main,backgroundColor:i(t.vars.palette.error.mainChannel,.08)}},[`& .${o.success}`]:{...a.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.success.main,backgroundColor:i(t.vars.palette.success.mainChannel,.08)}},[`& .${o.warning}`]:{...a.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.warning.main,backgroundColor:i(t.vars.palette.warning.mainChannel,.08)}},[`& .${o.info}`]:{...a.toastColor,[`& .${o.icon}`]:{color:t.vars.palette.info.main,backgroundColor:i(t.vars.palette.info.mainChannel,.08)}}}});var p=()=>jsx(y,{container:typeof window<"u"?document.getElementById("snackbar-container-provider"):null,children:jsx(d,{expand:!0,gap:12,closeButton:!0,offset:16,visibleToasts:4,position:"top-right",className:o.root,toastOptions:{unstyled:!0,classNames:{toast:o.toast,icon:o.icon,content:o.content,title:o.title,description:o.description,actionButton:o.actionButton,cancelButton:o.cancelButton,closeButton:o.closeButton,default:o.default,info:o.info,error:o.error,success:o.success,warning:o.warning}},icons:{loading:jsx("span",{className:o.loadingIcon}),info:jsx(a$1,{className:o.iconSvg,icon:"INFO_CIRCLE"}),success:jsx(a$1,{className:o.iconSvg,icon:"CHECK_CIRCLE"}),warning:jsx(a$1,{className:o.iconSvg,icon:"WARNING_TRIANGULE"}),error:jsx(a$1,{className:o.iconSvg,icon:"ALERT_CIRCLE"})}})});var S=({children:t})=>(h.locale("pt-br"),jsx(LocalizationProvider,{dateAdapter:AdapterDayjs,adapterLocale:"pt-br",children:t})),u=S;var x=({primaryColor:t,colorScheme:a$1,contrast:i,children:g,cssVarPrefix:f})=>jsx(u,{children:jsx(a,{primaryColor:t,colorScheme:a$1,contrast:i,cssVarPrefix:f,children:jsxs(c,{children:[g,jsx(p,{})]})})}),Z=x;
|
|
21
|
+
|
|
22
|
+
export { Z as default };
|
|
@@ -1,51 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
confirmButtonText = "Sim, excluir registro",
|
|
13
|
-
onClose,
|
|
14
|
-
onConfirm,
|
|
15
|
-
confirming,
|
|
16
|
-
child,
|
|
17
|
-
...other
|
|
18
|
-
}) => {
|
|
19
|
-
return /* @__PURE__ */ jsxs(Dialog, { fullWidth: true, maxWidth: "xs", ...other, onClose, children: [
|
|
20
|
-
/* @__PURE__ */ jsx(DialogTitle, { children: modalTitle }),
|
|
21
|
-
/* @__PURE__ */ jsx(DialogContent, { children: message }),
|
|
22
|
-
child,
|
|
23
|
-
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
24
|
-
/* @__PURE__ */ jsx(
|
|
25
|
-
Button,
|
|
26
|
-
{
|
|
27
|
-
variant: "outlined",
|
|
28
|
-
color: "inherit",
|
|
29
|
-
onClick: onClose,
|
|
30
|
-
size: "large",
|
|
31
|
-
children: cancelButtonText
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
/* @__PURE__ */ jsx(
|
|
35
|
-
LoadingButton,
|
|
36
|
-
{
|
|
37
|
-
variant: "contained",
|
|
38
|
-
onClick: onConfirm,
|
|
39
|
-
size: "large",
|
|
40
|
-
loading: confirming,
|
|
41
|
-
children: confirmButtonText
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] })
|
|
45
|
-
] });
|
|
46
|
-
};
|
|
47
|
-
var Confirm_default = Confirm;
|
|
48
|
-
export {
|
|
49
|
-
Confirm_default as default
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import s from '@mui/lab/LoadingButton';
|
|
2
|
+
import d from '@mui/material/Button';
|
|
3
|
+
import p from '@mui/material/Dialog';
|
|
4
|
+
import c from '@mui/material/DialogActions';
|
|
5
|
+
import u from '@mui/material/DialogContent';
|
|
6
|
+
import C from '@mui/material/DialogTitle';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var D=({modalTitle:r="Tem certeza que deseja excluir?",message:n="Essa a\xE7\xE3o n\xE3o poder\xE1 ser desfeita.",cancelButtonText:a="Cancelar",confirmButtonText:e="Sim, excluir registro",onClose:i,onConfirm:l,confirming:m,child:g,...f})=>jsxs(p,{fullWidth:!0,maxWidth:"xs",...f,onClose:i,children:[jsx(C,{children:r}),jsx(u,{children:n}),g,jsxs(c,{children:[jsx(d,{variant:"outlined",color:"inherit",onClick:i,size:"large",children:a}),jsx(s,{variant:"contained",onClick:l,size:"large",loading:m,children:e})]})]}),v=D;
|
|
10
|
+
|
|
11
|
+
export { v as default };
|
|
@@ -1,62 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import Avatar from "@mui/material/Avatar";
|
|
4
|
-
import Badge from "@mui/material/Badge";
|
|
5
|
-
import { useTheme } from "@mui/material/styles";
|
|
6
|
-
const getCharAtName = (name) => name && name.charAt(0).toUpperCase();
|
|
7
|
-
const getColorByName = (name) => {
|
|
8
|
-
if (["A", "N", "H", "L", "Q"].includes(getCharAtName(name)))
|
|
9
|
-
return "primary";
|
|
10
|
-
if (["F", "G", "T", "I", "J"].includes(getCharAtName(name)))
|
|
11
|
-
return "info";
|
|
12
|
-
if (["K", "D", "Y", "B", "O"].includes(getCharAtName(name)))
|
|
13
|
-
return "success";
|
|
14
|
-
if (["P", "E", "R", "S", "U"].includes(getCharAtName(name)))
|
|
15
|
-
return "warning";
|
|
16
|
-
if (["V", "W", "X", "M", "Z"].includes(getCharAtName(name)))
|
|
17
|
-
return "error";
|
|
18
|
-
return "default";
|
|
19
|
-
};
|
|
20
|
-
const CustomAvatar = forwardRef(
|
|
21
|
-
({ color, name = "", BadgeProps, children, sx, ...other }, ref) => {
|
|
22
|
-
const theme = useTheme();
|
|
23
|
-
const charAtName = getCharAtName(name);
|
|
24
|
-
const colorByName = getColorByName(name);
|
|
25
|
-
const colr = color || colorByName;
|
|
26
|
-
const renderContent = colr === "default" ? /* @__PURE__ */ jsxs(Avatar, { ref, sx, ...other, children: [
|
|
27
|
-
name && charAtName,
|
|
28
|
-
children
|
|
29
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
30
|
-
Avatar,
|
|
31
|
-
{
|
|
32
|
-
ref,
|
|
33
|
-
sx: {
|
|
34
|
-
color: theme.palette[colr]?.contrastText,
|
|
35
|
-
backgroundColor: theme.palette[colr]?.main,
|
|
36
|
-
fontWeight: theme.typography.fontWeightMedium,
|
|
37
|
-
...sx
|
|
38
|
-
},
|
|
39
|
-
...other,
|
|
40
|
-
children: [
|
|
41
|
-
name && charAtName,
|
|
42
|
-
children
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
return BadgeProps ? /* @__PURE__ */ jsx(
|
|
47
|
-
Badge,
|
|
48
|
-
{
|
|
49
|
-
overlap: "circular",
|
|
50
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
51
|
-
...BadgeProps,
|
|
52
|
-
children: renderContent
|
|
53
|
-
}
|
|
54
|
-
) : renderContent;
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
CustomAvatar.displayName = "CustomAvatar";
|
|
58
|
-
var CustomAvatar_default = CustomAvatar;
|
|
59
|
-
export {
|
|
60
|
-
CustomAvatar_default as default
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { a as default } from '../../chunk-NF42ENKE.js';
|
|
@@ -1,76 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
large: 56
|
|
9
|
-
};
|
|
10
|
-
const CustomAvatarGroup = forwardRef(
|
|
11
|
-
({ size = "small", compact, max, children, sx, ...other }, ref) => {
|
|
12
|
-
const isTiny = size === "tiny";
|
|
13
|
-
const isSmall = size === "small";
|
|
14
|
-
const isMedium = size === "medium";
|
|
15
|
-
const isLarge = size === "large";
|
|
16
|
-
const compactStyle = {
|
|
17
|
-
width: 40,
|
|
18
|
-
height: 40,
|
|
19
|
-
position: "relative",
|
|
20
|
-
"& .MuiAvatarGroup-avatar": {
|
|
21
|
-
m: 0,
|
|
22
|
-
width: 28,
|
|
23
|
-
height: 28,
|
|
24
|
-
position: "absolute",
|
|
25
|
-
"&:first-of-type": {
|
|
26
|
-
left: 0,
|
|
27
|
-
bottom: 0,
|
|
28
|
-
zIndex: 9
|
|
29
|
-
},
|
|
30
|
-
"&:last-of-type": {
|
|
31
|
-
top: 0,
|
|
32
|
-
right: 0
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
return /* @__PURE__ */ jsx(
|
|
37
|
-
AvatarGroup,
|
|
38
|
-
{
|
|
39
|
-
ref,
|
|
40
|
-
max: compact ? 3 : max,
|
|
41
|
-
spacing: (isTiny || isSmall) && "medium" || "small",
|
|
42
|
-
sx: {
|
|
43
|
-
"& .MuiAvatar-root": {
|
|
44
|
-
...isLarge && {
|
|
45
|
-
width: SIZES.large,
|
|
46
|
-
height: SIZES.large,
|
|
47
|
-
"&:first-of-type": { fontSize: 16 }
|
|
48
|
-
},
|
|
49
|
-
...isMedium && {
|
|
50
|
-
width: SIZES.medium,
|
|
51
|
-
height: SIZES.medium
|
|
52
|
-
},
|
|
53
|
-
...isSmall && {
|
|
54
|
-
width: SIZES.small,
|
|
55
|
-
height: SIZES.small
|
|
56
|
-
},
|
|
57
|
-
...isTiny && {
|
|
58
|
-
width: SIZES.tiny,
|
|
59
|
-
height: SIZES.tiny
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
...compact && { ...compactStyle },
|
|
63
|
-
...sx
|
|
64
|
-
},
|
|
65
|
-
...other,
|
|
66
|
-
children
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
CustomAvatarGroup.displayName = "CustomAvatarGroup";
|
|
72
|
-
var CustomAvatarGroup_default = CustomAvatarGroup;
|
|
73
|
-
export {
|
|
74
|
-
CustomAvatarGroup_default as default
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import g from '@mui/material/AvatarGroup';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var t={tiny:24,small:32,medium:40,large:56},m=forwardRef(({size:o="small",compact:a,max:e,children:s,sx:l,...p},u)=>{let i=o==="tiny",r=o==="small",h=o==="medium",n=o==="large",d={width:40,height:40,position:"relative","& .MuiAvatarGroup-avatar":{m:0,width:28,height:28,position:"absolute","&:first-of-type":{left:0,bottom:0,zIndex:9},"&:last-of-type":{top:0,right:0}}};return jsx(g,{ref:u,max:a?3:e,spacing:(i||r)&&"medium"||"small",sx:{"& .MuiAvatar-root":{...n&&{width:t.large,height:t.large,"&:first-of-type":{fontSize:16}},...h&&{width:t.medium,height:t.medium},...r&&{width:t.small,height:t.small},...i&&{width:t.tiny,height:t.tiny}},...a&&{...d},...l},...p,children:s})});m.displayName="CustomAvatarGroup";var A=m;
|
|
6
|
+
|
|
7
|
+
export { A as default };
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DashedDividerStyled } from "./styles";
|
|
3
|
-
const DashedDivider = (props) => {
|
|
4
|
-
return /* @__PURE__ */ jsx(DashedDividerStyled, { ...props });
|
|
5
|
-
};
|
|
6
|
-
var DashedDivider_default = DashedDivider;
|
|
7
|
-
export {
|
|
8
|
-
DashedDivider_default as default
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { a as default } from '../../chunk-EBTRMUBS.js';
|
|
@@ -1,60 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
-
progressBar,
|
|
23
|
-
/* @__PURE__ */ jsx(DataCardSkeleton, {}),
|
|
24
|
-
/* @__PURE__ */ jsx(DataCardSkeleton, {}),
|
|
25
|
-
/* @__PURE__ */ jsx(DataCardSkeleton, {})
|
|
26
|
-
] });
|
|
27
|
-
}
|
|
28
|
-
return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
|
|
29
|
-
progressBar,
|
|
30
|
-
rows.length === 0 && /* @__PURE__ */ jsx(EmptyContent, { sx: { mb: 3 }, title: "Nenhum registro encontrado" }),
|
|
31
|
-
rows.map((row) => /* @__PURE__ */ jsx(
|
|
32
|
-
DataCard,
|
|
33
|
-
{
|
|
34
|
-
title,
|
|
35
|
-
id: getRowId(row),
|
|
36
|
-
fields: getFieldData(columns, row),
|
|
37
|
-
onClick
|
|
38
|
-
},
|
|
39
|
-
`data-card-${getRowId(row)}`
|
|
40
|
-
)),
|
|
41
|
-
pagination && rows.length > 0 && /* @__PURE__ */ jsx(Stack, { direction: "row", justifyContent: "center", children: /* @__PURE__ */ jsx(
|
|
42
|
-
Pagination,
|
|
43
|
-
{
|
|
44
|
-
page: pagination?.page,
|
|
45
|
-
onChange: (_, page) => {
|
|
46
|
-
pagination?.onPageChange(page);
|
|
47
|
-
},
|
|
48
|
-
count: pagination?.total
|
|
49
|
-
}
|
|
50
|
-
) })
|
|
51
|
-
] });
|
|
52
|
-
};
|
|
53
|
-
var DataCards_default = DataCards;
|
|
54
|
-
export {
|
|
55
|
-
DataCard,
|
|
56
|
-
DataCardSkeleton,
|
|
57
|
-
DataCards_default as default,
|
|
58
|
-
getFieldData
|
|
59
|
-
};
|
|
60
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { c } from '../../chunk-QQB3DGHT.js';
|
|
2
|
+
import { a } from '../../chunk-EBTRMUBS.js';
|
|
3
|
+
import { a as a$1 } from '../../chunk-YWEB6IAI.js';
|
|
4
|
+
import { a as a$2 } from '../../chunk-ZODC2MGF.js';
|
|
5
|
+
import '../../chunk-ZDHXW74M.js';
|
|
6
|
+
import '../../chunk-D27ND54J.js';
|
|
7
|
+
import $ from '@mui/material/Pagination';
|
|
8
|
+
import d from '@mui/material/Stack';
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
import R from '@mui/material/Card';
|
|
11
|
+
import N from '@mui/material/CardContent';
|
|
12
|
+
import u from '@mui/material/Typography';
|
|
13
|
+
import G from '@mui/material/CardActionArea';
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
15
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
16
|
+
import l from '@mui/material/Skeleton';
|
|
17
|
+
|
|
18
|
+
var M=styled(G)(({disableRipple:a})=>({".MuiCardActionArea-focusHighlight":{background:"transparent"},...a&&{"&:hover":{cursor:"default"}}}));var P=a=>{a.stopPropagation();},j=({fields:a$1,id:o,title:s,onClick:n})=>{let e=a$1.find(t=>t.label.toLowerCase()==="status"||t.type==="status"||t.field==="status"),v=useMemo(()=>e?.renderCell?.({value:e.value,field:o,row:{[o]:e.value}})||e?.value,[e,o]),C=a$1.find(t=>t.type==="actions"||t.id==="actions"),p=useMemo(()=>C?.getActions({id:o})||null,[C,o]),g=useMemo(()=>a$1.filter(t=>t.label.toLowerCase()!=="status"&&t.value?.toString()!==o&&t.type!=="actions"),[a$1,o]),c$1=t=>{n?.({id:o},t,a$1);},y=jsxs(N,{sx:{padding:"0!important"},children:[jsxs(d,{flexDirection:"row",justifyContent:"space-between",p:2,children:[jsxs(d,{flexDirection:"row",alignItems:"center",gap:1,children:[jsx(u,{variant:"body1",fontWeight:600,color:"text.secondary",children:s}),jsxs(u,{variant:"body1",fontWeight:600,children:[c(o)?"#":"",o]})]}),jsxs(d,{className:"actions",flexDirection:"row",alignItems:"center",gap:1,children:[jsx(u,{variant:"body2",color:"text.secondary",textTransform:"uppercase",fontSize:14,fontWeight:600,children:v}),jsx(d,{onClick:P,onMouseDown:P,children:p})]})]}),jsx(a,{}),jsx(d,{flexWrap:"wrap",direction:"row",justifyContent:"space-between",p:2,pb:0,children:g.map(t=>t.value!=o&&jsxs(d,{flexBasis:"50%",pb:2,order:t.order,children:[jsx(u,{variant:"body2",color:"text.secondary",children:t.label}),jsx(u,{variant:"body1",children:t.valueGetter?t.valueFormatter(t.valueGetter(t.value)):t.value})]},`data-card-field-${o}-${t.label}`))})]});return n?jsx(R,{onClick:c$1,children:jsx(M,{component:"div",children:y})}):jsx(R,{children:y})},T=j;var H=()=>jsxs(R,{children:[jsxs(d,{justifyContent:"space-between",direction:"row",spacing:2,p:2,children:[jsx(l,{height:24,width:200}),jsx(l,{height:24,width:100})]}),jsxs(d,{justifyContent:"space-between",flexWrap:"wrap",direction:"row",p:2,children:[jsxs(d,{width:"50%",spacing:1,children:[jsx(l,{height:24,width:100}),jsx(l,{sx:{maxWidth:"95%"},height:24,width:230})]}),jsxs(d,{width:"50%",spacing:1,children:[jsx(l,{height:24,width:80}),jsx(l,{sx:{maxWidth:"100%"},height:27,width:250})]})]})]}),k=H;var E=(a,o)=>{let s=[];a.forEach(e=>{e.field&&e.field!=="actions"&&s.push({...e,label:e.headerName||e.field,value:o[e.field],type:e.type,order:e?.order||0,id:e.field});});let n=a.find(e=>e.field==="actions");return n&&s.push({...n,label:"Actions",value:null,order:0,type:"actions",id:"actions"}),s};var z=({title:a,rows:o,columns:s,getRowId:n,onClick:e,loading:v,fetching:C,pagination:p})=>{let g=C&&jsx(a$1,{sx:{zIndex:1}});return v?jsxs(Fragment,{children:[g,jsx(k,{}),jsx(k,{}),jsx(k,{})]}):jsxs(d,{spacing:2,children:[g,o.length===0&&jsx(a$2,{sx:{mb:3},title:"Nenhum registro encontrado"}),o.map(c=>jsx(T,{title:a,id:n(c),fields:E(s,c),onClick:e},`data-card-${n(c)}`)),p&&o.length>0&&jsx(d,{direction:"row",justifyContent:"center",children:jsx($,{page:p?.page,onChange:(c,y)=>{p?.onPageChange(y);},count:p?.total})})]})},ht=z;
|
|
19
|
+
|
|
20
|
+
export { T as DataCard, k as DataCardSkeleton, ht as default, E as getFieldData };
|
|
@@ -1,81 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
hideFooter,
|
|
17
|
-
sx,
|
|
18
|
-
showToolbar,
|
|
19
|
-
disableExport,
|
|
20
|
-
columnHeaderHeight = 56,
|
|
21
|
-
rowHeight = 76,
|
|
22
|
-
rowSpacingType = "margin",
|
|
23
|
-
getRowSpacing = () => ({
|
|
24
|
-
top: 0,
|
|
25
|
-
bottom: 0
|
|
26
|
-
}),
|
|
27
|
-
autoHeight = false,
|
|
28
|
-
toolbarContent,
|
|
29
|
-
slots,
|
|
30
|
-
...other
|
|
31
|
-
}) => {
|
|
32
|
-
const [filterButtonEl, setFilterButtonEl] = useState(null);
|
|
33
|
-
const COLUMNS = [
|
|
34
|
-
{
|
|
35
|
-
...GRID_CHECKBOX_SELECTION_COL_DEF,
|
|
36
|
-
width: 71
|
|
37
|
-
},
|
|
38
|
-
...columns
|
|
39
|
-
];
|
|
40
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
-
fetching && /* @__PURE__ */ jsx(FixedProgressBar, { sx: { zIndex: 1 } }),
|
|
42
|
-
/* @__PURE__ */ jsx(
|
|
43
|
-
DataGridPremium,
|
|
44
|
-
{
|
|
45
|
-
columns: COLUMNS,
|
|
46
|
-
rows,
|
|
47
|
-
loading,
|
|
48
|
-
autoHeight,
|
|
49
|
-
hideFooter: rows.length === 0 ? true : hideFooter,
|
|
50
|
-
rowHeight,
|
|
51
|
-
columnHeaderHeight,
|
|
52
|
-
getRowSpacing,
|
|
53
|
-
rowSpacingType,
|
|
54
|
-
slots: {
|
|
55
|
-
toolbar: CustomToolbar,
|
|
56
|
-
noRowsOverlay: () => /* @__PURE__ */ jsx(EmptyContent, { title: "Nenhum registro encontrado" }),
|
|
57
|
-
noResultsOverlay: () => /* @__PURE__ */ jsx(EmptyContent, { title: "Nenhum registro encontrado" }),
|
|
58
|
-
loadingOverlay: LoadingOverlay,
|
|
59
|
-
...slots
|
|
60
|
-
},
|
|
61
|
-
slotProps: {
|
|
62
|
-
panel: { anchorEl: filterButtonEl },
|
|
63
|
-
toolbar: {
|
|
64
|
-
setFilterButtonEl,
|
|
65
|
-
showQuickFilter: true,
|
|
66
|
-
disableExport,
|
|
67
|
-
showToolbar,
|
|
68
|
-
toolbarContent
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
sx,
|
|
72
|
-
...other
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
] });
|
|
76
|
-
};
|
|
77
|
-
var DataGrid_default = DataGrid;
|
|
78
|
-
export {
|
|
79
|
-
DataGrid_default as default
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { a } from '../../chunk-YWEB6IAI.js';
|
|
2
|
+
import { a as a$1 } from '../../chunk-ZODC2MGF.js';
|
|
3
|
+
import '../../chunk-ZDHXW74M.js';
|
|
4
|
+
import '../../chunk-D27ND54J.js';
|
|
5
|
+
import x, { useState } from 'react';
|
|
6
|
+
import { GRID_CHECKBOX_SELECTION_COL_DEF, DataGridPremium, GridToolbarContainer, GridToolbarColumnsButton, GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExport, useGridApiContext, useGridRootProps, gridColumnsTotalWidthSelector, gridColumnPositionsSelector } from '@mui/x-data-grid-premium';
|
|
7
|
+
import E from '@mui/material/Box';
|
|
8
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
9
|
+
import N from '@mui/material/Skeleton';
|
|
10
|
+
import $ from '@mui/material/Stack';
|
|
11
|
+
import { styled } from '@mui/material/styles';
|
|
12
|
+
|
|
13
|
+
var F=({showToolbar:t,disableExport:e,setFilterButtonEl:i,toolbarContent:n})=>{if(t)return jsxs(GridToolbarContainer,{children:[jsx(GridToolbarColumnsButton,{slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarFilterButton,{ref:i,slotProps:{button:{color:"inherit"}}}),jsx(GridToolbarDensitySelector,{slotProps:{button:{color:"inherit"}}}),!e&&jsx(GridToolbarExport,{slotProps:{button:{color:"inherit"}}}),jsx(E,{sx:{flexGrow:1}}),n]})},S=F;var G=styled(E)({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px"}),V=()=>{let t=useGridApiContext(),{rowHeight:e,paginationModel:i,initialState:n}=useGridRootProps(),m=i?.pageSize||n?.pagination?.paginationModel?.pageSize||10,p=gridColumnsTotalWidthSelector(t),d=gridColumnPositionsSelector(t),g=x.useMemo(()=>d.filter(o=>o<=p).length,[p,d]),l=t.current?t.current.getVisibleColumns().slice(0,g):[],s=l.length>1?l:[...l,...Array.from({length:8},(o,r)=>({field:`fake${String(r+1).padStart(2,"0")}`,headerName:"",computedWidth:200,align:"flex-start"}))],h=x.useMemo(()=>{let o=[];for(let r=0;r<m;r+=1){for(let u of s)o.push(jsx(G,{sx:{justifyContent:u.align},children:jsx(N,{width:"100%"})},`column-${r}-${u.field}`));o.push(jsx(G,{},`fill-${r}`));}return o},[m,s]);return jsx($,{display:"grid",sx:{display:"grid",gridTemplateColumns:`${s.map(({computedWidth:o})=>`${o}px`).join(" ")} 1fr`,gridAutoRows:e,backgroundColor:"#fff",overflow:"hidden",maxHeight:"100%"},children:h})},y=V;var X=({columns:t,rows:e=[],loading:i,fetching:n,hideFooter:m,sx:p,showToolbar:d,disableExport:g,columnHeaderHeight:l=56,rowHeight:s=76,rowSpacingType:h="margin",getRowSpacing:o=()=>({top:0,bottom:0}),autoHeight:r=!1,toolbarContent:u,slots:P,...w})=>{let[T,k]=useState(null),R=[{...GRID_CHECKBOX_SELECTION_COL_DEF,width:71},...t];return jsxs(Fragment,{children:[n&&jsx(a,{sx:{zIndex:1}}),jsx(DataGridPremium,{columns:R,rows:e,loading:i,autoHeight:r,hideFooter:e.length===0?!0:m,rowHeight:s,columnHeaderHeight:l,getRowSpacing:o,rowSpacingType:h,slots:{toolbar:S,noRowsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),noResultsOverlay:()=>jsx(a$1,{title:"Nenhum registro encontrado"}),loadingOverlay:y,...P},slotProps:{panel:{anchorEl:T},toolbar:{setFilterButtonEl:k,showQuickFilter:!0,disableExport:g,showToolbar:d,toolbarContent:u}},sx:p,...w})]})},bo=X;
|
|
14
|
+
|
|
15
|
+
export { bo as default };
|