@paygreen/pgui 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +235 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ActionsButton/index.d.ts +2 -2
- package/dist/cjs/types/components/Card/index.d.ts +3 -0
- package/dist/cjs/types/components/ConfirmMenuItem/index.d.ts +13 -0
- package/dist/cjs/types/components/DataList/index.d.ts +5 -5
- package/dist/cjs/types/components/Pagination/index.d.ts +5 -5
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/layout/BottomBar/index.d.ts +3 -0
- package/dist/cjs/types/layout/LayoutContainer/index.d.ts +3 -0
- package/dist/cjs/types/layout/SideNav/index.d.ts +16 -0
- package/dist/cjs/types/layout/TopBar/index.d.ts +3 -3
- package/dist/cjs/types/layout/index.d.ts +3 -0
- package/dist/cjs/types/theme/components/drawer.d.ts +6 -0
- package/dist/cjs/types/theme/components/index.d.ts +1 -0
- package/dist/cjs/types/theme/foundations/index.d.ts +31 -0
- package/dist/cjs/types/theme/foundations/radius.d.ts +11 -0
- package/dist/cjs/types/theme/foundations/sizes.d.ts +21 -0
- package/dist/cjs/types/theme/rawStyle/chakraStyle.d.ts +2 -0
- package/dist/cjs/types/theme/{externals → rawStyle}/index.d.ts +1 -0
- package/dist/cjs/types/theme/{externals → rawStyle}/reactDayPicker.d.ts +0 -0
- package/dist/cjs/types/utils/index.d.ts +2 -0
- package/dist/cjs/types/utils/responsive.d.ts +1 -0
- package/dist/esm/index.js +224 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ActionsButton/index.d.ts +2 -2
- package/dist/esm/types/components/Card/index.d.ts +3 -0
- package/dist/esm/types/components/ConfirmMenuItem/index.d.ts +13 -0
- package/dist/esm/types/components/DataList/index.d.ts +5 -5
- package/dist/esm/types/components/Pagination/index.d.ts +5 -5
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/layout/BottomBar/index.d.ts +3 -0
- package/dist/esm/types/layout/LayoutContainer/index.d.ts +3 -0
- package/dist/esm/types/layout/SideNav/index.d.ts +16 -0
- package/dist/esm/types/layout/TopBar/index.d.ts +3 -3
- package/dist/esm/types/layout/index.d.ts +3 -0
- package/dist/esm/types/theme/components/drawer.d.ts +6 -0
- package/dist/esm/types/theme/components/index.d.ts +1 -0
- package/dist/esm/types/theme/foundations/index.d.ts +31 -0
- package/dist/esm/types/theme/foundations/radius.d.ts +11 -0
- package/dist/esm/types/theme/foundations/sizes.d.ts +21 -0
- package/dist/esm/types/theme/rawStyle/chakraStyle.d.ts +2 -0
- package/dist/esm/types/theme/{externals → rawStyle}/index.d.ts +1 -0
- package/dist/esm/types/theme/{externals → rawStyle}/reactDayPicker.d.ts +0 -0
- package/dist/esm/types/utils/index.d.ts +2 -0
- package/dist/esm/types/utils/responsive.d.ts +1 -0
- package/dist/index.d.ts +51 -15
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { IconButtonProps } from '@chakra-ui/react';
|
|
3
3
|
export declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
4
4
|
label: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const ActionsButton: FC<
|
|
6
|
+
export declare const ActionsButton: FC<PropsWithChildren<ActionsButtonProps>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HTMLChakraProps, MenuItemProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type StyledMenuItemProps = HTMLChakraProps<'button'>;
|
|
4
|
+
export declare const MenuItem: import("@chakra-ui/react").ComponentWithAs<"button", MenuItemProps>;
|
|
5
|
+
declare type ConfirmMenuItemProps = MenuItemProps & {
|
|
6
|
+
confirmDelay?: number;
|
|
7
|
+
confirmColorScheme?: string;
|
|
8
|
+
confirmContent?: React.ReactNode;
|
|
9
|
+
confirmText?: React.ReactNode;
|
|
10
|
+
confirmIcon?: React.FC<React.PropsWithChildren<unknown>>;
|
|
11
|
+
};
|
|
12
|
+
export declare const ConfirmMenuItem: import("@chakra-ui/react").ComponentWithAs<"button", ConfirmMenuItemProps>;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
1
|
+
import React, { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { AccordionProps, FlexProps } from '@chakra-ui/react';
|
|
3
3
|
declare type DataListColumns = Record<string, DataListCellProps>;
|
|
4
4
|
declare type DataListContextValue = {
|
|
@@ -30,13 +30,13 @@ export declare type DataListRowProps = FlexProps & {
|
|
|
30
30
|
isVisible?: boolean | boolean[] | Record<string, boolean>;
|
|
31
31
|
isDisabled?: boolean;
|
|
32
32
|
};
|
|
33
|
-
export declare const DataListRow: FC<
|
|
33
|
+
export declare const DataListRow: FC<PropsWithChildren<DataListRowProps>>;
|
|
34
34
|
export declare type DataListHeaderProps = DataListRowProps;
|
|
35
|
-
export declare const DataListHeader: FC<
|
|
35
|
+
export declare const DataListHeader: FC<PropsWithChildren<DataListHeaderProps>>;
|
|
36
36
|
export declare type DataListFooterProps = DataListRowProps;
|
|
37
|
-
export declare const DataListFooter: FC<
|
|
37
|
+
export declare const DataListFooter: FC<PropsWithChildren<DataListFooterProps>>;
|
|
38
38
|
export declare type DataListProps = AccordionProps & {
|
|
39
39
|
isHover?: boolean;
|
|
40
40
|
};
|
|
41
|
-
export declare const DataList: FC<
|
|
41
|
+
export declare const DataList: FC<PropsWithChildren<DataListProps>>;
|
|
42
42
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
1
|
+
import React, { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { IconButtonProps, StackProps } from '@chakra-ui/react';
|
|
3
3
|
export declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
|
|
4
4
|
page?: number | undefined;
|
|
@@ -26,10 +26,10 @@ export declare type PaginationContextValue<PageType = number> = {
|
|
|
26
26
|
lastItemOnPage: number;
|
|
27
27
|
};
|
|
28
28
|
export declare const PaginationContext: React.Context<PaginationContextValue<number>>;
|
|
29
|
-
export declare const PaginationButtonFirstPage: FC<
|
|
30
|
-
export declare const PaginationButtonPrevPage: FC<
|
|
31
|
-
export declare const PaginationButtonLastPage: FC<
|
|
32
|
-
export declare const PaginationButtonNextPage: FC<
|
|
29
|
+
export declare const PaginationButtonFirstPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
30
|
+
export declare const PaginationButtonPrevPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
31
|
+
export declare const PaginationButtonLastPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
32
|
+
export declare const PaginationButtonNextPage: FC<PropsWithChildren<Omit<IconButtonProps, 'aria-label'>>>;
|
|
33
33
|
export declare const PaginationInfo: ({ ...rest }: {
|
|
34
34
|
[x: string]: any;
|
|
35
35
|
}) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps, DrawerContentProps, FlexProps, StackProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type SideNavProps = {
|
|
4
|
+
isMobileMenuOpen: boolean;
|
|
5
|
+
onMobileMenuClose: () => void;
|
|
6
|
+
} & FlexProps & DrawerContentProps;
|
|
7
|
+
export declare type SideNavMenuItemProps = {
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
} & ButtonProps;
|
|
10
|
+
export declare const SideNav: ({ isMobileMenuOpen, onMobileMenuClose, children, ...props }: SideNavProps) => JSX.Element;
|
|
11
|
+
export declare const SideNavContainer: (props: StackProps) => JSX.Element;
|
|
12
|
+
export declare const SideNavHeader: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
13
|
+
export declare const SideNavBody: ({ children, ...rest }: StackProps) => JSX.Element;
|
|
14
|
+
export declare const SideNavFooter: ({ children, ...rest }: FlexProps) => JSX.Element;
|
|
15
|
+
export declare const SideNavMenu: ({ title, children, ...rest }: StackProps) => JSX.Element;
|
|
16
|
+
export declare const SideNavMenuItem: ({ isActive, children, ...rest }: SideNavMenuItemProps) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ export declare type TopBarBackActionProps = {
|
|
|
4
4
|
backAction?: () => void;
|
|
5
5
|
rightInformation?: ReactComponentElement<any>;
|
|
6
6
|
} & FlexProps;
|
|
7
|
-
export declare const TopBar: (
|
|
8
|
-
export declare const TopBarFirstElement: (
|
|
9
|
-
export declare const TopBarLastElement: (
|
|
7
|
+
export declare const TopBar: (props: StackProps) => JSX.Element;
|
|
8
|
+
export declare const TopBarFirstElement: (props: FlexProps) => JSX.Element;
|
|
9
|
+
export declare const TopBarLastElement: (props: StackProps) => JSX.Element;
|
|
10
10
|
export declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
declare const foundations: {
|
|
2
|
+
sizes: {
|
|
3
|
+
max: string;
|
|
4
|
+
min: string;
|
|
5
|
+
full: string;
|
|
6
|
+
'3xs': string;
|
|
7
|
+
'2xs': string;
|
|
8
|
+
xs: string;
|
|
9
|
+
nav: string;
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
'2xl': string;
|
|
15
|
+
'3xl': string;
|
|
16
|
+
'4xl': string;
|
|
17
|
+
'5xl': string;
|
|
18
|
+
'6xl': string;
|
|
19
|
+
'7xl': string;
|
|
20
|
+
'8xl': string;
|
|
21
|
+
};
|
|
2
22
|
shadows: {
|
|
3
23
|
xs: string;
|
|
4
24
|
sm: string;
|
|
@@ -9,6 +29,17 @@ declare const foundations: {
|
|
|
9
29
|
'2xl': string;
|
|
10
30
|
layout: string;
|
|
11
31
|
};
|
|
32
|
+
radii: {
|
|
33
|
+
none: string;
|
|
34
|
+
sm: string;
|
|
35
|
+
base: string;
|
|
36
|
+
md: string;
|
|
37
|
+
lg: string;
|
|
38
|
+
xl: string;
|
|
39
|
+
'2xl': string;
|
|
40
|
+
'3xl': string;
|
|
41
|
+
full: string;
|
|
42
|
+
};
|
|
12
43
|
fonts: {
|
|
13
44
|
heading: string;
|
|
14
45
|
body: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
max: string;
|
|
3
|
+
min: string;
|
|
4
|
+
full: string;
|
|
5
|
+
'3xs': string;
|
|
6
|
+
'2xs': string;
|
|
7
|
+
xs: string;
|
|
8
|
+
nav: string;
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
xl: string;
|
|
13
|
+
'2xl': string;
|
|
14
|
+
'3xl': string;
|
|
15
|
+
'4xl': string;
|
|
16
|
+
'5xl': string;
|
|
17
|
+
'6xl': string;
|
|
18
|
+
'7xl': string;
|
|
19
|
+
'8xl': string;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsMobile: (currentBreakpoint: string) => boolean;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, {
|
|
3
|
-
import { forwardRef, IconButton,
|
|
2
|
+
import React__default, { useState, useRef, useEffect, useContext, createContext, forwardRef as forwardRef$1, useLayoutEffect, createElement, Fragment, Component, useCallback, useMemo } from 'react';
|
|
3
|
+
import { forwardRef, IconButton, Flex, createStylesContext, chakra, useMultiStyleConfig, useMenuItem, MenuIcon, MenuCommand, useMenuState, Icon, Text, useBreakpointValue, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, Box, Accordion, FormControl, FormLabel, FormHelperText, FormErrorMessage, SlideFade, useDisclosure, Popover, PopoverTrigger, InputGroup, Input as Input$1, InputRightElement, PopoverContent, PopoverArrow, HStack, useControllableState, useMergeRefs, useTheme, useColorModeValue, useStyleConfig, useToken, useBreakpoint, Drawer, DrawerOverlay, DrawerContent, DrawerCloseButton, VStack, Button as Button$1, Stack, extendTheme } from '@chakra-ui/react';
|
|
4
4
|
|
|
5
5
|
/******************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
@@ -183,6 +183,98 @@ var ActionsButton = forwardRef(function (_a, ref) {
|
|
|
183
183
|
});
|
|
184
184
|
ActionsButton.displayName = 'ActionsButton';
|
|
185
185
|
|
|
186
|
+
var Card = function (props) { return (React__default.createElement(Flex, __assign$2({ p: 6, background: "white", boxShadow: "base", borderRadius: "base", flexDir: "column", h: "fit-content", w: "full" }, props))); };
|
|
187
|
+
|
|
188
|
+
var _a = createStylesContext('Menu'), StylesProvider = _a[0], useStyles = _a[1];
|
|
189
|
+
var StyledMenuItem = forwardRef(function (props, ref) {
|
|
190
|
+
var type = props.type, rest = __rest$2(props, ["type"]);
|
|
191
|
+
var styles = useStyles();
|
|
192
|
+
/**
|
|
193
|
+
* Given another component, use its type if present
|
|
194
|
+
* Else, use no type to avoid invalid html, e.g. <a type="button" />
|
|
195
|
+
* Else, fall back to "button"
|
|
196
|
+
*/
|
|
197
|
+
var btnType = rest.as ? type !== null && type !== void 0 ? type : undefined : 'button';
|
|
198
|
+
var buttonStyles = __assign$2({ textDecoration: 'none', color: 'inherit', userSelect: 'none', display: 'flex', width: '100%', alignItems: 'center', textAlign: 'left', flex: '0 0 auto', outline: 0 }, styles.item);
|
|
199
|
+
return (React__default.createElement(chakra.button, __assign$2({ ref: ref, type: btnType }, rest, { __css: buttonStyles })));
|
|
200
|
+
});
|
|
201
|
+
var MenuItem = forwardRef(function (props, ref) {
|
|
202
|
+
var icon = props.icon, _a = props.iconSpacing, iconSpacing = _a === void 0 ? '0.75rem' : _a, command = props.command, _b = props.commandSpacing, commandSpacing = _b === void 0 ? '0.75rem' : _b, children = props.children, rest = __rest$2(props, ["icon", "iconSpacing", "command", "commandSpacing", "children"]);
|
|
203
|
+
var styles = useMultiStyleConfig('Menu', props);
|
|
204
|
+
var menuItemProps = useMenuItem(rest, ref);
|
|
205
|
+
var shouldWrap = icon || command;
|
|
206
|
+
var childrenFormated = shouldWrap ? (React__default.createElement(chakra.span, { pointerEvents: "none", flex: "1" }, children)) : (children);
|
|
207
|
+
return (React__default.createElement(StylesProvider, { value: styles },
|
|
208
|
+
React__default.createElement(StyledMenuItem, __assign$2({}, menuItemProps, { onClick: function (e) {
|
|
209
|
+
var _a;
|
|
210
|
+
(_a = rest === null || rest === void 0 ? void 0 : rest.onClick) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
211
|
+
} }),
|
|
212
|
+
icon && (React__default.createElement(MenuIcon, { fontSize: "0.8em", marginEnd: iconSpacing }, icon)),
|
|
213
|
+
childrenFormated,
|
|
214
|
+
command && (React__default.createElement(MenuCommand, { marginStart: commandSpacing }, command)))));
|
|
215
|
+
});
|
|
216
|
+
var ConfirmMenuItem = forwardRef(function (_a, ref) {
|
|
217
|
+
var children = _a.children, _b = _a.confirmColorScheme, confirmColorScheme = _b === void 0 ? 'red' : _b, _c = _a.confirmContent, confirmContent = _c === void 0 ? '' : _c, _d = _a.confirmIcon, confirmIcon = _d === void 0 ? FiAlertCircle : _d, confirmText = _a.confirmText, _e = _a.confirmDelay, confirmDelay = _e === void 0 ? 2000 : _e, icon = _a.icon, onClick = _a.onClick, rest = __rest$2(_a, ["children", "confirmColorScheme", "confirmContent", "confirmIcon", "confirmText", "confirmDelay", "icon", "onClick"]);
|
|
218
|
+
var _f = useState(false), isConfirmActive = _f[0], setIsConfirmActive = _f[1];
|
|
219
|
+
var timeoutRef = useRef();
|
|
220
|
+
var onCloseMenu = useMenuState().onClose;
|
|
221
|
+
var handleClickConfirm = function (event) {
|
|
222
|
+
if (isConfirmActive) {
|
|
223
|
+
if (timeoutRef.current) {
|
|
224
|
+
clearTimeout(timeoutRef.current);
|
|
225
|
+
}
|
|
226
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
227
|
+
onCloseMenu();
|
|
228
|
+
setIsConfirmActive(false);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
setIsConfirmActive(true);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
useEffect(function () {
|
|
235
|
+
if (isConfirmActive) {
|
|
236
|
+
timeoutRef.current = setTimeout(function () {
|
|
237
|
+
setIsConfirmActive(false);
|
|
238
|
+
}, confirmDelay);
|
|
239
|
+
}
|
|
240
|
+
return function () {
|
|
241
|
+
if (timeoutRef.current)
|
|
242
|
+
clearTimeout(timeoutRef.current);
|
|
243
|
+
};
|
|
244
|
+
}, [isConfirmActive, confirmDelay]);
|
|
245
|
+
var confirmActiveProps = isConfirmActive
|
|
246
|
+
? {
|
|
247
|
+
bg: "".concat(confirmColorScheme, ".100"),
|
|
248
|
+
color: 'transparent',
|
|
249
|
+
transition: '0.2s',
|
|
250
|
+
_dark: {
|
|
251
|
+
bg: "".concat(confirmColorScheme, ".800")
|
|
252
|
+
},
|
|
253
|
+
_hover: {
|
|
254
|
+
bg: "".concat(confirmColorScheme, ".50"),
|
|
255
|
+
_dark: {
|
|
256
|
+
bg: "".concat(confirmColorScheme, ".900")
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
_focusVisible: {
|
|
260
|
+
bg: "".concat(confirmColorScheme, ".50"),
|
|
261
|
+
_dark: {
|
|
262
|
+
bg: "".concat(confirmColorScheme, ".900")
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
icon: icon
|
|
266
|
+
? React__default.cloneElement(icon, { color: 'transparent' })
|
|
267
|
+
: icon
|
|
268
|
+
}
|
|
269
|
+
: {};
|
|
270
|
+
return (React__default.createElement(MenuItem, __assign$2({ position: "relative", onClick: handleClickConfirm, ref: ref, icon: icon }, rest, confirmActiveProps),
|
|
271
|
+
React__default.createElement(Flex, { as: "span", alignItems: "center", opacity: isConfirmActive ? 0 : undefined }, children),
|
|
272
|
+
isConfirmActive && (React__default.createElement(Flex, { position: "absolute", top: 0, insetStart: 0, insetEnd: 0, bottom: 0, px: 3, as: "span", fontSize: "sm", alignItems: "center", color: "".concat(confirmColorScheme, ".500"), _dark: { color: 'white' } }, confirmContent ? (confirmContent) : (React__default.createElement(React__default.Fragment, null,
|
|
273
|
+
React__default.createElement(Icon, { as: confirmIcon, me: 1 }),
|
|
274
|
+
' ',
|
|
275
|
+
React__default.createElement(Text, { noOfLines: 1, as: "span" }, confirmText !== null && confirmText !== void 0 ? confirmText : 'Êtes-vous sûr ?')))))));
|
|
276
|
+
});
|
|
277
|
+
|
|
186
278
|
var DataListContext = React__default.createContext({
|
|
187
279
|
setColumns: function () { },
|
|
188
280
|
columns: {},
|
|
@@ -256,7 +348,7 @@ var DataListRow = function (_a) {
|
|
|
256
348
|
var DataListHeader = function (_a) {
|
|
257
349
|
var rest = __rest$2(_a, []);
|
|
258
350
|
return (React__default.createElement(DataListHeaderContext.Provider, { value: true },
|
|
259
|
-
React__default.createElement(DataListRow, __assign$2({ fontSize: "sm", fontWeight: "bold", border: "none", _hover: {}, bg: "
|
|
351
|
+
React__default.createElement(DataListRow, __assign$2({ fontSize: "sm", fontWeight: "bold", border: "none", _hover: {}, bg: "background", color: "gray.700" }, rest))));
|
|
260
352
|
};
|
|
261
353
|
var DataListFooter = function (_a) {
|
|
262
354
|
var rest = __rest$2(_a, []);
|
|
@@ -275,7 +367,7 @@ var DataList = function (_a) {
|
|
|
275
367
|
columns: columns,
|
|
276
368
|
isHover: isHover
|
|
277
369
|
} },
|
|
278
|
-
React__default.createElement(Accordion, __assign$2({ display: "flex", flexDirection: "column", position: "relative", boxShadow: "md", borderRadius: "
|
|
370
|
+
React__default.createElement(Accordion, __assign$2({ display: "flex", flexDirection: "column", position: "relative", boxShadow: "md", borderRadius: "base", overflowX: "auto", overflowY: "hidden", minH: "10rem", allowMultiple: allowMultiple && !allowToggle, allowToggle: allowToggle, bg: "white", _dark: {
|
|
279
371
|
bg: 'blackAlpha.400'
|
|
280
372
|
} }, rest))));
|
|
281
373
|
};
|
|
@@ -47392,23 +47484,77 @@ var SelectInner = function (_a, ref) {
|
|
|
47392
47484
|
};
|
|
47393
47485
|
var Select = React__default.forwardRef(SelectInner);
|
|
47394
47486
|
|
|
47395
|
-
var
|
|
47396
|
-
|
|
47397
|
-
|
|
47487
|
+
var LayoutContainer = function (props) { return (React__default.createElement(Flex, __assign$2({ w: "full", px: { base: 4, sm: 12, md: 40, lg: 60, xl: 96 } }, props))); };
|
|
47488
|
+
|
|
47489
|
+
var BottomBar = function (props) { return (React__default.createElement(LayoutContainer, __assign$2({ minH: "4.125rem", bg: "white", boxShadow: "layout", justifyContent: "space-between", alignItems: "center" }, props))); };
|
|
47490
|
+
|
|
47491
|
+
var useIsMobile = function (currentBreakpoint) {
|
|
47492
|
+
return (currentBreakpoint === 'base' ||
|
|
47493
|
+
currentBreakpoint === 'sm' ||
|
|
47494
|
+
currentBreakpoint === 'md' ||
|
|
47495
|
+
currentBreakpoint === 'lg');
|
|
47398
47496
|
};
|
|
47399
|
-
|
|
47400
|
-
|
|
47401
|
-
|
|
47497
|
+
|
|
47498
|
+
var SideNav = function (_a) {
|
|
47499
|
+
var isMobileMenuOpen = _a.isMobileMenuOpen, onMobileMenuClose = _a.onMobileMenuClose, children = _a.children, props = __rest$2(_a, ["isMobileMenuOpen", "onMobileMenuClose", "children"]);
|
|
47500
|
+
var theme = useTheme();
|
|
47501
|
+
var currentBreakpoint = useBreakpoint();
|
|
47502
|
+
var isMobile = useIsMobile(currentBreakpoint);
|
|
47503
|
+
var customScrollBar = {
|
|
47504
|
+
'&::-webkit-scrollbar': {
|
|
47505
|
+
width: '0.7rem',
|
|
47506
|
+
borderRadius: '9999px',
|
|
47507
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)"
|
|
47508
|
+
},
|
|
47509
|
+
'&::-webkit-scrollbar-thumb': {
|
|
47510
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
47511
|
+
borderRadius: '9999px'
|
|
47512
|
+
}
|
|
47513
|
+
};
|
|
47514
|
+
if (isMobile) {
|
|
47515
|
+
return (React__default.createElement(Drawer, { isOpen: isMobileMenuOpen, placement: "left", onClose: onMobileMenuClose, size: "nav" },
|
|
47516
|
+
React__default.createElement(DrawerOverlay, null),
|
|
47517
|
+
React__default.createElement(DrawerContent, __assign$2({ bgGradient: theme.colors.gradients.primary, color: "white", pt: 6, px: 6, overflow: "auto", sx: customScrollBar }, props),
|
|
47518
|
+
React__default.createElement(DrawerCloseButton, null),
|
|
47519
|
+
children)));
|
|
47520
|
+
}
|
|
47521
|
+
return (React__default.createElement(Flex, __assign$2({ w: "22.5rem", h: "100vh", flexDir: "column", bgGradient: theme.colors.gradients.primary, color: "white", pt: 6, px: 6, overflow: "auto", position: "fixed", top: "0", left: "0", sx: customScrollBar }, props), children));
|
|
47522
|
+
};
|
|
47523
|
+
var SideNavContainer = function (props) { return (React__default.createElement(VStack, __assign$2({ spacing: 6, alignItems: "inherit", minH: "100%" }, props))); };
|
|
47524
|
+
var SideNavHeader = function (_a) {
|
|
47525
|
+
var children = _a.children, rest = __rest$2(_a, ["children"]);
|
|
47526
|
+
return (React__default.createElement(Flex, __assign$2({ h: "3.2rem", alignItems: "center" }, rest), children));
|
|
47527
|
+
};
|
|
47528
|
+
var SideNavBody = function (_a) {
|
|
47529
|
+
var children = _a.children, rest = __rest$2(_a, ["children"]);
|
|
47530
|
+
return (React__default.createElement(VStack, __assign$2({ pt: 4, spacing: 5, alignItems: "inherit" }, rest), children));
|
|
47402
47531
|
};
|
|
47403
|
-
var
|
|
47404
|
-
var
|
|
47405
|
-
return (React__default.createElement(
|
|
47532
|
+
var SideNavFooter = function (_a) {
|
|
47533
|
+
var children = _a.children, rest = __rest$2(_a, ["children"]);
|
|
47534
|
+
return (React__default.createElement(Flex, __assign$2({ flex: "1", alignItems: "flex-end", pb: 4 }, rest), children));
|
|
47406
47535
|
};
|
|
47536
|
+
var SideNavMenu = function (_a) {
|
|
47537
|
+
var title = _a.title, children = _a.children, rest = __rest$2(_a, ["title", "children"]);
|
|
47538
|
+
return (React__default.createElement(VStack, __assign$2({ spacing: 1, alignItems: "inherit", h: "full", w: "full" }, rest),
|
|
47539
|
+
React__default.createElement(Text, { fontSize: "sm", fontWeight: "bold", color: "white", textTransform: "uppercase" }, title),
|
|
47540
|
+
children));
|
|
47541
|
+
};
|
|
47542
|
+
var SideNavMenuItem = function (_a) {
|
|
47543
|
+
var isActive = _a.isActive, children = _a.children, rest = __rest$2(_a, ["isActive", "children"]);
|
|
47544
|
+
if (isActive) {
|
|
47545
|
+
return (React__default.createElement(Button$1, __assign$2({ w: "full", justifyContent: "flex-start", background: "white", color: "brand.600" }, rest), children));
|
|
47546
|
+
}
|
|
47547
|
+
return (React__default.createElement(Button$1, __assign$2({ w: "full", justifyContent: "flex-start", background: "transparent", color: "brand.50", _hover: { background: 'whiteAlpha.200' }, _focus: { background: 'whiteAlpha.200' }, _active: { background: 'whiteAlpha.200' } }, rest), children));
|
|
47548
|
+
};
|
|
47549
|
+
|
|
47550
|
+
var TopBar = function (props) { return (React__default.createElement(Stack, __assign$2({ minH: "4.6875rem", bg: "white", boxShadow: "layout", w: "full", borderRadius: "0 0 1.25rem 1.25rem", justifyContent: "space-between", spacing: 2, alignItems: { base: 'inherit', xl: 'center' }, direction: { base: 'column', xl: 'row' }, py: { base: 4, xl: 0 } }, props))); };
|
|
47551
|
+
var TopBarFirstElement = function (props) { return (React__default.createElement(Flex, __assign$2({ px: 6, flexDir: "column" }, props))); };
|
|
47552
|
+
var TopBarLastElement = function (props) { return (React__default.createElement(HStack, __assign$2({ px: 6, spacing: 4, justifyContent: "flex-end" }, props))); };
|
|
47407
47553
|
var TopBarBackAction = function (_a) {
|
|
47408
47554
|
var _b = _a.backAction, backAction = _b === void 0 ? function () { } : _b, title = _a.title, rightInformation = _a.rightInformation, rest = __rest$2(_a, ["backAction", "title", "rightInformation"]);
|
|
47409
|
-
return (React__default.createElement(
|
|
47555
|
+
return (React__default.createElement(LayoutContainer, __assign$2({ w: "full", justifyContent: "space-between", alignItems: "center" }, rest),
|
|
47410
47556
|
React__default.createElement(IconButton, { "aria-label": "back", icon: React__default.createElement(Icon, { as: MdArrowBack }), onClick: backAction, variant: "@whiteNeutral" }),
|
|
47411
|
-
React__default.createElement(Text, { fontSize: { base: 'md', md: 'lg', lg: 'xl' }, color: "brand.700", fontWeight: "bold", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis",
|
|
47557
|
+
React__default.createElement(Text, { fontSize: { base: 'md', md: 'lg', lg: 'xl' }, color: "brand.700", fontWeight: "bold", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", w: "full", px: 2 }, title),
|
|
47412
47558
|
rightInformation));
|
|
47413
47559
|
};
|
|
47414
47560
|
|
|
@@ -50913,6 +51059,23 @@ var button = {
|
|
|
50913
51059
|
}
|
|
50914
51060
|
};
|
|
50915
51061
|
|
|
51062
|
+
var getSize = function (value) {
|
|
51063
|
+
if (value === 'full') {
|
|
51064
|
+
return {
|
|
51065
|
+
dialog: { maxW: '100vw', h: '100vh' }
|
|
51066
|
+
};
|
|
51067
|
+
}
|
|
51068
|
+
return {
|
|
51069
|
+
dialog: { maxW: value }
|
|
51070
|
+
};
|
|
51071
|
+
};
|
|
51072
|
+
var sizes$1 = {
|
|
51073
|
+
nav: getSize('nav')
|
|
51074
|
+
};
|
|
51075
|
+
var drawer = {
|
|
51076
|
+
sizes: sizes$1
|
|
51077
|
+
};
|
|
51078
|
+
|
|
50916
51079
|
var input = {
|
|
50917
51080
|
baseStyle: {
|
|
50918
51081
|
field: {
|
|
@@ -50976,6 +51139,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
50976
51139
|
__proto__: null,
|
|
50977
51140
|
Badge: badge,
|
|
50978
51141
|
Button: button,
|
|
51142
|
+
Drawer: drawer,
|
|
50979
51143
|
Input: input,
|
|
50980
51144
|
Tag: tag
|
|
50981
51145
|
});
|
|
@@ -51047,6 +51211,18 @@ var colors = {
|
|
|
51047
51211
|
background: '#F8FDFF'
|
|
51048
51212
|
};
|
|
51049
51213
|
|
|
51214
|
+
var radii = {
|
|
51215
|
+
none: '0',
|
|
51216
|
+
sm: '1.125rem',
|
|
51217
|
+
base: '1.25rem',
|
|
51218
|
+
md: '1.375rem',
|
|
51219
|
+
lg: '1.5rem',
|
|
51220
|
+
xl: '1.75rem',
|
|
51221
|
+
'2xl': '2rem',
|
|
51222
|
+
'3xl': '2.5rem',
|
|
51223
|
+
full: '9999px'
|
|
51224
|
+
};
|
|
51225
|
+
|
|
51050
51226
|
var shadows = {
|
|
51051
51227
|
xs: '0px 0px 0px 1px #0F54671A',
|
|
51052
51228
|
sm: '0px 1px 2px 0px #0F54671A',
|
|
@@ -51058,6 +51234,28 @@ var shadows = {
|
|
|
51058
51234
|
layout: '0px 12px 42px 0px #0F54670D'
|
|
51059
51235
|
};
|
|
51060
51236
|
|
|
51237
|
+
var largeSizes = {
|
|
51238
|
+
max: 'max-content',
|
|
51239
|
+
min: 'min-content',
|
|
51240
|
+
full: '100%',
|
|
51241
|
+
'3xs': '14rem',
|
|
51242
|
+
'2xs': '16rem',
|
|
51243
|
+
xs: '20rem',
|
|
51244
|
+
nav: '22.5rem',
|
|
51245
|
+
sm: '24rem',
|
|
51246
|
+
md: '28rem',
|
|
51247
|
+
lg: '32rem',
|
|
51248
|
+
xl: '36rem',
|
|
51249
|
+
'2xl': '42rem',
|
|
51250
|
+
'3xl': '48rem',
|
|
51251
|
+
'4xl': '56rem',
|
|
51252
|
+
'5xl': '64rem',
|
|
51253
|
+
'6xl': '72rem',
|
|
51254
|
+
'7xl': '80rem',
|
|
51255
|
+
'8xl': '90rem'
|
|
51256
|
+
};
|
|
51257
|
+
var sizes = __assign$2({}, largeSizes);
|
|
51258
|
+
|
|
51061
51259
|
var typography = {
|
|
51062
51260
|
fonts: {
|
|
51063
51261
|
heading: "'Work Sans', sans-serif",
|
|
@@ -51069,7 +51267,13 @@ var typography = {
|
|
|
51069
51267
|
}
|
|
51070
51268
|
};
|
|
51071
51269
|
|
|
51072
|
-
var foundations = __assign$2(__assign$2({ colors: colors }, typography), { shadows: shadows });
|
|
51270
|
+
var foundations = __assign$2(__assign$2({ colors: colors }, typography), { sizes: sizes, shadows: shadows, radii: radii });
|
|
51271
|
+
|
|
51272
|
+
var chakraStyle = function () { return ({
|
|
51273
|
+
'div[data-popper-placement]': {
|
|
51274
|
+
'min-width': 'auto !important'
|
|
51275
|
+
}
|
|
51276
|
+
}); };
|
|
51073
51277
|
|
|
51074
51278
|
var reactDayPicker = function (props) { return ({
|
|
51075
51279
|
':root': {
|
|
@@ -51115,13 +51319,14 @@ var reactDayPicker = function (props) { return ({
|
|
|
51115
51319
|
}
|
|
51116
51320
|
}); };
|
|
51117
51321
|
|
|
51118
|
-
var
|
|
51322
|
+
var rawStyle = /*#__PURE__*/Object.freeze({
|
|
51119
51323
|
__proto__: null,
|
|
51324
|
+
chakraStyle: chakraStyle,
|
|
51120
51325
|
reactDayPicker: reactDayPicker
|
|
51121
51326
|
});
|
|
51122
51327
|
|
|
51123
51328
|
var externalsStyles = function (props) {
|
|
51124
|
-
return Object.values(
|
|
51329
|
+
return Object.values(rawStyle).reduce(function (acc, cur) { return (__assign$2(__assign$2({}, acc), (typeof cur === 'function' ? cur(props) : cur))); }, {});
|
|
51125
51330
|
};
|
|
51126
51331
|
var styles = {
|
|
51127
51332
|
global: function (props) { return (__assign$2({ '#chakra-toast-portal > *': {
|
|
@@ -51134,5 +51339,5 @@ var styles = {
|
|
|
51134
51339
|
|
|
51135
51340
|
var theme = extendTheme(__assign$2(__assign$2({ styles: styles }, foundations), { components: __assign$2({}, components) }));
|
|
51136
51341
|
|
|
51137
|
-
export { ActionsButton, DataList, DataListAccordion, DataListAccordionButton, DataListAccordionIcon, DataListAccordionPanel, DataListCell, DataListContext, DataListFooter, DataListHeader, DataListHeaderContext, DataListRow, DayPicker, FormGroup, InputDayPicker, Pagination, PaginationButtonFirstPage, PaginationButtonLastPage, PaginationButtonNextPage, PaginationButtonPrevPage, PaginationContext, PaginationInfo, SearchInput, Select, TopBar, TopBarBackAction, TopBarFirstElement, TopBarLastElement, getPaginationInfo, theme };
|
|
51342
|
+
export { ActionsButton, BottomBar, Card, ConfirmMenuItem, DataList, DataListAccordion, DataListAccordionButton, DataListAccordionIcon, DataListAccordionPanel, DataListCell, DataListContext, DataListFooter, DataListHeader, DataListHeaderContext, DataListRow, DayPicker, FormGroup, InputDayPicker, LayoutContainer, MenuItem, Pagination, PaginationButtonFirstPage, PaginationButtonLastPage, PaginationButtonNextPage, PaginationButtonPrevPage, PaginationContext, PaginationInfo, SearchInput, Select, SideNav, SideNavBody, SideNavContainer, SideNavFooter, SideNavHeader, SideNavMenu, SideNavMenuItem, TopBar, TopBarBackAction, TopBarFirstElement, TopBarLastElement, dateFormat, getPaginationInfo, theme, useIsMobile };
|
|
51138
51343
|
//# sourceMappingURL=index.js.map
|