@dynamic-framework/ui-react 1.1.4 → 1.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/css/dynamic-ui-all.css +1 -0
- package/dist/css/dynamic-ui-react.css +1 -1
- package/dist/css/dynamic-ui.css +1 -0
- package/dist/index.esm.js +107 -26
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +117 -26
- package/dist/index.js.map +1 -1
- package/dist/types/components/MBoxFile.d.ts +1 -1
- package/dist/types/components/MCalendar.d.ts +1 -1
- package/dist/types/components/MCarousel.d.ts +7 -0
- package/dist/types/components/MCarouselSlide.d.ts +5 -0
- package/dist/types/components/MCollapse.d.ts +1 -1
- package/dist/types/components/MCurrencyText.d.ts +1 -2
- package/dist/types/components/MFormikInput.d.ts +1 -1
- package/dist/types/components/MFormikInputCurrency.d.ts +7 -0
- package/dist/types/components/MFormikInputSelect.d.ts +1 -1
- package/dist/types/components/MInputCurrency.d.ts +3 -1
- package/dist/types/components/MList.d.ts +10 -0
- package/dist/types/components/MListItem.d.ts +10 -0
- package/dist/types/components/MListItemMovement.d.ts +10 -0
- package/dist/types/components/MPaginator.d.ts +12 -0
- package/dist/types/components/MPopover.d.ts +1 -1
- package/dist/types/components/MSkeleton.d.ts +1 -1
- package/dist/types/components/MStepper.d.ts +12 -0
- package/dist/types/components/MTabContent.d.ts +1 -1
- package/dist/types/components/MTabs.d.ts +1 -1
- package/dist/types/components/MToastContainer.d.ts +1 -1
- package/dist/types/components/MTooltip.d.ts +1 -1
- package/dist/types/components/banking/MCollapseIconText.d.ts +1 -1
- package/dist/types/components/banking/MPermissionGroup.d.ts +1 -2
- package/dist/types/components/banking/MPermissionItem.d.ts +1 -2
- package/dist/types/components/banking/MSummaryCard.d.ts +1 -1
- package/dist/types/components/index.d.ts +7 -0
- package/dist/types/contexts/LiquidContext.d.ts +1 -1
- package/dist/types/contexts/ModalContext.d.ts +1 -1
- package/dist/types/contexts/OffcanvasContext.d.ts +1 -1
- package/dist/types/stories/components/MCarousel.stories.d.ts +9 -0
- package/dist/types/stories/components/MFormikInputCurrency.stories.d.ts +8 -0
- package/dist/types/stories/components/MList.stories.d.ts +10 -0
- package/dist/types/stories/components/MListItem.stories.d.ts +9 -0
- package/dist/types/stories/components/MListItemMovement.stories.d.ts +7 -0
- package/dist/types/stories/components/MPaginator.stories.d.ts +10 -0
- package/dist/types/stories/components/MStepper.stories.d.ts +7 -0
- package/dist/types/stories/hooks/useFormatCurrency.stories.d.ts +1 -2
- package/dist/types/stories/hooks/useModalContext.stories.d.ts +1 -2
- package/dist/types/stories/hooks/useOffcanvasContext.stories.d.ts +1 -2
- package/dist/types/stories/hooks/useToast.stories.d.ts +1 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +16 -13
- package/src/style/components/_+import.scss +3 -0
- package/src/style/components/_m-carousel.scss +44 -0
- package/src/style/components/_m-paginator.scss +98 -0
- package/src/style/components/_m-stepper.scss +156 -0
- package/src/style/dynamic-ui-all.scss +3 -0
- package/src/style/dynamic-ui.scss +1 -0
- /package/dist/types/stories/{patterns → components}/MBadge.stories.d.ts +0 -0
- /package/dist/types/stories/{patterns → components}/MChip.stories.d.ts +0 -0
- /package/src/style/{main.scss → dynamic-ui-react.scss} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
declare type Props = PropsWithChildren<{
|
|
3
|
+
className?: string;
|
|
4
|
+
isFlush?: boolean;
|
|
5
|
+
isNumbered?: boolean;
|
|
6
|
+
isHorizontal?: boolean;
|
|
7
|
+
horizontalBreakpoint?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
8
|
+
}>;
|
|
9
|
+
export default function MList({ children, className, isFlush, isNumbered, isHorizontal, horizontalBreakpoint, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
declare type Props = PropsWithChildren<{
|
|
3
|
+
className?: string;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
theme?: string;
|
|
7
|
+
onMClick?: () => void;
|
|
8
|
+
}>;
|
|
9
|
+
export default function MListItem({ children, className, isActive, isDisabled, theme, onMClick, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import MListItem from './MListItem';
|
|
3
|
+
declare type Props = Omit<ComponentProps<typeof MListItem>, 'children'> & {
|
|
4
|
+
description: string;
|
|
5
|
+
date: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
classNameMovement?: string;
|
|
8
|
+
};
|
|
9
|
+
export default function MListItemMovement({ description, date, amount, classNameMovement, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResponsivePaginationProps } from 'react-responsive-pagination';
|
|
2
|
+
export declare type MPaginatorProps = {
|
|
3
|
+
className?: ResponsivePaginationProps['extraClassName'];
|
|
4
|
+
current: ResponsivePaginationProps['current'];
|
|
5
|
+
onPageChange: ResponsivePaginationProps['onPageChange'];
|
|
6
|
+
total: ResponsivePaginationProps['total'];
|
|
7
|
+
previousLabel?: ResponsivePaginationProps['previousLabel'];
|
|
8
|
+
nextLabel?: ResponsivePaginationProps['nextLabel'];
|
|
9
|
+
showArrows?: ResponsivePaginationProps['renderNav'];
|
|
10
|
+
maxWidth?: ResponsivePaginationProps['maxWidth'];
|
|
11
|
+
};
|
|
12
|
+
export default function MPaginator({ className, nextLabel, previousLabel, showArrows, ...props }: MPaginatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,5 +4,5 @@ declare type Props = PropsWithChildren<{
|
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
setIsOpen?: (isOpen: boolean) => void;
|
|
6
6
|
}>;
|
|
7
|
-
export default function MPopover({ children, renderComponent, isOpen, setIsOpen, }: Props): JSX.Element;
|
|
7
|
+
export default function MPopover({ children, renderComponent, isOpen, setIsOpen, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -5,4 +5,4 @@ export declare type Props = PropsWithChildren<{
|
|
|
5
5
|
backgroundColor?: string;
|
|
6
6
|
foregroundColor?: string;
|
|
7
7
|
}>;
|
|
8
|
-
export default function MSkeleton({ speed, viewBox, backgroundColor, foregroundColor, children, }: Props): JSX.Element;
|
|
8
|
+
export default function MSkeleton({ speed, viewBox, backgroundColor, foregroundColor, children, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare type Step = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: number;
|
|
4
|
+
};
|
|
5
|
+
declare type Props = {
|
|
6
|
+
options: Array<Step>;
|
|
7
|
+
currentStep: number;
|
|
8
|
+
successIcon?: string;
|
|
9
|
+
isVertical?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export default function MStepper({ options, currentStep, successIcon, isVertical, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -2,5 +2,5 @@ import type { PropsWithChildren } from 'react';
|
|
|
2
2
|
declare type Props = PropsWithChildren<{
|
|
3
3
|
tab: string;
|
|
4
4
|
}>;
|
|
5
|
-
export default function MTabContent({ tab, children }: Props): JSX.Element | null;
|
|
5
|
+
export default function MTabContent({ tab, children }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
export {};
|
|
@@ -14,6 +14,6 @@ declare type Props = PropsWithChildren<{
|
|
|
14
14
|
declare type TabContextState = {
|
|
15
15
|
isSelected: (tab: TabOption['tab']) => boolean;
|
|
16
16
|
};
|
|
17
|
-
export default function MTabs({ children, defaultSelected, onChange, options, className, isVertical, }: Props): JSX.Element;
|
|
17
|
+
export default function MTabs({ children, defaultSelected, onChange, options, className, isVertical, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export declare function useTabContext(): TabContextState;
|
|
19
19
|
export {};
|
|
@@ -8,5 +8,5 @@ declare type Props = {
|
|
|
8
8
|
};
|
|
9
9
|
position?: ToastPosition;
|
|
10
10
|
};
|
|
11
|
-
export default function MToastContainer({ style, position, }: Props): JSX.Element;
|
|
11
|
+
export default function MToastContainer({ style, position, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -14,4 +14,4 @@ export declare type MTooltipProps = PropsWithChildren<{
|
|
|
14
14
|
placement?: Placement;
|
|
15
15
|
Component: ReactNode;
|
|
16
16
|
}>;
|
|
17
|
-
export default function MTooltip({ classNameContainer, className, offSet, padding, withFocus, withClick, withHover, isOpen, placement, size, Component, children, }: MTooltipProps): JSX.Element;
|
|
17
|
+
export default function MTooltip({ classNameContainer, className, offSet, padding, withFocus, withClick, withHover, isOpen, placement, size, Component, children, }: MTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,5 +19,5 @@ declare type Props = PropsWithChildren<{
|
|
|
19
19
|
iconFamilyClass?: string;
|
|
20
20
|
iconFamilyPrefix?: string;
|
|
21
21
|
}>;
|
|
22
|
-
export default function MCollapseIconText({ children, icon, iconSize, iconTheme, title, iconFamilyClass, iconFamilyPrefix, }: Props): JSX.Element;
|
|
22
|
+
export default function MCollapseIconText({ children, icon, iconSize, iconTheme, title, iconFamilyClass, iconFamilyPrefix, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PermissionItemType } from './interface';
|
|
3
2
|
declare type Props = {
|
|
4
3
|
title: string;
|
|
@@ -8,5 +7,5 @@ declare type Props = {
|
|
|
8
7
|
onChangePermission: (permission: PermissionItemType, isChecked: boolean) => void;
|
|
9
8
|
onCustomAction?: (permission: PermissionItemType) => void;
|
|
10
9
|
};
|
|
11
|
-
export default function MPermissionGroup({ title, description, permissionState, permissionList, onChangePermission, onCustomAction, }: Props): JSX.Element;
|
|
10
|
+
export default function MPermissionGroup({ title, description, permissionState, permissionList, onChangePermission, onCustomAction, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PermissionItemType } from './interface';
|
|
3
2
|
declare type Props = {
|
|
4
3
|
permission: PermissionItemType;
|
|
@@ -6,5 +5,5 @@ declare type Props = {
|
|
|
6
5
|
onChange: (isChecked: boolean) => void;
|
|
7
6
|
onAction?: () => void;
|
|
8
7
|
};
|
|
9
|
-
export default function MPermissionItem({ permission, permissionState, onChange, onAction, }: Props): JSX.Element;
|
|
8
|
+
export default function MPermissionItem({ permission, permissionState, onChange, onAction, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -8,5 +8,5 @@ declare type Props = {
|
|
|
8
8
|
iconTheme: string;
|
|
9
9
|
Summary: ReactElement<typeof Trans> | string;
|
|
10
10
|
};
|
|
11
|
-
export default function MSummaryCard({ title, description, icon, iconSize, iconTheme, Summary, }: Props): JSX.Element;
|
|
11
|
+
export default function MSummaryCard({ title, description, icon, iconSize, iconTheme, Summary, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -13,4 +13,11 @@ export { default as MTooltip } from './MTooltip';
|
|
|
13
13
|
export { default as MCollapse } from './MCollapse';
|
|
14
14
|
export { default as MInputCurrency } from './MInputCurrency';
|
|
15
15
|
export { default as MBoxFile } from './MBoxFile';
|
|
16
|
+
export { default as MCarousel } from './MCarousel';
|
|
17
|
+
export { default as MCarouselSlide } from './MCarouselSlide';
|
|
18
|
+
export { default as MList } from './MList';
|
|
19
|
+
export { default as MListItem } from './MListItem';
|
|
20
|
+
export { default as MListItemMovement } from './MListItemMovement';
|
|
21
|
+
export { default as MStepper } from './MStepper';
|
|
22
|
+
export { default as MFormikInputCurrency } from './MFormikInputCurrency';
|
|
16
23
|
export type { TabOption } from './MTabs';
|
|
@@ -9,6 +9,6 @@ interface LiquidContextInterface {
|
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export declare const LiquidContext: import("react").Context<LiquidContextInterface>;
|
|
12
|
-
export declare function LiquidContextProvider({ children, }: PropsWithChildren): JSX.Element;
|
|
12
|
+
export declare function LiquidContextProvider({ children, }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export declare function useLiquidContext(): LiquidContextInterface;
|
|
14
14
|
export default LiquidContext;
|
|
@@ -39,6 +39,6 @@ export declare type ModalProps = {
|
|
|
39
39
|
closeModal: CloseModalFunction;
|
|
40
40
|
};
|
|
41
41
|
export declare const ModalContext: import("react").Context<ModalContextType | undefined>;
|
|
42
|
-
export declare function ModalContextProvider({ portalName, children, availableModals, }: Props): JSX.Element;
|
|
42
|
+
export declare function ModalContextProvider({ portalName, children, availableModals, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
43
43
|
export declare function useModalContext(): ModalContextType;
|
|
44
44
|
export {};
|
|
@@ -39,6 +39,6 @@ export declare type OffcanvasProps = {
|
|
|
39
39
|
closeOffcanvas: CloseOffcanvasFunction;
|
|
40
40
|
};
|
|
41
41
|
export declare const OffcanvasContext: import("react").Context<OffcanvasContextType | undefined>;
|
|
42
|
-
export declare function OffcanvasContextProvider({ portalName, children, availableOffcanvas, }: Props): JSX.Element;
|
|
42
|
+
export declare function OffcanvasContextProvider({ portalName, children, availableOffcanvas, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
43
43
|
export declare function useOffcanvasContext(): OffcanvasContextType;
|
|
44
44
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MCarousel } from '../../components';
|
|
3
|
+
declare const config: Meta<typeof MCarousel>;
|
|
4
|
+
export default config;
|
|
5
|
+
declare type Story = StoryObj<typeof MCarousel>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const TwoPerPage: Story;
|
|
8
|
+
export declare const WithBreakpoints: Story;
|
|
9
|
+
export declare const AutoplayAndLoop: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MFormikInputCurrency } from '../../components';
|
|
3
|
+
declare const config: Meta<typeof MFormikInputCurrency>;
|
|
4
|
+
export default config;
|
|
5
|
+
declare type Story = StoryObj<typeof MFormikInputCurrency>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Empty: Story;
|
|
8
|
+
export declare const WithErrors: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MList } from '../../components';
|
|
3
|
+
declare const config: Meta<typeof MList>;
|
|
4
|
+
export default config;
|
|
5
|
+
declare type Story = StoryObj<typeof MList>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Flush: Story;
|
|
8
|
+
export declare const Numbered: Story;
|
|
9
|
+
export declare const Horizontal: Story;
|
|
10
|
+
export declare const HorizontalWithBreakpoint: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MListItem } from '../../components';
|
|
3
|
+
declare const config: Meta<typeof MListItem>;
|
|
4
|
+
export default config;
|
|
5
|
+
declare type Story = StoryObj<typeof MListItem>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Active: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const WithTheme: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MListItemMovement } from '../../components';
|
|
3
|
+
declare const config: Meta<typeof MListItemMovement>;
|
|
4
|
+
export default config;
|
|
5
|
+
declare type Story = StoryObj<typeof MListItemMovement>;
|
|
6
|
+
export declare const Movement: Story;
|
|
7
|
+
export declare const Movements: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import MPaginator from '../../components/MPaginator';
|
|
3
|
+
declare const meta: Meta<typeof MPaginator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
declare type Story = StoryObj<typeof MPaginator>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const LabelArrows: Story;
|
|
8
|
+
export declare const NoArrows: Story;
|
|
9
|
+
export declare const CustomCurrentPage: Story;
|
|
10
|
+
export declare const CustomMaxWidth: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MStepper } from '../../components';
|
|
3
|
+
declare const config: Meta<typeof MStepper>;
|
|
4
|
+
export default config;
|
|
5
|
+
declare type Story = StoryObj<typeof MStepper>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Vertical: Story;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
declare const Example: () => JSX.Element;
|
|
2
|
+
declare const Example: () => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare const config: Meta<typeof Example>;
|
|
5
4
|
export default config;
|
|
6
5
|
declare type Story = StoryObj<typeof Example>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
declare const Example: () => JSX.Element;
|
|
2
|
+
declare const Example: () => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare const config: Meta<typeof Example>;
|
|
5
4
|
export default config;
|
|
6
5
|
declare type Story = StoryObj<typeof Example>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
2
|
import { MOffcanvas } from '../../components';
|
|
4
|
-
declare const Example: () => JSX.Element;
|
|
3
|
+
declare const Example: () => import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
declare const config: Meta<typeof Example>;
|
|
6
5
|
export default config;
|
|
7
6
|
declare type Story = StoryObj<typeof MOffcanvas>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Meta } from '@storybook/react';
|
|
3
2
|
import type { AlertType } from '@dynamic-framework/ui';
|
|
4
3
|
declare type Props = {
|
|
@@ -6,7 +5,7 @@ declare type Props = {
|
|
|
6
5
|
type: AlertType;
|
|
7
6
|
showClose: boolean;
|
|
8
7
|
};
|
|
9
|
-
declare const Example: ({ message, type, showClose }: Props) => JSX.Element;
|
|
8
|
+
declare const Example: ({ message, type, showClose }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
declare const config: Meta<typeof Example>;
|
|
11
10
|
export default config;
|
|
12
11
|
export declare const useToast: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-framework/ui-react",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"description": "React Dynamic Framework",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"build": "pnpm build:react && pnpm build:style",
|
|
26
26
|
"build:react": "rimraf dist && tsc -p . && rollup -c rollup.config.js",
|
|
27
27
|
"build:react:watch": "tsc -p . && rollup -c rollup.config.js",
|
|
28
|
-
"build:scss": "sass --load-path=node_modules --no-source-map --style=compressed src/style
|
|
29
|
-
"build:scss:watch": "sass --load-path=node_modules -w src/style
|
|
30
|
-
"build:autoprefixer": "postcss dist/css
|
|
28
|
+
"build:scss": "sass --load-path=node_modules --no-source-map --style=compressed src/style/:dist/css",
|
|
29
|
+
"build:scss:watch": "sass --load-path=node_modules -w src/style:dist/css",
|
|
30
|
+
"build:autoprefixer": "postcss dist/css/*.css --replace --use autoprefixer --no-map",
|
|
31
31
|
"build:style": "pnpm build:scss && pnpm build:autoprefixer",
|
|
32
32
|
"clean": "rimraf dist",
|
|
33
33
|
"compile": "tsc -p . && rollup -c rollup.config.js",
|
|
@@ -45,21 +45,25 @@
|
|
|
45
45
|
"src/style"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
+
"@dynamic-framework/ui": "^1.3.0",
|
|
48
49
|
"@floating-ui/react": "^0.24.1",
|
|
50
|
+
"@splidejs/react-splide": "^0.7.12",
|
|
51
|
+
"@splidejs/splide": "^4.1.4",
|
|
49
52
|
"axios": "^1.1.2",
|
|
50
53
|
"classnames": "^2.3.2",
|
|
51
54
|
"date-fns": "^2.29.3",
|
|
52
55
|
"i18next": "~21.9.0",
|
|
53
56
|
"react-content-loader": "~6.2.0",
|
|
54
57
|
"react-datepicker": "~4.8.0",
|
|
55
|
-
"react-dropzone": "^14.2.3"
|
|
58
|
+
"react-dropzone": "^14.2.3",
|
|
59
|
+
"react-responsive-pagination": "^2.2.1",
|
|
60
|
+
"yup": "^1.2.0"
|
|
56
61
|
},
|
|
57
62
|
"devDependencies": {
|
|
58
63
|
"@babel/core": "^7.19.3",
|
|
59
64
|
"@babel/preset-env": "^7.20.2",
|
|
60
65
|
"@babel/preset-react": "^7.18.6",
|
|
61
66
|
"@babel/preset-typescript": "^7.21.0",
|
|
62
|
-
"@dynamic-framework/ui": "^1.1.3",
|
|
63
67
|
"@mdx-js/react": "^2.3.0",
|
|
64
68
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
65
69
|
"@storybook/addon-actions": "7.0.6",
|
|
@@ -76,9 +80,9 @@
|
|
|
76
80
|
"@testing-library/react": "^13.4.0",
|
|
77
81
|
"@types/jest": "29.1.2",
|
|
78
82
|
"@types/lodash.camelcase": "^4.3.7",
|
|
79
|
-
"@types/luxon": "~3.
|
|
83
|
+
"@types/luxon": "~3.2.1",
|
|
80
84
|
"@types/node": "^15.12.2",
|
|
81
|
-
"@types/react": "^18.
|
|
85
|
+
"@types/react": "^18.2.19",
|
|
82
86
|
"@types/react-datepicker": "~4.8.0",
|
|
83
87
|
"@types/react-dom": "^18.0.3",
|
|
84
88
|
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
@@ -99,10 +103,10 @@
|
|
|
99
103
|
"jest-cli": "^29.1.2",
|
|
100
104
|
"jest-environment-jsdom": "^29.1.2",
|
|
101
105
|
"lint-staged": "^12.4.1",
|
|
102
|
-
"luxon": "~3.
|
|
106
|
+
"luxon": "~3.2.1",
|
|
103
107
|
"postcss-cli": "^10.1.0",
|
|
104
|
-
"react": "^18.
|
|
105
|
-
"react-dom": "^18.
|
|
108
|
+
"react": "^18.2.0",
|
|
109
|
+
"react-dom": "^18.2.0",
|
|
106
110
|
"react-i18next": "~11.18.3",
|
|
107
111
|
"react-toastify": "~9.0.8",
|
|
108
112
|
"rimraf": "^2.6.3",
|
|
@@ -116,7 +120,6 @@
|
|
|
116
120
|
"typescript": "^4.6.4"
|
|
117
121
|
},
|
|
118
122
|
"peerDependencies": {
|
|
119
|
-
"@dynamic-framework/ui": "*",
|
|
120
123
|
"formik": "^2.2.9",
|
|
121
124
|
"html2canvas": "^1.4.1",
|
|
122
125
|
"luxon": "~3.0.3",
|
|
@@ -130,5 +133,5 @@
|
|
|
130
133
|
"@dynamic-framework/ui"
|
|
131
134
|
]
|
|
132
135
|
},
|
|
133
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "125b91980cab3c9ac80e23fcc9f44c9e93f71d01"
|
|
134
137
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@import "@splidejs/splide/src/css/template/default/index";
|
|
2
|
+
|
|
3
|
+
.m-carousel {
|
|
4
|
+
// Arrows
|
|
5
|
+
--#{$prefix}m-carousel-arrow-space: calc(var(--#{$prefix}ref-spacer-3) * -1);
|
|
6
|
+
// Pagination
|
|
7
|
+
--#{$prefix}m-carousel-pagination-bottom: calc(var(--#{$prefix}ref-spacer-3) * -1);
|
|
8
|
+
--#{$prefix}m-carousel-pagination-page-bg: var(--#{$prefix}secondary-100);
|
|
9
|
+
--#{$prefix}m-carousel-pagination-active-page-bg: var(--#{$prefix}secondary);
|
|
10
|
+
// :focus
|
|
11
|
+
--#{$prefix}m-carousel-focus-outline-color: var(--#{$prefix}focus-ring-color);
|
|
12
|
+
|
|
13
|
+
.m-carousel-arrows {
|
|
14
|
+
|
|
15
|
+
.m-carousel-arrow.m-carousel-arrow-prev {
|
|
16
|
+
left: var(--#{$prefix}m-carousel-arrow-space);
|
|
17
|
+
}
|
|
18
|
+
.m-carousel-arrow.m-carousel-arrow-next {
|
|
19
|
+
right: var(--#{$prefix}m-carousel-arrow-space);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.m-carousel-pagination {
|
|
23
|
+
bottom: var(--#{$prefix}m-carousel-pagination-bottom);
|
|
24
|
+
|
|
25
|
+
.m-carousel-pagination-page {
|
|
26
|
+
background-color: var(--#{$prefix}m-carousel-pagination-page-bg);
|
|
27
|
+
|
|
28
|
+
&.is-active {
|
|
29
|
+
background-color: var(--#{$prefix}m-carousel-pagination-active-page-bg);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.splide.is-focus-in .m-carousel-arrow:focus,
|
|
35
|
+
&.splide.is-focus-in .m-carousel-pagination-page:focus {
|
|
36
|
+
outline-color: var(--#{$prefix}m-carousel-focus-outline-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.m-carousel-slide.is-active.is-visible {
|
|
40
|
+
> * {
|
|
41
|
+
// TODO: ASK. Exist active state on slide(?)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
.m-pagination {
|
|
2
|
+
// Page link
|
|
3
|
+
--#{$prefix}m-pagination-page-item-size: 2.125rem;
|
|
4
|
+
--#{$prefix}m-pagination-page-link-bg: transparent;
|
|
5
|
+
--#{$prefix}m-pagination-page-border-radius: 50%;
|
|
6
|
+
// Arrow
|
|
7
|
+
--#{$prefix}m-pagination-arrow-font-size: var(--#{$prefix}ref-fs-subparagraph);
|
|
8
|
+
--#{$prefix}m-pagination-arrow-padding-y: var(--#{$prefix}ref-spacer-1);
|
|
9
|
+
--#{$prefix}m-pagination-arrow-padding-x: var(--#{$prefix}ref-spacer-2);
|
|
10
|
+
--#{$prefix}m-pagination-arrow-border-radius: var(--#{$prefix}border-radius);
|
|
11
|
+
--#{$prefix}m-pagination-arrow-color: var(--#{$prefix}secondary);
|
|
12
|
+
// Arrow :focus
|
|
13
|
+
--#{$prefix}m-pagination-focus-arrow-bg: var(--#{$prefix}secondary-100);
|
|
14
|
+
// Arrow previous
|
|
15
|
+
--#{$prefix}m-pagination-arrow-prev-icon-bg-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%234848b7" class="bi bi-chevron-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/></svg>');
|
|
16
|
+
--#{$prefix}m-pagination-disabled-arrow-prev-icon-bg-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23a1a1b5" class="bi bi-chevron-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/></svg>');
|
|
17
|
+
// Arrow next
|
|
18
|
+
--#{$prefix}m-pagination-arrow-next-icon-bg-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%234848b7" class="bi bi-chevron-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>');
|
|
19
|
+
--#{$prefix}m-pagination-disabled-arrow-next-icon-bg-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23a1a1b5" class="bi bi-chevron-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>');
|
|
20
|
+
margin: 0;
|
|
21
|
+
|
|
22
|
+
.page-item {
|
|
23
|
+
min-width: var(--#{$prefix}m-pagination-page-item-size);
|
|
24
|
+
min-height: var(--#{$prefix}m-pagination-page-item-size);
|
|
25
|
+
|
|
26
|
+
&:not(.active, :hover) .page-link {
|
|
27
|
+
background-color: var(--#{$prefix}m-pagination-page-link-bg);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.m-arrow .page-link {
|
|
32
|
+
min-width: fit-content;
|
|
33
|
+
padding: var(--#{$prefix}m-pagination-arrow-padding-y) var(--#{$prefix}m-pagination-arrow-padding-x);
|
|
34
|
+
font-size: var(--#{$prefix}m-pagination-arrow-font-size);
|
|
35
|
+
border-radius: var(--#{$prefix}m-pagination-arrow-border-radius);
|
|
36
|
+
|
|
37
|
+
&:focus {
|
|
38
|
+
background-color: var(--#{$prefix}m-pagination-focus-arrow-bg);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&::after,
|
|
42
|
+
&::before {
|
|
43
|
+
position: relative;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
background-repeat: no-repeat;
|
|
48
|
+
background-size: var(--#{$prefix}m-pagination-arrow-font-size);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.m-arrow:is(.m-arrow-prev, .m-arrow-next):not(.disabled) .page-link {
|
|
53
|
+
color: var(--#{$prefix}m-pagination-arrow-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Arrow prev
|
|
57
|
+
.m-arrow.m-arrow-prev .page-link::before {
|
|
58
|
+
min-width: var(--#{$prefix}m-pagination-arrow-font-size);
|
|
59
|
+
min-height: var(--#{$prefix}m-pagination-arrow-font-size);
|
|
60
|
+
margin-right: var(--#{$prefix}ref-spacer-1);
|
|
61
|
+
content: "";
|
|
62
|
+
background-image: var(--#{$prefix}m-pagination-arrow-prev-icon-bg-image);
|
|
63
|
+
background-position: center left;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Arrow next
|
|
67
|
+
.m-arrow.m-arrow-next .page-link::after {
|
|
68
|
+
width: var(--#{$prefix}m-pagination-arrow-font-size);
|
|
69
|
+
height: var(--#{$prefix}m-pagination-arrow-font-size);
|
|
70
|
+
margin-left: var(--#{$prefix}ref-spacer-1);
|
|
71
|
+
content: "";
|
|
72
|
+
background-image: var(--#{$prefix}m-pagination-arrow-next-icon-bg-image);
|
|
73
|
+
background-position: center right;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Hide default icon
|
|
77
|
+
.m-arrow:is(.m-arrow-next, .m-arrow-prev).no-label .page-link > span {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.m-arrow-prev.disabled .page-link::before {
|
|
82
|
+
background-image: var(--#{$prefix}m-pagination-disabled-arrow-prev-icon-bg-image);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.m-arrow-next.disabled .page-link::after {
|
|
86
|
+
background-image: var(--#{$prefix}m-pagination-disabled-arrow-next-icon-bg-image);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.page-link {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
width: 100%;
|
|
94
|
+
height: 100%;
|
|
95
|
+
padding: 0;
|
|
96
|
+
border-radius: var(--#{$prefix}m-pagination-page-border-radius);
|
|
97
|
+
}
|
|
98
|
+
}
|