@joelbarron/react-web-dev-kit 0.1.9 → 0.1.10
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/auth/client.d.ts +46 -0
- package/dist/auth/client.d.ts.map +1 -0
- package/dist/auth/client.js +379 -0
- package/dist/auth/constants/countryCallingCodes.d.ts +9 -0
- package/dist/auth/constants/countryCallingCodes.d.ts.map +1 -0
- package/dist/auth/constants/countryCallingCodes.js +209 -0
- package/dist/auth/constants/gender.d.ts +9 -0
- package/dist/auth/constants/gender.d.ts.map +1 -0
- package/dist/auth/constants/gender.js +12 -0
- package/dist/auth/constants/index.d.ts +3 -0
- package/dist/auth/constants/index.d.ts.map +1 -0
- package/dist/auth/constants/index.js +2 -0
- package/dist/auth/forms/account/AuthAccountConfirmationForm.d.ts +18 -0
- package/dist/auth/forms/account/AuthAccountConfirmationForm.d.ts.map +1 -0
- package/dist/auth/forms/account/AuthAccountConfirmationForm.js +167 -0
- package/dist/auth/forms/account/index.d.ts +2 -0
- package/dist/auth/forms/account/index.d.ts.map +1 -0
- package/dist/auth/forms/account/index.js +1 -0
- package/dist/auth/forms/errorParser.d.ts +7 -0
- package/dist/auth/forms/errorParser.d.ts.map +1 -0
- package/dist/auth/forms/errorParser.js +65 -0
- package/dist/auth/forms/index.d.ts +6 -0
- package/dist/auth/forms/index.d.ts.map +1 -0
- package/dist/auth/forms/index.js +5 -0
- package/dist/auth/forms/password/AuthForgotPasswordForm.d.ts +16 -0
- package/dist/auth/forms/password/AuthForgotPasswordForm.d.ts.map +1 -0
- package/dist/auth/forms/password/AuthForgotPasswordForm.js +109 -0
- package/dist/auth/forms/password/AuthPasswordResetConfirmForm.d.ts +17 -0
- package/dist/auth/forms/password/AuthPasswordResetConfirmForm.d.ts.map +1 -0
- package/dist/auth/forms/password/AuthPasswordResetConfirmForm.js +163 -0
- package/dist/auth/forms/password/AuthResetPasswordForm.d.ts +12 -0
- package/dist/auth/forms/password/AuthResetPasswordForm.d.ts.map +1 -0
- package/dist/auth/forms/password/AuthResetPasswordForm.js +22 -0
- package/dist/auth/forms/password/index.d.ts +4 -0
- package/dist/auth/forms/password/index.d.ts.map +1 -0
- package/dist/auth/forms/password/index.js +3 -0
- package/dist/auth/forms/password/passwordValidation.d.ts +3 -0
- package/dist/auth/forms/password/passwordValidation.d.ts.map +1 -0
- package/dist/auth/forms/password/passwordValidation.js +45 -0
- package/dist/auth/forms/sign-in/AuthOtpSignInForm.d.ts +24 -0
- package/dist/auth/forms/sign-in/AuthOtpSignInForm.d.ts.map +1 -0
- package/dist/auth/forms/sign-in/AuthOtpSignInForm.js +227 -0
- package/dist/auth/forms/sign-in/AuthPasswordSignInForm.d.ts +22 -0
- package/dist/auth/forms/sign-in/AuthPasswordSignInForm.d.ts.map +1 -0
- package/dist/auth/forms/sign-in/AuthPasswordSignInForm.js +148 -0
- package/dist/auth/forms/sign-in/index.d.ts +3 -0
- package/dist/auth/forms/sign-in/index.d.ts.map +1 -0
- package/dist/auth/forms/sign-in/index.js +2 -0
- package/dist/auth/forms/sign-up/AuthSignUpForm.d.ts +37 -0
- package/dist/auth/forms/sign-up/AuthSignUpForm.d.ts.map +1 -0
- package/dist/auth/forms/sign-up/AuthSignUpForm.js +193 -0
- package/dist/auth/forms/sign-up/index.d.ts +2 -0
- package/dist/auth/forms/sign-up/index.d.ts.map +1 -0
- package/dist/auth/forms/sign-up/index.js +1 -0
- package/dist/auth/fuse/createFuseAuthViews.d.ts +25 -0
- package/dist/auth/fuse/createFuseAuthViews.d.ts.map +1 -0
- package/dist/auth/fuse/createFuseAuthViews.js +510 -0
- package/dist/auth/fuse/fuseAdapter.d.ts +42 -0
- package/dist/auth/fuse/fuseAdapter.d.ts.map +1 -0
- package/dist/auth/fuse/fuseAdapter.js +291 -0
- package/dist/auth/fuse/fuseIntegration.d.ts +74 -0
- package/dist/auth/fuse/fuseIntegration.d.ts.map +1 -0
- package/dist/auth/fuse/fuseIntegration.js +121 -0
- package/dist/auth/fuse/index.d.ts +4 -0
- package/dist/auth/fuse/index.d.ts.map +1 -0
- package/dist/auth/fuse/index.js +3 -0
- package/dist/auth/index.d.ts +11 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +10 -0
- package/dist/auth/provider.d.ts +35 -0
- package/dist/auth/provider.d.ts.map +1 -0
- package/dist/auth/provider.js +133 -0
- package/dist/auth/query.d.ts +23 -0
- package/dist/auth/query.d.ts.map +1 -0
- package/dist/auth/query.js +103 -0
- package/dist/auth/routes.d.ts +37 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +75 -0
- package/dist/auth/social/providerAuth.d.ts +101 -0
- package/dist/auth/social/providerAuth.d.ts.map +1 -0
- package/dist/auth/social/providerAuth.js +207 -0
- package/dist/auth/storage.d.ts +3 -0
- package/dist/auth/storage.d.ts.map +1 -0
- package/dist/auth/storage.js +20 -0
- package/dist/auth/types.d.ts +238 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +1 -0
- package/dist/auth/ui/AuthPageTitle.d.ts +7 -0
- package/dist/auth/ui/AuthPageTitle.d.ts.map +1 -0
- package/dist/auth/ui/AuthPageTitle.js +7 -0
- package/dist/auth/ui/AuthPagesMessageSection.d.ts +3 -0
- package/dist/auth/ui/AuthPagesMessageSection.d.ts.map +1 -0
- package/dist/auth/ui/AuthPagesMessageSection.js +39 -0
- package/dist/auth/ui/AuthPrimaryButton.d.ts +9 -0
- package/dist/auth/ui/AuthPrimaryButton.d.ts.map +1 -0
- package/dist/auth/ui/AuthPrimaryButton.js +19 -0
- package/dist/auth/ui/AuthRoleSelectionDialog.d.ts +14 -0
- package/dist/auth/ui/AuthRoleSelectionDialog.d.ts.map +1 -0
- package/dist/auth/ui/AuthRoleSelectionDialog.js +39 -0
- package/dist/auth/ui/AuthRoutePageWrapper.d.ts +12 -0
- package/dist/auth/ui/AuthRoutePageWrapper.d.ts.map +1 -0
- package/dist/auth/ui/AuthRoutePageWrapper.js +61 -0
- package/dist/auth/ui/AuthSecondaryButton.d.ts +7 -0
- package/dist/auth/ui/AuthSecondaryButton.d.ts.map +1 -0
- package/dist/auth/ui/AuthSecondaryButton.js +18 -0
- package/dist/auth/ui/AuthSocialProviderButton.d.ts +11 -0
- package/dist/auth/ui/AuthSocialProviderButton.d.ts.map +1 -0
- package/dist/auth/ui/AuthSocialProviderButton.js +33 -0
- package/dist/auth/ui/index.d.ts +9 -0
- package/dist/auth/ui/index.d.ts.map +1 -0
- package/dist/auth/ui/index.js +8 -0
- package/dist/auth/ui/types.d.ts +15 -0
- package/dist/auth/ui/types.d.ts.map +1 -0
- package/dist/auth/ui/types.js +1 -0
- package/dist/config/createConfig.d.ts +14 -0
- package/dist/config/createConfig.d.ts.map +1 -0
- package/dist/config/createConfig.js +179 -0
- package/dist/config/defaults.d.ts +3 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +39 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +4 -0
- package/dist/config/merge.d.ts +2 -0
- package/dist/config/merge.d.ts.map +1 -0
- package/dist/config/merge.js +18 -0
- package/dist/config/types.d.ts +53 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +1 -0
- package/dist/core/buttons/JBButton.d.ts +8 -0
- package/dist/core/buttons/JBButton.d.ts.map +1 -0
- package/dist/core/buttons/JBButton.js +55 -0
- package/dist/core/buttons/index.d.ts +2 -0
- package/dist/core/buttons/index.d.ts.map +1 -0
- package/dist/core/buttons/index.js +1 -0
- package/dist/core/dialogs/JBConfirmDialog.d.ts +15 -0
- package/dist/core/dialogs/JBConfirmDialog.d.ts.map +1 -0
- package/dist/core/dialogs/JBConfirmDialog.js +6 -0
- package/dist/core/dialogs/index.d.ts +2 -0
- package/dist/core/dialogs/index.d.ts.map +1 -0
- package/dist/core/dialogs/index.js +1 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/layout/JBContentContainer.d.ts +31 -0
- package/dist/core/layout/JBContentContainer.d.ts.map +1 -0
- package/dist/core/layout/JBContentContainer.js +50 -0
- package/dist/core/layout/JBFormHeader.d.ts +3 -0
- package/dist/core/layout/JBFormHeader.d.ts.map +1 -0
- package/dist/core/layout/JBFormHeader.js +131 -0
- package/dist/core/layout/index.d.ts +3 -0
- package/dist/core/layout/index.d.ts.map +1 -0
- package/dist/core/layout/index.js +2 -0
- package/dist/core/skeletons/JBFormContentSkeleton.d.ts +5 -0
- package/dist/core/skeletons/JBFormContentSkeleton.d.ts.map +1 -0
- package/dist/core/skeletons/JBFormContentSkeleton.js +12 -0
- package/dist/core/skeletons/JBFormHeaderSkeleton.d.ts +6 -0
- package/dist/core/skeletons/JBFormHeaderSkeleton.d.ts.map +1 -0
- package/dist/core/skeletons/JBFormHeaderSkeleton.js +19 -0
- package/dist/core/skeletons/index.d.ts +3 -0
- package/dist/core/skeletons/index.d.ts.map +1 -0
- package/dist/core/skeletons/index.js +2 -0
- package/dist/forms/JBAutocompleteField.d.ts +12 -0
- package/dist/forms/JBAutocompleteField.d.ts.map +1 -0
- package/dist/forms/JBAutocompleteField.js +20 -0
- package/dist/forms/JBCheckboxField.d.ts +12 -0
- package/dist/forms/JBCheckboxField.d.ts.map +1 -0
- package/dist/forms/JBCheckboxField.js +36 -0
- package/dist/forms/JBDatePickerField.d.ts +13 -0
- package/dist/forms/JBDatePickerField.d.ts.map +1 -0
- package/dist/forms/JBDatePickerField.js +67 -0
- package/dist/forms/JBRadioGroupField.d.ts +10 -0
- package/dist/forms/JBRadioGroupField.d.ts.map +1 -0
- package/dist/forms/JBRadioGroupField.js +8 -0
- package/dist/forms/JBSelectField.d.ts +9 -0
- package/dist/forms/JBSelectField.d.ts.map +1 -0
- package/dist/forms/JBSelectField.js +8 -0
- package/dist/forms/JBSwitchField.d.ts +11 -0
- package/dist/forms/JBSwitchField.d.ts.map +1 -0
- package/dist/forms/JBSwitchField.js +10 -0
- package/dist/forms/JBTextField.d.ts +6 -0
- package/dist/forms/JBTextField.d.ts.map +1 -0
- package/dist/forms/JBTextField.js +8 -0
- package/dist/forms/JBTimePickerField.d.ts +12 -0
- package/dist/forms/JBTimePickerField.d.ts.map +1 -0
- package/dist/forms/JBTimePickerField.js +35 -0
- package/dist/forms/index.d.ts +13 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +12 -0
- package/dist/forms/rules.d.ts +16 -0
- package/dist/forms/rules.d.ts.map +1 -0
- package/dist/forms/rules.js +21 -0
- package/dist/forms/types.d.ts +12 -0
- package/dist/forms/types.d.ts.map +1 -0
- package/dist/forms/types.js +1 -0
- package/dist/forms/utils.d.ts +5 -0
- package/dist/forms/utils.d.ts.map +1 -0
- package/dist/forms/utils.js +7 -0
- package/dist/forms/zod.d.ts +4 -0
- package/dist/forms/zod.d.ts.map +1 -0
- package/dist/forms/zod.js +9 -0
- package/dist/grid/JBGrid.d.ts +3 -0
- package/dist/grid/JBGrid.d.ts.map +1 -0
- package/dist/grid/JBGrid.js +338 -0
- package/dist/grid/JBGridHeader.d.ts +3 -0
- package/dist/grid/JBGridHeader.d.ts.map +1 -0
- package/dist/grid/JBGridHeader.js +93 -0
- package/dist/grid/JBGridLoading.d.ts +9 -0
- package/dist/grid/JBGridLoading.d.ts.map +1 -0
- package/dist/grid/JBGridLoading.js +14 -0
- package/dist/grid/JBGridProviders.d.ts +13 -0
- package/dist/grid/JBGridProviders.d.ts.map +1 -0
- package/dist/grid/JBGridProviders.js +54 -0
- package/dist/grid/JBGridSkeleton.d.ts +7 -0
- package/dist/grid/JBGridSkeleton.d.ts.map +1 -0
- package/dist/grid/JBGridSkeleton.js +6 -0
- package/dist/grid/defaults.d.ts +4 -0
- package/dist/grid/defaults.d.ts.map +1 -0
- package/dist/grid/defaults.js +29 -0
- package/dist/grid/index.d.ts +8 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/index.js +7 -0
- package/dist/grid/types.d.ts +197 -0
- package/dist/grid/types.d.ts.map +1 -0
- package/dist/grid/types.js +1 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/useJBDebouncedValue.d.ts +2 -0
- package/dist/hooks/useJBDebouncedValue.d.ts.map +1 -0
- package/dist/hooks/useJBDebouncedValue.js +11 -0
- package/dist/hooks/useJBEntityFormController.d.ts +54 -0
- package/dist/hooks/useJBEntityFormController.d.ts.map +1 -0
- package/dist/hooks/useJBEntityFormController.js +156 -0
- package/dist/hooks/useJBRedirect.d.ts +10 -0
- package/dist/hooks/useJBRedirect.d.ts.map +1 -0
- package/dist/hooks/useJBRedirect.js +11 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/query/createQueryClient.d.ts +8 -0
- package/dist/query/createQueryClient.d.ts.map +1 -0
- package/dist/query/createQueryClient.js +25 -0
- package/dist/query/http.d.ts +3 -0
- package/dist/query/http.d.ts.map +1 -0
- package/dist/query/http.js +12 -0
- package/dist/query/index.d.ts +4 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query/index.js +3 -0
- package/dist/query/types.d.ts +7 -0
- package/dist/query/types.d.ts.map +1 -0
- package/dist/query/types.js +1 -0
- package/dist/utils/errors.d.ts +10 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +55 -0
- package/dist/utils/format.d.ts +4 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +28 -0
- package/dist/utils/geo.d.ts +9 -0
- package/dist/utils/geo.d.ts.map +1 -0
- package/dist/utils/geo.js +186 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/query.d.ts +2 -0
- package/dist/utils/query.d.ts.map +1 -0
- package/dist/utils/query.js +4 -0
- package/dist/utils/regex.d.ts +7 -0
- package/dist/utils/regex.d.ts.map +1 -0
- package/dist/utils/regex.js +6 -0
- package/package.json +3 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JBButton';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type JBConfirmDialogProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
title?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
confirmLabel?: string;
|
|
7
|
+
cancelLabel?: string;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
10
|
+
confirmColor?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
11
|
+
onConfirm: () => void;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function JBConfirmDialog(props: JBConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=JBConfirmDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/core/dialogs/JBConfirmDialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAClF,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CA8C1D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography } from '@mui/material';
|
|
3
|
+
export function JBConfirmDialog(props) {
|
|
4
|
+
const { open, title = 'Confirmar', description, confirmLabel = 'Confirmar', cancelLabel = 'Cancelar', loading = false, maxWidth = 'xs', confirmColor = 'primary', onConfirm, onClose } = props;
|
|
5
|
+
return (_jsxs(Dialog, { open: open, onClose: loading ? undefined : onClose, maxWidth: maxWidth, fullWidth: true, children: [_jsx(DialogTitle, { children: title }), description ? (_jsx(DialogContent, { children: typeof description === 'string' ? _jsx(Typography, { variant: "body2", children: description }) : description })) : null, _jsxs(DialogActions, { sx: { px: 3, pb: 2 }, children: [_jsx(Button, { variant: "outlined", onClick: onClose, disabled: loading, children: cancelLabel }), _jsx(Button, { variant: "contained", color: confirmColor, onClick: onConfirm, disabled: loading, children: confirmLabel })] })] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/dialogs/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JBConfirmDialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
import { KeyboardEventHandler, ReactNode } from 'react';
|
|
3
|
+
export type JBContentContainerProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
header?: ReactNode;
|
|
6
|
+
stickyHeader?: boolean;
|
|
7
|
+
stickyHeaderTop?: number | string;
|
|
8
|
+
stickyHeaderZIndex?: number;
|
|
9
|
+
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
animationDelayMs?: number;
|
|
12
|
+
animationDurationMs?: number;
|
|
13
|
+
padding?: number | string | {
|
|
14
|
+
xs?: number | string;
|
|
15
|
+
sm?: number | string;
|
|
16
|
+
md?: number | string;
|
|
17
|
+
lg?: number | string;
|
|
18
|
+
};
|
|
19
|
+
contentPadding?: number | string | {
|
|
20
|
+
xs?: number | string;
|
|
21
|
+
sm?: number | string;
|
|
22
|
+
md?: number | string;
|
|
23
|
+
lg?: number | string;
|
|
24
|
+
};
|
|
25
|
+
withGradient?: boolean;
|
|
26
|
+
paperSx?: SxProps<Theme>;
|
|
27
|
+
headerSx?: SxProps<Theme>;
|
|
28
|
+
contentSx?: SxProps<Theme>;
|
|
29
|
+
};
|
|
30
|
+
export declare function JBContentContainer(props: JBContentContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=JBContentContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBContentContainer.d.ts","sourceRoot":"","sources":["../../../src/core/layout/JBContentContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACvH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE9H,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC5B,CAAC;AAKF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA2FhE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Paper } from '@mui/material';
|
|
3
|
+
import { alpha } from '@mui/material/styles';
|
|
4
|
+
const defaultOuterPadding = { xs: 1.5, sm: 2.5, md: 3 };
|
|
5
|
+
const defaultContentPadding = { xs: 2.5, sm: 3, md: 4 };
|
|
6
|
+
export function JBContentContainer(props) {
|
|
7
|
+
const { children, header, stickyHeader = true, stickyHeaderTop = 0, stickyHeaderZIndex = 2, onKeyDown, animated = true, animationDelayMs = 0, animationDurationMs = 260, padding = defaultOuterPadding, contentPadding = defaultContentPadding,
|
|
8
|
+
// borderRadius = 3,
|
|
9
|
+
withGradient = false, paperSx, headerSx, contentSx } = props;
|
|
10
|
+
return (_jsx(Box, { className: "w-full h-full", sx: { p: padding }, onKeyDown: onKeyDown, children: _jsx(Box, { sx: animated
|
|
11
|
+
? {
|
|
12
|
+
'@keyframes jbFadeSlideIn': {
|
|
13
|
+
from: { opacity: 0, transform: 'translateY(14px)' },
|
|
14
|
+
to: { opacity: 1, transform: 'translateY(0)' }
|
|
15
|
+
},
|
|
16
|
+
animation: `jbFadeSlideIn ${animationDurationMs}ms ease-out ${animationDelayMs}ms both`
|
|
17
|
+
}
|
|
18
|
+
: undefined, children: _jsxs(Paper, { elevation: 0, sx: [
|
|
19
|
+
(theme) => ({
|
|
20
|
+
position: 'relative',
|
|
21
|
+
overflow: stickyHeader ? 'visible' : 'hidden',
|
|
22
|
+
// borderRadius,
|
|
23
|
+
// border: `1px solid ${theme.palette.divider}`,
|
|
24
|
+
background: withGradient
|
|
25
|
+
? `linear-gradient(180deg, ${alpha(theme.palette.background.paper, 0.96)} 0%, ${alpha(theme.palette.background.default, 0.9)} 100%)`
|
|
26
|
+
: theme.palette.background.paper
|
|
27
|
+
}),
|
|
28
|
+
...(Array.isArray(paperSx) ? paperSx : paperSx ? [paperSx] : [])
|
|
29
|
+
], children: [header ? (_jsx(Box, { sx: [
|
|
30
|
+
{
|
|
31
|
+
px: { xs: 2, sm: 3, md: 4 },
|
|
32
|
+
pt: { xs: 2, sm: 2.5 },
|
|
33
|
+
pb: 0.75,
|
|
34
|
+
borderBottom: '1px solid',
|
|
35
|
+
borderColor: 'divider',
|
|
36
|
+
...(stickyHeader
|
|
37
|
+
? {
|
|
38
|
+
position: 'sticky',
|
|
39
|
+
top: stickyHeaderTop,
|
|
40
|
+
zIndex: stickyHeaderZIndex,
|
|
41
|
+
bgcolor: 'background.paper'
|
|
42
|
+
}
|
|
43
|
+
: {})
|
|
44
|
+
},
|
|
45
|
+
...(Array.isArray(headerSx) ? headerSx : headerSx ? [headerSx] : [])
|
|
46
|
+
], children: header })) : null, _jsx(Box, { sx: [
|
|
47
|
+
{ px: contentPadding, py: contentPadding },
|
|
48
|
+
...(Array.isArray(contentSx) ? contentSx : contentSx ? [contentSx] : [])
|
|
49
|
+
], children: children })] }) }) }));
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBFormHeader.d.ts","sourceRoot":"","sources":["../../../src/core/layout/JBFormHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA+PpD"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from '@mui/material';
|
|
3
|
+
import { alpha } from '@mui/material/styles';
|
|
4
|
+
import { JBButton } from '../buttons';
|
|
5
|
+
export function JBFormHeader(props) {
|
|
6
|
+
const { moduleConfig, iconNameRenderer, animated = true, animationDurationMs = 260, animationStaggerMs = 70, animationPreset = 'vertical', breadcrumb, showBackButton = false, backLabel, onBackClick, backContent, isNew = false, recordId, title, dynamicTitle, formValues, getDynamicTitle, subtitle, dynamicSubtitle, getDynamicSubtitle, icon, actions, rightContent } = props;
|
|
7
|
+
const dynamicTitleFromResolver = getDynamicTitle?.({ isNew, values: formValues });
|
|
8
|
+
const dynamicSubtitleFromResolver = getDynamicSubtitle?.({ isNew, values: formValues });
|
|
9
|
+
const resolvedDynamicTitle = (!isNew ? dynamicTitle : undefined) ?? dynamicTitleFromResolver;
|
|
10
|
+
const moduleTitle = title ??
|
|
11
|
+
(isNew ? moduleConfig?.texts?.newText : moduleConfig?.texts?.editText) ??
|
|
12
|
+
moduleConfig?.texts?.moduleName ??
|
|
13
|
+
'';
|
|
14
|
+
const hasStaticTitle = Boolean(moduleTitle);
|
|
15
|
+
const dynamicSubtitleCandidate = dynamicSubtitle ??
|
|
16
|
+
dynamicSubtitleFromResolver ??
|
|
17
|
+
(hasStaticTitle ? resolvedDynamicTitle : undefined);
|
|
18
|
+
const staticSubtitleCandidate = subtitle ??
|
|
19
|
+
moduleConfig?.texts?.formHeaderSubtitle ??
|
|
20
|
+
'';
|
|
21
|
+
const baseSubtitle = dynamicSubtitleCandidate ?? staticSubtitleCandidate;
|
|
22
|
+
const recordPrefix = moduleConfig?.texts?.formHeaderRecordPrefix;
|
|
23
|
+
const canApplyRecordPrefix = !isNew &&
|
|
24
|
+
Boolean(recordPrefix) &&
|
|
25
|
+
recordId !== undefined &&
|
|
26
|
+
recordId !== null &&
|
|
27
|
+
String(recordId).trim() !== '' &&
|
|
28
|
+
Boolean(dynamicSubtitleCandidate);
|
|
29
|
+
const resolvedTitle = (hasStaticTitle ? moduleTitle : undefined) ||
|
|
30
|
+
resolvedDynamicTitle ||
|
|
31
|
+
'';
|
|
32
|
+
const resolvedSubtitle = canApplyRecordPrefix
|
|
33
|
+
? [`${recordPrefix}-${recordId}`, baseSubtitle].filter(Boolean).join(' / ')
|
|
34
|
+
: baseSubtitle;
|
|
35
|
+
const resolvedBackLabel = backLabel ?? moduleConfig?.texts?.goBackToGrid ?? 'Volver';
|
|
36
|
+
const resolvedIcon = icon ??
|
|
37
|
+
(moduleConfig?.texts?.iconName && iconNameRenderer
|
|
38
|
+
? iconNameRenderer(moduleConfig.texts.iconName)
|
|
39
|
+
: null);
|
|
40
|
+
const formDisabled = actions?.formDisabled ?? false;
|
|
41
|
+
const allowEdit = actions?.allowEdit ?? false;
|
|
42
|
+
const allowDelete = actions?.allowDelete ?? false;
|
|
43
|
+
const showDeleteWhenEditing = actions?.showDeleteWhenEditing ?? false;
|
|
44
|
+
const defaultActions = actions ? (_jsxs(Box, { sx: {
|
|
45
|
+
display: 'flex',
|
|
46
|
+
gap: 1,
|
|
47
|
+
flexWrap: 'wrap',
|
|
48
|
+
justifyContent: { xs: 'center', md: 'flex-end' },
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
width: { xs: '100%', md: 'auto' }
|
|
51
|
+
}, children: [!isNew && allowEdit && formDisabled && actions.onStartEdit ? (_jsx(JBButton, { action: "edit", size: "large", disabled: actions.disableEdit, startIcon: actions.editIcon, onClick: actions.onStartEdit, children: actions.editLabel ?? 'Editar' })) : null, (isNew || !formDisabled) && actions.onCancel ? (_jsx(JBButton, { action: "cancel", size: "large", disabled: actions.disableCancel, startIcon: actions.cancelIcon, onClick: actions.onCancel, children: actions.cancelLabel ?? 'Cancelar' })) : null, (isNew || !formDisabled) && actions.onSave ? (_jsx(JBButton, { action: "save", size: "large", disabled: actions.disableSave, startIcon: actions.saveIcon, onClick: actions.onSave, children: actions.saveLabel ?? (isNew ? 'Guardar' : 'Guardar cambios') })) : null, allowDelete &&
|
|
52
|
+
actions.onDelete &&
|
|
53
|
+
(formDisabled || showDeleteWhenEditing) ? (_jsx(JBButton, { action: "delete", size: "large", disabled: actions.disableDelete, startIcon: actions.deleteIcon, onClick: actions.onDelete, children: actions.deleteLabel ?? 'Eliminar' })) : null] })) : null;
|
|
54
|
+
const resolvedRightContent = rightContent ?? defaultActions;
|
|
55
|
+
const animateSx = (delayMs) => animated
|
|
56
|
+
? {
|
|
57
|
+
animation: `jbHeaderFadeIn ${animationDurationMs}ms ease-out ${delayMs}ms both`
|
|
58
|
+
}
|
|
59
|
+
: undefined;
|
|
60
|
+
const animateFromLeftSx = (delayMs) => animated && animationPreset === 'sides'
|
|
61
|
+
? {
|
|
62
|
+
animation: `jbHeaderFadeInLeft ${animationDurationMs}ms ease-out ${delayMs}ms both`
|
|
63
|
+
}
|
|
64
|
+
: animateSx(delayMs);
|
|
65
|
+
const animateFromRightSx = (delayMs) => animated && animationPreset === 'sides'
|
|
66
|
+
? {
|
|
67
|
+
animation: `jbHeaderFadeInRight ${animationDurationMs}ms ease-out ${delayMs}ms both`
|
|
68
|
+
}
|
|
69
|
+
: animateSx(delayMs);
|
|
70
|
+
return (_jsxs(Box, { sx: {
|
|
71
|
+
width: '100%',
|
|
72
|
+
display: 'flex',
|
|
73
|
+
flexDirection: 'column',
|
|
74
|
+
gap: 2,
|
|
75
|
+
p: { xs: 2, sm: 3 },
|
|
76
|
+
'@keyframes jbHeaderFadeIn': {
|
|
77
|
+
from: { opacity: 0, transform: 'translateY(10px)' },
|
|
78
|
+
to: { opacity: 1, transform: 'translateY(0)' }
|
|
79
|
+
},
|
|
80
|
+
'@keyframes jbHeaderFadeInLeft': {
|
|
81
|
+
from: { opacity: 0, transform: 'translateX(-16px)' },
|
|
82
|
+
to: { opacity: 1, transform: 'translateX(0)' }
|
|
83
|
+
},
|
|
84
|
+
'@keyframes jbHeaderFadeInRight': {
|
|
85
|
+
from: { opacity: 0, transform: 'translateX(16px)' },
|
|
86
|
+
to: { opacity: 1, transform: 'translateX(0)' }
|
|
87
|
+
}
|
|
88
|
+
}, children: [breadcrumb ? _jsx(Box, { sx: animateSx(0), children: breadcrumb }) : null, backContent ? _jsx(Box, { sx: animateSx(animationStaggerMs), children: backContent }) : null, showBackButton && onBackClick ? (_jsx(Typography, { role: "button", color: "text.primary", sx: {
|
|
89
|
+
display: 'inline-flex',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
gap: 0.75,
|
|
92
|
+
width: 'fit-content',
|
|
93
|
+
alignSelf: { xs: 'center', md: 'flex-start' },
|
|
94
|
+
fontWeight: 500,
|
|
95
|
+
fontSize: { xs: '0.95rem', md: '1rem' },
|
|
96
|
+
cursor: 'pointer',
|
|
97
|
+
opacity: 0.9,
|
|
98
|
+
transition: 'all .16s ease',
|
|
99
|
+
'&:hover': { opacity: 1, color: 'primary.main' },
|
|
100
|
+
...animateSx(animationStaggerMs * 2)
|
|
101
|
+
}, onClick: onBackClick, children: `← ${resolvedBackLabel}` })) : null, _jsxs(Box, { sx: {
|
|
102
|
+
display: { xs: 'flex', md: 'grid' },
|
|
103
|
+
flexDirection: { xs: 'column', md: 'row' },
|
|
104
|
+
gridTemplateColumns: { md: 'minmax(0, 1fr) auto' },
|
|
105
|
+
alignItems: { xs: 'center', md: 'center' },
|
|
106
|
+
width: '100%',
|
|
107
|
+
gap: 2
|
|
108
|
+
}, children: [_jsxs(Box, { sx: {
|
|
109
|
+
display: 'flex',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
justifyContent: { xs: 'center', md: 'flex-start' },
|
|
112
|
+
gap: 1.25,
|
|
113
|
+
minWidth: 0,
|
|
114
|
+
width: '100%',
|
|
115
|
+
...animateFromLeftSx(animationStaggerMs * 3)
|
|
116
|
+
}, children: [resolvedIcon ? _jsx(Box, { sx: { display: 'inline-flex', alignItems: 'center' }, children: resolvedIcon }) : null, _jsxs(Box, { sx: { minWidth: 0, textAlign: { xs: 'center', md: 'left' } }, children: [_jsx(Typography, { variant: "h5", sx: { fontWeight: 700, lineHeight: 1.15 }, children: resolvedTitle }), resolvedSubtitle ? (_jsx(Typography, { variant: "body2", sx: (theme) => ({
|
|
117
|
+
mt: 0.4,
|
|
118
|
+
fontWeight: 500,
|
|
119
|
+
lineHeight: 1.1,
|
|
120
|
+
color: theme.palette.mode === 'dark'
|
|
121
|
+
? alpha(theme.palette.common.white, 0.9)
|
|
122
|
+
: theme.palette.primary.dark
|
|
123
|
+
}), children: resolvedSubtitle })) : null] })] }), _jsx(Box, { sx: {
|
|
124
|
+
width: { xs: '100%', md: 'auto' },
|
|
125
|
+
display: 'flex',
|
|
126
|
+
justifySelf: { md: 'end' },
|
|
127
|
+
justifyContent: { xs: 'center', md: 'flex-end' },
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
...animateFromRightSx(animationStaggerMs * 4)
|
|
130
|
+
}, children: resolvedRightContent })] })] }));
|
|
131
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBFormContentSkeleton.d.ts","sourceRoot":"","sources":["../../../src/core/skeletons/JBFormContentSkeleton.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CA8BtE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Skeleton } from '@mui/material';
|
|
3
|
+
export function JBFormContentSkeleton(props) {
|
|
4
|
+
const { fieldCount = 4 } = props;
|
|
5
|
+
const fields = Array.from({ length: fieldCount });
|
|
6
|
+
return (_jsx(Box, { sx: {
|
|
7
|
+
width: '100%',
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
gap: 3
|
|
11
|
+
}, children: fields.map((_, index) => (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 1 }, children: [_jsx(Skeleton, { variant: "text", width: 140, height: 24 }), _jsx(Skeleton, { variant: "rounded", width: "100%", height: 44 })] }, index))) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type JBFormHeaderSkeletonProps = {
|
|
2
|
+
showBackLink?: boolean;
|
|
3
|
+
showActions?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function JBFormHeaderSkeleton(props: JBFormHeaderSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=JBFormHeaderSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBFormHeaderSkeleton.d.ts","sourceRoot":"","sources":["../../../src/core/skeletons/JBFormHeaderSkeleton.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAwEpE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Skeleton } from '@mui/material';
|
|
3
|
+
export function JBFormHeaderSkeleton(props) {
|
|
4
|
+
const { showBackLink = true, showActions = true } = props;
|
|
5
|
+
return (_jsxs(Box, { sx: {
|
|
6
|
+
width: '100%',
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flexDirection: 'column',
|
|
9
|
+
gap: 2,
|
|
10
|
+
p: { xs: 2, sm: 3 }
|
|
11
|
+
}, children: [_jsx(Skeleton, { variant: "rounded", width: 300, height: 28 }), showBackLink ? (_jsx(Skeleton, { variant: "text", width: 170, height: 30 })) : null, _jsxs(Box, { sx: {
|
|
12
|
+
display: { xs: 'flex', sm: 'grid' },
|
|
13
|
+
flexDirection: { xs: 'column', sm: 'row' },
|
|
14
|
+
gridTemplateColumns: { sm: 'minmax(0, 1fr) auto' },
|
|
15
|
+
alignItems: { xs: 'stretch', sm: 'center' },
|
|
16
|
+
width: '100%',
|
|
17
|
+
gap: 2
|
|
18
|
+
}, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1.25, minWidth: 0 }, children: [_jsx(Skeleton, { variant: "circular", width: 30, height: 30 }), _jsxs(Box, { sx: { minWidth: 0 }, children: [_jsx(Skeleton, { variant: "text", width: 280, height: 52 }), _jsx(Skeleton, { variant: "text", width: 240, height: 30 })] })] }), showActions ? (_jsxs(Box, { sx: { display: 'flex', gap: 1, justifySelf: { sm: 'end' } }, children: [_jsx(Skeleton, { variant: "rounded", width: 116, height: 42 }), _jsx(Skeleton, { variant: "rounded", width: 116, height: 42 })] })) : null] })] }));
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/skeletons/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material';
|
|
2
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
+
import { JBFieldControlProps, SelectOption } from './types';
|
|
4
|
+
export type JBAutocompleteFieldProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>> = JBFieldControlProps<TFieldValues, TName> & Omit<TextFieldProps, 'name' | 'defaultValue' | 'value' | 'onChange' | 'error' | 'helperText'> & {
|
|
5
|
+
options: SelectOption[];
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
disableClearable?: boolean;
|
|
8
|
+
noOptionsText?: string;
|
|
9
|
+
onSearchTextChange?: (value: string) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function JBAutocompleteField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>(props: JBAutocompleteFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=JBAutocompleteField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBAutocompleteField.d.ts","sourceRoot":"","sources":["../../src/forms/JBAutocompleteField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAc,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5D,MAAM,MAAM,wBAAwB,CAClC,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,IAC9B,mBAAmB,CAAC,YAAY,EAAE,KAAK,CAAC,GAC1C,IAAI,CACF,cAAc,EACd,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,CACxE,GAAG;IACF,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEJ,wBAAgB,mBAAmB,CACjC,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,EAChC,KAAK,EAAE,wBAAwB,CAAC,YAAY,EAAE,KAAK,CAAC,2CAwErD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Autocomplete, CircularProgress, TextField } from '@mui/material';
|
|
3
|
+
import { Controller } from 'react-hook-form';
|
|
4
|
+
import { getJBFieldErrorMessage } from './utils';
|
|
5
|
+
export function JBAutocompleteField(props) {
|
|
6
|
+
const { control, name, rules, options, loading = false, disableClearable = false, noOptionsText = 'Sin opciones', onSearchTextChange, size = 'medium', ...textFieldProps } = props;
|
|
7
|
+
return (_jsx(Controller, { control: control, name: name, rules: rules, render: ({ field, fieldState }) => {
|
|
8
|
+
const selectedOption = options.find((option) => String(option.value) === String(field.value ?? '')) ?? null;
|
|
9
|
+
return (_jsx(Autocomplete, { options: options, value: selectedOption, disabled: textFieldProps.disabled, loading: loading, disableClearable: disableClearable, noOptionsText: noOptionsText, getOptionDisabled: (option) => !!option.disabled, getOptionLabel: (option) => option.label ?? '', isOptionEqualToValue: (option, value) => String(option.value) === String(value.value), onChange: (_, option) => {
|
|
10
|
+
field.onChange(option ? option.value : '');
|
|
11
|
+
}, onInputChange: (_, value, reason) => {
|
|
12
|
+
if (reason === 'input') {
|
|
13
|
+
onSearchTextChange?.(value);
|
|
14
|
+
}
|
|
15
|
+
}, renderInput: (params) => (_jsx(TextField, { ...params, ...textFieldProps, name: field.name, size: size, error: !!fieldState.error, helperText: getJBFieldErrorMessage(fieldState.error), inputRef: field.ref, InputProps: {
|
|
16
|
+
...params.InputProps,
|
|
17
|
+
endAdornment: (_jsxs(_Fragment, { children: [loading ? (_jsx(CircularProgress, { color: "inherit", size: 16 })) : null, params.InputProps.endAdornment] }))
|
|
18
|
+
} })) }));
|
|
19
|
+
} }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CheckboxProps, FormControlLabelProps, FormControlProps, SxProps, Theme } from '@mui/material';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
4
|
+
import { JBFieldControlProps } from './types';
|
|
5
|
+
export type JBCheckboxFieldProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>> = JBFieldControlProps<TFieldValues, TName> & Omit<CheckboxProps, 'name' | 'checked' | 'onChange' | 'defaultChecked'> & {
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
formControlProps?: Omit<FormControlProps, 'error'>;
|
|
8
|
+
formControlLabelProps?: Omit<FormControlLabelProps, 'control' | 'label'>;
|
|
9
|
+
checkboxSx?: SxProps<Theme>;
|
|
10
|
+
};
|
|
11
|
+
export declare function JBCheckboxField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>(props: JBCheckboxFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=JBCheckboxField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBCheckboxField.d.ts","sourceRoot":"","sources":["../../src/forms/JBCheckboxField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAGb,qBAAqB,EACrB,gBAAgB,EAEhB,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAc,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG9C,MAAM,MAAM,oBAAoB,CAC9B,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,IAC9B,mBAAmB,CAAC,YAAY,EAAE,KAAK,CAAC,GAC1C,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,gBAAgB,CAAC,GAAG;IACxE,KAAK,EAAE,SAAS,CAAC;IACjB,gBAAgB,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACnD,qBAAqB,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;IACzE,UAAU,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC7B,CAAC;AAEJ,wBAAgB,eAAe,CAC7B,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,EAChC,KAAK,EAAE,oBAAoB,CAAC,YAAY,EAAE,KAAK,CAAC,2CAsEjD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from '@mui/material';
|
|
3
|
+
import { Controller } from 'react-hook-form';
|
|
4
|
+
import { getJBFieldErrorMessage } from './utils';
|
|
5
|
+
export function JBCheckboxField(props) {
|
|
6
|
+
const { control, name, rules, label, formControlProps, formControlLabelProps, checkboxSx, ...checkboxProps } = props;
|
|
7
|
+
return (_jsx(Controller, { control: control, name: name, rules: rules, render: ({ field, fieldState }) => (_jsxs(FormControl, { ...formControlProps, error: !!fieldState.error, children: [_jsx(FormControlLabel, { ...formControlLabelProps, label: label, sx: {
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
m: 0,
|
|
10
|
+
columnGap: 1,
|
|
11
|
+
'& .MuiFormControlLabel-label': {
|
|
12
|
+
fontSize: 14,
|
|
13
|
+
lineHeight: 1.35,
|
|
14
|
+
color: 'text.primary'
|
|
15
|
+
}
|
|
16
|
+
}, control: _jsx(Checkbox, { ...checkboxProps, size: checkboxProps.size ?? 'small', inputRef: field.ref, checked: !!field.value, onBlur: field.onBlur, onChange: (_, checked) => {
|
|
17
|
+
field.onChange(checked);
|
|
18
|
+
}, sx: {
|
|
19
|
+
p: 0.25,
|
|
20
|
+
borderRadius: 1,
|
|
21
|
+
'& .MuiSvgIcon-root': {
|
|
22
|
+
fontSize: 18
|
|
23
|
+
},
|
|
24
|
+
'&:not(.Mui-checked) .MuiSvgIcon-root': {
|
|
25
|
+
color: 'transparent',
|
|
26
|
+
border: '1px solid',
|
|
27
|
+
borderColor: 'rgba(15, 23, 42, 0.35)',
|
|
28
|
+
borderRadius: '4px',
|
|
29
|
+
backgroundColor: 'background.paper'
|
|
30
|
+
},
|
|
31
|
+
'&:hover:not(.Mui-checked) .MuiSvgIcon-root': {
|
|
32
|
+
borderColor: 'rgba(15, 23, 42, 0.55)'
|
|
33
|
+
},
|
|
34
|
+
...(checkboxSx ?? {})
|
|
35
|
+
} }) }), _jsx(FormHelperText, { children: getJBFieldErrorMessage(fieldState.error) })] })) }));
|
|
36
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material';
|
|
2
|
+
import { DatePicker } from '@mui/x-date-pickers';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
5
|
+
import { JBFieldControlProps } from './types';
|
|
6
|
+
type MuiDatePickerProps = ComponentProps<typeof DatePicker>;
|
|
7
|
+
export type JBDatePickerFieldProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>> = JBFieldControlProps<TFieldValues, TName> & Omit<MuiDatePickerProps, 'value' | 'onChange' | 'slotProps'> & {
|
|
8
|
+
textFieldProps?: TextFieldProps;
|
|
9
|
+
storeAsDateString?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function JBDatePickerField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>(props: JBDatePickerFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=JBDatePickerField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBDatePickerField.d.ts","sourceRoot":"","sources":["../../src/forms/JBDatePickerField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAwB,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAc,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG9C,KAAK,kBAAkB,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAE5D,MAAM,MAAM,sBAAsB,CAChC,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,IAC9B,mBAAmB,CAAC,YAAY,EAAE,KAAK,CAAC,GAC1C,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC,GAAG;IAC7D,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAyCJ,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,EAChC,KAAK,EAAE,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAAC,2CAqDnD"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
3
|
+
import { DatePicker, LocalizationProvider } from '@mui/x-date-pickers';
|
|
4
|
+
import { Controller } from 'react-hook-form';
|
|
5
|
+
import { getJBFieldErrorMessage } from './utils';
|
|
6
|
+
const asDateValue = (value) => {
|
|
7
|
+
if (value instanceof Date && !Number.isNaN(value.getTime())) {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
if (typeof value !== 'string' || !value.trim()) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const isoDateOnlyMatch = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value.trim());
|
|
14
|
+
if (isoDateOnlyMatch) {
|
|
15
|
+
const year = Number(isoDateOnlyMatch[1]);
|
|
16
|
+
const month = Number(isoDateOnlyMatch[2]);
|
|
17
|
+
const day = Number(isoDateOnlyMatch[3]);
|
|
18
|
+
const localDate = new Date(year, month - 1, day);
|
|
19
|
+
if (!Number.isNaN(localDate.getTime())) {
|
|
20
|
+
return localDate;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const parsed = new Date(value);
|
|
24
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return parsed;
|
|
28
|
+
};
|
|
29
|
+
const formatDateValue = (value) => {
|
|
30
|
+
if (!(value instanceof Date) || Number.isNaN(value.getTime())) {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
const year = value.getFullYear();
|
|
34
|
+
const month = String(value.getMonth() + 1).padStart(2, '0');
|
|
35
|
+
const day = String(value.getDate()).padStart(2, '0');
|
|
36
|
+
return `${year}-${month}-${day}`;
|
|
37
|
+
};
|
|
38
|
+
export function JBDatePickerField(props) {
|
|
39
|
+
const { control, name, rules, textFieldProps, storeAsDateString = false, ...datePickerProps } = props;
|
|
40
|
+
const { size = 'medium', ...resolvedTextFieldProps } = textFieldProps ?? {};
|
|
41
|
+
const mergedTextFieldSx = Array.isArray(resolvedTextFieldProps.sx)
|
|
42
|
+
? [
|
|
43
|
+
{
|
|
44
|
+
'& .MuiOutlinedInput-root, & .MuiPickersOutlinedInput-root': {
|
|
45
|
+
backgroundColor: 'common.background'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
...resolvedTextFieldProps.sx
|
|
49
|
+
]
|
|
50
|
+
: [
|
|
51
|
+
{
|
|
52
|
+
'& .MuiOutlinedInput-root, & .MuiPickersOutlinedInput-root': {
|
|
53
|
+
backgroundColor: 'common.background'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
resolvedTextFieldProps.sx
|
|
57
|
+
];
|
|
58
|
+
return (_jsx(Controller, { control: control, name: name, rules: rules, render: ({ field, fieldState }) => (_jsx(LocalizationProvider, { dateAdapter: AdapterDateFns, children: _jsx(DatePicker, { ...datePickerProps, value: storeAsDateString ? asDateValue(field.value) : field.value ?? null, onChange: (value) => field.onChange(storeAsDateString ? formatDateValue(value) : value), slotProps: {
|
|
59
|
+
textField: {
|
|
60
|
+
...resolvedTextFieldProps,
|
|
61
|
+
size,
|
|
62
|
+
sx: mergedTextFieldSx,
|
|
63
|
+
error: !!fieldState.error,
|
|
64
|
+
helperText: getJBFieldErrorMessage(fieldState.error) ?? resolvedTextFieldProps.helperText
|
|
65
|
+
}
|
|
66
|
+
} }) })) }));
|
|
67
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormControlProps, RadioGroupProps } from '@mui/material';
|
|
2
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
+
import { JBFieldControlProps, SelectOption } from './types';
|
|
4
|
+
export type JBRadioGroupFieldProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>> = JBFieldControlProps<TFieldValues, TName> & Omit<RadioGroupProps, 'name' | 'value' | 'onChange'> & {
|
|
5
|
+
label?: string;
|
|
6
|
+
options: SelectOption[];
|
|
7
|
+
formControlProps?: Omit<FormControlProps, 'error'>;
|
|
8
|
+
};
|
|
9
|
+
export declare function JBRadioGroupField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>(props: JBRadioGroupFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=JBRadioGroupField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBRadioGroupField.d.ts","sourceRoot":"","sources":["../../src/forms/JBRadioGroupField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,gBAAgB,EAKhB,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5D,MAAM,MAAM,sBAAsB,CAChC,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,IAC9B,mBAAmB,CAAC,YAAY,EAAE,KAAK,CAAC,GAC1C,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,GAAG;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;CACpD,CAAC;AAEJ,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,EAChC,KAAK,EAAE,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAAC,2CAkCnD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FormControl, FormControlLabel, FormHelperText, FormLabel, Radio, RadioGroup } from '@mui/material';
|
|
3
|
+
import { Controller } from 'react-hook-form';
|
|
4
|
+
import { getJBFieldErrorMessage } from './utils';
|
|
5
|
+
export function JBRadioGroupField(props) {
|
|
6
|
+
const { control, name, rules, label, options, formControlProps, ...radioGroupProps } = props;
|
|
7
|
+
return (_jsx(Controller, { control: control, name: name, rules: rules, render: ({ field, fieldState }) => (_jsxs(FormControl, { ...formControlProps, error: !!fieldState.error, children: [label ? _jsx(FormLabel, { children: label }) : null, _jsx(RadioGroup, { ...radioGroupProps, name: field.name, value: field.value ?? '', onBlur: field.onBlur, onChange: (_, value) => field.onChange(value), children: options.map((option) => (_jsx(FormControlLabel, { value: option.value, disabled: option.disabled, control: _jsx(Radio, { inputRef: field.ref }), label: option.label }, `${option.value}`))) }), _jsx(FormHelperText, { children: getJBFieldErrorMessage(fieldState.error) })] })) }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material';
|
|
2
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
3
|
+
import { JBFieldControlProps, SelectOption } from './types';
|
|
4
|
+
export type JBSelectFieldProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>> = JBFieldControlProps<TFieldValues, TName> & Omit<TextFieldProps, 'name' | 'defaultValue' | 'value' | 'onChange' | 'error' | 'helperText' | 'select'> & {
|
|
5
|
+
options: SelectOption[];
|
|
6
|
+
emptyOptionLabel?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function JBSelectField<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>(props: JBSelectFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=JBSelectField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JBSelectField.d.ts","sourceRoot":"","sources":["../../src/forms/JBSelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,cAAc,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAc,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5D,MAAM,MAAM,kBAAkB,CAC5B,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,IAC9B,mBAAmB,CAAC,YAAY,EAAE,KAAK,CAAC,GAC1C,IAAI,CACF,cAAc,EACd,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,CACnF,GAAG;IACF,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEJ,wBAAgB,aAAa,CAC3B,YAAY,SAAS,WAAW,EAChC,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,EAChC,KAAK,EAAE,kBAAkB,CAAC,YAAY,EAAE,KAAK,CAAC,2CA8B/C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItem, TextField } from '@mui/material';
|
|
3
|
+
import { Controller } from 'react-hook-form';
|
|
4
|
+
import { getJBFieldErrorMessage } from './utils';
|
|
5
|
+
export function JBSelectField(props) {
|
|
6
|
+
const { control, name, rules, options, emptyOptionLabel, size = 'medium', ...textFieldProps } = props;
|
|
7
|
+
return (_jsx(Controller, { control: control, name: name, rules: rules, render: ({ field, fieldState }) => (_jsxs(TextField, { ...textFieldProps, ...field, size: size, select: true, value: field.value ?? '', error: !!fieldState.error, helperText: getJBFieldErrorMessage(fieldState.error), children: [emptyOptionLabel ? _jsx(MenuItem, { value: "", children: emptyOptionLabel }) : null, options.map((option, index) => (_jsx(MenuItem, { value: option.value, disabled: option.disabled, children: option.label }, `${option.value}-${index}`)))] })) }));
|
|
8
|
+
}
|