@cere/cere-design-system 0.0.45 → 0.1.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/WorkflowNode-BnxXO6t_.d.mts +46 -0
- package/dist/WorkflowNode-BnxXO6t_.d.ts +46 -0
- package/dist/buttons.d.mts +114 -0
- package/dist/buttons.d.ts +114 -0
- package/dist/buttons.js +19 -0
- package/dist/buttons.js.map +1 -0
- package/dist/buttons.mjs +19 -0
- package/dist/buttons.mjs.map +1 -0
- package/dist/carousel.d.mts +51 -0
- package/dist/carousel.d.ts +51 -0
- package/dist/carousel.js +185 -0
- package/dist/carousel.js.map +1 -0
- package/dist/carousel.mjs +185 -0
- package/dist/carousel.mjs.map +1 -0
- package/dist/charts.d.mts +209 -0
- package/dist/charts.d.ts +209 -0
- package/dist/charts.js +20 -0
- package/dist/charts.js.map +1 -0
- package/dist/charts.mjs +20 -0
- package/dist/charts.mjs.map +1 -0
- package/dist/chunk-27JEWSWA.mjs +233 -0
- package/dist/chunk-27JEWSWA.mjs.map +1 -0
- package/dist/chunk-2EBCST6X.js +25 -0
- package/dist/chunk-2EBCST6X.js.map +1 -0
- package/dist/chunk-3WCMINE5.mjs +490 -0
- package/dist/chunk-3WCMINE5.mjs.map +1 -0
- package/dist/chunk-463SRKKD.js +111 -0
- package/dist/chunk-463SRKKD.js.map +1 -0
- package/dist/chunk-5ASG6G6U.mjs +40 -0
- package/dist/chunk-5ASG6G6U.mjs.map +1 -0
- package/dist/chunk-6EUAU67C.mjs +374 -0
- package/dist/chunk-6EUAU67C.mjs.map +1 -0
- package/dist/chunk-AIY6222Q.js +11 -0
- package/dist/chunk-AIY6222Q.js.map +1 -0
- package/dist/chunk-AJBM7IE6.mjs +2366 -0
- package/dist/chunk-AJBM7IE6.mjs.map +1 -0
- package/dist/chunk-ATIFLPH6.mjs +278 -0
- package/dist/chunk-ATIFLPH6.mjs.map +1 -0
- package/dist/chunk-BIZK6FUD.js +37 -0
- package/dist/chunk-BIZK6FUD.js.map +1 -0
- package/dist/chunk-CCN6M4LI.js +103 -0
- package/dist/chunk-CCN6M4LI.js.map +1 -0
- package/dist/chunk-CUCKULYC.mjs +2658 -0
- package/dist/chunk-CUCKULYC.mjs.map +1 -0
- package/dist/chunk-CWJ4OU6W.mjs +45 -0
- package/dist/chunk-CWJ4OU6W.mjs.map +1 -0
- package/dist/chunk-EOF3QNPF.js +2366 -0
- package/dist/chunk-EOF3QNPF.js.map +1 -0
- package/dist/chunk-FFZ5S7PQ.mjs +146 -0
- package/dist/chunk-FFZ5S7PQ.mjs.map +1 -0
- package/dist/chunk-FN5YL4BK.js +278 -0
- package/dist/chunk-FN5YL4BK.js.map +1 -0
- package/dist/chunk-HLH2VWXL.js +2658 -0
- package/dist/chunk-HLH2VWXL.js.map +1 -0
- package/dist/chunk-IE6GCHDI.mjs +530 -0
- package/dist/chunk-IE6GCHDI.mjs.map +1 -0
- package/dist/chunk-JBHRAAN3.js +31 -0
- package/dist/chunk-JBHRAAN3.js.map +1 -0
- package/dist/chunk-JS4IB5IU.mjs +162 -0
- package/dist/chunk-JS4IB5IU.mjs.map +1 -0
- package/dist/chunk-KF2Y7HO3.js +595 -0
- package/dist/chunk-KF2Y7HO3.js.map +1 -0
- package/dist/chunk-KPDYKK3V.js +162 -0
- package/dist/chunk-KPDYKK3V.js.map +1 -0
- package/dist/chunk-KVBMZNWT.mjs +103 -0
- package/dist/chunk-KVBMZNWT.mjs.map +1 -0
- package/dist/chunk-L2TIGA7I.js +530 -0
- package/dist/chunk-L2TIGA7I.js.map +1 -0
- package/dist/chunk-MNM6HE72.js +146 -0
- package/dist/chunk-MNM6HE72.js.map +1 -0
- package/dist/chunk-NXTVJ6PY.js +374 -0
- package/dist/chunk-NXTVJ6PY.js.map +1 -0
- package/dist/chunk-OWWDNDF4.js +40 -0
- package/dist/chunk-OWWDNDF4.js.map +1 -0
- package/dist/chunk-PHMNZK2R.mjs +18 -0
- package/dist/chunk-PHMNZK2R.mjs.map +1 -0
- package/dist/chunk-PWF2NJDB.mjs +377 -0
- package/dist/chunk-PWF2NJDB.mjs.map +1 -0
- package/dist/chunk-QBCRH7YF.mjs +37 -0
- package/dist/chunk-QBCRH7YF.mjs.map +1 -0
- package/dist/chunk-QD6RLAO2.mjs +11 -0
- package/dist/chunk-QD6RLAO2.mjs.map +1 -0
- package/dist/chunk-QY65OUAC.mjs +111 -0
- package/dist/chunk-QY65OUAC.mjs.map +1 -0
- package/dist/chunk-QYYQYZHV.js +45 -0
- package/dist/chunk-QYYQYZHV.js.map +1 -0
- package/dist/chunk-T7LPABOL.mjs +595 -0
- package/dist/chunk-T7LPABOL.mjs.map +1 -0
- package/dist/chunk-THQKYTQE.js +490 -0
- package/dist/chunk-THQKYTQE.js.map +1 -0
- package/dist/chunk-U2QHFISG.js +18 -0
- package/dist/chunk-U2QHFISG.js.map +1 -0
- package/dist/chunk-UPGFBPFX.mjs +25 -0
- package/dist/chunk-UPGFBPFX.mjs.map +1 -0
- package/dist/chunk-X7E6GMFL.js +233 -0
- package/dist/chunk-X7E6GMFL.js.map +1 -0
- package/dist/chunk-XF66WQZE.mjs +1535 -0
- package/dist/chunk-XF66WQZE.mjs.map +1 -0
- package/dist/chunk-YQOZPLTY.js +1535 -0
- package/dist/chunk-YQOZPLTY.js.map +1 -0
- package/dist/chunk-ZGCN5WCG.js +377 -0
- package/dist/chunk-ZGCN5WCG.js.map +1 -0
- package/dist/chunk-ZP26PGMS.mjs +31 -0
- package/dist/chunk-ZP26PGMS.mjs.map +1 -0
- package/dist/feedback.d.mts +356 -0
- package/dist/feedback.d.ts +356 -0
- package/dist/feedback.js +43 -0
- package/dist/feedback.js.map +1 -0
- package/dist/feedback.mjs +43 -0
- package/dist/feedback.mjs.map +1 -0
- package/dist/icons.d.mts +22 -0
- package/dist/icons.d.ts +22 -0
- package/dist/icons.js +23 -0
- package/dist/icons.js.map +1 -0
- package/dist/icons.mjs +23 -0
- package/dist/icons.mjs.map +1 -0
- package/dist/index.d.mts +165 -3080
- package/dist/index.d.ts +165 -3080
- package/dist/index.js +320 -10082
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +262 -9983
- package/dist/index.mjs.map +1 -1
- package/dist/inputs.d.mts +109 -0
- package/dist/inputs.d.ts +109 -0
- package/dist/inputs.js +43 -0
- package/dist/inputs.js.map +1 -0
- package/dist/inputs.mjs +43 -0
- package/dist/inputs.mjs.map +1 -0
- package/dist/layout.d.mts +927 -0
- package/dist/layout.d.ts +927 -0
- package/dist/layout.js +122 -0
- package/dist/layout.js.map +1 -0
- package/dist/layout.mjs +122 -0
- package/dist/layout.mjs.map +1 -0
- package/dist/navigation.d.mts +716 -0
- package/dist/navigation.d.ts +716 -0
- package/dist/navigation.js +58 -0
- package/dist/navigation.js.map +1 -0
- package/dist/navigation.mjs +58 -0
- package/dist/navigation.mjs.map +1 -0
- package/dist/third-party.d.mts +637 -0
- package/dist/third-party.d.ts +637 -0
- package/dist/third-party.js +45 -0
- package/dist/third-party.js.map +1 -0
- package/dist/third-party.mjs +45 -0
- package/dist/third-party.mjs.map +1 -0
- package/dist/utilities.d.mts +39 -0
- package/dist/utilities.d.ts +39 -0
- package/dist/utilities.js +19 -0
- package/dist/utilities.js.map +1 -0
- package/dist/utilities.mjs +19 -0
- package/dist/utilities.mjs.map +1 -0
- package/package.json +55 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { PaperProps } from '@mui/material/Paper';
|
|
3
|
+
|
|
4
|
+
/** All supported workflow node types */
|
|
5
|
+
type WorkflowNodeType = 'start' | 'input' | 'stream' | 'rafts' | 'cubbies' | 'events' | 'trigger' | 'action' | 'aiModel' | 'aiAgent' | 'condition' | 'output' | 'end' | 'parallel' | 'merge';
|
|
6
|
+
interface WorkflowNodeProps extends Omit<PaperProps, 'title'> {
|
|
7
|
+
/** The workflow node type — drives accent color, default icon, and badge label */
|
|
8
|
+
nodeType: WorkflowNodeType;
|
|
9
|
+
/** Primary title displayed in the node */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Optional description text below the title */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Override the default icon for this node type */
|
|
14
|
+
icon?: React__default.ReactNode;
|
|
15
|
+
/** Override the default badge label for this node type */
|
|
16
|
+
badgeLabel?: string;
|
|
17
|
+
/** Whether the node is currently selected (highlights border with accent color) */
|
|
18
|
+
selected?: boolean;
|
|
19
|
+
/** Optional className */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Renders left/right connector dots to match the design spec */
|
|
22
|
+
showSideDots?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Human-readable labels for each node type (matches Figma badge text) */
|
|
25
|
+
declare const WORKFLOW_NODE_LABELS: Record<WorkflowNodeType, string>;
|
|
26
|
+
/** Shared elevation shadow for workflow node cards and connector handles (Figma 277-8244) */
|
|
27
|
+
declare const WORKFLOW_NODE_SHADOW = "0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.1)";
|
|
28
|
+
/**
|
|
29
|
+
* WorkflowNode — visual card for a workflow editor node.
|
|
30
|
+
*
|
|
31
|
+
* Renders a card with a colored left border strip, title, optional description,
|
|
32
|
+
* and a type badge/chip. Designed to integrate with FlowEditor (ReactFlow)
|
|
33
|
+
* via the WorkflowNodeHandle wrapper.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <WorkflowNode
|
|
38
|
+
* nodeType="trigger"
|
|
39
|
+
* title="HTTP Trigger"
|
|
40
|
+
* description="Listens for incoming webhook calls"
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const WorkflowNode: React__default.FC<WorkflowNodeProps>;
|
|
45
|
+
|
|
46
|
+
export { WORKFLOW_NODE_LABELS as W, WORKFLOW_NODE_SHADOW as a, WorkflowNode as b, type WorkflowNodeProps as c, type WorkflowNodeType as d };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { PaperProps } from '@mui/material/Paper';
|
|
3
|
+
|
|
4
|
+
/** All supported workflow node types */
|
|
5
|
+
type WorkflowNodeType = 'start' | 'input' | 'stream' | 'rafts' | 'cubbies' | 'events' | 'trigger' | 'action' | 'aiModel' | 'aiAgent' | 'condition' | 'output' | 'end' | 'parallel' | 'merge';
|
|
6
|
+
interface WorkflowNodeProps extends Omit<PaperProps, 'title'> {
|
|
7
|
+
/** The workflow node type — drives accent color, default icon, and badge label */
|
|
8
|
+
nodeType: WorkflowNodeType;
|
|
9
|
+
/** Primary title displayed in the node */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Optional description text below the title */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Override the default icon for this node type */
|
|
14
|
+
icon?: React__default.ReactNode;
|
|
15
|
+
/** Override the default badge label for this node type */
|
|
16
|
+
badgeLabel?: string;
|
|
17
|
+
/** Whether the node is currently selected (highlights border with accent color) */
|
|
18
|
+
selected?: boolean;
|
|
19
|
+
/** Optional className */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Renders left/right connector dots to match the design spec */
|
|
22
|
+
showSideDots?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Human-readable labels for each node type (matches Figma badge text) */
|
|
25
|
+
declare const WORKFLOW_NODE_LABELS: Record<WorkflowNodeType, string>;
|
|
26
|
+
/** Shared elevation shadow for workflow node cards and connector handles (Figma 277-8244) */
|
|
27
|
+
declare const WORKFLOW_NODE_SHADOW = "0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.1)";
|
|
28
|
+
/**
|
|
29
|
+
* WorkflowNode — visual card for a workflow editor node.
|
|
30
|
+
*
|
|
31
|
+
* Renders a card with a colored left border strip, title, optional description,
|
|
32
|
+
* and a type badge/chip. Designed to integrate with FlowEditor (ReactFlow)
|
|
33
|
+
* via the WorkflowNodeHandle wrapper.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <WorkflowNode
|
|
38
|
+
* nodeType="trigger"
|
|
39
|
+
* title="HTTP Trigger"
|
|
40
|
+
* description="Listens for incoming webhook calls"
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const WorkflowNode: React__default.FC<WorkflowNodeProps>;
|
|
45
|
+
|
|
46
|
+
export { WORKFLOW_NODE_LABELS as W, WORKFLOW_NODE_SHADOW as a, WorkflowNode as b, type WorkflowNodeProps as c, type WorkflowNodeType as d };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
3
|
+
import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
|
|
4
|
+
import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab';
|
|
5
|
+
import { ButtonGroupProps as ButtonGroupProps$1 } from '@mui/material';
|
|
6
|
+
|
|
7
|
+
type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
|
|
8
|
+
type ButtonTone = 'default' | 'onGradient';
|
|
9
|
+
interface ButtonProps extends Omit<ButtonProps$1, 'variant' | 'color'> {
|
|
10
|
+
/**
|
|
11
|
+
* The visual style variant of the button
|
|
12
|
+
* - primary: Filled button with primary color background
|
|
13
|
+
* - secondary: Outlined button with transparent background and border
|
|
14
|
+
* - tertiary: Text button with no background or border
|
|
15
|
+
*/
|
|
16
|
+
variant?: ButtonVariant;
|
|
17
|
+
/**
|
|
18
|
+
* Tone overlay. When set, **replaces** the per-variant styling — `variant`
|
|
19
|
+
* is ignored. Today the only non-default tone is `onGradient`, which paints
|
|
20
|
+
* the button as a white pill on a dark gradient surface (banner CTA
|
|
21
|
+
* pattern). Use the default tone if you want `variant` to drive the look.
|
|
22
|
+
* @default 'default'
|
|
23
|
+
*/
|
|
24
|
+
tone?: ButtonTone;
|
|
25
|
+
/**
|
|
26
|
+
* The size of the button
|
|
27
|
+
*/
|
|
28
|
+
size?: 'small' | 'medium' | 'large';
|
|
29
|
+
/**
|
|
30
|
+
* Icon element to display before the button text
|
|
31
|
+
*/
|
|
32
|
+
startIcon?: React__default.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Icon element to display after the button text
|
|
35
|
+
*/
|
|
36
|
+
endIcon?: React__default.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
|
|
40
|
+
interface IconButtonProps extends IconButtonProps$1 {
|
|
41
|
+
variant?: 'default' | 'primary' | 'secondary';
|
|
42
|
+
}
|
|
43
|
+
declare const IconButton: React__default.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
|
|
45
|
+
interface LoadingButtonProps extends LoadingButtonProps$1 {
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, the button will show a loading indicator
|
|
48
|
+
*/
|
|
49
|
+
loading?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The loading indicator can be positioned inside the button or in the center
|
|
52
|
+
*/
|
|
53
|
+
loadingPosition?: 'start' | 'end' | 'center';
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* LoadingButton component - Button with loading state from MUI Lab
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <LoadingButton
|
|
61
|
+
* variant="contained"
|
|
62
|
+
* loading={isLoading}
|
|
63
|
+
* onClick={handleSubmit}
|
|
64
|
+
* >
|
|
65
|
+
* Submit
|
|
66
|
+
* </LoadingButton>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare const LoadingButton: React__default.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
70
|
+
|
|
71
|
+
interface ButtonGroupProps extends ButtonGroupProps$1 {
|
|
72
|
+
/**
|
|
73
|
+
* The content of the button group
|
|
74
|
+
*/
|
|
75
|
+
children?: React__default.ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* If `true`, the buttons will be disabled
|
|
78
|
+
*/
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* If `true`, the button group will take full width
|
|
82
|
+
*/
|
|
83
|
+
fullWidth?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The orientation of the button group
|
|
86
|
+
* @default 'horizontal'
|
|
87
|
+
*/
|
|
88
|
+
orientation?: 'horizontal' | 'vertical';
|
|
89
|
+
/**
|
|
90
|
+
* The size of the buttons
|
|
91
|
+
* @default 'medium'
|
|
92
|
+
*/
|
|
93
|
+
size?: 'small' | 'medium' | 'large';
|
|
94
|
+
/**
|
|
95
|
+
* The variant to use
|
|
96
|
+
* @default 'outlined'
|
|
97
|
+
*/
|
|
98
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* ButtonGroup component - groups related buttons together
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```tsx
|
|
105
|
+
* <ButtonGroup variant="contained">
|
|
106
|
+
* <Button>One</Button>
|
|
107
|
+
* <Button>Two</Button>
|
|
108
|
+
* <Button>Three</Button>
|
|
109
|
+
* </ButtonGroup>
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
declare const ButtonGroup: React__default.FC<ButtonGroupProps>;
|
|
113
|
+
|
|
114
|
+
export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonTone, type ButtonVariant, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
3
|
+
import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
|
|
4
|
+
import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab';
|
|
5
|
+
import { ButtonGroupProps as ButtonGroupProps$1 } from '@mui/material';
|
|
6
|
+
|
|
7
|
+
type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
|
|
8
|
+
type ButtonTone = 'default' | 'onGradient';
|
|
9
|
+
interface ButtonProps extends Omit<ButtonProps$1, 'variant' | 'color'> {
|
|
10
|
+
/**
|
|
11
|
+
* The visual style variant of the button
|
|
12
|
+
* - primary: Filled button with primary color background
|
|
13
|
+
* - secondary: Outlined button with transparent background and border
|
|
14
|
+
* - tertiary: Text button with no background or border
|
|
15
|
+
*/
|
|
16
|
+
variant?: ButtonVariant;
|
|
17
|
+
/**
|
|
18
|
+
* Tone overlay. When set, **replaces** the per-variant styling — `variant`
|
|
19
|
+
* is ignored. Today the only non-default tone is `onGradient`, which paints
|
|
20
|
+
* the button as a white pill on a dark gradient surface (banner CTA
|
|
21
|
+
* pattern). Use the default tone if you want `variant` to drive the look.
|
|
22
|
+
* @default 'default'
|
|
23
|
+
*/
|
|
24
|
+
tone?: ButtonTone;
|
|
25
|
+
/**
|
|
26
|
+
* The size of the button
|
|
27
|
+
*/
|
|
28
|
+
size?: 'small' | 'medium' | 'large';
|
|
29
|
+
/**
|
|
30
|
+
* Icon element to display before the button text
|
|
31
|
+
*/
|
|
32
|
+
startIcon?: React__default.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Icon element to display after the button text
|
|
35
|
+
*/
|
|
36
|
+
endIcon?: React__default.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
|
|
40
|
+
interface IconButtonProps extends IconButtonProps$1 {
|
|
41
|
+
variant?: 'default' | 'primary' | 'secondary';
|
|
42
|
+
}
|
|
43
|
+
declare const IconButton: React__default.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
|
|
45
|
+
interface LoadingButtonProps extends LoadingButtonProps$1 {
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, the button will show a loading indicator
|
|
48
|
+
*/
|
|
49
|
+
loading?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The loading indicator can be positioned inside the button or in the center
|
|
52
|
+
*/
|
|
53
|
+
loadingPosition?: 'start' | 'end' | 'center';
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* LoadingButton component - Button with loading state from MUI Lab
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <LoadingButton
|
|
61
|
+
* variant="contained"
|
|
62
|
+
* loading={isLoading}
|
|
63
|
+
* onClick={handleSubmit}
|
|
64
|
+
* >
|
|
65
|
+
* Submit
|
|
66
|
+
* </LoadingButton>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare const LoadingButton: React__default.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
70
|
+
|
|
71
|
+
interface ButtonGroupProps extends ButtonGroupProps$1 {
|
|
72
|
+
/**
|
|
73
|
+
* The content of the button group
|
|
74
|
+
*/
|
|
75
|
+
children?: React__default.ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* If `true`, the buttons will be disabled
|
|
78
|
+
*/
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* If `true`, the button group will take full width
|
|
82
|
+
*/
|
|
83
|
+
fullWidth?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The orientation of the button group
|
|
86
|
+
* @default 'horizontal'
|
|
87
|
+
*/
|
|
88
|
+
orientation?: 'horizontal' | 'vertical';
|
|
89
|
+
/**
|
|
90
|
+
* The size of the buttons
|
|
91
|
+
* @default 'medium'
|
|
92
|
+
*/
|
|
93
|
+
size?: 'small' | 'medium' | 'large';
|
|
94
|
+
/**
|
|
95
|
+
* The variant to use
|
|
96
|
+
* @default 'outlined'
|
|
97
|
+
*/
|
|
98
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* ButtonGroup component - groups related buttons together
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```tsx
|
|
105
|
+
* <ButtonGroup variant="contained">
|
|
106
|
+
* <Button>One</Button>
|
|
107
|
+
* <Button>Two</Button>
|
|
108
|
+
* <Button>Three</Button>
|
|
109
|
+
* </ButtonGroup>
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
declare const ButtonGroup: React__default.FC<ButtonGroupProps>;
|
|
113
|
+
|
|
114
|
+
export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonTone, type ButtonVariant, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
|
package/dist/buttons.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkQYYQYZHVjs = require('./chunk-QYYQYZHV.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkOWWDNDF4js = require('./chunk-OWWDNDF4.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkMNM6HE72js = require('./chunk-MNM6HE72.js');
|
|
11
|
+
require('./chunk-FN5YL4BK.js');
|
|
12
|
+
require('./chunk-ZGCN5WCG.js');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.Button = _chunkMNM6HE72js.Button; exports.ButtonGroup = _chunkQYYQYZHVjs.ButtonGroup; exports.IconButton = _chunkOWWDNDF4js.IconButton; exports.LoadingButton = _chunkQYYQYZHVjs.LoadingButton;
|
|
19
|
+
//# sourceMappingURL=buttons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cere-design-system/cere-design-system/dist/buttons.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACF,uMAAC","file":"/home/runner/work/cere-design-system/cere-design-system/dist/buttons.js"}
|
package/dist/buttons.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ButtonGroup,
|
|
3
|
+
LoadingButton
|
|
4
|
+
} from "./chunk-CWJ4OU6W.mjs";
|
|
5
|
+
import {
|
|
6
|
+
IconButton
|
|
7
|
+
} from "./chunk-5ASG6G6U.mjs";
|
|
8
|
+
import {
|
|
9
|
+
Button
|
|
10
|
+
} from "./chunk-FFZ5S7PQ.mjs";
|
|
11
|
+
import "./chunk-ATIFLPH6.mjs";
|
|
12
|
+
import "./chunk-PWF2NJDB.mjs";
|
|
13
|
+
export {
|
|
14
|
+
Button,
|
|
15
|
+
ButtonGroup,
|
|
16
|
+
IconButton,
|
|
17
|
+
LoadingButton
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=buttons.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, Key } from 'react';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
|
+
import { EmblaOptionsType } from 'embla-carousel';
|
|
5
|
+
|
|
6
|
+
interface CarouselProps<T> {
|
|
7
|
+
/** Slide data. Each entry is passed to `renderSlide`. */
|
|
8
|
+
slides: T[];
|
|
9
|
+
/** Render function for an individual slide. */
|
|
10
|
+
renderSlide: (item: T, index: number) => ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Stable per-slide React key. Always set this when `slides` can be reordered
|
|
13
|
+
* or filtered; otherwise React will reuse the wrong slide's internal state
|
|
14
|
+
* across renders. Defaults to the slide's array index when omitted.
|
|
15
|
+
*/
|
|
16
|
+
getKey?: (item: T, index: number) => Key;
|
|
17
|
+
/** Slides visible in the viewport. @default 1 */
|
|
18
|
+
slidesPerView?: number;
|
|
19
|
+
/** Auto-advance every `autoplayDelayMs` while not hovered. @default true */
|
|
20
|
+
autoplay?: boolean;
|
|
21
|
+
/** Autoplay tick in milliseconds. @default 5000 */
|
|
22
|
+
autoplayDelayMs?: number;
|
|
23
|
+
/** Show dot indicators when more than one slide. @default true */
|
|
24
|
+
showDots?: boolean;
|
|
25
|
+
/** Show the `01 / 03`-style counter when more than one slide. @default true */
|
|
26
|
+
showCounter?: boolean;
|
|
27
|
+
/** Show prev/next chevrons when more than one slide. @default true */
|
|
28
|
+
showArrows?: boolean;
|
|
29
|
+
/** Pause autoplay while the pointer is over the carousel. @default true */
|
|
30
|
+
pauseOnHover?: boolean;
|
|
31
|
+
/** Accessible label for the surrounding region. */
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
/** Fires with the new index whenever embla selects a slide. */
|
|
34
|
+
onSelect?: (index: number) => void;
|
|
35
|
+
/** Override the IconButton sx for the prev/next arrows. */
|
|
36
|
+
arrowSx?: SxProps<Theme>;
|
|
37
|
+
/** Override the dot color (inactive). Accepts any CSS color string. */
|
|
38
|
+
dotColor?: string;
|
|
39
|
+
/** Override the active dot color. Accepts any CSS color string. */
|
|
40
|
+
dotActiveColor?: string;
|
|
41
|
+
/** Escape hatch for advanced embla options. Most consumers don't need this. */
|
|
42
|
+
emblaOptions?: EmblaOptionsType;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Carousel — embla-carousel-based slide deck with autoplay, dots, counter,
|
|
46
|
+
* prev/next arrows and pause-on-hover. Generic over slide payload type; the
|
|
47
|
+
* caller decides the slide markup via `renderSlide`.
|
|
48
|
+
*/
|
|
49
|
+
declare function Carousel<T>({ slides, renderSlide, getKey, slidesPerView, autoplay, autoplayDelayMs, showDots, showCounter, showArrows, pauseOnHover, ariaLabel, onSelect, arrowSx, dotColor, dotActiveColor, emblaOptions, }: CarouselProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
50
|
+
|
|
51
|
+
export { Carousel, type CarouselProps };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, Key } from 'react';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
|
+
import { EmblaOptionsType } from 'embla-carousel';
|
|
5
|
+
|
|
6
|
+
interface CarouselProps<T> {
|
|
7
|
+
/** Slide data. Each entry is passed to `renderSlide`. */
|
|
8
|
+
slides: T[];
|
|
9
|
+
/** Render function for an individual slide. */
|
|
10
|
+
renderSlide: (item: T, index: number) => ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Stable per-slide React key. Always set this when `slides` can be reordered
|
|
13
|
+
* or filtered; otherwise React will reuse the wrong slide's internal state
|
|
14
|
+
* across renders. Defaults to the slide's array index when omitted.
|
|
15
|
+
*/
|
|
16
|
+
getKey?: (item: T, index: number) => Key;
|
|
17
|
+
/** Slides visible in the viewport. @default 1 */
|
|
18
|
+
slidesPerView?: number;
|
|
19
|
+
/** Auto-advance every `autoplayDelayMs` while not hovered. @default true */
|
|
20
|
+
autoplay?: boolean;
|
|
21
|
+
/** Autoplay tick in milliseconds. @default 5000 */
|
|
22
|
+
autoplayDelayMs?: number;
|
|
23
|
+
/** Show dot indicators when more than one slide. @default true */
|
|
24
|
+
showDots?: boolean;
|
|
25
|
+
/** Show the `01 / 03`-style counter when more than one slide. @default true */
|
|
26
|
+
showCounter?: boolean;
|
|
27
|
+
/** Show prev/next chevrons when more than one slide. @default true */
|
|
28
|
+
showArrows?: boolean;
|
|
29
|
+
/** Pause autoplay while the pointer is over the carousel. @default true */
|
|
30
|
+
pauseOnHover?: boolean;
|
|
31
|
+
/** Accessible label for the surrounding region. */
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
/** Fires with the new index whenever embla selects a slide. */
|
|
34
|
+
onSelect?: (index: number) => void;
|
|
35
|
+
/** Override the IconButton sx for the prev/next arrows. */
|
|
36
|
+
arrowSx?: SxProps<Theme>;
|
|
37
|
+
/** Override the dot color (inactive). Accepts any CSS color string. */
|
|
38
|
+
dotColor?: string;
|
|
39
|
+
/** Override the active dot color. Accepts any CSS color string. */
|
|
40
|
+
dotActiveColor?: string;
|
|
41
|
+
/** Escape hatch for advanced embla options. Most consumers don't need this. */
|
|
42
|
+
emblaOptions?: EmblaOptionsType;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Carousel — embla-carousel-based slide deck with autoplay, dots, counter,
|
|
46
|
+
* prev/next arrows and pause-on-hover. Generic over slide payload type; the
|
|
47
|
+
* caller decides the slide markup via `renderSlide`.
|
|
48
|
+
*/
|
|
49
|
+
declare function Carousel<T>({ slides, renderSlide, getKey, slidesPerView, autoplay, autoplayDelayMs, showDots, showCounter, showArrows, pauseOnHover, ariaLabel, onSelect, arrowSx, dotColor, dotActiveColor, emblaOptions, }: CarouselProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
50
|
+
|
|
51
|
+
export { Carousel, type CarouselProps };
|
package/dist/carousel.js
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/components/layout/Carousel.tsx
|
|
2
|
+
var _react = require('react');
|
|
3
|
+
var _Box = require('@mui/material/Box'); var _Box2 = _interopRequireDefault(_Box);
|
|
4
|
+
var _IconButton = require('@mui/material/IconButton'); var _IconButton2 = _interopRequireDefault(_IconButton);
|
|
5
|
+
var _Typography = require('@mui/material/Typography'); var _Typography2 = _interopRequireDefault(_Typography);
|
|
6
|
+
var _ChevronLeft = require('@mui/icons-material/ChevronLeft'); var _ChevronLeft2 = _interopRequireDefault(_ChevronLeft);
|
|
7
|
+
var _ChevronRight = require('@mui/icons-material/ChevronRight'); var _ChevronRight2 = _interopRequireDefault(_ChevronRight);
|
|
8
|
+
var _styles = require('@mui/material/styles');
|
|
9
|
+
var _emblacarouselreact = require('embla-carousel-react'); var _emblacarouselreact2 = _interopRequireDefault(_emblacarouselreact);
|
|
10
|
+
var _emblacarouselautoplay = require('embla-carousel-autoplay'); var _emblacarouselautoplay2 = _interopRequireDefault(_emblacarouselautoplay);
|
|
11
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
12
|
+
var pad2 = (n) => String(n).padStart(2, "0");
|
|
13
|
+
function Carousel({
|
|
14
|
+
slides,
|
|
15
|
+
renderSlide,
|
|
16
|
+
getKey,
|
|
17
|
+
slidesPerView = 1,
|
|
18
|
+
autoplay = true,
|
|
19
|
+
autoplayDelayMs = 5e3,
|
|
20
|
+
showDots = true,
|
|
21
|
+
showCounter = true,
|
|
22
|
+
showArrows = true,
|
|
23
|
+
pauseOnHover = true,
|
|
24
|
+
ariaLabel,
|
|
25
|
+
onSelect,
|
|
26
|
+
arrowSx,
|
|
27
|
+
dotColor,
|
|
28
|
+
dotActiveColor,
|
|
29
|
+
emblaOptions
|
|
30
|
+
}) {
|
|
31
|
+
const plugins = _react.useMemo.call(void 0,
|
|
32
|
+
() => autoplay ? [
|
|
33
|
+
_emblacarouselautoplay2.default.call(void 0, {
|
|
34
|
+
delay: autoplayDelayMs,
|
|
35
|
+
stopOnInteraction: true,
|
|
36
|
+
stopOnMouseEnter: pauseOnHover
|
|
37
|
+
})
|
|
38
|
+
] : [],
|
|
39
|
+
[autoplay, autoplayDelayMs, pauseOnHover]
|
|
40
|
+
);
|
|
41
|
+
const [emblaRef, emblaApi] = _emblacarouselreact2.default.call(void 0,
|
|
42
|
+
{ loop: true, align: "start", ...emblaOptions },
|
|
43
|
+
plugins
|
|
44
|
+
);
|
|
45
|
+
const [selected, setSelected] = _react.useState.call(void 0, 0);
|
|
46
|
+
const [snapCount, setSnapCount] = _react.useState.call(void 0, 0);
|
|
47
|
+
const count = slides.length;
|
|
48
|
+
_react.useEffect.call(void 0, () => {
|
|
49
|
+
if (!emblaApi) return;
|
|
50
|
+
const refreshSnaps = () => {
|
|
51
|
+
setSnapCount(emblaApi.scrollSnapList().length);
|
|
52
|
+
};
|
|
53
|
+
const handleSelect = () => {
|
|
54
|
+
const next = emblaApi.selectedScrollSnap();
|
|
55
|
+
setSelected(next);
|
|
56
|
+
_optionalChain([onSelect, 'optionalCall', _2 => _2(next)]);
|
|
57
|
+
};
|
|
58
|
+
emblaApi.on("select", handleSelect);
|
|
59
|
+
emblaApi.on("reInit", refreshSnaps);
|
|
60
|
+
refreshSnaps();
|
|
61
|
+
handleSelect();
|
|
62
|
+
return () => {
|
|
63
|
+
emblaApi.off("select", handleSelect);
|
|
64
|
+
emblaApi.off("reInit", refreshSnaps);
|
|
65
|
+
};
|
|
66
|
+
}, [emblaApi, onSelect]);
|
|
67
|
+
if (count === 0) return null;
|
|
68
|
+
const showControls = count > 1;
|
|
69
|
+
const slideBasis = `${100 / Math.max(1, slidesPerView)}%`;
|
|
70
|
+
const dotCount = snapCount > 0 ? snapCount : count;
|
|
71
|
+
const arrowBaseSx = {
|
|
72
|
+
position: "absolute",
|
|
73
|
+
top: "50%",
|
|
74
|
+
transform: "translateY(-50%)",
|
|
75
|
+
bgcolor: "background.paper",
|
|
76
|
+
boxShadow: 1,
|
|
77
|
+
"&:hover": { bgcolor: "background.paper" }
|
|
78
|
+
};
|
|
79
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
80
|
+
_Box2.default,
|
|
81
|
+
{
|
|
82
|
+
role: "region",
|
|
83
|
+
"aria-roledescription": "carousel",
|
|
84
|
+
"aria-label": ariaLabel,
|
|
85
|
+
sx: { position: "relative", width: "100%" },
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { ref: emblaRef, sx: { overflow: "hidden" }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { display: "flex" }, children: slides.map((item, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
88
|
+
_Box2.default,
|
|
89
|
+
{
|
|
90
|
+
role: "group",
|
|
91
|
+
"aria-roledescription": "slide",
|
|
92
|
+
"aria-label": `${i + 1} of ${count}`,
|
|
93
|
+
sx: { flex: `0 0 ${slideBasis}`, minWidth: 0 },
|
|
94
|
+
children: renderSlide(item, i)
|
|
95
|
+
},
|
|
96
|
+
getKey ? getKey(item, i) : i
|
|
97
|
+
)) }) }),
|
|
98
|
+
showControls && showArrows && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
99
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
100
|
+
_IconButton2.default,
|
|
101
|
+
{
|
|
102
|
+
"aria-label": "Previous slide",
|
|
103
|
+
onClick: () => _optionalChain([emblaApi, 'optionalAccess', _3 => _3.scrollPrev, 'call', _4 => _4()]),
|
|
104
|
+
sx: [arrowBaseSx, { left: 8 }, ...Array.isArray(arrowSx) ? arrowSx : [arrowSx]],
|
|
105
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronLeft2.default, {})
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
109
|
+
_IconButton2.default,
|
|
110
|
+
{
|
|
111
|
+
"aria-label": "Next slide",
|
|
112
|
+
onClick: () => _optionalChain([emblaApi, 'optionalAccess', _5 => _5.scrollNext, 'call', _6 => _6()]),
|
|
113
|
+
sx: [arrowBaseSx, { right: 8 }, ...Array.isArray(arrowSx) ? arrowSx : [arrowSx]],
|
|
114
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronRight2.default, {})
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] }),
|
|
118
|
+
showControls && showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
119
|
+
_Typography2.default,
|
|
120
|
+
{
|
|
121
|
+
variant: "caption",
|
|
122
|
+
sx: (theme) => ({
|
|
123
|
+
position: "absolute",
|
|
124
|
+
top: 12,
|
|
125
|
+
right: 16,
|
|
126
|
+
px: 1,
|
|
127
|
+
py: 0.25,
|
|
128
|
+
borderRadius: 1,
|
|
129
|
+
bgcolor: _styles.alpha.call(void 0, theme.palette.common.black, 0.5),
|
|
130
|
+
color: "common.white",
|
|
131
|
+
letterSpacing: 1
|
|
132
|
+
}),
|
|
133
|
+
children: [
|
|
134
|
+
pad2(selected + 1),
|
|
135
|
+
" / ",
|
|
136
|
+
pad2(dotCount)
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
showControls && showDots && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
141
|
+
_Box2.default,
|
|
142
|
+
{
|
|
143
|
+
role: "tablist",
|
|
144
|
+
"aria-label": "Carousel slides",
|
|
145
|
+
sx: {
|
|
146
|
+
position: "absolute",
|
|
147
|
+
bottom: 12,
|
|
148
|
+
left: 0,
|
|
149
|
+
right: 0,
|
|
150
|
+
display: "flex",
|
|
151
|
+
justifyContent: "center",
|
|
152
|
+
gap: 1
|
|
153
|
+
},
|
|
154
|
+
children: Array.from({ length: dotCount }).map((_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
155
|
+
_Box2.default,
|
|
156
|
+
{
|
|
157
|
+
component: "button",
|
|
158
|
+
role: "tab",
|
|
159
|
+
"aria-selected": i === selected,
|
|
160
|
+
"aria-label": `Go to slide ${i + 1}`,
|
|
161
|
+
type: "button",
|
|
162
|
+
onClick: () => _optionalChain([emblaApi, 'optionalAccess', _7 => _7.scrollTo, 'call', _8 => _8(i)]),
|
|
163
|
+
sx: (theme) => ({
|
|
164
|
+
width: i === selected ? 24 : 8,
|
|
165
|
+
height: 8,
|
|
166
|
+
borderRadius: 4,
|
|
167
|
+
border: "none",
|
|
168
|
+
padding: 0,
|
|
169
|
+
cursor: "pointer",
|
|
170
|
+
bgcolor: i === selected ? _nullishCoalesce(dotActiveColor, () => ( theme.palette.primary.main)) : _nullishCoalesce(dotColor, () => ( theme.palette.action.disabled)),
|
|
171
|
+
transition: "width 0.2s ease, background 0.2s ease"
|
|
172
|
+
})
|
|
173
|
+
},
|
|
174
|
+
i
|
|
175
|
+
))
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
exports.Carousel = Carousel;
|
|
185
|
+
//# sourceMappingURL=carousel.js.map
|